mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
dmaengine: fsl-edma-common: move dmamux register to another single function
Prepare for edmav2 on i.mx7ulp whose dmamux register is 32bit. No function impacted. Signed-off-by: Robin Gong <yibin.gong@nxp.com> Tested-by: Angelo Dureghello <angelo@sysam.it> Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
af802728e4
commit
78690bf3c4
1 changed files with 14 additions and 4 deletions
|
|
@ -77,6 +77,19 @@ void fsl_edma_disable_request(struct fsl_edma_chan *fsl_chan)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(fsl_edma_disable_request);
|
EXPORT_SYMBOL_GPL(fsl_edma_disable_request);
|
||||||
|
|
||||||
|
static void mux_configure8(struct fsl_edma_chan *fsl_chan, void __iomem *addr,
|
||||||
|
u32 off, u32 slot, bool enable)
|
||||||
|
{
|
||||||
|
u8 val8;
|
||||||
|
|
||||||
|
if (enable)
|
||||||
|
val8 = EDMAMUX_CHCFG_ENBL | slot;
|
||||||
|
else
|
||||||
|
val8 = EDMAMUX_CHCFG_DIS;
|
||||||
|
|
||||||
|
iowrite8(val8, addr + off);
|
||||||
|
}
|
||||||
|
|
||||||
void fsl_edma_chan_mux(struct fsl_edma_chan *fsl_chan,
|
void fsl_edma_chan_mux(struct fsl_edma_chan *fsl_chan,
|
||||||
unsigned int slot, bool enable)
|
unsigned int slot, bool enable)
|
||||||
{
|
{
|
||||||
|
|
@ -90,10 +103,7 @@ void fsl_edma_chan_mux(struct fsl_edma_chan *fsl_chan,
|
||||||
muxaddr = fsl_chan->edma->muxbase[ch / chans_per_mux];
|
muxaddr = fsl_chan->edma->muxbase[ch / chans_per_mux];
|
||||||
slot = EDMAMUX_CHCFG_SOURCE(slot);
|
slot = EDMAMUX_CHCFG_SOURCE(slot);
|
||||||
|
|
||||||
if (enable)
|
mux_configure8(fsl_chan, muxaddr, ch_off, slot, enable);
|
||||||
iowrite8(EDMAMUX_CHCFG_ENBL | slot, muxaddr + ch_off);
|
|
||||||
else
|
|
||||||
iowrite8(EDMAMUX_CHCFG_DIS, muxaddr + ch_off);
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(fsl_edma_chan_mux);
|
EXPORT_SYMBOL_GPL(fsl_edma_chan_mux);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue