All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: bpqw <bpqw@micron.com>
Cc: "geert+renesas@glider.be" <geert+renesas@glider.be>,
	"dwmw2@infradead.org" <dwmw2@infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	"grmoore@altera.com" <grmoore@altera.com>,
	Brian Norris <computersforpeace@gmail.com>,
	"shijie8@gmail.com" <shijie8@gmail.com>
Subject: Re: [PATCH 1/1 v2] driver:mtd:spi-nor: Add Micron quad I/O support
Date: Mon, 29 Sep 2014 00:43:43 +0200	[thread overview]
Message-ID: <201409290043.43750.marex@denx.de> (raw)
In-Reply-To: <A765B125120D1346A63912DDE6D8B6315DCED6@NTXXIAMBX02.xacn.micron.com>

On Sunday, September 28, 2014 at 03:59:42 AM, bpqw wrote:
> For Micron spi norflash,you can enable
> Quad spi transfer by clear EVCR(Enhanced
> Volatile Configuration Register) Quad I/O
> protocol bit.

OK, this information is nice and all, but what does this patch do? I can't learn 
this information from the commit message as it is, can I ? And , the purpose of 
the commit message is exactly to summarize the change the patch implements.

> Signed-off-by: bean huo <beanhuo@micron.com>
> ---
>  v1-v2:modified to that capture wait_till_ready()
> 	return value,if error,directly return its
> 	the value.
> 
>  drivers/mtd/spi-nor/spi-nor.c |   46
> +++++++++++++++++++++++++++++++++++++++++ include/linux/mtd/spi-nor.h   | 
>   6 ++++++
>  2 files changed, 52 insertions(+)
> 
> diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
> index b5ad6be..0c3b4fd 100644
> --- a/drivers/mtd/spi-nor/spi-nor.c
> +++ b/drivers/mtd/spi-nor/spi-nor.c
> @@ -878,6 +878,45 @@ static int spansion_quad_enable(struct spi_nor *nor)
>  	return 0;
>  }
> 
> +static int micron_quad_enable(struct spi_nor *nor)
> +{
> +	int ret, val;
> +
> +	ret = nor->read_reg(nor, SPINOR_OP_RD_EVCR, &val, 1);
> +	if (ret < 0) {
> +		dev_err(nor->dev, "error %d reading EVCR\n", ret);
> +		return -EINVAL;
> +	}
> +
> +	write_enable(nor);
> +
> +	/* set EVCR ,enable quad I/O */
> +	nor->cmd_buf[0] = val & ~EVCR_QUAD_EN_MICRON;
> +	ret = nor->write_reg(nor, SPINOR_OP_WD_EVCR, nor->cmd_buf, 1, 0);
> +	if (ret < 0) {
> +		dev_err(nor->dev,
> +			"error while writing EVCR register\n");
> +		return -EINVAL;

Why not just "return ret;" ?
[...]

WARNING: multiple messages have this Message-ID (diff)
From: Marek Vasut <marex@denx.de>
To: bpqw <bpqw@micron.com>
Cc: "dwmw2@infradead.org" <dwmw2@infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	"shijie8@gmail.com" <shijie8@gmail.com>,
	"geert+renesas@glider.be" <geert+renesas@glider.be>,
	"grmoore@altera.com" <grmoore@altera.com>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1 v2] driver:mtd:spi-nor: Add Micron quad I/O support
Date: Mon, 29 Sep 2014 00:43:43 +0200	[thread overview]
Message-ID: <201409290043.43750.marex@denx.de> (raw)
In-Reply-To: <A765B125120D1346A63912DDE6D8B6315DCED6@NTXXIAMBX02.xacn.micron.com>

On Sunday, September 28, 2014 at 03:59:42 AM, bpqw wrote:
> For Micron spi norflash,you can enable
> Quad spi transfer by clear EVCR(Enhanced
> Volatile Configuration Register) Quad I/O
> protocol bit.

OK, this information is nice and all, but what does this patch do? I can't learn 
this information from the commit message as it is, can I ? And , the purpose of 
the commit message is exactly to summarize the change the patch implements.

> Signed-off-by: bean huo <beanhuo@micron.com>
> ---
>  v1-v2:modified to that capture wait_till_ready()
> 	return value,if error,directly return its
> 	the value.
> 
>  drivers/mtd/spi-nor/spi-nor.c |   46
> +++++++++++++++++++++++++++++++++++++++++ include/linux/mtd/spi-nor.h   | 
>   6 ++++++
>  2 files changed, 52 insertions(+)
> 
> diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
> index b5ad6be..0c3b4fd 100644
> --- a/drivers/mtd/spi-nor/spi-nor.c
> +++ b/drivers/mtd/spi-nor/spi-nor.c
> @@ -878,6 +878,45 @@ static int spansion_quad_enable(struct spi_nor *nor)
>  	return 0;
>  }
> 
> +static int micron_quad_enable(struct spi_nor *nor)
> +{
> +	int ret, val;
> +
> +	ret = nor->read_reg(nor, SPINOR_OP_RD_EVCR, &val, 1);
> +	if (ret < 0) {
> +		dev_err(nor->dev, "error %d reading EVCR\n", ret);
> +		return -EINVAL;
> +	}
> +
> +	write_enable(nor);
> +
> +	/* set EVCR ,enable quad I/O */
> +	nor->cmd_buf[0] = val & ~EVCR_QUAD_EN_MICRON;
> +	ret = nor->write_reg(nor, SPINOR_OP_WD_EVCR, nor->cmd_buf, 1, 0);
> +	if (ret < 0) {
> +		dev_err(nor->dev,
> +			"error while writing EVCR register\n");
> +		return -EINVAL;

Why not just "return ret;" ?
[...]

  reply	other threads:[~2014-09-28 22:44 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-25  6:20 [PATCH 1/1] driver:mtd:spi-nor: Add Micron quad I/O support bpqw
2014-09-25  6:20 ` bpqw
2014-09-25 10:11 ` Marek Vasut
2014-09-25 10:11   ` Marek Vasut
2014-09-26  8:39   ` bpqw
2014-09-26  8:39     ` bpqw
2014-09-26  8:46     ` Marek Vasut
2014-09-26  8:46       ` Marek Vasut
2014-09-28  1:59       ` [PATCH 1/1 v2] " bpqw
2014-09-28  1:59         ` bpqw
2014-09-28 22:43         ` Marek Vasut [this message]
2014-09-28 22:43           ` Marek Vasut
2014-09-29  0:30           ` bpqw
2014-09-29  0:30             ` bpqw
2014-09-29 18:57             ` Marek Vasut
2014-09-29 18:57               ` Marek Vasut
2014-09-30  2:47       ` [PATCH 1/1 v3] " Bean Huo 霍斌斌 (beanhuo)
2014-09-30  2:47         ` Bean Huo 霍斌斌 (beanhuo)
2014-09-30 13:38         ` Marek Vasut
2014-09-30 13:38           ` Marek Vasut
2014-10-01 14:24           ` Bean Huo 霍斌斌 (beanhuo)
2014-10-01 14:24             ` Bean Huo 霍斌斌 (beanhuo)
2014-10-01 14:32             ` Marek Vasut
2014-10-01 14:32               ` Marek Vasut
2014-10-01 14:28       ` bpqw
2014-10-01 14:28         ` bpqw
2014-10-01 14:33         ` Marek Vasut
2014-10-01 14:33           ` Marek Vasut
2014-10-04  5:55           ` bpqw
2014-10-04  5:55             ` bpqw
2014-10-16  1:53           ` bpqw
2014-10-16  1:53             ` bpqw
2014-10-17  0:37       ` Bean Huo 霍斌斌 (beanhuo)
2014-10-17  0:37         ` Bean Huo 霍斌斌 (beanhuo)
2014-10-20  1:24       ` bpqw
2014-10-20  1:24         ` bpqw
2014-10-23  0:58       ` Bean Huo 霍斌斌 (beanhuo)
2014-10-23  0:58         ` Bean Huo 霍斌斌 (beanhuo)
2014-10-24  0:31       ` Bean Huo 霍斌斌 (beanhuo)
2014-10-24  0:31         ` Bean Huo 霍斌斌 (beanhuo)
2014-10-27  0:09       ` [PATCH 1/1 v3] driver:mtd:spi-nor: Add quad I/O support for Micron spi nor bpqw
2014-10-27  0:09         ` bpqw
2014-10-30 14:31         ` bpqw
2014-10-30 14:31           ` bpqw
2014-11-12 20:59         ` Jagan Teki
2014-11-12 20:59           ` Jagan Teki
2014-11-04 13:25       ` [PATCH 1/1 v4] " bpqw
2014-11-04 13:25         ` bpqw
2014-11-05 11:26         ` Brian Norris
2014-11-05 11:26           ` Brian Norris
2014-11-06  2:56           ` bpqw
2014-11-06  2:56             ` bpqw
2014-11-06  3:09       ` [V5 PATCH 1/1] " bpqw
2014-11-06  3:09         ` bpqw
     [not found]         ` <54613259.4070903@opensource.altera.com>
2014-11-11 19:41           ` Graham Moore
2014-11-11 19:41             ` Graham Moore
2014-11-11 21:55             ` Jagan Teki
2014-11-11 21:55               ` Jagan Teki
2014-11-12  1:19               ` bpqw
2014-11-12  1:19                 ` bpqw
2014-11-12  0:58             ` bpqw
2014-11-12  0:58               ` bpqw
2014-11-13 16:26               ` Graham Moore
2014-11-13 16:26                 ` Graham Moore
2014-11-14  2:06                 ` bpqw
2014-11-14  2:06                   ` bpqw
2014-11-26  4:06         ` Brian Norris
2014-11-26  4:06           ` Brian Norris
2014-11-26 16:08           ` bpqw
2014-11-26 16:08             ` bpqw
2014-11-26 21:12         ` Brian Norris
2014-11-26 21:12           ` Brian Norris
2014-11-27  5:55           ` bpqw
2014-11-27  5:55             ` bpqw
2014-11-27  9:14             ` Brian Norris
2014-11-27  9:14               ` Brian Norris
2014-11-30 16:11               ` Bean Huo 霍斌斌 (beanhuo)
2014-11-30 16:11                 ` Bean Huo 霍斌斌 (beanhuo)

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=201409290043.43750.marex@denx.de \
    --to=marex@denx.de \
    --cc=bpqw@micron.com \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=geert+renesas@glider.be \
    --cc=grmoore@altera.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=shijie8@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.