Re: [U-Boot-Users] Bug in StrataFlash drivers

Do you have a spoecific test case that shows the presence of the bug?
I experience the problem when trying to store in Flash my ramdisk image that is 1502693 bytes.
This will probably also happen with smaller size?
Yes, I think it will happen with any odd-sized files.
And can you please provide a proper patch, with CHANGELOG entry, Signed-off-by line and everything?
See attached file.
ChangeLog: * Patch by Andrea Marson, 11 November 2005: Fixed odd-sized images writing in Zefeer StrataFlash driver.
Signed-off-by: Andrea Marson r&d2@dave-tech.it
Best regards, llandre
DAVE Electronics System House - R&D Department web: http://www.dave-tech.it email: r&d2@dave-tech.it
diff --git a/board/dave/ZefeerEVB/flashmem.c b/board/dave/ZefeerEVB/flashmem.c --- a/board/dave/ZefeerEVB/flashmem.c +++ b/board/dave/ZefeerEVB/flashmem.c @@ -810,12 +810,14 @@ static int flash_write_cfibuffer(flash_i "write to buffer")) == ERR_OK) { switch(info->portwidth) { case FLASH_CFI_8BIT: cnt = len; break; - case FLASH_CFI_16BIT: + case FLASH_CFI_16BIT: cnt = len >> 1; + if (len % 2) + cnt += 1; break; case FLASH_CFI_32BIT: cnt = len >> 2; break; default:

Dear Andrea,
in message 437471DE.9070607@dave-tech.it you wrote:
ChangeLog:
- Patch by Andrea Marson, 11 November 2005:
Fixed odd-sized images writing in Zefeer StrataFlash driver.
Sorry, I cannot apply this patch:
--- a/board/dave/ZefeerEVB/flashmem.c +++ b/board/dave/ZefeerEVB/flashmem.c
There is no such file in the U-Boot source tree...
Best regards,
Wolfgang Denk
participants (2)
-
llandre
-
Wolfgang Denk