aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 13:07:49 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 13:07:49 -0400
commita7c367b95a9d8e65e0f0e7da31f700a556794efb (patch)
tree5b1bb202801e29e3237381aa7aad5aa288378d5b /include
parent15f964bed054821d6d940d3752508c5f96a9ffd3 (diff)
parente1070211f7327a1f197d535aa886f721a241c32f (diff)
Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6: (58 commits) mtd: jedec_probe: add PSD4256G6V id mtd: OneNand support for Nomadik 8815 SoC (on NHK8815 board) mtd: nand: driver for Nomadik 8815 SoC (on NHK8815 board) m25p80: Add Spansion S25FL129P serial flashes jffs2: Use SLAB_HWCACHE_ALIGN for jffs2_raw_{dirent,inode} slabs mtd: sh_flctl: register sh_flctl using platform_driver_probe() mtd: nand: txx9ndfmc: transfer 512 byte at a time if possible mtd: nand: fix tmio_nand ecc correction mtd: nand: add __nand_correct_data helper function mtd: cfi_cmdset_0002: add 0xFF intolerance for M29W128G mtd: inftl: fix fold chain block number mtd: jedec: fix compilation problem with I28F640C3B definition mtd: nand: fix ECC Correction bug for SMC ordering for NDFC driver mtd: ofpart: Check availability of reg property instead of name property driver/Makefile: Initialize "mtd" and "spi" before "net" mtd: omap: adding DMA mode support in nand prefetch/post-write mtd: omap: add support for nand prefetch-read and post-write mtd: add nand support for w90p910 (v2) mtd: maps: add mtd-ram support to physmap_of mtd: pxa3xx_nand: add single-bit error corrections reporting ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/mtd/nand.h5
-rw-r--r--include/linux/mtd/nand_ecc.h6
-rw-r--r--include/linux/mtd/onenand.h8
-rw-r--r--include/linux/mtd/onenand_regs.h3
4 files changed, 20 insertions, 2 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 4030ebada49e..7a232a9bdd62 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -121,6 +121,7 @@ typedef enum {
121 NAND_ECC_SOFT, 121 NAND_ECC_SOFT,
122 NAND_ECC_HW, 122 NAND_ECC_HW,
123 NAND_ECC_HW_SYNDROME, 123 NAND_ECC_HW_SYNDROME,
124 NAND_ECC_HW_OOB_FIRST,
124} nand_ecc_modes_t; 125} nand_ecc_modes_t;
125 126
126/* 127/*
@@ -271,13 +272,13 @@ struct nand_ecc_ctrl {
271 uint8_t *calc_ecc); 272 uint8_t *calc_ecc);
272 int (*read_page_raw)(struct mtd_info *mtd, 273 int (*read_page_raw)(struct mtd_info *mtd,
273 struct nand_chip *chip, 274 struct nand_chip *chip,
274 uint8_t *buf); 275 uint8_t *buf, int page);
275 void (*write_page_raw)(struct mtd_info *mtd, 276 void (*write_page_raw)(struct mtd_info *mtd,
276 struct nand_chip *chip, 277 struct nand_chip *chip,
277 const uint8_t *buf); 278 const uint8_t *buf);
278 int (*read_page)(struct mtd_info *mtd, 279 int (*read_page)(struct mtd_info *mtd,
279 struct nand_chip *chip, 280 struct nand_chip *chip,
280 uint8_t *buf); 281 uint8_t *buf, int page);
281 int (*read_subpage)(struct mtd_info *mtd, 282 int (*read_subpage)(struct mtd_info *mtd,
282 struct nand_chip *chip, 283 struct nand_chip *chip,
283 uint32_t offs, uint32_t len, 284 uint32_t offs, uint32_t len,
diff --git a/include/linux/mtd/nand_ecc.h b/include/linux/mtd/nand_ecc.h
index 090da505425d..052ea8ca2434 100644
--- a/include/linux/mtd/nand_ecc.h
+++ b/include/linux/mtd/nand_ecc.h
@@ -21,6 +21,12 @@ struct mtd_info;
21int nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code); 21int nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code);
22 22
23/* 23/*
24 * Detect and correct a 1 bit error for eccsize byte block
25 */
26int __nand_correct_data(u_char *dat, u_char *read_ecc, u_char *calc_ecc,
27 unsigned int eccsize);
28
29/*
24 * Detect and correct a 1 bit error for 256 byte block 30 * Detect and correct a 1 bit error for 256 byte block
25 */ 31 */
26int nand_correct_data(struct mtd_info *mtd, u_char *dat, u_char *read_ecc, u_char *calc_ecc); 32int nand_correct_data(struct mtd_info *mtd, u_char *dat, u_char *read_ecc, u_char *calc_ecc);
diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h
index 8ed873374381..4e49f3350678 100644
--- a/include/linux/mtd/onenand.h
+++ b/include/linux/mtd/onenand.h
@@ -214,4 +214,12 @@ unsigned onenand_block(struct onenand_chip *this, loff_t addr);
214loff_t onenand_addr(struct onenand_chip *this, int block); 214loff_t onenand_addr(struct onenand_chip *this, int block);
215int flexonenand_region(struct mtd_info *mtd, loff_t addr); 215int flexonenand_region(struct mtd_info *mtd, loff_t addr);
216 216
217struct mtd_partition;
218
219struct onenand_platform_data {
220 void (*mmcontrol)(struct mtd_info *mtd, int sync_read);
221 struct mtd_partition *parts;
222 unsigned int nr_parts;
223};
224
217#endif /* __LINUX_MTD_ONENAND_H */ 225#endif /* __LINUX_MTD_ONENAND_H */
diff --git a/include/linux/mtd/onenand_regs.h b/include/linux/mtd/onenand_regs.h
index 86a6bbef6465..acadbf53a69f 100644
--- a/include/linux/mtd/onenand_regs.h
+++ b/include/linux/mtd/onenand_regs.h
@@ -207,6 +207,9 @@
207#define ONENAND_ECC_2BIT (1 << 1) 207#define ONENAND_ECC_2BIT (1 << 1)
208#define ONENAND_ECC_2BIT_ALL (0xAAAA) 208#define ONENAND_ECC_2BIT_ALL (0xAAAA)
209#define FLEXONENAND_UNCORRECTABLE_ERROR (0x1010) 209#define FLEXONENAND_UNCORRECTABLE_ERROR (0x1010)
210#define ONENAND_ECC_3BIT (1 << 2)
211#define ONENAND_ECC_4BIT (1 << 3)
212#define ONENAND_ECC_4BIT_UNCORRECTABLE (0x1010)
210 213
211/* 214/*
212 * One-Time Programmable (OTP) 215 * One-Time Programmable (OTP)