Skip to content

Commit

Permalink
Merge tag 'dmaengine-6.13-rc1' of git://git.kernel.org/pub/scm/linux/…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
Linus Torvalds committed Nov 27, 2024
2 parents 6b867c4 + 8974f34 commit 7536c1a
Show file tree
Hide file tree
Showing 81 changed files with 252 additions and 173 deletions.
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/dma/qcom,gpi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ properties:
- enum:
- qcom,qcm2290-gpi-dma
- qcom,qdu1000-gpi-dma
- qcom,sar2130p-gpi-dma
- qcom,sc7280-gpi-dma
- qcom,sdx75-gpi-dma
- qcom,sm6115-gpi-dma
Expand Down
29 changes: 20 additions & 9 deletions Documentation/devicetree/bindings/dma/renesas,rz-dmac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@
$id: http://devicetree.org/schemas/dma/renesas,rz-dmac.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Renesas RZ/{G2L,G2UL,V2L} DMA Controller
title: Renesas RZ DMA Controller

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

allOf:
- $ref: dma-controller.yaml#

properties:
compatible:
items:
- enum:
- renesas,r7s72100-dmac # RZ/A1H
- renesas,r9a07g043-dmac # RZ/G2UL and RZ/Five
- renesas,r9a07g044-dmac # RZ/G2{L,LC}
- renesas,r9a07g054-dmac # RZ/V2L
Expand Down Expand Up @@ -93,13 +91,26 @@ required:
- reg
- interrupts
- interrupt-names
- clocks
- clock-names
- '#dma-cells'
- dma-channels
- power-domains
- resets
- reset-names

allOf:
- $ref: dma-controller.yaml#

- if:
not:
properties:
compatible:
contains:
enum:
- renesas,r7s72100-dmac
then:
required:
- clocks
- clock-names
- power-domains
- resets
- reset-names

additionalProperties: false

Expand Down
15 changes: 10 additions & 5 deletions Documentation/devicetree/bindings/dma/sifive,fu540-c000-pdma.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,16 @@ allOf:

properties:
compatible:
items:
- enum:
- microchip,mpfs-pdma
- sifive,fu540-c000-pdma
- const: sifive,pdma0
oneOf:
- items:
- const: microchip,pic64gx-pdma
- const: microchip,mpfs-pdma
- const: sifive,pdma0
- items:
- enum:
- microchip,mpfs-pdma
- sifive,fu540-c000-pdma
- const: sifive,pdma0
description:
Should be "sifive,<chip>-pdma" and "sifive,pdma<version>".
Supported compatible strings are -
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ properties:
including the update of the LLI if any
0x3: at channel level, the transfer complete event is generated at the
end of the last LLI
-bit 16: Prevent packing/unpacking mode
0x0: pack/unpack enabled when source data width/burst != destination data width/burst
0x1: memory data width/burst forced to peripheral data width/burst to prevent pack/unpack
-bit 17: Prevent additional transfers due to linked-list refactoring
0x0: don't prevent additional transfers for optimal performance
0x1: prevent additional transfer to accommodate user constraints such as single transfer
required:
- compatible
Expand Down
1 change: 0 additions & 1 deletion Documentation/driver-api/driver-model/devres.rst
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,6 @@ SERDEV

SLAVE DMA ENGINE
devm_acpi_dma_controller_register()
devm_acpi_dma_controller_free()

SPI
devm_spi_alloc_host()
Expand Down
4 changes: 2 additions & 2 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -13408,12 +13408,12 @@ S: Maintained
F: Documentation/devicetree/bindings/gpio/loongson,ls-gpio.yaml
F: drivers/gpio/gpio-loongson-64bit.c

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

LOONGSON LS2X I2C DRIVER
M: Binbin Zhou <zhoubinbin@loongson.cn>
Expand Down
2 changes: 1 addition & 1 deletion arch/loongarch/configs/loongson3_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_EFI=y
CONFIG_RTC_DRV_LOONGSON=y
CONFIG_DMADEVICES=y
CONFIG_LS2X_APB_DMA=y
CONFIG_LOONGSON2_APB_DMA=y
CONFIG_UDMABUF=y
CONFIG_DMABUF_HEAPS=y
CONFIG_DMABUF_HEAPS_SYSTEM=y
Expand Down
28 changes: 14 additions & 14 deletions drivers/dma/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,20 @@ config LOONGSON1_APB_DMA
This selects support for the APB DMA controller in Loongson1 SoCs,
which is required by Loongson1 NAND and audio support.

config LOONGSON2_APB_DMA
tristate "Loongson2 APB DMA support"
depends on LOONGARCH || COMPILE_TEST
select DMA_ENGINE
select DMA_VIRTUAL_CHANNELS
help
Support for the Loongson2 APB DMA controller driver. The
DMA controller is having single DMA channel which can be
configured for different peripherals like audio, nand, sdio
etc which is in APB bus.

This DMA controller transfers data from memory to peripheral fifo.
It does not support memory to memory data transfer.

