]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
musb_hdrc: Keep tusb host clock on when VBUS is on
authorTony Lindgren <tony@atomide.com>
Wed, 15 Aug 2007 10:47:05 +0000 (03:47 -0700)
committerTony Lindgren <tony@atomide.com>
Wed, 15 Aug 2007 10:47:05 +0000 (03:47 -0700)
Otherwise host mode will not work when OMAP idles

Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/usb/musb/tusb6010.c

index 142ef3cce64ea8dcfd942d5a37c7d7f8c8930bfb..d43b5cc5018fd7d597b6215142e93d4c3880c0c6 100644 (file)
@@ -530,6 +530,8 @@ static void tusb_source_power(struct musb *musb, int is_on)
        devctl = musb_readb(musb->mregs, MGC_O_HDRC_DEVCTL);
 
        if (is_on) {
+               if (musb->set_clock)
+                       musb->set_clock(musb->clock, 1);
                musb->is_active = 1;
                timer = OTG_TIMER_MS(OTG_TIME_A_WAIT_VRISE);
                musb->xceiv.default_a = 1;
@@ -552,6 +554,8 @@ static void tusb_source_power(struct musb *musb, int is_on)
 
                conf &= ~TUSB_DEV_CONF_USB_HOST_MODE;
                MUSB_DEV_MODE(musb);
+               if (musb->set_clock)
+                       musb->set_clock(musb->clock, 0);
        }
        prcm &= ~(TUSB_PRCM_MNGMT_15_SW_EN | TUSB_PRCM_MNGMT_33_SW_EN);