Skip to contentSkip to conversation

ARM: mx51: Print silicon revision on boot

PATCH New Fabio Estevam 3 participants 6 messages Mar 3, 2011

Subsystems (3)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/1 ARM: mx51: Print silicon revision on boot

---
 arch/arm/mach-mx5/clock-mx51-mx53.c   |    1 +
 arch/arm/mach-mx5/cpu.c               |   21 +++++++++++++++++++++
 arch/arm/plat-mxc/include/mach/mx51.h |    1 +
 3 files changed, 23 insertions(+), 0 deletions(-)
arch/arm/mach-mx5/clock-mx51-mx53.c +1 -0
index 652ace4..1282a60 100644
@@ -1510,6 +1510,7 @@ int __init mx51_clocks_init(unsigned long ckil, unsigned long osc,
 
 	clk_enable(&iim_clk);
 	mx51_revision();
+	mx51_display_revision();
 	clk_disable(&iim_clk);
 
 	/* move usb_phy_clk to 24MHz */
arch/arm/mach-mx5/cpu.c +21 -0
index df46b5e..565ed4d 100644
@@ -51,6 +51,27 @@ int mx51_revision(void)
 }
 EXPORT_SYMBOL(mx51_revision);
 
+void mx51_display_revision(void)
+{
+	int rev;
+	char *srev;
+	rev = mx51_revision();
+
+	switch (rev) {
+	case IMX_CHIP_REVISION_2_0:
+		srev = "2.0";
+		break;
+	case IMX_CHIP_REVISION_3_0:
+		srev = "3.0";
+		break;
+	default:
+		return IMX_CHIP_REVISION_UNKNOWN;
+		srev = "unknown";
+	}
+	printk(KERN_INFO "CPU identified as i.MX51, silicon rev %s\n", srev);
+}
+EXPORT_SYMBOL(mx51_display_revision);
+
 #ifdef CONFIG_NEON
 
 /*
arch/arm/plat-mxc/include/mach/mx51.h +1 -0
index 1eb339e..dede19a 100644
@@ -347,6 +347,7 @@
 
 #if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS)
 extern int mx51_revision(void);
+extern void mx51_display_revision(void);
 #endif
 
 /* tape-out 1 defines */
Signature · 1 line
1.6.0.4
#1 lore raw

PATCH 1/1 ARM: mx51: Print silicon revision on boot

Fabio Estevam <[email protected]> writes:
Hi,

Quoted 1 line

Why I like having boot log, I don't like have too verbose boot logs. If you add this, you have a good reason (I hope), but I can't know it. There's no patch description. So, please give a patch with proper explanation of why you need that. Anyway, having a proper patch description is imho always a good idea.

Moreover, there's already good hint if you want to know if you're on to2 or to3. On rev < 3.0, you have this in logs:
VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 2 Turning off NEON support, detected broken NEON implementation

Arnaud

author reviewer
#2 lore raw

PATCH 1/1 ARM: mx51: Print silicon revision on boot

Hi Arnaud,

Quoted 10 lines · Arnaud Patard

Fabio Estevam <[email protected]> writes:
Hi,

Quoted 1 line

Why I like having boot log, I don't like have too verbose boot logs. If you add this, you have a good reason (I hope), but I can't know it. There's no patch description. So, please give a patch with proper explanation of why you need that. Anyway, having a proper patch description is imho always a good idea.

I think that printing the silicon version on boot is useful information. Many issues are fixed in the latest silicon revision, so while debugging mx51 issues it is good to know from the boot log if someone is using the latest silicon version or not.

We currently do that on mx31/mx35 kernel, and I think it would be nice to have this information for mx5 as well.

It is just a single line, so don?t believe it will add any significant overhead.

Quoted 4 lines

Moreover, there's already good hint if you want to know if you're on to2 or to3. On rev < 3.0, you have this in logs:
VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 2 Turning off NEON support, detected broken NEON implementation

