aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/nand/sh_flctl.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/mtd/nand/sh_flctl.c b/drivers/mtd/nand/sh_flctl.c
index c835b136e7c..b3666be0ccf 100644
--- a/drivers/mtd/nand/sh_flctl.c
+++ b/drivers/mtd/nand/sh_flctl.c
@@ -44,11 +44,17 @@ static struct nand_ecclayout flctl_4secc_oob_16 = {
44}; 44};
45 45
46static struct nand_ecclayout flctl_4secc_oob_64 = { 46static struct nand_ecclayout flctl_4secc_oob_64 = {
47 .eccbytes = 10, 47 .eccbytes = 4 * 10,
48 .eccpos = {48, 49, 50, 51, 52, 53, 54, 55, 56, 57}, 48 .eccpos = {
49 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
50 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
51 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
52 54, 55, 56, 57, 58, 59, 60, 61, 62, 63 },
49 .oobfree = { 53 .oobfree = {
50 {.offset = 60, 54 {.offset = 2, .length = 4},
51 . length = 4} }, 55 {.offset = 16, .length = 6},
56 {.offset = 32, .length = 6},
57 {.offset = 48, .length = 6} },
52}; 58};
53 59
54static uint8_t scan_ff_pattern[] = { 0xff, 0xff }; 60static uint8_t scan_ff_pattern[] = { 0xff, 0xff };
@@ -62,7 +68,7 @@ static struct nand_bbt_descr flctl_4secc_smallpage = {
62 68
63static struct nand_bbt_descr flctl_4secc_largepage = { 69static struct nand_bbt_descr flctl_4secc_largepage = {
64 .options = NAND_BBT_SCAN2NDPAGE, 70 .options = NAND_BBT_SCAN2NDPAGE,
65 .offs = 58, 71 .offs = 0,
66 .len = 2, 72 .len = 2,
67 .pattern = scan_ff_pattern, 73 .pattern = scan_ff_pattern,
68}; 74};
@@ -832,7 +838,7 @@ static int flctl_chip_init_tail(struct mtd_info *mtd)
832 chip->ecc.mode = NAND_ECC_HW; 838 chip->ecc.mode = NAND_ECC_HW;
833 839
834 /* 4 symbols ECC enabled */ 840 /* 4 symbols ECC enabled */
835 flctl->flcmncr_base |= _4ECCEN | ECCPOS2 | ECCPOS_02; 841 flctl->flcmncr_base |= _4ECCEN;
836 } else { 842 } else {
837 chip->ecc.mode = NAND_ECC_SOFT; 843 chip->ecc.mode = NAND_ECC_SOFT;
838 } 844 }