OSDN Git Service

usb: host: xhci-tegra: Separate firmware request and load
authorThierry Reding <treding@nvidia.com>
Fri, 6 Dec 2019 14:06:45 +0000 (15:06 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Dec 2019 10:36:26 +0000 (11:36 +0100)
commit741d6e5d84f30266694ca23641f1d028b55f7f40
treefa8508ffa2f9ff385ec691096ca86fa539b52f75
parentc763771504d158abefcdb965df632d09f7602e9f
usb: host: xhci-tegra: Separate firmware request and load

Subsequent patches for system suspend/resume support will need to reload
the firmware on resume. Since the firmware remains in system memory, the
driver doesn't need to reload it from the filesystem. However, the XUSB
controller will be reset across suspend/resume, so it needs to load the
firmware into its microcontroller on resume.

Split the firmware request and the firmware load code into two separate
functions so that the driver can reuse the firmware in system memory to
reload the microcontroller on resume.

Based on work by JC Kuo <jckuo@nvidia.com>.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20191206140653.2085561-3-thierry.reding@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-tegra.c