Re: [U-Boot] [PATCH v2 20/21] cmd: mtd: add 'mtd' command

2018-07-12 Thread Miquel Raynal
Hi Boris, > > > + > > > + if (full_erase) { > > > + off = 0; > > > + len = mtd->size; > > > + } > > > + > > > + if ((u32)off % mtd->erasesize) { > > > > Sounds dangerous. We have 8GB NANDs on sunxi platforms... > > [...] > > > > + >

Re: [U-Boot] [PATCH v2 20/21] cmd: mtd: add 'mtd' command

2018-07-12 Thread Miquel Raynal
Hi Boris, Boris Brezillon wrote on Thu, 12 Jul 2018 00:42:13 +0200: > On Wed, 11 Jul 2018 17:25:28 +0200 > Miquel Raynal wrote: > > > + > > +static void mtd_show_device(struct mtd_info *mtd) > > +{ > > + printf("* %s", mtd->name); > > Printing the device type might be interesting? And

Re: [U-Boot] [PATCH v2 20/21] cmd: mtd: add 'mtd' command

2018-07-11 Thread Boris Brezillon
On Wed, 11 Jul 2018 17:25:28 +0200 Miquel Raynal wrote: > + > +static void mtd_show_device(struct mtd_info *mtd) > +{ > + printf("* %s", mtd->name); Printing the device type might be interesting? And maybe also the size, writesize, oobsize and erasesize? > + if (mtd->dev) > +

[U-Boot] [PATCH v2 20/21] cmd: mtd: add 'mtd' command

2018-07-11 Thread Miquel Raynal
There should not be a 'nand' command, a 'sf' command and certainly not another 'spi-nand'. Write a 'mtd' command instead to manage all MTD devices at once. This should be the preferred way to access any MTD device. Signed-off-by: Miquel Raynal --- cmd/Kconfig | 5 + cmd/Makefile