X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=board%2Fesd%2Fcpci750%2Fcpci750.c;h=dbed5971738324d24a63f9a750958c117533fb09;hb=f6e5739a68131998a5ae8aa0cf56a0316f810200;hp=68f121d6bfc6962cfa3f30c40d63c09ccd8d9009;hpb=e2ffd59b4d93c9149de1caaa087371b0cfc512c9;p=u-boot diff --git a/board/esd/cpci750/cpci750.c b/board/esd/cpci750/cpci750.c index 68f121d6bf..dbed597173 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,21 @@ 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; } @@ -555,7 +571,7 @@ unsigned long long pattern[] = { int mem_test_data (void) { unsigned long long *pmem = (unsigned long long *) CFG_MEMTEST_START; - unsigned long long temp64; + unsigned long long temp64 = 0; int num_patterns = sizeof (pattern) / sizeof (pattern[0]); int i; unsigned int hi, lo; @@ -662,7 +678,7 @@ int mem_march (volatile unsigned long long *base, unsigned long long wmask, short read, short write) { unsigned int i; - unsigned long long temp; + unsigned long long temp = 0; unsigned int hitemp, lotemp, himask, lomask; for (i = 0; i < size; i++) {