Skip to contentSkip to conversation

ARM: add CPPI 4.1 DMA support

PATCH In review Sergei Shtylyov 9 participants 22 messages May 15, 2010 – Jan 5, 2011 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH v5 1/3 ARM: add CPPI 4.1 DMA support

Add support for Texas Instuments Communication Port Programming Interface 4.1 (CPPI 4.1) used on OMAP-L1x/DA8xx and AM35x.

At this moment, only the DMA controller and queue manager are supported. Support for the buffer manager is lacking but these chips don't have it anyway.

---
Changes since the previous version:
- moved everything from arch/arm/mach-davinci/ to arch/arm/common/;
- s/CONFIG_CPPI41/CONFIG_TI_CPPI41/, made that option invisible;
- added #include <linux/slab.h> for kzalloc();
- switched alloc_queue() and cppi41_queue_free() to using bit operations;
- replaced 'static' linking_ram[] by local variable in cppi41_queue_mgr_init();
- fixed pr_debug() in cppi41_dma_ctrlr_init() to print the real queue manager #.

 arch/arm/common/Kconfig                |    3 
 arch/arm/common/Makefile               |    1 
 arch/arm/common/cppi41.c               |  759 +++++++++++++++++++++++++++++++++
 arch/arm/include/asm/hardware/cppi41.h |  718 +++++++++++++++++++++++++++++++
 4 files changed, 1481 insertions(+)
arch/arm/common/Kconfig +3 -0
Index: linux-davinci/arch/arm/common/Kconfig
===================================================================
@@ -38,5 +38,8 @@ config SHARP_PARAM
 config SHARP_SCOOP
 	bool
 
+config TI_CPPI41
+	bool
+
 config COMMON_CLKDEV
 	bool
arch/arm/common/Makefile +1 -0
Index: linux-davinci/arch/arm/common/Makefile
===================================================================
@@ -13,6 +13,7 @@ obj-$(CONFIG_TIMER_ACORN)	+= time-acorn.
 obj-$(CONFIG_SHARP_LOCOMO)	+= locomo.o
 obj-$(CONFIG_SHARP_PARAM)	+= sharpsl_param.o
 obj-$(CONFIG_SHARP_SCOOP)	+= scoop.o
+obj-$(CONFIG_TI_CPPI41) 	+= cppi41.o
 obj-$(CONFIG_ARCH_IXP2000)	+= uengine.o
 obj-$(CONFIG_ARCH_IXP23XX)	+= uengine.o
 obj-$(CONFIG_PCI_HOST_ITE8152)  += it8152.o
arch/arm/common/cppi41.c new file +759 -0

759 lines not on this page · raw message

arch/arm/include/asm/hardware/cppi41.h new file +718 -0

718 lines not on this page · raw message

#1 lore raw

PATCH v5 1/3 ARM: add CPPI 4.1 DMA support

Hello.

Quoted 9 lines · I wrote:

Add support for Texas Instuments Communication Port Programming Interface 4.1 (CPPI 4.1) used on OMAP-L1x/DA8xx and AM35x.

At this moment, only the DMA controller and queue manager are supported. Support for the buffer manager is lacking but these chips don't have it anyway.

Quoted 8 lines

---
Changes since the previous version:
- moved everything from arch/arm/mach-davinci/ to arch/arm/common/;
- s/CONFIG_CPPI41/CONFIG_TI_CPPI41/, made that option invisible;
- added #include <linux/slab.h> for kzalloc();
- switched alloc_queue() and cppi41_queue_free() to using bit operations;
- replaced 'static' linking_ram[] by local variable in cppi41_queue_mgr_init();
- fixed pr_debug() in cppi41_dma_ctrlr_init() to print the real queue manager #.

I saw no feedback about this patch. Russel, can I put this into your
patch system?

WBR, Sergei

#2 lore raw
In reply to Sergei Shtylyov

2010/5/15 Sergei Shtylyov <[email protected]>:

Quoted 2 lines

Add support for Texas Instuments Communication Port Programming Interface 4.1 (CPPI 4.1) used on OMAP-L1x/DA8xx and AM35x.

Sorry for late feedback ...

Quoted 1 line

+++ linux-davinci/arch/arm/common/cppi41.c

Can you migrate this driver to drivers/dma/cppi41.c and use the DMAengine interface like so many DMA drivers we have created recently, or is there some very special characteristics about this DMA controller meriting it to be placed in arch/arm/*?

Note: we have the support for PL08x found in ARM reference designs queued for drivers/dma/amba-pl08x.c,
not arch/arm/common/*.

The rationale about this is to lower the churn in arch/arm/* and put drivers into the proper subsystems, and in this case there is an appropriate subsystem to be used.

Yours,
Linus Walleij

#3 lore raw

Hello.

Quoted 11 lines · Linus Walleij
Quoted 2 lines

Add support for Texas Instuments Communication Port Programming Interface 4.1 (CPPI 4.1) used on OMAP-L1x/DA8xx and AM35x.

Sorry for late feedback ...

Quoted 1 line

+++ linux-davinci/arch/arm/common/cppi41.c

Can you migrate this driver to drivers/dma/cppi41.c and use the DMAengine interface like so many DMA drivers we have created recently, or is there some very special characteristics about this DMA controller meriting it to be placed in arch/arm/*?

I have once studied the possibility of doing this driver under
drivers/dma/, and found that hardly achievable. Maybe I should try again though...

Quoted 2 lines

Yours,
Linus Walleij

WBR, Sergei

#4 lore raw

PATCH v5 1/3 ARM: add CPPI 4.1 DMA support

In reply to Sergei Shtylyov

Hello.

Quoted 8 lines · Sergei Shtylyov

Add support for Texas Instuments Communication Port Programming Interface 4.1 (CPPI 4.1) used on OMAP-L1x/DA8xx and AM35x.

At this moment, only the DMA controller and queue manager are supported. Support for the buffer manager is lacking but these chips don't have it anyway.

Russell, you have recently discarded this patch from your patch system.
Can we know the reason?

WBR, Sergei

#5 lore raw

PATCH v5 1/3 ARM: add CPPI 4.1 DMA support

Quoted 7 lines · Sergei Shtylyov

Hello.

Quoted 2 lines · Sergei Shtylyov

Add support for Texas Instuments Communication Port Programming Interface 4.1 (CPPI 4.1) used on OMAP-L1x/DA8xx and AM35x.

Quoted 8 lines
Quoted 5 lines

At this moment, only the DMA controller and queue manager are supported. Support for the buffer manager is lacking but these chips don't have it anyway.

Russell, you have recently discarded this patch from your patch
system. Can we know the reason?

It was recently discussed with TI, and various people raised concerns about it. I don't remember the exact details, and I wish they'd raise them with the patch author directly. It may have been that it's inventing its own API rather than using something like the DMA engine API.

Adding linux-omap to try to get a response there.

#6 lore raw

PATCH v5 1/3 ARM: add CPPI 4.1 DMA support

Hi,

Quoted 14 lines
Quoted 1 line
Quoted 1 line

Add support for Texas Instuments Communication Port Programming

Interface 4.1

Quoted 4 lines
Quoted 4 lines

(CPPI 4.1) used on OMAP-L1x/DA8xx and AM35x.

At this moment, only the DMA controller and queue manager are supported. Support for the buffer manager is lacking but these chips don't have it

anyway.

Quoted 6 lines
Quoted 3 lines

Russell, you have recently discarded this patch from your patch
system. Can we know the reason?

Quoted 7 lines

It was recently discussed with TI, and various people raised concerns about it. I don't remember the exact details, and I wish they'd raise them with the patch author directly. It may have been that it's inventing its own API rather than using something like the DMA engine API.

Adding linux-omap to try to get a response there.

Sergei,
This issue was discussed recently at TI and proposal was to place it to drivers/dma folder. Moreover, even Felipe also seems to move other musb DMAs (Inventra, CPPI3.0, TUSB) to drivers/dma.

Regards,
Ajay

Quoted 4 lines

_______________________________________________
Davinci-linux-open-source mailing list
Davinci-linux-open-source at linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

#7 lore raw

PATCH v5 1/3 ARM: add CPPI 4.1 DMA support

Hello.

Quoted 18 lines · Ajay Kumar
Quoted 17 lines
Quoted 11 lines
Quoted 8 lines

Add support for Texas Instuments Communication Port Programming Interface 4.1 (CPPI 4.1) used on OMAP-L1x/DA8xx and AM35x.

At this moment, only the DMA controller and queue manager are supported. Support for the buffer manager is lacking but these chips don't have it anyway.

Russell, you have recently discarded this patch from your patch
system. Can we know the reason?

It was recently discussed with TI, and various people raised concerns about it. I don't remember the exact details, and I wish they'd raise them with the patch author directly. It may have been that it's inventing its own API rather than using something like the DMA engine API.

Quoted 5 lines
Quoted 1 line

Adding linux-omap to try to get a response there.

Sergei,
This issue was discussed recently at TI and proposal was to place it to drivers/dma folder.

Note that I have neither time nor inclination to do this work (not do I
think it's even feasible), so it will have to fall on TI's shoulders...

Quoted 2 lines

Moreover, even Felipe also seems to move other musb DMAs (Inventra, CPPI3.0, TUSB) to drivers/dma.

Frankly speaking, I doubt that drivers/dma/ will have place for the purely
MUSB specific DMA engines such as the named ones (there's no TUSB DMA BTW -- it uses OMAP DMA).

Quoted 2 lines

Regards,
Ajay

WBR, Sergei

#8 lore raw

PATCH v5 1/3 ARM: add CPPI 4.1 DMA support

Hi,

Quoted 21 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

Add support for Texas Instuments Communication Port Programming

Interface 4.1

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

(CPPI 4.1) used on OMAP-L1x/DA8xx and AM35x.

At this moment, only the DMA controller and queue manager are

supported.

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

Support for the buffer manager is lacking but these chips don't have

it anyway.

Quoted 11 lines
Quoted 11 lines
Quoted 5 lines
Quoted 2 lines

Russell, you have recently discarded this patch from your patch
system. Can we know the reason?

It was recently discussed with TI, and various people raised concerns about it. I don't remember the exact details, and I wish they'd raise them with the patch author directly. It may have been that it's inventing its own API rather than using something like the DMA engine API.

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

Adding linux-omap to try to get a response there.

Sergei,
This issue was discussed recently at TI and proposal was to place it to drivers/dma folder.

Note that I have neither time nor inclination to do this work (not do
I think it's even feasible), so it will have to fall on TI's shoulders...

This is fine. No issues. We will discuss this at length at linux-usb list.

Quoted 7 lines
Quoted 3 lines

Moreover, even Felipe also seems to move other musb DMAs (Inventra, CPPI3.0, TUSB) to drivers/dma.

Frankly speaking, I doubt that drivers/dma/ will have place for the
purely MUSB specific DMA engines such as the named ones (there's no TUSB DMA BTW it uses OMAP DMA).

I think we will get more clarity once we start on this activity.

Thanks,
Ajay

Quoted 5 lines
Quoted 3 lines

Regards,
Ajay

WBR, Sergei

#9 lore raw

PATCH v5 1/3 ARM: add CPPI 4.1 DMA support

Hi,

Quoted 7 lines · Ajay Kumar
Quoted 6 lines
Quoted 2 lines

Moreover, even Felipe also seems to move other musb DMAs (Inventra, CPPI3.0, TUSB) to drivers/dma.

Frankly speaking, I doubt that drivers/dma/ will have place for the
purely MUSB specific DMA engines such as the named ones (there's no TUSB DMA BTW it uses OMAP DMA).

I think we will get more clarity once we start on this activity.

I agree, but I personally don't see that many limiting factors. dmaengine is just a generic API for doing DMA transfers. If it's not enough for us currently, we extend it.

Signature · 1 line
balbi
#10 lore raw

PATCH v5 1/3 ARM: add CPPI 4.1 DMA support

Hello.

Quoted 7 lines · Felipe Balbi
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines

Moreover, even Felipe also seems to move other musb DMAs (Inventra, CPPI3.0, TUSB) to drivers/dma.

Frankly speaking, I doubt that drivers/dma/ will have place for the purely MUSB specific DMA engines such as the named ones (there's no TUSB DMA BTW it uses OMAP DMA).

Quoted 5 lines
Quoted 1 line

I think we will get more clarity once we start on this activity.

I agree, but I personally don't see that many limiting factors. dmaengine is just a generic API for doing DMA transfers. If it's not enough for us currently, we extend it.

Putting MUSB DMA enignes into drivers/dma/ is the same as taking *any*
chip capable of bus-mastering DMA, "separating" its bus mastering related code from its driver and putting this code into drivers/dma/. This doesn't make sense, in my opinion. drivers/dma/ is for the dedicated DMA controllers (which can *optionally* serve the slave devices).

WBR, Sergei

#11 lore raw

PATCH v5 1/3 ARM: add CPPI 4.1 DMA support

Hi,

(using personal email, left the office)

Quoted 11 lines · Sergei Shtylyov
Quoted 5 lines
Quoted 1 line

I think we will get more clarity once we start on this activity.

I agree, but I personally don't see that many limiting factors. dmaengine is just a generic API for doing DMA transfers. If it's not enough for us currently, we extend it.

Putting MUSB DMA enignes into drivers/dma/ is the same as taking *any*
chip capable of bus-mastering DMA, "separating" its bus mastering related code from its driver and putting this code into drivers/dma/. This doesn't make sense, in my opinion. drivers/dma/ is for the dedicated DMA controllers (which can *optionally* serve the slave devices).

Do I really have to spell it out ? Really ?

You don't need to physically move the part of the code to drivers/dma, but it has to use the API. The mentor DMA is internal to MUSB. tusb6010_omap.c isn't.

Where it makes sense to move the code under drivers/dma, it will be done, where it doesn't, it won't be done, but it will use the same API. That's all.

The end goal is just to drop all these ad-hoc "APIs" for accessing DMA on musb code.

Signature · 1 line
balbi
#12 lore raw

PATCH v5 1/3 ARM: add CPPI 4.1 DMA support

Hi,

2011/1/4 Felipe Balbi <[email protected]>:

Quoted 2 lines

The end goal is just to drop all these ad-hoc "APIs" for accessing DMA on musb code.

If this kind of DMA controllers are only used by MUSB, seems not necessary to convert to dmaengine API. Any benefit we can get
from the convert? MUSB is cross-platform already after all.

thanks,

Signature · 1 line
Lei Ming
#13 lore raw

PATCH v5 1/3 ARM: add CPPI 4.1 DMA support

Hi,

Quoted 6 lines · Ming Lei
Quoted 2 lines

The end goal is just to drop all these ad-hoc "APIs" for accessing DMA on musb code.

If this kind of DMA controllers are only used by MUSB, seems not necessary to convert to dmaengine API. Any benefit we can get
from the convert? MUSB is cross-platform already after all.

<irony>
correct, OMAP GPIO controller is only used on OMAPs, so why do we even bother having gpiolib, right ?
</irony>

Signature · 1 line
balbi
#14 lore raw

PATCH v5 1/3 ARM: add CPPI 4.1 DMA support

Hi,

2011/1/4 Felipe Balbi <[email protected]>:

Quoted 6 lines

Hi,

Quoted 3 lines · Ming Lei
Quoted 2 lines

The end goal is just to drop all these ad-hoc "APIs" for accessing DMA on musb code.

Quoted 7 lines
Quoted 3 lines

If this kind of DMA controllers are only used by MUSB, seems not necessary to convert to dmaengine API. ?Any benefit we can get from the convert? ? MUSB is cross-platform already after all.

<irony>
correct, OMAP GPIO controller is only used on OMAPs, so why do we even bother having gpiolib, right ?

OMAP GPIOs have many usages or use cases, so we can use gpiolib to simplify access to GPIOs. If GPIOs has only one usage or use case, it is not necessary to access GPIOs by gpiolib.

Now this kind of DMA controllers are only used by MUSB or only for MUSB, so it doesn't matter to access them by dmaengine or not.

thanks,

Signature · 1 line
Lei Ming
#15 lore raw

PATCH v5 1/3 ARM: add CPPI 4.1 DMA support

Hi,

Quoted 6 lines · Ming Lei

OMAP GPIOs have many usages or use cases, so we can use gpiolib to simplify access to GPIOs. If GPIOs has only one usage or use case, it is not necessary to access GPIOs by gpiolib.

Now this kind of DMA controllers are only used by MUSB or only for MUSB, so it doesn't matter to access them by dmaengine or not.

Not entirely true. TUSB uses OMAP system DMA and AFAICT CPPI is used also for ethernet. The thing is that we want to get rid of non-standard "APIs" as much as possible.

Signature · 1 line
balbi
#16 lore raw

PATCH v5 1/3 ARM: add CPPI 4.1 DMA support

Hello.

Quoted 10 lines · Felipe Balbi
Quoted 6 lines · Ming Lei

OMAP GPIOs have many usages or use cases, so we can use gpiolib to simplify access to GPIOs. If GPIOs has only one usage or use case, it is not necessary to access GPIOs by gpiolib.

Now this kind of DMA controllers are only used by MUSB or only for MUSB, so it doesn't matter to access them by dmaengine or not.

Not entirely true. TUSB uses OMAP system DMA and AFAICT CPPI is used also for ethernet.

Yes, but the CPPI registers are not compatible between MUSB and EMAC, only
the descriptors are, AFAIK.

WBR, Sergei

#17 lore raw

PATCH v5 1/3 ARM: add CPPI 4.1 DMA support

In reply to Felipe Balbi

Hello.

Quoted 6 lines · Felipe Balbi
Quoted 5 lines
Quoted 5 lines
Quoted 1 line

I think we will get more clarity once we start on this activity.

I agree, but I personally don't see that many limiting factors. dmaengine is just a generic API for doing DMA transfers. If it's not enough for us currently, we extend it.

Quoted 7 lines
Quoted 5 lines

Putting MUSB DMA enignes into drivers/dma/ is the same as taking *any*
chip capable of bus-mastering DMA, "separating" its bus mastering related code from its driver and putting this code into drivers/dma/. This doesn't make sense, in my opinion. drivers/dma/ is for the dedicated DMA controllers (which can *optionally* serve the slave devices).

Do I really have to spell it out ? Really ?

Yes, I'm dense. :-)
Especially after Ajay claiming that Mentor and CPPI 3.0 DMA will be moved to
drivers/dma/...

Quoted 3 lines

You don't need to physically move the part of the code to drivers/dma, but it has to use the API. The mentor DMA is internal to MUSB. tusb6010_omap.c isn't.

Yes, that's what I've already noted in this thread.

Quoted 1 line

Where it makes sense to move the code under drivers/dma, it will be

Surely OMAP DMA needs to be moved under drivers/dma/, not the TUSB code
interfacing it.

Quoted 2 lines

done, where it doesn't, it won't be done, but it will use the same API. That's all.

I don't quite see how DMA engine API is beneficial to what we currently have...

Quoted 2 lines

The end goal is just to drop all these ad-hoc "APIs" for accessing DMA on musb code.

The "ad-hoc" API is well suited for use with MUSB, while DMA engine API is
more abstract, I think. The "ad-hoc" API takes into account some things that the DMA engine API just can't -- like the transfer mode and packet size...

WBR, Sergei

#18 lore raw

PATCH v5 1/3 ARM: add CPPI 4.1 DMA support

In reply to Sergei Shtylyov
Quoted 5 lines · Sergei Shtylyov

Putting MUSB DMA enignes into drivers/dma/ is the same as taking *any*
chip capable of bus-mastering DMA, "separating" its bus mastering related code from its driver and putting this code into drivers/dma/. This doesn't make sense, in my opinion. drivers/dma/ is for the dedicated DMA controllers (which can *optionally* serve the slave devices).

Then why is it already separated into its own self-contained driver?

If it's because the DMA engine is used for different peripherals (possibly re-used for different peripherals), then it does seem to make sense to have it separated via some API. And if possible that API might should be something generic instead of specific.

Even more reason to do this is if the device being fed by the DMA has been re-used with different DMA hardware (which I believe is the case with MUSB.) What if this different DMA hardware then gets re-used for other devices? Should they all implement the same custom API or try for a generic API?

#19 lore raw

PATCH v5 1/3 ARM: add CPPI 4.1 DMA support

In reply to Sergei Shtylyov
Quoted 31 lines · Sergei Shtylyov

Hello.

Quoted 18 lines · Ajay Kumar
Quoted 17 lines
Quoted 11 lines
Quoted 8 lines

Add support for Texas Instuments Communication Port Programming Interface 4.1 (CPPI 4.1) used on OMAP-L1x/DA8xx and AM35x.

At this moment, only the DMA controller and queue manager are supported. Support for the buffer manager is lacking but these chips don't have it anyway.

Russell, you have recently discarded this patch from your patch
system. Can we know the reason?

It was recently discussed with TI, and various people raised concerns about it. I don't remember the exact details, and I wish they'd raise them with the patch author directly. It may have been that it's inventing its own API rather than using something like the DMA engine API.

Quoted 5 lines
Quoted 1 line

Adding linux-omap to try to get a response there.

Sergei,
This issue was discussed recently at TI and proposal was to place it to drivers/dma folder.

Note that I have neither time nor inclination to do this work (not do
I think it's even feasible), so it will have to fall on TI's shoulders...

Quoted 6 lines
Quoted 2 lines

Moreover, even Felipe also seems to move other musb DMAs (Inventra, CPPI3.0, TUSB) to drivers/dma.

Frankly speaking, I doubt that drivers/dma/ will have place for the
purely MUSB specific DMA engines such as the named ones (there's no TUSB DMA BTW -- it uses OMAP DMA).

Long term, we need to kill off all these platform private DMA interfaces. There's a growing amount of IP that's being shared not only between ARM silicon vendors, but also across architectures, and having to re-implement drivers because the underlying DMA engine is different is not feasible.

For example, we're seeing ARMs primecells being used with various different DMA controllers in various different ARM SoCs. I've heard rumours of them appearing in MIPS or PPC stuff as well. We're seeing PXA peripheral IP appearing in x86 stuff too.

We can't have drivers tied to their SoC DMA engines, and we can't continue having SoC DMA engines implementing their own unique APIs. We do need to get on top of this before it becomes a major problem (if it hasn't already).

The DMA engine API is still evolving, and should not be taken as concrete
- I've recently been bringing up a number of points with Dan on various aspects of the API, some of which ultimately will lead to changes to the async-tx API, and others which hopefully will mean that the DMA slave API is better documented.

#20 lore raw

PATCH v5 1/3 ARM: add CPPI 4.1 DMA support

Hi,

Quoted 19 lines · Russell King - ARM Linux
Quoted 3 lines

Frankly speaking, I doubt that drivers/dma/ will have place for the
purely MUSB specific DMA engines such as the named ones (there's no TUSB DMA BTW -- it uses OMAP DMA).

Long term, we need to kill off all these platform private DMA interfaces. There's a growing amount of IP that's being shared not only between ARM silicon vendors, but also across architectures, and having to re-implement drivers because the underlying DMA engine is different is not feasible.

For example, we're seeing ARMs primecells being used with various different DMA controllers in various different ARM SoCs. I've heard rumours of them appearing in MIPS or PPC stuff as well. We're seeing PXA peripheral IP appearing in x86 stuff too.

We can't have drivers tied to their SoC DMA engines, and we can't continue having SoC DMA engines implementing their own unique APIs. We do need to get on top of this before it becomes a major problem (if it hasn't already).

Quoted 5 lines

The DMA engine API is still evolving, and should not be taken as concrete
- I've recently been bringing up a number of points with Dan on various aspects of the API, some of which ultimately will lead to changes to the async-tx API, and others which hopefully will mean that the DMA slave API is better documented.

I couldn't agree more with you Russell. If the API isn't enough currently, we can always propose an extension.

Having all sorts of SoC-specific "APIs" has already caused enough problems and it still does (non-generic IRQ handling on twl?030, menelaus, cbus - which isn't in mainline yet -, etc, non-generic McBSP usage, non-generic GPMC usage, etc etc). So, if we can plan for making use of generic APIs, let's do so.

Signature · 1 line
balbi
#21 lore raw

PATCH v5 1/3 ARM: add CPPI 4.1 DMA support

Quoted 28 lines · Felipe Balbi

Hi,

Quoted 19 lines · Russell King - ARM Linux
Quoted 3 lines

Frankly speaking, I doubt that drivers/dma/ will have place for the
purely MUSB specific DMA engines such as the named ones (there's no TUSB DMA BTW -- it uses OMAP DMA).

Long term, we need to kill off all these platform private DMA interfaces. There's a growing amount of IP that's being shared not only between ARM silicon vendors, but also across architectures, and having to re-implement drivers because the underlying DMA engine is different is not feasible.

For example, we're seeing ARMs primecells being used with various different DMA controllers in various different ARM SoCs. I've heard rumours of them appearing in MIPS or PPC stuff as well. We're seeing PXA peripheral IP appearing in x86 stuff too.

We can't have drivers tied to their SoC DMA engines, and we can't continue having SoC DMA engines implementing their own unique APIs. We do need to get on top of this before it becomes a major problem (if it hasn't already).

Quoted 5 lines

The DMA engine API is still evolving, and should not be taken as concrete
- I've recently been bringing up a number of points with Dan on various aspects of the API, some of which ultimately will lead to changes to the async-tx API, and others which hopefully will mean that the DMA slave API is better documented.

Quoted 8 lines

I couldn't agree more with you Russell. If the API isn't enough currently, we can always propose an extension.

Having all sorts of SoC-specific "APIs" has already caused enough problems and it still does (non-generic IRQ handling on twl?030, menelaus, cbus - which isn't in mainline yet -, etc, non-generic McBSP usage, non-generic GPMC usage, etc etc). So, if we can plan for making use of generic APIs, let's do so.

Yes I too agree with this. We just need to do whatever it takes to make the DMA engine suitable for all drivers.

Regards,

Tony