RE: dma engine drivers for 2.6.25?

2008-02-25 Thread Zhang Wei
Hi,

Sorry for missing lots of emails in my long vacation. :)

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Dan Williams
> Sent: Sunday, February 24, 2008 10:06 AM
> To: Kumar Gala
> Cc: LKML Kernel; Zhang Wei
> Subject: Re: dma engine drivers for 2.6.25?
> 
> On Thu, Feb 14, 2008 at 10:29 PM, Dan Williams 
> <[EMAIL PROTECTED]> wrote:
> > On Thu, Feb 14, 2008 at 8:44 PM, Kumar Gala 
> <[EMAIL PROTECTED]> wrote:
> >  >
> >  >  On Feb 14, 2008, at 12:14 PM, Dan Williams wrote:
> >  >
> >  >  > On Wed, Feb 13, 2008 at 8:52 PM, Kumar Gala
> >  >  > <[EMAIL PROTECTED]> wrote:
> >  >  >> Dan,
> >  >  >>
> >  >  >> What's going on with the dma engine drivers for 
> 2.6.25?  We had a
> >  >  >> Freescale dma driver from Zhang Wei queued up but 
> seems to have been
> >  >  >> lost.
> >  >  >
> >  >  > I pulled it into my tree and am holding it until Zhang has an
> >  >  > opportunity to address the pending review comments 
> [1].  I also did
> >  >  > not feel comfortable pushing it to Linus without a 
> PPC maintainer's
> >  >  > Acked-by/Reviewed-by.
> >  >  >
> >  >  > I have attached the version I am carrying.
> >  >
> >  >  What issues are still open.  I was under the belief 
> that Zhang had
> >  >  resolved all the issues.
> >  >
> >
> >  The high priority review item is that the driver performs operation
> >  completion callbacks in hardirq context.  Clients of the API assume
> >  that callbacks will happen in softirq context.  Of lesser 
> concern is
> >  the use of GFP_ATOMIC in fsl_dma_alloc_descriptor.  Other drivers
> >  preallocate a small pool of descriptors.
> >
> 
> Have not received a response, so let's try this the other way.  I took
> a closer look and found that my concern should be addressed by the
> following one-liner:
> 
> diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
> index 902e852..cc9a681 100644
> --- a/drivers/dma/fsldma.c
> +++ b/drivers/dma/fsldma.c
> @@ -685,7 +685,6 @@ static irqreturn_t fsl_dma_chan_do_interrupt(int
> irq, void *data)
> "nlndar 0x%016llx\n", 
> (u64)get_cdar(fsl_chan),
> (u64)get_ndar(fsl_chan));
> stat &= ~FSL_DMA_SR_EOSI;
> -   fsl_chan_ld_cleanup(fsl_chan);
> }
> 
> /* If it current transfer is the end-of-transfer,
> 
> With your ack I'll push the driver plus this fixlet for the 
> current kernel.

I agree with you to remove the fsl_chan_ld_cleanup() function calling in
Interrupt action, which is already called in tasklet. I forgot to remove it.
Thanks!

Cheers!
Wei.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: dma engine drivers for 2.6.25?

2008-02-25 Thread Zhang Wei
Hi,

Sorry for missing lots of emails in my long vacation. :)

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Dan Williams
 Sent: Sunday, February 24, 2008 10:06 AM
 To: Kumar Gala
 Cc: LKML Kernel; Zhang Wei
 Subject: Re: dma engine drivers for 2.6.25?
 
 On Thu, Feb 14, 2008 at 10:29 PM, Dan Williams 
 [EMAIL PROTECTED] wrote:
  On Thu, Feb 14, 2008 at 8:44 PM, Kumar Gala 
 [EMAIL PROTECTED] wrote:
   
 On Feb 14, 2008, at 12:14 PM, Dan Williams wrote:
   
  On Wed, Feb 13, 2008 at 8:52 PM, Kumar Gala
  [EMAIL PROTECTED] wrote:
  Dan,
 
  What's going on with the dma engine drivers for 
 2.6.25?  We had a
  Freescale dma driver from Zhang Wei queued up but 
 seems to have been
  lost.
 
  I pulled it into my tree and am holding it until Zhang has an
  opportunity to address the pending review comments 
 [1].  I also did
  not feel comfortable pushing it to Linus without a 
 PPC maintainer's
  Acked-by/Reviewed-by.
 
  I have attached the version I am carrying.
   
 What issues are still open.  I was under the belief 
 that Zhang had
 resolved all the issues.
   
 
   The high priority review item is that the driver performs operation
   completion callbacks in hardirq context.  Clients of the API assume
   that callbacks will happen in softirq context.  Of lesser 
 concern is
   the use of GFP_ATOMIC in fsl_dma_alloc_descriptor.  Other drivers
   preallocate a small pool of descriptors.
 
 
 Have not received a response, so let's try this the other way.  I took
 a closer look and found that my concern should be addressed by the
 following one-liner:
 
 diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
 index 902e852..cc9a681 100644
 --- a/drivers/dma/fsldma.c
 +++ b/drivers/dma/fsldma.c
 @@ -685,7 +685,6 @@ static irqreturn_t fsl_dma_chan_do_interrupt(int
 irq, void *data)
 nlndar 0x%016llx\n, 
 (u64)get_cdar(fsl_chan),
 (u64)get_ndar(fsl_chan));
 stat = ~FSL_DMA_SR_EOSI;
 -   fsl_chan_ld_cleanup(fsl_chan);
 }
 
 /* If it current transfer is the end-of-transfer,
 
 With your ack I'll push the driver plus this fixlet for the 
 current kernel.

I agree with you to remove the fsl_chan_ld_cleanup() function calling in
Interrupt action, which is already called in tasklet. I forgot to remove it.
Thanks!

Cheers!
Wei.

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: dma engine drivers for 2.6.25?

2008-02-23 Thread Dan Williams
On Thu, Feb 14, 2008 at 10:29 PM, Dan Williams <[EMAIL PROTECTED]> wrote:
> On Thu, Feb 14, 2008 at 8:44 PM, Kumar Gala <[EMAIL PROTECTED]> wrote:
>  >
>  >  On Feb 14, 2008, at 12:14 PM, Dan Williams wrote:
>  >
>  >  > On Wed, Feb 13, 2008 at 8:52 PM, Kumar Gala
>  >  > <[EMAIL PROTECTED]> wrote:
>  >  >> Dan,
>  >  >>
>  >  >> What's going on with the dma engine drivers for 2.6.25?  We had a
>  >  >> Freescale dma driver from Zhang Wei queued up but seems to have been
>  >  >> lost.
>  >  >
>  >  > I pulled it into my tree and am holding it until Zhang has an
>  >  > opportunity to address the pending review comments [1].  I also did
>  >  > not feel comfortable pushing it to Linus without a PPC maintainer's
>  >  > Acked-by/Reviewed-by.
>  >  >
>  >  > I have attached the version I am carrying.
>  >
>  >  What issues are still open.  I was under the belief that Zhang had
>  >  resolved all the issues.
>  >
>
>  The high priority review item is that the driver performs operation
>  completion callbacks in hardirq context.  Clients of the API assume
>  that callbacks will happen in softirq context.  Of lesser concern is
>  the use of GFP_ATOMIC in fsl_dma_alloc_descriptor.  Other drivers
>  preallocate a small pool of descriptors.
>

Have not received a response, so let's try this the other way.  I took
a closer look and found that my concern should be addressed by the
following one-liner:

diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
index 902e852..cc9a681 100644
--- a/drivers/dma/fsldma.c
+++ b/drivers/dma/fsldma.c
@@ -685,7 +685,6 @@ static irqreturn_t fsl_dma_chan_do_interrupt(int
irq, void *data)
"nlndar 0x%016llx\n", (u64)get_cdar(fsl_chan),
(u64)get_ndar(fsl_chan));
stat &= ~FSL_DMA_SR_EOSI;
-   fsl_chan_ld_cleanup(fsl_chan);
}

/* If it current transfer is the end-of-transfer,

With your ack I'll push the driver plus this fixlet for the current kernel.

Regards,
Dan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: dma engine drivers for 2.6.25?

2008-02-23 Thread Dan Williams
On Thu, Feb 14, 2008 at 10:29 PM, Dan Williams [EMAIL PROTECTED] wrote:
 On Thu, Feb 14, 2008 at 8:44 PM, Kumar Gala [EMAIL PROTECTED] wrote:
  
On Feb 14, 2008, at 12:14 PM, Dan Williams wrote:
  
 On Wed, Feb 13, 2008 at 8:52 PM, Kumar Gala
 [EMAIL PROTECTED] wrote:
 Dan,

 What's going on with the dma engine drivers for 2.6.25?  We had a
 Freescale dma driver from Zhang Wei queued up but seems to have been
 lost.

 I pulled it into my tree and am holding it until Zhang has an
 opportunity to address the pending review comments [1].  I also did
 not feel comfortable pushing it to Linus without a PPC maintainer's
 Acked-by/Reviewed-by.

 I have attached the version I am carrying.
  
What issues are still open.  I was under the belief that Zhang had
resolved all the issues.
  

  The high priority review item is that the driver performs operation
  completion callbacks in hardirq context.  Clients of the API assume
  that callbacks will happen in softirq context.  Of lesser concern is
  the use of GFP_ATOMIC in fsl_dma_alloc_descriptor.  Other drivers
  preallocate a small pool of descriptors.


Have not received a response, so let's try this the other way.  I took
a closer look and found that my concern should be addressed by the
following one-liner:

diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
index 902e852..cc9a681 100644
--- a/drivers/dma/fsldma.c
+++ b/drivers/dma/fsldma.c
@@ -685,7 +685,6 @@ static irqreturn_t fsl_dma_chan_do_interrupt(int
irq, void *data)
nlndar 0x%016llx\n, (u64)get_cdar(fsl_chan),
(u64)get_ndar(fsl_chan));
stat = ~FSL_DMA_SR_EOSI;
-   fsl_chan_ld_cleanup(fsl_chan);
}

/* If it current transfer is the end-of-transfer,

With your ack I'll push the driver plus this fixlet for the current kernel.

Regards,
Dan
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: dma engine drivers for 2.6.25?

2008-02-14 Thread Dan Williams
On Thu, Feb 14, 2008 at 8:44 PM, Kumar Gala <[EMAIL PROTECTED]> wrote:
>
>  On Feb 14, 2008, at 12:14 PM, Dan Williams wrote:
>
>  > On Wed, Feb 13, 2008 at 8:52 PM, Kumar Gala
>  > <[EMAIL PROTECTED]> wrote:
>  >> Dan,
>  >>
>  >> What's going on with the dma engine drivers for 2.6.25?  We had a
>  >> Freescale dma driver from Zhang Wei queued up but seems to have been
>  >> lost.
>  >
>  > I pulled it into my tree and am holding it until Zhang has an
>  > opportunity to address the pending review comments [1].  I also did
>  > not feel comfortable pushing it to Linus without a PPC maintainer's
>  > Acked-by/Reviewed-by.
>  >
>  > I have attached the version I am carrying.
>
>  What issues are still open.  I was under the belief that Zhang had
>  resolved all the issues.
>

The high priority review item is that the driver performs operation
completion callbacks in hardirq context.  Clients of the API assume
that callbacks will happen in softirq context.  Of lesser concern is
the use of GFP_ATOMIC in fsl_dma_alloc_descriptor.  Other drivers
preallocate a small pool of descriptors.

Regards,
Dan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: dma engine drivers for 2.6.25?

2008-02-14 Thread Kumar Gala


On Feb 14, 2008, at 12:14 PM, Dan Williams wrote:

On Wed, Feb 13, 2008 at 8:52 PM, Kumar Gala  
<[EMAIL PROTECTED]> wrote:

Dan,

What's going on with the dma engine drivers for 2.6.25?  We had a
Freescale dma driver from Zhang Wei queued up but seems to have been
lost.


I pulled it into my tree and am holding it until Zhang has an
opportunity to address the pending review comments [1].  I also did
not feel comfortable pushing it to Linus without a PPC maintainer's
Acked-by/Reviewed-by.

I have attached the version I am carrying.


What issues are still open.  I was under the belief that Zhang had  
resolved all the issues.


- k
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: dma engine drivers for 2.6.25?

2008-02-14 Thread Dan Williams
On Wed, Feb 13, 2008 at 8:52 PM, Kumar Gala <[EMAIL PROTECTED]> wrote:
> Dan,
>
>  What's going on with the dma engine drivers for 2.6.25?  We had a
>  Freescale dma driver from Zhang Wei queued up but seems to have been
>  lost.

I pulled it into my tree and am holding it until Zhang has an
opportunity to address the pending review comments [1].  I also did
not feel comfortable pushing it to Linus without a PPC maintainer's
Acked-by/Reviewed-by.

I have attached the version I am carrying.

--
Dan

[1] http://marc.info/?l=linux-kernel=119998939916613=2
dmaengine: add driver for Freescale MPC85xx DMA controller

From: Zhang Wei <[EMAIL PROTECTED]>

The driver implements DMA engine API for Freescale MPC85xx DMA controller,
which could be used by devices in the silicon.  The driver supports the
Basic mode of Freescale MPC85xx DMA controller.  The MPC85xx processors
supported include MPC8540/60, MPC8555, MPC8548, MPC8641 and so on.

The MPC83xx(MPC8349, MPC8360) are also supported.

[EMAIL PROTECTED]: build fix]
[EMAIL PROTECTED]: merge mm fixes, rebase on async_tx-2.6.25]
Signed-off-by: Zhang Wei <[EMAIL PROTECTED]>
Signed-off-by: Ebony Zhu <[EMAIL PROTECTED]>
Cc: Shannon Nelson <[EMAIL PROTECTED]>
Cc: Benjamin Herrenschmidt <[EMAIL PROTECTED]>
Cc: Paul Mackerras <[EMAIL PROTECTED]>
Cc: Kumar Gala <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Dan Williams <[EMAIL PROTECTED]>
---

 MAINTAINERS  |7 
 drivers/dma/Kconfig  |   19 +
 drivers/dma/Makefile |1 
 drivers/dma/fsldma.c | 1060 ++
 drivers/dma/fsldma.h |  189 +
 5 files changed, 1275 insertions(+), 1 deletions(-)
 create mode 100644 drivers/dma/fsldma.c
 create mode 100644 drivers/dma/fsldma.h


diff --git a/MAINTAINERS b/MAINTAINERS
index 6680ec4..9ba1630 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1584,6 +1584,13 @@ L:	[EMAIL PROTECTED] (subscribers-only)
 W:	http://linux-fbdev.sourceforge.net/
 S:	Maintained
 
+FREESCALE DMA DRIVER
+P;	Zhang Wei
+M:	[EMAIL PROTECTED]
+L:	[EMAIL PROTECTED]
+L:	linux-kernel@vger.kernel.org
+S:	Maintained
+
 FREESCALE SOC FS_ENET DRIVER
 P:	Pantelis Antoniou
 M:	[EMAIL PROTECTED]
diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index a703def..27340a7 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -4,7 +4,7 @@
 
 menuconfig DMADEVICES
 	bool "DMA Engine support"
-	depends on (PCI && X86) || ARCH_IOP32X || ARCH_IOP33X || ARCH_IOP13XX
+	depends on (PCI && X86) || ARCH_IOP32X || ARCH_IOP33X || ARCH_IOP13XX || PPC
 	depends on !HIGHMEM64G
 	help
 	  DMA engines can do asynchronous data transfers without
@@ -37,6 +37,23 @@ config INTEL_IOP_ADMA
 	help
 	  Enable support for the Intel(R) IOP Series RAID engines.
 
+config FSL_DMA
+	bool "Freescale MPC85xx/MPC83xx DMA support"
+	depends on PPC
+	select DMA_ENGINE
+	---help---
+	  Enable support for the Freescale DMA engine. Now, it support
+	  MPC8560/40, MPC8555, MPC8548 and MPC8641 processors.
+	  The MPC8349, MPC8360 is also supported.
+
+config FSL_DMA_SELFTEST
+	bool "Enable the self test for each DMA channel"
+	depends on FSL_DMA
+	default y
+	---help---
+	  Enable the self test for each DMA channel. A self test will be
+	  performed after the channel probed to ensure the DMA works well.
+
 config DMA_ENGINE
 	bool
 
diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile
index b152cd8..c8036d9 100644
--- a/drivers/dma/Makefile
+++ b/drivers/dma/Makefile
@@ -3,3 +3,4 @@ obj-$(CONFIG_NET_DMA) += iovlock.o
 obj-$(CONFIG_INTEL_IOATDMA) += ioatdma.o
 ioatdma-objs := ioat.o ioat_dma.o ioat_dca.o
 obj-$(CONFIG_INTEL_IOP_ADMA) += iop-adma.o
+obj-$(CONFIG_FSL_DMA) += fsldma.o
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
new file mode 100644
index 000..e9dac47
--- /dev/null
+++ b/drivers/dma/fsldma.c
@@ -0,0 +1,1060 @@
+/*
+ * Freescale MPC85xx, MPC83xx DMA Engine support
+ *
+ * Copyright (C) 2007 Freescale Semiconductor, Inc. All rights reserved.
+ *
+ * Author:
+ *   Zhang Wei <[EMAIL PROTECTED]>, Jul 2007
+ *   Ebony Zhu <[EMAIL PROTECTED]>, May 2007
+ *
+ * Description:
+ *   DMA engine driver for Freescale MPC8540 DMA controller, which is
+ *   also fit for MPC8560, MPC8555, MPC8548, MPC8641, and etc.
+ *   The support for MPC8349 DMA contorller is also added.
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "fsldma.h"
+
+static void dma_init(struct fsl_dma_chan *fsl_chan)
+{
+	/* Reset the channel */
+	DMA_OUT(fsl_chan, _chan->reg_base->mr, 0, 32);
+
+	switch

