Patchwork [U-Boot,v2,4/7] am335x_evm: Only set CONFIG_NAND when !CONFIG_SPI_BOOT

login
register
mail settings
Submitter Tom Rini
Date May 13, 2013, 6:28 p.m.
Message ID <1368469719-22406-4-git-send-email-trini@ti.com>
Download mbox | patch
Permalink /patch/243486/
State Changes Requested
Delegated to: Tom Rini
Headers show

Comments

Tom Rini - May 13, 2013, 6:28 p.m.
Due to hardware design the board supported by the am335x_evm config
cannot have both NAND and SPI (or NOR) enabled at the same time due to
conflicts.  Disable the NAND SW stack when we know we can't have it
present.

Signed-off-by: Tom Rini <trini@ti.com>

---
Changes in v2:
- Reword commit message
---
 include/configs/am335x_evm.h |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
Peter Korsgaard - May 15, 2013, 8:42 p.m.
>>>>> "Tom" == Tom Rini <trini@ti.com> writes:

 Tom> Due to hardware design the board supported by the am335x_evm config
 Tom> cannot have both NAND and SPI (or NOR) enabled at the same time due to
 Tom> conflicts.  Disable the NAND SW stack when we know we can't have it
 Tom> present.

 Tom> Signed-off-by: Tom Rini <trini@ti.com>

Reviewed-by: Peter Korsgaard <jacmet@sunsite.dk>

 Tom> ---
 Tom> Changes in v2:
 Tom> - Reword commit message

Thanks!

Patch

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 15822b4..3df0840 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -230,7 +230,9 @@ 
 /* USB Device Firmware Update support */
 #define CONFIG_DFU_FUNCTION
 #define CONFIG_DFU_MMC
+#ifdef CONFIG_NAND
 #define CONFIG_DFU_NAND
+#endif
 #define CONFIG_CMD_DFU
 #define DFU_ALT_INFO_MMC \
 	"boot part 0 1;" \
@@ -335,11 +337,13 @@ 
 #define CONFIG_SPL_LDSCRIPT		"$(CPUDIR)/am33xx/u-boot-spl.lds"
 
 #define CONFIG_SPL_BOARD_INIT
+#ifdef CONFIG_NAND
 #define CONFIG_SPL_NAND_AM33XX_BCH
 #define CONFIG_SPL_NAND_SUPPORT
 #define CONFIG_SPL_NAND_BASE
 #define CONFIG_SPL_NAND_DRIVERS
 #define CONFIG_SPL_NAND_ECC
+#endif
 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
 #define CONFIG_SYS_NAND_PAGE_COUNT	(CONFIG_SYS_NAND_BLOCK_SIZE / \
 					 CONFIG_SYS_NAND_PAGE_SIZE)
@@ -464,7 +468,10 @@ 
 #define CONFIG_PHY_ADDR			0
 #define CONFIG_PHY_SMSC
 
+#if !defined(CONFIG_SPI_BOOT)
 #define CONFIG_NAND
+#endif
+
 /* NAND support */
 #ifdef CONFIG_NAND
 #define CONFIG_CMD_NAND
@@ -482,11 +489,9 @@ 
 							/* CS0 */
 #define CONFIG_SYS_MAX_NAND_DEVICE	1		/* Max number of NAND
 							   devices */
-#if !defined(CONFIG_SPI_BOOT)
 #define CONFIG_ENV_IS_IN_NAND
 #define CONFIG_ENV_OFFSET		0x260000 /* environment starts here */
 #define CONFIG_SYS_ENV_SECT_SIZE	(128 << 10)	/* 128 KiB */
 #endif
-#endif
 
 #endif	/* ! __CONFIG_AM335X_EVM_H */