summaryrefslogtreecommitdiffstats
path: root/board/esd/cpci750/cpci750.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.(none)>2006-02-21 16:41:43 +0100
committerWolfgang Denk <wd@pollux.(none)>2006-02-21 16:41:43 +0100
commit654c2d2836ff49c94a0bceb700701976e2682375 (patch)
treeb48b6863cd3a672d4e6da6dfb4953decd68e8d66 /board/esd/cpci750/cpci750.c
parent84e106c09d324e345f335d2edef246d0b4c9131a (diff)
parent79830d591afb758be8556396949d433fee1527c2 (diff)
downloadu-boot-654c2d2836ff49c94a0bceb700701976e2682375.tar.gz
u-boot-654c2d2836ff49c94a0bceb700701976e2682375.tar.xz
u-boot-654c2d2836ff49c94a0bceb700701976e2682375.zip
Merge with /home/sr/git/u-boot
Diffstat (limited to 'board/esd/cpci750/cpci750.c')
-rw-r--r--board/esd/cpci750/cpci750.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/board/esd/cpci750/cpci750.c b/board/esd/cpci750/cpci750.c
index e4b062bdd0..fd0f904cfe 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;
}