Ever since the CFI driver was rewritten to use virtual addresses, thus
eliminating the whole point of the map_physmem() macro, ATNGW100 has
been broken like this:

U-Boot> saveenv
Saving Environment to Flash...
Error: start and/or end address not on sector boundary

So let's take a different approach and store the virtual address in
CONFIG_ENV_ADDR. I personally believe that's rubbish and will break
whenever we decide to change the virtual-to-physical mapping in any way,
but it looks like it's the direction in which u-boot is currently
moving, and it does fix the problem.

Signed-off-by: Haavard Skinnemoen <haavard.skinnem...@atmel.com>
---
 include/configs/atngw100.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/configs/atngw100.h b/include/configs/atngw100.h
index 4ed5514..9777ec0 100644
--- a/include/configs/atngw100.h
+++ b/include/configs/atngw100.h
@@ -155,7 +155,7 @@
 
 #define CONFIG_ENV_IS_IN_FLASH         1
 #define CONFIG_ENV_SIZE                        65536
-#define CONFIG_ENV_ADDR                        (CONFIG_SYS_FLASH_BASE + 
CONFIG_SYS_FLASH_SIZE - CONFIG_ENV_SIZE)
+#define CONFIG_ENV_ADDR                        (0xa0000000 + 
CONFIG_SYS_FLASH_SIZE - CONFIG_ENV_SIZE)
 
 #define CONFIG_SYS_INIT_SP_ADDR                (CONFIG_SYS_INTRAM_BASE + 
CONFIG_SYS_INTRAM_SIZE)
 
-- 
1.6.0.4

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to