aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini2022-10-28 20:27:04 -0400
committerTom Rini2022-11-10 10:08:54 -0500
commita918df21f09739e4d0f91937b88f3804696a0f41 (patch)
tree96e143c7df24720072bd23479bf15dfdf7725fff /include
parente28e0f47f3df1264824f1c8bc8c1a5174a9f3cee (diff)
Convert CONFIG_SYS_MAX_NAND_DEVICE to Kconfig
This converts the following to Kconfig: CONFIG_SYS_MAX_NAND_DEVICE Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/configs/M5329EVB.h1
-rw-r--r--include/configs/M5373EVB.h1
-rw-r--r--include/configs/MCR3000.h1
-rw-r--r--include/configs/P1010RDB.h1
-rw-r--r--include/configs/P2041RDB.h1
-rw-r--r--include/configs/T102xRDB.h1
-rw-r--r--include/configs/T104xRDB.h1
-rw-r--r--include/configs/T208xQDS.h1
-rw-r--r--include/configs/T208xRDB.h1
-rw-r--r--include/configs/T4240RDB.h1
-rw-r--r--include/configs/at91sam9260ek.h1
-rw-r--r--include/configs/at91sam9261ek.h1
-rw-r--r--include/configs/at91sam9263ek.h1
-rw-r--r--include/configs/at91sam9m10g45ek.h1
-rw-r--r--include/configs/at91sam9n12ek.h1
-rw-r--r--include/configs/at91sam9rlek.h1
-rw-r--r--include/configs/at91sam9x5ek.h1
-rw-r--r--include/configs/bcm963158.h4
-rw-r--r--include/configs/bcm96855.h4
-rw-r--r--include/configs/bcm96856.h4
-rw-r--r--include/configs/bcm96858.h4
-rw-r--r--include/configs/bk4r1.h1
-rw-r--r--include/configs/broadcom_bcm968380gerg.h3
-rw-r--r--include/configs/cm_fx6.h1
-rw-r--r--include/configs/colibri-imx6ull.h1
-rw-r--r--include/configs/colibri_imx7.h1
-rw-r--r--include/configs/colibri_t20.h1
-rw-r--r--include/configs/colibri_vf.h1
-rw-r--r--include/configs/comtrend_vr3032u.h3
-rw-r--r--include/configs/corvus.h1
-rw-r--r--include/configs/da850evm.h1
-rw-r--r--include/configs/devkit3250.h1
-rw-r--r--include/configs/etamin.h2
-rw-r--r--include/configs/ethernut5.h1
-rw-r--r--include/configs/gardena-smart-gateway-at91sam.h1
-rw-r--r--include/configs/gw_ventana.h1
-rw-r--r--include/configs/harmony.h1
-rw-r--r--include/configs/imx27lite-common.h1
-rw-r--r--include/configs/imx6-engicam.h1
-rw-r--r--include/configs/imx6_logic.h1
-rw-r--r--include/configs/imx6ulz_smm_m2.h1
-rw-r--r--include/configs/imx8mn_bsh_smm_s2.h1
-rw-r--r--include/configs/imx8mp_rsb3720.h1
-rw-r--r--include/configs/km/km-mpc83xx.h1
-rw-r--r--include/configs/km/pg-wcom-ls102xa.h1
-rw-r--r--include/configs/kmcent2.h1
-rw-r--r--include/configs/kmcoge5ne.h1
-rw-r--r--include/configs/ls1021aqds.h1
-rw-r--r--include/configs/ls1043aqds.h1
-rw-r--r--include/configs/ls1043ardb.h1
-rw-r--r--include/configs/ls1046afrwy.h1
-rw-r--r--include/configs/ls1046aqds.h1
-rw-r--r--include/configs/ls1046ardb.h1
-rw-r--r--include/configs/ls1088aqds.h1
-rw-r--r--include/configs/ls1088ardb.h1
-rw-r--r--include/configs/ls2080aqds.h1
-rw-r--r--include/configs/ls2080ardb.h1
-rw-r--r--include/configs/m53menlo.h1
-rw-r--r--include/configs/medcom-wide.h1
-rw-r--r--include/configs/meesc.h1
-rw-r--r--include/configs/mt7621.h1
-rw-r--r--include/configs/mv-common.h3
-rw-r--r--include/configs/mvebu_armada-8k.h2
-rw-r--r--include/configs/mx6sabreauto.h1
-rw-r--r--include/configs/mx6sxsabreauto.h1
-rw-r--r--include/configs/mx7dsabresd.h1
-rw-r--r--include/configs/mxs.h1
-rw-r--r--include/configs/mys_6ulx.h1
-rw-r--r--include/configs/npi_imx6ull.h1
-rw-r--r--include/configs/octeontx_common.h4
-rw-r--r--include/configs/omap3_beagle.h1
-rw-r--r--include/configs/omap3_evm.h1
-rw-r--r--include/configs/omap3_logic.h1
-rw-r--r--include/configs/omapl138_lcdk.h1
-rw-r--r--include/configs/p1_p2_rdb_pc.h1
-rw-r--r--include/configs/pcl063.h1
-rw-r--r--include/configs/pcl063_ull.h1
-rw-r--r--include/configs/pcm052.h2
-rw-r--r--include/configs/pcm058.h1
-rw-r--r--include/configs/plutux.h1
-rw-r--r--include/configs/pm9261.h1
-rw-r--r--include/configs/pm9263.h1
-rw-r--r--include/configs/pm9g45.h1
-rw-r--r--include/configs/presidio_asic.h1
-rw-r--r--include/configs/sam9x60ek.h1
-rw-r--r--include/configs/sama5d2_ptc_ek.h1
-rw-r--r--include/configs/sama5d3_xplained.h1
-rw-r--r--include/configs/sama5d3xek.h1
-rw-r--r--include/configs/sama5d4_xplained.h1
-rw-r--r--include/configs/sama5d4ek.h1
-rw-r--r--include/configs/seaboard.h1
-rw-r--r--include/configs/siemens-am33x-common.h2
-rw-r--r--include/configs/smartweb.h1
-rw-r--r--include/configs/snapper9g45.h1
-rw-r--r--include/configs/socfpga_common.h1
-rw-r--r--include/configs/socrates.h1
-rw-r--r--include/configs/stm32mp13_common.h1
-rw-r--r--include/configs/stm32mp15_common.h1
-rw-r--r--include/configs/sunxi-common.h1
-rw-r--r--include/configs/taurus.h1
-rw-r--r--include/configs/tec.h1
-rw-r--r--include/configs/ti816x_evm.h1
-rw-r--r--include/configs/ti_armv7_keystone2.h1
-rw-r--r--include/configs/ti_armv7_omap.h1
-rw-r--r--include/configs/uniphier.h1
-rw-r--r--include/configs/usb_a9263.h1
-rw-r--r--include/configs/vf610twr.h1
-rw-r--r--include/configs/work_92105.h1
-rw-r--r--include/configs/x530.h1
-rw-r--r--include/configs/xilinx_zynqmp.h4
-rw-r--r--include/configs/zynq-common.h4
111 files changed, 0 insertions, 142 deletions
diff --git a/include/configs/M5329EVB.h b/include/configs/M5329EVB.h
index a6c953f1a46..474480cc1c2 100644
--- a/include/configs/M5329EVB.h
+++ b/include/configs/M5329EVB.h
@@ -95,7 +95,6 @@
#endif
#ifdef CONFIG_CMD_NAND
-# define CONFIG_SYS_MAX_NAND_DEVICE 1
# define CONFIG_SYS_NAND_BASE CONFIG_SYS_CS2_BASE
# define CONFIG_SYS_NAND_SIZE 1
# define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
diff --git a/include/configs/M5373EVB.h b/include/configs/M5373EVB.h
index f519bef2474..2e1c8579e90 100644
--- a/include/configs/M5373EVB.h
+++ b/include/configs/M5373EVB.h
@@ -96,7 +96,6 @@
# define CONFIG_SYS_FLASH_SIZE 0x800000 /* Max size that the board might have */
#endif
-# define CONFIG_SYS_MAX_NAND_DEVICE 1
# define CONFIG_SYS_NAND_BASE CONFIG_SYS_CS2_BASE
# define CONFIG_SYS_NAND_SIZE 1
# define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
diff --git a/include/configs/MCR3000.h b/include/configs/MCR3000.h
index 1c467025ef6..371ae20eee5 100644
--- a/include/configs/MCR3000.h
+++ b/include/configs/MCR3000.h
@@ -83,7 +83,6 @@
/* Ethernet configuration part */
/* NAND configuration part */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x0C000000
#endif /* __CONFIG_H */
diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h
index b87118c1ed2..88d9bec9d92 100644
--- a/include/configs/P1010RDB.h
+++ b/include/configs/P1010RDB.h
@@ -202,7 +202,6 @@ extern unsigned long get_sdram_size(void);
#endif
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#if defined(CONFIG_TARGET_P1010RDB_PA)
/* NAND Flash Timing Params */
diff --git a/include/configs/P2041RDB.h b/include/configs/P2041RDB.h
index 60b0963648c..317784e1cfd 100644
--- a/include/configs/P2041RDB.h
+++ b/include/configs/P2041RDB.h
@@ -119,7 +119,6 @@
#endif
#define CONFIG_SYS_NAND_BASE_LIST {CONFIG_SYS_NAND_BASE}
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
/* NAND flash config */
#define CONFIG_SYS_NAND_BR_PRELIM (BR_PHYS_ADDR(CONFIG_SYS_NAND_BASE_PHYS) \
diff --git a/include/configs/T102xRDB.h b/include/configs/T102xRDB.h
index f6a911cc177..88700cb877b 100644
--- a/include/configs/T102xRDB.h
+++ b/include/configs/T102xRDB.h
@@ -236,7 +236,6 @@
#define CONFIG_SYS_NAND_DDR_LAW 11
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#if defined(CONFIG_MTD_RAW_NAND)
#define CONFIG_SYS_CSPR0_EXT CONFIG_SYS_NAND_CSPR_EXT
diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h
index d9ee8736adc..6474b6f21bd 100644
--- a/include/configs/T104xRDB.h
+++ b/include/configs/T104xRDB.h
@@ -212,7 +212,6 @@
#define CONFIG_SYS_NAND_DDR_LAW 11
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#if defined(CONFIG_MTD_RAW_NAND)
#define CONFIG_SYS_CSPR0_EXT CONFIG_SYS_NAND_CSPR_EXT
diff --git a/include/configs/T208xQDS.h b/include/configs/T208xQDS.h
index 6701eab1155..10126a876e5 100644
--- a/include/configs/T208xQDS.h
+++ b/include/configs/T208xQDS.h
@@ -200,7 +200,6 @@
#define CONFIG_SYS_NAND_DDR_LAW 11
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#if defined(CONFIG_MTD_RAW_NAND)
#define CONFIG_SYS_CSPR0_EXT CONFIG_SYS_NAND_CSPR_EXT
diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h
index 86c92de50e9..a74225b61e6 100644
--- a/include/configs/T208xRDB.h
+++ b/include/configs/T208xRDB.h
@@ -176,7 +176,6 @@
#define CONFIG_SYS_NAND_DDR_LAW 11
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#if defined(CONFIG_MTD_RAW_NAND)
#define CONFIG_SYS_CSPR0_EXT CONFIG_SYS_NAND_CSPR_EXT
diff --git a/include/configs/T4240RDB.h b/include/configs/T4240RDB.h
index 1ad82238b27..42d1095be87 100644
--- a/include/configs/T4240RDB.h
+++ b/include/configs/T4240RDB.h
@@ -235,7 +235,6 @@
#define CONFIG_SYS_NAND_DDR_LAW 11
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#if defined(CONFIG_MTD_RAW_NAND)
#define CONFIG_SYS_CSPR0_EXT CONFIG_SYS_NAND_CSPR_EXT
diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h
index ca5815fe36b..d51da9d5067 100644
--- a/include/configs/at91sam9260ek.h
+++ b/include/configs/at91sam9260ek.h
@@ -43,7 +43,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE ATMEL_BASE_CS3
#define CONFIG_SYS_NAND_DBW_8
#define CONFIG_SYS_NAND_MASK_ALE (1 << 21)
diff --git a/include/configs/at91sam9261ek.h b/include/configs/at91sam9261ek.h
index 5576a5ffbe4..5dc8f21a853 100644
--- a/include/configs/at91sam9261ek.h
+++ b/include/configs/at91sam9261ek.h
@@ -24,7 +24,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x40000000
#define CONFIG_SYS_NAND_DBW_8
/* our ALE is AD22 */
diff --git a/include/configs/at91sam9263ek.h b/include/configs/at91sam9263ek.h
index fb65880f32e..3406373112b 100644
--- a/include/configs/at91sam9263ek.h
+++ b/include/configs/at91sam9263ek.h
@@ -152,7 +152,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE ATMEL_BASE_CS3
#define CONFIG_SYS_NAND_DBW_8 1
/* our ALE is AD21 */
diff --git a/include/configs/at91sam9m10g45ek.h b/include/configs/at91sam9m10g45ek.h
index 2d257c49831..9a6f80f278d 100644
--- a/include/configs/at91sam9m10g45ek.h
+++ b/include/configs/at91sam9m10g45ek.h
@@ -20,7 +20,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE ATMEL_BASE_CS3
#define CONFIG_SYS_NAND_DBW_8
/* our ALE is AD21 */
diff --git a/include/configs/at91sam9n12ek.h b/include/configs/at91sam9n12ek.h
index f2ca4f3d0ba..862179bd9e7 100644
--- a/include/configs/at91sam9n12ek.h
+++ b/include/configs/at91sam9n12ek.h
@@ -21,7 +21,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x40000000
#define CONFIG_SYS_NAND_MASK_ALE (1 << 21)
#define CONFIG_SYS_NAND_MASK_CLE (1 << 22)
diff --git a/include/configs/at91sam9rlek.h b/include/configs/at91sam9rlek.h
index bc687fc44d8..c60c248b747 100644
--- a/include/configs/at91sam9rlek.h
+++ b/include/configs/at91sam9rlek.h
@@ -25,7 +25,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE ATMEL_BASE_CS3
#define CONFIG_SYS_NAND_DBW_8 1
/* our ALE is AD21 */
diff --git a/include/configs/at91sam9x5ek.h b/include/configs/at91sam9x5ek.h
index 0e7665843db..71246ce0e2b 100644
--- a/include/configs/at91sam9x5ek.h
+++ b/include/configs/at91sam9x5ek.h
@@ -27,7 +27,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x40000000
#define CONFIG_SYS_NAND_DBW_8 1
/* our ALE is AD21 */
diff --git a/include/configs/bcm963158.h b/include/configs/bcm963158.h
index f4739633586..b15c4111c96 100644
--- a/include/configs/bcm963158.h
+++ b/include/configs/bcm963158.h
@@ -8,8 +8,4 @@
#define CONFIG_SYS_SDRAM_BASE 0x00000000
-#ifdef CONFIG_MTD_RAW_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
-#endif /* CONFIG_MTD_RAW_NAND */
-
#endif
diff --git a/include/configs/bcm96855.h b/include/configs/bcm96855.h
index ba2d8a317d2..6e420f2c66f 100644
--- a/include/configs/bcm96855.h
+++ b/include/configs/bcm96855.h
@@ -8,8 +8,4 @@
#define CONFIG_SYS_SDRAM_BASE 0x00000000
-#ifdef CONFIG_MTD_RAW_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
-#endif /* CONFIG_MTD_RAW_NAND */
-
#endif
diff --git a/include/configs/bcm96856.h b/include/configs/bcm96856.h
index 3050cf33722..a7ae71eeaaf 100644
--- a/include/configs/bcm96856.h
+++ b/include/configs/bcm96856.h
@@ -8,8 +8,4 @@
#define CONFIG_SYS_SDRAM_BASE 0x00000000
-#ifdef CONFIG_MTD_RAW_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
-#endif /* CONFIG_MTD_RAW_NAND */
-
#endif
diff --git a/include/configs/bcm96858.h b/include/configs/bcm96858.h
index 8bd1169207f..4e584b41fb3 100644
--- a/include/configs/bcm96858.h
+++ b/include/configs/bcm96858.h
@@ -8,8 +8,4 @@
#define CONFIG_SYS_SDRAM_BASE 0x00000000
-#ifdef CONFIG_MTD_RAW_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
-#endif /* CONFIG_MTD_RAW_NAND */
-
#endif
diff --git a/include/configs/bk4r1.h b/include/configs/bk4r1.h
index b3e1fddc02f..ca2bc1907e3 100644
--- a/include/configs/bk4r1.h
+++ b/include/configs/bk4r1.h
@@ -51,7 +51,6 @@
#include <linux/sizes.h>
/* NAND support */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define IMX_FEC1_BASE ENET1_BASE_ADDR
diff --git a/include/configs/broadcom_bcm968380gerg.h b/include/configs/broadcom_bcm968380gerg.h
index c1c1b37fabd..bad143981a7 100644
--- a/include/configs/broadcom_bcm968380gerg.h
+++ b/include/configs/broadcom_bcm968380gerg.h
@@ -6,6 +6,3 @@
#include <configs/bmips_common.h>
#include <configs/bmips_bcm6838.h>
-#ifdef CONFIG_MTD_RAW_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
-#endif /* CONFIG_MTD_RAW_NAND */
diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h
index cbba7264400..e5e8c13090a 100644
--- a/include/configs/cm_fx6.h
+++ b/include/configs/cm_fx6.h
@@ -129,7 +129,6 @@
/* NAND */
#define CONFIG_SYS_NAND_BASE 0x40000000
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
/* APBH DMA is required for NAND support */
/* Ethernet */
diff --git a/include/configs/colibri-imx6ull.h b/include/configs/colibri-imx6ull.h
index 321edabe984..31426b65ad5 100644
--- a/include/configs/colibri-imx6ull.h
+++ b/include/configs/colibri-imx6ull.h
@@ -122,7 +122,6 @@
#ifdef CONFIG_TARGET_COLIBRI_IMX6ULL_NAND
/* NAND stuff */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
/* used to initialize CONFIG_SYS_NAND_BASE_LIST which is unused */
#define CONFIG_SYS_NAND_BASE -1
#endif
diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h
index b8d0dc959a7..c95b732f8dc 100644
--- a/include/configs/colibri_imx7.h
+++ b/include/configs/colibri_imx7.h
@@ -166,7 +166,6 @@
#ifdef CONFIG_TARGET_COLIBRI_IMX7_NAND
/* NAND stuff */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x40000000
#define CONFIG_SYS_NAND_MX7_GPMI_62_ECC_BYTES
#endif
diff --git a/include/configs/colibri_t20.h b/include/configs/colibri_t20.h
index 73d18444215..b758086b86d 100644
--- a/include/configs/colibri_t20.h
+++ b/include/configs/colibri_t20.h
@@ -16,7 +16,6 @@
#define CONFIG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE
/* NAND support */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define UBOOT_UPDATE \
"update_uboot=nand erase.part u-boot && " \
diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h
index 268afbb7fa3..0f6f99d244f 100644
--- a/include/configs/colibri_vf.h
+++ b/include/configs/colibri_vf.h
@@ -15,7 +15,6 @@
#include <linux/sizes.h>
/* NAND support */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_IPADDR 192.168.10.2
#define CONFIG_NETMASK 255.255.255.0
diff --git a/include/configs/comtrend_vr3032u.h b/include/configs/comtrend_vr3032u.h
index a46b3946bf5..e8b0724988f 100644
--- a/include/configs/comtrend_vr3032u.h
+++ b/include/configs/comtrend_vr3032u.h
@@ -6,6 +6,3 @@
#include <configs/bmips_common.h>
#include <configs/bmips_bcm63268.h>
-#ifdef CONFIG_MTD_RAW_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
-#endif /* CONFIG_MTD_RAW_NAND */
diff --git a/include/configs/corvus.h b/include/configs/corvus.h
index 5e43c217749..0596afbf9fa 100644
--- a/include/configs/corvus.h
+++ b/include/configs/corvus.h
@@ -37,7 +37,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE ATMEL_BASE_CS3
#define CONFIG_SYS_NAND_DBW_8
/* our ALE is AD21 */
diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index 58c902431d1..3625f923a5c 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -114,7 +114,6 @@
#define CONFIG_SYS_NAND_MASK_CLE 0x10
#define CONFIG_SYS_NAND_MASK_ALE 0x8
#undef CONFIG_SYS_NAND_HW_ECC
-#define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND devices */
#define CONFIG_SYS_NAND_HW_ECC_OOBFIRST
#define CONFIG_SYS_NAND_U_BOOT_SIZE 0x40000
#define CONFIG_SYS_NAND_U_BOOT_DST 0xc1080000
diff --git a/include/configs/devkit3250.h b/include/configs/devkit3250.h
index 66fb25bc029..e5639fb24bf 100644
--- a/include/configs/devkit3250.h
+++ b/include/configs/devkit3250.h
@@ -36,7 +36,6 @@
* NAND controller
*/
#define CONFIG_SYS_NAND_BASE SLC_NAND_BASE
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
/*
diff --git a/include/configs/etamin.h b/include/configs/etamin.h
index 7923fbb599d..75322a37322 100644
--- a/include/configs/etamin.h
+++ b/include/configs/etamin.h
@@ -45,8 +45,6 @@
#define CONFIG_SYS_NAND_ECCSIZE 512
#define CONFIG_SYS_NAND_ECCBYTES 26
-#undef CONFIG_SYS_MAX_NAND_DEVICE
-#define CONFIG_SYS_MAX_NAND_DEVICE 3
#define CONFIG_SYS_NAND_BASE2 (0x18000000) /* physical address */
#define CONFIG_SYS_NAND_BASE_LIST {CONFIG_SYS_NAND_BASE, \
CONFIG_SYS_NAND_BASE2}
diff --git a/include/configs/ethernut5.h b/include/configs/ethernut5.h
index 7a3c800dca9..22647abee0d 100644
--- a/include/configs/ethernut5.h
+++ b/include/configs/ethernut5.h
@@ -37,7 +37,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x40000000
#define CONFIG_SYS_NAND_DBW_8
/* our ALE is AD21 */
diff --git a/include/configs/gardena-smart-gateway-at91sam.h b/include/configs/gardena-smart-gateway-at91sam.h
index 635d0f01b23..a091ec5d4ec 100644
--- a/include/configs/gardena-smart-gateway-at91sam.h
+++ b/include/configs/gardena-smart-gateway-at91sam.h
@@ -22,7 +22,6 @@
#define CONFIG_SYS_SDRAM_SIZE 0x08000000 /* 128 megs */
/* NAND flash */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x40000000
#define CONFIG_SYS_NAND_DBW_8 1
/* our ALE is AD21 */
diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h
index bba64af2c91..714f8d88aff 100644
--- a/include/configs/gw_ventana.h
+++ b/include/configs/gw_ventana.h
@@ -20,7 +20,6 @@
#define CONFIG_MXC_UART_BASE UART2_BASE
/* NAND */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
/* MMC Configs */
#define CONFIG_SYS_FSL_ESDHC_ADDR 0
diff --git a/include/configs/harmony.h b/include/configs/harmony.h
index 879bd5c9539..fe4b02c0ce2 100644
--- a/include/configs/harmony.h
+++ b/include/configs/harmony.h
@@ -24,7 +24,6 @@
#endif
/* NAND support */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
/* Environment in NAND (which is 512M), aligned to start of last sector */
diff --git a/include/configs/imx27lite-common.h b/include/configs/imx27lite-common.h
index 6ebdc3d6f97..40428452954 100644
--- a/include/configs/imx27lite-common.h
+++ b/include/configs/imx27lite-common.h
@@ -97,7 +97,6 @@
* NAND
*/
#define CONFIG_MXC_NAND_REGS_BASE 0xd8000000
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0xd8000000
#define CONFIG_MXC_NAND_HWECC
diff --git a/include/configs/imx6-engicam.h b/include/configs/imx6-engicam.h
index fa73cabda36..f52367cc1a0 100644
--- a/include/configs/imx6-engicam.h
+++ b/include/configs/imx6-engicam.h
@@ -126,7 +126,6 @@
/* NAND */
#ifdef CONFIG_NAND_MXS
-# define CONFIG_SYS_MAX_NAND_DEVICE 1
# define CONFIG_SYS_NAND_BASE 0x40000000
# define CONFIG_SYS_NAND_U_BOOT_START CONFIG_TEXT_BASE
diff --git a/include/configs/imx6_logic.h b/include/configs/imx6_logic.h
index 9ab3f8abeff..a82641b6825 100644
--- a/include/configs/imx6_logic.h
+++ b/include/configs/imx6_logic.h
@@ -116,7 +116,6 @@
/* Environment organization */
/* NAND stuff */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x40000000
#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_TEXT_BASE
diff --git a/include/configs/imx6ulz_smm_m2.h b/include/configs/imx6ulz_smm_m2.h
index 50885c53b3b..46a96f1f828 100644
--- a/include/configs/imx6ulz_smm_m2.h
+++ b/include/configs/imx6ulz_smm_m2.h
@@ -71,7 +71,6 @@
#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
/* NAND */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x20000000
diff --git a/include/configs/imx8mn_bsh_smm_s2.h b/include/configs/imx8mn_bsh_smm_s2.h
index c6b29628142..a2323bd6716 100644
--- a/include/configs/imx8mn_bsh_smm_s2.h
+++ b/include/configs/imx8mn_bsh_smm_s2.h
@@ -43,7 +43,6 @@
#define PHYS_SDRAM_SIZE SZ_256M
/* NAND */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x20000000
diff --git a/include/configs/imx8mp_rsb3720.h b/include/configs/imx8mp_rsb3720.h
index ddc035ae228..8eb7456f94e 100644
--- a/include/configs/imx8mp_rsb3720.h
+++ b/include/configs/imx8mp_rsb3720.h
@@ -171,7 +171,6 @@
#ifdef CONFIG_NAND_MXS
/* NAND stuff */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x20000000
#endif /* CONFIG_NAND_MXS */
diff --git a/include/configs/km/km-mpc83xx.h b/include/configs/km/km-mpc83xx.h
index 61c71345954..f05aeaca24f 100644
--- a/include/configs/km/km-mpc83xx.h
+++ b/include/configs/km/km-mpc83xx.h
@@ -60,7 +60,6 @@
#if defined(CONFIG_CMD_NAND)
#define CONFIG_NAND_KMETER1
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE CONFIG_SYS_KMBEC_FPGA_BASE
#endif
diff --git a/include/configs/km/pg-wcom-ls102xa.h b/include/configs/km/pg-wcom-ls102xa.h
index 9565cea083e..1f5a025017d 100644
--- a/include/configs/km/pg-wcom-ls102xa.h
+++ b/include/configs/km/pg-wcom-ls102xa.h
@@ -119,7 +119,6 @@
#define CONFIG_SYS_CS1_FTIM2 CONFIG_SYS_NAND_FTIM2
#define CONFIG_SYS_CS1_FTIM3 CONFIG_SYS_NAND_FTIM3
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
/* QRIO FPGA Definitions */
diff --git a/include/configs/kmcent2.h b/include/configs/kmcent2.h
index e5cc62ebdc2..6032f3913cc 100644
--- a/include/configs/kmcent2.h
+++ b/include/configs/kmcent2.h
@@ -277,7 +277,6 @@
/* More NAND Flash Params */
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
/* QRIO on IFC CS2 */
#define CONFIG_SYS_QRIO_BASE 0xfb000000
diff --git a/include/configs/kmcoge5ne.h b/include/configs/kmcoge5ne.h
index b9d20c9c8eb..d6b60d8139a 100644
--- a/include/configs/kmcoge5ne.h
+++ b/include/configs/kmcoge5ne.h
@@ -11,7 +11,6 @@
#define CONFIG_HOSTNAME "kmcoge5ne"
#define CONFIG_NAND_ECC_BCH
#define CONFIG_NAND_KMETER1
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define NAND_MAX_CHIPS 1
#define CONFIG_SYS_NAND_BASE CONFIG_SYS_KMBEC_FPGA_BASE /* PRIO_BASE_ADDRESS */
diff --git a/include/configs/ls1021aqds.h b/include/configs/ls1021aqds.h
index 37b8cd7e696..a788c306b32 100644
--- a/include/configs/ls1021aqds.h
+++ b/include/configs/ls1021aqds.h
@@ -107,7 +107,6 @@
#define CONFIG_SYS_NAND_FTIM3 0x0
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#endif
/*
diff --git a/include/configs/ls1043aqds.h b/include/configs/ls1043aqds.h
index 4158d15cc0f..d207e475fc0 100644
--- a/include/configs/ls1043aqds.h
+++ b/include/configs/ls1043aqds.h
@@ -111,7 +111,6 @@
#define CONFIG_SYS_NAND_FTIM3 0x0
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_MTD_NAND_VERIFY_WRITE
#endif
diff --git a/include/configs/ls1043ardb.h b/include/configs/ls1043ardb.h
index 4bfe4e3ecd0..206de7e1380 100644
--- a/include/configs/ls1043ardb.h
+++ b/include/configs/ls1043ardb.h
@@ -82,7 +82,6 @@
#define CONFIG_SYS_NAND_FTIM3 0x0
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_MTD_NAND_VERIFY_WRITE
#ifdef CONFIG_NAND_BOOT
diff --git a/include/configs/ls1046afrwy.h b/include/configs/ls1046afrwy.h
index 2df5f3f6c0b..582b1ee93cd 100644
--- a/include/configs/ls1046afrwy.h
+++ b/include/configs/ls1046afrwy.h
@@ -45,7 +45,6 @@
#define CONFIG_SYS_NAND_FTIM3 0x0
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_MTD_NAND_VERIFY_WRITE
/* IFC Timing Params */
diff --git a/include/configs/ls1046aqds.h b/include/configs/ls1046aqds.h
index b411efd832d..037d462b5df 100644
--- a/include/configs/ls1046aqds.h
+++ b/include/configs/ls1046aqds.h
@@ -127,7 +127,6 @@
#define CONFIG_SYS_NAND_FTIM3 0x0
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_MTD_NAND_VERIFY_WRITE
#endif
diff --git a/include/configs/ls1046ardb.h b/include/configs/ls1046ardb.h
index 5d329577a63..f5f16bae2d6 100644
--- a/include/configs/ls1046ardb.h
+++ b/include/configs/ls1046ardb.h
@@ -50,7 +50,6 @@
#define CONFIG_SYS_NAND_FTIM3 0x0
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_MTD_NAND_VERIFY_WRITE
/*
diff --git a/include/configs/ls1088aqds.h b/include/configs/ls1088aqds.h
index 2d3351e6b4f..d50b76b89ae 100644
--- a/include/configs/ls1088aqds.h
+++ b/include/configs/ls1088aqds.h
@@ -102,7 +102,6 @@
#define CONFIG_SYS_NAND_FTIM3 0x0
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_MTD_NAND_VERIFY_WRITE
#define CONFIG_SYS_I2C_FPGA_ADDR 0x66
diff --git a/include/configs/ls1088ardb.h b/include/configs/ls1088ardb.h
index d98ed39812a..4edf40b0b72 100644
--- a/include/configs/ls1088ardb.h
+++ b/include/configs/ls1088ardb.h
@@ -86,7 +86,6 @@
#define CONFIG_SYS_NAND_FTIM3 0x0
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_MTD_NAND_VERIFY_WRITE
#define CONFIG_SYS_I2C_FPGA_ADDR 0x66
diff --git a/include/configs/ls2080aqds.h b/include/configs/ls2080aqds.h
index d02d7fc5886..1fa4aa3734d 100644
--- a/include/configs/ls2080aqds.h
+++ b/include/configs/ls2080aqds.h
@@ -103,7 +103,6 @@
#define CONFIG_SYS_NAND_FTIM3 0x0
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_MTD_NAND_VERIFY_WRITE
#define QIXIS_LBMAP_SWITCH 0x06
diff --git a/include/configs/ls2080ardb.h b/include/configs/ls2080ardb.h
index 09484dc6094..e1c66c5dcc0 100644
--- a/include/configs/ls2080ardb.h
+++ b/include/configs/ls2080ardb.h
@@ -100,7 +100,6 @@
#define CONFIG_SYS_NAND_FTIM3 0x0
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_MTD_NAND_VERIFY_WRITE
#define QIXIS_LBMAP_SWITCH 0x06
diff --git a/include/configs/m53menlo.h b/include/configs/m53menlo.h
index 4bf4496dafc..f8bd31d702f 100644
--- a/include/configs/m53menlo.h
+++ b/include/configs/m53menlo.h
@@ -44,7 +44,6 @@
* NAND
*/
#ifdef CONFIG_CMD_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE NFC_BASE_ADDR_AXI
#define CONFIG_MXC_NAND_REGS_BASE NFC_BASE_ADDR_AXI
#define CONFIG_MXC_NAND_IP_REGS_BASE NFC_BASE_ADDR
diff --git a/include/configs/medcom-wide.h b/include/configs/medcom-wide.h
index b35ba59aba9..b90a84da8ad 100644
--- a/include/configs/medcom-wide.h
+++ b/include/configs/medcom-wide.h
@@ -19,7 +19,6 @@
#define CONFIG_SYS_NS16550_COM1 NV_PA_APB_UARTD_BASE
/* NAND support */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
/* Environment in NAND, aligned to start of last sector */
diff --git a/include/configs/meesc.h b/include/configs/meesc.h
index cffcd9dd2f2..9f913fad168 100644
--- a/include/configs/meesc.h
+++ b/include/configs/meesc.h
@@ -52,7 +52,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
-# define CONFIG_SYS_MAX_NAND_DEVICE 1
# define CONFIG_SYS_NAND_BASE ATMEL_BASE_CS3 /* 0x40000000 */
# define CONFIG_SYS_NAND_DBW_8
# define CONFIG_SYS_NAND_MASK_ALE (1 << 21)
diff --git a/include/configs/mt7621.h b/include/configs/mt7621.h
index 554c435842b..6a55e7a3275 100644
--- a/include/configs/mt7621.h
+++ b/include/configs/mt7621.h
@@ -21,7 +21,6 @@
#define MMC_SUPPORTS_TUNING
/* NAND */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
/* Serial SPL */
#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_SERIAL)
diff --git a/include/configs/mv-common.h b/include/configs/mv-common.h
index 20e00ec7222..6d4fff3820c 100644
--- a/include/configs/mv-common.h
+++ b/include/configs/mv-common.h
@@ -61,8 +61,5 @@
/*
* Common NAND configuration
*/
-#ifdef CONFIG_CMD_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
-#endif
#endif /* _MV_COMMON_H */
diff --git a/include/configs/mvebu_armada-8k.h b/include/configs/mvebu_armada-8k.h
index 5a956f0a3e3..5debd9117c6 100644
--- a/include/configs/mvebu_armada-8k.h
+++ b/include/configs/mvebu_armada-8k.h
@@ -25,8 +25,6 @@
/* When runtime detection fails this is the default */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
-
/* USB ethernet */
/*
diff --git a/include/configs/mx6sabreauto.h b/include/configs/mx6sabreauto.h
index c76e7ea1605..7e54bb2312b 100644
--- a/include/configs/mx6sabreauto.h
+++ b/include/configs/mx6sabreauto.h
@@ -36,7 +36,6 @@
#define CONFIG_SYS_FSL_USDHC_NUM 2
/* NAND stuff */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x40000000
/* DMA stuff, needed for GPMI/MXS NAND support */
diff --git a/include/configs/mx6sxsabreauto.h b/include/configs/mx6sxsabreauto.h
index c8780414004..407b64383ee 100644
--- a/include/configs/mx6sxsabreauto.h
+++ b/include/configs/mx6sxsabreauto.h
@@ -86,7 +86,6 @@
#define CONFIG_SYS_FSL_ESDHC_ADDR USDHC3_BASE_ADDR
/* NAND stuff */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x40000000
/* DMA stuff, needed for GPMI/MXS NAND support */
diff --git a/include/configs/mx7dsabresd.h b/include/configs/mx7dsabresd.h
index b96341a587c..2a97d2fac46 100644
--- a/include/configs/mx7dsabresd.h
+++ b/include/configs/mx7dsabresd.h
@@ -93,7 +93,6 @@
*/
#ifdef CONFIG_NAND_MXS
/* NAND stuff */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x40000000
/* DMA stuff, needed for GPMI/MXS NAND support */
diff --git a/include/configs/mxs.h b/include/configs/mxs.h
index fc15ed82c6e..e8610386f04 100644
--- a/include/configs/mxs.h
+++ b/include/configs/mxs.h
@@ -83,7 +83,6 @@
/* NAND */
#ifdef CONFIG_CMD_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x60000000
#endif
diff --git a/include/configs/mys_6ulx.h b/include/configs/mys_6ulx.h
index 4162ee8caa2..bb68ddbd39d 100644
--- a/include/configs/mys_6ulx.h
+++ b/include/configs/mys_6ulx.h
@@ -30,7 +30,6 @@
#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
/* NAND */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x40000000
/* USB Configs */
diff --git a/include/configs/npi_imx6ull.h b/include/configs/npi_imx6ull.h
index 217427a302e..8ff26feb741 100644
--- a/include/configs/npi_imx6ull.h
+++ b/include/configs/npi_imx6ull.h
@@ -31,7 +31,6 @@
#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
/* NAND */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x40000000
/* USB Configs */
diff --git a/include/configs/octeontx_common.h b/include/configs/octeontx_common.h
index 373eb9119cd..6e69b3de755 100644
--- a/include/configs/octeontx_common.h
+++ b/include/configs/octeontx_common.h
@@ -46,8 +46,4 @@
/** EMMC specific defines */
-#if defined(CONFIG_NAND_OCTEONTX)
-#define CONFIG_SYS_MAX_NAND_DEVICE 8
-#endif
-
#endif /* __OCTEONTX_COMMON_H__ */
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index ad3dbbcac52..d46ca337d5f 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -21,7 +21,6 @@
/* NAND */
#if defined(CONFIG_MTD_RAW_NAND)
#define CONFIG_SYS_FLASH_BASE NAND_BASE
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_ECCPOS {2, 3, 4, 5, 6, 7, 8, 9,\
10, 11, 12, 13}
#define CONFIG_SYS_NAND_ECCSIZE 512
diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h
index c47d5573c46..77629d7fc1e 100644
--- a/include/configs/omap3_evm.h
+++ b/include/configs/omap3_evm.h
@@ -26,7 +26,6 @@
/* NAND */
#if defined(CONFIG_MTD_RAW_NAND)
#define CONFIG_SYS_FLASH_BASE NAND_BASE
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_ECCPOS {2, 3, 4, 5, 6, 7, 8, 9,\
10, 11, 12, 13}
#define CONFIG_SYS_NAND_ECCSIZE 512
diff --git a/include/configs/omap3_logic.h b/include/configs/omap3_logic.h
index 1af87b271c4..442a3cad220 100644
--- a/include/configs/omap3_logic.h
+++ b/include/configs/omap3_logic.h
@@ -16,7 +16,6 @@
/* Board NAND Info. */
#ifdef CONFIG_MTD_RAW_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of */
/* NAND devices */
#define CONFIG_SYS_NAND_ECCPOS {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, \
13, 14, 16, 17, 18, 19, 20, 21, 22, \
diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h
index c644768ae7d..df4a16fd081 100644
--- a/include/configs/omapl138_lcdk.h
+++ b/include/configs/omapl138_lcdk.h
@@ -112,7 +112,6 @@
#define CONFIG_SYS_NAND_MASK_CLE 0x10
#define CONFIG_SYS_NAND_MASK_ALE 0x8
#undef CONFIG_SYS_NAND_HW_ECC
-#define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND devices */
#define CONFIG_SYS_NAND_HW_ECC_OOBFIRST
#define CONFIG_NAND_6BYTES_OOB_FREE_10BYTES_ECC
#define CONFIG_SYS_NAND_U_BOOT_SIZE SZ_512K
diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h
index fcb287d6410..2555953f531 100644
--- a/include/configs/p1_p2_rdb_pc.h
+++ b/include/configs/p1_p2_rdb_pc.h
@@ -215,7 +215,6 @@
#endif
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BR_PRELIM (BR_PHYS_ADDR(CONFIG_SYS_NAND_BASE_PHYS) \
| (2<<BR_DECC_SHIFT) /* Use HW ECC */ \
diff --git a/include/configs/pcl063.h b/include/configs/pcl063.h
index 6e593da936c..5b38a94aa5d 100644
--- a/include/configs/pcl063.h
+++ b/include/configs/pcl063.h
@@ -42,7 +42,6 @@
#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
/* NAND */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x40000000
/* USB Configs */
diff --git a/include/configs/pcl063_ull.h b/include/configs/pcl063_ull.h
index ae81b8e214e..688d161964a 100644
--- a/include/configs/pcl063_ull.h
+++ b/include/configs/pcl063_ull.h
@@ -44,7 +44,6 @@
#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
/* NAND */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x40000000
/* USB Configs */
diff --git a/include/configs/pcm052.h b/include/configs/pcm052.h
index a8cfec96595..a04a03a7e18 100644
--- a/include/configs/pcm052.h
+++ b/include/configs/pcm052.h
@@ -14,8 +14,6 @@
/* NAND support */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
-
/* if no target-specific extra environment settings were defined by the
target, define an empty one */
#ifndef PCM052_EXTRA_ENV_SETTINGS
diff --git a/include/configs/pcm058.h b/include/configs/pcm058.h
index cff71df1c96..01190904cf6 100644
--- a/include/configs/pcm058.h
+++ b/include/configs/pcm058.h
@@ -15,7 +15,6 @@
#define PHYS_SDRAM_SIZE (1u * 1024 * 1024 * 1024)
/* Enable NAND support */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
/* Physical Memory Map */
#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
diff --git a/include/configs/plutux.h b/include/configs/plutux.h
index 9a4a632a521..09f0ed9b9a1 100644
--- a/include/configs/plutux.h
+++ b/include/configs/plutux.h
@@ -19,7 +19,6 @@
#define CONFIG_SYS_NS16550_COM1 NV_PA_APB_UARTD_BASE
/* NAND support */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
/* Environment in NAND, aligned to start of last sector */
diff --git a/include/configs/pm9261.h b/include/configs/pm9261.h
index 7f9442acbbd..278f1b5cc62 100644
--- a/include/configs/pm9261.h
+++ b/include/configs/pm9261.h
@@ -129,7 +129,6 @@
#define PHYS_SDRAM_SIZE 0x04000000 /* 64 megs */
/* NAND flash */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x40000000
#define CONFIG_SYS_NAND_DBW_8 1
/* our ALE is AD22 */
diff --git a/include/configs/pm9263.h b/include/configs/pm9263.h
index 00d159f03cf..7c23206a300 100644
--- a/include/configs/pm9263.h
+++ b/include/configs/pm9263.h
@@ -146,7 +146,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x40000000
#define CONFIG_SYS_NAND_DBW_8 1
/* our ALE is AD21 */
diff --git a/include/configs/pm9g45.h b/include/configs/pm9g45.h
index 69f3d065878..fa47a3ed793 100644
--- a/include/configs/pm9g45.h
+++ b/include/configs/pm9g45.h
@@ -25,7 +25,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE ATMEL_BASE_CS3
#define CONFIG_SYS_NAND_DBW_8
/* our ALE is AD21 */
diff --git a/include/configs/presidio_asic.h b/include/configs/presidio_asic.h
index 90f548cc6c1..ebf5467ef41 100644
--- a/include/configs/presidio_asic.h
+++ b/include/configs/presidio_asic.h
@@ -58,7 +58,6 @@
/* nand driver parameters */
#ifdef CONFIG_TARGET_PRESIDIO_ASIC
- #define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE CONFIG_SYS_FLASH_BASE
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
#endif
diff --git a/include/configs/sam9x60ek.h b/include/configs/sam9x60ek.h
index b9b56d9f1a0..70c6ec5b65c 100644
--- a/include/configs/sam9x60ek.h
+++ b/include/configs/sam9x60ek.h
@@ -28,7 +28,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x40000000
#define CONFIG_SYS_NAND_MASK_ALE BIT(21)
#define CONFIG_SYS_NAND_MASK_CLE BIT(22)
diff --git a/include/configs/sama5d2_ptc_ek.h b/include/configs/sama5d2_ptc_ek.h
index 3b91e83683a..9281c7ccc40 100644
--- a/include/configs/sama5d2_ptc_ek.h
+++ b/include/configs/sama5d2_ptc_ek.h
@@ -21,7 +21,6 @@
/* NAND Flash */
#ifdef CONFIG_CMD_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE ATMEL_BASE_CS3
/* our ALE is AD21 */
#define CONFIG_SYS_NAND_MASK_ALE BIT(21)
diff --git a/include/configs/sama5d3_xplained.h b/include/configs/sama5d3_xplained.h
index fad65cb1123..301e8c900c4 100644
--- a/include/configs/sama5d3_xplained.h
+++ b/include/configs/sama5d3_xplained.h
@@ -29,7 +29,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x60000000
/* our ALE is AD21 */
#define CONFIG_SYS_NAND_MASK_ALE (1 << 21)
diff --git a/include/configs/sama5d3xek.h b/include/configs/sama5d3xek.h
index ccb3842c1c2..1c94193e96b 100644
--- a/include/configs/sama5d3xek.h
+++ b/include/configs/sama5d3xek.h
@@ -38,7 +38,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x60000000
/* our ALE is AD21 */
#define CONFIG_SYS_NAND_MASK_ALE (1 << 21)
diff --git a/include/configs/sama5d4_xplained.h b/include/configs/sama5d4_xplained.h
index d5cd45ca5c3..eac41449cb0 100644
--- a/include/configs/sama5d4_xplained.h
+++ b/include/configs/sama5d4_xplained.h
@@ -17,7 +17,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x80000000
/* our ALE is AD21 */
#define CONFIG_SYS_NAND_MASK_ALE (1 << 21)
diff --git a/include/configs/sama5d4ek.h b/include/configs/sama5d4ek.h
index 411ed29ab3c..bc5312d32c6 100644
--- a/include/configs/sama5d4ek.h
+++ b/include/configs/sama5d4ek.h
@@ -17,7 +17,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x80000000
/* our ALE is AD21 */
#define CONFIG_SYS_NAND_MASK_ALE (1 << 21)
diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h
index e6c200f7612..c7f03a1e754 100644
--- a/include/configs/seaboard.h
+++ b/include/configs/seaboard.h
@@ -29,7 +29,6 @@
/* NAND support */
/* Max number of NAND devices */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#include "tegra-common-post.h"
diff --git a/include/configs/siemens-am33x-common.h b/include/configs/siemens-am33x-common.h
index 5759794b145..87da5e4232c 100644
--- a/include/configs/siemens-am33x-common.h
+++ b/include/configs/siemens-am33x-common.h
@@ -368,8 +368,6 @@
#define CONFIG_SYS_NAND_BASE (0x08000000) /* physical address */
/* to access nand at */
/* CS0 */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND
- devices */
#endif
#endif /* ! __CONFIG_SIEMENS_AM33X_COMMON_H */
diff --git a/include/configs/smartweb.h b/include/configs/smartweb.h
index 802ed07b9ea..a77215d19be 100644
--- a/include/configs/smartweb.h
+++ b/include/configs/smartweb.h
@@ -54,7 +54,6 @@
*/
/* NAND flash settings */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE ATMEL_BASE_CS3
#define CONFIG_SYS_NAND_DBW_8
#define CONFIG_SYS_NAND_MASK_ALE (1 << 21)
diff --git a/include/configs/snapper9g45.h b/include/configs/snapper9g45.h
index 59bba7d143e..c56fb378312 100644
--- a/include/configs/snapper9g45.h
+++ b/include/configs/snapper9g45.h
@@ -30,7 +30,6 @@
/* NAND Flash */
#define CONFIG_SYS_NAND_ECC_BASE ATMEL_BASE_ECC
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE ATMEL_BASE_CS3
#define CONFIG_SYS_NAND_DBW_8
#define CONFIG_SYS_NAND_MASK_ALE (1 << 21) /* AD21 */
diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
index c3f30afe2b5..f0a33ed27dd 100644
--- a/include/configs/socfpga_common.h
+++ b/include/configs/socfpga_common.h
@@ -80,7 +80,6 @@
* NAND Support
*/
#ifdef CONFIG_NAND_DENALI
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_REGS_BASE SOCFPGA_NANDREGS_ADDRESS
#define CONFIG_SYS_NAND_DATA_BASE SOCFPGA_NANDDATA_ADDRESS
#endif
diff --git a/include/configs/socrates.h b/include/configs/socrates.h
index 00e8136cc9c..122aec2287f 100644
--- a/include/configs/socrates.h
+++ b/include/configs/socrates.h
@@ -102,7 +102,6 @@
#define CONFIG_SYS_FPGA_SIZE 0x00100000 /* 1 MB */
#define CONFIG_SYS_NAND_BASE (CONFIG_SYS_FPGA_BASE + 0x70)
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
/* LIME GDC */
#define CONFIG_SYS_LIME_BASE 0xc8000000
diff --git a/include/configs/stm32mp13_common.h b/include/configs/stm32mp13_common.h
index 78089b965ae..222e69c20c0 100644
--- a/include/configs/stm32mp13_common.h
+++ b/include/configs/stm32mp13_common.h
@@ -25,7 +25,6 @@
#define CONFIG_SYS_MMC_MAX_DEVICE 2
/* NAND support */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
/*****************************************************************************/
#ifdef CONFIG_DISTRO_DEFAULTS
diff --git a/include/configs/stm32mp15_common.h b/include/configs/stm32mp15_common.h
index 214901c557f..6103c2cea7f 100644
--- a/include/configs/stm32mp15_common.h
+++ b/include/configs/stm32mp15_common.h
@@ -25,7 +25,6 @@
#define CONFIG_SYS_MMC_MAX_DEVICE 3
/* NAND support */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
/* Ethernet need */
#ifdef CONFIG_DWC_ETH_QOS
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 12666b7818b..f9c701b90bb 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -73,7 +73,6 @@
#ifdef CONFIG_NAND_SUNXI
#define CONFIG_SYS_NAND_MAX_ECCPOS 1664
-#define CONFIG_SYS_MAX_NAND_DEVICE 8
#endif
/* mmc config */
diff --git a/include/configs/taurus.h b/include/configs/taurus.h
index a29652dd56e..45780d9a4ea 100644
--- a/include/configs/taurus.h
+++ b/include/configs/taurus.h
@@ -54,7 +54,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE ATMEL_BASE_CS3
#define CONFIG_SYS_NAND_DBW_8
#define CONFIG_SYS_NAND_MASK_ALE (1 << 21)
diff --git a/include/configs/tec.h b/include/configs/tec.h
index 432ccbdc32b..2377b47e054 100644
--- a/include/configs/tec.h
+++ b/include/configs/tec.h
@@ -19,7 +19,6 @@
#define CONFIG_SYS_NS16550_COM1 NV_PA_APB_UARTD_BASE
/* NAND support */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
/* Environment in NAND, aligned to start of last sector */
diff --git a/include/configs/ti816x_evm.h b/include/configs/ti816x_evm.h
index 1aca83a9bce..82add65ec0d 100644
--- a/include/configs/ti816x_evm.h
+++ b/include/configs/ti816x_evm.h
@@ -43,7 +43,6 @@
* access CS0 at is 0x8000000.
*/
#define CONFIG_SYS_NAND_BASE 0x8000000
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
/* NAND: SPL related configs */
diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h
index 29a6038f898..4078413d0f5 100644
--- a/include/configs/ti_armv7_keystone2.h
+++ b/include/configs/ti_armv7_keystone2.h
@@ -69,7 +69,6 @@
#define CONFIG_SYS_NAND_LARGEPAGE
#define CONFIG_SYS_NAND_BASE_LIST { 0x30000000, }
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_NO_SUBPAGE_WRITE
#define DFU_ALT_INFO_MMC \
diff --git a/include/configs/ti_armv7_omap.h b/include/configs/ti_armv7_omap.h
index 727c6483193..44706c7733a 100644
--- a/include/configs/ti_armv7_omap.h
+++ b/include/configs/ti_armv7_omap.h
@@ -19,7 +19,6 @@
#ifndef CONFIG_SYS_NAND_BASE
#define CONFIG_SYS_NAND_BASE 0x8000000
#endif
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#endif
/* Now for the remaining common defines */
diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h
index d9e95abcc12..b92fe389421 100644
--- a/include/configs/uniphier.h
+++ b/include/configs/uniphier.h
@@ -42,7 +42,6 @@
#define CONFIG_SYS_TIMER_RATE 1000000
#endif
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_REGS_BASE 0x68100000
#define CONFIG_SYS_NAND_DATA_BASE 0x68000000
diff --git a/include/configs/usb_a9263.h b/include/configs/usb_a9263.h
index e0dde1cc836..44eaeda432a 100644
--- a/include/configs/usb_a9263.h
+++ b/include/configs/usb_a9263.h
@@ -33,7 +33,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE ATMEL_BASE_CS3
/* our ALE is AD21 */
#define CONFIG_SYS_NAND_MASK_ALE (1 << 21)
diff --git a/include/configs/vf610twr.h b/include/configs/vf610twr.h
index c13f2ba196e..dde6d130caa 100644
--- a/include/configs/vf610twr.h
+++ b/include/configs/vf610twr.h
@@ -14,7 +14,6 @@
/* NAND support */
#ifdef CONFIG_CMD_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE NFC_BASE_ADDR
/* Dynamic MTD partition support */
diff --git a/include/configs/work_92105.h b/include/configs/work_92105.h
index f53ea3ccd21..e1f9f12523f 100644
--- a/include/configs/work_92105.h
+++ b/include/configs/work_92105.h
@@ -42,7 +42,6 @@
*/
/* driver configuration */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_MAX_NAND_CHIPS 1
#define CONFIG_SYS_NAND_BASE MLC_NAND_BASE
diff --git a/include/configs/x530.h b/include/configs/x530.h
index cb126837b9c..0add626e81a 100644
--- a/include/configs/x530.h
+++ b/include/configs/x530.h
@@ -27,7 +27,6 @@
*/
/* NAND */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define BBT_CUSTOM_SCAN
#define BBT_CUSTOM_SCAN_PAGE 0
diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h
index f72f3e64476..60f007a10fc 100644
--- a/include/configs/xilinx_zynqmp.h
+++ b/include/configs/xilinx_zynqmp.h
@@ -27,10 +27,6 @@
EFI_GUID(0xcf9ecfd4, 0x938b, 0x41c5, 0x85, 0x51, \
0x1f, 0x88, 0x3a, 0xb7, 0xdc, 0x18)
-#ifdef CONFIG_NAND_ARASAN
-# define CONFIG_SYS_MAX_NAND_DEVICE 1
-#endif
-
/* Miscellaneous configurable options */
#if defined(CONFIG_ZYNQMP_USB)
diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h
index dc0cba00103..e194e77e5b7 100644
--- a/include/configs/zynq-common.h
+++ b/include/configs/zynq-common.h
@@ -40,10 +40,6 @@
# define CONFIG_FLASH_SHOW_PROGRESS 10
#endif
-#ifdef CONFIG_NAND_ZYNQ
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
-#endif
-
#ifdef CONFIG_USB_EHCI_ZYNQ
# define DFU_DEFAULT_POLL_TIMEOUT 300
# define CONFIG_THOR_RESET_OFF