예제 #1
0
void usb_phy_savecurrent(void)
{

	/* to avoid hw access during clock-off */
	unsigned long flags;
	int do_lock;

	do_lock = 0;

	usb_phy_savecurrent_internal();

	/* to avoid deadlock, musb_shutdown will hold this clock too */
	if (mtk_musb && !musb_is_shutting) {
		spin_lock_irqsave(&mtk_musb->lock, flags);
		do_lock = 1;
	}

	/* 4 14. turn off internal 48Mhz PLL. */
	usb_enable_clock(false);

	if (do_lock)
		spin_unlock_irqrestore(&mtk_musb->lock, flags);

	DBG(0, "usb save current success\n");
}
예제 #2
0
void usb_phy_savecurrent(void){

    usb_phy_savecurrent_internal();
    //4 14. turn off internal 48Mhz PLL.
    usb_enable_clock(false);
    printk("usb save current success\n");
}
예제 #3
0
void usb_phy_context_restore(void)
{
#ifdef CONFIG_MTK_UART_USB_SWITCH
	if (in_uart_mode)
		usb_phy_switch_to_uart();
#endif
	usb_phy_savecurrent_internal();
}