diff options
author | Josh Wu <josh.wu@atmel.com> | 2013-03-22 17:05:54 +0800 |
---|---|---|
committer | Josh Wu <josh.wu@atmel.com> | 2013-03-22 17:05:54 +0800 |
commit | b887fcac6a9665ebcd3a755f29ed06e13fcf76a7 (patch) | |
tree | f3e412d89c956a99c54ac78e3ad683c86e14d665 /drivers | |
parent | 33a303c268ff2e9711a8d79c4253cb336ae20fcb (diff) |
ARM: at91: atmel_nand: pmecc driver will select the galois table by sector size
Define the galois index table offset in chip head file. So user do not need
to set by himself. Driver will set it correctly according to sector_size.
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/nand/atmel_nand.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c index aff9aa028fb..f7e61998bd2 100644 --- a/drivers/mtd/nand/atmel_nand.c +++ b/drivers/mtd/nand/atmel_nand.c @@ -737,7 +737,10 @@ static int atmel_pmecc_nand_init_params(struct nand_chip *nand, #endif sector_size = host->pmecc_sector_size = CONFIG_PMECC_SECTOR_SIZE; - host->pmecc_index_table_offset = CONFIG_PMECC_INDEX_TABLE_OFFSET; + if (host->pmecc_sector_size == 512) + host->pmecc_index_table_offset = ATMEL_PMECC_INDEX_OFFSET_512; + else + host->pmecc_index_table_offset = ATMEL_PMECC_INDEX_OFFSET_1024; MTDDEBUG(MTD_DEBUG_LEVEL1, "Initialize PMECC params, cap: %d, sector: %d\n", |