From mboxrd@z Thu Jan 1 00:00:00 1970 From: Miquel Raynal Date: Wed, 24 Jan 2018 23:21:29 +0100 Subject: [U-Boot] [PATCH 1/8] mtd: nand: sunxi: Fix strength minimum value In-Reply-To: <20180124074618.7wf5vjda6je43fwu@flea.lan> References: <20180124004454.5759-1-miquel.raynal@free-electrons.com> <20180124004454.5759-2-miquel.raynal@free-electrons.com> <20180124074618.7wf5vjda6je43fwu@flea.lan> Message-ID: <20180124232129.10c0e606@xps13> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de Hello Maxime, On Wed, 24 Jan 2018 08:46:18 +0100 Maxime Ripard wrote: > Hi, >=20 > On Wed, Jan 24, 2018 at 01:44:47AM +0100, Miquel Raynal wrote: > > When no requirement in Device Tree is given about the ECC strength and > > step size, the engine should fallback on the minimal working case for > > this engine (16b/1024B) instead of the NAND chip requirement which might > > be simply unreachable. > >=20 > > Signed-off-by: Miquel Raynal > > --- > > drivers/mtd/nand/sunxi_nand.c | 1 + > > 1 file changed, 1 insertion(+) > >=20 > > diff --git a/drivers/mtd/nand/sunxi_nand.c b/drivers/mtd/nand/sunxi_nan= d.c > > index 8bc3828854..e8e7ad8ac5 100644 > > --- a/drivers/mtd/nand/sunxi_nand.c > > +++ b/drivers/mtd/nand/sunxi_nand.c > > @@ -1417,6 +1417,7 @@ static int sunxi_nand_hw_common_ecc_ctrl_init(str= uct mtd_info *mtd, > > goto err; > > } > > =20 > > + ecc->strength =3D strengths[i]; =20 >=20 > You should have a comment here as well mentionning why you're doing > this (your commit log would be a good start :)) Sure, I also moved that line above, where the strength is selected (with a comment). This way it seems more clear to me why this is needed. Thanks, Miqu=C3=A8l