summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorWu, Josh <Josh.wu@atmel.com>2013-07-03 11:11:45 +0800
committerAndreas Bießmann <andreas.devel@googlemail.com>2013-08-22 16:50:16 +0200
commitb2d96dc28ffb2acad250ffb551a442396db83f38 (patch)
treebecd244bf5b62cc9f81ec95109b937ca12741479 /drivers
parentce76f0aac6b340582f9f08cf6c3d063df97e419f (diff)
downloadblackbird-obmc-uboot-b2d96dc28ffb2acad250ffb551a442396db83f38.tar.gz
blackbird-obmc-uboot-b2d96dc28ffb2acad250ffb551a442396db83f38.zip
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> Acked-by: Scott Wood <scottwood@freescale.com> [rebased on master] Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/nand/atmel_nand.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index f844990e38..304491bcb4 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -637,7 +637,10 @@ static int atmel_pmecc_nand_init_params(struct nand_chip *nand,
cap = host->pmecc_corr_cap = CONFIG_PMECC_CAP;
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",
OpenPOWER on IntegriCloud