MCPcopy Create free account
hub / github.com/coreboot/coreboot / uart_init

Function uart_init

src/drivers/uart/sifive.c:48–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48void uart_init(unsigned int idx)
49{
50 /*
51 * according to FU540/FU740 manual:
52 * f_baud = f_in / (div + 1)
53 * <=>
54 * div = (f_in / f_baud) - 1
55 */
56 unsigned int div = uart_get_baudrate_divisor();
57 div -= 1;
58
59 sifive_uart_init(uart_platform_baseptr(idx), div);
60}
61
62static bool uart_can_tx(struct sifive_uart_registers *regs)
63{

Callers

nothing calls this directly

Calls 3

sifive_uart_initFunction · 0.85
uart_platform_baseptrFunction · 0.85

Tested by

no test coverage detected