summaryrefslogtreecommitdiffstats
path: root/include/soc
diff options
context:
space:
mode:
authorWenyou Yang <wenyou.yang@atmel.com>2016-08-23 09:05:29 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-30 19:23:22 +0200
commit2e2aa1bc7eff90ecc1dddfc593aef07c57e539d0 (patch)
tree6f7e1220af52e3dd70ef316403f8d07ec448484f /include/soc
parentfc8b690d5da86a4b309b74fb706cc1eb75d003e6 (diff)
downloadop-kernel-dev-2e2aa1bc7eff90ecc1dddfc593aef07c57e539d0.zip
op-kernel-dev-2e2aa1bc7eff90ecc1dddfc593aef07c57e539d0.tar.gz
usb: ohci-at91: Forcibly suspend ports while USB suspend
The usb controller does not manage correctly the suspend mode for the ehci. In echi mode, there is no way to suspend without any device connected to it. This is why this specific control is added to fix this issue. Since the suspend mode works in ohci mode, this specific control works by suspend the usb controller in ohci mode. This specific control is by setting the SUSPEND_A/B/C fields of SFR_OHCIICR(OHCI Interrupt Configuration Register) in the SFR while the OHCI USB suspend. This set operation must be done before the USB clock disabled, clear operation after the USB clock enabled. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Reviewed-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/soc')
-rw-r--r--include/soc/at91/atmel-sfr.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/soc/at91/atmel-sfr.h b/include/soc/at91/atmel-sfr.h
index 2f9bb98..506ea8f 100644
--- a/include/soc/at91/atmel-sfr.h
+++ b/include/soc/at91/atmel-sfr.h
@@ -13,6 +13,20 @@
#ifndef _LINUX_MFD_SYSCON_ATMEL_SFR_H
#define _LINUX_MFD_SYSCON_ATMEL_SFR_H
+#define AT91_SFR_DDRCFG 0x04 /* DDR Configuration Register */
+/* 0x08 ~ 0x0c: Reserved */
+#define AT91_SFR_OHCIICR 0x10 /* OHCI INT Configuration Register */
+#define AT91_SFR_OHCIISR 0x14 /* OHCI INT Status Register */
#define AT91_SFR_I2SCLKSEL 0x90 /* I2SC Register */
+/* Field definitions */
+#define AT91_OHCIICR_SUSPEND_A BIT(8)
+#define AT91_OHCIICR_SUSPEND_B BIT(9)
+#define AT91_OHCIICR_SUSPEND_C BIT(10)
+
+#define AT91_OHCIICR_USB_SUSPEND (AT91_OHCIICR_SUSPEND_A | \
+ AT91_OHCIICR_SUSPEND_B | \
+ AT91_OHCIICR_SUSPEND_C)
+
+
#endif /* _LINUX_MFD_SYSCON_ATMEL_SFR_H */
OpenPOWER on IntegriCloud