aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mtd/devices/doc2000.c1
-rw-r--r--drivers/mtd/devices/doc2001.c1
-rw-r--r--drivers/mtd/devices/doc2001plus.c1
-rw-r--r--drivers/mtd/mtdchar.c5
-rw-r--r--drivers/mtd/mtdconcat.c4
-rw-r--r--drivers/mtd/mtdpart.c2
-rw-r--r--drivers/mtd/nand/nand_base.c1
-rw-r--r--drivers/mtd/onenand/onenand_base.c1
-rw-r--r--include/linux/mtd/mtd.h2
-rw-r--r--include/mtd/mtd-abi.h8
10 files changed, 5 insertions, 21 deletions
diff --git a/drivers/mtd/devices/doc2000.c b/drivers/mtd/devices/doc2000.c
index 603a7951ac9b..8a0c4dec6351 100644
--- a/drivers/mtd/devices/doc2000.c
+++ b/drivers/mtd/devices/doc2000.c
@@ -569,7 +569,6 @@ void DoC2k_init(struct mtd_info *mtd)
569 569
570 mtd->type = MTD_NANDFLASH; 570 mtd->type = MTD_NANDFLASH;
571 mtd->flags = MTD_CAP_NANDFLASH; 571 mtd->flags = MTD_CAP_NANDFLASH;
572 mtd->ecctype = MTD_ECC_RS_DiskOnChip;
573 mtd->size = 0; 572 mtd->size = 0;
574 mtd->erasesize = 0; 573 mtd->erasesize = 0;
575 mtd->writesize = 512; 574 mtd->writesize = 512;
diff --git a/drivers/mtd/devices/doc2001.c b/drivers/mtd/devices/doc2001.c
index 0e2a9326f717..22a3b9e6aaaf 100644
--- a/drivers/mtd/devices/doc2001.c
+++ b/drivers/mtd/devices/doc2001.c
@@ -349,7 +349,6 @@ void DoCMil_init(struct mtd_info *mtd)
349 349
350 mtd->type = MTD_NANDFLASH; 350 mtd->type = MTD_NANDFLASH;
351 mtd->flags = MTD_CAP_NANDFLASH; 351 mtd->flags = MTD_CAP_NANDFLASH;
352 mtd->ecctype = MTD_ECC_RS_DiskOnChip;
353 mtd->size = 0; 352 mtd->size = 0;
354 353
355 /* FIXME: erase size is not always 8KiB */ 354 /* FIXME: erase size is not always 8KiB */
diff --git a/drivers/mtd/devices/doc2001plus.c b/drivers/mtd/devices/doc2001plus.c
index 92dbb47f2ac3..01185593b2c2 100644
--- a/drivers/mtd/devices/doc2001plus.c
+++ b/drivers/mtd/devices/doc2001plus.c
@@ -473,7 +473,6 @@ void DoCMilPlus_init(struct mtd_info *mtd)
473 473
474 mtd->type = MTD_NANDFLASH; 474 mtd->type = MTD_NANDFLASH;
475 mtd->flags = MTD_CAP_NANDFLASH; 475 mtd->flags = MTD_CAP_NANDFLASH;
476 mtd->ecctype = MTD_ECC_RS_DiskOnChip;
477 mtd->size = 0; 476 mtd->size = 0;
478 477
479 mtd->erasesize = 0; 478 mtd->erasesize = 0;
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c
index 3013d0883b97..3731523ec11f 100644
--- a/drivers/mtd/mtdchar.c
+++ b/drivers/mtd/mtdchar.c
@@ -419,8 +419,9 @@ static int mtd_ioctl(struct inode *inode, struct file *file,
419 info.erasesize = mtd->erasesize; 419 info.erasesize = mtd->erasesize;
420 info.writesize = mtd->writesize; 420 info.writesize = mtd->writesize;
421 info.oobsize = mtd->oobsize; 421 info.oobsize = mtd->oobsize;
422 info.ecctype = mtd->ecctype; 422 /* The below fields are obsolete */
423 info.eccsize = mtd->eccsize; 423 info.ecctype = -1;
424 info.eccsize = 0;
424 if (copy_to_user(argp, &info, sizeof(struct mtd_info_user))) 425 if (copy_to_user(argp, &info, sizeof(struct mtd_info_user)))
425 return -EFAULT; 426 return -EFAULT;
426 break; 427 break;
diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c
index 06902683bc2a..880580c44e01 100644
--- a/drivers/mtd/mtdconcat.c
+++ b/drivers/mtd/mtdconcat.c
@@ -727,8 +727,6 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[], /* subdevices to c
727 concat->mtd.erasesize = subdev[0]->erasesize; 727 concat->mtd.erasesize = subdev[0]->erasesize;
728 concat->mtd.writesize = subdev[0]->writesize; 728 concat->mtd.writesize = subdev[0]->writesize;
729 concat->mtd.oobsize = subdev[0]->oobsize; 729 concat->mtd.oobsize = subdev[0]->oobsize;
730 concat->mtd.ecctype = subdev[0]->ecctype;
731 concat->mtd.eccsize = subdev[0]->eccsize;
732 if (subdev[0]->writev) 730 if (subdev[0]->writev)
733 concat->mtd.writev = concat_writev; 731 concat->mtd.writev = concat_writev;
734 if (subdev[0]->read_oob) 732 if (subdev[0]->read_oob)
@@ -774,8 +772,6 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[], /* subdevices to c
774 if (concat->mtd.writesize != subdev[i]->writesize || 772 if (concat->mtd.writesize != subdev[i]->writesize ||
775 concat->mtd.subpage_sft != subdev[i]->subpage_sft || 773 concat->mtd.subpage_sft != subdev[i]->subpage_sft ||
776 concat->mtd.oobsize != subdev[i]->oobsize || 774 concat->mtd.oobsize != subdev[i]->oobsize ||
777 concat->mtd.ecctype != subdev[i]->ecctype ||
778 concat->mtd.eccsize != subdev[i]->eccsize ||
779 !concat->mtd.read_oob != !subdev[i]->read_oob || 775 !concat->mtd.read_oob != !subdev[i]->read_oob ||
780 !concat->mtd.write_oob != !subdev[i]->write_oob) { 776 !concat->mtd.write_oob != !subdev[i]->write_oob) {
781 kfree(concat); 777 kfree(concat);
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index bafd2fba87bd..633def3fb087 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -338,8 +338,6 @@ int add_mtd_partitions(struct mtd_info *master,
338 slave->mtd.size = parts[i].size; 338 slave->mtd.size = parts[i].size;
339 slave->mtd.writesize = master->writesize; 339 slave->mtd.writesize = master->writesize;
340 slave->mtd.oobsize = master->oobsize; 340 slave->mtd.oobsize = master->oobsize;
341 slave->mtd.ecctype = master->ecctype;
342 slave->mtd.eccsize = master->eccsize;
343 slave->mtd.subpage_sft = master->subpage_sft; 341 slave->mtd.subpage_sft = master->subpage_sft;
344 342
345 slave->mtd.name = parts[i].name; 343 slave->mtd.name = parts[i].name;
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index c13d66426360..acaf97bc80d1 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -2566,7 +2566,6 @@ int nand_scan_tail(struct mtd_info *mtd)
2566 /* Fill in remaining MTD driver data */ 2566 /* Fill in remaining MTD driver data */
2567 mtd->type = MTD_NANDFLASH; 2567 mtd->type = MTD_NANDFLASH;
2568 mtd->flags = MTD_CAP_NANDFLASH; 2568 mtd->flags = MTD_CAP_NANDFLASH;
2569 mtd->ecctype = MTD_ECC_SW;
2570 mtd->erase = nand_erase; 2569 mtd->erase = nand_erase;
2571 mtd->point = NULL; 2570 mtd->point = NULL;
2572 mtd->unpoint = NULL; 2571 mtd->unpoint = NULL;
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index a7645794364c..a2342ddc62e7 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -2373,7 +2373,6 @@ int onenand_scan(struct mtd_info *mtd, int maxchips)
2373 /* Fill in remaining MTD driver data */ 2373 /* Fill in remaining MTD driver data */
2374 mtd->type = MTD_NANDFLASH; 2374 mtd->type = MTD_NANDFLASH;
2375 mtd->flags = MTD_CAP_NANDFLASH; 2375 mtd->flags = MTD_CAP_NANDFLASH;
2376 mtd->ecctype = MTD_ECC_SW;
2377 mtd->erase = onenand_erase; 2376 mtd->erase = onenand_erase;
2378 mtd->point = NULL; 2377 mtd->point = NULL;
2379 mtd->unpoint = NULL; 2378 mtd->unpoint = NULL;
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index afab253ad60e..8a2e8bfc1e56 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -117,8 +117,6 @@ struct mtd_info {
117 u_int32_t writesize; 117 u_int32_t writesize;
118 118
119 u_int32_t oobsize; // Amount of OOB data per block (e.g. 16) 119 u_int32_t oobsize; // Amount of OOB data per block (e.g. 16)
120 u_int32_t ecctype;
121 u_int32_t eccsize;
122 120
123 // Kernel-only stuff starts here. 121 // Kernel-only stuff starts here.
124 char *name; 122 char *name;
diff --git a/include/mtd/mtd-abi.h b/include/mtd/mtd-abi.h
index f913c30d7b89..8e501a75a764 100644
--- a/include/mtd/mtd-abi.h
+++ b/include/mtd/mtd-abi.h
@@ -36,12 +36,6 @@ struct mtd_oob_buf {
36#define MTD_CAP_NORFLASH (MTD_WRITEABLE | MTD_BIT_WRITEABLE) 36#define MTD_CAP_NORFLASH (MTD_WRITEABLE | MTD_BIT_WRITEABLE)
37#define MTD_CAP_NANDFLASH (MTD_WRITEABLE) 37#define MTD_CAP_NANDFLASH (MTD_WRITEABLE)
38 38
39
40// Types of automatic ECC/Checksum available
41#define MTD_ECC_NONE 0 // No automatic ECC available
42#define MTD_ECC_RS_DiskOnChip 1 // Automatic ECC on DiskOnChip
43#define MTD_ECC_SW 2 // SW ECC for Toshiba & Samsung devices
44
45/* ECC byte placement */ 39/* ECC byte placement */
46#define MTD_NANDECC_OFF 0 // Switch off ECC (Not recommended) 40#define MTD_NANDECC_OFF 0 // Switch off ECC (Not recommended)
47#define MTD_NANDECC_PLACE 1 // Use the given placement in the structure (YAFFS1 legacy mode) 41#define MTD_NANDECC_PLACE 1 // Use the given placement in the structure (YAFFS1 legacy mode)
@@ -61,6 +55,8 @@ struct mtd_info_user {
61 uint32_t erasesize; 55 uint32_t erasesize;
62 uint32_t writesize; 56 uint32_t writesize;
63 uint32_t oobsize; // Amount of OOB data per block (e.g. 16) 57 uint32_t oobsize; // Amount of OOB data per block (e.g. 16)
58 /* The below two fields are obsolete and broken, do not use them
59 * (TODO: remove at some point) */
64 uint32_t ecctype; 60 uint32_t ecctype;
65 uint32_t eccsize; 61 uint32_t eccsize;
66}; 62};