diff options
author | Anders Grafström <grfstrm@users.sourceforge.net> | 2008-08-05 12:37:41 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2008-08-06 04:44:54 -0400 |
commit | e93cafe45fd74935e0aca2b79e533f0e3ed9640f (patch) | |
tree | f30b1eb1df5eed94145ad85c05f7b911c393d046 /include/linux/mtd/flashchip.h | |
parent | 2e489e077a6ad118c4f247faedf330117b107cce (diff) |
[MTD] [NOR] cfi_cmdset_0001: Timeouts for erase, write and unlock operations
Timeouts are currently given by the typical operation time times 8.
It works in the general well-behaved case but not when an erase block is
failing. For erase operations, it seems that a failing erase block will
keep the device state machine in erasing state until the vendor
specified maximum timeout period has passed. By this time the driver
would have long since timed out, left erasing state and attempted
further operations which all fail. This patch implements timeouts using
values from the CFI Query structure when available.
The patch also sets a longer timeout for locking operations. The current
value used for locking/unlocking given by 1000000/HZ microseconds is too
short for devices like J3 and J5 Strataflash which have a typical clear
lock-bits time of 0.5 seconds.
Signed-off-by: Anders Grafström <grfstrm@users.sourceforge.net>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'include/linux/mtd/flashchip.h')
-rw-r--r-- | include/linux/mtd/flashchip.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/mtd/flashchip.h b/include/linux/mtd/flashchip.h index 08dd131301c1..d4f38c5fd44e 100644 --- a/include/linux/mtd/flashchip.h +++ b/include/linux/mtd/flashchip.h | |||
@@ -73,6 +73,10 @@ struct flchip { | |||
73 | int buffer_write_time; | 73 | int buffer_write_time; |
74 | int erase_time; | 74 | int erase_time; |
75 | 75 | ||
76 | int word_write_time_max; | ||
77 | int buffer_write_time_max; | ||
78 | int erase_time_max; | ||
79 | |||
76 | void *priv; | 80 | void *priv; |
77 | }; | 81 | }; |
78 | 82 | ||