diff options
author | Thomas Gleixner <tglx@cruncher.tec.linutronix.de> | 2006-05-27 16:16:10 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@cruncher.tec.linutronix.de> | 2006-05-29 09:06:50 -0400 |
commit | 5bd34c091a044d130601370c370f84b1c59f1627 (patch) | |
tree | 8b08012a9a30186a8805d506f8438e2944f5f31b /include/linux/mtd | |
parent | ff268fb8791cf18df536113355d7184007c269d9 (diff) |
[MTD] NAND Replace oobinfo by ecclayout
The nand_oobinfo structure is not fitting the newer error correction
demands anymore. Replace it by struct nand_ecclayout and fixup the users
all over the place. Keep the nand_oobinfo based ioctl for user space
compability reasons.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/mtd')
-rw-r--r-- | include/linux/mtd/inftl.h | 2 | ||||
-rw-r--r-- | include/linux/mtd/mtd.h | 4 | ||||
-rw-r--r-- | include/linux/mtd/nand.h | 9 | ||||
-rw-r--r-- | include/linux/mtd/nftl.h | 2 | ||||
-rw-r--r-- | include/linux/mtd/onenand.h | 6 | ||||
-rw-r--r-- | include/linux/mtd/partitions.h | 2 |
6 files changed, 13 insertions, 12 deletions
diff --git a/include/linux/mtd/inftl.h b/include/linux/mtd/inftl.h index d7eaa40e5ab0..6977780e548f 100644 --- a/include/linux/mtd/inftl.h +++ b/include/linux/mtd/inftl.h | |||
@@ -46,7 +46,7 @@ struct INFTLrecord { | |||
46 | unsigned int nb_blocks; /* number of physical blocks */ | 46 | unsigned int nb_blocks; /* number of physical blocks */ |
47 | unsigned int nb_boot_blocks; /* number of blocks used by the bios */ | 47 | unsigned int nb_boot_blocks; /* number of blocks used by the bios */ |
48 | struct erase_info instr; | 48 | struct erase_info instr; |
49 | struct nand_oobinfo oobinfo; | 49 | struct nand_ecclayout oobinfo; |
50 | }; | 50 | }; |
51 | 51 | ||
52 | int INFTL_mount(struct INFTLrecord *s); | 52 | int INFTL_mount(struct INFTLrecord *s); |
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 8429da51bb09..48a9df21ab11 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
@@ -101,8 +101,8 @@ struct mtd_info { | |||
101 | char *name; | 101 | char *name; |
102 | int index; | 102 | int index; |
103 | 103 | ||
104 | /* oobinfo structure pointer - read only ! */ | 104 | /* ecc layout structure pointer - read only ! */ |
105 | struct nand_oobinfo *oobinfo; | 105 | struct nand_ecclayout *ecclayout; |
106 | 106 | ||
107 | /* Data for variable erase regions. If numeraseregions is zero, | 107 | /* Data for variable erase regions. If numeraseregions is zero, |
108 | * it means that the whole device has erasesize as given above. | 108 | * it means that the whole device has erasesize as given above. |
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index fd46bcf52281..dc2bf1bcf42b 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
@@ -244,6 +244,7 @@ struct nand_ecc_ctrl { | |||
244 | int total; | 244 | int total; |
245 | int prepad; | 245 | int prepad; |
246 | int postpad; | 246 | int postpad; |
247 | struct nand_ecclayout *layout; | ||
247 | void (*hwctl)(struct mtd_info *mtd, int mode); | 248 | void (*hwctl)(struct mtd_info *mtd, int mode); |
248 | int (*calculate)(struct mtd_info *mtd, | 249 | int (*calculate)(struct mtd_info *mtd, |
249 | const uint8_t *dat, | 250 | const uint8_t *dat, |
@@ -318,7 +319,7 @@ struct nand_buffers { | |||
318 | * @chipsize: [INTERN] the size of one chip for multichip arrays | 319 | * @chipsize: [INTERN] the size of one chip for multichip arrays |
319 | * @pagemask: [INTERN] page number mask = number of (pages / chip) - 1 | 320 | * @pagemask: [INTERN] page number mask = number of (pages / chip) - 1 |
320 | * @pagebuf: [INTERN] holds the pagenumber which is currently in data_buf | 321 | * @pagebuf: [INTERN] holds the pagenumber which is currently in data_buf |
321 | * @autooob: [REPLACEABLE] the default (auto)placement scheme | 322 | * @ecclayout: [REPLACEABLE] the default ecc placement scheme |
322 | * @bbt: [INTERN] bad block table pointer | 323 | * @bbt: [INTERN] bad block table pointer |
323 | * @bbt_td: [REPLACEABLE] bad block table descriptor for flash lookup | 324 | * @bbt_td: [REPLACEABLE] bad block table descriptor for flash lookup |
324 | * @bbt_md: [REPLACEABLE] bad block table mirror descriptor | 325 | * @bbt_md: [REPLACEABLE] bad block table mirror descriptor |
@@ -368,7 +369,7 @@ struct nand_chip { | |||
368 | 369 | ||
369 | uint8_t *oob_poi; | 370 | uint8_t *oob_poi; |
370 | struct nand_hw_control *controller; | 371 | struct nand_hw_control *controller; |
371 | struct nand_oobinfo *autooob; | 372 | struct nand_ecclayout *ecclayout; |
372 | 373 | ||
373 | struct nand_ecc_ctrl ecc; | 374 | struct nand_ecc_ctrl ecc; |
374 | struct nand_buffers buffers; | 375 | struct nand_buffers buffers; |
@@ -522,7 +523,7 @@ extern int nand_do_read(struct mtd_info *mtd, loff_t from, size_t len, | |||
522 | * @partitions: mtd partition list | 523 | * @partitions: mtd partition list |
523 | * @chip_delay: R/B delay value in us | 524 | * @chip_delay: R/B delay value in us |
524 | * @options: Option flags, e.g. 16bit buswidth | 525 | * @options: Option flags, e.g. 16bit buswidth |
525 | * @oobinfo: oob info structure (ecc placement) | 526 | * @ecclayout: ecc layout info structure |
526 | * @priv: hardware controller specific settings | 527 | * @priv: hardware controller specific settings |
527 | */ | 528 | */ |
528 | struct platform_nand_chip { | 529 | struct platform_nand_chip { |
@@ -530,7 +531,7 @@ struct platform_nand_chip { | |||
530 | int chip_offset; | 531 | int chip_offset; |
531 | int nr_partitions; | 532 | int nr_partitions; |
532 | struct mtd_partition *partitions; | 533 | struct mtd_partition *partitions; |
533 | struct nand_oobinfo *oobinfo; | 534 | struct nand_ecclayout *ecclayout; |
534 | int chip_delay; | 535 | int chip_delay; |
535 | unsigned int options; | 536 | unsigned int options; |
536 | void *priv; | 537 | void *priv; |
diff --git a/include/linux/mtd/nftl.h b/include/linux/mtd/nftl.h index d35d2c21ff3e..bcf2fb3fa4a7 100644 --- a/include/linux/mtd/nftl.h +++ b/include/linux/mtd/nftl.h | |||
@@ -37,7 +37,7 @@ struct NFTLrecord { | |||
37 | unsigned int nb_blocks; /* number of physical blocks */ | 37 | unsigned int nb_blocks; /* number of physical blocks */ |
38 | unsigned int nb_boot_blocks; /* number of blocks used by the bios */ | 38 | unsigned int nb_boot_blocks; /* number of blocks used by the bios */ |
39 | struct erase_info instr; | 39 | struct erase_info instr; |
40 | struct nand_oobinfo oobinfo; | 40 | struct nand_ecclayout oobinfo; |
41 | }; | 41 | }; |
42 | 42 | ||
43 | int NFTL_mount(struct NFTLrecord *s); | 43 | int NFTL_mount(struct NFTLrecord *s); |
diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h index 3f5919f2e9da..9ce9a48db444 100644 --- a/include/linux/mtd/onenand.h +++ b/include/linux/mtd/onenand.h | |||
@@ -77,7 +77,7 @@ struct onenand_bufferram { | |||
77 | * @param chip_lock [INTERN] spinlock used to protect access to this structure and the chip | 77 | * @param chip_lock [INTERN] spinlock used to protect access to this structure and the chip |
78 | * @param wq [INTERN] wait queue to sleep on if a OneNAND operation is in progress | 78 | * @param wq [INTERN] wait queue to sleep on if a OneNAND operation is in progress |
79 | * @param state [INTERN] the current state of the OneNAND device | 79 | * @param state [INTERN] the current state of the OneNAND device |
80 | * @param autooob [REPLACEABLE] the default (auto)placement scheme | 80 | * @param ecclayout [REPLACEABLE] the default ecc placement scheme |
81 | * @param bbm [REPLACEABLE] pointer to Bad Block Management | 81 | * @param bbm [REPLACEABLE] pointer to Bad Block Management |
82 | * @param priv [OPTIONAL] pointer to private chip date | 82 | * @param priv [OPTIONAL] pointer to private chip date |
83 | */ | 83 | */ |
@@ -113,9 +113,9 @@ struct onenand_chip { | |||
113 | onenand_state_t state; | 113 | onenand_state_t state; |
114 | unsigned char *page_buf; | 114 | unsigned char *page_buf; |
115 | 115 | ||
116 | struct nand_oobinfo *autooob; | 116 | struct nand_ecclayout *ecclayout; |
117 | 117 | ||
118 | void *bbm; | 118 | void *bbm; |
119 | 119 | ||
120 | void *priv; | 120 | void *priv; |
121 | }; | 121 | }; |
diff --git a/include/linux/mtd/partitions.h b/include/linux/mtd/partitions.h index b03f512d51b9..da6b3d6f12a7 100644 --- a/include/linux/mtd/partitions.h +++ b/include/linux/mtd/partitions.h | |||
@@ -41,7 +41,7 @@ struct mtd_partition { | |||
41 | u_int32_t size; /* partition size */ | 41 | u_int32_t size; /* partition size */ |
42 | u_int32_t offset; /* offset within the master MTD space */ | 42 | u_int32_t offset; /* offset within the master MTD space */ |
43 | u_int32_t mask_flags; /* master MTD flags to mask out for this partition */ | 43 | u_int32_t mask_flags; /* master MTD flags to mask out for this partition */ |
44 | struct nand_oobinfo *oobsel; /* out of band layout for this partition (NAND only)*/ | 44 | struct nand_ecclayout *ecclayout; /* out of band layout for this partition (NAND only)*/ |
45 | struct mtd_info **mtdp; /* pointer to store the MTD object */ | 45 | struct mtd_info **mtdp; /* pointer to store the MTD object */ |
46 | }; | 46 | }; |
47 | 47 | ||