cfi_flash: Fix bug in flash_isset() to use correct 32bit function
PATCH 1/1 cfi_flash: Fix bug in flash_isset() to use correct 32bit function
This bug was detected on the LWMON5 target which has 2 Intel 16bit wide flash chips connected to a 32bit wide port.
Signed-off-by Stefan Roese <[email protected]>
--- drivers/mtd/cfi_flash.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mtd/cfi_flash.c +1 -1
@@ -527,7 +527,7 @@ static int flash_isset (flash_info_t * info, flash_sect_t sect, retval = ((flash_read16 (addr) & cword.w) == cword.w);break ;case FLASH_CFI_32BIT : - retval = ((flash_read16 (addr) & cword.l) == cword.l); + retval = ((flash_read32 (addr) & cword.l) == cword.l);break ;case FLASH_CFI_64BIT : retval = ((flash_read64 (addr) & cword.ll) == cword.ll);
Signature · 1 line
1.5.4.rc2
PATCH 1/1 cfi_flash: Fix bug in flash_isset() to use correct 32bit function
Quoted 13 lines · In message <[email protected]> you wrote:
This bug was detected on the LWMON5 target which has 2 Intel 16bit wide flash chips connected to a 32bit wide port.
Signed-off-by Stefan Roese <[email protected]>--- drivers/mtd/cfi_flash.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/mtd/cfi_flash.c +0
-0
drivers/mtd/cfi_flash.c static int flash_isset (flash_info_t * info, flash_sect_t sect, · line 533
Quoted 8 lines
drivers/mtd/cfi_flash.c +1
-1@@ -527,7 +527,7 @@ static int flash_isset (flash_info_t * info, flash_sect_t sect, retval = ((flash_read16 (addr) & cword.w) == cword.w);break ;case FLASH_CFI_32BIT : - retval = ((flash_read16 (addr) & cword.l) == cword.l); + retval = ((flash_read32 (addr) & cword.l) == cword.l);break ;case FLASH_CFI_64BIT : retval = ((flash_read64 (addr) & cword.ll) == cword.ll);
Checked in, thanks.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de I am more bored than you could ever possibly be. Go back to work.