mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
mtd: cfi_cmdset_0002: Change erase one block to enable XIP once
To enable XIP it is executed both normal and error cases. This call can be moved after the for loop as same with erase chip. 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] Signed-off-by: Boris Brezillon <[email protected]>
This commit is contained in:
parent
79ca484b61
commit
c64d4419a1
1 changed files with 2 additions and 4 deletions
|
|
@ -2389,13 +2389,10 @@ static int __xipram do_erase_oneblock(struct map_info *map, struct flchip *chip,
|
|||
chip->erase_suspended = 0;
|
||||
}
|
||||
|
||||
if (chip_good(map, adr, map_word_ff(map))) {
|
||||
xip_enable(map, chip, adr);
|
||||
if (chip_good(map, adr, map_word_ff(map)))
|
||||
break;
|
||||
}
|
||||
|
||||
if (time_after(jiffies, timeo)) {
|
||||
xip_enable(map, chip, adr);
|
||||
printk(KERN_WARNING "MTD %s(): software timeout\n",
|
||||
__func__);
|
||||
ret = -EIO;
|
||||
|
|
@ -2418,6 +2415,7 @@ static int __xipram do_erase_oneblock(struct map_info *map, struct flchip *chip,
|
|||
}
|
||||
|
||||
chip->state = FL_READY;
|
||||
xip_enable(map, chip, adr);
|
||||
DISABLE_VPP(map);
|
||||
put_chip(map, chip, adr);
|
||||
mutex_unlock(&chip->mutex);
|
||||
|
|
|
|||
Loading…
Reference in a new issue