summaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/musb_core.c
diff options
context:
space:
mode:
authorDaniel Mack2013-04-10 21:55:47 +0200
committerFelipe Balbi2013-05-28 18:22:24 +0200
commit2cc65feab2f18dfa4297209829ce228989c7356b (patch)
tree83666f8e5a3a445e11cf891dab4458588df52ed5 /drivers/usb/musb/musb_core.c
parentusb: musb: add Kconfig options for HOST, GAGDET or DUAL_ROLE modes (diff)
downloadkernel-qcow2-linux-2cc65feab2f18dfa4297209829ce228989c7356b.tar.gz
kernel-qcow2-linux-2cc65feab2f18dfa4297209829ce228989c7356b.tar.xz
kernel-qcow2-linux-2cc65feab2f18dfa4297209829ce228989c7356b.zip
usb: musb: add musb_host_setup() and musb_host_cleanup()
This patch re-introduces the bits that are necessary to use the musb controller in host mode. Signed-off-by: Daniel Mack <zonque@gmail.com> Acked-by: Peter Korsgaard <jacmet@sunsite.dk> 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.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 727a687433d6..18da746ae6bf 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -953,6 +953,7 @@ static void musb_shutdown(struct platform_device *pdev)
pm_runtime_get_sync(musb->controller);
+ musb_host_cleanup(musb);
musb_gadget_cleanup(musb);
spin_lock_irqsave(&musb->lock, flags);
@@ -1902,6 +1903,10 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
musb->xceiv->state = OTG_STATE_B_IDLE;
}
+ status = musb_host_setup(musb, plat->power);
+ if (status < 0)
+ goto fail3;
+
status = musb_gadget_setup(musb);
if (status < 0)