[U-Boot] [PATCH 3/7] arm: rmobile: Add mstp_setclrbits and	mstp_setclrbits_le32
    Nobuhiro Iwamatsu 
    nobuhiro.iwamatsu.yj at renesas.com
       
    Mon Dec  1 08:05:52 CET 2014
    
    
  
This addes macro for set and clear bit control for module control register.
This is used when user want to disable the function of the devices
corresponding to register.
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj at renesas.com>
---
 arch/arm/include/asm/arch-rmobile/rcar-mstp.h | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/arch/arm/include/asm/arch-rmobile/rcar-mstp.h b/arch/arm/include/asm/arch-rmobile/rcar-mstp.h
index bf9a2cf..f94e92c 100644
--- a/arch/arm/include/asm/arch-rmobile/rcar-mstp.h
+++ b/arch/arm/include/asm/arch-rmobile/rcar-mstp.h
@@ -14,9 +14,13 @@
 		out_##type((saddr), in_##type(addr) | (set))
 #define mstp_clrbits(type, addr, saddr, clear) \
 		out_##type((saddr), in_##type(addr) & ~(clear))
+#define mstp_setclrbits(type, addr, saddr, set, clear) \
+		out_##type((saddr), (in_##type(addr) | (set)) & ~(clear))
 #define mstp_setbits_le32(addr, saddr, set) \
 		mstp_setbits(le32, addr, saddr, set)
 #define mstp_clrbits_le32(addr, saddr, clear) \
 		mstp_clrbits(le32, addr, saddr, clear)
+#define mstp_setclrbits_le32(addr, saddr, set, clear) \
+		mstp_setclrbits(le32, addr, saddr, set, clear)
 
 #endif /* __ASM_ARCH_RCAR_MSTP_H */
-- 
2.1.3
    
    
More information about the U-Boot
mailing list