1919#include <asm-generic/iomap.h>
2020#endif
2121
22+ #ifndef mmiowb
2223#define mmiowb () do {} while (0)
24+ #endif
2325
2426/*****************************************************************************/
2527/*
2830 * differently. On the simple architectures, we just read/write the
2931 * memory location directly.
3032 */
33+ #ifndef __raw_readb
3134static inline u8 __raw_readb (const volatile void __iomem * addr )
3235{
3336 return * (const volatile u8 __force * ) addr ;
3437}
38+ #endif
3539
40+ #ifndef __raw_readw
3641static inline u16 __raw_readw (const volatile void __iomem * addr )
3742{
3843 return * (const volatile u16 __force * ) addr ;
3944}
45+ #endif
4046
47+ #ifndef __raw_readl
4148static inline u32 __raw_readl (const volatile void __iomem * addr )
4249{
4350 return * (const volatile u32 __force * ) addr ;
4451}
52+ #endif
4553
4654#define readb __raw_readb
4755#define readw (addr ) __le16_to_cpu(__raw_readw(addr))
4856#define readl (addr ) __le32_to_cpu(__raw_readl(addr))
4957
58+ #ifndef __raw_writeb
5059static inline void __raw_writeb (u8 b , volatile void __iomem * addr )
5160{
5261 * (volatile u8 __force * ) addr = b ;
5362}
63+ #endif
5464
65+ #ifndef __raw_writew
5566static inline void __raw_writew (u16 b , volatile void __iomem * addr )
5667{
5768 * (volatile u16 __force * ) addr = b ;
5869}
70+ #endif
5971
72+ #ifndef __raw_writel
6073static inline void __raw_writel (u32 b , volatile void __iomem * addr )
6174{
6275 * (volatile u32 __force * ) addr = b ;
6376}
77+ #endif
6478
6579#define writeb __raw_writeb
6680#define writew (b ,addr ) __raw_writew(__cpu_to_le16(b),addr)
@@ -122,6 +136,7 @@ static inline void outl(u32 b, unsigned long addr)
122136#define outw_p (x , addr ) outw((x), (addr))
123137#define outl_p (x , addr ) outl((x), (addr))
124138
139+ #ifndef insb
125140static inline void insb (unsigned long addr , void * buffer , int count )
126141{
127142 if (count ) {
@@ -132,7 +147,9 @@ static inline void insb(unsigned long addr, void *buffer, int count)
132147 } while (-- count );
133148 }
134149}
150+ #endif
135151
152+ #ifndef insw
136153static inline void insw (unsigned long addr , void * buffer , int count )
137154{
138155 if (count ) {
@@ -143,7 +160,9 @@ static inline void insw(unsigned long addr, void *buffer, int count)
143160 } while (-- count );
144161 }
145162}
163+ #endif
146164
165+ #ifndef insl
147166static inline void insl (unsigned long addr , void * buffer , int count )
148167{
149168 if (count ) {
@@ -154,7 +173,9 @@ static inline void insl(unsigned long addr, void *buffer, int count)
154173 } while (-- count );
155174 }
156175}
176+ #endif
157177
178+ #ifndef outsb
158179static inline void outsb (unsigned long addr , const void * buffer , int count )
159180{
160181 if (count ) {
@@ -164,7 +185,9 @@ static inline void outsb(unsigned long addr, const void *buffer, int count)
164185 } while (-- count );
165186 }
166187}
188+ #endif
167189
190+ #ifndef outsw
168191static inline void outsw (unsigned long addr , const void * buffer , int count )
169192{
170193 if (count ) {
@@ -174,7 +197,9 @@ static inline void outsw(unsigned long addr, const void *buffer, int count)
174197 } while (-- count );
175198 }
176199}
200+ #endif
177201
202+ #ifndef outsl
178203static inline void outsl (unsigned long addr , const void * buffer , int count )
179204{
180205 if (count ) {
@@ -184,6 +209,7 @@ static inline void outsl(unsigned long addr, const void *buffer, int count)
184209 } while (-- count );
185210 }
186211}
212+ #endif
187213
188214#ifndef CONFIG_GENERIC_IOMAP
189215#define ioread8 (addr ) readb(addr)
0 commit comments