Commit 1dd39926 authored by David S. Miller's avatar David S. Miller

[FC4]: Fix iomem warnings in SOC driver.

parent ba93d598
...@@ -81,29 +81,29 @@ do { (s)->imask = (i); \ ...@@ -81,29 +81,29 @@ do { (s)->imask = (i); \
* That's why here are the following inline functions... * That's why here are the following inline functions...
*/ */
typedef unsigned long xram_p; typedef void __iomem *xram_p;
/* Get 32bit number from XRAM */ /* Get 32bit number from XRAM */
static inline u32 xram_get_32 (xram_p x) static inline u32 xram_get_32(xram_p x)
{ {
return ((sbus_readw(x + 0x00UL) << 16) | return ((sbus_readw(x + 0x00UL) << 16) |
(sbus_readw(x + 0x02UL))); (sbus_readw(x + 0x02UL)));
} }
/* Like the above, but when we don't care about the high 16 bits */ /* Like the above, but when we don't care about the high 16 bits */
static inline u32 xram_get_32low (xram_p x) static inline u32 xram_get_32low(xram_p x)
{ {
return (u32) sbus_readw(x + 0x02UL); return (u32) sbus_readw(x + 0x02UL);
} }
static inline u16 xram_get_16 (xram_p x) static inline u16 xram_get_16(xram_p x)
{ {
return sbus_readw(x); return sbus_readw(x);
} }
static inline u8 xram_get_8 (xram_p x) static inline u8 xram_get_8(xram_p x)
{ {
if (x & (xram_p)0x1) { if ((unsigned long)x & 0x1UL) {
x = x - 1; x = x - 1;
return (u8) sbus_readw(x); return (u8) sbus_readw(x);
} else { } else {
...@@ -111,7 +111,7 @@ static inline u8 xram_get_8 (xram_p x) ...@@ -111,7 +111,7 @@ static inline u8 xram_get_8 (xram_p x)
} }
} }
static inline void xram_copy_from (void *p, xram_p x, int len) static inline void xram_copy_from(void *p, xram_p x, int len)
{ {
for (len >>= 2; len > 0; len--, x += sizeof(u32)) { for (len >>= 2; len > 0; len--, x += sizeof(u32)) {
u32 val, *p32 = p; u32 val, *p32 = p;
...@@ -123,7 +123,7 @@ static inline void xram_copy_from (void *p, xram_p x, int len) ...@@ -123,7 +123,7 @@ static inline void xram_copy_from (void *p, xram_p x, int len)
} }
} }
static inline void xram_copy_to (xram_p x, void *p, int len) static inline void xram_copy_to(xram_p x, void *p, int len)
{ {
for (len >>= 2; len > 0; len--, x += sizeof(u32)) { for (len >>= 2; len > 0; len--, x += sizeof(u32)) {
u32 tmp, *p32 = p; u32 tmp, *p32 = p;
...@@ -135,7 +135,7 @@ static inline void xram_copy_to (xram_p x, void *p, int len) ...@@ -135,7 +135,7 @@ static inline void xram_copy_to (xram_p x, void *p, int len)
} }
} }
static inline void xram_bzero (xram_p x, int len) static inline void xram_bzero(xram_p x, int len)
{ {
for (len >>= 1; len > 0; len--, x += sizeof(u16)) for (len >>= 1; len > 0; len--, x += sizeof(u16))
sbus_writew(0, x); sbus_writew(0, x);
...@@ -274,7 +274,7 @@ struct soc { ...@@ -274,7 +274,7 @@ struct soc {
soc_cq req[2]; /* Request CQs */ soc_cq req[2]; /* Request CQs */
soc_cq rsp[2]; /* Response CQs */ soc_cq rsp[2]; /* Response CQs */
int soc_no; int soc_no;
unsigned long regs; void __iomem *regs;
xram_p xram; xram_p xram;
fc_wwn wwn; fc_wwn wwn;
u32 imask; /* Our copy of regs->imask */ u32 imask; /* Our copy of regs->imask */
......
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