mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
cfi: fix the incomplete erased status check in buffer write
Without the fix, flash_write_cfibuffer will terminate the erased status check once an all-0xFF word has been found instead of continuing the erased status check utill the first non-0xFF word. Signed-off-by: Tao Hou <hotforest@gmail.com> Cc: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
This commit is contained in:
parent
dbb87bbd8e
commit
85c344e5f9
1 changed files with 2 additions and 2 deletions
|
@ -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)) ==
|
||||
|
|
Loading…
Reference in a new issue