STRUCT SDMA_CHANNEL(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct sdma_channel(9) πŸ’–

okay so bestie, this is straight from the Kernel API Manual, and it's the housekeeping struct for a SDMA channel. no cap, it's giving β€œtiny control room for one DMA channel” energy 🫢✨


✨ NAME ✨

struct sdma_channel β€” housekeeping for a SDMA channel.


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the whole struct, copied exactly so you can trust the vibe πŸ’…

       struct sdma_channel {
           struct virt_dma_chan            vc;
           struct sdma_desc                *desc;
           struct sdma_engine              *sdma;
           unsigned int                    channel;
           enum dma_transfer_direction             direction;
           struct dma_slave_config         slave_config;
           enum sdma_peripheral_type       peripheral_type;
           unsigned int                    event_id0;
           unsigned int                    event_id1;
           enum dma_slave_buswidth         word_size;
           unsigned int                    pc_from_device, pc_to_device;
           unsigned int                    device_to_device;
           unsigned int                    pc_to_pc;
           unsigned long                   flags;
           dma_addr_t per_address, per_address2;
           unsigned long                   event_mask[2];
           unsigned long                   watermark_level;
           u32 shp_addr, per_addr;
           enum dma_status                 status;
           struct imx_dma_data             data;
           struct work_struct              terminate_worker;
           struct list_head                terminated;
           bool is_ram_script;
           unsigned int                    n_fifos_src;
           unsigned int                    n_fifos_dst;
           unsigned int                    stride_fifos_src;
           unsigned int                    stride_fifos_dst;
           unsigned int                    words_per_fifo;
           bool sw_done;
        };

πŸŽ€ Members πŸŽ€

  • vc β€” virt_dma base structure. the foundation, bestie πŸ’–
  • desc β€” sdma description including vd and other special member.
  • sdma β€” pointer to the SDMA engine for this channel.
  • channel β€” the channel number, matches dmaengine chan_id + 1.
  • direction β€” transfer type. Needed for setting SDMA script.
  • slave_config β€” Slave configuration.
  • peripheral_type β€” Peripheral type. Needed for setting SDMA script.
  • event_id0 β€” aka dma request line.
  • event_id1 β€” for channels that use 2 events.
  • word_size β€” peripheral access size.
  • pc_from_device β€” script address for those device_2_memory moments.
  • pc_to_device β€” script address for those memory_2_device moments.
  • device_to_device β€” script address for those device_2_device moments.
  • pc_to_pc β€” script address for those memory_2_memory moments.
  • flags β€” loop mode or not.
  • per_address β€” peripheral source or destination address in common case; destination address in p_2_p case.
  • per_address2 β€” peripheral source address in p_2_p case.
  • event_mask[2] β€” event mask used in p_2_p script.
  • watermark_level β€” value for gReg[7], some script will extend it from basic watermark such as p_2_p.
  • shp_addr β€” value for gReg[6].
  • per_addr β€” value for gReg[2].
  • status β€” status of dma channel.
  • data β€” specific sdma interface structure.
  • terminate_worker β€” used to call back into terminate work function.
  • terminated β€” terminated list.
  • is_ram_script β€” flag for script in ram.
  • n_fifos_src β€” number of source device fifos.
  • n_fifos_dst β€” number of destination device fifos.
  • stride_fifos_src β€” stride for source device FIFOs.
  • stride_fifos_dst β€” stride for destination device FIFOs.
  • words_per_fifo β€” copy number of words one time for one FIFO.
  • sw_done β€” software done flag.

🌈 SEE ALSO 🌈

Kernel file ./drivers/dma/imx-sdma.c β€” and the whole friend group: struct sdma_channel_control(9), struct sdma_state_registers(9), struct sdma_context_data(9), struct sdma_desc(9), struct sdma_firmware_header(9). iykyk πŸ’…


xoxo, bestie πŸ’– this page's source/version is ./drivers/dma, dated October 2026. πŸŽ€β­

πŸ“¦ where this page comes from