summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv7/sunxi/usbc.c
diff options
context:
space:
mode:
authorVishnu Patekar <vishnupatekar0510@gmail.com>2015-03-01 23:47:48 +0530
committerHans de Goede <hdegoede@redhat.com>2015-05-04 16:51:51 +0200
commit8c3dacff1409109e3697ed60df0e7c93d1309a93 (patch)
tree25f0eb800ffc377abfb949dc96b94fe3b06c90bf /arch/arm/cpu/armv7/sunxi/usbc.c
parentffc0ae0c70decbe5a91001cbe97e0a511bdf6e88 (diff)
sunxi: Add basic A33 basic support
Enable full support for the A33 SoC including display, otg-usb, etc. Signed-off-by: Vishnu Patekar <vishnupatekar0510@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
Diffstat (limited to 'arch/arm/cpu/armv7/sunxi/usbc.c')
-rw-r--r--arch/arm/cpu/armv7/sunxi/usbc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/sunxi/usbc.c b/arch/arm/cpu/armv7/sunxi/usbc.c
index 7d55e413f1..7b883fbcec 100644
--- a/arch/arm/cpu/armv7/sunxi/usbc.c
+++ b/arch/arm/cpu/armv7/sunxi/usbc.c
@@ -28,7 +28,11 @@
#endif
#define SUNXI_USB_PMU_IRQ_ENABLE 0x800
+#ifdef CONFIG_MACH_SUN8I_A33
+#define SUNXI_USB_CSR 0x410
+#else
#define SUNXI_USB_CSR 0x404
+#endif
#define SUNXI_USB_PASSBY_EN 1
#define SUNXI_EHCI_AHB_ICHR8_EN (1 << 10)
@@ -103,6 +107,11 @@ static void usb_phy_write(struct sunxi_usbc_hcd *sunxi_usbc, int addr,
int j = 0, usbc_bit = 0;
void *dest = sunxi_usbc_get_io_base(0) + SUNXI_USB_CSR;
+#ifdef CONFIG_MACH_SUN8I_A33
+ /* CSR needs to be explicitly initialized to 0 on A33 */
+ writel(0, dest);
+#endif
+
usbc_bit = 1 << (sunxi_usbc->id * 2);
for (j = 0; j < len; j++) {
/* set the bit address to be written */