Patchwork [U-Boot,14/28] Blackfin: bf561-ezkit/ibf-dsp561: invert env offset/addr logic

login
register
mail settings
Submitter Mike Frysinger
Date Dec. 27, 2010, 4:48 a.m.
Message ID <1293425300-27644-15-git-send-email-vapier@gentoo.org>
Download mbox | patch
Permalink /patch/76743/
State Accepted
Commit d2ab733c0585cb58983eadb82b2be7127e437fd9
Delegated to: Mike Frysinger
Headers show

Comments

Mike Frysinger - Dec. 27, 2010, 4:48 a.m.
Have CONFIG_ENV_ADDR be based on CONFIG_ENV_OFFSET rather than the other
way around so that we can use CONFIG_ENV_OFFSET during build.  It also
avoids a little address duplication.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 include/configs/bf561-ezkit.h |    4 ++--
 include/configs/ibf-dsp561.h  |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

Patch

diff --git a/include/configs/bf561-ezkit.h b/include/configs/bf561-ezkit.h
index 7081d5f..33c7e18 100644
--- a/include/configs/bf561-ezkit.h
+++ b/include/configs/bf561-ezkit.h
@@ -80,8 +80,8 @@ 
 #define CONFIG_SYS_MAX_FLASH_SECT	135
 /* The BF561-EZKIT uses a top boot flash */
 #define CONFIG_ENV_IS_IN_FLASH	1
-#define CONFIG_ENV_ADDR		0x20004000
-#define CONFIG_ENV_OFFSET	(CONFIG_ENV_ADDR - CONFIG_SYS_FLASH_BASE)
+#define CONFIG_ENV_OFFSET	0x4000
+#define CONFIG_ENV_ADDR		(CONFIG_SYS_FLASH_BASE + CONFIG_ENV_OFFSET)
 #define CONFIG_ENV_SIZE		0x2000
 #define CONFIG_ENV_SECT_SIZE	0x10000
 #if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_BYPASS)
diff --git a/include/configs/ibf-dsp561.h b/include/configs/ibf-dsp561.h
index f3d6c8b..055f8a0 100644
--- a/include/configs/ibf-dsp561.h
+++ b/include/configs/ibf-dsp561.h
@@ -80,8 +80,8 @@ 
 #define CONFIG_SYS_MAX_FLASH_SECT	135	/* max number of sectors on one chip */
 /* The BF561-EZKIT uses a top boot flash */
 #define CONFIG_ENV_IS_IN_FLASH	1
-#define CONFIG_ENV_ADDR		0x20004000
-#define CONFIG_ENV_OFFSET		(CONFIG_ENV_ADDR - CONFIG_SYS_FLASH_BASE)
+#define CONFIG_ENV_OFFSET		0x4000
+#define CONFIG_ENV_ADDR		(CONFIG_SYS_FLASH_BASE + CONFIG_ENV_OFFSET)
 #define CONFIG_ENV_SIZE		0x2000
 #define CONFIG_ENV_SECT_SIZE	0x10000	/* Total Size of Environment Sector */
 #if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_BYPASS)