Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Aug 2019 17:58:31 +0000 (UTC)
From:      Emmanuel Vadot <manu@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r350842 - in head/sys/arm/allwinner: . a20 clkng
Message-ID:  <201908101758.x7AHwVPF000692@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: manu
Date: Sat Aug 10 17:58:30 2019
New Revision: 350842
URL: https://svnweb.freebsd.org/changeset/base/350842

Log:
  allwinner: Rework the BUS_PASS on drivers
  
  - Put all clock and control unit driver in BUS_PASS_RESOURCE except
    for the DE2 CCU as it needs the main CCU to be available.
  - Use BUS_PASS_CPU for a20_cpu_cfg as it makes more sense.
  - For aw_syscon use SCHEDULER pass as we need it early for drivers
    that attach in BUS_PASS_SUPPORTDEV
  - For the rest we can use BUS_PASS_SUPPORTDEV

Modified:
  head/sys/arm/allwinner/a10_sramc.c
  head/sys/arm/allwinner/a20/a20_cpu_cfg.c
  head/sys/arm/allwinner/aw_ccu.c
  head/sys/arm/allwinner/aw_gmacclk.c
  head/sys/arm/allwinner/aw_reset.c
  head/sys/arm/allwinner/aw_rsb.c
  head/sys/arm/allwinner/aw_rtc.c
  head/sys/arm/allwinner/aw_sid.c
  head/sys/arm/allwinner/aw_syscon.c
  head/sys/arm/allwinner/clkng/ccu_a10.c
  head/sys/arm/allwinner/clkng/ccu_a13.c
  head/sys/arm/allwinner/clkng/ccu_a31.c
  head/sys/arm/allwinner/clkng/ccu_a64.c
  head/sys/arm/allwinner/clkng/ccu_a83t.c
  head/sys/arm/allwinner/clkng/ccu_de2.c
  head/sys/arm/allwinner/clkng/ccu_h3.c
  head/sys/arm/allwinner/clkng/ccu_sun8i_r.c

Modified: head/sys/arm/allwinner/a10_sramc.c
==============================================================================
--- head/sys/arm/allwinner/a10_sramc.c	Sat Aug 10 17:48:11 2019	(r350841)
+++ head/sys/arm/allwinner/a10_sramc.c	Sat Aug 10 17:58:30 2019	(r350842)
@@ -116,7 +116,7 @@ static driver_t a10_sramc_driver = {
 static devclass_t a10_sramc_devclass;
 
 EARLY_DRIVER_MODULE(a10_sramc, simplebus, a10_sramc_driver, a10_sramc_devclass,
-    0, 0, BUS_PASS_RESOURCE + BUS_PASS_ORDER_EARLY);
+    0, 0, BUS_PASS_SUPPORTDEV + BUS_PASS_ORDER_FIRST);
 
 int
 a10_map_to_emac(void)

Modified: head/sys/arm/allwinner/a20/a20_cpu_cfg.c
==============================================================================
--- head/sys/arm/allwinner/a20/a20_cpu_cfg.c	Sat Aug 10 17:48:11 2019	(r350841)
+++ head/sys/arm/allwinner/a20/a20_cpu_cfg.c	Sat Aug 10 17:58:30 2019	(r350842)
@@ -119,7 +119,7 @@ static driver_t a20_cpu_cfg_driver = {
 static devclass_t a20_cpu_cfg_devclass;
 
 EARLY_DRIVER_MODULE(a20_cpu_cfg, simplebus, a20_cpu_cfg_driver, a20_cpu_cfg_devclass, 0, 0,
-    BUS_PASS_RESOURCE + BUS_PASS_ORDER_MIDDLE);
+    BUS_PASS_CPU + BUS_PASS_ORDER_FIRST);
 
 uint64_t
 a20_read_counter64(void)

Modified: head/sys/arm/allwinner/aw_ccu.c
==============================================================================
--- head/sys/arm/allwinner/aw_ccu.c	Sat Aug 10 17:48:11 2019	(r350841)
+++ head/sys/arm/allwinner/aw_ccu.c	Sat Aug 10 17:58:30 2019	(r350842)
@@ -250,6 +250,6 @@ DEFINE_CLASS_1(aw_ccu, aw_ccu_driver, aw_ccu_methods,
 static devclass_t aw_ccu_devclass;
 
 EARLY_DRIVER_MODULE(aw_ccu, simplebus, aw_ccu_driver, aw_ccu_devclass,
-    0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE);
+    0, 0, BUS_PASS_RESOURCE + BUS_PASS_ORDER_MIDDLE);
 
 MODULE_VERSION(aw_ccu, 1);

Modified: head/sys/arm/allwinner/aw_gmacclk.c
==============================================================================
--- head/sys/arm/allwinner/aw_gmacclk.c	Sat Aug 10 17:48:11 2019	(r350841)
+++ head/sys/arm/allwinner/aw_gmacclk.c	Sat Aug 10 17:58:30 2019	(r350842)
@@ -277,4 +277,4 @@ static driver_t aw_gmacclk_driver = {
 static devclass_t aw_gmacclk_devclass;
 
 EARLY_DRIVER_MODULE(aw_gmacclk, simplebus, aw_gmacclk_driver,
-    aw_gmacclk_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE);
+    aw_gmacclk_devclass, 0, 0, BUS_PASS_RESOURCE + BUS_PASS_ORDER_MIDDLE);

Modified: head/sys/arm/allwinner/aw_reset.c
==============================================================================
--- head/sys/arm/allwinner/aw_reset.c	Sat Aug 10 17:48:11 2019	(r350841)
+++ head/sys/arm/allwinner/aw_reset.c	Sat Aug 10 17:58:30 2019	(r350842)
@@ -162,5 +162,5 @@ static driver_t aw_reset_driver = {
 static devclass_t aw_reset_devclass;
 
 EARLY_DRIVER_MODULE(aw_reset, simplebus, aw_reset_driver, aw_reset_devclass,
-    0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE);
+    0, 0, BUS_PASS_RESOURCE + BUS_PASS_ORDER_MIDDLE);
 MODULE_VERSION(aw_reset, 1);

Modified: head/sys/arm/allwinner/aw_rsb.c
==============================================================================
--- head/sys/arm/allwinner/aw_rsb.c	Sat Aug 10 17:48:11 2019	(r350841)
+++ head/sys/arm/allwinner/aw_rsb.c	Sat Aug 10 17:58:30 2019	(r350842)
@@ -494,9 +494,9 @@ static driver_t rsb_driver = {
 static devclass_t rsb_devclass;
 
 EARLY_DRIVER_MODULE(iicbus, rsb, iicbus_driver, iicbus_devclass, 0, 0,
-    BUS_PASS_RESOURCE + BUS_PASS_ORDER_MIDDLE);
+    BUS_PASS_SUPPORTDEV + BUS_PASS_ORDER_MIDDLE);
 EARLY_DRIVER_MODULE(rsb, simplebus, rsb_driver, rsb_devclass, 0, 0,
-    BUS_PASS_RESOURCE + BUS_PASS_ORDER_MIDDLE);
+    BUS_PASS_SUPPORTDEV + BUS_PASS_ORDER_MIDDLE);
 MODULE_VERSION(rsb, 1);
 MODULE_DEPEND(rsb, iicbus, 1, 1, 1);
 SIMPLEBUS_PNP_INFO(compat_data);

Modified: head/sys/arm/allwinner/aw_rtc.c
==============================================================================
--- head/sys/arm/allwinner/aw_rtc.c	Sat Aug 10 17:48:11 2019	(r350841)
+++ head/sys/arm/allwinner/aw_rtc.c	Sat Aug 10 17:58:30 2019	(r350842)
@@ -185,7 +185,7 @@ static driver_t aw_rtc_driver = {
 static devclass_t aw_rtc_devclass;
 
 EARLY_DRIVER_MODULE(aw_rtc, simplebus, aw_rtc_driver, aw_rtc_devclass, 0, 0,
-    BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE);
+    BUS_PASS_RESOURCE + BUS_PASS_ORDER_FIRST);
 MODULE_VERSION(aw_rtc, 1);
 SIMPLEBUS_PNP_INFO(compat_data);
 

Modified: head/sys/arm/allwinner/aw_sid.c
==============================================================================
--- head/sys/arm/allwinner/aw_sid.c	Sat Aug 10 17:48:11 2019	(r350841)
+++ head/sys/arm/allwinner/aw_sid.c	Sat Aug 10 17:58:30 2019	(r350842)
@@ -412,6 +412,6 @@ static driver_t aw_sid_driver = {
 static devclass_t aw_sid_devclass;
 
 EARLY_DRIVER_MODULE(aw_sid, simplebus, aw_sid_driver, aw_sid_devclass, 0, 0,
-    BUS_PASS_RESOURCE + BUS_PASS_ORDER_FIRST);
+    BUS_PASS_SUPPORTDEV + BUS_PASS_ORDER_FIRST);
 MODULE_VERSION(aw_sid, 1);
 SIMPLEBUS_PNP_INFO(compat_data);

Modified: head/sys/arm/allwinner/aw_syscon.c
==============================================================================
--- head/sys/arm/allwinner/aw_syscon.c	Sat Aug 10 17:48:11 2019	(r350841)
+++ head/sys/arm/allwinner/aw_syscon.c	Sat Aug 10 17:58:30 2019	(r350842)
@@ -82,5 +82,5 @@ DEFINE_CLASS_1(aw_syscon, aw_syscon_driver, aw_syscon_
 static devclass_t aw_syscon_devclass;
 /* aw_syscon needs to attach prior to if_awg */
 EARLY_DRIVER_MODULE(aw_syscon, simplebus, aw_syscon_driver, aw_syscon_devclass,
-    0, 0, BUS_PASS_SUPPORTDEV + BUS_PASS_ORDER_MIDDLE);
+    0, 0, BUS_PASS_SCHEDULER + BUS_PASS_ORDER_LAST);
 MODULE_VERSION(aw_syscon, 1);

Modified: head/sys/arm/allwinner/clkng/ccu_a10.c
==============================================================================
--- head/sys/arm/allwinner/clkng/ccu_a10.c	Sat Aug 10 17:48:11 2019	(r350841)
+++ head/sys/arm/allwinner/clkng/ccu_a10.c	Sat Aug 10 17:58:30 2019	(r350842)
@@ -621,4 +621,4 @@ DEFINE_CLASS_1(ccu_a10ng, ccu_a10ng_driver, ccu_a10ng_
   sizeof(struct aw_ccung_softc), aw_ccung_driver);
 
 EARLY_DRIVER_MODULE(ccu_a10ng, simplebus, ccu_a10ng_driver,
-    ccu_a10ng_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE);
+    ccu_a10ng_devclass, 0, 0, BUS_PASS_RESOURCE + BUS_PASS_ORDER_MIDDLE);

Modified: head/sys/arm/allwinner/clkng/ccu_a13.c
==============================================================================
--- head/sys/arm/allwinner/clkng/ccu_a13.c	Sat Aug 10 17:48:11 2019	(r350841)
+++ head/sys/arm/allwinner/clkng/ccu_a13.c	Sat Aug 10 17:58:30 2019	(r350842)
@@ -568,4 +568,4 @@ DEFINE_CLASS_1(ccu_a13ng, ccu_a13ng_driver, ccu_a13ng_
   sizeof(struct aw_ccung_softc), aw_ccung_driver);
 
 EARLY_DRIVER_MODULE(ccu_a13ng, simplebus, ccu_a13ng_driver,
-    ccu_a13ng_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE);
+    ccu_a13ng_devclass, 0, 0, BUS_PASS_RESOURCE + BUS_PASS_ORDER_MIDDLE);

Modified: head/sys/arm/allwinner/clkng/ccu_a31.c
==============================================================================
--- head/sys/arm/allwinner/clkng/ccu_a31.c	Sat Aug 10 17:48:11 2019	(r350841)
+++ head/sys/arm/allwinner/clkng/ccu_a31.c	Sat Aug 10 17:58:30 2019	(r350842)
@@ -973,4 +973,4 @@ DEFINE_CLASS_1(ccu_a31ng, ccu_a31ng_driver, ccu_a31ng_
   sizeof(struct aw_ccung_softc), aw_ccung_driver);
 
 EARLY_DRIVER_MODULE(ccu_a31ng, simplebus, ccu_a31ng_driver,
-    ccu_a31ng_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_LAST);
+    ccu_a31ng_devclass, 0, 0, BUS_PASS_RESOURCE + BUS_PASS_ORDER_MIDDLE);

Modified: head/sys/arm/allwinner/clkng/ccu_a64.c
==============================================================================
--- head/sys/arm/allwinner/clkng/ccu_a64.c	Sat Aug 10 17:48:11 2019	(r350841)
+++ head/sys/arm/allwinner/clkng/ccu_a64.c	Sat Aug 10 17:58:30 2019	(r350842)
@@ -827,4 +827,4 @@ DEFINE_CLASS_1(ccu_a64ng, ccu_a64ng_driver, ccu_a64ng_
   sizeof(struct aw_ccung_softc), aw_ccung_driver);
 
 EARLY_DRIVER_MODULE(ccu_a64ng, simplebus, ccu_a64ng_driver,
-    ccu_a64ng_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_LAST);
+    ccu_a64ng_devclass, 0, 0, BUS_PASS_RESOURCE + BUS_PASS_ORDER_MIDDLE);

