Re: Revision number in /proc/cpuinfo query

Eric Lammerts <[email protected]>
Newsgroups gmane.linux.ports.arm.general
Message-ID <[email protected]>
On Thu, 2 Jul 2009, javier Martin wrote:
> Hardware        : Vista Silicon Visstrim_M10
> Revision        : 0000
> Serial          : 0000000000000000
>
> As i found in the code, Revision is the value of the global variable
> "system_rev", but I have noticed that only the pxa boards, magician
> and viper use this code.
>
> Is it legal to add my own desired Revision code in my board file or
> should I respect some standard numbers for ARM?

Hi,
the Freescale convention is:
i.MX27 CHIP_REV_1_0  -> system_rev = 0x27010
i.MX27 CHIP_REV_2_0  -> system_rev = 0x27020
i.MX27 CHIP_REV_2_1  -> system_rev = 0x27021

I'm using this code to set system_rev:

--- linux-2.6.27.22.orig/arch/arm/mach-mx2/cpu_imx27.c	2009-05-02 13:35:23.000000000 -0400
+++ linux-2.6.27.22/arch/arm/mach-mx2/cpu_imx27.c	2009-07-03 03:06:20.000000000 -0400
@@ -43,6 +43,20 @@

 	cpu_silicon_rev = (int)(val >> 28);
 	cpu_partnumber = (int)((val >> 12) & 0xFFFF);
+
+	if(cpu_partnumber == 0x8821 && system_rev == 0) {
+		switch (cpu_silicon_rev) {
+		case 0:
+			system_rev = 0x27010;
+			break;
+		case 1:
+			system_rev = 0x27020;
+			break;
+		case 2:
+			system_rev = 0x27021;
+			break;
+		}
+	}
 }

 /*

The Freescale VPU library reads "Revision" from /proc/cpuinfo to
determine which firmware blob it should load into the VPU, that's
why I needed this.

BTW, I found these defines in
imx27_ads_20071219-rel3-ltib.iso
-> /bootloaders/redboot_200749.tar.gz
-> redboot_200749/src/patch-redboot-200749-mx27.bz2
-> ecos_mx27/packages/hal/arm/mx27/var/current/src/soc_misc.c

Eric

-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.