[rtems-libbsd commit] imx6_ccm: Port to RTEMS

Christian Mauderer christianm at rtems.org
Wed Apr 15 15:13:20 UTC 2020


Module:    rtems-libbsd
Branch:    5-freebsd-12
Commit:    f88f7a02adfb4448d8c0770882ab5ebb2381ea9a
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=f88f7a02adfb4448d8c0770882ab5ebb2381ea9a

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Mon Feb 11 07:54:57 2019 +0100

imx6_ccm: Port to RTEMS

Update #3869.

---

 freebsd/sys/arm/freescale/imx/imx6_ccm.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/freebsd/sys/arm/freescale/imx/imx6_ccm.c b/freebsd/sys/arm/freescale/imx/imx6_ccm.c
index 2993f1d..cef7993 100644
--- a/freebsd/sys/arm/freescale/imx/imx6_ccm.c
+++ b/freebsd/sys/arm/freescale/imx/imx6_ccm.c
@@ -92,6 +92,7 @@ WR4(struct ccm_softc *sc, bus_size_t off, uint32_t val)
 static void
 ccm_init_gates(struct ccm_softc *sc)
 {
+#ifndef __rtems__
 	uint32_t reg;
 
  	/* ahpbdma, aipstz 1 & 2 buses */
@@ -129,6 +130,7 @@ ccm_init_gates(struct ccm_softc *sc)
 	reg = CCGR6_USBOH3 | CCGR6_USDHC1 | CCGR6_USDHC2 |
 	    CCGR6_USDHC3 | CCGR6_USDHC4;
 	WR4(sc, CCM_CCGR6, reg);
+#endif /* __rtems__ */
 }
 
 static int
@@ -204,7 +206,12 @@ ccm_probe(device_t dev)
 	if (!ofw_bus_status_okay(dev))
 		return (ENXIO);
 
+#ifndef __rtems__
         if (ofw_bus_is_compatible(dev, "fsl,imx6q-ccm") == 0)
+#else /* __rtems__ */
+        if (ofw_bus_is_compatible(dev, "fsl,imx6q-ccm") == 0 &&
+	    ofw_bus_is_compatible(dev, "fsl,imx6ul-ccm") == 0)
+#endif /* __rtems__ */
 		return (ENXIO);
 
 	device_set_desc(dev, "Freescale i.MX6 Clock Control Module");



More information about the vc mailing list