aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Hibbits <jhibbits@FreeBSD.org>2022-11-26 16:28:09 +0000
committerJustin Hibbits <jhibbits@FreeBSD.org>2022-11-26 16:28:09 +0000
commitfae4c6494ae21b422e474b2cb90299beadca5aea (patch)
treef50a8e2397bd367b69602b750b06bad4a9044297
parent21d5b592faa1cd71c201acfb2686b79e0bbba9f7 (diff)
downloadsrc-fae4c6494ae21b422e474b2cb90299beadca5aea.tar.gz
src-fae4c6494ae21b422e474b2cb90299beadca5aea.zip
dpaa: Probe and attach pqmdio at BUS_PASS_RESOURCE
Avoid the fragile nature of depending on ordering of the devices in the FDT by forcing the MDIO driver to precede the DTSEC driver.
-rw-r--r--sys/dev/dpaa/fman_mdio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/dpaa/fman_mdio.c b/sys/dev/dpaa/fman_mdio.c
index fcaca5c580c9..5a81424d03a3 100644
--- a/sys/dev/dpaa/fman_mdio.c
+++ b/sys/dev/dpaa/fman_mdio.c
@@ -204,7 +204,8 @@ pqmdio_miibus_writereg(device_t dev, int phy, int reg, int value)
return (0);
}
-DRIVER_MODULE(pqmdio, fman, pqmdio_driver, 0, 0);
+EARLY_DRIVER_MODULE(pqmdio, fman, pqmdio_driver, 0, 0,
+ BUS_PASS_RESOURCE);
DRIVER_MODULE(miibus, pqmdio, miibus_driver, 0, 0);
MODULE_DEPEND(pqmdio, miibus, 1, 1, 1);