aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/xilinx/xilinx_axienet.h
diff options
context:
space:
mode:
authorRobert Hancock <hancock@sedsystems.ca>2019-06-06 16:28:06 -0600
committerDavid S. Miller <davem@davemloft.net>2019-06-06 16:24:29 -0700
commitd85f5f3e4eb38300642d2b54c5740b351c0bdcc5 (patch)
tree0457f770cfd480d8f9bffe8e015400c4060df846 /drivers/net/ethernet/xilinx/xilinx_axienet.h
parentnet: axienet: Fix casting of pointers to u32 (diff)
downloadlinux-dev-d85f5f3e4eb38300642d2b54c5740b351c0bdcc5.tar.xz
linux-dev-d85f5f3e4eb38300642d2b54c5740b351c0bdcc5.zip
net: axienet: Use standard IO accessors
This driver was using in_be32 and out_be32 IO accessors which do not exist on most platforms. Also, the use of big-endian accessors does not seem correct as this hardware is accessed over an AXI bus which, to the extent it has an endian-ness, is little-endian. Switch to standard ioread32/iowrite32 accessors. Signed-off-by: Robert Hancock <hancock@sedsystems.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/xilinx/xilinx_axienet.h')
-rw-r--r--drivers/net/ethernet/xilinx/xilinx_axienet.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet.h b/drivers/net/ethernet/xilinx/xilinx_axienet.h
index e09dc1433187..d82e3b63d442 100644
--- a/drivers/net/ethernet/xilinx/xilinx_axienet.h
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet.h
@@ -476,7 +476,7 @@ struct axienet_option {
*/
static inline u32 axienet_ior(struct axienet_local *lp, off_t offset)
{
- return in_be32(lp->regs + offset);
+ return ioread32(lp->regs + offset);
}
static inline u32 axinet_ior_read_mcr(struct axienet_local *lp)
@@ -496,7 +496,7 @@ static inline u32 axinet_ior_read_mcr(struct axienet_local *lp)
static inline void axienet_iow(struct axienet_local *lp, off_t offset,
u32 value)
{
- out_be32((lp->regs + offset), value);
+ iowrite32(value, lp->regs + offset);
}
/* Function prototypes visible in xilinx_axienet_mdio.c for other files */