mtd: nand_mrvl_nfc: Get ecc parameters from DT
With DT helpers for ECC step size and strength, now use them on Marvell NAND driver. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
0ba6906309
commit
75783fa8d0
|
@ -994,6 +994,14 @@ static int mrvl_nand_probe_dt(struct mrvl_nand_host *host)
|
|||
if (of_get_nand_on_flash_bbt(np))
|
||||
host->flash_bbt = 1;
|
||||
|
||||
host->ecc_strength = of_get_nand_ecc_strength(np);
|
||||
if (host->ecc_strength < 0)
|
||||
host->ecc_strength = 0;
|
||||
|
||||
host->ecc_step = of_get_nand_ecc_step_size(np);
|
||||
if (host->ecc_step < 0)
|
||||
host->ecc_step = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue