Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 261920
b: refs/heads/master
c: e76c3af
h: refs/heads/master
v: v3
  • Loading branch information
Kuninori Morimoto authored and Paul Mundt committed Jun 21, 2011
1 parent 87896e8 commit 83bc554
Show file tree
Hide file tree
Showing 3 changed files with 15 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: 67c6269e5c998b53c2c08ce2befbbe20a7b6f57f
refs/heads/master: e76c3af873025f5a704d56a28882be761e15657b
14 changes: 12 additions & 2 deletions trunk/drivers/dma/shdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/sh_dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ struct sh_dmae_pdata {
u16 dmaor_init;
unsigned int chcr_offset;
u32 chcr_ie_bit;

unsigned int dmaor_is_32bit:1;
};

/* DMA register */
Expand Down

0 comments on commit 83bc554

Please sign in to comment.