Ok, but still I prefer one single line stating the CPU version explicitly.

Regards,

Fabio Estevam

maintainer
#3 lore raw

PATCH 1/1 ARM: mx51: Print silicon revision on boot

Quoted 14 lines · Fabio Estevam

Hi Arnaud,

Quoted 10 lines · Arnaud Patard

Fabio Estevam <[email protected]> writes:
Hi,

Quoted 1 line

Why I like having boot log, I don't like have too verbose boot logs. If you add this, you have a good reason (I hope), but I can't know it. There's no patch description. So, please give a patch with proper explanation of why you need that. Anyway, having a proper patch description is imho always a good idea.

Quoted 4 lines

I think that printing the silicon version on boot is useful information. Many issues are fixed in the latest silicon revision, so while debugging mx51 issues it is good to know from the boot log if someone is using the latest silicon version or not.

+1

There is less useful information in the bootlog than this. Also, there's the quiet option to not wait on the slow serial console.

Sascha

Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
#4 lore raw

PATCH 1/1 ARM: mx51: Print silicon revision on boot

Sascha Hauer <[email protected]> writes:

Hi,

Quoted 20 lines · Fabio Estevam
Quoted 14 lines

Hi Arnaud,

Quoted 10 lines · Arnaud Patard

Fabio Estevam <[email protected]> writes:
Hi,

Quoted 1 line

Why I like having boot log, I don't like have too verbose boot logs. If you add this, you have a good reason (I hope), but I can't know it. There's no patch description. So, please give a patch with proper explanation of why you need that. Anyway, having a proper patch description is imho always a good idea.

Quoted 4 lines

I think that printing the silicon version on boot is useful information. Many issues are fixed in the latest silicon revision, so while debugging mx51 issues it is good to know from the boot log if someone is using the latest silicon version or not.

Quoted 4 lines

+1

There is less useful information in the bootlog than this. Also, there's the quiet option to not wait on the slow serial console.

You missed something in my mail. My point was not really about log verbosity. There was *no* description at all. We both know that silicon rev 2.0 has some nasty bugs like broken neon which has been fixed in rev 3.0 so it may be a good idea to print that but without proper description, the aim may well have been "I want to print this because I find it nice". I know it may be hard to write proper description but here, it's not. I even got a good description as answer to my mail. I should not had to ask for it.

Arnaud

maintainer
#5 lore raw

PATCH 1/1 ARM: mx51: Print silicon revision on boot

Quoted 29 lines · Arnaud Patard

Sascha Hauer <[email protected]> writes:

Hi,

Quoted 20 lines · Fabio Estevam
Quoted 14 lines

Hi Arnaud,

Quoted 10 lines · Arnaud Patard

Fabio Estevam <[email protected]> writes:
Hi,

Quoted 1 line

Why I like having boot log, I don't like have too verbose boot logs. If you add this, you have a good reason (I hope), but I can't know it. There's no patch description. So, please give a patch with proper explanation of why you need that. Anyway, having a proper patch description is imho always a good idea.

Quoted 4 lines

I think that printing the silicon version on boot is useful information. Many issues are fixed in the latest silicon revision, so while debugging mx51 issues it is good to know from the boot log if someone is using the latest silicon version or not.

Quoted 4 lines

+1

There is less useful information in the bootlog than this. Also, there's the quiet option to not wait on the slow serial console.

Quoted 8 lines

You missed something in my mail. My point was not really about log verbosity. There was *no* description at all. We both know that silicon rev 2.0 has some nasty bugs like broken neon which has been fixed in rev 3.0 so it may be a good idea to print that but without proper description, the aim may well have been "I want to print this because I find it nice". I know it may be hard to write proper description but here, it's not. I even got a good description as answer to my mail. I should not had to ask for it.

I'd like a better patch description aswell, I just wanted to stress that I too like the idea of having the tapeout version printed during boot.

Sascha

Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |