Message ID | 1513061911-30076-9-git-send-email-jagan@amarulasolutions.com |
---|---|
State | Deferred |
Delegated to: | Jagannadha Sutradharudu Teki |
Headers | show |
Series | sun50i: a64: add support for axp803, musb | expand |
Hi, On Tue, Dec 12, 2017 at 12:28:23PM +0530, Jagan Teki wrote: > From: Philipp Tomsich <philipp.tomsich@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@theobroma-systems.com> > [jagan: reowrked on entire patch] > Signed-off-by: Jagan Teki <jagan@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 USB0 *is* USB OTG, why don't you just call it that way? > +#elif !defined(CONFIG_MACH_SUN8I_R40) > +# define AHB_GATE_OFFSET_USB0 24 Why is this modified? Thanks, Maxime
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