diff options
Diffstat (limited to 'drivers/mtd/chips')
-rw-r--r-- | drivers/mtd/chips/cfi_cmdset_0001.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c index 100a00063f87..51675bb2f830 100644 --- a/drivers/mtd/chips/cfi_cmdset_0001.c +++ b/drivers/mtd/chips/cfi_cmdset_0001.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * (C) 2000 Red Hat. GPL'd | 5 | * (C) 2000 Red Hat. GPL'd |
6 | * | 6 | * |
7 | * $Id: cfi_cmdset_0001.c,v 1.171 2005/03/19 22:39:49 gleixner Exp $ | 7 | * $Id: cfi_cmdset_0001.c,v 1.172 2005/03/29 22:06:37 tpoynor Exp $ |
8 | * | 8 | * |
9 | * | 9 | * |
10 | * 10/10/2000 Nicolas Pitre <nico@cam.org> | 10 | * 10/10/2000 Nicolas Pitre <nico@cam.org> |
@@ -1823,6 +1823,7 @@ static int __xipram do_xxlock_oneblock(struct map_info *map, struct flchip *chip | |||
1823 | unsigned long adr, int len, void *thunk) | 1823 | unsigned long adr, int len, void *thunk) |
1824 | { | 1824 | { |
1825 | struct cfi_private *cfi = map->fldrv_priv; | 1825 | struct cfi_private *cfi = map->fldrv_priv; |
1826 | struct cfi_pri_intelext *extp = cfi->cmdset_priv; | ||
1826 | map_word status, status_OK; | 1827 | map_word status, status_OK; |
1827 | unsigned long timeo = jiffies + HZ; | 1828 | unsigned long timeo = jiffies + HZ; |
1828 | int ret; | 1829 | int ret; |
@@ -1852,9 +1853,16 @@ static int __xipram do_xxlock_oneblock(struct map_info *map, struct flchip *chip | |||
1852 | } else | 1853 | } else |
1853 | BUG(); | 1854 | BUG(); |
1854 | 1855 | ||
1855 | spin_unlock(chip->mutex); | 1856 | /* |
1856 | UDELAY(map, chip, adr, 1000000/HZ); | 1857 | * If Instant Individual Block Locking supported then no need |
1857 | spin_lock(chip->mutex); | 1858 | * to delay. |
1859 | */ | ||
1860 | |||
1861 | if (!extp || !(extp->FeatureSupport & (1 << 5))) { | ||
1862 | spin_unlock(chip->mutex); | ||
1863 | UDELAY(map, chip, adr, 1000000/HZ); | ||
1864 | spin_lock(chip->mutex); | ||
1865 | } | ||
1858 | 1866 | ||
1859 | /* FIXME. Use a timer to check this, and return immediately. */ | 1867 | /* FIXME. Use a timer to check this, and return immediately. */ |
1860 | /* Once the state machine's known to be working I'll do that */ | 1868 | /* Once the state machine's known to be working I'll do that */ |