From cce625e557416d06aeddaab0967b3119748cd21e Mon Sep 17 00:00:00 2001 From: wdenk Date: Tue, 28 Sep 2004 19:00:19 +0000 Subject: * 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 --- drivers/cfi_flash.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/cfi_flash.c b/drivers/cfi_flash.c index e89f975..cd22d60 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 */ -- cgit v1.1