Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+252 -173
+1
Documentation/devicetree/bindings/dma/qcom,gpi.yaml
··· 26 26 - enum: 27 27 - qcom,qcm2290-gpi-dma 28 28 - qcom,qdu1000-gpi-dma 29 + - qcom,sar2130p-gpi-dma 29 30 - qcom,sc7280-gpi-dma 30 31 - qcom,sdx75-gpi-dma 31 32 - qcom,sm6115-gpi-dma
+20 -9
Documentation/devicetree/bindings/dma/renesas,rz-dmac.yaml
··· 4 4 $id: http://devicetree.org/schemas/dma/renesas,rz-dmac.yaml# 5 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 6 6 7 - title: Renesas RZ/{G2L,G2UL,V2L} DMA Controller 7 + title: Renesas RZ DMA Controller 8 8 9 9 maintainers: 10 10 - Biju Das <biju.das.jz@bp.renesas.com> 11 - 12 - allOf: 13 - - $ref: dma-controller.yaml# 14 11 15 12 properties: 16 13 compatible: 17 14 items: 18 15 - enum: 16 + - renesas,r7s72100-dmac # RZ/A1H 19 17 - renesas,r9a07g043-dmac # RZ/G2UL and RZ/Five 20 18 - renesas,r9a07g044-dmac # RZ/G2{L,LC} 21 19 - renesas,r9a07g054-dmac # RZ/V2L ··· 91 93 - reg 92 94 - interrupts 93 95 - interrupt-names 94 - - clocks 95 - - clock-names 96 96 - '#dma-cells' 97 97 - dma-channels 98 - - power-domains 99 - - resets 100 - - reset-names 98 + 99 + allOf: 100 + - $ref: dma-controller.yaml# 101 + 102 + - if: 103 + not: 104 + properties: 105 + compatible: 106 + contains: 107 + enum: 108 + - renesas,r7s72100-dmac 109 + then: 110 + required: 111 + - clocks 112 + - clock-names 113 + - power-domains 114 + - resets 115 + - reset-names 101 116 102 117 additionalProperties: false 103 118
+10 -5
Documentation/devicetree/bindings/dma/sifive,fu540-c000-pdma.yaml
··· 27 27 28 28 properties: 29 29 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 35 40 description: 36 41 Should be "sifive,<chip>-pdma" and "sifive,pdma<version>". 37 42 Supported compatible strings are -
+6
Documentation/devicetree/bindings/dma/stm32/st,stm32-dma3.yaml
··· 96 96 including the update of the LLI if any 97 97 0x3: at channel level, the transfer complete event is generated at the 98 98 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 99 105 100 106 required: 101 107 - compatible
-1
Documentation/driver-api/driver-model/devres.rst
··· 458 458 459 459 SLAVE DMA ENGINE 460 460 devm_acpi_dma_controller_register() 461 - devm_acpi_dma_controller_free() 462 461 463 462 SPI 464 463 devm_spi_alloc_host()
+2 -2
MAINTAINERS
··· 13408 13408 F: Documentation/devicetree/bindings/gpio/loongson,ls-gpio.yaml 13409 13409 F: drivers/gpio/gpio-loongson-64bit.c 13410 13410 13411 - LOONGSON LS2X APB DMA DRIVER 13411 + LOONGSON-2 APB DMA DRIVER 13412 13412 M: Binbin Zhou <zhoubinbin@loongson.cn> 13413 13413 L: dmaengine@vger.kernel.org 13414 13414 S: Maintained 13415 13415 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 13417 13417 13418 13418 LOONGSON LS2X I2C DRIVER 13419 13419 M: Binbin Zhou <zhoubinbin@loongson.cn>
+1 -1
arch/loongarch/configs/loongson3_defconfig
··· 845 845 CONFIG_RTC_DRV_EFI=y 846 846 CONFIG_RTC_DRV_LOONGSON=y 847 847 CONFIG_DMADEVICES=y 848 - CONFIG_LS2X_APB_DMA=y 848 + CONFIG_LOONGSON2_APB_DMA=y 849 849 CONFIG_UDMABUF=y 850 850 CONFIG_DMABUF_HEAPS=y 851 851 CONFIG_DMABUF_HEAPS_SYSTEM=y
+14 -14
drivers/dma/Kconfig
··· 378 378 This selects support for the APB DMA controller in Loongson1 SoCs, 379 379 which is required by Loongson1 NAND and audio support. 380 380 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 + 381 395 config LPC18XX_DMAMUX 382 396 bool "NXP LPC18xx/43xx DMA MUX for PL080" 383 397 depends on ARCH_LPC18XX || COMPILE_TEST ··· 409 395 help 410 396 Support for PL080 multiplexed DMA request lines on 411 397 LPC32XX platrofm. 412 - 413 - config LS2X_APB_DMA 414 - tristate "Loongson LS2X APB DMA support" 415 - depends on LOONGARCH || COMPILE_TEST 416 - select DMA_ENGINE 417 - select DMA_VIRTUAL_CHANNELS 418 - help 419 - Support for the Loongson LS2X APB DMA controller driver. The 420 - DMA controller is having single DMA channel which can be 421 - configured for different peripherals like audio, nand, sdio 422 - etc which is in APB bus. 423 - 424 - This DMA controller transfers data from memory to peripheral fifo. 425 - It does not support memory to memory data transfer. 426 398 427 399 config MCF_EDMA 428 400 tristate "Freescale eDMA engine support, ColdFire mcf5441x SoCs"
+1 -1
drivers/dma/Makefile
··· 50 50 obj-y += idxd/ 51 51 obj-$(CONFIG_K3_DMA) += k3dma.o 52 52 obj-$(CONFIG_LOONGSON1_APB_DMA) += loongson1-apb-dma.o 53 + obj-$(CONFIG_LOONGSON2_APB_DMA) += loongson2-apb-dma.o 53 54 obj-$(CONFIG_LPC18XX_DMAMUX) += lpc18xx-dmamux.o 54 55 obj-$(CONFIG_LPC32XX_DMAMUX) += lpc32xx-dmamux.o 55 - obj-$(CONFIG_LS2X_APB_DMA) += ls2x-apb-dma.o 56 56 obj-$(CONFIG_MILBEAUT_HDMAC) += milbeaut-hdmac.o 57 57 obj-$(CONFIG_MILBEAUT_XDMAC) += milbeaut-xdmac.o 58 58 obj-$(CONFIG_MMP_PDMA) += mmp_pdma.o
+12 -31
drivers/dma/acpi-dma.c
··· 9 9 * Mika Westerberg <mika.westerberg@linux.intel.com> 10 10 */ 11 11 12 + #include <linux/acpi.h> 13 + #include <linux/acpi_dma.h> 12 14 #include <linux/device.h> 13 15 #include <linux/dma-mapping.h> 14 16 #include <linux/err.h> 15 - #include <linux/module.h> 17 + #include <linux/errno.h> 18 + #include <linux/export.h> 19 + #include <linux/ioport.h> 16 20 #include <linux/kernel.h> 17 21 #include <linux/list.h> 18 22 #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> 23 23 #include <linux/property.h> 24 + #include <linux/slab.h> 25 + #include <linux/string.h> 26 + #include <linux/types.h> 24 27 25 28 static LIST_HEAD(acpi_dma_list); 26 29 static DEFINE_MUTEX(acpi_dma_lock); ··· 239 236 } 240 237 EXPORT_SYMBOL_GPL(acpi_dma_controller_free); 241 238 242 - static void devm_acpi_dma_release(struct device *dev, void *res) 239 + static void devm_acpi_dma_free(void *dev) 243 240 { 244 241 acpi_dma_controller_free(dev); 245 242 } ··· 262 259 (struct acpi_dma_spec *, struct acpi_dma *), 263 260 void *data) 264 261 { 265 - void *res; 266 262 int ret; 267 263 268 - res = devres_alloc(devm_acpi_dma_release, 0, GFP_KERNEL); 269 - if (!res) 270 - return -ENOMEM; 271 - 272 264 ret = acpi_dma_controller_register(dev, acpi_dma_xlate, data); 273 - if (ret) { 274 - devres_free(res); 265 + if (ret) 275 266 return ret; 276 - } 277 - devres_add(dev, res); 278 - return 0; 267 + 268 + return devm_add_action_or_reset(dev, devm_acpi_dma_free, dev); 279 269 } 280 270 EXPORT_SYMBOL_GPL(devm_acpi_dma_controller_register); 281 - 282 - /** 283 - * devm_acpi_dma_controller_free - resource managed acpi_dma_controller_free() 284 - * @dev: device that is unregistering as DMA controller 285 - * 286 - * Unregister a DMA controller registered with 287 - * devm_acpi_dma_controller_register(). Normally this function will not need to 288 - * be called and the resource management code will ensure that the resource is 289 - * freed. 290 - */ 291 - void devm_acpi_dma_controller_free(struct device *dev) 292 - { 293 - WARN_ON(devres_release(dev, devm_acpi_dma_release, NULL, NULL)); 294 - } 295 - EXPORT_SYMBOL_GPL(devm_acpi_dma_controller_free); 296 271 297 272 /** 298 273 * acpi_dma_update_dma_spec - prepare dma specifier to pass to translation function
+1 -1
drivers/dma/altera-msgdma.c
··· 954 954 .of_match_table = of_match_ptr(msgdma_match), 955 955 }, 956 956 .probe = msgdma_probe, 957 - .remove_new = msgdma_remove, 957 + .remove = msgdma_remove, 958 958 }; 959 959 960 960 module_platform_driver(msgdma_driver);
+1 -1
drivers/dma/amd/qdma/qdma.c
··· 1133 1133 .name = "amd-qdma", 1134 1134 }, 1135 1135 .probe = amd_qdma_probe, 1136 - .remove_new = amd_qdma_remove, 1136 + .remove = amd_qdma_remove, 1137 1137 }; 1138 1138 1139 1139 module_platform_driver(amd_qdma_driver);
+1 -1
drivers/dma/apple-admac.c
··· 950 950 .of_match_table = admac_of_match, 951 951 }, 952 952 .probe = admac_probe, 953 - .remove_new = admac_remove, 953 + .remove = admac_remove, 954 954 }; 955 955 module_platform_driver(apple_admac_driver); 956 956
+1 -1
drivers/dma/at_hdmac.c
··· 2250 2250 }; 2251 2251 2252 2252 static struct platform_driver at_dma_driver = { 2253 - .remove_new = at_dma_remove, 2253 + .remove = at_dma_remove, 2254 2254 .shutdown = at_dma_shutdown, 2255 2255 .id_table = atdma_devtypes, 2256 2256 .driver = {
+1 -1
drivers/dma/at_xdmac.c
··· 2476 2476 2477 2477 static struct platform_driver at_xdmac_driver = { 2478 2478 .probe = at_xdmac_probe, 2479 - .remove_new = at_xdmac_remove, 2479 + .remove = at_xdmac_remove, 2480 2480 .driver = { 2481 2481 .name = "at_xdmac", 2482 2482 .of_match_table = of_match_ptr(atmel_xdmac_dt_ids),
+1 -1
drivers/dma/bcm-sba-raid.c
··· 1756 1756 1757 1757 static struct platform_driver sba_driver = { 1758 1758 .probe = sba_probe, 1759 - .remove_new = sba_remove, 1759 + .remove = sba_remove, 1760 1760 .driver = { 1761 1761 .name = "bcm-sba-raid", 1762 1762 .of_match_table = sba_of_match,
+1 -1
drivers/dma/bcm2835-dma.c
··· 1029 1029 1030 1030 static struct platform_driver bcm2835_dma_driver = { 1031 1031 .probe = bcm2835_dma_probe, 1032 - .remove_new = bcm2835_dma_remove, 1032 + .remove = bcm2835_dma_remove, 1033 1033 .driver = { 1034 1034 .name = "bcm2835-dma", 1035 1035 .of_match_table = of_match_ptr(bcm2835_dma_of_match),
+1 -1
drivers/dma/bestcomm/bestcomm.c
··· 486 486 487 487 static struct platform_driver mpc52xx_bcom_of_platform_driver = { 488 488 .probe = mpc52xx_bcom_probe, 489 - .remove_new = mpc52xx_bcom_remove, 489 + .remove = mpc52xx_bcom_remove, 490 490 .driver = { 491 491 .name = DRIVER_NAME, 492 492 .of_match_table = mpc52xx_bcom_of_match,
+1 -1
drivers/dma/dma-jz4780.c
··· 1122 1122 1123 1123 static struct platform_driver jz4780_dma_driver = { 1124 1124 .probe = jz4780_dma_probe, 1125 - .remove_new = jz4780_dma_remove, 1125 + .remove = jz4780_dma_remove, 1126 1126 .driver = { 1127 1127 .name = "jz4780-dma", 1128 1128 .of_match_table = jz4780_dma_dt_match,
+1 -1
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
··· 1676 1676 1677 1677 static struct platform_driver dw_driver = { 1678 1678 .probe = dw_probe, 1679 - .remove_new = dw_remove, 1679 + .remove = dw_remove, 1680 1680 .driver = { 1681 1681 .name = KBUILD_MODNAME, 1682 1682 .of_match_table = dw_dma_of_id_table,
+1 -1
drivers/dma/dw/platform.c
··· 191 191 192 192 static struct platform_driver dw_driver = { 193 193 .probe = dw_probe, 194 - .remove_new = dw_remove, 194 + .remove = dw_remove, 195 195 .shutdown = dw_shutdown, 196 196 .driver = { 197 197 .name = DRV_NAME,
+1 -2
drivers/dma/ep93xx_dma.c
··· 929 929 930 930 /* Sanity check the channel parameters */ 931 931 if (!edmac->edma->m2m) { 932 - if (edmac->dma_cfg.port < EP93XX_DMA_I2S1 || 933 - edmac->dma_cfg.port > EP93XX_DMA_IRDA) 932 + if (edmac->dma_cfg.port > EP93XX_DMA_IRDA) 934 933 return -EINVAL; 935 934 if (edmac->dma_cfg.dir != ep93xx_dma_chan_direction(chan)) 936 935 return -EINVAL;
+1 -1
drivers/dma/fsl-edma-main.c
··· 740 740 .pm = &fsl_edma_pm_ops, 741 741 }, 742 742 .probe = fsl_edma_probe, 743 - .remove_new = fsl_edma_remove, 743 + .remove = fsl_edma_remove, 744 744 }; 745 745 746 746 static int __init fsl_edma_init(void)
+1 -1
drivers/dma/fsl-qdma.c
··· 1288 1288 .of_match_table = fsl_qdma_dt_ids, 1289 1289 }, 1290 1290 .probe = fsl_qdma_probe, 1291 - .remove_new = fsl_qdma_remove, 1291 + .remove = fsl_qdma_remove, 1292 1292 }; 1293 1293 1294 1294 module_platform_driver(fsl_qdma_driver);
+1 -1
drivers/dma/fsl_raid.c
··· 886 886 .of_match_table = fsl_re_ids, 887 887 }, 888 888 .probe = fsl_re_probe, 889 - .remove_new = fsl_re_remove, 889 + .remove = fsl_re_remove, 890 890 }; 891 891 892 892 module_platform_driver(fsl_re_driver);
+1 -1
drivers/dma/fsldma.c
··· 1404 1404 #endif 1405 1405 }, 1406 1406 .probe = fsldma_of_probe, 1407 - .remove_new = fsldma_of_remove, 1407 + .remove = fsldma_of_remove, 1408 1408 }; 1409 1409 1410 1410 /*----------------------------------------------------------------------------*/
+1 -1
drivers/dma/idma64.c
··· 693 693 694 694 static struct platform_driver idma64_platform_driver = { 695 695 .probe = idma64_platform_probe, 696 - .remove_new = idma64_platform_remove, 696 + .remove = idma64_platform_remove, 697 697 .driver = { 698 698 .name = LPSS_IDMA64_DRIVER_NAME, 699 699 .pm = &idma64_dev_pm_ops,
+4
drivers/dma/idxd/registers.h
··· 6 6 #include <uapi/linux/idxd.h> 7 7 8 8 /* PCI Config */ 9 + #define PCI_DEVICE_ID_INTEL_DSA_GNRD 0x11fb 10 + #define PCI_DEVICE_ID_INTEL_DSA_DMR 0x1212 11 + #define PCI_DEVICE_ID_INTEL_IAA_DMR 0x1216 12 + 9 13 #define DEVICE_VERSION_1 0x100 10 14 #define DEVICE_VERSION_2 0x200 11 15
+1 -1
drivers/dma/img-mdc-dma.c
··· 1076 1076 .of_match_table = of_match_ptr(mdc_dma_of_match), 1077 1077 }, 1078 1078 .probe = mdc_dma_probe, 1079 - .remove_new = mdc_dma_remove, 1079 + .remove = mdc_dma_remove, 1080 1080 }; 1081 1081 module_platform_driver(mdc_dma_driver); 1082 1082
+1 -1
drivers/dma/imx-dma.c
··· 1233 1233 .name = "imx-dma", 1234 1234 .of_match_table = imx_dma_of_dev_id, 1235 1235 }, 1236 - .remove_new = imxdma_remove, 1236 + .remove = imxdma_remove, 1237 1237 }; 1238 1238 1239 1239 static int __init imxdma_module_init(void)
+1 -1
drivers/dma/imx-sdma.c
··· 2440 2440 .name = "imx-sdma", 2441 2441 .of_match_table = sdma_dt_ids, 2442 2442 }, 2443 - .remove_new = sdma_remove, 2443 + .remove = sdma_remove, 2444 2444 .probe = sdma_probe, 2445 2445 }; 2446 2446
+1 -1
drivers/dma/k3dma.c
··· 1028 1028 .of_match_table = k3_pdma_dt_ids, 1029 1029 }, 1030 1030 .probe = k3_dma_probe, 1031 - .remove_new = k3_dma_remove, 1031 + .remove = k3_dma_remove, 1032 1032 }; 1033 1033 1034 1034 module_platform_driver(k3_pdma_driver);
+3 -3
drivers/dma/ls2x-apb-dma.c drivers/dma/loongson2-apb-dma.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0-or-later 2 2 /* 3 - * Driver for the Loongson LS2X APB DMA Controller 3 + * Driver for the Loongson-2 APB DMA Controller 4 4 * 5 5 * Copyright (C) 2017-2023 Loongson Corporation 6 6 */ ··· 692 692 693 693 static struct platform_driver ls2x_dmac_driver = { 694 694 .probe = ls2x_dma_probe, 695 - .remove_new = ls2x_dma_remove, 695 + .remove = ls2x_dma_remove, 696 696 .driver = { 697 697 .name = "ls2x-apbdma", 698 698 .of_match_table = ls2x_dma_of_match_table, ··· 700 700 }; 701 701 module_platform_driver(ls2x_dmac_driver); 702 702 703 - MODULE_DESCRIPTION("Loongson LS2X APB DMA Controller driver"); 703 + MODULE_DESCRIPTION("Loongson-2 APB DMA Controller driver"); 704 704 MODULE_AUTHOR("Loongson Technology Corporation Limited"); 705 705 MODULE_LICENSE("GPL");
+1 -1
drivers/dma/mcf-edma-main.c
··· 267 267 .name = "mcf-edma", 268 268 }, 269 269 .probe = mcf_edma_probe, 270 - .remove_new = mcf_edma_remove, 270 + .remove = mcf_edma_remove, 271 271 }; 272 272 273 273 bool mcf_edma_filter_fn(struct dma_chan *chan, void *param)
+1 -1
drivers/dma/mediatek/mtk-cqdma.c
··· 922 922 923 923 static struct platform_driver mtk_cqdma_driver = { 924 924 .probe = mtk_cqdma_probe, 925 - .remove_new = mtk_cqdma_remove, 925 + .remove = mtk_cqdma_remove, 926 926 .driver = { 927 927 .name = KBUILD_MODNAME, 928 928 .of_match_table = mtk_cqdma_match,
+1 -1
drivers/dma/mediatek/mtk-hsdma.c
··· 1038 1038 1039 1039 static struct platform_driver mtk_hsdma_driver = { 1040 1040 .probe = mtk_hsdma_probe, 1041 - .remove_new = mtk_hsdma_remove, 1041 + .remove = mtk_hsdma_remove, 1042 1042 .driver = { 1043 1043 .name = KBUILD_MODNAME, 1044 1044 .of_match_table = mtk_hsdma_match,
+1 -1
drivers/dma/mediatek/mtk-uart-apdma.c
··· 637 637 638 638 static struct platform_driver mtk_uart_apdma_driver = { 639 639 .probe = mtk_uart_apdma_probe, 640 - .remove_new = mtk_uart_apdma_remove, 640 + .remove = mtk_uart_apdma_remove, 641 641 .driver = { 642 642 .name = KBUILD_MODNAME, 643 643 .pm = &mtk_uart_apdma_pm_ops,
+1 -1
drivers/dma/milbeaut-hdmac.c
··· 571 571 572 572 static struct platform_driver milbeaut_hdmac_driver = { 573 573 .probe = milbeaut_hdmac_probe, 574 - .remove_new = milbeaut_hdmac_remove, 574 + .remove = milbeaut_hdmac_remove, 575 575 .driver = { 576 576 .name = "milbeaut-m10v-hdmac", 577 577 .of_match_table = milbeaut_hdmac_match,
+1 -1
drivers/dma/milbeaut-xdmac.c
··· 409 409 410 410 static struct platform_driver milbeaut_xdmac_driver = { 411 411 .probe = milbeaut_xdmac_probe, 412 - .remove_new = milbeaut_xdmac_remove, 412 + .remove = milbeaut_xdmac_remove, 413 413 .driver = { 414 414 .name = "milbeaut-m10v-xdmac", 415 415 .of_match_table = milbeaut_xdmac_match,
+1 -1
drivers/dma/mmp_pdma.c
··· 1137 1137 }, 1138 1138 .id_table = mmp_pdma_id_table, 1139 1139 .probe = mmp_pdma_probe, 1140 - .remove_new = mmp_pdma_remove, 1140 + .remove = mmp_pdma_remove, 1141 1141 }; 1142 1142 1143 1143 module_platform_driver(mmp_pdma_driver);
+1 -1
drivers/dma/mmp_tdma.c
··· 736 736 .of_match_table = mmp_tdma_dt_ids, 737 737 }, 738 738 .probe = mmp_tdma_probe, 739 - .remove_new = mmp_tdma_remove, 739 + .remove = mmp_tdma_remove, 740 740 }; 741 741 742 742 module_platform_driver(mmp_tdma_driver);
+1 -1
drivers/dma/moxart-dma.c
··· 644 644 645 645 static struct platform_driver moxart_driver = { 646 646 .probe = moxart_probe, 647 - .remove_new = moxart_remove, 647 + .remove = moxart_remove, 648 648 .driver = { 649 649 .name = "moxart-dma-engine", 650 650 .of_match_table = moxart_dma_match,
+1 -1
drivers/dma/mpc512x_dma.c
··· 1110 1110 1111 1111 static struct platform_driver mpc_dma_driver = { 1112 1112 .probe = mpc_dma_probe, 1113 - .remove_new = mpc_dma_remove, 1113 + .remove = mpc_dma_remove, 1114 1114 .driver = { 1115 1115 .name = DRV_NAME, 1116 1116 .of_match_table = mpc_dma_match,
+2 -2
drivers/dma/mv_xor_v2.c
··· 635 635 writel(MV_XOR_V2_DESC_NUM, 636 636 xor_dev->dma_base + MV_XOR_V2_DMA_DESQ_SIZE_OFF); 637 637 638 - /* write the DESQ address to the DMA enngine*/ 638 + /* write the DESQ address to the DMA engine*/ 639 639 writel(lower_32_bits(xor_dev->hw_desq), 640 640 xor_dev->dma_base + MV_XOR_V2_DMA_DESQ_BALR_OFF); 641 641 writel(upper_32_bits(xor_dev->hw_desq), ··· 884 884 .probe = mv_xor_v2_probe, 885 885 .suspend = mv_xor_v2_suspend, 886 886 .resume = mv_xor_v2_resume, 887 - .remove_new = mv_xor_v2_remove, 887 + .remove = mv_xor_v2_remove, 888 888 .driver = { 889 889 .name = "mv_xor_v2", 890 890 .of_match_table = of_match_ptr(mv_xor_v2_dt_ids),
+1 -1
drivers/dma/nbpfaxi.c
··· 1515 1515 }, 1516 1516 .id_table = nbpf_ids, 1517 1517 .probe = nbpf_probe, 1518 - .remove_new = nbpf_remove, 1518 + .remove = nbpf_remove, 1519 1519 }; 1520 1520 1521 1521 module_platform_driver(nbpf_driver);
+1 -1
drivers/dma/owl-dma.c
··· 1252 1252 1253 1253 static struct platform_driver owl_dma_driver = { 1254 1254 .probe = owl_dma_probe, 1255 - .remove_new = owl_dma_remove, 1255 + .remove = owl_dma_remove, 1256 1256 .driver = { 1257 1257 .name = "dma-owl", 1258 1258 .of_match_table = of_match_ptr(owl_dma_match),
+1 -1
drivers/dma/ppc4xx/adma.c
··· 4549 4549 4550 4550 static struct platform_driver ppc440spe_adma_driver = { 4551 4551 .probe = ppc440spe_adma_probe, 4552 - .remove_new = ppc440spe_adma_remove, 4552 + .remove = ppc440spe_adma_remove, 4553 4553 .driver = { 4554 4554 .name = "PPC440SP(E)-ADMA", 4555 4555 .of_match_table = ppc440spe_adma_of_match,
+1 -1
drivers/dma/pxa_dma.c
··· 1442 1442 }, 1443 1443 .id_table = pxad_id_table, 1444 1444 .probe = pxad_probe, 1445 - .remove_new = pxad_remove, 1445 + .remove = pxad_remove, 1446 1446 }; 1447 1447 1448 1448 static bool pxad_filter_fn(struct dma_chan *chan, void *param)
+1 -1
drivers/dma/qcom/bam_dma.c
··· 1469 1469 1470 1470 static struct platform_driver bam_dma_driver = { 1471 1471 .probe = bam_dma_probe, 1472 - .remove_new = bam_dma_remove, 1472 + .remove = bam_dma_remove, 1473 1473 .driver = { 1474 1474 .name = "bam-dma-engine", 1475 1475 .pm = &bam_dma_pm_ops,
+1 -1
drivers/dma/qcom/hidma.c
··· 948 948 949 949 static struct platform_driver hidma_driver = { 950 950 .probe = hidma_probe, 951 - .remove_new = hidma_remove, 951 + .remove = hidma_remove, 952 952 .shutdown = hidma_shutdown, 953 953 .driver = { 954 954 .name = "hidma",
+1 -1
drivers/dma/qcom/qcom_adm.c
··· 937 937 938 938 static struct platform_driver adm_dma_driver = { 939 939 .probe = adm_dma_probe, 940 - .remove_new = adm_dma_remove, 940 + .remove = adm_dma_remove, 941 941 .driver = { 942 942 .name = "adm-dma-engine", 943 943 .of_match_table = adm_of_match,
+1 -1
drivers/dma/sa11x0-dma.c
··· 1079 1079 .pm = &sa11x0_dma_pm_ops, 1080 1080 }, 1081 1081 .probe = sa11x0_dma_probe, 1082 - .remove_new = sa11x0_dma_remove, 1082 + .remove = sa11x0_dma_remove, 1083 1083 }; 1084 1084 1085 1085 static int __init sa11x0_dma_init(void)
+2 -2
drivers/dma/sf-pdma/sf-pdma.c
··· 354 354 if (!residue) { 355 355 tasklet_hi_schedule(&chan->done_tasklet); 356 356 } else { 357 - /* submit next trascatioin if possible */ 357 + /* submit next transaction if possible */ 358 358 struct sf_pdma_desc *desc = chan->desc; 359 359 360 360 desc->src_addr += desc->xfer_size - residue; ··· 633 633 634 634 static struct platform_driver sf_pdma_driver = { 635 635 .probe = sf_pdma_probe, 636 - .remove_new = sf_pdma_remove, 636 + .remove = sf_pdma_remove, 637 637 .driver = { 638 638 .name = "sf-pdma", 639 639 .of_match_table = sf_pdma_dt_ids,
+4 -4
drivers/dma/sh/Kconfig
··· 49 49 SoCs. 50 50 51 51 config RZ_DMAC 52 - tristate "Renesas RZ/{G2L,V2L} DMA Controller" 53 - depends on ARCH_RZG2L || COMPILE_TEST 52 + tristate "Renesas RZ DMA Controller" 53 + depends on ARCH_R7S72100 || ARCH_RZG2L || COMPILE_TEST 54 54 select RENESAS_DMA 55 55 select DMA_VIRTUAL_CHANNELS 56 56 help 57 - This driver supports the general purpose DMA controller found in the 58 - Renesas RZ/{G2L,V2L} SoC variants. 57 + This driver supports the general purpose DMA controller typically 58 + found in the Renesas RZ SoC variants.
+1 -1
drivers/dma/sh/rcar-dmac.c
··· 2037 2037 .of_match_table = rcar_dmac_of_ids, 2038 2038 }, 2039 2039 .probe = rcar_dmac_probe, 2040 - .remove_new = rcar_dmac_remove, 2040 + .remove = rcar_dmac_remove, 2041 2041 .shutdown = rcar_dmac_shutdown, 2042 2042 }; 2043 2043
+2 -2
drivers/dma/sh/rz-dmac.c
··· 893 893 /* Initialize the channels. */ 894 894 INIT_LIST_HEAD(&dmac->engine.channels); 895 895 896 - dmac->rstc = devm_reset_control_array_get_exclusive(&pdev->dev); 896 + dmac->rstc = devm_reset_control_array_get_optional_exclusive(&pdev->dev); 897 897 if (IS_ERR(dmac->rstc)) 898 898 return dev_err_probe(&pdev->dev, PTR_ERR(dmac->rstc), 899 899 "failed to get resets\n"); ··· 1004 1004 .of_match_table = of_rz_dmac_match, 1005 1005 }, 1006 1006 .probe = rz_dmac_probe, 1007 - .remove_new = rz_dmac_remove, 1007 + .remove = rz_dmac_remove, 1008 1008 }; 1009 1009 1010 1010 module_platform_driver(rz_dmac_driver);
+1 -1
drivers/dma/sh/shdma-base.c
··· 961 961 962 962 spin_lock_init(&schan->chan_lock); 963 963 964 - /* Init descripter manage list */ 964 + /* Init descriptor manage list */ 965 965 INIT_LIST_HEAD(&schan->ld_queue); 966 966 INIT_LIST_HEAD(&schan->ld_free); 967 967
+1 -1
drivers/dma/sh/shdmac.c
··· 906 906 .pm = &sh_dmae_pm, 907 907 .name = SH_DMAE_DRV_NAME, 908 908 }, 909 - .remove_new = sh_dmae_remove, 909 + .remove = sh_dmae_remove, 910 910 }; 911 911 912 912 static int __init sh_dmae_init(void)
+2 -2
drivers/dma/sh/usb-dmac.c
··· 301 301 struct usb_dmac_desc *desc = NULL; 302 302 unsigned long flags; 303 303 304 - /* Get a freed descritpor */ 304 + /* Get a freed descriptor */ 305 305 spin_lock_irqsave(&chan->vc.lock, flags); 306 306 list_for_each_entry(desc, &chan->desc_freed, node) { 307 307 if (sg_len <= desc->sg_allocated_len) { ··· 899 899 .of_match_table = usb_dmac_of_ids, 900 900 }, 901 901 .probe = usb_dmac_probe, 902 - .remove_new = usb_dmac_remove, 902 + .remove = usb_dmac_remove, 903 903 .shutdown = usb_dmac_shutdown, 904 904 }; 905 905
+1 -1
drivers/dma/sprd-dma.c
··· 1298 1298 1299 1299 static struct platform_driver sprd_dma_driver = { 1300 1300 .probe = sprd_dma_probe, 1301 - .remove_new = sprd_dma_remove, 1301 + .remove = sprd_dma_remove, 1302 1302 .driver = { 1303 1303 .name = "sprd-dma", 1304 1304 .of_match_table = sprd_dma_match,
+1 -1
drivers/dma/st_fdma.c
··· 858 858 .of_match_table = st_fdma_match, 859 859 }, 860 860 .probe = st_fdma_probe, 861 - .remove_new = st_fdma_remove, 861 + .remove = st_fdma_remove, 862 862 }; 863 863 module_platform_driver(st_fdma_platform_driver); 864 864
+100 -21
drivers/dma/stm32/stm32-dma3.c
··· 221 221 #define STM32_DMA3_DT_BREQ BIT(8) /* CTR2_BREQ */ 222 222 #define STM32_DMA3_DT_PFREQ BIT(9) /* CTR2_PFREQ */ 223 223 #define STM32_DMA3_DT_TCEM GENMASK(13, 12) /* CTR2_TCEM */ 224 + #define STM32_DMA3_DT_NOPACK BIT(16) /* CTR1_PAM */ 225 + #define STM32_DMA3_DT_NOREFACT BIT(17) 224 226 225 227 /* struct stm32_dma3_chan .config_set bitfield */ 226 228 #define STM32_DMA3_CFG_SET_DT BIT(0) ··· 230 228 #define STM32_DMA3_CFG_SET_BOTH (STM32_DMA3_CFG_SET_DT | STM32_DMA3_CFG_SET_DMA) 231 229 232 230 #define STM32_DMA3_MAX_BLOCK_SIZE ALIGN_DOWN(CBR1_BNDT, 64) 231 + #define STM32_DMA3_MAX_BURST_LEN (1 + min_t(u32, FIELD_MAX(CTR1_SBL_1), \ 232 + FIELD_MAX(CTR1_DBL_1))) 233 233 #define port_is_ahb(maxdw) ({ typeof(maxdw) (_maxdw) = (maxdw); \ 234 234 ((_maxdw) != DW_INVALID) && ((_maxdw) == DW_32); }) 235 235 #define port_is_axi(maxdw) ({ typeof(maxdw) (_maxdw) = (maxdw); \ ··· 297 293 u32 dma_status; 298 294 }; 299 295 296 + struct stm32_dma3_pdata { 297 + u32 axi_max_burst_len; 298 + }; 299 + 300 300 struct stm32_dma3_ddata { 301 301 struct dma_device dma_dev; 302 302 void __iomem *base; ··· 309 301 u32 dma_channels; 310 302 u32 dma_requests; 311 303 enum stm32_dma3_port_data_width ports_max_dw[2]; 304 + u32 axi_max_burst_len; 312 305 }; 313 306 314 307 static inline struct stm32_dma3_ddata *to_stm32_dma3_ddata(struct stm32_dma3_chan *chan) ··· 542 533 return 1 << __ffs(len | addr | max_dw); 543 534 } 544 535 545 - static u32 stm32_dma3_get_max_burst(u32 len, enum dma_slave_buswidth dw, u32 chan_max_burst) 536 + static u32 stm32_dma3_get_max_burst(u32 len, enum dma_slave_buswidth dw, 537 + u32 chan_max_burst, u32 bus_max_burst) 546 538 { 547 539 u32 max_burst = chan_max_burst ? chan_max_burst / dw : 1; 548 540 ··· 554 544 /* 555 545 * HW doesn't modify the burst if burst size <= half of the fifo size. 556 546 * If len is not a multiple of burst size, last burst is shortened by HW. 547 + * Take care of maximum burst supported on interconnect bus. 557 548 */ 558 - return max_burst; 549 + return min_t(u32, max_burst, bus_max_burst); 559 550 } 560 551 561 552 static int stm32_dma3_chan_prep_hw(struct stm32_dma3_chan *chan, enum dma_transfer_direction dir, ··· 565 554 { 566 555 struct stm32_dma3_ddata *ddata = to_stm32_dma3_ddata(chan); 567 556 struct dma_device dma_device = ddata->dma_dev; 557 + u32 src_max_burst = STM32_DMA3_MAX_BURST_LEN, dst_max_burst = STM32_DMA3_MAX_BURST_LEN; 568 558 u32 sdw, ddw, sbl_max, dbl_max, tcem, init_dw, init_bl_max; 569 559 u32 _ctr1 = 0, _ctr2 = 0; 570 560 u32 ch_conf = chan->dt_config.ch_conf; ··· 606 594 _ctr1 |= CTR1_SINC; 607 595 if (sap) 608 596 _ctr1 |= CTR1_SAP; 597 + if (port_is_axi(sap_max_dw)) /* AXI - apply axi maximum burst limitation */ 598 + src_max_burst = ddata->axi_max_burst_len; 609 599 if (FIELD_GET(STM32_DMA3_DT_DINC, tr_conf)) 610 600 _ctr1 |= CTR1_DINC; 611 601 if (dap) 612 602 _ctr1 |= CTR1_DAP; 603 + if (port_is_axi(dap_max_dw)) /* AXI - apply axi maximum burst limitation */ 604 + dst_max_burst = ddata->axi_max_burst_len; 613 605 614 606 _ctr2 |= FIELD_PREP(CTR2_REQSEL, chan->dt_config.req_line) & ~CTR2_SWREQ; 615 607 if (FIELD_GET(STM32_DMA3_DT_BREQ, tr_conf)) ··· 633 617 /* Set destination (device) data width and burst */ 634 618 ddw = min_t(u32, ddw, stm32_dma3_get_max_dw(chan->max_burst, dap_max_dw, 635 619 len, dst_addr)); 636 - dbl_max = min_t(u32, dbl_max, stm32_dma3_get_max_burst(len, ddw, chan->max_burst)); 620 + dbl_max = min_t(u32, dbl_max, stm32_dma3_get_max_burst(len, ddw, chan->max_burst, 621 + dst_max_burst)); 637 622 638 623 /* Set source (memory) data width and burst */ 639 624 sdw = stm32_dma3_get_max_dw(chan->max_burst, sap_max_dw, len, src_addr); 640 - sbl_max = stm32_dma3_get_max_burst(len, sdw, chan->max_burst); 625 + sbl_max = stm32_dma3_get_max_burst(len, sdw, chan->max_burst, src_max_burst); 626 + if (!!FIELD_GET(STM32_DMA3_DT_NOPACK, tr_conf)) { 627 + sdw = ddw; 628 + sbl_max = dbl_max; 629 + } 641 630 642 631 _ctr1 |= FIELD_PREP(CTR1_SDW_LOG2, ilog2(sdw)); 643 632 _ctr1 |= FIELD_PREP(CTR1_SBL_1, sbl_max - 1); ··· 668 647 /* Set source (device) data width and burst */ 669 648 sdw = min_t(u32, sdw, stm32_dma3_get_max_dw(chan->max_burst, sap_max_dw, 670 649 len, src_addr)); 671 - sbl_max = min_t(u32, sbl_max, stm32_dma3_get_max_burst(len, sdw, chan->max_burst)); 650 + sbl_max = min_t(u32, sbl_max, stm32_dma3_get_max_burst(len, sdw, chan->max_burst, 651 + src_max_burst)); 672 652 673 653 /* Set destination (memory) data width and burst */ 674 654 ddw = stm32_dma3_get_max_dw(chan->max_burst, dap_max_dw, len, dst_addr); 675 - dbl_max = stm32_dma3_get_max_burst(len, ddw, chan->max_burst); 655 + dbl_max = stm32_dma3_get_max_burst(len, ddw, chan->max_burst, dst_max_burst); 656 + if (!!FIELD_GET(STM32_DMA3_DT_NOPACK, tr_conf) || 657 + ((_ctr2 & CTR2_PFREQ) && ddw > sdw)) { /* Packing to wider ddw not supported */ 658 + ddw = sdw; 659 + dbl_max = sbl_max; 660 + } 676 661 677 662 _ctr1 |= FIELD_PREP(CTR1_SDW_LOG2, ilog2(sdw)); 678 663 _ctr1 |= FIELD_PREP(CTR1_SBL_1, sbl_max - 1); ··· 705 678 init_dw = sdw; 706 679 init_bl_max = sbl_max; 707 680 sdw = stm32_dma3_get_max_dw(chan->max_burst, sap_max_dw, len, src_addr); 708 - sbl_max = stm32_dma3_get_max_burst(len, sdw, chan->max_burst); 681 + sbl_max = stm32_dma3_get_max_burst(len, sdw, chan->max_burst, src_max_burst); 709 682 if (chan->config_set & STM32_DMA3_CFG_SET_DMA) { 710 683 sdw = min_t(u32, init_dw, sdw); 711 - sbl_max = min_t(u32, init_bl_max, 712 - stm32_dma3_get_max_burst(len, sdw, chan->max_burst)); 684 + sbl_max = min_t(u32, init_bl_max, stm32_dma3_get_max_burst(len, sdw, 685 + chan->max_burst, 686 + src_max_burst)); 713 687 } 714 688 715 689 /* Set destination (memory) data width and burst */ 716 690 init_dw = ddw; 717 691 init_bl_max = dbl_max; 718 692 ddw = stm32_dma3_get_max_dw(chan->max_burst, dap_max_dw, len, dst_addr); 719 - dbl_max = stm32_dma3_get_max_burst(len, ddw, chan->max_burst); 693 + dbl_max = stm32_dma3_get_max_burst(len, ddw, chan->max_burst, dst_max_burst); 720 694 if (chan->config_set & STM32_DMA3_CFG_SET_DMA) { 721 695 ddw = min_t(u32, init_dw, ddw); 722 - dbl_max = min_t(u32, init_bl_max, 723 - stm32_dma3_get_max_burst(len, ddw, chan->max_burst)); 696 + dbl_max = min_t(u32, init_bl_max, stm32_dma3_get_max_burst(len, ddw, 697 + chan->max_burst, 698 + dst_max_burst)); 724 699 } 725 700 726 701 _ctr1 |= FIELD_PREP(CTR1_SDW_LOG2, ilog2(sdw)); ··· 1145 1116 chan->config_set = 0; 1146 1117 } 1147 1118 1119 + static u32 stm32_dma3_get_ll_count(struct stm32_dma3_chan *chan, size_t len, bool prevent_refactor) 1120 + { 1121 + u32 count; 1122 + 1123 + if (prevent_refactor) 1124 + return DIV_ROUND_UP(len, STM32_DMA3_MAX_BLOCK_SIZE); 1125 + 1126 + count = len / STM32_DMA3_MAX_BLOCK_SIZE; 1127 + len -= (len / STM32_DMA3_MAX_BLOCK_SIZE) * STM32_DMA3_MAX_BLOCK_SIZE; 1128 + 1129 + if (len >= chan->max_burst) { 1130 + count += 1; /* len < STM32_DMA3_MAX_BLOCK_SIZE here, so it fits in one item */ 1131 + len -= (len / chan->max_burst) * chan->max_burst; 1132 + } 1133 + 1134 + /* Unaligned remainder fits in one extra item */ 1135 + if (len > 0) 1136 + count += 1; 1137 + 1138 + return count; 1139 + } 1140 + 1148 1141 static void stm32_dma3_init_chan_config_for_memcpy(struct stm32_dma3_chan *chan, 1149 1142 dma_addr_t dst, dma_addr_t src) 1150 1143 { ··· 1201 1150 struct stm32_dma3_swdesc *swdesc; 1202 1151 size_t next_size, offset; 1203 1152 u32 count, i, ctr1, ctr2; 1153 + bool prevent_refactor = !!FIELD_GET(STM32_DMA3_DT_NOPACK, chan->dt_config.tr_conf) || 1154 + !!FIELD_GET(STM32_DMA3_DT_NOREFACT, chan->dt_config.tr_conf); 1204 1155 1205 - count = DIV_ROUND_UP(len, STM32_DMA3_MAX_BLOCK_SIZE); 1156 + count = stm32_dma3_get_ll_count(chan, len, prevent_refactor); 1206 1157 1207 1158 swdesc = stm32_dma3_chan_desc_alloc(chan, count); 1208 1159 if (!swdesc) ··· 1219 1166 1220 1167 remaining = len - offset; 1221 1168 next_size = min_t(size_t, remaining, STM32_DMA3_MAX_BLOCK_SIZE); 1169 + 1170 + if (!prevent_refactor && 1171 + (next_size < STM32_DMA3_MAX_BLOCK_SIZE && next_size >= chan->max_burst)) 1172 + next_size = chan->max_burst * (remaining / chan->max_burst); 1222 1173 1223 1174 ret = stm32_dma3_chan_prep_hw(chan, DMA_MEM_TO_MEM, &swdesc->ccr, &ctr1, &ctr2, 1224 1175 src + offset, dst + offset, next_size); ··· 1260 1203 size_t len; 1261 1204 dma_addr_t sg_addr, dev_addr, src, dst; 1262 1205 u32 i, j, count, ctr1, ctr2; 1206 + bool prevent_refactor = !!FIELD_GET(STM32_DMA3_DT_NOPACK, chan->dt_config.tr_conf) || 1207 + !!FIELD_GET(STM32_DMA3_DT_NOREFACT, chan->dt_config.tr_conf); 1263 1208 int ret; 1264 1209 1265 - count = sg_len; 1266 - for_each_sg(sgl, sg, sg_len, i) { 1267 - len = sg_dma_len(sg); 1268 - if (len > STM32_DMA3_MAX_BLOCK_SIZE) 1269 - count += DIV_ROUND_UP(len, STM32_DMA3_MAX_BLOCK_SIZE) - 1; 1270 - } 1210 + count = 0; 1211 + for_each_sg(sgl, sg, sg_len, i) 1212 + count += stm32_dma3_get_ll_count(chan, sg_dma_len(sg), prevent_refactor); 1271 1213 1272 1214 swdesc = stm32_dma3_chan_desc_alloc(chan, count); 1273 1215 if (!swdesc) ··· 1282 1226 1283 1227 do { 1284 1228 size_t chunk = min_t(size_t, len, STM32_DMA3_MAX_BLOCK_SIZE); 1229 + 1230 + if (!prevent_refactor && 1231 + (chunk < STM32_DMA3_MAX_BLOCK_SIZE && chunk >= chan->max_burst)) 1232 + chunk = chan->max_burst * (len / chan->max_burst); 1285 1233 1286 1234 if (dir == DMA_MEM_TO_DEV) { 1287 1235 src = sg_addr; ··· 1318 1258 j++; 1319 1259 } while (len); 1320 1260 } 1261 + 1262 + if (count != sg_len && chan->tcem != CTR2_TCEM_CHANNEL) 1263 + dev_warn(chan2dev(chan), "Linked-list refactored, %d items instead of %d\n", 1264 + count, sg_len); 1321 1265 1322 1266 /* Enable Error interrupts */ 1323 1267 swdesc->ccr |= CCR_USEIE | CCR_ULEIE | CCR_DTEIE; ··· 1665 1601 return chan_reserved; 1666 1602 } 1667 1603 1604 + static struct stm32_dma3_pdata stm32mp25_pdata = { 1605 + .axi_max_burst_len = 16, 1606 + }; 1607 + 1668 1608 static const struct of_device_id stm32_dma3_of_match[] = { 1669 - { .compatible = "st,stm32mp25-dma3", }, 1609 + { .compatible = "st,stm32mp25-dma3", .data = &stm32mp25_pdata, }, 1670 1610 { /* sentinel */ }, 1671 1611 }; 1672 1612 MODULE_DEVICE_TABLE(of, stm32_dma3_of_match); ··· 1678 1610 static int stm32_dma3_probe(struct platform_device *pdev) 1679 1611 { 1680 1612 struct device_node *np = pdev->dev.of_node; 1613 + const struct stm32_dma3_pdata *pdata; 1681 1614 struct stm32_dma3_ddata *ddata; 1682 1615 struct reset_control *reset; 1683 1616 struct stm32_dma3_chan *chan; ··· 1772 1703 ddata->ports_max_dw[1] = DW_INVALID; 1773 1704 else /* Dual master ports */ 1774 1705 ddata->ports_max_dw[1] = FIELD_GET(G_M1_DATA_WIDTH_ENC, hwcfgr); 1706 + 1707 + /* axi_max_burst_len is optional, if not defined, use STM32_DMA3_MAX_BURST_LEN */ 1708 + ddata->axi_max_burst_len = STM32_DMA3_MAX_BURST_LEN; 1709 + pdata = device_get_match_data(&pdev->dev); 1710 + if (pdata && pdata->axi_max_burst_len) { 1711 + ddata->axi_max_burst_len = min_t(u32, pdata->axi_max_burst_len, 1712 + STM32_DMA3_MAX_BURST_LEN); 1713 + dev_dbg(&pdev->dev, "Burst is limited to %u beats through AXI port\n", 1714 + ddata->axi_max_burst_len); 1715 + } 1775 1716 1776 1717 ddata->chans = devm_kcalloc(&pdev->dev, ddata->dma_channels, sizeof(*ddata->chans), 1777 1718 GFP_KERNEL); ··· 1906 1827 1907 1828 static struct platform_driver stm32_dma3_driver = { 1908 1829 .probe = stm32_dma3_probe, 1909 - .remove_new = stm32_dma3_remove, 1830 + .remove = stm32_dma3_remove, 1910 1831 .driver = { 1911 1832 .name = "stm32-dma3", 1912 1833 .of_match_table = stm32_dma3_of_match,
+1 -1
drivers/dma/sun4i-dma.c
··· 1292 1292 1293 1293 static struct platform_driver sun4i_dma_driver = { 1294 1294 .probe = sun4i_dma_probe, 1295 - .remove_new = sun4i_dma_remove, 1295 + .remove = sun4i_dma_remove, 1296 1296 .driver = { 1297 1297 .name = "sun4i-dma", 1298 1298 .of_match_table = sun4i_dma_match,
+1 -1
drivers/dma/sun6i-dma.c
··· 1488 1488 1489 1489 static struct platform_driver sun6i_dma_driver = { 1490 1490 .probe = sun6i_dma_probe, 1491 - .remove_new = sun6i_dma_remove, 1491 + .remove = sun6i_dma_remove, 1492 1492 .driver = { 1493 1493 .name = "sun6i-dma", 1494 1494 .of_match_table = sun6i_dma_match,
+1 -1
drivers/dma/tegra186-gpc-dma.c
··· 1532 1532 .of_match_table = tegra_dma_of_match, 1533 1533 }, 1534 1534 .probe = tegra_dma_probe, 1535 - .remove_new = tegra_dma_remove, 1535 + .remove = tegra_dma_remove, 1536 1536 }; 1537 1537 1538 1538 module_platform_driver(tegra_dma_driver);
+1 -1
drivers/dma/tegra20-apb-dma.c
··· 1675 1675 .of_match_table = tegra_dma_of_match, 1676 1676 }, 1677 1677 .probe = tegra_dma_probe, 1678 - .remove_new = tegra_dma_remove, 1678 + .remove = tegra_dma_remove, 1679 1679 }; 1680 1680 1681 1681 module_platform_driver(tegra_dmac_driver);
+1 -1
drivers/dma/tegra210-adma.c
··· 1008 1008 .of_match_table = tegra_adma_of_match, 1009 1009 }, 1010 1010 .probe = tegra_adma_probe, 1011 - .remove_new = tegra_adma_remove, 1011 + .remove = tegra_adma_remove, 1012 1012 }; 1013 1013 1014 1014 module_platform_driver(tegra_admac_driver);
+1 -1
drivers/dma/ti/cppi41.c
··· 1243 1243 1244 1244 static struct platform_driver cpp41_dma_driver = { 1245 1245 .probe = cppi41_dma_probe, 1246 - .remove_new = cppi41_dma_remove, 1246 + .remove = cppi41_dma_remove, 1247 1247 .driver = { 1248 1248 .name = "cppi41-dma-engine", 1249 1249 .pm = &cppi41_pm_ops,
+1 -1
drivers/dma/ti/edma.c
··· 2636 2636 2637 2637 static struct platform_driver edma_driver = { 2638 2638 .probe = edma_probe, 2639 - .remove_new = edma_remove, 2639 + .remove = edma_remove, 2640 2640 .driver = { 2641 2641 .name = "edma", 2642 2642 .pm = &edma_pm_ops,
+1 -1
drivers/dma/ti/omap-dma.c
··· 1915 1915 1916 1916 static struct platform_driver omap_dma_driver = { 1917 1917 .probe = omap_dma_probe, 1918 - .remove_new = omap_dma_remove, 1918 + .remove = omap_dma_remove, 1919 1919 .driver = { 1920 1920 .name = "omap-dma-engine", 1921 1921 .of_match_table = omap_dma_match,
+1 -1
drivers/dma/timb_dma.c
··· 761 761 .name = DRIVER_NAME, 762 762 }, 763 763 .probe = td_probe, 764 - .remove_new = td_remove, 764 + .remove = td_remove, 765 765 }; 766 766 767 767 module_platform_driver(td_driver);
+2 -2
drivers/dma/txx9dmac.c
··· 1260 1260 }; 1261 1261 1262 1262 static struct platform_driver txx9dmac_chan_driver = { 1263 - .remove_new = txx9dmac_chan_remove, 1263 + .remove = txx9dmac_chan_remove, 1264 1264 .driver = { 1265 1265 .name = "txx9dmac-chan", 1266 1266 }, 1267 1267 }; 1268 1268 1269 1269 static struct platform_driver txx9dmac_driver = { 1270 - .remove_new = txx9dmac_remove, 1270 + .remove = txx9dmac_remove, 1271 1271 .shutdown = txx9dmac_shutdown, 1272 1272 .driver = { 1273 1273 .name = "txx9dmac",
+1 -1
drivers/dma/uniphier-mdmac.c
··· 493 493 494 494 static struct platform_driver uniphier_mdmac_driver = { 495 495 .probe = uniphier_mdmac_probe, 496 - .remove_new = uniphier_mdmac_remove, 496 + .remove = uniphier_mdmac_remove, 497 497 .driver = { 498 498 .name = "uniphier-mio-dmac", 499 499 .of_match_table = uniphier_mdmac_match,
+1 -1
drivers/dma/uniphier-xdmac.c
··· 603 603 604 604 static struct platform_driver uniphier_xdmac_driver = { 605 605 .probe = uniphier_xdmac_probe, 606 - .remove_new = uniphier_xdmac_remove, 606 + .remove = uniphier_xdmac_remove, 607 607 .driver = { 608 608 .name = "uniphier-xdmac", 609 609 .of_match_table = uniphier_xdmac_match,
+1 -1
drivers/dma/xgene-dma.c
··· 1815 1815 1816 1816 static struct platform_driver xgene_dma_driver = { 1817 1817 .probe = xgene_dma_probe, 1818 - .remove_new = xgene_dma_remove, 1818 + .remove = xgene_dma_remove, 1819 1819 .driver = { 1820 1820 .name = "X-Gene-DMA", 1821 1821 .of_match_table = xgene_dma_of_match_ptr,
+1 -1
drivers/dma/xilinx/xdma.c
··· 1315 1315 }, 1316 1316 .id_table = xdma_id_table, 1317 1317 .probe = xdma_probe, 1318 - .remove_new = xdma_remove, 1318 + .remove = xdma_remove, 1319 1319 }; 1320 1320 1321 1321 module_platform_driver(xdma_driver);
+1 -1
drivers/dma/xilinx/xilinx_dma.c
··· 3271 3271 .of_match_table = xilinx_dma_of_ids, 3272 3272 }, 3273 3273 .probe = xilinx_dma_probe, 3274 - .remove_new = xilinx_dma_remove, 3274 + .remove = xilinx_dma_remove, 3275 3275 }; 3276 3276 3277 3277 module_platform_driver(xilinx_vdma_driver);
+1 -1
drivers/dma/xilinx/xilinx_dpdma.c
··· 1863 1863 1864 1864 static struct platform_driver xilinx_dpdma_driver = { 1865 1865 .probe = xilinx_dpdma_probe, 1866 - .remove_new = xilinx_dpdma_remove, 1866 + .remove = xilinx_dpdma_remove, 1867 1867 .driver = { 1868 1868 .name = "xilinx-zynqmp-dpdma", 1869 1869 .of_match_table = xilinx_dpdma_of_match,
+2 -2
drivers/dma/xilinx/zynqmp_dma.c
··· 366 366 } 367 367 writel(val, chan->regs + ZYNQMP_DMA_DATA_ATTR); 368 368 369 - /* Clearing the interrupt account rgisters */ 369 + /* Clearing the interrupt account registers */ 370 370 val = readl(chan->regs + ZYNQMP_DMA_IRQ_SRC_ACCT); 371 371 val = readl(chan->regs + ZYNQMP_DMA_IRQ_DST_ACCT); 372 372 ··· 1192 1192 .pm = &zynqmp_dma_dev_pm_ops, 1193 1193 }, 1194 1194 .probe = zynqmp_dma_probe, 1195 - .remove_new = zynqmp_dma_remove, 1195 + .remove = zynqmp_dma_remove, 1196 1196 }; 1197 1197 1198 1198 module_platform_driver(zynqmp_dma_driver);
+3 -6
include/linux/acpi_dma.h
··· 11 11 #ifndef __LINUX_ACPI_DMA_H 12 12 #define __LINUX_ACPI_DMA_H 13 13 14 - #include <linux/list.h> 15 - #include <linux/device.h> 16 14 #include <linux/err.h> 17 15 #include <linux/dmaengine.h> 16 + #include <linux/types.h> 17 + 18 + struct device; 18 19 19 20 /** 20 21 * struct acpi_dma_spec - slave device DMA resources ··· 66 65 struct dma_chan *(*acpi_dma_xlate) 67 66 (struct acpi_dma_spec *, struct acpi_dma *), 68 67 void *data); 69 - void devm_acpi_dma_controller_free(struct device *dev); 70 68 71 69 struct dma_chan *acpi_dma_request_slave_chan_by_index(struct device *dev, 72 70 size_t index); ··· 93 93 void *data) 94 94 { 95 95 return -ENODEV; 96 - } 97 - static inline void devm_acpi_dma_controller_free(struct device *dev) 98 - { 99 96 } 100 97 101 98 static inline struct dma_chan *acpi_dma_request_slave_chan_by_index(
-3
include/linux/pci_ids.h
··· 2709 2709 #define PCI_DEVICE_ID_INTEL_82815_MC 0x1130 2710 2710 #define PCI_DEVICE_ID_INTEL_82815_CGC 0x1132 2711 2711 #define PCI_DEVICE_ID_INTEL_SST_TNG 0x119a 2712 - #define PCI_DEVICE_ID_INTEL_DSA_GNRD 0x11fb 2713 - #define PCI_DEVICE_ID_INTEL_DSA_DMR 0x1212 2714 - #define PCI_DEVICE_ID_INTEL_IAA_DMR 0x1216 2715 2712 #define PCI_DEVICE_ID_INTEL_82092AA_0 0x1221 2716 2713 #define PCI_DEVICE_ID_INTEL_82437 0x122d 2717 2714 #define PCI_DEVICE_ID_INTEL_82371FB_0 0x122e