public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] ARM: mx51: Print silicon revision on boot
@ 2011-03-03  1:12 Fabio Estevam
  2011-03-03  8:24 ` Arnaud Patard (Rtp)
  0 siblings, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2011-03-03  1:12 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 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(-)

diff --git a/arch/arm/mach-mx5/clock-mx51-mx53.c b/arch/arm/mach-mx5/clock-mx51-mx53.c
index 652ace4..1282a60 100644
--- a/arch/arm/mach-mx5/clock-mx51-mx53.c
+++ b/arch/arm/mach-mx5/clock-mx51-mx53.c
@@ -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 */
diff --git a/arch/arm/mach-mx5/cpu.c b/arch/arm/mach-mx5/cpu.c
index df46b5e..565ed4d 100644
--- a/arch/arm/mach-mx5/cpu.c
+++ b/arch/arm/mach-mx5/cpu.c
@@ -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
 
 /*
diff --git a/arch/arm/plat-mxc/include/mach/mx51.h b/arch/arm/plat-mxc/include/mach/mx51.h
index 1eb339e..dede19a 100644
--- a/arch/arm/plat-mxc/include/mach/mx51.h
+++ b/arch/arm/plat-mxc/include/mach/mx51.h
@@ -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 */
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] ARM: mx51: Print silicon revision on boot
  2011-03-03  1:12 [PATCH] ARM: mx51: Print silicon revision on boot Fabio Estevam
@ 2011-03-03  8:24 ` Arnaud Patard (Rtp)
  2011-03-03 15:43   ` Fabio Estevam
  0 siblings, 1 reply; 6+ messages in thread
From: Arnaud Patard (Rtp) @ 2011-03-03  8:24 UTC (permalink / raw)
  To: linux-arm-kernel

Fabio Estevam <festevam@gmail.com> writes:
Hi,

> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] ARM: mx51: Print silicon revision on boot
  2011-03-03  8:24 ` Arnaud Patard (Rtp)
@ 2011-03-03 15:43   ` Fabio Estevam
  2011-03-03 16:44     ` Sascha Hauer
  0 siblings, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2011-03-03 15:43 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Arnaud,

On Thu, Mar 3, 2011 at 5:24 AM, Arnaud Patard <arnaud.patard@rtp-net.org> wrote:
> Fabio Estevam <festevam@gmail.com> writes:
> Hi,
>
>> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
>
> 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.

> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] ARM: mx51: Print silicon revision on boot
  2011-03-03 15:43   ` Fabio Estevam
@ 2011-03-03 16:44     ` Sascha Hauer
  2011-03-03 18:12       ` Arnaud Patard (Rtp)
  0 siblings, 1 reply; 6+ messages in thread
From: Sascha Hauer @ 2011-03-03 16:44 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Mar 03, 2011 at 12:43:14PM -0300, Fabio Estevam wrote:
> Hi Arnaud,
> 
> On Thu, Mar 3, 2011 at 5:24 AM, Arnaud Patard <arnaud.patard@rtp-net.org> wrote:
> > Fabio Estevam <festevam@gmail.com> writes:
> > Hi,
> >
> >> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> >
> > 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.

+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


-- 
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 |

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] ARM: mx51: Print silicon revision on boot
  2011-03-03 16:44     ` Sascha Hauer
@ 2011-03-03 18:12       ` Arnaud Patard (Rtp)
  2011-03-03 18:22         ` Sascha Hauer
  0 siblings, 1 reply; 6+ messages in thread
From: Arnaud Patard (Rtp) @ 2011-03-03 18:12 UTC (permalink / raw)
  To: linux-arm-kernel

Sascha Hauer <s.hauer@pengutronix.de> writes:

Hi,

> On Thu, Mar 03, 2011 at 12:43:14PM -0300, Fabio Estevam wrote:
>> Hi Arnaud,
>> 
>> On Thu, Mar 3, 2011 at 5:24 AM, Arnaud Patard <arnaud.patard@rtp-net.org> wrote:
>> > Fabio Estevam <festevam@gmail.com> writes:
>> > Hi,
>> >
>> >> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
>> >
>> > 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.
>
> +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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] ARM: mx51: Print silicon revision on boot
  2011-03-03 18:12       ` Arnaud Patard (Rtp)
@ 2011-03-03 18:22         ` Sascha Hauer
  0 siblings, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2011-03-03 18:22 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Mar 03, 2011 at 07:12:25PM +0100, Arnaud Patard wrote:
> Sascha Hauer <s.hauer@pengutronix.de> writes:
> 
> Hi,
> 
> > On Thu, Mar 03, 2011 at 12:43:14PM -0300, Fabio Estevam wrote:
> >> Hi Arnaud,
> >> 
> >> On Thu, Mar 3, 2011 at 5:24 AM, Arnaud Patard <arnaud.patard@rtp-net.org> wrote:
> >> > Fabio Estevam <festevam@gmail.com> writes:
> >> > Hi,
> >> >
> >> >> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> >> >
> >> > 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.
> >
> > +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.

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

-- 
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 |

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-03-03 18:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-03  1:12 [PATCH] ARM: mx51: Print silicon revision on boot Fabio Estevam
2011-03-03  8:24 ` Arnaud Patard (Rtp)
2011-03-03 15:43   ` Fabio Estevam
2011-03-03 16:44     ` Sascha Hauer
2011-03-03 18:12       ` Arnaud Patard (Rtp)
2011-03-03 18:22         ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox