diff options
author | landonf <landonf@FreeBSD.org> | 2016-06-08 21:38:51 +0000 |
---|---|---|
committer | landonf <landonf@FreeBSD.org> | 2016-06-08 21:38:51 +0000 |
commit | 31dc98285b6445d4f1a8a03a3b63bf5fd697ac15 (patch) | |
tree | e3b3ecf67523ac2047e344078d01d779e1851956 /sys/mips | |
parent | 162e48c014d3cd1ed9af5f83d74fc3579f89bca3 (diff) | |
download | FreeBSD-src-31dc98285b6445d4f1a8a03a3b63bf5fd697ac15.zip FreeBSD-src-31dc98285b6445d4f1a8a03a3b63bf5fd697ac15.tar.gz |
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
Diffstat (limited to 'sys/mips')
-rw-r--r-- | sys/mips/broadcom/bcm_mipscore.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/sys/mips/broadcom/bcm_mipscore.c b/sys/mips/broadcom/bcm_mipscore.c index 988bedd..e48a68f 100644 --- a/sys/mips/broadcom/bcm_mipscore.c +++ b/sys/mips/broadcom/bcm_mipscore.c @@ -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); |