Lines Matching defs:cdns
67 static int __cdns_host_init(struct cdns *cdns)
73 cdns_drd_host_on(cdns);
77 dev_err(cdns->dev, "couldn't allocate xHCI device\n");
81 xhci->dev.parent = cdns->dev;
82 cdns->host_dev = xhci;
84 ret = platform_device_add_resources(xhci, cdns->xhci_res,
87 dev_err(cdns->dev, "couldn't add resources to xHCI device\n");
91 if (cdns->version < CDNSP_CONTROLLER_V2)
92 cdns->xhci_plat_data = kmemdup(&xhci_plat_cdns3_xhci,
95 cdns->xhci_plat_data = kmemdup(&xhci_plat_cdnsp_xhci,
98 if (!cdns->xhci_plat_data) {
103 if (cdns->pdata && (cdns->pdata->quirks & CDNS3_DEFAULT_PM_RUNTIME_ALLOW))
104 cdns->xhci_plat_data->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW;
106 ret = platform_device_add_data(xhci, cdns->xhci_plat_data,
113 dev_err(cdns->dev, "failed to register xHCI device\n");
120 cdns->xhci_regs = hcd->regs;
125 kfree(cdns->xhci_plat_data);
131 static void cdns_host_exit(struct cdns *cdns)
133 kfree(cdns->xhci_plat_data);
134 platform_device_unregister(cdns->host_dev);
135 cdns->host_dev = NULL;
136 cdns_drd_host_off(cdns);
139 int cdns_host_init(struct cdns *cdns)
143 rdrv = devm_kzalloc(cdns->dev, sizeof(*rdrv), GFP_KERNEL);
152 cdns->roles[USB_ROLE_HOST] = rdrv;