linux/drivers/mtd/chips
Stefan Roese 7be1f6b9a1 mtd: cfi_cmdset_0001: Fix problem with unlocking timeout
Unlocking may take up to 1.4 seconds on some Intel flashes. So
lets use a max. of 1.5 seconds (1500ms) as timeout.

See "Clear Block Lock-Bits Time" on page 40 in
"3 Volt Intel StrataFlash Memory" 28F128J3,28F640J3,28F320J3 manual
from February 2003

This patch also fixes some other problems with this timeout:

- Don't use HZ in timeout "calculation"!
  While testing we noticed that an unlocking timeout occured with
  HZ=1000 and didn't occur with HZ=300. This was because the
  timeout parameter was calculated differently depending on the
  HZ value. Now a fixed value of 1500ms is used.

- The last parameter of WAIT_TIMEOUT (defined to
  inval_cache_and_wait_for_operation) has to be passed in
  micro-seconds. So multiply the ms value with 1000 and not 100
  to calculate this value.

- Use variable name "mdelay" instead of misleading "udelay".

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Stephan Gatzka <stephan@gatzka.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-09-29 15:29:08 +01:00
..
cfi_cmdset_0001.c mtd: cfi_cmdset_0001: Fix problem with unlocking timeout 2012-09-29 15:29:08 +01:00
cfi_cmdset_0002.c mtd: cfi_cmdset_0002: Micron M29EW bugfixes as per TN-13-07 2012-07-16 21:37:15 +01:00
cfi_cmdset_0020.c mtd: move zero length verification to MTD API functions 2012-03-27 00:32:19 +01:00
cfi_probe.c mtd: cfi_cmdset_0002: make sector erase command variable 2010-10-26 11:39:17 +01:00
cfi_util.c mtd: do not duplicate length and offset checks in drivers 2012-03-27 00:28:18 +01:00
chipreg.c mtd: simplify return logic in do_map_probe() 2012-03-27 00:35:06 +01:00
fwh_lock.h mtd: add leading underscore to all mtd functions 2012-03-27 00:20:01 +01:00
gen_probe.c mtd: cfi_cmdset_0002: use AMD standard command-set with Winbond flash chips 2010-05-20 16:57:00 +01:00
jedec_probe.c mtd: replace DEBUG() with pr_debug() 2011-09-11 15:02:16 +03:00
Kconfig mtd: chips: reorganize Kconfig help on swapping 2012-07-06 18:17:07 +01:00
Makefile [MTD] [CHIPS] Remove MTD_OBSOLETE_CHIPS (jedec, amd_flash, sharp) 2007-05-09 13:34:37 +01:00
map_absent.c mtd: remove retlen zeroing duplication 2012-03-27 00:29:34 +01:00
map_ram.c mtd: remove R/O checking duplication 2012-03-27 00:29:11 +01:00
map_rom.c mtd: remove R/O checking duplication 2012-03-27 00:29:11 +01:00