diff options
| -rw-r--r-- | arch/arm/mach-dove/common.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c index 6321567d8eaa..8629e3043acd 100644 --- a/arch/arm/mach-dove/common.c +++ b/arch/arm/mach-dove/common.c | |||
| @@ -33,8 +33,6 @@ | |||
| 33 | #include <plat/addr-map.h> | 33 | #include <plat/addr-map.h> |
| 34 | #include "common.h" | 34 | #include "common.h" |
| 35 | 35 | ||
| 36 | static int get_tclk(void); | ||
| 37 | |||
| 38 | /***************************************************************************** | 36 | /***************************************************************************** |
| 39 | * I/O Address Mapping | 37 | * I/O Address Mapping |
| 40 | ****************************************************************************/ | 38 | ****************************************************************************/ |
| @@ -70,12 +68,13 @@ void __init dove_map_io(void) | |||
| 70 | /***************************************************************************** | 68 | /***************************************************************************** |
| 71 | * CLK tree | 69 | * CLK tree |
| 72 | ****************************************************************************/ | 70 | ****************************************************************************/ |
| 71 | static int dove_tclk; | ||
| 73 | static struct clk *tclk; | 72 | static struct clk *tclk; |
| 74 | 73 | ||
| 75 | static void __init clk_init(void) | 74 | static void __init dove_clk_init(void) |
| 76 | { | 75 | { |
| 77 | tclk = clk_register_fixed_rate(NULL, "tclk", NULL, CLK_IS_ROOT, | 76 | tclk = clk_register_fixed_rate(NULL, "tclk", NULL, CLK_IS_ROOT, |
| 78 | get_tclk()); | 77 | dove_tclk); |
| 79 | 78 | ||
| 80 | orion_clkdev_init(tclk); | 79 | orion_clkdev_init(tclk); |
| 81 | } | 80 | } |
| @@ -188,16 +187,16 @@ void __init dove_init_early(void) | |||
| 188 | orion_time_set_base(TIMER_VIRT_BASE); | 187 | orion_time_set_base(TIMER_VIRT_BASE); |
| 189 | } | 188 | } |
| 190 | 189 | ||
| 191 | static int get_tclk(void) | 190 | static int __init dove_find_tclk(void) |
| 192 | { | 191 | { |
| 193 | /* use DOVE_RESET_SAMPLE_HI/LO to detect tclk */ | ||
| 194 | return 166666667; | 192 | return 166666667; |
| 195 | } | 193 | } |
| 196 | 194 | ||
| 197 | static void __init dove_timer_init(void) | 195 | static void __init dove_timer_init(void) |
| 198 | { | 196 | { |
| 197 | dove_tclk = dove_find_tclk(); | ||
| 199 | orion_time_init(BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR, | 198 | orion_time_init(BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR, |
| 200 | IRQ_DOVE_BRIDGE, get_tclk()); | 199 | IRQ_DOVE_BRIDGE, dove_tclk); |
| 201 | } | 200 | } |
| 202 | 201 | ||
| 203 | struct sys_timer dove_timer = { | 202 | struct sys_timer dove_timer = { |
| @@ -285,8 +284,8 @@ void __init dove_sdio1_init(void) | |||
| 285 | 284 | ||
| 286 | void __init dove_init(void) | 285 | void __init dove_init(void) |
| 287 | { | 286 | { |
| 288 | printk(KERN_INFO "Dove 88AP510 SoC, "); | 287 | pr_info("Dove 88AP510 SoC, TCLK = %d MHz.\n", |
| 289 | printk(KERN_INFO "TCLK = %dMHz\n", (get_tclk() + 499999) / 1000000); | 288 | (dove_tclk + 499999) / 1000000); |
| 290 | 289 | ||
| 291 | #ifdef CONFIG_CACHE_TAUROS2 | 290 | #ifdef CONFIG_CACHE_TAUROS2 |
| 292 | tauros2_init(); | 291 | tauros2_init(); |
| @@ -294,7 +293,7 @@ void __init dove_init(void) | |||
| 294 | dove_setup_cpu_mbus(); | 293 | dove_setup_cpu_mbus(); |
| 295 | 294 | ||
| 296 | /* Setup root of clk tree */ | 295 | /* Setup root of clk tree */ |
| 297 | clk_init(); | 296 | dove_clk_init(); |
| 298 | 297 | ||
| 299 | /* internal devices that every board has */ | 298 | /* internal devices that every board has */ |
| 300 | dove_rtc_init(); | 299 | dove_rtc_init(); |
