USB: EHCI: fix up root-hub TT mess

This patch (as1095) cleans up the HCD glue and several of the EHCI
bus-glue files.  The ehci->is_tdi_rh_tt flag is redundant, since it
means the same thing as the hcd->has_tt flag, so it is removed and the
other flag used in its place.

Some of the bus-glue files didn't get the relinquish_port method added
to their hc_driver structures.  Although that routine currently
doesn't do anything for controllers with an integrated TT, in the
future it might.  So the patch adds it where it is missing.

Lastly, some of the bus-glue files have erroneous entries for their
hc_driver's suspend and resume methods.  These method pointers are
specific to PCI and shouldn't be used otherwise.

(The patch also includes an invisible whitespace fix.)

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
This commit is contained in:
Alan Stern 2008-05-20 16:58:11 -04:00 committed by Greg Kroah-Hartman
parent 217a9081d8
commit a8e5177583
6 changed files with 8 additions and 15 deletions

View File

@ -269,7 +269,7 @@ static int ehci_fsl_setup(struct usb_hcd *hcd)
if (retval) if (retval)
return retval; return retval;
ehci->is_tdi_rh_tt = 1; hcd->has_tt = 1;
ehci->sbrn = 0x20; ehci->sbrn = 0x20;
@ -295,10 +295,6 @@ static const struct hc_driver ehci_fsl_hc_driver = {
*/ */
.reset = ehci_fsl_setup, .reset = ehci_fsl_setup,
.start = ehci_run, .start = ehci_run,
#ifdef CONFIG_PM
.suspend = ehci_bus_suspend,
.resume = ehci_bus_resume,
#endif
.stop = ehci_stop, .stop = ehci_stop,
.shutdown = ehci_shutdown, .shutdown = ehci_shutdown,

View File

@ -26,7 +26,7 @@ static int ixp4xx_ehci_init(struct usb_hcd *hcd)
+ HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase)); + HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase));
ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params);
ehci->is_tdi_rh_tt = 1; hcd->has_tt = 1;
ehci_reset(ehci); ehci_reset(ehci);
retval = ehci_init(hcd); retval = ehci_init(hcd);
@ -58,6 +58,7 @@ static const struct hc_driver ixp4xx_ehci_hc_driver = {
.bus_suspend = ehci_bus_suspend, .bus_suspend = ehci_bus_suspend,
.bus_resume = ehci_bus_resume, .bus_resume = ehci_bus_resume,
#endif #endif
.relinquish_port = ehci_relinquish_port,
}; };
static int ixp4xx_ehci_probe(struct platform_device *pdev) static int ixp4xx_ehci_probe(struct platform_device *pdev)

View File

@ -139,10 +139,6 @@ static const struct hc_driver ehci_orion_hc_driver = {
*/ */
.reset = ehci_orion_setup, .reset = ehci_orion_setup,
.start = ehci_run, .start = ehci_run,
#ifdef CONFIG_PM
.suspend = ehci_bus_suspend,
.resume = ehci_bus_resume,
#endif
.stop = ehci_stop, .stop = ehci_stop,
.shutdown = ehci_shutdown, .shutdown = ehci_shutdown,
@ -165,6 +161,7 @@ static const struct hc_driver ehci_orion_hc_driver = {
.hub_control = ehci_hub_control, .hub_control = ehci_hub_control,
.bus_suspend = ehci_bus_suspend, .bus_suspend = ehci_bus_suspend,
.bus_resume = ehci_bus_resume, .bus_resume = ehci_bus_resume,
.relinquish_port = ehci_relinquish_port,
}; };
static void __init static void __init
@ -250,7 +247,7 @@ static int __init ehci_orion_drv_probe(struct platform_device *pdev)
ehci->regs = hcd->regs + 0x100 + ehci->regs = hcd->regs + 0x100 +
HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase)); HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase));
ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params);
ehci->is_tdi_rh_tt = 1; hcd->has_tt = 1;
ehci->sbrn = 0x20; ehci->sbrn = 0x20;
/* /*

View File

@ -129,7 +129,6 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
switch (pdev->vendor) { switch (pdev->vendor) {
case PCI_VENDOR_ID_TDI: case PCI_VENDOR_ID_TDI:
if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) { if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) {
ehci->is_tdi_rh_tt = 1;
hcd->has_tt = 1; hcd->has_tt = 1;
tdi_reset(ehci); tdi_reset(ehci);
} }
@ -379,7 +378,7 @@ static const struct hc_driver ehci_pci_hc_driver = {
.hub_control = ehci_hub_control, .hub_control = ehci_hub_control,
.bus_suspend = ehci_bus_suspend, .bus_suspend = ehci_bus_suspend,
.bus_resume = ehci_bus_resume, .bus_resume = ehci_bus_resume,
.relinquish_port = ehci_relinquish_port, .relinquish_port = ehci_relinquish_port,
}; };
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/

View File

@ -76,6 +76,7 @@ static const struct hc_driver ehci_ppc_of_hc_driver = {
.bus_suspend = ehci_bus_suspend, .bus_suspend = ehci_bus_suspend,
.bus_resume = ehci_bus_resume, .bus_resume = ehci_bus_resume,
#endif #endif
.relinquish_port = ehci_relinquish_port,
}; };

View File

@ -112,7 +112,6 @@ struct ehci_hcd { /* one per controller */
u32 command; u32 command;
/* SILICON QUIRKS */ /* SILICON QUIRKS */
unsigned is_tdi_rh_tt:1; /* TDI roothub with TT */
unsigned no_selective_suspend:1; unsigned no_selective_suspend:1;
unsigned has_fsl_port_bug:1; /* FreeScale */ unsigned has_fsl_port_bug:1; /* FreeScale */
unsigned big_endian_mmio:1; unsigned big_endian_mmio:1;
@ -678,7 +677,7 @@ struct ehci_fstn {
* needed (mostly in root hub code). * needed (mostly in root hub code).
*/ */
#define ehci_is_TDI(e) ((e)->is_tdi_rh_tt) #define ehci_is_TDI(e) (ehci_to_hcd(e)->has_tt)
/* Returns the speed of a device attached to a port on the root hub. */ /* Returns the speed of a device attached to a port on the root hub. */
static inline unsigned int static inline unsigned int