Commit 2cd0f559 authored by Thierry Reding's avatar Thierry Reding

ARM: ebsa110: Properly override I/O accessors

In order to override accessors properly they must be #define'd so that
subsequent generic headers (the one for ARM and finally the architecture
independent one) can properly detect it.

While at it, make all accessors use volatile void __iomem * to avoid a
slew of build warnings.
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent bfb111ec
...@@ -29,9 +29,9 @@ u8 __readb(const volatile void __iomem *addr); ...@@ -29,9 +29,9 @@ u8 __readb(const volatile void __iomem *addr);
u16 __readw(const volatile void __iomem *addr); u16 __readw(const volatile void __iomem *addr);
u32 __readl(const volatile void __iomem *addr); u32 __readl(const volatile void __iomem *addr);
void __writeb(u8 val, void __iomem *addr); void __writeb(u8 val, volatile void __iomem *addr);
void __writew(u16 val, void __iomem *addr); void __writew(u16 val, volatile void __iomem *addr);
void __writel(u32 val, void __iomem *addr); void __writel(u32 val, volatile void __iomem *addr);
/* /*
* Argh, someone forgot the IOCS16 line. We therefore have to handle * Argh, someone forgot the IOCS16 line. We therefore have to handle
...@@ -62,20 +62,31 @@ void __writel(u32 val, void __iomem *addr); ...@@ -62,20 +62,31 @@ void __writel(u32 val, void __iomem *addr);
#define writew(v,b) __writew(v,b) #define writew(v,b) __writew(v,b)
#define writel(v,b) __writel(v,b) #define writel(v,b) __writel(v,b)
#define insb insb
extern void insb(unsigned int port, void *buf, int sz); extern void insb(unsigned int port, void *buf, int sz);
#define insw insw
extern void insw(unsigned int port, void *buf, int sz); extern void insw(unsigned int port, void *buf, int sz);
#define insl insl
extern void insl(unsigned int port, void *buf, int sz); extern void insl(unsigned int port, void *buf, int sz);
#define outsb outsb
extern void outsb(unsigned int port, const void *buf, int sz); extern void outsb(unsigned int port, const void *buf, int sz);
#define outsw outsw
extern void outsw(unsigned int port, const void *buf, int sz); extern void outsw(unsigned int port, const void *buf, int sz);
#define outsl outsl
extern void outsl(unsigned int port, const void *buf, int sz); extern void outsl(unsigned int port, const void *buf, int sz);
/* can't support writesb atm */ /* can't support writesb atm */
extern void writesw(void __iomem *addr, const void *data, int wordlen); #define writesw writesw
extern void writesl(void __iomem *addr, const void *data, int longlen); extern void writesw(volatile void __iomem *addr, const void *data, int wordlen);
#define writesl writesl
extern void writesl(volatile void __iomem *addr, const void *data, int longlen);
/* can't support readsb atm */ /* can't support readsb atm */
extern void readsw(const void __iomem *addr, void *data, int wordlen); #define readsw readsw
extern void readsl(const void __iomem *addr, void *data, int longlen); extern void readsw(const volatile void __iomem *addr, void *data, int wordlen);
#define readsl readsl
extern void readsl(const volatile void __iomem *addr, void *data, int longlen);
#endif #endif
...@@ -102,7 +102,7 @@ EXPORT_SYMBOL(__readb); ...@@ -102,7 +102,7 @@ EXPORT_SYMBOL(__readb);
EXPORT_SYMBOL(__readw); EXPORT_SYMBOL(__readw);
EXPORT_SYMBOL(__readl); EXPORT_SYMBOL(__readl);
void readsw(const void __iomem *addr, void *data, int len) void readsw(const volatile void __iomem *addr, void *data, int len)
{ {
void __iomem *a = __isamem_convert_addr(addr); void __iomem *a = __isamem_convert_addr(addr);
...@@ -112,7 +112,7 @@ void readsw(const void __iomem *addr, void *data, int len) ...@@ -112,7 +112,7 @@ void readsw(const void __iomem *addr, void *data, int len)
} }
EXPORT_SYMBOL(readsw); EXPORT_SYMBOL(readsw);
void readsl(const void __iomem *addr, void *data, int len) void readsl(const volatile void __iomem *addr, void *data, int len)
{ {
void __iomem *a = __isamem_convert_addr(addr); void __iomem *a = __isamem_convert_addr(addr);
...@@ -122,7 +122,7 @@ void readsl(const void __iomem *addr, void *data, int len) ...@@ -122,7 +122,7 @@ void readsl(const void __iomem *addr, void *data, int len)
} }
EXPORT_SYMBOL(readsl); EXPORT_SYMBOL(readsl);
void __writeb(u8 val, void __iomem *addr) void __writeb(u8 val, volatile void __iomem *addr)
{ {
void __iomem *a = __isamem_convert_addr(addr); void __iomem *a = __isamem_convert_addr(addr);
...@@ -132,7 +132,7 @@ void __writeb(u8 val, void __iomem *addr) ...@@ -132,7 +132,7 @@ void __writeb(u8 val, void __iomem *addr)
__raw_writeb(val, a); __raw_writeb(val, a);
} }
void __writew(u16 val, void __iomem *addr) void __writew(u16 val, volatile void __iomem *addr)
{ {
void __iomem *a = __isamem_convert_addr(addr); void __iomem *a = __isamem_convert_addr(addr);
...@@ -142,7 +142,7 @@ void __writew(u16 val, void __iomem *addr) ...@@ -142,7 +142,7 @@ void __writew(u16 val, void __iomem *addr)
__raw_writew(val, a); __raw_writew(val, a);
} }
void __writel(u32 val, void __iomem *addr) void __writel(u32 val, volatile void __iomem *addr)
{ {
void __iomem *a = __isamem_convert_addr(addr); void __iomem *a = __isamem_convert_addr(addr);
...@@ -157,7 +157,7 @@ EXPORT_SYMBOL(__writeb); ...@@ -157,7 +157,7 @@ EXPORT_SYMBOL(__writeb);
EXPORT_SYMBOL(__writew); EXPORT_SYMBOL(__writew);
EXPORT_SYMBOL(__writel); EXPORT_SYMBOL(__writel);
void writesw(void __iomem *addr, const void *data, int len) void writesw(volatile void __iomem *addr, const void *data, int len)
{ {
void __iomem *a = __isamem_convert_addr(addr); void __iomem *a = __isamem_convert_addr(addr);
...@@ -167,7 +167,7 @@ void writesw(void __iomem *addr, const void *data, int len) ...@@ -167,7 +167,7 @@ void writesw(void __iomem *addr, const void *data, int len)
} }
EXPORT_SYMBOL(writesw); EXPORT_SYMBOL(writesw);
void writesl(void __iomem *addr, const void *data, int len) void writesl(volatile void __iomem *addr, const void *data, int len)
{ {
void __iomem *a = __isamem_convert_addr(addr); void __iomem *a = __isamem_convert_addr(addr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment