aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68knommu/kernel/setup.c
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@uclinux.org>2010-11-02 03:40:37 -0400
committerGreg Ungerer <gerg@uclinux.org>2011-01-05 00:19:17 -0500
commit733f31b764061d976a60c5ee454632d9562900ea (patch)
tree7e7d5bceb6d6815c54a4c0ab37dddbd53dbe41a5 /arch/m68knommu/kernel/setup.c
parent7fc82b655a169039d8a58fde609b5e778573d5ab (diff)
m68knommu: fix clock rate value reported for ColdFire 54xx parts
The instruction timings of the ColdFire 54xx family parts are different to other version 4 parts (or version 2 or 3 parts for that matter too). Move the instruction timing setting into the ColdFire part specific headers, and set the 54xx value appropriately. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Diffstat (limited to 'arch/m68knommu/kernel/setup.c')
-rw-r--r--arch/m68knommu/kernel/setup.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/arch/m68knommu/kernel/setup.c b/arch/m68knommu/kernel/setup.c
index f48d9df484d3..5c931f9d392c 100644
--- a/arch/m68knommu/kernel/setup.c
+++ b/arch/m68knommu/kernel/setup.c
@@ -66,13 +66,20 @@ void (*mach_power_off)(void);
66#ifdef CONFIG_M68360 66#ifdef CONFIG_M68360
67#define CPU_NAME "MC68360" 67#define CPU_NAME "MC68360"
68#endif 68#endif
69/*
70 * The ColdFire CPU names are defined in their headers.
71 */
72#ifndef CPU_NAME 69#ifndef CPU_NAME
73#define CPU_NAME "UNKNOWN" 70#define CPU_NAME "UNKNOWN"
74#endif 71#endif
75 72
73/*
74 * Different cores have different instruction execution timings.
75 * The old/traditional 68000 cores are basically all the same, at 16.
76 * The ColdFire cores vary a little, their values are defined in their
77 * headers. We default to the standard 68000 value here.
78 */
79#ifndef CPU_INSTR_PER_JIFFY
80#define CPU_INSTR_PER_JIFFY 16
81#endif
82
76extern int _stext, _etext, _sdata, _edata, _sbss, _ebss, _end; 83extern int _stext, _etext, _sdata, _edata, _sbss, _ebss, _end;
77extern int _ramstart, _ramend; 84extern int _ramstart, _ramend;
78 85
@@ -273,12 +280,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
273 cpu = CPU_NAME; 280 cpu = CPU_NAME;
274 mmu = "none"; 281 mmu = "none";
275 fpu = "none"; 282 fpu = "none";
276 283 clockfreq = (loops_per_jiffy * HZ) * CPU_INSTR_PER_JIFFY;
277#ifdef CONFIG_COLDFIRE
278 clockfreq = (loops_per_jiffy * HZ) * 3;
279#else
280 clockfreq = (loops_per_jiffy * HZ) * 16;
281#endif
282 284
283 seq_printf(m, "CPU:\t\t%s\n" 285 seq_printf(m, "CPU:\t\t%s\n"
284 "MMU:\t\t%s\n" 286 "MMU:\t\t%s\n"