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 /drivers/mtd/onenand | |
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 'drivers/mtd/onenand')
-rw-r--r-- | drivers/mtd/onenand/onenand_base.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c index b24bfa6e202c..a0d3f011c0f2 100644 --- a/drivers/mtd/onenand/onenand_base.c +++ b/drivers/mtd/onenand/onenand_base.c | |||
@@ -23,8 +23,7 @@ | |||
23 | /** | 23 | /** |
24 | * onenand_oob_64 - oob info for large (2KB) page | 24 | * onenand_oob_64 - oob info for large (2KB) page |
25 | */ | 25 | */ |
26 | static struct nand_oobinfo onenand_oob_64 = { | 26 | static struct nand_ecclayout onenand_oob_64 = { |
27 | .useecc = MTD_NANDECC_AUTOPLACE, | ||
28 | .eccbytes = 20, | 27 | .eccbytes = 20, |
29 | .eccpos = { | 28 | .eccpos = { |
30 | 8, 9, 10, 11, 12, | 29 | 8, 9, 10, 11, 12, |
@@ -41,8 +40,7 @@ static struct nand_oobinfo onenand_oob_64 = { | |||
41 | /** | 40 | /** |
42 | * onenand_oob_32 - oob info for middle (1KB) page | 41 | * onenand_oob_32 - oob info for middle (1KB) page |
43 | */ | 42 | */ |
44 | static struct nand_oobinfo onenand_oob_32 = { | 43 | static struct nand_ecclayout onenand_oob_32 = { |
45 | .useecc = MTD_NANDECC_AUTOPLACE, | ||
46 | .eccbytes = 10, | 44 | .eccbytes = 10, |
47 | .eccpos = { | 45 | .eccpos = { |
48 | 8, 9, 10, 11, 12, | 46 | 8, 9, 10, 11, 12, |
@@ -1747,22 +1745,22 @@ int onenand_scan(struct mtd_info *mtd, int maxchips) | |||
1747 | 1745 | ||
1748 | switch (mtd->oobsize) { | 1746 | switch (mtd->oobsize) { |
1749 | case 64: | 1747 | case 64: |
1750 | this->autooob = &onenand_oob_64; | 1748 | this->ecclayout = &onenand_oob_64; |
1751 | break; | 1749 | break; |
1752 | 1750 | ||
1753 | case 32: | 1751 | case 32: |
1754 | this->autooob = &onenand_oob_32; | 1752 | this->ecclayout = &onenand_oob_32; |
1755 | break; | 1753 | break; |
1756 | 1754 | ||
1757 | default: | 1755 | default: |
1758 | printk(KERN_WARNING "No OOB scheme defined for oobsize %d\n", | 1756 | printk(KERN_WARNING "No OOB scheme defined for oobsize %d\n", |
1759 | mtd->oobsize); | 1757 | mtd->oobsize); |
1760 | /* To prevent kernel oops */ | 1758 | /* To prevent kernel oops */ |
1761 | this->autooob = &onenand_oob_32; | 1759 | this->ecclayout = &onenand_oob_32; |
1762 | break; | 1760 | break; |
1763 | } | 1761 | } |
1764 | 1762 | ||
1765 | mtd->oobinfo = this->autooob; | 1763 | mtd->ecclayout = this->ecclayout; |
1766 | 1764 | ||
1767 | /* Fill in remaining MTD driver data */ | 1765 | /* Fill in remaining MTD driver data */ |
1768 | mtd->type = MTD_NANDFLASH; | 1766 | mtd->type = MTD_NANDFLASH; |