Lines Matching refs:cdns
31 static int __cdns3_host_init(struct cdns3 *cdns) in __cdns3_host_init() argument
37 cdns3_drd_host_on(cdns); in __cdns3_host_init()
41 dev_err(cdns->dev, "couldn't allocate xHCI device\n"); in __cdns3_host_init()
45 xhci->dev.parent = cdns->dev; in __cdns3_host_init()
46 cdns->host_dev = xhci; in __cdns3_host_init()
48 ret = platform_device_add_resources(xhci, cdns->xhci_res, in __cdns3_host_init()
51 dev_err(cdns->dev, "couldn't add resources to xHCI device\n"); in __cdns3_host_init()
55 cdns->xhci_plat_data = kmemdup(&xhci_plat_cdns3_xhci, in __cdns3_host_init()
57 if (!cdns->xhci_plat_data) { in __cdns3_host_init()
62 if (cdns->pdata && (cdns->pdata->quirks & CDNS3_DEFAULT_PM_RUNTIME_ALLOW)) in __cdns3_host_init()
63 cdns->xhci_plat_data->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW; in __cdns3_host_init()
65 ret = platform_device_add_data(xhci, cdns->xhci_plat_data, in __cdns3_host_init()
72 dev_err(cdns->dev, "failed to register xHCI device\n"); in __cdns3_host_init()
79 cdns->xhci_regs = hcd->regs; in __cdns3_host_init()
84 kfree(cdns->xhci_plat_data); in __cdns3_host_init()
116 static void cdns3_host_exit(struct cdns3 *cdns) in cdns3_host_exit() argument
118 kfree(cdns->xhci_plat_data); in cdns3_host_exit()
119 platform_device_unregister(cdns->host_dev); in cdns3_host_exit()
120 cdns->host_dev = NULL; in cdns3_host_exit()
121 cdns3_drd_host_off(cdns); in cdns3_host_exit()
124 int cdns3_host_init(struct cdns3 *cdns) in cdns3_host_init() argument
128 rdrv = devm_kzalloc(cdns->dev, sizeof(*rdrv), GFP_KERNEL); in cdns3_host_init()
137 cdns->roles[USB_ROLE_HOST] = rdrv; in cdns3_host_init()