aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTokunori Ikegami <[email protected]>2018-05-30 18:32:26 +0900
committerBoris Brezillon <[email protected]>2018-05-30 21:38:19 +0200
commitdfeae1073583dc35c33b32150e18b7048bbb37e6 (patch)
treeb5071244de7a053033861d2692bd75c4370fd64b
parent34c819073c8b8b652ced18e53bd2b0332dbe29cf (diff)
mtd: cfi_cmdset_0002: Change write buffer to check correct value
For the word write it is checked if the chip has the correct value. But it is not checked for the write buffer as only checked if ready. To make sure for the write buffer change to check the value. It is enough as this patch is only checking the last written word. Since it is described by data sheets to check the operation status. Signed-off-by: Tokunori Ikegami <[email protected]> Reviewed-by: Joakim Tjernlund <[email protected]> Cc: Chris Packham <[email protected]> Cc: Brian Norris <[email protected]> Cc: David Woodhouse <[email protected]> Cc: Boris Brezillon <[email protected]> Cc: Marek Vasut <[email protected]> Cc: Richard Weinberger <[email protected]> Cc: Cyrille Pitchen <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Boris Brezillon <[email protected]>
-rw-r--r--drivers/mtd/chips/cfi_cmdset_0002.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
index bd0c30ad8ee7..75d2c16029fd 100644
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -1879,7 +1879,7 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip,
if (time_after(jiffies, timeo) && !chip_ready(map, adr))
break;
- if (chip_ready(map, adr)) {
+ if (chip_good(map, adr, datum)) {
xip_enable(map, chip, adr);
goto op_done;
}