提交 1dcaa252 编写于 作者: Y Yunfan Zhang 提交者: Felipe Balbi

usb: gadget: mv_udc: fix hang when shutdown

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: NYunfan Zhang <yfzhang@marvell.com>
Signed-off-by: NNeil Zhang <zhangwm@marvell.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 60326ce3
......@@ -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 = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册