diff options
author | Felipe Balbi <balbi@ti.com> | 2011-09-06 03:56:51 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-09-09 06:05:30 -0400 |
commit | 4b5faa7aca64099d116db93d791b7a1f5c556c4a (patch) | |
tree | 42b4c6c9d233576572e75a71492c281b1df8f05d /drivers/usb/dwc3/dwc3-omap.c | |
parent | 55f3fba6c822f05b02f06070efaadf0300b5f9f1 (diff) |
usb: dwc3: omap: set idle and standby modes
For now, let's disable IDLE and STANDBY transitions
until we have a real HW to validate against.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3/dwc3-omap.c')
-rw-r--r-- | drivers/usb/dwc3/dwc3-omap.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c index 421b5db2dfe6..72cc92b3da02 100644 --- a/drivers/usb/dwc3/dwc3-omap.c +++ b/drivers/usb/dwc3/dwc3-omap.c | |||
@@ -76,8 +76,23 @@ | |||
76 | /* SYSCONFIG REGISTER */ | 76 | /* SYSCONFIG REGISTER */ |
77 | #define USBOTGSS_SYSCONFIG_DMADISABLE (1 << 16) | 77 | #define USBOTGSS_SYSCONFIG_DMADISABLE (1 << 16) |
78 | #define USBOTGSS_SYSCONFIG_STANDBYMODE(x) ((x) << 4) | 78 | #define USBOTGSS_SYSCONFIG_STANDBYMODE(x) ((x) << 4) |
79 | |||
80 | #define USBOTGSS_STANDBYMODE_FORCE_STANDBY 0 | ||
81 | #define USBOTGSS_STANDBYMODE_NO_STANDBY 1 | ||
82 | #define USBOTGSS_STANDBYMODE_SMART_STANDBY 2 | ||
83 | #define USBOTGSS_STANDBYMODE_SMART_WAKEUP 3 | ||
84 | |||
85 | #define USBOTGSS_STANDBYMODE_MASK (0x03 << 4) | ||
86 | |||
79 | #define USBOTGSS_SYSCONFIG_IDLEMODE(x) ((x) << 2) | 87 | #define USBOTGSS_SYSCONFIG_IDLEMODE(x) ((x) << 2) |
80 | 88 | ||
89 | #define USBOTGSS_IDLEMODE_FORCE_IDLE 0 | ||
90 | #define USBOTGSS_IDLEMODE_NO_IDLE 1 | ||
91 | #define USBOTGSS_IDLEMODE_SMART_IDLE 2 | ||
92 | #define USBOTGSS_IDLEMODE_SMART_WAKEUP 3 | ||
93 | |||
94 | #define USBOTGSS_IDLEMODE_MASK (0x03 << 2) | ||
95 | |||
81 | /* IRQ_EOI REGISTER */ | 96 | /* IRQ_EOI REGISTER */ |
82 | #define USBOTGSS_IRQ_EOI_LINE_NUMBER (1 << 0) | 97 | #define USBOTGSS_IRQ_EOI_LINE_NUMBER (1 << 0) |
83 | 98 | ||
@@ -270,6 +285,15 @@ static int __devinit dwc3_omap_probe(struct platform_device *pdev) | |||
270 | reg = dwc3_readl(omap->base, USBOTGSS_SYSCONFIG); | 285 | reg = dwc3_readl(omap->base, USBOTGSS_SYSCONFIG); |
271 | omap->dma_status = !!(reg & USBOTGSS_SYSCONFIG_DMADISABLE); | 286 | omap->dma_status = !!(reg & USBOTGSS_SYSCONFIG_DMADISABLE); |
272 | 287 | ||
288 | /* Set No-Idle and No-Standby */ | ||
289 | reg &= ~(USBOTGSS_STANDBYMODE_MASK | ||
290 | | USBOTGSS_IDLEMODE_MASK); | ||
291 | |||
292 | reg |= (USBOTGSS_SYSCONFIG_STANDBYMODE(USBOTGSS_STANDBYMODE_NO_STANDBY) | ||
293 | | USBOTGSS_SYSCONFIG_IDLEMODE(USBOTGSS_IDLEMODE_NO_IDLE)); | ||
294 | |||
295 | dwc3_writel(omap->base, USBOTGSS_SYSCONFIG, reg); | ||
296 | |||
273 | ret = request_irq(omap->irq, dwc3_omap_interrupt, 0, | 297 | ret = request_irq(omap->irq, dwc3_omap_interrupt, 0, |
274 | "dwc3-omap", omap); | 298 | "dwc3-omap", omap); |
275 | if (ret) { | 299 | if (ret) { |