aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/omap2430.c
diff options
context:
space:
mode:
authorPhilippe De Swert <philippedeswert@gmail.com>2012-11-06 08:32:13 -0500
committerFelipe Balbi <balbi@ti.com>2012-11-06 08:32:13 -0500
commitbaef653a500476ccb2d08cf4bb648c56c0170e21 (patch)
tree10908e12fd8cc4f21305f1fa763455c3d86fb76f /drivers/usb/musb/omap2430.c
parent8b416b0b25d5d8ddb3a91c1d20e1373582c50405 (diff)
usb: musb: remove generic_interrupt
This patch is based on the discussion of a previous patch to fix an issue where the omap2430 musb driver is not working for N9/N950. Moving all the interrupt handling to the devices. Avoids inclusion of generic interrupt and breakage due to sometimes misleading CONFIG options. This makes sure usb always works if on of the subdrivers is chosen. Tested on Nokia N9/N950. Partially clean up CONFIG_SOC_OMAP3430 which is not necessary in the cases where I removed it. Also helps with the removal work of those options that Tony Lindgren predicted would happen at some point. Signed-off-by: Philippe De Swert <philippe.deswert@jollamobile.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb/omap2430.c')
-rw-r--r--drivers/usb/musb/omap2430.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index dddd8f71a176..32f531e7a2e6 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -333,6 +333,26 @@ static void omap_musb_mailbox_work(struct work_struct *mailbox_work)
333 omap_musb_set_mailbox(glue); 333 omap_musb_set_mailbox(glue);
334} 334}
335 335
336static irqreturn_t omap2430_musb_interrupt(int irq, void *__hci)
337{
338 unsigned long flags;
339 irqreturn_t retval = IRQ_NONE;
340 struct musb *musb = __hci;
341
342 spin_lock_irqsave(&musb->lock, flags);
343
344 musb->int_usb = musb_readb(musb->mregs, MUSB_INTRUSB);
345 musb->int_tx = musb_readw(musb->mregs, MUSB_INTRTX);
346 musb->int_rx = musb_readw(musb->mregs, MUSB_INTRRX);
347
348 if (musb->int_usb || musb->int_tx || musb->int_rx)
349 retval = musb_interrupt(musb);
350
351 spin_unlock_irqrestore(&musb->lock, flags);
352
353 return retval;
354}
355
336static int omap2430_musb_init(struct musb *musb) 356static int omap2430_musb_init(struct musb *musb)
337{ 357{
338 u32 l; 358 u32 l;
@@ -352,6 +372,8 @@ static int omap2430_musb_init(struct musb *musb)
352 return -ENODEV; 372 return -ENODEV;
353 } 373 }
354 374
375 musb->isr = omap2430_musb_interrupt;
376
355 status = pm_runtime_get_sync(dev); 377 status = pm_runtime_get_sync(dev);
356 if (status < 0) { 378 if (status < 0) {
357 dev_err(dev, "pm_runtime_get_sync FAILED %d\n", status); 379 dev_err(dev, "pm_runtime_get_sync FAILED %d\n", status);