diff options
author | Wolfgang Denk <wd@denx.de> | 2012-03-23 21:59:16 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2012-03-23 21:59:16 +0100 |
commit | 7cb30b13f12077c7eec8ce2419cd96cd65ace8e2 (patch) | |
tree | 0d959891892c98e42951657e4192b96618a73288 /drivers | |
parent | 636f77a5a6cd40581a9faf16c0fa748e30c48ade (diff) | |
parent | 85c344e5f98408c0bcf988a6c6fca68c1f3c2015 (diff) | |
download | u-boot-imx-7cb30b13f12077c7eec8ce2419cd96cd65ace8e2.zip u-boot-imx-7cb30b13f12077c7eec8ce2419cd96cd65ace8e2.tar.gz u-boot-imx-7cb30b13f12077c7eec8ce2419cd96cd65ace8e2.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-cfi-flash
* 'master' of git://git.denx.de/u-boot-cfi-flash:
cfi: fix the incomplete erased status check in buffer write
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/cfi_flash.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index 722c3fc..35294bc 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -873,7 +873,7 @@ static int flash_write_cfibuffer (flash_info_t * info, ulong dest, uchar * cp, void *src = cp; void *dst = (void *)dest; void *dst2 = dst; - int flag = 0; + int flag = 1; uint offset = 0; unsigned int shift; uchar write_cmd; @@ -898,7 +898,7 @@ static int flash_write_cfibuffer (flash_info_t * info, ulong dest, uchar * cp, cnt = len >> shift; - while ((cnt-- > 0) && (flag == 0)) { + while ((cnt-- > 0) && (flag == 1)) { switch (info->portwidth) { case FLASH_CFI_8BIT: flag = ((flash_read8(dst2) & flash_read8(src)) == |