diff options
author | Peter De Schrijver <pdeschrijver@nvidia.com> | 2011-12-14 10:03:15 -0500 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2011-12-17 23:14:45 -0500 |
commit | 742face03f57727b5a86d0df631e47a1ef0498d2 (patch) | |
tree | bd0623063ba085b19a70e8337cb045519b5d0f08 /arch/arm/mach-tegra/tegra2_clocks.c | |
parent | b2bbbc4d5bfde68d4a2b45ee8592d012826ffa70 (diff) |
arm/tegra: prepare clock code for multiple tegra variants
Rework the tegra20 clock code to support multiple tegra variants :
* remove tegra2_periph_reset_assert/tegra2_periph_reset_deassert. This
functionality should be in clock.c.
* remove tegra_sdmmc_tap_delay and export tegra2_sdmmc_tap_delay
directly. This feature is handled inside the sdmmc block from tegra30
onwards. So there is no need for support in the clock code beyond
tegra20. There are no in tree users of this function.
Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Colin Cross <ccross@android.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-tegra/tegra2_clocks.c')
-rw-r--r-- | arch/arm/mach-tegra/tegra2_clocks.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/arch/arm/mach-tegra/tegra2_clocks.c b/arch/arm/mach-tegra/tegra2_clocks.c index 371869d8ea01..c78abab86253 100644 --- a/arch/arm/mach-tegra/tegra2_clocks.c +++ b/arch/arm/mach-tegra/tegra2_clocks.c | |||
@@ -278,18 +278,6 @@ static struct clk_ops tegra_clk_m_ops = { | |||
278 | .disable = tegra2_clk_m_disable, | 278 | .disable = tegra2_clk_m_disable, |
279 | }; | 279 | }; |
280 | 280 | ||
281 | void tegra2_periph_reset_assert(struct clk *c) | ||
282 | { | ||
283 | BUG_ON(!c->ops->reset); | ||
284 | c->ops->reset(c, true); | ||
285 | } | ||
286 | |||
287 | void tegra2_periph_reset_deassert(struct clk *c) | ||
288 | { | ||
289 | BUG_ON(!c->ops->reset); | ||
290 | c->ops->reset(c, false); | ||
291 | } | ||
292 | |||
293 | /* super clock functions */ | 281 | /* super clock functions */ |
294 | /* "super clocks" on tegra have two-stage muxes and a clock skipping | 282 | /* "super clocks" on tegra have two-stage muxes and a clock skipping |
295 | * super divider. We will ignore the clock skipping divider, since we | 283 | * super divider. We will ignore the clock skipping divider, since we |
@@ -1132,6 +1120,9 @@ static struct clk_ops tegra_periph_clk_ops = { | |||
1132 | void tegra2_sdmmc_tap_delay(struct clk *c, int delay) | 1120 | void tegra2_sdmmc_tap_delay(struct clk *c, int delay) |
1133 | { | 1121 | { |
1134 | u32 reg; | 1122 | u32 reg; |
1123 | unsigned long flags; | ||
1124 | |||
1125 | spin_lock_irqsave(&c->spinlock, flags); | ||
1135 | 1126 | ||
1136 | delay = clamp(delay, 0, 15); | 1127 | delay = clamp(delay, 0, 15); |
1137 | reg = clk_readl(c->reg); | 1128 | reg = clk_readl(c->reg); |
@@ -1139,6 +1130,8 @@ void tegra2_sdmmc_tap_delay(struct clk *c, int delay) | |||
1139 | reg |= SDMMC_CLK_INT_FB_SEL; | 1130 | reg |= SDMMC_CLK_INT_FB_SEL; |
1140 | reg |= delay << SDMMC_CLK_INT_FB_DLY_SHIFT; | 1131 | reg |= delay << SDMMC_CLK_INT_FB_DLY_SHIFT; |
1141 | clk_writel(reg, c->reg); | 1132 | clk_writel(reg, c->reg); |
1133 | |||
1134 | spin_unlock_irqrestore(&c->spinlock, flags); | ||
1142 | } | 1135 | } |
1143 | 1136 | ||
1144 | /* External memory controller clock ops */ | 1137 | /* External memory controller clock ops */ |