diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-i386/processor.h | 1 | ||||
-rw-r--r-- | include/linux/mtd/blktrans.h | 3 | ||||
-rw-r--r-- | include/linux/mtd/mtd.h | 24 | ||||
-rw-r--r-- | include/linux/mtd/nand.h | 15 | ||||
-rw-r--r-- | include/linux/mtd/onenand.h | 8 | ||||
-rw-r--r-- | include/linux/mtd/onenand_regs.h | 1 | ||||
-rw-r--r-- | include/linux/reiserfs_fs_i.h | 2 |
7 files changed, 39 insertions, 15 deletions
diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h index a52d65440429..359f10b54f59 100644 --- a/include/asm-i386/processor.h +++ b/include/asm-i386/processor.h | |||
@@ -743,6 +743,7 @@ extern void enable_sep_cpu(void); | |||
743 | extern int sysenter_setup(void); | 743 | extern int sysenter_setup(void); |
744 | 744 | ||
745 | extern int init_gdt(int cpu, struct task_struct *idle); | 745 | extern int init_gdt(int cpu, struct task_struct *idle); |
746 | extern void cpu_set_gdt(int); | ||
746 | extern void secondary_cpu_init(void); | 747 | extern void secondary_cpu_init(void); |
747 | 748 | ||
748 | #endif /* __ASM_I386_PROCESSOR_H */ | 749 | #endif /* __ASM_I386_PROCESSOR_H */ |
diff --git a/include/linux/mtd/blktrans.h b/include/linux/mtd/blktrans.h index 72fc68c5ee96..9a6e2f953cba 100644 --- a/include/linux/mtd/blktrans.h +++ b/include/linux/mtd/blktrans.h | |||
@@ -24,7 +24,6 @@ struct mtd_blktrans_dev { | |||
24 | struct mtd_info *mtd; | 24 | struct mtd_info *mtd; |
25 | struct mutex lock; | 25 | struct mutex lock; |
26 | int devnum; | 26 | int devnum; |
27 | int blksize; | ||
28 | unsigned long size; | 27 | unsigned long size; |
29 | int readonly; | 28 | int readonly; |
30 | void *blkcore_priv; /* gendisk in 2.5, devfs_handle in 2.4 */ | 29 | void *blkcore_priv; /* gendisk in 2.5, devfs_handle in 2.4 */ |
@@ -36,6 +35,8 @@ struct mtd_blktrans_ops { | |||
36 | char *name; | 35 | char *name; |
37 | int major; | 36 | int major; |
38 | int part_bits; | 37 | int part_bits; |
38 | int blksize; | ||
39 | int blkshift; | ||
39 | 40 | ||
40 | /* Access functions */ | 41 | /* Access functions */ |
41 | int (*readsect)(struct mtd_blktrans_dev *dev, | 42 | int (*readsect)(struct mtd_blktrans_dev *dev, |
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 94a443d45258..d644e57703ad 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
@@ -23,7 +23,7 @@ | |||
23 | 23 | ||
24 | #define MTD_CHAR_MAJOR 90 | 24 | #define MTD_CHAR_MAJOR 90 |
25 | #define MTD_BLOCK_MAJOR 31 | 25 | #define MTD_BLOCK_MAJOR 31 |
26 | #define MAX_MTD_DEVICES 16 | 26 | #define MAX_MTD_DEVICES 32 |
27 | 27 | ||
28 | #define MTD_ERASE_PENDING 0x01 | 28 | #define MTD_ERASE_PENDING 0x01 |
29 | #define MTD_ERASING 0x02 | 29 | #define MTD_ERASING 0x02 |
@@ -75,15 +75,12 @@ typedef enum { | |||
75 | * struct mtd_oob_ops - oob operation operands | 75 | * struct mtd_oob_ops - oob operation operands |
76 | * @mode: operation mode | 76 | * @mode: operation mode |
77 | * | 77 | * |
78 | * @len: number of bytes to write/read. When a data buffer is given | 78 | * @len: number of data bytes to write/read |
79 | * (datbuf != NULL) this is the number of data bytes. When | ||
80 | * no data buffer is available this is the number of oob bytes. | ||
81 | * | 79 | * |
82 | * @retlen: number of bytes written/read. When a data buffer is given | 80 | * @retlen: number of data bytes written/read |
83 | * (datbuf != NULL) this is the number of data bytes. When | ||
84 | * no data buffer is available this is the number of oob bytes. | ||
85 | * | 81 | * |
86 | * @ooblen: number of oob bytes per page | 82 | * @ooblen: number of oob bytes to write/read |
83 | * @oobretlen: number of oob bytes written/read | ||
87 | * @ooboffs: offset of oob data in the oob area (only relevant when | 84 | * @ooboffs: offset of oob data in the oob area (only relevant when |
88 | * mode = MTD_OOB_PLACE) | 85 | * mode = MTD_OOB_PLACE) |
89 | * @datbuf: data buffer - if NULL only oob data are read/written | 86 | * @datbuf: data buffer - if NULL only oob data are read/written |
@@ -94,6 +91,7 @@ struct mtd_oob_ops { | |||
94 | size_t len; | 91 | size_t len; |
95 | size_t retlen; | 92 | size_t retlen; |
96 | size_t ooblen; | 93 | size_t ooblen; |
94 | size_t oobretlen; | ||
97 | uint32_t ooboffs; | 95 | uint32_t ooboffs; |
98 | uint8_t *datbuf; | 96 | uint8_t *datbuf; |
99 | uint8_t *oobbuf; | 97 | uint8_t *oobbuf; |
@@ -202,11 +200,20 @@ struct mtd_info { | |||
202 | 200 | ||
203 | /* ECC status information */ | 201 | /* ECC status information */ |
204 | struct mtd_ecc_stats ecc_stats; | 202 | struct mtd_ecc_stats ecc_stats; |
203 | /* Subpage shift (NAND) */ | ||
204 | int subpage_sft; | ||
205 | 205 | ||
206 | void *priv; | 206 | void *priv; |
207 | 207 | ||
208 | struct module *owner; | 208 | struct module *owner; |
209 | int usecount; | 209 | int usecount; |
210 | |||
211 | /* If the driver is something smart, like UBI, it may need to maintain | ||
212 | * its own reference counting. The below functions are only for driver. | ||
213 | * The driver may register its callbacks. These callbacks are not | ||
214 | * supposed to be called by MTD users */ | ||
215 | int (*get_device) (struct mtd_info *mtd); | ||
216 | void (*put_device) (struct mtd_info *mtd); | ||
210 | }; | 217 | }; |
211 | 218 | ||
212 | 219 | ||
@@ -216,6 +223,7 @@ extern int add_mtd_device(struct mtd_info *mtd); | |||
216 | extern int del_mtd_device (struct mtd_info *mtd); | 223 | extern int del_mtd_device (struct mtd_info *mtd); |
217 | 224 | ||
218 | extern struct mtd_info *get_mtd_device(struct mtd_info *mtd, int num); | 225 | extern struct mtd_info *get_mtd_device(struct mtd_info *mtd, int num); |
226 | extern struct mtd_info *get_mtd_device_nm(const char *name); | ||
219 | 227 | ||
220 | extern void put_mtd_device(struct mtd_info *mtd); | 228 | extern void put_mtd_device(struct mtd_info *mtd); |
221 | 229 | ||
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 8b3ef4187219..2071b02f0526 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
@@ -166,6 +166,9 @@ typedef enum { | |||
166 | * for all large page devices, as they do not support | 166 | * for all large page devices, as they do not support |
167 | * autoincrement.*/ | 167 | * autoincrement.*/ |
168 | #define NAND_NO_READRDY 0x00000100 | 168 | #define NAND_NO_READRDY 0x00000100 |
169 | /* Chip does not allow subpage writes */ | ||
170 | #define NAND_NO_SUBPAGE_WRITE 0x00000200 | ||
171 | |||
169 | 172 | ||
170 | /* Options valid for Samsung large page devices */ | 173 | /* Options valid for Samsung large page devices */ |
171 | #define NAND_SAMSUNG_LP_OPTIONS \ | 174 | #define NAND_SAMSUNG_LP_OPTIONS \ |
@@ -193,6 +196,9 @@ typedef enum { | |||
193 | /* Nand scan has allocated controller struct */ | 196 | /* Nand scan has allocated controller struct */ |
194 | #define NAND_CONTROLLER_ALLOC 0x80000000 | 197 | #define NAND_CONTROLLER_ALLOC 0x80000000 |
195 | 198 | ||
199 | /* Cell info constants */ | ||
200 | #define NAND_CI_CHIPNR_MSK 0x03 | ||
201 | #define NAND_CI_CELLTYPE_MSK 0x0C | ||
196 | 202 | ||
197 | /* | 203 | /* |
198 | * nand_state_t - chip states | 204 | * nand_state_t - chip states |
@@ -286,9 +292,7 @@ struct nand_ecc_ctrl { | |||
286 | * struct nand_buffers - buffer structure for read/write | 292 | * struct nand_buffers - buffer structure for read/write |
287 | * @ecccalc: buffer for calculated ecc | 293 | * @ecccalc: buffer for calculated ecc |
288 | * @ecccode: buffer for ecc read from flash | 294 | * @ecccode: buffer for ecc read from flash |
289 | * @oobwbuf: buffer for write oob data | ||
290 | * @databuf: buffer for data - dynamically sized | 295 | * @databuf: buffer for data - dynamically sized |
291 | * @oobrbuf: buffer to read oob data | ||
292 | * | 296 | * |
293 | * Do not change the order of buffers. databuf and oobrbuf must be in | 297 | * Do not change the order of buffers. databuf and oobrbuf must be in |
294 | * consecutive order. | 298 | * consecutive order. |
@@ -296,9 +300,7 @@ struct nand_ecc_ctrl { | |||
296 | struct nand_buffers { | 300 | struct nand_buffers { |
297 | uint8_t ecccalc[NAND_MAX_OOBSIZE]; | 301 | uint8_t ecccalc[NAND_MAX_OOBSIZE]; |
298 | uint8_t ecccode[NAND_MAX_OOBSIZE]; | 302 | uint8_t ecccode[NAND_MAX_OOBSIZE]; |
299 | uint8_t oobwbuf[NAND_MAX_OOBSIZE]; | 303 | uint8_t databuf[NAND_MAX_PAGESIZE + NAND_MAX_OOBSIZE]; |
300 | uint8_t databuf[NAND_MAX_PAGESIZE]; | ||
301 | uint8_t oobrbuf[NAND_MAX_OOBSIZE]; | ||
302 | }; | 304 | }; |
303 | 305 | ||
304 | /** | 306 | /** |
@@ -345,6 +347,7 @@ struct nand_buffers { | |||
345 | * @chipsize: [INTERN] the size of one chip for multichip arrays | 347 | * @chipsize: [INTERN] the size of one chip for multichip arrays |
346 | * @pagemask: [INTERN] page number mask = number of (pages / chip) - 1 | 348 | * @pagemask: [INTERN] page number mask = number of (pages / chip) - 1 |
347 | * @pagebuf: [INTERN] holds the pagenumber which is currently in data_buf | 349 | * @pagebuf: [INTERN] holds the pagenumber which is currently in data_buf |
350 | * @subpagesize: [INTERN] holds the subpagesize | ||
348 | * @ecclayout: [REPLACEABLE] the default ecc placement scheme | 351 | * @ecclayout: [REPLACEABLE] the default ecc placement scheme |
349 | * @bbt: [INTERN] bad block table pointer | 352 | * @bbt: [INTERN] bad block table pointer |
350 | * @bbt_td: [REPLACEABLE] bad block table descriptor for flash lookup | 353 | * @bbt_td: [REPLACEABLE] bad block table descriptor for flash lookup |
@@ -392,6 +395,8 @@ struct nand_chip { | |||
392 | unsigned long chipsize; | 395 | unsigned long chipsize; |
393 | int pagemask; | 396 | int pagemask; |
394 | int pagebuf; | 397 | int pagebuf; |
398 | int subpagesize; | ||
399 | uint8_t cellinfo; | ||
395 | int badblockpos; | 400 | int badblockpos; |
396 | 401 | ||
397 | nand_state_t state; | 402 | nand_state_t state; |
diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h index 6f045b586e76..f775a7af3890 100644 --- a/include/linux/mtd/onenand.h +++ b/include/linux/mtd/onenand.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #define __LINUX_MTD_ONENAND_H | 13 | #define __LINUX_MTD_ONENAND_H |
14 | 14 | ||
15 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
16 | #include <linux/completion.h> | ||
16 | #include <linux/mtd/onenand_regs.h> | 17 | #include <linux/mtd/onenand_regs.h> |
17 | #include <linux/mtd/bbm.h> | 18 | #include <linux/mtd/bbm.h> |
18 | 19 | ||
@@ -33,7 +34,6 @@ typedef enum { | |||
33 | FL_WRITING, | 34 | FL_WRITING, |
34 | FL_ERASING, | 35 | FL_ERASING, |
35 | FL_SYNCING, | 36 | FL_SYNCING, |
36 | FL_UNLOCKING, | ||
37 | FL_LOCKING, | 37 | FL_LOCKING, |
38 | FL_RESETING, | 38 | FL_RESETING, |
39 | FL_OTPING, | 39 | FL_OTPING, |
@@ -88,6 +88,7 @@ struct onenand_bufferram { | |||
88 | * operation is in progress | 88 | * operation is in progress |
89 | * @state: [INTERN] the current state of the OneNAND device | 89 | * @state: [INTERN] the current state of the OneNAND device |
90 | * @page_buf: data buffer | 90 | * @page_buf: data buffer |
91 | * @subpagesize: [INTERN] holds the subpagesize | ||
91 | * @ecclayout: [REPLACEABLE] the default ecc placement scheme | 92 | * @ecclayout: [REPLACEABLE] the default ecc placement scheme |
92 | * @bbm: [REPLACEABLE] pointer to Bad Block Management | 93 | * @bbm: [REPLACEABLE] pointer to Bad Block Management |
93 | * @priv: [OPTIONAL] pointer to private chip date | 94 | * @priv: [OPTIONAL] pointer to private chip date |
@@ -120,11 +121,15 @@ struct onenand_chip { | |||
120 | int (*block_markbad)(struct mtd_info *mtd, loff_t ofs); | 121 | int (*block_markbad)(struct mtd_info *mtd, loff_t ofs); |
121 | int (*scan_bbt)(struct mtd_info *mtd); | 122 | int (*scan_bbt)(struct mtd_info *mtd); |
122 | 123 | ||
124 | struct completion complete; | ||
125 | int irq; | ||
126 | |||
123 | spinlock_t chip_lock; | 127 | spinlock_t chip_lock; |
124 | wait_queue_head_t wq; | 128 | wait_queue_head_t wq; |
125 | onenand_state_t state; | 129 | onenand_state_t state; |
126 | unsigned char *page_buf; | 130 | unsigned char *page_buf; |
127 | 131 | ||
132 | int subpagesize; | ||
128 | struct nand_ecclayout *ecclayout; | 133 | struct nand_ecclayout *ecclayout; |
129 | 134 | ||
130 | void *bbm; | 135 | void *bbm; |
@@ -138,6 +143,7 @@ struct onenand_chip { | |||
138 | #define ONENAND_CURRENT_BUFFERRAM(this) (this->bufferram_index) | 143 | #define ONENAND_CURRENT_BUFFERRAM(this) (this->bufferram_index) |
139 | #define ONENAND_NEXT_BUFFERRAM(this) (this->bufferram_index ^ 1) | 144 | #define ONENAND_NEXT_BUFFERRAM(this) (this->bufferram_index ^ 1) |
140 | #define ONENAND_SET_NEXT_BUFFERRAM(this) (this->bufferram_index ^= 1) | 145 | #define ONENAND_SET_NEXT_BUFFERRAM(this) (this->bufferram_index ^= 1) |
146 | #define ONENAND_SET_PREV_BUFFERRAM(this) (this->bufferram_index ^= 1) | ||
141 | 147 | ||
142 | #define ONENAND_GET_SYS_CFG1(this) \ | 148 | #define ONENAND_GET_SYS_CFG1(this) \ |
143 | (this->read_word(this->base + ONENAND_REG_SYS_CFG1)) | 149 | (this->read_word(this->base + ONENAND_REG_SYS_CFG1)) |
diff --git a/include/linux/mtd/onenand_regs.h b/include/linux/mtd/onenand_regs.h index 9e409fe6ded6..e31c8f5d4271 100644 --- a/include/linux/mtd/onenand_regs.h +++ b/include/linux/mtd/onenand_regs.h | |||
@@ -179,6 +179,7 @@ | |||
179 | * ECC Status Reigser FF00h (R) | 179 | * ECC Status Reigser FF00h (R) |
180 | */ | 180 | */ |
181 | #define ONENAND_ECC_1BIT (1 << 0) | 181 | #define ONENAND_ECC_1BIT (1 << 0) |
182 | #define ONENAND_ECC_1BIT_ALL (0x5555) | ||
182 | #define ONENAND_ECC_2BIT (1 << 1) | 183 | #define ONENAND_ECC_2BIT (1 << 1) |
183 | #define ONENAND_ECC_2BIT_ALL (0xAAAA) | 184 | #define ONENAND_ECC_2BIT_ALL (0xAAAA) |
184 | 185 | ||
diff --git a/include/linux/reiserfs_fs_i.h b/include/linux/reiserfs_fs_i.h index 5b3b297aa2c5..ce3663fb0101 100644 --- a/include/linux/reiserfs_fs_i.h +++ b/include/linux/reiserfs_fs_i.h | |||
@@ -25,6 +25,7 @@ typedef enum { | |||
25 | i_link_saved_truncate_mask = 0x0020, | 25 | i_link_saved_truncate_mask = 0x0020, |
26 | i_has_xattr_dir = 0x0040, | 26 | i_has_xattr_dir = 0x0040, |
27 | i_data_log = 0x0080, | 27 | i_data_log = 0x0080, |
28 | i_ever_mapped = 0x0100 | ||
28 | } reiserfs_inode_flags; | 29 | } reiserfs_inode_flags; |
29 | 30 | ||
30 | struct reiserfs_inode_info { | 31 | struct reiserfs_inode_info { |
@@ -52,6 +53,7 @@ struct reiserfs_inode_info { | |||
52 | ** flushed */ | 53 | ** flushed */ |
53 | unsigned long i_trans_id; | 54 | unsigned long i_trans_id; |
54 | struct reiserfs_journal_list *i_jl; | 55 | struct reiserfs_journal_list *i_jl; |
56 | struct mutex i_mmap; | ||
55 | #ifdef CONFIG_REISERFS_FS_POSIX_ACL | 57 | #ifdef CONFIG_REISERFS_FS_POSIX_ACL |
56 | struct posix_acl *i_acl_access; | 58 | struct posix_acl *i_acl_access; |
57 | struct posix_acl *i_acl_default; | 59 | struct posix_acl *i_acl_default; |