aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/sharpsl.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@cruncher.tec.linutronix.de>2006-05-23 06:00:46 -0400
committerThomas Gleixner <tglx@cruncher.tec.linutronix.de>2006-05-23 06:00:46 -0400
commit6dfc6d250d0b7ebaa6423c44dcd09fcfe68deabd (patch)
tree2be25b1e302eca5984a8ad5ed3e5bde77bafaabb /drivers/mtd/nand/sharpsl.c
parent7aa65bfd6793a56cc3bbce8436abbfea3a7bdd1f (diff)
[MTD] NAND modularize ECC
First step of modularizing ECC support. - Move ECC related functionality into a seperate embedded data structure - Get rid of the hardware dependend constants to simplify new ECC models Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/mtd/nand/sharpsl.c')
-rw-r--r--drivers/mtd/nand/sharpsl.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/mtd/nand/sharpsl.c b/drivers/mtd/nand/sharpsl.c
index 60e10c0d6980..5554d0b97c8c 100644
--- a/drivers/mtd/nand/sharpsl.c
+++ b/drivers/mtd/nand/sharpsl.c
@@ -201,15 +201,17 @@ static int __init sharpsl_nand_init(void)
201 /* 15 us command delay time */ 201 /* 15 us command delay time */
202 this->chip_delay = 15; 202 this->chip_delay = 15;
203 /* set eccmode using hardware ECC */ 203 /* set eccmode using hardware ECC */
204 this->eccmode = NAND_ECC_HW3_256; 204 this->ecc.mode = NAND_ECC_HW;
205 this->ecc.size = 256;
206 this->ecc.bytes = 3;
205 this->badblock_pattern = &sharpsl_bbt; 207 this->badblock_pattern = &sharpsl_bbt;
206 if (machine_is_akita() || machine_is_borzoi()) { 208 if (machine_is_akita() || machine_is_borzoi()) {
207 this->badblock_pattern = &sharpsl_akita_bbt; 209 this->badblock_pattern = &sharpsl_akita_bbt;
208 this->autooob = &akita_oobinfo; 210 this->autooob = &akita_oobinfo;
209 } 211 }
210 this->enable_hwecc = sharpsl_nand_enable_hwecc; 212 this->ecc.hwctl = sharpsl_nand_enable_hwecc;
211 this->calculate_ecc = sharpsl_nand_calculate_ecc; 213 this->ecc.calculate = sharpsl_nand_calculate_ecc;
212 this->correct_data = nand_correct_data; 214 this->ecc.correct = nand_correct_data;
213 215
214 /* Scan to find existence of the device */ 216 /* Scan to find existence of the device */
215 err = nand_scan(sharpsl_mtd, 1); 217 err = nand_scan(sharpsl_mtd, 1);