UPSTREAM: usb: dwc2: host: Get aligned DMA in a more supported way
authorDouglas Anderson <dianders@chromium.org>
Fri, 29 Jan 2016 02:19:53 +0000 (18:19 -0800)
committerHuang, Tao <huangtao@rock-chips.com>
Tue, 3 Jan 2017 10:48:06 +0000 (18:48 +0800)
commit567049afec78c0c1b74e8ab220ea29a887943f56
treec0cdb00b5f08a1c67950d9cab252ec34b33d7b0d
parentdb77a6eb3420fe3f080a896a44a5f340cad30144
UPSTREAM: usb: dwc2: host: Get aligned DMA in a more supported way

All other host controllers who want aligned buffers for DMA do it a
certain way.  Let's do that too instead of working behind the USB core's
back.  This makes our interrupt handler not take forever and also rips
out a lot of code, simplifying things a bunch.

This also has the side effect of removing the 65535 max transfer size
limit.

NOTE: The actual code to allocate the aligned buffers is ripped almost
completely from the tegra EHCI driver.  At some point in the future we
may want to add this functionality to the USB core to share more code
everywhere.

Change-Id: Id4a2ebf476148b51ed4a514590887678d8901039
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Acked-by: John Youn <johnyoun@synopsys.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: John Youn <johnyoun@synopsys.com>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
(cherry picked from commit 3bc04e28a030a8b7dfa2227a7eaf748ada5e2c94)
drivers/usb/dwc2/core.c
drivers/usb/dwc2/hcd.c
drivers/usb/dwc2/hcd.h
drivers/usb/dwc2/hcd_intr.c
drivers/usb/dwc2/hcd_queue.c