aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJessica Clarke <jrtc27@FreeBSD.org>2021-08-07 18:27:29 +0000
committerJessica Clarke <jrtc27@FreeBSD.org>2021-08-07 18:27:29 +0000
commitdcbea9a2f465be1786db21523a7f55db3f7ab3dd (patch)
tree59b54e8e7287e736e078ad947d5c53589cb6d1fd
parent589d8a78a57b3ca1327bec3311281a38e4e49952 (diff)
downloadsrc-dcbea9a2f465be1786db21523a7f55db3f7ab3dd.tar.gz
src-dcbea9a2f465be1786db21523a7f55db3f7ab3dd.zip
sifive_prci: Delay attachment until after clk_fixed
This avoids noisy output from early attempts to attach before clk_fixed has attached to the parent clocks. Reviewed by: kp, mhorne MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31023
-rw-r--r--sys/riscv/sifive/sifive_prci.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/riscv/sifive/sifive_prci.c b/sys/riscv/sifive/sifive_prci.c
index 21b9cd568f32..36f2f6705f7e 100644
--- a/sys/riscv/sifive/sifive_prci.c
+++ b/sys/riscv/sifive/sifive_prci.c
@@ -638,5 +638,9 @@ static driver_t prci_driver = {
static devclass_t prci_devclass;
+/*
+ * hfclk and rtcclk appear later in the device tree than prci, so we must
+ * attach late.
+ */
EARLY_DRIVER_MODULE(sifive_prci, simplebus, prci_driver, prci_devclass, 0, 0,
- BUS_PASS_BUS);
+ BUS_PASS_BUS + BUS_PASS_ORDER_LATE);