Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 261919
b: refs/heads/master
c: 67c6269
h: refs/heads/master
i:
  261917: d9c43a7
  261915: 4b2d245
  261911: d517551
  261903: dc1e0e3
  261887: 96e7d18
v: v3
  • Loading branch information
Kuninori Morimoto authored and Paul Mundt committed Jun 21, 2011
1 parent 8159797 commit 87896e8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5899a723b336da241b492583d7e55f1055f8f3b3
refs/heads/master: 67c6269e5c998b53c2c08ce2befbbe20a7b6f57f
11 changes: 9 additions & 2 deletions trunk/drivers/dma/shdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/dma/shdma.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ struct sh_dmae_device {
u32 __iomem *chan_reg;
u16 __iomem *dmars;
unsigned int chcr_offset;
u32 chcr_ie_bit;
};

#define to_sh_chan(chan) container_of(chan, struct sh_dmae_chan, common)
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/sh_dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ struct sh_dmae_pdata {
int ts_shift_num;
u16 dmaor_init;
unsigned int chcr_offset;
u32 chcr_ie_bit;
};

/* DMA register */
Expand Down

0 comments on commit 87896e8

Please sign in to comment.