Lines Matching refs:cdns
33 static int __cdns_host_init(struct cdns *cdns) in __cdns_host_init() argument
39 cdns_drd_host_on(cdns); in __cdns_host_init()
43 dev_err(cdns->dev, "couldn't allocate xHCI device\n"); in __cdns_host_init()
47 xhci->dev.parent = cdns->dev; in __cdns_host_init()
48 cdns->host_dev = xhci; in __cdns_host_init()
50 ret = platform_device_add_resources(xhci, cdns->xhci_res, in __cdns_host_init()
53 dev_err(cdns->dev, "couldn't add resources to xHCI device\n"); in __cdns_host_init()
57 cdns->xhci_plat_data = kmemdup(&xhci_plat_cdns3_xhci, in __cdns_host_init()
59 if (!cdns->xhci_plat_data) { in __cdns_host_init()
64 if (cdns->pdata && (cdns->pdata->quirks & CDNS3_DEFAULT_PM_RUNTIME_ALLOW)) in __cdns_host_init()
65 cdns->xhci_plat_data->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW; in __cdns_host_init()
67 ret = platform_device_add_data(xhci, cdns->xhci_plat_data, in __cdns_host_init()
74 dev_err(cdns->dev, "failed to register xHCI device\n"); in __cdns_host_init()
81 cdns->xhci_regs = hcd->regs; in __cdns_host_init()
86 kfree(cdns->xhci_plat_data); in __cdns_host_init()
118 static void cdns_host_exit(struct cdns *cdns) in cdns_host_exit() argument
120 kfree(cdns->xhci_plat_data); in cdns_host_exit()
121 platform_device_unregister(cdns->host_dev); in cdns_host_exit()
122 cdns->host_dev = NULL; in cdns_host_exit()
123 cdns_drd_host_off(cdns); in cdns_host_exit()
126 int cdns_host_init(struct cdns *cdns) in cdns_host_init() argument
130 rdrv = devm_kzalloc(cdns->dev, sizeof(*rdrv), GFP_KERNEL); in cdns_host_init()
139 cdns->roles[USB_ROLE_HOST] = rdrv; in cdns_host_init()