2828#define PCI_DRIVER_NAME "cdns-pci-usbssp"
2929#define PLAT_DRIVER_NAME "cdns-usbssp"
3030
31- #define CDNS_VENDOR_ID 0x17cd
32- #define CDNS_DEVICE_ID 0x0200
33- #define CDNS_DRD_ID 0x0100
34- #define CDNS_DRD_IF (PCI_CLASS_SERIAL_USB << 8 | 0x80)
31+ #define PCI_DEVICE_ID_CDNS_USB3 0x0100
32+ #define PCI_DEVICE_ID_CDNS_UDC 0x0200
33+
34+ #define PCI_CLASS_SERIAL_USB_CDNS_USB3 (PCI_CLASS_SERIAL_USB << 8 | 0x80)
35+ #define PCI_CLASS_SERIAL_USB_CDNS_UDC PCI_CLASS_SERIAL_USB_DEVICE
3536
3637static struct pci_dev * cdnsp_get_second_fun (struct pci_dev * pdev )
3738{
@@ -40,10 +41,10 @@ static struct pci_dev *cdnsp_get_second_fun(struct pci_dev *pdev)
4041 * Platform has two function. The fist keeps resources for
4142 * Host/Device while the secon keeps resources for DRD/OTG.
4243 */
43- if (pdev -> device == CDNS_DEVICE_ID )
44- return pci_get_device (pdev -> vendor , CDNS_DRD_ID , NULL );
45- else if (pdev -> device == CDNS_DRD_ID )
46- return pci_get_device (pdev -> vendor , CDNS_DEVICE_ID , NULL );
44+ if (pdev -> device == PCI_DEVICE_ID_CDNS_UDC )
45+ return pci_get_device (pdev -> vendor , PCI_DEVICE_ID_CDNS_USB3 , NULL );
46+ if (pdev -> device == PCI_DEVICE_ID_CDNS_USB3 )
47+ return pci_get_device (pdev -> vendor , PCI_DEVICE_ID_CDNS_UDC , NULL );
4748
4849 return NULL ;
4950}
@@ -220,12 +221,12 @@ static const struct dev_pm_ops cdnsp_pci_pm_ops = {
220221};
221222
222223static const struct pci_device_id cdnsp_pci_ids [] = {
223- { PCI_VENDOR_ID_CDNS , CDNS_DEVICE_ID , PCI_ANY_ID , PCI_ANY_ID ,
224- PCI_CLASS_SERIAL_USB_DEVICE , PCI_ANY_ID },
225- { PCI_VENDOR_ID_CDNS , CDNS_DEVICE_ID , PCI_ANY_ID , PCI_ANY_ID ,
226- CDNS_DRD_IF , PCI_ANY_ID },
227- { PCI_VENDOR_ID_CDNS , CDNS_DRD_ID , PCI_ANY_ID , PCI_ANY_ID ,
228- CDNS_DRD_IF , PCI_ANY_ID },
224+ { PCI_DEVICE ( PCI_VENDOR_ID_CDNS , PCI_DEVICE_ID_CDNS_UDC ) ,
225+ . class = PCI_CLASS_SERIAL_USB_CDNS_UDC },
226+ { PCI_DEVICE ( PCI_VENDOR_ID_CDNS , PCI_DEVICE_ID_CDNS_UDC ) ,
227+ . class = PCI_CLASS_SERIAL_USB_CDNS_USB3 },
228+ { PCI_DEVICE ( PCI_VENDOR_ID_CDNS , PCI_DEVICE_ID_CDNS_USB3 ) ,
229+ . class = PCI_CLASS_SERIAL_USB_CDNS_USB3 },
229230 { 0 , }
230231};
231232
0 commit comments