From mboxrd@z Thu Jan 1 00:00:00 1970 From: Miquel Raynal Date: Tue, 26 Jun 2018 09:54:26 +0200 Subject: [U-Boot] [RFC PATCH 15/20] mtd: spinand: Add initial support for the MX35LF2GE4AB chip In-Reply-To: <20180622140336.3b9bfba0@bbrezillon> References: <20180606153040.21397-1-miquel.raynal@bootlin.com> <20180606153040.21397-16-miquel.raynal@bootlin.com> <20180622140336.3b9bfba0@bbrezillon> Message-ID: <20180626095426.2940e820@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 Hi Boris, On Fri, 22 Jun 2018 14:03:36 +0200, Boris Brezillon wrote: > On Wed, 6 Jun 2018 17:30:35 +0200 > Miquel Raynal wrote: >=20 > > Add support for the MX35LF2GE4AB chip, which is similar to its cousin > > MX35LF1GE4AB, with two planes instead of one. > >=20 > > Signed-off-by: Miquel Raynal > > --- > > drivers/mtd/nand/spi/macronix.c | 20 ++++++++++++++------ > > 1 file changed, 14 insertions(+), 6 deletions(-) > >=20 > > diff --git a/drivers/mtd/nand/spi/macronix.c b/drivers/mtd/nand/spi/mac= ronix.c > > index dd351dcb6c..d761b99d26 100644 > > --- a/drivers/mtd/nand/spi/macronix.c > > +++ b/drivers/mtd/nand/spi/macronix.c > > @@ -27,13 +27,13 @@ static SPINAND_OP_VARIANTS(update_cache_variants, > > SPINAND_PROG_LOAD_X4(false, 0, NULL, 0), > > SPINAND_PROG_LOAD(false, 0, NULL, 0)); > > =20 > > -static int mx35lf1ge4ab_ooblayout_ecc(struct mtd_info *mtd, int sectio= n, > > +static int mx35lfxge4ab_ooblayout_ecc(struct mtd_info *mtd, int sectio= n, > > struct mtd_oob_region *region) > > { > > return -ERANGE; > > } > > =20 > > -static int mx35lf1ge4ab_ooblayout_free(struct mtd_info *mtd, int secti= on, > > +static int mx35lfxge4ab_ooblayout_free(struct mtd_info *mtd, int secti= on, > > struct mtd_oob_region *region) > > { > > if (section) > > @@ -45,9 +45,9 @@ static int mx35lf1ge4ab_ooblayout_free(struct mtd_inf= o *mtd, int section, > > return 0; > > } > > =20 > > -static const struct mtd_ooblayout_ops mx35lf1ge4ab_ooblayout =3D { > > - .ecc =3D mx35lf1ge4ab_ooblayout_ecc, > > - .free =3D mx35lf1ge4ab_ooblayout_free, > > +static const struct mtd_ooblayout_ops mx35lfxge4ab_ooblayout =3D { > > + .ecc =3D mx35lfxge4ab_ooblayout_ecc, > > + .free =3D mx35lfxge4ab_ooblayout_free, > > }; > > =20 > > static int mx35lf1ge4ab_get_eccsr(struct spinand_device *spinand, u8 *= eccsr) > > @@ -102,8 +102,16 @@ static const struct spinand_info macronix_spinand_= table[] =3D { > > &write_cache_variants, > > &update_cache_variants), > > SPINAND_HAS_QE_BIT, > > - SPINAND_ECCINFO(&mx35lf1ge4ab_ooblayout, > > + SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout, > > mx35lf1ge4ab_ecc_get_status)), > > + SPINAND_INFO("MX35LF2GE4AB", 0x22, > > + NAND_MEMORG(1, 2048, 64, 64, 1024, 2, 1, 1), =20 >=20 > I think it should be 2048 here ^. I just checked, I think you are right. I'll edit this for the next version. Thanks, Miqu=C3=A8l