summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2014-04-07 10:58:01 -0500
committerFelipe Balbi <balbi@ti.com>2014-04-15 12:08:02 -0500
commit8b2bc2c9351b4c09bc3d9096e2a7af3988565dbf (patch)
tree28b4585b1ffc5b76b0ae776cb89444c1ad8ff50e /drivers/usb
parent3063a12be2b07c64e9802708a19489342e64c1a3 (diff)
downloadlinux-8b2bc2c9351b4c09bc3d9096e2a7af3988565dbf.tar.bz2
usb: musb: omap2430: make sure clocks are enabled when running mailbox
on early initialization we could fall into a situation where the mailbox is called before MUSB's clocks are running, in order to avoid that, make sure mailbox is always wrapped with pm_runtime calls. Reported-by: Stefan Roese <sr@denx.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/musb/omap2430.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index 819a7cdcb866..d369bf1f3936 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -316,7 +316,13 @@ static void omap_musb_mailbox_work(struct work_struct *mailbox_work)
{
struct omap2430_glue *glue = container_of(mailbox_work,
struct omap2430_glue, omap_musb_mailbox_work);
+ struct musb *musb = glue_to_musb(glue);
+ struct device *dev = musb->controller;
+
+ pm_runtime_get_sync(dev);
omap_musb_set_mailbox(glue);
+ pm_runtime_mark_last_busy(dev);
+ pm_runtime_put_autosuspend(dev);
}
static irqreturn_t omap2430_musb_interrupt(int irq, void *__hci)