提交 47e14d66 编写于 作者: J John Crispin 提交者: Ralf Baechle

MIPS: ralink: add rt_sysc_m32 helper

We already have a read and write wrapper. This adds the missing mask wrapper.
Signed-off-by: NJohn Crispin <blogic@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/8001/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 2920b83d
...@@ -26,6 +26,13 @@ static inline u32 rt_sysc_r32(unsigned reg) ...@@ -26,6 +26,13 @@ static inline u32 rt_sysc_r32(unsigned reg)
return __raw_readl(rt_sysc_membase + reg); return __raw_readl(rt_sysc_membase + reg);
} }
static inline void rt_sysc_m32(u32 clr, u32 set, unsigned reg)
{
u32 val = rt_sysc_r32(reg) & ~clr;
__raw_writel(val | set, rt_sysc_membase + reg);
}
static inline void rt_memc_w32(u32 val, unsigned reg) static inline void rt_memc_w32(u32 val, unsigned reg)
{ {
__raw_writel(val, rt_memc_membase + reg); __raw_writel(val, rt_memc_membase + reg);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册