summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAlbert ARIBAUD <albert.u.boot@aribaud.net>2013-09-05 12:04:49 +0200
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2013-09-05 12:04:49 +0200
commitf0f102fde85aca438f4322893729f28135bf3c61 (patch)
tree46fa6efb55aae1ffc38278b4cf660367d8001e7e /drivers
parent19d829fa60fc4e6df514a046142faaaf9fc8185d (diff)
parent27871e6b519ccd933bd91c879241995c272fef3b (diff)
downloadu-boot-imx-f0f102fde85aca438f4322893729f28135bf3c61.zip
u-boot-imx-f0f102fde85aca438f4322893729f28135bf3c61.tar.gz
u-boot-imx-f0f102fde85aca438f4322893729f28135bf3c61.tar.bz2
Merge branch 'u-boot-atmel/master' into 'u-boot-arm/master'
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/nand/atmel_nand.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index 96aca00..da83f06 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -827,7 +827,8 @@ static int atmel_pmecc_nand_init_params(struct nand_chip *nand,
switch (mtd->writesize) {
case 2048:
case 4096:
- host->pmecc_degree = PMECC_GF_DIMENSION_13;
+ host->pmecc_degree = (sector_size == 512) ?
+ PMECC_GF_DIMENSION_13 : PMECC_GF_DIMENSION_14;
host->pmecc_cw_len = (1 << host->pmecc_degree) - 1;
host->pmecc_sector_number = mtd->writesize / sector_size;
host->pmecc_bytes_per_sector = pmecc_get_ecc_bytes(