diff options
author | David Woodhouse <dwmw2@infradead.org> | 2008-02-03 02:29:41 -0500 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2008-02-03 02:30:32 -0500 |
commit | c1f3ee120bb61045b1c0a3ead620d1d65af47130 (patch) | |
tree | 908430bf2b47fe8e96ac623ae7ab6dd5698d0938 /drivers/mtd/chips | |
parent | e619a75ff6201b567a539e787aa9af9bc63a3187 (diff) | |
parent | 9135f1901ee6449dfe338adf6e40e9c2025b8150 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'drivers/mtd/chips')
-rw-r--r-- | drivers/mtd/chips/cfi_cmdset_0001.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c index 8189adfefaef..47794d23a42e 100644 --- a/drivers/mtd/chips/cfi_cmdset_0001.c +++ b/drivers/mtd/chips/cfi_cmdset_0001.c | |||
@@ -1568,9 +1568,12 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip, | |||
1568 | int ret, wbufsize, word_gap, words; | 1568 | int ret, wbufsize, word_gap, words; |
1569 | const struct kvec *vec; | 1569 | const struct kvec *vec; |
1570 | unsigned long vec_seek; | 1570 | unsigned long vec_seek; |
1571 | unsigned long initial_adr; | ||
1572 | int initial_len = len; | ||
1571 | 1573 | ||
1572 | wbufsize = cfi_interleave(cfi) << cfi->cfiq->MaxBufWriteSize; | 1574 | wbufsize = cfi_interleave(cfi) << cfi->cfiq->MaxBufWriteSize; |
1573 | adr += chip->start; | 1575 | adr += chip->start; |
1576 | initial_adr = adr; | ||
1574 | cmd_adr = adr & ~(wbufsize-1); | 1577 | cmd_adr = adr & ~(wbufsize-1); |
1575 | 1578 | ||
1576 | /* Let's determine this according to the interleave only once */ | 1579 | /* Let's determine this according to the interleave only once */ |
@@ -1583,7 +1586,7 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip, | |||
1583 | return ret; | 1586 | return ret; |
1584 | } | 1587 | } |
1585 | 1588 | ||
1586 | XIP_INVAL_CACHED_RANGE(map, adr, len); | 1589 | XIP_INVAL_CACHED_RANGE(map, initial_adr, initial_len); |
1587 | ENABLE_VPP(map); | 1590 | ENABLE_VPP(map); |
1588 | xip_disable(map, chip, cmd_adr); | 1591 | xip_disable(map, chip, cmd_adr); |
1589 | 1592 | ||
@@ -1674,7 +1677,7 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip, | |||
1674 | chip->state = FL_WRITING; | 1677 | chip->state = FL_WRITING; |
1675 | 1678 | ||
1676 | ret = INVAL_CACHE_AND_WAIT(map, chip, cmd_adr, | 1679 | ret = INVAL_CACHE_AND_WAIT(map, chip, cmd_adr, |
1677 | adr, len, | 1680 | initial_adr, initial_len, |
1678 | chip->buffer_write_time); | 1681 | chip->buffer_write_time); |
1679 | if (ret) { | 1682 | if (ret) { |
1680 | map_write(map, CMD(0x70), cmd_adr); | 1683 | map_write(map, CMD(0x70), cmd_adr); |