Go to the documentation of this file.
12 #ifndef __LINUX_MTD_ONENAND_H
13 #define __LINUX_MTD_ONENAND_H
22 #define MAX_BUFFERRAM 2
132 #ifdef CONFIG_MTD_ONENAND_VERIFY_WRITE
133 unsigned char *verify_buf;
155 #define ONENAND_PAGES_PER_BLOCK (1<<6)
157 #define ONENAND_CURRENT_BUFFERRAM(this) (this->bufferram_index)
158 #define ONENAND_NEXT_BUFFERRAM(this) (this->bufferram_index ^ 1)
159 #define ONENAND_SET_NEXT_BUFFERRAM(this) (this->bufferram_index ^= 1)
160 #define ONENAND_SET_PREV_BUFFERRAM(this) (this->bufferram_index ^= 1)
161 #define ONENAND_SET_BUFFERRAM0(this) (this->bufferram_index = 0)
162 #define ONENAND_SET_BUFFERRAM1(this) (this->bufferram_index = 1)
164 #define FLEXONENAND(this) \
165 (this->device_id & DEVICE_IS_FLEXONENAND)
166 #define ONENAND_GET_SYS_CFG1(this) \
167 (this->read_word(this->base + ONENAND_REG_SYS_CFG1))
168 #define ONENAND_SET_SYS_CFG1(v, this) \
169 (this->write_word(v, this->base + ONENAND_REG_SYS_CFG1))
171 #define ONENAND_IS_DDP(this) \
172 (this->device_id & ONENAND_DEVICE_IS_DDP)
174 #define ONENAND_IS_MLC(this) \
175 (this->technology & ONENAND_TECHNOLOGY_IS_MLC)
177 #ifdef CONFIG_MTD_ONENAND_2X_PROGRAM
178 #define ONENAND_IS_2PLANE(this) \
179 (this->options & ONENAND_HAS_2PLANE)
181 #define ONENAND_IS_2PLANE(this) (0)
184 #define ONENAND_IS_CACHE_PROGRAM(this) \
185 (this->options & ONENAND_HAS_CACHE_PROGRAM)
187 #define ONENAND_IS_NOP_1(this) \
188 (this->options & ONENAND_HAS_NOP_1)
191 #define ONENAND_CHECK_BYTE_ACCESS(addr) (addr & 0x1)
196 #define ONENAND_HAS_CONT_LOCK (0x0001)
197 #define ONENAND_HAS_UNLOCK_ALL (0x0002)
198 #define ONENAND_HAS_2PLANE (0x0004)
199 #define ONENAND_HAS_4KB_PAGE (0x0008)
200 #define ONENAND_HAS_CACHE_PROGRAM (0x0010)
201 #define ONENAND_HAS_NOP_1 (0x0020)
202 #define ONENAND_SKIP_UNLOCK_CHECK (0x0100)
203 #define ONENAND_PAGEBUF_ALLOC (0x1000)
204 #define ONENAND_OOBBUF_ALLOC (0x2000)
205 #define ONENAND_SKIP_INITIAL_UNLOCKING (0x4000)
207 #define ONENAND_IS_4KB_PAGE(this) \
208 (this->options & ONENAND_HAS_4KB_PAGE)
213 #define ONENAND_MFR_SAMSUNG 0xec
214 #define ONENAND_MFR_NUMONYX 0x20