All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Yogesh Narayan Gaur <yogeshnarayan.gaur@nxp.com>
Cc: "Lothar Waßmann" <LW@KARO-electronics.de>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	"marek.vasut@gmail.com" <marek.vasut@gmail.com>,
	"linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"mark.rutland@arm.com" <mark.rutland@arm.com>,
	"robh@kernel.org" <robh@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"frieder.schrempf@exceet.de" <frieder.schrempf@exceet.de>,
	"computersforpeace@gmail.com" <computersforpeace@gmail.com>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/7] spi: add slave device size in spi_device struct
Date: Mon, 3 Sep 2018 10:36:00 +0200	[thread overview]
Message-ID: <20180903103600.3efabbac@bbrezillon> (raw)
In-Reply-To: <VI1PR04MB103801BA8203421C517199BB990C0@VI1PR04MB1038.eurprd04.prod.outlook.com>

Hi Yogesh,

On Mon, 3 Sep 2018 04:47:25 +0000
Yogesh Narayan Gaur <yogeshnarayan.gaur@nxp.com> wrote:

> Hi Lothar,
> 
> > -----Original Message-----
> > From: Lothar Waßmann [mailto:LW@KARO-electronics.de]
> > Sent: Friday, August 31, 2018 5:28 PM
> > To: Yogesh Narayan Gaur <yogeshnarayan.gaur@nxp.com>
> > Cc: linux-mtd@lists.infradead.org; boris.brezillon@bootlin.com;
> > marek.vasut@gmail.com; linux-spi@vger.kernel.org;
> > devicetree@vger.kernel.org; mark.rutland@arm.com; robh@kernel.org; linux-
> > kernel@vger.kernel.org; frieder.schrempf@exceet.de;
> > computersforpeace@gmail.com; shawnguo@kernel.org; linux-arm-
> > kernel@lists.infradead.org
> > Subject: Re: [PATCH 1/7] spi: add slave device size in spi_device struct
> > 
> > Hi,
> > 
> > On Fri, 31 Aug 2018 15:59:58 +0530 Yogesh Gaur wrote:  
> > > Add 'size' data variable in spi_device struct.
> > > This is to save the size of the connected slave device.
> > >
> > > After slave device scan, spi_nor_scan, size being assigned to this
> > > from MTD layer.
> > >
> > > SFDP read is being requested before completion of spi_nor_scan()
> > > routine, thus populate device size before making read request to the
> > > SPI controller.
> > >
> > > Signed-off-by: Yogesh Gaur <yogeshnarayan.gaur@nxp.com>
> > > ---
> > >  drivers/mtd/devices/m25p80.c  | 6 ++++++
> > > drivers/mtd/spi-nor/spi-nor.c | 2 ++
> > >  include/linux/spi/spi.h       | 2 ++
> > >  3 files changed, 10 insertions(+)
> > >
> > > diff --git a/drivers/mtd/devices/m25p80.c
> > > b/drivers/mtd/devices/m25p80.c index fe260cc..6c7ad86 100644
> > > --- a/drivers/mtd/devices/m25p80.c
> > > +++ b/drivers/mtd/devices/m25p80.c
> > > @@ -124,6 +124,10 @@ static ssize_t m25p80_read(struct spi_nor *nor,  
> > loff_t from, size_t len,  
> > >  	/* convert the dummy cycles to the number of bytes */
> > >  	op.dummy.nbytes = (nor->read_dummy * op.dummy.buswidth) / 8;
> > >
> > > +	/* for case of SFDP header read commands, populate spi device size */
> > > +	if (flash->spimem->spi->size == 0)
> > > +		flash->spimem->spi->size = nor->mtd.size;
> > > +  
> > If the 'size' is an spimem specific variable it should be added to the spi_mem
> > struct rather than the spi_device struct.  
> 
> Sure, would move 'size' from struct spi_device to the struct spi_mem.

Before you send a new version doing that, I'd like to understand why
you need this information. Can you wait a bit so I have some time to
review the driver?

Thanks,

Boris

WARNING: multiple messages have this Message-ID (diff)
From: boris.brezillon@bootlin.com (Boris Brezillon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/7] spi: add slave device size in spi_device struct
Date: Mon, 3 Sep 2018 10:36:00 +0200	[thread overview]
Message-ID: <20180903103600.3efabbac@bbrezillon> (raw)
In-Reply-To: <VI1PR04MB103801BA8203421C517199BB990C0@VI1PR04MB1038.eurprd04.prod.outlook.com>

Hi Yogesh,

On Mon, 3 Sep 2018 04:47:25 +0000
Yogesh Narayan Gaur <yogeshnarayan.gaur@nxp.com> wrote:

> Hi Lothar,
> 
> > -----Original Message-----
> > From: Lothar Wa?mann [mailto:LW at KARO-electronics.de]
> > Sent: Friday, August 31, 2018 5:28 PM
> > To: Yogesh Narayan Gaur <yogeshnarayan.gaur@nxp.com>
> > Cc: linux-mtd at lists.infradead.org; boris.brezillon at bootlin.com;
> > marek.vasut at gmail.com; linux-spi at vger.kernel.org;
> > devicetree at vger.kernel.org; mark.rutland at arm.com; robh at kernel.org; linux-
> > kernel at vger.kernel.org; frieder.schrempf at exceet.de;
> > computersforpeace at gmail.com; shawnguo at kernel.org; linux-arm-
> > kernel at lists.infradead.org
> > Subject: Re: [PATCH 1/7] spi: add slave device size in spi_device struct
> > 
> > Hi,
> > 
> > On Fri, 31 Aug 2018 15:59:58 +0530 Yogesh Gaur wrote:  
> > > Add 'size' data variable in spi_device struct.
> > > This is to save the size of the connected slave device.
> > >
> > > After slave device scan, spi_nor_scan, size being assigned to this
> > > from MTD layer.
> > >
> > > SFDP read is being requested before completion of spi_nor_scan()
> > > routine, thus populate device size before making read request to the
> > > SPI controller.
> > >
> > > Signed-off-by: Yogesh Gaur <yogeshnarayan.gaur@nxp.com>
> > > ---
> > >  drivers/mtd/devices/m25p80.c  | 6 ++++++
> > > drivers/mtd/spi-nor/spi-nor.c | 2 ++
> > >  include/linux/spi/spi.h       | 2 ++
> > >  3 files changed, 10 insertions(+)
> > >
> > > diff --git a/drivers/mtd/devices/m25p80.c
> > > b/drivers/mtd/devices/m25p80.c index fe260cc..6c7ad86 100644
> > > --- a/drivers/mtd/devices/m25p80.c
> > > +++ b/drivers/mtd/devices/m25p80.c
> > > @@ -124,6 +124,10 @@ static ssize_t m25p80_read(struct spi_nor *nor,  
> > loff_t from, size_t len,  
> > >  	/* convert the dummy cycles to the number of bytes */
> > >  	op.dummy.nbytes = (nor->read_dummy * op.dummy.buswidth) / 8;
> > >
> > > +	/* for case of SFDP header read commands, populate spi device size */
> > > +	if (flash->spimem->spi->size == 0)
> > > +		flash->spimem->spi->size = nor->mtd.size;
> > > +  
> > If the 'size' is an spimem specific variable it should be added to the spi_mem
> > struct rather than the spi_device struct.  
> 
> Sure, would move 'size' from struct spi_device to the struct spi_mem.

Before you send a new version doing that, I'd like to understand why
you need this information. Can you wait a bit so I have some time to
review the driver?

Thanks,

Boris

  reply	other threads:[~2018-09-03  8:36 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-31 10:29 [PATCH 0/7] spi: spi-mem: Add a driver for NXP FlexSPI controller Yogesh Gaur
2018-08-31 10:29 ` Yogesh Gaur
2018-08-31 10:29 ` [PATCH 1/7] spi: add slave device size in spi_device struct Yogesh Gaur
2018-08-31 10:29   ` Yogesh Gaur
2018-08-31 11:41   ` Geert Uytterhoeven
2018-08-31 11:41     ` Geert Uytterhoeven
2018-08-31 11:41     ` Geert Uytterhoeven
2018-08-31 11:58   ` Lothar Waßmann
2018-08-31 11:58     ` Lothar Waßmann
2018-09-03  4:47     ` Yogesh Narayan Gaur
2018-09-03  4:47       ` Yogesh Narayan Gaur
2018-09-03  4:47       ` Yogesh Narayan Gaur
2018-09-03  8:36       ` Boris Brezillon [this message]
2018-09-03  8:36         ` Boris Brezillon
2018-08-31 10:29 ` [PATCH 2/7] spi: add flags for octal I/O data transfer Yogesh Gaur
2018-08-31 10:29   ` Yogesh Gaur
2018-08-31 10:30 ` [PATCH 3/7] spi: spi-mem: Add a driver for NXP FlexSPI controller Yogesh Gaur
2018-08-31 10:30   ` Yogesh Gaur
2018-09-04 14:58   ` Boris Brezillon
2018-09-04 14:58     ` Boris Brezillon
2018-09-05 10:07     ` Yogesh Narayan Gaur
2018-09-05 10:07       ` Yogesh Narayan Gaur
2018-09-05 10:07       ` Yogesh Narayan Gaur
2018-09-06  8:26       ` Frieder Schrempf
2018-09-06  8:26         ` Frieder Schrempf
2018-09-06  8:26         ` Frieder Schrempf
2018-09-06  8:26         ` Frieder Schrempf
2018-09-06 11:35         ` Yogesh Narayan Gaur
2018-09-06 11:35           ` Yogesh Narayan Gaur
2018-09-06 11:35           ` Yogesh Narayan Gaur
2018-09-06 11:43           ` Boris Brezillon
2018-09-06 11:43             ` Boris Brezillon
2018-09-06 11:43             ` Boris Brezillon
2018-09-06 12:23             ` Yogesh Narayan Gaur
2018-09-06 12:23               ` Yogesh Narayan Gaur
2018-09-06 12:23               ` Yogesh Narayan Gaur
2018-08-31 10:30 ` [PATCH 4/7] dt-bindings: spi: add binding file for NXP FlexSPI driver Yogesh Gaur
2018-08-31 10:30   ` Yogesh Gaur
2018-09-03  9:54   ` Prabhakar Kushwaha
2018-09-03  9:54     ` Prabhakar Kushwaha
2018-09-03  9:54     ` Prabhakar Kushwaha
2018-09-03  9:54     ` Prabhakar Kushwaha
2018-09-04  5:37     ` Yogesh Narayan Gaur
2018-09-04  5:37       ` Yogesh Narayan Gaur
2018-09-04  5:37       ` Yogesh Narayan Gaur
2018-09-04 12:46     ` Boris Brezillon
2018-09-04 12:46       ` Boris Brezillon
2018-09-04 12:46       ` Boris Brezillon
2018-09-06  7:08       ` Jagdish Gediya
2018-09-06  7:08         ` Jagdish Gediya
2018-09-06  7:08         ` Jagdish Gediya
2018-09-04  1:33   ` Rob Herring
2018-09-04  1:33     ` Rob Herring
2018-09-04  1:33     ` Rob Herring
2018-08-31 10:30 ` [PATCH 5/7] arm64: dts: lx2160a: add fspi node property Yogesh Gaur
2018-08-31 10:30   ` Yogesh Gaur
2018-09-03  3:01   ` Shawn Guo
2018-09-03  3:01     ` Shawn Guo
2018-08-31 10:30 ` [PATCH 6/7] arm64: defconfig: enable NXP FlexSPI driver Yogesh Gaur
2018-08-31 10:30   ` Yogesh Gaur
2018-08-31 10:30 ` [PATCH 7/7] MAINTAINERS: add maintainers for the " Yogesh Gaur
2018-08-31 10:30   ` Yogesh Gaur
2018-09-04 12:43 ` [PATCH 0/7] spi: spi-mem: Add a driver for NXP FlexSPI controller Boris Brezillon
2018-09-04 12:43   ` Boris Brezillon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180903103600.3efabbac@bbrezillon \
    --to=boris.brezillon@bootlin.com \
    --cc=LW@KARO-electronics.de \
    --cc=computersforpeace@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=frieder.schrempf@exceet.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=marek.vasut@gmail.com \
    --cc=mark.rutland@arm.com \
    --cc=robh@kernel.org \
    --cc=shawnguo@kernel.org \
    --cc=yogeshnarayan.gaur@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.