aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-hcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/ehci-hcd.c')
-rw-r--r--drivers/usb/host/ehci-hcd.c41
1 files changed, 26 insertions, 15 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 74dcf49bd015..78561d112c04 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -114,13 +114,11 @@ MODULE_PARM_DESC(hird, "host initiated resume duration, +1 for each 75us\n");
114 114
115#define INTR_MASK (STS_IAA | STS_FATAL | STS_PCD | STS_ERR | STS_INT) 115#define INTR_MASK (STS_IAA | STS_FATAL | STS_PCD | STS_ERR | STS_INT)
116 116
117/* for ASPM quirk of ISOC on AMD SB800 */
118static struct pci_dev *amd_nb_dev;
119
120/*-------------------------------------------------------------------------*/ 117/*-------------------------------------------------------------------------*/
121 118
122#include "ehci.h" 119#include "ehci.h"
123#include "ehci-dbg.c" 120#include "ehci-dbg.c"
121#include "pci-quirks.h"
124 122
125/*-------------------------------------------------------------------------*/ 123/*-------------------------------------------------------------------------*/
126 124
@@ -532,10 +530,8 @@ static void ehci_stop (struct usb_hcd *hcd)
532 spin_unlock_irq (&ehci->lock); 530 spin_unlock_irq (&ehci->lock);
533 ehci_mem_cleanup (ehci); 531 ehci_mem_cleanup (ehci);
534 532
535 if (amd_nb_dev) { 533 if (ehci->amd_pll_fix == 1)
536 pci_dev_put(amd_nb_dev); 534 usb_amd_dev_put();
537 amd_nb_dev = NULL;
538 }
539 535
540#ifdef EHCI_STATS 536#ifdef EHCI_STATS
541 ehci_dbg (ehci, "irq normal %ld err %ld reclaim %ld (lost %ld)\n", 537 ehci_dbg (ehci, "irq normal %ld err %ld reclaim %ld (lost %ld)\n",
@@ -679,7 +675,12 @@ static int ehci_run (struct usb_hcd *hcd)
679 hcd->uses_new_polling = 1; 675 hcd->uses_new_polling = 1;
680 676
681 /* EHCI spec section 4.1 */ 677 /* EHCI spec section 4.1 */
682 if ((retval = ehci_reset(ehci)) != 0) { 678 /*
679 * TDI driver does the ehci_reset in their reset callback.
680 * Don't reset here, because configuration settings will
681 * vanish.
682 */
683 if (!ehci_is_TDI(ehci) && (retval = ehci_reset(ehci)) != 0) {
683 ehci_mem_cleanup(ehci); 684 ehci_mem_cleanup(ehci);
684 return retval; 685 return retval;
685 } 686 }
@@ -1179,7 +1180,7 @@ MODULE_LICENSE ("GPL");
1179#define PLATFORM_DRIVER ehci_mxc_driver 1180#define PLATFORM_DRIVER ehci_mxc_driver
1180#endif 1181#endif
1181 1182
1182#ifdef CONFIG_CPU_SUBTYPE_SH7786 1183#ifdef CONFIG_USB_EHCI_SH
1183#include "ehci-sh.c" 1184#include "ehci-sh.c"
1184#define PLATFORM_DRIVER ehci_hcd_sh_driver 1185#define PLATFORM_DRIVER ehci_hcd_sh_driver
1185#endif 1186#endif
@@ -1254,6 +1255,16 @@ MODULE_LICENSE ("GPL");
1254#define PLATFORM_DRIVER ehci_msm_driver 1255#define PLATFORM_DRIVER ehci_msm_driver
1255#endif 1256#endif
1256 1257
1258#ifdef CONFIG_USB_EHCI_HCD_PMC_MSP
1259#include "ehci-pmcmsp.c"
1260#define PLATFORM_DRIVER ehci_hcd_msp_driver
1261#endif
1262
1263#ifdef CONFIG_USB_EHCI_TEGRA
1264#include "ehci-tegra.c"
1265#define PLATFORM_DRIVER tegra_ehci_driver
1266#endif
1267
1257#if !defined(PCI_DRIVER) && !defined(PLATFORM_DRIVER) && \ 1268#if !defined(PCI_DRIVER) && !defined(PLATFORM_DRIVER) && \
1258 !defined(PS3_SYSTEM_BUS_DRIVER) && !defined(OF_PLATFORM_DRIVER) && \ 1269 !defined(PS3_SYSTEM_BUS_DRIVER) && !defined(OF_PLATFORM_DRIVER) && \
1259 !defined(XILINX_OF_PLATFORM_DRIVER) 1270 !defined(XILINX_OF_PLATFORM_DRIVER)
@@ -1306,24 +1317,24 @@ static int __init ehci_hcd_init(void)
1306#endif 1317#endif
1307 1318
1308#ifdef OF_PLATFORM_DRIVER 1319#ifdef OF_PLATFORM_DRIVER
1309 retval = of_register_platform_driver(&OF_PLATFORM_DRIVER); 1320 retval = platform_driver_register(&OF_PLATFORM_DRIVER);
1310 if (retval < 0) 1321 if (retval < 0)
1311 goto clean3; 1322 goto clean3;
1312#endif 1323#endif
1313 1324
1314#ifdef XILINX_OF_PLATFORM_DRIVER 1325#ifdef XILINX_OF_PLATFORM_DRIVER
1315 retval = of_register_platform_driver(&XILINX_OF_PLATFORM_DRIVER); 1326 retval = platform_driver_register(&XILINX_OF_PLATFORM_DRIVER);
1316 if (retval < 0) 1327 if (retval < 0)
1317 goto clean4; 1328 goto clean4;
1318#endif 1329#endif
1319 return retval; 1330 return retval;
1320 1331
1321#ifdef XILINX_OF_PLATFORM_DRIVER 1332#ifdef XILINX_OF_PLATFORM_DRIVER
1322 /* of_unregister_platform_driver(&XILINX_OF_PLATFORM_DRIVER); */ 1333 /* platform_driver_unregister(&XILINX_OF_PLATFORM_DRIVER); */
1323clean4: 1334clean4:
1324#endif 1335#endif
1325#ifdef OF_PLATFORM_DRIVER 1336#ifdef OF_PLATFORM_DRIVER
1326 of_unregister_platform_driver(&OF_PLATFORM_DRIVER); 1337 platform_driver_unregister(&OF_PLATFORM_DRIVER);
1327clean3: 1338clean3:
1328#endif 1339#endif
1329#ifdef PS3_SYSTEM_BUS_DRIVER 1340#ifdef PS3_SYSTEM_BUS_DRIVER
@@ -1351,10 +1362,10 @@ module_init(ehci_hcd_init);
1351static void __exit ehci_hcd_cleanup(void) 1362static void __exit ehci_hcd_cleanup(void)
1352{ 1363{
1353#ifdef XILINX_OF_PLATFORM_DRIVER 1364#ifdef XILINX_OF_PLATFORM_DRIVER
1354 of_unregister_platform_driver(&XILINX_OF_PLATFORM_DRIVER); 1365 platform_driver_unregister(&XILINX_OF_PLATFORM_DRIVER);
1355#endif 1366#endif
1356#ifdef OF_PLATFORM_DRIVER 1367#ifdef OF_PLATFORM_DRIVER
1357 of_unregister_platform_driver(&OF_PLATFORM_DRIVER); 1368 platform_driver_unregister(&OF_PLATFORM_DRIVER);
1358#endif 1369#endif
1359#ifdef PLATFORM_DRIVER 1370#ifdef PLATFORM_DRIVER
1360 platform_driver_unregister(&PLATFORM_DRIVER); 1371 platform_driver_unregister(&PLATFORM_DRIVER);