config LPC18XX_DMAMUX
bool "NXP LPC18xx/43xx DMA MUX for PL080"
depends on ARCH_LPC18XX || COMPILE_TEST
Expand All @@ -396,20 +410,6 @@ config LPC32XX_DMAMUX
Support for PL080 multiplexed DMA request lines on
LPC32XX platrofm.

config LS2X_APB_DMA
tristate "Loongson LS2X APB DMA support"
depends on LOONGARCH || COMPILE_TEST
select DMA_ENGINE
select DMA_VIRTUAL_CHANNELS
help
Support for the Loongson LS2X APB DMA controller driver. The
DMA controller is having single DMA channel which can be
configured for different peripherals like audio, nand, sdio
etc which is in APB bus.

This DMA controller transfers data from memory to peripheral fifo.
It does not support memory to memory data transfer.

config MCF_EDMA
tristate "Freescale eDMA engine support, ColdFire mcf5441x SoCs"
depends on M5441x || (COMPILE_TEST && FSL_EDMA=n)
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ obj-$(CONFIG_INTEL_IOATDMA) += ioat/
obj-y += idxd/
obj-$(CONFIG_K3_DMA) += k3dma.o
obj-$(CONFIG_LOONGSON1_APB_DMA) += loongson1-apb-dma.o
obj-$(CONFIG_LOONGSON2_APB_DMA) += loongson2-apb-dma.o
obj-$(CONFIG_LPC18XX_DMAMUX) += lpc18xx-dmamux.o
obj-$(CONFIG_LPC32XX_DMAMUX) += lpc32xx-dmamux.o
obj-$(CONFIG_LS2X_APB_DMA) += ls2x-apb-dma.o
obj-$(CONFIG_MILBEAUT_HDMAC) += milbeaut-hdmac.o
obj-$(CONFIG_MILBEAUT_XDMAC) += milbeaut-xdmac.o
obj-$(CONFIG_MMP_PDMA) += mmp_pdma.o
Expand Down
43 changes: 12 additions & 31 deletions drivers/dma/acpi-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,21 @@
* Mika Westerberg <mika.westerberg@linux.intel.com>
*/

#include <linux/acpi.h>
#include <linux/acpi_dma.h>
#include <linux/device.h>
#include <linux/dma-mapping.h>
#include <linux/err.h>
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/export.h>
#include <linux/ioport.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/mutex.h>
#include <linux/slab.h>
#include <linux/ioport.h>
#include <linux/acpi.h>
#include <linux/acpi_dma.h>
#include <linux/property.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/types.h>

static LIST_HEAD(acpi_dma_list);
static DEFINE_MUTEX(acpi_dma_lock);
Expand Down Expand Up @@ -236,7 +239,7 @@ int acpi_dma_controller_free(struct device *dev)
}
EXPORT_SYMBOL_GPL(acpi_dma_controller_free);

static void devm_acpi_dma_release(struct device *dev, void *res)
static void devm_acpi_dma_free(void *dev)
{
acpi_dma_controller_free(dev);
}
Expand All @@ -259,37 +262,15 @@ int devm_acpi_dma_controller_register(struct device *dev,
(struct acpi_dma_spec *, struct acpi_dma *),
void *data)
{
void *res;
int ret;

res = devres_alloc(devm_acpi_dma_release, 0, GFP_KERNEL);
if (!res)
return -ENOMEM;

ret = acpi_dma_controller_register(dev, acpi_dma_xlate, data);
if (ret) {
devres_free(res);
if (ret)
return ret;
}
devres_add(dev, res);
return 0;
}
EXPORT_SYMBOL_GPL(devm_acpi_dma_controller_register);

/**
* devm_acpi_dma_controller_free - resource managed acpi_dma_controller_free()
* @dev: device that is unregistering as DMA controller
*
* Unregister a DMA controller registered with
* devm_acpi_dma_controller_register(). Normally this function will not need to
* be called and the resource management code will ensure that the resource is
* freed.
*/
void devm_acpi_dma_controller_free(struct device *dev)
{
WARN_ON(devres_release(dev, devm_acpi_dma_release, NULL, NULL));
return devm_add_action_or_reset(dev, devm_acpi_dma_free, dev);
}
EXPORT_SYMBOL_GPL(devm_acpi_dma_controller_free);
EXPORT_SYMBOL_GPL(devm_acpi_dma_controller_register);

