]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
sunxi: Reserve ATF memory space on A64
authorAlexander Graf <agraf@suse.de>
Wed, 30 Mar 2016 15:53:56 +0000 (17:53 +0200)
committerHans de Goede <hdegoede@redhat.com>
Fri, 1 Apr 2016 07:52:28 +0000 (09:52 +0200)
On the A64 we usually boot with ATF running in EL3. ATF as it is available
today resides in the first 16MB of RAM. So we should make sure we reserve
that space in our memory maps.

Signed-off-by: Alexander Graf <agraf@suse.de>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
board/sunxi/board.c

index ccf4129b153ed68268dc4fa5746ac9577c97c319..3cf36147b241b4e55ae0770384f4871de7e4ad03 100644 (file)
@@ -133,6 +133,15 @@ int dram_init(void)
        return 0;
 }
 
+#ifdef CONFIG_MACH_SUN50I
+void dram_init_banksize(void)
+{
+       /* We need to reserve the first 16MB of RAM for ATF */
+       gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE + (16 * 1024 * 1024);
+       gd->bd->bi_dram[0].size = get_effective_memsize() - (16 * 1024 * 1024);
+}
+#endif
+
 #if defined(CONFIG_NAND_SUNXI) && defined(CONFIG_SPL_BUILD)
 static void nand_pinmux_setup(void)
 {