diff options
author | Ming Lei <ming.lei@canonical.com> | 2013-01-04 10:13:58 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-01-17 08:45:45 -0500 |
commit | 25736e0c8269e9613aa6036fbc591818daa30d14 (patch) | |
tree | e8408fdcc7f33ef2a75bcf1309d9c246dfac9b86 /drivers/usb/musb/davinci.c | |
parent | 681d1e8761ca773967bce9bd1bb2896f07279551 (diff) |
usb: musb: fix dependency on transceiver driver
This patch let glue driver return -EPROBE_DEFER if the transceiver
is not readly, so we can support defer probe on musb to fix the
below error on 3.7-rc5 if transceiver drivers are built as module:
[ 19.052490] unable to find transceiver of type USB2 PHY
[ 19.072052] HS USB OTG: no transceiver configured
[ 19.076995] musb-hdrc musb-hdrc.0.auto: musb_init_controller failed with status -19
[ 19.089355] musb-hdrc: probe of musb-hdrc.0.auto rejects match -19
[ 19.096771] driver: 'musb-omap2430': driver_bound: bound to device 'musb-omap2430'
[ 19.105194] bus: 'platform': really_probe: bound device musb-omap2430 to driver musb-omap2430
[ 19.174407] bus: 'platform': add driver twl4030_usb
[ 19.179656] bus: 'platform': driver_probe_device: matched device twl4030_usb with driver twl4030_usb
[ 19.202270] bus: 'platform': really_probe: probing driver twl4030_usb with device twl4030_usb
[ 19.214172] twl4030_usb twl4030_usb: HW_CONDITIONS 0xc0/192; link 3
[ 19.239624] musb-omap2430 musb-omap2430: musb core is not yet ready
[ 19.246765] twl4030_usb twl4030_usb: Initialized TWL4030 USB module
[ 19.254516] driver: 'twl4030_usb': driver_bound: bound to device 'twl4030_usb'
[ 19.263580] bus: 'platform': really_probe: bound device twl4030_usb to driver twl4030_usb
Cc: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Cc: <stable@vger.kernel.org> v3.8
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb/davinci.c')
-rw-r--r-- | drivers/usb/musb/davinci.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c index b1c01cad28b2..e040d9103735 100644 --- a/drivers/usb/musb/davinci.c +++ b/drivers/usb/musb/davinci.c | |||
@@ -380,11 +380,14 @@ static int davinci_musb_init(struct musb *musb) | |||
380 | { | 380 | { |
381 | void __iomem *tibase = musb->ctrl_base; | 381 | void __iomem *tibase = musb->ctrl_base; |
382 | u32 revision; | 382 | u32 revision; |
383 | int ret = -ENODEV; | ||
383 | 384 | ||
384 | usb_nop_xceiv_register(); | 385 | usb_nop_xceiv_register(); |
385 | musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2); | 386 | musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2); |
386 | if (IS_ERR_OR_NULL(musb->xceiv)) | 387 | if (IS_ERR_OR_NULL(musb->xceiv)) { |
388 | ret = -EPROBE_DEFER; | ||
387 | goto unregister; | 389 | goto unregister; |
390 | } | ||
388 | 391 | ||
389 | musb->mregs += DAVINCI_BASE_OFFSET; | 392 | musb->mregs += DAVINCI_BASE_OFFSET; |
390 | 393 | ||
@@ -438,7 +441,7 @@ fail: | |||
438 | usb_put_phy(musb->xceiv); | 441 | usb_put_phy(musb->xceiv); |
439 | unregister: | 442 | unregister: |
440 | usb_nop_xceiv_unregister(); | 443 | usb_nop_xceiv_unregister(); |
441 | return -ENODEV; | 444 | return ret; |
442 | } | 445 | } |
443 | 446 | ||
444 | static int davinci_musb_exit(struct musb *musb) | 447 | static int davinci_musb_exit(struct musb *musb) |