Modified: head/sys/arm/allwinner/clkng/ccu_a83t.c
==============================================================================
--- head/sys/arm/allwinner/clkng/ccu_a83t.c	Sat Aug 10 17:48:11 2019	(r350841)
+++ head/sys/arm/allwinner/clkng/ccu_a83t.c	Sat Aug 10 17:58:30 2019	(r350842)
@@ -786,4 +786,4 @@ DEFINE_CLASS_1(ccu_a83tng, ccu_a83tng_driver, ccu_a83t
   sizeof(struct aw_ccung_softc), aw_ccung_driver);
 
 EARLY_DRIVER_MODULE(ccu_a83tng, simplebus, ccu_a83tng_driver,
-    ccu_a83tng_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_LAST);
+    ccu_a83tng_devclass, 0, 0, BUS_PASS_RESOURCE + BUS_PASS_ORDER_MIDDLE);

Modified: head/sys/arm/allwinner/clkng/ccu_de2.c
==============================================================================
--- head/sys/arm/allwinner/clkng/ccu_de2.c	Sat Aug 10 17:48:11 2019	(r350841)
+++ head/sys/arm/allwinner/clkng/ccu_de2.c	Sat Aug 10 17:58:30 2019	(r350842)
@@ -163,4 +163,4 @@ DEFINE_CLASS_1(ccu_de2, ccu_de2_driver, ccu_de2_method
   sizeof(struct aw_ccung_softc), aw_ccung_driver);
 
 EARLY_DRIVER_MODULE(ccu_de2, simplebus, ccu_de2_driver,
-    ccu_de2ng_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_LAST);
+    ccu_de2ng_devclass, 0, 0, BUS_PASS_RESOURCE + BUS_PASS_ORDER_LAST);

Modified: head/sys/arm/allwinner/clkng/ccu_h3.c
==============================================================================
--- head/sys/arm/allwinner/clkng/ccu_h3.c	Sat Aug 10 17:48:11 2019	(r350841)
+++ head/sys/arm/allwinner/clkng/ccu_h3.c	Sat Aug 10 17:58:30 2019	(r350842)
@@ -787,4 +787,4 @@ DEFINE_CLASS_1(ccu_h3ng, ccu_h3ng_driver, ccu_h3ng_met
   sizeof(struct aw_ccung_softc), aw_ccung_driver);
 
 EARLY_DRIVER_MODULE(ccu_h3ng, simplebus, ccu_h3ng_driver,
-    ccu_h3ng_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_LAST);
+    ccu_h3ng_devclass, 0, 0, BUS_PASS_RESOURCE + BUS_PASS_ORDER_MIDDLE);

Modified: head/sys/arm/allwinner/clkng/ccu_sun8i_r.c
==============================================================================
--- head/sys/arm/allwinner/clkng/ccu_sun8i_r.c	Sat Aug 10 17:48:11 2019	(r350841)
+++ head/sys/arm/allwinner/clkng/ccu_sun8i_r.c	Sat Aug 10 17:58:30 2019	(r350842)
@@ -215,7 +215,7 @@ DEFINE_CLASS_1(ccu_sun8i_r, ccu_sun8i_r_driver, ccu_su
   sizeof(struct aw_ccung_softc), aw_ccung_driver);
 
 EARLY_DRIVER_MODULE(ccu_sun8i_r, simplebus, ccu_sun8i_r_driver,
-    ccu_sun8i_r_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_LAST);
+    ccu_sun8i_r_devclass, 0, 0, BUS_PASS_RESOURCE + BUS_PASS_ORDER_MIDDLE);
 
 static int
 ccu_a83t_r_probe(device_t dev)
@@ -262,4 +262,4 @@ DEFINE_CLASS_1(ccu_a83t_r, ccu_a83t_r_driver, ccu_a83t
   sizeof(struct aw_ccung_softc), aw_ccung_driver);
 
 EARLY_DRIVER_MODULE(ccu_a83t_r, simplebus, ccu_a83t_r_driver,
-    ccu_a83t_r_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_LAST);
+    ccu_a83t_r_devclass, 0, 0, BUS_PASS_RESOURCE + BUS_PASS_ORDER_MIDDLE);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908101758.x7AHwVPF000692>