rpi: always set fdt_addr to the correct value
authorMarek Szyprowski <m.szyprowski@samsung.com>
Mon, 14 Feb 2022 10:35:12 +0000 (11:35 +0100)
committerJaehoon Chung <jh80.chung@samsung.com>
Mon, 28 Oct 2024 11:28:37 +0000 (20:28 +0900)
The fdt_addr env have meaning only for the current runtime and it depends
on the dtb size or firmware version. If one save the environment to disk
and the loads it on the latter boot, the fdt_addr might change, what
result in passing incorrect dtb address to the kernel. Fix this by always
setting the fdt_addr env. This fixes system operation after saving the
env to disk and updating i.e. dtb files or firmware.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I8f242e0d92ff7cc8557c0fd4a7459804270d5d6d

board/raspberrypi/rpi/rpi.c

index ad49a51f9c6913016b9ff86950b2756914faff7f..a4233613153a2b75dd695ea597783fd94f5e0eb9 100644 (file)
@@ -355,9 +355,6 @@ static void set_fdtfile(void)
  */
 static void set_fdt_addr(void)
 {
-       if (env_get("fdt_addr"))
-               return;
-
        if (fdt_magic(fw_dtb_pointer) != FDT_MAGIC)
                return;