All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: "Shivamurthy Shastri (sshivamurthy)" <sshivamurthy@micron.com>
Cc: Boris Brezillon <bbrezillon@kernel.org>,
	Richard Weinberger <richard@nod.at>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Marek Vasut <marek.vasut@gmail.com>,
	Frieder Schrempf <frieder.schrempf@exceet.de>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>
Subject: Re: [EXT] Re: [PATCH 3/4] mtd: spinand: Enabled support to detect parameter page
Date: Thu, 2 May 2019 13:59:45 +0200	[thread overview]
Message-ID: <20190502135945.61bd6ceb@xps13> (raw)
In-Reply-To: <MN2PR08MB5951A622B36705BC26CE36E2B8340@MN2PR08MB5951.namprd08.prod.outlook.com>

Hi Shiva,

"Shivamurthy Shastri (sshivamurthy)" <sshivamurthy@micron.com> wrote on
Thu, 2 May 2019 11:37:10 +0000:

> Hi Miquel,
> 
> > 
> > Hi Shivamurthy,
> > 
> > "Shivamurthy Shastri (sshivamurthy)" <sshivamurthy@micron.com> wrote
> > on
> > Tue, 26 Mar 2019 10:52:00 +0000:
> >   
> > > Some of the SPI NAND devices has parameter page which is similar to ONFI
> > > table.
> > >
> > > But, it may not be self sufficient to propagate all the required
> > > parameters. Fixup function has been added in struct manufacturer to
> > > accommodate this.
> > >
> > > Signed-off-by: Shivamurthy Shastri <sshivamurthy@micron.com>
> > > ---
> > >  drivers/mtd/nand/spi/core.c | 113  
> > +++++++++++++++++++++++++++++++++++-  
> > >  include/linux/mtd/spinand.h |   5 ++
> > >  2 files changed, 117 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c
> > > index 985ad52cdaa7..40882a1d2bc1 100644
> > > --- a/drivers/mtd/nand/spi/core.c
> > > +++ b/drivers/mtd/nand/spi/core.c
> > > @@ -574,6 +574,108 @@ static int spinand_lock_block(struct  
> > spinand_device *spinand, u8 lock)  
> > >  	return spinand_write_reg_op(spinand, REG_BLOCK_LOCK, lock);
> > >  }
> > >
> > > +/**
> > > + * spinand_read_param_page_op - Read parameter page operation
> > > + * @spinand: the spinand device
> > > + * @page: page number where parameter page tables can be found
> > > + * @parameters: buffer used to store the parameter page  
> > 
> > Does not match the prototype  
> 
> I will fix this in next version.
> 
> >   
> > > + * @len: length of the buffer
> > > + *
> > > + * Read parameter page
> > > + *
> > > + * Returns 0 on success, a negative error code otherwise.
> > > + */
> > > +static int spinand_parameter_page_read(struct nand_device *base,  
> > 
> > Please use a spinand structure as parameter, you don't need a
> > nand_device here (same for other spinand functions).  
> 
> This function is helper function for generic ONFI layer.
> From generic ONFI layer, I can get only nand_device.

How do you handle if the SPI NAND core is not compiled-in?


Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

WARNING: multiple messages have this Message-ID (diff)
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: "Shivamurthy Shastri (sshivamurthy)" <sshivamurthy@micron.com>
Cc: Boris Brezillon <bbrezillon@kernel.org>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Richard Weinberger <richard@nod.at>,
	David Woodhouse <dwmw2@infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	Marek Vasut <marek.vasut@gmail.com>,
	Frieder Schrempf <frieder.schrempf@exceet.de>
Subject: Re: [EXT] Re: [PATCH 3/4] mtd: spinand: Enabled support to detect parameter page
Date: Thu, 2 May 2019 13:59:45 +0200	[thread overview]
Message-ID: <20190502135945.61bd6ceb@xps13> (raw)
In-Reply-To: <MN2PR08MB5951A622B36705BC26CE36E2B8340@MN2PR08MB5951.namprd08.prod.outlook.com>

Hi Shiva,

"Shivamurthy Shastri (sshivamurthy)" <sshivamurthy@micron.com> wrote on
Thu, 2 May 2019 11:37:10 +0000:

> Hi Miquel,
> 
> > 
> > Hi Shivamurthy,
> > 
> > "Shivamurthy Shastri (sshivamurthy)" <sshivamurthy@micron.com> wrote
> > on
> > Tue, 26 Mar 2019 10:52:00 +0000:
> >   
> > > Some of the SPI NAND devices has parameter page which is similar to ONFI
> > > table.
> > >
> > > But, it may not be self sufficient to propagate all the required
> > > parameters. Fixup function has been added in struct manufacturer to
> > > accommodate this.
> > >
> > > Signed-off-by: Shivamurthy Shastri <sshivamurthy@micron.com>
> > > ---
> > >  drivers/mtd/nand/spi/core.c | 113  
> > +++++++++++++++++++++++++++++++++++-  
> > >  include/linux/mtd/spinand.h |   5 ++
> > >  2 files changed, 117 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c
> > > index 985ad52cdaa7..40882a1d2bc1 100644
> > > --- a/drivers/mtd/nand/spi/core.c
> > > +++ b/drivers/mtd/nand/spi/core.c
> > > @@ -574,6 +574,108 @@ static int spinand_lock_block(struct  
> > spinand_device *spinand, u8 lock)  
> > >  	return spinand_write_reg_op(spinand, REG_BLOCK_LOCK, lock);
> > >  }
> > >
> > > +/**
> > > + * spinand_read_param_page_op - Read parameter page operation
> > > + * @spinand: the spinand device
> > > + * @page: page number where parameter page tables can be found
> > > + * @parameters: buffer used to store the parameter page  
> > 
> > Does not match the prototype  
> 
> I will fix this in next version.
> 
> >   
> > > + * @len: length of the buffer
> > > + *
> > > + * Read parameter page
> > > + *
> > > + * Returns 0 on success, a negative error code otherwise.
> > > + */
> > > +static int spinand_parameter_page_read(struct nand_device *base,  
> > 
> > Please use a spinand structure as parameter, you don't need a
> > nand_device here (same for other spinand functions).  
> 
> This function is helper function for generic ONFI layer.
> From generic ONFI layer, I can get only nand_device.

How do you handle if the SPI NAND core is not compiled-in?


Thanks,
Miquèl

  reply	other threads:[~2019-05-02 12:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-26 10:52 [PATCH 3/4] mtd: spinand: Enabled support to detect parameter page Shivamurthy Shastri (sshivamurthy)
2019-03-26 10:52 ` Shivamurthy Shastri (sshivamurthy)
2019-04-30  7:55 ` Miquel Raynal
2019-04-30  7:55   ` Miquel Raynal
2019-05-02 11:37   ` [EXT] " Shivamurthy Shastri (sshivamurthy)
2019-05-02 11:37     ` Shivamurthy Shastri (sshivamurthy)
2019-05-02 11:59     ` Miquel Raynal [this message]
2019-05-02 11:59       ` Miquel Raynal
2019-05-28 15:46       ` Shivamurthy Shastri (sshivamurthy)
2019-05-28 15:46         ` Shivamurthy Shastri (sshivamurthy)

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=20190502135945.61bd6ceb@xps13 \
    --to=miquel.raynal@bootlin.com \
    --cc=bbrezillon@kernel.org \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=frieder.schrempf@exceet.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=richard@nod.at \
    --cc=sshivamurthy@micron.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.