Commit 901f79e4de19af20abf9b2f2353f1750ccba5b69

Authored by Marcel Ziswiler
Committed by Tom Rini
1 parent 41ffb45c35

arm: pxa: introducing cpuinfo display for marvell pxa270m

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>

Showing 1 changed file with 15 additions and 2 deletions Side-by-side Diff

arch/arm/cpu/pxa/cpuinfo.c
... ... @@ -46,6 +46,13 @@
46 46 return id == CPU_VALUE_PXA27X;
47 47 }
48 48  
  49 +int cpu_is_pxa27xm(void)
  50 +{
  51 + uint32_t id = pxa_get_cpuid();
  52 + return ((id & CPU_MASK_PXA_PRODID) == CPU_VALUE_PXA27X) &&
  53 + ((id & CPU_MASK_PXA_REVID) == 8);
  54 +}
  55 +
49 56 uint32_t pxa_get_cpu_revision(void)
50 57 {
51 58 return pxa_get_cpuid() & CPU_MASK_PRODREV;
52 59  
... ... @@ -91,13 +98,17 @@
91 98  
92 99 id = pxa_get_cpuid() & CPU_MASK_PXA_REVID;
93 100  
94   - if ((id == 5) || (id == 6) || (id > 7))
  101 + if ((id == 5) || (id == 6) || (id > 8))
95 102 return unknown;
96 103  
97 104 /* Cap the special PXA270 C5 case. */
98 105 if (id == 7)
99 106 id = 5;
100 107  
  108 + /* Cap the special PXA270M A1 case. */
  109 + if (id == 8)
  110 + id = 1;
  111 +
101 112 return rev[id];
102 113 }
103 114  
... ... @@ -107,7 +118,9 @@
107 118 puts("Marvell PXA25x rev. ");
108 119 puts(pxa25x_get_revision());
109 120 } else if (cpu_is_pxa27x()) {
110   - puts("Marvell PXA27x rev. ");
  121 + puts("Marvell PXA27x");
  122 + if (cpu_is_pxa27xm()) puts("M");
  123 + puts(" rev. ");
111 124 puts(pxa27x_get_revision());
112 125 } else
113 126 return -EINVAL;