From: Yogesh Gaur <yogeshnarayan.gaur@nxp.com>
To: linux-mtd@lists.infradead.org
Cc: boris.brezillon@free-electrons.com, cyrille.pitchen@wedev4u.fr,
computersforpeace@gmail.com, han.xu@nxp.com, festevam@gmail.com,
marek.vasut@gmail.com, frieder.schrempf@exceet.de,
prabhakar.kushwaha@nxp.com, suresh.gupta@nxp.com,
Yogesh Gaur <yogeshnarayan.gaur@nxp.com>
Subject: [PATCH v10 2/2] mtd: fsl-quadspi: fix init AHB read in fsl_qspi_nor_setup()
Date: Tue, 10 Apr 2018 14:05:48 +0530 [thread overview]
Message-ID: <1523349348-20778-3-git-send-email-yogeshnarayan.gaur@nxp.com> (raw)
In-Reply-To: <1523349348-20778-1-git-send-email-yogeshnarayan.gaur@nxp.com>
Move AHB read initialize in fsl_qspi_nor_setup().
In file spi-nor.c, func spi_nor_scan() calls nor->read() thru
spi_nor_read_sfdp() API.
Presently, fsl_qspi_init_ahb_read() called from fsl_qspi_nor_setup_last().
Func fsl_qspi_probe() calls spi_nor_scan() first and then calls
fsl_qspi_nor_setup_last().
When nor->read() being called from inside spi_nor_read_sfdp(), QSPI cntlr
AHB mode initialization is not yet done results in data read error.
Initialize AHB read inside fsl_qspi_nor_setup().
Signed-off-by: Yogesh Gaur <yogeshnarayan.gaur@nxp.com>
---
Changes for v10:
- None
Changes for v9:
- None
Changes for v8:
- None
Changes for v7:
- None
Changes for v6:
- None
Changes for v5:
- None
Changes for v4:
- None
Changes for v3:
- None
Changes for v2:
- None
drivers/mtd/spi-nor/fsl-quadspi.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/mtd/spi-nor/fsl-quadspi.c b/drivers/mtd/spi-nor/fsl-quadspi.c
index 667cab2..401a783 100644
--- a/drivers/mtd/spi-nor/fsl-quadspi.c
+++ b/drivers/mtd/spi-nor/fsl-quadspi.c
@@ -796,6 +796,9 @@ static int fsl_qspi_nor_setup(struct fsl_qspi *q)
/* enable the interrupt */
qspi_writel(q, QUADSPI_RSER_TFIE, q->iobase + QUADSPI_RSER);
+ /* Init for AHB read */
+ fsl_qspi_init_ahb_read(q);
+
return 0;
}
@@ -818,9 +821,6 @@ static int fsl_qspi_nor_setup_last(struct fsl_qspi *q)
if (ret)
return ret;
- /* Init for AHB read */
- fsl_qspi_init_ahb_read(q);
-
/* Prepare LUT for AHB read - required for read from devmem interface */
fsl_qspi_prep_ahb_read(q);
--
1.9.1
next prev parent reply other threads:[~2018-04-10 8:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-10 8:35 [PATCH v10 0/2] mtd: fsl-quadspi: add support to create dynamic LUT entry Yogesh Gaur
2018-04-10 8:35 ` [PATCH v10 1/2] " Yogesh Gaur
2018-04-10 9:23 ` Marek Vasut
2018-04-10 8:35 ` Yogesh Gaur [this message]
2018-04-10 9:25 ` [PATCH v10 2/2] mtd: fsl-quadspi: fix init AHB read in fsl_qspi_nor_setup() Marek Vasut
2018-04-10 8:44 ` [PATCH v10 0/2] mtd: fsl-quadspi: add support to create dynamic LUT entry 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=1523349348-20778-3-git-send-email-yogeshnarayan.gaur@nxp.com \
--to=yogeshnarayan.gaur@nxp.com \
--cc=boris.brezillon@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=cyrille.pitchen@wedev4u.fr \
--cc=festevam@gmail.com \
--cc=frieder.schrempf@exceet.de \
--cc=han.xu@nxp.com \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=prabhakar.kushwaha@nxp.com \
--cc=suresh.gupta@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox