From: Jagan Teki Date: Tue, 12 Dec 2017 12:28:23 +0530 Subject: [U-Boot] [PATCH 08/16] sunxi: clock: update a64 usb clock gating and module reset bits In-Reply-To: <1513061911-30076-1-git-send-email-jagan@amarulasolutions.com> References: <1513061911-30076-1-git-send-email-jagan@amarulasolutions.com> Message-ID: <1513061911-30076-9-git-send-email-jagan@amarulasolutions.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Philipp Tomsich 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 [jagan: reowrked on entire patch] Signed-off-by: Jagan Teki --- 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