0003-MIPS-ralink-add-rt_sysc_m32-helper.patch 842 B

1234567891011121314151617181920212223242526
  1. From 0f0f041cd6a05eb865e391155d3299bb55ff00e3 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 03/57] MIPS: ralink: add rt_sysc_m32 helper
  5. Signed-off-by: John Crispin <blogic@openwrt.org>
  6. ---
  7. arch/mips/include/asm/mach-ralink/ralink_regs.h | 7 +++++++
  8. 1 file changed, 7 insertions(+)
  9. --- a/arch/mips/include/asm/mach-ralink/ralink_regs.h
  10. +++ b/arch/mips/include/asm/mach-ralink/ralink_regs.h
  11. @@ -26,6 +26,13 @@ static inline u32 rt_sysc_r32(unsigned r
  12. return __raw_readl(rt_sysc_membase + reg);
  13. }
  14. +static inline void rt_sysc_m32(u32 clr, u32 set, unsigned reg)
  15. +{
  16. + u32 val = rt_sysc_r32(reg) & ~clr;
  17. +
  18. + __raw_writel(val | set, rt_sysc_membase + reg);
  19. +}
  20. +
  21. static inline void rt_memc_w32(u32 val, unsigned reg)
  22. {
  23. __raw_writel(val, rt_memc_membase + reg);