Lines Matching refs:cdns
60 static int __cdns_host_init(struct cdns *cdns) in __cdns_host_init() argument
66 cdns_drd_host_on(cdns); in __cdns_host_init()
70 dev_err(cdns->dev, "couldn't allocate xHCI device\n"); in __cdns_host_init()
74 xhci->dev.parent = cdns->dev; in __cdns_host_init()
75 cdns->host_dev = xhci; in __cdns_host_init()
77 ret = platform_device_add_resources(xhci, cdns->xhci_res, in __cdns_host_init()
80 dev_err(cdns->dev, "couldn't add resources to xHCI device\n"); in __cdns_host_init()
84 cdns->xhci_plat_data = kmemdup(&xhci_plat_cdns3_xhci, in __cdns_host_init()
86 if (!cdns->xhci_plat_data) { in __cdns_host_init()
91 if (cdns->pdata && (cdns->pdata->quirks & CDNS3_DEFAULT_PM_RUNTIME_ALLOW)) in __cdns_host_init()
92 cdns->xhci_plat_data->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW; in __cdns_host_init()
94 ret = platform_device_add_data(xhci, cdns->xhci_plat_data, in __cdns_host_init()
101 dev_err(cdns->dev, "failed to register xHCI device\n"); in __cdns_host_init()
108 cdns->xhci_regs = hcd->regs; in __cdns_host_init()
113 kfree(cdns->xhci_plat_data); in __cdns_host_init()
119 static void cdns_host_exit(struct cdns *cdns) in cdns_host_exit() argument
121 kfree(cdns->xhci_plat_data); in cdns_host_exit()
122 platform_device_unregister(cdns->host_dev); in cdns_host_exit()
123 cdns->host_dev = NULL; in cdns_host_exit()
124 cdns_drd_host_off(cdns); in cdns_host_exit()
127 int cdns_host_init(struct cdns *cdns) in cdns_host_init() argument
131 rdrv = devm_kzalloc(cdns->dev, sizeof(*rdrv), GFP_KERNEL); in cdns_host_init()
140 cdns->roles[USB_ROLE_HOST] = rdrv; in cdns_host_init()