summaryrefslogtreecommitdiff
path: root/cpu/mpc85xx/fdt.c
diff options
context:
space:
mode:
authorVivek Mahajan <vivek.mahajan@freescale.com>2009-09-22 12:48:27 +0530
committerKumar Gala <galak@kernel.crashing.org>2009-09-24 12:05:27 -0500
commitcb0ff65c619efacdc0ba69aa8ee6ede7dd364a38 (patch)
tree8020ffffd793518c45f79d16364bbc645988f19a /cpu/mpc85xx/fdt.c
parent234a89d911ce28e46372f555d7c14e28424f2b0d (diff)
downloadu-boot-imx-cb0ff65c619efacdc0ba69aa8ee6ede7dd364a38.zip
u-boot-imx-cb0ff65c619efacdc0ba69aa8ee6ede7dd364a38.tar.gz
u-boot-imx-cb0ff65c619efacdc0ba69aa8ee6ede7dd364a38.tar.bz2
85xx-fdt: Fixed l2-ctlr's compatible prop for QorIQ
The code assumed names where just numbers and always prefixed 'mpc'. However newer QorIQ don't follow the mpc naming scheme. Signed-off-by: Vivek Mahajan <vivek.mahajan@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'cpu/mpc85xx/fdt.c')
-rw-r--r--cpu/mpc85xx/fdt.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/cpu/mpc85xx/fdt.c b/cpu/mpc85xx/fdt.c
index 723f473..61e0fb0 100644
--- a/cpu/mpc85xx/fdt.c
+++ b/cpu/mpc85xx/fdt.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2007 Freescale Semiconductor, Inc.
+ * Copyright 2007-2009 Freescale Semiconductor, Inc.
*
* (C) Copyright 2000
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
@@ -27,6 +27,7 @@
#include <libfdt.h>
#include <fdt_support.h>
#include <asm/processor.h>
+#include <linux/ctype.h>
#ifdef CONFIG_FSL_ESDHC
#include <fsl_esdhc.h>
#endif
@@ -148,8 +149,14 @@ static inline void ft_fixup_l2cache(void *blob)
}
if (cpu) {
- len = sprintf(compat_buf, "fsl,mpc%s-l2-cache-controller",
- cpu->name);
+ if (isdigit(cpu->name[0]))
+ len = sprintf(compat_buf,
+ "fsl,mpc%s-l2-cache-controller", cpu->name);
+ else
+ len = sprintf(compat_buf,
+ "fsl,%c%s-l2-cache-controller",
+ tolower(cpu->name[0]), cpu->name + 1);
+
sprintf(&compat_buf[len + 1], "cache");
}
fdt_setprop(blob, off, "cache-unified", NULL, 0);