7466c4d2f32175c1ef7e92cba810a6a27c0661ee
[openwrt/svn-archive/archive.git] / target / linux / ramips / patches-3.10 / 0004-MIPS-ralink-add-rt_sysc_m32-helper.patch
1 From 3af962f91035ae4500e63c758c49f1c067bdae09 Mon Sep 17 00:00:00 2001
2 From: John Crispin <blogic@openwrt.org>
3 Date: Sun, 19 May 2013 00:42:23 +0200
4 Subject: [PATCH 04/33] MIPS: ralink: add rt_sysc_m32 helper
5
6 Signed-off-by: John Crispin <blogic@openwrt.org>
7 ---
8 arch/mips/include/asm/mach-ralink/ralink_regs.h | 7 +++++++
9 1 file changed, 7 insertions(+)
10
11 diff --git a/arch/mips/include/asm/mach-ralink/ralink_regs.h b/arch/mips/include/asm/mach-ralink/ralink_regs.h
12 index 5a508f9..bd93014 100644
13 --- a/arch/mips/include/asm/mach-ralink/ralink_regs.h
14 +++ b/arch/mips/include/asm/mach-ralink/ralink_regs.h
15 @@ -26,6 +26,13 @@ static inline u32 rt_sysc_r32(unsigned reg)
16 return __raw_readl(rt_sysc_membase + reg);
17 }
18
19 +static inline void rt_sysc_m32(u32 clr, u32 set, unsigned reg)
20 +{
21 + u32 val = rt_sysc_r32(reg) & ~clr;
22 +
23 + __raw_writel(val | set, rt_sysc_membase + reg);
24 +}
25 +
26 static inline void rt_memc_w32(u32 val, unsigned reg)
27 {
28 __raw_writel(val, rt_memc_membase + reg);
29 --
30 1.7.10.4
31