diff options
author | Grazvydas Ignotas | 2013-03-10 01:48:55 +0100 |
---|---|---|
committer | Felipe Balbi | 2013-03-22 07:40:48 +0100 |
commit | e5615112807c27dd256f0bd8fc8b1f6f5e1b90af (patch) | |
tree | 8ed30f332433febf67c9850bf17ecfd901cc54e0 /drivers/usb/musb/musb_core.c | |
parent | usb: host: ehci-tegra: fix PHY error handling (diff) | |
download | kernel-qcow2-linux-e5615112807c27dd256f0bd8fc8b1f6f5e1b90af.tar.gz kernel-qcow2-linux-e5615112807c27dd256f0bd8fc8b1f6f5e1b90af.tar.xz kernel-qcow2-linux-e5615112807c27dd256f0bd8fc8b1f6f5e1b90af.zip |
usb: musb: core: honour initial transceiver state
As the usb transceiver driver usually starts first, it should already
have default_a variable set according to ID pin state, so don't
override it. In case default_a was not changed by trasceiver, it will
default to 0 and this code will work as before.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb/musb_core.c')
-rw-r--r-- | drivers/usb/musb/musb_core.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 6bd879257e4c..5fbabc0037b4 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -1952,9 +1952,13 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) musb_write_ulpi_buscontrol(musb->mregs, busctl); } - MUSB_DEV_MODE(musb); - musb->xceiv->otg->default_a = 0; - musb->xceiv->state = OTG_STATE_B_IDLE; + if (musb->xceiv->otg->default_a) { + MUSB_HST_MODE(musb); + musb->xceiv->state = OTG_STATE_A_IDLE; + } else { + MUSB_DEV_MODE(musb); + musb->xceiv->state = OTG_STATE_B_IDLE; + } status = musb_gadget_setup(musb); |