diff mbox series

[U-Boot,v4,08/34] musb: sunxi: Add support for H3/H5A64

Message ID 1517927164-18197-9-git-send-email-jagan@amarulasolutions.com
State Deferred
Delegated to: Marek Vasut
Headers show
Series phy: sunxi: Add Allwinner sun4i USB PHY | expand

Commit Message

Jagan Teki Feb. 6, 2018, 2:25 p.m. UTC
Like other Allwinner SoC, the H3/H5/A64 is missing the config register
from the musb hardware block. Use a known working value for it
like other SoC.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 drivers/usb/musb-new/musb_regs.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Marek Vasut Feb. 6, 2018, 2:44 p.m. UTC | #1
On 02/06/2018 03:25 PM, Jagan Teki wrote:
> Like other Allwinner SoC, the H3/H5/A64 is missing the config register
> from the musb hardware block. Use a known working value for it
> like other SoC.
> 
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
>  drivers/usb/musb-new/musb_regs.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/musb-new/musb_regs.h b/drivers/usb/musb-new/musb_regs.h
> index a3cc38e..a6a491a 100644
> --- a/drivers/usb/musb-new/musb_regs.h
> +++ b/drivers/usb/musb-new/musb_regs.h
> @@ -432,7 +432,8 @@ static inline u8 musb_read_ulpi_buscontrol(void __iomem *mbase)
>  
>  static inline u8 musb_read_configdata(void __iomem *mbase)
>  {

Use DT matching, not this ifdef crap.

> -#if defined CONFIG_MACH_SUN8I_A33 || defined CONFIG_MACH_SUN8I_A83T
> +#if defined CONFIG_MACH_SUN8I_A33 || defined CONFIG_MACH_SUN8I_A83T || \
> +		defined CONFIG_MACH_SUNXI_H3_H5 || defined CONFIG_MACH_SUN50I
>  	/* <Sigh> allwinner saves a reg, and we need to hardcode this */
>  	return 0xde;
>  #else
>
diff mbox series

Patch

diff --git a/drivers/usb/musb-new/musb_regs.h b/drivers/usb/musb-new/musb_regs.h
index a3cc38e..a6a491a 100644
--- a/drivers/usb/musb-new/musb_regs.h
+++ b/drivers/usb/musb-new/musb_regs.h
@@ -432,7 +432,8 @@  static inline u8 musb_read_ulpi_buscontrol(void __iomem *mbase)
 
 static inline u8 musb_read_configdata(void __iomem *mbase)
 {
-#if defined CONFIG_MACH_SUN8I_A33 || defined CONFIG_MACH_SUN8I_A83T
+#if defined CONFIG_MACH_SUN8I_A33 || defined CONFIG_MACH_SUN8I_A83T || \
+		defined CONFIG_MACH_SUNXI_H3_H5 || defined CONFIG_MACH_SUN50I
 	/* <Sigh> allwinner saves a reg, and we need to hardcode this */
 	return 0xde;
 #else