Re: [U-Boot] [PATCH v13 5/7] cmd: mtd: add 'mtd' command

2018-10-08 Thread Adam Ford
On Mon, Oct 8, 2018 at 2:10 PM Thomas Petazzoni wrote: > > Hello, > > On Mon, 8 Oct 2018 19:46:27 +0200, Boris Brezillon wrote: > > > > + /* Check if mtdparts/mtdids changed since last call, otherwise: exit > > > */ > > > + if (!strcmp(mtdparts, old_mtdparts) && !strcmp(mtdids, old_mtdids))

Re: [U-Boot] [PATCH v13 5/7] cmd: mtd: add 'mtd' command

2018-10-08 Thread Thomas Petazzoni
Hello, On Mon, 8 Oct 2018 19:46:27 +0200, Boris Brezillon wrote: > > + /* Check if mtdparts/mtdids changed since last call, otherwise: exit */ > > + if (!strcmp(mtdparts, old_mtdparts) && !strcmp(mtdids, old_mtdids)) > > + return 0; > > Should be: > > if ((!mtdparts &&

Re: [U-Boot] [PATCH v13 5/7] cmd: mtd: add 'mtd' command

2018-10-08 Thread Adam Ford
On Mon, Oct 8, 2018 at 12:46 PM Boris Brezillon wrote: > > On Mon, 1 Oct 2018 15:43:29 +0200 > Miquel Raynal wrote: > > > +#if defined(CONFIG_MTD_PARTITIONS) > > +int mtd_probe_devices(void) > > +{ > > + static char *old_mtdparts; > > + static char *old_mtdids; > > + const char

Re: [U-Boot] [PATCH v13 5/7] cmd: mtd: add 'mtd' command

2018-10-08 Thread Boris Brezillon
On Mon, 1 Oct 2018 15:43:29 +0200 Miquel Raynal wrote: > +#if defined(CONFIG_MTD_PARTITIONS) > +int mtd_probe_devices(void) > +{ > + static char *old_mtdparts; > + static char *old_mtdids; > + const char *mtdparts = env_get("mtdparts"); > + const char *mtdids =

Re: [U-Boot] [PATCH v13 5/7] cmd: mtd: add 'mtd' command

2018-10-08 Thread Boris Brezillon
On Mon, 8 Oct 2018 11:58:40 -0500 Adam Ford wrote: > On Mon, Oct 8, 2018 at 11:52 AM Adam Ford wrote: > > > > On Mon, Oct 8, 2018 at 11:28 AM Boris Brezillon > > wrote: > > > > > > Hi Adam, > > > > > > On Mon, 8 Oct 2018 11:13:40 -0500 > > > Adam Ford wrote: > > > > > > > On Wed, Oct 3,

Re: [U-Boot] [PATCH v13 5/7] cmd: mtd: add 'mtd' command

2018-10-08 Thread Adam Ford
On Mon, Oct 8, 2018 at 11:52 AM Adam Ford wrote: > > On Mon, Oct 8, 2018 at 11:28 AM Boris Brezillon > wrote: > > > > Hi Adam, > > > > On Mon, 8 Oct 2018 11:13:40 -0500 > > Adam Ford wrote: > > > > > On Wed, Oct 3, 2018 at 8:41 AM Adam Ford wrote: > > > > > > > > On Wed, Oct 3, 2018 at 8:35 AM

Re: [U-Boot] [PATCH v13 5/7] cmd: mtd: add 'mtd' command

2018-10-08 Thread Adam Ford
On Mon, Oct 8, 2018 at 11:28 AM Boris Brezillon wrote: > > Hi Adam, > > On Mon, 8 Oct 2018 11:13:40 -0500 > Adam Ford wrote: > > > On Wed, Oct 3, 2018 at 8:41 AM Adam Ford wrote: > > > > > > On Wed, Oct 3, 2018 at 8:35 AM Miquel Raynal > > > wrote: > > > > > > > > Hi Adam, > > > > > > > > > >

Re: [U-Boot] [PATCH v13 5/7] cmd: mtd: add 'mtd' command

2018-10-08 Thread Boris Brezillon
Hi Adam, On Mon, 8 Oct 2018 11:13:40 -0500 Adam Ford wrote: > On Wed, Oct 3, 2018 at 8:41 AM Adam Ford wrote: > > > > On Wed, Oct 3, 2018 at 8:35 AM Miquel Raynal > > wrote: > > > > > > Hi Adam, > > > > > > > > > > > > > > > > > > > > > > > > > > > > I can use the nand read/write

Re: [U-Boot] [PATCH v13 5/7] cmd: mtd: add 'mtd' command

2018-10-08 Thread Adam Ford
On Wed, Oct 3, 2018 at 8:41 AM Adam Ford wrote: > > On Wed, Oct 3, 2018 at 8:35 AM Miquel Raynal > wrote: > > > > Hi Adam, > > > > > > > > > > > > > > > > > > > > > > > I can use the nand read/write functions and mtdparts lists the > > > > > > partitions, so I know nand works. My defconfig > >

Re: [U-Boot] [PATCH v13 5/7] cmd: mtd: add 'mtd' command

2018-10-03 Thread Adam Ford
On Wed, Oct 3, 2018 at 8:35 AM Miquel Raynal wrote: > > Hi Adam, > > > > > > > > > > > > > > > > > > I can use the nand read/write functions and mtdparts lists the > > > > > partitions, so I know nand works. My defconfig > > > > > lists the partitions, so if we're not supposed to use mtdparts,

Re: [U-Boot] [PATCH v13 5/7] cmd: mtd: add 'mtd' command

2018-10-03 Thread Miquel Raynal
Hi Adam, > > > > > > > > > > > > > I can use the nand read/write functions and mtdparts lists the > > > > partitions, so I know nand works. My defconfig > > > > lists the partitions, so if we're not supposed to use mtdparts, where > > > > I do store the partition information? > > > >

Re: [U-Boot] [PATCH v13 5/7] cmd: mtd: add 'mtd' command

2018-10-03 Thread Miquel Raynal
Hi Adam, Adam Ford wrote on Wed, 3 Oct 2018 07:47:25 -0500: > On Wed, Oct 3, 2018 at 7:43 AM Miquel Raynal > wrote: > > > > Hi Adam, > > > > Adam Ford wrote on Wed, 3 Oct 2018 07:35:15 -0500: > > > > > On Mon, Oct 1, 2018 at 8:48 AM Miquel Raynal > > > wrote: > > > > > > > > There

Re: [U-Boot] [PATCH v13 5/7] cmd: mtd: add 'mtd' command

2018-10-03 Thread Adam Ford
On Wed, Oct 3, 2018 at 7:43 AM Miquel Raynal wrote: > > Hi Adam, > > Adam Ford wrote on Wed, 3 Oct 2018 07:35:15 -0500: > > > On Mon, Oct 1, 2018 at 8:48 AM Miquel Raynal > > wrote: > > > > > > There should not be a 'nand' command, a 'sf' command and certainly not > > > a new 'spi-nand'

Re: [U-Boot] [PATCH v13 5/7] cmd: mtd: add 'mtd' command

2018-10-03 Thread Miquel Raynal
Hi Adam, Adam Ford wrote on Wed, 3 Oct 2018 07:35:15 -0500: > On Mon, Oct 1, 2018 at 8:48 AM 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

Re: [U-Boot] [PATCH v13 5/7] cmd: mtd: add 'mtd' command

2018-10-03 Thread Adam Ford
On Mon, Oct 1, 2018 at 8:48 AM 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.

Re: [U-Boot] [PATCH v13 5/7] cmd: mtd: add 'mtd' command

2018-10-01 Thread Miquel Raynal
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

Re: [U-Boot] [PATCH v13 5/7] cmd: mtd: add 'mtd' command

2018-10-01 Thread Jagan Teki
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.

[U-Boot] [PATCH v13 5/7] cmd: mtd: add 'mtd' command

2018-10-01 Thread Miquel Raynal
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. Signed-off-by: Miquel Raynal Acked-by: Jagan Teki Reviewed-by: