summaryrefslogtreecommitdiff
path: root/cpu/mpc85xx/fdt.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2009-09-24 23:40:25 +0200
committerWolfgang Denk <wd@denx.de>2009-09-24 23:40:25 +0200
commit5e498dfab87c5b9bd1ad7b9a35f38b9e5dcd2244 (patch)
tree95fda77d5070e3c2e4da9b334fa4b36d5a229300 /cpu/mpc85xx/fdt.c
parent55f786d8ba8ce58a81428536da34a2192b9bad9f (diff)
parent39aaca1f66a0e5b1204b0789f6c0097938c00ad1 (diff)
downloadu-boot-imx-5e498dfab87c5b9bd1ad7b9a35f38b9e5dcd2244.zip
u-boot-imx-5e498dfab87c5b9bd1ad7b9a35f38b9e5dcd2244.tar.gz
u-boot-imx-5e498dfab87c5b9bd1ad7b9a35f38b9e5dcd2244.tar.bz2
Merge branch 'master' of /home/wd/git/u-boot/custodians
Diffstat (limited to 'cpu/mpc85xx/fdt.c')
-rw-r--r--cpu/mpc85xx/fdt.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/cpu/mpc85xx/fdt.c b/cpu/mpc85xx/fdt.c
index 723f473..efb6518 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);
@@ -287,7 +294,7 @@ void ft_cpu_setup(void *blob, bd_t *bd)
fdt_add_enet_stashing(blob);
do_fixup_by_prop_u32(blob, "device_type", "cpu", 4,
- "timebase-frequency", bd->bi_busfreq / 8, 1);
+ "timebase-frequency", get_tbclk(), 1);
do_fixup_by_prop_u32(blob, "device_type", "cpu", 4,
"bus-frequency", bd->bi_busfreq, 1);
get_sys_info(&sysinfo);