Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 223336
b: refs/heads/master
c: 0bc6791
h: refs/heads/master
v: v3
  • Loading branch information
Florian Fainelli authored and Ralf Baechle committed Dec 16, 2010
1 parent 2254f0d commit 91d9c98
Show file tree
Hide file tree
Showing 4 changed files with 8 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: ff42d62047e45075c54a5543bd4f110dfd032d11
refs/heads/master: 0bc6791707694c77b3543de39f77972a65de917a
9 changes: 3 additions & 6 deletions trunk/arch/mips/ar7/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,12 @@ static void tnetd7300_set_clock(u32 shift, struct tnetd7300_clock *clock,
calculate(base_clock, frequency, &prediv, &postdiv, &mul);

writel(((prediv - 1) << PREDIV_SHIFT) | (postdiv - 1), &clock->ctrl);
msleep(1);
mdelay(1);
writel(4, &clock->pll);
while (readl(&clock->pll) & PLL_STATUS)
;
writel(((mul - 1) << MUL_SHIFT) | (0xff << 3) | 0x0e, &clock->pll);
msleep(75);
mdelay(75);
}

static void __init tnetd7300_init_clocks(void)
Expand Down Expand Up @@ -456,7 +456,7 @@ void clk_put(struct clk *clk)
}
EXPORT_SYMBOL(clk_put);

int __init ar7_init_clocks(void)
void __init ar7_init_clocks(void)
{
switch (ar7_chip_id()) {
case AR7_CHIP_7100:
Expand All @@ -472,7 +472,4 @@ int __init ar7_init_clocks(void)
}
/* adjust vbus clock rate */
vbus_clk.rate = bus_clk.rate / 2;

return 0;
}
arch_initcall(ar7_init_clocks);
3 changes: 3 additions & 0 deletions trunk/arch/mips/ar7/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ void __init plat_time_init(void)
{
struct clk *cpu_clk;

/* Initialize ar7 clocks so the CPU clock frequency is correct */
ar7_init_clocks();

cpu_clk = clk_get(NULL, "cpu");
if (IS_ERR(cpu_clk)) {
printk(KERN_ERR "unable to get cpu clock\n");
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/mips/include/asm/mach-ar7/ar7.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,5 +201,6 @@ static inline void ar7_device_off(u32 bit)
}

int __init ar7_gpio_init(void);
void __init ar7_init_clocks(void);

#endif /* __AR7_H__ */

0 comments on commit 91d9c98

Please sign in to comment.