summaryrefslogtreecommitdiff
path: root/drivers/dma/shdma.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2011-06-17 12:20:56 +0400
committerPaul Mundt <lethal@linux-sh.org>2011-06-21 12:56:07 +0400
commite76c3af873025f5a704d56a28882be761e15657b (patch)
treec5dbbd3433b0c676e1d86ddd9442e301ffa41b0c /drivers/dma/shdma.c
parent67c6269e5c998b53c2c08ce2befbbe20a7b6f57f (diff)
downloadlinux-e76c3af873025f5a704d56a28882be761e15657b.tar.xz
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>
Diffstat (limited to 'drivers/dma/shdma.c')
-rw-r--r--drivers/dma/shdma.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/dma/shdma.c b/drivers/dma/shdma.c
index 9412de3ef899..6a21cd843ab7 100644
--- a/drivers/dma/shdma.c
+++ b/drivers/dma/shdma.c
@@ -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)
{
- 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)
{
- __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)