Skip to content

ARM: pxa: move core and drivers to dmaengine

Daniel Mack linux-arm-kernel linux-devicetree linux-mtd 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest20 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/20mtd: pxa3xx-nand: replace pxa_request_dma with dmaenginedrivers/mtd/nand/pxa3xx_nand.c+63 -521 reply
1/20mtd: pxa3xx-nand: replace pxa_request_dma with dmaengine+0 -01 reply
1/20mtd: pxa3xx-nand: replace pxa_request_dma with dmaengine+0 -00 replies
2/20mtd: pxa3xx-nand: use mmp_pdma_filter_fn and dma_request_slave_channel_compatdrivers/mtd/nand/pxa3xx_nand.c+7 -120 replies
3/20ARM: pxa: ssp: add shortcut for &pdev->devarch/arm/plat-pxa/ssp.c+9 -82 replies
3/20ARM: pxa: ssp: add shortcut for &pdev->dev+0 -00 replies
4/20ARM: pxa: ssp: add DT bindingsDocumentation/devicetree/bindings/serial/mrvl,pxa-ssp.txt arch/arm/plat-pxa/ssp.c+115 -211 reply
5/20ARM: pxa: ssp: use devm_ functionsarch/arm/plat-pxa/ssp.c+12 -280 replies
6/20tty: serial: pxa: remove old cruftdrivers/tty/serial/pxa.c+0 -250 replies
6/20tty: serial: pxa: remove old cruft+0 -01 reply
7/20spi: spi-pxa2xx: remove legacy PXA DMA bitsdrivers/spi/Kconfig drivers/spi/Makefile drivers/spi/spi-pxa2xx-pxadma.c +2 more+2 -5051 reply
7/20spi: spi-pxa2xx: remove legacy PXA DMA bits+0 -01 reply
8/20mmc: host: pxamci: switch over to dmaengine usedrivers/mmc/host/pxamci.c+102 -862 replies
9/20ata: pdata_pxa: migrate over to dmaengine usagedrivers/ata/pata_pxa.c+70 -1021 reply
10/20net: irda: pxaficp_ir: switch to dmaenginedrivers/net/irda/pxaficp_ir.c+151 -910 replies
11/20net: smc91x.c: switch to generic buf-to-buf DMA offloaddrivers/net/ethernet/smsc/smc91x.c drivers/net/ethernet/smsc/smc91x.h+38 -730 replies
12/20net: smc911x.c: switch to dmaengine APIdrivers/net/ethernet/smsc/smc911x.c drivers/net/ethernet/smsc/smc911x.h+98 -650 replies
13/20ASoC: pxa: pxa-ssp: add DT bindingsDocumentation/devicetree/bindings/sound/mrvl,pxa-ssp.txt sound/soc/pxa/pxa-ssp.c+17 -21 reply
13/20ASoC: pxa: pxa-ssp: add DT bindings+0 -01 reply
13/20ASoC: pxa: pxa-ssp: add DT bindings+0 -00 replies
14/20ASoC: pxa: use snd_dmaengine_dai_dma_datainclude/sound/pxa2xx-lib.h sound/arm/pxa2xx-ac97.c sound/arm/pxa2xx-pcm-lib.c +8 more+142 -1131 reply
15/20ASoC: pxa: pxa-ssp: set dma filter data from startup hooksound/soc/pxa/pxa-ssp.c+4 -11 reply
16/20ASoC: pxa: add DT bindings for pxa2xx-pcmDocumentation/devicetree/bindings/sound/mrvl,pxa2xx-pcm.txt sound/soc/pxa/pxa2xx-pcm.c+26 -21 reply
17/20ASoC: pxa: pxa-pcm-lib: switch over to snd-soc-dmaengine-pcminclude/sound/pxa2xx-lib.h sound/arm/Kconfig sound/arm/pxa2xx-pcm-lib.c +3 more+42 -2041 reply
17/20ASoC: pxa: pxa-pcm-lib: switch over to snd-soc-dmaengine-pcm+0 -01 reply
17/20ASoC: pxa: pxa-pcm-lib: switch over to snd-soc-dmaengine-pcm+0 -01 reply
17/20ASoC: pxa: pxa-pcm-lib: switch over to snd-soc-dmaengine-pcm+0 -02 replies
17/20ASoC: pxa: pxa-pcm-lib: switch over to snd-soc-dmaengine-pcm+0 -01 reply
17/20ASoC: pxa: pxa-pcm-lib: switch over to snd-soc-dmaengine-pcm+0 -01 reply
18/20ARM: pxa: register static mmp_pdma devicearch/arm/mach-pxa/devices.c arch/arm/mach-pxa/devices.h arch/arm/mach-pxa/pxa25x.c +2 more+46 -100 replies
19/20ARM: mmp: register static mmp_pdma devicearch/arm/mach-mmp/mmp2.c arch/arm/mach-mmp/pxa168.c arch/arm/mach-mmp/pxa910.c+27 -60 replies
20/20ARM: pxa: remove old DMA implementationarch/arm/mach-pxa/include/mach/dma.h arch/arm/plat-pxa/Makefile arch/arm/plat-pxa/dma.c +1 more+0 -4990 replies

Reviews trailers per patch

4 of 32 patches have a Reviewed-by or Acked-by.

PatchMark Brown
1/20
1/20
1/20
2/20
3/20
3/20
4/20
5/20
6/20
6/20
7/20A-b
7/20A-b
8/20
9/20
10/20
11/20
12/20
13/20
13/20
13/20
14/20A-b
15/20A-b
16/20
17/20
17/20
17/20
17/20
17/20
17/20
18/20
19/20
20/20

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/20] ARM: pxa: move core and drivers to dmaengine

I've been working on teaching the mmp-pdma driver more functions and porting tree-wide scattered pxa specific drivers over to dmaengine implementations. I posted the first round of patches for mmp-pdma here:

http://marc.info/?l=linux-arm-kernel&m=137587082530228

With the following patches applied, I can boot a PXA3xx board boot with all DMA runtime information determined from DT, using pxa3xx-nand, pxamci and audio components (cyclic DMA).

However, the transition is quite intrusive and spans across several subsystem, and due to the nature of the current pxa DMA implementation, it cannot be gap-less. All drivers currently request an exclusive channel via code in arch/arm/plat-pxa/dma.c and then do direct register modifications regarding their obtained channel. We can't allow this with the mmp-pdma driver of course, and I also have no idea how to provide sane stubs for the existing hooks which end up in dmaengine calls.

Hence, all drivers have to be ported over in one series, and all these changes should be merged by one pull request eventually in order to prevent both build and functional breakage. Haojian's repository seems most suitable for that, as he's the PXA maintainer.

What I currently got with respect to existing drivers is the following:

* pxa3xx-nand:
ported (with an amended and rebased patch from Zhangfei Gao) and successfully tested.

* pxamci (mmc):
ported and successfully tested

* pxa-pcm-lib (audio) and pxa-ssp:
ported and successfully tested

* spi:
Code to make this driver compatible with dmaengine was already provided by Mika Westerberg, so we can now just purge the legacy bits. I personally only compile-tested this one.

* pxa-serial:
#if0'ed legacy was removed that wouldn't even compile when enabled. This can be re-done at some point if anyone's interested.

* pata-pxa:
I ported the driver over which was simple and straight forward, but I lack hardware to actually test it. Maybe Marek Vasut, the original author can help here?

* pxaficp_ir (IRDA):
I also ported this driver, but I can't test it either. Someone with access to hardware would greatly help here with a quick test.

* smsc911x:
There are three(!) SMSC 911x driver in the tree right now, and two of them have code for PXA-DMA. I'm not sure which of these are actually actively used in DMA mode, but I blindly ported over the code and compile-tested it.

* camera driver:
I started the transition, but I'm not sure how much sense that makes without access to the hardware. I'd much appreciate if anyone could volunteer for this piece; I'll happily share what I got so far. Sascha, Sachin, Guennadi?

So, to summarize: pata-pxa, pxaficp_ir and smsc911x need testing, and the camera driver still needs to be ported.

The transition path of my patch set is as follows:

1. port over all the drivers individually, breaking them functionally because at runtime, they DMA channel allocation will fail. But they will compile.

2. remove the init calls to the dma subsystem in both mach-pxa and mach-mmp (mach-mmp was only compile-tested) and instanciate the mmp-pdma device as regular platform_device.

3. remove the old implementation including its header file that has served us so well for 12+ years. Sorry, Nicolas ;)

Regarding the procedure, my proposal is that many people give their Tested-by and Acked-by, I'll respin my series a couple of times and eventually Haojian can take it.

Prerequisities:

* Linux-3.11-rc4
* Ezequiel Garcia's pxa3xx-patches:

	http://lists.infradead.org/pipermail/linux-mtd/2013-August/047862.html
  * My mmp-pdma patches:
	http://marc.info/?l=linux-arm-kernel&m=137587082530228

FWIW, the patches can also be found in this tree, but be aware that I will rebase the commits frequently:

https://github.com/zonque/linux/commits/pxa-dma

Thanks,
Daniel

