• Home
  • Raw
  • Download

Lines Matching +full:pci +full:- +full:phy

1 // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
3 * pci.c - DesignWare HS OTG Controller PCI driver
5 * Copyright (C) 2004-2013 Synopsys, Inc.
16 * 3. The names of the above-listed copyright holders may not be used
39 * Provides the initialization and cleanup entry points for the DWC_otg PCI
49 #include <linux/pci.h>
59 static const char dwc2_driver_name[] = "dwc2-pci";
63 struct platform_device *phy; member
68 if (pdev->vendor == PCI_VENDOR_ID_SYNOPSYS && in dwc2_pci_quirks()
69 pdev->device == PCI_PRODUCT_ID_HAPS_HSOTG) { in dwc2_pci_quirks()
81 * dwc2_pci_probe() - Provides the cleanup entry points for the DWC_otg PCI
84 * @pci: The programming view of DWC_otg PCI
86 static void dwc2_pci_remove(struct pci_dev *pci) in dwc2_pci_remove() argument
88 struct dwc2_pci_glue *glue = pci_get_drvdata(pci); in dwc2_pci_remove()
90 platform_device_unregister(glue->dwc2); in dwc2_pci_remove()
91 usb_phy_generic_unregister(glue->phy); in dwc2_pci_remove()
92 pci_set_drvdata(pci, NULL); in dwc2_pci_remove()
95 static int dwc2_pci_probe(struct pci_dev *pci, in dwc2_pci_probe() argument
100 struct platform_device *phy; in dwc2_pci_probe() local
102 struct device *dev = &pci->dev; in dwc2_pci_probe()
105 ret = pcim_enable_device(pci); in dwc2_pci_probe()
107 dev_err(dev, "failed to enable pci device\n"); in dwc2_pci_probe()
108 return -ENODEV; in dwc2_pci_probe()
111 pci_set_master(pci); in dwc2_pci_probe()
113 phy = usb_phy_generic_register(); in dwc2_pci_probe()
114 if (IS_ERR(phy)) { in dwc2_pci_probe()
115 dev_err(dev, "error registering generic PHY (%ld)\n", in dwc2_pci_probe()
116 PTR_ERR(phy)); in dwc2_pci_probe()
117 return PTR_ERR(phy); in dwc2_pci_probe()
123 ret = -ENOMEM; in dwc2_pci_probe()
129 res[0].start = pci_resource_start(pci, 0); in dwc2_pci_probe()
130 res[0].end = pci_resource_end(pci, 0); in dwc2_pci_probe()
134 res[1].start = pci->irq; in dwc2_pci_probe()
144 dwc2->dev.parent = dev; in dwc2_pci_probe()
146 ret = dwc2_pci_quirks(pci, dwc2); in dwc2_pci_probe()
152 ret = -ENOMEM; in dwc2_pci_probe()
162 glue->phy = phy; in dwc2_pci_probe()
163 glue->dwc2 = dwc2; in dwc2_pci_probe()
164 pci_set_drvdata(pci, glue); in dwc2_pci_probe()
168 usb_phy_generic_unregister(phy); in dwc2_pci_probe()
183 MODULE_DEVICE_TABLE(pci, dwc2_pci_ids);
194 MODULE_DESCRIPTION("DESIGNWARE HS OTG PCI Bus Glue");