Re: dma engine drivers for 2.6.25?

2008-02-14 Thread Dan Williams
On Wed, Feb 13, 2008 at 8:52 PM, Kumar Gala [EMAIL PROTECTED] wrote:
 Dan,

  What's going on with the dma engine drivers for 2.6.25?  We had a
  Freescale dma driver from Zhang Wei queued up but seems to have been
  lost.

I pulled it into my tree and am holding it until Zhang has an
opportunity to address the pending review comments [1].  I also did
not feel comfortable pushing it to Linus without a PPC maintainer's
Acked-by/Reviewed-by.

I have attached the version I am carrying.

--
Dan

[1] http://marc.info/?l=linux-kernelm=119998939916613w=2
dmaengine: add driver for Freescale MPC85xx DMA controller

From: Zhang Wei [EMAIL PROTECTED]

The driver implements DMA engine API for Freescale MPC85xx DMA controller,
which could be used by devices in the silicon.  The driver supports the
Basic mode of Freescale MPC85xx DMA controller.  The MPC85xx processors
supported include MPC8540/60, MPC8555, MPC8548, MPC8641 and so on.

The MPC83xx(MPC8349, MPC8360) are also supported.

[EMAIL PROTECTED]: build fix]
[EMAIL PROTECTED]: merge mm fixes, rebase on async_tx-2.6.25]
Signed-off-by: Zhang Wei [EMAIL PROTECTED]
Signed-off-by: Ebony Zhu [EMAIL PROTECTED]
Cc: Shannon Nelson [EMAIL PROTECTED]
Cc: Benjamin Herrenschmidt [EMAIL PROTECTED]
Cc: Paul Mackerras [EMAIL PROTECTED]
Cc: Kumar Gala [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Dan Williams [EMAIL PROTECTED]
---

 MAINTAINERS  |7 
 drivers/dma/Kconfig  |   19 +
 drivers/dma/Makefile |1 
 drivers/dma/fsldma.c | 1060 ++
 drivers/dma/fsldma.h |  189 +
 5 files changed, 1275 insertions(+), 1 deletions(-)
 create mode 100644 drivers/dma/fsldma.c
 create mode 100644 drivers/dma/fsldma.h


diff --git a/MAINTAINERS b/MAINTAINERS
index 6680ec4..9ba1630 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1584,6 +1584,13 @@ L:	[EMAIL PROTECTED] (subscribers-only)
 W:	http://linux-fbdev.sourceforge.net/
 S:	Maintained
 
+FREESCALE DMA DRIVER
+P;	Zhang Wei
+M:	[EMAIL PROTECTED]
+L:	[EMAIL PROTECTED]
+L:	linux-kernel@vger.kernel.org
+S:	Maintained
+
 FREESCALE SOC FS_ENET DRIVER
 P:	Pantelis Antoniou
 M:	[EMAIL PROTECTED]
diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index a703def..27340a7 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -4,7 +4,7 @@
 
 menuconfig DMADEVICES
 	bool DMA Engine support
-	depends on (PCI  X86) || ARCH_IOP32X || ARCH_IOP33X || ARCH_IOP13XX
+	depends on (PCI  X86) || ARCH_IOP32X || ARCH_IOP33X || ARCH_IOP13XX || PPC
 	depends on !HIGHMEM64G
 	help
 	  DMA engines can do asynchronous data transfers without
@@ -37,6 +37,23 @@ config INTEL_IOP_ADMA
 	help
 	  Enable support for the Intel(R) IOP Series RAID engines.
 
+config FSL_DMA
+	bool Freescale MPC85xx/MPC83xx DMA support
+	depends on PPC
+	select DMA_ENGINE
+	---help---
+	  Enable support for the Freescale DMA engine. Now, it support
+	  MPC8560/40, MPC8555, MPC8548 and MPC8641 processors.
+	  The MPC8349, MPC8360 is also supported.
+
+config FSL_DMA_SELFTEST
+	bool Enable the self test for each DMA channel
+	depends on FSL_DMA
+	default y
+	---help---
+	  Enable the self test for each DMA channel. A self test will be
+	  performed after the channel probed to ensure the DMA works well.
+
 config DMA_ENGINE
 	bool
 
diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile
index b152cd8..c8036d9 100644
--- a/drivers/dma/Makefile
+++ b/drivers/dma/Makefile
@@ -3,3 +3,4 @@ obj-$(CONFIG_NET_DMA) += iovlock.o
 obj-$(CONFIG_INTEL_IOATDMA) += ioatdma.o
 ioatdma-objs := ioat.o ioat_dma.o ioat_dca.o
 obj-$(CONFIG_INTEL_IOP_ADMA) += iop-adma.o
+obj-$(CONFIG_FSL_DMA) += fsldma.o
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
new file mode 100644
index 000..e9dac47
--- /dev/null
+++ b/drivers/dma/fsldma.c
@@ -0,0 +1,1060 @@
+/*
+ * Freescale MPC85xx, MPC83xx DMA Engine support
+ *
+ * Copyright (C) 2007 Freescale Semiconductor, Inc. All rights reserved.
+ *
+ * Author:
+ *   Zhang Wei [EMAIL PROTECTED], Jul 2007
+ *   Ebony Zhu [EMAIL PROTECTED], May 2007
+ *
+ * Description:
+ *   DMA engine driver for Freescale MPC8540 DMA controller, which is
+ *   also fit for MPC8560, MPC8555, MPC8548, MPC8641, and etc.
+ *   The support for MPC8349 DMA contorller is also added.
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ */
+
+#include linux/init.h
+#include linux/module.h
+#include linux/pci.h
+#include linux/interrupt.h
+#include linux/dmaengine.h
+#include linux/delay.h
+#include linux/dma-mapping.h
+#include linux/dmapool.h
+#include linux/of_platform.h
+
+#include fsldma.h
+
+static void dma_init(struct fsl_dma_chan *fsl_chan)
+{
+	/* Reset the channel */
+	DMA_OUT(fsl_chan, fsl_chan-reg_base-mr, 0, 32);
+
+	switch (fsl_chan-feature  FSL_DMA_IP_MASK) {
+	case

Re: dma engine drivers for 2.6.25?

2008-02-14 Thread Kumar Gala


On Feb 14, 2008, at 12:14 PM, Dan Williams wrote:

On Wed, Feb 13, 2008 at 8:52 PM, Kumar Gala  
[EMAIL PROTECTED] wrote:

Dan,

What's going on with the dma engine drivers for 2.6.25?  We had a
Freescale dma driver from Zhang Wei queued up but seems to have been
lost.


I pulled it into my tree and am holding it until Zhang has an
opportunity to address the pending review comments [1].  I also did
not feel comfortable pushing it to Linus without a PPC maintainer's
Acked-by/Reviewed-by.

I have attached the version I am carrying.


What issues are still open.  I was under the belief that Zhang had  
resolved all the issues.


- k
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: dma engine drivers for 2.6.25?

2008-02-14 Thread Dan Williams
On Thu, Feb 14, 2008 at 8:44 PM, Kumar Gala [EMAIL PROTECTED] wrote:

  On Feb 14, 2008, at 12:14 PM, Dan Williams wrote:

   On Wed, Feb 13, 2008 at 8:52 PM, Kumar Gala
   [EMAIL PROTECTED] wrote:
   Dan,
  
   What's going on with the dma engine drivers for 2.6.25?  We had a
   Freescale dma driver from Zhang Wei queued up but seems to have been
   lost.
  
   I pulled it into my tree and am holding it until Zhang has an
   opportunity to address the pending review comments [1].  I also did
   not feel comfortable pushing it to Linus without a PPC maintainer's
   Acked-by/Reviewed-by.
  
   I have attached the version I am carrying.

  What issues are still open.  I was under the belief that Zhang had
  resolved all the issues.


The high priority review item is that the driver performs operation
completion callbacks in hardirq context.  Clients of the API assume
that callbacks will happen in softirq context.  Of lesser concern is
the use of GFP_ATOMIC in fsl_dma_alloc_descriptor.  Other drivers
preallocate a small pool of descriptors.

Regards,
Dan
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


dma engine drivers for 2.6.25?

2008-02-13 Thread Kumar Gala

Dan,

What's going on with the dma engine drivers for 2.6.25?  We had a  
Freescale dma driver from Zhang Wei queued up but seems to have been  
lost.


- k
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


dma engine drivers for 2.6.25?

2008-02-13 Thread Kumar Gala

Dan,

What's going on with the dma engine drivers for 2.6.25?  We had a  
Freescale dma driver from Zhang Wei queued up but seems to have been  
lost.


- k
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/