[U-Boot] [PATCH 08/16] sunxi: clock: update a64 usb clock gating and module reset bits

Jagan Teki jagan at amarulasolutions.com
Tue Dec 12 06:58:23 UTC 2017


From: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>

clock gating and module reset bits on a64 are different than H3_H5
and other allwinner family SOCs, add them on clock_sun6i.h

Signed-off-by: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
[jagan: reowrked on entire patch]
Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
---
 arch/arm/include/asm/arch-sunxi/clock_sun6i.h | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/arch/arm/include/asm/arch-sunxi/clock_sun6i.h b/arch/arm/include/asm/arch-sunxi/clock_sun6i.h
index d328df9..7cb9235 100644
--- a/arch/arm/include/asm/arch-sunxi/clock_sun6i.h
+++ b/arch/arm/include/asm/arch-sunxi/clock_sun6i.h
@@ -280,12 +280,24 @@ struct sunxi_ccm_reg {
 #define AHB_GATE_OFFSET_USB_EHCI2	27
 #define AHB_GATE_OFFSET_USB_EHCI1	26
 #define AHB_GATE_OFFSET_USB_EHCI0	25
+#elif defined(CONFIG_MACH_SUN50I)
+#define AHB_GATE_OFFSET_USB_OHCI0	29
+#define AHB_GATE_OFFSET_USBOTG_OHCI	28
+#define AHB_GATE_OFFSET_USB_EHCI0	25
+#define AHB_GATE_OFFSET_USBOTG_EHCI	24
+#define AHB_GATE_OFFSET_USBOTG		23
 #else
 #define AHB_GATE_OFFSET_USB_EHCI1	27
 #define AHB_GATE_OFFSET_USB_EHCI0	26
 #endif
-#ifndef CONFIG_MACH_SUN8I_R40
-#define AHB_GATE_OFFSET_USB0		24
+#ifdef CONFIG_MACH_SUN50I
+/*
+ * The musb-new/sunxi.c glue uses AHB_GATE_OFFSET_USB0
+ * for the MUSB OTG block, so we define it to what it expects.
+ */
+# define AHB_GATE_OFFSET_USB0		AHB_GATE_OFFSET_USBOTG
+#elif !defined(CONFIG_MACH_SUN8I_R40)
+# define AHB_GATE_OFFSET_USB0		24
 #else
 #define AHB_GATE_OFFSET_USB0		25
 #define AHB_GATE_OFFSET_SATA		24
-- 
2.7.4



More information about the U-Boot mailing list