diff options
author | Peter De Schrijver <pdeschrijver@nvidia.com> | 2011-12-14 10:03:16 -0500 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2011-12-17 23:15:08 -0500 |
commit | 8e4fab2c39b2db774e41553646788599cfdac9df (patch) | |
tree | 1c2a8e49c3af62f8ac0c6576b39bca79430c43e4 | |
parent | 742face03f57727b5a86d0df631e47a1ef0498d2 (diff) |
arm/tegra: don't export clk_measure_input_freq
don't export clk_measure_input_freq as its functionality is also available
using clk_get_rate().
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>
-rw-r--r-- | arch/arm/mach-tegra/clock.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-tegra/tegra2_clocks.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-tegra/timer.c | 12 |
3 files changed, 9 insertions, 6 deletions
diff --git a/arch/arm/mach-tegra/clock.h b/arch/arm/mach-tegra/clock.h index 8c18e81a9f56..5c44106616c5 100644 --- a/arch/arm/mach-tegra/clock.h +++ b/arch/arm/mach-tegra/clock.h | |||
@@ -148,7 +148,6 @@ struct tegra_clk_init_table { | |||
148 | void tegra2_init_clocks(void); | 148 | void tegra2_init_clocks(void); |
149 | void clk_init(struct clk *clk); | 149 | void clk_init(struct clk *clk); |
150 | struct clk *tegra_get_clock_by_name(const char *name); | 150 | struct clk *tegra_get_clock_by_name(const char *name); |
151 | unsigned long clk_measure_input_freq(void); | ||
152 | int clk_reparent(struct clk *c, struct clk *parent); | 151 | int clk_reparent(struct clk *c, struct clk *parent); |
153 | void tegra_clk_init_from_table(struct tegra_clk_init_table *table); | 152 | void tegra_clk_init_from_table(struct tegra_clk_init_table *table); |
154 | unsigned long clk_get_rate_locked(struct clk *c); | 153 | unsigned long clk_get_rate_locked(struct clk *c); |
diff --git a/arch/arm/mach-tegra/tegra2_clocks.c b/arch/arm/mach-tegra/tegra2_clocks.c index c78abab86253..ff9e6b6c0460 100644 --- a/arch/arm/mach-tegra/tegra2_clocks.c +++ b/arch/arm/mach-tegra/tegra2_clocks.c | |||
@@ -174,7 +174,7 @@ static int tegra_periph_clk_enable_refcount[3 * 32]; | |||
174 | #define pmc_readl(reg) \ | 174 | #define pmc_readl(reg) \ |
175 | __raw_readl(reg_pmc_base + (reg)) | 175 | __raw_readl(reg_pmc_base + (reg)) |
176 | 176 | ||
177 | unsigned long clk_measure_input_freq(void) | 177 | static unsigned long clk_measure_input_freq(void) |
178 | { | 178 | { |
179 | u32 clock_autodetect; | 179 | u32 clock_autodetect; |
180 | clk_writel(OSC_FREQ_DET_TRIG | 1, OSC_FREQ_DET); | 180 | clk_writel(OSC_FREQ_DET_TRIG | 1, OSC_FREQ_DET); |
diff --git a/arch/arm/mach-tegra/timer.c b/arch/arm/mach-tegra/timer.c index 2f1df471c932..6366654b54c5 100644 --- a/arch/arm/mach-tegra/timer.c +++ b/arch/arm/mach-tegra/timer.c | |||
@@ -182,14 +182,18 @@ static struct irqaction tegra_timer_irq = { | |||
182 | static void __init tegra_init_timer(void) | 182 | static void __init tegra_init_timer(void) |
183 | { | 183 | { |
184 | struct clk *clk; | 184 | struct clk *clk; |
185 | unsigned long rate = clk_measure_input_freq(); | 185 | unsigned long rate; |
186 | int ret; | 186 | int ret; |
187 | 187 | ||
188 | clk = clk_get_sys("timer", NULL); | 188 | clk = clk_get_sys("timer", NULL); |
189 | if (IS_ERR(clk)) | 189 | if (IS_ERR(clk)) { |
190 | pr_warn("Unable to get timer clock\n"); | 190 | pr_warn("Unable to get timer clock." |
191 | else | 191 | " Assuming 12Mhz input clock.\n"); |
192 | rate = 12000000; | ||
193 | } else { | ||
192 | clk_enable(clk); | 194 | clk_enable(clk); |
195 | rate = clk_get_rate(clk); | ||
196 | } | ||
193 | 197 | ||
194 | /* | 198 | /* |
195 | * rtc registers are used by read_persistent_clock, keep the rtc clock | 199 | * rtc registers are used by read_persistent_clock, keep the rtc clock |