Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 281651
b: refs/heads/master
c: 8e4fab2
h: refs/heads/master
i:
  281649: b74058b
  281647: 6b14fba
v: v3
  • Loading branch information
Peter De Schrijver authored and Olof Johansson committed Dec 18, 2011
1 parent 32d76ef commit f523152
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 742face03f57727b5a86d0df631e47a1ef0498d2
refs/heads/master: 8e4fab2c39b2db774e41553646788599cfdac9df
1 change: 0 additions & 1 deletion trunk/arch/arm/mach-tegra/clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ struct tegra_clk_init_table {
void tegra2_init_clocks(void);
void clk_init(struct clk *clk);
struct clk *tegra_get_clock_by_name(const char *name);
unsigned long clk_measure_input_freq(void);
int clk_reparent(struct clk *c, struct clk *parent);
void tegra_clk_init_from_table(struct tegra_clk_init_table *table);
unsigned long clk_get_rate_locked(struct clk *c);
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-tegra/tegra2_clocks.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ static int tegra_periph_clk_enable_refcount[3 * 32];
#define pmc_readl(reg) \
__raw_readl(reg_pmc_base + (reg))

unsigned long clk_measure_input_freq(void)
static unsigned long clk_measure_input_freq(void)
{
u32 clock_autodetect;
clk_writel(OSC_FREQ_DET_TRIG | 1, OSC_FREQ_DET);
Expand Down
12 changes: 8 additions & 4 deletions trunk/arch/arm/mach-tegra/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,18 @@ static struct irqaction tegra_timer_irq = {
static void __init tegra_init_timer(void)
{
struct clk *clk;
unsigned long rate = clk_measure_input_freq();
unsigned long rate;
int ret;

clk = clk_get_sys("timer", NULL);
if (IS_ERR(clk))
pr_warn("Unable to get timer clock\n");
else
if (IS_ERR(clk)) {
pr_warn("Unable to get timer clock."
" Assuming 12Mhz input clock.\n");
rate = 12000000;
} else {
clk_enable(clk);
rate = clk_get_rate(clk);
}

/*
* rtc registers are used by read_persistent_clock, keep the rtc clock
Expand Down

0 comments on commit f523152

Please sign in to comment.