]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
sunxi: Update sunxi-common.h to deal with different A1-SRAM base addr on sun9i
authorHans de Goede <hdegoede@redhat.com>
Wed, 20 May 2015 13:27:16 +0000 (15:27 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 8 Sep 2015 20:47:10 +0000 (22:47 +0200)
The A1 SRAM Base differs between sun9i and the others, update sunxi-common.h
to deal with this, so that we do not set the initial stack pointer to point
to the BROM.

This avoids the need for the weird undocumented register write I previously
took from the allwiner u-boot sources and which needed #ifdef-ery in start.S
as it needed to be done really early on.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
include/configs/sunxi-common.h

index 2b90681a69eea38fee577645443fd0ad41f68334..76f42f5f3dcee179342523523d11ced5ab93838a 100644 (file)
 #define CONFIG_SPL_BSS_MAX_SIZE                0x00080000 /* 512 KiB */
 #define CONFIG_SYS_SPL_MALLOC_SIZE     0x00080000 /* 512 KiB */
 
+#ifdef CONFIG_MACH_SUN9I
+/*
+ * The A80's A1 sram starts at 0x00010000 rather then at 0x00000000 and is
+ * slightly bigger. Note that it is possible to map the first 32 KiB of the
+ * A1 at 0x00000000 like with older SoCs by writing 0x16aa0001 to the
+ * undocumented 0x008000e0 SYS_CTRL register. Where the 16aa is a key and
+ * the 1 actually activates the mapping of the first 32 KiB to 0x00000000.
+ */
+#define CONFIG_SYS_INIT_RAM_ADDR       0x10000
+#define CONFIG_SYS_INIT_RAM_SIZE       0x0a000 /* 40 KiB */
+#else
 #define CONFIG_SYS_INIT_RAM_ADDR       0x0
 #define CONFIG_SYS_INIT_RAM_SIZE       0x8000  /* 32 KiB */
+#endif
 
 #define CONFIG_SYS_INIT_SP_OFFSET \
        (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)