提交 733f31b7 编写于 作者: G Greg Ungerer

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: NGreg Ungerer <gerg@uclinux.org>
上级 7fc82b65
......@@ -13,6 +13,7 @@
/****************************************************************************/
#define CPU_NAME "COLDFIRE(m5206)"
#define CPU_INSTR_PER_JIFFY 3
/*
* Define the 5206 SIM register set addresses.
......
......@@ -12,6 +12,7 @@
/****************************************************************************/
#define CPU_NAME "COLDFIRE(m520x)"
#define CPU_INSTR_PER_JIFFY 3
/*
* Define the 520x SIM register set addresses.
......
......@@ -12,6 +12,7 @@
/****************************************************************************/
#define CPU_NAME "COLDFIRE(m523x)"
#define CPU_INSTR_PER_JIFFY 3
/*
* Define the 523x SIM register set addresses.
......
......@@ -12,6 +12,7 @@
/****************************************************************************/
#define CPU_NAME "COLDFIRE(m5249)"
#define CPU_INSTR_PER_JIFFY 3
/*
* Define the 5249 SIM register set addresses.
......
......@@ -13,6 +13,7 @@
/****************************************************************************/
#define CPU_NAME "COLDFIRE(m5272)"
#define CPU_INSTR_PER_JIFFY 3
/*
* Define the 5272 SIM register set addresses.
......
......@@ -12,6 +12,7 @@
/****************************************************************************/
#define CPU_NAME "COLDFIRE(m527x)"
#define CPU_INSTR_PER_JIFFY 3
/*
......
......@@ -12,6 +12,7 @@
/****************************************************************************/
#define CPU_NAME "COLDFIRE(m528x)"
#define CPU_INSTR_PER_JIFFY 3
/*
* Define the 5280/5282 SIM register set addresses.
......
......@@ -15,6 +15,7 @@
/****************************************************************************/
#define CPU_NAME "COLDFIRE(m5307)"
#define CPU_INSTR_PER_JIFFY 3
/*
* Define the 5307 SIM register set addresses.
......
......@@ -10,6 +10,7 @@
/****************************************************************************/
#define CPU_NAME "COLDFIRE(m532x)"
#define CPU_INSTR_PER_JIFFY 3
#define MCF_REG32(x) (*(volatile unsigned long *)(x))
#define MCF_REG16(x) (*(volatile unsigned short *)(x))
......
......@@ -15,6 +15,7 @@
/****************************************************************************/
#define CPU_NAME "COLDFIRE(m5407)"
#define CPU_INSTR_PER_JIFFY 3
/*
* Define the 5407 SIM register set addresses.
......
......@@ -6,6 +6,7 @@
#define m54xxsim_h
#define CPU_NAME "COLDFIRE(m54xx)"
#define CPU_INSTR_PER_JIFFY 2
#define MCFINT_VECBASE 64
......
......@@ -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"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册