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>
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 }
#define KHz
Definition: helpers.h:79
uintptr_t uart_platform_base(unsigned int idx)
Definition: uart.c:8
unsigned int uart_platform_refclk(void)
Definition: uart.c:85
int clock_get_tlclk_khz(void)
Definition: clock.c:274
#define FU540_UART(x)
Definition: addressmap.h:8
unsigned long uintptr_t
Definition: stdint.h:21