netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Crispin <john@phrozen.org>
To: "David S. Miller" <davem@davemloft.net>
Cc: nbd@nbd.name, netdev@vger.kernel.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
	John Crispin <john@phrozen.org>
Subject: [PATCH 1/4] net-next: mediatek: remove superfluous register reads
Date: Thu,  5 May 2016 11:27:40 +0200	[thread overview]
Message-ID: <1462440463-52076-2-git-send-email-john@phrozen.org> (raw)
In-Reply-To: <1462440463-52076-1-git-send-email-john@phrozen.org>

The driver was originally written for MIPS based SoC. These required the
IRQ mask register to be read after writing it to ensure that the content
was actually applied. As this version only works on ARM based SoC, we can
safely remove the 2 reads as they ware not required.

Signed-off-by: John Crispin <john@phrozen.org>
---
 drivers/net/ethernet/mediatek/mtk_eth_soc.c |    4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index 4d0b179..bb7b78e 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -320,8 +320,6 @@ static inline void mtk_irq_disable(struct mtk_eth *eth, u32 mask)
 
 	val = mtk_r32(eth, MTK_QDMA_INT_MASK);
 	mtk_w32(eth, val & ~mask, MTK_QDMA_INT_MASK);
-	/* flush write */
-	mtk_r32(eth, MTK_QDMA_INT_MASK);
 }
 
 static inline void mtk_irq_enable(struct mtk_eth *eth, u32 mask)
@@ -330,8 +328,6 @@ static inline void mtk_irq_enable(struct mtk_eth *eth, u32 mask)
 
 	val = mtk_r32(eth, MTK_QDMA_INT_MASK);
 	mtk_w32(eth, val | mask, MTK_QDMA_INT_MASK);
-	/* flush write */
-	mtk_r32(eth, MTK_QDMA_INT_MASK);
 }
 
 static int mtk_set_mac_address(struct net_device *dev, void *p)
-- 
1.7.10.4

  reply	other threads:[~2016-05-05  9:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-05  9:27 [PATCH 0/4] net-next: mediatek: implement IRQ grouping John Crispin
2016-05-05  9:27 ` John Crispin [this message]
     [not found] ` <1462440463-52076-1-git-send-email-john-Pj+rj9U5foFAfugRpC6u6w@public.gmane.org>
2016-05-05  9:27   ` [PATCH 2/4] net-next: mediatek: don't use intermediate variables to store IRQ masks John Crispin
2016-05-05  9:27   ` [PATCH 3/4] net-next: mediatek: add IRQ locking John Crispin
2016-05-05  9:27 ` [PATCH 4/4] net-next: mediatek: add support for IRQ grouping John Crispin
  -- strict thread matches above, loose matches on Subject: below --
2016-06-15 14:58 [PATCH 0/4] net-next: mediatek: IRQ cleanups, fixes and grouping John Crispin
     [not found] ` <1466002730-58476-1-git-send-email-john-Pj+rj9U5foFAfugRpC6u6w@public.gmane.org>
2016-06-15 14:58   ` [PATCH 1/4] net-next: mediatek: remove superfluous register reads John Crispin

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=1462440463-52076-2-git-send-email-john@phrozen.org \
    --to=john@phrozen.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=nbd@nbd.name \
    --cc=netdev@vger.kernel.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).