U-Boot
Threads by month
- ----- 2025 -----
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2000 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
January 2018
- 221 participants
- 793 discussions
This commit basically reverts two previous commits:
1. cf628f772ef2 ("arc: arcv1: Disable master/slave check")
2. 6cba327bd96f ("arcv2: Halt non-master cores")
With mentioned commits in-place we experience more trouble than
benefits. In case of SMP Linux kernel this is really required as
we have all the cores running from the very beginning and then we
need to allow master core to do some preparatory work while slaves
are not getting in the way.
In case of U-Boot we:
a) Don't really run more than 1 core in parallel
b) We may use whatever core for that
Signed-off-by: Alexey Brodkin <abrodkin(a)synopsys.com>
---
arch/arc/lib/start.S | 20 --------------------
1 file changed, 20 deletions(-)
diff --git a/arch/arc/lib/start.S b/arch/arc/lib/start.S
index 5098db9286fd..0d9c85741447 100644
--- a/arch/arc/lib/start.S
+++ b/arch/arc/lib/start.S
@@ -11,26 +11,6 @@
#include <asm/global_data.h>
ENTRY(_start)
-; ARCompact devices are not supposed to be SMP so master/slave check
-; makes no sense.
-#ifdef CONFIG_ISA_ARCV2
- ; Non-masters will be halted immediately, they might be kicked later
- ; by platform code right before passing control to the Linux kernel
- ; in bootm.c:boot_jump_linux().
- lr r5, [identity]
- lsr r5, r5, 8
- bmsk r5, r5, 7
- cmp r5, 0
- mov.nz r0, r5
- bz .Lmaster_proceed
- flag 1
- nop
- nop
- nop
-
-.Lmaster_proceed:
-#endif
-
/* Setup interrupt vector base that matches "__text_start" */
sr __ivt_start, [ARC_AUX_INTR_VEC_BASE]
--
2.14.3
1
0

25 Jan '18
U-Boot is a bit special piese of software because it is being
only executed once on power-on as compared to operating system
for example. That's why we don't care much about performance
optimizations instead we're more concerned about size. And up-to-date
compilers might produce much smaller code compared to
performance-optimized routines copy-pasted from the Linux kernel.
Here's an example:
------------------------------->8--------------------------
--- size_asm_strings.txt
+++ size_c_strings.txt
@@ -1,2 +1,2 @@
text data bss dec hex filename
- 121260 3784 3308 128352 1f560 u-boot
+ 120448 3784 3308 127540 1f234 u-boot
------------------------------->8--------------------------
See we were able to shave off ~800 bytes of .text section.
Also usage of string routines implemented in C gives us an ability
to support more HW flavors for free: generated instructions will match
our target as long as correct compiler option is used.
Signed-off-by: Alexey Brodkin <abrodkin(a)synopsys.com>
---
arch/arc/include/asm/string.h | 26 --------
arch/arc/lib/Makefile | 7 ---
arch/arc/lib/memcmp.S | 123 ------------------------------------
arch/arc/lib/memcpy-700.S | 63 -------------------
arch/arc/lib/memset.S | 62 -------------------
arch/arc/lib/strchr-700.S | 141 ------------------------------------------
arch/arc/lib/strcmp.S | 97 -----------------------------
arch/arc/lib/strcpy-700.S | 67 --------------------
arch/arc/lib/strlen.S | 80 ------------------------
9 files changed, 666 deletions(-)
delete mode 100644 arch/arc/lib/memcmp.S
delete mode 100644 arch/arc/lib/memcpy-700.S
delete mode 100644 arch/arc/lib/memset.S
delete mode 100644 arch/arc/lib/strchr-700.S
delete mode 100644 arch/arc/lib/strcmp.S
delete mode 100644 arch/arc/lib/strcpy-700.S
delete mode 100644 arch/arc/lib/strlen.S
diff --git a/arch/arc/include/asm/string.h b/arch/arc/include/asm/string.h
index 909129c33318..8b137891791f 100644
--- a/arch/arc/include/asm/string.h
+++ b/arch/arc/include/asm/string.h
@@ -1,27 +1 @@
-/*
- * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. All rights reserved.
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-#ifndef __ASM_ARC_STRING_H
-#define __ASM_ARC_STRING_H
-
-#define __HAVE_ARCH_MEMSET
-#define __HAVE_ARCH_MEMCPY
-#define __HAVE_ARCH_MEMCMP
-#define __HAVE_ARCH_STRCHR
-#define __HAVE_ARCH_STRCPY
-#define __HAVE_ARCH_STRCMP
-#define __HAVE_ARCH_STRLEN
-
-extern void *memset(void *ptr, int, __kernel_size_t);
-extern void *memcpy(void *, const void *, __kernel_size_t);
-extern void memzero(void *ptr, __kernel_size_t n);
-extern int memcmp(const void *, const void *, __kernel_size_t);
-extern char *strchr(const char *s, int c);
-extern char *strcpy(char *dest, const char *src);
-extern int strcmp(const char *cs, const char *ct);
-extern __kernel_size_t strlen(const char *);
-
-#endif /* __ASM_ARC_STRING_H */
diff --git a/arch/arc/lib/Makefile b/arch/arc/lib/Makefile
index 12097bf3bee7..6b7fb0fdff9c 100644
--- a/arch/arc/lib/Makefile
+++ b/arch/arc/lib/Makefile
@@ -10,13 +10,6 @@ obj-y += cache.o
obj-y += cpu.o
obj-y += interrupts.o
obj-y += relocate.o
-obj-y += strchr-700.o
-obj-y += strcmp.o
-obj-y += strcpy-700.o
-obj-y += strlen.o
-obj-y += memcmp.o
-obj-y += memcpy-700.o
-obj-y += memset.o
obj-y += reset.o
obj-y += ints_low.o
obj-y += init_helpers.o
diff --git a/arch/arc/lib/memcmp.S b/arch/arc/lib/memcmp.S
deleted file mode 100644
index 87bccab51d74..000000000000
--- a/arch/arc/lib/memcmp.S
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (C) 2004, 2007-2010, 2011-2014 Synopsys, Inc. All rights reserved.
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-#ifdef __LITTLE_ENDIAN__
-#define WORD2 r2
-#define SHIFT r3
-#else /* __BIG_ENDIAN__ */
-#define WORD2 r3
-#define SHIFT r2
-#endif /* _ENDIAN__ */
-
-.global memcmp
-.align 4
-memcmp:
- or %r12, %r0, %r1
- asl_s %r12, %r12, 30
- sub %r3, %r2, 1
- brls %r2, %r12, .Lbytewise
- ld %r4, [%r0, 0]
- ld %r5, [%r1, 0]
- lsr.f %lp_count, %r3, 3
- lpne .Loop_end
- ld_s WORD2, [%r0, 4]
- ld_s %r12, [%r1, 4]
- brne %r4, %r5, .Leven
- ld.a %r4, [%r0, 8]
- ld.a %r5, [%r1, 8]
- brne WORD2, %r12, .Lodd
- nop
-.Loop_end:
- asl_s SHIFT, SHIFT, 3
- bhs_s .Last_cmp
- brne %r4, %r5, .Leven
- ld %r4, [%r0, 4]
- ld %r5, [%r1, 4]
-#ifdef __LITTLE_ENDIAN__
- nop_s
- /* one more load latency cycle */
-.Last_cmp:
- xor %r0, %r4, %r5
- bset %r0, %r0, SHIFT
- sub_s %r1, %r0, 1
- bic_s %r1, %r1, %r0
- norm %r1, %r1
- b.d .Leven_cmp
- and %r1, %r1, 24
-.Leven:
- xor %r0, %r4, %r5
- sub_s %r1, %r0, 1
- bic_s %r1, %r1, %r0
- norm %r1, %r1
- /* slow track insn */
- and %r1, %r1, 24
-.Leven_cmp:
- asl %r2, %r4, %r1
- asl %r12, %r5, %r1
- lsr_s %r2, %r2, 1
- lsr_s %r12, %r12, 1
- j_s.d [%blink]
- sub %r0, %r2, %r12
- .balign 4
-.Lodd:
- xor %r0, WORD2, %r12
- sub_s %r1, %r0, 1
- bic_s %r1, %r1, %r0
- norm %r1, %r1
- /* slow track insn */
- and %r1, %r1, 24
- asl_s %r2, %r2, %r1
- asl_s %r12, %r12, %r1
- lsr_s %r2, %r2, 1
- lsr_s %r12, %r12, 1
- j_s.d [%blink]
- sub %r0, %r2, %r12
-#else /* __BIG_ENDIAN__ */
-.Last_cmp:
- neg_s SHIFT, SHIFT
- lsr %r4, %r4, SHIFT
- lsr %r5, %r5, SHIFT
- /* slow track insn */
-.Leven:
- sub.f %r0, %r4, %r5
- mov.ne %r0, 1
- j_s.d [%blink]
- bset.cs %r0, %r0, 31
-.Lodd:
- cmp_s WORD2, %r12
-
- mov_s %r0, 1
- j_s.d [%blink]
- bset.cs %r0, %r0, 31
-#endif /* _ENDIAN__ */
- .balign 4
-.Lbytewise:
- breq %r2, 0, .Lnil
- ldb %r4, [%r0, 0]
- ldb %r5, [%r1, 0]
- lsr.f %lp_count, %r3
- lpne .Lbyte_end
- ldb_s %r3, [%r0, 1]
- ldb %r12, [%r1, 1]
- brne %r4, %r5, .Lbyte_even
- ldb.a %r4, [%r0, 2]
- ldb.a %r5, [%r1, 2]
- brne %r3, %r12, .Lbyte_odd
- nop
-.Lbyte_end:
- bcc .Lbyte_even
- brne %r4, %r5, .Lbyte_even
- ldb_s %r3, [%r0, 1]
- ldb_s %r12, [%r1, 1]
-.Lbyte_odd:
- j_s.d [%blink]
- sub %r0, %r3, %r12
-.Lbyte_even:
- j_s.d [%blink]
- sub %r0, %r4, %r5
-.Lnil:
- j_s.d [%blink]
- mov %r0, 0
diff --git a/arch/arc/lib/memcpy-700.S b/arch/arc/lib/memcpy-700.S
deleted file mode 100644
index 51dd73ab8fdf..000000000000
--- a/arch/arc/lib/memcpy-700.S
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2004, 2007-2010, 2011-2014 Synopsys, Inc. All rights reserved.
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-.global memcpy
-.align 4
-memcpy:
- or %r3, %r0, %r1
- asl_s %r3, %r3, 30
- mov_s %r5, %r0
- brls.d %r2, %r3, .Lcopy_bytewise
- sub.f %r3, %r2, 1
- ld_s %r12, [%r1, 0]
- asr.f %lp_count, %r3, 3
- bbit0.d %r3, 2, .Lnox4
- bmsk_s %r2, %r2, 1
- st.ab %r12, [%r5, 4]
- ld.a %r12, [%r1, 4]
-.Lnox4:
- lppnz .Lendloop
- ld_s %r3, [%r1, 4]
- st.ab %r12, [%r5, 4]
- ld.a %r12, [%r1, 8]
- st.ab %r3, [%r5, 4]
-.Lendloop:
- breq %r2, 0, .Last_store
- ld %r3, [%r5, 0]
-#ifdef __LITTLE_ENDIAN__
- add3 %r2, -1, %r2
- /* uses long immediate */
- xor_s %r12, %r12, %r3
- bmsk %r12, %r12, %r2
- xor_s %r12, %r12, %r3
-#else /* __BIG_ENDIAN__ */
- sub3 %r2, 31, %r2
- /* uses long immediate */
- xor_s %r3, %r3, %r12
- bmsk %r3, %r3, %r2
- xor_s %r12, %r12, %r3
-#endif /* _ENDIAN__ */
-.Last_store:
- j_s.d [%blink]
- st %r12, [%r5, 0]
-
- .balign 4
-.Lcopy_bytewise:
- jcs [%blink]
- ldb_s %r12, [%r1, 0]
- lsr.f %lp_count, %r3
- bhs_s .Lnox1
- stb.ab %r12, [%r5, 1]
- ldb.a %r12, [%r1, 1]
-.Lnox1:
- lppnz .Lendbloop
- ldb_s %r3, [%r1, 1]
- stb.ab %r12, [%r5, 1]
- ldb.a %r12, [%r1, 2]
- stb.ab %r3, [%r5, 1]
-.Lendbloop:
- j_s.d [%blink]
- stb %r12, [%r5, 0]
diff --git a/arch/arc/lib/memset.S b/arch/arc/lib/memset.S
deleted file mode 100644
index 017e8af0e880..000000000000
--- a/arch/arc/lib/memset.S
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2004, 2007-2010, 2011-2014 Synopsys, Inc. All rights reserved.
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-#define SMALL 7 /* Must be at least 6 to deal with alignment/loop issues. */
-
-.global memset
-.align 4
-memset:
- mov_s %r4, %r0
- or %r12, %r0, %r2
- bmsk.f %r12, %r12, 1
- extb_s %r1, %r1
- asl %r3, %r1, 8
- beq.d .Laligned
- or_s %r1, %r1, %r3
- brls %r2, SMALL, .Ltiny
- add %r3, %r2, %r0
- stb %r1, [%r3, -1]
- bclr_s %r3, %r3, 0
- stw %r1, [%r3, -2]
- bmsk.f %r12, %r0, 1
- add_s %r2, %r2, %r12
- sub.ne %r2, %r2, 4
- stb.ab %r1, [%r4, 1]
- and %r4, %r4, -2
- stw.ab %r1, [%r4, 2]
- and %r4, %r4, -4
-
- .balign 4
-.Laligned:
- asl %r3, %r1, 16
- lsr.f %lp_count, %r2, 2
- or_s %r1, %r1, %r3
- lpne .Loop_end
- st.ab %r1, [%r4, 4]
-.Loop_end:
- j_s [%blink]
-
- .balign 4
-.Ltiny:
- mov.f %lp_count, %r2
- lpne .Ltiny_end
- stb.ab %r1, [%r4, 1]
-.Ltiny_end:
- j_s [%blink]
-
-/*
- * memzero: @r0 = mem, @r1 = size_t
- * memset: @r0 = mem, @r1 = char, @r2 = size_t
- */
-
-.global memzero
-.align 4
-memzero:
- /* adjust bzero args to memset args */
- mov %r2, %r1
- mov %r1, 0
- /* tail call so need to tinker with blink */
- b memset
diff --git a/arch/arc/lib/strchr-700.S b/arch/arc/lib/strchr-700.S
deleted file mode 100644
index 55fcc9fb00ed..000000000000
--- a/arch/arc/lib/strchr-700.S
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Copyright (C) 2004, 2007-2010, 2011-2014 Synopsys, Inc. All rights reserved.
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-/*
- * ARC700 has a relatively long pipeline and branch prediction, so we want
- * to avoid branches that are hard to predict. On the other hand, the
- * presence of the norm instruction makes it easier to operate on whole
- * words branch-free.
- */
-
-.global strchr
-.align 4
-strchr:
- extb_s %r1, %r1
- asl %r5, %r1, 8
- bmsk %r2, %r0, 1
- or %r5, %r5, %r1
- mov_s %r3, 0x01010101
- breq.d %r2, %r0, .Laligned
- asl %r4, %r5, 16
- sub_s %r0, %r0, %r2
- asl %r7, %r2, 3
- ld_s %r2, [%r0]
-#ifdef __LITTLE_ENDIAN__
- asl %r7, %r3, %r7
-#else /* __BIG_ENDIAN__ */
- lsr %r7, %r3, %r7
-#endif /* _ENDIAN__ */
- or %r5, %r5, %r4
- ror %r4, %r3
- sub %r12, %r2, %r7
- bic_s %r12, %r12, %r2
- and %r12, %r12, %r4
- brne.d %r12, 0, .Lfound0_ua
- xor %r6, %r2, %r5
- ld.a %r2, [%r0, 4]
- sub %r12, %r6, %r7
- bic %r12, %r12, %r6
-#ifdef __LITTLE_ENDIAN__
- and %r7, %r12, %r4
- /* For speed, we want this branch to be unaligned. */
- breq %r7, 0, .Loop
- /* Likewise this one */
- b .Lfound_char
-#else /* __BIG_ENDIAN__ */
- and %r12, %r12, %r4
- /* For speed, we want this branch to be unaligned. */
- breq %r12, 0, .Loop
- lsr_s %r12, %r12, 7
- bic %r2, %r7, %r6
- b.d .Lfound_char_b
- and_s %r2, %r2, %r12
-#endif /* _ENDIAN__ */
- /* We require this code address to be unaligned for speed... */
-.Laligned:
- ld_s %r2, [%r0]
- or %r5, %r5, %r4
- ror %r4, %r3
- /* ... so that this code address is aligned, for itself and ... */
-.Loop:
- sub %r12, %r2, %r3
- bic_s %r12, %r12, %r2
- and %r12, %r12, %r4
- brne.d %r12, 0, .Lfound0
- xor %r6, %r2, %r5
- ld.a %r2, [%r0, 4]
- sub %r12, %r6, %r3
- bic %r12, %r12, %r6
- and %r7, %r12, %r4
- breq %r7, 0, .Loop
- /*
- *... so that this branch is unaligned.
- * Found searched-for character.
- * r0 has already advanced to next word.
- */
-#ifdef __LITTLE_ENDIAN__
- /*
- * We only need the information about the first matching byte
- * (i.e. the least significant matching byte) to be exact,
- * hence there is no problem with carry effects.
- */
-.Lfound_char:
- sub %r3, %r7, 1
- bic %r3, %r3, %r7
- norm %r2, %r3
- sub_s %r0, %r0, 1
- asr_s %r2, %r2, 3
- j.d [%blink]
- sub_s %r0, %r0, %r2
-
- .balign 4
-.Lfound0_ua:
- mov %r3, %r7
-.Lfound0:
- sub %r3, %r6, %r3
- bic %r3, %r3, %r6
- and %r2, %r3, %r4
- or_s %r12, %r12, %r2
- sub_s %r3, %r12, 1
- bic_s %r3, %r3, %r12
- norm %r3, %r3
- add_s %r0, %r0, 3
- asr_s %r12, %r3, 3
- asl.f 0, %r2, %r3
- sub_s %r0, %r0, %r12
- j_s.d [%blink]
- mov.pl %r0, 0
-#else /* __BIG_ENDIAN__ */
-.Lfound_char:
- lsr %r7, %r7, 7
-
- bic %r2, %r7, %r6
-.Lfound_char_b:
- norm %r2, %r2
- sub_s %r0, %r0, 4
- asr_s %r2, %r2, 3
- j.d [%blink]
- add_s %r0, %r0, %r2
-
-.Lfound0_ua:
- mov_s %r3, %r7
-.Lfound0:
- asl_s %r2, %r2, 7
- or %r7, %r6, %r4
- bic_s %r12, %r12, %r2
- sub %r2, %r7, %r3
- or %r2, %r2, %r6
- bic %r12, %r2, %r12
- bic.f %r3, %r4, %r12
- norm %r3, %r3
-
- add.pl %r3, %r3, 1
- asr_s %r12, %r3, 3
- asl.f 0, %r2, %r3
- add_s %r0, %r0, %r12
- j_s.d [%blink]
- mov.mi %r0, 0
-#endif /* _ENDIAN__ */
diff --git a/arch/arc/lib/strcmp.S b/arch/arc/lib/strcmp.S
deleted file mode 100644
index 8cb7d2f18c66..000000000000
--- a/arch/arc/lib/strcmp.S
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (C) 2004, 2007-2010, 2011-2014 Synopsys, Inc. All rights reserved.
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-/*
- * This is optimized primarily for the ARC700.
- * It would be possible to speed up the loops by one cycle / word
- * respective one cycle / byte by forcing double source 1 alignment, unrolling
- * by a factor of two, and speculatively loading the second word / byte of
- * source 1; however, that would increase the overhead for loop setup / finish,
- * and strcmp might often terminate early.
- */
-
-.global strcmp
-.align 4
-strcmp:
- or %r2, %r0, %r1
- bmsk_s %r2, %r2, 1
- brne %r2, 0, .Lcharloop
- mov_s %r12, 0x01010101
- ror %r5, %r12
-.Lwordloop:
- ld.ab %r2, [%r0, 4]
- ld.ab %r3, [%r1, 4]
- nop_s
- sub %r4, %r2, %r12
- bic %r4, %r4, %r2
- and %r4, %r4, %r5
- brne %r4, 0, .Lfound0
- breq %r2 ,%r3, .Lwordloop
-#ifdef __LITTLE_ENDIAN__
- xor %r0, %r2, %r3 /* mask for difference */
- sub_s %r1, %r0, 1
- bic_s %r0, %r0, %r1 /* mask for least significant difference bit */
- sub %r1, %r5, %r0
- xor %r0, %r5, %r1 /* mask for least significant difference byte */
- and_s %r2, %r2, %r0
- and_s %r3, %r3, %r0
-#endif /* _ENDIAN__ */
- cmp_s %r2, %r3
- mov_s %r0, 1
- j_s.d [%blink]
- bset.lo %r0, %r0, 31
-
- .balign 4
-#ifdef __LITTLE_ENDIAN__
-.Lfound0:
- xor %r0, %r2, %r3 /* mask for difference */
- or %r0, %r0, %r4 /* or in zero indicator */
- sub_s %r1, %r0, 1
- bic_s %r0, %r0, %r1 /* mask for least significant difference bit */
- sub %r1, %r5, %r0
- xor %r0, %r5, %r1 /* mask for least significant difference byte */
- and_s %r2, %r2, %r0
- and_s %r3, %r3, %r0
- sub.f %r0, %r2, %r3
- mov.hi %r0, 1
- j_s.d [%blink]
- bset.lo %r0, %r0, 31
-#else /* __BIG_ENDIAN__ */
- /*
- * The zero-detection above can mis-detect 0x01 bytes as zeroes
- * because of carry-propagateion from a lower significant zero byte.
- * We can compensate for this by checking that bit0 is zero.
- * This compensation is not necessary in the step where we
- * get a low estimate for r2, because in any affected bytes
- * we already have 0x00 or 0x01, which will remain unchanged
- * when bit 7 is cleared.
- */
- .balign 4
-.Lfound0:
- lsr %r0, %r4, 8
- lsr_s %r1, %r2
- bic_s %r2, %r2, %r0 /* get low estimate for r2 and get ... */
- bic_s %r0, %r0, %r1 /* <this is the adjusted mask for zeros> */
- or_s %r3, %r3, %r0 /* ... high estimate r3 so that r2 > r3 will */
- cmp_s %r3, %r2 /* ... be independent of trailing garbage */
- or_s %r2, %r2, %r0 /* likewise for r3 > r2 */
- bic_s %r3, %r3, %r0
- rlc %r0, 0 /* r0 := r2 > r3 ? 1 : 0 */
- cmp_s %r2, %r3
- j_s.d [%blink]
- bset.lo %r0, %r0, 31
-#endif /* _ENDIAN__ */
-
- .balign 4
-.Lcharloop:
- ldb.ab %r2,[%r0,1]
- ldb.ab %r3,[%r1,1]
- nop_s
- breq %r2, 0, .Lcmpend
- breq %r2, %r3, .Lcharloop
-.Lcmpend:
- j_s.d [%blink]
- sub %r0, %r2, %r3
diff --git a/arch/arc/lib/strcpy-700.S b/arch/arc/lib/strcpy-700.S
deleted file mode 100644
index 41bb53e50152..000000000000
--- a/arch/arc/lib/strcpy-700.S
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2004, 2007-2010, 2011-2014 Synopsys, Inc. All rights reserved.
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-/*
- * If dst and src are 4 byte aligned, copy 8 bytes at a time.
- * If the src is 4, but not 8 byte aligned, we first read 4 bytes to get
- * it 8 byte aligned. Thus, we can do a little read-ahead, without
- * dereferencing a cache line that we should not touch.
- * Note that short and long instructions have been scheduled to avoid
- * branch stalls.
- * The beq_s to r3z could be made unaligned & long to avoid a stall
- * there, but it is not likely to be taken often, and it would also be likely
- * to cost an unaligned mispredict at the next call.
- */
-
-.global strcpy
-.align 4
-strcpy:
- or %r2, %r0, %r1
- bmsk_s %r2, %r2, 1
- brne.d %r2, 0, charloop
- mov_s %r10, %r0
- ld_s %r3, [%r1, 0]
- mov %r8, 0x01010101
- bbit0.d %r1, 2, loop_start
- ror %r12, %r8
- sub %r2, %r3, %r8
- bic_s %r2, %r2, %r3
- tst_s %r2,%r12
- bne r3z
- mov_s %r4,%r3
- .balign 4
-loop:
- ld.a %r3, [%r1, 4]
- st.ab %r4, [%r10, 4]
-loop_start:
- ld.a %r4, [%r1, 4]
- sub %r2, %r3, %r8
- bic_s %r2, %r2, %r3
- tst_s %r2, %r12
- bne_s r3z
- st.ab %r3, [%r10, 4]
- sub %r2, %r4, %r8
- bic %r2, %r2, %r4
- tst %r2, %r12
- beq loop
- mov_s %r3, %r4
-#ifdef __LITTLE_ENDIAN__
-r3z: bmsk.f %r1, %r3, 7
- lsr_s %r3, %r3, 8
-#else /* __BIG_ENDIAN__ */
-r3z: lsr.f %r1, %r3, 24
- asl_s %r3, %r3, 8
-#endif /* _ENDIAN__ */
- bne.d r3z
- stb.ab %r1, [%r10, 1]
- j_s [%blink]
-
- .balign 4
-charloop:
- ldb.ab %r3, [%r1, 1]
- brne.d %r3, 0, charloop
- stb.ab %r3, [%r10, 1]
- j [%blink]
diff --git a/arch/arc/lib/strlen.S b/arch/arc/lib/strlen.S
deleted file mode 100644
index 666e22c0d541..000000000000
--- a/arch/arc/lib/strlen.S
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (C) 2004, 2007-2010, 2011-2014 Synopsys, Inc. All rights reserved.
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-.global strlen
-.align 4
-strlen:
- or %r3, %r0, 7
- ld %r2, [%r3, -7]
- ld.a %r6, [%r3, -3]
- mov %r4, 0x01010101
- /* uses long immediate */
-#ifdef __LITTLE_ENDIAN__
- asl_s %r1, %r0, 3
- btst_s %r0, 2
- asl %r7, %r4, %r1
- ror %r5, %r4
- sub %r1, %r2, %r7
- bic_s %r1, %r1, %r2
- mov.eq %r7, %r4
- sub %r12, %r6, %r7
- bic %r12, %r12, %r6
- or.eq %r12, %r12, %r1
- and %r12, %r12, %r5
- brne %r12, 0, .Learly_end
-#else /* __BIG_ENDIAN__ */
- ror %r5, %r4
- btst_s %r0, 2
- mov_s %r1, 31
- sub3 %r7, %r1, %r0
- sub %r1, %r2, %r4
- bic_s %r1, %r1, %r2
- bmsk %r1, %r1, %r7
- sub %r12, %r6, %r4
- bic %r12, %r12, %r6
- bmsk.ne %r12, %r12, %r7
- or.eq %r12, %r12, %r1
- and %r12, %r12, %r5
- brne %r12, 0, .Learly_end
-#endif /* _ENDIAN__ */
-
-.Loop:
- ld_s %r2, [%r3, 4]
- ld.a %r6, [%r3, 8]
- /* stall for load result */
- sub %r1, %r2, %r4
- bic_s %r1, %r1, %r2
- sub %r12, %r6, %r4
- bic %r12, %r12, %r6
- or %r12, %r12, %r1
- and %r12, %r12, %r5
- breq %r12, 0, .Loop
-.Lend:
- and.f %r1, %r1, %r5
- sub.ne %r3, %r3, 4
- mov.eq %r1, %r12
-#ifdef __LITTLE_ENDIAN__
- sub_s %r2, %r1, 1
- bic_s %r2, %r2, %r1
- norm %r1, %r2
- sub_s %r0, %r0, 3
- lsr_s %r1, %r1, 3
- sub %r0, %r3, %r0
- j_s.d [%blink]
- sub %r0, %r0, %r1
-#else /* __BIG_ENDIAN__ */
- lsr_s %r1, %r1, 7
- mov.eq %r2, %r6
- bic_s %r1, %r1, %r2
- norm %r1, %r1
- sub %r0, %r3, %r0
- lsr_s %r1, %r1, 3
- j_s.d [%blink]
- add %r0, %r0, %r1
-#endif /* _ENDIAN */
-.Learly_end:
- b.d .Lend
- sub_s.ne %r1, %r1, %r1
--
2.14.3
1
0

25 Jan '18
From: Anatolij Gustschin <agust(a)denx.de>
Selecting this option will reduce SPL boot time by approx. 6 ms
(e. g. with 70 bytes long banner string at 115200 baud).
Signed-off-by: Anatolij Gustschin <agust(a)denx.de>
Tested-by: Lukasz Majewski <lukma(a)denx.de>
---
common/spl/Kconfig | 7 +++++++
common/spl/spl.c | 2 ++
2 files changed, 9 insertions(+)
diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index d686b1ecbd..d1f9cae6b7 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -118,6 +118,13 @@ config SPL_SEPARATE_BSS
location is used. Normally we put the device tree at the end of BSS
but with this option enabled, it goes at _image_binary_end.
+config SPL_DISABLE_BANNER_PRINT
+ bool "Disable output of the SPL banner 'U-Boot SPL ...'"
+ help
+ If this option is enabled, SPL will not print the banner with version
+ info. Selecting this option could be useful to reduce SPL boot time
+ (e.g. approx. 6 ms slower, when output on i.MX6 with 1152000 baud).
+
config SPL_DISPLAY_PRINT
bool "Display a board-specific message in SPL"
help
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 76c1963611..898c416a66 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -477,8 +477,10 @@ void preloader_console_init(void)
gd->have_console = 1;
+#ifndef CONFIG_SPL_DISABLE_BANNER_PRINT
puts("\nU-Boot SPL " PLAIN_VERSION " (" U_BOOT_DATE " - " \
U_BOOT_TIME ")\n");
+#endif
#ifdef CONFIG_SPL_DISPLAY_PRINT
spl_display_print();
#endif
--
2.11.0
2
2

[U-Boot] [PATCH 0/5] clk: support assigned-clock, assigned-clock-parents, assigned-clock-rates
by Philipp Tomsich 25 Jan '18
by Philipp Tomsich 25 Jan '18
25 Jan '18
For various peripherals on Rockchip SoCs (e.g. for the Ethernet GMAC),
the parent-clock needs to be set via the DTS. This adds the required
plumbing and implements the GMAC case for the RK3399.
Philipp Tomsich (5):
clk: add clk_set_parent()
clk: refactor clk_get_by_index() into clk_get_by_indexed_prop()
rockchip: clk: rk3399: implement set_parent() operation
clk: implement clk_set_defaults()
rockchip: clk: rk3399: accept all assigned-clocks from the 'cru'-node
drivers/clk/clk-uclass.c | 140 +++++++++++++++++++++++++++++++++++++-
drivers/clk/rockchip/clk_rk3399.c | 92 ++++++++++++++++++++++++-
drivers/core/device.c | 6 ++
include/clk-uclass.h | 8 +++
include/clk.h | 28 ++++++++
5 files changed, 270 insertions(+), 4 deletions(-)
--
2.1.4
1
5

