diff options
Diffstat (limited to 'drivers/mtd/chips/cfi_cmdset_0001.c')
-rw-r--r-- | drivers/mtd/chips/cfi_cmdset_0001.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c index 69c04945591f..1c074d63ff3a 100644 --- a/drivers/mtd/chips/cfi_cmdset_0001.c +++ b/drivers/mtd/chips/cfi_cmdset_0001.c | |||
@@ -408,6 +408,7 @@ struct mtd_info *cfi_cmdset_0001(struct map_info *map, int primary) | |||
408 | cfi->chips[i].buffer_write_time = 1<<cfi->cfiq->BufWriteTimeoutTyp; | 408 | cfi->chips[i].buffer_write_time = 1<<cfi->cfiq->BufWriteTimeoutTyp; |
409 | cfi->chips[i].erase_time = 1<<cfi->cfiq->BlockEraseTimeoutTyp; | 409 | cfi->chips[i].erase_time = 1<<cfi->cfiq->BlockEraseTimeoutTyp; |
410 | cfi->chips[i].ref_point_counter = 0; | 410 | cfi->chips[i].ref_point_counter = 0; |
411 | init_waitqueue_head(&(cfi->chips[i].wq)); | ||
411 | } | 412 | } |
412 | 413 | ||
413 | map->fldrv = &cfi_intelext_chipdrv; | 414 | map->fldrv = &cfi_intelext_chipdrv; |
@@ -1019,8 +1020,8 @@ static void __xipram xip_udelay(struct map_info *map, struct flchip *chip, | |||
1019 | #define XIP_INVAL_CACHED_RANGE(map, from, size) \ | 1020 | #define XIP_INVAL_CACHED_RANGE(map, from, size) \ |
1020 | INVALIDATE_CACHED_RANGE(map, from, size) | 1021 | INVALIDATE_CACHED_RANGE(map, from, size) |
1021 | 1022 | ||
1022 | #define INVALIDATE_CACHE_UDELAY(map, chip, adr, len, usec) \ | 1023 | #define INVALIDATE_CACHE_UDELAY(map, chip, cmd_adr, adr, len, usec) \ |
1023 | UDELAY(map, chip, adr, usec) | 1024 | UDELAY(map, chip, cmd_adr, usec) |
1024 | 1025 | ||
1025 | /* | 1026 | /* |
1026 | * Extra notes: | 1027 | * Extra notes: |
@@ -1052,7 +1053,7 @@ do { \ | |||
1052 | spin_lock(chip->mutex); \ | 1053 | spin_lock(chip->mutex); \ |
1053 | } while (0) | 1054 | } while (0) |
1054 | 1055 | ||
1055 | #define INVALIDATE_CACHE_UDELAY(map, chip, adr, len, usec) \ | 1056 | #define INVALIDATE_CACHE_UDELAY(map, chip, cmd_adr, adr, len, usec) \ |
1056 | do { \ | 1057 | do { \ |
1057 | spin_unlock(chip->mutex); \ | 1058 | spin_unlock(chip->mutex); \ |
1058 | INVALIDATE_CACHED_RANGE(map, adr, len); \ | 1059 | INVALIDATE_CACHED_RANGE(map, adr, len); \ |
@@ -1284,7 +1285,7 @@ static int __xipram do_write_oneword(struct map_info *map, struct flchip *chip, | |||
1284 | map_write(map, datum, adr); | 1285 | map_write(map, datum, adr); |
1285 | chip->state = mode; | 1286 | chip->state = mode; |
1286 | 1287 | ||
1287 | INVALIDATE_CACHE_UDELAY(map, chip, | 1288 | INVALIDATE_CACHE_UDELAY(map, chip, adr, |
1288 | adr, map_bankwidth(map), | 1289 | adr, map_bankwidth(map), |
1289 | chip->word_write_time); | 1290 | chip->word_write_time); |
1290 | 1291 | ||
@@ -1572,8 +1573,8 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip, | |||
1572 | map_write(map, CMD(0xd0), cmd_adr); | 1573 | map_write(map, CMD(0xd0), cmd_adr); |
1573 | chip->state = FL_WRITING; | 1574 | chip->state = FL_WRITING; |
1574 | 1575 | ||
1575 | INVALIDATE_CACHE_UDELAY(map, chip, | 1576 | INVALIDATE_CACHE_UDELAY(map, chip, cmd_adr, |
1576 | cmd_adr, len, | 1577 | adr, len, |
1577 | chip->buffer_write_time); | 1578 | chip->buffer_write_time); |
1578 | 1579 | ||
1579 | timeo = jiffies + (HZ/2); | 1580 | timeo = jiffies + (HZ/2); |
@@ -1744,7 +1745,7 @@ static int __xipram do_erase_oneblock(struct map_info *map, struct flchip *chip, | |||
1744 | chip->state = FL_ERASING; | 1745 | chip->state = FL_ERASING; |
1745 | chip->erase_suspended = 0; | 1746 | chip->erase_suspended = 0; |
1746 | 1747 | ||
1747 | INVALIDATE_CACHE_UDELAY(map, chip, | 1748 | INVALIDATE_CACHE_UDELAY(map, chip, adr, |
1748 | adr, len, | 1749 | adr, len, |
1749 | chip->erase_time*1000/2); | 1750 | chip->erase_time*1000/2); |
1750 | 1751 | ||