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

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

Version: ~ [ linux-6.3-rc3 ] ~ [ linux-6.2.7 ] ~ [ linux-6.1.20 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.103 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.175 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.237 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.278 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.310 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.302 ] ~ [ 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 /*
  2  * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
  3  *
  4  * This program is free software; you can redistribute it and/or modify
  5  * it under the terms of the GNU General Public License version 2 as
  6  * published by the Free Software Foundation.
  7  */
  8 
  9 #ifndef _ASM_ARC_IO_H
 10 #define _ASM_ARC_IO_H
 11 
 12 #include <linux/types.h>
 13 #include <asm/byteorder.h>
 14 #include <asm/page.h>
 15 
 16 #define PCI_IOBASE ((void __iomem *)0)
 17 
 18 extern void __iomem *ioremap(unsigned long physaddr, unsigned long size);
 19 extern void __iomem *ioremap_prot(phys_addr_t offset, unsigned long size,
 20                                   unsigned long flags);
 21 extern void iounmap(const void __iomem *addr);
 22 
 23 #define ioremap_nocache(phy, sz)        ioremap(phy, sz)
 24 #define ioremap_wc(phy, sz)             ioremap(phy, sz)
 25 
 26 /* Change struct page to physical address */
 27 #define page_to_phys(page)              (page_to_pfn(page) << PAGE_SHIFT)
 28 
 29 #define __raw_readb __raw_readb
 30 static inline u8 __raw_readb(const volatile void __iomem *addr)
 31 {
 32         u8 b;
 33 
 34         __asm__ __volatile__(
 35         "       ldb%U1 %0, %1   \n"
 36         : "=r" (b)
 37         : "m" (*(volatile u8 __force *)addr)
 38         : "memory");
 39 
 40         return b;
 41 }
 42 
 43 #define __raw_readw __raw_readw
 44 static inline u16 __raw_readw(const volatile void __iomem *addr)
 45 {
 46         u16 s;
 47 
 48         __asm__ __volatile__(
 49         "       ldw%U1 %0, %1   \n"
 50         : "=r" (s)
 51         : "m" (*(volatile u16 __force *)addr)
 52         : "memory");
 53 
 54         return s;
 55 }
 56 
 57 #define __raw_readl __raw_readl
 58 static inline u32 __raw_readl(const volatile void __iomem *addr)
 59 {
 60         u32 w;
 61 
 62         __asm__ __volatile__(
 63         "       ld%U1 %0, %1    \n"
 64         : "=r" (w)
 65         : "m" (*(volatile u32 __force *)addr)
 66         : "memory");
 67 
 68         return w;
 69 }
 70 
 71 #define __raw_writeb __raw_writeb
 72 static inline void __raw_writeb(u8 b, volatile void __iomem *addr)
 73 {
 74         __asm__ __volatile__(
 75         "       stb%U1 %0, %1   \n"
 76         :
 77         : "r" (b), "m" (*(volatile u8 __force *)addr)
 78         : "memory");
 79 }
 80 
 81 #define __raw_writew __raw_writew
 82 static inline void __raw_writew(u16 s, volatile void __iomem *addr)
 83 {
 84         __asm__ __volatile__(
 85         "       stw%U1 %0, %1   \n"
 86         :
 87         : "r" (s), "m" (*(volatile u16 __force *)addr)
 88         : "memory");
 89 
 90 }
 91 
 92 #define __raw_writel __raw_writel
 93 static inline void __raw_writel(u32 w, volatile void __iomem *addr)
 94 {
 95         __asm__ __volatile__(
 96         "       st%U1 %0, %1    \n"
 97         :
 98         : "r" (w), "m" (*(volatile u32 __force *)addr)
 99         : "memory");
100 
101 }
102 
103 #include <asm-generic/io.h>
104 
105 #endif /* _ASM_ARC_IO_H */
106 

~ [ 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