]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
lib: fdtdec: Fill initial ram top with DDR start value from dt
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Thu, 8 Jun 2017 06:03:35 +0000 (11:33 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 21 Jun 2017 07:51:43 +0000 (09:51 +0200)
Fill initial ram top with DDR base addr value from DT as not filling
it here always assumes it as zero while calculating relocation
offset and hence lead to failures in somecases. This will assumed
as zero if CONFIG_SYS_SDRAM_BASE is not defined.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
lib/fdtdec.c

index 81f47ef2c7f4cf0b6ea6966a9455518fd89c5e89..7bef63d69981f892e9940e7cfef2bf82ded63c76 100644 (file)
@@ -1192,6 +1192,7 @@ int fdtdec_setup_memory_size(void)
        }
 
        gd->ram_size = (phys_size_t)(res.end - res.start + 1);
+       gd->ram_top = (unsigned long)res.start;
        debug("%s: Initial DRAM size %llx\n", __func__, (u64)gd->ram_size);
 
        return 0;