forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/usb/host/uhci-pci.c
....@@ -119,11 +119,13 @@
119119
120120 uhci->rh_numports = uhci_count_ports(hcd);
121121
122
- /* Intel controllers report the OverCurrent bit active on.
123
- * VIA controllers report it active off, so we'll adjust the
124
- * bit value. (It's not standardized in the UHCI spec.)
122
+ /*
123
+ * Intel controllers report the OverCurrent bit active on. VIA
124
+ * and ZHAOXIN controllers report it active off, so we'll adjust
125
+ * the bit value. (It's not standardized in the UHCI spec.)
125126 */
126
- if (to_pci_dev(uhci_dev(uhci))->vendor == PCI_VENDOR_ID_VIA)
127
+ if (to_pci_dev(uhci_dev(uhci))->vendor == PCI_VENDOR_ID_VIA ||
128
+ to_pci_dev(uhci_dev(uhci))->vendor == PCI_VENDOR_ID_ZHAOXIN)
127129 uhci->oc_low = 1;
128130
129131 /* HP's server management chip requires a longer port reset delay. */
....@@ -261,7 +263,7 @@
261263
262264 /* Generic hardware linkage */
263265 .irq = uhci_irq,
264
- .flags = HCD_USB11,
266
+ .flags = HCD_DMA | HCD_USB11,
265267
266268 /* Basic lifecycle operations */
267269 .reset = uhci_pci_init,
....@@ -287,17 +289,21 @@
287289 static const struct pci_device_id uhci_pci_ids[] = { {
288290 /* handle any USB UHCI controller */
289291 PCI_DEVICE_CLASS(PCI_CLASS_SERIAL_USB_UHCI, ~0),
290
- .driver_data = (unsigned long) &uhci_driver,
291292 }, { /* end: all zeroes */ }
292293 };
293294
294295 MODULE_DEVICE_TABLE(pci, uhci_pci_ids);
295296
297
+static int uhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
298
+{
299
+ return usb_hcd_pci_probe(dev, id, &uhci_driver);
300
+}
301
+
296302 static struct pci_driver uhci_pci_driver = {
297
- .name = (char *)hcd_name,
303
+ .name = hcd_name,
298304 .id_table = uhci_pci_ids,
299305
300
- .probe = usb_hcd_pci_probe,
306
+ .probe = uhci_pci_probe,
301307 .remove = usb_hcd_pci_remove,
302308 .shutdown = uhci_shutdown,
303309