Commit edc9cba4 authored by Josh Wu's avatar Josh Wu Committed by David Woodhouse

mtd: atmel_nand: fix pmecc selction for ecc requirement typo

Atmel PMECC support 2, 4, 8, 12, 24 bit error correction.
So if the ecc requirement in ONFI is <= 2, 4, 8, 12, 24.
We will use 2, 4, 8, 12, 24.

This patch fix the typo. Use '<=' replace '<'.
Reported-by: default avatarScott Wood <scottwood@freescale.com>
Signed-off-by: default avatarJosh Wu <josh.wu@atmel.com>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 68e80780
......@@ -959,11 +959,11 @@ static int pmecc_choose_ecc(struct atmel_nand_host *host,
host->pmecc_corr_cap = 2;
else if (*cap <= 4)
host->pmecc_corr_cap = 4;
else if (*cap < 8)
else if (*cap <= 8)
host->pmecc_corr_cap = 8;
else if (*cap < 12)
else if (*cap <= 12)
host->pmecc_corr_cap = 12;
else if (*cap < 24)
else if (*cap <= 24)
host->pmecc_corr_cap = 24;
else
return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment