]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00258733 WEIM-NOR: mtd: cfi_cmdset_0002: Do not release the mutex lock
authorHuang Shijie <b32955@freescale.com>
Fri, 12 Apr 2013 07:33:11 +0000 (15:33 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Mon, 16 Jun 2014 15:17:19 +0000 (17:17 +0200)
The NOR(M29W256GL7AN6E) may suffers a write-buffer timeout during
the bonnie++/ubifs stress test. Micron has confirmed that it is
a silicon bug in the Nor.

This patch is just a workaround to fix this issue for this NOR.

With this patch, the read/write/erase will do in the synchronous way.

Signed-off-by: Huang Shijie <b32955@freescale.com>
drivers/mtd/chips/cfi_cmdset_0002.c

index e21fde9d4d7e2d07ff8bc5d86bae597e69d1da17..fe88ba3ac92d0f462d0df0ccebd551b4254f98c9 100644 (file)
@@ -1053,17 +1053,13 @@ static void __xipram xip_udelay(struct map_info *map, struct flchip *chip,
 
 #define UDELAY(map, chip, adr, usec)  \
 do {  \
-       mutex_unlock(&chip->mutex);  \
        cfi_udelay(usec);  \
-       mutex_lock(&chip->mutex);  \
 } while (0)
 
 #define INVALIDATE_CACHE_UDELAY(map, chip, adr, len, usec)  \
 do {  \
-       mutex_unlock(&chip->mutex);  \
        INVALIDATE_CACHED_RANGE(map, adr, len);  \
        cfi_udelay(usec);  \
-       mutex_lock(&chip->mutex);  \
 } while (0)
 
 #endif