Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 261921
b: refs/heads/master
c: 260bf2c
h: refs/heads/master
i:
  261919: 87896e8
v: v3
  • Loading branch information
Kuninori Morimoto authored and Paul Mundt committed Jun 21, 2011
1 parent 83bc554 commit fddf684
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e76c3af873025f5a704d56a28882be761e15657b
refs/heads/master: 260bf2c5f69f419b04b6861ca91565b5fb16ce48
6 changes: 6 additions & 0 deletions trunk/drivers/dma/shdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ 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);

if (shdev->pdata->needs_tend_set)
sh_dmae_writel(sh_chan, 0xFFFFFFFF, TEND);

chcr |= CHCR_DE | shdev->chcr_ie_bit;
chcr_write(sh_chan, chcr & ~CHCR_TE);
}
Expand Down Expand Up @@ -242,6 +245,9 @@ static int dmae_set_dmars(struct sh_dmae_chan *sh_chan, u16 val)
if (dmae_is_busy(sh_chan))
return -EBUSY;

if (pdata->no_dmars)
return 0;

/* in the case of a missing DMARS resource use first memory window */
if (!addr)
addr = (u16 __iomem *)shdev->chan_reg;
Expand Down
4 changes: 4 additions & 0 deletions trunk/include/linux/sh_dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ struct sh_dmae_pdata {
u32 chcr_ie_bit;

unsigned int dmaor_is_32bit:1;
unsigned int needs_tend_set:1;
unsigned int no_dmars:1;
};

/* DMA register */
Expand All @@ -75,6 +77,8 @@ struct sh_dmae_pdata {
#define CHCR 0x0C
#define DMAOR 0x40

#define TEND 0x18 /* USB-DMAC */

/* DMAOR definitions */
#define DMAOR_AE 0x00000004
#define DMAOR_NMIF 0x00000002
Expand Down

0 comments on commit fddf684

Please sign in to comment.