diff options
author | Tony Lindgren <tony@atomide.com> | 2010-07-05 09:31:29 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-07-05 09:31:29 -0400 |
commit | 98093839307cbf1a0d5cb50b495d14a78b755ed9 (patch) | |
tree | f2fb71de250e14b621535c0661d760eb340a8f4c /arch/arm/mach-omap2/usb-fs.c | |
parent | b5e8905bcd7a794b667f6d5eabcb036f25358fdb (diff) |
omap: Enable interface clock for omap2 FS USB
Looks like this code was only working on boards that had
the usb_l4_ick enabled in the bootloader.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/usb-fs.c')
-rw-r--r-- | arch/arm/mach-omap2/usb-fs.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/usb-fs.c b/arch/arm/mach-omap2/usb-fs.c index f63e5766b6bc..a4455190b216 100644 --- a/arch/arm/mach-omap2/usb-fs.c +++ b/arch/arm/mach-omap2/usb-fs.c | |||
@@ -24,6 +24,8 @@ | |||
24 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
26 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
27 | #include <linux/clk.h> | ||
28 | #include <linux/err.h> | ||
27 | 29 | ||
28 | #include <asm/irq.h> | 30 | #include <asm/irq.h> |
29 | 31 | ||
@@ -330,9 +332,16 @@ static u32 __init omap2_usb2_init(unsigned nwires, unsigned alt_pingroup) | |||
330 | 332 | ||
331 | void __init omap2_usbfs_init(struct omap_usb_config *pdata) | 333 | void __init omap2_usbfs_init(struct omap_usb_config *pdata) |
332 | { | 334 | { |
335 | struct clk *ick; | ||
336 | |||
333 | if (!cpu_is_omap24xx()) | 337 | if (!cpu_is_omap24xx()) |
334 | return; | 338 | return; |
335 | 339 | ||
340 | ick = clk_get(NULL, "usb_l4_ick"); | ||
341 | if (IS_ERR(ick)) | ||
342 | return; | ||
343 | |||
344 | clk_enable(ick); | ||
336 | pdata->usb0_init = omap2_usb0_init; | 345 | pdata->usb0_init = omap2_usb0_init; |
337 | pdata->usb1_init = omap2_usb1_init; | 346 | pdata->usb1_init = omap2_usb1_init; |
338 | pdata->usb2_init = omap2_usb2_init; | 347 | pdata->usb2_init = omap2_usb2_init; |
@@ -340,6 +349,8 @@ void __init omap2_usbfs_init(struct omap_usb_config *pdata) | |||
340 | ohci_device_init(pdata); | 349 | ohci_device_init(pdata); |
341 | otg_device_init(pdata); | 350 | otg_device_init(pdata); |
342 | omap_otg_init(pdata); | 351 | omap_otg_init(pdata); |
352 | clk_disable(ick); | ||
353 | clk_put(ick); | ||
343 | } | 354 | } |
344 | 355 | ||
345 | #endif | 356 | #endif |