Skip to content

Commit 7536c1a

Browse files
committed
Merge tag 'dmaengine-6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine
Pull dmaengine updates from Vinod Koul: "New hardware support: - Qualcomm SAR2130P GPI dma support - Sifive PIC64GX pdma support - Rcar r7s72100 support and associated updates Updates: - STM32 DMA3 updates for packing/unpacking mode and prevention of additional xfers - Simplification of devm_acpi_dma_controller_register() and associate cleanup including headers - loongson prefix renames - Switch back to platform_driver::remove() subsystem update" * tag 'dmaengine-6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: dmaengine: loongson2-apb: Rename the prefix ls2x to loongson2 dt-bindings: dma: sifive pdma: Add PIC64GX to compatibles dmaengine: fix typo in the comment dmaengine: stm32-dma3: clamp AXI burst using match data dmaengine: stm32-dma3: prevent LL refactoring thanks to DT configuration dt-bindings: dma: stm32-dma3: prevent additional transfers dmaengine: stm32-dma3: refactor HW linked-list to optimize memory accesses dmaengine: stm32-dma3: prevent pack/unpack thanks to DT configuration dt-bindings: dma: stm32-dma3: prevent packing/unpacking mode dmaengine: idxd: Move DSA/IAA device IDs to IDXD driver dt-bindings: dma: qcom,gpi: Add SAR2130P compatible dmaengine: Switch back to struct platform_driver::remove() dmaengine: ep93xx: Fix unsigned compared against 0 dmaengine: acpi: Clean up headers dmaengine: acpi: Simplify devm_acpi_dma_controller_register() dmaengine: acpi: Drop unused devm_acpi_dma_controller_free() dmaengine: sh: rz-dmac: add r7s72100 support dt-bindings: dma: rz-dmac: Document RZ/A1H SoC
2 parents 6b867c4 + 8974f34 commit 7536c1a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+252
-173
lines changed

Documentation/devicetree/bindings/dma/qcom,gpi.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ properties:
2626
- enum:
2727
- qcom,qcm2290-gpi-dma
2828
- qcom,qdu1000-gpi-dma
29+
- qcom,sar2130p-gpi-dma
2930
- qcom,sc7280-gpi-dma
3031
- qcom,sdx75-gpi-dma
3132
- qcom,sm6115-gpi-dma

Documentation/devicetree/bindings/dma/renesas,rz-dmac.yaml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,16 @@
44
$id: http://devicetree.org/schemas/dma/renesas,rz-dmac.yaml#
55
$schema: http://devicetree.org/meta-schemas/core.yaml#
66

7-
title: Renesas RZ/{G2L,G2UL,V2L} DMA Controller
7+
title: Renesas RZ DMA Controller
88

99
maintainers:
1010
- Biju Das <biju.das.jz@bp.renesas.com>
1111

12-
allOf:
13-
- $ref: dma-controller.yaml#
14-
1512
properties:
1613
compatible:
1714
items:
1815
- enum:
16+
- renesas,r7s72100-dmac # RZ/A1H
1917
- renesas,r9a07g043-dmac # RZ/G2UL and RZ/Five
2018
- renesas,r9a07g044-dmac # RZ/G2{L,LC}
2119
- renesas,r9a07g054-dmac # RZ/V2L
@@ -93,13 +91,26 @@ required:
9391
- reg
9492
- interrupts
9593
- interrupt-names
96-
- clocks
97-
- clock-names
9894
- '#dma-cells'
9995
- dma-channels
100-
- power-domains
101-
- resets
102-
- reset-names
96+
97+
allOf:
98+
- $ref: dma-controller.yaml#
99+
100+
- if:
101+
not:
102+
properties:
103+
compatible:
104+
contains:
105+
enum:
106+
- renesas,r7s72100-dmac
107+
then:
108+
required:
109+
- clocks
110+
- clock-names
111+
- power-domains
112+
- resets
113+
- reset-names
103114

104115
additionalProperties: false
105116

Documentation/devicetree/bindings/dma/sifive,fu540-c000-pdma.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,16 @@ allOf:
2727

2828
properties:
2929
compatible:
30-
items:
31-
- enum:
32-
- microchip,mpfs-pdma
33-
- sifive,fu540-c000-pdma
34-
- const: sifive,pdma0
30+
oneOf:
31+
- items:
32+
- const: microchip,pic64gx-pdma
33+
- const: microchip,mpfs-pdma
34+
- const: sifive,pdma0
35+
- items:
36+
- enum:
37+
- microchip,mpfs-pdma
38+
- sifive,fu540-c000-pdma
39+
- const: sifive,pdma0
3540
description:
3641
Should be "sifive,<chip>-pdma" and "sifive,pdma<version>".
3742
Supported compatible strings are -

