Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 553911c6 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'dmaengine-4.9-rc1' of git://git.infradead.org/users/vkoul/slave-dma

Pull dmaengine updates from Vinod Koul:
 "This is bit large pile of code which bring in some nice additions:

   - Error reporting: we have added a new mechanism for users of
     dmaenegine to register a callback_result which tells them the
     result of the dma transaction. Right now only one user (ntb) is
     using it.

   - As we discussed on KS mailing list and pointed out NO_IRQ has no
     place in kernel, this also remove NO_IRQ from dmaengine subsystem
     (both arm and ppc users)

   - Support for IOMMU slave transfers and its implementation for arm.

   - To get better build coverage, enable COMPILE_TEST for bunch of
     driver, and fix the warning and sparse complaints on these.

   - Apart from above, usual updates spread across drivers"

* tag 'dmaengine-4.9-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (169 commits)
  async_pq_val: fix DMA memory leak
  dmaengine: virt-dma: move function declarations
  dmaengine: omap-dma: Enable burst and data pack for SG
  DT: dmaengine: rcar-dmac: document R8A7743/5 support
  dmaengine: fsldma: Unmap region obtained by of_iomap
  dmaengine: jz4780: fix resource leaks on error exit return
  dma-debug: fix ia64 build, use PHYS_PFN
  dmaengine: coh901318: fix integer overflow when shifting more than 32 places
  dmaengine: edma: avoid uninitialized variable use
  dma-mapping: fix m32r build warning
  dma-mapping: fix ia64 build, use PHYS_PFN
  dmaengine: ti-dma-crossbar: enable COMPILE_TEST
  dmaengine: omap-dma: enable COMPILE_TEST
  dmaengine: edma: enable COMPILE_TEST
  dmaengine: ti-dma-crossbar: Fix of_device_id data parameter usage
  dmaengine: ti-dma-crossbar: Correct type for of_find_property() third parameter
  dmaengine/ARM: omap-dma: Fix the DMAengine compile test on non OMAP configs
  dmaengine: edma: Rename set_bits and remove unused clear_bits helper
  dmaengine: edma: Use correct type for of_find_property() third parameter
  dmaengine: edma: Fix of_device_id data parameter usage (legacy vs TPCC)
  ...
parents 521f3970 c8475090
Loading
Loading
Loading
Loading
+17 −5
Original line number Diff line number Diff line
@@ -277,14 +277,26 @@ and <size> parameters are provided to do partial page mapping, it is
recommended that you never use these unless you really know what the
cache width is.

dma_addr_t
dma_map_resource(struct device *dev, phys_addr_t phys_addr, size_t size,
		 enum dma_data_direction dir, unsigned long attrs)

void
dma_unmap_resource(struct device *dev, dma_addr_t addr, size_t size,
		   enum dma_data_direction dir, unsigned long attrs)

API for mapping and unmapping for MMIO resources. All the notes and
warnings for the other mapping APIs apply here. The API should only be
used to map device MMIO resources, mapping of RAM is not permitted.

int
dma_mapping_error(struct device *dev, dma_addr_t dma_addr)

In some circumstances dma_map_single() and dma_map_page() will fail to create
a mapping. A driver can check for these errors by testing the returned
DMA address with dma_mapping_error(). A non-zero return value means the mapping
could not be created and the driver should take appropriate action (e.g.
reduce current DMA mapping usage or delay and try again later).
In some circumstances dma_map_single(), dma_map_page() and dma_map_resource()
will fail to create a mapping. A driver can check for these errors by testing
the returned DMA address with dma_mapping_error(). A non-zero return value
means the mapping could not be created and the driver should take appropriate
action (e.g. reduce current DMA mapping usage or delay and try again later).

	int
	dma_map_sg(struct device *dev, struct scatterlist *sg,
+1 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ Required properties:
      "fsl,imx51-sdma"
      "fsl,imx53-sdma"
      "fsl,imx6q-sdma"
      "fsl,imx7d-sdma"
  The -to variants should be preferred since they allow to determine the
  correct ROM script addresses needed for the driver to work without additional
  firmware.
+3 −1
Original line number Diff line number Diff line
* Renesas R-Car DMA Controller Device Tree bindings
* Renesas R-Car (RZ/G) DMA Controller Device Tree bindings

Renesas R-Car Generation 2 SoCs have multiple multi-channel DMA
controller instances named DMAC capable of serving multiple clients. Channels
@@ -16,6 +16,8 @@ Required Properties:

- compatible: "renesas,dmac-<soctype>", "renesas,rcar-dmac" as fallback.
	      Examples with soctypes are:
		- "renesas,dmac-r8a7743" (RZ/G1M)
		- "renesas,dmac-r8a7745" (RZ/G1E)
		- "renesas,dmac-r8a7790" (R-Car H2)
		- "renesas,dmac-r8a7791" (R-Car M2-W)
		- "renesas,dmac-r8a7792" (R-Car V2H)
+1 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ Required properties:
- compatible:	Must be one of
		  "allwinner,sun6i-a31-dma"
		  "allwinner,sun8i-a23-dma"
		  "allwinner,sun8i-a83t-dma"
		  "allwinner,sun8i-h3-dma"
- reg:		Should contain the registers base address and length
- interrupts:	Should contain a reference to the interrupt used by this device
+11 −0
Original line number Diff line number Diff line
@@ -282,6 +282,17 @@ supported.
			that is supposed to push the current
			transaction descriptor to a pending queue, waiting
			for issue_pending to be called.
     - In this structure the function pointer callback_result can be
       initialized in order for the submitter to be notified that a
       transaction has completed. In the earlier code the function pointer
       callback has been used. However it does not provide any status to the
       transaction and will be deprecated. The result structure defined as
       dmaengine_result that is passed in to callback_result has two fields:
       + result: This provides the transfer result defined by
		 dmaengine_tx_result. Either success or some error
		 condition.
       + residue: Provides the residue bytes of the transfer for those that
		  support residue.

   * device_issue_pending
     - Takes the first transaction descriptor in the pending queue,
Loading