aboutsummaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-12-02 16:42:38 -0500
committerTom Rini <trini@konsulko.com>2022-12-22 10:31:48 -0500
commit3348c6b6a5cbf71bde837bf80cf962ee6aaeff20 (patch)
treef79c75fa5f322ddf8a529ee9170a7676523d17ad /board
parent71894173bb15fffacb166bdc04168a0fcb86cbbf (diff)
downloadu-boot-3348c6b6a5cbf71bde837bf80cf962ee6aaeff20.zip
u-boot-3348c6b6a5cbf71bde837bf80cf962ee6aaeff20.tar.gz
u-boot-3348c6b6a5cbf71bde837bf80cf962ee6aaeff20.tar.bz2
etamin: Rework CONFIG_NAND_CS_INIT
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>
Diffstat (limited to 'board')
-rw-r--r--board/siemens/common/board.c2
-rw-r--r--board/siemens/draco/Kconfig2
-rw-r--r--board/siemens/draco/board.c9
3 files changed, 11 insertions, 2 deletions
diff --git a/board/siemens/common/board.c b/board/siemens/common/board.c
index 2efede6..8fa9197 100644
--- a/board/siemens/common/board.c
+++ b/board/siemens/common/board.c
@@ -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
diff --git a/board/siemens/draco/Kconfig b/board/siemens/draco/Kconfig
index a699c7d..1eb8a48 100644
--- a/board/siemens/draco/Kconfig
+++ b/board/siemens/draco/Kconfig
@@ -60,4 +60,6 @@ config SYS_SOC
config SYS_CONFIG_NAME
default "etamin"
+config NAND_CS_INIT
+ def_bool y
endif
diff --git a/board/siemens/draco/board.c b/board/siemens/draco/board.c
index f898bba..8874659 100644
--- a/board/siemens/draco/board.c
+++ b/board/siemens/draco/board.c
@@ -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,