public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] flash: Fix CFI buffer size bug
@ 2009-08-12 15:55 John Schmoller
  2009-08-13  7:32 ` Stefan Roese
  0 siblings, 1 reply; 2+ messages in thread
From: John Schmoller @ 2009-08-12 15:55 UTC (permalink / raw)
  To: u-boot

Fix bug introduced by 9c048b523413ae5f3ff34e00cf57569c3368ab51.

The cfi_flash.c driver cast the flash buffer size to a uchar in
flash_write_cfibuffer(). On some flash parts, (tested on Numonyx
part PC32F512M29EWH), the buffer size is 1KB. Remove the cast to
uchar to enable buffer sizes to be larger.

Signed-off-by: John Schmoller <jschmoller@xes-inc.com>
---
 drivers/mtd/cfi_flash.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index 12647ef..1152629 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -971,7 +971,7 @@ static int flash_write_cfibuffer (flash_info_t * info, ulong dest, uchar * cp,
 #endif
 		flash_write_cmd(info, sector, offset, AMD_CMD_WRITE_TO_BUFFER);
 		cnt = len >> shift;
-		flash_write_cmd(info, sector, offset, (uchar)cnt - 1);
+		flash_write_cmd(info, sector, offset, cnt - 1);
 
 		switch (info->portwidth) {
 		case FLASH_CFI_8BIT:
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH] flash: Fix CFI buffer size bug
  2009-08-12 15:55 [U-Boot] [PATCH] flash: Fix CFI buffer size bug John Schmoller
@ 2009-08-13  7:32 ` Stefan Roese
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Roese @ 2009-08-13  7:32 UTC (permalink / raw)
  To: u-boot

On Wednesday 12 August 2009 17:55:47 John Schmoller wrote:
> Fix bug introduced by 9c048b523413ae5f3ff34e00cf57569c3368ab51.
>
> The cfi_flash.c driver cast the flash buffer size to a uchar in
> flash_write_cfibuffer(). On some flash parts, (tested on Numonyx
> part PC32F512M29EWH), the buffer size is 1KB. Remove the cast to
> uchar to enable buffer sizes to be larger.
>
> Signed-off-by: John Schmoller <jschmoller@xes-inc.com>

Applied to cfi-flash/master. Thanks.

Cheers,
Stefan

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-08-13  7:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-12 15:55 [U-Boot] [PATCH] flash: Fix CFI buffer size bug John Schmoller
2009-08-13  7:32 ` Stefan Roese

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox