24 static int ehci_platform_reset(
struct usb_hcd *hcd)
28 struct ehci_hcd *ehci = hcd_to_ehci(hcd);
31 hcd->has_tt = pdata->
has_tt;
37 retval = ehci_setup(hcd);
42 ehci_port_power(ehci, 1);
44 ehci_port_power(ehci, 0);
49 static const struct hc_driver ehci_platform_hc_driver = {
50 .description = hcd_name,
51 .product_desc =
"Generic Platform EHCI Controller",
52 .hcd_priv_size =
sizeof(
struct ehci_hcd),
55 .flags = HCD_MEMORY | HCD_USB2,
57 .reset = ehci_platform_reset,
60 .shutdown = ehci_shutdown,
62 .urb_enqueue = ehci_urb_enqueue,
63 .urb_dequeue = ehci_urb_dequeue,
64 .endpoint_disable = ehci_endpoint_disable,
65 .endpoint_reset = ehci_endpoint_reset,
67 .get_frame_number = ehci_get_frame,
69 .hub_status_data = ehci_hub_status_data,
70 .hub_control = ehci_hub_control,
71 #if defined(CONFIG_PM)
75 .relinquish_port = ehci_relinquish_port,
76 .port_handed_over = ehci_port_handed_over,
78 .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete,
104 pr_err(
"no memory recourse provided");
115 dev_name(&dev->
dev));
121 hcd->rsrc_start = res_mem->
start;
122 hcd->rsrc_len = resource_size(res_mem);
125 pr_err(
"controller already in use");
133 goto err_release_region;
139 platform_set_drvdata(dev, hcd);
158 struct usb_hcd *hcd = platform_get_drvdata(dev);
165 platform_set_drvdata(dev,
NULL);
181 bool do_wakeup = device_may_wakeup(dev);
184 ret = ehci_suspend(hcd, do_wakeup);
205 ehci_resume(hcd,
false);
210 #define ehci_platform_suspend NULL
211 #define ehci_platform_resume NULL
215 {
"ehci-platform", 0 },
220 static const struct dev_pm_ops ehci_platform_pm_ops = {
226 .id_table = ehci_platform_table,
227 .probe = ehci_platform_probe,
232 .name =
"ehci-platform",
233 .pm = &ehci_platform_pm_ops,