diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2011-06-17 12:20:51 +0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-06-21 12:56:01 +0400 |
commit | 67c6269e5c998b53c2c08ce2befbbe20a7b6f57f (patch) | |
tree | f06100f0cb5717ce5e1ef89cbd7bd12830165ed5 /drivers/dma/shdma.c | |
parent | 5899a723b336da241b492583d7e55f1055f8f3b3 (diff) | |
download | linux-67c6269e5c998b53c2c08ce2befbbe20a7b6f57f.tar.xz |
dmaengine: shdma: add chcr_ie_bit
IE bit position on CHCR register is not same in all DMAC.
This patch adds new "chcr_ie_bit" to decide it.
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.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/dma/shdma.c b/drivers/dma/shdma.c index 40900c1cee9a..9412de3ef899 100644 --- a/drivers/dma/shdma.c +++ b/drivers/dma/shdma.c @@ -181,17 +181,19 @@ static void dmae_set_reg(struct sh_dmae_chan *sh_chan, struct sh_dmae_regs *hw) static void dmae_start(struct sh_dmae_chan *sh_chan) { + struct sh_dmae_device *shdev = to_sh_dev(sh_chan); u32 chcr = chcr_read(sh_chan); - chcr |= CHCR_DE | CHCR_IE; + chcr |= CHCR_DE | shdev->chcr_ie_bit; chcr_write(sh_chan, chcr & ~CHCR_TE); } static void dmae_halt(struct sh_dmae_chan *sh_chan) { + struct sh_dmae_device *shdev = to_sh_dev(sh_chan); u32 chcr = chcr_read(sh_chan); - chcr &= ~(CHCR_DE | CHCR_TE | CHCR_IE); + chcr &= ~(CHCR_DE | CHCR_TE | shdev->chcr_ie_bit); chcr_write(sh_chan, chcr); } @@ -1157,6 +1159,11 @@ static int __init sh_dmae_probe(struct platform_device *pdev) else shdev->chcr_offset = CHCR; + if (pdata->chcr_ie_bit) + shdev->chcr_ie_bit = pdata->chcr_ie_bit; + else + shdev->chcr_ie_bit = CHCR_IE; + platform_set_drvdata(pdev, shdev); pm_runtime_enable(&pdev->dev); |