diff options
author | Michael Hennerich <michael.hennerich@analog.com> | 2008-11-18 05:04:31 -0500 |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2008-11-18 05:04:31 -0500 |
commit | a5f0717e51c5fe6cdaf885b7f621ba48ae745bfb (patch) | |
tree | 3850849597aa4384cd3c95cab9c692e11dcd5c85 /arch/blackfin | |
parent | 8eb3e3bfd5544c4549a52e3cfc3df2be0b224dbd (diff) |
Blackfin arch: Fix bug - change cpufreq doesn't take effect on bf537 now
CCLK is variable: get current CCLK in show_cpuinfo
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin')
-rw-r--r-- | arch/blackfin/kernel/setup.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index c644d234a02e..0a5436737e97 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c | |||
@@ -1032,7 +1032,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1032 | char *cpu, *mmu, *fpu, *vendor, *cache; | 1032 | char *cpu, *mmu, *fpu, *vendor, *cache; |
1033 | uint32_t revid; | 1033 | uint32_t revid; |
1034 | 1034 | ||
1035 | u_long sclk = 0; | 1035 | u_long sclk, cclk; |
1036 | u_int icache_size = BFIN_ICACHESIZE / 1024, dcache_size = 0, dsup_banks = 0; | 1036 | u_int icache_size = BFIN_ICACHESIZE / 1024, dcache_size = 0, dsup_banks = 0; |
1037 | struct blackfin_cpudata *cpudata = &per_cpu(cpu_data, *(unsigned int *)v); | 1037 | struct blackfin_cpudata *cpudata = &per_cpu(cpu_data, *(unsigned int *)v); |
1038 | 1038 | ||
@@ -1042,6 +1042,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1042 | revid = bfin_revid(); | 1042 | revid = bfin_revid(); |
1043 | 1043 | ||
1044 | sclk = get_sclk(); | 1044 | sclk = get_sclk(); |
1045 | cclk = get_cclk(); | ||
1045 | 1046 | ||
1046 | switch (bfin_read_CHIPID() & CHIPID_MANUFACTURE) { | 1047 | switch (bfin_read_CHIPID() & CHIPID_MANUFACTURE) { |
1047 | case 0xca: | 1048 | case 0xca: |
@@ -1063,7 +1064,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1063 | 1064 | ||
1064 | seq_printf(m, "model name\t: ADSP-%s %lu(MHz CCLK) %lu(MHz SCLK) (%s)\n" | 1065 | seq_printf(m, "model name\t: ADSP-%s %lu(MHz CCLK) %lu(MHz SCLK) (%s)\n" |
1065 | "stepping\t: %d\n", | 1066 | "stepping\t: %d\n", |
1066 | cpu, cpudata->cclk/1000000, sclk/1000000, | 1067 | cpu, cclk/1000000, sclk/1000000, |
1067 | #ifdef CONFIG_MPU | 1068 | #ifdef CONFIG_MPU |
1068 | "mpu on", | 1069 | "mpu on", |
1069 | #else | 1070 | #else |
@@ -1072,7 +1073,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1072 | revid); | 1073 | revid); |
1073 | 1074 | ||
1074 | seq_printf(m, "cpu MHz\t\t: %lu.%03lu/%lu.%03lu\n", | 1075 | seq_printf(m, "cpu MHz\t\t: %lu.%03lu/%lu.%03lu\n", |
1075 | cpudata->cclk/1000000, cpudata->cclk%1000000, | 1076 | cclk/1000000, cclk%1000000, |
1076 | sclk/1000000, sclk%1000000); | 1077 | sclk/1000000, sclk%1000000); |
1077 | seq_printf(m, "bogomips\t: %lu.%02lu\n" | 1078 | seq_printf(m, "bogomips\t: %lu.%02lu\n" |
1078 | "Calibration\t: %lu loops\n", | 1079 | "Calibration\t: %lu loops\n", |