Documentation/devicetree/bindings/dma/stm32/st,stm32-dma3.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ properties:
9696
including the update of the LLI if any
9797
0x3: at channel level, the transfer complete event is generated at the
9898
end of the last LLI
99+
-bit 16: Prevent packing/unpacking mode
100+
0x0: pack/unpack enabled when source data width/burst != destination data width/burst
101+
0x1: memory data width/burst forced to peripheral data width/burst to prevent pack/unpack
102+
-bit 17: Prevent additional transfers due to linked-list refactoring
103+
0x0: don't prevent additional transfers for optimal performance
104+
0x1: prevent additional transfer to accommodate user constraints such as single transfer
99105
100106
required:
101107
- compatible

Documentation/driver-api/driver-model/devres.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,6 @@ SERDEV
458458

459459
SLAVE DMA ENGINE
460460
devm_acpi_dma_controller_register()
461-
devm_acpi_dma_controller_free()
462461

463462
SPI
464463
devm_spi_alloc_host()

MAINTAINERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13408,12 +13408,12 @@ S: Maintained
1340813408
F: Documentation/devicetree/bindings/gpio/loongson,ls-gpio.yaml
1340913409
F: drivers/gpio/gpio-loongson-64bit.c
1341013410

13411-
LOONGSON LS2X APB DMA DRIVER
13411+
LOONGSON-2 APB DMA DRIVER
1341213412
M: Binbin Zhou <zhoubinbin@loongson.cn>
1341313413
L: dmaengine@vger.kernel.org
1341413414
S: Maintained
1341513415
F: Documentation/devicetree/bindings/dma/loongson,ls2x-apbdma.yaml
13416-
F: drivers/dma/ls2x-apb-dma.c
13416+
F: drivers/dma/loongson2-apb-dma.c
1341713417

1341813418
LOONGSON LS2X I2C DRIVER
1341913419
M: Binbin Zhou <zhoubinbin@loongson.cn>

arch/loongarch/configs/loongson3_defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ CONFIG_RTC_CLASS=y
845845
CONFIG_RTC_DRV_EFI=y
846846
CONFIG_RTC_DRV_LOONGSON=y
847847
CONFIG_DMADEVICES=y
848-
CONFIG_LS2X_APB_DMA=y
848+
CONFIG_LOONGSON2_APB_DMA=y
849849
CONFIG_UDMABUF=y
850850
CONFIG_DMABUF_HEAPS=y
851851
CONFIG_DMABUF_HEAPS_SYSTEM=y

drivers/dma/Kconfig

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,20 @@ config LOONGSON1_APB_DMA
378378
This selects support for the APB DMA controller in Loongson1 SoCs,
379379
which is required by Loongson1 NAND and audio support.
380380

381+
config LOONGSON2_APB_DMA
382+
tristate "Loongson2 APB DMA support"
383+
depends on LOONGARCH || COMPILE_TEST
384+
select DMA_ENGINE
385+
select DMA_VIRTUAL_CHANNELS
386+
help
387+
Support for the Loongson2 APB DMA controller driver. The
388+
DMA controller is having single DMA channel which can be
389+
configured for different peripherals like audio, nand, sdio
390+
etc which is in APB bus.
391+
392+
This DMA controller transfers data from memory to peripheral fifo.
393+
It does not support memory to memory data transfer.
394+
381395
config LPC18XX_DMAMUX
382396
bool "NXP LPC18xx/43xx DMA MUX for PL080"
383397
depends on ARCH_LPC18XX || COMPILE_TEST
@@ -396,20 +410,6 @@ config LPC32XX_DMAMUX
396410
Support for PL080 multiplexed DMA request lines on
397411
LPC32XX platrofm.
398412

399-
config LS2X_APB_DMA
400-
tristate "Loongson LS2X APB DMA support"
401-
depends on LOONGARCH || COMPILE_TEST
402-
select DMA_ENGINE
403-
select DMA_VIRTUAL_CHANNELS
404-
help
405-
Support for the Loongson LS2X APB DMA controller driver. The
406-
DMA controller is having single DMA channel which can be
407-
configured for different peripherals like audio, nand, sdio
408-
etc which is in APB bus.
409-
410-
This DMA controller transfers data from memory to peripheral fifo.
411-
It does not support memory to memory data transfer.
412-
413413
config MCF_EDMA
414414
tristate "Freescale eDMA engine support, ColdFire mcf5441x SoCs"
415415
depends on M5441x || (COMPILE_TEST && FSL_EDMA=n)

