diff options
Diffstat (limited to 'drivers/usb/host/ohci-ppc-of.c')
-rw-r--r-- | drivers/usb/host/ohci-ppc-of.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/usb/host/ohci-ppc-of.c b/drivers/usb/host/ohci-ppc-of.c index 7ac53264ead3..68a301710297 100644 --- a/drivers/usb/host/ohci-ppc-of.c +++ b/drivers/usb/host/ohci-ppc-of.c | |||
@@ -91,6 +91,7 @@ ohci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match) | |||
91 | 91 | ||
92 | int rv; | 92 | int rv; |
93 | int is_bigendian; | 93 | int is_bigendian; |
94 | struct device_node *np; | ||
94 | 95 | ||
95 | if (usb_disabled()) | 96 | if (usb_disabled()) |
96 | return -ENODEV; | 97 | return -ENODEV; |
@@ -147,6 +148,30 @@ ohci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match) | |||
147 | if (rv == 0) | 148 | if (rv == 0) |
148 | return 0; | 149 | return 0; |
149 | 150 | ||
151 | /* by now, 440epx is known to show usb_23 erratum */ | ||
152 | np = of_find_compatible_node(NULL, NULL, "ibm,usb-ehci-440epx"); | ||
153 | |||
154 | /* Work around - At this point ohci_run has executed, the | ||
155 | * controller is running, everything, the root ports, etc., is | ||
156 | * set up. If the ehci driver is loaded, put the ohci core in | ||
157 | * the suspended state. The ehci driver will bring it out of | ||
158 | * suspended state when / if a non-high speed USB device is | ||
159 | * attached to the USB Host port. If the ehci driver is not | ||
160 | * loaded, do nothing. request_mem_region is used to test if | ||
161 | * the ehci driver is loaded. | ||
162 | */ | ||
163 | if (np != NULL) { | ||
164 | if (!of_address_to_resource(np, 0, &res)) { | ||
165 | if (!request_mem_region(res.start, 0x4, hcd_name)) { | ||
166 | writel_be((readl_be(&ohci->regs->control) | | ||
167 | OHCI_USB_SUSPEND), &ohci->regs->control); | ||
168 | (void) readl_be(&ohci->regs->control); | ||
169 | } else | ||
170 | release_mem_region(res.start, 0x4); | ||
171 | } else | ||
172 | pr_debug(__FILE__ ": cannot get ehci offset from fdt\n"); | ||
173 | } | ||
174 | |||
150 | iounmap(hcd->regs); | 175 | iounmap(hcd->regs); |
151 | err_ioremap: | 176 | err_ioremap: |
152 | irq_dispose_mapping(irq); | 177 | irq_dispose_mapping(irq); |