aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-pci.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2010-12-16 13:05:06 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-12-16 13:05:06 -0500
commit36facadd9ea98f8415d0dbb63e0763b7ee9d3911 (patch)
tree99dea00b332ed852f2b0a4923b581dd723f03634 /drivers/usb/host/ehci-pci.c
parent2faa83e2a519abea1055d156ce1b42b8fa57e87b (diff)
parent0b83ae960cd7d4a5ee02786ecf41ab45688999bf (diff)
Merge branch 'usb-next' into musb-merge
* usb-next: (132 commits) USB: uas: Use GFP_NOIO instead of GFP_KERNEL in I/O submission path USB: uas: Ensure we only bind to a UAS interface USB: uas: Rename sense pipe and sense urb to status pipe and status urb USB: uas: Use kzalloc instead of kmalloc USB: uas: Fix up the Sense IU usb: musb: core: kill unneeded #include's DA8xx: assign name to MUSB IRQ resource usb: gadget: g_ncm added usb: gadget: f_ncm.c added usb: gadget: u_ether: prepare for NCM usb: pch_udc: Fix setup transfers with data out usb: pch_udc: Fix compile error, warnings and checkpatch warnings usb: add ab8500 usb transceiver driver USB: gadget: Implement runtime PM for MSM bus glue driver USB: gadget: Implement runtime PM for ci13xxx gadget USB: gadget: Add USB controller driver for MSM SoC USB: gadget: Introduce ci13xxx_udc_driver struct USB: gadget: Initialize ci13xxx gadget device's coherent DMA mask USB: gadget: Fix "scheduling while atomic" bugs in ci13xxx_udc USB: gadget: Separate out PCI bus code from ci13xxx_udc ...
Diffstat (limited to 'drivers/usb/host/ehci-pci.c')
-rw-r--r--drivers/usb/host/ehci-pci.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
index 655f3c9f88bf..76179c39c0e3 100644
--- a/drivers/usb/host/ehci-pci.c
+++ b/drivers/usb/host/ehci-pci.c
@@ -22,6 +22,9 @@
22#error "This file is PCI bus glue. CONFIG_PCI must be defined." 22#error "This file is PCI bus glue. CONFIG_PCI must be defined."
23#endif 23#endif
24 24
25/* defined here to avoid adding to pci_ids.h for single instance use */
26#define PCI_DEVICE_ID_INTEL_CE4100_USB 0x2e70
27
25/*-------------------------------------------------------------------------*/ 28/*-------------------------------------------------------------------------*/
26 29
27/* called after powerup, by probe or system-pm "wakeup" */ 30/* called after powerup, by probe or system-pm "wakeup" */
@@ -41,6 +44,35 @@ static int ehci_pci_reinit(struct ehci_hcd *ehci, struct pci_dev *pdev)
41 return 0; 44 return 0;
42} 45}
43 46
47static int ehci_quirk_amd_SB800(struct ehci_hcd *ehci)
48{
49 struct pci_dev *amd_smbus_dev;
50 u8 rev = 0;
51
52 amd_smbus_dev = pci_get_device(PCI_VENDOR_ID_ATI, 0x4385, NULL);
53 if (!amd_smbus_dev)
54 return 0;
55
56 pci_read_config_byte(amd_smbus_dev, PCI_REVISION_ID, &rev);
57 if (rev < 0x40) {
58 pci_dev_put(amd_smbus_dev);
59 amd_smbus_dev = NULL;
60 return 0;
61 }
62
63 if (!amd_nb_dev)
64 amd_nb_dev = pci_get_device(PCI_VENDOR_ID_AMD, 0x1510, NULL);
65 if (!amd_nb_dev)
66 ehci_err(ehci, "QUIRK: unable to get AMD NB device\n");
67
68 ehci_info(ehci, "QUIRK: Enable AMD SB800 L1 fix\n");
69
70 pci_dev_put(amd_smbus_dev);
71 amd_smbus_dev = NULL;
72
73 return 1;
74}
75
44/* called during probe() after chip reset completes */ 76/* called during probe() after chip reset completes */
45static int ehci_pci_setup(struct usb_hcd *hcd) 77static int ehci_pci_setup(struct usb_hcd *hcd)
46{ 78{
@@ -99,6 +131,9 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
99 /* cache this readonly data; minimize chip reads */ 131 /* cache this readonly data; minimize chip reads */
100 ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); 132 ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params);
101 133
134 if (ehci_quirk_amd_SB800(ehci))
135 ehci->amd_l1_fix = 1;
136
102 retval = ehci_halt(ehci); 137 retval = ehci_halt(ehci);
103 if (retval) 138 if (retval)
104 return retval; 139 return retval;
@@ -137,6 +172,10 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
137 ehci_info(ehci, "disable lpm for langwell/penwell\n"); 172 ehci_info(ehci, "disable lpm for langwell/penwell\n");
138 ehci->has_lpm = 0; 173 ehci->has_lpm = 0;
139 } 174 }
175 if (pdev->device == PCI_DEVICE_ID_INTEL_CE4100_USB) {
176 hcd->has_tt = 1;
177 tdi_reset(ehci);
178 }
140 break; 179 break;
141 case PCI_VENDOR_ID_TDI: 180 case PCI_VENDOR_ID_TDI:
142 if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) { 181 if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) {