| 46 | } |
| 47 | |
| 48 | void 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 | |
| 62 | static bool uart_can_tx(struct sifive_uart_registers *regs) |
| 63 | { |
nothing calls this directly
no test coverage detected