diff options
author | Nitin Garg <nitin.garg@freescale.com> | 2014-05-28 15:09:28 -0500 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2014-06-13 10:17:01 -0500 |
commit | b829539252202cefe5ccdc22d304eb3c8856e961 (patch) | |
tree | 902ee6fb4c608d9088b3689784d3bb93c4de1ad8 /include | |
parent | 230871db5538f69c101db7d5695c37f282bd641d (diff) | |
download | u-boot-imx-b829539252202cefe5ccdc22d304eb3c8856e961.zip u-boot-imx-b829539252202cefe5ccdc22d304eb3c8856e961.tar.gz u-boot-imx-b829539252202cefe5ccdc22d304eb3c8856e961.tar.bz2 |
ENGR00315499-17 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>
Signed-off-by: Nitin Garg <nitin.garg@freescale.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/configs/mx6slevk.h | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/include/configs/mx6slevk.h b/include/configs/mx6slevk.h index 1705dc4..3de0a55 100644 --- a/include/configs/mx6slevk.h +++ b/include/configs/mx6slevk.h @@ -1,5 +1,5 @@ /* - * Copyright 2013 Freescale Semiconductor, Inc. + * Copyright (C) 2013-2014 Freescale Semiconductor, Inc. * * Configuration settings for the Freescale i.MX6SL EVK board. * @@ -12,6 +12,7 @@ #include <asm/arch/imx-regs.h> #include <linux/sizes.h> #include "mx6_common.h" +#include <asm/imx-common/gpio.h> #define CONFIG_MX6 #define CONFIG_DISPLAY_CPUINFO @@ -193,11 +194,38 @@ /* FLASH and environment organization */ #define CONFIG_SYS_NO_FLASH -#define CONFIG_ENV_OFFSET (6 * SZ_64K) #define CONFIG_ENV_SIZE SZ_8K -#define CONFIG_ENV_IS_IN_MMC #define CONFIG_SYS_MMC_ENV_DEV 1 +#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 |