18 #include <linux/signal.h>
31 static int usb_hcd_ppc_soc_probe(
const struct hc_driver *
driver,
40 pr_debug(
"initializing PPC-SOC USB Controller\n");
51 pr_debug(
"%s: no reg addr\n", __FILE__);
58 hcd->rsrc_start = res->
start;
59 hcd->rsrc_len = resource_size(res);
62 pr_debug(
"%s: request_mem_region failed\n", __FILE__);
67 hcd->regs =
ioremap(hcd->rsrc_start, hcd->rsrc_len);
69 pr_debug(
"%s: ioremap failed\n", __FILE__);
74 ohci = hcd_to_ohci(hcd);
77 #ifdef CONFIG_PPC_MPC52xx
87 pr_debug(
"Removing PPC-SOC USB Controller\n");
111 static void usb_hcd_ppc_soc_remove(
struct usb_hcd *hcd,
116 pr_debug(
"stopping PPC-SOC USB Controller\n");
124 ohci_ppc_soc_start(
struct usb_hcd *hcd)
126 struct ohci_hcd *ohci = hcd_to_ohci(hcd);
129 if ((ret = ohci_init(ohci)) < 0)
132 if ((ret = ohci_run(ohci)) < 0) {
133 dev_err(hcd->self.controller,
"can't start %s\n",
142 static const struct hc_driver ohci_ppc_soc_hc_driver = {
143 .description = hcd_name,
144 .hcd_priv_size =
sizeof(
struct ohci_hcd),
150 .flags = HCD_USB11 | HCD_MEMORY,
155 .start = ohci_ppc_soc_start,
157 .shutdown = ohci_shutdown,
162 .urb_enqueue = ohci_urb_enqueue,
163 .urb_dequeue = ohci_urb_dequeue,
164 .endpoint_disable = ohci_endpoint_disable,
169 .get_frame_number = ohci_get_frame,
174 .hub_status_data = ohci_hub_status_data,
175 .hub_control = ohci_hub_control,
177 .bus_suspend = ohci_bus_suspend,
178 .bus_resume = ohci_bus_resume,
190 ret = usb_hcd_ppc_soc_probe(&ohci_ppc_soc_hc_driver, pdev);
196 struct usb_hcd *hcd = platform_get_drvdata(pdev);
198 usb_hcd_ppc_soc_remove(hcd, pdev);
203 .probe = ohci_hcd_ppc_soc_drv_probe,
204 .remove = ohci_hcd_ppc_soc_drv_remove,
211 .name =
"ppc-soc-ohci",