All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leilk Liu <leilk.liu@mediatek.com>
To: Mark Brown <broonie@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-spi@vger.kernel.org>, <linux-mediatek@lists.infradead.org>,
	Leilk Liu <leilk.liu@mediatek.com>
Subject: [PATCH 3/4] spi: mediatek: remove needless pair of writel()/readl()
Date: Fri, 20 Nov 2015 10:21:18 +0800	[thread overview]
Message-ID: <1447986080-31410-3-git-send-email-leilk.liu@mediatek.com> (raw)
In-Reply-To: <1447986080-31410-1-git-send-email-leilk.liu@mediatek.com>

It's not need to re-read and re-write SPI_CMD_REG, so remove it.

Signed-off-by: Leilk Liu <leilk.liu@mediatek.com>
---
 drivers/spi/spi-mt65xx.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c
index 7840067..6c1a96e 100644
--- a/drivers/spi/spi-mt65xx.c
+++ b/drivers/spi/spi-mt65xx.c
@@ -154,9 +154,6 @@ static int mtk_spi_prepare_message(struct spi_master *master,
 		reg_val |= SPI_CMD_CPOL;
 	else
 		reg_val &= ~SPI_CMD_CPOL;
-	writel(reg_val, mdata->base + SPI_CMD_REG);
-
-	reg_val = readl(mdata->base + SPI_CMD_REG);
 
 	/* set the mlsbx and mlsbtx */
 	if (chip_config->tx_mlsb)
-- 
1.7.9.5


WARNING: multiple messages have this Message-ID (diff)
From: Leilk Liu <leilk.liu@mediatek.com>
To: Mark Brown <broonie@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org,
	linux-mediatek@lists.infradead.org,
	Leilk Liu <leilk.liu@mediatek.com>
Subject: [PATCH 3/4] spi: mediatek: remove needless pair of writel()/readl()
Date: Fri, 20 Nov 2015 10:21:18 +0800	[thread overview]
Message-ID: <1447986080-31410-3-git-send-email-leilk.liu@mediatek.com> (raw)
In-Reply-To: <1447986080-31410-1-git-send-email-leilk.liu@mediatek.com>

It's not need to re-read and re-write SPI_CMD_REG, so remove it.

Signed-off-by: Leilk Liu <leilk.liu@mediatek.com>
---
 drivers/spi/spi-mt65xx.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c
index 7840067..6c1a96e 100644
--- a/drivers/spi/spi-mt65xx.c
+++ b/drivers/spi/spi-mt65xx.c
@@ -154,9 +154,6 @@ static int mtk_spi_prepare_message(struct spi_master *master,
 		reg_val |= SPI_CMD_CPOL;
 	else
 		reg_val &= ~SPI_CMD_CPOL;
-	writel(reg_val, mdata->base + SPI_CMD_REG);
-
-	reg_val = readl(mdata->base + SPI_CMD_REG);
 
 	/* set the mlsbx and mlsbtx */
 	if (chip_config->tx_mlsb)
-- 
1.7.9.5

WARNING: multiple messages have this Message-ID (diff)
From: leilk.liu@mediatek.com (Leilk Liu)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] spi: mediatek: remove needless pair of writel()/readl()
Date: Fri, 20 Nov 2015 10:21:18 +0800	[thread overview]
Message-ID: <1447986080-31410-3-git-send-email-leilk.liu@mediatek.com> (raw)
In-Reply-To: <1447986080-31410-1-git-send-email-leilk.liu@mediatek.com>

It's not need to re-read and re-write SPI_CMD_REG, so remove it.

Signed-off-by: Leilk Liu <leilk.liu@mediatek.com>
---
 drivers/spi/spi-mt65xx.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c
index 7840067..6c1a96e 100644
--- a/drivers/spi/spi-mt65xx.c
+++ b/drivers/spi/spi-mt65xx.c
@@ -154,9 +154,6 @@ static int mtk_spi_prepare_message(struct spi_master *master,
 		reg_val |= SPI_CMD_CPOL;
 	else
 		reg_val &= ~SPI_CMD_CPOL;
-	writel(reg_val, mdata->base + SPI_CMD_REG);
-
-	reg_val = readl(mdata->base + SPI_CMD_REG);
 
 	/* set the mlsbx and mlsbtx */
 	if (chip_config->tx_mlsb)
-- 
1.7.9.5

  parent reply	other threads:[~2015-11-20  2:22 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-20  2:21 [PATCH 1/4] spi: mediatek: update document devicetree bindings to fix syntax error Leilk Liu
2015-11-20  2:21 ` Leilk Liu
2015-11-20  2:21 ` Leilk Liu
2015-11-20  2:21 ` Leilk Liu
2015-11-20  2:21 ` [PATCH 2/4] spi: mediatek: remove unrequired description Leilk Liu
2015-11-20  2:21   ` Leilk Liu
2015-11-20  2:21   ` Leilk Liu
2015-11-20  2:21   ` Leilk Liu
2015-11-20 14:20   ` Rob Herring
2015-11-20 14:20     ` Rob Herring
2015-11-20 14:20     ` Rob Herring
     [not found]   ` <1447986080-31410-2-git-send-email-leilk.liu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2015-11-21 14:03     ` Applied "spi: mediatek: remove unrequired description" to the spi tree Mark Brown
2015-11-20  2:21 ` Leilk Liu [this message]
2015-11-20  2:21   ` [PATCH 3/4] spi: mediatek: remove needless pair of writel()/readl() Leilk Liu
2015-11-20  2:21   ` Leilk Liu
2015-11-20 16:56   ` Matthias Brugger
2015-11-20 16:56     ` Matthias Brugger
     [not found]   ` <1447986080-31410-3-git-send-email-leilk.liu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2015-11-21 14:03     ` Applied "spi: mediatek: remove needless pair of writel()/readl()" to the spi tree Mark Brown
2015-11-20  2:21 ` [PATCH 4/4] spi: mediatek: revise mtk_spi_probe() failure flow Leilk Liu
2015-11-20  2:21   ` Leilk Liu
2015-11-20  2:21   ` Leilk Liu
2015-11-20  2:21   ` Leilk Liu
2015-11-21 13:39   ` Mark Brown
2015-11-21 13:39     ` Mark Brown
2015-11-21 13:39     ` Mark Brown
2015-11-24  2:33     ` lei liu
2015-11-24  2:33       ` lei liu
2015-11-24  2:33       ` lei liu
2015-11-24  2:33       ` lei liu
2015-11-24 13:04       ` Mark Brown
2015-11-24 13:04         ` Mark Brown
2015-11-24 13:04         ` Mark Brown
2015-11-25  9:17         ` lei liu
2015-11-25  9:17           ` lei liu
2015-11-25  9:17           ` lei liu
2015-11-25  9:17           ` lei liu
     [not found]   ` <1447986080-31410-4-git-send-email-leilk.liu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2015-11-25 12:11     ` Applied "spi: mediatek: revise mtk_spi_probe() failure flow" to the spi tree Mark Brown
2015-11-20 14:17 ` [PATCH 1/4] spi: mediatek: update document devicetree bindings to fix syntax error Rob Herring
2015-11-20 14:17   ` Rob Herring
2015-11-20 14:17   ` Rob Herring
     [not found] ` <1447986080-31410-1-git-send-email-leilk.liu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2015-11-21 14:03   ` Applied "spi: mediatek: update document devicetree bindings to fix syntax error" to the spi tree Mark Brown

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=1447986080-31410-3-git-send-email-leilk.liu@mediatek.com \
    --to=leilk.liu@mediatek.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=matthias.bgg@gmail.com \
    --cc=s.hauer@pengutronix.de \
    /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.