提交 a3524486 编写于 作者: P Petr Cvek 提交者: Greg Kroah-Hartman

MIPS: lantiq: Fix bitfield masking

[ Upstream commit ba1bc0fcdeaf3bf583c1517bd2e3e29cf223c969 ]

The modification of EXIN register doesn't clean the bitfield before
the writing of a new value. After a few modifications the bitfield would
accumulate only '1's.
Signed-off-by: NPetr Cvek <petrcvekcz@gmail.com>
Signed-off-by: NPaul Burton <paul.burton@mips.com>
Cc: hauke@hauke-m.de
Cc: john@phrozen.org
Cc: linux-mips@vger.kernel.org
Cc: openwrt-devel@lists.openwrt.org
Cc: pakahmar@hotmail.com
Signed-off-by: NSasha Levin <sashal@kernel.org>
上级 cdee3f53
...@@ -156,8 +156,9 @@ static int ltq_eiu_settype(struct irq_data *d, unsigned int type) ...@@ -156,8 +156,9 @@ static int ltq_eiu_settype(struct irq_data *d, unsigned int type)
if (edge) if (edge)
irq_set_handler(d->hwirq, handle_edge_irq); irq_set_handler(d->hwirq, handle_edge_irq);
ltq_eiu_w32(ltq_eiu_r32(LTQ_EIU_EXIN_C) | ltq_eiu_w32((ltq_eiu_r32(LTQ_EIU_EXIN_C) &
(val << (i * 4)), LTQ_EIU_EXIN_C); (~(7 << (i * 4)))) | (val << (i * 4)),
LTQ_EIU_EXIN_C);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册