summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2013-02-08 11:20:15 +0000
committerTom Rini <trini@ti.com>2013-02-18 13:51:20 -0500
commit4adfcd68cc10449e2fda0f9fac8b09f2b5c09a02 (patch)
tree7ba3b31c35e8f3b184cb7cb77e14d51495d6f347
parent427ac8cca34516c9e3845fee40d7fbd6f3293aec (diff)
downloadblackbird-obmc-uboot-4adfcd68cc10449e2fda0f9fac8b09f2b5c09a02.tar.gz
blackbird-obmc-uboot-4adfcd68cc10449e2fda0f9fac8b09f2b5c09a02.zip
am335x evm: Add am335x_evm_spiboot target
This target will move the environment into SPI flash and documents the expected layout. We correct the SPL define for where U-Boot is and remove an unused define. Signed-off-by: Tom Rini <trini@ti.com>
-rw-r--r--boards.cfg1
-rw-r--r--include/configs/am335x_evm.h25
2 files changed, 24 insertions, 2 deletions
diff --git a/boards.cfg b/boards.cfg
index beefb53412..5766f86573 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -233,6 +233,7 @@ integratorap_cm946es arm arm946es integrator armltd
integratorcp_cm946es arm arm946es integrator armltd - integratorcp:CM946ES
ca9x4_ct_vxp arm armv7 vexpress armltd
am335x_evm arm armv7 am335x ti am33xx am335x_evm:SERIAL1,CONS_INDEX=1
+am335x_evm_spiboot arm armv7 am335x ti am33xx am335x_evm:SERIAL1,CONS_INDEX=1,SPI_BOOT
am335x_evm_uart1 arm armv7 am335x ti am33xx am335x_evm:SERIAL2,CONS_INDEX=2
am335x_evm_uart2 arm armv7 am335x ti am33xx am335x_evm:SERIAL3,CONS_INDEX=3
am335x_evm_uart3 arm armv7 am335x ti am33xx am335x_evm:SERIAL4,CONS_INDEX=4
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 259d01ee7b..0dc2a50408 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -280,8 +280,7 @@
#define CONFIG_SPL_SPI_LOAD
#define CONFIG_SPL_SPI_BUS 0
#define CONFIG_SPL_SPI_CS 0
-#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x20000
-#define CONFIG_SYS_SPI_U_BOOT_SIZE 0x40000
+#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x80000
#define CONFIG_SPL_MUSB_NEW_SUPPORT
#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
@@ -371,6 +370,26 @@
#undef CONFIG_EXTRA_ENV_SETTINGS
#endif
+/*
+ * Default to using SPI for environment, etc. We have multiple copies
+ * of SPL as the ROM will check these locations.
+ * 0x0 - 0x20000 : First copy of SPL
+ * 0x20000 - 0x40000 : Second copy of SPL
+ * 0x40000 - 0x60000 : Third copy of SPL
+ * 0x60000 - 0x80000 : Fourth copy of SPL
+ * 0x80000 - 0xDF000 : U-Boot
+ * 0xDF000 - 0xE0000 : U-Boot Environment
+ * 0xE0000 - 0x442000 : Linux Kernel
+ * 0x442000 - 0x800000 : Userland
+ */
+#if defined(CONFIG_SPI_BOOT)
+# undef CONFIG_ENV_IS_NOWHERE
+# define CONFIG_ENV_IS_IN_SPI_FLASH
+# define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED
+# define CONFIG_ENV_OFFSET (892 << 10) /* 892 KiB in */
+# define CONFIG_ENV_SECT_SIZE (4 << 10) /* 4 KB sectors */
+#endif /* SPI support */
+
/* Unsupported features */
#undef CONFIG_USE_IRQ
@@ -403,10 +422,12 @@
/* CS0 */
#define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND
devices */
+#if !defined(CONFIG_SPI_BOOT)
#undef CONFIG_ENV_IS_NOWHERE
#define CONFIG_ENV_IS_IN_NAND
#define CONFIG_ENV_OFFSET 0x260000 /* environment starts here */
#define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */
#endif
+#endif
#endif /* ! __CONFIG_AM335X_EVM_H */
OpenPOWER on IntegriCloud