diff options
author | Felipe Balbi <balbi@ti.com> | 2014-04-07 11:58:01 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-04-15 13:08:02 -0400 |
commit | 8b2bc2c9351b4c09bc3d9096e2a7af3988565dbf (patch) | |
tree | 28b4585b1ffc5b76b0ae776cb89444c1ad8ff50e /drivers/usb/musb/omap2430.c | |
parent | 3063a12be2b07c64e9802708a19489342e64c1a3 (diff) |
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/musb/omap2430.c')
-rw-r--r-- | drivers/usb/musb/omap2430.c | 6 |
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) | |||
316 | { | 316 | { |
317 | struct omap2430_glue *glue = container_of(mailbox_work, | 317 | struct omap2430_glue *glue = container_of(mailbox_work, |
318 | struct omap2430_glue, omap_musb_mailbox_work); | 318 | struct omap2430_glue, omap_musb_mailbox_work); |
319 | struct musb *musb = glue_to_musb(glue); | ||
320 | struct device *dev = musb->controller; | ||
321 | |||
322 | pm_runtime_get_sync(dev); | ||
319 | omap_musb_set_mailbox(glue); | 323 | omap_musb_set_mailbox(glue); |
324 | pm_runtime_mark_last_busy(dev); | ||
325 | pm_runtime_put_autosuspend(dev); | ||
320 | } | 326 | } |
321 | 327 | ||
322 | static irqreturn_t omap2430_musb_interrupt(int irq, void *__hci) | 328 | static irqreturn_t omap2430_musb_interrupt(int irq, void *__hci) |