diff options
author | Jon Loeliger <jdl@freescale.com> | 2008-06-06 10:48:31 -0500 |
---|---|---|
committer | Jon Loeliger <jdl@freescale.com> | 2008-06-06 10:48:31 -0500 |
commit | 1a247ba7fa5fb09f56892a09a990f03ce564b3e2 (patch) | |
tree | 9dab0ef013cc6dc7883454808ecf6ba4d7a7a94e /board/gen860t/flash.c | |
parent | 2c289e320dcfb3760e99cf1d765cb067194a1202 (diff) | |
parent | 8155efbd7ae9c65564ca98affe94631d612ae088 (diff) | |
download | u-boot-imx-1a247ba7fa5fb09f56892a09a990f03ce564b3e2.zip u-boot-imx-1a247ba7fa5fb09f56892a09a990f03ce564b3e2.tar.gz u-boot-imx-1a247ba7fa5fb09f56892a09a990f03ce564b3e2.tar.bz2 |
Merge commit 'wd/master'
Diffstat (limited to 'board/gen860t/flash.c')
-rw-r--r-- | board/gen860t/flash.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/board/gen860t/flash.c b/board/gen860t/flash.c index ec32d07..13faaf3 100644 --- a/board/gen860t/flash.c +++ b/board/gen860t/flash.c @@ -156,9 +156,9 @@ flash_init (void) * Monitor protection is ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_MONITOR_BASE, - CFG_MONITOR_BASE + monitor_flash_len - 1, - &flash_info[0]); + CFG_MONITOR_BASE, + CFG_MONITOR_BASE + monitor_flash_len - 1, + &flash_info[0]); #endif #ifdef CFG_ENV_IS_IN_FLASH @@ -166,9 +166,9 @@ flash_init (void) * Environment protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SECT_SIZE - 1, - &flash_info[0]); + CFG_ENV_ADDR, + CFG_ENV_ADDR + CFG_ENV_SECT_SIZE - 1, + &flash_info[0]); #endif PRINTF("## Final Flash bank size: 0x%08lx\n",size_b0); @@ -190,14 +190,14 @@ flash_get_offsets (ulong base, flash_info_t *info) switch (info->flash_id & FLASH_VENDMASK) { case FLASH_MAN_INTEL: - for (i = 0; i < info->sector_count; i++) { + for (i = 0; i < info->sector_count; i++) { info->start[i] = base; base += 1024 * 128; - } - return; + } + return; default: - printf ("Don't know sector offsets for FLASH" + printf ("Don't know sector offsets for FLASH" " type 0x%lx\n", info->flash_id); return; } @@ -436,7 +436,7 @@ write_flash_buffer8(flash_info_t *info_p, vu_char *src_p, vu_char *dest_p, * We assume that the block does not cross a boundary (we'll check before * calling this function). */ - for (i = 0; i < info_p->sector_count; ++i) { + for (i = 0; i < info_p->sector_count; ++i) { if ( ((ulong)dest_p >= info_p->start[i]) && ((ulong)dest_p < (info_p->start[i] + blocksize)) ) { PRINTF("%s:%d: Dest addr 0x%p is in block %d @ 0x%.8lx\n", |