From 59f8cb6368a6a5ae6459813a176aa4ffecaad7dc Mon Sep 17 00:00:00 2001 From: Ian Lepore Date: Sun, 1 Feb 2015 18:21:16 +0000 Subject: [PATCH] Do not skip setting the memory 'reg' property if the fdt data already contains one. Published dts source often includes a minimal default memory definition and expects it to be overridden by the bootloader after determining the actual physical memory in the system. --- sys/boot/fdt/fdt_loader_cmd.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/sys/boot/fdt/fdt_loader_cmd.c b/sys/boot/fdt/fdt_loader_cmd.c index dec9d524ada..aff22306fd7 100644 --- a/sys/boot/fdt/fdt_loader_cmd.c +++ b/sys/boot/fdt/fdt_loader_cmd.c @@ -566,17 +566,6 @@ fdt_fixup_memory(struct fdt_mem_region *region, size_t num) return; } - if ((reg = (uint32_t *)fdt_getprop(fdtp, memory, "reg", - &len)) != NULL) { - - if (fdt_reg_valid(reg, len, addr_cells, size_cells) == 0) - /* - * Do not apply fixup if existing 'reg' property - * seems to be valid. - */ - return; - } - len = (addr_cells + size_cells) * realmrno * sizeof(uint32_t); sb = buf = (uint8_t *)malloc(len); if (!buf)