aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-pmcmsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/ehci-pmcmsp.c')
-rw-r--r--drivers/usb/host/ehci-pmcmsp.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/drivers/usb/host/ehci-pmcmsp.c b/drivers/usb/host/ehci-pmcmsp.c
index af3974a5e7c2..7d75465d97c7 100644
--- a/drivers/usb/host/ehci-pmcmsp.c
+++ b/drivers/usb/host/ehci-pmcmsp.c
@@ -68,9 +68,6 @@ static void usb_hcd_tdi_set_mode(struct ehci_hcd *ehci)
68 68
69 /* set TWI GPIO USB_HOST_DEV pin high */ 69 /* set TWI GPIO USB_HOST_DEV pin high */
70 gpio_direction_output(MSP_PIN_USB0_HOST_DEV, 1); 70 gpio_direction_output(MSP_PIN_USB0_HOST_DEV, 1);
71#ifdef CONFIG_MSP_HAS_DUAL_USB
72 gpio_direction_output(MSP_PIN_USB1_HOST_DEV, 1);
73#endif
74} 71}
75 72
76/* called during probe() after chip reset completes */ 73/* called during probe() after chip reset completes */
@@ -248,33 +245,6 @@ void usb_hcd_msp_remove(struct usb_hcd *hcd, struct platform_device *dev)
248 usb_put_hcd(hcd); 245 usb_put_hcd(hcd);
249} 246}
250 247
251#ifdef CONFIG_MSP_HAS_DUAL_USB
252/*
253 * Wrapper around the main ehci_irq. Since both USB host controllers are
254 * sharing the same IRQ, need to first determine whether we're the intended
255 * recipient of this interrupt.
256 */
257static irqreturn_t ehci_msp_irq(struct usb_hcd *hcd)
258{
259 u32 int_src;
260 struct device *dev = hcd->self.controller;
261 struct platform_device *pdev;
262 struct mspusb_device *mdev;
263 struct ehci_hcd *ehci = hcd_to_ehci(hcd);
264 /* need to reverse-map a couple of containers to get our device */
265 pdev = to_platform_device(dev);
266 mdev = to_mspusb_device(pdev);
267
268 /* Check to see if this interrupt is for this host controller */
269 int_src = ehci_readl(ehci, &mdev->mab_regs->int_stat);
270 if (int_src & (1 << pdev->id))
271 return ehci_irq(hcd);
272
273 /* Not for this device */
274 return IRQ_NONE;
275}
276#endif /* DUAL_USB */
277
278static const struct hc_driver ehci_msp_hc_driver = { 248static const struct hc_driver ehci_msp_hc_driver = {
279 .description = hcd_name, 249 .description = hcd_name,
280 .product_desc = "PMC MSP EHCI", 250 .product_desc = "PMC MSP EHCI",
@@ -283,11 +253,7 @@ static const struct hc_driver ehci_msp_hc_driver = {
283 /* 253 /*
284 * generic hardware linkage 254 * generic hardware linkage
285 */ 255 */
286#ifdef CONFIG_MSP_HAS_DUAL_USB
287 .irq = ehci_msp_irq,
288#else
289 .irq = ehci_irq, 256 .irq = ehci_irq,
290#endif
291 .flags = HCD_MEMORY | HCD_USB2 | HCD_BH, 257 .flags = HCD_MEMORY | HCD_USB2 | HCD_BH,
292 258
293 /* 259 /*
@@ -334,9 +300,6 @@ static int ehci_hcd_msp_drv_probe(struct platform_device *pdev)
334 return -ENODEV; 300 return -ENODEV;
335 301
336 gpio_request(MSP_PIN_USB0_HOST_DEV, "USB0_HOST_DEV_GPIO"); 302 gpio_request(MSP_PIN_USB0_HOST_DEV, "USB0_HOST_DEV_GPIO");
337#ifdef CONFIG_MSP_HAS_DUAL_USB
338 gpio_request(MSP_PIN_USB1_HOST_DEV, "USB1_HOST_DEV_GPIO");
339#endif
340 303
341 ret = usb_hcd_msp_probe(&ehci_msp_hc_driver, pdev); 304 ret = usb_hcd_msp_probe(&ehci_msp_hc_driver, pdev);
342 305
@@ -351,9 +314,6 @@ static int ehci_hcd_msp_drv_remove(struct platform_device *pdev)
351 314
352 /* free TWI GPIO USB_HOST_DEV pin */ 315 /* free TWI GPIO USB_HOST_DEV pin */
353 gpio_free(MSP_PIN_USB0_HOST_DEV); 316 gpio_free(MSP_PIN_USB0_HOST_DEV);
354#ifdef CONFIG_MSP_HAS_DUAL_USB
355 gpio_free(MSP_PIN_USB1_HOST_DEV);
356#endif
357 317
358 return 0; 318 return 0;
359} 319}