| 67 | } |
| 68 | |
| 69 | static int |
| 70 | uart_cpu_init(struct uart_devinfo *di, u_int uart, int baudrate) |
| 71 | { |
| 72 | if (uart >= CHIPC_UART_MAX) |
| 73 | return (EINVAL); |
| 74 | |
| 75 | di->ops = uart_getops(chipc_uart_class); |
| 76 | di->bas.chan = 0; |
| 77 | di->bas.bst = uart_bus_space_mem; |
| 78 | di->bas.bsh = (bus_space_handle_t) BCM_CORE_ADDR(bcm_get_platform(), |
| 79 | cc_addr, CHIPC_UART(uart)); |
| 80 | di->bas.regshft = 0; |
| 81 | di->bas.rclk = bcm_get_uart_rclk(bcm_get_platform()); |
| 82 | di->baudrate = baudrate; |
| 83 | di->databits = 8; |
| 84 | di->stopbits = 1; |
| 85 | di->parity = UART_PARITY_NONE; |
| 86 | |
| 87 | return (0); |
| 88 | } |
| 89 | |
| 90 | #ifdef CFE |
| 91 | static int |
no test coverage detected