mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-07 15:18:15 +00:00
dmaengine: shdma: add dmaor_is_32bit flag
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
parent
67c6269e5c
commit
e76c3af873
2 changed files with 14 additions and 2 deletions
|
@ -70,12 +70,22 @@ static u32 sh_dmae_readl(struct sh_dmae_chan *sh_dc, u32 reg)
|
||||||
|
|
||||||
static u16 dmaor_read(struct sh_dmae_device *shdev)
|
static u16 dmaor_read(struct sh_dmae_device *shdev)
|
||||||
{
|
{
|
||||||
return __raw_readw(shdev->chan_reg + DMAOR / sizeof(u32));
|
u32 __iomem *addr = shdev->chan_reg + DMAOR / sizeof(u32);
|
||||||
|
|
||||||
|
if (shdev->pdata->dmaor_is_32bit)
|
||||||
|
return __raw_readl(addr);
|
||||||
|
else
|
||||||
|
return __raw_readw(addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dmaor_write(struct sh_dmae_device *shdev, u16 data)
|
static void dmaor_write(struct sh_dmae_device *shdev, u16 data)
|
||||||
{
|
{
|
||||||
__raw_writew(data, shdev->chan_reg + DMAOR / sizeof(u32));
|
u32 __iomem *addr = shdev->chan_reg + DMAOR / sizeof(u32);
|
||||||
|
|
||||||
|
if (shdev->pdata->dmaor_is_32bit)
|
||||||
|
__raw_writel(data, addr);
|
||||||
|
else
|
||||||
|
__raw_writew(data, addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void chcr_write(struct sh_dmae_chan *sh_dc, u32 data)
|
static void chcr_write(struct sh_dmae_chan *sh_dc, u32 data)
|
||||||
|
|
|
@ -64,6 +64,8 @@ struct sh_dmae_pdata {
|
||||||
u16 dmaor_init;
|
u16 dmaor_init;
|
||||||
unsigned int chcr_offset;
|
unsigned int chcr_offset;
|
||||||
u32 chcr_ie_bit;
|
u32 chcr_ie_bit;
|
||||||
|
|
||||||
|
unsigned int dmaor_is_32bit:1;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* DMA register */
|
/* DMA register */
|
||||||
|
|
Loading…
Add table
Reference in a new issue