From 47b1cbaf02a3960f4eb5b0e3b71a963d5b6e13df Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Sat, 1 Dec 2018 18:42:08 +0100 Subject: [PATCH] arm: implement {in, out}_{16, 32} and {clr, set, clrset}bits_{16, 32} MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Álvaro Fernández Rojas --- arch/arm/include/asm/io.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h index 5df74728de..12bc7fbe06 100644 --- a/arch/arm/include/asm/io.h +++ b/arch/arm/include/asm/io.h @@ -160,7 +160,12 @@ static inline void __raw_readsl(unsigned long addr, void *data, int longlen) #define in_be32(a) in_arch(l,be32,a) #define in_be16(a) in_arch(w,be16,a) +#define out_32(a,v) __raw_writel(v,a) +#define out_16(a,v) __raw_writew(v,a) #define out_8(a,v) __raw_writeb(v,a) + +#define in_32(a) __raw_readl(a) +#define in_16(a) __raw_readw(a) #define in_8(a) __raw_readb(a) #define clrbits(type, addr, clear) \ @@ -180,6 +185,10 @@ static inline void __raw_readsl(unsigned long addr, void *data, int longlen) #define setbits_le32(addr, set) setbits(le32, addr, set) #define clrsetbits_le32(addr, clear, set) clrsetbits(le32, addr, clear, set) +#define clrbits_32(addr, clear) clrbits(32, addr, clear) +#define setbits_32(addr, set) setbits(32, addr, set) +#define clrsetbits_32(addr, clear, set) clrsetbits(32, addr, clear, set) + #define clrbits_be16(addr, clear) clrbits(be16, addr, clear) #define setbits_be16(addr, set) setbits(be16, addr, set) #define clrsetbits_be16(addr, clear, set) clrsetbits(be16, addr, clear, set) @@ -188,6 +197,10 @@ static inline void __raw_readsl(unsigned long addr, void *data, int longlen) #define setbits_le16(addr, set) setbits(le16, addr, set) #define clrsetbits_le16(addr, clear, set) clrsetbits(le16, addr, clear, set) +#define clrbits_16(addr, clear) clrbits(16, addr, clear) +#define setbits_16(addr, set) setbits(16, addr, set) +#define clrsetbits_16(addr, clear, set) clrsetbits(16, addr, clear, set) + #define clrbits_8(addr, clear) clrbits(8, addr, clear) #define setbits_8(addr, set) setbits(8, addr, set) #define clrsetbits_8(addr, clear, set) clrsetbits(8, addr, clear, set) -- 2.25.1