[PATCH 2/2] ARM: mxs: Pass the system revision
Fabio Estevam
fabio.estevam at freescale.com
Wed May 29 15:44:23 EDT 2013
Some mxs userspace tools, such as multimedia plugins and kobs-ng (tool used to
burn boot images to NAND) rely on the 'Revision' field reported by
'/proc/cpuinfo'.
Provide a mechanism to pass such information, so that now we can get:
$ cat /proc/cpuinfo
processor : 0
model name : ARM926EJ-S rev 5 (v5l)
BogoMIPS : 226.09
Features : swp half fastmult edsp java
CPU implementer : 0x41
CPU architecture: 5TEJ
CPU variant : 0x0
CPU part : 0x926
CPU revision : 5
Hardware : Freescale i.MX28 Evaluation Kit
Revision : 28012
Serial : 0000000000000000
Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
---
arch/arm/mach-mxs/mach-mxs.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c
index b632323..032812d 100644
--- a/arch/arm/mach-mxs/mach-mxs.c
+++ b/arch/arm/mach-mxs/mach-mxs.c
@@ -29,6 +29,7 @@
#include <asm/mach/map.h>
#include <asm/mach/time.h>
#include <asm/system_misc.h>
+#include <asm/system_info.h>
#include "pm.h"
@@ -443,10 +444,24 @@ static void mxs_print_silicon_rev(const char *cpu, int srev)
cpu, (srev >> 4) & 0xf, srev & 0xf);
}
+static void mxs_pass_sysrev(void)
+{
+ int cputype = 0;
+
+ if (strcmp(mxs_get_cpu_type(), "MX23"))
+ cputype = 0x23000;
+
+ if (strcmp(mxs_get_cpu_type(), "MX28"))
+ cputype = 0x28000;
+
+ system_rev = (cputype | mxs_get_cpu_rev());
+}
+
static void __init mxs_machine_init(void)
{
mxs_print_silicon_rev(mxs_get_cpu_type(), mxs_get_cpu_rev());
+ mxs_pass_sysrev();
if (of_machine_is_compatible("fsl,imx28-evk"))
imx28_evk_init();
--
1.8.1.2
More information about the linux-arm-kernel
mailing list