- 10 Jul, 2024 1 commit
-
-
Stanislav Jakubek authored
Convert the Spreadtrum SC9860 DMA bindings to DT schema. Changes during conversion: - rename file to match compatible - make interrupts optional, the AGCP DMA controller doesn't need it - describe the optional ashb_eb clock for the AGCP DMA controller Signed-off-by: Stanislav Jakubek <stano.jakubek@gmail.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/Zob1+kGW1xeBKehA@standask-GA-A55M-S2HPSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
- 28 Jun, 2024 6 commits
-
-
Jeff Johnson authored
With ARCH=arm64, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/dma/fsl-dpaa2-qdma/dpdmai.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://lore.kernel.org/r/20240613-md-arm64-drivers-dma-fsl-dpaa2-qdma-v1-1-815d148740e6@quicinc.comSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
Jeff Johnson authored
With ARCH=arm64, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/dma/ti/k3-udma.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/dma/ti/k3-udma-glue.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/dma/ti/k3-psil-lib.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://lore.kernel.org/r/20240613-md-arm64-drivers-dma-ti-v1-1-b1154603f341@quicinc.comSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
Jeff Johnson authored
With ARCH=arm, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/dma/ti/cppi41.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://lore.kernel.org/r/20240615-md-arm-drivers-dma-ti-v1-1-496d243158dd@quicinc.comSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
Jeff Johnson authored
With ARCH=loongarch, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/dma/virt-dma.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://lore.kernel.org/r/20240616-md-loongarch-drivers-dma-virt-dma-v1-1-70ed3dcbf8aa@quicinc.comSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
Vignesh Raghavendra authored
Unlike other channel counts in CAPx registers, BCDMA BCHAN CNT doesn't include UHC and HC BC channels. So include them explicitly to arrive at total BC channel in the instance. Fixes: 88448980 ("dmaengine: ti: k3-udma: Add support for BCDMA channel TPL handling") Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by: Jai Luthra <j-luthra@ti.com> Tested-by: Jayesh Choudhary <j-choudhary@ti.com> Link: https://lore.kernel.org/r/20240607-bcdma_chan_cnt-v2-1-bf1a55529d91@ti.comSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
Biju Das authored
Fix the below lockdep assert warning by holding vc.lock for vchan_get_all_descriptors(). WARNING: virt-dma.h:188 rz_dmac_terminate_all pc : rz_dmac_terminate_all Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20240625170119.173595-1-biju.das.jz@bp.renesas.comSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
- 21 Jun, 2024 4 commits
-
-
Vinod Koul authored
Dmaengine topic - New device_prep_peripheral_dma_vec, documentation and user
-
Paul Cercueil authored
Document the dmaengine_prep_peripheral_dma_vec() API function, the device_prep_peripheral_dma_vec() backend function, and the dma_vec struct. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com> Link: https://lore.kernel.org/r/20240620122726.41232-8-paul@crapouillou.netSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
Paul Cercueil authored
Add implementation of the .device_prep_peripheral_dma_vec() callback. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Co-developed-by: Nuno Sa <nuno.sa@analog.com> Signed-off-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20240620122726.41232-3-paul@crapouillou.netSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
Paul Cercueil authored
This function can be used to initiate a scatter-gather DMA transfer, where the address and size of each segment is located in one entry of the dma_vec array. The major difference with dmaengine_prep_slave_sg() is that it supports specifying the lengths of each DMA transfer; as trying to override the length of the transfer with dmaengine_prep_slave_sg() is a very tedious process. The introduction of a new API function is also justified by the fact that scatterlists are on their way out. Note that dmaengine_prep_interleaved_dma() is not helpful either in that case, as it assumes that the address of each segment will be higher than the one of the previous segment, which we just cannot guarantee in case of a scatter-gather transfer. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Co-developed-by: Nuno Sa <nuno.sa@analog.com> Signed-off-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20240620122726.41232-2-paul@crapouillou.netSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
- 11 Jun, 2024 21 commits
-
-
Dan Carpenter authored
The calls write_lock/unlock_irq() disables and re-enables the IRQs. Calling spin_lock_irqsave() and spin_lock_restore() when the IRQs are already disabled doesn't do anything and just makes the code confusing. Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/8be473eb-65e0-42b4-b574-e61c3a7f62d8@moroto.mountainSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
Joy Zou authored
Fix the issue where MEM_TO_MEM fail on i.MX8QM due to the requirement that both source and destination addresses need pass through the IOMMU. Typically, peripheral FIFO addresses bypass the IOMMU, necessitating only one of the source or destination to go through it. Set "is_remote" to true to ensure both source and destination addresses pass through the IOMMU. iMX8 Spec define "Local" and "Remote" bus as below. Local bus: bypass IOMMU to directly access other peripheral register, such as FIFO. Remote bus: go through IOMMU to access system memory. The test fail log as follow: [ 66.268506] dmatest: dma0chan0-copy0: result #1: 'test timed out' with src_off=0x100 dst_off=0x80 len=0x3ec0 (0) [ 66.278785] dmatest: dma0chan0-copy0: summary 1 tests, 1 failures 0.32 iops 4 KB/s (0) Fixes: 72f5801a ("dmaengine: fsl-edma: integrate v3 support") Signed-off-by: Joy Zou <joy.zou@nxp.com> Cc: stable@vger.kernel.org Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20240510030959.703663-1-joy.zou@nxp.comSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
Dr. David Alan Gilbert authored
'reg_info' was never used since it's initial commit 5d0c3533 ("dmaengine: qcom: Add GPI dma driver") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20240517234024.231477-1-linux@treblig.orgSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
Dr. David Alan Gilbert authored
Remove unused struct 'moxart_filter_data' Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20240516152825.262578-1-linux@treblig.orgSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
Frank Li authored
Convert binding doc from txt to yaml. Re-order interrupt-names to align example. Add #dma-cell in example. Change 'reg' in example to 32bit address. Signed-off-by: Frank Li <Frank.Li@nxp.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240528163734.2471268-1-Frank.Li@nxp.comSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
Frank Li authored
The 'idle' in fsl_chan is redundant as it's equivalent to 'status != DMA_IN_PROGRESS'. So remote it to simple code logic. Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20240603152317.69917-2-Frank.Li@nxp.comSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
Frank Li authored
The edma feature individual IRQs for each DMA channel at some devices. Given the presence of numerous eDMA instances, each with multiple channels, IRQ request during probe results in an extensive list at /proc/interrupts. However, a significant portion of these channels remains unused by the system. Request irq only when a DMA client driver requests a DMA channel. Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20240603152317.69917-1-Frank.Li@nxp.comSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
Amelie Delaunay authored
On STM32 DMA3, channels can be reserved, so they are non available for Linux. This non-availability creates a mismatch between dma_chan id and DMA3 channel id. Use dma_async_device_channel_register() to register the channels after controller registration and change the default channel name, so that it can match the name in the Reference Manual and ease requesting a channel thanks to its name. Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com> Link: https://lore.kernel.org/r/20240531150712.2503554-12-amelie.delaunay@foss.st.comSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
Amelie Delaunay authored
Channel device name is used for sysfs, but also by dmatest filter function. With dynamic channel registration, channels can be registered after dma controller registration. Users may want to have specific channel names. If name is NULL, the channel name relies on previous implementation, dma<controller_device_id>chan<channel_device_id>. Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com> Link: https://lore.kernel.org/r/20240531150712.2503554-11-amelie.delaunay@foss.st.comSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
Amelie Delaunay authored
Implement own device_tx_status ops to compute the residue with a finer granularity, up to bytes. STM32 DMA3 has a bitfield, BNDT, in CxTR1 register which reflects the number of bytes read from the source. It also has a bitfield, FIFOL, in CxSR register which reflects the FIFO level in units of programmed destination data width. The channel is briefly suspended to get a coherent snapshot of registers. It is possible to correct the fifo level when packing/unpacking is enabled with destination increment. Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com> Link: https://lore.kernel.org/r/20240531150712.2503554-10-amelie.delaunay@foss.st.comSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
Amelie Delaunay authored
STM32 DMA3 controller is able to suspend an ongoing transfer (the transfer is suspended after the ongoing burst is flushed to the destination) and resume it from the point it was suspended. No need to reconfigure any register. Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com> Link: https://lore.kernel.org/r/20240531150712.2503554-9-amelie.delaunay@foss.st.comSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
Amelie Delaunay authored
Add DMA_MEMCPY capability and relative device_prep_dma_memcpy ops with stm32_dma3_prep_dma_memcpy(). It reuses stm32_dma3_chan_prep_hw() and stm32_dma3_prep_hwdesc() helpers. As this driver relies on both device_config and of_xlate ops to pre-configure the channel for transfer, add a new helper (stm32_dma3_init_chan_config_for_memcpy) in case the channel is used without being pre-configured (with DT and/or dmaengine_slave_config()). Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com> Link: https://lore.kernel.org/r/20240531150712.2503554-8-amelie.delaunay@foss.st.comSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
Amelie Delaunay authored
Add DMA_CYCLIC capability and relative device_prep_dma_cyclic ops with stm32_dma3_prep_dma_cyclic(). It reuses stm32_dma3_chan_prep_hw() and stm32_dma3_chan_prep_hwdesc() helpers. Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com> Link: https://lore.kernel.org/r/20240531150712.2503554-7-amelie.delaunay@foss.st.comSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
Amelie Delaunay authored
STM32 DMA3 driver supports the 3 hardware configurations of the STM32 DMA3 controller: - LPDMA (Low Power): 4 channels, no FIFO - GPDMA (General Purpose): 16 channels, FIFO from 8 to 32 bytes - HPDMA (High Performance): 16 channels, FIFO from 8 to 256 bytes Hardware configuration of the channels is retrieved from the hardware configuration registers. The client can specify its channel requirements through device tree. STM32 DMA3 channels can be individually reserved either because they are secure, or dedicated to another CPU. Indeed, channels availability depends on Resource Isolation Framework (RIF) configuration. RIF grants access to buses with Compartment ID (CID) filtering, secure and privilege level. It also assigns DMA channels to one or several processors. DMA channels used by Linux should be CID-filtered and statically assigned to CID1 or shared with other CPUs but using semaphore. In case CID filtering is not configured, dma-channel-mask property can be used to specify available DMA channels to the kernel, otherwise such channels will be marked as reserved and can't be used by Linux. STM32 DMA3 is a new STM32 DMA controller, not a new version of an existing one. stm32-dma is not considered for reuse because register layout is completely different and doesn't rely on descriptors mechanism. stm32-mdma is based on descriptors mechanism but there are significant differences in register layout and descriptors structure. Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com> Link: https://lore.kernel.org/r/20240531150712.2503554-6-amelie.delaunay@foss.st.comSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
Amelie Delaunay authored
The STM32 DMA3 is a Direct Memory Access controller with different features depending on its hardware configuration. The channels have not the same capabilities, some have a larger FIFO, so their performance is higher. This patch describes STM32 DMA3 bindings, used to select a channel that fits client requirements, and to pre-configure the channel depending on the client needs. Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com> Link: https://lore.kernel.org/r/20240531150712.2503554-5-amelie.delaunay@foss.st.comSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
Amelie Delaunay authored
Add an entry to make myself a maintainer of STM32 DMA controllers drivers and documentation. Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com> Link: https://lore.kernel.org/r/20240531150712.2503554-4-amelie.delaunay@foss.st.comSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
Amelie Delaunay authored
Gather the STM32 DMA controllers under drivers/dma/stm32/ Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com> Link: https://lore.kernel.org/r/20240531150712.2503554-3-amelie.delaunay@foss.st.comSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
Amelie Delaunay authored
Gather the STM32 DMA controllers bindings under ./dma/stm32/. Then fix reference to old path in spi/st,stm32-spi.yaml: update the dmas property description by referring to all STM32 DMA controllers bindings. Acked-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com> Link: https://lore.kernel.org/r/20240531150712.2503554-2-amelie.delaunay@foss.st.comSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
Olivier Dautricourt authored
Remove list_del call in msgdma_chan_desc_cleanup, this should be the role of msgdma_free_descriptor. In consequence replace list_add_tail with list_move_tail in msgdma_free_descriptor. This fixes the path: msgdma_free_chan_resources -> msgdma_free_descriptors -> msgdma_free_desc_list -> msgdma_free_descriptor which does not correctly free the descriptors as first nodes were not removed from the list. Signed-off-by: Olivier Dautricourt <olivierdautricourt@gmail.com> Tested-by: Olivier Dautricourt <olivierdautricourt@gmail.com> Link: https://lore.kernel.org/r/20240608213216.25087-3-olivierdautricourt@gmail.comSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
Olivier Dautricourt authored
msgdma_chan_desc_cleanup iterates the done list for each completed descriptor while we need to do it once after all descriptors are completed. This fixes a Sparse warning because we first take the lock in msgdma_tasklet. - Move locking to msgdma_chan_desc_cleanup. - Move call to msgdma_chan_desc_cleanup outside of the critical section of msgdma_tasklet. Inspired by: commit 16ed0ef3 ("dmaengine: zynqmp_dma: cleanup after completing all descriptors") Signed-off-by: Olivier Dautricourt <olivierdautricourt@gmail.com> Tested-by: Olivier Dautricourt <olivierdautricourt@gmail.com> Suggested-by: Eric Schwarz <eas@sw-optimization.com> Link: https://lore.kernel.org/r/20240608213216.25087-2-olivierdautricourt@gmail.comSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
Olivier Dautricourt authored
As we first take the lock with spin_lock_irqsave in msgdma_tasklet, Lockdep might complain about this. Inspired by commit 9558cf4a ("dmaengine: zynqmp_dma: fix lockdep warning in tasklet") Signed-off-by: Olivier Dautricourt <olivierdautricourt@gmail.com> Tested-by: Olivier Dautricourt <olivierdautricourt@gmail.com> Suggested-by: Eric Schwarz <eas@sw-optimization.com> Link: https://lore.kernel.org/r/20240608213216.25087-1-olivierdautricourt@gmail.comSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
- 07 Jun, 2024 6 commits
-
-
Jeff Johnson authored
make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/dma/qcom/hdma_mgmt.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/dma/qcom/hdma.o Add the missing invocations of the MODULE_DESCRIPTION() macro, using the descriptions from the associated Kconfig items. Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Link: https://lore.kernel.org/r/20240603-md-drivers-dma-qcom-v1-1-d1bd919352bf@quicinc.comSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
Lucas Stach authored
The SDMA firmware is optional and a usable fallback to the internal ROM firmware is present in the driver. There is already a message printed informing the user that the internal firmware is used, so there is no need to print a scary warning for what is normal operation on most systems. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Link: https://lore.kernel.org/r/20240516102532.213874-2-l.stach@pengutronix.deSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
Lucas Stach authored
Device drivers with optional firmware may still want to use the asynchronous firmware loading interface. To avoid printing a warning into the kernel log when the optional firmware is absent, add a nowarn variant of this interface. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Luis Chamberlain <mcgrof@kernel.org> Link: https://lore.kernel.org/r/20240516102532.213874-1-l.stach@pengutronix.deSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
Animesh Agarwal authored
Convert the fsl i.MX DMA controller bindings to DT schema. Remove old and deprecated properties #dma-channels and #dma-requests. Signed-off-by: Animesh Agarwal <animeshagarwal28@gmail.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240605003356.46458-1-animeshagarwal28@gmail.comSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
Krzysztof Kozlowski authored
Add MODULE_DEVICE_TABLE(), so the module could be properly autoloaded based on the alias from of_device_id table. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20240604130714.185681-1-krzysztof.kozlowski@linaro.orgSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
Jeff Johnson authored
make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/dma/idxd/idxd.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/dma/ti/omap-dma.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/dma/dmatest.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/dma/ioat/ioatdma.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Acked-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://lore.kernel.org/r/20240606-md-drivers-dma-v2-1-0770dfdf74dd@quicinc.comSigned-off-by: Vinod Koul <vkoul@kernel.org>
-
- 26 May, 2024 2 commits
-
-
Linus Torvalds authored
-
Kent Overstreet authored
percpu.h depends on smp.h, but doesn't include it directly because of circular header dependency issues; percpu.h is needed in a bunch of low level headers. This fixes a randconfig build error on mips: include/linux/alloc_tag.h: In function '__alloc_tag_ref_set': include/asm-generic/percpu.h:31:40: error: implicit declaration of function 'raw_smp_processor_id' [-Werror=implicit-function-declaration] Reported-by: kernel test robot <lkp@intel.com> Fixes: 24e44cc2 ("mm: percpu: enable per-cpu allocation tagging") Closes: https://lore.kernel.org/oe-kbuild-all/202405210052.DIrMXJNz-lkp@intel.com/Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-