]> git.sur5r.net Git - u-boot/commitdiff
arm: rmobile: rcar: Add mstp_setclrbits and mstp_setclrbits_le32
authorNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Tue, 2 Dec 2014 07:52:21 +0000 (16:52 +0900)
committerNobuhiro Iwamatsu <iwamatsu@nigauri.org>
Fri, 5 Dec 2014 02:05:12 +0000 (11:05 +0900)
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@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
arch/arm/include/asm/arch-rmobile/rcar-mstp.h

index bf9a2cfa8d0850648ba4e3e86cbf1039762a4310..c3df11feaba0c168ff803c9b4ebdd433f5fe5b87 100644 (file)
                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, set, clear) \
+               out_##type((addr), (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, set, clear) \
+               mstp_setclrbits(le32, addr, set, clear)
 
 #endif /* __ASM_ARCH_RCAR_MSTP_H */