[PATCH 1/2] ARM: only look for TCM on ARM926 and later
Russell King - ARM Linux
linux at arm.linux.org.uk
Sun Dec 11 05:23:46 EST 2011
On Wed, Dec 07, 2011 at 11:40:16PM +0100, Linus Walleij wrote:
> + u32 cpuid = read_cpuid_id();
...
> + /*
> + * Prior to ARM926 there is no TCM, and trying to read the status
> + * register will hang the processor.
> + */
> + if (((cpuid & 0x0008f000) == 0x00000000) &&
> + ((cpuid >> 4) < 0x926))
> + return;
This doesn't look correct. The CPU ID register for an ARM920T is
0x41X2920X, which will fail both the first and second tests. The first
fails because of the 0x????9???, and the second fails because of the
non-zero vendor, revision and architecture IDs.
Also, what if the CPU is not an ARM CPU? Part numbers are dependent
on the vendor field.
Maybe we want to change to a different approach - rule out all
architectures prior to ARMv5 (which will include ARM920T etc). I think
it is a safe assumption to make that anything older than ARMv5 will not
have TCM.
if (cpu_architecture() < CPU_ARCH_ARMv5)
return;
More information about the linux-arm-kernel
mailing list