This option, if enabled, provides more flexible and linux-like
NAND initialization process.
+config SPL_SYS_NAND_SELF_INIT
+ bool
+ depends on !SPL_NAND_SIMPLE
+ help
+ This option, if enabled, provides more flexible and linux-like
+ NAND initialization process, in SPL.
+
+config TPL_SYS_NAND_SELF_INIT
+ bool
+ depends on TPL_NAND_SUPPORT
+ help
+ This option, if enabled, provides more flexible and linux-like
+ NAND initialization process, in SPL.
+
config SYS_NAND_DRIVER_ECC_LAYOUT
bool "Omit standard ECC layouts to save space"
help
config NAND_ATMEL
bool "Support Atmel NAND controller"
+ select SYS_NAND_SELF_INIT
imply SYS_NAND_USE_FLASH_BBT
help
Enable this driver for NAND flash platforms using an Atmel NAND
config NAND_BRCMNAND
bool "Support Broadcom NAND controller"
depends on OF_CONTROL && DM && DM_MTD
+ select SYS_NAND_SELF_INIT
help
Enable the driver for NAND flash on platforms using a Broadcom NAND
controller.
config NAND_DAVINCI
bool "Support TI Davinci NAND controller"
+ select SYS_NAND_SELF_INIT if TARGET_DA850EVM
help
Enable this driver for NAND flash controllers available in TI Davinci
and Keystone2 platforms
config NAND_FSL_ELBC
bool "Support Freescale Enhanced Local Bus Controller FCM NAND driver"
+ select TPL_SYS_NAND_SELF_INIT if TPL_NAND_SUPPORT
+ select SPL_SYS_NAND_SELF_INIT
+ select SYS_NAND_SELF_INIT
depends on FSL_ELBC
help
Enable the Freescale Enhanced Local Bus Controller FCM NAND driver.
config NAND_FSL_IFC
bool "Support Freescale Integrated Flash Controller NAND driver"
+ select TPL_SYS_NAND_SELF_INIT if TPL_NAND_SUPPORT
+ select SPL_SYS_NAND_SELF_INIT
+ select SYS_NAND_SELF_INIT
select FSL_IFC
help
Enable the Freescale Integrated Flash Controller NAND driver.
config NAND_LPC32XX_MLC
bool "Support LPC32XX_MLC controller"
+ select SYS_NAND_SELF_INIT
help
Enable the LPC32XX MLC NAND controller.
select SYS_NAND_SELF_INIT
select SYS_NAND_U_BOOT_LOCATIONS
select SPL_NAND_SUPPORT
+ select SPL_SYS_NAND_SELF_INIT
imply CMD_NAND
---help---
Enable support for NAND. This option enables the standard and
config NAND_MXS
bool "MXS NAND support"
depends on MX23 || MX28 || MX6 || MX7 || IMX8 || IMX8M
+ select SPL_SYS_NAND_SELF_INIT
select SYS_NAND_SELF_INIT
imply CMD_NAND
select APBH_DMA
config NAND_ZYNQ
bool "Support for Zynq Nand controller"
+ select SPL_SYS_NAND_SELF_INIT
select SYS_NAND_SELF_INIT
select DM_MTD
imply CMD_NAND
#include <config.h>
-/*
- * All boards using a given driver must convert to self-init
- * at the same time, so do it here. When all drivers are
- * converted, this will go away.
- */
-#ifdef CONFIG_SPL_BUILD
-#if defined(CONFIG_NAND_FSL_ELBC) || defined(CONFIG_NAND_FSL_IFC)
-#define CONFIG_SYS_NAND_SELF_INIT
-#endif
-#else
-#if defined(CONFIG_NAND_FSL_ELBC) || defined(CONFIG_NAND_ATMEL)\
- || defined(CONFIG_NAND_FSL_IFC)
-#define CONFIG_SYS_NAND_SELF_INIT
-#endif
-#endif
-
extern void nand_init(void);
unsigned long nand_size(void);
int nand_mtd_to_devnum(struct mtd_info *mtd);
-#ifdef CONFIG_SYS_NAND_SELF_INIT
+#if CONFIG_IS_ENABLED(SYS_NAND_SELF_INIT)
void board_nand_init(void);
int nand_register(int devnum, struct mtd_info *mtd);
#else