From 246d4ae6bc282bc1841224e1c5fc49dc925e0bf7 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Tue, 27 Nov 2007 21:59:46 -0600 Subject: Convert boards that set memory node to use fdt_fixup_memory() Signed-off-by: Kumar Gala --- board/cm5200/cm5200.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'board/cm5200') diff --git a/board/cm5200/cm5200.c b/board/cm5200/cm5200.c index 4a86d3c55..79fb71dc7 100644 --- a/board/cm5200/cm5200.c +++ b/board/cm5200/cm5200.c @@ -263,7 +263,6 @@ static void ft_blob_update(void *blob, bd_t *bd) { int len, ret, nodeoffset = 0; char module_name[MODULE_NAME_MAXLEN] = {0}; - ulong memory_data[2] = {0}; compose_module_name(hw_id, module_name); len = strlen(module_name) + 1; @@ -273,22 +272,12 @@ static void ft_blob_update(void *blob, bd_t *bd) printf("ft_blob_update(): cannot set /model property err:%s\n", fdt_strerror(ret)); - memory_data[0] = cpu_to_be32(bd->bi_memstart); - memory_data[1] = cpu_to_be32(bd->bi_memsize); + ret = fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize); - nodeoffset = fdt_path_offset (blob, "/memory"); - if (nodeoffset >= 0) { - ret = fdt_setprop(blob, nodeoffset, "reg", memory_data, - sizeof(memory_data)); - if (ret < 0) + if (ret < 0) { printf("ft_blob_update): cannot set /memory/reg " "property err:%s\n", fdt_strerror(ret)); } - else { - /* memory node is required in dts */ - printf("ft_blob_update(): cannot find /memory node " - "err:%s\n", fdt_strerror(nodeoffset)); - } } #endif /* defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) */ -- cgit v1.2.3