| 83 | SLIST_HEAD(uart_devinfo_list, uart_devinfo) uart_sysdevs; |
| 84 | |
| 85 | static int |
| 86 | uart_octeon_probe(device_t dev) |
| 87 | { |
| 88 | struct uart_softc *sc; |
| 89 | int unit; |
| 90 | |
| 91 | unit = device_get_unit(dev); |
| 92 | sc = device_get_softc(dev); |
| 93 | sc->sc_class = &uart_oct16550_class; |
| 94 | |
| 95 | /* |
| 96 | * We inherit the settings from the systme console. Note, the bst |
| 97 | * bad bus_space_map are bogus here, but obio doesn't yet support |
| 98 | * them, it seems. |
| 99 | */ |
| 100 | sc->sc_sysdev = SLIST_FIRST(&uart_sysdevs); |
| 101 | bcopy(&sc->sc_sysdev->bas, &sc->sc_bas, sizeof(sc->sc_bas)); |
| 102 | sc->sc_bas.bst = uart_bus_space_mem; |
| 103 | /* |
| 104 | * XXX |
| 105 | * RBR isn't really a great base address. |
| 106 | */ |
| 107 | if (bus_space_map(sc->sc_bas.bst, CVMX_MIO_UARTX_RBR(0), |
| 108 | uart_getrange(sc->sc_class), 0, &sc->sc_bas.bsh) != 0) |
| 109 | return (ENXIO); |
| 110 | return (uart_bus_probe(dev, sc->sc_bas.regshft, 0, 0, 0, unit, 0)); |
| 111 | } |
| 112 | |
| 113 | DRIVER_MODULE(uart, obio, uart_octeon_driver, uart_devclass, 0, 0); |
nothing calls this directly
no test coverage detected