of: MSI: Simplify irqdomain lookup
[linux/fpc-iii.git] / arch / h8300 / include / asm / io.h
blobf0e14f3a800d8d4eb65f2ac970543cc66375bcfe
1 #ifndef _H8300_IO_H
2 #define _H8300_IO_H
4 #ifdef __KERNEL__
6 /* H8/300 internal I/O functions */
8 #define __raw_readb __raw_readb
9 static inline u8 __raw_readb(const volatile void __iomem *addr)
11 return *(volatile u8 *)addr;
14 #define __raw_readw __raw_readw
15 static inline u16 __raw_readw(const volatile void __iomem *addr)
17 return *(volatile u16 *)addr;
20 #define __raw_readl __raw_readl
21 static inline u32 __raw_readl(const volatile void __iomem *addr)
23 return *(volatile u32 *)addr;
26 #define __raw_writeb __raw_writeb
27 static inline void __raw_writeb(u8 b, const volatile void __iomem *addr)
29 *(volatile u8 *)addr = b;
32 #define __raw_writew __raw_writew
33 static inline void __raw_writew(u16 b, const volatile void __iomem *addr)
35 *(volatile u16 *)addr = b;
38 #define __raw_writel __raw_writel
39 static inline void __raw_writel(u32 b, const volatile void __iomem *addr)
41 *(volatile u32 *)addr = b;
44 static inline void ctrl_bclr(int b, void __iomem *addr)
46 if (__builtin_constant_p(b))
47 __asm__("bclr %1,%0" : "+WU"(*addr): "i"(b));
48 else
49 __asm__("bclr %w1,%0" : "+WU"(*addr): "r"(b));
52 static inline void ctrl_bset(int b, void __iomem *addr)
54 if (__builtin_constant_p(b))
55 __asm__("bset %1,%0" : "+WU"(*addr): "i"(b));
56 else
57 __asm__("bset %w1,%0" : "+WU"(*addr): "r"(b));
60 #include <asm-generic/io.h>
62 #endif /* __KERNEL__ */
64 #endif /* _H8300_IO_H */