<p dir="ltr">Hey Matt,</p>
<p dir="ltr">Do you know now similar are the EDMA engines on the am33xx and am389x? I've been working on am389x upstreaming and I'll try these patches out if it is the same engine.</p>
<p dir="ltr">g.</p>
<div class="gmail_quote">On Oct 11, 2012 8:03 PM, "Matt Porter" <<a href="mailto:mporter@ti.com">mporter@ti.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Changes since v1:<br>
        - Rebased on top of mainline from 12250d8<br>
        - Dropped the feature removal schedule patch<br>
        - Implemented dma_request_slave_channel_compat() and<br>
          converted the mmc and spi drivers to use it<br>
        - Dropped unneeded #address-cells and #size-cells from<br>
          EDMA DT support<br>
        - Moved private EDMA header to linux/platform_data/ and<br>
          removed some unneeded definitions<br>
        - Fixed parsing of optional properties<br>
<br>
TODO:<br>
        - Add AM33xx crossbar support to the private EDMA API<br>
          (any EDMA events on the crossbar are not supported)<br>
        - Add dmaengine support for per-channel caps so the<br>
          hack to set the maximum segments can be replaced with<br>
          a query to the dmaengine driver<br>
<br>
This series adds DMA Engine support for AM33xx, which uses<br>
an EDMA DMAC. The EDMA DMAC has been previously supported by only<br>
a private API implementation (much like the situation with OMAP<br>
DMA) found on the DaVinci family of SoCs.<br>
<br>
The series applies on top of mainline from<br>
12250d843e8489ee00b5b7726da855e51694e792 and the following patches:<br>
<br>
        - Vaibhav's patch to fix AM33xx boot on mainline<br>
          <a href="https://patchwork.kernel.org/patch/1569231/" target="_blank">https://patchwork.kernel.org/patch/1569231/</a><br>
        - dmaengine DT support from Vinod's dmaengine_dt branch in<br>
          git://<a href="http://git.infradead.org/users/vkoul/slave-dma.git" target="_blank">git.infradead.org/users/vkoul/slave-dma.git</a> since<br>
          027478851791df751176398be02a3b1c5f6aa824<br>
<br>
The approach taken is similar to how OMAP DMA is being converted to<br>
DMA Engine support. With the functional EDMA private API already<br>
existing in mach-davinci/dma.c, we first move that to an ARM common<br>
area so it can be shared. Adding DT and runtime PM support to the<br>
private EDMA API implementation allows it to run on AM33xx. AM33xx<br>
*only* boots using DT so we leverage Jon's generic DT DMA helpers to<br>
register EDMA DMAC with the of_dma framework and then add support<br>
for calling the dma_request_slave_channel() API to both the mmc<br>
and spi drivers.<br>
<br>
What works? Well, with this series we now have MMC and SPI support<br>
on AM33xx. The only caveat for MMC is that the mmc3 controller has<br>
its events on the crossbar and is not usable yet.<br>
<br>
This is tested on BeagleBone with a SPI framebuffer driver and SD<br>
card. It is regression tested on AM180x-EVM (which also makes use<br>
of the EDMA dmaengine driver and the EDMA private API) using SD,<br>
SPI flash, and the onboard audio supported by the ASoC Davinci<br>
driver.<br>
<br>
After this series, the plan is to convert the last in-tree user<br>
of the private EDMA API (davinci-pcm/mcasp) and then eliminate<br>
the private EDMA API by folding its functionality into<br>
drivers/dma/edma.c.<br>
<br>
Matt Porter (16):<br>
  dmaengine: edma: fix slave config dependency on direction<br>
  ARM: davinci: move private EDMA API to arm/common<br>
  ARM: edma: remove unused transfer controller handlers<br>
  ARM: edma: add DT and runtime PM support for AM335x<br>
  dmaengine: edma: enable build for AM33XX<br>
  dmaengine: edma: Add TI EDMA device tree binding<br>
  ARM: dts: add AM33XX EDMA support<br>
  ARM: omap: add hsmmc am33xx specific init<br>
  dmaengine: add dma_request_slave_channel_compat()<br>
  mmc: omap_hsmmc: convert to dma_request_slave_channel_compat()<br>
  mmc: omap_hsmmc: limit max_segs with the EDMA DMAC<br>
  mmc: omap_hsmmc: add generic DMA request support to the DT binding<br>
  ARM: dts: add AM33XX MMC support<br>
  spi: omap2-mcspi: convert to dma_request_slave_channel_compat()<br>
  spi: omap2-mcspi: add generic DMA request support to the DT binding<br>
  ARM: dts: add AM33XX SPI support<br>