/**
* acpi_dma_update_dma_spec - prepare dma specifier to pass to translation function
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/altera-msgdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ static struct platform_driver msgdma_driver = {
.of_match_table = of_match_ptr(msgdma_match),
},
.probe = msgdma_probe,
.remove_new = msgdma_remove,
.remove = msgdma_remove,
};

module_platform_driver(msgdma_driver);
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/amd/qdma/qdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,7 @@ static struct platform_driver amd_qdma_driver = {
.name = "amd-qdma",
},
.probe = amd_qdma_probe,
.remove_new = amd_qdma_remove,
.remove = amd_qdma_remove,
};

module_platform_driver(amd_qdma_driver);
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/apple-admac.c
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ static struct platform_driver apple_admac_driver = {
.of_match_table = admac_of_match,
},
.probe = admac_probe,
.remove_new = admac_remove,
.remove = admac_remove,
};
module_platform_driver(apple_admac_driver);

Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/at_hdmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -2250,7 +2250,7 @@ static const struct dev_pm_ops __maybe_unused at_dma_dev_pm_ops = {
};

static struct platform_driver at_dma_driver = {
.remove_new = at_dma_remove,
.remove = at_dma_remove,
.shutdown = at_dma_shutdown,
.id_table = atdma_devtypes,
.driver = {
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/at_xdmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -2476,7 +2476,7 @@ MODULE_DEVICE_TABLE(of, atmel_xdmac_dt_ids);

static struct platform_driver at_xdmac_driver = {
.probe = at_xdmac_probe,
.remove_new = at_xdmac_remove,
.remove = at_xdmac_remove,
.driver = {
.name = "at_xdmac",
.of_match_table = of_match_ptr(atmel_xdmac_dt_ids),
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/bcm-sba-raid.c
Original file line number Diff line number Diff line change
Expand Up @@ -1756,7 +1756,7 @@ MODULE_DEVICE_TABLE(of, sba_of_match);

static struct platform_driver sba_driver = {
.probe = sba_probe,
.remove_new = sba_remove,
.remove = sba_remove,
.driver = {
.name = "bcm-sba-raid",
.of_match_table = sba_of_match,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/bcm2835-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1029,7 +1029,7 @@ static void bcm2835_dma_remove(struct platform_device *pdev)

static struct platform_driver bcm2835_dma_driver = {
.probe = bcm2835_dma_probe,
.remove_new = bcm2835_dma_remove,
.remove = bcm2835_dma_remove,
.driver = {
.name = "bcm2835-dma",
.of_match_table = of_match_ptr(bcm2835_dma_of_match),
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/bestcomm/bestcomm.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ MODULE_DEVICE_TABLE(of, mpc52xx_bcom_of_match);

static struct platform_driver mpc52xx_bcom_of_platform_driver = {
.probe = mpc52xx_bcom_probe,
.remove_new = mpc52xx_bcom_remove,
.remove = mpc52xx_bcom_remove,
.driver = {
.name = DRIVER_NAME,
.of_match_table = mpc52xx_bcom_of_match,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma-jz4780.c
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,7 @@ MODULE_DEVICE_TABLE(of, jz4780_dma_dt_match);

static struct platform_driver jz4780_dma_driver = {
.probe = jz4780_dma_probe,
.remove_new = jz4780_dma_remove,
.remove = jz4780_dma_remove,
.driver = {
.name = "jz4780-dma",
.of_match_table = jz4780_dma_dt_match,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -1676,7 +1676,7 @@ MODULE_DEVICE_TABLE(of, dw_dma_of_id_table);

static struct platform_driver dw_driver = {
.probe = dw_probe,
.remove_new = dw_remove,
.remove = dw_remove,
.driver = {
.name = KBUILD_MODNAME,
.of_match_table = dw_dma_of_id_table,
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dw/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ static const struct dev_pm_ops dw_dev_pm_ops = {

static struct platform_driver dw_driver = {
.probe = dw_probe,
.remove_new = dw_remove,
.remove = dw_remove,
.shutdown = dw_shutdown,
.driver = {
.name = DRV_NAME,
Expand Down
3 changes: 1 addition & 2 deletions drivers/dma/ep93xx_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -929,8 +929,7 @@ static int ep93xx_dma_alloc_chan_resources(struct dma_chan *chan)

/* Sanity check the channel parameters */
if (!edmac->edma->m2m) {
if (edmac->dma_cfg.port < EP93XX_DMA_I2S1 ||
edmac->dma_cfg.port > EP93XX_DMA_IRDA)
if (edmac->dma_cfg.port > EP93XX_DMA_IRDA)
return -EINVAL;
if (edmac->dma_cfg.dir != ep93xx_dma_chan_direction(chan))
return -EINVAL;
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/fsl-edma-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ static struct platform_driver fsl_edma_driver = {
.pm = &fsl_edma_pm_ops,
},
.probe = fsl_edma_probe,
.remove_new = fsl_edma_remove,
.remove = fsl_edma_remove,
};

static int __init fsl_edma_init(void)
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/fsl-qdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1288,7 +1288,7 @@ static struct platform_driver fsl_qdma_driver = {
.of_match_table = fsl_qdma_dt_ids,
},
.probe = fsl_qdma_probe,
.remove_new = fsl_qdma_remove,
.remove = fsl_qdma_remove,
};

module_platform_driver(fsl_qdma_driver);
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/fsl_raid.c
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ static struct platform_driver fsl_re_driver = {
.of_match_table = fsl_re_ids,
},
.probe = fsl_re_probe,
.remove_new = fsl_re_remove,
.remove = fsl_re_remove,
};

module_platform_driver(fsl_re_driver);
Expand Down
Loading

0 comments on commit 7536c1a

Please sign in to comment.