From d407bf52b5dfb96816969c126f14b35df1f233ae Mon Sep 17 00:00:00 2001 From: wdenk Date: Mon, 11 Oct 2004 22:51:13 +0000 Subject: * Patch by Philippe Robin, 28 Sept 2004: Fix Flash support for Versatile. * Patch by Roger Blofeld, 16 Sep 2004: Fix timeout for DHCP command retry --- include/configs/versatile.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'include/configs/versatile.h') diff --git a/include/configs/versatile.h b/include/configs/versatile.h index 49d72518f5..16db43bb93 100644 --- a/include/configs/versatile.h +++ b/include/configs/versatile.h @@ -96,7 +96,7 @@ #define CFG_SERIAL0 0x101F1000 #define CFG_SERIAL1 0x101F2000 -#define CONFIG_COMMANDS (CFG_CMD_DHCP | CFG_CMD_IMI | CFG_CMD_NET | CFG_CMD_PING | CFG_CMD_BDI | CFG_CMD_MEMORY) +#define CONFIG_COMMANDS (CFG_CMD_DHCP | CFG_CMD_IMI | CFG_CMD_NET | CFG_CMD_PING | CFG_CMD_BDI | CFG_CMD_MEMORY | CFG_CMD_FLASH | CFG_CMD_ENV) /*#define CONFIG_COMMANDS (CFG_CMD_IMI | CFG_CMD_BDI | CFG_CMD_MEMORY) */ @@ -155,15 +155,25 @@ /*----------------------------------------------------------------------- * FLASH and environment organization */ -#define CFG_ENV_IS_NOWHERE + +#define VERSATILE_SYS_BASE 0x10000000 +#define VERSATILE_SYS_FLASH_OFFSET 0x4C +#define VERSATILE_FLASHCTRL (VERSATILE_SYS_BASE + VERSATILE_SYS_FLASH_OFFSET) +#define VERSATILE_FLASHPROG_FLVPPEN (1 << 0) /* Enable writing to flash */ + #define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */ #define PHYS_FLASH_SIZE 0x34000000 /* 64MB */ /* timeout values are in ticks */ #define CFG_FLASH_ERASE_TOUT (20*CFG_HZ) /* Timeout for Flash Erase */ #define CFG_FLASH_WRITE_TOUT (20*CFG_HZ) /* Timeout for Flash Write */ -#define CFG_MAX_FLASH_SECT 128 -#define CFG_ENV_SIZE 32768 +#define CFG_MAX_FLASH_SECT (256) #define PHYS_FLASH_1 (CFG_FLASH_BASE) +#define CFG_ENV_IS_IN_FLASH 1 /* env in flash instead of CFG_ENV_IS_NOWHERE */ +#define CFG_ENV_SECT_SIZE 0x00020000 /* 256 KB sectors (x2) */ +#define CFG_ENV_SIZE 0x10000 /* Total Size of Environment Sector */ +#define CFG_ENV_OFFSET 0x01f00000 /* environment starts here */ +#define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) + #endif /* __CONFIG_H */ -- cgit v1.2.1