~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/h8300/include/asm/io.h

Version: ~ [ linux-5.19-rc8 ] ~ [ linux-5.18.14 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.57 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.133 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.207 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.253 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.289 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.324 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.302 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef _H8300_IO_H
  3 #define _H8300_IO_H
  4 
  5 #ifdef __KERNEL__
  6 
  7 #include <linux/types.h>
  8 
  9 /* H8/300 internal I/O functions */
 10 
 11 #define __raw_readb __raw_readb
 12 static inline u8 __raw_readb(const volatile void __iomem *addr)
 13 {
 14         return *(volatile u8 *)addr;
 15 }
 16 
 17 #define __raw_readw __raw_readw
 18 static inline u16 __raw_readw(const volatile void __iomem *addr)
 19 {
 20         return *(volatile u16 *)addr;
 21 }
 22 
 23 #define __raw_readl __raw_readl
 24 static inline u32  __raw_readl(const volatile void __iomem *addr)
 25 {
 26         return *(volatile u32 *)addr;
 27 }
 28 
 29 #define __raw_writeb __raw_writeb
 30 static inline void __raw_writeb(u8 b, const volatile void __iomem *addr)
 31 {
 32         *(volatile u8 *)addr = b;
 33 }
 34 
 35 #define __raw_writew __raw_writew
 36 static inline void __raw_writew(u16 b, const volatile void __iomem *addr)
 37 {
 38         *(volatile u16 *)addr = b;
 39 }
 40 
 41 #define __raw_writel __raw_writel
 42 static inline void __raw_writel(u32 b, const volatile void __iomem *addr)
 43 {
 44         *(volatile u32 *)addr = b;
 45 }
 46 
 47 static inline void ctrl_bclr(int b, void __iomem *addr)
 48 {
 49         if (__builtin_constant_p(b))
 50                 __asm__("bclr %1,%0" : "+WU"(*(u8 *)addr): "i"(b));
 51         else
 52                 __asm__("bclr %w1,%0" : "+WU"(*(u8 *)addr): "r"(b));
 53 }
 54 
 55 static inline void ctrl_bset(int b, void __iomem *addr)
 56 {
 57         if (__builtin_constant_p(b))
 58                 __asm__("bset %1,%0" : "+WU"(*(u8 *)addr): "i"(b));
 59         else
 60                 __asm__("bset %w1,%0" : "+WU"(*(u8 *)addr): "r"(b));
 61 }
 62 
 63 #include <asm-generic/io.h>
 64 
 65 #endif /* __KERNEL__ */
 66 
 67 #endif /* _H8300_IO_H */
 68 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp