public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@bootlin.com>
To: David Woodhouse <dwmw2@infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	Boris Brezillon <boris.brezillon@bootlin.com>,
	Marek Vasut <marek.vasut@gmail.com>,
	Richard Weinberger <richard@nod.at>,
	linux-mtd@lists.infradead.org,
	Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Peter Pan <peterpansjtu@gmail.com>,
	Frieder Schrempf <frieder.schrempf@exceet.de>,
	Vignesh R <vigneshr@ti.com>,
	Xiangsheng Hou <xiangsheng.hou@mediatek.com>
Subject: Re: [PATCH v7 1/5] mtd: nand: Pass mode information to nand_page_io_req
Date: Fri, 1 Jun 2018 14:55:16 +0200	[thread overview]
Message-ID: <20180601145516.54725217@bbrezillon> (raw)
In-Reply-To: <20180515150825.19835-2-boris.brezillon@bootlin.com>

On Tue, 15 May 2018 17:08:21 +0200
Boris Brezillon <boris.brezillon@bootlin.com> wrote:

> The NAND sub-layers are likely to need the MTD_OPS_XXX mode information
> in order to decide if they should enable/disable ECC or how they should
> place the OOB bytes in the provided OOB buffer.
> 
> Add a field to nand_page_io_req to pass this information.
> 
> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>

Applied this one to nand/next. Will send a v8 fixing the issues
in other patches.

> ---
>  include/linux/mtd/nand.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
> index 792ea5c26329..abe975c87b90 100644
> --- a/include/linux/mtd/nand.h
> +++ b/include/linux/mtd/nand.h
> @@ -86,6 +86,7 @@ struct nand_pos {
>   * @ooboffs: the OOB offset within the page
>   * @ooblen: the number of OOB bytes to read from/write to this page
>   * @oobbuf: buffer to store OOB data in or get OOB data from
> + * @mode: one of the %MTD_OPS_XXX mode
>   *
>   * This object is used to pass per-page I/O requests to NAND sub-layers. This
>   * way all useful information are already formatted in a useful way and
> @@ -106,6 +107,7 @@ struct nand_page_io_req {
>  		const void *out;
>  		void *in;
>  	} oobbuf;
> +	int mode;
>  };
>  
>  /**
> @@ -599,6 +601,7 @@ static inline void nanddev_io_iter_init(struct nand_device *nand,
>  {
>  	struct mtd_info *mtd = nanddev_to_mtd(nand);
>  
> +	iter->req.mode = req->mode;
>  	iter->req.dataoffs = nanddev_offs_to_pos(nand, offs, &iter->req.pos);
>  	iter->req.ooboffs = req->ooboffs;
>  	iter->oobbytes_per_page = mtd_oobavail(mtd, req);

  parent reply	other threads:[~2018-06-01 12:55 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-15 15:08 [PATCH v7 0/5] mtd: Add a SPI NAND driver Boris Brezillon
2018-05-15 15:08 ` [PATCH v7 1/5] mtd: nand: Pass mode information to nand_page_io_req Boris Brezillon
2018-06-01 10:11   ` Miquel Raynal
2018-06-01 10:17   ` Frieder Schrempf
2018-06-01 12:55   ` Boris Brezillon [this message]
2018-05-15 15:08 ` [PATCH v7 2/5] mtd: nand: Add core infrastructure to support SPI NANDs Boris Brezillon
2018-05-29 10:57   ` Frieder Schrempf
2018-05-29 13:35     ` Boris Brezillon
2018-05-29 14:59       ` Frieder Schrempf
2018-06-01 10:22         ` Frieder Schrempf
2018-05-31  7:30   ` Miquel Raynal
2018-05-31  7:38     ` Boris Brezillon
2018-05-15 15:08 ` [PATCH v7 3/5] dt-bindings: Add bindings for SPI NAND devices Boris Brezillon
2018-05-15 15:08 ` [PATCH v7 4/5] mtd: nand: spi: Add initial support for Micron MT29F2G01ABAGD Boris Brezillon
2018-05-15 15:08 ` [PATCH v7 5/5] mtd: nand: spi: Add initial support for Winbond W25M02GV Boris Brezillon
2018-05-15 22:59   ` Miquel Raynal
2018-05-16  7:07     ` Boris Brezillon
2018-05-17  6:33 ` [PATCH v7 0/5] mtd: Add a SPI NAND driver Prabhakar Kushwaha
2018-05-17  7:05   ` Boris Brezillon
2018-05-17 10:01     ` Prabhakar Kushwaha
2018-05-17 10:22       ` Frieder Schrempf

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=20180601145516.54725217@bbrezillon \
    --to=boris.brezillon@bootlin.com \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=frieder.schrempf@exceet.de \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=peterpansjtu@gmail.com \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.com \
    --cc=xiangsheng.hou@mediatek.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox