gianfar: use more portable i/o accessors
authorKim Phillips <kim.phillips@freescale.com>
Fri, 11 Jan 2013 12:18:21 +0000 (12:18 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 11 Jan 2013 23:58:08 +0000 (15:58 -0800)
in/out_be32 accessors are Power arch centric whereas
ioread/writebe32 are available in other arches.  Also, unlike
in/out_be32, ioread/writebe32 expect non-volatile address arguments.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/gianfar.h

index 1b6a67cf8bf636e9a63bfc213549ac15ec3c29dd..91bb2de9ba8d8062e154bc541bc2907214fc9334 100644 (file)
@@ -1136,16 +1136,16 @@ static inline int gfar_has_errata(struct gfar_private *priv,
        return priv->errata & err;
 }
 
-static inline u32 gfar_read(volatile unsigned __iomem *addr)
+static inline u32 gfar_read(unsigned __iomem *addr)
 {
        u32 val;
-       val = in_be32(addr);
+       val = ioread32be(addr);
        return val;
 }
 
-static inline void gfar_write(volatile unsigned __iomem *addr, u32 val)
+static inline void gfar_write(unsigned __iomem *addr, u32 val)
 {
-       out_be32(addr, val);
+       iowrite32be(val, addr);
 }
 
 static inline void gfar_write_filer(struct gfar_private *priv,