diff options
author | Ye.Li <B37916@freescale.com> | 2014-01-17 14:00:36 +0800 |
---|---|---|
committer | Ye.Li <B37916@freescale.com> | 2014-01-17 15:36:13 +0800 |
commit | 58046d105f2626758fdf78e7d43013b3ca1c40bc (patch) | |
tree | 5d07935df9020802474d85f02f7a3d957e3d1995 /include | |
parent | 9c344337485908eb7d8c97e4df1cd0d3c3b1ec8c (diff) | |
download | u-boot-imx-58046d105f2626758fdf78e7d43013b3ca1c40bc.zip u-boot-imx-58046d105f2626758fdf78e7d43013b3ca1c40bc.tar.gz u-boot-imx-58046d105f2626758fdf78e7d43013b3ca1c40bc.tar.bz2 |
ENGR00295560 ARM:imx6sl:evk Add SPI NOR flash boot and access support
Add BSP codes to support SPI NOR flash read, write and erase by using
"sf" command.
In addition, add a new configuration "mx6slevk_spinor" for building
the uboot that can be booted from SPI NOR flash and stored the
environments variables in it.
Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit 4651abb4900bb01f077c0fdac6363a214abc79bf)
Diffstat (limited to 'include')
-rw-r--r-- | include/configs/mx6slevk.h | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/include/configs/mx6slevk.h b/include/configs/mx6slevk.h index 972b23a..060e8f1 100644 --- a/include/configs/mx6slevk.h +++ b/include/configs/mx6slevk.h @@ -14,6 +14,7 @@ #include <asm/arch/imx-regs.h> #include <asm/sizes.h> +#include <asm/imx-common/gpio.h> #define CONFIG_MX6 #define CONFIG_DISPLAY_CPUINFO @@ -228,11 +229,38 @@ /* FLASH and environment organization */ #define CONFIG_SYS_NO_FLASH -#define CONFIG_ENV_OFFSET (8 * SZ_64K) #define CONFIG_ENV_SIZE SZ_8K -#define CONFIG_ENV_IS_IN_MMC #define CONFIG_SYS_MMC_ENV_DEV 0 +#if defined CONFIG_SYS_BOOT_SPINOR +#define CONFIG_SYS_USE_SPINOR +#define CONFIG_ENV_IS_IN_SPI_FLASH +#else +#define CONFIG_ENV_IS_IN_MMC +#endif + +#ifdef CONFIG_SYS_USE_SPINOR +#define CONFIG_CMD_SF +#define CONFIG_SPI_FLASH +#define CONFIG_SPI_FLASH_STMICRO +#define CONFIG_MXC_SPI +#define CONFIG_SF_DEFAULT_BUS 0 +#define CONFIG_SF_DEFAULT_SPEED 20000000 +#define CONFIG_SF_DEFAULT_MODE (SPI_MODE_0) +#define CONFIG_SF_DEFAULT_CS (0|(IMX_GPIO_NR(4, 11)<<8)) +#endif + +#if defined(CONFIG_ENV_IS_IN_MMC) +#define CONFIG_ENV_OFFSET (8 * 64 * 1024) +#elif defined(CONFIG_ENV_IS_IN_SPI_FLASH) +#define CONFIG_ENV_OFFSET (768 * 1024) +#define CONFIG_ENV_SECT_SIZE (64 * 1024) +#define CONFIG_ENV_SPI_BUS CONFIG_SF_DEFAULT_BUS +#define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS +#define CONFIG_ENV_SPI_MODE CONFIG_SF_DEFAULT_MODE +#define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED +#endif + #define CONFIG_OF_LIBFDT #define CONFIG_CMD_BOOTZ |