]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
cfi_flash: Fix bug in flash_isset() to use correct 32bit function
authorStefan Roese <sr@denx.de>
Wed, 2 Jan 2008 13:06:26 +0000 (14:06 +0100)
committerWolfgang Denk <wd@denx.de>
Wed, 2 Jan 2008 15:07:01 +0000 (16:07 +0100)
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 <sr@denx.de>
drivers/mtd/cfi_flash.c

index d1124d3439e1d083cd7cc7de44df5a6c1603d3bb..4f61e365e84ec448e2e1a02d0ab4443fe3f37ef1 100644 (file)
@@ -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);