hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/usb/host/ehci-pci.c
....@@ -21,6 +21,9 @@
2121 /* defined here to avoid adding to pci_ids.h for single instance use */
2222 #define PCI_DEVICE_ID_INTEL_CE4100_USB 0x2e70
2323
24
+#define PCI_VENDOR_ID_ASPEED 0x1a03
25
+#define PCI_DEVICE_ID_ASPEED_EHCI 0x2603
26
+
2427 /*-------------------------------------------------------------------------*/
2528 #define PCI_DEVICE_ID_INTEL_QUARK_X1000_SOC 0x0939
2629 static inline bool is_intel_quark_x1000(struct pci_dev *pdev)
....@@ -124,8 +127,7 @@
124127 case 0x005b: /* CK804 */
125128 case 0x00d8: /* CK8 */
126129 case 0x00e8: /* CK8S */
127
- if (pci_set_consistent_dma_mask(pdev,
128
- DMA_BIT_MASK(31)) < 0)
130
+ if (dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(31)) < 0)
129131 ehci_warn(ehci, "can't enable NVidia "
130132 "workaround for >2GB RAM\n");
131133 break;
....@@ -149,7 +151,7 @@
149151 break;
150152 case PCI_VENDOR_ID_AMD:
151153 /* AMD PLL quirk */
152
- if (usb_amd_find_chipset_info())
154
+ if (usb_amd_quirk_pll_check())
153155 ehci->amd_pll_fix = 1;
154156 /* AMD8111 EHCI doesn't work, according to AMD errata */
155157 if (pdev->device == 0x7463) {
....@@ -186,7 +188,7 @@
186188 break;
187189 case PCI_VENDOR_ID_ATI:
188190 /* AMD PLL quirk */
189
- if (usb_amd_find_chipset_info())
191
+ if (usb_amd_quirk_pll_check())
190192 ehci->amd_pll_fix = 1;
191193
192194 /*
....@@ -221,6 +223,12 @@
221223 if (pdev->device == 0xa239) {
222224 ehci_info(ehci, "applying Synopsys HC workaround\n");
223225 ehci->has_synopsys_hc_bug = 1;
226
+ }
227
+ break;
228
+ case PCI_VENDOR_ID_ASPEED:
229
+ if (pdev->device == PCI_DEVICE_ID_ASPEED_EHCI) {
230
+ ehci_info(ehci, "applying Aspeed HC workaround\n");
231
+ ehci->is_aspeed = 1;
224232 }
225233 break;
226234 }
....@@ -370,23 +378,21 @@
370378 {
371379 if (is_bypassed_id(pdev))
372380 return -ENODEV;
373
- return usb_hcd_pci_probe(pdev, id);
381
+ return usb_hcd_pci_probe(pdev, id, &ehci_pci_hc_driver);
374382 }
375383
376384 static void ehci_pci_remove(struct pci_dev *pdev)
377385 {
378386 pci_clear_mwi(pdev);
379
- usb_hcd_pci_remove(pdev);
387
+ usb_hcd_pci_remove(pdev);
380388 }
381389
382390 /* PCI driver selection metadata; PCI hotplugging uses this */
383391 static const struct pci_device_id pci_ids [] = { {
384392 /* handle any USB 2.0 EHCI controller */
385393 PCI_DEVICE_CLASS(PCI_CLASS_SERIAL_USB_EHCI, ~0),
386
- .driver_data = (unsigned long) &ehci_pci_hc_driver,
387394 }, {
388395 PCI_VDEVICE(STMICRO, PCI_DEVICE_ID_STMICRO_USB_HOST),
389
- .driver_data = (unsigned long) &ehci_pci_hc_driver,
390396 },
391397 { /* end: all zeroes */ }
392398 };
....@@ -394,7 +400,7 @@
394400
395401 /* pci driver glue; this is a "new style" PCI driver module */
396402 static struct pci_driver ehci_pci_driver = {
397
- .name = (char *) hcd_name,
403
+ .name = hcd_name,
398404 .id_table = pci_ids,
399405
400406 .probe = ehci_pci_probe,