summaryrefslogtreecommitdiff
path: root/drivers/usb/renesas_usbhs
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-11-11 16:22:27 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-11-11 16:22:27 -0300
commit29f5b648fa0b31ad614c78468b9279e5fa96397a (patch)
tree385e76324c4e95e90b16889937e7c24e6f7d4f4a /drivers/usb/renesas_usbhs
parent1eae9639aac0f8de4d284f567ec722a822b52513 (diff)
Linux-libre 4.8.7-gnupck-4.8.7-gnu
Diffstat (limited to 'drivers/usb/renesas_usbhs')
-rw-r--r--drivers/usb/renesas_usbhs/rcar3.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/usb/renesas_usbhs/rcar3.c b/drivers/usb/renesas_usbhs/rcar3.c
index 1d70add92..d544b331c 100644
--- a/drivers/usb/renesas_usbhs/rcar3.c
+++ b/drivers/usb/renesas_usbhs/rcar3.c
@@ -9,6 +9,7 @@
*
*/
+#include <linux/delay.h>
#include <linux/io.h>
#include "common.h"
#include "rcar3.h"
@@ -35,10 +36,13 @@ static int usbhs_rcar3_power_ctrl(struct platform_device *pdev,
usbhs_write32(priv, UGCTRL2, UGCTRL2_RESERVED_3 | UGCTRL2_USB0SEL_OTG);
- if (enable)
+ if (enable) {
usbhs_bset(priv, LPSTS, LPSTS_SUSPM, LPSTS_SUSPM);
- else
+ /* The controller on R-Car Gen3 needs to wait up to 45 usec */
+ udelay(45);
+ } else {
usbhs_bset(priv, LPSTS, LPSTS_SUSPM, 0);
+ }
return 0;
}