From: Graham Moore <grmoore@opensource.altera.com>
To: Mike Looijmans <mike.looijmans@topic.nl>
Cc: <linux-mtd@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
<git@xilinx.com>, <computersforpeace@gmail.com>,
<dwmw2@infradead.org>, <beanhuo@micron.com>
Subject: Re: [PATCH] mtd: spi-nor: Only set Micron quad-read mode when controller in 4-lane TX mode
Date: Tue, 30 Jun 2015 10:42:54 -0500 [thread overview]
Message-ID: <5592B8FE.3050601@opensource.altera.com> (raw)
In-Reply-To: <1435663042-25425-1-git-send-email-mike.looijmans@topic.nl>
On 06/30/2015 06:17 AM, Mike Looijmans wrote:
> Micron QUAD mode expects command, address and data on 4 lanes instead of just
> one for command (extended SPI mode). This requires the controller to be in a
> special mode, so check first if the controller could be in that mode. If a
> controller does not have the SPI_TX_QUAD mode set, this setting has no chance
> of being valid at all, so don't try to enable it then, and just keep using
> the extended SPI mode.
>
> Tested on a Zynq 7000 with a n25q256a flash chip, this failed to function
> because of the introduction of:
> "driver:mtd:spi-nor: Add quad I/O support for Micron spi nor"
> This commit sets QUAD mode for most Micron chips without asking the controller
> whether it's possible to do so, and without telling the controller that a
> different mode is required, so it couldn't work.
>
> Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
> ---
> drivers/mtd/spi-nor/spi-nor.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
> index e8f6131..10ba94f 100644
> --- a/drivers/mtd/spi-nor/spi-nor.c
> +++ b/drivers/mtd/spi-nor/spi-nor.c
> @@ -1398,6 +1398,8 @@ static int set_quad_mode(struct spi_nor *nor, struct flash_info *info)
> }
> return status;
> case CFI_MFR_ST:
> + if (!(nor->spi->mode & SPI_TX_QUAD))
> + return 0;
This is a great idea, but what codebase are you working from? My l2-mtd
tree doesn't have a 'spi' member of spi_nor, and this case statement is
around line 977, not 1398.
> status = micron_quad_enable(nor);
> if (status) {
> dev_err(nor->dev, "Micron quad-read not enabled\n");
>
Regards,
Graham
next prev parent reply other threads:[~2015-06-30 15:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-30 11:17 [PATCH] mtd: spi-nor: Only set Micron quad-read mode when controller in 4-lane TX mode Mike Looijmans
2015-06-30 11:29 ` Harini Katakam
2015-06-30 15:05 ` Shubhrajyoti Datta
2015-06-30 15:42 ` Graham Moore [this message]
2015-07-01 5:40 ` Mike Looijmans
2015-07-01 2:19 ` Bean Huo 霍斌斌 (beanhuo)
2015-07-01 5:49 ` Mike Looijmans
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=5592B8FE.3050601@opensource.altera.com \
--to=grmoore@opensource.altera.com \
--cc=beanhuo@micron.com \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=git@xilinx.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=mike.looijmans@topic.nl \
/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