diff options
author | mmel <mmel@FreeBSD.org> | 2016-11-05 10:56:32 +0000 |
---|---|---|
committer | mmel <mmel@FreeBSD.org> | 2016-11-05 10:56:32 +0000 |
commit | fac02e73fbc52e5d511b2e872cac7327ae47b5ec (patch) | |
tree | 5c62d6cb401f1c6c8519acb2f40c10db35d3fbf9 /sys | |
parent | aac47603270a19c7b6377c6ac00917b877fb2c98 (diff) | |
download | FreeBSD-src-fac02e73fbc52e5d511b2e872cac7327ae47b5ec.zip FreeBSD-src-fac02e73fbc52e5d511b2e872cac7327ae47b5ec.tar.gz |
MFC r306447,r306477:
r306447:
TEGRA: Rename (cut & pasted) genahci to tegra_ahci. Make device class
definition static.
r306477:
TEGRA: Prepare Tegra subtree for inclusion into ARM generic kernel.
- use DEFINE_CLASS_0() for driver classes - unify driver names - cleanup
driver definitions and bindings
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arm/nvidia/as3722.c | 4 | ||||
-rw-r--r-- | sys/arm/nvidia/tegra124/tegra124_car.c | 11 | ||||
-rw-r--r-- | sys/arm/nvidia/tegra124/tegra124_coretemp.c | 11 | ||||
-rw-r--r-- | sys/arm/nvidia/tegra124/tegra124_cpufreq.c | 10 | ||||
-rw-r--r-- | sys/arm/nvidia/tegra124/tegra124_pmc.c | 10 | ||||
-rw-r--r-- | sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c | 12 | ||||
-rw-r--r-- | sys/arm/nvidia/tegra_abpmisc.c | 6 | ||||
-rw-r--r-- | sys/arm/nvidia/tegra_ahci.c | 15 | ||||
-rw-r--r-- | sys/arm/nvidia/tegra_efuse.c | 7 | ||||
-rw-r--r-- | sys/arm/nvidia/tegra_ehci.c | 12 | ||||
-rw-r--r-- | sys/arm/nvidia/tegra_gpio.c | 18 | ||||
-rw-r--r-- | sys/arm/nvidia/tegra_i2c.c | 10 | ||||
-rw-r--r-- | sys/arm/nvidia/tegra_lic.c | 3 | ||||
-rw-r--r-- | sys/arm/nvidia/tegra_pcie.c | 5 | ||||
-rw-r--r-- | sys/arm/nvidia/tegra_pinmux.c | 11 | ||||
-rw-r--r-- | sys/arm/nvidia/tegra_rtc.c | 7 | ||||
-rw-r--r-- | sys/arm/nvidia/tegra_sdhci.c | 16 | ||||
-rw-r--r-- | sys/arm/nvidia/tegra_soctherm.c | 4 | ||||
-rw-r--r-- | sys/arm/nvidia/tegra_usbphy.c | 11 |
19 files changed, 63 insertions, 120 deletions
diff --git a/sys/arm/nvidia/as3722.c b/sys/arm/nvidia/as3722.c index 3a03322..21dae2d 100644 --- a/sys/arm/nvidia/as3722.c +++ b/sys/arm/nvidia/as3722.c @@ -405,7 +405,7 @@ static device_method_t as3722_methods[] = { }; static devclass_t as3722_devclass; -DEFINE_CLASS_0(gpio, as3722_driver, as3722_methods, +static DEFINE_CLASS_0(gpio, as3722_driver, as3722_methods, sizeof(struct as3722_softc)); EARLY_DRIVER_MODULE(as3722, iicbus, as3722_driver, as3722_devclass, - 0, 0, 74); + NULL, NULL, 74); diff --git a/sys/arm/nvidia/tegra124/tegra124_car.c b/sys/arm/nvidia/tegra124/tegra124_car.c index c0e93c7..4a9549f 100644 --- a/sys/arm/nvidia/tegra124/tegra124_car.c +++ b/sys/arm/nvidia/tegra124/tegra124_car.c @@ -602,12 +602,7 @@ static device_method_t tegra124_car_methods[] = { }; static devclass_t tegra124_car_devclass; - -static driver_t tegra124_car_driver = { - "tegra124_car", - tegra124_car_methods, - sizeof(struct tegra124_car_softc), -}; - +static DEFINE_CLASS_0(car, tegra124_car_driver, tegra124_car_methods, + sizeof(struct tegra124_car_softc)); EARLY_DRIVER_MODULE(tegra124_car, simplebus, tegra124_car_driver, - tegra124_car_devclass, 0, 0, BUS_PASS_TIMER); + tegra124_car_devclass, NULL, NULL, BUS_PASS_TIMER); diff --git a/sys/arm/nvidia/tegra124/tegra124_coretemp.c b/sys/arm/nvidia/tegra124/tegra124_coretemp.c index 1426a4e..b3594f9 100644 --- a/sys/arm/nvidia/tegra124/tegra124_coretemp.c +++ b/sys/arm/nvidia/tegra124/tegra124_coretemp.c @@ -250,7 +250,6 @@ tegra124_coretemp_detach(device_t dev) return (0); } - static device_method_t tegra124_coretemp_methods[] = { /* Device interface */ DEVMETHOD(device_identify, tegra124_coretemp_identify), @@ -263,11 +262,7 @@ static device_method_t tegra124_coretemp_methods[] = { }; static devclass_t tegra124_coretemp_devclass; -static driver_t tegra124_coretemp_driver = { - "tegra124_coretemp", - tegra124_coretemp_methods, - sizeof(struct tegra124_coretemp_softc), -}; - +static DEFINE_CLASS_0(coretemp, tegra124_coretemp_driver, + tegra124_coretemp_methods, sizeof(struct tegra124_coretemp_softc)); DRIVER_MODULE(tegra124_coretemp, cpu, tegra124_coretemp_driver, - tegra124_coretemp_devclass, 0, 0); + tegra124_coretemp_devclass, NULL, NULL); diff --git a/sys/arm/nvidia/tegra124/tegra124_cpufreq.c b/sys/arm/nvidia/tegra124/tegra124_cpufreq.c index 88d40a8..656df15 100644 --- a/sys/arm/nvidia/tegra124/tegra124_cpufreq.c +++ b/sys/arm/nvidia/tegra124/tegra124_cpufreq.c @@ -588,11 +588,7 @@ static device_method_t tegra124_cpufreq_methods[] = { }; static devclass_t tegra124_cpufreq_devclass; -static driver_t tegra124_cpufreq_driver = { - "tegra124_cpufreq", - tegra124_cpufreq_methods, - sizeof(struct tegra124_cpufreq_softc), -}; - +static DEFINE_CLASS_0(cpufreq, tegra124_cpufreq_driver, + tegra124_cpufreq_methods, sizeof(struct tegra124_cpufreq_softc)); DRIVER_MODULE(tegra124_cpufreq, cpu, tegra124_cpufreq_driver, - tegra124_cpufreq_devclass, 0, 0); + tegra124_cpufreq_devclass, NULL, NULL); diff --git a/sys/arm/nvidia/tegra124/tegra124_pmc.c b/sys/arm/nvidia/tegra124/tegra124_pmc.c index 04bebda..04ff73c 100644 --- a/sys/arm/nvidia/tegra124/tegra124_pmc.c +++ b/sys/arm/nvidia/tegra124/tegra124_pmc.c @@ -555,12 +555,8 @@ static device_method_t tegra124_pmc_methods[] = { DEVMETHOD_END }; -static driver_t tegra124_pmc_driver = { - "tegra124_pmc", - tegra124_pmc_methods, - sizeof(struct tegra124_pmc_softc), -}; - static devclass_t tegra124_pmc_devclass; +static DEFINE_CLASS_0(pmc, tegra124_pmc_driver, tegra124_pmc_methods, + sizeof(struct tegra124_pmc_softc)); EARLY_DRIVER_MODULE(tegra124_pmc, simplebus, tegra124_pmc_driver, - tegra124_pmc_devclass, 0, 0, 70); + tegra124_pmc_devclass, NULL, NULL, 70); diff --git a/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c b/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c index 2d79e52..d61f3cb 100644 --- a/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c +++ b/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c @@ -575,7 +575,6 @@ xusbpadctl_attach(device_t dev) return (0); } - static device_method_t tegra_xusbpadctl_methods[] = { /* Device interface */ DEVMETHOD(device_probe, xusbpadctl_probe), @@ -591,13 +590,8 @@ static device_method_t tegra_xusbpadctl_methods[] = { DEVMETHOD_END }; -static driver_t tegra_xusbpadctl_driver = { - "tegra_xusbpadctl", - tegra_xusbpadctl_methods, - sizeof(struct xusbpadctl_softc), -}; - static devclass_t tegra_xusbpadctl_devclass; - +static DEFINE_CLASS_0(xusbpadctl, tegra_xusbpadctl_driver, + tegra_xusbpadctl_methods, sizeof(struct xusbpadctl_softc)); EARLY_DRIVER_MODULE(tegra_xusbpadctl, simplebus, tegra_xusbpadctl_driver, - tegra_xusbpadctl_devclass, 0, 0, 73); + tegra_xusbpadctl_devclass, NULL, NULL, 73); diff --git a/sys/arm/nvidia/tegra_abpmisc.c b/sys/arm/nvidia/tegra_abpmisc.c index 83ee44f..56d91b7 100644 --- a/sys/arm/nvidia/tegra_abpmisc.c +++ b/sys/arm/nvidia/tegra_abpmisc.c @@ -187,8 +187,8 @@ static device_method_t tegra_abpmisc_methods[] = { DEVMETHOD_END }; -DEFINE_CLASS_0(tegra_abpmisc, tegra_abpmisc_driver, tegra_abpmisc_methods, - sizeof(struct tegra_abpmisc_softc)); static devclass_t tegra_abpmisc_devclass; +static DEFINE_CLASS_0(abpmisc, tegra_abpmisc_driver, tegra_abpmisc_methods, + sizeof(struct tegra_abpmisc_softc)); EARLY_DRIVER_MODULE(tegra_abpmisc, simplebus, tegra_abpmisc_driver, - tegra_abpmisc_devclass, 0, 0, BUS_PASS_TIMER); + tegra_abpmisc_devclass, NULL, NULL, BUS_PASS_TIMER); diff --git a/sys/arm/nvidia/tegra_ahci.c b/sys/arm/nvidia/tegra_ahci.c index fcd6e30..b717d59 100644 --- a/sys/arm/nvidia/tegra_ahci.c +++ b/sys/arm/nvidia/tegra_ahci.c @@ -602,8 +602,7 @@ tegra_ahci_resume(device_t dev) return (bus_generic_resume(dev)); } -devclass_t genahci_devclass; -static device_method_t genahci_methods[] = { +static device_method_t tegra_ahci_methods[] = { DEVMETHOD(device_probe, tegra_ahci_probe), DEVMETHOD(device_attach, tegra_ahci_attach), DEVMETHOD(device_detach, tegra_ahci_detach), @@ -619,9 +618,9 @@ static device_method_t genahci_methods[] = { DEVMETHOD_END }; -static driver_t genahci_driver = { - "ahci", - genahci_methods, - sizeof(struct tegra_ahci_sc) -}; -DRIVER_MODULE(genahci, simplebus, genahci_driver, genahci_devclass, NULL, NULL); + +static devclass_t tegra_ahci_devclass; +static DEFINE_CLASS_0(ahci, tegra_ahci_driver, tegra_ahci_methods, + sizeof(struct tegra_ahci_sc)); +DRIVER_MODULE(tegra_ahci, simplebus, tegra_ahci_driver, tegra_ahci_devclass, + NULL, NULL); diff --git a/sys/arm/nvidia/tegra_efuse.c b/sys/arm/nvidia/tegra_efuse.c index 848cf50..34e0da0 100644 --- a/sys/arm/nvidia/tegra_efuse.c +++ b/sys/arm/nvidia/tegra_efuse.c @@ -357,12 +357,11 @@ static device_method_t tegra_efuse_methods[] = { DEVMETHOD(device_attach, tegra_efuse_attach), DEVMETHOD(device_detach, tegra_efuse_detach), - DEVMETHOD_END }; -DEFINE_CLASS_0(tegra_efuse, tegra_efuse_driver, tegra_efuse_methods, - sizeof(struct tegra_efuse_softc)); static devclass_t tegra_efuse_devclass; +static DEFINE_CLASS_0(efuse, tegra_efuse_driver, tegra_efuse_methods, + sizeof(struct tegra_efuse_softc)); EARLY_DRIVER_MODULE(tegra_efuse, simplebus, tegra_efuse_driver, - tegra_efuse_devclass, 0, 0, BUS_PASS_TIMER); + tegra_efuse_devclass, NULL, NULL, BUS_PASS_TIMER); diff --git a/sys/arm/nvidia/tegra_ehci.c b/sys/arm/nvidia/tegra_ehci.c index 2d44ffa..7a041d5 100644 --- a/sys/arm/nvidia/tegra_ehci.c +++ b/sys/arm/nvidia/tegra_ehci.c @@ -311,12 +311,8 @@ static device_method_t ehci_methods[] = { DEVMETHOD_END }; -static driver_t ehci_driver = { - "ehci", - ehci_methods, - sizeof(struct tegra_ehci_softc) -}; - static devclass_t ehci_devclass; -DRIVER_MODULE(ehci, simplebus, ehci_driver, ehci_devclass, 0, 0); -MODULE_DEPEND(ehci, usb, 1, 1, 1);
\ No newline at end of file +static DEFINE_CLASS_0(ehci, ehci_driver, ehci_methods, + sizeof(struct tegra_ehci_softc)); +DRIVER_MODULE(tegra_ehci, simplebus, ehci_driver, ehci_devclass, NULL, NULL); +MODULE_DEPEND(tegra_ehci, usb, 1, 1, 1); diff --git a/sys/arm/nvidia/tegra_gpio.c b/sys/arm/nvidia/tegra_gpio.c index 0f88e64..d715a69 100644 --- a/sys/arm/nvidia/tegra_gpio.c +++ b/sys/arm/nvidia/tegra_gpio.c @@ -885,20 +885,8 @@ static device_method_t tegra_gpio_methods[] = { DEVMETHOD_END }; -static driver_t tegra_gpio_driver = { - "tegra_gpio", - tegra_gpio_methods, - sizeof(struct tegra_gpio_softc), -}; static devclass_t tegra_gpio_devclass; - +static DEFINE_CLASS_0(gpio, tegra_gpio_driver, tegra_gpio_methods, + sizeof(struct tegra_gpio_softc)); EARLY_DRIVER_MODULE(tegra_gpio, simplebus, tegra_gpio_driver, - tegra_gpio_devclass, 0, 0, 70); - -extern devclass_t ofwgpiobus_devclass; -extern driver_t ofw_gpiobus_driver; -EARLY_DRIVER_MODULE(ofw_gpiobus, tegra_gpio, ofw_gpiobus_driver, - ofwgpiobus_devclass, 0, 0, BUS_PASS_BUS); -extern devclass_t gpioc_devclass; -extern driver_t gpioc_driver; -DRIVER_MODULE(gpioc, tegra_gpio, gpioc_driver, gpioc_devclass, 0, 0); + tegra_gpio_devclass, NULL, NULL, 70); diff --git a/sys/arm/nvidia/tegra_i2c.c b/sys/arm/nvidia/tegra_i2c.c index d8f390e..f88768e 100644 --- a/sys/arm/nvidia/tegra_i2c.c +++ b/sys/arm/nvidia/tegra_i2c.c @@ -797,12 +797,8 @@ static device_method_t tegra_i2c_methods[] = { DEVMETHOD_END }; -DEFINE_CLASS_0(iichb, tegra_i2c_driver, tegra_i2c_methods, - sizeof(struct tegra_i2c_softc)); static devclass_t tegra_i2c_devclass; +static DEFINE_CLASS_0(iichb, tegra_i2c_driver, tegra_i2c_methods, + sizeof(struct tegra_i2c_softc)); EARLY_DRIVER_MODULE(tegra_iic, simplebus, tegra_i2c_driver, tegra_i2c_devclass, - 0, 0, 73); -extern devclass_t ofwiicbus_devclass; -extern driver_t ofw_iicbus_driver; -EARLY_DRIVER_MODULE(ofw_iicbus, tegra_iic, ofw_iicbus_driver, - ofwiicbus_devclass, 0, 0, BUS_PASS_BUS); + NULL, NULL, 73); diff --git a/sys/arm/nvidia/tegra_lic.c b/sys/arm/nvidia/tegra_lic.c index bda096c..b029913 100644 --- a/sys/arm/nvidia/tegra_lic.c +++ b/sys/arm/nvidia/tegra_lic.c @@ -281,8 +281,9 @@ static device_method_t tegra_lic_methods[] = { #endif DEVMETHOD_END }; + devclass_t tegra_lic_devclass; -DEFINE_CLASS_0(tegra_lic, tegra_lic_driver, tegra_lic_methods, +static DEFINE_CLASS_0(lic, tegra_lic_driver, tegra_lic_methods, sizeof(struct tegra_lic_sc)); EARLY_DRIVER_MODULE(tegra_lic, simplebus, tegra_lic_driver, tegra_lic_devclass, NULL, NULL, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE + 1); diff --git a/sys/arm/nvidia/tegra_pcie.c b/sys/arm/nvidia/tegra_pcie.c index dbc21bc..c5a8ceb 100644 --- a/sys/arm/nvidia/tegra_pcie.c +++ b/sys/arm/nvidia/tegra_pcie.c @@ -1626,7 +1626,8 @@ static device_method_t tegra_pcib_methods[] = { DEVMETHOD_END }; +static devclass_t pcib_devclass; DEFINE_CLASS_1(pcib, tegra_pcib_driver, tegra_pcib_methods, sizeof(struct tegra_pcib_softc), ofw_pci_driver); -devclass_t pcib_devclass; -DRIVER_MODULE(pcib, simplebus, tegra_pcib_driver, pcib_devclass, 0, 0); +DRIVER_MODULE(pcib, simplebus, tegra_pcib_driver, pcib_devclass, + NULL, NULL); diff --git a/sys/arm/nvidia/tegra_pinmux.c b/sys/arm/nvidia/tegra_pinmux.c index 0e8102e..c930d30 100644 --- a/sys/arm/nvidia/tegra_pinmux.c +++ b/sys/arm/nvidia/tegra_pinmux.c @@ -792,13 +792,8 @@ static device_method_t tegra_pinmux_methods[] = { DEVMETHOD_END }; -static driver_t tegra_pinmux_driver = { - "tegra_pinmux", - tegra_pinmux_methods, - sizeof(struct pinmux_softc), -}; - static devclass_t tegra_pinmux_devclass; - +static DEFINE_CLASS_0(pinmux, tegra_pinmux_driver, tegra_pinmux_methods, + sizeof(struct pinmux_softc)); EARLY_DRIVER_MODULE(tegra_pinmux, simplebus, tegra_pinmux_driver, - tegra_pinmux_devclass, 0, 0, 71); + tegra_pinmux_devclass, NULL, NULL, 71); diff --git a/sys/arm/nvidia/tegra_rtc.c b/sys/arm/nvidia/tegra_rtc.c index eceab5d..09a7c74 100644 --- a/sys/arm/nvidia/tegra_rtc.c +++ b/sys/arm/nvidia/tegra_rtc.c @@ -297,7 +297,8 @@ static device_method_t tegra_rtc_methods[] = { DEVMETHOD_END }; -DEFINE_CLASS_0(tegra_rtc, tegra_rtc_driver, tegra_rtc_methods, - sizeof(struct tegra_rtc_softc)); static devclass_t tegra_rtc_devclass; -DRIVER_MODULE(tegra_rtc, simplebus, tegra_rtc_driver, tegra_rtc_devclass, 0, 0); +static DEFINE_CLASS_0(rtc, tegra_rtc_driver, tegra_rtc_methods, + sizeof(struct tegra_rtc_softc)); +DRIVER_MODULE(tegra_rtc, simplebus, tegra_rtc_driver, tegra_rtc_devclass, + NULL, NULL); diff --git a/sys/arm/nvidia/tegra_sdhci.c b/sys/arm/nvidia/tegra_sdhci.c index abd8d06..07c0fa8 100644 --- a/sys/arm/nvidia/tegra_sdhci.c +++ b/sys/arm/nvidia/tegra_sdhci.c @@ -448,18 +448,14 @@ static device_method_t tegra_sdhci_methods[] = { DEVMETHOD(sdhci_write_4, tegra_sdhci_write_4), DEVMETHOD(sdhci_write_multi_4, tegra_sdhci_write_multi_4), - { 0, 0 } + DEVMETHOD_END }; static devclass_t tegra_sdhci_devclass; - -static driver_t tegra_sdhci_driver = { - "sdhci_tegra", - tegra_sdhci_methods, - sizeof(struct tegra_sdhci_softc), -}; - +static DEFINE_CLASS_0(sdhci, tegra_sdhci_driver, tegra_sdhci_methods, + sizeof(struct tegra_sdhci_softc)); DRIVER_MODULE(sdhci_tegra, simplebus, tegra_sdhci_driver, tegra_sdhci_devclass, - 0, 0); + NULL, NULL); MODULE_DEPEND(sdhci_tegra, sdhci, 1, 1, 1); -DRIVER_MODULE(mmc, sdhci_tegra, mmc_driver, mmc_devclass, NULL, NULL); +DRIVER_MODULE(mmc, sdhci, mmc_driver, mmc_devclass, NULL, NULL); +MODULE_DEPEND(sdhci_tegra, mmc, 1, 1, 1); diff --git a/sys/arm/nvidia/tegra_soctherm.c b/sys/arm/nvidia/tegra_soctherm.c index 6851cc2..6ab77ec 100644 --- a/sys/arm/nvidia/tegra_soctherm.c +++ b/sys/arm/nvidia/tegra_soctherm.c @@ -690,7 +690,7 @@ static device_method_t tegra_soctherm_methods[] = { }; static devclass_t tegra_soctherm_devclass; -DEFINE_CLASS_0(tegra_soctherm, tegra_soctherm_driver, tegra_soctherm_methods, +static DEFINE_CLASS_0(soctherm, tegra_soctherm_driver, tegra_soctherm_methods, sizeof(struct soctherm_softc)); EARLY_DRIVER_MODULE(tegra_soctherm, simplebus, tegra_soctherm_driver, -tegra_soctherm_devclass, 0, 0, 79); + tegra_soctherm_devclass, NULL, NULL, 79); diff --git a/sys/arm/nvidia/tegra_usbphy.c b/sys/arm/nvidia/tegra_usbphy.c index 68104b8..d1c6eeb 100644 --- a/sys/arm/nvidia/tegra_usbphy.c +++ b/sys/arm/nvidia/tegra_usbphy.c @@ -827,13 +827,8 @@ static device_method_t tegra_usbphy_methods[] = { DEVMETHOD_END }; -static driver_t tegra_usbphy_driver = { - "tegra_usbphy", - tegra_usbphy_methods, - sizeof(struct usbphy_softc), -}; - static devclass_t tegra_usbphy_devclass; - +static DEFINE_CLASS_0(usbphy, tegra_usbphy_driver, tegra_usbphy_methods, + sizeof(struct usbphy_softc)); EARLY_DRIVER_MODULE(tegra_usbphy, simplebus, tegra_usbphy_driver, - tegra_usbphy_devclass, 0, 0, 79); + tegra_usbphy_devclass, NULL, NULL, 79); |