usb: ohci-at91: Forcibly suspend ports while USB suspend
authorWenyou Yang <wenyou.yang@atmel.com>
Tue, 23 Aug 2016 01:05:29 +0000 (09:05 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Aug 2016 17:23:22 +0000 (19:23 +0200)
commit2e2aa1bc7eff90ecc1dddfc593aef07c57e539d0
tree6f7e1220af52e3dd70ef316403f8d07ec448484f
parentfc8b690d5da86a4b309b74fb706cc1eb75d003e6
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>
drivers/usb/host/ohci-at91.c
include/soc/at91/atmel-sfr.h