Skip to content

Commit

Permalink
usb: gadget: mv_udc: fix hang when shutdown
Browse files Browse the repository at this point in the history
Fix system hang in udc shutdown routine which caused by accessing usb
register when clock is disabled. So enable usb clock before access
register.

Signed-off-by: Yunfan Zhang <yfzhang@marvell.com>
Signed-off-by: Neil Zhang <zhangwm@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Yunfan Zhang authored and Felipe Balbi committed Aug 23, 2012
1 parent 60326ce commit 1dcaa25
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/usb/gadget/mv_udc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2501,9 +2501,11 @@ static void mv_udc_shutdown(struct platform_device *dev)
u32 mode;

/* reset controller mode to IDLE */
mv_udc_enable(udc);
mode = readl(&udc->op_regs->usbmode);
mode &= ~3;
writel(mode, &udc->op_regs->usbmode);
mv_udc_disable(udc);
}

static struct platform_driver udc_driver = {
Expand Down

0 comments on commit 1dcaa25

Please sign in to comment.