Lines Matching full:cdns
69 static int __cdns_host_init(struct cdns *cdns) in __cdns_host_init() argument
75 cdns_drd_host_on(cdns); in __cdns_host_init()
79 dev_err(cdns->dev, "couldn't allocate xHCI device\n"); in __cdns_host_init()
83 xhci->dev.parent = cdns->dev; in __cdns_host_init()
84 cdns->host_dev = xhci; in __cdns_host_init()
86 ret = platform_device_add_resources(xhci, cdns->xhci_res, in __cdns_host_init()
89 dev_err(cdns->dev, "couldn't add resources to xHCI device\n"); in __cdns_host_init()
93 if (cdns->version < CDNSP_CONTROLLER_V2) in __cdns_host_init()
94 cdns->xhci_plat_data = kmemdup(&xhci_plat_cdns3_xhci, in __cdns_host_init()
97 cdns->xhci_plat_data = kmemdup(&xhci_plat_cdnsp_xhci, in __cdns_host_init()
100 if (!cdns->xhci_plat_data) { in __cdns_host_init()
105 if (cdns->pdata && (cdns->pdata->quirks & CDNS3_DEFAULT_PM_RUNTIME_ALLOW)) in __cdns_host_init()
106 cdns->xhci_plat_data->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW; in __cdns_host_init()
108 ret = platform_device_add_data(xhci, cdns->xhci_plat_data, in __cdns_host_init()
115 dev_err(cdns->dev, "failed to register xHCI device\n"); in __cdns_host_init()
122 cdns->xhci_regs = hcd->regs; in __cdns_host_init()
127 kfree(cdns->xhci_plat_data); in __cdns_host_init()
133 static void cdns_host_exit(struct cdns *cdns) in cdns_host_exit() argument
135 kfree(cdns->xhci_plat_data); in cdns_host_exit()
136 platform_device_unregister(cdns->host_dev); in cdns_host_exit()
137 cdns->host_dev = NULL; in cdns_host_exit()
138 cdns_drd_host_off(cdns); in cdns_host_exit()
141 int cdns_host_init(struct cdns *cdns) in cdns_host_init() argument
145 rdrv = devm_kzalloc(cdns->dev, sizeof(*rdrv), GFP_KERNEL); in cdns_host_init()
154 cdns->roles[USB_ROLE_HOST] = rdrv; in cdns_host_init()