public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] arm: pxa: introducing cpuinfo display for marvell pxa270m
@ 2015-03-04 13:57 Marcel Ziswiler
  2015-03-05 13:53 ` Marek Vasut
  2015-03-05 14:43 ` Tom Rini
  0 siblings, 2 replies; 4+ messages in thread
From: Marcel Ziswiler @ 2015-03-04 13:57 UTC (permalink / raw)
  To: u-boot

According to table 2-3 on page 87 of Marvell's latest PXA270
Specification Update Rev. I from 2010.04.19 [1] there exists a breed of
chips with a new CPU ID for PXA270M A1 stepping which our latest
Colibri PXA270 V2.4A modules actually have assembled. This patch helps
in correctly identifying those chips upon boot as well which then looks
as follows:

CPU: Marvell PXA27xM rev. A1

[1] http://www.marvell.com/application-processors/pxa-family/assets/pxa_27x_spec_update.pdf
---
 arch/arm/cpu/pxa/cpuinfo.c | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/arch/arm/cpu/pxa/cpuinfo.c b/arch/arm/cpu/pxa/cpuinfo.c
index 17d8be5..25de9e5 100644
--- a/arch/arm/cpu/pxa/cpuinfo.c
+++ b/arch/arm/cpu/pxa/cpuinfo.c
@@ -46,6 +46,13 @@ int cpu_is_pxa27x(void)
 	return id == CPU_VALUE_PXA27X;
 }
 
+int cpu_is_pxa27xm(void)
+{
+	uint32_t id = pxa_get_cpuid();
+	return ((id & CPU_MASK_PXA_PRODID) == CPU_VALUE_PXA27X) &&
+			((id & CPU_MASK_PXA_REVID) == 8);
+}
+
 uint32_t pxa_get_cpu_revision(void)
 {
 	return pxa_get_cpuid() & CPU_MASK_PRODREV;
@@ -91,13 +98,17 @@ static const char *pxa27x_get_revision(void)
 
 	id = pxa_get_cpuid() & CPU_MASK_PXA_REVID;
 
-	if ((id == 5) || (id == 6) || (id > 7))
+	if ((id == 5) || (id == 6) || (id > 8))
 		return unknown;
 
 	/* Cap the special PXA270 C5 case. */
 	if (id == 7)
 		id = 5;
 
+	/* Cap the special PXA270M A1 case. */
+	if (id == 8)
+		id = 1;
+
 	return rev[id];
 }
 
@@ -107,7 +118,9 @@ static int print_cpuinfo_pxa2xx(void)
 		puts("Marvell PXA25x rev. ");
 		puts(pxa25x_get_revision());
 	} else if (cpu_is_pxa27x()) {
-		puts("Marvell PXA27x rev. ");
+		puts("Marvell PXA27x");
+		if (cpu_is_pxa27xm()) puts("M");
+		puts(" rev. ");
 		puts(pxa27x_get_revision());
 	} else
 		return -EINVAL;
-- 
1.9.3

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

* [U-Boot] [PATCH] arm: pxa: introducing cpuinfo display for marvell pxa270m
  2015-03-04 13:57 [U-Boot] [PATCH] arm: pxa: introducing cpuinfo display for marvell pxa270m Marcel Ziswiler
@ 2015-03-05 13:53 ` Marek Vasut
  2015-03-05 14:43 ` Tom Rini
  1 sibling, 0 replies; 4+ messages in thread
From: Marek Vasut @ 2015-03-05 13:53 UTC (permalink / raw)
  To: u-boot

On Wednesday, March 04, 2015 at 02:57:31 PM, Marcel Ziswiler wrote:
> According to table 2-3 on page 87 of Marvell's latest PXA270
> Specification Update Rev. I from 2010.04.19 [1] there exists a breed of
> chips with a new CPU ID for PXA270M A1 stepping which our latest
> Colibri PXA270 V2.4A modules actually have assembled. This patch helps
> in correctly identifying those chips upon boot as well which then looks
> as follows:
> 
> CPU: Marvell PXA27xM rev. A1

Acked-by: Marek Vasut <marex@denx.de>

Tom, can you please pick this directly for current ? Or do you want me to
cook you a PXA PR with one patch?

Best regards,
Marek Vasut

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

* [U-Boot] [PATCH] arm: pxa: introducing cpuinfo display for marvell pxa270m
  2015-03-04 13:57 [U-Boot] [PATCH] arm: pxa: introducing cpuinfo display for marvell pxa270m Marcel Ziswiler
  2015-03-05 13:53 ` Marek Vasut
@ 2015-03-05 14:43 ` Tom Rini
  2015-03-05 14:48   ` Marek Vasut
  1 sibling, 1 reply; 4+ messages in thread
From: Tom Rini @ 2015-03-05 14:43 UTC (permalink / raw)
  To: u-boot

On Wed, Mar 04, 2015 at 02:57:31PM +0100, Marcel Ziswiler wrote:

> According to table 2-3 on page 87 of Marvell's latest PXA270
> Specification Update Rev. I from 2010.04.19 [1] there exists a breed of
> chips with a new CPU ID for PXA270M A1 stepping which our latest
> Colibri PXA270 V2.4A modules actually have assembled. This patch helps
> in correctly identifying those chips upon boot as well which then looks
> as follows:
> 
> CPU: Marvell PXA27xM rev. A1
> 
> [1] http://www.marvell.com/application-processors/pxa-family/assets/pxa_27x_spec_update.pdf
>
> Acked-by: Marek Vasut <marex@denx.de>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150305/965f5ad4/attachment.sig>

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

* [U-Boot] [PATCH] arm: pxa: introducing cpuinfo display for marvell pxa270m
  2015-03-05 14:43 ` Tom Rini
@ 2015-03-05 14:48   ` Marek Vasut
  0 siblings, 0 replies; 4+ messages in thread
From: Marek Vasut @ 2015-03-05 14:48 UTC (permalink / raw)
  To: u-boot

On Thursday, March 05, 2015 at 03:43:29 PM, Tom Rini wrote:
> On Wed, Mar 04, 2015 at 02:57:31PM +0100, Marcel Ziswiler wrote:
> > According to table 2-3 on page 87 of Marvell's latest PXA270
> > Specification Update Rev. I from 2010.04.19 [1] there exists a breed of
> > chips with a new CPU ID for PXA270M A1 stepping which our latest
> > Colibri PXA270 V2.4A modules actually have assembled. This patch helps
> > in correctly identifying those chips upon boot as well which then looks
> > as follows:
> > 
> > CPU: Marvell PXA27xM rev. A1
> > 
> > [1]
> > http://www.marvell.com/application-processors/pxa-family/assets/pxa_27x_
> > spec_update.pdf
> > 
> > Acked-by: Marek Vasut <marex@denx.de>

Thanks :)

Best regards,
Marek Vasut

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

end of thread, other threads:[~2015-03-05 14:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-04 13:57 [U-Boot] [PATCH] arm: pxa: introducing cpuinfo display for marvell pxa270m Marcel Ziswiler
2015-03-05 13:53 ` Marek Vasut
2015-03-05 14:43 ` Tom Rini
2015-03-05 14:48   ` Marek Vasut

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