From: marex@denx.de (Marek Vasut)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v1 2/7] mtd: spi-nor: add DDR quad read support
Date: Wed, 23 Apr 2014 21:45:57 +0200 [thread overview]
Message-ID: <201404232145.57404.marex@denx.de> (raw)
In-Reply-To: <1398248215-26768-3-git-send-email-b32955@freescale.com>
On Wednesday, April 23, 2014 at 12:16:50 PM, Huang Shijie wrote:
> This patch adds the DDR quad read support by the following:
>
> [1] add SPI_NOR_DDR_QUAD read mode.
>
> [2] add DDR Quad read opcodes:
> SPINOR_OP_READ_1_4_4_D / SPINOR_OP_READ4_1_4_4_D
>
> [3] add set_ddr_quad_mode() to initialize for the DDR quad read.
> Currently it only works for Spansion NOR.
>
> [3] set the dummy with 8 for DDR quad read.
> The m25p80.c can not support the DDR quad read, the SPI NOR
> controller can set the dummy value in its driver, such as fsl-quadspi.c.
>
> Test this patch for Spansion s25fl128s NOR flash.
>
> Signed-off-by: Huang Shijie <b32955@freescale.com>
> ---
> drivers/mtd/spi-nor/spi-nor.c | 50
> +++++++++++++++++++++++++++++++++++++++- include/linux/mtd/spi-nor.h |
> 8 +++++-
> 2 files changed, 54 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
> index 1a12f81..e2f69db 100644
> --- a/drivers/mtd/spi-nor/spi-nor.c
> +++ b/drivers/mtd/spi-nor/spi-nor.c
> @@ -74,6 +74,15 @@ static int read_cr(struct spi_nor *nor)
> static inline int spi_nor_read_dummy_cycles(struct spi_nor *nor)
> {
> switch (nor->flash_read) {
> + case SPI_NOR_DDR_QUAD:
> + /*
> + * The m25p80.c can not support the DDR quad read.
> + * We set the dummy cycles to 8 by default. If the SPI NOR
> + * controller driver has already set it before call the
> + * spi_nor_scan(), we just keep it as it is.
> + */
> + if (nor->read_dummy)
> + return nor->read_dummy;
Can the controller set this variable to zero ?
[...]
> +static int set_ddr_quad_mode(struct spi_nor *nor, u32 jedec_id)
> +{
> + int status;
> +
> + switch (JEDEC_MFR(jedec_id)) {
> + case CFI_MFR_AMD: /* Spansion, actually */
> + status = spansion_quad_enable(nor);
> + if (status) {
> + dev_err(nor->dev,
> + "Spansion DDR quad-read not enabled\n");
> + return -EINVAL;
Can't you just return status here as well to propagate the failure?
[...]
next prev parent reply other threads:[~2014-04-23 19:45 UTC|newest]
Thread overview: 97+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <a>
2011-11-22 15:54 ` [PATCH v7 0/3] ARM: mxs: add recording support for saif Dong Aisheng
2011-11-24 7:36 ` Shawn Guo
2011-11-24 7:46 ` Shawn Guo
2011-11-24 7:41 ` Uwe Kleine-König
2011-11-24 7:49 ` Wolfram Sang
2011-11-24 8:23 ` Shawn Guo
2011-11-24 10:46 ` Wolfram Sang
2011-11-22 15:54 ` [PATCH v7 1/3] ARM: mxs: add saif clkmux functions Dong Aisheng
2011-11-22 15:54 ` [PATCH v7 2/3] ARM: mx28evk: add platform data for saif Dong Aisheng
2011-11-22 15:54 ` [PATCH v7 3/3] ARM: mx28evk: set a initial clock rate " Dong Aisheng
2012-03-13 12:33 ` [PATCH 1/5 v4] i2c/gpio: add DT support Jean-Christophe PLAGNIOL-VILLARD
2012-03-13 14:08 ` Wolfram Sang
2012-03-13 16:47 ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-13 19:46 ` Wolfram Sang
2012-03-15 15:56 ` [PATCH 1/5 v5] " Jean-Christophe PLAGNIOL-VILLARD
2012-03-13 12:33 ` [PATCH 2/5 v4] ARM: at91: sam9g20 add i2c " Jean-Christophe PLAGNIOL-VILLARD
2012-03-13 12:33 ` [PATCH 3/5 v4] ARM: at91: usb_a9g20 add DT i2c support Jean-Christophe PLAGNIOL-VILLARD
2012-03-13 12:33 ` [PATCH 4/5 v4] ARM: at91: sam9g45 add i2c DT support Jean-Christophe PLAGNIOL-VILLARD
2012-03-13 12:33 ` [PATCH 5/5 v4] ARM: at91: sam9x5 " Jean-Christophe PLAGNIOL-VILLARD
2013-08-13 13:31 ` [PATCH V2 00/35] CPUFreq: Implement light weight ->target(): for 3.13 Viresh Kumar
2013-08-13 13:32 ` [PATCH V2 01/35] cpufreq: Implement light weight ->target_index() routine Viresh Kumar
2013-08-18 10:41 ` amit daniel kachhap
2013-08-19 4:37 ` Viresh Kumar
2013-08-19 6:16 ` amit daniel kachhap
2013-08-19 6:19 ` Viresh Kumar
2013-08-19 6:46 ` amit daniel kachhap
2013-08-19 6:49 ` Viresh Kumar
2013-08-13 13:32 ` [PATCH V2 02/35] cpufreq: remove CONFIG_CPU_FREQ_TABLE Viresh Kumar
2013-08-13 13:32 ` [PATCH V2 03/35] cpufreq: acpi: Covert to light weight ->target_index() routine Viresh Kumar
2013-08-13 13:32 ` [PATCH V2 04/35] cpufreq: arm_big_little: " Viresh Kumar
2013-08-13 13:32 ` [PATCH V2 05/35] cpufreq: at32ap: " Viresh Kumar
2013-08-14 8:00 ` Hans-Christian Egtvedt
2013-08-13 13:32 ` [PATCH V2 06/35] cpufreq: blackfin: " Viresh Kumar
2013-08-13 13:32 ` [PATCH V2 07/35] cpufreq: cpu0: " Viresh Kumar
2013-08-13 13:32 ` [PATCH V2 08/35] cpufreq: cris: " Viresh Kumar
2013-08-13 13:32 ` [PATCH V2 09/35] cpufreq: davinci: " Viresh Kumar
2013-08-13 13:32 ` [PATCH V2 10/35] cpufreq: dbx500: " Viresh Kumar
2013-08-13 13:32 ` [PATCH V2 11/35] cpufreq: e_powersaver: " Viresh Kumar
2013-08-13 13:32 ` [PATCH V2 12/35] cpufreq: elanfreq: " Viresh Kumar
2013-08-13 13:32 ` [PATCH V2 13/35] cpufreq: exynos: " Viresh Kumar
2013-08-13 13:32 ` [PATCH V2 14/35] cpufreq: ia64: " Viresh Kumar
2013-08-13 13:32 ` [PATCH V2 15/35] cpufreq: imx6q: " Viresh Kumar
2013-08-13 13:32 ` [PATCH V2 16/35] cpufreq: kirkwood: " Viresh Kumar
2013-08-13 13:32 ` [PATCH V2 17/35] cpufreq: longhaul: " Viresh Kumar
2013-08-13 13:32 ` [PATCH V2 18/35] cpufreq: loongson2: " Viresh Kumar
2013-08-13 13:32 ` [PATCH V2 19/35] cpufreq: maple: " Viresh Kumar
2013-08-13 13:32 ` [PATCH V2 20/35] cpufreq: omap: " Viresh Kumar
2013-08-13 13:32 ` [PATCH V2 21/35] cpufreq: p4: " Viresh Kumar
2013-08-13 13:32 ` [PATCH V2 22/35] cpufreq: pasemi: " Viresh Kumar
2013-08-13 13:32 ` [PATCH V2 23/35] cpufreq: pmac32: " Viresh Kumar
2013-08-13 13:32 ` [PATCH V2 24/35] cpufreq: powernow: " Viresh Kumar
2013-08-13 13:32 ` [PATCH V2 25/35] cpufreq: ppc: " Viresh Kumar
2013-08-13 13:32 ` [PATCH V2 26/35] cpufreq: pxa: " Viresh Kumar
2013-08-13 13:32 ` [PATCH V2 27/35] cpufreq: s3c2416: " Viresh Kumar
2013-08-13 13:32 ` [PATCH V2 28/35] cpufreq: s3c64xx: " Viresh Kumar
2013-08-13 13:32 ` [PATCH V2 29/35] cpufreq: s5pv210: " Viresh Kumar
2013-08-13 13:32 ` [PATCH V2 30/35] cpufreq: sa11x0: " Viresh Kumar
2013-08-13 13:32 ` [PATCH V2 31/35] cpufreq: sc520: " Viresh Kumar
2013-08-13 13:32 ` [PATCH V2 32/35] cpufreq: sparc: " Viresh Kumar
2013-08-13 13:32 ` [PATCH V2 33/35] cpufreq: SPEAr: " Viresh Kumar
2013-08-13 13:32 ` [PATCH V2 34/35] cpufreq: speedstep: " Viresh Kumar
2013-08-13 13:32 ` [PATCH V2 35/35] cpufreq: tegra: " Viresh Kumar
2013-08-13 13:46 ` [PATCH V2 00/35] CPUFreq: Implement light weight ->target(): for 3.13 Viresh Kumar
2013-08-14 5:29 ` Viresh Kumar
2014-01-03 3:01 ` [PATCH 0/3] mtd: gpmi: add subpage read support Huang Shijie
2014-02-21 6:51 ` Huang Shijie
2014-03-07 7:27 ` Brian Norris
2014-03-07 7:32 ` Huang Shijie
2014-03-07 7:34 ` Brian Norris
2014-01-03 3:01 ` [PATCH 1/3] mtd: nand: add "page" argument for read_subpage hook Huang Shijie
2014-01-03 3:01 ` [PATCH 2/3] mtd: gpmi: do not use the mtd->writesize Huang Shijie
2014-01-03 3:01 ` [PATCH 3/3] mtd: gpmi: add subpage read support Huang Shijie
2014-04-23 10:16 ` [PATCH v1 0/7] mtd: spi-nor: Add the DDR quad " Huang Shijie
2014-04-23 10:16 ` [PATCH v1 1/7] mtd: spi-nor: fix the wrong dummy value Huang Shijie
2014-04-23 19:41 ` Marek Vasut
2014-04-24 4:50 ` Huang Shijie
2014-04-24 13:45 ` Marek Vasut
2014-04-23 10:16 ` [PATCH v1 2/7] mtd: spi-nor: add DDR quad read support Huang Shijie
2014-04-23 19:45 ` Marek Vasut [this message]
2014-04-24 4:53 ` Huang Shijie
2014-04-24 13:43 ` Marek Vasut
2014-04-24 14:26 ` Huang Shijie
2014-04-23 10:16 ` [PATCH v1 3/7] Documentation: mtd: add a new document for SPI NOR flash Huang Shijie
2014-04-23 10:16 ` [PATCH v1 4/7] Documentation: fsl-quadspi: update the document Huang Shijie
2014-04-23 10:16 ` [PATCH v1 5/7] mtd: fsl-quadspi: get the dummy cycles for DDR Quad read from the DT property Huang Shijie
2014-04-23 19:48 ` Marek Vasut
2014-04-24 4:58 ` Huang Shijie
2014-04-24 13:41 ` Marek Vasut
2014-04-24 14:27 ` Huang Shijie
2014-04-23 10:16 ` [PATCH v1 6/7] mtd: fsl-quadspi: use the information stored in spi-nor{} Huang Shijie
2014-04-23 10:16 ` [PATCH v1 7/7] mtd: fsl-quadspi: add the DDR quad read support Huang Shijie
2024-12-01 23:46 ` [PATCH] arm64: dts: rockchip: enable rng on all rk356x Peter Robinson
2024-12-02 3:55 ` Dragan Simic
2024-12-02 10:40 ` Marcin Juszkiewicz
2024-12-02 12:01 ` Diederik de Haas
2024-12-02 14:50 ` Dragan Simic
2024-12-02 15:32 ` Heiko Stübner
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=201404232145.57404.marex@denx.de \
--to=marex@denx.de \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).