diff options
author | Ye.Li <B37916@freescale.com> | 2014-06-03 16:26:14 +0800 |
---|---|---|
committer | Ye.Li <B37916@freescale.com> | 2014-06-17 11:13:39 +0800 |
commit | bd29cd3e5d02a666f65b44daa975b59097cac15e (patch) | |
tree | bb7449d20f95db7063fa5fc82331c80da4ccb5d5 /include/configs | |
parent | fb12ded42fa0650d946ed1f4ada1482e61aefae5 (diff) | |
download | u-boot-imx-bd29cd3e5d02a666f65b44daa975b59097cac15e.zip u-boot-imx-bd29cd3e5d02a666f65b44daa975b59097cac15e.tar.gz u-boot-imx-bd29cd3e5d02a666f65b44daa975b59097cac15e.tar.bz2 |
ENGR00315894-7 i.mx6q/dl/solo: sabresd/sabreauto: Add the SPI-NOR support
This patch adds the SPI-NOR support for the i.mx6q/dl/solo:sabresd/auto board:
- Support the SPI-NOR function with sf command,
- Support the enviroment from SPI-NOR when CONFIG_SYS_BOOT_SPINOR
Signed-off-by: Jason Liu <r64343@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
Diffstat (limited to 'include/configs')
-rw-r--r-- | include/configs/mx6qsabreauto.h | 5 | ||||
-rw-r--r-- | include/configs/mx6sabre_common.h | 42 | ||||
-rw-r--r-- | include/configs/mx6sabresd.h | 4 |
3 files changed, 38 insertions, 13 deletions
diff --git a/include/configs/mx6qsabreauto.h b/include/configs/mx6qsabreauto.h index d1fa1cd..8b7328c 100644 --- a/include/configs/mx6qsabreauto.h +++ b/include/configs/mx6qsabreauto.h @@ -27,6 +27,7 @@ #define CONFIG_MXC_USB_FLAGS 0 #include "mx6sabre_common.h" +#include <asm/imx-common/gpio.h> #define CONFIG_SYS_FSL_USDHC_NUM 2 #if defined(CONFIG_ENV_IS_IN_MMC) @@ -39,4 +40,8 @@ #define CONFIG_SYS_I2C_MXC #define CONFIG_SYS_I2C_SPEED 100000 +#ifdef CONFIG_SYS_USE_SPINOR +#define CONFIG_SF_DEFAULT_CS (1|(IMX_GPIO_NR(3, 19)<<8)) +#endif + #endif /* __MX6QSABREAUTO_CONFIG_H */ diff --git a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h index 55f7519..128502e 100644 --- a/include/configs/mx6sabre_common.h +++ b/include/configs/mx6sabre_common.h @@ -69,17 +69,6 @@ #define CONFIG_PHYLIB #define CONFIG_PHY_ATHEROS -#define CONFIG_CMD_SF -#ifdef 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_CS (0 | (IMX_GPIO_NR(4, 9) << 8)) -#define CONFIG_SF_DEFAULT_SPEED 20000000 -#define CONFIG_SF_DEFAULT_MODE SPI_MODE_0 -#endif - /* allow to overwrite serial and ethaddr */ #define CONFIG_ENV_OVERWRITE #define CONFIG_CONS_INDEX 1 @@ -167,7 +156,8 @@ "fi; " \ "fi\0" \ EMMC_ENV \ - "mmcargs=setenv bootargs console=${console},${baudrate} " \ + "smp=" CONFIG_SYS_NOSMP "\0"\ + "mmcargs=setenv bootargs console=${console},${baudrate} ${smp} " \ "root=${mmcroot}\0" \ "loadbootscript=" \ "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ @@ -190,7 +180,7 @@ "else " \ "bootz; " \ "fi;\0" \ - "netargs=setenv bootargs console=${console},${baudrate} " \ + "netargs=setenv bootargs console=${console},${baudrate} ${smp} " \ "root=/dev/nfs " \ "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ "netboot=echo Booting from net ...; " \ @@ -269,10 +259,36 @@ #define CONFIG_ENV_SIZE (8 * 1024) +#ifndef CONFIG_SYS_NOSMP +#define CONFIG_SYS_NOSMP +#endif + +#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) +#endif #if defined(CONFIG_ENV_IS_IN_MMC) #define CONFIG_ENV_OFFSET (6 * 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 diff --git a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h index a94b756..331a37c 100644 --- a/include/configs/mx6sabresd.h +++ b/include/configs/mx6sabresd.h @@ -38,6 +38,10 @@ #define CONFIG_SYS_MMC_ENV_DEV 1 /* SDHC3 */ #endif +#ifdef CONFIG_SYS_USE_SPINOR +#define CONFIG_SF_DEFAULT_CS (0|(IMX_GPIO_NR(4, 9)<<8)) +#endif + /* Framebuffer */ #define CONFIG_VIDEO #define CONFIG_VIDEO_IPUV3 |