UPSTREAM: usb: dwc2: add shutdown callback to platform variant
authorHeiko Stübner <heiko.stuebner@collabora.com>
Fri, 18 Dec 2015 18:30:59 +0000 (19:30 +0100)
committerHuang, Tao <huangtao@rock-chips.com>
Tue, 3 Jan 2017 10:47:57 +0000 (18:47 +0800)
commit360b4d4b0a8cb7af950684cc3182b51f7adb976e
tree59b3397d802e7e29772fe8ab1720b72c6d5d84ba
parent5ff9508d7e10964a30cc9efff73a3793ab9fef31
UPSTREAM: usb: dwc2: add shutdown callback to platform variant

In specific conditions (involving usb hubs) dwc2 devices can create a
lot of interrupts, even to the point of overwhelming devices running
at low frequencies. Some devices need to do special clock handling
at shutdown-time which may bring the system clock below the threshold
of being able to handle the dwc2 interrupts. Disabling dwc2-irqs
in a shutdown callbacks prevents reboots/poweroffs from getting stuck
in such cases.

The hsotg struct already contains an unused irq element, so we can
just use it to store the irq number for the shutdown callback.

Change-Id: Id320a8fdcd155d98ab5bb7768d03f15fa7b29c14
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Acked-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Heiko Stuebner <heiko.stuebner@collabora.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
(cherry picked from commit a40a00318c7fcdd23e73cfffac0e33430a43a3e3)
drivers/usb/dwc2/platform.c