svn commit: r301698 - in head/sys: dev/bhnd dev/bhnd/bcma dev/bhnd/siba mips/broadcom
Landon J. Fuller
landonf at FreeBSD.org
Wed Jun 8 21:38:53 UTC 2016
Author: landonf
Date: Wed Jun 8 21:38:51 2016
New Revision: 301698
URL: https://svnweb.freebsd.org/changeset/base/301698
Log:
bhnd(4): Fix mips/broadcom core matching and bus pass order.
Changes:
- Fixed incorrect MIPS74k vendor ID in the bhnd core descriptor tables
- Fixed MIPS core driver's matching against MIPS/MIPS33 cores.
- Improved MIPS3302 core description.
- Enabled BUS_PASS_BUS on the bhnd nexus drivers to allow early probing
of the MIPS core.
- Enabled BUS_PASS_CPU on the MIPS core driver to ensure correct attach
order.
- Disabled matching of the MIPS core driver on non-SoC devices.
Reviewed by: Michael Zhilin <mizhka at gmail.com>
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D6735
Modified:
head/sys/dev/bhnd/bcma/bcma_nexus.c
head/sys/dev/bhnd/bhnd_subr.c
head/sys/dev/bhnd/siba/siba_nexus.c
head/sys/mips/broadcom/bcm_mipscore.c
Modified: head/sys/dev/bhnd/bcma/bcma_nexus.c
==============================================================================
--- head/sys/dev/bhnd/bcma/bcma_nexus.c Wed Jun 8 21:31:33 2016 (r301697)
+++ head/sys/dev/bhnd/bcma/bcma_nexus.c Wed Jun 8 21:38:51 2016 (r301698)
@@ -135,4 +135,5 @@ static device_method_t bcma_nexus_method
DEFINE_CLASS_2(bhnd, bcma_nexus_driver, bcma_nexus_methods,
sizeof(struct bcma_nexus_softc), bhnd_nexus_driver, bcma_driver);
-DRIVER_MODULE(bcma_nexus, nexus, bcma_nexus_driver, bhnd_devclass, 0, 0);
+EARLY_DRIVER_MODULE(bcma_nexus, nexus, bcma_nexus_driver, bhnd_devclass, 0, 0,
+ BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE);
Modified: head/sys/dev/bhnd/bhnd_subr.c
==============================================================================
--- head/sys/dev/bhnd/bhnd_subr.c Wed Jun 8 21:31:33 2016 (r301697)
+++ head/sys/dev/bhnd/bhnd_subr.c Wed Jun 8 21:38:51 2016 (r301698)
@@ -86,7 +86,7 @@ static const struct bhnd_core_desc {
BHND_CDESC(BCM, APHY, WLAN_PHY, "802.11a PHY"),
BHND_CDESC(BCM, BPHY, WLAN_PHY, "802.11b PHY"),
BHND_CDESC(BCM, GPHY, WLAN_PHY, "802.11g PHY"),
- BHND_CDESC(BCM, MIPS33, CPU, "MIPS 3302 Core"),
+ BHND_CDESC(BCM, MIPS33, CPU, "MIPS3302 Core"),
BHND_CDESC(BCM, USB11H, OTHER, "USB 1.1 Host Controller"),
BHND_CDESC(BCM, USB11D, OTHER, "USB 1.1 Device Core"),
BHND_CDESC(BCM, USB20H, OTHER, "USB 2.0 Host Controller"),
@@ -108,7 +108,7 @@ static const struct bhnd_core_desc {
BHND_CDESC(BCM, SDIOD, OTHER, "SDIO Device Core"),
BHND_CDESC(BCM, ARMCM3, CPU, "ARM Cortex-M3 CPU"),
BHND_CDESC(BCM, HTPHY, WLAN_PHY, "802.11n 4x4 PHY"),
- BHND_CDESC(BCM, MIPS74K, CPU, "MIPS74k CPU"),
+ BHND_CDESC(MIPS,MIPS74K, CPU, "MIPS74k CPU"),
BHND_CDESC(BCM, GMAC, ENET_MAC, "Gigabit MAC core"),
BHND_CDESC(BCM, DMEMC, MEMC, "DDR1/DDR2 Memory Controller"),
BHND_CDESC(BCM, PCIERC, OTHER, "PCIe Root Complex"),
Modified: head/sys/dev/bhnd/siba/siba_nexus.c
==============================================================================
--- head/sys/dev/bhnd/siba/siba_nexus.c Wed Jun 8 21:31:33 2016 (r301697)
+++ head/sys/dev/bhnd/siba/siba_nexus.c Wed Jun 8 21:38:51 2016 (r301698)
@@ -115,4 +115,5 @@ static device_method_t siba_nexus_method
DEFINE_CLASS_2(bhnd, siba_nexus_driver, siba_nexus_methods,
sizeof(struct siba_nexus_softc), bhnd_nexus_driver, siba_driver);
-DRIVER_MODULE(siba_nexus, nexus, siba_nexus_driver, bhnd_devclass, 0, 0);
+EARLY_DRIVER_MODULE(siba_nexus, nexus, siba_nexus_driver, bhnd_devclass, 0, 0,
+ BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE);
Modified: head/sys/mips/broadcom/bcm_mipscore.c
==============================================================================
--- head/sys/mips/broadcom/bcm_mipscore.c Wed Jun 8 21:31:33 2016 (r301697)
+++ head/sys/mips/broadcom/bcm_mipscore.c Wed Jun 8 21:38:51 2016 (r301698)
@@ -53,10 +53,13 @@ static const struct resource_spec mipsco
{ -1, -1, 0 }
};
+#define MIPSCORE_DEV(_vendor, _core) \
+ BHND_DEVICE(_vendor, _core, NULL, NULL, BHND_DF_SOC)
+
struct bhnd_device mipscore_match[] = {
- BHND_DEVICE(BCM, MIPS, NULL, NULL),
- BHND_DEVICE(BCM, MIPS33, NULL, NULL),
- BHND_DEVICE(MIPS, MIPS74K, NULL, NULL),
+ MIPSCORE_DEV(BCM, MIPS),
+ MIPSCORE_DEV(BCM, MIPS33),
+ MIPSCORE_DEV(MIPS, MIPS74K),
BHND_DEVICE_END
};
@@ -116,8 +119,8 @@ static device_method_t mipscore_methods[
devclass_t bhnd_mipscore_devclass;
-DEFINE_CLASS_0(bhnd_mipscore, mipscore_driver, mipscore_methods,
- sizeof(struct mipscore_softc));
-DRIVER_MODULE(bhnd_mipscore, bhnd, mipscore_driver, bhnd_mipscore_devclass,
- 0, 0);
-MODULE_VERSION(bhnd_mipscore, 1);
+DEFINE_CLASS_0(bhnd_mips, mipscore_driver, mipscore_methods,
+ sizeof(struct mipscore_softc));
+EARLY_DRIVER_MODULE(bhnd_mips, bhnd, mipscore_driver,
+ bhnd_mipscore_devclass, 0, 0, BUS_PASS_CPU + BUS_PASS_ORDER_EARLY);
+MODULE_VERSION(bhnd_mips, 1);
More information about the svn-src-head
mailing list