aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDavid S. Miller2022-06-13 12:49:21 +0100
committerDavid S. Miller2022-06-13 12:49:21 +0100
commit5f7b84151a89f6f3a8d1db4db2bc4f5b270d66ee (patch)
tree943874301e41ed2d643d88c0069ad943fe22c1d1 /drivers
parenta7ffce959cca257ea5a6d3ee9bfa2d7fb12bb9fa (diff)
xilinx: Fix build on x86.
CONFIG_64BIT is not sufficient for checking for availability of iowrite64() and friends. Also, the out_addr helpers need to be inline. Fixes: b690f8df6497 ("net: axienet: Use iowrite64 to write all 64b descriptor pointers") Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/xilinx/xilinx_axienet.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet.h b/drivers/net/ethernet/xilinx/xilinx_axienet.h
index 97ddc0273b8a..f2e2261b4b7d 100644
--- a/drivers/net/ethernet/xilinx/xilinx_axienet.h
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet.h
@@ -563,7 +563,7 @@ static inline void axienet_dma_out32(struct axienet_local *lp,
iowrite32(value, lp->dma_regs + reg);
}
-#ifdef CONFIG_64BIT
+#if defined(CONFIG_64BIT) && defined(iowrite64)
/**
* axienet_dma_out64 - Memory mapped Axi DMA register write.
* @lp: Pointer to axienet local structure
@@ -579,8 +579,8 @@ static inline void axienet_dma_out64(struct axienet_local *lp,
iowrite64(value, lp->dma_regs + reg);
}
-static void axienet_dma_out_addr(struct axienet_local *lp, off_t reg,
- dma_addr_t addr)
+static inline void axienet_dma_out_addr(struct axienet_local *lp, off_t reg,
+ dma_addr_t addr)
{
if (lp->features & XAE_FEATURE_DMA_64BIT)
axienet_dma_out64(lp, reg, addr);
@@ -590,7 +590,7 @@ static void axienet_dma_out_addr(struct axienet_local *lp, off_t reg,
#else /* CONFIG_64BIT */
-static void axienet_dma_out_addr(struct axienet_local *lp, off_t reg,
+static inline void axienet_dma_out_addr(struct axienet_local *lp, off_t reg,
dma_addr_t addr)
{
axienet_dma_out32(lp, reg, lower_32_bits(addr));