diff options
author | Yunfan Zhang <yfzhang@marvell.com> | 2012-07-10 10:07:06 +0800 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-08-23 11:04:16 +0300 |
commit | 1dcaa252fdf01e4ba49ece156812043baf01c7cc (patch) | |
tree | d6e8578eadbde578f7b491e631010b21832beaed /drivers/usb/gadget/mv_udc_core.c | |
parent | 60326ce377090541db9ba1a05a041316ab5b46ec (diff) |
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>
Diffstat (limited to 'drivers/usb/gadget/mv_udc_core.c')
-rw-r--r-- | drivers/usb/gadget/mv_udc_core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/gadget/mv_udc_core.c b/drivers/usb/gadget/mv_udc_core.c index ff6154d1816e..58edff9abcef 100644 --- a/drivers/usb/gadget/mv_udc_core.c +++ b/drivers/usb/gadget/mv_udc_core.c @@ -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 = { |