Skip to contentSkip to conversation

imx: mx27 implement get_cpu_rev

PATCH New Peng Fan 3 participants 3 messages Aug 12, 2015 – Aug 13, 2015

Subsystems (2)
lore
Share & tools
lore

Peng Fan

author
#0 lore raw

PATCH 1/1 imx: mx27 implement get_cpu_rev

Write a function named get_cpu_rev to make it support runtime checking using "is_cpu_type(MXC_CPU_xx)".

Also introduce a macro MXC_CPU_MX27 with value 0x27.

Cc Stefano Babic <[email protected]>

---

Note:
Based on https://patchwork.ozlabs.org/patch/505618/ to support runtime check patch.

 arch/arm/cpu/arm926ejs/mx27/generic.c | 6 ++++++
 arch/arm/include/asm/arch-imx/cpu.h   | 1 +
 2 files changed, 7 insertions(+)
arch/arm/cpu/arm926ejs/mx27/generic.c +6 -0
index 5ee9f07..b713c84 100644
@@ -12,6 +12,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/gpio.h>
+#include <asm/imx-common/sys_proto.h>
 #ifdef CONFIG_MXC_MMC
 #include <asm/arch/mxcmmc.h>
 #endif
@@ -159,6 +160,11 @@ unsigned int mxc_get_clock(enum mxc_clock clk)
 }
 
 
+u32 get_cpu_rev(void)
+{
+	return MXC_CPU_MX27 << 12;
+}
+
 #if defined(CONFIG_DISPLAY_CPUINFO)
 int print_cpuinfo (void)
 {
arch/arm/include/asm/arch-imx/cpu.h +1 -0
index 71208aa..be13b96 100644
@@ -6,6 +6,7 @@
 
 #define MXC_CPU_MX23		0x23
 #define MXC_CPU_MX25		0x25
+#define MXC_CPU_MX27		0x27
 #define MXC_CPU_MX28		0x28
 #define MXC_CPU_MX31		0x31
 #define MXC_CPU_MX35		0x35
Signature · 1 line
1.8.4
#1 lore raw

PATCH 1/1 imx: mx27 implement get_cpu_rev

Quoted 47 lines · Peng Fan

Write a function named get_cpu_rev to make it support runtime checking using "is_cpu_type(MXC_CPU_xx)".

Also introduce a macro MXC_CPU_MX27 with value 0x27.

Cc Stefano Babic <[email protected]>

---

Note:
Based on https://patchwork.ozlabs.org/patch/505618/ to support runtime check patch.

 arch/arm/cpu/arm926ejs/mx27/generic.c | 6 ++++++
 arch/arm/include/asm/arch-imx/cpu.h   | 1 +
 2 files changed, 7 insertions(+)
arch/arm/cpu/arm926ejs/mx27/generic.c +6 -0
index 5ee9f07..b713c84 100644
@@ -12,6 +12,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/gpio.h>
+#include <asm/imx-common/sys_proto.h>
 #ifdef CONFIG_MXC_MMC
 #include <asm/arch/mxcmmc.h>
 #endif
@@ -159,6 +160,11 @@ unsigned int mxc_get_clock(enum mxc_clock clk)
 }
 
 
+u32 get_cpu_rev(void)
+{
+	return MXC_CPU_MX27 << 12;
+}
+
 #if defined(CONFIG_DISPLAY_CPUINFO)
 int print_cpuinfo (void)
 {
arch/arm/include/asm/arch-imx/cpu.h +0 -0
index 71208aa..be13b96 100644

arch/arm/include/asm/arch-imx/cpu.h line 12

Quoted 7 lines
arch/arm/include/asm/arch-imx/cpu.h +1 -0
@@ -6,6 +6,7 @@
 
 #define MXC_CPU_MX23		0x23
 #define MXC_CPU_MX25		0x25
+#define MXC_CPU_MX27		0x27
 #define MXC_CPU_MX28		0x28
 #define MXC_CPU_MX31		0x31
 #define MXC_CPU_MX35		0x35

Peng, because a repost for your MX2/MX3 series is needed, can you add this one to that series ? Thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#2 lore raw

PATCH 1/1 imx: mx27 implement get_cpu_rev

Hi Stefano,

Quoted 58 lines · Stefano Babic
Quoted 47 lines · Peng Fan

Write a function named get_cpu_rev to make it support runtime checking using "is_cpu_type(MXC_CPU_xx)".

Also introduce a macro MXC_CPU_MX27 with value 0x27.

Cc Stefano Babic <[email protected]>

---

Note:
Based on https://patchwork.ozlabs.org/patch/505618/ to support runtime check patch.

 arch/arm/cpu/arm926ejs/mx27/generic.c | 6 ++++++
 arch/arm/include/asm/arch-imx/cpu.h   | 1 +
 2 files changed, 7 insertions(+)
arch/arm/cpu/arm926ejs/mx27/generic.c +6 -0
index 5ee9f07..b713c84 100644
@@ -12,6 +12,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/gpio.h>
+#include <asm/imx-common/sys_proto.h>
 #ifdef CONFIG_MXC_MMC
 #include <asm/arch/mxcmmc.h>
 #endif
@@ -159,6 +160,11 @@ unsigned int mxc_get_clock(enum mxc_clock clk)
 }
 
 
+u32 get_cpu_rev(void)
+{
+	return MXC_CPU_MX27 << 12;
+}
+
 #if defined(CONFIG_DISPLAY_CPUINFO)
 int print_cpuinfo (void)
 {
arch/arm/include/asm/arch-imx/cpu.h +0 -0
index 71208aa..be13b96 100644

arch/arm/include/asm/arch-imx/cpu.h line 12

Quoted 7 lines
arch/arm/include/asm/arch-imx/cpu.h +1 -0
@@ -6,6 +6,7 @@
 
 #define MXC_CPU_MX23		0x23
 #define MXC_CPU_MX25		0x25
+#define MXC_CPU_MX27		0x27
 #define MXC_CPU_MX28		0x28
 #define MXC_CPU_MX31		0x31
 #define MXC_CPU_MX35		0x35
Quoted 2 lines

Peng, because a repost for your MX2/MX3 series is needed, can you add this one to that series ? Thanks !

Ok. I'll repost this one to that series.

Regards,
Peng.

Quoted 10 lines

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================