summaryrefslogtreecommitdiffstats
path: root/arch/m68knommu
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@uclinux.org>2010-11-02 08:40:37 +0100
committerGreg Ungerer <gerg@uclinux.org>2011-01-05 06:19:17 +0100
commit733f31b764061d976a60c5ee454632d9562900ea (patch)
tree7e7d5bceb6d6815c54a4c0ab37dddbd53dbe41a5 /arch/m68knommu
parentm68knommu: move ColdFire CPU names into their headers (diff)
downloadlinux-733f31b764061d976a60c5ee454632d9562900ea.tar.xz
linux-733f31b764061d976a60c5ee454632d9562900ea.zip
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')
-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);
#ifdef CONFIG_M68360
#define CPU_NAME "MC68360"
#endif
-/*
- * The ColdFire CPU names are defined in their headers.
- */
#ifndef CPU_NAME
#define CPU_NAME "UNKNOWN"
#endif
+/*
+ * Different cores have different instruction execution timings.
+ * The old/traditional 68000 cores are basically all the same, at 16.
+ * The ColdFire cores vary a little, their values are defined in their
+ * headers. We default to the standard 68000 value here.
+ */
+#ifndef CPU_INSTR_PER_JIFFY
+#define CPU_INSTR_PER_JIFFY 16
+#endif
+
extern int _stext, _etext, _sdata, _edata, _sbss, _ebss, _end;
extern int _ramstart, _ramend;
@@ -273,12 +280,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
cpu = CPU_NAME;
mmu = "none";
fpu = "none";
-
-#ifdef CONFIG_COLDFIRE
- clockfreq = (loops_per_jiffy * HZ) * 3;
-#else
- clockfreq = (loops_per_jiffy * HZ) * 16;
-#endif
+ clockfreq = (loops_per_jiffy * HZ) * CPU_INSTR_PER_JIFFY;
seq_printf(m, "CPU:\t\t%s\n"
"MMU:\t\t%s\n"