diff options
author | wdenk <wdenk> | 2003-06-26 22:04:09 +0000 |
---|---|---|
committer | wdenk <wdenk> | 2003-06-26 22:04:09 +0000 |
commit | 993cad9364c6b87ae429d1ed1130d8153f6f027e (patch) | |
tree | 43faaa643caeaacec331db78850a5a4834bad354 /board/netvia/flash.c | |
parent | b783edaee8252bfdba3f7b3fd29519a81ce71e42 (diff) | |
download | u-boot-imx-993cad9364c6b87ae429d1ed1130d8153f6f027e.zip u-boot-imx-993cad9364c6b87ae429d1ed1130d8153f6f027e.tar.gz u-boot-imx-993cad9364c6b87ae429d1ed1130d8153f6f027e.tar.bz2 |
* Patches by Robert Schwebel, 26 Jun 2003:
- logdl
- csb226
- innokom
* Patch by Pantelis Antoniou, 25 Jun 2003:
update NetVia with V2 board support
Diffstat (limited to 'board/netvia/flash.c')
-rw-r--r-- | board/netvia/flash.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/board/netvia/flash.c b/board/netvia/flash.c index 669031f..d31f770 100644 --- a/board/netvia/flash.c +++ b/board/netvia/flash.c @@ -44,11 +44,8 @@ unsigned long flash_init(void) int i; /* Init: no FLASHes known */ - for (i = 0; i < CFG_MAX_FLASH_BANKS; ++i) { + for (i = 0; i < CFG_MAX_FLASH_BANKS; ++i) flash_info[i].flash_id = FLASH_UNKNOWN; - } - - /* Static FLASH Bank configuration here - FIXME XXX */ size = flash_get_size((vu_long *) FLASH_BASE0_PRELIM, &flash_info[0]); @@ -66,7 +63,22 @@ unsigned long flash_init(void) flash_get_offsets(CFG_FLASH_BASE, &flash_info[0]); /* monitor protection ON by default */ - flash_protect(FLAG_PROTECT_SET, CFG_FLASH_BASE, CFG_FLASH_BASE + monitor_flash_len - 1, &flash_info[0]); + flash_protect(FLAG_PROTECT_SET, + CFG_FLASH_BASE, CFG_FLASH_BASE + monitor_flash_len - 1, + &flash_info[0]); + + flash_protect ( FLAG_PROTECT_SET, + CFG_ENV_ADDR, + CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + &flash_info[0]); + +#ifdef CFG_ENV_ADDR_REDUND + flash_protect ( FLAG_PROTECT_SET, + CFG_ENV_ADDR_REDUND, + CFG_ENV_ADDR_REDUND + CFG_ENV_SIZE_REDUND - 1, + &flash_info[0]); +#endif + flash_info[0].size = size; |