Skip to content

Commit

Permalink
net-next: mediatek: remove superfluous register reads
Browse files Browse the repository at this point in the history
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 SoCs, we can
safely remove the 2 reads as they are no longer required.

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
John Crispin authored and David S. Miller committed Jun 30, 2016
1 parent 153380e commit 6e6edd8
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions drivers/net/ethernet/mediatek/mtk_eth_soc.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,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)
Expand All @@ -342,8 +340,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)
Expand Down

0 comments on commit 6e6edd8

Please sign in to comment.