summaryrefslogtreecommitdiff
path: root/cpu
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2007-12-27 00:22:24 +0100
committerWolfgang Denk <wd@denx.de>2007-12-27 00:22:24 +0100
commitbd878eb024bf9cb351c9ce66db63558de2d0e395 (patch)
tree6235c6e37a66e07471448598e8e0d16a78dbc678 /cpu
parent467bcee11fe26ad422f2de971aa70866079870f2 (diff)
parentc01b17dd856fa120b2970f50d9598546a4927ec3 (diff)
downloadu-boot-imx-bd878eb024bf9cb351c9ce66db63558de2d0e395.zip
u-boot-imx-bd878eb024bf9cb351c9ce66db63558de2d0e395.tar.gz
u-boot-imx-bd878eb024bf9cb351c9ce66db63558de2d0e395.tar.bz2
Merge branch 'testing' of git://www.denx.de/git/u-boot-fdt
Diffstat (limited to 'cpu')
-rw-r--r--cpu/mpc83xx/cpu.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/cpu/mpc83xx/cpu.c b/cpu/mpc83xx/cpu.c
index b2c35d3..f1ea17d 100644
--- a/cpu/mpc83xx/cpu.c
+++ b/cpu/mpc83xx/cpu.c
@@ -35,6 +35,7 @@
#include <ft_build.h>
#elif defined(CONFIG_OF_LIBFDT)
#include <libfdt.h>
+#include <fdt_support.h>
#endif
DECLARE_GLOBAL_DATA_PTR;
@@ -526,7 +527,6 @@ ft_cpu_setup(void *blob, bd_t *bd)
int nodeoffset;
int err;
int j;
- int tmp[2];
for (j = 0; j < (sizeof(fixup_props) / sizeof(fixup_props[0])); j++) {
nodeoffset = fdt_path_offset(blob, fixup_props[j].node);
@@ -543,21 +543,7 @@ ft_cpu_setup(void *blob, bd_t *bd)
}
}
- /* update, or add and update /memory node */
- nodeoffset = fdt_path_offset(blob, "/memory");
- if (nodeoffset < 0) {
- nodeoffset = fdt_add_subnode(blob, 0, "memory");
- if (nodeoffset < 0)
- debug("failed to add /memory node: %s\n",
- fdt_strerror(nodeoffset));
- }
- if (nodeoffset >= 0) {
- fdt_setprop(blob, nodeoffset, "device_type",
- "memory", sizeof("memory"));
- tmp[0] = cpu_to_be32(bd->bi_memstart);
- tmp[1] = cpu_to_be32(bd->bi_memsize);
- fdt_setprop(blob, nodeoffset, "reg", tmp, sizeof(tmp));
- }
+ fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize);
}
#elif defined(CONFIG_OF_FLAT_TREE)
void