Skip to contentSkip to conversation

dmaengine: shdma: Enable on SH-Mobile ARM

PATCH In review Magnus Damm 3 participants 5 messages Mar 19, 2010 – Apr 7, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 5/5 dmaengine: shdma: Enable on SH-Mobile ARM

From: Magnus Damm <[email protected]>

Enable the shdma dmaengine driver on SH-Mobile ARM.

---

 drivers/dma/Kconfig        |    2 +-
 drivers/dma/shdma.c        |    8 ++++----
 include/linux/serial_sci.h |    2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)
drivers/dma/Kconfig +1 -1
@@ -128,7 +128,7 @@ config TXX9_DMAC
 
 config SH_DMAE
 	tristate "Renesas SuperH DMAC support"
-	depends on SUPERH && SH_DMA
+	depends on (SUPERH && SH_DMA) || (ARM && ARCH_SHMOBILE)
 	depends on !SH_DMA_API
 	select DMA_ENGINE
 	help
drivers/dma/shdma.c +4 -4
@@ -793,7 +793,7 @@ static irqreturn_t sh_dmae_interrupt(int
 	return ret;
 }
 
-#if defined(CONFIG_CPU_SH4)
+#if defined(CONFIG_CPU_SH4) || defined(CONFIG_ARCH_SHMOBILE)
 static irqreturn_t sh_dmae_err(int irq, void *data)
 {
 	struct sh_dmae_device *shdev = (struct sh_dmae_device *)data;
@@ -1034,7 +1034,7 @@ static int __init sh_dmae_probe(struct p
 	/* Default transfer size of 32 bytes requires 32-byte alignment */
 	shdev->common.copy_align = LOG2_DEFAULT_XFER_SIZE;
 
-#if defined(CONFIG_CPU_SH4)
+#if defined(CONFIG_CPU_SH4) || defined(CONFIG_ARCH_SHMOBILE)
 	chanirq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 1);
 
 	if (!chanirq_res)
@@ -1059,7 +1059,7 @@ static int __init sh_dmae_probe(struct p
 
 #else
 	chanirq_res = errirq_res;
-#endif /* CONFIG_CPU_SH4 */
+#endif /* CONFIG_CPU_SH4 || CONFIG_ARCH_SHMOBILE */
 
 	if (chanirq_res->start = chanirq_res->end &&
 	    !platform_get_resource(pdev, IORESOURCE_IRQ, 1)) {
@@ -1106,7 +1106,7 @@ static int __init sh_dmae_probe(struct p
 chan_probe_err:
 	sh_dmae_chan_remove(shdev);
 eirqres:
-#if defined(CONFIG_CPU_SH4)
+#if defined(CONFIG_CPU_SH4) || defined(CONFIG_ARCH_SHMOBILE)
 	free_irq(errirq, shdev);
 eirq_err:
 #endif
include/linux/serial_sci.h +1 -1
@@ -3,7 +3,7 @@
 
 #include <linux/serial_core.h>
 #ifdef CONFIG_SERIAL_SH_SCI_DMA
-#include <asm/dmaengine.h>
+#include <linux/sh_dma.h>
 #endif
 
 /*
#1 lore raw
Quoted 6 lines · Magnus Damm

From: Magnus Damm <[email protected]>

Enable the shdma dmaengine driver on SH-Mobile ARM.

---

[snip]

include/linux/serial_sci.h line 6

Quoted 8 lines
include/linux/serial_sci.h +1 -1
@@ -3,7 +3,7 @@
 
 #include <linux/serial_core.h>
 #ifdef CONFIG_SERIAL_SH_SCI_DMA
-#include <asm/dmaengine.h>
+#include <linux/sh_dma.h>

Shouldn't this be done in patch "04/05"?

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

#2 lore raw
In reply to Magnus Damm

Hey Guennadi,

Quoted 11 lines · Guennadi Liakhovetski

include/linux/serial_sci.h   2010-03-18 23:38:59.000000000 +0900 line 6

Quoted 8 lines · Magnus Damm
include/linux/serial_sci.h   2010-03-18 23:38:59.000000000 +0900 renamed from include/linux/serial_sci.h +1 -1
@@ -3,7 +3,7 @@
 
  #include <linux/serial_core.h>
  #ifdef CONFIG_SERIAL_SH_SCI_DMA
-#include <asm/dmaengine.h>
+#include <linux/sh_dma.h>

Shouldn't this be done in patch "04/05"?

It could, but nothing requires this change in 04/05. So the final point where this is needed is 05/05.

/ magnus

#3 lore raw
In reply to Magnus Damm
Quoted 16 lines · Magnus Damm

Hey Guennadi,

Quoted 11 lines · Guennadi Liakhovetski

include/linux/serial_sci.h ? 2010-03-18 23:38:59.000000000 +0900

Quoted 8 lines · Magnus Damm
include/linux/serial_sci.h ? 2010-03-18 23:38:59.000000000 +0900 renamed from include/linux/serial_sci.h +0 -0
@@ -3,7 +3,7 @@
 

?#include <linux/serial_core.h>
?#ifdef CONFIG_SERIAL_SH_SCI_DMA

include/linux/serial_sci.h ? 2010-03-18 23:38:59.000000000 +0900 renamed from include/linux/serial_sci.h +1 -1
-#include <asm/dmaengine.h>
+#include <linux/sh_dma.h>

Shouldn't this be done in patch "04/05"?

Quoted 3 lines

It could, but nothing requires this change in 04/05. So the final point where this is needed is 05/05.

The ifdefs are also superfluous at this point, but those can be killed off with an incremental patch.

#4 lore raw
In reply to Magnus Damm
Quoted 1 line · Magnus Damm

Enable the shdma dmaengine driver on SH-Mobile ARM.

Applied to the genesis tree, on top of the sh/dmaengine topic branch.