From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keshava Munegowda Subject: [PATCH V3 4/5] ARM: OMAP: USB: Invoke the TLL driver from USB HS core driver Date: Mon, 2 Jul 2012 20:32:21 +0530 Message-ID: <1341241341-543-1-git-send-email-keshava_mgowda@ti.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from bear.ext.ti.com ([192.94.94.41]:36224 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754420Ab2GBPCb (ORCPT ); Mon, 2 Jul 2012 11:02:31 -0400 Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: linux-omap@vger.kernel.org, linux-usb@vger.kernel.org Cc: Keshava Munegowda , balbi@ti.com, sameo@linux.intel.com, parthab@india.ti.com, paul@pwsan.com, b-cousson@ti.com, sshtylyov@mvista.com, tony@atomide.com The usbhs driver invokes the enable/disable APIs of the usb tll driver in the runtime resume/suspend callbacks of the runtime get sync and put sync of the usbhs driver. Signed-off-by: Keshava Munegowda Reviewed-by: Partha Basak --- arch/arm/plat-omap/include/plat/usb.h | 1 + drivers/mfd/omap-usb-host.c | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/arm/plat-omap/include/plat/usb.h b/arch/arm/plat-omap/include/plat/usb.h index b8a9d5e..8eac78c 100644 --- a/arch/arm/plat-omap/include/plat/usb.h +++ b/arch/arm/plat-omap/include/plat/usb.h @@ -4,6 +4,7 @@ #define __ASM_ARCH_OMAP_USB_H #include +#include #include #include diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c index c1baf20..23cec57 100644 --- a/drivers/mfd/omap-usb-host.c +++ b/drivers/mfd/omap-usb-host.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -287,6 +286,7 @@ static int usbhs_runtime_resume(struct device *dev) return -ENODEV; } + omap_tll_enable(); spin_lock_irqsave(&omap->lock, flags); if (omap->ehci_logic_fck && !IS_ERR(omap->ehci_logic_fck)) @@ -332,6 +332,7 @@ static int usbhs_runtime_suspend(struct device *dev) clk_disable(omap->ehci_logic_fck); spin_unlock_irqrestore(&omap->lock, flags); + omap_tll_disable(); return 0; } @@ -699,8 +700,10 @@ static int __init omap_usbhs_drvinit(void) * init before ehci and ohci drivers; * The usbhs core driver should be initialized much before * the omap ehci and ohci probe functions are called. + * This usbhs core driver should be initialized after + * usb tll driver */ -fs_initcall(omap_usbhs_drvinit); +fs_initcall_sync(omap_usbhs_drvinit); static void __exit omap_usbhs_drvexit(void) { -- 1.7.9.5