Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4534874a authored by Florian Fainelli's avatar Florian Fainelli Committed by Greg Kroah-Hartman
Browse files

USB: EHCI: add no_io_watchdog platform_data parameter to ehci-platform



Enhance the ehci-platform driver to also accept no_io_watchdog as a platform
data parameter. When no_io_watchdog is set to 1, the ehci controller will set
ehci->need_io_watchdog to 0. Since most EHCI controllers do need the I/O
watchdog to be on, only let those which need it to turn the watchdog off.

Make sure that we change need_io_watchdog after the call to ehci_setup()
because ehci_setup() will unconditionnaly set need_io_watchdog to 1.

Signed-off-by: default avatarFlorian Fainelli <florian@openwrt.org>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6d39944e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -38,6 +38,8 @@ static int ehci_platform_reset(struct usb_hcd *hcd)
	if (retval)
		return retval;

	if (pdata->no_io_watchdog)
		ehci->need_io_watchdog = 0;
	if (pdata->port_power_on)
		ehci_port_power(ehci, 1);
	if (pdata->port_power_off)
+3 −0
Original line number Diff line number Diff line
@@ -29,6 +29,8 @@
 *			initialization.
 * @port_power_off:	set to 1 if the controller needs to be powered down
 *			after initialization.
 * @no_io_watchdog:	set to 1 if the controller does not need the I/O
 *			watchdog to run.
 *
 * These are general configuration options for the EHCI controller. All of
 * these options are activating more or less workarounds for some hardware.
@@ -41,6 +43,7 @@ struct usb_ehci_pdata {
	unsigned	big_endian_mmio:1;
	unsigned	port_power_on:1;
	unsigned	port_power_off:1;
	unsigned	no_io_watchdog:1;

	/* Turn on all power and clocks */
	int (*power_on)(struct platform_device *pdev);