]> git.baikalelectronics.ru Git - kernel.git/commit
usb: gadget: mv_udc: fix boot up hang
authorNeil Zhang <zhangwm@marvell.com>
Tue, 10 Jul 2012 02:07:07 +0000 (10:07 +0800)
committerFelipe Balbi <balbi@ti.com>
Thu, 23 Aug 2012 08:04:17 +0000 (11:04 +0300)
commit998ddbfdb9683ea55d79256dd657f2d7ce7b52ca
treec346f8d7afdcdc22deac0b18e1cd627cc83fce31
parent5a75f3c160bcaf741474db08c50e78cc16c353fb
usb: gadget: mv_udc: fix boot up hang

Fix boot up hang when enable udc without otg enabled.
The root cause is that the clock will be shut down when probe routine is
finished because of clock gating. When a gadget driver is registered at
this time, it will call mv_udc_start which in turn will call
mv_udc_vbus_session. If there is no cable attached at the boot up time,
the vbus is low, so it will call stop_activity path without clock
enabled which will cause system hang then.
Actually, we need't go this path when clock is disabled, what we need to
do is just jump out.

Signed-off-by: Neil Zhang <zhangwm@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/mv_udc_core.c