]> git.baikalelectronics.ru Git - uboot.git/commitdiff
Finish conversion CONFIG_SYS_NAND_SELF_INIT to Kconfig
authorTom Rini <trini@konsulko.com>
Mon, 13 Dec 2021 03:12:36 +0000 (22:12 -0500)
committerTom Rini <trini@konsulko.com>
Mon, 27 Dec 2021 21:20:18 +0000 (16:20 -0500)
In order to finish this conversion we need to add a symbols for
SPL_SYS_NAND_SELF_INIT and TPL_SYS_NAND_SELF_INIT as there are cases
there where we need to, or need to not, use that framework as things
stand.

Signed-off-by: Tom Rini <trini@konsulko.com>
12 files changed:
drivers/mtd/nand/raw/Kconfig
drivers/mtd/nand/raw/davinci_nand.c
drivers/mtd/nand/raw/nand.c
include/configs/broadcom_bcm963158.h
include/configs/broadcom_bcm968360bg.h
include/configs/broadcom_bcm968380gerg.h
include/configs/broadcom_bcm968580xref.h
include/configs/comtrend_vr3032u.h
include/configs/da850evm.h
include/configs/tegra20-common.h
include/configs/work_92105.h
include/nand.h

index da618acd873b2fef86251939f8c651c68aea566c..0e826c19298689b3b4b317184c217b4e3184c2aa 100644 (file)
@@ -9,6 +9,20 @@ config SYS_NAND_SELF_INIT
          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
@@ -22,6 +36,7 @@ config SYS_NAND_USE_FLASH_BBT
 
 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
@@ -65,6 +80,7 @@ endif
 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.
@@ -101,6 +117,7 @@ config NAND_BRCMNAND_63158
 
 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
@@ -128,18 +145,25 @@ config NAND_DENALI_DT
 
 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.
 
@@ -331,6 +355,7 @@ config NAND_SUNXI
        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
@@ -375,6 +400,7 @@ config NAND_MXC
 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
@@ -407,6 +433,7 @@ config NAND_MXIC
 
 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
index ef7ee395c0ca38d9be747ef57ec3af316e576327..9158d94de25a36d2db217484ae49d2ff9ef21d63 100644 (file)
@@ -788,7 +788,7 @@ static void davinci_nand_init(struct nand_chip *nand)
        nand->dev_ready = nand_davinci_dev_ready;
 }
 
-#ifdef CONFIG_SYS_NAND_SELF_INIT
+#if CONFIG_IS_ENABLED(SYS_NAND_SELF_INIT)
 static int davinci_nand_probe(struct udevice *dev)
 {
        struct nand_chip *nand = dev_get_priv(dev);
index 59ad1392b0e602789bc908659c557a63ca8544b7..4b5560dd24cd4e9131acc131829c27d67bfacbee 100644 (file)
@@ -76,7 +76,7 @@ int nand_register(int devnum, struct mtd_info *mtd)
        return 0;
 }
 
-#ifndef CONFIG_SYS_NAND_SELF_INIT
+#if !CONFIG_IS_ENABLED(SYS_NAND_SELF_INIT)
 static void nand_init_chip(int i)
 {
        struct nand_chip *nand = &nand_chip[i];
@@ -155,7 +155,7 @@ void nand_init(void)
                return;
        initialized = 1;
 
-#ifdef CONFIG_SYS_NAND_SELF_INIT
+#if CONFIG_IS_ENABLED(SYS_NAND_SELF_INIT)
        board_nand_init();
 #else
        int i;
index de45f74923a2b297fbe7e7d6bdef4f956b6af9f6..5aa784d88cac3ab44cec17f4dd94f038099ecbde 100644 (file)
@@ -28,7 +28,6 @@
 
 #ifdef CONFIG_MTD_RAW_NAND
 #define CONFIG_SYS_MAX_NAND_DEVICE     1
-#define CONFIG_SYS_NAND_SELF_INIT
 #endif /* CONFIG_MTD_RAW_NAND */
 
 /*
index 0391f06218192ff824ef0f6169e952915fc4fd43..01bab046ddb0963814f999181c3e09efe06ef155 100644 (file)
@@ -27,7 +27,6 @@
 
 #ifdef CONFIG_MTD_RAW_NAND
 #define CONFIG_SYS_MAX_NAND_DEVICE     1
-#define CONFIG_SYS_NAND_SELF_INIT
 #endif /* CONFIG_MTD_RAW_NAND */
 
 /*
index 866de2527d0bf7528e0e6c01611ad266d8d871c4..c1c1b37fabd97d45ac7e8da1acfbc65059c458bc 100644 (file)
@@ -8,5 +8,4 @@
 
 #ifdef CONFIG_MTD_RAW_NAND
 #define CONFIG_SYS_MAX_NAND_DEVICE     1
-#define CONFIG_SYS_NAND_SELF_INIT
 #endif /* CONFIG_MTD_RAW_NAND */
index 179aa9d608c8f74042529cbaca077ce173933d8b..ebfc2ecc0be14226cfe37b7185cca20d6cd9e001 100644 (file)
@@ -27,7 +27,6 @@
 
 #ifdef CONFIG_MTD_RAW_NAND
 #define CONFIG_SYS_MAX_NAND_DEVICE     1
-#define CONFIG_SYS_NAND_SELF_INIT
 #endif /* CONFIG_MTD_RAW_NAND */
 
 /*
index fc890af915a75604624b3e2bcd3e84a4e4321539..ee29f702f8f31e00413d5d5188101421c45528de 100644 (file)
@@ -10,5 +10,4 @@
 
 #ifdef CONFIG_MTD_RAW_NAND
 #define CONFIG_SYS_MAX_NAND_DEVICE     1
-#define CONFIG_SYS_NAND_SELF_INIT
 #endif /* CONFIG_MTD_RAW_NAND */
index bd788662947a84bcad688bec24cd69e386859802..9d27e502298e4be9a70fe75efd5f8eb19e5ae4d2 100644 (file)
                                59, 60, 61, 62, 63 }
 #define CONFIG_SYS_NAND_ECCSIZE                512
 #define CONFIG_SYS_NAND_ECCBYTES       10
-
-#ifndef CONFIG_SPL_BUILD
-#define CONFIG_SYS_NAND_SELF_INIT
-#endif
 #endif
 
 /*
index 063213cbfeb7e9ee33707cba849e7837b9b4c6e4..fac8692728576da5f632c350a5fc4721992a9861 100644 (file)
@@ -79,6 +79,4 @@
  */
 #define CONFIG_USB_EHCI_TXFIFO_THRESH  0x10
 
-#define CONFIG_SYS_NAND_SELF_INIT
-
 #endif /* _TEGRA20_COMMON_H_ */
index 9223aee5c16b4d17633bdad8c486409a6ec6c8c8..a43fd81e45db2ef31c2a301125fbed6cce676376 100644 (file)
@@ -55,7 +55,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
index 09dbda4e81b22cf7071dc003cdf3e2e805329443..70c1286ccb406e3a801f882ef43b5ffe2afd956f 100644 (file)
 
 #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);
 
@@ -34,7 +18,7 @@ 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