Skip to content

Commit

Permalink
Merge pull request #30 from HarveyHunt/ci20-v3.18-otg-fix
Browse files Browse the repository at this point in the history
usb: otg: jz4780_platform: Switch off OTG PHY overcurrent warnings
  • Loading branch information
ZubairLK committed Jun 25, 2015
2 parents 7324be7 + 60fa528 commit c9d61e9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/usb/dwc2/jz4780_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
#include "core.h"
#include "hcd.h"

#define USBRESET_DETECT_TIME 0x96
#define USBRESET_DETECT_TIME 0x96
#define OTG_REG_GUSBCFG 0xb3500000

static const char dwc2_driver_name[] = "dwc2-jz4780";

Expand Down Expand Up @@ -137,6 +138,7 @@ static int dwc2_driver_probe(struct platform_device *dev)
struct resource *res;
int retval;
int irq;
u32 reg;
struct clk *clk_otg_phy, *clk_otg1;

if (usb_disabled())
Expand Down Expand Up @@ -281,6 +283,10 @@ static int dwc2_driver_probe(struct platform_device *dev)
goto err;
}

/* Switch off VBUS overcurrent detection in OTG PHY. */
reg = readl((unsigned int __iomem *)OTG_REG_GUSBCFG);
writel(reg | 0xc, (unsigned int __iomem *)OTG_REG_GUSBCFG);

retval = dwc2_hcd_init(hsotg, irq, params);
if (retval)
goto err;
Expand Down

0 comments on commit c9d61e9

Please sign in to comment.