From mboxrd@z Thu Jan 1 00:00:00 1970 From: Miquel Raynal Date: Mon, 1 Oct 2018 22:39:19 +0200 Subject: [U-Boot] [PATCH v13 5/7] cmd: mtd: add 'mtd' command In-Reply-To: <16313623-bde3-7913-dcbc-5fe55d4485e7@openedev.com> References: <20181001134331.9756-1-miquel.raynal@bootlin.com> <20181001134331.9756-6-miquel.raynal@bootlin.com> <16313623-bde3-7913-dcbc-5fe55d4485e7@openedev.com> Message-ID: <20181001223919.33608114@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 Jagan, Jagan Teki wrote on Mon, 1 Oct 2018 21:49:32 +0530: > On Monday 01 October 2018 07:13 PM, Miquel Raynal wrote: > > There should not be a 'nand' command, a 'sf' command and certainly not > > a new 'spi-nand' command. Write a 'mtd' command instead to manage all > > MTD devices/partitions at once. This should be the preferred way to > > access any MTD device. =20 > > > Signed-off-by: Miquel Raynal =20 > > Acked-by: Jagan Teki > > Reviewed-by: Stefan Roese > > Reviewed-by: Boris Brezillon > > --- =20 >=20 > [snip] >=20 > > > static int get_part(const char *partname, int *idx, loff_t *off, = loff_t *size, =20 > > diff --git a/include/mtd.h b/include/mtd.h > > index 6e6da3002f..011f26b3e1 100644 > > --- a/include/mtd.h > > +++ b/include/mtd.h > > @@ -8,6 +8,9 @@ =20 > > > #include > > > +struct udevice; =20 > > + > > +#if defined(CONFIG_DM) =20 >=20 > it should be CONFIG_MTD. Same, I don't mind. >=20 > > /* > > * Get mtd_info structure of the dev, which is stored as uclass priva= te. > > * > > @@ -20,5 +23,18 @@ static inline struct mtd_info *mtd_get_info(struct u= device *dev) > > } =20 > > > int mtd_probe(struct udevice *dev); =20 > [...] =20 >=20 > there is not caller for this in non-dm, better this block empty is it? So I can't remove mtd_get_info() which has no callers at all but you want to remove the dummy helper which is not used when DM is not enabled? I have no problem with that, but the logic is not very coherent. >=20 > Let me know so-that I can do that and apply. Yes please, you can amend this patch and apply it. BTW, the build is successful with all configurations -> https://travis-ci.org/miquelraynal/u-boot/builds/435575048 Thanks, Miqu=C3=A8l