aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mtd/onenand.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mtd/onenand.h')
-rw-r--r--include/linux/mtd/onenand.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h
index 5509eb06b326..0c8815bfae1c 100644
--- a/include/linux/mtd/onenand.h
+++ b/include/linux/mtd/onenand.h
@@ -68,6 +68,7 @@ struct onenand_bufferram {
68 * @write_word: [REPLACEABLE] hardware specific function for write 68 * @write_word: [REPLACEABLE] hardware specific function for write
69 * register of OneNAND 69 * register of OneNAND
70 * @mmcontrol: sync burst read function 70 * @mmcontrol: sync burst read function
71 * @chip_probe: [REPLACEABLE] hardware specific function for chip probe
71 * @block_markbad: function to mark a block as bad 72 * @block_markbad: function to mark a block as bad
72 * @scan_bbt: [REPLACEALBE] hardware specific function for scanning 73 * @scan_bbt: [REPLACEALBE] hardware specific function for scanning
73 * Bad block Table 74 * Bad block Table
@@ -114,6 +115,7 @@ struct onenand_chip {
114 unsigned short (*read_word)(void __iomem *addr); 115 unsigned short (*read_word)(void __iomem *addr);
115 void (*write_word)(unsigned short value, void __iomem *addr); 116 void (*write_word)(unsigned short value, void __iomem *addr);
116 void (*mmcontrol)(struct mtd_info *mtd, int sync_read); 117 void (*mmcontrol)(struct mtd_info *mtd, int sync_read);
118 int (*chip_probe)(struct mtd_info *mtd);
117 int (*block_markbad)(struct mtd_info *mtd, loff_t ofs); 119 int (*block_markbad)(struct mtd_info *mtd, loff_t ofs);
118 int (*scan_bbt)(struct mtd_info *mtd); 120 int (*scan_bbt)(struct mtd_info *mtd);
119 121
@@ -125,6 +127,9 @@ struct onenand_chip {
125 flstate_t state; 127 flstate_t state;
126 unsigned char *page_buf; 128 unsigned char *page_buf;
127 unsigned char *oob_buf; 129 unsigned char *oob_buf;
130#ifdef CONFIG_MTD_ONENAND_VERIFY_WRITE
131 unsigned char *verify_buf;
132#endif
128 133
129 int subpagesize; 134 int subpagesize;
130 struct nand_ecclayout *ecclayout; 135 struct nand_ecclayout *ecclayout;
@@ -175,10 +180,14 @@ struct onenand_chip {
175#define ONENAND_HAS_CONT_LOCK (0x0001) 180#define ONENAND_HAS_CONT_LOCK (0x0001)
176#define ONENAND_HAS_UNLOCK_ALL (0x0002) 181#define ONENAND_HAS_UNLOCK_ALL (0x0002)
177#define ONENAND_HAS_2PLANE (0x0004) 182#define ONENAND_HAS_2PLANE (0x0004)
183#define ONENAND_HAS_4KB_PAGE (0x0008)
178#define ONENAND_SKIP_UNLOCK_CHECK (0x0100) 184#define ONENAND_SKIP_UNLOCK_CHECK (0x0100)
179#define ONENAND_PAGEBUF_ALLOC (0x1000) 185#define ONENAND_PAGEBUF_ALLOC (0x1000)
180#define ONENAND_OOBBUF_ALLOC (0x2000) 186#define ONENAND_OOBBUF_ALLOC (0x2000)
181 187
188#define ONENAND_IS_4KB_PAGE(this) \
189 (this->options & ONENAND_HAS_4KB_PAGE)
190
182/* 191/*
183 * OneNAND Flash Manufacturer ID Codes 192 * OneNAND Flash Manufacturer ID Codes
184 */ 193 */
@@ -205,6 +214,8 @@ struct mtd_partition;
205 214
206struct onenand_platform_data { 215struct onenand_platform_data {
207 void (*mmcontrol)(struct mtd_info *mtd, int sync_read); 216 void (*mmcontrol)(struct mtd_info *mtd, int sync_read);
217 int (*read_bufferram)(struct mtd_info *mtd, int area,
218 unsigned char *buffer, int offset, size_t count);
208 struct mtd_partition *parts; 219 struct mtd_partition *parts;
209 unsigned int nr_parts; 220 unsigned int nr_parts;
210}; 221};