diff options
author | Peter De Schrijver <pdeschrijver@nvidia.com> | 2012-01-09 00:35:11 -0500 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-02-06 12:16:15 -0500 |
commit | 4fccf75ba3bee0bb3be7828caa03625d4ac100a2 (patch) | |
tree | ac2445c017187a1f68fbf642c1712706c0903c0b /arch/arm/mach-tegra/clock.c | |
parent | caa4868ee07029e60450909960652b96a50ebfbd (diff) |
ARM: tegra: add support for new clock framework features
Add support for new clock framework features implemented in tegra30.
Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-tegra/clock.c')
-rw-r--r-- | arch/arm/mach-tegra/clock.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/clock.c b/arch/arm/mach-tegra/clock.c index 8337068a4abe..8dad8d18cb49 100644 --- a/arch/arm/mach-tegra/clock.c +++ b/arch/arm/mach-tegra/clock.c | |||
@@ -399,6 +399,28 @@ void tegra_periph_reset_assert(struct clk *c) | |||
399 | } | 399 | } |
400 | EXPORT_SYMBOL(tegra_periph_reset_assert); | 400 | EXPORT_SYMBOL(tegra_periph_reset_assert); |
401 | 401 | ||
402 | /* Several extended clock configuration bits (e.g., clock routing, clock | ||
403 | * phase control) are included in PLL and peripheral clock source | ||
404 | * registers. */ | ||
405 | int tegra_clk_cfg_ex(struct clk *c, enum tegra_clk_ex_param p, u32 setting) | ||
406 | { | ||
407 | int ret = 0; | ||
408 | unsigned long flags; | ||
409 | |||
410 | spin_lock_irqsave(&c->spinlock, flags); | ||
411 | |||
412 | if (!c->ops || !c->ops->clk_cfg_ex) { | ||
413 | ret = -ENOSYS; | ||
414 | goto out; | ||
415 | } | ||
416 | ret = c->ops->clk_cfg_ex(c, p, setting); | ||
417 | |||
418 | out: | ||
419 | spin_unlock_irqrestore(&c->spinlock, flags); | ||
420 | |||
421 | return ret; | ||
422 | } | ||
423 | |||
402 | #ifdef CONFIG_DEBUG_FS | 424 | #ifdef CONFIG_DEBUG_FS |
403 | 425 | ||
404 | static int __clk_lock_all_spinlocks(void) | 426 | static int __clk_lock_all_spinlocks(void) |