24 static int ps3_ohci_hc_reset(
struct usb_hcd *hcd)
30 return ohci_init(ohci);
33 static int __devinit ps3_ohci_hc_start(
struct usb_hcd *hcd)
42 &ohci->
regs->roothub.a);
45 result = ohci_run(ohci);
48 dev_err(hcd->self.controller,
"can't start %s\n",
56 static const struct hc_driver ps3_ohci_hc_driver = {
57 .description = hcd_name,
58 .product_desc =
"PS3 OHCI Host Controller",
59 .hcd_priv_size =
sizeof(
struct ohci_hcd),
61 .flags = HCD_MEMORY | HCD_USB11,
62 .reset = ps3_ohci_hc_reset,
63 .start = ps3_ohci_hc_start,
65 .shutdown = ohci_shutdown,
66 .urb_enqueue = ohci_urb_enqueue,
67 .urb_dequeue = ohci_urb_dequeue,
68 .endpoint_disable = ohci_endpoint_disable,
69 .get_frame_number = ohci_get_frame,
70 .hub_status_data = ohci_hub_status_data,
71 .hub_control = ohci_hub_control,
73 #if defined(CONFIG_PM)
74 .bus_suspend = ohci_bus_suspend,
75 .bus_resume = ohci_bus_resume,
94 dev_dbg(&dev->
core,
"%s:%d: ps3_open_hv_device failed: %s\n",
95 __func__, __LINE__, ps3_result(result));
103 dev_dbg(&dev->
core,
"%s:%d: ps3_dma_region_create failed: "
104 "(%d)\n", __func__, __LINE__, result);
105 BUG_ON(
"check region type");
106 goto fail_dma_region;
112 dev_dbg(&dev->
core,
"%s:%d: ps3_map_mmio_region failed\n",
115 goto fail_mmio_region;
118 dev_dbg(&dev->
core,
"%s:%d: mmio mapped_addr %lxh\n", __func__,
119 __LINE__, dev->
m_region->lpar_addr);
124 dev_dbg(&dev->
core,
"%s:%d: ps3_construct_io_irq(%d) failed.\n",
125 __func__, __LINE__, virq);
130 dev->
core.dma_mask = &dummy_mask;
135 dev_dbg(&dev->
core,
"%s:%d: usb_create_hcd failed\n", __func__,
138 goto fail_create_hcd;
141 hcd->rsrc_start = dev->
m_region->lpar_addr;
145 dev_dbg(&dev->
core,
"%s:%d: request_mem_region failed\n",
151 dev_dbg(&dev->
core,
"%s:%d: ioremap failed\n", __func__,
157 dev_dbg(&dev->
core,
"%s:%d: hcd->rsrc_start %lxh\n", __func__, __LINE__,
158 (
unsigned long)hcd->rsrc_start);
159 dev_dbg(&dev->
core,
"%s:%d: hcd->rsrc_len %lxh\n", __func__, __LINE__,
160 (
unsigned long)hcd->rsrc_len);
161 dev_dbg(&dev->
core,
"%s:%d: hcd->regs %lxh\n", __func__, __LINE__,
162 (
unsigned long)hcd->regs);
163 dev_dbg(&dev->
core,
"%s:%d: virq %lu\n", __func__, __LINE__,
164 (
unsigned long)virq);
166 ps3_system_bus_set_drvdata(dev, hcd);
171 dev_dbg(&dev->
core,
"%s:%d: usb_add_hcd failed (%d)\n",
172 __func__, __LINE__, result);
199 struct usb_hcd *hcd = ps3_system_bus_get_drvdata(dev);
203 dev_dbg(&dev->
core,
"%s:%d: regs %p\n", __func__, __LINE__, hcd->regs);
204 dev_dbg(&dev->
core,
"%s:%d: irq %u\n", __func__, __LINE__, hcd->irq);
211 ps3_system_bus_set_drvdata(dev,
NULL);
230 return firmware_has_feature(FW_FEATURE_PS3_LV1)
237 if (firmware_has_feature(FW_FEATURE_PS3_LV1))
244 .core.name =
"ps3-ohci-driver",
247 .probe = ps3_ohci_probe,
248 .remove = ps3_ohci_remove,
249 .shutdown = ps3_ohci_remove,