diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2006-02-22 14:15:41 -0600 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2006-02-22 14:15:41 -0600 |
commit | 79582020313e6d992a3bac71cf3a9b337f9ac7f7 (patch) | |
tree | 5eefe0c7b244ffd0798e64f9a83ec7084032a816 /board/esd/cpci750/cpci750.c | |
parent | 230b31febf39f9d9f19679cf0112d9e30415122d (diff) | |
parent | 6624b687bc2b747233090e67628df37d1c84ed17 (diff) | |
download | u-boot-imx-79582020313e6d992a3bac71cf3a9b337f9ac7f7.zip u-boot-imx-79582020313e6d992a3bac71cf3a9b337f9ac7f7.tar.gz u-boot-imx-79582020313e6d992a3bac71cf3a9b337f9ac7f7.tar.bz2 |
Merge rsync://rsync.denx.de/git/u-boot
Diffstat (limited to 'board/esd/cpci750/cpci750.c')
-rw-r--r-- | board/esd/cpci750/cpci750.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/board/esd/cpci750/cpci750.c b/board/esd/cpci750/cpci750.c index e4b062b..fd0f904 100644 --- a/board/esd/cpci750/cpci750.c +++ b/board/esd/cpci750/cpci750.c @@ -56,6 +56,7 @@ extern void flush_data_cache (void); extern void invalidate_l1_instruction_cache (void); +extern flash_info_t flash_info[]; /* ------------------------------------------------------------------------- */ @@ -363,6 +364,22 @@ int misc_init_r () /* disable the dcache and MMU */ dcache_lock (); #endif + if (flash_info[3].size < CFG_FLASH_INCREMENT) { + unsigned int flash_offset; + unsigned int l; + + flash_offset = CFG_FLASH_INCREMENT - flash_info[3].size; + for (l = 0; l < CFG_MAX_FLASH_SECT; l++) { + if (flash_info[3].start[l] != 0) { + flash_info[3].start[l] += flash_offset; + } + } + flash_protect (FLAG_PROTECT_SET, + CFG_MONITOR_BASE, + CFG_MONITOR_BASE + monitor_flash_len - 1, + &flash_info[3]); + + } return 0; } |