Daniel Mack (19):
mtd: pxa3xx-nand: use mmp_pdma_filter_fn and
dma_request_slave_channel_compat
ARM: pxa: ssp: add shortcut for &pdev->dev
ARM: pxa: ssp: add DT bindings
ARM: pxa: ssp: use devm_ functions
tty: serial: pxa: remove old cruft
spi: spi-pxa2xx: remove legacy PXA DMA bits
mmc: host: pxamci: switch over to dmaengine use
ata: pdata_pxa: migrate over to dmaengine usage
net: irda: pxaficp_ir: switch to dmaengine
net: smc91x.c: switch to generic buf-to-buf DMA offload
net: smc911x.c: switch to dmaengine API
ASoC: pxa: pxa-ssp: add DT bindings
ASoC: pxa: use snd_dmaengine_dai_dma_data
ASoC: pxa: pxa-ssp: set dma filter data from startup hook
ASoC: pxa: add DT bindings for pxa2xx-pcm
ASoC: pxa: pxa-pcm-lib: switch over to snd-soc-dmaengine-pcm
ARM: pxa: register static mmp_pdma device
ARM: mmp: register static mmp_pdma device
ARM: pxa: remove old DMA implementation

Zhangfei Gao (1):
mtd: pxa3xx-nand: replace pxa_request_dma with dmaengine

 .../devicetree/bindings/serial/mrvl,pxa-ssp.txt    |  43 ++
 .../devicetree/bindings/sound/mrvl,pxa-ssp.txt     |   7 +
 .../devicetree/bindings/sound/mrvl,pxa2xx-pcm.txt  |  15 +
 arch/arm/mach-mmp/mmp2.c                           |  11 +-
 arch/arm/mach-mmp/pxa168.c                         |  11 +-
 arch/arm/mach-mmp/pxa910.c                         |  11 +-
 arch/arm/mach-pxa/devices.c                        |  26 ++
 arch/arm/mach-pxa/devices.h                        |   1 +
 arch/arm/mach-pxa/include/mach/dma.h               |  21 -
 arch/arm/mach-pxa/pxa25x.c                         |   9 +-
 arch/arm/mach-pxa/pxa27x.c                         |   9 +-
 arch/arm/mach-pxa/pxa3xx.c                         |  11 +-
 arch/arm/plat-pxa/Makefile                         |   2 -
 arch/arm/plat-pxa/dma.c                            | 391 ----------------
 arch/arm/plat-pxa/include/plat/dma.h               |  85 ----
 arch/arm/plat-pxa/ssp.c                            | 144 +++---
 drivers/ata/pata_pxa.c                             | 172 +++-----
 drivers/mmc/host/pxamci.c                          | 188 ++++----
 drivers/mtd/nand/pxa3xx_nand.c                     | 130 +++---
 drivers/net/ethernet/smsc/smc911x.c                |  80 ++--
 drivers/net/ethernet/smsc/smc911x.h                |  83 ++--
 drivers/net/ethernet/smsc/smc91x.c                 |  40 +-
 drivers/net/ethernet/smsc/smc91x.h                 |  71 ++-
 drivers/net/irda/pxaficp_ir.c                      | 242 ++++++----
 drivers/spi/Kconfig                                |   9 +-
 drivers/spi/Makefile                               |   1 -
 drivers/spi/spi-pxa2xx-pxadma.c                    | 490 ---------------------
 drivers/spi/spi-pxa2xx.h                           |   6 +-
 drivers/tty/serial/pxa.c                           |  25 --
 include/linux/spi/pxa2xx_spi.h                     |   1 -
 include/sound/pxa2xx-lib.h                         |   8 -
 sound/arm/Kconfig                                  |   1 +
 sound/arm/pxa2xx-ac97.c                            |  26 +-
 sound/arm/pxa2xx-pcm-lib.c                         | 177 ++------
 sound/arm/pxa2xx-pcm.c                             |  15 +-
 sound/arm/pxa2xx-pcm.h                             |   9 +-
 sound/soc/pxa/mmp-pcm.c                            |   8 +-
 sound/soc/pxa/mmp-sspa.c                           |  11 +-
 sound/soc/pxa/pxa-ssp.c                            |  51 ++-
 sound/soc/pxa/pxa2xx-ac97.c                        |  67 +--
 sound/soc/pxa/pxa2xx-i2s.c                         |  28 +-
 sound/soc/pxa/pxa2xx-pcm.c                         |  43 +-
 42 files changed, 921 insertions(+), 1858 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/serial/mrvl,pxa-ssp.txt
 create mode 100644 Documentation/devicetree/bindings/sound/mrvl,pxa-ssp.txt
 create mode 100644 Documentation/devicetree/bindings/sound/mrvl,pxa2xx-pcm.txt
 delete mode 100644 arch/arm/mach-pxa/include/mach/dma.h
 delete mode 100644 arch/arm/plat-pxa/dma.c
 delete mode 100644 arch/arm/plat-pxa/include/plat/dma.h
 delete mode 100644 drivers/spi/spi-pxa2xx-pxadma.c
Signature · 1 line
1.8.3.1