sandbox: Add some missing {clr,set,clrset}bits variants
PATCH 1/1 sandbox: Add some missing {clr,set,clrset}bits variants
Add the 16, 32 and 64bit versions of the non-endian {clr,set,clrset}bits macros.
Signed-off-by Tom Rini <[email protected]>
--- arch/sandbox/include/asm/io.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
arch/sandbox/include/asm/io.h +19 -0
@@ -74,7 +74,14 @@ void sandbox_write(void *addr, unsigned int val, enum sandboxio_size_t size);#define in_be32 (a) in_arch(l,be32,a)#define in_be16 (a) in_arch(w,be16,a) +#define out_64 (a,v) writeq(v,a) +#define out_32 (a,v) writel(v,a) +#define out_16 (a,v) writew(v,a)#define out_8 (a,v) writeb(v,a) + +#define in_64 (a) readq(a) +#define in_32 (a) readl(a) +#define in_16 (a) readw(a)#define in_8 (a) readb(a)#define clrbits (type, addr, clear) \
@@ -106,6 +113,18 @@ void sandbox_write(void *addr, unsigned int val, enum sandboxio_size_t size);#define setbits_8 (addr, set) setbits(8, addr, set)#define clrsetbits_8 (addr, clear, set) clrsetbits(8, 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_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_64 (addr, clear) clrbits(64, addr, clear) +#define setbits_64 (addr, set) setbits(64, addr, set) +#define clrsetbits_64 (addr, clear, set) clrsetbits(64, addr, clear, set) +/* I/O access functions */ int _inl (unsigned int addr);int _inw (unsigned int addr);
Signature · 1 line
2.43.0
Quoted 4 lines · Tom Rini
Add the 16, 32 and 64bit versions of the non-endian {clr,set,clrset}bits macros.
Applied to u-boot/master, thanks!
[1/1] sandbox: Add some missing {clr,set,clrset}bits variants
commit: 7faaa16a471b0b611685dd3872a057f1cb286262
Signature · 1 line
Tom