ARM: correctly identify ARMv6 K/Z
The ARMv6 K/Z derivatives have a v7 compatible MMU, but all other parts (including the cache handling) is still at v6. As we don't make use of the more advanced features of the v7 MMU in Barebox, it's okay to just override this to properly identify the CPU as ARMv6. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
0d0b426a67
commit
d92ce9b36a
|
@ -165,6 +165,14 @@ static int do_cpuinfo(int argc, char *argv[])
|
|||
} else
|
||||
cpu_arch = CPU_ARCH_UNKNOWN;
|
||||
|
||||
/*
|
||||
* Special case for ARMv6 (K/Z) (has v7 compatible MMU, but is v6
|
||||
* otherwise). The below check just matches all ARMv6, as done in the
|
||||
* Linux kernel.
|
||||
*/
|
||||
if ((mainid & 0x7f000) == 0x7b000)
|
||||
cpu_arch = CPU_ARCH_ARMv6;
|
||||
|
||||
switch (cpu_arch) {
|
||||
case CPU_ARCH_ARMv3:
|
||||
architecture = "v3";
|
||||
|
|
|
@ -188,6 +188,14 @@ static inline int arm_early_get_cpu_architecture(void)
|
|||
cpu_arch = CPU_ARCH_UNKNOWN;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Special case for ARMv6 (K/Z) (has v7 compatible MMU, but is v6
|
||||
* otherwise). The below check just matches all ARMv6, as done in the
|
||||
* Linux kernel.
|
||||
*/
|
||||
if ((read_cpuid_id() & 0x7f000) == 0x7b000)
|
||||
cpu_arch = CPU_ARCH_ARMv6;
|
||||
|
||||
return cpu_arch;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue