summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2015-02-11 09:05:18 +0100
committerHans de Goede <hdegoede@redhat.com>2015-02-16 20:05:52 +0100
commitb1b912ddf3041627e99899cfc09e015a54f9910e (patch)
treef10f0dc6a9f71b7ea0c54d4bcc2feee065c16d4a /drivers/usb
parent51637afe98ba1745976382f64afc270f7f0b6974 (diff)
downloadu-boot-imx-b1b912ddf3041627e99899cfc09e015a54f9910e.zip
u-boot-imx-b1b912ddf3041627e99899cfc09e015a54f9910e.tar.gz
u-boot-imx-b1b912ddf3041627e99899cfc09e015a54f9910e.tar.bz2
sunxi: otg: Fix peripheral mode
Peripheral mode needs us to signal vusb high to the phy for it to work, just like the host mode does. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/musb-new/sunxi.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c
index 778916d..4646a3d 100644
--- a/drivers/usb/musb-new/sunxi.c
+++ b/drivers/usb/musb-new/sunxi.c
@@ -145,16 +145,6 @@ static void USBC_ForceIdToHigh(__iomem void *base)
musb_writel(base, USBC_REG_o_ISCR, reg_val);
}
-static void USBC_ForceVbusValidDisable(__iomem void *base)
-{
- u32 reg_val;
-
- reg_val = musb_readl(base, USBC_REG_o_ISCR);
- reg_val &= ~(0x03 << USBC_BP_ISCR_FORCE_VBUS_VALID);
- reg_val = USBC_WakeUp_ClearChangeDetect(reg_val);
- musb_writel(base, USBC_REG_o_ISCR, reg_val);
-}
-
static void USBC_ForceVbusValidToHigh(__iomem void *base)
{
u32 reg_val;
@@ -248,12 +238,11 @@ static int sunxi_musb_init(struct musb *musb)
if (is_host_enabled(musb)) {
/* Host mode */
USBC_ForceIdToLow(musb->mregs);
- USBC_ForceVbusValidToHigh(musb->mregs);
} else {
/* Peripheral mode */
USBC_ForceIdToHigh(musb->mregs);
- USBC_ForceVbusValidDisable(musb->mregs);
}
+ USBC_ForceVbusValidToHigh(musb->mregs);
return 0;
}