diff options
author | Thomas Gleixner <tglx@cruncher.tec.linutronix.de> | 2006-05-23 06:00:46 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@cruncher.tec.linutronix.de> | 2006-05-23 06:00:46 -0400 |
commit | 6dfc6d250d0b7ebaa6423c44dcd09fcfe68deabd (patch) | |
tree | 2be25b1e302eca5984a8ad5ed3e5bde77bafaabb /drivers/mtd/nand/diskonchip.c | |
parent | 7aa65bfd6793a56cc3bbce8436abbfea3a7bdd1f (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/diskonchip.c')
-rw-r--r-- | drivers/mtd/nand/diskonchip.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/mtd/nand/diskonchip.c b/drivers/mtd/nand/diskonchip.c index a2391c66a63f..128c937af32f 100644 --- a/drivers/mtd/nand/diskonchip.c +++ b/drivers/mtd/nand/diskonchip.c | |||
@@ -1674,12 +1674,14 @@ static int __init doc_probe(unsigned long physadr) | |||
1674 | nand->dev_ready = doc200x_dev_ready; | 1674 | nand->dev_ready = doc200x_dev_ready; |
1675 | nand->waitfunc = doc200x_wait; | 1675 | nand->waitfunc = doc200x_wait; |
1676 | nand->block_bad = doc200x_block_bad; | 1676 | nand->block_bad = doc200x_block_bad; |
1677 | nand->enable_hwecc = doc200x_enable_hwecc; | 1677 | nand->ecc.hwctl = doc200x_enable_hwecc; |
1678 | nand->calculate_ecc = doc200x_calculate_ecc; | 1678 | nand->ecc.calculate = doc200x_calculate_ecc; |
1679 | nand->correct_data = doc200x_correct_data; | 1679 | nand->ecc.correct = doc200x_correct_data; |
1680 | 1680 | ||
1681 | nand->autooob = &doc200x_oobinfo; | 1681 | nand->autooob = &doc200x_oobinfo; |
1682 | nand->eccmode = NAND_ECC_HW6_512; | 1682 | nand->ecc.mode = NAND_ECC_HW_SYNDROME; |
1683 | nand->ecc.size = 512; | ||
1684 | nand->ecc.bytes = 6; | ||
1683 | nand->options = NAND_USE_FLASH_BBT | NAND_HWECC_SYNDROME; | 1685 | nand->options = NAND_USE_FLASH_BBT | NAND_HWECC_SYNDROME; |
1684 | 1686 | ||
1685 | doc->physadr = physadr; | 1687 | doc->physadr = physadr; |