<br>
 Documentation/devicetree/bindings/dma/ti-edma.txt  |   49 +<br>
 .../devicetree/bindings/mmc/ti-omap-hsmmc.txt      |   25 +-<br>
 Documentation/devicetree/bindings/spi/omap-spi.txt |   27 +-<br>
 arch/arm/Kconfig                                   |    1 +<br>
 arch/arm/boot/dts/am335x-bone.dts                  |   23 +<br>
 arch/arm/boot/dts/am33xx.dtsi                      |  100 ++<br>
 arch/arm/common/Kconfig                            |    3 +<br>
 arch/arm/common/Makefile                           |    1 +<br>
 arch/arm/common/edma.c                             | 1781 ++++++++++++++++++++<br>
 arch/arm/mach-davinci/Makefile                     |    2 +-<br>
 arch/arm/mach-davinci/board-da830-evm.c            |    4 +-<br>
 arch/arm/mach-davinci/board-da850-evm.c            |    8 +-<br>
 arch/arm/mach-davinci/board-dm646x-evm.c           |    4 +-<br>
 arch/arm/mach-davinci/board-omapl138-hawk.c        |    8 +-<br>
 arch/arm/mach-davinci/board-tnetv107x-evm.c        |    2 +-<br>
 arch/arm/mach-davinci/davinci.h                    |    2 +-<br>
 arch/arm/mach-davinci/devices-da8xx.c              |    8 +-<br>
 arch/arm/mach-davinci/devices-tnetv107x.c          |    6 +-<br>
 arch/arm/mach-davinci/devices.c                    |    7 +-<br>
 arch/arm/mach-davinci/dm355.c                      |    6 +-<br>
 arch/arm/mach-davinci/dm365.c                      |    6 +-<br>
 arch/arm/mach-davinci/dm644x.c                     |    6 +-<br>
 arch/arm/mach-davinci/dm646x.c                     |    6 +-<br>
 arch/arm/mach-davinci/dma.c                        | 1588 -----------------<br>
 arch/arm/mach-davinci/include/mach/da8xx.h         |    2 +-<br>
 arch/arm/mach-davinci/include/mach/edma.h          |  267 ---<br>
 arch/arm/mach-omap2/hsmmc.c                        |    7 +-<br>
 arch/arm/plat-omap/Kconfig                         |    1 +<br>
 drivers/dma/Kconfig                                |    2 +-<br>
 drivers/dma/edma.c                                 |   57 +-<br>
 drivers/mmc/host/davinci_mmc.c                     |    1 +<br>
 drivers/mmc/host/omap_hsmmc.c                      |   20 +-<br>
 drivers/spi/spi-omap2-mcspi.c                      |   65 +-<br>
 include/linux/dmaengine.h                          |   10 +<br>
 include/linux/mfd/davinci_voicecodec.h             |    3 +-<br>
 include/linux/platform_data/edma.h                 |  198 +++<br>
 include/linux/platform_data/spi-davinci.h          |    2 +-<br>
 sound/soc/davinci/davinci-evm.c                    |    1 +<br>
 sound/soc/davinci/davinci-pcm.c                    |    1 +<br>
 sound/soc/davinci/davinci-pcm.h                    |    2 +-<br>
 sound/soc/davinci/davinci-sffsdr.c                 |    6 +-<br>
 41 files changed, 2361 insertions(+), 1957 deletions(-)<br>
 create mode 100644 Documentation/devicetree/bindings/dma/ti-edma.txt<br>
 create mode 100644 arch/arm/common/edma.c<br>
 delete mode 100644 arch/arm/mach-davinci/dma.c<br>
 delete mode 100644 arch/arm/mach-davinci/include/mach/edma.h<br>
 create mode 100644 include/linux/platform_data/edma.h<br>
<br>
--<br>
1.7.9.5<br>
<br>
</blockquote></div>