Skip to content

Commit

Permalink
MIPS: ralink: add rt_sysc_m32 helper
Browse files Browse the repository at this point in the history
We already have a read and write wrapper. This adds the missing mask wrapper.

Signed-off-by: John Crispin <[email protected]>
Patchwork: http://patchwork.linux-mips.org/patch/8001/
Signed-off-by: Ralf Baechle <[email protected]>
  • Loading branch information
John Crispin authored and ralfbaechle committed Nov 24, 2014
1 parent 2920b83 commit 47e14d6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions arch/mips/include/asm/mach-ralink/ralink_regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ static inline u32 rt_sysc_r32(unsigned 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)
{
__raw_writel(val, rt_memc_membase + reg);
Expand Down

0 comments on commit 47e14d6

Please sign in to comment.