drivers/dma/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ obj-$(CONFIG_INTEL_IOATDMA) += ioat/
5050
obj-y += idxd/
5151
obj-$(CONFIG_K3_DMA) += k3dma.o
5252
obj-$(CONFIG_LOONGSON1_APB_DMA) += loongson1-apb-dma.o
53+
obj-$(CONFIG_LOONGSON2_APB_DMA) += loongson2-apb-dma.o
5354
obj-$(CONFIG_LPC18XX_DMAMUX) += lpc18xx-dmamux.o
5455
obj-$(CONFIG_LPC32XX_DMAMUX) += lpc32xx-dmamux.o
55-
obj-$(CONFIG_LS2X_APB_DMA) += ls2x-apb-dma.o
5656
obj-$(CONFIG_MILBEAUT_HDMAC) += milbeaut-hdmac.o
5757
obj-$(CONFIG_MILBEAUT_XDMAC) += milbeaut-xdmac.o
5858
obj-$(CONFIG_MMP_PDMA) += mmp_pdma.o

drivers/dma/acpi-dma.c

Lines changed: 12 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,21 @@
99
* Mika Westerberg <mika.westerberg@linux.intel.com>
1010
*/
1111

12+
#include <linux/acpi.h>
13+
#include <linux/acpi_dma.h>
1214
#include <linux/device.h>
1315
#include <linux/dma-mapping.h>
1416
#include <linux/err.h>
15-
#include <linux/module.h>
17+
#include <linux/errno.h>
18+
#include <linux/export.h>
19+
#include <linux/ioport.h>
1620
#include <linux/kernel.h>
1721
#include <linux/list.h>
1822
#include <linux/mutex.h>
19-
#include <linux/slab.h>
20-
#include <linux/ioport.h>
21-
#include <linux/acpi.h>
22-
#include <linux/acpi_dma.h>
2323
#include <linux/property.h>
24+
#include <linux/slab.h>
25+
#include <linux/string.h>
26+
#include <linux/types.h>
2427

2528
static LIST_HEAD(acpi_dma_list);
2629
static DEFINE_MUTEX(acpi_dma_lock);
@@ -236,7 +239,7 @@ int acpi_dma_controller_free(struct device *dev)
236239
}
237240
EXPORT_SYMBOL_GPL(acpi_dma_controller_free);
238241

239-
static void devm_acpi_dma_release(struct device *dev, void *res)
242+
static void devm_acpi_dma_free(void *dev)
240243
{
241244
acpi_dma_controller_free(dev);
242245
}
@@ -259,37 +262,15 @@ int devm_acpi_dma_controller_register(struct device *dev,
259262
(struct acpi_dma_spec *, struct acpi_dma *),
260263
void *data)
261264
{
262-
void *res;
263265
int ret;
264266

265-
res = devres_alloc(devm_acpi_dma_release, 0, GFP_KERNEL);
266-
if (!res)
267-
return -ENOMEM;
268-
269267
ret = acpi_dma_controller_register(dev, acpi_dma_xlate, data);
270-
if (ret) {
271-
devres_free(res);
268+
if (ret)
272269
return ret;
273-
}
274-
devres_add(dev, res);
275-
return 0;
276-
}
277-
EXPORT_SYMBOL_GPL(devm_acpi_dma_controller_register);
278270

279-
/**
280-
* devm_acpi_dma_controller_free - resource managed acpi_dma_controller_free()
281-
* @dev: device that is unregistering as DMA controller
282-
*
283-
* Unregister a DMA controller registered with
284-
* devm_acpi_dma_controller_register(). Normally this function will not need to
285-
* be called and the resource management code will ensure that the resource is
286-
* freed.
287-
*/
288-
void devm_acpi_dma_controller_free(struct device *dev)
289-
{
290-
WARN_ON(devres_release(dev, devm_acpi_dma_release, NULL, NULL));
271+
return devm_add_action_or_reset(dev, devm_acpi_dma_free, dev);
291272
}
292-
EXPORT_SYMBOL_GPL(devm_acpi_dma_controller_free);
273+
EXPORT_SYMBOL_GPL(devm_acpi_dma_controller_register);
293274

294275
/**
295276
* acpi_dma_update_dma_spec - prepare dma specifier to pass to translation function

0 commit comments

Comments
 (0)