]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
etamin: Rework CONFIG_NAND_CS_INIT
authorTom Rini <trini@konsulko.com>
Fri, 2 Dec 2022 21:42:38 +0000 (16:42 -0500)
committerTom Rini <trini@konsulko.com>
Thu, 22 Dec 2022 15:31:48 +0000 (10:31 -0500)
Enable this in the board Kconfig file, but then check for it via
CONFIG_IS_ENABLED so that it will only be true in the non-SPL case, as
is done today.  As part of this we move some defines local to where
they are used as it's board specific.

Cc: Samuel Egli <samuel.egli@siemens.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
board/siemens/common/board.c
board/siemens/draco/Kconfig
board/siemens/draco/board.c
include/configs/etamin.h

index 2efede62aa5d00a75d6ee8701d33e8778f78cd43..8fa9197a6dfb256f8429524c676023ed1b4203b2 100644 (file)
@@ -93,7 +93,7 @@ int board_init(void)
 
        gpmc_init();
 
-#ifdef CONFIG_NAND_CS_INIT
+#if CONFIG_IS_ENABLED(NAND_CS_INIT)
        board_nand_cs_init();
 #endif
 
index a699c7d46f79a04e0b79fd80305b501fa20a70d3..1eb8a4886f4cb697a57c6a29dc3e33890198b36b 100644 (file)
@@ -60,4 +60,6 @@ config SYS_SOC
 config SYS_CONFIG_NAME
         default "etamin"
 
+config NAND_CS_INIT
+       def_bool y
 endif
index f898bba4b0eea9bbb9f3cb78c2c655388978ba8d..8874659013fcab22b8f6c21f89c024a3905c0420 100644 (file)
@@ -370,7 +370,14 @@ U_BOOT_CMD(
 #endif /* #if defined(CONFIG_DRIVER_TI_CPSW) */
 #endif /* #if (defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD)) */
 
-#ifdef CONFIG_NAND_CS_INIT
+#if CONFIG_IS_ENABLED(NAND_CS_INIT)
+#define ETAMIN_NAND_GPMC_CONFIG1       0x00000800
+#define ETAMIN_NAND_GPMC_CONFIG2       0x001e1e00
+#define ETAMIN_NAND_GPMC_CONFIG3       0x001e1e00
+#define ETAMIN_NAND_GPMC_CONFIG4       0x16051807
+#define ETAMIN_NAND_GPMC_CONFIG5       0x00151e1e
+#define ETAMIN_NAND_GPMC_CONFIG6       0x16000f80
+
 /* GPMC definitions for second nand cs1 */
 static const u32 gpmc_nand_config[] = {
        ETAMIN_NAND_GPMC_CONFIG1,
index 6647148c96f4a81a1e5e728b9a80ad18d74c4a1c..811c7cb9618852a2993bff47efde11949365c659 100644 (file)
                "bootm ${kloadaddr} - ${loadaddr}\0" \
        COMMON_ENV_NAND_CMDS
 
-#ifndef CONFIG_SPL_BUILD
-
-#define CONFIG_NAND_CS_INIT
-#define ETAMIN_NAND_GPMC_CONFIG1       0x00000800
-#define ETAMIN_NAND_GPMC_CONFIG2       0x001e1e00
-#define ETAMIN_NAND_GPMC_CONFIG3       0x001e1e00
-#define ETAMIN_NAND_GPMC_CONFIG4       0x16051807
-#define ETAMIN_NAND_GPMC_CONFIG5       0x00151e1e
-#define ETAMIN_NAND_GPMC_CONFIG6       0x16000f80
-
 /* Default env settings */
 #define CONFIG_EXTRA_ENV_SETTINGS \
        "hostname=etamin\0" \
        CONFIG_ENV_SETTINGS_BUTTONS_AND_LEDS \
        CONFIG_ENV_SETTINGS_V2 \
        CONFIG_ENV_SETTINGS_NAND_V2
-#endif /* CONFIG_SPL_BUILD */
+
 #endif /* ! __CONFIG_ETAMIN_H */