Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1394956
| From | John Crispin <john@phrozen.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/4] net-next: mediatek: remove superfluous register reads |
| Date | 2016-05-05 11:30 +0200 |
| Message-ID | <rvnLA-5Kz-29@gated-at.bofh.it> (permalink) |
| References | <rvnLA-5Kz-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/4] net-next: mediatek: implement IRQ grouping John Crispin <john@phrozen.org> - 2016-05-05 11:30 +0200 [PATCH 1/4] net-next: mediatek: remove superfluous register reads John Crispin <john@phrozen.org> - 2016-05-05 11:30 +0200 [PATCH 3/4] net-next: mediatek: add IRQ locking John Crispin <john@phrozen.org> - 2016-05-05 11:30 +0200 [PATCH 4/4] net-next: mediatek: add support for IRQ grouping John Crispin <john@phrozen.org> - 2016-05-05 11:30 +0200 [PATCH 2/4] net-next: mediatek: don't use intermediate variables to store IRQ masks John Crispin <john@phrozen.org> - 2016-05-05 11:40 +0200
csiph-web