aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ppc/io.h
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-10-12 00:43:32 -0400
committerPaul Mackerras <paulus@samba.org>2005-10-12 00:43:32 -0400
commitb6ec995a21a9428aef620b5adf46d047a18d88b8 (patch)
tree6719121e6605cbca524b687f47336b9bbf3b8d41 /include/asm-ppc/io.h
parent3a5f8c5f788d68e325d9fe3c26f4df5a5aee838a (diff)
parentda64c6ee6bb71bfb3f09d9bb89ce1aa4b1ee7e89 (diff)
Merge from Linus' tree
Diffstat (limited to 'include/asm-ppc/io.h')
-rw-r--r--include/asm-ppc/io.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/include/asm-ppc/io.h b/include/asm-ppc/io.h
index 39caf067a31b..f7f614dfc648 100644
--- a/include/asm-ppc/io.h
+++ b/include/asm-ppc/io.h
@@ -57,7 +57,7 @@ extern unsigned long pci_dram_offset;
57 * is actually performed (i.e. the data has come back) before we start 57 * is actually performed (i.e. the data has come back) before we start
58 * executing any following instructions. 58 * executing any following instructions.
59 */ 59 */
60extern inline int in_8(volatile unsigned char __iomem *addr) 60extern inline int in_8(const volatile unsigned char __iomem *addr)
61{ 61{
62 int ret; 62 int ret;
63 63
@@ -73,7 +73,7 @@ extern inline void out_8(volatile unsigned char __iomem *addr, int val)
73 __asm__ __volatile__("stb%U0%X0 %1,%0; eieio" : "=m" (*addr) : "r" (val)); 73 __asm__ __volatile__("stb%U0%X0 %1,%0; eieio" : "=m" (*addr) : "r" (val));
74} 74}
75 75
76extern inline int in_le16(volatile unsigned short __iomem *addr) 76extern inline int in_le16(const volatile unsigned short __iomem *addr)
77{ 77{
78 int ret; 78 int ret;
79 79
@@ -84,7 +84,7 @@ extern inline int in_le16(volatile unsigned short __iomem *addr)
84 return ret; 84 return ret;
85} 85}
86 86
87extern inline int in_be16(volatile unsigned short __iomem *addr) 87extern inline int in_be16(const volatile unsigned short __iomem *addr)
88{ 88{
89 int ret; 89 int ret;
90 90
@@ -105,7 +105,7 @@ extern inline void out_be16(volatile unsigned short __iomem *addr, int val)
105 __asm__ __volatile__("sth%U0%X0 %1,%0; eieio" : "=m" (*addr) : "r" (val)); 105 __asm__ __volatile__("sth%U0%X0 %1,%0; eieio" : "=m" (*addr) : "r" (val));
106} 106}
107 107
108extern inline unsigned in_le32(volatile unsigned __iomem *addr) 108extern inline unsigned in_le32(const volatile unsigned __iomem *addr)
109{ 109{
110 unsigned ret; 110 unsigned ret;
111 111
@@ -116,7 +116,7 @@ extern inline unsigned in_le32(volatile unsigned __iomem *addr)
116 return ret; 116 return ret;
117} 117}
118 118
119extern inline unsigned in_be32(volatile unsigned __iomem *addr) 119extern inline unsigned in_be32(const volatile unsigned __iomem *addr)
120{ 120{
121 unsigned ret; 121 unsigned ret;
122 122
@@ -140,7 +140,7 @@ extern inline void out_be32(volatile unsigned __iomem *addr, int val)
140#define readb(addr) in_8((volatile u8 *)(addr)) 140#define readb(addr) in_8((volatile u8 *)(addr))
141#define writeb(b,addr) out_8((volatile u8 *)(addr), (b)) 141#define writeb(b,addr) out_8((volatile u8 *)(addr), (b))
142#else 142#else
143static inline __u8 readb(volatile void __iomem *addr) 143static inline __u8 readb(const volatile void __iomem *addr)
144{ 144{
145 return in_8(addr); 145 return in_8(addr);
146} 146}
@@ -151,11 +151,11 @@ static inline void writeb(__u8 b, volatile void __iomem *addr)
151#endif 151#endif
152 152
153#if defined(CONFIG_APUS) 153#if defined(CONFIG_APUS)
154static inline __u16 readw(volatile void __iomem *addr) 154static inline __u16 readw(const volatile void __iomem *addr)
155{ 155{
156 return *(__force volatile __u16 *)(addr); 156 return *(__force volatile __u16 *)(addr);
157} 157}
158static inline __u32 readl(volatile void __iomem *addr) 158static inline __u32 readl(const volatile void __iomem *addr)
159{ 159{
160 return *(__force volatile __u32 *)(addr); 160 return *(__force volatile __u32 *)(addr);
161} 161}
@@ -174,11 +174,11 @@ static inline void writel(__u32 b, volatile void __iomem *addr)
174#define writew(b,addr) out_le16((volatile u16 *)(addr),(b)) 174#define writew(b,addr) out_le16((volatile u16 *)(addr),(b))
175#define writel(b,addr) out_le32((volatile u32 *)(addr),(b)) 175#define writel(b,addr) out_le32((volatile u32 *)(addr),(b))
176#else 176#else
177static inline __u16 readw(volatile void __iomem *addr) 177static inline __u16 readw(const volatile void __iomem *addr)
178{ 178{
179 return in_le16(addr); 179 return in_le16(addr);
180} 180}
181static inline __u32 readl(volatile void __iomem *addr) 181static inline __u32 readl(const volatile void __iomem *addr)
182{ 182{
183 return in_le32(addr); 183 return in_le32(addr);
184} 184}