summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSteve Kipisz <s-kipisz2@ti.com>2013-07-18 15:13:04 -0400
committerTom Rini <trini@ti.com>2013-07-30 09:21:41 -0400
commitc5c7a7c32d552592ac49749e5c184c89bd50c098 (patch)
tree69c906c589a0a6c5e9c02a35a3719699cb7397f6 /include
parentcd8845d7a49687e9e7f727c9d821accf22854dd3 (diff)
downloadu-boot-imx-c5c7a7c32d552592ac49749e5c184c89bd50c098.zip
u-boot-imx-c5c7a7c32d552592ac49749e5c184c89bd50c098.tar.gz
u-boot-imx-c5c7a7c32d552592ac49749e5c184c89bd50c098.tar.bz2
am335x_evm: Add support to boot from NOR.
NOR requires that s_init be within the first 4KiB of the image so that we can perform the rest of the required pinmuxing to talk with the rest of NOR that we are found on. When NOR_BOOT is set we save our environment in NOR at 512KiB and a redundant copy at 768KiB. We avoid using SPL for this case and u-boot.bin is written directly to the start of NOR. We enclose the DMM-related parts of arch/arm/cpu/armv7/am33xx/emif4.c with TI81xx checks as at this time U-Boot does not discard unused sections in the main build and this code relies on functions specific to (and only provided in) ti81xx-related code. Cc: Albert ARIBAUD <albert.u.boot@aribaud.net> Signed-off-by: Steve Kipisz <s-kipisz2@ti.com> Signed-off-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'include')
-rw-r--r--include/configs/am335x_evm.h26
1 files changed, 24 insertions, 2 deletions
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 48491e7..3ca35c3 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -40,6 +40,9 @@
#define CONFIG_SETUP_MEMORY_TAGS
#define CONFIG_INITRD_TAG
+/* Custom script for NOR */
+#define CONFIG_SYS_LDSCRIPT "board/ti/am335x/u-boot.lds"
+
#define CONFIG_SYS_CACHELINE_SIZE 64
/* commands to include */
@@ -306,6 +309,7 @@
#define CONFIG_ENV_OVERWRITE 1
#define CONFIG_SYS_CONSOLE_INFO_QUIET
+#ifndef CONFIG_NOR_BOOT
/* Defines for SPL */
#define CONFIG_SPL
#define CONFIG_SPL_FRAMEWORK
@@ -377,6 +381,7 @@
#define CONFIG_SPL_NAND_BASE
#define CONFIG_SPL_NAND_DRIVERS
#define CONFIG_SPL_NAND_ECC
+#endif
#define CONFIG_SYS_NAND_5_ADDR_CYCLE
#define CONFIG_SYS_NAND_PAGE_COUNT (CONFIG_SYS_NAND_BLOCK_SIZE / \
CONFIG_SYS_NAND_PAGE_SIZE)
@@ -405,14 +410,18 @@
* header. That is 0x800FFFC0--0x80100000 should not be used for any
* other needs.
*/
+#ifdef CONFIG_NOR_BOOT
+#define CONFIG_SYS_TEXT_BASE 0x08000000
+#else
#define CONFIG_SYS_TEXT_BASE 0x80800000
+#endif
#define CONFIG_SYS_SPL_MALLOC_START 0x80a08000
#define CONFIG_SYS_SPL_MALLOC_SIZE 0x100000
/* Since SPL did pll and ddr initialization for us,
* we don't need to do it twice.
*/
-#ifndef CONFIG_SPL_BUILD
+#if !defined(CONFIG_SPL_BUILD) && !defined(CONFIG_NOR_BOOT)
#define CONFIG_SKIP_LOWLEVEL_INIT
#endif
@@ -509,7 +518,7 @@
/* CS0 */
#define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND
devices */
-#if !defined(CONFIG_SPI_BOOT)
+#if !defined(CONFIG_SPI_BOOT) && !defined(CONFIG_NOR_BOOT)
#define MTDIDS_DEFAULT "nand0=omap2-nand.0"
#define MTDPARTS_DEFAULT "mtdparts=omap2-nand.0:128k(SPL)," \
"128k(SPL.backup1)," \
@@ -547,6 +556,19 @@
#define CONFIG_SYS_FLASH_BASE (0x08000000)
#define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT
#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
+#ifdef CONFIG_NOR_BOOT
+#define CONFIG_ENV_IS_IN_FLASH
+#define CONFIG_ENV_SECT_SIZE (128 << 10) /* 128 KiB */
+#define CONFIG_ENV_OFFSET (512 << 10) /* 512 KiB */
+#define CONFIG_ENV_OFFSET_REDUND (768 << 10) /* 768 KiB */
+#define CONFIG_CMD_MTDPARTS
+#define MTDIDS_DEFAULT "nor0=physmap-flash.0"
+#define MTDPARTS_DEFAULT "mtdparts=physmap-flash.0:" \
+ "512k(u-boot)," \
+ "128k(u-boot-env1)," \
+ "128k(u-boot-env2)," \
+ "4m(kernel),-(rootfs)"
+#endif
#define CONFIG_MTD_DEVICE
#define CONFIG_CMD_FLASH
#endif /* NOR support */