STRUCT SDMA_CHANNEL(9)
π 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, matchesdmaengine 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 thosedevice_2_memorymoments.pc_to_deviceβ script address for thosememory_2_devicemoments.device_to_deviceβ script address for thosedevice_2_devicemoments.pc_to_pcβ script address for thosememory_2_memorymoments.flagsβ loop mode or not.per_addressβ peripheral source or destination address in common case; destination address inp_2_pcase.per_address2β peripheral source address inp_2_pcase.event_mask[2]β event mask used inp_2_pscript.watermark_levelβ value forgReg[7], some script will extend it from basic watermark such asp_2_p.shp_addrβ value forgReg[6].per_addrβ value forgReg[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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms