Commit graph zephyr/drivers/dma
Author SHA1 Message Date
Anas Nashif
d14c0b7fe4 driver: dma : xilinx: fix kconfig leakage
Some options from xilinx driver were enabled when other unrelated
drivers were enabled. Add a conditional to prevent that.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-09-04 06:24:27 -04:00
Fabio Baltieri
b3b1cefe40 device: Add DEVICE_DT_GET_COMMA macro
Add DEVICE_DT_GET_COMMA helper macro to include/zephyr/device.h to
easily get a device pointer followed by a comma when expanding
devicetree foreach iterators like DT_FOREACH_STATUS_OKAY.

Update samples, drivers, and tests to use the common definition.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Assisted-by: Antigravity:gemini-1.5-pro
2026-09-01 21:05:47 -04:00
Parthiban Nallathambi
870e496811 license: fix malformed SPDX-FileCopyrightText headers
Two-line copyright notices were wrapped in the SPDX "<text>...</text>"
construct, which is only valid in an SPDX document, not a file header.
The REUSE tool then folds the literal "<text>" into the holder name
and drops the second line from the SBOM.

Remove the markers and tag the continuation line. Holder, year and
e-mail are left unchanged; only the syntax is fixed.

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2026-09-01 16:25:23 -04:00
Iustin Stolniceanu
3e6a98949c drivers: dma: guard axi_dmac ISR on boards without an IRQ line
axi_dmac_isr() was defined unconditionally, but only referenced via
IRQ_CONNECT when the devicetree node has an interrupts property. A
core synthesized without an interrupt line (dma_get_status() drives
the state machine by polling instead) failed the build with
-Werror=unused-function. Guard the definition the same way
drivers/watchdog/wdt_dw.c does for the identical situation.

Adds a build-only test targeting arty_a7 covering both the IRQ-driven
and the no-IRQ polling configuration, since this AXI core only exists
in FPGA fabric with no SoC/board to instantiate it on.

Signed-off-by: Iustin Stolniceanu <iustin.stolniceanu@analog.com>
2026-09-01 15:16:53 +01:00
Iustin Stolniceanu
2b8a66b8a3 drivers: dma: add ADI AXI DMAC driver
Provides DMA transfers for AXI-Stream peripherals through the standard
Zephyr DMA API, supporting both one-shot and cyclic capture modes. In
cyclic mode the transfer is automatically resubmitted on completion,
keeping the destination buffer continuously updated with no CPU
involvement. Cores synthesized without an interrupt line are driven
through the polling path in dma_get_status().

CONFIG_DMA_ADI_AXI_DMAC is auto-selected when DT_HAS_ADI_AXI_DMAC_ENABLED.

Signed-off-by: Iustin Stolniceanu <iustin.stolniceanu@analog.com>
2026-09-01 15:16:53 +01:00
Arunprasath P
9a2a86becd drivers: dma: microchip: Update DMA G2 driver ISR handling
Add support for both dedicated and shared IRQ lines based on
devicetree configuration using num-dedicated-irqs property.

- Dedicated IRQ: One IRQ per channel, uses CHINTFLAG register
- Shared IRQ: Multiple channels share one IRQ, uses INTPEND register
- Generate IRQ ISR functions using LISTIFY macro
- IRQ type (dedicated/shared) determined at compile time from DTS

Example: num-dedicated-irqs = <4> means ch0-ch3 have dedicated IRQs,
ch4+ share the remaining IRQ line.

Note: This dual-path design is required by hardware behavior, not just
an optimization. Channels with dedicated interrupt lines do not refresh
the INTPEND register (as per datasheet section 24.5.4), so the shared
handler using INTPEND is valid only for multiplexed channels, while
dedicated channels must use CHID and CHINTFLAG directly.

Signed-off-by: Arunprasath P <arunprasath.p@microchip.com>
2026-08-30 16:42:52 -04:00
Christophe Guibout
7a56a3f702 drivers: dma: stm32: add support for STM32MP13X
Add support for STM32MP13X series in the relevant drivers.

Signed-off-by: Christophe Guibout <christophe.guibout@st.com>
2026-08-28 06:48:00 -04:00
Benjamin Cabé
b00b688668 drivers: dma: dw_axi: Fix resume register manipulation
CH_RESUME_WE() and CH_RESUME() expand to bit masks, but resume
passed them to WRITE_BIT(), which expects bit positions, shifting
by the mask value and leaving the suspend bit untouched. Operate
on the masks directly.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-08-27 07:20:03 -07:00
Brett Peterson
f5f18109e3 drivers: dma: new driver for pse84 axidmac
Adding a new DMA driver for the PSE84 AXIDMAC hardware based on the
Infineon PDL driver. The AXIDMAC is a high performance DMA controller
that uses the AXI bus. It is typically used for large memory-to-memory
transactions.

Assisted-by: Claude:claude-opus-4.8
Signed-off-by: Brett Peterson <brett.peterson@infineon.com>
2026-08-21 13:36:33 -07:00
Aksel Skauge Mellbye
0dd29a6fb8 drivers: dma: silabs: Use sl_hal_ldma instead of emlib
Update driver to use new HAL library that supports both
Series 2 and Series 3 SoCs that share the same IP.

Split the check for transfer doneness in the block append
function into semantically equivalent parts: Check CHSTATUS
to see if the channel is active when appending a block, and
check CHDONE in the ISR.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2026-08-21 17:53:27 +02:00
Aksel Skauge Mellbye
2fd09a065c drivers: dma: silabs: Use DMA manager HAL
The DMADRV HAL is deprecated, switch to DMA manager HAL for
channel allocation bookkeeping.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2026-08-18 17:23:03 -04:00
Hieu Nguyen
f112c1080f drivers: dma: Initial support for RZ/A2M
Add DMA driver support for Renesas RZ/A2M

Signed-off-by: Hieu Nguyen <hieu.nguyen.ym@bp.renesas.com>
2026-08-18 09:21:27 +02:00
Hsiu-Chi Tsai
8b0b4db234 drivers: dma: esp32: reject a zero-length block
A dma_block_config whose block_size is zero is accepted and turned into
a descriptor that is handed to the hardware with a length of zero and
the owner bit set to DMA.

Because block_size is already zero when the loop reaches the test for
"did this block finish", the iteration behaves as though the block were
complete, so a chain containing a zero-length block silently gains a
zero-length link, and a single zero-length block produces a chain that
transfers nothing while dma_config() returns success.

dma_esp32_reload() has the same shape and sets the same owner bit, so a
reload of size zero reaches the hardware the same way.

Reject both rather than skipping them. Skipping would change the
observable structure of the block chain the caller described, and a
caller that passes zero has almost certainly made an arithmetic mistake
it would rather hear about.

Fixes #115720

Signed-off-by: Hsiu-Chi Tsai <hctsai@linux.com>
2026-08-13 13:14:21 -04:00
Hsiu-Chi Tsai
38e1dd9ee6 drivers: dma: esp32: refuse an oversized reload before resetting
dma_esp32_reload() resets the channel and rebuilds the descriptor list
before it can discover that the transfer does not fit. When it does not,
the list is memset to zero and -EINVAL returned, so a reload that was
refused has already destroyed the transfer that was configured before
it.

Compare the requested size against the pool the descriptors can cover
first, and return before the reset. The walk keeps its own check as a
backstop.

Signed-off-by: Hsiu-Chi Tsai <hctsai@linux.com>
2026-08-11 17:02:38 -04:00
Hsiu-Chi Tsai
51d753dd26 drivers: dma: esp32: bound the descriptor walks by the array
Three loops over desc_list took their limit from
CONFIG_DMA_ESP32_MAX_DESCRIPTOR_NUM while the exhaustion check beneath
them uses ARRAY_SIZE() of the same array. The two agree today, because
that is what sizes the array, but they are two statements of one fact
and only one of them follows the array if it ever changes.

Use ARRAY_SIZE() in all three. No behaviour change.

Signed-off-by: Hsiu-Chi Tsai <hctsai@linux.com>
2026-08-11 17:02:38 -04:00
Hsiu-Chi Tsai
626b0ca6d2 drivers: dma: esp32: do not stop a direction twice on a M2M channel
dma_esp32_stop() handled a memory-to-memory channel by disabling and
stopping both directions, and then fell straight into the per-direction
block, which stopped one of them a second time. There was no return and
no else between the two.

A memory-to-memory channel still carries a dir of DMA_RX or DMA_TX from
dma_esp32_config_rx() or dma_esp32_config_tx(), so one of the two arms
always matched.

The second stop is redundant in the driver's intended control flow.
Nothing here measures what the hardware does with a repeated stop, so
this is not offered as an equivalence: a M2M channel now takes one
interrupt disable and one stop per direction instead of two for one of
them. It is worth removing on its own terms, because the function reads
as though the two blocks are alternatives when they are not, and any
step added to the stop sequence later would be duplicated silently.

Chain the branches, which is what dma_esp32_start() directly above
already does with the same three cases.

Fixes #115503

Signed-off-by: Hsiu-Chi Tsai <hctsai@linux.com>
2026-08-11 17:02:38 -04:00
Hsiu-Chi Tsai
e221690000 drivers: dma: esp32: derive the channel pointer after the bounds check
Five entry points formed the channel pointer from the caller's index
before validating it:

	struct dma_esp32_channel *dma_channel =
		&config->dma_channel[channel];

	if (channel >= config->dma_channel_max) {
		LOG_ERR("Unsupported channel");
		return -EINVAL;
	}

Nothing is dereferenced before the check, so no wrong memory is read
today, but forming a pointer more than one past the end of an array is
undefined behaviour in C. It also gives the compiler licence to assume
the index is in range, and the thing it would be assuming away is the
check on the very next line.

dma_esp32_reload() went one step further and computed desc_iter from the
unvalidated pointer too.

Move each derivation below its check. Behaviour is unchanged for every
in-range channel; for an out-of-range one the driver no longer forms a
pointer the standard leaves undefined.

Signed-off-by: Hsiu-Chi Tsai <hctsai@linux.com>
2026-08-11 17:02:38 -04:00
Hsiu-Chi Tsai
eb05655b95 drivers: dma: esp32: stop dereferencing one past the descriptor array
dma_esp32_config_descriptor() and dma_esp32_reload() both walk desc_list
with a pointer that advances once per iteration, and both then test for
descriptor exhaustion by dereferencing that pointer after the loop has
ended. The loop bound equals the array size, so a loop that runs to
completion leaves the pointer one past the last element and the test
reads out of bounds. In dma_esp32_reload() the error branch then writes
there as well.

config->dma_channel is an array of struct dma_esp32_channel, so the
memory just past one channel's desc_list is that channel's remaining
members or the next channel's. That memset lands in a live neighbouring
object rather than in padding.

There is a second consequence in dma_esp32_config_descriptor(). If the
out-of-bounds read happens to yield zero, the function reports success
while desc_list[N - 1].next still points at desc_list + N, so the
hardware is handed a chain that runs off the end of the array. Whether
the caller gets -EINVAL or a corrupt chain depends on the bytes that
happen to follow.

Compare the pointer against the end of the array instead. A loop that
breaks early exits with desc_iter below the end, and a loop that ran out
of descriptors exits with it exactly at the end, so the comparison
answers the same question the dereference was trying to answer without
forming an access. Comparing against one past the end is well defined.

dma_esp32_reload() also gains the whole-array clear that
dma_esp32_config_descriptor() already performs on this path, in place of
the single out-of-bounds descriptor it used to clear. Leaving a half
built chain behind on an error return serves no purpose.

Fixes #115502

Signed-off-by: Hsiu-Chi Tsai <hctsai@linux.com>
2026-08-11 17:02:38 -04:00
Fabin V Martin
752f07ce22 drivers: dma : microchip g3: default burst_len to 1
- Set burst_len to 1 when zero, since CSZ=0 (zero bytes per trigger)
  causes WRE/RDE interrupt errors

Signed-off-by: Fabin V Martin <Fabinv.Martin@microchip.com>
2026-08-10 11:37:24 -07:00
Yuzhuo Liu
402fed803f drivers: dma: bee: add address conversion for flash
Convert cached flash addresses to non-cached flash addresses in Realtek
Bee DMA driver. Without this conversion, DMA may access an invalid flash
mapping and read back 0xdeadbeef.

Signed-off-by: Yuzhuo Liu <yuzhuo_liu@realsil.com.cn>
2026-08-08 16:31:05 -04:00
Liam Ogletree
a74c1af6dd drivers: dma: Unify runtime PM log messages
Propagates #113545 to DMA drivers.

Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
2026-08-05 09:26:14 +02:00
Etienne Carriere
cf648967dd drivers: *: espressif: use diamond include for non-local headers
Use #include <> instead of #include "" to include a header file which path
is not relative to the directory path of the file emitting the #include
directive.

This change was made running scripts/check_quoted_includes.py script
proposed in https://github.com/zephyrproject-rtos/zephyr/pull/112135
with Linux shell commands like the one below and manually selecting the
applicable changes: only those located in drivers/ since soc/, boards/,
samples/ and tests/ content related to Espressif is addressed in
pull request https://github.com/zephyrproject-rtos/zephyr/pull/112190.

$ ./scripts/check_quoted_includes.py -w \
    `./scripts/get_maintainer.py list "Espressif Platforms"`

Also update drivers/clock_control/clock_control_esp32_priv.h that was
not listed by './scripts/get_maintainer.py list "Espressif Platforms"'.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-07-29 10:52:52 -07:00
Liam Girdwood
07473476e3 drivers: dma: intel_adsp_gpdma: use sys_write16 for ownership reg
The GPDMA ownership register is a 16-bit MMIO register. Using
sys_write32() triggers a load/store width exception under LLVM strict
alignment checking. Replace with sys_write16() to match the actual
register width.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2026-07-27 11:41:05 -07:00
Sher Amir Singh Dullat
756631d887 drivers: dma: stm32: claim CID1 for HPDMA channels on STM32N6
On STM32N6, HPDMA1 channels are subject to RIF CID filtering.
Channels reach the driver with no CID claimed (CCIDCFGR reads zero),
and transfers on such channels silently move no data: the transfer
completes and raises a transfer-complete event, but the destination
is untouched. GPDMA1 is unaffected; the vendor isolation API is
documented as HPDMA-only.

Claim CID1 (the CPU compartment) during controller initialization
using the LL isolation accessors, mirroring the vendor HAL's
HAL_DMA_SetIsolationAttributes().

Signed-off-by: Sher Amir Singh Dullat <sheramir51@gmail.com>
2026-07-27 14:42:33 +02:00
Benjamin Cabé
20d2b066c2 drivers: dma: ti_mspm0: Fix data width byte counts
The width selectors are matched against the configured data sizes,
which are byte counts, but the word and long constants held enum
style values of three and four. A 32-bit element therefore
selected the 64-bit hardware width and the word width was
unreachable. Use the actual byte counts of four and eight.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-07-26 16:57:09 +02:00
Robin Sachsenweger Ballantyne
95e424c97f dma: rpi_pico: enable channel interrupt in reload and busy check in start
The DMA Pico ISR disables the channel interrupt for the channel that
triggered it. A commonly used pattern is to start another DMA transfer from
inside the callback such as in `i2s_stm32.c` without configuring again by
calling the dma_reload() and dma_start() functions. Previously, the
dma_start() function re-enabled the channel interrupt and started the DMA
transfer whereas dma_reload() set the source and destination addresses and
started the DMA transfer. Calling either function on its own does not
produce the desired effect and calling both starts the DMA transfer twice.
The only remaining option would be to call dma_config() for every
transmission which is wasteful. This change brings the RPi Pico DMA API
functionally closer in line with the STM32 DMA API allowing dma_reload()
followed by dma_start() to correctly restart a DMA transfer with a
different source/destination address and enable the appropriate callback.

Signed-off-by: Robin Sachsenweger Ballantyne <makenenjoy@gmail.com>
2026-07-26 08:15:30 -04:00
Benjamin Cabé
ebf1b9e88a drivers: dma: wch: Fix base/extended controller split for channel 8
The base controller holds channels 0 to 7, but the interrupt flag
lookup, flag clearing and ISR dispatch all treated channel 8 as a
base channel, shifting the 32-bit flag registers by 32 and leaving
the first extended slot unreachable. Split at eight consistently.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-07-25 17:10:22 +02:00
Jordan Yates
a49098d26c dma: emul: use typedef instead of #define
Fix SonarQube issue (rule c:S5825).

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-07-22 11:13:55 +01:00
Benjamin Cabé
1f21d40299 drivers: dma: mcux_lpc: Fix channel bounds check in get_status
get_status() indexed the channel table before validating the
channel and accepted a channel equal to the channel count, reading
one past the array. Validate first with an exclusive bound like
the other entry points.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-07-22 11:13:44 +01:00
Benjamin Cabé
66be6204a7 drivers: dma: esp32_gdma: Check RX configuration result
In the memory-to-memory path the RX configuration result was
immediately overwritten by the TX call, so a failed RX descriptor
setup was reported as success.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-07-22 11:13:37 +01:00
Benjamin Cabé
f380eff583 drivers: dma: stm32u5: Fix priority bounds check
A priority equal to the table size passed the check and read one
entry past the priority table.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-07-22 11:13:34 +01:00
Raffael Rostagno
3868992de7 drivers: dma: esp32: Attach sleep retention modules
Without ATTR_ATTACH and sleep_retention_module_attach(), GDMA channels
are created but not retained, so peripheral_domain_pd_allowed() stays
false and TOP never powers down in light sleep. Fix lowers light sleep
current when GDMA and peripheral power down are enabled.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2026-07-21 10:12:17 -04:00
Raffael Rostagno
86f7be1d6a drivers: dma: esp32p4: Fix sleep retention
Use aux variable to allow accessting the retention table's
group id.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2026-07-21 10:12:17 -04:00
Raffael Rostagno
c97616cdeb drivers: dma: esp32: Fix sleep retention
Recent HAL update moved GDMA sleep-retention definitions from
hal/gdma_periph.h into the esp_driver_dma component. Include gdma_priv.h
and use the new gdma_retention_desc_t / gdma_retention_infos names in
place of the removed gdma_chx_reg_ctx_link_t / gdma_chx_regs_retention.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2026-07-21 10:12:17 -04:00
Venkatesh Odela
ce50fd98ac drivers: dma: xilinx_axi_dma: fix TX SG callback and ring reset logic
Two issues fixed for multi-fragment scatter-gather TX support:
 - Completion callback was fired per descriptor; now fires only on the
   EOF descriptor so the ethernet driver unrefs net_pkt once per packet.
 - Ring reset (memset, index reset, CURDESC write) is skipped when the
   DMA is not halted to avoid corrupting an active ring.

Signed-off-by: Venkatesh Odela <venkatesh.odela@amd.com>
2026-07-20 16:44:16 -05:00
Scott Worley
40abeaced5 drivers: dma: mec: wait for DMA soft-reset to complete
The DMA main soft-reset bit is self-clearing and clears the block
enable while it is in progress. The previous sequence wrote the
enable bit immediately after the reset request (separated only by a
dummy I/O-delay write), so the enable could be dropped if the reset
had not yet finished. Poll the self-clearing SRST bit until it reads
back zero before setting the enable bit.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2026-07-17 11:53:51 -04:00
Manimaran A
c4b8755daa drivers: dma: mec: enable dma for mec174x/5x/165xb
Add a Kconfig option, DMA_MCHP_XEC_DMAC_MAX_CHANNELS, defaulting to the
dmac node's dma-channels devicetree property,
Updated PCR and GIRQ properties of DMA node to use new macros
Also removed the XEC_DMA_DEBUG logic.

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2026-07-17 11:53:51 -04:00
Scott Worley
2cd64c55a5 drivers: dma: mec: migrate XEC DMA to sys_* register access
Replace the CMSIS-style packed-struct register overlays
with register offset constants accessed via the Zephyr
sys_read32/sys_write32/sys_set_bit/sys_clear_bit helpers.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2026-07-17 11:53:51 -04:00
DineshKumar Kalva
21958f13cf dts: amd: acp_7_x: add TDM DAI and DMA device tree nodes
Add three TDM DAI instances (tdm_dai0/1/2) and one unified
acp_tdm_dma DMA controller node to the ACP 7.X device tree.

Update dma-channels default to 6 (2 per instance x 3 TDM
instances) in Kconfig.acp_tdm.

Signed-off-by: DineshKumar Kalva <DineshKumar.Kalva@amd.com>
Signed-off-by: Sneha Voona <sneha.voona@amd.com>
2026-07-13 10:21:57 +01:00
DineshKumar Kalva
dd529c2824 drivers: dma: amd: tdm: add ACP 7.X TDM DMA support
Extend the ACP TDM DMA driver for ACP 7.X:
- Include ACP 7.X chip headers (acp7x_fw_scratch_mem.h,
  acp7x_chip_offsets.h, acp7x_chip_reg.h).
- Update ACP_TDM1_FIFO_SIZE from 512 to 768 bytes
- Add ACP_PDM_2_Enable check in acp_pdm_streams_stopped() for
  ACP 7.X (2 PDM instances)
- Guard acp_sdw_all_streams_stopped() under CONFIG_SOC_ACP_7_0
  since ACP 7.X has no SDW logic implemented.
- Add acp_get_sample_len_from_frame_fmt() helper for 7.X
- Propagate frame_fmt from acp_tdm_context into dma_start for
  per-sample-length ITER/IRER configuration
- Default channel count changed from 8 to 6 (2 per TDM instance
  x 3 instances for ACP 7.X)

Signed-off-by: DineshKumar Kalva <DineshKumar.Kalva@amd.com>
Signed-off-by: Sneha Voona <sneha.voona@amd.com>
2026-07-13 10:21:57 +01:00
TOKITA Hiroshi
4f69eb584b dts: pcie: epdpoint: Add brcm,iproc-pcie-ep-v2
ADd `brcm,iproc-pcie-ep-v2` to represent the version difference
with `brcm,iproc-pcie-ep`.

This property can replace the CONFIG_PCIE_EP_IPROC_V2.
So, we removed it.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2026-07-09 18:02:38 -04:00
Adam BERLINGER
e89bb6372d drivers: dma: dma_stm32: Disable FIFO error interrupt
The FIFO error flag is triggered either by wrong configuration
or by overrun/underrun condition. The configuration is handled
by stm32_dma_check_fifo_mburst function. For overrun/underrun
condition, there is no data loss, so it is rather warning
and can be ignored.

Signed-off-by: Adam BERLINGER <adam.berlinger@st.com>
2026-07-08 17:15:02 +01:00
Camille BAUD
a0473c3a2f drivers: bflb: extend shared drivers with BL616CL support
Add support for BL616CL in shared drivers

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-07-08 10:01:48 +02:00
Sylvio Alves
834f3197a5 drivers: dma: esp32: add esp32p4 axi and ahb dma support
Wire the gdma driver to the esp32p4 AXI and AHB DMA instances,
selecting the per-bus LL calls and 8-byte aligned descriptors so
both buses work through the common driver.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-07-03 19:25:47 -04:00
Abin Joseph
5022cd26e6 drivers: dma: Add Xilinx ADMA driver support
Introduce Xilinx ADMA driver.

Features:
- Support for Xilinx ZynqMP ADMA (xlnx,zynqmp-dma-1.0)
and AMD Versal2 ADMA (amd,versal2-dma-1.0)
- Simple mode for single block memory-to-memory transfers
- Scatter-Gather mode for multi-block linked descriptor transfers
- Configurable 64-bit and 128-bit bus width support
- Maximum burst length of 256 beats for source and destination
- 64-bit addressing capability
- Software-managed cache coherency via flush/invalidate operations
- Optional hardware cache-coherent mode (device tree configurable)
- Interrupt-driven transfers with completion callbacks
- Error detection and reporting (AXI errors, overflow)
- Channel filtering support

Signed-off-by: Abin Joseph <abin.joseph@amd.com>
2026-06-24 13:54:41 -04:00
Adrian Bonislawski
dac9cb0cda drivers: dma: dw: keep default msize for zero burst length
find_msb_set() returns 0 for a 0 argument, so the unconditional
"find_msb_set(cfg->source_burst_length) - 1" underflowed msize to
UINT_MAX when source_burst_length was 0, clobbering the msize = 3
default set at declaration.

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2026-06-23 07:06:05 -05:00
Jacob Wienecke
a7dc8d2e8d drivers: dma: drop LOG_INF from nxp_gdma init
dma_nxp_gdma_init() runs at PRE_KERNEL_1 and emitted an unconditional
LOG_INF on the init success path. Under the default deferred logging
mode that log captures a timestamp via the system clock, which on
RW612 is not initialized until PRE_KERNEL_2, hanging boot on frdm_rw612
(seen with the lvgl sample). ztest masks it by defaulting to minimal
logging, which takes no timestamp.

Other DMA drivers that log on init success run at POST_KERNEL, after
the clock is up; nxp_gdma is the only one doing so at PRE_KERNEL_1.
Remove the line to avoid the early-boot hang.

Signed-off-by: Jacob Wienecke <jacob.wienecke@nxp.com>
2026-06-18 14:40:22 -04:00
Anas Nashif
ea1fbf3588 driver: fix various typos
Fixed various typos under drivers/

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-06-17 10:12:27 -04:00
Mathieu Choplain
e6738e025c drivers: dma: dmamux_stm32: dispatch operations using the DMA API
The DMAMUX driver used direct calls to functions in the drivers for the
actual DMA controllers... but was doing so using a dispatch table, which
was effectively a duplicate of the existing DMA API.

Use the DMA API directly and drop the handrolled dispatch table, while
also cleaning up the DMA drivers which don't need to export functions
anymore when the DMAMUX driver is enabled.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-06-10 14:56:10 -04:00
Mathieu Choplain
33ed1c41b9 drivers: dma: stm32: v1: interpret burst size parameter correctly
Per DMA API, the `<dir>_burst_length` parameters are number of bytes;
however, the burst size for STM32 DMAv1 is in number of beats per burst,
not in number of bytes (where each "beat" = `<dir>_data_size` bytes).

Update driver to compute burst sizes properly instead of using the raw
`<dir>_burst_length` value as number of beats.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-06-09 13:44:55 +02:00