Skip to content
Unverified Commit f3aff376 authored by Miquel Raynal's avatar Miquel Raynal Committed by Maxime Ripard
Browse files

mtd: nand: sunxi: fix ECC strength choice



When the requested ECC strength does not exactly match the strengths
supported by the ECC engine, the driver is selecting the closest
strength meeting the 'selected_strength > requested_strength'
constraint. Fix the fact that, in this particular case, ecc->strength
value was not updated to match the 'selected_strength'.

For instance, one can encounter this issue when no ECC requirement is
filled in the device tree while the NAND chip minimum requirement is not
a strength/step_size combo natively supported by the ECC engine.

Suggested-by: default avatarBoris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Acked-by: default avatarBoris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Maxime Ripard's avatarMaxime Ripard <maxime.ripard@bootlin.com>
parent 55fe0e2b
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