summaryrefslogtreecommitdiff
path: root/include/configs/versatile.h
diff options
context:
space:
mode:
authorStefano Babic <sbabic@denx.de>2011-06-24 03:04:38 +0000
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2011-08-04 13:12:44 +0200
commitd388298a59ba375c76597b8f95b560afa971a0fb (patch)
tree7255c781bbc6d6b1aefcc3622087dfa13f58aebc /include/configs/versatile.h
parent07407d97f07bf62c6c6e6899029a079ecc271974 (diff)
downloadu-boot-imx-d388298a59ba375c76597b8f95b560afa971a0fb.zip
u-boot-imx-d388298a59ba375c76597b8f95b560afa971a0fb.tar.gz
u-boot-imx-d388298a59ba375c76597b8f95b560afa971a0fb.tar.bz2
ARM: versatile: fix board support
Versatile board is used as example to run u-boot under qemu. The patch fixes relocation for all versatile boards and adds a versatileqemu target to be used under qemu. Patch tested only under qemu, not on real boards. Tested with QEMU emulator version 0.14.50. Signed-off-by: Stefano Babic <sbabic@denx.de> CC: Alessandro Rubini <rubini-list@gnudd.com> CC: Loïc Minier <loic.minier@linaro.org>
Diffstat (limited to 'include/configs/versatile.h')
-rw-r--r--include/configs/versatile.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/include/configs/versatile.h b/include/configs/versatile.h
index db68965..32cee82 100644
--- a/include/configs/versatile.h
+++ b/include/configs/versatile.h
@@ -74,6 +74,7 @@
/*
* Size of malloc() pool
*/
+#define CONFIG_ENV_SIZE 8192
#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128 * 1024)
/*
@@ -168,9 +169,26 @@
#define PHYS_SDRAM_1_SIZE 0x08000000 /* 128 MB */
#define PHYS_FLASH_SIZE 0x04000000 /* 64MB */
+#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
+#define CONFIG_SYS_INIT_RAM_ADDR 0x00800000
+#define CONFIG_SYS_INIT_RAM_SIZE 0x000FFFFF
+#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - \
+ GENERATED_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \
+ CONFIG_SYS_GBL_DATA_OFFSET)
+
+#define CONFIG_BOARD_EARLY_INIT_F
+
/*-----------------------------------------------------------------------
* FLASH and environment organization
*/
+#ifdef CONFIG_ARCH_VERSATILE_QEMU
+#define CONFIG_SYS_TEXT_BASE 0x10000
+#define CONFIG_SYS_NO_FLASH
+#define CONFIG_ENV_IS_NOWHERE
+#define CONFIG_SYS_MONITOR_LEN 0x80000
+#else
+#define CONFIG_SYS_TEXT_BASE 0x01000000
/*
* Use the CFI flash driver for ease of use
*/
@@ -222,7 +240,6 @@
/* The ARM Boot Monitor is shipped in the lowest sector of flash */
#define FLASH_TOP (CONFIG_SYS_FLASH_BASE + PHYS_FLASH_SIZE)
-#define CONFIG_ENV_SIZE 8192
#define CONFIG_ENV_ADDR (FLASH_TOP - CONFIG_ENV_SECT_SIZE)
#define CONFIG_ENV_OFFSET (CONFIG_ENV_ADDR - CONFIG_SYS_FLASH_BASE)
#define CONFIG_SYS_MONITOR_BASE (CONFIG_ENV_ADDR - CONFIG_SYS_MONITOR_LEN)
@@ -230,4 +247,6 @@
#define CONFIG_SYS_FLASH_PROTECTION /* The devices have real protection */
#define CONFIG_SYS_FLASH_EMPTY_INFO /* flinfo indicates empty blocks */
+#endif
+
#endif /* __CONFIG_H */