Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133334
b: refs/heads/master
c: 988f831
h: refs/heads/master
v: v3
  • Loading branch information
Nobuhiro Iwamatsu authored and Paul Mundt committed Mar 16, 2009
1 parent 6e81bb0 commit 044779f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 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: 50cca715a64b66ccf173767d94d4020ea0a6129c
refs/heads/master: 988f831df398ff36f67b095245060c24c354e9e9
8 changes: 8 additions & 0 deletions trunk/arch/sh/drivers/dma/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ config SH_DMA
select SH_DMA_API
default n

config SH_DMA_IRQ_MULTI
bool
depends on SH_DMA
default y if CPU_SUBTYPE_SH7750 || CPU_SUBTYPE_SH7751 || \
CPU_SUBTYPE_SH7750S || CPU_SUBTYPE_SH7750R || CPU_SUBTYPE_SH7751R || \
CPU_SUBTYPE_SH7091 || CPU_SUBTYPE_SH7763 || CPU_SUBTYPE_SH7764 || \
CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7785

config NR_ONCHIP_DMA_CHANNELS
int
depends on SH_DMA
Expand Down
17 changes: 5 additions & 12 deletions trunk/arch/sh/drivers/dma/dma-sh.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@
#include <asm/io.h>
#include <asm/dma-sh.h>

#if defined(CONFIG_CPU_SUBTYPE_SH7763) || \
defined(CONFIG_CPU_SUBTYPE_SH7764) || \
defined(CONFIG_CPU_SUBTYPE_SH7780) || \
defined(CONFIG_CPU_SUBTYPE_SH7785)
#define DMAC_IRQ_MULTI 1
#endif

#if defined(DMAE1_IRQ)
#define NR_DMAE 2
#else
Expand All @@ -42,7 +35,7 @@ static inline unsigned int get_dmte_irq(unsigned int chan)
if (chan < ARRAY_SIZE(dmte_irq_map))
irq = dmte_irq_map[chan];

#if defined(DMAC_IRQ_MULTI)
#if defined(CONFIG_SH_DMA_IRQ_MULTI)
if (irq > DMTE6_IRQ)
return DMTE6_IRQ;
return DMTE0_IRQ;
Expand Down Expand Up @@ -96,7 +89,7 @@ static int sh_dmac_request_dma(struct dma_channel *chan)
return 0;

return request_irq(get_dmte_irq(chan->chan), dma_tei,
#if defined(DMAC_IRQ_MULTI)
#if defined(CONFIG_SH_DMA_IRQ_MULTI)
IRQF_SHARED,
#else
IRQF_DISABLED,
Expand Down Expand Up @@ -235,7 +228,7 @@ static inline int dmaor_reset(int no)
#if defined(CONFIG_CPU_SH4)
static irqreturn_t dma_err(int irq, void *dummy)
{
#if defined(DMAC_IRQ_MULTI)
#if defined(CONFIG_SH_DMA_IRQ_MULTI)
int cnt = 0;
switch (irq) {
#if defined(DMTE6_IRQ) && defined(DMAE1_IRQ)
Expand Down Expand Up @@ -283,7 +276,7 @@ static struct dma_info sh_dmac_info = {
#ifdef CONFIG_CPU_SH4
static unsigned int get_dma_error_irq(int n)
{
#if defined(DMAC_IRQ_MULTI)
#if defined(CONFIG_SH_DMA_IRQ_MULTI)
return (n == 0) ? get_dmte_irq(0) : get_dmte_irq(6);
#else
return (n == 0) ? DMAE0_IRQ :
Expand All @@ -306,7 +299,7 @@ static int __init sh_dmac_init(void)

for (n = 0; n < NR_DMAE; n++) {
i = request_irq(get_dma_error_irq(n), dma_err,
#if defined(DMAC_IRQ_MULTI)
#if defined(CONFIG_SH_DMA_IRQ_MULTI)
IRQF_SHARED,
#else
IRQF_DISABLED,
Expand Down

0 comments on commit 044779f

Please sign in to comment.