Skip to content

Commit 5f7b841

Browse files
committed
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: b690f8d ("net: axienet: Use iowrite64 to write all 64b descriptor pointers") Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent a7ffce9 commit 5f7b841

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

drivers/net/ethernet/xilinx/xilinx_axienet.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ static inline void axienet_dma_out32(struct axienet_local *lp,
563563
iowrite32(value, lp->dma_regs + reg);
564564
}
565565

566-
#ifdef CONFIG_64BIT
566+
#if defined(CONFIG_64BIT) && defined(iowrite64)
567567
/**
568568
* axienet_dma_out64 - Memory mapped Axi DMA register write.
569569
* @lp: Pointer to axienet local structure
@@ -579,8 +579,8 @@ static inline void axienet_dma_out64(struct axienet_local *lp,
579579
iowrite64(value, lp->dma_regs + reg);
580580
}
581581

582-
static void axienet_dma_out_addr(struct axienet_local *lp, off_t reg,
583-
dma_addr_t addr)
582+
static inline void axienet_dma_out_addr(struct axienet_local *lp, off_t reg,
583+
dma_addr_t addr)
584584
{
585585
if (lp->features & XAE_FEATURE_DMA_64BIT)
586586
axienet_dma_out64(lp, reg, addr);
@@ -590,7 +590,7 @@ static void axienet_dma_out_addr(struct axienet_local *lp, off_t reg,
590590

591591
#else /* CONFIG_64BIT */
592592

593-
static void axienet_dma_out_addr(struct axienet_local *lp, off_t reg,
593+
static inline void axienet_dma_out_addr(struct axienet_local *lp, off_t reg,
594594
dma_addr_t addr)
595595
{
596596
axienet_dma_out32(lp, reg, lower_32_bits(addr));

0 commit comments

Comments
 (0)