In order to deal with an firmware bug on a specific ppc32 platform (longtrail), early_init_dt_scan_memory() looks for a node called memory@0 on all platforms. Restrict this quirk to ppc32 kernels only.
Signed-off-by: Leif Lindholm <leif.lindh...@linaro.org> Cc: linuxppc-dev@lists.ozlabs.org Cc: Grant Likely <grant.lik...@linaro.org> Cc: Mark Rutland <mark.rutl...@arm.com> Cc: devicet...@vger.kernel.org Cc: linux-ker...@vger.kernel.org --- drivers/of/fdt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index fa16a91..7368472 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -887,14 +887,19 @@ int __init early_init_dt_scan_memory(unsigned long node, const char *uname, /* We are scanning "memory" nodes only */ if (type == NULL) { +#ifdef CONFIG_PPC32 /* * The longtrail doesn't have a device_type on the * /memory node, so look for the node called /memory@0. */ if (depth != 1 || strcmp(uname, "memory@0") != 0) return 0; - } else if (strcmp(type, "memory") != 0) +#else + return 0; +#endif + } else if (strcmp(type, "memory") != 0) { return 0; + } reg = of_get_flat_dt_prop(node, "linux,usable-memory", &l); if (reg == NULL) -- 1.7.10.4 _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev