[PATCH v11 4/5] edac: Add APM X-Gene SoC EDAC driver
Arnd Bergmann
arnd at arndb.de
Mon Jun 1 07:42:58 PDT 2015
On Friday 22 May 2015 17:32:59 Loc Ho wrote:
> +static bool xgene_edac_pmd_l2c_version1(void)
> +{
> + /* Check all chips with PMD L2C version 1 HW */
> + #define REVIDR_MINOR_REV(revidr) ((revidr) & 0x00000007)
> +
> + switch (MIDR_VARIANT(read_cpuid_id())) {
> + case 0:
> + switch (MIDR_REVISION(read_cpuid_id())) {
> + case 0:
> +
> + switch (REVIDR_MINOR_REV(read_cpuid(REVIDR_EL1))) {
> + case 1:
> + case 2:
> + return true;
> + };
> + break;
> + case 1:
> + if (REVIDR_MINOR_REV(read_cpuid(REVIDR_EL1)) == 1)
> + return true;
> + break;
> + }
> + break;
> + case 1:
> + switch (MIDR_REVISION(read_cpuid_id())) {
> + case 0:
> + switch (REVIDR_MINOR_REV(read_cpuid(REVIDR_EL1))) {
> + case 1:
> + return true;
> + };
> + break;
> + case 1:
> + switch (REVIDR_MINOR_REV(read_cpuid(REVIDR_EL1))) {
> + case 1:
> + case 0:
> + return true;
> + };
> + break;
> + }
> + break;
> + }
> +
As this is causing build errors on other architectures with COMPILE_TEST
now, I'd suggest removing the function completely.
Please use different compatible strings for IP blocks that are different
and undetectable, instead of reading the ID of another IP block.
Arnd
More information about the linux-arm-kernel
mailing list