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@gmail.com>
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D6735
This commit is contained in:
Landon J. Fuller 2016-06-08 21:38:51 +00:00
parent b0b9c8546b
commit d342b2e9da
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=301698
4 changed files with 17 additions and 12 deletions

View File

@ -135,4 +135,5 @@ static device_method_t bcma_nexus_methods[] = {
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);

View File

@ -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"),

View File

@ -115,4 +115,5 @@ static device_method_t siba_nexus_methods[] = {
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);

View File

@ -53,10 +53,13 @@ static const struct resource_spec mipscore_rspec[MIPSCORE_MAX_RSPEC] = {
{ -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);