public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [PATCH 1/8] pfla02: Rework excluding NAND from SPL
Date: Tue, 26 May 2020 15:06:12 -0400	[thread overview]
Message-ID: <20200526190619.29583-1-trini@konsulko.com> (raw)

Rather than only enable CONFIG_CMD_NAND for non-SPL builds, move the CMD
options to defconfig and rework the guards to not try and call the
function in SPL builds.

Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
A grep around for setup_gpmi_nand() shows that other platforms will just
make an empty function in similar situations.
---
 board/phytec/pfla02/pfla02.c | 8 ++++----
 configs/pfla02_defconfig     | 2 +-
 include/configs/pfla02.h     | 4 ----
 3 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/board/phytec/pfla02/pfla02.c b/board/phytec/pfla02/pfla02.c
index fed8f52e3e1d..0a961cc8a5a4 100644
--- a/board/phytec/pfla02/pfla02.c
+++ b/board/phytec/pfla02/pfla02.c
@@ -117,7 +117,7 @@ static iomux_v3_cfg_t const gpios_pads[] = {
 	IOMUX_PADS(PAD_SD4_DAT3__GPIO2_IO11 | MUX_PAD_CTRL(NO_PAD_CTRL)),
 };
 
-#ifdef CONFIG_CMD_NAND
+#if defined(CONFIG_CMD_NAND) && !defined(CONFIG_SPL_BUILD)
 /* NAND */
 static iomux_v3_cfg_t const nfc_pads[] = {
 	IOMUX_PADS(PAD_NANDF_CLE__NAND_CLE	| MUX_PAD_CTRL(NAND_PAD_CTRL)),
@@ -274,7 +274,7 @@ static void setup_gpios(void)
 	SETUP_IOMUX_PADS(gpios_pads);
 }
 
-#ifdef CONFIG_CMD_NAND
+#if defined(CONFIG_CMD_NAND) && !defined(CONFIG_SPL_BUILD)
 static void setup_gpmi_nand(void)
 {
 	struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;
@@ -361,7 +361,7 @@ int board_init(void)
 
 	setup_gpios();
 
-#ifdef CONFIG_CMD_NAND
+#if defined(CONFIG_CMD_NAND) && !defined(CONFIG_SPL_BUILD)
 	setup_gpmi_nand();
 #endif
 	return 0;
@@ -657,7 +657,7 @@ void board_init_f(ulong dummy)
 		.refr = 7,	/* 8 refresh commands per refresh cycle */
 	};
 
-#ifdef CONFIG_CMD_NAND
+#if defined(CONFIG_CMD_NAND) && !defined(CONFIG_SPL_BUILD)
 	/* Enable NAND */
 	setup_gpmi_nand();
 #endif
diff --git a/configs/pfla02_defconfig b/configs/pfla02_defconfig
index 5e5bbb05bd5e..52cebd9e22ed 100644
--- a/configs/pfla02_defconfig
+++ b/configs/pfla02_defconfig
@@ -37,7 +37,7 @@ CONFIG_SPL_YMODEM_SUPPORT=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
-# CONFIG_CMD_NAND is not set
+CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT4_WRITE=y
diff --git a/include/configs/pfla02.h b/include/configs/pfla02.h
index d4a7de7df6a2..4162a71ca661 100644
--- a/include/configs/pfla02.h
+++ b/include/configs/pfla02.h
@@ -41,15 +41,11 @@
 #define CONFIG_SYS_I2C_MXC_I2C1		/* enable I2C bus 0 */
 #define CONFIG_SYS_I2C_SPEED		  100000
 
-#ifndef CONFIG_SPL_BUILD
-#define CONFIG_CMD_NAND
 /* Enable NAND support */
-#define CONFIG_CMD_NAND_TRIMFFS
 #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
-#endif
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
 
-- 
2.17.1

             reply	other threads:[~2020-05-26 19:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-26 19:06 Tom Rini [this message]
2020-05-26 19:06 ` [PATCH 2/8] mx6memcal: Finish migration to defconfig options Tom Rini
2020-06-02 23:05   ` Eric Nelson
2020-06-04 23:39   ` Tom Rini
2020-05-26 19:06 ` [PATCH 3/8] bcmstb: Migrate CONFIG_CMD_EXT[24] Tom Rini
2020-06-04 23:40   ` Tom Rini
2020-05-26 19:06 ` [PATCH 4/8] blance: Disable CONFIG_CMD_SF / CONFIG_CMD_SPI Tom Rini
2020-05-26 19:21   ` Marek Vasut
2020-05-26 19:26     ` Tom Rini
2020-05-26 20:44       ` Marek Vasut
2020-06-04 23:40   ` [PATCH 4/8] ARM: rmobile: blanche: " Tom Rini
2020-05-26 19:06 ` [PATCH 5/8] topic_miami: Disable GPIO Tom Rini
2020-06-04 23:40   ` Tom Rini
2020-05-26 19:06 ` [PATCH 6/8] Convert CONFIG_BZIP2 et al to Kconfig Tom Rini
2020-06-04 23:40   ` Tom Rini
2020-05-26 19:06 ` [PATCH 7/8] Convert CONFIG_CMD_ASKENV " Tom Rini
2020-06-04 23:40   ` Tom Rini
2020-05-26 19:06 ` [PATCH 8/8] Convert CONFIG_BOARD_LATE_INIT " Tom Rini
2020-06-04 23:40   ` Tom Rini
2020-05-27 10:50 ` [PATCH 1/8] pfla02: Rework excluding NAND from SPL Stefano Babic
2020-06-04 23:39 ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200526190619.29583-1-trini@konsulko.com \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox