diff options
author | Jason Liu <r64343@freescale.com> | 2013-05-17 08:35:36 +0800 |
---|---|---|
committer | Jason Liu <r64343@freescale.com> | 2013-05-21 13:27:13 +0800 |
commit | 20f5f1f8f166731f3cfc9f1e6e24e732ccacfa97 (patch) | |
tree | c9525eabfbcbac017d1bbe2a9eb97365817b393c /include | |
parent | 50d8ba19496a093eed82d8ad87cf9089acbc2508 (diff) | |
download | u-boot-imx-20f5f1f8f166731f3cfc9f1e6e24e732ccacfa97.zip u-boot-imx-20f5f1f8f166731f3cfc9f1e6e24e732ccacfa97.tar.gz u-boot-imx-20f5f1f8f166731f3cfc9f1e6e24e732ccacfa97.tar.bz2 |
ENGR00263305-8 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>
Diffstat (limited to 'include')
-rw-r--r-- | include/configs/mx6qsabre_common.h | 27 | ||||
-rw-r--r-- | include/configs/mx6qsabreauto.h | 5 | ||||
-rw-r--r-- | include/configs/mx6qsabresd.h | 5 |
3 files changed, 35 insertions, 2 deletions
diff --git a/include/configs/mx6qsabre_common.h b/include/configs/mx6qsabre_common.h index e1697c1..2338667 100644 --- a/include/configs/mx6qsabre_common.h +++ b/include/configs/mx6qsabre_common.h @@ -97,7 +97,8 @@ "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ "mmcpart=" __stringify(CONFIG_SYS_MMC_ENV_PART) "\0" \ "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \ - "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" \ @@ -120,7 +121,7 @@ "else " \ "bootm; " \ "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 ...; " \ @@ -201,10 +202,32 @@ #define CONFIG_ENV_SIZE (8 * 1024) +#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 (8 * 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/mx6qsabreauto.h b/include/configs/mx6qsabreauto.h index 5bb7fad..789fe9b 100644 --- a/include/configs/mx6qsabreauto.h +++ b/include/configs/mx6qsabreauto.h @@ -29,6 +29,7 @@ #define CONFIG_MXC_USB_FLAGS 0 #include "mx6qsabre_common.h" +#include <asm/imx-common/gpio.h> #define CONFIG_SYS_FSL_USDHC_NUM 2 #if defined(CONFIG_ENV_IS_IN_MMC) @@ -36,4 +37,8 @@ #define CONFIG_SYS_MMC_ENV_PART 1 /* Boot partition 1 */ #endif +#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/mx6qsabresd.h b/include/configs/mx6qsabresd.h index bb75286..ca809d0 100644 --- a/include/configs/mx6qsabresd.h +++ b/include/configs/mx6qsabresd.h @@ -23,6 +23,7 @@ #define CONFIG_MMCROOT "/dev/mmcblk1p2" #include "mx6qsabre_common.h" +#include <asm/imx-common/gpio.h> #define CONFIG_SYS_FSL_USDHC_NUM 3 #if defined(CONFIG_ENV_IS_IN_MMC) @@ -30,4 +31,8 @@ #define CONFIG_SYS_MMC_ENV_PART 1 /* Boot partition 1 */ #endif +#ifdef CONFIG_SYS_USE_SPINOR +#define CONFIG_SF_DEFAULT_CS (0|(IMX_GPIO_NR(4, 9)<<8)) +#endif + #endif /* __MX6QSABRESD_CONFIG_H */ |