2014-03-19 03:21:56 +08:00
|
|
|
From 1fe4d719d1c973c01f4b6a4c0de47bfac77e3eca Mon Sep 17 00:00:00 2001
|
2013-07-15 18:06:55 +08:00
|
|
|
From: John Crispin <blogic@openwrt.org>
|
|
|
|
Date: Sun, 19 May 2013 00:42:23 +0200
|
2014-03-19 03:21:56 +08:00
|
|
|
Subject: [PATCH 108/133] MIPS: ralink: add rt_sysc_m32 helper
|
2013-07-15 18:06:55 +08:00
|
|
|
|
|
|
|
Signed-off-by: John Crispin <blogic@openwrt.org>
|
|
|
|
---
|
|
|
|
arch/mips/include/asm/mach-ralink/ralink_regs.h | 7 +++++++
|
|
|
|
1 file changed, 7 insertions(+)
|
|
|
|
|
|
|
|
--- a/arch/mips/include/asm/mach-ralink/ralink_regs.h
|
|
|
|
+++ b/arch/mips/include/asm/mach-ralink/ralink_regs.h
|
2013-07-22 23:31:13 +08:00
|
|
|
@@ -26,6 +26,13 @@ static inline u32 rt_sysc_r32(unsigned r
|
2013-07-15 18:06:55 +08:00
|
|
|
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)
|
|
|
|
{
|
|
|
|
__raw_writel(val, rt_memc_membase + reg);
|