Patchwork [U-Boot,1/2] mx28evk: Guard NAND-related ENV defines with CONFIG_ENV_IS_IN_NAND

login
register
mail settings
Submitter Tom Rini
Date April 30, 2013, 8:05 p.m.
Message ID <1367352318-11708-1-git-send-email-trini@ti.com>
Download mbox | patch
Permalink /patch/240684/
State Accepted
Delegated to: Tom Rini
Headers show

Comments

Tom Rini - April 30, 2013, 8:05 p.m.
The redundancy related defines are only correct for NAND, so guard all
of that area with CONFIG_ENV_IS_IN_NAND

Cc: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Tom Rini <trini@ti.com>
---
 include/configs/mx28evk.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Tom Rini - May 2, 2013, 4:04 p.m.
On Tue, Apr 30, 2013 at 04:05:17PM -0400, Tom Rini wrote:

> The redundancy related defines are only correct for NAND, so guard all
> of that area with CONFIG_ENV_IS_IN_NAND
> 
> Cc: Fabio Estevam <fabio.estevam@freescale.com>
> Signed-off-by: Tom Rini <trini@ti.com>

Along with 2/2 (and typo fix), applied to u-boot/master, thanks!

Patch

diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
index d470b47..3747955 100644
--- a/include/configs/mx28evk.h
+++ b/include/configs/mx28evk.h
@@ -138,14 +138,14 @@ 
 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
 
 /* Environment is in NAND */
+#ifdef CONFIG_ENV_IS_IN_NAND
 #define CONFIG_ENV_SIZE_REDUND		CONFIG_ENV_SIZE
 #define CONFIG_ENV_SECT_SIZE		(128 * 1024)
 #define CONFIG_ENV_RANGE		(512 * 1024)
-#ifndef CONFIG_ENV_OFFSET
 #define CONFIG_ENV_OFFSET		0x300000
-#endif
 #define CONFIG_ENV_OFFSET_REDUND	\
 		(CONFIG_ENV_OFFSET + CONFIG_ENV_RANGE)
+#endif
 
 #define CONFIG_CMD_UBI
 #define CONFIG_CMD_UBIFS