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: Yunfan Zhang <yfzhang@marvell.com> Signed-off-by: Neil Zhang <zhangwm@marvell.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
parent
60326ce377
commit
1dcaa252fd
@ -2501,9 +2501,11 @@ static void mv_udc_shutdown(struct platform_device *dev)
|
|||||||
u32 mode;
|
u32 mode;
|
||||||
|
|
||||||
/* reset controller mode to IDLE */
|
/* reset controller mode to IDLE */
|
||||||
|
mv_udc_enable(udc);
|
||||||
mode = readl(&udc->op_regs->usbmode);
|
mode = readl(&udc->op_regs->usbmode);
|
||||||
mode &= ~3;
|
mode &= ~3;
|
||||||
writel(mode, &udc->op_regs->usbmode);
|
writel(mode, &udc->op_regs->usbmode);
|
||||||
|
mv_udc_disable(udc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct platform_driver udc_driver = {
|
static struct platform_driver udc_driver = {
|
||||||
|
Loading…
Reference in New Issue
Block a user