summaryrefslogtreecommitdiff
path: root/arch/blackfin/kernel
diff options
context:
space:
mode:
authorBob Liu <lliubbo@gmail.com>2012-05-17 17:15:40 +0800
committerBob Liu <lliubbo@gmail.com>2012-05-21 14:54:49 +0800
commit7c141c1c5c148419eef8972688e86e2e3115ea13 (patch)
tree82b946e1611bcd9c090ea83bb591deb32a31a1c9 /arch/blackfin/kernel
parent1c40093976192c837c80f0c723394f176ca132ff (diff)
blackfin: bf60x: make clock changeable in kernel menuconfig
Add clock changeable support in kernel menuconfig for bf60x. Signed-off-by: Bob Liu <lliubbo@gmail.com>
Diffstat (limited to 'arch/blackfin/kernel')
-rw-r--r--arch/blackfin/kernel/setup.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c
index ed041541ea19..55fb42b50463 100644
--- a/arch/blackfin/kernel/setup.c
+++ b/arch/blackfin/kernel/setup.c
@@ -892,9 +892,6 @@ void __init setup_arch(char **cmdline_p)
{
u32 mmr;
unsigned long sclk, cclk;
-#ifdef CONFIG_BF60x
- struct clk *clk;
-#endif
native_machine_early_platform_add_devices();
@@ -959,24 +956,8 @@ void __init setup_arch(char **cmdline_p)
~HYST_NONEGPIO_MASK) | HYST_NONEGPIO);
#endif
-#ifdef CONFIG_BF60x
- clk = clk_get(NULL, "CCLK");
- if (!IS_ERR(clk)) {
- cclk = clk_get_rate(clk);
- clk_put(clk);
- } else
- cclk = 0;
-
- clk = clk_get(NULL, "SCLK0");
- if (!IS_ERR(clk)) {
- sclk = clk_get_rate(clk);
- clk_put(clk);
- } else
- sclk = 0;
-#else
cclk = get_cclk();
sclk = get_sclk();
-#endif
if ((ANOMALY_05000273 || ANOMALY_05000274) && (cclk >> 1) < sclk)
panic("ANOMALY 05000273 or 05000274: CCLK must be >= 2*SCLK");
@@ -1062,8 +1043,13 @@ void __init setup_arch(char **cmdline_p)
printk(KERN_INFO "Blackfin Linux support by http://blackfin.uclinux.org/\n");
+#ifdef CONFIG_BF60x
+ printk(KERN_INFO "Processor Speed: %lu MHz core clock, %lu MHz SCLk, %lu MHz SCLK0, %lu MHz SCLK1 and %lu MHz DCLK\n",
+ cclk / 1000000, sclk / 1000000, get_sclk0() / 1000000, get_sclk1() / 1000000, get_dclk() / 1000000);
+#else
printk(KERN_INFO "Processor Speed: %lu MHz core clock and %lu MHz System Clock\n",
cclk / 1000000, sclk / 1000000);
+#endif
setup_bootmem_allocator();