diff mbox series

[v3,07/30] sunxi: H3: set different otg base address per mode

Message ID 1517156391-11353-8-git-send-email-jagan@amarulasolutions.com
State New
Headers show
Series [v3,01/30] sunxi: h3: Sync OTG and HCI nodes from Linux DT | expand

Commit Message

Jagan Teki Jan. 28, 2018, 4:19 p.m. UTC
From: Jun Nie <jun.nie@linaro.org>

Set different base address per host mode or peripheral mode. Phy
configuration also depends on this address.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
Reviewed-by: Jagan Teki <jagan@openedev.com>
[jagan: remove 8/8] from commit header]
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 arch/arm/include/asm/arch-sunxi/cpu_sun4i.h | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/arch/arm/include/asm/arch-sunxi/cpu_sun4i.h b/arch/arm/include/asm/arch-sunxi/cpu_sun4i.h
index 2419062..f45f53a 100644
--- a/arch/arm/include/asm/arch-sunxi/cpu_sun4i.h
+++ b/arch/arm/include/asm/arch-sunxi/cpu_sun4i.h
@@ -64,7 +64,11 @@ 
 #ifdef CONFIG_SUNXI_GEN_SUN6I
 #if defined(CONFIG_MACH_SUNXI_H3_H5) || defined(CONFIG_MACH_SUN50I)
 #define SUNXI_USBPHY_BASE		0x01c19000
+#ifdef CONFIG_USB_MUSB_GADGET
+#define SUNXI_USB0_BASE			0x01c19000
+#else
 #define SUNXI_USB0_BASE			0x01c1a000
+#endif
 #define SUNXI_USB1_BASE			0x01c1b000
 #define SUNXI_USB2_BASE			0x01c1c000
 #define SUNXI_USB3_BASE			0x01c1d000