diff options
author | Wenyou Yang <wenyou.yang@atmel.com> | 2016-08-23 09:05:29 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-08-30 19:23:22 +0200 |
commit | 2e2aa1bc7eff90ecc1dddfc593aef07c57e539d0 (patch) | |
tree | 6f7e1220af52e3dd70ef316403f8d07ec448484f /include/soc/at91 | |
parent | fc8b690d5da86a4b309b74fb706cc1eb75d003e6 (diff) | |
download | linux-stable-2e2aa1bc7eff90ecc1dddfc593aef07c57e539d0.tar.gz linux-stable-2e2aa1bc7eff90ecc1dddfc593aef07c57e539d0.tar.bz2 linux-stable-2e2aa1bc7eff90ecc1dddfc593aef07c57e539d0.zip |
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/at91')
-rw-r--r-- | include/soc/at91/atmel-sfr.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/soc/at91/atmel-sfr.h b/include/soc/at91/atmel-sfr.h index 2f9bb984a4df..506ea8ffda19 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 */ |