[U-Boot] [PATCH] Convert CONFIG_SYS_MAX_NAND_DEVICE to Kconfig and add CONFIG_NAND
by Adam Ford 25 Jan '18
by Adam Ford 25 Jan '18
25 Jan '18
Many boards are setting NAND parameters if/when CMD_NAND is set
when in reality they should probably be doing it it CONFIG_NAND
is set. Previuos attempts to make CMD_NAND select CONFIG_NAND
resulted in some recursive selections, so I think this should be
a better solution
Using the moveconfig tool, I searched for CONFIG_SYS_MAX_NAND_DEVICE
and then any suspicious defconfig files left behind, I added
CONFIG_NAND=y, then retested the migration against that list.
This should allows us to make the CONFIG_CMD_NAND now dependant on
CONFIG_NAND and enable a bunch of NAND parameters under the NAND
menu without appearing 'suspicious'
This converts the following to Kconfig:
CONFIG_SYS_MAX_NAND_DEVICE
Signed-off-by: Adam Ford <aford173(a)gmail.com>
---
configs/B4420QDS_SPIFLASH_defconfig | 1 +
configs/B4420QDS_defconfig | 1 +
configs/B4860QDS_SECURE_BOOT_defconfig | 1 +
configs/B4860QDS_SPIFLASH_defconfig | 1 +
configs/B4860QDS_SRIO_PCIE_BOOT_defconfig | 1 +
configs/B4860QDS_defconfig | 1 +
configs/BSC9131RDB_SPIFLASH_SYSCLK100_defconfig | 1 +
configs/BSC9131RDB_SPIFLASH_defconfig | 1 +
configs/BSC9132QDS_NAND_DDRCLK100_SECURE_defconfig | 1 +
configs/BSC9132QDS_NAND_DDRCLK133_SECURE_defconfig | 1 +
configs/BSC9132QDS_NOR_DDRCLK100_SECURE_defconfig | 1 +
configs/BSC9132QDS_NOR_DDRCLK100_defconfig | 1 +
configs/BSC9132QDS_NOR_DDRCLK133_SECURE_defconfig | 1 +
configs/BSC9132QDS_NOR_DDRCLK133_defconfig | 1 +
configs/BSC9132QDS_SDCARD_DDRCLK100_SECURE_defconfig | 1 +
configs/BSC9132QDS_SDCARD_DDRCLK100_defconfig | 1 +
configs/BSC9132QDS_SDCARD_DDRCLK133_SECURE_defconfig | 1 +
configs/BSC9132QDS_SDCARD_DDRCLK133_defconfig | 1 +
configs/BSC9132QDS_SPIFLASH_DDRCLK100_SECURE_defconfig | 1 +
configs/BSC9132QDS_SPIFLASH_DDRCLK100_defconfig | 1 +
configs/BSC9132QDS_SPIFLASH_DDRCLK133_SECURE_defconfig | 1 +
configs/BSC9132QDS_SPIFLASH_DDRCLK133_defconfig | 1 +
configs/C29XPCIE_NOR_SECBOOT_defconfig | 1 +
configs/C29XPCIE_SPIFLASH_SECBOOT_defconfig | 1 +
configs/C29XPCIE_SPIFLASH_defconfig | 1 +
configs/C29XPCIE_defconfig | 1 +
configs/CHIP_pro_defconfig | 1 +
configs/M5329AFEE_defconfig | 1 +
configs/M5329BFEE_defconfig | 1 +
configs/M5373EVB_defconfig | 1 +
configs/MCR3000_defconfig | 1 +
configs/MPC8313ERDB_33_defconfig | 1 +
configs/MPC8313ERDB_66_defconfig | 1 +
configs/MPC8315ERDB_defconfig | 1 +
configs/MPC837XEMDS_HOST_defconfig | 1 +
configs/MPC837XEMDS_defconfig | 1 +
configs/MPC8536DS_36BIT_defconfig | 2 ++
configs/MPC8536DS_SDCARD_defconfig | 2 ++
configs/MPC8536DS_SPIFLASH_defconfig | 2 ++
configs/MPC8536DS_defconfig | 2 ++
configs/MPC8569MDS_ATM_defconfig | 1 +
configs/MPC8569MDS_defconfig | 1 +
configs/MPC8572DS_36BIT_defconfig | 2 ++
configs/MPC8572DS_defconfig | 2 ++
configs/P1010RDB-PA_36BIT_NAND_SECBOOT_defconfig | 1 +
configs/P1010RDB-PA_36BIT_NOR_SECBOOT_defconfig | 1 +
configs/P1010RDB-PA_36BIT_NOR_defconfig | 1 +
configs/P1010RDB-PA_36BIT_SDCARD_defconfig | 1 +
configs/P1010RDB-PA_36BIT_SPIFLASH_SECBOOT_defconfig | 1 +
configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig | 1 +
configs/P1010RDB-PA_NAND_SECBOOT_defconfig | 1 +
configs/P1010RDB-PA_NOR_SECBOOT_defconfig | 1 +
configs/P1010RDB-PA_NOR_defconfig | 1 +
configs/P1010RDB-PA_SDCARD_defconfig | 1 +
configs/P1010RDB-PA_SPIFLASH_SECBOOT_defconfig | 1 +
configs/P1010RDB-PA_SPIFLASH_defconfig | 1 +
configs/P1010RDB-PB_36BIT_NAND_SECBOOT_defconfig | 1 +
configs/P1010RDB-PB_36BIT_NOR_SECBOOT_defconfig | 1 +
configs/P1010RDB-PB_36BIT_NOR_defconfig | 1 +
configs/P1010RDB-PB_36BIT_SDCARD_defconfig | 1 +
configs/P1010RDB-PB_36BIT_SPIFLASH_SECBOOT_defconfig | 1 +
configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig | 1 +
configs/P1010RDB-PB_NAND_SECBOOT_defconfig | 1 +
configs/P1010RDB-PB_NOR_SECBOOT_defconfig | 1 +
configs/P1010RDB-PB_NOR_defconfig | 1 +
configs/P1010RDB-PB_SDCARD_defconfig | 1 +
configs/P1010RDB-PB_SPIFLASH_SECBOOT_defconfig | 1 +
configs/P1010RDB-PB_SPIFLASH_defconfig | 1 +
configs/P1020RDB-PC_36BIT_SDCARD_defconfig | 1 +
configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig | 1 +
configs/P1020RDB-PC_36BIT_defconfig | 1 +
configs/P1020RDB-PC_SDCARD_defconfig | 1 +
configs/P1020RDB-PC_SPIFLASH_defconfig | 1 +
configs/P1020RDB-PC_defconfig | 1 +
configs/P1020RDB-PD_SDCARD_defconfig | 1 +
configs/P1020RDB-PD_SPIFLASH_defconfig | 1 +
configs/P1020RDB-PD_defconfig | 1 +
configs/P1021RDB-PC_36BIT_SDCARD_defconfig | 1 +
configs/P1021RDB-PC_36BIT_SPIFLASH_defconfig | 1 +
configs/P1021RDB-PC_36BIT_defconfig | 1 +
configs/P1021RDB-PC_SDCARD_defconfig | 1 +
configs/P1021RDB-PC_SPIFLASH_defconfig | 1 +
configs/P1021RDB-PC_defconfig | 1 +
configs/P1022DS_36BIT_SDCARD_defconfig | 1 +
configs/P1022DS_36BIT_SPIFLASH_defconfig | 1 +
configs/P1022DS_36BIT_defconfig | 1 +
configs/P1022DS_SDCARD_defconfig | 1 +
configs/P1022DS_SPIFLASH_defconfig | 1 +
configs/P1022DS_defconfig | 1 +
configs/P1023RDB_defconfig | 1 +
configs/P1024RDB_36BIT_defconfig | 1 +
configs/P1024RDB_SDCARD_defconfig | 1 +
configs/P1024RDB_SPIFLASH_defconfig | 1 +
configs/P1024RDB_defconfig | 1 +
configs/P1025RDB_36BIT_defconfig | 1 +
configs/P1025RDB_SDCARD_defconfig | 1 +
configs/P1025RDB_SPIFLASH_defconfig | 1 +
configs/P1025RDB_defconfig | 1 +
configs/P2020RDB-PC_36BIT_SDCARD_defconfig | 1 +
configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig | 1 +
configs/P2020RDB-PC_36BIT_defconfig | 1 +
configs/P2020RDB-PC_SDCARD_defconfig | 1 +
configs/P2020RDB-PC_SPIFLASH_defconfig | 1 +
configs/P2020RDB-PC_defconfig | 1 +
configs/P2041RDB_SDCARD_defconfig | 1 +
configs/P2041RDB_SECURE_BOOT_defconfig | 1 +
configs/P2041RDB_SPIFLASH_defconfig | 1 +
configs/P2041RDB_SRIO_PCIE_BOOT_defconfig | 1 +
configs/P2041RDB_defconfig | 1 +
configs/P3041DS_SDCARD_defconfig | 1 +
configs/P3041DS_SECURE_BOOT_defconfig | 1 +
configs/P3041DS_SPIFLASH_defconfig | 1 +
configs/P3041DS_SRIO_PCIE_BOOT_defconfig | 1 +
configs/P3041DS_defconfig | 1 +
configs/P5020DS_SDCARD_defconfig | 1 +
configs/P5020DS_SECURE_BOOT_defconfig | 1 +
configs/P5020DS_SPIFLASH_defconfig | 1 +
configs/P5020DS_SRIO_PCIE_BOOT_defconfig | 1 +
configs/P5020DS_defconfig | 1 +
configs/P5040DS_SDCARD_defconfig | 1 +
configs/P5040DS_SECURE_BOOT_defconfig | 1 +
configs/P5040DS_SPIFLASH_defconfig | 1 +
configs/P5040DS_defconfig | 1 +
configs/T1023RDB_SDCARD_defconfig | 1 +
configs/T1023RDB_SECURE_BOOT_defconfig | 1 +
configs/T1023RDB_SPIFLASH_defconfig | 1 +
configs/T1023RDB_defconfig | 1 +
configs/T1024QDS_DDR4_SECURE_BOOT_defconfig | 1 +
configs/T1024QDS_DDR4_defconfig | 1 +
configs/T1024QDS_SDCARD_defconfig | 1 +
configs/T1024QDS_SECURE_BOOT_defconfig | 1 +
configs/T1024QDS_SPIFLASH_defconfig | 1 +
configs/T1024QDS_defconfig | 1 +
configs/T1024RDB_SDCARD_defconfig | 1 +
configs/T1024RDB_SECURE_BOOT_defconfig | 1 +
configs/T1024RDB_SPIFLASH_defconfig | 1 +
configs/T1024RDB_defconfig | 1 +
configs/T1040D4RDB_SDCARD_defconfig | 1 +
configs/T1040D4RDB_SECURE_BOOT_defconfig | 1 +
configs/T1040D4RDB_SPIFLASH_defconfig | 1 +
configs/T1040D4RDB_defconfig | 1 +
configs/T1040QDS_DDR4_defconfig | 1 +
configs/T1040QDS_SECURE_BOOT_defconfig | 1 +
configs/T1040QDS_defconfig | 1 +
configs/T1040RDB_SDCARD_defconfig | 1 +
configs/T1040RDB_SECURE_BOOT_defconfig | 1 +
configs/T1040RDB_SPIFLASH_defconfig | 1 +
configs/T1040RDB_defconfig | 1 +
configs/T1042D4RDB_SDCARD_defconfig | 1 +
configs/T1042D4RDB_SECURE_BOOT_defconfig | 1 +
configs/T1042D4RDB_SPIFLASH_defconfig | 1 +
configs/T1042D4RDB_defconfig | 1 +
configs/T1042RDB_PI_SDCARD_defconfig | 1 +
configs/T1042RDB_PI_SPIFLASH_defconfig | 1 +
configs/T1042RDB_PI_defconfig | 1 +
configs/T1042RDB_SECURE_BOOT_defconfig | 1 +
configs/T1042RDB_defconfig | 1 +
configs/T2080QDS_SDCARD_defconfig | 1 +
configs/T2080QDS_SECURE_BOOT_defconfig | 1 +
configs/T2080QDS_SPIFLASH_defconfig | 1 +
configs/T2080QDS_SRIO_PCIE_BOOT_defconfig | 1 +
configs/T2080QDS_defconfig | 1 +
configs/T2080RDB_SDCARD_defconfig | 1 +
configs/T2080RDB_SECURE_BOOT_defconfig | 1 +
configs/T2080RDB_SPIFLASH_defconfig | 1 +
configs/T2080RDB_SRIO_PCIE_BOOT_defconfig | 1 +
configs/T2080RDB_defconfig | 1 +
configs/T2081QDS_SDCARD_defconfig | 1 +
configs/T2081QDS_SPIFLASH_defconfig | 1 +
configs/T2081QDS_SRIO_PCIE_BOOT_defconfig | 1 +
configs/T2081QDS_defconfig | 1 +
configs/T4160QDS_SDCARD_defconfig | 1 +
configs/T4160QDS_SECURE_BOOT_defconfig | 1 +
configs/T4160QDS_defconfig | 1 +
configs/T4160RDB_defconfig | 1 +
configs/T4240QDS_SDCARD_defconfig | 1 +
configs/T4240QDS_SECURE_BOOT_defconfig | 1 +
configs/T4240QDS_SRIO_PCIE_BOOT_defconfig | 1 +
configs/T4240QDS_defconfig | 1 +
configs/T4240RDB_SDCARD_defconfig | 1 +
configs/T4240RDB_defconfig | 1 +
configs/apx4devkit_defconfig | 1 +
configs/aristainetos2_defconfig | 1 +
configs/aristainetos2b_defconfig | 1 +
configs/aristainetos_defconfig | 1 +
configs/at91sam9260ek_dataflash_cs0_defconfig | 1 +
configs/at91sam9260ek_dataflash_cs1_defconfig | 1 +
configs/at91sam9260ek_nandflash_defconfig | 1 +
configs/at91sam9261ek_dataflash_cs0_defconfig | 1 +
configs/at91sam9261ek_dataflash_cs3_defconfig | 1 +
configs/at91sam9261ek_nandflash_defconfig | 1 +
configs/at91sam9263ek_dataflash_cs0_defconfig | 1 +
configs/at91sam9263ek_dataflash_defconfig | 1 +
configs/at91sam9263ek_nandflash_defconfig | 1 +
configs/at91sam9263ek_norflash_boot_defconfig | 1 +
configs/at91sam9263ek_norflash_defconfig | 1 +
configs/at91sam9g10ek_dataflash_cs0_defconfig | 1 +
configs/at91sam9g10ek_dataflash_cs3_defconfig | 1 +
configs/at91sam9g10ek_nandflash_defconfig | 1 +
configs/at91sam9g20ek_2mmc_defconfig | 1 +
configs/at91sam9g20ek_2mmc_nandflash_defconfig | 1 +
configs/at91sam9g20ek_dataflash_cs0_defconfig | 1 +
configs/at91sam9g20ek_dataflash_cs1_defconfig | 1 +
configs/at91sam9g20ek_nandflash_defconfig | 1 +
configs/at91sam9m10g45ek_mmc_defconfig | 1 +
configs/at91sam9m10g45ek_nandflash_defconfig | 1 +
configs/at91sam9n12ek_mmc_defconfig | 1 +
configs/at91sam9n12ek_nandflash_defconfig | 1 +
configs/at91sam9n12ek_spiflash_defconfig | 1 +
configs/at91sam9rlek_dataflash_defconfig | 1 +
configs/at91sam9rlek_mmc_defconfig | 1 +
configs/at91sam9rlek_nandflash_defconfig | 1 +
configs/at91sam9x5ek_dataflash_defconfig | 1 +
configs/at91sam9x5ek_mmc_defconfig | 1 +
configs/at91sam9x5ek_nandflash_defconfig | 1 +
configs/at91sam9x5ek_spiflash_defconfig | 1 +
configs/at91sam9xeek_dataflash_cs0_defconfig | 1 +
configs/at91sam9xeek_dataflash_cs1_defconfig | 1 +
configs/at91sam9xeek_nandflash_defconfig | 1 +
configs/axm_defconfig | 1 +
configs/bg0900_defconfig | 1 +
configs/cm_fx6_defconfig | 1 +
configs/colibri_imx7_defconfig | 1 +
configs/colibri_t20_defconfig | 1 +
configs/corvus_defconfig | 1 +
configs/dns325_defconfig | 1 +
configs/dockstar_defconfig | 1 +
configs/ea20_defconfig | 1 +
configs/etamin_defconfig | 1 +
configs/ethernut5_defconfig | 1 +
configs/goflexhome_defconfig | 1 +
configs/gurnard_defconfig | 1 +
configs/guruplug_defconfig | 1 +
configs/gwventana_nand_defconfig | 1 +
configs/harmony_defconfig | 1 +
configs/ib62x0_defconfig | 1 +
configs/iconnect_defconfig | 1 +
configs/ids8313_defconfig | 1 +
configs/ipam390_defconfig | 1 +
configs/k2e_evm_defconfig | 1 +
configs/k2e_hs_evm_defconfig | 1 +
configs/k2g_evm_defconfig | 1 +
configs/k2g_hs_evm_defconfig | 1 +
configs/k2hk_evm_defconfig | 1 +
configs/k2hk_hs_evm_defconfig | 1 +
configs/k2l_evm_defconfig | 1 +
configs/km_kirkwood_128m16_defconfig | 1 +
configs/km_kirkwood_defconfig | 1 +
configs/km_kirkwood_pci_defconfig | 1 +
configs/kmcoge4_defconfig | 1 +
configs/kmcoge5ne_defconfig | 1 +
configs/kmcoge5un_defconfig | 1 +
configs/kmlion1_defconfig | 1 +
configs/kmnusa_defconfig | 1 +
configs/kmsugp1_defconfig | 1 +
configs/kmsuv31_defconfig | 1 +
configs/kmtegr1_defconfig | 1 +
configs/ls1021aqds_ddr4_nor_defconfig | 1 +
configs/ls1021aqds_ddr4_nor_lpuart_defconfig | 1 +
configs/ls1021aqds_nand_defconfig | 1 +
configs/ls1021aqds_nor_SECURE_BOOT_defconfig | 1 +
configs/ls1021aqds_nor_defconfig | 1 +
configs/ls1021aqds_nor_lpuart_defconfig | 1 +
configs/ls1021aqds_sdcard_ifc_defconfig | 1 +
configs/ls1043aqds_defconfig | 1 +
configs/ls1043aqds_lpuart_defconfig | 1 +
configs/ls1043aqds_nand_defconfig | 1 +
configs/ls1043aqds_nor_ddr3_defconfig | 1 +
configs/ls1043aqds_sdcard_ifc_defconfig | 1 +
configs/ls1043ardb_SECURE_BOOT_defconfig | 1 +
configs/ls1043ardb_defconfig | 1 +
configs/ls1043ardb_nand_SECURE_BOOT_defconfig | 1 +
configs/ls1043ardb_nand_defconfig | 1 +
configs/ls1043ardb_sdcard_SECURE_BOOT_defconfig | 1 +
configs/ls1043ardb_sdcard_defconfig | 1 +
configs/ls1046aqds_SECURE_BOOT_defconfig | 1 +
configs/ls1046aqds_defconfig | 1 +
configs/ls1046aqds_lpuart_defconfig | 1 +
configs/ls1046aqds_nand_defconfig | 1 +
configs/ls1046aqds_sdcard_ifc_defconfig | 1 +
configs/ls1046ardb_emmc_defconfig | 1 +
configs/ls1046ardb_qspi_SECURE_BOOT_defconfig | 1 +
configs/ls1046ardb_qspi_defconfig | 1 +
configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig | 1 +
configs/ls1046ardb_sdcard_defconfig | 1 +
configs/ls1088aqds_qspi_SECURE_BOOT_defconfig | 1 +
configs/ls1088aqds_qspi_defconfig | 1 +
configs/ls1088aqds_sdcard_qspi_defconfig | 1 +
configs/ls1088ardb_qspi_SECURE_BOOT_defconfig | 1 +
configs/ls1088ardb_qspi_defconfig | 1 +
configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig | 1 +
configs/ls1088ardb_sdcard_qspi_defconfig | 1 +
configs/ls2080a_simu_defconfig | 1 +
configs/ls2080aqds_SECURE_BOOT_defconfig | 1 +
configs/ls2080aqds_defconfig | 1 +
configs/ls2080aqds_qspi_defconfig | 1 +
configs/ls2080aqds_sdcard_defconfig | 1 +
configs/ls2080ardb_SECURE_BOOT_defconfig | 1 +
configs/ls2080ardb_defconfig | 1 +
configs/m28evk_defconfig | 1 +
configs/medcom-wide_defconfig | 1 +
configs/meesc_defconfig | 1 +
configs/mgcoge3un_defconfig | 1 +
configs/mvebu_db_armada8k_defconfig | 1 +
configs/mvebu_mcbin-88f8040_defconfig | 1 +
configs/mx28evk_auart_console_defconfig | 1 +
configs/mx28evk_defconfig | 1 +
configs/mx28evk_nand_defconfig | 1 +
configs/mx28evk_spi_defconfig | 1 +
configs/mx6sabreauto_defconfig | 1 +
configs/mx6sxsabreauto_defconfig | 1 +
configs/nas220_defconfig | 1 +
configs/nsa310s_defconfig | 1 +
configs/openrd_base_defconfig | 1 +
configs/openrd_client_defconfig | 1 +
configs/openrd_ultimate_defconfig | 1 +
configs/pcm058_defconfig | 1 +
configs/pfla02_defconfig | 1 +
configs/platinum_picon_defconfig | 1 +
configs/platinum_titanium_defconfig | 1 +
configs/plutux_defconfig | 1 +
configs/pm9261_defconfig | 1 +
configs/pm9263_defconfig | 1 +
configs/pm9g45_defconfig | 1 +
configs/pogo_e02_defconfig | 1 +
configs/portl2_defconfig | 1 +
configs/sama5d2_ptc_ek_mmc_defconfig | 1 +
configs/sama5d2_ptc_ek_nandflash_defconfig | 1 +
configs/sama5d36ek_cmp_mmc_defconfig | 1 +
configs/sama5d36ek_cmp_nandflash_defconfig | 1 +
configs/sama5d36ek_cmp_spiflash_defconfig | 1 +
configs/sama5d3_xplained_mmc_defconfig | 1 +
configs/sama5d3_xplained_nandflash_defconfig | 1 +
configs/sama5d3xek_mmc_defconfig | 1 +
configs/sama5d3xek_nandflash_defconfig | 1 +
configs/sama5d3xek_spiflash_defconfig | 1 +
configs/sama5d4_xplained_mmc_defconfig | 1 +
configs/sama5d4_xplained_nandflash_defconfig | 1 +
configs/sama5d4_xplained_spiflash_defconfig | 1 +
configs/sama5d4ek_mmc_defconfig | 1 +
configs/sama5d4ek_nandflash_defconfig | 1 +
configs/sama5d4ek_spiflash_defconfig | 1 +
configs/seaboard_defconfig | 1 +
configs/sheevaplug_defconfig | 1 +
configs/smartweb_defconfig | 1 +
configs/snapper9260_defconfig | 1 +
configs/snapper9g20_defconfig | 1 +
configs/socrates_defconfig | 1 +
configs/spear300_defconfig | 1 +
configs/spear300_usbtty_defconfig | 1 +
configs/spear310_defconfig | 1 +
configs/spear310_pnor_defconfig | 1 +
configs/spear310_usbtty_defconfig | 1 +
configs/spear310_usbtty_pnor_defconfig | 1 +
configs/spear320_defconfig | 1 +
configs/spear320_pnor_defconfig | 1 +
configs/spear320_usbtty_defconfig | 1 +
configs/spear320_usbtty_pnor_defconfig | 1 +
configs/spear600_defconfig | 1 +
configs/spear600_usbtty_defconfig | 1 +
configs/taurus_defconfig | 1 +
configs/tec_defconfig | 1 +
configs/titanium_defconfig | 1 +
configs/usb_a9263_dataflash_defconfig | 1 +
configs/ve8313_defconfig | 1 +
configs/wb45n_defconfig | 1 +
configs/wb50n_defconfig | 1 +
configs/work_92105_defconfig | 1 +
configs/x600_defconfig | 1 +
configs/xpedite517x_defconfig | 2 ++
configs/xpedite520x_defconfig | 1 +
configs/xpedite537x_defconfig | 2 ++
configs/xpedite550x_defconfig | 2 ++
drivers/mtd/nand/Kconfig | 6 ++++++
include/configs/B4860QDS.h | 1 -
include/configs/BSC9131RDB.h | 1 -
include/configs/BSC9132QDS.h | 1 -
include/configs/C29XPCIE.h | 1 -
include/configs/M5329EVB.h | 1 -
include/configs/M5373EVB.h | 1 -
include/configs/M54418TWR.h | 1 -
include/configs/MCR3000.h | 1 -
include/configs/MPC8313ERDB.h | 1 -
include/configs/MPC8315ERDB.h | 1 -
include/configs/MPC837XEMDS.h | 1 -
include/configs/MPC8536DS.h | 1 -
include/configs/MPC8569MDS.h | 1 -
include/configs/MPC8572DS.h | 1 -
include/configs/P1010RDB.h | 1 -
include/configs/P1022DS.h | 1 -
include/configs/P1023RDB.h | 1 -
include/configs/P2041RDB.h | 1 -
include/configs/T102xQDS.h | 1 -
include/configs/T102xRDB.h | 1 -
include/configs/T1040QDS.h | 1 -
include/configs/T104xRDB.h | 1 -
include/configs/T208xQDS.h | 1 -
include/configs/T208xRDB.h | 1 -
include/configs/T4240QDS.h | 1 -
include/configs/T4240RDB.h | 1 -
include/configs/am3517_crane.h | 1 -
include/configs/apf27.h | 1 -
include/configs/aristainetos-common.h | 1 -
include/configs/at91sam9260ek.h | 1 -
include/configs/at91sam9261ek.h | 1 -
include/configs/at91sam9263ek.h | 1 -
include/configs/at91sam9m10g45ek.h | 1 -
include/configs/at91sam9n12ek.h | 1 -
include/configs/at91sam9rlek.h | 1 -
include/configs/at91sam9x5ek.h | 1 -
include/configs/axs10x.h | 1 -
include/configs/brppt1.h | 1 -
include/configs/cm_fx6.h | 1 -
include/configs/cm_t35.h | 1 -
include/configs/cm_t3517.h | 1 -
include/configs/colibri_imx7.h | 1 -
include/configs/colibri_t20.h | 1 -
include/configs/colibri_vf.h | 1 -
include/configs/corenet_ds.h | 1 -
include/configs/corvus.h | 1 -
include/configs/da850evm.h | 1 -
include/configs/devkit3250.h | 1 -
include/configs/ea20.h | 1 -
include/configs/etamin.h | 2 --
include/configs/ethernut5.h | 1 -
include/configs/flea3.h | 1 -
include/configs/gw_ventana.h | 1 -
include/configs/harmony.h | 1 -
include/configs/ids8313.h | 1 -
include/configs/imx27lite-common.h | 1 -
include/configs/imx6-engicam.h | 1 -
include/configs/imx6_logic.h | 1 -
include/configs/ipam390.h | 1 -
include/configs/km/km83xx-common.h | 1 -
include/configs/km/km_arm.h | 1 -
include/configs/km/kmp204x-common.h | 1 -
include/configs/km8360.h | 1 -
include/configs/ls1021aqds.h | 1 -
include/configs/ls1043aqds.h | 1 -
include/configs/ls1043ardb.h | 1 -
include/configs/ls1046aqds.h | 1 -
include/configs/ls1046ardb.h | 1 -
include/configs/ls1088aqds.h | 1 -
include/configs/ls1088ardb.h | 1 -
include/configs/ls2080a_simu.h | 1 -
include/configs/ls2080aqds.h | 1 -
include/configs/ls2080ardb.h | 1 -
include/configs/m53evk.h | 1 -
include/configs/mcx.h | 1 -
include/configs/medcom-wide.h | 1 -
include/configs/meesc.h | 1 -
include/configs/mv-common.h | 3 ---
include/configs/mvebu_armada-8k.h | 1 -
include/configs/mx31pdk.h | 1 -
include/configs/mx35pdk.h | 1 -
include/configs/mx53ard.h | 1 -
include/configs/mx6sabreauto.h | 1 -
include/configs/mx6sxsabreauto.h | 1 -
include/configs/mx7dsabresd.h | 1 -
include/configs/mxs.h | 1 -
include/configs/omap3_beagle.h | 1 -
include/configs/omap3_cairo.h | 1 -
include/configs/omap3_evm.h | 1 -
include/configs/omap3_logic.h | 1 -
include/configs/omapl138_lcdk.h | 1 -
include/configs/p1_p2_rdb_pc.h | 1 -
include/configs/pcm052.h | 1 -
include/configs/pcm058.h | 1 -
include/configs/pfla02.h | 1 -
include/configs/platinum.h | 1 -
include/configs/plutux.h | 1 -
include/configs/pm9261.h | 1 -
include/configs/pm9263.h | 1 -
include/configs/pm9g45.h | 1 -
include/configs/s32v234evb.h | 1 -
include/configs/sama5d2_ptc_ek.h | 1 -
include/configs/sama5d3_xplained.h | 1 -
include/configs/sama5d3xek.h | 1 -
include/configs/sama5d4_xplained.h | 1 -
include/configs/sama5d4ek.h | 1 -
include/configs/seaboard.h | 1 -
include/configs/siemens-am33x-common.h | 1 -
include/configs/smartweb.h | 1 -
include/configs/snapper9260.h | 1 -
include/configs/snapper9g45.h | 1 -
include/configs/socfpga_common.h | 1 -
include/configs/socrates.h | 1 -
include/configs/spear-common.h | 1 -
include/configs/sunxi-common.h | 1 -
include/configs/suvd3.h | 1 -
include/configs/tam3517-common.h | 1 -
include/configs/tao3530.h | 1 -
include/configs/taurus.h | 1 -
include/configs/tec.h | 1 -
include/configs/ti816x_evm.h | 1 -
include/configs/ti_armv7_keystone2.h | 1 -
include/configs/ti_armv7_omap.h | 1 -
include/configs/titanium.h | 1 -
include/configs/tricorder.h | 1 -
include/configs/uniphier.h | 1 -
include/configs/usb_a9263.h | 1 -
include/configs/ve8313.h | 1 -
include/configs/vf610twr.h | 1 -
include/configs/wb45n.h | 1 -
include/configs/wb50n.h | 1 -
include/configs/woodburn_common.h | 1 -
include/configs/work_92105.h | 1 -
include/configs/x600.h | 1 -
include/configs/xilinx_zynqmp.h | 1 -
include/configs/xpedite517x.h | 1 -
include/configs/xpedite520x.h | 1 -
include/configs/xpedite537x.h | 1 -
include/configs/xpedite550x.h | 1 -
include/configs/zynq-common.h | 1 -
scripts/config_whitelist.txt | 1 -
515 files changed, 388 insertions(+), 144 deletions(-)
diff --git a/configs/B4420QDS_SPIFLASH_defconfig b/configs/B4420QDS_SPIFLASH_defconfig
index db5cdf9..26b77df 100644
--- a/configs/B4420QDS_SPIFLASH_defconfig
+++ b/configs/B4420QDS_SPIFLASH_defconfig
@@ -34,3 +34,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/B4420QDS_defconfig b/configs/B4420QDS_defconfig
index 6ce5b69..48156af 100644
--- a/configs/B4420QDS_defconfig
+++ b/configs/B4420QDS_defconfig
@@ -33,3 +33,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/B4860QDS_SECURE_BOOT_defconfig b/configs/B4860QDS_SECURE_BOOT_defconfig
index 8354ae1..0355da8 100644
--- a/configs/B4860QDS_SECURE_BOOT_defconfig
+++ b/configs/B4860QDS_SECURE_BOOT_defconfig
@@ -37,3 +37,4 @@ CONFIG_RSA=y
CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/B4860QDS_SPIFLASH_defconfig b/configs/B4860QDS_SPIFLASH_defconfig
index 615e01a..6785d3e 100644
--- a/configs/B4860QDS_SPIFLASH_defconfig
+++ b/configs/B4860QDS_SPIFLASH_defconfig
@@ -34,3 +34,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/B4860QDS_SRIO_PCIE_BOOT_defconfig b/configs/B4860QDS_SRIO_PCIE_BOOT_defconfig
index 573fc2e..626bdc6 100644
--- a/configs/B4860QDS_SRIO_PCIE_BOOT_defconfig
+++ b/configs/B4860QDS_SRIO_PCIE_BOOT_defconfig
@@ -33,3 +33,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/B4860QDS_defconfig b/configs/B4860QDS_defconfig
index 8e7d868..c16740c 100644
--- a/configs/B4860QDS_defconfig
+++ b/configs/B4860QDS_defconfig
@@ -33,3 +33,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/BSC9131RDB_SPIFLASH_SYSCLK100_defconfig b/configs/BSC9131RDB_SPIFLASH_SYSCLK100_defconfig
index a10fddd..63c2ac2 100644
--- a/configs/BSC9131RDB_SPIFLASH_SYSCLK100_defconfig
+++ b/configs/BSC9131RDB_SPIFLASH_SYSCLK100_defconfig
@@ -34,3 +34,4 @@ CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
CONFIG_FDT_FIXUP_PARTITIONS=y
+CONFIG_NAND=y
diff --git a/configs/BSC9131RDB_SPIFLASH_defconfig b/configs/BSC9131RDB_SPIFLASH_defconfig
index 747b2ae..3755cac 100644
--- a/configs/BSC9131RDB_SPIFLASH_defconfig
+++ b/configs/BSC9131RDB_SPIFLASH_defconfig
@@ -34,3 +34,4 @@ CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
CONFIG_FDT_FIXUP_PARTITIONS=y
+CONFIG_NAND=y
diff --git a/configs/BSC9132QDS_NAND_DDRCLK100_SECURE_defconfig b/configs/BSC9132QDS_NAND_DDRCLK100_SECURE_defconfig
index 01ab3c8..7e1e845 100644
--- a/configs/BSC9132QDS_NAND_DDRCLK100_SECURE_defconfig
+++ b/configs/BSC9132QDS_NAND_DDRCLK100_SECURE_defconfig
@@ -41,3 +41,4 @@ CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
CONFIG_FDT_FIXUP_PARTITIONS=y
+CONFIG_NAND=y
diff --git a/configs/BSC9132QDS_NAND_DDRCLK133_SECURE_defconfig b/configs/BSC9132QDS_NAND_DDRCLK133_SECURE_defconfig
index 369d9d8..12d5061 100644
--- a/configs/BSC9132QDS_NAND_DDRCLK133_SECURE_defconfig
+++ b/configs/BSC9132QDS_NAND_DDRCLK133_SECURE_defconfig
@@ -41,3 +41,4 @@ CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
CONFIG_FDT_FIXUP_PARTITIONS=y
+CONFIG_NAND=y
diff --git a/configs/BSC9132QDS_NOR_DDRCLK100_SECURE_defconfig b/configs/BSC9132QDS_NOR_DDRCLK100_SECURE_defconfig
index 28fc7a8..b8e9a8f 100644
--- a/configs/BSC9132QDS_NOR_DDRCLK100_SECURE_defconfig
+++ b/configs/BSC9132QDS_NOR_DDRCLK100_SECURE_defconfig
@@ -41,3 +41,4 @@ CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
CONFIG_FDT_FIXUP_PARTITIONS=y
+CONFIG_NAND=y
diff --git a/configs/BSC9132QDS_NOR_DDRCLK100_defconfig b/configs/BSC9132QDS_NOR_DDRCLK100_defconfig
index a07f1b2..f3862a3 100644
--- a/configs/BSC9132QDS_NOR_DDRCLK100_defconfig
+++ b/configs/BSC9132QDS_NOR_DDRCLK100_defconfig
@@ -37,3 +37,4 @@ CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
CONFIG_FDT_FIXUP_PARTITIONS=y
+CONFIG_NAND=y
diff --git a/configs/BSC9132QDS_NOR_DDRCLK133_SECURE_defconfig b/configs/BSC9132QDS_NOR_DDRCLK133_SECURE_defconfig
index 43a0815..bab95a3 100644
--- a/configs/BSC9132QDS_NOR_DDRCLK133_SECURE_defconfig
+++ b/configs/BSC9132QDS_NOR_DDRCLK133_SECURE_defconfig
@@ -41,3 +41,4 @@ CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
CONFIG_FDT_FIXUP_PARTITIONS=y
+CONFIG_NAND=y
diff --git a/configs/BSC9132QDS_NOR_DDRCLK133_defconfig b/configs/BSC9132QDS_NOR_DDRCLK133_defconfig
index 4433f3d..9929546 100644
--- a/configs/BSC9132QDS_NOR_DDRCLK133_defconfig
+++ b/configs/BSC9132QDS_NOR_DDRCLK133_defconfig
@@ -37,3 +37,4 @@ CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
CONFIG_FDT_FIXUP_PARTITIONS=y
+CONFIG_NAND=y
diff --git a/configs/BSC9132QDS_SDCARD_DDRCLK100_SECURE_defconfig b/configs/BSC9132QDS_SDCARD_DDRCLK100_SECURE_defconfig
index 2c515e8..f30632e 100644
--- a/configs/BSC9132QDS_SDCARD_DDRCLK100_SECURE_defconfig
+++ b/configs/BSC9132QDS_SDCARD_DDRCLK100_SECURE_defconfig
@@ -41,3 +41,4 @@ CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
CONFIG_FDT_FIXUP_PARTITIONS=y
+CONFIG_NAND=y
diff --git a/configs/BSC9132QDS_SDCARD_DDRCLK100_defconfig b/configs/BSC9132QDS_SDCARD_DDRCLK100_defconfig
index b3c4833..add5d8f 100644
--- a/configs/BSC9132QDS_SDCARD_DDRCLK100_defconfig
+++ b/configs/BSC9132QDS_SDCARD_DDRCLK100_defconfig
@@ -37,3 +37,4 @@ CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
CONFIG_FDT_FIXUP_PARTITIONS=y
+CONFIG_NAND=y
diff --git a/configs/BSC9132QDS_SDCARD_DDRCLK133_SECURE_defconfig b/configs/BSC9132QDS_SDCARD_DDRCLK133_SECURE_defconfig
index 2102a19..70825df 100644
--- a/configs/BSC9132QDS_SDCARD_DDRCLK133_SECURE_defconfig
+++ b/configs/BSC9132QDS_SDCARD_DDRCLK133_SECURE_defconfig
@@ -41,3 +41,4 @@ CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
CONFIG_FDT_FIXUP_PARTITIONS=y
+CONFIG_NAND=y
diff --git a/configs/BSC9132QDS_SDCARD_DDRCLK133_defconfig b/configs/BSC9132QDS_SDCARD_DDRCLK133_defconfig
index fd2d271..b7458f6 100644
--- a/configs/BSC9132QDS_SDCARD_DDRCLK133_defconfig
+++ b/configs/BSC9132QDS_SDCARD_DDRCLK133_defconfig
@@ -37,3 +37,4 @@ CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
CONFIG_FDT_FIXUP_PARTITIONS=y
+CONFIG_NAND=y
diff --git a/configs/BSC9132QDS_SPIFLASH_DDRCLK100_SECURE_defconfig b/configs/BSC9132QDS_SPIFLASH_DDRCLK100_SECURE_defconfig
index d484f2c..87fc6f0 100644
--- a/configs/BSC9132QDS_SPIFLASH_DDRCLK100_SECURE_defconfig
+++ b/configs/BSC9132QDS_SPIFLASH_DDRCLK100_SECURE_defconfig
@@ -41,3 +41,4 @@ CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
CONFIG_FDT_FIXUP_PARTITIONS=y
+CONFIG_NAND=y
diff --git a/configs/BSC9132QDS_SPIFLASH_DDRCLK100_defconfig b/configs/BSC9132QDS_SPIFLASH_DDRCLK100_defconfig
index c7329d6..6bd6721 100644
--- a/configs/BSC9132QDS_SPIFLASH_DDRCLK100_defconfig
+++ b/configs/BSC9132QDS_SPIFLASH_DDRCLK100_defconfig
@@ -37,3 +37,4 @@ CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
CONFIG_FDT_FIXUP_PARTITIONS=y
+CONFIG_NAND=y
diff --git a/configs/BSC9132QDS_SPIFLASH_DDRCLK133_SECURE_defconfig b/configs/BSC9132QDS_SPIFLASH_DDRCLK133_SECURE_defconfig
index 3738a10..9eda8d9 100644
--- a/configs/BSC9132QDS_SPIFLASH_DDRCLK133_SECURE_defconfig
+++ b/configs/BSC9132QDS_SPIFLASH_DDRCLK133_SECURE_defconfig
@@ -41,3 +41,4 @@ CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
CONFIG_FDT_FIXUP_PARTITIONS=y
+CONFIG_NAND=y
diff --git a/configs/BSC9132QDS_SPIFLASH_DDRCLK133_defconfig b/configs/BSC9132QDS_SPIFLASH_DDRCLK133_defconfig
index 5c0c4cf..d119d38 100644
--- a/configs/BSC9132QDS_SPIFLASH_DDRCLK133_defconfig
+++ b/configs/BSC9132QDS_SPIFLASH_DDRCLK133_defconfig
@@ -37,3 +37,4 @@ CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
CONFIG_FDT_FIXUP_PARTITIONS=y
+CONFIG_NAND=y
diff --git a/configs/C29XPCIE_NOR_SECBOOT_defconfig b/configs/C29XPCIE_NOR_SECBOOT_defconfig
index 29bcc9c..be2d594 100644
--- a/configs/C29XPCIE_NOR_SECBOOT_defconfig
+++ b/configs/C29XPCIE_NOR_SECBOOT_defconfig
@@ -33,3 +33,4 @@ CONFIG_RSA=y
CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/C29XPCIE_SPIFLASH_SECBOOT_defconfig b/configs/C29XPCIE_SPIFLASH_SECBOOT_defconfig
index a6f51cd..e6eae6f 100644
--- a/configs/C29XPCIE_SPIFLASH_SECBOOT_defconfig
+++ b/configs/C29XPCIE_SPIFLASH_SECBOOT_defconfig
@@ -34,3 +34,4 @@ CONFIG_RSA=y
CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/C29XPCIE_SPIFLASH_defconfig b/configs/C29XPCIE_SPIFLASH_defconfig
index 53d019f..6244f43 100644
--- a/configs/C29XPCIE_SPIFLASH_defconfig
+++ b/configs/C29XPCIE_SPIFLASH_defconfig
@@ -30,3 +30,4 @@ CONFIG_E1000=y
CONFIG_SYS_NS16550=y
CONFIG_FSL_ESPI=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/C29XPCIE_defconfig b/configs/C29XPCIE_defconfig
index c7422f6..7831ce1 100644
--- a/configs/C29XPCIE_defconfig
+++ b/configs/C29XPCIE_defconfig
@@ -29,3 +29,4 @@ CONFIG_E1000=y
CONFIG_SYS_NS16550=y
CONFIG_FSL_ESPI=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/CHIP_pro_defconfig b/configs/CHIP_pro_defconfig
index f47aead..97f2acd 100644
--- a/configs/CHIP_pro_defconfig
+++ b/configs/CHIP_pro_defconfig
@@ -20,6 +20,7 @@ CONFIG_ENV_UBI_VOLUME="uboot-env"
# CONFIG_MMC is not set
CONFIG_NAND=y
CONFIG_NAND_SUNXI=y
+CONFIG_SYS_MAX_NAND_DEVICE=8
CONFIG_AXP_ALDO3_VOLT=3300
CONFIG_AXP_ALDO4_VOLT=3300
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/M5329AFEE_defconfig b/configs/M5329AFEE_defconfig
index f6c2288..37b736f 100644
--- a/configs/M5329AFEE_defconfig
+++ b/configs/M5329AFEE_defconfig
@@ -14,3 +14,4 @@ CONFIG_CMD_PING=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_DATE=y
CONFIG_MTD_NOR_FLASH=y
+CONFIG_NAND=y
diff --git a/configs/M5329BFEE_defconfig b/configs/M5329BFEE_defconfig
index 2cad692..c56469e 100644
--- a/configs/M5329BFEE_defconfig
+++ b/configs/M5329BFEE_defconfig
@@ -14,3 +14,4 @@ CONFIG_CMD_PING=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_DATE=y
CONFIG_MTD_NOR_FLASH=y
+CONFIG_NAND=y
diff --git a/configs/M5373EVB_defconfig b/configs/M5373EVB_defconfig
index 0ec9e82..dc5d5a8 100644
--- a/configs/M5373EVB_defconfig
+++ b/configs/M5373EVB_defconfig
@@ -14,3 +14,4 @@ CONFIG_CMD_PING=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_DATE=y
CONFIG_MTD_NOR_FLASH=y
+CONFIG_NAND=y
diff --git a/configs/MCR3000_defconfig b/configs/MCR3000_defconfig
index ece2409..010ce06 100644
--- a/configs/MCR3000_defconfig
+++ b/configs/MCR3000_defconfig
@@ -70,3 +70,4 @@ CONFIG_MPC8XX_FEC=y
CONFIG_SHA256=y
CONFIG_LZMA=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/MPC8313ERDB_33_defconfig b/configs/MPC8313ERDB_33_defconfig
index cc07a15..b9ce2ce 100644
--- a/configs/MPC8313ERDB_33_defconfig
+++ b/configs/MPC8313ERDB_33_defconfig
@@ -24,3 +24,4 @@ CONFIG_MTD_NOR_FLASH=y
CONFIG_PHYLIB=y
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/MPC8313ERDB_66_defconfig b/configs/MPC8313ERDB_66_defconfig
index 5643dec..5d60ffb 100644
--- a/configs/MPC8313ERDB_66_defconfig
+++ b/configs/MPC8313ERDB_66_defconfig
@@ -24,3 +24,4 @@ CONFIG_MTD_NOR_FLASH=y
CONFIG_PHYLIB=y
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/MPC8315ERDB_defconfig b/configs/MPC8315ERDB_defconfig
index 473b9a6..a157b5b 100644
--- a/configs/MPC8315ERDB_defconfig
+++ b/configs/MPC8315ERDB_defconfig
@@ -28,3 +28,4 @@ CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/MPC837XEMDS_HOST_defconfig b/configs/MPC837XEMDS_HOST_defconfig
index 36c2fae..f9514f0 100644
--- a/configs/MPC837XEMDS_HOST_defconfig
+++ b/configs/MPC837XEMDS_HOST_defconfig
@@ -24,3 +24,4 @@ CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/MPC837XEMDS_defconfig b/configs/MPC837XEMDS_defconfig
index b172b92..89f7c9e 100644
--- a/configs/MPC837XEMDS_defconfig
+++ b/configs/MPC837XEMDS_defconfig
@@ -20,3 +20,4 @@ CONFIG_PHYLIB=y
# CONFIG_PCI is not set
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/MPC8536DS_36BIT_defconfig b/configs/MPC8536DS_36BIT_defconfig
index a66baa0..aa846e2 100644
--- a/configs/MPC8536DS_36BIT_defconfig
+++ b/configs/MPC8536DS_36BIT_defconfig
@@ -24,6 +24,8 @@ CONFIG_CMD_FAT=y
CONFIG_ENV_IS_IN_FLASH=y
CONFIG_SYS_FSL_DDR2=y
CONFIG_MTD_NOR_FLASH=y
+CONFIG_NAND=y
+CONFIG_SYS_MAX_NAND_DEVICE=4
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_PHYLIB=y
diff --git a/configs/MPC8536DS_SDCARD_defconfig b/configs/MPC8536DS_SDCARD_defconfig
index 3a19872..d8a1c8c 100644
--- a/configs/MPC8536DS_SDCARD_defconfig
+++ b/configs/MPC8536DS_SDCARD_defconfig
@@ -23,6 +23,8 @@ CONFIG_CMD_FAT=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_FSL_DDR2=y
CONFIG_MTD_NOR_FLASH=y
+CONFIG_NAND=y
+CONFIG_SYS_MAX_NAND_DEVICE=4
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_PHYLIB=y
diff --git a/configs/MPC8536DS_SPIFLASH_defconfig b/configs/MPC8536DS_SPIFLASH_defconfig
index 2849e17..ad7665e 100644
--- a/configs/MPC8536DS_SPIFLASH_defconfig
+++ b/configs/MPC8536DS_SPIFLASH_defconfig
@@ -23,6 +23,8 @@ CONFIG_CMD_FAT=y
CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_SYS_FSL_DDR2=y
CONFIG_MTD_NOR_FLASH=y
+CONFIG_NAND=y
+CONFIG_SYS_MAX_NAND_DEVICE=4
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_PHYLIB=y
diff --git a/configs/MPC8536DS_defconfig b/configs/MPC8536DS_defconfig
index 06b0448..9e93736 100644
--- a/configs/MPC8536DS_defconfig
+++ b/configs/MPC8536DS_defconfig
@@ -23,6 +23,8 @@ CONFIG_CMD_FAT=y
CONFIG_ENV_IS_IN_FLASH=y
CONFIG_SYS_FSL_DDR2=y
CONFIG_MTD_NOR_FLASH=y
+CONFIG_NAND=y
+CONFIG_SYS_MAX_NAND_DEVICE=4
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_PHYLIB=y
diff --git a/configs/MPC8569MDS_ATM_defconfig b/configs/MPC8569MDS_ATM_defconfig
index 7682251..040095d 100644
--- a/configs/MPC8569MDS_ATM_defconfig
+++ b/configs/MPC8569MDS_ATM_defconfig
@@ -25,3 +25,4 @@ CONFIG_NETDEVICES=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/MPC8569MDS_defconfig b/configs/MPC8569MDS_defconfig
index 7cd305f..b4d33a8 100644
--- a/configs/MPC8569MDS_defconfig
+++ b/configs/MPC8569MDS_defconfig
@@ -24,3 +24,4 @@ CONFIG_NETDEVICES=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/MPC8572DS_36BIT_defconfig b/configs/MPC8572DS_36BIT_defconfig
index 14e2933..bfecb7d 100644
--- a/configs/MPC8572DS_36BIT_defconfig
+++ b/configs/MPC8572DS_36BIT_defconfig
@@ -22,6 +22,8 @@ CONFIG_SCSI_AHCI=y
CONFIG_SYS_FSL_DDR2=y
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
+CONFIG_NAND=y
+CONFIG_SYS_MAX_NAND_DEVICE=4
CONFIG_PHYLIB=y
CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
diff --git a/configs/MPC8572DS_defconfig b/configs/MPC8572DS_defconfig
index 86546f0..165fb66 100644
--- a/configs/MPC8572DS_defconfig
+++ b/configs/MPC8572DS_defconfig
@@ -21,6 +21,8 @@ CONFIG_SCSI_AHCI=y
CONFIG_SYS_FSL_DDR2=y
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
+CONFIG_NAND=y
+CONFIG_SYS_MAX_NAND_DEVICE=4
CONFIG_PHYLIB=y
CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
diff --git a/configs/P1010RDB-PA_36BIT_NAND_SECBOOT_defconfig b/configs/P1010RDB-PA_36BIT_NAND_SECBOOT_defconfig
index d004ddd..8372b0a 100644
--- a/configs/P1010RDB-PA_36BIT_NAND_SECBOOT_defconfig
+++ b/configs/P1010RDB-PA_36BIT_NAND_SECBOOT_defconfig
@@ -41,3 +41,4 @@ CONFIG_RSA=y
CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1010RDB-PA_36BIT_NOR_SECBOOT_defconfig b/configs/P1010RDB-PA_36BIT_NOR_SECBOOT_defconfig
index de0c7d7..4b4e997 100644
--- a/configs/P1010RDB-PA_36BIT_NOR_SECBOOT_defconfig
+++ b/configs/P1010RDB-PA_36BIT_NOR_SECBOOT_defconfig
@@ -40,3 +40,4 @@ CONFIG_RSA=y
CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1010RDB-PA_36BIT_NOR_defconfig b/configs/P1010RDB-PA_36BIT_NOR_defconfig
index cadd2fc..9b5ee67 100644
--- a/configs/P1010RDB-PA_36BIT_NOR_defconfig
+++ b/configs/P1010RDB-PA_36BIT_NOR_defconfig
@@ -36,3 +36,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1010RDB-PA_36BIT_SDCARD_defconfig b/configs/P1010RDB-PA_36BIT_SDCARD_defconfig
index 40ad810..873160d 100644
--- a/configs/P1010RDB-PA_36BIT_SDCARD_defconfig
+++ b/configs/P1010RDB-PA_36BIT_SDCARD_defconfig
@@ -46,3 +46,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1010RDB-PA_36BIT_SPIFLASH_SECBOOT_defconfig b/configs/P1010RDB-PA_36BIT_SPIFLASH_SECBOOT_defconfig
index 240b413..548e3f9 100644
--- a/configs/P1010RDB-PA_36BIT_SPIFLASH_SECBOOT_defconfig
+++ b/configs/P1010RDB-PA_36BIT_SPIFLASH_SECBOOT_defconfig
@@ -41,3 +41,4 @@ CONFIG_RSA=y
CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig b/configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig
index c159bad..8c0f8b7 100644
--- a/configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig
+++ b/configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig
@@ -47,3 +47,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1010RDB-PA_NAND_SECBOOT_defconfig b/configs/P1010RDB-PA_NAND_SECBOOT_defconfig
index a49c837..0e492e9 100644
--- a/configs/P1010RDB-PA_NAND_SECBOOT_defconfig
+++ b/configs/P1010RDB-PA_NAND_SECBOOT_defconfig
@@ -40,3 +40,4 @@ CONFIG_RSA=y
CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1010RDB-PA_NOR_SECBOOT_defconfig b/configs/P1010RDB-PA_NOR_SECBOOT_defconfig
index e149a76..618e3e9 100644
--- a/configs/P1010RDB-PA_NOR_SECBOOT_defconfig
+++ b/configs/P1010RDB-PA_NOR_SECBOOT_defconfig
@@ -39,3 +39,4 @@ CONFIG_RSA=y
CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1010RDB-PA_NOR_defconfig b/configs/P1010RDB-PA_NOR_defconfig
index 9f96128..0c4c07e 100644
--- a/configs/P1010RDB-PA_NOR_defconfig
+++ b/configs/P1010RDB-PA_NOR_defconfig
@@ -35,3 +35,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1010RDB-PA_SDCARD_defconfig b/configs/P1010RDB-PA_SDCARD_defconfig
index 2a62987..a2ac5f6 100644
--- a/configs/P1010RDB-PA_SDCARD_defconfig
+++ b/configs/P1010RDB-PA_SDCARD_defconfig
@@ -45,3 +45,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1010RDB-PA_SPIFLASH_SECBOOT_defconfig b/configs/P1010RDB-PA_SPIFLASH_SECBOOT_defconfig
index d51d3ff..7b85841 100644
--- a/configs/P1010RDB-PA_SPIFLASH_SECBOOT_defconfig
+++ b/configs/P1010RDB-PA_SPIFLASH_SECBOOT_defconfig
@@ -40,3 +40,4 @@ CONFIG_RSA=y
CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1010RDB-PA_SPIFLASH_defconfig b/configs/P1010RDB-PA_SPIFLASH_defconfig
index b08a0e7..ca084c7 100644
--- a/configs/P1010RDB-PA_SPIFLASH_defconfig
+++ b/configs/P1010RDB-PA_SPIFLASH_defconfig
@@ -46,3 +46,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1010RDB-PB_36BIT_NAND_SECBOOT_defconfig b/configs/P1010RDB-PB_36BIT_NAND_SECBOOT_defconfig
index eb394bf..c8f8010 100644
--- a/configs/P1010RDB-PB_36BIT_NAND_SECBOOT_defconfig
+++ b/configs/P1010RDB-PB_36BIT_NAND_SECBOOT_defconfig
@@ -41,3 +41,4 @@ CONFIG_RSA=y
CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1010RDB-PB_36BIT_NOR_SECBOOT_defconfig b/configs/P1010RDB-PB_36BIT_NOR_SECBOOT_defconfig
index d5cb8af..64a799d 100644
--- a/configs/P1010RDB-PB_36BIT_NOR_SECBOOT_defconfig
+++ b/configs/P1010RDB-PB_36BIT_NOR_SECBOOT_defconfig
@@ -40,3 +40,4 @@ CONFIG_RSA=y
CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1010RDB-PB_36BIT_NOR_defconfig b/configs/P1010RDB-PB_36BIT_NOR_defconfig
index 72d669d..332d4b0 100644
--- a/configs/P1010RDB-PB_36BIT_NOR_defconfig
+++ b/configs/P1010RDB-PB_36BIT_NOR_defconfig
@@ -36,3 +36,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1010RDB-PB_36BIT_SDCARD_defconfig b/configs/P1010RDB-PB_36BIT_SDCARD_defconfig
index b59532d..22d339f 100644
--- a/configs/P1010RDB-PB_36BIT_SDCARD_defconfig
+++ b/configs/P1010RDB-PB_36BIT_SDCARD_defconfig
@@ -46,3 +46,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1010RDB-PB_36BIT_SPIFLASH_SECBOOT_defconfig b/configs/P1010RDB-PB_36BIT_SPIFLASH_SECBOOT_defconfig
index 2ee9ec3..721f789 100644
--- a/configs/P1010RDB-PB_36BIT_SPIFLASH_SECBOOT_defconfig
+++ b/configs/P1010RDB-PB_36BIT_SPIFLASH_SECBOOT_defconfig
@@ -41,3 +41,4 @@ CONFIG_RSA=y
CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig b/configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig
index ca618a0..3e09f04 100644
--- a/configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig
+++ b/configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig
@@ -47,3 +47,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1010RDB-PB_NAND_SECBOOT_defconfig b/configs/P1010RDB-PB_NAND_SECBOOT_defconfig
index 582d1aa..3c550f1 100644
--- a/configs/P1010RDB-PB_NAND_SECBOOT_defconfig
+++ b/configs/P1010RDB-PB_NAND_SECBOOT_defconfig
@@ -40,3 +40,4 @@ CONFIG_RSA=y
CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1010RDB-PB_NOR_SECBOOT_defconfig b/configs/P1010RDB-PB_NOR_SECBOOT_defconfig
index 3ae5485..71b3b56 100644
--- a/configs/P1010RDB-PB_NOR_SECBOOT_defconfig
+++ b/configs/P1010RDB-PB_NOR_SECBOOT_defconfig
@@ -39,3 +39,4 @@ CONFIG_RSA=y
CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1010RDB-PB_NOR_defconfig b/configs/P1010RDB-PB_NOR_defconfig
index 68a68df..032e993 100644
--- a/configs/P1010RDB-PB_NOR_defconfig
+++ b/configs/P1010RDB-PB_NOR_defconfig
@@ -35,3 +35,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1010RDB-PB_SDCARD_defconfig b/configs/P1010RDB-PB_SDCARD_defconfig
index 9db32c1..8bb89aa 100644
--- a/configs/P1010RDB-PB_SDCARD_defconfig
+++ b/configs/P1010RDB-PB_SDCARD_defconfig
@@ -45,3 +45,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1010RDB-PB_SPIFLASH_SECBOOT_defconfig b/configs/P1010RDB-PB_SPIFLASH_SECBOOT_defconfig
index 80f8c27..d7f4b67 100644
--- a/configs/P1010RDB-PB_SPIFLASH_SECBOOT_defconfig
+++ b/configs/P1010RDB-PB_SPIFLASH_SECBOOT_defconfig
@@ -40,3 +40,4 @@ CONFIG_RSA=y
CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1010RDB-PB_SPIFLASH_defconfig b/configs/P1010RDB-PB_SPIFLASH_defconfig
index 7ba107d..3b4409a 100644
--- a/configs/P1010RDB-PB_SPIFLASH_defconfig
+++ b/configs/P1010RDB-PB_SPIFLASH_defconfig
@@ -46,3 +46,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1020RDB-PC_36BIT_SDCARD_defconfig b/configs/P1020RDB-PC_36BIT_SDCARD_defconfig
index 5c14609..b522c11 100644
--- a/configs/P1020RDB-PC_36BIT_SDCARD_defconfig
+++ b/configs/P1020RDB-PC_36BIT_SDCARD_defconfig
@@ -43,3 +43,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig b/configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig
index 6a5c1f9..10a0600 100644
--- a/configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig
+++ b/configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig
@@ -44,3 +44,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1020RDB-PC_36BIT_defconfig b/configs/P1020RDB-PC_36BIT_defconfig
index 0581507..14a6697 100644
--- a/configs/P1020RDB-PC_36BIT_defconfig
+++ b/configs/P1020RDB-PC_36BIT_defconfig
@@ -34,3 +34,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1020RDB-PC_SDCARD_defconfig b/configs/P1020RDB-PC_SDCARD_defconfig
index eb9d9a8..cfc0bbb 100644
--- a/configs/P1020RDB-PC_SDCARD_defconfig
+++ b/configs/P1020RDB-PC_SDCARD_defconfig
@@ -42,3 +42,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1020RDB-PC_SPIFLASH_defconfig b/configs/P1020RDB-PC_SPIFLASH_defconfig
index 256b714..880f87b 100644
--- a/configs/P1020RDB-PC_SPIFLASH_defconfig
+++ b/configs/P1020RDB-PC_SPIFLASH_defconfig
@@ -43,3 +43,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1020RDB-PC_defconfig b/configs/P1020RDB-PC_defconfig
index e39ad20..e4c2ade 100644
--- a/configs/P1020RDB-PC_defconfig
+++ b/configs/P1020RDB-PC_defconfig
@@ -33,3 +33,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1020RDB-PD_SDCARD_defconfig b/configs/P1020RDB-PD_SDCARD_defconfig
index 400471a..efaadae 100644
--- a/configs/P1020RDB-PD_SDCARD_defconfig
+++ b/configs/P1020RDB-PD_SDCARD_defconfig
@@ -45,3 +45,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1020RDB-PD_SPIFLASH_defconfig b/configs/P1020RDB-PD_SPIFLASH_defconfig
index a004df4..3387597 100644
--- a/configs/P1020RDB-PD_SPIFLASH_defconfig
+++ b/configs/P1020RDB-PD_SPIFLASH_defconfig
@@ -46,3 +46,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1020RDB-PD_defconfig b/configs/P1020RDB-PD_defconfig
index 3c88e48..424457e 100644
--- a/configs/P1020RDB-PD_defconfig
+++ b/configs/P1020RDB-PD_defconfig
@@ -36,3 +36,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1021RDB-PC_36BIT_SDCARD_defconfig b/configs/P1021RDB-PC_36BIT_SDCARD_defconfig
index 45a74b2..71292b1f 100644
--- a/configs/P1021RDB-PC_36BIT_SDCARD_defconfig
+++ b/configs/P1021RDB-PC_36BIT_SDCARD_defconfig
@@ -47,3 +47,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1021RDB-PC_36BIT_SPIFLASH_defconfig b/configs/P1021RDB-PC_36BIT_SPIFLASH_defconfig
index 14d73ed..8955859 100644
--- a/configs/P1021RDB-PC_36BIT_SPIFLASH_defconfig
+++ b/configs/P1021RDB-PC_36BIT_SPIFLASH_defconfig
@@ -48,3 +48,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1021RDB-PC_36BIT_defconfig b/configs/P1021RDB-PC_36BIT_defconfig
index a72458c..edd9987 100644
--- a/configs/P1021RDB-PC_36BIT_defconfig
+++ b/configs/P1021RDB-PC_36BIT_defconfig
@@ -38,3 +38,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1021RDB-PC_SDCARD_defconfig b/configs/P1021RDB-PC_SDCARD_defconfig
index 0cff7ff..03067a3 100644
--- a/configs/P1021RDB-PC_SDCARD_defconfig
+++ b/configs/P1021RDB-PC_SDCARD_defconfig
@@ -46,3 +46,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1021RDB-PC_SPIFLASH_defconfig b/configs/P1021RDB-PC_SPIFLASH_defconfig
index 37f7f0f..ea8b735 100644
--- a/configs/P1021RDB-PC_SPIFLASH_defconfig
+++ b/configs/P1021RDB-PC_SPIFLASH_defconfig
@@ -47,3 +47,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1021RDB-PC_defconfig b/configs/P1021RDB-PC_defconfig
index 69b5c90..50eef82 100644
--- a/configs/P1021RDB-PC_defconfig
+++ b/configs/P1021RDB-PC_defconfig
@@ -37,3 +37,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1022DS_36BIT_SDCARD_defconfig b/configs/P1022DS_36BIT_SDCARD_defconfig
index 7d29f96..ff03e14 100644
--- a/configs/P1022DS_36BIT_SDCARD_defconfig
+++ b/configs/P1022DS_36BIT_SDCARD_defconfig
@@ -47,3 +47,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1022DS_36BIT_SPIFLASH_defconfig b/configs/P1022DS_36BIT_SPIFLASH_defconfig
index a98f108..a38984d 100644
--- a/configs/P1022DS_36BIT_SPIFLASH_defconfig
+++ b/configs/P1022DS_36BIT_SPIFLASH_defconfig
@@ -48,3 +48,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1022DS_36BIT_defconfig b/configs/P1022DS_36BIT_defconfig
index 352b397..22b4699 100644
--- a/configs/P1022DS_36BIT_defconfig
+++ b/configs/P1022DS_36BIT_defconfig
@@ -38,3 +38,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1022DS_SDCARD_defconfig b/configs/P1022DS_SDCARD_defconfig
index 6b039fe..3c72819 100644
--- a/configs/P1022DS_SDCARD_defconfig
+++ b/configs/P1022DS_SDCARD_defconfig
@@ -46,3 +46,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1022DS_SPIFLASH_defconfig b/configs/P1022DS_SPIFLASH_defconfig
index f128a87..2a95cf5 100644
--- a/configs/P1022DS_SPIFLASH_defconfig
+++ b/configs/P1022DS_SPIFLASH_defconfig
@@ -47,3 +47,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1022DS_defconfig b/configs/P1022DS_defconfig
index 8690b02..5523d3f 100644
--- a/configs/P1022DS_defconfig
+++ b/configs/P1022DS_defconfig
@@ -37,3 +37,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1023RDB_defconfig b/configs/P1023RDB_defconfig
index bfe84a9..5ad1774 100644
--- a/configs/P1023RDB_defconfig
+++ b/configs/P1023RDB_defconfig
@@ -32,3 +32,4 @@ CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1024RDB_36BIT_defconfig b/configs/P1024RDB_36BIT_defconfig
index a310192..6ce5e79 100644
--- a/configs/P1024RDB_36BIT_defconfig
+++ b/configs/P1024RDB_36BIT_defconfig
@@ -34,3 +34,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1024RDB_SDCARD_defconfig b/configs/P1024RDB_SDCARD_defconfig
index 0bf2c36..7a6a188 100644
--- a/configs/P1024RDB_SDCARD_defconfig
+++ b/configs/P1024RDB_SDCARD_defconfig
@@ -42,3 +42,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1024RDB_SPIFLASH_defconfig b/configs/P1024RDB_SPIFLASH_defconfig
index 4f64c7e..c850d6e 100644
--- a/configs/P1024RDB_SPIFLASH_defconfig
+++ b/configs/P1024RDB_SPIFLASH_defconfig
@@ -43,3 +43,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1024RDB_defconfig b/configs/P1024RDB_defconfig
index aaa7228..384df04 100644
--- a/configs/P1024RDB_defconfig
+++ b/configs/P1024RDB_defconfig
@@ -33,3 +33,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1025RDB_36BIT_defconfig b/configs/P1025RDB_36BIT_defconfig
index de6a904..62578c3 100644
--- a/configs/P1025RDB_36BIT_defconfig
+++ b/configs/P1025RDB_36BIT_defconfig
@@ -36,3 +36,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1025RDB_SDCARD_defconfig b/configs/P1025RDB_SDCARD_defconfig
index 8049e0a..7c52bcc 100644
--- a/configs/P1025RDB_SDCARD_defconfig
+++ b/configs/P1025RDB_SDCARD_defconfig
@@ -44,3 +44,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1025RDB_SPIFLASH_defconfig b/configs/P1025RDB_SPIFLASH_defconfig
index 3e1c62d..62618ed 100644
--- a/configs/P1025RDB_SPIFLASH_defconfig
+++ b/configs/P1025RDB_SPIFLASH_defconfig
@@ -45,3 +45,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P1025RDB_defconfig b/configs/P1025RDB_defconfig
index 91ab8b8..ce63b02 100644
--- a/configs/P1025RDB_defconfig
+++ b/configs/P1025RDB_defconfig
@@ -35,3 +35,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P2020RDB-PC_36BIT_SDCARD_defconfig b/configs/P2020RDB-PC_36BIT_SDCARD_defconfig
index 2f9702e..9543834 100644
--- a/configs/P2020RDB-PC_36BIT_SDCARD_defconfig
+++ b/configs/P2020RDB-PC_36BIT_SDCARD_defconfig
@@ -47,3 +47,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig b/configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig
index 539b884..01f8156 100644
--- a/configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig
+++ b/configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig
@@ -48,3 +48,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P2020RDB-PC_36BIT_defconfig b/configs/P2020RDB-PC_36BIT_defconfig
index 8b08443..9934bb3 100644
--- a/configs/P2020RDB-PC_36BIT_defconfig
+++ b/configs/P2020RDB-PC_36BIT_defconfig
@@ -38,3 +38,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P2020RDB-PC_SDCARD_defconfig b/configs/P2020RDB-PC_SDCARD_defconfig
index f2322ba..b0b8577 100644
--- a/configs/P2020RDB-PC_SDCARD_defconfig
+++ b/configs/P2020RDB-PC_SDCARD_defconfig
@@ -46,3 +46,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P2020RDB-PC_SPIFLASH_defconfig b/configs/P2020RDB-PC_SPIFLASH_defconfig
index e893f78..7ab3a37 100644
--- a/configs/P2020RDB-PC_SPIFLASH_defconfig
+++ b/configs/P2020RDB-PC_SPIFLASH_defconfig
@@ -47,3 +47,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P2020RDB-PC_defconfig b/configs/P2020RDB-PC_defconfig
index f470768..99d22c5 100644
--- a/configs/P2020RDB-PC_defconfig
+++ b/configs/P2020RDB-PC_defconfig
@@ -37,3 +37,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P2041RDB_SDCARD_defconfig b/configs/P2041RDB_SDCARD_defconfig
index 40f4e9f..ebcf35c 100644
--- a/configs/P2041RDB_SDCARD_defconfig
+++ b/configs/P2041RDB_SDCARD_defconfig
@@ -34,3 +34,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P2041RDB_SECURE_BOOT_defconfig b/configs/P2041RDB_SECURE_BOOT_defconfig
index a63df61..db281cf 100644
--- a/configs/P2041RDB_SECURE_BOOT_defconfig
+++ b/configs/P2041RDB_SECURE_BOOT_defconfig
@@ -37,3 +37,4 @@ CONFIG_RSA=y
CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P2041RDB_SPIFLASH_defconfig b/configs/P2041RDB_SPIFLASH_defconfig
index da963b3..89663fe 100644
--- a/configs/P2041RDB_SPIFLASH_defconfig
+++ b/configs/P2041RDB_SPIFLASH_defconfig
@@ -34,3 +34,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P2041RDB_SRIO_PCIE_BOOT_defconfig b/configs/P2041RDB_SRIO_PCIE_BOOT_defconfig
index d5e958c..bd78e8d 100644
--- a/configs/P2041RDB_SRIO_PCIE_BOOT_defconfig
+++ b/configs/P2041RDB_SRIO_PCIE_BOOT_defconfig
@@ -33,3 +33,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P2041RDB_defconfig b/configs/P2041RDB_defconfig
index e693adc..adf6d90 100644
--- a/configs/P2041RDB_defconfig
+++ b/configs/P2041RDB_defconfig
@@ -33,3 +33,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P3041DS_SDCARD_defconfig b/configs/P3041DS_SDCARD_defconfig
index 09b17b5..9694d3b 100644
--- a/configs/P3041DS_SDCARD_defconfig
+++ b/configs/P3041DS_SDCARD_defconfig
@@ -34,3 +34,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P3041DS_SECURE_BOOT_defconfig b/configs/P3041DS_SECURE_BOOT_defconfig
index 7befcb0..3082159 100644
--- a/configs/P3041DS_SECURE_BOOT_defconfig
+++ b/configs/P3041DS_SECURE_BOOT_defconfig
@@ -37,3 +37,4 @@ CONFIG_RSA=y
CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P3041DS_SPIFLASH_defconfig b/configs/P3041DS_SPIFLASH_defconfig
index 31ffc1c..ef57166 100644
--- a/configs/P3041DS_SPIFLASH_defconfig
+++ b/configs/P3041DS_SPIFLASH_defconfig
@@ -34,3 +34,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P3041DS_SRIO_PCIE_BOOT_defconfig b/configs/P3041DS_SRIO_PCIE_BOOT_defconfig
index 8a66ba7..4b025f8 100644
--- a/configs/P3041DS_SRIO_PCIE_BOOT_defconfig
+++ b/configs/P3041DS_SRIO_PCIE_BOOT_defconfig
@@ -33,3 +33,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P3041DS_defconfig b/configs/P3041DS_defconfig
index 2f28f24..787cf6e 100644
--- a/configs/P3041DS_defconfig
+++ b/configs/P3041DS_defconfig
@@ -33,3 +33,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P5020DS_SDCARD_defconfig b/configs/P5020DS_SDCARD_defconfig
index 4e0fabd..bead90e 100644
--- a/configs/P5020DS_SDCARD_defconfig
+++ b/configs/P5020DS_SDCARD_defconfig
@@ -35,3 +35,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P5020DS_SECURE_BOOT_defconfig b/configs/P5020DS_SECURE_BOOT_defconfig
index 52aafe9..ce71afd 100644
--- a/configs/P5020DS_SECURE_BOOT_defconfig
+++ b/configs/P5020DS_SECURE_BOOT_defconfig
@@ -38,3 +38,4 @@ CONFIG_RSA=y
CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P5020DS_SPIFLASH_defconfig b/configs/P5020DS_SPIFLASH_defconfig
index b52c41f..7b8f86a 100644
--- a/configs/P5020DS_SPIFLASH_defconfig
+++ b/configs/P5020DS_SPIFLASH_defconfig
@@ -35,3 +35,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P5020DS_SRIO_PCIE_BOOT_defconfig b/configs/P5020DS_SRIO_PCIE_BOOT_defconfig
index ab04c24..f98e027 100644
--- a/configs/P5020DS_SRIO_PCIE_BOOT_defconfig
+++ b/configs/P5020DS_SRIO_PCIE_BOOT_defconfig
@@ -34,3 +34,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P5020DS_defconfig b/configs/P5020DS_defconfig
index 04d97da..676e26a 100644
--- a/configs/P5020DS_defconfig
+++ b/configs/P5020DS_defconfig
@@ -34,3 +34,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P5040DS_SDCARD_defconfig b/configs/P5040DS_SDCARD_defconfig
index 75cdd18..a3b77df 100644
--- a/configs/P5040DS_SDCARD_defconfig
+++ b/configs/P5040DS_SDCARD_defconfig
@@ -35,3 +35,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P5040DS_SECURE_BOOT_defconfig b/configs/P5040DS_SECURE_BOOT_defconfig
index 9ccb18b..50e76ef 100644
--- a/configs/P5040DS_SECURE_BOOT_defconfig
+++ b/configs/P5040DS_SECURE_BOOT_defconfig
@@ -38,3 +38,4 @@ CONFIG_RSA=y
CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P5040DS_SPIFLASH_defconfig b/configs/P5040DS_SPIFLASH_defconfig
index cf35c25..44ae245 100644
--- a/configs/P5040DS_SPIFLASH_defconfig
+++ b/configs/P5040DS_SPIFLASH_defconfig
@@ -35,3 +35,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/P5040DS_defconfig b/configs/P5040DS_defconfig
index 7c94ecb..f2f2cf5 100644
--- a/configs/P5040DS_defconfig
+++ b/configs/P5040DS_defconfig
@@ -34,3 +34,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T1023RDB_SDCARD_defconfig b/configs/T1023RDB_SDCARD_defconfig
index b79e56b..01d09cd 100644
--- a/configs/T1023RDB_SDCARD_defconfig
+++ b/configs/T1023RDB_SDCARD_defconfig
@@ -48,3 +48,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T1023RDB_SECURE_BOOT_defconfig b/configs/T1023RDB_SECURE_BOOT_defconfig
index fa69b83..67c5094 100644
--- a/configs/T1023RDB_SECURE_BOOT_defconfig
+++ b/configs/T1023RDB_SECURE_BOOT_defconfig
@@ -42,3 +42,4 @@ CONFIG_RSA=y
CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T1023RDB_SPIFLASH_defconfig b/configs/T1023RDB_SPIFLASH_defconfig
index 5c25c62..2cf8980 100644
--- a/configs/T1023RDB_SPIFLASH_defconfig
+++ b/configs/T1023RDB_SPIFLASH_defconfig
@@ -49,3 +49,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T1023RDB_defconfig b/configs/T1023RDB_defconfig
index 50de58b..3ac2ca3 100644
--- a/configs/T1023RDB_defconfig
+++ b/configs/T1023RDB_defconfig
@@ -38,3 +38,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T1024QDS_DDR4_SECURE_BOOT_defconfig b/configs/T1024QDS_DDR4_SECURE_BOOT_defconfig
index 372c74f..19c1432 100644
--- a/configs/T1024QDS_DDR4_SECURE_BOOT_defconfig
+++ b/configs/T1024QDS_DDR4_SECURE_BOOT_defconfig
@@ -47,3 +47,4 @@ CONFIG_RSA=y
CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T1024QDS_DDR4_defconfig b/configs/T1024QDS_DDR4_defconfig
index 4a09a5c..30238a3 100644
--- a/configs/T1024QDS_DDR4_defconfig
+++ b/configs/T1024QDS_DDR4_defconfig
@@ -41,3 +41,4 @@ CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_VIDEO=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T1024QDS_SDCARD_defconfig b/configs/T1024QDS_SDCARD_defconfig
index 66458c0..938f150 100644
--- a/configs/T1024QDS_SDCARD_defconfig
+++ b/configs/T1024QDS_SDCARD_defconfig
@@ -54,3 +54,4 @@ CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_VIDEO=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T1024QDS_SECURE_BOOT_defconfig b/configs/T1024QDS_SECURE_BOOT_defconfig
index b974cea..8395a35 100644
--- a/configs/T1024QDS_SECURE_BOOT_defconfig
+++ b/configs/T1024QDS_SECURE_BOOT_defconfig
@@ -48,3 +48,4 @@ CONFIG_RSA=y
CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T1024QDS_SPIFLASH_defconfig b/configs/T1024QDS_SPIFLASH_defconfig
index 768d302..234fe09 100644
--- a/configs/T1024QDS_SPIFLASH_defconfig
+++ b/configs/T1024QDS_SPIFLASH_defconfig
@@ -55,3 +55,4 @@ CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_VIDEO=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T1024QDS_defconfig b/configs/T1024QDS_defconfig
index 0e536d9..1221d60 100644
--- a/configs/T1024QDS_defconfig
+++ b/configs/T1024QDS_defconfig
@@ -44,3 +44,4 @@ CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_VIDEO=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T1024RDB_SDCARD_defconfig b/configs/T1024RDB_SDCARD_defconfig
index c1b6b96..2ce895b 100644
--- a/configs/T1024RDB_SDCARD_defconfig
+++ b/configs/T1024RDB_SDCARD_defconfig
@@ -50,3 +50,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T1024RDB_SECURE_BOOT_defconfig b/configs/T1024RDB_SECURE_BOOT_defconfig
index d86235b..ee67fb8 100644
--- a/configs/T1024RDB_SECURE_BOOT_defconfig
+++ b/configs/T1024RDB_SECURE_BOOT_defconfig
@@ -44,3 +44,4 @@ CONFIG_RSA=y
CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T1024RDB_SPIFLASH_defconfig b/configs/T1024RDB_SPIFLASH_defconfig
index 4dd6c9a..084f3e5 100644
--- a/configs/T1024RDB_SPIFLASH_defconfig
+++ b/configs/T1024RDB_SPIFLASH_defconfig
@@ -51,3 +51,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T1024RDB_defconfig b/configs/T1024RDB_defconfig
index 39952e1..be7d973 100644
--- a/configs/T1024RDB_defconfig
+++ b/configs/T1024RDB_defconfig
@@ -40,3 +40,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T1040D4RDB_SDCARD_defconfig b/configs/T1040D4RDB_SDCARD_defconfig
index d098b0c..07c62c3 100644
--- a/configs/T1040D4RDB_SDCARD_defconfig
+++ b/configs/T1040D4RDB_SDCARD_defconfig
@@ -48,3 +48,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T1040D4RDB_SECURE_BOOT_defconfig b/configs/T1040D4RDB_SECURE_BOOT_defconfig
index fdfa753..e86120e 100644
--- a/configs/T1040D4RDB_SECURE_BOOT_defconfig
+++ b/configs/T1040D4RDB_SECURE_BOOT_defconfig
@@ -42,3 +42,4 @@ CONFIG_RSA=y
CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T1040D4RDB_SPIFLASH_defconfig b/configs/T1040D4RDB_SPIFLASH_defconfig
index 0874adf..06166c5 100644
--- a/configs/T1040D4RDB_SPIFLASH_defconfig
+++ b/configs/T1040D4RDB_SPIFLASH_defconfig
@@ -49,3 +49,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T1040D4RDB_defconfig b/configs/T1040D4RDB_defconfig
index a16c683..a2fbe04 100644
--- a/configs/T1040D4RDB_defconfig
+++ b/configs/T1040D4RDB_defconfig
@@ -38,3 +38,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T1040QDS_DDR4_defconfig b/configs/T1040QDS_DDR4_defconfig
index c7e6f20..17ebec3 100644
--- a/configs/T1040QDS_DDR4_defconfig
+++ b/configs/T1040QDS_DDR4_defconfig
@@ -44,3 +44,4 @@ CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_VIDEO=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T1040QDS_SECURE_BOOT_defconfig b/configs/T1040QDS_SECURE_BOOT_defconfig
index 8cb1a55..c926aab 100644
--- a/configs/T1040QDS_SECURE_BOOT_defconfig
+++ b/configs/T1040QDS_SECURE_BOOT_defconfig
@@ -49,3 +49,4 @@ CONFIG_RSA=y
CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T1040QDS_defconfig b/configs/T1040QDS_defconfig
index 273ffed..f35a6eb 100644
--- a/configs/T1040QDS_defconfig
+++ b/configs/T1040QDS_defconfig
@@ -45,3 +45,4 @@ CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_VIDEO=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T1040RDB_SDCARD_defconfig b/configs/T1040RDB_SDCARD_defconfig
index f53eb22..a8797aa 100644
--- a/configs/T1040RDB_SDCARD_defconfig
+++ b/configs/T1040RDB_SDCARD_defconfig
@@ -49,3 +49,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T1040RDB_SECURE_BOOT_defconfig b/configs/T1040RDB_SECURE_BOOT_defconfig
index 673b898..921c5bb 100644
--- a/configs/T1040RDB_SECURE_BOOT_defconfig
+++ b/configs/T1040RDB_SECURE_BOOT_defconfig
@@ -43,3 +43,4 @@ CONFIG_RSA=y
CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T1040RDB_SPIFLASH_defconfig b/configs/T1040RDB_SPIFLASH_defconfig
index 483f328..24164f2 100644
--- a/configs/T1040RDB_SPIFLASH_defconfig
+++ b/configs/T1040RDB_SPIFLASH_defconfig
@@ -50,3 +50,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T1040RDB_defconfig b/configs/T1040RDB_defconfig
index 3cf163c..a34b3ee 100644
--- a/configs/T1040RDB_defconfig
+++ b/configs/T1040RDB_defconfig
@@ -39,3 +39,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T1042D4RDB_SDCARD_defconfig b/configs/T1042D4RDB_SDCARD_defconfig
index 0f5b5d7..9ad6b48 100644
--- a/configs/T1042D4RDB_SDCARD_defconfig
+++ b/configs/T1042D4RDB_SDCARD_defconfig
@@ -51,3 +51,4 @@ CONFIG_USB_STORAGE=y
CONFIG_VIDEO=y
CONFIG_CFB_CONSOLE_ANSI=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T1042D4RDB_SECURE_BOOT_defconfig b/configs/T1042D4RDB_SECURE_BOOT_defconfig
index 20a15a3..2887808 100644
--- a/configs/T1042D4RDB_SECURE_BOOT_defconfig
+++ b/configs/T1042D4RDB_SECURE_BOOT_defconfig
@@ -45,3 +45,4 @@ CONFIG_RSA=y
CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T1042D4RDB_SPIFLASH_defconfig b/configs/T1042D4RDB_SPIFLASH_defconfig
index 5aecf06..b6d4ba5 100644
--- a/configs/T1042D4RDB_SPIFLASH_defconfig
+++ b/configs/T1042D4RDB_SPIFLASH_defconfig
@@ -52,3 +52,4 @@ CONFIG_USB_STORAGE=y
CONFIG_VIDEO=y
CONFIG_CFB_CONSOLE_ANSI=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T1042D4RDB_defconfig b/configs/T1042D4RDB_defconfig
index f57aa71..4147958 100644
--- a/configs/T1042D4RDB_defconfig
+++ b/configs/T1042D4RDB_defconfig
@@ -41,3 +41,4 @@ CONFIG_USB_STORAGE=y
CONFIG_VIDEO=y
CONFIG_CFB_CONSOLE_ANSI=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T1042RDB_PI_SDCARD_defconfig b/configs/T1042RDB_PI_SDCARD_defconfig
index 953bcf2..514ff2e 100644
--- a/configs/T1042RDB_PI_SDCARD_defconfig
+++ b/configs/T1042RDB_PI_SDCARD_defconfig
@@ -53,3 +53,4 @@ CONFIG_USB_STORAGE=y
CONFIG_VIDEO=y
CONFIG_CFB_CONSOLE_ANSI=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T1042RDB_PI_SPIFLASH_defconfig b/configs/T1042RDB_PI_SPIFLASH_defconfig
index 541b69b..626f70c 100644
--- a/configs/T1042RDB_PI_SPIFLASH_defconfig
+++ b/configs/T1042RDB_PI_SPIFLASH_defconfig
@@ -54,3 +54,4 @@ CONFIG_USB_STORAGE=y
CONFIG_VIDEO=y
CONFIG_CFB_CONSOLE_ANSI=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T1042RDB_PI_defconfig b/configs/T1042RDB_PI_defconfig
index a3e036b..f2374d9 100644
--- a/configs/T1042RDB_PI_defconfig
+++ b/configs/T1042RDB_PI_defconfig
@@ -43,3 +43,4 @@ CONFIG_USB_STORAGE=y
CONFIG_VIDEO=y
CONFIG_CFB_CONSOLE_ANSI=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T1042RDB_SECURE_BOOT_defconfig b/configs/T1042RDB_SECURE_BOOT_defconfig
index b207fe0..cb63864 100644
--- a/configs/T1042RDB_SECURE_BOOT_defconfig
+++ b/configs/T1042RDB_SECURE_BOOT_defconfig
@@ -42,3 +42,4 @@ CONFIG_RSA=y
CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T1042RDB_defconfig b/configs/T1042RDB_defconfig
index 44ce197..567cb9c 100644
--- a/configs/T1042RDB_defconfig
+++ b/configs/T1042RDB_defconfig
@@ -38,3 +38,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T2080QDS_SDCARD_defconfig b/configs/T2080QDS_SDCARD_defconfig
index d35dfd8..09b4093 100644
--- a/configs/T2080QDS_SDCARD_defconfig
+++ b/configs/T2080QDS_SDCARD_defconfig
@@ -47,3 +47,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T2080QDS_SECURE_BOOT_defconfig b/configs/T2080QDS_SECURE_BOOT_defconfig
index 402132b..3b0ba6b 100644
--- a/configs/T2080QDS_SECURE_BOOT_defconfig
+++ b/configs/T2080QDS_SECURE_BOOT_defconfig
@@ -41,3 +41,4 @@ CONFIG_RSA=y
CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T2080QDS_SPIFLASH_defconfig b/configs/T2080QDS_SPIFLASH_defconfig
index 0b20543..a306b10 100644
--- a/configs/T2080QDS_SPIFLASH_defconfig
+++ b/configs/T2080QDS_SPIFLASH_defconfig
@@ -48,3 +48,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T2080QDS_SRIO_PCIE_BOOT_defconfig b/configs/T2080QDS_SRIO_PCIE_BOOT_defconfig
index 2479450..39c4f7d 100644
--- a/configs/T2080QDS_SRIO_PCIE_BOOT_defconfig
+++ b/configs/T2080QDS_SRIO_PCIE_BOOT_defconfig
@@ -34,3 +34,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T2080QDS_defconfig b/configs/T2080QDS_defconfig
index 6151f86..90fa707 100644
--- a/configs/T2080QDS_defconfig
+++ b/configs/T2080QDS_defconfig
@@ -37,3 +37,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T2080RDB_SDCARD_defconfig b/configs/T2080RDB_SDCARD_defconfig
index e07818a..c7676fe 100644
--- a/configs/T2080RDB_SDCARD_defconfig
+++ b/configs/T2080RDB_SDCARD_defconfig
@@ -46,3 +46,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T2080RDB_SECURE_BOOT_defconfig b/configs/T2080RDB_SECURE_BOOT_defconfig
index c5d754c..696ce74 100644
--- a/configs/T2080RDB_SECURE_BOOT_defconfig
+++ b/configs/T2080RDB_SECURE_BOOT_defconfig
@@ -40,3 +40,4 @@ CONFIG_RSA=y
CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T2080RDB_SPIFLASH_defconfig b/configs/T2080RDB_SPIFLASH_defconfig
index 1443956..a81b618 100644
--- a/configs/T2080RDB_SPIFLASH_defconfig
+++ b/configs/T2080RDB_SPIFLASH_defconfig
@@ -47,3 +47,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T2080RDB_SRIO_PCIE_BOOT_defconfig b/configs/T2080RDB_SRIO_PCIE_BOOT_defconfig
index 073f447..06e48c0 100644
--- a/configs/T2080RDB_SRIO_PCIE_BOOT_defconfig
+++ b/configs/T2080RDB_SRIO_PCIE_BOOT_defconfig
@@ -33,3 +33,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T2080RDB_defconfig b/configs/T2080RDB_defconfig
index 0a3a698..4af2c6a 100644
--- a/configs/T2080RDB_defconfig
+++ b/configs/T2080RDB_defconfig
@@ -36,3 +36,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T2081QDS_SDCARD_defconfig b/configs/T2081QDS_SDCARD_defconfig
index 75267c1..579915c 100644
--- a/configs/T2081QDS_SDCARD_defconfig
+++ b/configs/T2081QDS_SDCARD_defconfig
@@ -47,3 +47,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T2081QDS_SPIFLASH_defconfig b/configs/T2081QDS_SPIFLASH_defconfig
index f3f40ca..ac4f930 100644
--- a/configs/T2081QDS_SPIFLASH_defconfig
+++ b/configs/T2081QDS_SPIFLASH_defconfig
@@ -48,3 +48,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T2081QDS_SRIO_PCIE_BOOT_defconfig b/configs/T2081QDS_SRIO_PCIE_BOOT_defconfig
index 8b1f6e4..69d5ec0 100644
--- a/configs/T2081QDS_SRIO_PCIE_BOOT_defconfig
+++ b/configs/T2081QDS_SRIO_PCIE_BOOT_defconfig
@@ -34,3 +34,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T2081QDS_defconfig b/configs/T2081QDS_defconfig
index 86e99dd..f4f17ad 100644
--- a/configs/T2081QDS_defconfig
+++ b/configs/T2081QDS_defconfig
@@ -37,3 +37,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T4160QDS_SDCARD_defconfig b/configs/T4160QDS_SDCARD_defconfig
index 5422278..7c55561 100644
--- a/configs/T4160QDS_SDCARD_defconfig
+++ b/configs/T4160QDS_SDCARD_defconfig
@@ -42,3 +42,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T4160QDS_SECURE_BOOT_defconfig b/configs/T4160QDS_SECURE_BOOT_defconfig
index 8462ff5..f22592a 100644
--- a/configs/T4160QDS_SECURE_BOOT_defconfig
+++ b/configs/T4160QDS_SECURE_BOOT_defconfig
@@ -36,3 +36,4 @@ CONFIG_RSA=y
CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T4160QDS_defconfig b/configs/T4160QDS_defconfig
index c069cf5..9523493 100644
--- a/configs/T4160QDS_defconfig
+++ b/configs/T4160QDS_defconfig
@@ -32,3 +32,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T4160RDB_defconfig b/configs/T4160RDB_defconfig
index cb5359a..f45a60e 100644
--- a/configs/T4160RDB_defconfig
+++ b/configs/T4160RDB_defconfig
@@ -32,3 +32,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T4240QDS_SDCARD_defconfig b/configs/T4240QDS_SDCARD_defconfig
index 95ca2a8..b38bc2e 100644
--- a/configs/T4240QDS_SDCARD_defconfig
+++ b/configs/T4240QDS_SDCARD_defconfig
@@ -42,3 +42,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T4240QDS_SECURE_BOOT_defconfig b/configs/T4240QDS_SECURE_BOOT_defconfig
index ff27ff5..678b388 100644
--- a/configs/T4240QDS_SECURE_BOOT_defconfig
+++ b/configs/T4240QDS_SECURE_BOOT_defconfig
@@ -36,3 +36,4 @@ CONFIG_RSA=y
CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T4240QDS_SRIO_PCIE_BOOT_defconfig b/configs/T4240QDS_SRIO_PCIE_BOOT_defconfig
index 29c5489..5914b3b 100644
--- a/configs/T4240QDS_SRIO_PCIE_BOOT_defconfig
+++ b/configs/T4240QDS_SRIO_PCIE_BOOT_defconfig
@@ -32,3 +32,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T4240QDS_defconfig b/configs/T4240QDS_defconfig
index 4dc8ccd..093437f 100644
--- a/configs/T4240QDS_defconfig
+++ b/configs/T4240QDS_defconfig
@@ -32,3 +32,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T4240RDB_SDCARD_defconfig b/configs/T4240RDB_SDCARD_defconfig
index 4ac6275..3cd8a7c 100644
--- a/configs/T4240RDB_SDCARD_defconfig
+++ b/configs/T4240RDB_SDCARD_defconfig
@@ -42,3 +42,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/T4240RDB_defconfig b/configs/T4240RDB_defconfig
index efd6f78..34e46d6 100644
--- a/configs/T4240RDB_defconfig
+++ b/configs/T4240RDB_defconfig
@@ -32,3 +32,4 @@ CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/apx4devkit_defconfig b/configs/apx4devkit_defconfig
index 47a4ee9..8918922 100644
--- a/configs/apx4devkit_defconfig
+++ b/configs/apx4devkit_defconfig
@@ -31,3 +31,4 @@ CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/aristainetos2_defconfig b/configs/aristainetos2_defconfig
index 288dab0..7bdff75 100644
--- a/configs/aristainetos2_defconfig
+++ b/configs/aristainetos2_defconfig
@@ -44,3 +44,4 @@ CONFIG_USB_STORAGE=y
CONFIG_VIDEO=y
# CONFIG_VIDEO_SW_CURSOR is not set
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/aristainetos2b_defconfig b/configs/aristainetos2b_defconfig
index 115ae07..e040cf9 100644
--- a/configs/aristainetos2b_defconfig
+++ b/configs/aristainetos2b_defconfig
@@ -44,3 +44,4 @@ CONFIG_USB_STORAGE=y
CONFIG_VIDEO=y
# CONFIG_VIDEO_SW_CURSOR is not set
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/aristainetos_defconfig b/configs/aristainetos_defconfig
index cad8b4a..b581982 100644
--- a/configs/aristainetos_defconfig
+++ b/configs/aristainetos_defconfig
@@ -42,3 +42,4 @@ CONFIG_USB_STORAGE=y
CONFIG_VIDEO=y
# CONFIG_VIDEO_SW_CURSOR is not set
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/at91sam9260ek_dataflash_cs0_defconfig b/configs/at91sam9260ek_dataflash_cs0_defconfig
index 9aa3ae9..76dcdf1 100644
--- a/configs/at91sam9260ek_dataflash_cs0_defconfig
+++ b/configs/at91sam9260ek_dataflash_cs0_defconfig
@@ -52,3 +52,4 @@ CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/at91sam9260ek_dataflash_cs1_defconfig b/configs/at91sam9260ek_dataflash_cs1_defconfig
index 908f208..0d54c27 100644
--- a/configs/at91sam9260ek_dataflash_cs1_defconfig
+++ b/configs/at91sam9260ek_dataflash_cs1_defconfig
@@ -52,3 +52,4 @@ CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/at91sam9260ek_nandflash_defconfig b/configs/at91sam9260ek_nandflash_defconfig
index de8a0b0..882bd5e 100644
--- a/configs/at91sam9260ek_nandflash_defconfig
+++ b/configs/at91sam9260ek_nandflash_defconfig
@@ -52,3 +52,4 @@ CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/at91sam9261ek_dataflash_cs0_defconfig b/configs/at91sam9261ek_dataflash_cs0_defconfig
index bac48f9..70d1e3a 100644
--- a/configs/at91sam9261ek_dataflash_cs0_defconfig
+++ b/configs/at91sam9261ek_dataflash_cs0_defconfig
@@ -52,3 +52,4 @@ CONFIG_ATMEL_PIT_TIMER=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_LCD=y
+CONFIG_NAND=y
diff --git a/configs/at91sam9261ek_dataflash_cs3_defconfig b/configs/at91sam9261ek_dataflash_cs3_defconfig
index 066de06..49271c6 100644
--- a/configs/at91sam9261ek_dataflash_cs3_defconfig
+++ b/configs/at91sam9261ek_dataflash_cs3_defconfig
@@ -52,3 +52,4 @@ CONFIG_ATMEL_PIT_TIMER=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_LCD=y
+CONFIG_NAND=y
diff --git a/configs/at91sam9261ek_nandflash_defconfig b/configs/at91sam9261ek_nandflash_defconfig
index b32db05..82bbd54 100644
--- a/configs/at91sam9261ek_nandflash_defconfig
+++ b/configs/at91sam9261ek_nandflash_defconfig
@@ -52,3 +52,4 @@ CONFIG_ATMEL_PIT_TIMER=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_LCD=y
+CONFIG_NAND=y
diff --git a/configs/at91sam9263ek_dataflash_cs0_defconfig b/configs/at91sam9263ek_dataflash_cs0_defconfig
index bc2f242..f5041f1 100644
--- a/configs/at91sam9263ek_dataflash_cs0_defconfig
+++ b/configs/at91sam9263ek_dataflash_cs0_defconfig
@@ -59,3 +59,4 @@ CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_STORAGE=y
CONFIG_LCD=y
+CONFIG_NAND=y
diff --git a/configs/at91sam9263ek_dataflash_defconfig b/configs/at91sam9263ek_dataflash_defconfig
index bc2f242..f5041f1 100644
--- a/configs/at91sam9263ek_dataflash_defconfig
+++ b/configs/at91sam9263ek_dataflash_defconfig
@@ -59,3 +59,4 @@ CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_STORAGE=y
CONFIG_LCD=y
+CONFIG_NAND=y
diff --git a/configs/at91sam9263ek_nandflash_defconfig b/configs/at91sam9263ek_nandflash_defconfig
index 2bc927d..b3b203c 100644
--- a/configs/at91sam9263ek_nandflash_defconfig
+++ b/configs/at91sam9263ek_nandflash_defconfig
@@ -59,3 +59,4 @@ CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_STORAGE=y
CONFIG_LCD=y
+CONFIG_NAND=y
diff --git a/configs/at91sam9263ek_norflash_boot_defconfig b/configs/at91sam9263ek_norflash_boot_defconfig
index 03d6571..28741e6 100644
--- a/configs/at91sam9263ek_norflash_boot_defconfig
+++ b/configs/at91sam9263ek_norflash_boot_defconfig
@@ -58,3 +58,4 @@ CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_STORAGE=y
CONFIG_LCD=y
+CONFIG_NAND=y
diff --git a/configs/at91sam9263ek_norflash_defconfig b/configs/at91sam9263ek_norflash_defconfig
index b14d516..3ba3222 100644
--- a/configs/at91sam9263ek_norflash_defconfig
+++ b/configs/at91sam9263ek_norflash_defconfig
@@ -58,3 +58,4 @@ CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_STORAGE=y
CONFIG_LCD=y
+CONFIG_NAND=y
diff --git a/configs/at91sam9g10ek_dataflash_cs0_defconfig b/configs/at91sam9g10ek_dataflash_cs0_defconfig
index b81ce46..fd90f18 100644
--- a/configs/at91sam9g10ek_dataflash_cs0_defconfig
+++ b/configs/at91sam9g10ek_dataflash_cs0_defconfig
@@ -50,3 +50,4 @@ CONFIG_ATMEL_SPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_LCD=y
+CONFIG_NAND=y
diff --git a/configs/at91sam9g10ek_dataflash_cs3_defconfig b/configs/at91sam9g10ek_dataflash_cs3_defconfig
index e599d3d..ffa69f8 100644
--- a/configs/at91sam9g10ek_dataflash_cs3_defconfig
+++ b/configs/at91sam9g10ek_dataflash_cs3_defconfig
@@ -50,3 +50,4 @@ CONFIG_ATMEL_SPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_LCD=y
+CONFIG_NAND=y
diff --git a/configs/at91sam9g10ek_nandflash_defconfig b/configs/at91sam9g10ek_nandflash_defconfig
index 66deba4..43de3fd 100644
--- a/configs/at91sam9g10ek_nandflash_defconfig
+++ b/configs/at91sam9g10ek_nandflash_defconfig
@@ -50,3 +50,4 @@ CONFIG_ATMEL_SPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_LCD=y
+CONFIG_NAND=y
diff --git a/configs/at91sam9g20ek_2mmc_defconfig b/configs/at91sam9g20ek_2mmc_defconfig
index 0b873c8..d969b95 100644
--- a/configs/at91sam9g20ek_2mmc_defconfig
+++ b/configs/at91sam9g20ek_2mmc_defconfig
@@ -55,3 +55,4 @@ CONFIG_ATMEL_PIT_TIMER=y
CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/at91sam9g20ek_2mmc_nandflash_defconfig b/configs/at91sam9g20ek_2mmc_nandflash_defconfig
index cb4a123..5d98c86 100644
--- a/configs/at91sam9g20ek_2mmc_nandflash_defconfig
+++ b/configs/at91sam9g20ek_2mmc_nandflash_defconfig
@@ -55,3 +55,4 @@ CONFIG_ATMEL_PIT_TIMER=y
CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/at91sam9g20ek_dataflash_cs0_defconfig b/configs/at91sam9g20ek_dataflash_cs0_defconfig
index 6af3e31..c34cb2e 100644
--- a/configs/at91sam9g20ek_dataflash_cs0_defconfig
+++ b/configs/at91sam9g20ek_dataflash_cs0_defconfig
@@ -52,3 +52,4 @@ CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/at91sam9g20ek_dataflash_cs1_defconfig b/configs/at91sam9g20ek_dataflash_cs1_defconfig
index fddf1e2..1e4da95 100644
--- a/configs/at91sam9g20ek_dataflash_cs1_defconfig
+++ b/configs/at91sam9g20ek_dataflash_cs1_defconfig
@@ -52,3 +52,4 @@ CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/at91sam9g20ek_nandflash_defconfig b/configs/at91sam9g20ek_nandflash_defconfig
index 3b5d84e..b938b74 100644
--- a/configs/at91sam9g20ek_nandflash_defconfig
+++ b/configs/at91sam9g20ek_nandflash_defconfig
@@ -52,3 +52,4 @@ CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/at91sam9m10g45ek_mmc_defconfig b/configs/at91sam9m10g45ek_mmc_defconfig
index 3b74d0d..974827e 100644
--- a/configs/at91sam9m10g45ek_mmc_defconfig
+++ b/configs/at91sam9m10g45ek_mmc_defconfig
@@ -53,3 +53,4 @@ CONFIG_DM_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
CONFIG_LCD=y
+CONFIG_NAND=y
diff --git a/configs/at91sam9m10g45ek_nandflash_defconfig b/configs/at91sam9m10g45ek_nandflash_defconfig
index 45ed49a..f1848be 100644
--- a/configs/at91sam9m10g45ek_nandflash_defconfig
+++ b/configs/at91sam9m10g45ek_nandflash_defconfig
@@ -53,3 +53,4 @@ CONFIG_DM_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
CONFIG_LCD=y
+CONFIG_NAND=y
diff --git a/configs/at91sam9n12ek_mmc_defconfig b/configs/at91sam9n12ek_mmc_defconfig
index 1b6a876..c374595 100644
--- a/configs/at91sam9n12ek_mmc_defconfig
+++ b/configs/at91sam9n12ek_mmc_defconfig
@@ -55,3 +55,4 @@ CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_STORAGE=y
CONFIG_LCD=y
+CONFIG_NAND=y
diff --git a/configs/at91sam9n12ek_nandflash_defconfig b/configs/at91sam9n12ek_nandflash_defconfig
index 0d56a9a..4b392fb 100644
--- a/configs/at91sam9n12ek_nandflash_defconfig
+++ b/configs/at91sam9n12ek_nandflash_defconfig
@@ -55,3 +55,4 @@ CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_STORAGE=y
CONFIG_LCD=y
+CONFIG_NAND=y
diff --git a/configs/at91sam9n12ek_spiflash_defconfig b/configs/at91sam9n12ek_spiflash_defconfig
index dcada1d..68ee4f2 100644
--- a/configs/at91sam9n12ek_spiflash_defconfig
+++ b/configs/at91sam9n12ek_spiflash_defconfig
@@ -55,3 +55,4 @@ CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_STORAGE=y
CONFIG_LCD=y
+CONFIG_NAND=y
diff --git a/configs/at91sam9rlek_dataflash_defconfig b/configs/at91sam9rlek_dataflash_defconfig
index d230670..d15d1df 100644
--- a/configs/at91sam9rlek_dataflash_defconfig
+++ b/configs/at91sam9rlek_dataflash_defconfig
@@ -53,3 +53,4 @@ CONFIG_ATMEL_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
CONFIG_LCD=y
+CONFIG_NAND=y
diff --git a/configs/at91sam9rlek_mmc_defconfig b/configs/at91sam9rlek_mmc_defconfig
index 55c7d03..9382459 100644
--- a/configs/at91sam9rlek_mmc_defconfig
+++ b/configs/at91sam9rlek_mmc_defconfig
@@ -53,3 +53,4 @@ CONFIG_ATMEL_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
CONFIG_LCD=y
+CONFIG_NAND=y
diff --git a/configs/at91sam9rlek_nandflash_defconfig b/configs/at91sam9rlek_nandflash_defconfig
index 135f320..c2abd30 100644
--- a/configs/at91sam9rlek_nandflash_defconfig
+++ b/configs/at91sam9rlek_nandflash_defconfig
@@ -53,3 +53,4 @@ CONFIG_ATMEL_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
CONFIG_LCD=y
+CONFIG_NAND=y
diff --git a/configs/at91sam9x5ek_dataflash_defconfig b/configs/at91sam9x5ek_dataflash_defconfig
index 514fa9b..985df33 100644
--- a/configs/at91sam9x5ek_dataflash_defconfig
+++ b/configs/at91sam9x5ek_dataflash_defconfig
@@ -60,3 +60,4 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
CONFIG_DM_VIDEO=y
CONFIG_ATMEL_HLCD=y
+CONFIG_NAND=y
diff --git a/configs/at91sam9x5ek_mmc_defconfig b/configs/at91sam9x5ek_mmc_defconfig
index 8c32beb..0388c73 100644
--- a/configs/at91sam9x5ek_mmc_defconfig
+++ b/configs/at91sam9x5ek_mmc_defconfig
@@ -60,3 +60,4 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
CONFIG_DM_VIDEO=y
CONFIG_ATMEL_HLCD=y
+CONFIG_NAND=y
diff --git a/configs/at91sam9x5ek_nandflash_defconfig b/configs/at91sam9x5ek_nandflash_defconfig
index fd7e7c1..5a265b8 100644
--- a/configs/at91sam9x5ek_nandflash_defconfig
+++ b/configs/at91sam9x5ek_nandflash_defconfig
@@ -60,3 +60,4 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
CONFIG_DM_VIDEO=y
CONFIG_ATMEL_HLCD=y
+CONFIG_NAND=y
diff --git a/configs/at91sam9x5ek_spiflash_defconfig b/configs/at91sam9x5ek_spiflash_defconfig
index 457e15d..7535889 100644
--- a/configs/at91sam9x5ek_spiflash_defconfig
+++ b/configs/at91sam9x5ek_spiflash_defconfig
@@ -60,3 +60,4 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
CONFIG_DM_VIDEO=y
CONFIG_ATMEL_HLCD=y
+CONFIG_NAND=y
diff --git a/configs/at91sam9xeek_dataflash_cs0_defconfig b/configs/at91sam9xeek_dataflash_cs0_defconfig
index 2ebb4d4..4c90d3c 100644
--- a/configs/at91sam9xeek_dataflash_cs0_defconfig
+++ b/configs/at91sam9xeek_dataflash_cs0_defconfig
@@ -52,3 +52,4 @@ CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/at91sam9xeek_dataflash_cs1_defconfig b/configs/at91sam9xeek_dataflash_cs1_defconfig
index 667d5cc..304e65e 100644
--- a/configs/at91sam9xeek_dataflash_cs1_defconfig
+++ b/configs/at91sam9xeek_dataflash_cs1_defconfig
@@ -52,3 +52,4 @@ CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/at91sam9xeek_nandflash_defconfig b/configs/at91sam9xeek_nandflash_defconfig
index 8239827..004966e 100644
--- a/configs/at91sam9xeek_nandflash_defconfig
+++ b/configs/at91sam9xeek_nandflash_defconfig
@@ -52,3 +52,4 @@ CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/axm_defconfig b/configs/axm_defconfig
index b013ba2..1c9ec02 100644
--- a/configs/axm_defconfig
+++ b/configs/axm_defconfig
@@ -40,3 +40,4 @@ CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_PHYLIB=y
CONFIG_USE_TINY_PRINTF=y
+CONFIG_NAND=y
diff --git a/configs/bg0900_defconfig b/configs/bg0900_defconfig
index 72616ae..f3cc745 100644
--- a/configs/bg0900_defconfig
+++ b/configs/bg0900_defconfig
@@ -30,3 +30,4 @@ CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_BAR=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/cm_fx6_defconfig b/configs/cm_fx6_defconfig
index 6b1c0a8..12f653f 100644
--- a/configs/cm_fx6_defconfig
+++ b/configs/cm_fx6_defconfig
@@ -76,3 +76,4 @@ CONFIG_USB_KEYBOARD=y
CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
CONFIG_VIDEO=y
CONFIG_FDT_FIXUP_PARTITIONS=y
+CONFIG_NAND=y
diff --git a/configs/colibri_imx7_defconfig b/configs/colibri_imx7_defconfig
index efc4ccb..d06cee8 100644
--- a/configs/colibri_imx7_defconfig
+++ b/configs/colibri_imx7_defconfig
@@ -64,3 +64,4 @@ CONFIG_USB_GADGET_DOWNLOAD=y
CONFIG_VIDEO=y
CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_FDT_FIXUP_PARTITIONS=y
+CONFIG_NAND=y
diff --git a/configs/colibri_t20_defconfig b/configs/colibri_t20_defconfig
index 81a6a4b..0f7d16e 100644
--- a/configs/colibri_t20_defconfig
+++ b/configs/colibri_t20_defconfig
@@ -59,3 +59,4 @@ CONFIG_DM_VIDEO=y
CONFIG_VIDEO_TEGRA20=y
CONFIG_CONSOLE_SCROLL_LINES=10
CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_NAND=y
diff --git a/configs/corvus_defconfig b/configs/corvus_defconfig
index 1034f50..14accaa 100644
--- a/configs/corvus_defconfig
+++ b/configs/corvus_defconfig
@@ -53,3 +53,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x02d2
CONFIG_USB_GADGET_ATMEL_USBA=y
CONFIG_USB_GADGET_DOWNLOAD=y
# CONFIG_EFI_LOADER is not set
+CONFIG_NAND=y
diff --git a/configs/dns325_defconfig b/configs/dns325_defconfig
index f5556e3..5d2e494 100644
--- a/configs/dns325_defconfig
+++ b/configs/dns325_defconfig
@@ -30,3 +30,4 @@ CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/dockstar_defconfig b/configs/dockstar_defconfig
index 9658e5c..3066752 100644
--- a/configs/dockstar_defconfig
+++ b/configs/dockstar_defconfig
@@ -25,3 +25,4 @@ CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/ea20_defconfig b/configs/ea20_defconfig
index abbb00a..9e7196a 100644
--- a/configs/ea20_defconfig
+++ b/configs/ea20_defconfig
@@ -35,3 +35,4 @@ CONFIG_SYS_NS16550=y
CONFIG_DAVINCI_SPI=y
CONFIG_VIDEO=y
# CONFIG_VIDEO_SW_CURSOR is not set
+CONFIG_NAND=y
diff --git a/configs/etamin_defconfig b/configs/etamin_defconfig
index 608faf6..01fd684 100644
--- a/configs/etamin_defconfig
+++ b/configs/etamin_defconfig
@@ -54,6 +54,7 @@ CONFIG_ENV_IS_IN_NAND=y
CONFIG_DFU_NAND=y
CONFIG_MMC_OMAP_HS=y
CONFIG_NAND=y
+CONFIG_SYS_MAX_NAND_DEVICE=3
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_WINBOND=y
CONFIG_MTD_UBI_FASTMAP=y
diff --git a/configs/ethernut5_defconfig b/configs/ethernut5_defconfig
index f816a16..251c0a3 100644
--- a/configs/ethernut5_defconfig
+++ b/configs/ethernut5_defconfig
@@ -60,3 +60,4 @@ CONFIG_DM_SPI=y
CONFIG_ATMEL_SPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/goflexhome_defconfig b/configs/goflexhome_defconfig
index bdfd62a..20b13ed 100644
--- a/configs/goflexhome_defconfig
+++ b/configs/goflexhome_defconfig
@@ -31,3 +31,4 @@ CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/gurnard_defconfig b/configs/gurnard_defconfig
index c5afd4b..9c1eafb 100644
--- a/configs/gurnard_defconfig
+++ b/configs/gurnard_defconfig
@@ -31,3 +31,4 @@ CONFIG_USB_STORAGE=y
CONFIG_DM_VIDEO=y
CONFIG_CMD_DHRYSTONE=y
# CONFIG_EFI_LOADER is not set
+CONFIG_NAND=y
diff --git a/configs/guruplug_defconfig b/configs/guruplug_defconfig
index 66a668a..a73aa70 100644
--- a/configs/guruplug_defconfig
+++ b/configs/guruplug_defconfig
@@ -32,3 +32,4 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
CONFIG_LZMA=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/gwventana_nand_defconfig b/configs/gwventana_nand_defconfig
index be6cf0c..da32c14 100644
--- a/configs/gwventana_nand_defconfig
+++ b/configs/gwventana_nand_defconfig
@@ -81,3 +81,4 @@ CONFIG_VIDEO=y
# CONFIG_VIDEO_SW_CURSOR is not set
CONFIG_OF_LIBFDT=y
CONFIG_FDT_FIXUP_PARTITIONS=y
+CONFIG_NAND=y
diff --git a/configs/harmony_defconfig b/configs/harmony_defconfig
index 1a4df1e..4751d9e 100644
--- a/configs/harmony_defconfig
+++ b/configs/harmony_defconfig
@@ -44,3 +44,4 @@ CONFIG_USB_ETHER_SMSC95XX=y
CONFIG_DM_VIDEO=y
CONFIG_VIDEO_TEGRA20=y
CONFIG_CONSOLE_SCROLL_LINES=10
+CONFIG_NAND=y
diff --git a/configs/ib62x0_defconfig b/configs/ib62x0_defconfig
index f6bfa06..4bb43ff 100644
--- a/configs/ib62x0_defconfig
+++ b/configs/ib62x0_defconfig
@@ -30,3 +30,4 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
CONFIG_LZMA=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/iconnect_defconfig b/configs/iconnect_defconfig
index fe7fcb1..5485735 100644
--- a/configs/iconnect_defconfig
+++ b/configs/iconnect_defconfig
@@ -25,3 +25,4 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
CONFIG_LZMA=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/ids8313_defconfig b/configs/ids8313_defconfig
index 839dfba..a23ad27 100644
--- a/configs/ids8313_defconfig
+++ b/configs/ids8313_defconfig
@@ -35,3 +35,4 @@ CONFIG_PHYLIB=y
# CONFIG_PCI is not set
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/ipam390_defconfig b/configs/ipam390_defconfig
index 8fdf7605..fea28aa 100644
--- a/configs/ipam390_defconfig
+++ b/configs/ipam390_defconfig
@@ -34,3 +34,4 @@ CONFIG_CMD_UBI=y
CONFIG_ENV_IS_IN_NAND=y
# CONFIG_MMC is not set
CONFIG_SYS_NS16550=y
+CONFIG_NAND=y
diff --git a/configs/k2e_evm_defconfig b/configs/k2e_evm_defconfig
index e6dc298..488263c 100644
--- a/configs/k2e_evm_defconfig
+++ b/configs/k2e_evm_defconfig
@@ -49,3 +49,4 @@ CONFIG_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/k2e_hs_evm_defconfig b/configs/k2e_hs_evm_defconfig
index 6c5e167..f0b7c70 100644
--- a/configs/k2e_hs_evm_defconfig
+++ b/configs/k2e_hs_evm_defconfig
@@ -38,3 +38,4 @@ CONFIG_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/k2g_evm_defconfig b/configs/k2g_evm_defconfig
index 6a1f8dc..105ffb9 100644
--- a/configs/k2g_evm_defconfig
+++ b/configs/k2g_evm_defconfig
@@ -52,3 +52,4 @@ CONFIG_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/k2g_hs_evm_defconfig b/configs/k2g_hs_evm_defconfig
index b4985b5..4497c4b 100644
--- a/configs/k2g_hs_evm_defconfig
+++ b/configs/k2g_hs_evm_defconfig
@@ -40,3 +40,4 @@ CONFIG_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/k2hk_evm_defconfig b/configs/k2hk_evm_defconfig
index 1e3905f..2b48e83 100644
--- a/configs/k2hk_evm_defconfig
+++ b/configs/k2hk_evm_defconfig
@@ -49,3 +49,4 @@ CONFIG_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/k2hk_hs_evm_defconfig b/configs/k2hk_hs_evm_defconfig
index b4b08dd..fe2b67e 100644
--- a/configs/k2hk_hs_evm_defconfig
+++ b/configs/k2hk_hs_evm_defconfig
@@ -38,3 +38,4 @@ CONFIG_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/k2l_evm_defconfig b/configs/k2l_evm_defconfig
index 074bed0..2112173 100644
--- a/configs/k2l_evm_defconfig
+++ b/configs/k2l_evm_defconfig
@@ -49,3 +49,4 @@ CONFIG_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/km_kirkwood_128m16_defconfig b/configs/km_kirkwood_128m16_defconfig
index aeb55c1..2b42f02 100644
--- a/configs/km_kirkwood_128m16_defconfig
+++ b/configs/km_kirkwood_128m16_defconfig
@@ -31,3 +31,4 @@ CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SYS_NS16550=y
CONFIG_BCH=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/km_kirkwood_defconfig b/configs/km_kirkwood_defconfig
index 9eed131..f008713 100644
--- a/configs/km_kirkwood_defconfig
+++ b/configs/km_kirkwood_defconfig
@@ -31,3 +31,4 @@ CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SYS_NS16550=y
CONFIG_BCH=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/km_kirkwood_pci_defconfig b/configs/km_kirkwood_pci_defconfig
index b24c685..2632fab 100644
--- a/configs/km_kirkwood_pci_defconfig
+++ b/configs/km_kirkwood_pci_defconfig
@@ -31,3 +31,4 @@ CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SYS_NS16550=y
CONFIG_BCH=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/kmcoge4_defconfig b/configs/kmcoge4_defconfig
index 5c31abe..3716ca0 100644
--- a/configs/kmcoge4_defconfig
+++ b/configs/kmcoge4_defconfig
@@ -42,3 +42,4 @@ CONFIG_SYS_NS16550=y
CONFIG_FSL_ESPI=y
CONFIG_BCH=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/kmcoge5ne_defconfig b/configs/kmcoge5ne_defconfig
index d4c8e87..53057e7 100644
--- a/configs/kmcoge5ne_defconfig
+++ b/configs/kmcoge5ne_defconfig
@@ -29,3 +29,4 @@ CONFIG_MTD_NOR_FLASH=y
CONFIG_SYS_NS16550=y
CONFIG_BCH=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/kmcoge5un_defconfig b/configs/kmcoge5un_defconfig
index 6eb4781..db5a231 100644
--- a/configs/kmcoge5un_defconfig
+++ b/configs/kmcoge5un_defconfig
@@ -31,3 +31,4 @@ CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SYS_NS16550=y
CONFIG_BCH=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/kmlion1_defconfig b/configs/kmlion1_defconfig
index c7edcaa..ef9d675 100644
--- a/configs/kmlion1_defconfig
+++ b/configs/kmlion1_defconfig
@@ -42,3 +42,4 @@ CONFIG_SYS_NS16550=y
CONFIG_FSL_ESPI=y
CONFIG_BCH=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/kmnusa_defconfig b/configs/kmnusa_defconfig
index 22b8b4d..2ca0812 100644
--- a/configs/kmnusa_defconfig
+++ b/configs/kmnusa_defconfig
@@ -31,3 +31,4 @@ CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SYS_NS16550=y
CONFIG_BCH=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/kmsugp1_defconfig b/configs/kmsugp1_defconfig
index a105b8a..49649da 100644
--- a/configs/kmsugp1_defconfig
+++ b/configs/kmsugp1_defconfig
@@ -31,3 +31,4 @@ CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SYS_NS16550=y
CONFIG_BCH=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/kmsuv31_defconfig b/configs/kmsuv31_defconfig
index 59d1066..c0783ea 100644
--- a/configs/kmsuv31_defconfig
+++ b/configs/kmsuv31_defconfig
@@ -31,3 +31,4 @@ CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SYS_NS16550=y
CONFIG_BCH=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/kmtegr1_defconfig b/configs/kmtegr1_defconfig
index d90852b..4cb5fff 100644
--- a/configs/kmtegr1_defconfig
+++ b/configs/kmtegr1_defconfig
@@ -30,3 +30,4 @@ CONFIG_MTD_NOR_FLASH=y
CONFIG_SYS_NS16550=y
CONFIG_BCH=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/ls1021aqds_ddr4_nor_defconfig b/configs/ls1021aqds_ddr4_nor_defconfig
index ddc99ce..56d4798 100644
--- a/configs/ls1021aqds_ddr4_nor_defconfig
+++ b/configs/ls1021aqds_ddr4_nor_defconfig
@@ -50,3 +50,4 @@ CONFIG_USB_STORAGE=y
CONFIG_VIDEO_FSL_DCU_FB=y
CONFIG_VIDEO=y
# CONFIG_VIDEO_SW_CURSOR is not set
+CONFIG_NAND=y
diff --git a/configs/ls1021aqds_ddr4_nor_lpuart_defconfig b/configs/ls1021aqds_ddr4_nor_lpuart_defconfig
index 474cd2a..85157ad 100644
--- a/configs/ls1021aqds_ddr4_nor_lpuart_defconfig
+++ b/configs/ls1021aqds_ddr4_nor_lpuart_defconfig
@@ -51,3 +51,4 @@ CONFIG_USB_STORAGE=y
CONFIG_VIDEO_FSL_DCU_FB=y
CONFIG_VIDEO=y
# CONFIG_VIDEO_SW_CURSOR is not set
+CONFIG_NAND=y
diff --git a/configs/ls1021aqds_nand_defconfig b/configs/ls1021aqds_nand_defconfig
index 994b38e..3f50e96 100644
--- a/configs/ls1021aqds_nand_defconfig
+++ b/configs/ls1021aqds_nand_defconfig
@@ -65,3 +65,4 @@ CONFIG_USB_STORAGE=y
CONFIG_VIDEO_FSL_DCU_FB=y
CONFIG_VIDEO=y
# CONFIG_VIDEO_SW_CURSOR is not set
+CONFIG_NAND=y
diff --git a/configs/ls1021aqds_nor_SECURE_BOOT_defconfig b/configs/ls1021aqds_nor_SECURE_BOOT_defconfig
index e63f0bf..8bc1043 100644
--- a/configs/ls1021aqds_nor_SECURE_BOOT_defconfig
+++ b/configs/ls1021aqds_nor_SECURE_BOOT_defconfig
@@ -52,3 +52,4 @@ CONFIG_VIDEO=y
# CONFIG_VIDEO_SW_CURSOR is not set
CONFIG_RSA=y
CONFIG_SPL_RSA=y
+CONFIG_NAND=y
diff --git a/configs/ls1021aqds_nor_defconfig b/configs/ls1021aqds_nor_defconfig
index 6068f92..7a9b495 100644
--- a/configs/ls1021aqds_nor_defconfig
+++ b/configs/ls1021aqds_nor_defconfig
@@ -51,3 +51,4 @@ CONFIG_USB_STORAGE=y
CONFIG_VIDEO_FSL_DCU_FB=y
CONFIG_VIDEO=y
# CONFIG_VIDEO_SW_CURSOR is not set
+CONFIG_NAND=y
diff --git a/configs/ls1021aqds_nor_lpuart_defconfig b/configs/ls1021aqds_nor_lpuart_defconfig
index 3da4026..09c0d68 100644
--- a/configs/ls1021aqds_nor_lpuart_defconfig
+++ b/configs/ls1021aqds_nor_lpuart_defconfig
@@ -52,3 +52,4 @@ CONFIG_USB_STORAGE=y
CONFIG_VIDEO_FSL_DCU_FB=y
CONFIG_VIDEO=y
# CONFIG_VIDEO_SW_CURSOR is not set
+CONFIG_NAND=y
diff --git a/configs/ls1021aqds_sdcard_ifc_defconfig b/configs/ls1021aqds_sdcard_ifc_defconfig
index 1651a0f..1a3cb77 100644
--- a/configs/ls1021aqds_sdcard_ifc_defconfig
+++ b/configs/ls1021aqds_sdcard_ifc_defconfig
@@ -63,3 +63,4 @@ CONFIG_USB_STORAGE=y
CONFIG_VIDEO_FSL_DCU_FB=y
CONFIG_VIDEO=y
# CONFIG_VIDEO_SW_CURSOR is not set
+CONFIG_NAND=y
diff --git a/configs/ls1043aqds_defconfig b/configs/ls1043aqds_defconfig
index cb4b355..9cccfc4 100644
--- a/configs/ls1043aqds_defconfig
+++ b/configs/ls1043aqds_defconfig
@@ -47,3 +47,4 @@ CONFIG_DM_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/ls1043aqds_lpuart_defconfig b/configs/ls1043aqds_lpuart_defconfig
index 7e608d7..6b70b45 100644
--- a/configs/ls1043aqds_lpuart_defconfig
+++ b/configs/ls1043aqds_lpuart_defconfig
@@ -49,3 +49,4 @@ CONFIG_DM_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/ls1043aqds_nand_defconfig b/configs/ls1043aqds_nand_defconfig
index cf43781..25486ee 100644
--- a/configs/ls1043aqds_nand_defconfig
+++ b/configs/ls1043aqds_nand_defconfig
@@ -62,3 +62,4 @@ CONFIG_DM_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/ls1043aqds_nor_ddr3_defconfig b/configs/ls1043aqds_nor_ddr3_defconfig
index 9093984..e20d705 100644
--- a/configs/ls1043aqds_nor_ddr3_defconfig
+++ b/configs/ls1043aqds_nor_ddr3_defconfig
@@ -48,3 +48,4 @@ CONFIG_DM_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/ls1043aqds_sdcard_ifc_defconfig b/configs/ls1043aqds_sdcard_ifc_defconfig
index 5ff15ba..341b72d 100644
--- a/configs/ls1043aqds_sdcard_ifc_defconfig
+++ b/configs/ls1043aqds_sdcard_ifc_defconfig
@@ -62,3 +62,4 @@ CONFIG_DM_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/ls1043ardb_SECURE_BOOT_defconfig b/configs/ls1043ardb_SECURE_BOOT_defconfig
index e5e3e35..b832384 100644
--- a/configs/ls1043ardb_SECURE_BOOT_defconfig
+++ b/configs/ls1043ardb_SECURE_BOOT_defconfig
@@ -40,3 +40,4 @@ CONFIG_USB_STORAGE=y
CONFIG_RSA=y
CONFIG_SPL_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
+CONFIG_NAND=y
diff --git a/configs/ls1043ardb_defconfig b/configs/ls1043ardb_defconfig
index 9452416..498f88b 100644
--- a/configs/ls1043ardb_defconfig
+++ b/configs/ls1043ardb_defconfig
@@ -38,3 +38,4 @@ CONFIG_DM_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/ls1043ardb_nand_SECURE_BOOT_defconfig b/configs/ls1043ardb_nand_SECURE_BOOT_defconfig
index 6f20f26..7762ac1 100644
--- a/configs/ls1043ardb_nand_SECURE_BOOT_defconfig
+++ b/configs/ls1043ardb_nand_SECURE_BOOT_defconfig
@@ -62,3 +62,4 @@ CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_STORAGE=y
CONFIG_RSA=y
CONFIG_SPL_RSA=y
+CONFIG_NAND=y
diff --git a/configs/ls1043ardb_nand_defconfig b/configs/ls1043ardb_nand_defconfig
index 4949cd2..5904ca5 100644
--- a/configs/ls1043ardb_nand_defconfig
+++ b/configs/ls1043ardb_nand_defconfig
@@ -60,3 +60,4 @@ CONFIG_DM_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/ls1043ardb_sdcard_SECURE_BOOT_defconfig b/configs/ls1043ardb_sdcard_SECURE_BOOT_defconfig
index d565712..6f12cda 100644
--- a/configs/ls1043ardb_sdcard_SECURE_BOOT_defconfig
+++ b/configs/ls1043ardb_sdcard_SECURE_BOOT_defconfig
@@ -56,3 +56,4 @@ CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_STORAGE=y
CONFIG_RSA=y
CONFIG_SPL_RSA=y
+CONFIG_NAND=y
diff --git a/configs/ls1043ardb_sdcard_defconfig b/configs/ls1043ardb_sdcard_defconfig
index 16d544d..5314590 100644
--- a/configs/ls1043ardb_sdcard_defconfig
+++ b/configs/ls1043ardb_sdcard_defconfig
@@ -54,3 +54,4 @@ CONFIG_DM_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/ls1046aqds_SECURE_BOOT_defconfig b/configs/ls1046aqds_SECURE_BOOT_defconfig
index 6d83123..0f2020c 100644
--- a/configs/ls1046aqds_SECURE_BOOT_defconfig
+++ b/configs/ls1046aqds_SECURE_BOOT_defconfig
@@ -48,3 +48,4 @@ CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_STORAGE=y
CONFIG_RSA=y
+CONFIG_NAND=y
diff --git a/configs/ls1046aqds_defconfig b/configs/ls1046aqds_defconfig
index d901eb0..44c8383 100644
--- a/configs/ls1046aqds_defconfig
+++ b/configs/ls1046aqds_defconfig
@@ -48,3 +48,4 @@ CONFIG_DM_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/ls1046aqds_lpuart_defconfig b/configs/ls1046aqds_lpuart_defconfig
index a9a073f..f04d54f 100644
--- a/configs/ls1046aqds_lpuart_defconfig
+++ b/configs/ls1046aqds_lpuart_defconfig
@@ -43,3 +43,4 @@ CONFIG_DM_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/ls1046aqds_nand_defconfig b/configs/ls1046aqds_nand_defconfig
index 891d238..c252519 100644
--- a/configs/ls1046aqds_nand_defconfig
+++ b/configs/ls1046aqds_nand_defconfig
@@ -54,3 +54,4 @@ CONFIG_DM_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/ls1046aqds_sdcard_ifc_defconfig b/configs/ls1046aqds_sdcard_ifc_defconfig
index e74e9b3..d7b1000 100644
--- a/configs/ls1046aqds_sdcard_ifc_defconfig
+++ b/configs/ls1046aqds_sdcard_ifc_defconfig
@@ -55,3 +55,4 @@ CONFIG_DM_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/ls1046ardb_emmc_defconfig b/configs/ls1046ardb_emmc_defconfig
index d1742e4..2529081 100644
--- a/configs/ls1046ardb_emmc_defconfig
+++ b/configs/ls1046ardb_emmc_defconfig
@@ -50,3 +50,4 @@ CONFIG_DM_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig b/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig
index c7ae1dc..6bc9c9e 100644
--- a/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig
+++ b/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig
@@ -40,3 +40,4 @@ CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_STORAGE=y
CONFIG_RSA=y
+CONFIG_NAND=y
diff --git a/configs/ls1046ardb_qspi_defconfig b/configs/ls1046ardb_qspi_defconfig
index 23ac374..9802e3e 100644
--- a/configs/ls1046ardb_qspi_defconfig
+++ b/configs/ls1046ardb_qspi_defconfig
@@ -40,3 +40,4 @@ CONFIG_DM_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig b/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig
index 76e4517..21557e0 100644
--- a/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig
+++ b/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig
@@ -48,3 +48,4 @@ CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_STORAGE=y
CONFIG_RSA=y
CONFIG_SPL_RSA=y
+CONFIG_NAND=y
diff --git a/configs/ls1046ardb_sdcard_defconfig b/configs/ls1046ardb_sdcard_defconfig
index 3a9e102..1b39908 100644
--- a/configs/ls1046ardb_sdcard_defconfig
+++ b/configs/ls1046ardb_sdcard_defconfig
@@ -45,3 +45,4 @@ CONFIG_DM_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/ls1088aqds_qspi_SECURE_BOOT_defconfig b/configs/ls1088aqds_qspi_SECURE_BOOT_defconfig
index e464951..582dec6f 100644
--- a/configs/ls1088aqds_qspi_SECURE_BOOT_defconfig
+++ b/configs/ls1088aqds_qspi_SECURE_BOOT_defconfig
@@ -43,3 +43,4 @@ CONFIG_USB_GADGET=y
CONFIG_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_NAND=y
diff --git a/configs/ls1088aqds_qspi_defconfig b/configs/ls1088aqds_qspi_defconfig
index 1e368d7..b696ddd 100644
--- a/configs/ls1088aqds_qspi_defconfig
+++ b/configs/ls1088aqds_qspi_defconfig
@@ -41,3 +41,4 @@ CONFIG_USB_DWC3=y
CONFIG_USB_STORAGE=y
CONFIG_USB_GADGET=y
CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_NAND=y
diff --git a/configs/ls1088aqds_sdcard_qspi_defconfig b/configs/ls1088aqds_sdcard_qspi_defconfig
index 659bc4f..00cc324 100644
--- a/configs/ls1088aqds_sdcard_qspi_defconfig
+++ b/configs/ls1088aqds_sdcard_qspi_defconfig
@@ -50,3 +50,4 @@ CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_DWC3=y
CONFIG_USB_STORAGE=y
CONFIG_USB_GADGET=y
+CONFIG_NAND=y
diff --git a/configs/ls1088ardb_qspi_SECURE_BOOT_defconfig b/configs/ls1088ardb_qspi_SECURE_BOOT_defconfig
index 19c76b6..de04d643 100644
--- a/configs/ls1088ardb_qspi_SECURE_BOOT_defconfig
+++ b/configs/ls1088ardb_qspi_SECURE_BOOT_defconfig
@@ -42,3 +42,4 @@ CONFIG_USB_GADGET=y
CONFIG_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_NAND=y
diff --git a/configs/ls1088ardb_qspi_defconfig b/configs/ls1088ardb_qspi_defconfig
index 8a08846..389d773 100644
--- a/configs/ls1088ardb_qspi_defconfig
+++ b/configs/ls1088ardb_qspi_defconfig
@@ -40,3 +40,4 @@ CONFIG_USB_DWC3=y
CONFIG_USB_STORAGE=y
CONFIG_USB_GADGET=y
CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_NAND=y
diff --git a/configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig b/configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig
index a7466f1..15ee4a7 100644
--- a/configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig
+++ b/configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig
@@ -42,3 +42,4 @@ CONFIG_DM_SPI=y
CONFIG_FSL_DSPI=y
CONFIG_RSA=y
CONFIG_SPL_RSA=y
+CONFIG_NAND=y
diff --git a/configs/ls1088ardb_sdcard_qspi_defconfig b/configs/ls1088ardb_sdcard_qspi_defconfig
index 2e3c287..a860fed 100644
--- a/configs/ls1088ardb_sdcard_qspi_defconfig
+++ b/configs/ls1088ardb_sdcard_qspi_defconfig
@@ -49,3 +49,4 @@ CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_DWC3=y
CONFIG_USB_STORAGE=y
CONFIG_USB_GADGET=y
+CONFIG_NAND=y
diff --git a/configs/ls2080a_simu_defconfig b/configs/ls2080a_simu_defconfig
index cdc80c2..53763f0 100644
--- a/configs/ls2080a_simu_defconfig
+++ b/configs/ls2080a_simu_defconfig
@@ -34,3 +34,4 @@ CONFIG_MTD_NOR_FLASH=y
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_NAND=y
diff --git a/configs/ls2080aqds_SECURE_BOOT_defconfig b/configs/ls2080aqds_SECURE_BOOT_defconfig
index 8d35e0b..5ee2b32 100644
--- a/configs/ls2080aqds_SECURE_BOOT_defconfig
+++ b/configs/ls2080aqds_SECURE_BOOT_defconfig
@@ -49,3 +49,4 @@ CONFIG_USB_STORAGE=y
CONFIG_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_NAND=y
diff --git a/configs/ls2080aqds_defconfig b/configs/ls2080aqds_defconfig
index f8afa36..baf7009 100644
--- a/configs/ls2080aqds_defconfig
+++ b/configs/ls2080aqds_defconfig
@@ -48,3 +48,4 @@ CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_STORAGE=y
CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_NAND=y
diff --git a/configs/ls2080aqds_qspi_defconfig b/configs/ls2080aqds_qspi_defconfig
index 3fb47c5..6110595 100644
--- a/configs/ls2080aqds_qspi_defconfig
+++ b/configs/ls2080aqds_qspi_defconfig
@@ -48,3 +48,4 @@ CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_STORAGE=y
CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_NAND=y
diff --git a/configs/ls2080aqds_sdcard_defconfig b/configs/ls2080aqds_sdcard_defconfig
index 2ae7014..4f1e680 100644
--- a/configs/ls2080aqds_sdcard_defconfig
+++ b/configs/ls2080aqds_sdcard_defconfig
@@ -55,3 +55,4 @@ CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_STORAGE=y
CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_NAND=y
diff --git a/configs/ls2080ardb_SECURE_BOOT_defconfig b/configs/ls2080ardb_SECURE_BOOT_defconfig
index 84769be..a8d2b87 100644
--- a/configs/ls2080ardb_SECURE_BOOT_defconfig
+++ b/configs/ls2080ardb_SECURE_BOOT_defconfig
@@ -48,3 +48,4 @@ CONFIG_USB_STORAGE=y
CONFIG_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_NAND=y
diff --git a/configs/ls2080ardb_defconfig b/configs/ls2080ardb_defconfig
index 36d2313..9ebd2c8 100644
--- a/configs/ls2080ardb_defconfig
+++ b/configs/ls2080ardb_defconfig
@@ -47,3 +47,4 @@ CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_STORAGE=y
CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_NAND=y
diff --git a/configs/m28evk_defconfig b/configs/m28evk_defconfig
index 3bc6b18..1a1a3cf 100644
--- a/configs/m28evk_defconfig
+++ b/configs/m28evk_defconfig
@@ -49,3 +49,4 @@ CONFIG_USB_STORAGE=y
CONFIG_VIDEO=y
CONFIG_FAT_WRITE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/medcom-wide_defconfig b/configs/medcom-wide_defconfig
index e4fe851..65bfa18 100644
--- a/configs/medcom-wide_defconfig
+++ b/configs/medcom-wide_defconfig
@@ -37,3 +37,4 @@ CONFIG_USB_HOST_ETHER=y
CONFIG_USB_ETHER_SMSC95XX=y
CONFIG_DM_VIDEO=y
CONFIG_VIDEO_TEGRA20=y
+CONFIG_NAND=y
diff --git a/configs/meesc_defconfig b/configs/meesc_defconfig
index 306b225..c7661b3 100644
--- a/configs/meesc_defconfig
+++ b/configs/meesc_defconfig
@@ -35,3 +35,4 @@ CONFIG_DM_SERIAL=y
CONFIG_ATMEL_USART=y
CONFIG_DM_SPI=y
CONFIG_ATMEL_SPI=y
+CONFIG_NAND=y
diff --git a/configs/mgcoge3un_defconfig b/configs/mgcoge3un_defconfig
index 27f3995..19e8e0d 100644
--- a/configs/mgcoge3un_defconfig
+++ b/configs/mgcoge3un_defconfig
@@ -31,3 +31,4 @@ CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SYS_NS16550=y
CONFIG_BCH=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/mvebu_db_armada8k_defconfig b/configs/mvebu_db_armada8k_defconfig
index ab949c1..20c558c 100644
--- a/configs/mvebu_db_armada8k_defconfig
+++ b/configs/mvebu_db_armada8k_defconfig
@@ -67,3 +67,4 @@ CONFIG_USB_ETHER_MCS7830=y
CONFIG_USB_ETHER_RTL8152=y
CONFIG_USB_ETHER_SMSC95XX=y
CONFIG_SMBIOS_MANUFACTURER=""
+CONFIG_NAND=y
diff --git a/configs/mvebu_mcbin-88f8040_defconfig b/configs/mvebu_mcbin-88f8040_defconfig
index 29f134d..a488e91 100644
--- a/configs/mvebu_mcbin-88f8040_defconfig
+++ b/configs/mvebu_mcbin-88f8040_defconfig
@@ -71,3 +71,4 @@ CONFIG_USB_ETHER_MCS7830=y
CONFIG_USB_ETHER_RTL8152=y
CONFIG_USB_ETHER_SMSC95XX=y
CONFIG_SMBIOS_MANUFACTURER=""
+CONFIG_NAND=y
diff --git a/configs/mx28evk_auart_console_defconfig b/configs/mx28evk_auart_console_defconfig
index c497756..dfb76f2 100644
--- a/configs/mx28evk_auart_console_defconfig
+++ b/configs/mx28evk_auart_console_defconfig
@@ -46,3 +46,4 @@ CONFIG_USB_ETHER_ASIX=y
CONFIG_USB_ETHER_SMSC95XX=y
CONFIG_VIDEO=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/mx28evk_defconfig b/configs/mx28evk_defconfig
index 40c9df2..0a4c12e 100644
--- a/configs/mx28evk_defconfig
+++ b/configs/mx28evk_defconfig
@@ -46,3 +46,4 @@ CONFIG_USB_ETHER_ASIX=y
CONFIG_USB_ETHER_SMSC95XX=y
CONFIG_VIDEO=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/mx28evk_nand_defconfig b/configs/mx28evk_nand_defconfig
index ea97f40..35451c4 100644
--- a/configs/mx28evk_nand_defconfig
+++ b/configs/mx28evk_nand_defconfig
@@ -45,3 +45,4 @@ CONFIG_USB_ETHER_ASIX=y
CONFIG_USB_ETHER_SMSC95XX=y
CONFIG_VIDEO=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/mx28evk_spi_defconfig b/configs/mx28evk_spi_defconfig
index 34e9927..7067dc2 100644
--- a/configs/mx28evk_spi_defconfig
+++ b/configs/mx28evk_spi_defconfig
@@ -45,3 +45,4 @@ CONFIG_USB_ETHER_ASIX=y
CONFIG_USB_ETHER_SMSC95XX=y
CONFIG_VIDEO=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/mx6sabreauto_defconfig b/configs/mx6sabreauto_defconfig
index 215700b..36eb7ee 100644
--- a/configs/mx6sabreauto_defconfig
+++ b/configs/mx6sabreauto_defconfig
@@ -56,3 +56,4 @@ CONFIG_USB_ETHER_ASIX=y
CONFIG_VIDEO=y
# CONFIG_VIDEO_SW_CURSOR is not set
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/mx6sxsabreauto_defconfig b/configs/mx6sxsabreauto_defconfig
index a2c4830..c694b71 100644
--- a/configs/mx6sxsabreauto_defconfig
+++ b/configs/mx6sxsabreauto_defconfig
@@ -49,3 +49,4 @@ CONFIG_DM_USB=y
CONFIG_USB_STORAGE=y
CONFIG_USB_HOST_ETHER=y
CONFIG_USB_ETHER_ASIX=y
+CONFIG_NAND=y
diff --git a/configs/nas220_defconfig b/configs/nas220_defconfig
index 8a71ed8..f1942b7 100644
--- a/configs/nas220_defconfig
+++ b/configs/nas220_defconfig
@@ -31,3 +31,4 @@ CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/nsa310s_defconfig b/configs/nsa310s_defconfig
index 5e111cb..855c23e 100644
--- a/configs/nsa310s_defconfig
+++ b/configs/nsa310s_defconfig
@@ -29,3 +29,4 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
CONFIG_LZMA=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/openrd_base_defconfig b/configs/openrd_base_defconfig
index f91e0f9..9332b1f 100644
--- a/configs/openrd_base_defconfig
+++ b/configs/openrd_base_defconfig
@@ -31,3 +31,4 @@ CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/openrd_client_defconfig b/configs/openrd_client_defconfig
index e65c437..aaf3086 100644
--- a/configs/openrd_client_defconfig
+++ b/configs/openrd_client_defconfig
@@ -31,3 +31,4 @@ CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/openrd_ultimate_defconfig b/configs/openrd_ultimate_defconfig
index dfd809d..eda6a5e 100644
--- a/configs/openrd_ultimate_defconfig
+++ b/configs/openrd_ultimate_defconfig
@@ -31,3 +31,4 @@ CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/pcm058_defconfig b/configs/pcm058_defconfig
index 99713c2..b081bea 100644
--- a/configs/pcm058_defconfig
+++ b/configs/pcm058_defconfig
@@ -56,3 +56,4 @@ CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_NETDEVICES=y
CONFIG_DM_THERMAL=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/pfla02_defconfig b/configs/pfla02_defconfig
index 029c9de..e6248fd 100644
--- a/configs/pfla02_defconfig
+++ b/configs/pfla02_defconfig
@@ -54,3 +54,4 @@ CONFIG_NETDEVICES=y
CONFIG_FEC_MXC=y
CONFIG_DM_THERMAL=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/platinum_picon_defconfig b/configs/platinum_picon_defconfig
index 54d88b2..fa7a067 100644
--- a/configs/platinum_picon_defconfig
+++ b/configs/platinum_picon_defconfig
@@ -45,3 +45,4 @@ CONFIG_PHYLIB=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/platinum_titanium_defconfig b/configs/platinum_titanium_defconfig
index c5f6b7a..e393c47 100644
--- a/configs/platinum_titanium_defconfig
+++ b/configs/platinum_titanium_defconfig
@@ -48,3 +48,4 @@ CONFIG_NETDEVICES=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/plutux_defconfig b/configs/plutux_defconfig
index a832e52..21cbceb 100644
--- a/configs/plutux_defconfig
+++ b/configs/plutux_defconfig
@@ -30,3 +30,4 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
CONFIG_USB_HOST_ETHER=y
CONFIG_USB_ETHER_SMSC95XX=y
+CONFIG_NAND=y
diff --git a/configs/pm9261_defconfig b/configs/pm9261_defconfig
index 692af14..778708d 100644
--- a/configs/pm9261_defconfig
+++ b/configs/pm9261_defconfig
@@ -47,3 +47,4 @@ CONFIG_ATMEL_SPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_LCD=y
+CONFIG_NAND=y
diff --git a/configs/pm9263_defconfig b/configs/pm9263_defconfig
index d9cfcb1..a9bae26 100644
--- a/configs/pm9263_defconfig
+++ b/configs/pm9263_defconfig
@@ -45,3 +45,4 @@ CONFIG_ATMEL_SPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_LCD=y
+CONFIG_NAND=y
diff --git a/configs/pm9g45_defconfig b/configs/pm9g45_defconfig
index 4e5181b..6cbc82b 100644
--- a/configs/pm9g45_defconfig
+++ b/configs/pm9g45_defconfig
@@ -23,3 +23,4 @@ CONFIG_ENV_IS_IN_NAND=y
# CONFIG_MMC is not set
CONFIG_USB=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/pogo_e02_defconfig b/configs/pogo_e02_defconfig
index 82f68d9..3fba856 100644
--- a/configs/pogo_e02_defconfig
+++ b/configs/pogo_e02_defconfig
@@ -24,3 +24,4 @@ CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/portl2_defconfig b/configs/portl2_defconfig
index 7db4110..5b333db 100644
--- a/configs/portl2_defconfig
+++ b/configs/portl2_defconfig
@@ -31,3 +31,4 @@ CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SYS_NS16550=y
CONFIG_BCH=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/sama5d2_ptc_ek_mmc_defconfig b/configs/sama5d2_ptc_ek_mmc_defconfig
index 03dc69b..60ab0ea 100644
--- a/configs/sama5d2_ptc_ek_mmc_defconfig
+++ b/configs/sama5d2_ptc_ek_mmc_defconfig
@@ -58,3 +58,4 @@ CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/sama5d2_ptc_ek_nandflash_defconfig b/configs/sama5d2_ptc_ek_nandflash_defconfig
index 8340f81..2967cb4 100644
--- a/configs/sama5d2_ptc_ek_nandflash_defconfig
+++ b/configs/sama5d2_ptc_ek_nandflash_defconfig
@@ -58,3 +58,4 @@ CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/sama5d36ek_cmp_mmc_defconfig b/configs/sama5d36ek_cmp_mmc_defconfig
index 685caa3..c2bd80e 100644
--- a/configs/sama5d36ek_cmp_mmc_defconfig
+++ b/configs/sama5d36ek_cmp_mmc_defconfig
@@ -55,3 +55,4 @@ CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
CONFIG_DM_VIDEO=y
CONFIG_ATMEL_HLCD=y
+CONFIG_NAND=y
diff --git a/configs/sama5d36ek_cmp_nandflash_defconfig b/configs/sama5d36ek_cmp_nandflash_defconfig
index 0f42c98..c7a6505 100644
--- a/configs/sama5d36ek_cmp_nandflash_defconfig
+++ b/configs/sama5d36ek_cmp_nandflash_defconfig
@@ -56,3 +56,4 @@ CONFIG_ATMEL_PIT_TIMER=y
CONFIG_DM_VIDEO=y
CONFIG_ATMEL_HLCD=y
CONFIG_FAT_WRITE=y
+CONFIG_NAND=y
diff --git a/configs/sama5d36ek_cmp_spiflash_defconfig b/configs/sama5d36ek_cmp_spiflash_defconfig
index 52ad137..dbc90f8 100644
--- a/configs/sama5d36ek_cmp_spiflash_defconfig
+++ b/configs/sama5d36ek_cmp_spiflash_defconfig
@@ -56,3 +56,4 @@ CONFIG_ATMEL_PIT_TIMER=y
CONFIG_DM_VIDEO=y
CONFIG_ATMEL_HLCD=y
CONFIG_FAT_WRITE=y
+CONFIG_NAND=y
diff --git a/configs/sama5d3_xplained_mmc_defconfig b/configs/sama5d3_xplained_mmc_defconfig
index 8da4f4e..f1f1ab1 100644
--- a/configs/sama5d3_xplained_mmc_defconfig
+++ b/configs/sama5d3_xplained_mmc_defconfig
@@ -72,3 +72,4 @@ CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/sama5d3_xplained_nandflash_defconfig b/configs/sama5d3_xplained_nandflash_defconfig
index 98152af..5a6d635 100644
--- a/configs/sama5d3_xplained_nandflash_defconfig
+++ b/configs/sama5d3_xplained_nandflash_defconfig
@@ -70,3 +70,4 @@ CONFIG_DM_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
CONFIG_FAT_WRITE=y
+CONFIG_NAND=y
diff --git a/configs/sama5d3xek_mmc_defconfig b/configs/sama5d3xek_mmc_defconfig
index cf57936..e404083 100644
--- a/configs/sama5d3xek_mmc_defconfig
+++ b/configs/sama5d3xek_mmc_defconfig
@@ -84,3 +84,4 @@ CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_ATMEL_USBA=y
CONFIG_DM_VIDEO=y
CONFIG_ATMEL_HLCD=y
+CONFIG_NAND=y
diff --git a/configs/sama5d3xek_nandflash_defconfig b/configs/sama5d3xek_nandflash_defconfig
index c34ff17..cbb8e72 100644
--- a/configs/sama5d3xek_nandflash_defconfig
+++ b/configs/sama5d3xek_nandflash_defconfig
@@ -80,3 +80,4 @@ CONFIG_USB_GADGET_ATMEL_USBA=y
CONFIG_DM_VIDEO=y
CONFIG_ATMEL_HLCD=y
CONFIG_FAT_WRITE=y
+CONFIG_NAND=y
diff --git a/configs/sama5d3xek_spiflash_defconfig b/configs/sama5d3xek_spiflash_defconfig
index e48813d..ff05772 100644
--- a/configs/sama5d3xek_spiflash_defconfig
+++ b/configs/sama5d3xek_spiflash_defconfig
@@ -79,3 +79,4 @@ CONFIG_USB_GADGET_ATMEL_USBA=y
CONFIG_DM_VIDEO=y
CONFIG_ATMEL_HLCD=y
CONFIG_FAT_WRITE=y
+CONFIG_NAND=y
diff --git a/configs/sama5d4_xplained_mmc_defconfig b/configs/sama5d4_xplained_mmc_defconfig
index b7faf70..10e66b6 100644
--- a/configs/sama5d4_xplained_mmc_defconfig
+++ b/configs/sama5d4_xplained_mmc_defconfig
@@ -79,3 +79,4 @@ CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_ATMEL_USBA=y
CONFIG_DM_VIDEO=y
CONFIG_ATMEL_HLCD=y
+CONFIG_NAND=y
diff --git a/configs/sama5d4_xplained_nandflash_defconfig b/configs/sama5d4_xplained_nandflash_defconfig
index 7255d47..ef8a866 100644
--- a/configs/sama5d4_xplained_nandflash_defconfig
+++ b/configs/sama5d4_xplained_nandflash_defconfig
@@ -76,3 +76,4 @@ CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_ATMEL_USBA=y
CONFIG_DM_VIDEO=y
CONFIG_ATMEL_HLCD=y
+CONFIG_NAND=y
diff --git a/configs/sama5d4_xplained_spiflash_defconfig b/configs/sama5d4_xplained_spiflash_defconfig
index c93705b..ac6fc7c 100644
--- a/configs/sama5d4_xplained_spiflash_defconfig
+++ b/configs/sama5d4_xplained_spiflash_defconfig
@@ -78,3 +78,4 @@ CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_ATMEL_USBA=y
CONFIG_DM_VIDEO=y
CONFIG_ATMEL_HLCD=y
+CONFIG_NAND=y
diff --git a/configs/sama5d4ek_mmc_defconfig b/configs/sama5d4ek_mmc_defconfig
index 97c59bd..b83d637 100644
--- a/configs/sama5d4ek_mmc_defconfig
+++ b/configs/sama5d4ek_mmc_defconfig
@@ -79,3 +79,4 @@ CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_ATMEL_USBA=y
CONFIG_DM_VIDEO=y
CONFIG_ATMEL_HLCD=y
+CONFIG_NAND=y
diff --git a/configs/sama5d4ek_nandflash_defconfig b/configs/sama5d4ek_nandflash_defconfig
index e491608..fcae5f4 100644
--- a/configs/sama5d4ek_nandflash_defconfig
+++ b/configs/sama5d4ek_nandflash_defconfig
@@ -76,3 +76,4 @@ CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_ATMEL_USBA=y
CONFIG_DM_VIDEO=y
CONFIG_ATMEL_HLCD=y
+CONFIG_NAND=y
diff --git a/configs/sama5d4ek_spiflash_defconfig b/configs/sama5d4ek_spiflash_defconfig
index 8d7da40..cf8a207 100644
--- a/configs/sama5d4ek_spiflash_defconfig
+++ b/configs/sama5d4ek_spiflash_defconfig
@@ -75,3 +75,4 @@ CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_ATMEL_USBA=y
CONFIG_DM_VIDEO=y
CONFIG_ATMEL_HLCD=y
+CONFIG_NAND=y
diff --git a/configs/seaboard_defconfig b/configs/seaboard_defconfig
index c8cc3b6..5525cd5 100644
--- a/configs/seaboard_defconfig
+++ b/configs/seaboard_defconfig
@@ -41,3 +41,4 @@ CONFIG_DM_VIDEO=y
CONFIG_VIDEO_TEGRA20=y
CONFIG_CONSOLE_SCROLL_LINES=10
CONFIG_AES=y
+CONFIG_NAND=y
diff --git a/configs/sheevaplug_defconfig b/configs/sheevaplug_defconfig
index 21704ec..2e5cae8 100644
--- a/configs/sheevaplug_defconfig
+++ b/configs/sheevaplug_defconfig
@@ -32,3 +32,4 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
CONFIG_LZMA=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/smartweb_defconfig b/configs/smartweb_defconfig
index 12f0f93..5934455 100644
--- a/configs/smartweb_defconfig
+++ b/configs/smartweb_defconfig
@@ -55,3 +55,4 @@ CONFIG_USB_HOST_ETHER=y
CONFIG_USB_ETHER_ASIX=y
CONFIG_USB_ETHER_MCS7830=y
# CONFIG_EFI_LOADER is not set
+CONFIG_NAND=y
diff --git a/configs/snapper9260_defconfig b/configs/snapper9260_defconfig
index 8f9ff1f..6684514 100644
--- a/configs/snapper9260_defconfig
+++ b/configs/snapper9260_defconfig
@@ -29,3 +29,4 @@ CONFIG_CMD_PCA953X=y
# CONFIG_MMC is not set
CONFIG_USB=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/snapper9g20_defconfig b/configs/snapper9g20_defconfig
index 6bb8628..95df3cc 100644
--- a/configs/snapper9g20_defconfig
+++ b/configs/snapper9g20_defconfig
@@ -28,3 +28,4 @@ CONFIG_CMD_PCA953X=y
# CONFIG_MMC is not set
CONFIG_USB=y
CONFIG_USB_STORAGE=y
+CONFIG_NAND=y
diff --git a/configs/socrates_defconfig b/configs/socrates_defconfig
index abb1ac2..b6e7646 100644
--- a/configs/socrates_defconfig
+++ b/configs/socrates_defconfig
@@ -38,3 +38,4 @@ CONFIG_USB_STORAGE=y
CONFIG_VIDEO=y
CONFIG_CONSOLE_EXTRA_INFO=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/spear300_defconfig b/configs/spear300_defconfig
index 22a4685..d2e7724 100644
--- a/configs/spear300_defconfig
+++ b/configs/spear300_defconfig
@@ -21,3 +21,4 @@ CONFIG_MTD_NOR_FLASH=y
CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_ETH_DESIGNWARE=y
+CONFIG_NAND=y
diff --git a/configs/spear300_usbtty_defconfig b/configs/spear300_usbtty_defconfig
index adbf408..8b43f2e 100644
--- a/configs/spear300_usbtty_defconfig
+++ b/configs/spear300_usbtty_defconfig
@@ -21,3 +21,4 @@ CONFIG_MTD_NOR_FLASH=y
CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_ETH_DESIGNWARE=y
+CONFIG_NAND=y
diff --git a/configs/spear310_defconfig b/configs/spear310_defconfig
index 9517ac0..438baa4 100644
--- a/configs/spear310_defconfig
+++ b/configs/spear310_defconfig
@@ -21,3 +21,4 @@ CONFIG_MTD_NOR_FLASH=y
CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_ETH_DESIGNWARE=y
+CONFIG_NAND=y
diff --git a/configs/spear310_pnor_defconfig b/configs/spear310_pnor_defconfig
index 5c1b142..036cbca 100644
--- a/configs/spear310_pnor_defconfig
+++ b/configs/spear310_pnor_defconfig
@@ -21,3 +21,4 @@ CONFIG_MTD_NOR_FLASH=y
CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_ETH_DESIGNWARE=y
+CONFIG_NAND=y
diff --git a/configs/spear310_usbtty_defconfig b/configs/spear310_usbtty_defconfig
index 7b438ec..1645782 100644
--- a/configs/spear310_usbtty_defconfig
+++ b/configs/spear310_usbtty_defconfig
@@ -21,3 +21,4 @@ CONFIG_MTD_NOR_FLASH=y
CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_ETH_DESIGNWARE=y
+CONFIG_NAND=y
diff --git a/configs/spear310_usbtty_pnor_defconfig b/configs/spear310_usbtty_pnor_defconfig
index 611517d..f13c9f7 100644
--- a/configs/spear310_usbtty_pnor_defconfig
+++ b/configs/spear310_usbtty_pnor_defconfig
@@ -21,3 +21,4 @@ CONFIG_MTD_NOR_FLASH=y
CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_ETH_DESIGNWARE=y
+CONFIG_NAND=y
diff --git a/configs/spear320_defconfig b/configs/spear320_defconfig
index 66fb6b7..ff91ecb 100644
--- a/configs/spear320_defconfig
+++ b/configs/spear320_defconfig
@@ -21,3 +21,4 @@ CONFIG_MTD_NOR_FLASH=y
CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_ETH_DESIGNWARE=y
+CONFIG_NAND=y
diff --git a/configs/spear320_pnor_defconfig b/configs/spear320_pnor_defconfig
index a08cd7e..e884bbf 100644
--- a/configs/spear320_pnor_defconfig
+++ b/configs/spear320_pnor_defconfig
@@ -21,3 +21,4 @@ CONFIG_MTD_NOR_FLASH=y
CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_ETH_DESIGNWARE=y
+CONFIG_NAND=y
diff --git a/configs/spear320_usbtty_defconfig b/configs/spear320_usbtty_defconfig
index 34b3622..ff58563 100644
--- a/configs/spear320_usbtty_defconfig
+++ b/configs/spear320_usbtty_defconfig
@@ -21,3 +21,4 @@ CONFIG_MTD_NOR_FLASH=y
CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_ETH_DESIGNWARE=y
+CONFIG_NAND=y
diff --git a/configs/spear320_usbtty_pnor_defconfig b/configs/spear320_usbtty_pnor_defconfig
index 7f09cfb..27c5af0 100644
--- a/configs/spear320_usbtty_pnor_defconfig
+++ b/configs/spear320_usbtty_pnor_defconfig
@@ -21,3 +21,4 @@ CONFIG_MTD_NOR_FLASH=y
CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_ETH_DESIGNWARE=y
+CONFIG_NAND=y
diff --git a/configs/spear600_defconfig b/configs/spear600_defconfig
index dc58179..cce1ca9 100644
--- a/configs/spear600_defconfig
+++ b/configs/spear600_defconfig
@@ -24,3 +24,4 @@ CONFIG_MTD_NOR_FLASH=y
CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_ETH_DESIGNWARE=y
+CONFIG_NAND=y
diff --git a/configs/spear600_usbtty_defconfig b/configs/spear600_usbtty_defconfig
index 80e93e3..af144e3 100644
--- a/configs/spear600_usbtty_defconfig
+++ b/configs/spear600_usbtty_defconfig
@@ -21,3 +21,4 @@ CONFIG_MTD_NOR_FLASH=y
CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_ETH_DESIGNWARE=y
+CONFIG_NAND=y
diff --git a/configs/taurus_defconfig b/configs/taurus_defconfig
index 9e9f6fb..6209170 100644
--- a/configs/taurus_defconfig
+++ b/configs/taurus_defconfig
@@ -57,3 +57,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0908
CONFIG_USB_GADGET_PRODUCT_NUM=0x02d2
CONFIG_USB_GADGET_DOWNLOAD=y
CONFIG_USE_TINY_PRINTF=y
+CONFIG_NAND=y
diff --git a/configs/tec_defconfig b/configs/tec_defconfig
index 2f0e14f..64d560d 100644
--- a/configs/tec_defconfig
+++ b/configs/tec_defconfig
@@ -37,3 +37,4 @@ CONFIG_USB_HOST_ETHER=y
CONFIG_USB_ETHER_SMSC95XX=y
CONFIG_DM_VIDEO=y
CONFIG_VIDEO_TEGRA20=y
+CONFIG_NAND=y
diff --git a/configs/titanium_defconfig b/configs/titanium_defconfig
index c47702e..3094656 100644
--- a/configs/titanium_defconfig
+++ b/configs/titanium_defconfig
@@ -36,3 +36,4 @@ CONFIG_NETDEVICES=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/usb_a9263_dataflash_defconfig b/configs/usb_a9263_dataflash_defconfig
index e4ed415..dd13e4d 100644
--- a/configs/usb_a9263_dataflash_defconfig
+++ b/configs/usb_a9263_dataflash_defconfig
@@ -40,3 +40,4 @@ CONFIG_DM_SERIAL=y
CONFIG_ATMEL_USART=y
CONFIG_DM_SPI=y
CONFIG_ATMEL_SPI=y
+CONFIG_NAND=y
diff --git a/configs/ve8313_defconfig b/configs/ve8313_defconfig
index b93af89..8ad632c 100644
--- a/configs/ve8313_defconfig
+++ b/configs/ve8313_defconfig
@@ -18,3 +18,4 @@ CONFIG_MTD_NOR_FLASH=y
CONFIG_PHYLIB=y
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/wb45n_defconfig b/configs/wb45n_defconfig
index 6cf41df..647dfa6 100644
--- a/configs/wb45n_defconfig
+++ b/configs/wb45n_defconfig
@@ -25,3 +25,4 @@ CONFIG_CMD_PING=y
CONFIG_ENV_IS_IN_NAND=y
CONFIG_LZMA=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/wb50n_defconfig b/configs/wb50n_defconfig
index 1f3e41e..e37a797 100644
--- a/configs/wb50n_defconfig
+++ b/configs/wb50n_defconfig
@@ -28,3 +28,4 @@ CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_NETDEVICES=y
CONFIG_LZMA=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/work_92105_defconfig b/configs/work_92105_defconfig
index 1fccaac..9fab5f1 100644
--- a/configs/work_92105_defconfig
+++ b/configs/work_92105_defconfig
@@ -36,3 +36,4 @@ CONFIG_DM_GPIO=y
CONFIG_PHYLIB=y
CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
+CONFIG_NAND=y
diff --git a/configs/x600_defconfig b/configs/x600_defconfig
index 4658f97..2147963 100644
--- a/configs/x600_defconfig
+++ b/configs/x600_defconfig
@@ -51,3 +51,4 @@ CONFIG_BCH=y
CONFIG_USE_TINY_PRINTF=y
CONFIG_OF_LIBFDT=y
# CONFIG_EFI_LOADER is not set
+CONFIG_NAND=y
diff --git a/configs/xpedite517x_defconfig b/configs/xpedite517x_defconfig
index 3773518..92aa6fc 100644
--- a/configs/xpedite517x_defconfig
+++ b/configs/xpedite517x_defconfig
@@ -25,6 +25,8 @@ CONFIG_CMD_PCA953X=y
CONFIG_DS4510=y
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
+CONFIG_NAND=y
+CONFIG_SYS_MAX_NAND_DEVICE=2
CONFIG_PHYLIB=y
CONFIG_SYS_NS16550=y
CONFIG_PANIC_HANG=y
diff --git a/configs/xpedite520x_defconfig b/configs/xpedite520x_defconfig
index 7fffaa8..3d39c38 100644
--- a/configs/xpedite520x_defconfig
+++ b/configs/xpedite520x_defconfig
@@ -30,3 +30,4 @@ CONFIG_PHYLIB=y
CONFIG_SYS_NS16550=y
CONFIG_PANIC_HANG=y
CONFIG_OF_LIBFDT=y
+CONFIG_NAND=y
diff --git a/configs/xpedite537x_defconfig b/configs/xpedite537x_defconfig
index 223bc4c..ca0989e 100644
--- a/configs/xpedite537x_defconfig
+++ b/configs/xpedite537x_defconfig
@@ -28,6 +28,8 @@ CONFIG_CMD_PCA953X=y
CONFIG_DS4510=y
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
+CONFIG_NAND=y
+CONFIG_SYS_MAX_NAND_DEVICE=2
CONFIG_PHYLIB=y
CONFIG_SYS_NS16550=y
CONFIG_PANIC_HANG=y
diff --git a/configs/xpedite550x_defconfig b/configs/xpedite550x_defconfig
index f3b9280..5e4c827 100644
--- a/configs/xpedite550x_defconfig
+++ b/configs/xpedite550x_defconfig
@@ -26,6 +26,8 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_CMD_PCA953X=y
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
+CONFIG_NAND=y
+CONFIG_SYS_MAX_NAND_DEVICE=2
CONFIG_PHYLIB=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 78a39ab..e991440 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -181,6 +181,12 @@ config SYS_NAND_BUSWIDTH_16BIT
not available while configuring controller. So a static CONFIG_NAND_xx
is needed to know the device's bus-width in advance.
+config SYS_MAX_NAND_DEVICE
+ int "Maximum number of NAND devices"
+ default 1
+ help
+ Set this if there are more than 1 NAND devices
+
if SPL
config SYS_NAND_U_BOOT_LOCATIONS
diff --git a/include/configs/B4860QDS.h b/include/configs/B4860QDS.h
index 25e6c1f..403628f 100644
--- a/include/configs/B4860QDS.h
+++ b/include/configs/B4860QDS.h
@@ -354,7 +354,6 @@ unsigned long get_board_ddr_clk(void);
#define CONFIG_SYS_NAND_DDR_LAW 11
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024)
diff --git a/include/configs/BSC9131RDB.h b/include/configs/BSC9131RDB.h
index c3a7e1d..9d3b57a 100644
--- a/include/configs/BSC9131RDB.h
+++ b/include/configs/BSC9131RDB.h
@@ -180,7 +180,6 @@ extern unsigned long get_sdram_size(void);
#define CONFIG_SYS_NAND_FTIM3 FTIM3_NAND_TWW(0x04)
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024)
#define CONFIG_SYS_NAND_DDR_LAW 11
diff --git a/include/configs/BSC9132QDS.h b/include/configs/BSC9132QDS.h
index fcacd16..d90e4e6 100644
--- a/include/configs/BSC9132QDS.h
+++ b/include/configs/BSC9132QDS.h
@@ -290,7 +290,6 @@ combinations. this should be removed later
/* NAND */
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024)
diff --git a/include/configs/C29XPCIE.h b/include/configs/C29XPCIE.h
index f9d8cc6..1d823be 100644
--- a/include/configs/C29XPCIE.h
+++ b/include/configs/C29XPCIE.h
@@ -195,7 +195,6 @@
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BLOCK_SIZE (1024 * 1024)
/* 8Bit NAND Flash - K9F1G08U0B */
diff --git a/include/configs/M5329EVB.h b/include/configs/M5329EVB.h
index 0a69395..3a3eda4 100644
--- a/include/configs/M5329EVB.h
+++ b/include/configs/M5329EVB.h
@@ -156,7 +156,6 @@
#endif
#ifdef CONFIG_NANDFLASH_SIZE
-# 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 ecf2abc..bd0161c 100644
--- a/include/configs/M5373EVB.h
+++ b/include/configs/M5373EVB.h
@@ -156,7 +156,6 @@
#endif
#ifdef CONFIG_NANDFLASH_SIZE
-# 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/M54418TWR.h b/include/configs/M54418TWR.h
index 3e2b6e1..8ec9057 100644
--- a/include/configs/M54418TWR.h
+++ b/include/configs/M54418TWR.h
@@ -44,7 +44,6 @@
#define CONFIG_JFFS2_NAND
#define CONFIG_NAND_FSL_NFC
#define CONFIG_SYS_NAND_BASE 0xFC0FC000
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define NAND_MAX_CHIPS CONFIG_SYS_MAX_NAND_DEVICE
#define CONFIG_SYS_NAND_SELECT_DEVICE
#endif
diff --git a/include/configs/MCR3000.h b/include/configs/MCR3000.h
index 9d2c486..929acbc 100644
--- a/include/configs/MCR3000.h
+++ b/include/configs/MCR3000.h
@@ -133,7 +133,6 @@
#endif
/* NAND configuration part */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_MAX_CHIPS 1
#define CONFIG_SYS_NAND_BASE 0x0C000000
diff --git a/include/configs/MPC8313ERDB.h b/include/configs/MPC8313ERDB.h
index 0f60892..99a2022 100644
--- a/include/configs/MPC8313ERDB.h
+++ b/include/configs/MPC8313ERDB.h
@@ -260,7 +260,6 @@
#define CONFIG_MTD_DEVICE
#define CONFIG_MTD_PARTITION
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_NAND_FSL_ELBC 1
#define CONFIG_SYS_NAND_BLOCK_SIZE 16384
#define CONFIG_SYS_NAND_WINDOW_SIZE (32 * 1024)
diff --git a/include/configs/MPC8315ERDB.h b/include/configs/MPC8315ERDB.h
index bd1a7b2..beb82cb 100644
--- a/include/configs/MPC8315ERDB.h
+++ b/include/configs/MPC8315ERDB.h
@@ -236,7 +236,6 @@
#define CONFIG_MTD_DEVICE
#define CONFIG_MTD_PARTITION
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_NAND_FSL_ELBC 1
#define CONFIG_SYS_NAND_BLOCK_SIZE 16384
#define CONFIG_SYS_NAND_WINDOW_SIZE (32 * 1024) /* 0x00008000 */
diff --git a/include/configs/MPC837XEMDS.h b/include/configs/MPC837XEMDS.h
index 3cc1a47..12cfab4 100644
--- a/include/configs/MPC837XEMDS.h
+++ b/include/configs/MPC837XEMDS.h
@@ -278,7 +278,6 @@
/*
* NAND Flash on the Local Bus
*/
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_NAND_FSL_ELBC 1
#define CONFIG_SYS_NAND_BASE 0xE0600000
diff --git a/include/configs/MPC8536DS.h b/include/configs/MPC8536DS.h
index eef1602..053ad4a 100644
--- a/include/configs/MPC8536DS.h
+++ b/include/configs/MPC8536DS.h
@@ -284,7 +284,6 @@
CONFIG_SYS_NAND_BASE + 0x40000, \
CONFIG_SYS_NAND_BASE + 0x80000, \
CONFIG_SYS_NAND_BASE + 0xC0000}
-#define CONFIG_SYS_MAX_NAND_DEVICE 4
#define CONFIG_NAND_FSL_ELBC 1
#define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024)
diff --git a/include/configs/MPC8569MDS.h b/include/configs/MPC8569MDS.h
index 861c8dd..02ad468 100644
--- a/include/configs/MPC8569MDS.h
+++ b/include/configs/MPC8569MDS.h
@@ -180,7 +180,6 @@ extern unsigned long get_clock_freq(void);
#define CONFIG_SYS_NAND_BASE_PHYS CONFIG_SYS_NAND_BASE
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE, }
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_NAND_FSL_ELBC 1
#define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024)
#define CONFIG_SYS_NAND_BR_PRELIM (CONFIG_SYS_NAND_BASE_PHYS \
diff --git a/include/configs/MPC8572DS.h b/include/configs/MPC8572DS.h
index 91a5591..c63118d 100644
--- a/include/configs/MPC8572DS.h
+++ b/include/configs/MPC8572DS.h
@@ -283,7 +283,6 @@
CONFIG_SYS_NAND_BASE + 0x40000, \
CONFIG_SYS_NAND_BASE + 0x80000,\
CONFIG_SYS_NAND_BASE + 0xC0000}
-#define CONFIG_SYS_MAX_NAND_DEVICE 4
#define CONFIG_NAND_FSL_ELBC 1
#define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024)
#define CONFIG_SYS_NAND_MAX_OOBFREE 5
diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h
index 6a444ae..6cb3d57 100644
--- a/include/configs/P1010RDB.h
+++ b/include/configs/P1010RDB.h
@@ -380,7 +380,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/P1022DS.h b/include/configs/P1022DS.h
index 30e20bc..259f877 100644
--- a/include/configs/P1022DS.h
+++ b/include/configs/P1022DS.h
@@ -244,7 +244,6 @@
#endif
#define CONFIG_SYS_NAND_BASE_LIST {CONFIG_SYS_NAND_BASE}
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BLOCK_SIZE (256 * 1024)
#define CONFIG_ELBC_NAND_SPL_STATIC_PGSIZE
diff --git a/include/configs/P1023RDB.h b/include/configs/P1023RDB.h
index 1863bec..9564c82 100644
--- a/include/configs/P1023RDB.h
+++ b/include/configs/P1023RDB.h
@@ -122,7 +122,6 @@ extern unsigned long get_clock_freq(void);
#define CONFIG_SYS_NAND_BASE_PHYS CONFIG_SYS_NAND_BASE
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_NAND_FSL_ELBC
#define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024)
diff --git a/include/configs/P2041RDB.h b/include/configs/P2041RDB.h
index 6b9f366..6aa37d4 100644
--- a/include/configs/P2041RDB.h
+++ b/include/configs/P2041RDB.h
@@ -225,7 +225,6 @@ unsigned long get_board_sys_clk(unsigned long dummy);
#endif
#define CONFIG_SYS_NAND_BASE_LIST {CONFIG_SYS_NAND_BASE}
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024)
/* NAND flash config */
diff --git a/include/configs/T102xQDS.h b/include/configs/T102xQDS.h
index 2354dc8..a5e7cc0 100644
--- a/include/configs/T102xQDS.h
+++ b/include/configs/T102xQDS.h
@@ -363,7 +363,6 @@ unsigned long get_board_ddr_clk(void);
#define CONFIG_SYS_NAND_DDR_LAW 11
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024)
diff --git a/include/configs/T102xRDB.h b/include/configs/T102xRDB.h
index 733e44f..9ef4417 100644
--- a/include/configs/T102xRDB.h
+++ b/include/configs/T102xRDB.h
@@ -390,7 +390,6 @@ unsigned long get_board_ddr_clk(void);
#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_NAND)
#define CONFIG_SYS_CSPR0_EXT CONFIG_SYS_NAND_CSPR_EXT
diff --git a/include/configs/T1040QDS.h b/include/configs/T1040QDS.h
index e96d3a0..e573046 100644
--- a/include/configs/T1040QDS.h
+++ b/include/configs/T1040QDS.h
@@ -281,7 +281,6 @@ unsigned long get_board_ddr_clk(void);
#define CONFIG_SYS_NAND_DDR_LAW 11
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024)
diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h
index 1231c1a..184dfc6 100644
--- a/include/configs/T104xRDB.h
+++ b/include/configs/T104xRDB.h
@@ -395,7 +395,6 @@ $(SRCTREE)/board/freescale/t104xrdb/t1042d4_sd_rcw.cfg
#define CONFIG_SYS_NAND_DDR_LAW 11
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BLOCK_SIZE (512 * 1024)
diff --git a/include/configs/T208xQDS.h b/include/configs/T208xQDS.h
index 6fbac5f..375647f 100644
--- a/include/configs/T208xQDS.h
+++ b/include/configs/T208xQDS.h
@@ -336,7 +336,6 @@ unsigned long get_board_ddr_clk(void);
#define CONFIG_SYS_NAND_DDR_LAW 11
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024)
#if defined(CONFIG_NAND)
diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h
index 85bda94..66e3bb0 100644
--- a/include/configs/T208xRDB.h
+++ b/include/configs/T208xRDB.h
@@ -300,7 +300,6 @@ unsigned long get_board_ddr_clk(void);
#define CONFIG_SYS_NAND_DDR_LAW 11
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BLOCK_SIZE (512 * 1024)
#if defined(CONFIG_NAND)
diff --git a/include/configs/T4240QDS.h b/include/configs/T4240QDS.h
index 73e91bc..05dc4ba 100644
--- a/include/configs/T4240QDS.h
+++ b/include/configs/T4240QDS.h
@@ -257,7 +257,6 @@ unsigned long get_board_ddr_clk(void);
#define CONFIG_SYS_NAND_DDR_LAW 11
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024)
#define CONFIG_SYS_NAND_MAX_OOBFREE 2
diff --git a/include/configs/T4240RDB.h b/include/configs/T4240RDB.h
index b63c38c..15c799e 100644
--- a/include/configs/T4240RDB.h
+++ b/include/configs/T4240RDB.h
@@ -432,7 +432,6 @@ unsigned long get_board_ddr_clk(void);
#define CONFIG_SYS_NAND_DDR_LAW 11
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BLOCK_SIZE (512 * 1024)
diff --git a/include/configs/am3517_crane.h b/include/configs/am3517_crane.h
index 16212ef..8f5315c 100644
--- a/include/configs/am3517_crane.h
+++ b/include/configs/am3517_crane.h
@@ -109,7 +109,6 @@
/* to access */
/* nand at CS0 */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of */
/* NAND devices */
#define CONFIG_JFFS2_NAND
diff --git a/include/configs/apf27.h b/include/configs/apf27.h
index 24afc84..ac1cc20 100644
--- a/include/configs/apf27.h
+++ b/include/configs/apf27.h
@@ -184,7 +184,6 @@
#define CONFIG_MXC_NAND_REGS_BASE 0xD8000000
#define CONFIG_SYS_NAND_BASE CONFIG_MXC_NAND_REGS_BASE
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_MXC_NAND_HWECC
#define CONFIG_SYS_NAND_LARGEPAGE
diff --git a/include/configs/aristainetos-common.h b/include/configs/aristainetos-common.h
index 397afbb..e3981b0 100644
--- a/include/configs/aristainetos-common.h
+++ b/include/configs/aristainetos-common.h
@@ -177,7 +177,6 @@
/* NAND stuff */
#define CONFIG_NAND_MXS
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x40000000
#define CONFIG_SYS_NAND_5_ADDR_CYCLE
#define CONFIG_SYS_NAND_ONFI_DETECTION
diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h
index ea7478b..85a10f4 100644
--- a/include/configs/at91sam9260ek.h
+++ b/include/configs/at91sam9260ek.h
@@ -96,7 +96,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
#define CONFIG_NAND_ATMEL
-#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 39e4b38..37486b4 100644
--- a/include/configs/at91sam9261ek.h
+++ b/include/configs/at91sam9261ek.h
@@ -65,7 +65,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
#define CONFIG_NAND_ATMEL
-#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 9431777..6f00aef 100644
--- a/include/configs/at91sam9263ek.h
+++ b/include/configs/at91sam9263ek.h
@@ -203,7 +203,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
#define CONFIG_NAND_ATMEL
-#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 2957da9..9dee6e4 100644
--- a/include/configs/at91sam9m10g45ek.h
+++ b/include/configs/at91sam9m10g45ek.h
@@ -59,7 +59,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
#define CONFIG_NAND_ATMEL
-#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 87728df..8acb917 100644
--- a/include/configs/at91sam9n12ek.h
+++ b/include/configs/at91sam9n12ek.h
@@ -59,7 +59,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
#define CONFIG_NAND_ATMEL
-#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 c08fb2e..90fb335 100644
--- a/include/configs/at91sam9rlek.h
+++ b/include/configs/at91sam9rlek.h
@@ -56,7 +56,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
#define CONFIG_NAND_ATMEL
-#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 9450784..1f16a17 100644
--- a/include/configs/at91sam9x5ek.h
+++ b/include/configs/at91sam9x5ek.h
@@ -52,7 +52,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
#define CONFIG_NAND_ATMEL
-#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/axs10x.h b/include/configs/axs10x.h
index a9c4d1a..ce0b38c 100644
--- a/include/configs/axs10x.h
+++ b/include/configs/axs10x.h
@@ -41,7 +41,6 @@
* NAND Flash configuration
*/
#define CONFIG_SYS_NAND_BASE (ARC_FPGA_PERIPHERAL_BASE + 0x16000)
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
/*
* UART configuration
diff --git a/include/configs/brppt1.h b/include/configs/brppt1.h
index a8022b8..0894821 100644
--- a/include/configs/brppt1.h
+++ b/include/configs/brppt1.h
@@ -181,7 +181,6 @@ MMCARGS
* GPMC block. We support 1 device and the physical address to
* access CS0 at is 0x8000000.
*/
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x8000000
/* don't change OMAP_ELM, ECCSCHEME. ROM code only supports this */
#define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW
diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h
index da870b9..c53f239 100644
--- a/include/configs/cm_fx6.h
+++ b/include/configs/cm_fx6.h
@@ -181,7 +181,6 @@
#ifndef CONFIG_SPL_BUILD
#define CONFIG_SYS_NAND_BASE 0x40000000
#define CONFIG_SYS_NAND_MAX_CHIPS 1
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_NAND_MXS
#define CONFIG_SYS_NAND_ONFI_DETECTION
/* APBH DMA is required for NAND support */
diff --git a/include/configs/cm_t35.h b/include/configs/cm_t35.h
index 3c64cb5..ef480d4 100644
--- a/include/configs/cm_t35.h
+++ b/include/configs/cm_t35.h
@@ -100,7 +100,6 @@
#define CONFIG_SYS_NAND_BASE NAND_BASE /* physical address */
/* to access nand at */
/* CS0 */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND */
/* devices */
/* Environment information */
diff --git a/include/configs/cm_t3517.h b/include/configs/cm_t3517.h
index fe8b39a..48dd6a6 100644
--- a/include/configs/cm_t3517.h
+++ b/include/configs/cm_t3517.h
@@ -104,7 +104,6 @@
#define CONFIG_SYS_NAND_BASE NAND_BASE /* physical address */
/* to access nand at */
/* CS0 */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND */
/* devices */
/* Environment information */
diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h
index 04036c8..cb0501a 100644
--- a/include/configs/colibri_imx7.h
+++ b/include/configs/colibri_imx7.h
@@ -161,7 +161,6 @@
#define CONFIG_NAND_MXS
/* NAND stuff */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x40000000
#define CONFIG_SYS_NAND_5_ADDR_CYCLE
#define CONFIG_SYS_NAND_ONFI_DETECTION
diff --git a/include/configs/colibri_t20.h b/include/configs/colibri_t20.h
index e7f9405..88b9077 100644
--- a/include/configs/colibri_t20.h
+++ b/include/configs/colibri_t20.h
@@ -40,7 +40,6 @@
/* NAND support */
#define CONFIG_TEGRA_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
/* Dynamic MTD partition support */
#define CONFIG_MTD_PARTITIONS
diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h
index c7a34c2..74ae437 100644
--- a/include/configs/colibri_vf.h
+++ b/include/configs/colibri_vf.h
@@ -44,7 +44,6 @@
/* NAND support */
#define CONFIG_SYS_NAND_ONFI_DETECTION
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE NFC_BASE_ADDR
/* Dynamic MTD partition support */
diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h
index 0e9dae6..e312fd5 100644
--- a/include/configs/corenet_ds.h
+++ b/include/configs/corenet_ds.h
@@ -234,7 +234,6 @@
#endif
#define CONFIG_SYS_NAND_BASE_LIST {CONFIG_SYS_NAND_BASE}
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024)
/* NAND flash config */
diff --git a/include/configs/corvus.h b/include/configs/corvus.h
index cc671f2..3883667 100644
--- a/include/configs/corvus.h
+++ b/include/configs/corvus.h
@@ -71,7 +71,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
#define CONFIG_NAND_ATMEL
-#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 2a6916b..3e7dc82 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -182,7 +182,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_5_ADDR_CYCLE
#define CONFIG_SYS_NAND_PAGE_SIZE (2 << 10)
diff --git a/include/configs/devkit3250.h b/include/configs/devkit3250.h
index 526a81a..2617b31 100644
--- a/include/configs/devkit3250.h
+++ b/include/configs/devkit3250.h
@@ -90,7 +90,6 @@
*/
#define CONFIG_NAND_LPC32XX_SLC
#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/ea20.h b/include/configs/ea20.h
index efc72b3..427fad6 100644
--- a/include/configs/ea20.h
+++ b/include/configs/ea20.h
@@ -135,7 +135,6 @@
#undef CONFIG_SYS_NAND_HW_ECC
#define CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST
#define CONFIG_SYS_NAND_USE_FLASH_BBT
-#define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND devices */
#endif
/* SPI Flash */
diff --git a/include/configs/etamin.h b/include/configs/etamin.h
index ef9f330..5be6c66 100644
--- a/include/configs/etamin.h
+++ b/include/configs/etamin.h
@@ -62,8 +62,6 @@
#define CONFIG_SYS_NAND_MAX_CHIPS 1
-#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 322e623..2fe4eca 100644
--- a/include/configs/ethernut5.h
+++ b/include/configs/ethernut5.h
@@ -65,7 +65,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
#define CONFIG_NAND_ATMEL
diff --git a/include/configs/flea3.h b/include/configs/flea3.h
index e4d5f91..5052f60 100644
--- a/include/configs/flea3.h
+++ b/include/configs/flea3.h
@@ -155,7 +155,6 @@
* NAND FLASH driver setup
*/
#define CONFIG_MXC_NAND_REGS_BASE (NFC_BASE_ADDR)
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE (NFC_BASE_ADDR)
#define CONFIG_MXC_NAND_HWECC
#define CONFIG_SYS_NAND_LARGEPAGE
diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h
index 068962d..290690a 100644
--- a/include/configs/gw_ventana.h
+++ b/include/configs/gw_ventana.h
@@ -68,7 +68,6 @@
/* Enable NAND support */
#ifdef CONFIG_CMD_NAND
#define CONFIG_NAND_MXS
- #define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x40000000
#define CONFIG_SYS_NAND_5_ADDR_CYCLE
#define CONFIG_SYS_NAND_ONFI_DETECTION
diff --git a/include/configs/harmony.h b/include/configs/harmony.h
index 9a0b1af..726a37f 100644
--- a/include/configs/harmony.h
+++ b/include/configs/harmony.h
@@ -28,7 +28,6 @@
/* NAND support */
#define CONFIG_TEGRA_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
/* Environment in NAND (which is 512M), aligned to start of last sector */
#define CONFIG_ENV_OFFSET (SZ_512M - SZ_128K) /* 128K sector size */
diff --git a/include/configs/ids8313.h b/include/configs/ids8313.h
index 12eb07d..48fbd6c 100644
--- a/include/configs/ids8313.h
+++ b/include/configs/ids8313.h
@@ -202,7 +202,6 @@
* NAND FLASH setup
*/
#define CONFIG_SYS_NAND_BASE 0xE1000000
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_MAX_CHIPS 1
#define CONFIG_NAND_FSL_ELBC
#define CONFIG_SYS_NAND_PAGE_SIZE (2048)
diff --git a/include/configs/imx27lite-common.h b/include/configs/imx27lite-common.h
index 9596f0b..f8f7302 100644
--- a/include/configs/imx27lite-common.h
+++ b/include/configs/imx27lite-common.h
@@ -126,7 +126,6 @@
* NAND
*/
#define CONFIG_MXC_NAND_REGS_BASE 0xd8000000
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0xd8000000
#define CONFIG_JFFS2_NAND
#define CONFIG_MXC_NAND_HWECC
diff --git a/include/configs/imx6-engicam.h b/include/configs/imx6-engicam.h
index 0c45e06..c483227 100644
--- a/include/configs/imx6-engicam.h
+++ b/include/configs/imx6-engicam.h
@@ -151,7 +151,6 @@
/* NAND */
#ifdef CONFIG_NAND_MXS
-# define CONFIG_SYS_MAX_NAND_DEVICE 1
# define CONFIG_SYS_NAND_BASE 0x40000000
# define CONFIG_SYS_NAND_5_ADDR_CYCLE
# define CONFIG_SYS_NAND_ONFI_DETECTION
diff --git a/include/configs/imx6_logic.h b/include/configs/imx6_logic.h
index f0ff5b2..0d8774d 100644
--- a/include/configs/imx6_logic.h
+++ b/include/configs/imx6_logic.h
@@ -144,7 +144,6 @@
#define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE
/* NAND stuff */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x40000000
#define CONFIG_SYS_NAND_5_ADDR_CYCLE
#define CONFIG_SYS_NAND_ONFI_DETECTION
diff --git a/include/configs/ipam390.h b/include/configs/ipam390.h
index 618bf72..29c1d31 100644
--- a/include/configs/ipam390.h
+++ b/include/configs/ipam390.h
@@ -146,7 +146,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_5_ADDR_CYCLE
diff --git a/include/configs/km/km83xx-common.h b/include/configs/km/km83xx-common.h
index f0ec5cf..799fd62 100644
--- a/include/configs/km/km83xx-common.h
+++ b/include/configs/km/km83xx-common.h
@@ -202,7 +202,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/km_arm.h b/include/configs/km/km_arm.h
index ed58d1e..9552b85 100644
--- a/include/configs/km/km_arm.h
+++ b/include/configs/km/km_arm.h
@@ -114,7 +114,6 @@
/*
* NAND Flash configuration
*/
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define BOOTFLASH_START 0x0
diff --git a/include/configs/km/kmp204x-common.h b/include/configs/km/kmp204x-common.h
index a0c932a..aaf4e6c 100644
--- a/include/configs/km/kmp204x-common.h
+++ b/include/configs/km/kmp204x-common.h
@@ -151,7 +151,6 @@ unsigned long get_board_sys_clk(unsigned long dummy);
#define CONFIG_SYS_NAND_BASE_PHYS 0xfffa00000ull
#define CONFIG_SYS_NAND_BASE_LIST {CONFIG_SYS_NAND_BASE}
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024)
/* NAND flash config */
diff --git a/include/configs/km8360.h b/include/configs/km8360.h
index a2a26f9..d22f34c 100644
--- a/include/configs/km8360.h
+++ b/include/configs/km8360.h
@@ -23,7 +23,6 @@
#define CONFIG_KM_DEF_NETDEV "netdev=eth1\0"
#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 d088e83..9763f74 100644
--- a/include/configs/ls1021aqds.h
+++ b/include/configs/ls1021aqds.h
@@ -217,7 +217,6 @@ unsigned long get_board_ddr_clk(void);
#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_SYS_NAND_BLOCK_SIZE (128 * 1024)
#endif
diff --git a/include/configs/ls1043aqds.h b/include/configs/ls1043aqds.h
index a7f78f4..5d79492 100644
--- a/include/configs/ls1043aqds.h
+++ b/include/configs/ls1043aqds.h
@@ -194,7 +194,6 @@ unsigned long get_board_ddr_clk(void);
#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_NAND_BLOCK_SIZE (128 * 1024)
diff --git a/include/configs/ls1043ardb.h b/include/configs/ls1043ardb.h
index 34f8228..8569b5d 100644
--- a/include/configs/ls1043ardb.h
+++ b/include/configs/ls1043ardb.h
@@ -132,7 +132,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_NAND_BLOCK_SIZE (128 * 1024)
diff --git a/include/configs/ls1046aqds.h b/include/configs/ls1046aqds.h
index 456f61a..3583baa 100644
--- a/include/configs/ls1046aqds.h
+++ b/include/configs/ls1046aqds.h
@@ -228,7 +228,6 @@ unsigned long get_board_ddr_clk(void);
#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_NAND_BLOCK_SIZE (256 * 1024)
diff --git a/include/configs/ls1046ardb.h b/include/configs/ls1046ardb.h
index 2755f1c..be05fbc 100644
--- a/include/configs/ls1046ardb.h
+++ b/include/configs/ls1046ardb.h
@@ -93,7 +93,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_NAND_BLOCK_SIZE (128 * 1024)
diff --git a/include/configs/ls1088aqds.h b/include/configs/ls1088aqds.h
index 8fbf890..07bd90a 100644
--- a/include/configs/ls1088aqds.h
+++ b/include/configs/ls1088aqds.h
@@ -154,7 +154,6 @@ unsigned long get_board_ddr_clk(void);
#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_CMD_NAND
diff --git a/include/configs/ls1088ardb.h b/include/configs/ls1088ardb.h
index d0066e3..80517b1 100644
--- a/include/configs/ls1088ardb.h
+++ b/include/configs/ls1088ardb.h
@@ -140,7 +140,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_CMD_NAND
diff --git a/include/configs/ls2080a_simu.h b/include/configs/ls2080a_simu.h
index dad1090..bf5360e 100644
--- a/include/configs/ls2080a_simu.h
+++ b/include/configs/ls2080a_simu.h
@@ -108,7 +108,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_NAND_BLOCK_SIZE (128 * 1024)
diff --git a/include/configs/ls2080aqds.h b/include/configs/ls2080aqds.h
index 815d8ad..15446e4 100644
--- a/include/configs/ls2080aqds.h
+++ b/include/configs/ls2080aqds.h
@@ -149,7 +149,6 @@ unsigned long get_board_ddr_clk(void);
#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_NAND_BLOCK_SIZE (128 * 1024)
diff --git a/include/configs/ls2080ardb.h b/include/configs/ls2080ardb.h
index 6f3301c..d223b6b 100644
--- a/include/configs/ls2080ardb.h
+++ b/include/configs/ls2080ardb.h
@@ -158,7 +158,6 @@ unsigned long get_board_sys_clk(void);
#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_NAND_BLOCK_SIZE (512 * 1024)
diff --git a/include/configs/m53evk.h b/include/configs/m53evk.h
index 50379c7..0155487 100644
--- a/include/configs/m53evk.h
+++ b/include/configs/m53evk.h
@@ -73,7 +73,6 @@
*/
#define CONFIG_ENV_SIZE (16 * 1024)
#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/mcx.h b/include/configs/mcx.h
index f0ab990..835d474 100644
--- a/include/configs/mcx.h
+++ b/include/configs/mcx.h
@@ -95,7 +95,6 @@
/* to access */
/* nand at CS0 */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of */
/* NAND devices */
#define CONFIG_JFFS2_NAND
/* nand device jffs2 lives on */
diff --git a/include/configs/medcom-wide.h b/include/configs/medcom-wide.h
index 2efdc52..b399f1c 100644
--- a/include/configs/medcom-wide.h
+++ b/include/configs/medcom-wide.h
@@ -21,7 +21,6 @@
/* NAND support */
#define CONFIG_TEGRA_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
/* Environment in NAND, aligned to start of last sector */
#define CONFIG_ENV_OFFSET (SZ_512M - SZ_128K) /* 128K sectors */
diff --git a/include/configs/meesc.h b/include/configs/meesc.h
index 1540221..5e11c1a 100644
--- a/include/configs/meesc.h
+++ b/include/configs/meesc.h
@@ -83,7 +83,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
# define CONFIG_NAND_ATMEL
-# 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/mv-common.h b/include/configs/mv-common.h
index 1721fef..1551171 100644
--- a/include/configs/mv-common.h
+++ b/include/configs/mv-common.h
@@ -105,9 +105,6 @@
/*
* Common NAND configuration
*/
-#ifdef CONFIG_CMD_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
-#endif
/*
* Common SPI Flash configuration
diff --git a/include/configs/mvebu_armada-8k.h b/include/configs/mvebu_armada-8k.h
index 86e0d43..171ad8f 100644
--- a/include/configs/mvebu_armada-8k.h
+++ b/include/configs/mvebu_armada-8k.h
@@ -77,7 +77,6 @@
#define CONFIG_ENV_SIZE (64 << 10) /* 64KiB */
#define CONFIG_ENV_SECT_SIZE (64 << 10) /* 64KiB sectors */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_MAX_CHIPS 1
#define CONFIG_SYS_NAND_ONFI_DETECTION
#define CONFIG_SYS_NAND_USE_FLASH_BBT
diff --git a/include/configs/mx31pdk.h b/include/configs/mx31pdk.h
index 3259e82..1df0d6f 100644
--- a/include/configs/mx31pdk.h
+++ b/include/configs/mx31pdk.h
@@ -119,7 +119,6 @@
* NAND driver
*/
#define CONFIG_MXC_NAND_REGS_BASE NFC_BASE_ADDR
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE NFC_BASE_ADDR
#define CONFIG_MXC_NAND_HWECC
#define CONFIG_SYS_NAND_LARGEPAGE
diff --git a/include/configs/mx35pdk.h b/include/configs/mx35pdk.h
index 6a334cb..9fd9f12 100644
--- a/include/configs/mx35pdk.h
+++ b/include/configs/mx35pdk.h
@@ -175,7 +175,6 @@
* NAND FLASH driver setup
*/
#define CONFIG_MXC_NAND_REGS_BASE (NFC_BASE_ADDR)
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE (NFC_BASE_ADDR)
#define CONFIG_MXC_NAND_HWECC
#define CONFIG_SYS_NAND_LARGEPAGE
diff --git a/include/configs/mx53ard.h b/include/configs/mx53ard.h
index 985109e..688b71f 100644
--- a/include/configs/mx53ard.h
+++ b/include/configs/mx53ard.h
@@ -25,7 +25,6 @@
#define CONFIG_MXC_GPIO
-#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/mx6sabreauto.h b/include/configs/mx6sabreauto.h
index 64d54b6..ca7103c 100644
--- a/include/configs/mx6sabreauto.h
+++ b/include/configs/mx6sabreauto.h
@@ -67,7 +67,6 @@
/* NAND stuff */
#define CONFIG_NAND_MXS
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x40000000
#define CONFIG_SYS_NAND_5_ADDR_CYCLE
#define CONFIG_SYS_NAND_ONFI_DETECTION
diff --git a/include/configs/mx6sxsabreauto.h b/include/configs/mx6sxsabreauto.h
index 9e46c39..9ffcf19 100644
--- a/include/configs/mx6sxsabreauto.h
+++ b/include/configs/mx6sxsabreauto.h
@@ -120,7 +120,6 @@
/* NAND stuff */
#define CONFIG_NAND_MXS
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x40000000
#define CONFIG_SYS_NAND_5_ADDR_CYCLE
#define CONFIG_SYS_NAND_ONFI_DETECTION
diff --git a/include/configs/mx7dsabresd.h b/include/configs/mx7dsabresd.h
index 593bf38..7db5aaa 100644
--- a/include/configs/mx7dsabresd.h
+++ b/include/configs/mx7dsabresd.h
@@ -191,7 +191,6 @@
*/
#ifdef CONFIG_NAND_MXS
/* NAND stuff */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x40000000
#define CONFIG_SYS_NAND_5_ADDR_CYCLE
#define CONFIG_SYS_NAND_ONFI_DETECTION
diff --git a/include/configs/mxs.h b/include/configs/mxs.h
index 804b9e1..3fb49d4 100644
--- a/include/configs/mxs.h
+++ b/include/configs/mxs.h
@@ -138,7 +138,6 @@
/* NAND */
#ifdef CONFIG_CMD_NAND
#define CONFIG_NAND_MXS
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x60000000
#define CONFIG_SYS_NAND_5_ADDR_CYCLE
#endif
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index d3dfe60..1ec8ccb 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -34,7 +34,6 @@
/* NAND */
#if defined(CONFIG_NAND)
#define CONFIG_SYS_FLASH_BASE NAND_BASE
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_5_ADDR_CYCLE
#define CONFIG_SYS_NAND_PAGE_COUNT 64
#define CONFIG_SYS_NAND_PAGE_SIZE 2048
diff --git a/include/configs/omap3_cairo.h b/include/configs/omap3_cairo.h
index f9a7e0c..3404ff5 100644
--- a/include/configs/omap3_cairo.h
+++ b/include/configs/omap3_cairo.h
@@ -57,7 +57,6 @@
/*
* Board NAND Info.
*/
-#define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND */
/* devices */
#define CONFIG_EXTRA_ENV_SETTINGS \
"machid=ffffffff\0" \
diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h
index ba67e33..0bd8f0c 100644
--- a/include/configs/omap3_evm.h
+++ b/include/configs/omap3_evm.h
@@ -47,7 +47,6 @@
/* NAND */
#if defined(CONFIG_NAND)
#define CONFIG_SYS_FLASH_BASE NAND_BASE
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_5_ADDR_CYCLE
#define CONFIG_SYS_NAND_PAGE_COUNT 64
#define CONFIG_SYS_NAND_PAGE_SIZE 2048
diff --git a/include/configs/omap3_logic.h b/include/configs/omap3_logic.h
index 70745a8..6f44a4b 100644
--- a/include/configs/omap3_logic.h
+++ b/include/configs/omap3_logic.h
@@ -56,7 +56,6 @@
#ifdef CONFIG_NAND
#define CONFIG_SYS_NAND_ADDR NAND_BASE /* physical address */
/* to access nand */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of */
/* NAND devices */
#define CONFIG_SYS_NAND_5_ADDR_CYCLE
#define CONFIG_SYS_NAND_PAGE_COUNT 64
diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h
index 2cb9911..5a56d8e 100644
--- a/include/configs/omapl138_lcdk.h
+++ b/include/configs/omapl138_lcdk.h
@@ -163,7 +163,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_5_ADDR_CYCLE
diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h
index 4522569..4aa5a79 100644
--- a/include/configs/p1_p2_rdb_pc.h
+++ b/include/configs/p1_p2_rdb_pc.h
@@ -403,7 +403,6 @@
#endif
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#if defined(CONFIG_TARGET_P1020RDB_PD)
#define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024)
#else
diff --git a/include/configs/pcm052.h b/include/configs/pcm052.h
index 6021420..adb081e 100644
--- a/include/configs/pcm052.h
+++ b/include/configs/pcm052.h
@@ -26,7 +26,6 @@
#define CONFIG_SYS_NAND_ONFI_DETECTION
#ifdef CONFIG_CMD_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE NFC_BASE_ADDR
#define CONFIG_JFFS2_NAND
diff --git a/include/configs/pcm058.h b/include/configs/pcm058.h
index 3067fc6..f0a3b23 100644
--- a/include/configs/pcm058.h
+++ b/include/configs/pcm058.h
@@ -59,7 +59,6 @@
#ifndef CONFIG_SPL_BUILD
/* Enable NAND support */
#define CONFIG_NAND_MXS
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x40000000
#define CONFIG_SYS_NAND_5_ADDR_CYCLE
#define CONFIG_SYS_NAND_ONFI_DETECTION
diff --git a/include/configs/pfla02.h b/include/configs/pfla02.h
index ae03310..8e947f1 100644
--- a/include/configs/pfla02.h
+++ b/include/configs/pfla02.h
@@ -58,7 +58,6 @@
/* Enable NAND support */
#define CONFIG_CMD_NAND_TRIMFFS
#define CONFIG_NAND_MXS
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x40000000
#define CONFIG_SYS_NAND_5_ADDR_CYCLE
#define CONFIG_SYS_NAND_ONFI_DETECTION
diff --git a/include/configs/platinum.h b/include/configs/platinum.h
index 453c37d..3e1135c 100644
--- a/include/configs/platinum.h
+++ b/include/configs/platinum.h
@@ -70,7 +70,6 @@
#ifndef CONFIG_SYS_NAND_MAX_CHIPS
#define CONFIG_SYS_NAND_MAX_CHIPS 2
#endif
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x40000000
#define CONFIG_SYS_NAND_5_ADDR_CYCLE
#define CONFIG_SYS_NAND_ONFI_DETECTION
diff --git a/include/configs/plutux.h b/include/configs/plutux.h
index eef2062..cd418b2 100644
--- a/include/configs/plutux.h
+++ b/include/configs/plutux.h
@@ -21,7 +21,6 @@
/* NAND support */
#define CONFIG_TEGRA_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
/* Environment in NAND, aligned to start of last sector */
#define CONFIG_ENV_OFFSET (SZ_512M - SZ_128K) /* 128K sectors */
diff --git a/include/configs/pm9261.h b/include/configs/pm9261.h
index dec23a7..4d111ce 100644
--- a/include/configs/pm9261.h
+++ b/include/configs/pm9261.h
@@ -166,7 +166,6 @@
/* NAND flash */
#define CONFIG_NAND_ATMEL
-#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 8aab3e1..8c0b5a9 100644
--- a/include/configs/pm9263.h
+++ b/include/configs/pm9263.h
@@ -189,7 +189,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
#define CONFIG_NAND_ATMEL
-#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 e11c67f..9521f1c 100644
--- a/include/configs/pm9g45.h
+++ b/include/configs/pm9g45.h
@@ -78,7 +78,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
#define CONFIG_NAND_ATMEL
-#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/s32v234evb.h b/include/configs/s32v234evb.h
index fd1527c..e0a3c6a 100644
--- a/include/configs/s32v234evb.h
+++ b/include/configs/s32v234evb.h
@@ -103,7 +103,6 @@
#define MTD_NAND_FSL_NFC_SWECC 1
#define CONFIG_NAND_FSL_NFC
#define CONFIG_SYS_NAND_BASE 0x400E0000
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define NAND_MAX_CHIPS CONFIG_SYS_MAX_NAND_DEVICE
#define CONFIG_SYS_NAND_SELECT_DEVICE
#define CONFIG_SYS_64BIT_VSPRINTF /* needed for nand_util.c */
diff --git a/include/configs/sama5d2_ptc_ek.h b/include/configs/sama5d2_ptc_ek.h
index d99eaee..378f8c7 100644
--- a/include/configs/sama5d2_ptc_ek.h
+++ b/include/configs/sama5d2_ptc_ek.h
@@ -31,7 +31,6 @@
/* NAND Flash */
#ifdef CONFIG_CMD_NAND
#define CONFIG_NAND_ATMEL
-#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 a6697cd..03af82b 100644
--- a/include/configs/sama5d3_xplained.h
+++ b/include/configs/sama5d3_xplained.h
@@ -38,7 +38,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
#define CONFIG_NAND_ATMEL
-#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 9ec1e76..912115f 100644
--- a/include/configs/sama5d3xek.h
+++ b/include/configs/sama5d3xek.h
@@ -62,7 +62,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
#define CONFIG_NAND_ATMEL
-#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 6aa4bcc..25a02ec 100644
--- a/include/configs/sama5d4_xplained.h
+++ b/include/configs/sama5d4_xplained.h
@@ -35,7 +35,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
#define CONFIG_NAND_ATMEL
-#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 a46e350..192255d 100644
--- a/include/configs/sama5d4ek.h
+++ b/include/configs/sama5d4ek.h
@@ -33,7 +33,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
#define CONFIG_NAND_ATMEL
-#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 c0b8090..dc09e97 100644
--- a/include/configs/seaboard.h
+++ b/include/configs/seaboard.h
@@ -48,7 +48,6 @@
#define CONFIG_TEGRA_NAND
/* 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 85b6412..61fc400 100644
--- a/include/configs/siemens-am33x-common.h
+++ b/include/configs/siemens-am33x-common.h
@@ -490,7 +490,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 */
#if !defined(CONFIG_SPI_BOOT)
#define CONFIG_ENV_OFFSET 0x260000 /* environment starts here */
diff --git a/include/configs/smartweb.h b/include/configs/smartweb.h
index 49c838b..bda2761 100644
--- a/include/configs/smartweb.h
+++ b/include/configs/smartweb.h
@@ -83,7 +83,6 @@
/* NAND flash settings */
#define CONFIG_NAND_ATMEL
-#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/snapper9260.h b/include/configs/snapper9260.h
index b4ac12e..206abe1 100644
--- a/include/configs/snapper9260.h
+++ b/include/configs/snapper9260.h
@@ -42,7 +42,6 @@
/* NAND Flash */
#define CONFIG_NAND_ATMEL
-#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/snapper9g45.h b/include/configs/snapper9g45.h
index f0e1a1d..1e618f2 100644
--- a/include/configs/snapper9g45.h
+++ b/include/configs/snapper9g45.h
@@ -42,7 +42,6 @@
#define CONFIG_NAND_ATMEL
#define CONFIG_ATMEL_NAND_HWECC
#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 66e7c4f..d0f21dd 100644
--- a/include/configs/socfpga_common.h
+++ b/include/configs/socfpga_common.h
@@ -140,7 +140,6 @@
* NAND Support
*/
#ifdef CONFIG_NAND_DENALI
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_ONFI_DETECTION
#define CONFIG_SYS_NAND_REGS_BASE SOCFPGA_NANDREGS_ADDRESS
#define CONFIG_SYS_NAND_DATA_BASE SOCFPGA_NANDDATA_ADDRESS
diff --git a/include/configs/socrates.h b/include/configs/socrates.h
index 0d88ab5..4f9b5b1 100644
--- a/include/configs/socrates.h
+++ b/include/configs/socrates.h
@@ -151,7 +151,6 @@
#define CONFIG_SYS_OR3_PRELIM 0xfff00000 /* 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/spear-common.h b/include/configs/spear-common.h
index 349232e..5c34ea4 100644
--- a/include/configs/spear-common.h
+++ b/include/configs/spear-common.h
@@ -89,7 +89,6 @@
#define CONFIG_MTD_DEVICE
#define CONFIG_MTD_PARTITIONS
#define CONFIG_NAND_FSMC
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_ONFI_DETECTION
/*
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 582aba2..bab5f6e 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -131,7 +131,6 @@
#ifdef CONFIG_NAND_SUNXI
#define CONFIG_SYS_NAND_MAX_ECCPOS 1664
#define CONFIG_SYS_NAND_ONFI_DETECTION
-#define CONFIG_SYS_MAX_NAND_DEVICE 8
#define CONFIG_MTD_DEVICE
#define CONFIG_MTD_PARTITIONS
diff --git a/include/configs/suvd3.h b/include/configs/suvd3.h
index a1d1984..5e583db 100644
--- a/include/configs/suvd3.h
+++ b/include/configs/suvd3.h
@@ -49,7 +49,6 @@
#define CONFIG_NAND_ECC_BCH
#define CONFIG_NAND_KMETER1
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define NAND_MAX_CHIPS 1
/* include common defines/options for all 8309 Keymile boards */
diff --git a/include/configs/tam3517-common.h b/include/configs/tam3517-common.h
index 7f05cb0..94d3e54 100644
--- a/include/configs/tam3517-common.h
+++ b/include/configs/tam3517-common.h
@@ -80,7 +80,6 @@
/* to access */
/* nand at CS0 */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of */
/* NAND devices */
#define CONFIG_AUTO_COMPLETE
diff --git a/include/configs/tao3530.h b/include/configs/tao3530.h
index 0e9fe68..243ba65 100644
--- a/include/configs/tao3530.h
+++ b/include/configs/tao3530.h
@@ -81,7 +81,6 @@
/* to access nand at */
/* CS0 */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND */
/* devices */
/* Environment information */
diff --git a/include/configs/taurus.h b/include/configs/taurus.h
index ce06f7b..a5bf562 100644
--- a/include/configs/taurus.h
+++ b/include/configs/taurus.h
@@ -76,7 +76,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
#define CONFIG_NAND_ATMEL
-#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 0febe46..fda7b39 100644
--- a/include/configs/tec.h
+++ b/include/configs/tec.h
@@ -21,7 +21,6 @@
/* NAND support */
#define CONFIG_TEGRA_NAND
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
/* Environment in NAND, aligned to start of last sector */
#define CONFIG_ENV_OFFSET (SZ_512M - SZ_128K) /* 128K sectors */
diff --git a/include/configs/ti816x_evm.h b/include/configs/ti816x_evm.h
index b0f84ed..1329fc4 100644
--- a/include/configs/ti816x_evm.h
+++ b/include/configs/ti816x_evm.h
@@ -63,7 +63,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 bbed17a..4727ae8 100644
--- a/include/configs/ti_armv7_keystone2.h
+++ b/include/configs/ti_armv7_keystone2.h
@@ -179,7 +179,6 @@
#define CONFIG_SYS_NAND_LARGEPAGE
#define CONFIG_SYS_NAND_BASE_LIST { 0x30000000, }
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_MAX_CHIPS 1
#define CONFIG_SYS_NAND_NO_SUBPAGE_WRITE
#define CONFIG_MTD_PARTITIONS
diff --git a/include/configs/ti_armv7_omap.h b/include/configs/ti_armv7_omap.h
index da5fc81..2cff868 100644
--- a/include/configs/ti_armv7_omap.h
+++ b/include/configs/ti_armv7_omap.h
@@ -24,7 +24,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/titanium.h b/include/configs/titanium.h
index cc655f2..d09790b 100644
--- a/include/configs/titanium.h
+++ b/include/configs/titanium.h
@@ -143,7 +143,6 @@
/* NAND stuff */
#define CONFIG_NAND_MXS
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x40000000
#define CONFIG_SYS_NAND_5_ADDR_CYCLE
#define CONFIG_SYS_NAND_ONFI_DETECTION
diff --git a/include/configs/tricorder.h b/include/configs/tricorder.h
index f892a57..6f119df 100644
--- a/include/configs/tricorder.h
+++ b/include/configs/tricorder.h
@@ -77,7 +77,6 @@
#define CONFIG_SYS_NAND_BASE NAND_BASE /* physical address */
/* to access nand at */
/* CS0 */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND */
/* devices */
#define CONFIG_SYS_NAND_MAX_OOBFREE 2
#define CONFIG_SYS_NAND_MAX_ECCPOS 56
diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h
index 5ab06f6..b7d89e6 100644
--- a/include/configs/uniphier.h
+++ b/include/configs/uniphier.h
@@ -69,7 +69,6 @@
#define CONFIG_SYS_TIMER_RATE 1000000
#endif
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_ONFI_DETECTION
#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 cd28c4d..2006bb2 100644
--- a/include/configs/usb_a9263.h
+++ b/include/configs/usb_a9263.h
@@ -55,7 +55,6 @@
/* NAND flash */
#ifdef CONFIG_CMD_NAND
#define CONFIG_NAND_ATMEL
-#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/ve8313.h b/include/configs/ve8313.h
index 94a59f3..9974d98 100644
--- a/include/configs/ve8313.h
+++ b/include/configs/ve8313.h
@@ -178,7 +178,6 @@
* NAND settings
*/
#define CONFIG_SYS_NAND_BASE 0x61000000
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_NAND_FSL_ELBC 1
#define CONFIG_SYS_NAND_BLOCK_SIZE 16384
diff --git a/include/configs/vf610twr.h b/include/configs/vf610twr.h
index 63784e1..c5a0094 100644
--- a/include/configs/vf610twr.h
+++ b/include/configs/vf610twr.h
@@ -34,7 +34,6 @@
#define CONFIG_SYS_NAND_ONFI_DETECTION
#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/wb45n.h b/include/configs/wb45n.h
index 8989d55..8f1907e 100644
--- a/include/configs/wb45n.h
+++ b/include/configs/wb45n.h
@@ -47,7 +47,6 @@
/* NAND flash */
#define CONFIG_NAND_ATMEL
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x40000000
/* our ALE is AD21 */
#define CONFIG_SYS_NAND_MASK_ALE (1 << 21)
diff --git a/include/configs/wb50n.h b/include/configs/wb50n.h
index 4ab81c8..15e972b 100644
--- a/include/configs/wb50n.h
+++ b/include/configs/wb50n.h
@@ -62,7 +62,6 @@
/* NAND flash */
#define CONFIG_NAND_ATMEL
-#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/woodburn_common.h b/include/configs/woodburn_common.h
index 7ab60fd..39d9278 100644
--- a/include/configs/woodburn_common.h
+++ b/include/configs/woodburn_common.h
@@ -165,7 +165,6 @@
*/
#define CONFIG_NAND_MXC_V1_1
#define CONFIG_MXC_NAND_REGS_BASE (NFC_BASE_ADDR)
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE (NFC_BASE_ADDR)
#define CONFIG_MXC_NAND_HWECC
#define CONFIG_SYS_NAND_LARGEPAGE
diff --git a/include/configs/work_92105.h b/include/configs/work_92105.h
index 7faab4e..52c6d2c 100644
--- a/include/configs/work_92105.h
+++ b/include/configs/work_92105.h
@@ -110,7 +110,6 @@
/* driver configuration */
#define CONFIG_SYS_NAND_SELF_INIT
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_MAX_NAND_CHIPS 1
#define CONFIG_SYS_NAND_BASE MLC_NAND_BASE
#define CONFIG_NAND_LPC32XX_MLC
diff --git a/include/configs/x600.h b/include/configs/x600.h
index 4aa5a2a..401db04 100644
--- a/include/configs/x600.h
+++ b/include/configs/x600.h
@@ -58,7 +58,6 @@
/* NAND FLASH config options */
#define CONFIG_NAND_FSMC
#define CONFIG_SYS_NAND_SELF_INIT
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE CONFIG_FSMC_NAND_BASE
#define CONFIG_MTD_ECC_SOFT
#define CONFIG_SYS_FSMC_NAND_8BIT
diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h
index 9997fd0..d8967da 100644
--- a/include/configs/xilinx_zynqmp.h
+++ b/include/configs/xilinx_zynqmp.h
@@ -75,7 +75,6 @@
#endif
#ifdef CONFIG_NAND_ARASAN
-# define CONFIG_SYS_MAX_NAND_DEVICE 1
# define CONFIG_SYS_NAND_SELF_INIT
# define CONFIG_SYS_NAND_ONFI_DETECTION
# define CONFIG_MTD_DEVICE
diff --git a/include/configs/xpedite517x.h b/include/configs/xpedite517x.h
index f95d47a..a705808 100644
--- a/include/configs/xpedite517x.h
+++ b/include/configs/xpedite517x.h
@@ -111,7 +111,6 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
#define CONFIG_SYS_NAND_BASE 0xef800000
#define CONFIG_SYS_NAND_BASE2 0xef840000 /* Unused at this time */
#define CONFIG_SYS_NAND_BASE_LIST {CONFIG_SYS_NAND_BASE, CONFIG_SYS_NAND_BASE2}
-#define CONFIG_SYS_MAX_NAND_DEVICE 2
#define CONFIG_NAND_ACTL
#define CONFIG_SYS_NAND_ACTL_ALE (1 << 14) /* C_LA14 */
#define CONFIG_SYS_NAND_ACTL_CLE (1 << 15) /* C_LA15 */
diff --git a/include/configs/xpedite520x.h b/include/configs/xpedite520x.h
index c0df5ef..e156605 100644
--- a/include/configs/xpedite520x.h
+++ b/include/configs/xpedite520x.h
@@ -89,7 +89,6 @@
*/
#define CONFIG_SYS_NAND_BASE 0xef800000
#define CONFIG_SYS_NAND_BASE2 0xef840000 /* Unused at this time */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_NAND_ACTL
#define CONFIG_SYS_NAND_ACTL_CLE (1 << 3) /* ADDR3 is CLE */
#define CONFIG_SYS_NAND_ACTL_ALE (1 << 4) /* ADDR4 is ALE */
diff --git a/include/configs/xpedite537x.h b/include/configs/xpedite537x.h
index b262237..e72fe4b 100644
--- a/include/configs/xpedite537x.h
+++ b/include/configs/xpedite537x.h
@@ -108,7 +108,6 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
#define CONFIG_SYS_NAND_BASE2 0xef840000 /* Unused at this time */
#define CONFIG_SYS_NAND_BASE_LIST {CONFIG_SYS_NAND_BASE, \
CONFIG_SYS_NAND_BASE2}
-#define CONFIG_SYS_MAX_NAND_DEVICE 2
#define CONFIG_NAND_FSL_ELBC
/*
diff --git a/include/configs/xpedite550x.h b/include/configs/xpedite550x.h
index b5e8231..2833f2a 100644
--- a/include/configs/xpedite550x.h
+++ b/include/configs/xpedite550x.h
@@ -109,7 +109,6 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
#define CONFIG_SYS_NAND_BASE2 0xef840000 /* Unused at this time */
#define CONFIG_SYS_NAND_BASE_LIST {CONFIG_SYS_NAND_BASE, \
CONFIG_SYS_NAND_BASE2}
-#define CONFIG_SYS_MAX_NAND_DEVICE 2
#define CONFIG_NAND_FSL_ELBC
/*
diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h
index 28cee15..927e359 100644
--- a/include/configs/zynq-common.h
+++ b/include/configs/zynq-common.h
@@ -74,7 +74,6 @@
#endif
#ifdef CONFIG_NAND_ZYNQ
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_ONFI_DETECTION
#define CONFIG_MTD_DEVICE
#endif
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 6be4a76..e4a959b 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -3585,7 +3585,6 @@ CONFIG_SYS_MAX_FLASH_SECT
CONFIG_SYS_MAX_I2C_BUS
CONFIG_SYS_MAX_MTD_BANKS
CONFIG_SYS_MAX_NAND_CHIPS
-CONFIG_SYS_MAX_NAND_DEVICE
CONFIG_SYS_MAX_PCI_EPS
CONFIG_SYS_MB862xx_CCF
CONFIG_SYS_MB862xx_MMR
--
2.7.4
2
1

[U-Boot] [PATCH] common/memsize.c: restore content of the base address
by Patrick Delaunay 25 Jan '18
by Patrick Delaunay 25 Jan '18
25 Jan '18
In function get_ram_size() and for 2 last cases the content of
the base address (*base) is not restored even it is
correctly saved in stack (in save[i]).
This patch solved this issue.
The content of the base address is saved in new variable
in stack (save_base) to avoid the need of other information
(value of i) and restored in all the cases.
Signed-off-by: Patrick Delaunay <patrick.delaunay(a)st.com>
Reviewed-by: CITOOLS <smet-aci-reviews(a)lists.codex.cro.st.com>
Reviewed-by: CIBUILD <smet-aci-builds(a)lists.codex.cro.st.com>
---
issue detected on my custom board with
- base = 0xC0000000
- size = maxsize = 0x4000000
The loop is completely executed and the size is correctly
detected, but content in 0xC0000000 is not restored
So I have 0xC0000000 = 0x0 at the end of the function.
That cause issue in my use-case because U-Boot in loaded
at 0xC1000000 and some information can be saved by
ATF in DDR at 0xC0000000 address.
And the content of DDR is modified by this function.
common/memsize.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/common/memsize.c b/common/memsize.c
index 0fb9ba5..d632293 100644
--- a/common/memsize.c
+++ b/common/memsize.c
@@ -27,7 +27,8 @@ DECLARE_GLOBAL_DATA_PTR;
long get_ram_size(long *base, long maxsize)
{
volatile long *addr;
- long save[32];
+ long save[31];
+ long save_base;
long cnt;
long val;
long size;
@@ -43,7 +44,7 @@ long get_ram_size(long *base, long maxsize)
addr = base;
sync();
- save[i] = *addr;
+ save_base = *addr;
sync();
*addr = 0;
@@ -51,7 +52,7 @@ long get_ram_size(long *base, long maxsize)
if ((val = *addr) != 0) {
/* Restore the original data before leaving the function. */
sync();
- *addr = save[i];
+ *base = save_base;
for (cnt = 1; cnt < maxsize / sizeof(long); cnt <<= 1) {
addr = base + cnt;
sync();
@@ -76,9 +77,11 @@ long get_ram_size(long *base, long maxsize)
addr = base + cnt;
*addr = save[--i];
}
+ *base = save_base;
return (size);
}
}
+ *base = save_base;
return (maxsize);
}
--
2.7.4
3
10
Hi Tom,
Please pull this PR.
thanks!
Jagan.
The following changes since commit 98691a60abffb44303d7dae6e9e699d0daded930:
Merge git://git.denx.de/u-boot-rockchip (2018-01-09 13:28:51 -0500)
are available in the git repository at:
git://git.denx.de/u-boot-spi.git master
for you to fetch changes up to b23c685c6f295da3c01dd487f0e003b70299af91:
mips: bmips: enable the SPI flash on the Comtrend AR-5387un (2018-01-22 10:39:13 +0530)
----------------------------------------------------------------
Miquel Raynal (1):
doc: bindings: soft-spi: update documentation to match the code
Álvaro Fernández Rojas (16):
wait_bit: add 8/16/32 BE/LE versions of wait_for_bit
wait_bit: use wait_for_bit_le32 and remove wait_for_bit
drivers: spi: allow limiting reads
drivers: spi: consider command bytes when sending transfers
dm: spi: add BCM63xx SPI driver
mips: bmips: add bcm63xx-spi driver support for BCM6338
mips: bmips: add bcm63xx-spi driver support for BCM6348
mips: bmips: add bcm63xx-spi driver support for BCM6358
mips: bmips: add bcm63xx-spi driver support for BCM3380
mips: bmips: add bcm63xx-spi driver support for BCM63268
mips: bmips: enable the SPI flash on the Sagem F@ST1704
mips: bmips: enable the SPI flash on the Netgear CG3100D
dm: spi: add BCM63xx HSSPI driver
mips: bmips: add bcm63xx-hsspi driver support for BCM6328
mips: bmips: add bcm63xx-hsspi driver support for BCM63268
mips: bmips: enable the SPI flash on the Comtrend AR-5387un
arch/arm/mach-imx/mx6/ddr.c | 22 +-
arch/arm/mach-socfpga/clock_manager.c | 4 +-
arch/arm/mach-socfpga/clock_manager_gen5.c | 6 +-
arch/arm/mach-socfpga/reset_manager_arria10.c | 36 +--
arch/mips/dts/brcm,bcm3380.dtsi | 17 +
arch/mips/dts/brcm,bcm63268.dtsi | 38 +++
arch/mips/dts/brcm,bcm6328.dtsi | 24 ++
arch/mips/dts/brcm,bcm6338.dtsi | 17 +
arch/mips/dts/brcm,bcm6348.dtsi | 17 +
arch/mips/dts/brcm,bcm6358.dtsi | 17 +
arch/mips/dts/comtrend,ar-5387un.dts | 12 +
arch/mips/dts/netgear,cg3100d.dts | 12 +
arch/mips/dts/sagem,f(a)st1704.dts | 12 +
arch/mips/mach-ath79/ar934x/clk.c | 2 +-
board/samtec/vining_2000/vining_2000.c | 4 +-
configs/comtrend_ar5387un_ram_defconfig | 8 +
configs/netgear_cg3100d_ram_defconfig | 8 +
configs/sagem_f@st1704_ram_defconfig | 8 +
doc/device-tree-bindings/spi/soft-spi.txt | 24 +-
drivers/clk/clk_pic32.c | 12 +-
drivers/clk/renesas/clk-rcar-gen3.c | 4 +-
drivers/ddr/microchip/ddr2.c | 8 +-
drivers/fpga/socfpga_arria10.c | 17 +-
drivers/mmc/msm_sdhci.c | 8 +-
drivers/mtd/pic32_flash.c | 4 +-
drivers/mtd/spi/spi_flash.c | 5 +-
drivers/net/ag7xxx.c | 16 +-
drivers/net/dwc_eth_qos.c | 17 +-
drivers/net/ethoc.c | 8 +-
drivers/net/pic32_eth.c | 12 +-
drivers/net/pic32_mdio.c | 28 +-
drivers/net/ravb.c | 4 +-
drivers/net/xilinx_axi_emac.c | 4 +-
drivers/net/zynq_gem.c | 12 +-
drivers/reset/sti-reset.c | 4 +-
drivers/serial/serial_pic32.c | 4 +-
drivers/spi/Kconfig | 16 +
drivers/spi/Makefile | 2 +
drivers/spi/atmel_spi.c | 4 +-
drivers/spi/bcm63xx_hsspi.c | 414 ++++++++++++++++++++++++
drivers/spi/bcm63xx_spi.c | 433 ++++++++++++++++++++++++++
drivers/spi/cadence_qspi_apb.c | 14 +-
drivers/spi/fsl_qspi.c | 20 +-
drivers/spi/mvebu_a3700_spi.c | 20 +-
drivers/usb/host/dwc2.c | 24 +-
drivers/usb/host/ehci-msm.c | 3 +-
drivers/usb/host/ehci-mx6.c | 5 +-
drivers/usb/host/ohci-lpc32xx.c | 12 +-
drivers/usb/host/xhci-rcar.c | 12 +-
drivers/video/atmel_hlcdfb.c | 64 ++--
include/spi.h | 5 +-
include/wait_bit.h | 81 ++---
52 files changed, 1326 insertions(+), 258 deletions(-)
create mode 100644 drivers/spi/bcm63xx_hsspi.c
create mode 100644 drivers/spi/bcm63xx_spi.c
4
14
Only ARM and in some configs MIPS really implement arch_fixup_fdt().
Others just use the same boilerplate which is not good by itself,
but what's worse if we try to build with disabled CONFIG_CMD_BOOTM
and enabled CONFIG_OF_LIBFDT we'll hit an unknown symbol which was
apparently implemented in arch/xxx/lib/bootm.c.
Now with weak arch_fixup_fdt() right in image-fdt.c where it is
used we get both items highlighted above fixed.
Signed-off-by: Alexey Brodkin <abrodkin(a)synopsys.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck(a)gmail.com>
Cc: Simon Glass <sjg(a)chromium.org>
Cc: York Sun <york.sun(a)nxp.com>
Cc: Stefan Roese <sr(a)denx.de>
---
arch/arc/lib/bootm.c | 5 -----
arch/microblaze/lib/bootm.c | 5 -----
arch/mips/lib/bootm.c | 6 ++----
arch/nds32/lib/bootm.c | 6 ------
arch/powerpc/lib/bootm.c | 5 -----
arch/sandbox/lib/bootm.c | 5 -----
arch/x86/lib/bootm.c | 5 -----
common/image-fdt.c | 5 +++++
8 files changed, 7 insertions(+), 35 deletions(-)
diff --git a/arch/arc/lib/bootm.c b/arch/arc/lib/bootm.c
index 9eef7070cf43..4d4acff239d4 100644
--- a/arch/arc/lib/bootm.c
+++ b/arch/arc/lib/bootm.c
@@ -37,11 +37,6 @@ void arch_lmb_reserve(struct lmb *lmb)
lmb_reserve(lmb, sp, (CONFIG_SYS_SDRAM_BASE + gd->ram_size - sp));
}
-int arch_fixup_fdt(void *blob)
-{
- return 0;
-}
-
static int cleanup_before_linux(void)
{
disable_interrupts();
diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c
index 0a286e82c2be..f33ef087577d 100644
--- a/arch/microblaze/lib/bootm.c
+++ b/arch/microblaze/lib/bootm.c
@@ -17,11 +17,6 @@
DECLARE_GLOBAL_DATA_PTR;
-int arch_fixup_fdt(void *blob)
-{
- return 0;
-}
-
int do_bootm_linux(int flag, int argc, char * const argv[],
bootm_headers_t *images)
{
diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c
index 5a9a2811ffb5..9dc47407684b 100644
--- a/arch/mips/lib/bootm.c
+++ b/arch/mips/lib/bootm.c
@@ -253,17 +253,15 @@ static int boot_reloc_fdt(bootm_headers_t *images)
#endif
}
+#if CONFIG_IS_ENABLED(MIPS_BOOT_FDT) && CONFIG_IS_ENABLED(OF_LIBFDT)
int arch_fixup_fdt(void *blob)
{
-#if CONFIG_IS_ENABLED(MIPS_BOOT_FDT) && CONFIG_IS_ENABLED(OF_LIBFDT)
u64 mem_start = virt_to_phys((void *)gd->bd->bi_memstart);
u64 mem_size = gd->ram_size;
return fdt_fixup_memory_banks(blob, &mem_start, &mem_size, 1);
-#else
- return 0;
-#endif
}
+#endif
static int boot_setup_fdt(bootm_headers_t *images)
{
diff --git a/arch/nds32/lib/bootm.c b/arch/nds32/lib/bootm.c
index 42b15dfcbfc0..0d7f57851739 100644
--- a/arch/nds32/lib/bootm.c
+++ b/arch/nds32/lib/bootm.c
@@ -15,12 +15,6 @@
DECLARE_GLOBAL_DATA_PTR;
-int arch_fixup_fdt(void *blob)
-{
- return 0;
-}
-
-
#if defined(CONFIG_SETUP_MEMORY_TAGS) || \
defined(CONFIG_CMDLINE_TAG) || \
defined(CONFIG_INITRD_TAG) || \
diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c
index b9ae24dc98b6..6ef644d85ba3 100644
--- a/arch/powerpc/lib/bootm.c
+++ b/arch/powerpc/lib/bootm.c
@@ -40,11 +40,6 @@ static void set_clocks_in_mhz (bd_t *kbd);
#define CONFIG_SYS_LINUX_LOWMEM_MAX_SIZE (768*1024*1024)
#endif
-int arch_fixup_fdt(void *blob)
-{
- return 0;
-}
-
static void boot_jump_linux(bootm_headers_t *images)
{
void (*kernel)(bd_t *, ulong r4, ulong r5, ulong r6,
diff --git a/arch/sandbox/lib/bootm.c b/arch/sandbox/lib/bootm.c
index 4cdd18fe14b2..0c9a7979d231 100644
--- a/arch/sandbox/lib/bootm.c
+++ b/arch/sandbox/lib/bootm.c
@@ -50,11 +50,6 @@ int bootz_setup(ulong image, ulong *start, ulong *end)
return ret;
}
-int arch_fixup_fdt(void *blob)
-{
- return 0;
-}
-
int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
{
if (flag & (BOOTM_STATE_OS_GO | BOOTM_STATE_OS_FAKE_GO)) {
diff --git a/arch/x86/lib/bootm.c b/arch/x86/lib/bootm.c
index e548cdbed592..8e76ba35aea5 100644
--- a/arch/x86/lib/bootm.c
+++ b/arch/x86/lib/bootm.c
@@ -28,11 +28,6 @@ DECLARE_GLOBAL_DATA_PTR;
#define COMMAND_LINE_OFFSET 0x9000
-int arch_fixup_fdt(void *blob)
-{
- return 0;
-}
-
__weak void board_quiesce_devices(void)
{
}
diff --git a/common/image-fdt.c b/common/image-fdt.c
index 1e946467e3c7..24e4c7c6c814 100644
--- a/common/image-fdt.c
+++ b/common/image-fdt.c
@@ -454,6 +454,11 @@ __weak int ft_verify_fdt(void *fdt)
return 1;
}
+__weak int arch_fixup_fdt(void *blob)
+{
+ return 0;
+}
+
int image_setup_libfdt(bootm_headers_t *images, void *blob,
int of_size, struct lmb *lmb)
{
--
2.14.3
3
2
These patches fix one general build issue, improve support for two
existing boards, and add support for the Orange Pi Zero Plus.
5
21

25 Jan '18
Hi Marek,
Having btrfs support in u-boot is awesome!
With u-boot v2018.01-rc1 on our arm target (am335x) BeagleBone family,
we are seeing a data abort with lzo compression. I'm wondering if
you've seen something similar with your systems:
ignore the "Failed to mount ext2 filesystem..." as we are using the
genric "load" and extX support is built-in too..
loading /boot/vmlinuz-4.9.68-ti-r83 ...
Failed to mount ext2 filesystem...
data abort
pc : [<9ff6eab8>] lr : [<00000000>]
reloc pc : [<80825ab8>] lr : [<e08b7000>]
sp : 9df28148 ip : 82020000 fp : 0001f000
r10: 00000d52 r9 : 9df28ed8 r8 : 82001000
r7 : 0001d12c r6 : 00001000 r5 : 0001d2a6 r4 : 9df53fe2
r3 : 00001000 r2 : 82000000 r1 : 00001000 r0 : 00000000
Flags: nzCv IRQs off FIQs on Mode SVC_32
Resetting CPU ...
resetting ...
the other two options; no compress and zlib are working great in our
single partition setup!
Regards,
--
Robert Nelson
https://rcn-ee.com/
3
3