aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/rtc_from4.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/nand/rtc_from4.c')
-rw-r--r--drivers/mtd/nand/rtc_from4.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/mtd/nand/rtc_from4.c b/drivers/mtd/nand/rtc_from4.c
index bc9d849fbd5d..a2122fe4101a 100644
--- a/drivers/mtd/nand/rtc_from4.c
+++ b/drivers/mtd/nand/rtc_from4.c
@@ -570,19 +570,21 @@ static int __init rtc_from4_init(void)
570#ifdef RTC_FROM4_HWECC 570#ifdef RTC_FROM4_HWECC
571 printk(KERN_INFO "rtc_from4_init: using hardware ECC detection.\n"); 571 printk(KERN_INFO "rtc_from4_init: using hardware ECC detection.\n");
572 572
573 this->eccmode = NAND_ECC_HW8_512; 573 this->ecc.mode = NAND_ECC_HW_SYNDROME;
574 this->ecc.size = 512;
575 this->ecc.bytes = 8;
574 this->options |= NAND_HWECC_SYNDROME; 576 this->options |= NAND_HWECC_SYNDROME;
575 /* return the status of extra status and ECC checks */ 577 /* return the status of extra status and ECC checks */
576 this->errstat = rtc_from4_errstat; 578 this->errstat = rtc_from4_errstat;
577 /* set the nand_oobinfo to support FPGA H/W error detection */ 579 /* set the nand_oobinfo to support FPGA H/W error detection */
578 this->autooob = &rtc_from4_nand_oobinfo; 580 this->autooob = &rtc_from4_nand_oobinfo;
579 this->enable_hwecc = rtc_from4_enable_hwecc; 581 this->ecc.hwctl = rtc_from4_enable_hwecc;
580 this->calculate_ecc = rtc_from4_calculate_ecc; 582 this->ecc.calculate = rtc_from4_calculate_ecc;
581 this->correct_data = rtc_from4_correct_data; 583 this->ecc.correct = rtc_from4_correct_data;
582#else 584#else
583 printk(KERN_INFO "rtc_from4_init: using software ECC detection.\n"); 585 printk(KERN_INFO "rtc_from4_init: using software ECC detection.\n");
584 586
585 this->eccmode = NAND_ECC_SOFT; 587 this->ecc.mode = NAND_ECC_SOFT;
586#endif 588#endif
587 589
588 /* set the bad block tables to support debugging */ 590 /* set the bad block tables to support debugging */