coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
uart.c
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-only */
2
3
#include <
stdint.h
>
4
#include <
console/uart.h
>
5
#include <
commonlib/bsd/helpers.h
>
6
#include <soc/addressmap.h>
7
#include <soc/clock.h>
8
9
uintptr_t
uart_platform_base
(
unsigned
int
idx)
10
{
11
if
(idx < 2)
12
return
FU540_UART
(idx);
13
else
14
return
0;
15
}
16
17
unsigned
int
uart_platform_refclk
(
void
)
18
{
19
return
clock_get_tlclk_khz
() *
KHz
;
20
}
helpers.h
KHz
#define KHz
Definition:
helpers.h:79
uart.h
uart_platform_base
uintptr_t uart_platform_base(unsigned int idx)
Definition:
uart.c:8
uart_platform_refclk
unsigned int uart_platform_refclk(void)
Definition:
uart.c:85
clock_get_tlclk_khz
int clock_get_tlclk_khz(void)
Definition:
clock.c:274
FU540_UART
#define FU540_UART(x)
Definition:
addressmap.h:8
stdint.h
uintptr_t
unsigned long uintptr_t
Definition:
stdint.h:21
src
soc
sifive
fu540
uart.c
Generated by
1.9.1