1 --- a/drivers/mtd/chips/cfi_cmdset_0002.c
2 +++ b/drivers/mtd/chips/cfi_cmdset_0002.c
3 @@ -1079,6 +1079,9 @@ static int __xipram do_write_oneword(str
11 spin_lock(chip->mutex);
12 ret = get_chip(map, chip, adr, FL_WRITING);
13 @@ -1361,7 +1364,11 @@ static int __xipram do_write_buffer(stru
15 while(z < words * map_bankwidth(map)) {
16 datum = map_word_load(map, buf);
18 + map_write(map, datum, (adr + z) ^ 0x2);
20 map_write(map, datum, adr + z);
23 z += map_bankwidth(map);
24 buf += map_bankwidth(map);
25 @@ -1606,6 +1613,9 @@ static int __xipram do_erase_oneblock(st
33 spin_lock(chip->mutex);
34 ret = get_chip(map, chip, adr, FL_ERASING);
35 @@ -1734,6 +1744,10 @@ static int do_atmel_lock(struct map_info
36 struct cfi_private *cfi = map->fldrv_priv;
43 spin_lock(chip->mutex);
44 ret = get_chip(map, chip, adr + chip->start, FL_LOCKING);
46 @@ -1770,6 +1784,10 @@ static int do_atmel_unlock(struct map_in
47 struct cfi_private *cfi = map->fldrv_priv;
54 spin_lock(chip->mutex);
55 ret = get_chip(map, chip, adr + chip->start, FL_UNLOCKING);