[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+EcR21waWzcPpXvBwBoB7StEQO-iWLcf9P978GuKR0PH2nzxQ@mail.gmail.com>
Date: Wed, 14 Sep 2016 14:45:09 -0500
From: Han Xu <xhnjupt@...il.com>
To: Yunhui Cui <B56489@...escale.com>
Cc: David Woodhouse <dwmw2@...radead.org>,
Brian Norris <computersforpeace@...il.com>,
"han.xu@...escale.com" <han.xu@...escale.com>,
jagannadh.teki@...il.com, Yunhui Cui <yunhui.cui@....com>,
"linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
Yao Yuan <yao.yuan@....com>
Subject: Re: [PATCH v3 3/9] mtd: spi-nor: fsl-quadspi: add fast-read mode support
On Thu, Aug 18, 2016 at 2:37 AM, Yunhui Cui <B56489@...escale.com> wrote:
> From: Yunhui Cui <yunhui.cui@....com>
>
> The qspi driver add generic fast-read mode for different
> flash venders. There are some different board flash work on
> different mode, such fast-read, quad-mode.
>
> Signed-off-by: Yunhui Cui <yunhui.cui@....com>
> ---
> drivers/mtd/spi-nor/fsl-quadspi.c | 21 ++++++++++++++++-----
> 1 file changed, 16 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/mtd/spi-nor/fsl-quadspi.c b/drivers/mtd/spi-nor/fsl-quadspi.c
> index 21c77e8..b0a74b8 100644
> --- a/drivers/mtd/spi-nor/fsl-quadspi.c
> +++ b/drivers/mtd/spi-nor/fsl-quadspi.c
> @@ -389,11 +389,21 @@ static void fsl_qspi_init_lut(struct fsl_qspi *q)
> /* Read */
> lut_base = SEQID_READ * 4;
>
> - qspi_writel(q, LUT0(CMD, PAD1, read_op) | LUT1(ADDR, PAD1, addrlen),
> - base + QUADSPI_LUT(lut_base));
> - qspi_writel(q, LUT0(DUMMY, PAD1, read_dm) |
> - LUT1(FSL_READ, PAD4, rxfifo),
> - base + QUADSPI_LUT(lut_base + 1));
> + if (nor->flash_read == SPI_NOR_FAST) {
> + qspi_writel(q, LUT0(CMD, PAD1, read_op) |
> + LUT1(ADDR, PAD1, addrlen),
> + base + QUADSPI_LUT(lut_base));
> + qspi_writel(q, LUT0(DUMMY, PAD1, read_dm) |
> + LUT1(FSL_READ, PAD1, rxfifo),
> + base + QUADSPI_LUT(lut_base + 1));
> + } else if (nor->flash_read == SPI_NOR_QUAD) {
> + qspi_writel(q, LUT0(CMD, PAD1, read_op) |
> + LUT1(ADDR, PAD1, addrlen),
> + base + QUADSPI_LUT(lut_base));
> + qspi_writel(q, LUT0(DUMMY, PAD1, read_dm) |
> + LUT1(FSL_READ, PAD4, rxfifo),
> + base + QUADSPI_LUT(lut_base + 1));
> + }
>
> /* Write enable */
> lut_base = SEQID_WREN * 4;
> @@ -468,6 +478,7 @@ static int fsl_qspi_get_seqid(struct fsl_qspi *q, u8 cmd)
> {
> switch (cmd) {
> case SPINOR_OP_READ_1_1_4:
> + case SPINOR_OP_READ_FAST:
> return SEQID_READ;
> case SPINOR_OP_WREN:
> return SEQID_WREN;
> --
> 2.1.0.27.g96db324
>
>
Acked-by: Han xu <han.xu@....com>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
--
Sincerely,
Han XU
Powered by blists - more mailing lists