[U-Boot] [PATCH v6 62/76] configs: Use CONFIG_MTD_SPI_NOR

Jagan Teki
2016-02-14T20:49:01Z

for conditional construct
CONFIG_SPI_FLASH => CONFIG_MTD_SPI_NOR

for defines replace
CONFIG_SPI_FLASH => CONFIG_MTD_M25P80 and CONFIG_MTD_SPI_NOR

c: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Mugunthan V N <mugunthanvnm@ti.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
---
board/davinci/ea20/ea20.c | 2 +-
include/configs/MPC8536DS.h | 2 +-
include/configs/T208xQDS.h | 2 +-
include/configs/T208xRDB.h | 2 +-
include/configs/UCP1020.h | 4 ++--
include/configs/bfin_adi_common.h | 2 +-
include/configs/cgtqmx6eval.h | 3 ++-
include/configs/cm_t43.h | 6 ++++--
include/configs/dreamplug.h | 2 +-
include/configs/exynos5-common.h | 2 +-
include/configs/gw_ventana.h | 10 +++++-----
include/configs/ls2080aqds.h | 3 ++-
include/configs/ls2080ardb.h | 3 ++-
include/configs/lsxl.h | 2 +-
include/configs/mx6ul_14x14_evk.h | 3 ++-
include/configs/mx7dsabresd.h | 3 ++-
include/configs/p1_p2_rdb_pc.h | 2 +-
include/configs/pcm052.h | 3 ++-
include/configs/rk3036_common.h | 2 +-
include/configs/rk3288_common.h | 2 +-
include/configs/tegra-common-usb-gadget.h | 2 +-
21 files changed, 35 insertions(+), 27 deletions(-)

diff --git a/board/davinci/ea20/ea20.c b/board/davinci/ea20/ea20.c
index 66804d7..ef72d6b 100644
--- a/board/davinci/ea20/ea20.c
+++ b/board/davinci/ea20/ea20.c
@@ -160,7 +160,7 @@ const struct pinmux_config halten_pin[] = {
};

static const struct pinmux_resource pinmuxes[] = {
-#ifdef CONFIG_SPI_FLASH
+#ifdef CONFIG_MTD_SPI_NOR
PINMUX_ITEM(spi1_pins),
#endif
PINMUX_ITEM(uart_pins),
diff --git a/include/configs/MPC8536DS.h b/include/configs/MPC8536DS.h
index 294be3b..2df74a9 100644
--- a/include/configs/MPC8536DS.h
+++ b/include/configs/MPC8536DS.h
@@ -420,7 +420,7 @@
*/
#define CONFIG_HARD_SPI

-#if defined(CONFIG_SPI_FLASH)
+#if defined(CONFIG_MTD_SPI_NOR)
#define CONFIG_CMD_SF
#define CONFIG_SF_DEFAULT_SPEED 10000000
#define CONFIG_SF_DEFAULT_MODE 0
diff --git a/include/configs/T208xQDS.h b/include/configs/T208xQDS.h
index a56208c..2acf079 100644
--- a/include/configs/T208xQDS.h
+++ b/include/configs/T208xQDS.h
@@ -549,7 +549,7 @@ unsigned long get_board_ddr_clk(void);
/*
* eSPI - Enhanced SPI
*/
-#ifdef CONFIG_SPI_FLASH
+#ifdef CONFIG_MTD_SPI_NOR
#ifndef CONFIG_SPL_BUILD
#endif

diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h
index b5290a1..3b9f2f7 100644
--- a/include/configs/T208xRDB.h
+++ b/include/configs/T208xRDB.h
@@ -503,7 +503,7 @@ unsigned long get_board_ddr_clk(void);
/*
* eSPI - Enhanced SPI
*/
-#ifdef CONFIG_SPI_FLASH
+#ifdef CONFIG_MTD_SPI_NOR
#define CONFIG_SPI_FLASH_BAR
#define CONFIG_CMD_SF
#define CONFIG_SF_DEFAULT_SPEED 10000000
diff --git a/include/configs/UCP1020.h b/include/configs/UCP1020.h
index 2354009..934d7d1 100644
--- a/include/configs/UCP1020.h
+++ b/include/configs/UCP1020.h
@@ -45,7 +45,7 @@
#define CONFIG_NETMASK 255.255.252.0
#define CONFIG_ETHPRIME "eTSEC3"

-#ifndef CONFIG_SPI_FLASH
+#ifndef CONFIG_MTD_SPI_NOR
#endif
#define CONFIG_SYS_REDUNDAND_ENVIRONMENT

@@ -86,7 +86,7 @@
#define CONFIG_NETMASK 255.255.255.0
#define CONFIG_ETHPRIME "eTSEC1"

-#ifndef CONFIG_SPI_FLASH
+#ifndef CONFIG_MTD_SPI_NOR
#endif
#define CONFIG_SYS_REDUNDAND_ENVIRONMENT

diff --git a/include/configs/bfin_adi_common.h b/include/configs/bfin_adi_common.h
index 9c537e0..fb9d5bf 100644
--- a/include/configs/bfin_adi_common.h
+++ b/include/configs/bfin_adi_common.h
@@ -64,7 +64,7 @@
# if defined(CONFIG_BFIN_SPI) || defined(CONFIG_SOFT_SPI)
# define CONFIG_CMD_SPI
# endif
-# ifdef CONFIG_SPI_FLASH
+# ifdef CONFIG_MTD_SPI_NOR
# define CONFIG_CMD_SF
# endif
# if defined(CONFIG_SYS_I2C) || defined(CONFIG_SYS_I2C_SOFT)
diff --git a/include/configs/cgtqmx6eval.h b/include/configs/cgtqmx6eval.h
index 487c011..9dd883f 100644
--- a/include/configs/cgtqmx6eval.h
+++ b/include/configs/cgtqmx6eval.h
@@ -42,7 +42,8 @@

/* SPI NOR */
#define CONFIG_CMD_SF
-#define CONFIG_SPI_FLASH
+#define CONFIG_MTD_SPI_NOR
+#define CONFIG_MTD_M25P80
#define CONFIG_SPI_FLASH_STMICRO
#define CONFIG_SPI_FLASH_SST
#define CONFIG_MXC_SPI
diff --git a/include/configs/cm_t43.h b/include/configs/cm_t43.h
index d3cd38d..a4cd470 100644
--- a/include/configs/cm_t43.h
+++ b/include/configs/cm_t43.h
@@ -68,9 +68,11 @@
#define CONFIG_AM437X_USB2PHY2_HOST

/* SPI Flash support */
-#define CONFIG_SPI_FLASH
+#define CONFIG_MTD_SPI_NOR
+#define CONFIG_MTD_M25P80
#define CONFIG_TI_SPI_MMAP
-#define CONFIG_SPI_FLASH_BAR
+#define CONFIG_MTD_SPI_NOR
+#define CONFIG_MTD_M25P80_BAR
#define CONFIG_SF_DEFAULT_SPEED 48000000
#define CONFIG_DEFAULT_SPI_MODE SPI_MODE_3

diff --git a/include/configs/dreamplug.h b/include/configs/dreamplug.h
index 0b7d89b..a9e1219 100644
--- a/include/configs/dreamplug.h
+++ b/include/configs/dreamplug.h
@@ -51,7 +51,7 @@
/*
* Environment variables configurations
*/
-#ifdef CONFIG_SPI_FLASH
+#ifdef CONFIG_MTD_SPI_NOR
#define CONFIG_ENV_IS_IN_SPI_FLASH 1
#define CONFIG_ENV_SECT_SIZE 0x10000 /* 64k */
#else
diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h
index 9c3ea88..d9a4584 100644
--- a/include/configs/exynos5-common.h
+++ b/include/configs/exynos5-common.h
@@ -128,7 +128,7 @@
#define CONFIG_I2C_EDID

/* SPI */
-#ifdef CONFIG_SPI_FLASH
+#ifdef CONFIG_MTD_SPI_NOR
#define CONFIG_CMD_SF
#define CONFIG_CMD_SPI
#define CONFIG_SF_DEFAULT_MODE SPI_MODE_0
diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h
index b7b9c78..01db2ec 100644
--- a/include/configs/gw_ventana.h
+++ b/include/configs/gw_ventana.h
@@ -62,7 +62,7 @@
#define CONFIG_MXC_UART
#define CONFIG_MXC_UART_BASE UART2_BASE

-#ifdef CONFIG_SPI_FLASH
+#ifdef CONFIG_MTD_SPI_NOR

/* SPI */
#define CONFIG_CMD_SF
@@ -95,7 +95,7 @@
#define CONFIG_APBH_DMA_BURST8
#endif

-#endif /* CONFIG_SPI_FLASH */
+#endif /* CONFIG_MTD_SPI_NOR */

/* Flattened Image Tree Suport */
#define CONFIG_FIT
@@ -254,7 +254,7 @@
#define CONFIG_CMD_MTDPARTS
#define CONFIG_MTD_DEVICE
#define CONFIG_MTD_PARTITIONS
-#ifdef CONFIG_SPI_FLASH
+#ifdef CONFIG_MTD_SPI_NOR
#define MTDIDS_DEFAULT "nor0=nor"
#define MTDPARTS_DEFAULT \
"mtdparts=nor:512k(uboot),64k(env),2m(kernel),-(rootfs)"
@@ -264,7 +264,7 @@
#endif

/* Persistent Environment Config */
-#ifdef CONFIG_SPI_FLASH
+#ifdef CONFIG_MTD_SPI_NOR
#define CONFIG_ENV_IS_IN_SPI_FLASH
#else
#define CONFIG_ENV_IS_IN_NAND
@@ -370,7 +370,7 @@
"fi; " \
"fi\0"

-#ifdef CONFIG_SPI_FLASH
+#ifdef CONFIG_MTD_SPI_NOR
#define CONFIG_EXTRA_ENV_SETTINGS \
CONFIG_EXTRA_ENV_SETTINGS_COMMON \
"image_os=ventana/openwrt-imx6-imx6q-gw5400-a-squashfs.bin\0" \
diff --git a/include/configs/ls2080aqds.h b/include/configs/ls2080aqds.h
index a402c06..81eb7a4 100644
--- a/include/configs/ls2080aqds.h
+++ b/include/configs/ls2080aqds.h
@@ -284,7 +284,8 @@ unsigned long get_board_ddr_clk(void);
/* SPI */
#ifdef CONFIG_FSL_DSPI
#define CONFIG_CMD_SF
-#define CONFIG_SPI_FLASH
+#define CONFIG_MTD_SPI_NOR
+#define CONFIG_MTD_M25P80
#endif

/*
diff --git a/include/configs/ls2080ardb.h b/include/configs/ls2080ardb.h
index 116dbcd..a0c808e 100644
--- a/include/configs/ls2080ardb.h
+++ b/include/configs/ls2080ardb.h
@@ -257,7 +257,8 @@ unsigned long get_board_sys_clk(void);
/* SPI */
#ifdef CONFIG_FSL_DSPI
#define CONFIG_CMD_SF
-#define CONFIG_SPI_FLASH
+#define CONFIG_MTD_SPI_NOR
+#define CONFIG_MTD_M25P80
#define CONFIG_SPI_FLASH_BAR
#endif

diff --git a/include/configs/lsxl.h b/include/configs/lsxl.h
index 19ee5bc..a5ea845 100644
--- a/include/configs/lsxl.h
+++ b/include/configs/lsxl.h
@@ -89,7 +89,7 @@
/*
* Environment variables configurations
*/
-#ifdef CONFIG_SPI_FLASH
+#ifdef CONFIG_MTD_SPI_NOR
#define CONFIG_SYS_MAX_FLASH_BANKS 1
#define CONFIG_SYS_MAX_FLASH_SECT 8
#define CONFIG_ENV_IS_IN_SPI_FLASH 1
diff --git a/include/configs/mx6ul_14x14_evk.h b/include/configs/mx6ul_14x14_evk.h
index 4374c3a..861715a 100644
--- a/include/configs/mx6ul_14x14_evk.h
+++ b/include/configs/mx6ul_14x14_evk.h
@@ -197,7 +197,8 @@

#ifdef CONFIG_FSL_QSPI
#define CONFIG_CMD_SF
-#define CONFIG_SPI_FLASH
+#define CONFIG_MTD_SPI_NOR
+#define CONFIG_MTD_M25P80
#define CONFIG_SPI_FLASH_BAR
#define CONFIG_SF_DEFAULT_BUS 0
#define CONFIG_SF_DEFAULT_CS 0
diff --git a/include/configs/mx7dsabresd.h b/include/configs/mx7dsabresd.h
index d23e4f3..4db5f76 100644
--- a/include/configs/mx7dsabresd.h
+++ b/include/configs/mx7dsabresd.h
@@ -263,7 +263,8 @@

#ifdef CONFIG_FSL_QSPI
#define CONFIG_CMD_SF
-#define CONFIG_SPI_FLASH
+#define CONFIG_MTD_SPI_NOR
+#define CONFIG_MTD_M25P80
#define CONFIG_SPI_FLASH_MACRONIX
#define CONFIG_SPI_FLASH_BAR
#define CONFIG_SF_DEFAULT_BUS 0
diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h
index 60bedaa..4c6eedd 100644
--- a/include/configs/p1_p2_rdb_pc.h
+++ b/include/configs/p1_p2_rdb_pc.h
@@ -709,7 +709,7 @@
*/
#define CONFIG_HARD_SPI

-#if defined(CONFIG_SPI_FLASH)
+#if defined(CONFIG_MTD_SPI_NOR)
#define CONFIG_CMD_SF
#define CONFIG_SF_DEFAULT_SPEED 10000000
#define CONFIG_SF_DEFAULT_MODE 0
diff --git a/include/configs/pcm052.h b/include/configs/pcm052.h
index 9d80306..eb6130d 100644
--- a/include/configs/pcm052.h
+++ b/include/configs/pcm052.h
@@ -98,7 +98,8 @@

#ifdef CONFIG_FSL_QSPI
#define CONFIG_CMD_SF
-#define CONFIG_SPI_FLASH
+#define CONFIG_MTD_SPI_NOR
+#define CONFIG_MTD_M25P80
#define FSL_QSPI_FLASH_SIZE (1 << 24)
#define FSL_QSPI_FLASH_NUM 2
#define CONFIG_SYS_FSL_QSPI_LE
diff --git a/include/configs/rk3036_common.h b/include/configs/rk3036_common.h
index 368d046..c38d0e2 100644
--- a/include/configs/rk3036_common.h
+++ b/include/configs/rk3036_common.h
@@ -66,7 +66,7 @@
#define CONFIG_NR_DRAM_BANKS 1
#define SDRAM_BANK_SIZE (512UL << 20UL)

-#define CONFIG_SPI_FLASH
+#define CONFIG_MTD_SPI_NOR
#define CONFIG_SPI
#define CONFIG_CMD_SF
#define CONFIG_CMD_SPI
diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h
index 427ac4b..550b6d9 100644
--- a/include/configs/rk3288_common.h
+++ b/include/configs/rk3288_common.h
@@ -87,7 +87,7 @@
#define CONFIG_NR_DRAM_BANKS 1
#define SDRAM_BANK_SIZE (2UL << 30)

-#define CONFIG_SPI_FLASH
+#define CONFIG_MTD_SPI_NOR
#define CONFIG_SPI
#define CONFIG_CMD_SF
#define CONFIG_CMD_SPI
diff --git a/include/configs/tegra-common-usb-gadget.h b/include/configs/tegra-common-usb-gadget.h
index f6e1d5c..30e6f9c 100644
--- a/include/configs/tegra-common-usb-gadget.h
+++ b/include/configs/tegra-common-usb-gadget.h
@@ -36,7 +36,7 @@
#ifdef CONFIG_MMC
#define CONFIG_DFU_MMC
#endif
-#ifdef CONFIG_SPI_FLASH
+#ifdef CONFIG_MTD_SPI_NOR
#define CONFIG_DFU_SF
#endif
#define CONFIG_DFU_RAM
--
1.9.1