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.
This commit is contained in:
Ian Lepore 2015-02-01 18:21:16 +00:00
parent 0e192fecb4
commit 59f8cb6368

View file

@ -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)