Skip to content

Commit

Permalink
mfd: omap-usb-host: Invoke the TLL driver from USB HS core driver
Browse files Browse the repository at this point in the history
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 <keshava_mgowda@ti.com>
Reviewed-by: Partha Basak <parthab@india.ti.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Keshava Munegowda authored and Samuel Ortiz committed Sep 21, 2012
1 parent 16fa3dc commit 4dc2cce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions arch/arm/plat-omap/include/plat/usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#define __ASM_ARCH_OMAP_USB_H

#include <linux/io.h>
#include <linux/platform_device.h>
#include <linux/usb/musb.h>
#include <plat/board.h>

Expand Down
7 changes: 5 additions & 2 deletions drivers/mfd/omap-usb-host.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/clk.h>
#include <linux/dma-mapping.h>
#include <linux/spinlock.h>
Expand Down Expand Up @@ -436,6 +435,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))
Expand Down Expand Up @@ -487,6 +487,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;
}
Expand Down Expand Up @@ -910,8 +911,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)
{
Expand Down

0 comments on commit 4dc2cce

Please sign in to comment.