From: Boris Brezillon <boris.brezillon@bootlin.com>
To: "Wan, Jane (Nokia - US/Sunnyvale)" <jane.wan@nokia.com>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>,
"dwmw2@infradead.org" <dwmw2@infradead.org>,
"computersforpeace@gmail.com" <computersforpeace@gmail.com>,
"Bos, Ties (Nokia - US/Sunnyvale)" <ties.bos@nokia.com>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"richard@nod.at" <richard@nod.at>,
"marek.vasut@gmail.com" <marek.vasut@gmail.com>,
"yamada.masahiro@socionext.com" <yamada.masahiro@socionext.com>,
"prabhakar.kushwaha@nxp.com" <prabhakar.kushwaha@nxp.com>,
"shawnguo@kernel.org" <shawnguo@kernel.org>,
"jagdish.gediya@nxp.com" <jagdish.gediya@nxp.com>,
"shreeya.patel23498@gmail.com" <shreeya.patel23498@gmail.com>
Subject: Re: [PATCH v2 1/2] mtd: rawnand: fsl_ifc: fix FSL NAND driver to read
Date: Fri, 4 May 2018 09:05:45 +0200 [thread overview]
Message-ID: <20180504090545.2b422446@bbrezillon> (raw)
In-Reply-To: <VI1PR07MB161500797A6B12A989D8976681860@VI1PR07MB1615.eurprd07.prod.outlook.com>
Hi Jane,
On Fri, 4 May 2018 01:35:37 +0000
"Wan, Jane (Nokia - US/Sunnyvale)" <jane.wan@nokia.com> wrote:
> Hi Miquel and Boris,
>
> Thank you for your response. The following is the reposting the v2 version of the patch (also in the attachment).
No need to attach the patch, and this message should not be placed
here...
>
> Subject: [PATCH v2 1/2] mtd: rawnand: fsl_ifc: fix FSL NAND driver to read
> all ONFI parameter pages
>
> Per ONFI specification (Rev. 4.0), if the CRC of the first parameter page
> read is not valid, the host should read redundant parameter page copies.
> Fix FSL NAND driver to read the two redundant copies which are mandatory
> in the specification.
>
> Signed-off-by: Jane Wan <Jane.Wan@nokia.com>
> ---
... but here.
Also, I'd recommend using git send-email to send patches, so that they
are properly sent and placed in a thread when they are part of a patch
series.
Thanks,
Boris
> drivers/mtd/nand/raw/fsl_ifc_nand.c | 17 ++++++++++-------
> 1 file changed, 10 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/mtd/nand/raw/fsl_ifc_nand.c b/drivers/mtd/nand/raw/fsl_ifc_nand.c
> index 61aae02..98aac1f 100644
> --- a/drivers/mtd/nand/raw/fsl_ifc_nand.c
> +++ b/drivers/mtd/nand/raw/fsl_ifc_nand.c
> @@ -342,9 +342,16 @@ static void fsl_ifc_cmdfunc(struct mtd_info *mtd, unsigned int command,
>
> case NAND_CMD_READID:
> case NAND_CMD_PARAM: {
> + /*
> + * For READID, read 8 bytes that are currently used.
> + * For PARAM, read all 3 copies of 256-bytes pages.
> + */
> + int len = 8;
> int timing = IFC_FIR_OP_RB;
> - if (command == NAND_CMD_PARAM)
> + if (command == NAND_CMD_PARAM) {
> timing = IFC_FIR_OP_RBCD;
> + len = 256 * 3;
> + }
>
> ifc_out32((IFC_FIR_OP_CW0 << IFC_NAND_FIR0_OP0_SHIFT) |
> (IFC_FIR_OP_UA << IFC_NAND_FIR0_OP1_SHIFT) |
> @@ -354,12 +361,8 @@ static void fsl_ifc_cmdfunc(struct mtd_info *mtd, unsigned int command,
> &ifc->ifc_nand.nand_fcr0);
> ifc_out32(column, &ifc->ifc_nand.row3);
>
> - /*
> - * although currently it's 8 bytes for READID, we always read
> - * the maximum 256 bytes(for PARAM)
> - */
> - ifc_out32(256, &ifc->ifc_nand.nand_fbcr);
> - ifc_nand_ctrl->read_bytes = 256;
> + ifc_out32(len, &ifc->ifc_nand.nand_fbcr);
> + ifc_nand_ctrl->read_bytes = len;
>
> set_addr(mtd, 0, 0, 0);
> fsl_ifc_run_command(mtd);
prev parent reply other threads:[~2018-05-04 7:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-04 1:35 [PATCH v2 1/2] mtd: rawnand: fsl_ifc: fix FSL NAND driver to read Wan, Jane (Nokia - US/Sunnyvale)
2018-05-04 7:05 ` Boris Brezillon [this message]
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=20180504090545.2b422446@bbrezillon \
--to=boris.brezillon@bootlin.com \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=jagdish.gediya@nxp.com \
--cc=jane.wan@nokia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=miquel.raynal@bootlin.com \
--cc=prabhakar.kushwaha@nxp.com \
--cc=richard@nod.at \
--cc=shawnguo@kernel.org \
--cc=shreeya.patel23498@gmail.com \
--cc=ties.bos@nokia.com \
--cc=yamada.masahiro@socionext.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