mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-11 15:49:56 +00:00
dmaengine: fsldma: Replace DMA_IN/OUT by FSL_DMA_IN/OUT
This patch implement a standard macro call functions is used to NXP dma drivers. Signed-off-by: Wen He <wen.he_1@nxp.com> Signed-off-by: Peng Ma <peng.ma@nxp.com> Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
bfeffd1552
commit
a7359e762f
@ -53,42 +53,42 @@ static const char msg_ld_oom[] = "No free memory for link descriptor";
|
|||||||
|
|
||||||
static void set_sr(struct fsldma_chan *chan, u32 val)
|
static void set_sr(struct fsldma_chan *chan, u32 val)
|
||||||
{
|
{
|
||||||
DMA_OUT(chan, &chan->regs->sr, val, 32);
|
FSL_DMA_OUT(chan, &chan->regs->sr, val, 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
static u32 get_sr(struct fsldma_chan *chan)
|
static u32 get_sr(struct fsldma_chan *chan)
|
||||||
{
|
{
|
||||||
return DMA_IN(chan, &chan->regs->sr, 32);
|
return FSL_DMA_IN(chan, &chan->regs->sr, 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_mr(struct fsldma_chan *chan, u32 val)
|
static void set_mr(struct fsldma_chan *chan, u32 val)
|
||||||
{
|
{
|
||||||
DMA_OUT(chan, &chan->regs->mr, val, 32);
|
FSL_DMA_OUT(chan, &chan->regs->mr, val, 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
static u32 get_mr(struct fsldma_chan *chan)
|
static u32 get_mr(struct fsldma_chan *chan)
|
||||||
{
|
{
|
||||||
return DMA_IN(chan, &chan->regs->mr, 32);
|
return FSL_DMA_IN(chan, &chan->regs->mr, 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_cdar(struct fsldma_chan *chan, dma_addr_t addr)
|
static void set_cdar(struct fsldma_chan *chan, dma_addr_t addr)
|
||||||
{
|
{
|
||||||
DMA_OUT(chan, &chan->regs->cdar, addr | FSL_DMA_SNEN, 64);
|
FSL_DMA_OUT(chan, &chan->regs->cdar, addr | FSL_DMA_SNEN, 64);
|
||||||
}
|
}
|
||||||
|
|
||||||
static dma_addr_t get_cdar(struct fsldma_chan *chan)
|
static dma_addr_t get_cdar(struct fsldma_chan *chan)
|
||||||
{
|
{
|
||||||
return DMA_IN(chan, &chan->regs->cdar, 64) & ~FSL_DMA_SNEN;
|
return FSL_DMA_IN(chan, &chan->regs->cdar, 64) & ~FSL_DMA_SNEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_bcr(struct fsldma_chan *chan, u32 val)
|
static void set_bcr(struct fsldma_chan *chan, u32 val)
|
||||||
{
|
{
|
||||||
DMA_OUT(chan, &chan->regs->bcr, val, 32);
|
FSL_DMA_OUT(chan, &chan->regs->bcr, val, 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
static u32 get_bcr(struct fsldma_chan *chan)
|
static u32 get_bcr(struct fsldma_chan *chan)
|
||||||
{
|
{
|
||||||
return DMA_IN(chan, &chan->regs->bcr, 32);
|
return FSL_DMA_IN(chan, &chan->regs->bcr, 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -223,10 +223,10 @@ static void out_le64(u64 __iomem *addr, u64 val)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DMA_IN(fsl_chan, addr, width) \
|
#define FSL_DMA_IN(fsl_chan, addr, width) \
|
||||||
(((fsl_chan)->feature & FSL_DMA_BIG_ENDIAN) ? \
|
(((fsl_chan)->feature & FSL_DMA_BIG_ENDIAN) ? \
|
||||||
in_be##width(addr) : in_le##width(addr))
|
in_be##width(addr) : in_le##width(addr))
|
||||||
#define DMA_OUT(fsl_chan, addr, val, width) \
|
#define FSL_DMA_OUT(fsl_chan, addr, val, width) \
|
||||||
(((fsl_chan)->feature & FSL_DMA_BIG_ENDIAN) ? \
|
(((fsl_chan)->feature & FSL_DMA_BIG_ENDIAN) ? \
|
||||||
out_be##width(addr, val) : out_le##width(addr, val))
|
out_be##width(addr, val) : out_le##width(addr, val))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user