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

Commit c73cee71 authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman
Browse files

USB: EHCI: remove ehci_port_power() routine



This patch (as1623) removes the ehci_port_power() routine and all the
places that call it.  There's no reason for ehci-hcd to change the
port power settings; the hub driver takes care of all that stuff.

There is one exception: When the controller is resumed from
hibernation or following a loss of power, the ports that are supposed
to be handed over to a companion controller must be powered on first.
Otherwise the handover won't work.  This process is not visible to the
hub driver, so it has to be handled in ehci-hcd.

Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4968f951
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -162,7 +162,6 @@ static void csn3xxx_usb_power_off(struct platform_device *pdev)
}

static struct usb_ehci_pdata cns3xxx_usb_ehci_pdata = {
	.port_power_off	= 1,
	.power_on	= csn3xxx_usb_power_on,
	.power_off	= csn3xxx_usb_power_off,
};
+0 −2
Original line number Diff line number Diff line
@@ -50,13 +50,11 @@ static u64 ath79_ehci_dmamask = DMA_BIT_MASK(32);

static struct usb_ehci_pdata ath79_ehci_pdata_v1 = {
	.has_synopsys_hc_bug	= 1,
	.port_power_off		= 1,
};

static struct usb_ehci_pdata ath79_ehci_pdata_v2 = {
	.caps_offset		= 0x100,
	.has_tt			= 1,
	.port_power_off		= 1,
};

static struct platform_device ath79_ehci_device = {
+0 −1
Original line number Diff line number Diff line
@@ -109,7 +109,6 @@ static struct resource ls1x_ehci_resources[] = {
};

static struct usb_ehci_pdata ls1x_ehci_pdata = {
	.port_power_off	= 1,
};

struct platform_device ls1x_ehci_device = {
+1 −17
Original line number Diff line number Diff line
@@ -31,22 +31,6 @@
#include "bits.h"
#include "host.h"

static int ci_ehci_setup(struct usb_hcd *hcd)
{
	struct ehci_hcd *ehci = hcd_to_ehci(hcd);
	int ret;

	hcd->has_tt = 1;

	ret = ehci_setup(hcd);
	if (ret)
		return ret;

	ehci_port_power(ehci, 0);

	return ret;
}

static const struct hc_driver ci_ehci_hc_driver = {
	.description	= "ehci_hcd",
	.product_desc	= "ChipIdea HDRC EHCI",
@@ -61,7 +45,7 @@ static const struct hc_driver ci_ehci_hc_driver = {
	/*
	 * basic lifecycle operations
	 */
	.reset		= ci_ehci_setup,
	.reset		= ehci_setup,
	.start		= ehci_run,
	.stop		= ehci_stop,
	.shutdown	= ehci_shutdown,
+1 −8
Original line number Diff line number Diff line
@@ -53,18 +53,11 @@ static void atmel_stop_ehci(struct platform_device *pdev)
static int ehci_atmel_setup(struct usb_hcd *hcd)
{
	struct ehci_hcd *ehci = hcd_to_ehci(hcd);
	int retval;

	/* registers start at offset 0x0 */
	ehci->caps = hcd->regs;

	retval = ehci_setup(hcd);
	if (retval)
		return retval;

	ehci_port_power(ehci, 0);

	return retval;
	return ehci_setup(hcd);
}

static const struct hc_driver ehci_atmel_hc_driver = {
Loading