imx:mx6slevk add spi nor boot support
PATCH 1/1 imx:mx6slevk add spi nor boot support
Add spi nor boot support for mx6slevk board.
--- board/freescale/mx6slevk/MAINTAINERS | 1 + configs/mx6slevk_spinor_defconfig | 3 +++ include/configs/mx6slevk.h | 13 ++++++++++++- 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 configs/mx6slevk_spinor_defconfig
board/freescale/mx6slevk/MAINTAINERS +1 -0
@@ -4,3 +4,4 @@ S: Maintained F: board/freescale/mx6slevk/ F: include/configs/mx6slevk.h F: configs/mx6slevk_defconfig +F: configs/mx6slevk_spinor_defconfig
configs/mx6slevk_spinor_defconfig new file +3 -0
@@ -0,0 +1,3 @@ +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6slevk/imximage.cfg,MX6SL,SYS_BOOT_SPINOR" +CONFIG_ARM=y +CONFIG_TARGET_MX6SLEVK=y
include/configs/mx6slevk.h +12 -1
@@ -187,9 +187,20 @@/* FLASH and environment organization */ #define CONFIG_SYS_NO_FLASH -#define CONFIG_ENV_OFFSET (6 * SZ_64K)#define CONFIG_ENV_SIZE SZ_8K + +#if definedCONFIG_SYS_BOOT_SPINOR +#define 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 +#else +#define CONFIG_ENV_OFFSET (6 * SZ_64K)#define CONFIG_ENV_IS_IN_MMC +#endif #define CONFIG_OF_LIBFDT #define CONFIG_CMD_BOOTZ
Signature · 1 line
1.8.4
PATCH 1/1 imx:mx6slevk add spi nor boot support
Quoted 37 lines · Peng Fan
Add spi nor boot support for mx6slevk board.
Signed-off-by Peng Fan <[email protected]>--- board/freescale/mx6slevk/MAINTAINERS | 1 + configs/mx6slevk_spinor_defconfig | 3 +++ include/configs/mx6slevk.h | 13 ++++++++++++- 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 configs/mx6slevk_spinor_defconfigboard/freescale/mx6slevk/MAINTAINERS +1
-0@@ -4,3 +4,4 @@ S: Maintained F: board/freescale/mx6slevk/ F: include/configs/mx6slevk.h F: configs/mx6slevk_defconfig +F: configs/mx6slevk_spinor_defconfigconfigs/mx6slevk_spinor_defconfig new file +3
-0@@ -0,0 +1,3 @@ +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6slevk/imximage.cfg,MX6SL,SYS_BOOT_SPINOR" +CONFIG_ARM=y +CONFIG_TARGET_MX6SLEVK=yinclude/configs/mx6slevk.h +0
-1@@ -187,9 +187,20 @@/* FLASH and environment organization */ #define CONFIG_SYS_NO_FLASH -#define CONFIG_ENV_OFFSET (6 * SZ_64K)
include/configs/mx6slevk.h line 199
Quoted 10 lines
include/configs/mx6slevk.h +9
-0#define CONFIG_ENV_SIZE SZ_8K + +#if definedCONFIG_SYS_BOOT_SPINOR +#define 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
If you need default values may be you couldn't define these so-that common/env_sf.c
will take the defaults for undefs - please check.
Quoted 10 lines
include/configs/mx6slevk.h +3
-1+#else +#define CONFIG_ENV_OFFSET (6 * SZ_64K)#define CONFIG_ENV_IS_IN_MMC +#endif #define CONFIG_OF_LIBFDT #define CONFIG_CMD_BOOTZ --1.8.4
thanks!
Signature · 1 line
Jagan.
PATCH 1/1 imx:mx6slevk add spi nor boot support
Hi Jagan,
Quoted 37 lines · Jagan Teki
Quoted 36 lines · Peng Fan
Add spi nor boot support for mx6slevk board.
Signed-off-by Peng Fan <[email protected]>--- board/freescale/mx6slevk/MAINTAINERS | 1 + configs/mx6slevk_spinor_defconfig | 3 +++ include/configs/mx6slevk.h | 13 ++++++++++++- 3 files changed, 16 insertions(+), 1 deletion(-)create mode 100644 configs/mx6slevk_spinor_defconfig
board/freescale/mx6slevk/MAINTAINERS +1
-0@@ -4,3 +4,4 @@ S: Maintained F: board/freescale/mx6slevk/ F: include/configs/mx6slevk.h F: configs/mx6slevk_defconfig +F: configs/mx6slevk_spinor_defconfigconfigs/mx6slevk_spinor_defconfig new file +3
-0@@ -0,0 +1,3 @@ +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6slevk/imximage.cfg,MX6SL,SYS_BOOT_SPINOR" +CONFIG_ARM=y +CONFIG_TARGET_MX6SLEVK=yinclude/configs/mx6slevk.h +0
-0@@ -187,9 +187,20 @@/* FLASH and environment organization */ #define CONFIG_SYS_NO_FLASH
Quoted 16 lines
include/configs/mx6slevk.h line 199
Quoted 11 lines
include/configs/mx6slevk.h +9
-1-#define CONFIG_ENV_OFFSET (6 * SZ_64K)#define CONFIG_ENV_SIZE SZ_8K + +#if definedCONFIG_SYS_BOOT_SPINOR +#define 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_SPEEDIf you need default values may be you couldn't define these so-that
common/env_sf.c
will take the defaults for undefs - please check.
Default values are defined in mx6slevk.h
#define CONFIG_SF_DEFAULT_BUS 0
#define CONFIG_SF_DEFAULT_CS 0
#define CONFIG_SF_DEFAULT_SPEED 20000000
#define CONFIG_SF_DEFAULT_MODE SPI_MODE_0
In env_sf.c
I did not see any undefs, there is only a piece of code like:
#ifndef CONFIG_ENV_SPI_BUS
#define CONFIG_ENV_SPI_BUS 0
#endif
Quoted 5 lines
Quoted 5 lines
include/configs/mx6slevk.h +3
-0+#else +#define CONFIG_ENV_OFFSET (6 * SZ_64K)#define CONFIG_ENV_IS_IN_MMC +#endif
Quoted 8 lines
Quoted 5 lines
include/configs/mx6slevk.h +0
-1#define CONFIG_OF_LIBFDT #define CONFIG_CMD_BOOTZ --1.8.4
thanks!
Regards,
Peng Fan
PATCH 1/1 imx:mx6slevk add spi nor boot support
Quoted 82 lines · Peng Fan
Hi Jagan,
Quoted 42 lines · Jagan Teki
Quoted 40 lines · Peng Fan
Add spi nor boot support for mx6slevk board.
Signed-off-by Peng Fan <[email protected]>--- board/freescale/mx6slevk/MAINTAINERS | 1 + configs/mx6slevk_spinor_defconfig | 3 +++ include/configs/mx6slevk.h | 13 ++++++++++++- 3 files changed, 16 insertions(+), 1 deletion(-)create mode 100644 configs/mx6slevk_spinor_defconfig
board/freescale/mx6slevk/MAINTAINERS +1
-0@@ -4,3 +4,4 @@ S: Maintained F: board/freescale/mx6slevk/ F: include/configs/mx6slevk.h F: configs/mx6slevk_defconfig +F: configs/mx6slevk_spinor_defconfigconfigs/mx6slevk_spinor_defconfig new file +3
-0@@ -0,0 +1,3 @@ +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6slevk/imximage.cfg,MX6SL,SYS_BOOT_SPINOR" +CONFIG_ARM=y +CONFIG_TARGET_MX6SLEVK=yinclude/configs/mx6slevk.h +0
-0@@ -187,9 +187,20 @@/* FLASH and environment organization */ #define CONFIG_SYS_NO_FLASH Quoted 17 lines
include/configs/mx6slevk.h line 199
Quoted 11 lines
include/configs/mx6slevk.h +9
-1-#define CONFIG_ENV_OFFSET (6 * SZ_64K)#define CONFIG_ENV_SIZE SZ_8K + +#if definedCONFIG_SYS_BOOT_SPINOR +#define 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_SPEEDIf you need default values may be you couldn't define these so-that
common/env_sf.c
will take the defaults for undefs - please check.Default values are defined in
mx6slevk.h#define
CONFIG_SF_DEFAULT_BUS0
#defineCONFIG_SF_DEFAULT_CS0
#defineCONFIG_SF_DEFAULT_SPEED20000000
#defineCONFIG_SF_DEFAULT_MODESPI_MODE_0In
env_sf.c
I did not see any undefs, there is only a piece of code like:
#ifndefCONFIG_ENV_SPI_BUS
#defineCONFIG_ENV_SPI_BUS0
#endifQuoted 5 lines
Quoted 5 lines
include/configs/mx6slevk.h +3
-0+#else +#define CONFIG_ENV_OFFSET (6 * SZ_64K)#define CONFIG_ENV_IS_IN_MMC +#endif
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
include/configs/mx6slevk.h +0
-1#define CONFIG_OF_LIBFDT #define CONFIG_CMD_BOOTZ --1.8.4
Applied to u-boot-spi/master
thanks!
Signature · 1 line
Jagan.