summaryrefslogtreecommitdiff
path: root/board/esd/cpci750/cpci750.c
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2006-02-08 15:54:15 +0100
committerStefan Roese <sr@denx.de>2006-02-08 15:54:15 +0100
commit79830d591afb758be8556396949d433fee1527c2 (patch)
treee57ce5c733f8bb3952aff54cc96f456c4a606f41 /board/esd/cpci750/cpci750.c
parent48a05a5188e03861da2378c95ba7963d810736aa (diff)
downloadu-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.c17
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;
}