dmaengine: shdma: add .needs_tend_set / .no_dmars flags
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
Родитель
e76c3af873
Коммит
260bf2c5f6
|
@ -194,6 +194,9 @@ static void dmae_start(struct sh_dmae_chan *sh_chan)
|
||||||
struct sh_dmae_device *shdev = to_sh_dev(sh_chan);
|
struct sh_dmae_device *shdev = to_sh_dev(sh_chan);
|
||||||
u32 chcr = chcr_read(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 |= CHCR_DE | shdev->chcr_ie_bit;
|
||||||
chcr_write(sh_chan, chcr & ~CHCR_TE);
|
chcr_write(sh_chan, chcr & ~CHCR_TE);
|
||||||
}
|
}
|
||||||
|
@ -242,6 +245,9 @@ static int dmae_set_dmars(struct sh_dmae_chan *sh_chan, u16 val)
|
||||||
if (dmae_is_busy(sh_chan))
|
if (dmae_is_busy(sh_chan))
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
|
|
||||||
|
if (pdata->no_dmars)
|
||||||
|
return 0;
|
||||||
|
|
||||||
/* in the case of a missing DMARS resource use first memory window */
|
/* in the case of a missing DMARS resource use first memory window */
|
||||||
if (!addr)
|
if (!addr)
|
||||||
addr = (u16 __iomem *)shdev->chan_reg;
|
addr = (u16 __iomem *)shdev->chan_reg;
|
||||||
|
|
|
@ -66,6 +66,8 @@ struct sh_dmae_pdata {
|
||||||
u32 chcr_ie_bit;
|
u32 chcr_ie_bit;
|
||||||
|
|
||||||
unsigned int dmaor_is_32bit:1;
|
unsigned int dmaor_is_32bit:1;
|
||||||
|
unsigned int needs_tend_set:1;
|
||||||
|
unsigned int no_dmars:1;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* DMA register */
|
/* DMA register */
|
||||||
|
@ -75,6 +77,8 @@ struct sh_dmae_pdata {
|
||||||
#define CHCR 0x0C
|
#define CHCR 0x0C
|
||||||
#define DMAOR 0x40
|
#define DMAOR 0x40
|
||||||
|
|
||||||
|
#define TEND 0x18 /* USB-DMAC */
|
||||||
|
|
||||||
/* DMAOR definitions */
|
/* DMAOR definitions */
|
||||||
#define DMAOR_AE 0x00000004
|
#define DMAOR_AE 0x00000004
|
||||||
#define DMAOR_NMIF 0x00000002
|
#define DMAOR_NMIF 0x00000002
|
||||||
|
|
Загрузка…
Ссылка в новой задаче