[PATCH 06/11] m68knommu: probe CPU revision for ColdFire 5272

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The ColdFire 5272 is the only member of its SoC family, so no chip
identification read is necessary. But it does have a revision number
register, so read and report that.

Signed-off-by: Greg Ungerer <gerg@xxxxxxxxxxxxxx>
---
 arch/m68k/coldfire/m5272.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/m68k/coldfire/m5272.c b/arch/m68k/coldfire/m5272.c
index 734dab657fe3..60b71ed828b6 100644
--- a/arch/m68k/coldfire/m5272.c
+++ b/arch/m68k/coldfire/m5272.c
@@ -22,6 +22,7 @@
 #include <asm/mcfsim.h>
 #include <asm/mcfuart.h>
 #include <asm/mcfclk.h>
+#include <asm/setup.h>
 
 /***************************************************************************/
 
@@ -80,6 +81,14 @@ static void m5272_cpu_reset(void)
 
 /***************************************************************************/
 
+static void __init m5272_probe_cpu(void)
+{
+	u32 v;
+
+	v = readl(MCFSIM_DIR);
+	m68k_cpurevision = v >> 28;
+}
+
 void __init config_BSP(char *commandp, int size)
 {
 #if defined (CONFIG_MOD5272)
@@ -99,6 +108,8 @@ void __init config_BSP(char *commandp, int size)
 
 	mach_reset = m5272_cpu_reset;
 	mach_sched_init = hw_timer_init;
+
+	m5272_probe_cpu();
 }
 
 /***************************************************************************/
-- 
2.25.1




[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux