Changeset View
Changeset View
Standalone View
Standalone View
stable/11/sys/arm/nvidia/tegra_uart.c
Show First 20 Lines • Show All 211 Lines • ▼ Show 20 Lines | if (rv != 0) { | ||||
device_printf(dev, "Cannot enable UART clock: %d\n", rv); | device_printf(dev, "Cannot enable UART clock: %d\n", rv); | ||||
return (ENXIO); | return (ENXIO); | ||||
} | } | ||||
rv = clk_get_freq(sc->clk, &freq); | rv = clk_get_freq(sc->clk, &freq); | ||||
if (rv != 0) { | if (rv != 0) { | ||||
device_printf(dev, "Cannot enable UART clock: %d\n", rv); | device_printf(dev, "Cannot enable UART clock: %d\n", rv); | ||||
return (ENXIO); | return (ENXIO); | ||||
} | } | ||||
return (uart_bus_probe(dev, shift, (int)freq, 0, 0)); | return (uart_bus_probe(dev, shift, 0, (int)freq, 0, 0, 0)); | ||||
} | } | ||||
static int | static int | ||||
tegra_uart_detach(device_t dev) | tegra_uart_detach(device_t dev) | ||||
{ | { | ||||
struct tegra_softc *sc; | struct tegra_softc *sc; | ||||
sc = device_get_softc(dev); | sc = device_get_softc(dev); | ||||
Show All 14 Lines | |||||
static driver_t tegra_uart_driver = { | static driver_t tegra_uart_driver = { | ||||
uart_driver_name, | uart_driver_name, | ||||
tegra_uart_bus_methods, | tegra_uart_bus_methods, | ||||
sizeof(struct tegra_softc), | sizeof(struct tegra_softc), | ||||
}; | }; | ||||
DRIVER_MODULE(tegra_uart, simplebus, tegra_uart_driver, uart_devclass, | DRIVER_MODULE(tegra_uart, simplebus, tegra_uart_driver, uart_devclass, | ||||
0, 0); | 0, 0); | ||||
No newline at end of file |