summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorwdenk <wdenk>2004-09-28 19:00:19 +0000
committerwdenk <wdenk>2004-09-28 19:00:19 +0000
commitcce625e557416d06aeddaab0967b3119748cd21e (patch)
treef401a0729c8fab8c58cd3b2f55b6205e1d6e77bc /drivers
parent66ca92a5ba882807ba8ed8f772c0fc22b25976cc (diff)
* Patch by Stephen Williams, 15 July 2004
Set the PCI class code for JSE board as part of PCI interface setup * Patch by Michael Bendzick, 15 Jul 2004: Fix problem with writes with odd sizes in drivers/cfi_flash.c when CFG_FLASH_USE_BUFFER_WRITE is set
Diffstat (limited to 'drivers')
-rw-r--r--drivers/cfi_flash.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/cfi_flash.c b/drivers/cfi_flash.c
index e89f975ce66..cd22d60daa2 100644
--- a/drivers/cfi_flash.c
+++ b/drivers/cfi_flash.c
@@ -517,6 +517,7 @@ int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt)
i = buffered_size > cnt ? cnt : buffered_size;
if ((rc = flash_write_cfibuffer (info, wp, src, i)) != ERR_OK)
return rc;
+ i -= (i % info->portwidth);
wp += i;
src += i;
cnt -= i;
@@ -1231,5 +1232,5 @@ static int flash_write_cfibuffer (flash_info_t * info, ulong dest, uchar * cp,
flash_write_cmd (info, sector, 0, FLASH_CMD_CLEAR_STATUS);
return retcode;
}
-#endif /* CFG_USE_FLASH_BUFFER_WRITE */
+#endif /* CFG_FLASH_USE_BUFFER_WRITE */
#endif /* CFG_FLASH_CFI */