diff options
author | Stefan Roese <sr@denx.de> | 2006-02-08 15:54:15 +0100 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2006-02-08 15:54:15 +0100 |
commit | 79830d591afb758be8556396949d433fee1527c2 (patch) | |
tree | e57ce5c733f8bb3952aff54cc96f456c4a606f41 /board/esd/cpci750/cpci750.c | |
parent | 48a05a5188e03861da2378c95ba7963d810736aa (diff) | |
download | u-boot-imx-79830d591afb758be8556396949d433fee1527c2.zip u-boot-imx-79830d591afb758be8556396949d433fee1527c2.tar.gz u-boot-imx-79830d591afb758be8556396949d433fee1527c2.tar.bz2 |
Convert CPCI750 to use common CFI flash driver
Patch by Reinhard Arlt, 8 Feb 2006
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; } |