diff options
| author | Roman Tereshonkov <roman.tereshonkov@nokia.com> | 2010-11-03 06:55:19 -0400 |
|---|---|---|
| committer | David Woodhouse <David.Woodhouse@intel.com> | 2010-12-03 11:27:54 -0500 |
| commit | 3e3198f1adda8e0fbd499bde806781237d6c841f (patch) | |
| tree | 7c27431e40114b1ed1566b81a184524ef589a65a /include/linux | |
| parent | 7ddbead6e6d3c730570a215ab9a6b1d126c54d34 (diff) | |
mtd: onenand: add option and variable for cache program feature
A new option is added for cache program feature. A new variable
ongoing is introduced for onenand_chip to handle the multi-command
cache program operation.
Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mtd/onenand.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h index 0c8815bfae1c..6da3fe314828 100644 --- a/include/linux/mtd/onenand.h +++ b/include/linux/mtd/onenand.h | |||
| @@ -137,6 +137,14 @@ struct onenand_chip { | |||
| 137 | void *bbm; | 137 | void *bbm; |
| 138 | 138 | ||
| 139 | void *priv; | 139 | void *priv; |
| 140 | |||
| 141 | /* | ||
| 142 | * Shows that the current operation is composed | ||
| 143 | * of sequence of commands. For example, cache program. | ||
| 144 | * Such command status OnGo bit is checked at the end of | ||
| 145 | * sequence. | ||
| 146 | */ | ||
| 147 | unsigned int ongoing; | ||
| 140 | }; | 148 | }; |
| 141 | 149 | ||
| 142 | /* | 150 | /* |
| @@ -171,6 +179,9 @@ struct onenand_chip { | |||
| 171 | #define ONENAND_IS_2PLANE(this) (0) | 179 | #define ONENAND_IS_2PLANE(this) (0) |
| 172 | #endif | 180 | #endif |
| 173 | 181 | ||
| 182 | #define ONENAND_IS_CACHE_PROGRAM(this) \ | ||
| 183 | (this->options & ONENAND_HAS_CACHE_PROGRAM) | ||
| 184 | |||
| 174 | /* Check byte access in OneNAND */ | 185 | /* Check byte access in OneNAND */ |
| 175 | #define ONENAND_CHECK_BYTE_ACCESS(addr) (addr & 0x1) | 186 | #define ONENAND_CHECK_BYTE_ACCESS(addr) (addr & 0x1) |
| 176 | 187 | ||
| @@ -181,6 +192,7 @@ struct onenand_chip { | |||
| 181 | #define ONENAND_HAS_UNLOCK_ALL (0x0002) | 192 | #define ONENAND_HAS_UNLOCK_ALL (0x0002) |
| 182 | #define ONENAND_HAS_2PLANE (0x0004) | 193 | #define ONENAND_HAS_2PLANE (0x0004) |
| 183 | #define ONENAND_HAS_4KB_PAGE (0x0008) | 194 | #define ONENAND_HAS_4KB_PAGE (0x0008) |
| 195 | #define ONENAND_HAS_CACHE_PROGRAM (0x0010) | ||
| 184 | #define ONENAND_SKIP_UNLOCK_CHECK (0x0100) | 196 | #define ONENAND_SKIP_UNLOCK_CHECK (0x0100) |
| 185 | #define ONENAND_PAGEBUF_ALLOC (0x1000) | 197 | #define ONENAND_PAGEBUF_ALLOC (0x1000) |
| 186 | #define ONENAND_OOBBUF_ALLOC (0x2000) | 198 | #define ONENAND_OOBBUF_ALLOC (0x2000) |
