21 static int ehci_sh_reset(
struct usb_hcd *hcd)
23 struct ehci_hcd *ehci = hcd_to_ehci(hcd);
26 ehci->
caps = hcd->regs;
28 ret = ehci_setup(hcd);
32 ehci_port_power(ehci, 0);
37 static const struct hc_driver ehci_sh_hc_driver = {
38 .description = hcd_name,
39 .product_desc =
"SuperH EHCI",
40 .hcd_priv_size =
sizeof(
struct ehci_hcd),
46 .flags = HCD_USB2 | HCD_MEMORY,
51 .reset = ehci_sh_reset,
54 .shutdown = ehci_shutdown,
59 .urb_enqueue = ehci_urb_enqueue,
60 .urb_dequeue = ehci_urb_dequeue,
61 .endpoint_disable = ehci_endpoint_disable,
62 .endpoint_reset = ehci_endpoint_reset,
67 .get_frame_number = ehci_get_frame,
72 .hub_status_data = ehci_hub_status_data,
73 .hub_control = ehci_hub_control,
80 .relinquish_port = ehci_relinquish_port,
81 .port_handed_over = ehci_port_handed_over,
82 .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete,
87 const struct hc_driver *
driver = &ehci_sh_hc_driver;
100 "Found HC with no register addr. Check %s setup!\n",
101 dev_name(&pdev->
dev));
103 goto fail_create_hcd;
109 "Found HC with no IRQ. Check %s setup!\n",
110 dev_name(&pdev->
dev));
112 goto fail_create_hcd;
115 pdata = pdev->
dev.platform_data;
119 dev_name(&pdev->
dev));
122 goto fail_create_hcd;
125 hcd->rsrc_start = res->
start;
126 hcd->rsrc_len = resource_size(res);
129 if (hcd->regs ==
NULL) {
130 dev_dbg(&pdev->
dev,
"error mapping memory\n");
132 goto fail_request_resource;
138 dev_dbg(&pdev->
dev,
"error allocating priv data\n");
140 goto fail_request_resource;
145 if (IS_ERR(priv->
fclk))
149 if (IS_ERR(priv->
iclk))
165 platform_set_drvdata(pdev, priv);
173 fail_request_resource:
176 dev_err(&pdev->
dev,
"init %s fail, %d\n", dev_name(&pdev->
dev), ret);
184 struct usb_hcd *hcd = priv->
hcd;
188 platform_set_drvdata(pdev,
NULL);
199 struct usb_hcd *hcd = priv->
hcd;
201 if (hcd->driver->shutdown)
202 hcd->driver->shutdown(hcd);
206 .probe = ehci_hcd_sh_probe,
207 .remove =
__exit_p(ehci_hcd_sh_remove),
208 .shutdown = ehci_hcd_sh_shutdown,