Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usb: otg: jz4780_platform: Switch off OTG PHY overcurrent warnings #30

Merged
merged 1 commit into from
Jun 25, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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