STRUCT DMA_SLAVE_CONFIG(9)
π struct dma_slave_config(9) π
okay bestie, welcome to the Kernel API Manual! this is the entry for struct dma_slave_config(9), and it is literally the runtime config for a DMA slave channel. no cap, itβs giving βletβs set up this channel at runtimeβ energy π¦
π NAME π
struct dma_slave_config β dma slave channel runtime config. thatβs the name, thatβs the vibe, and we are obsessed with how specific it is π
β¨ SYNOPSIS β¨
struct dma_slave_config {
enum dma_transfer_direction direction;
phys_addr_t src_addr;
phys_addr_t dst_addr;
enum dma_slave_buswidth src_addr_width;
enum dma_slave_buswidth dst_addr_width;
u32 src_maxburst;
u32 dst_maxburst;
u32 src_port_window_size;
u32 dst_port_window_size;
bool device_fc;
void *peripheral_config;
size_t peripheral_size;
};
π¦ Members π¦
directionβ whether the data shall go in or out on this slave channel, right now.DMA_MEM_TO_DEVandDMA_DEV_TO_MEMare legal values. DEPRECATED, drivers should use thedirectionargument to thedevice_prep_slave_sganddevice_prep_dma_cyclicfunctions or thedirfield in thedma_interleaved_templatestructure. not me putting deprecated fields on blast but πsrc_addrβ this is the physical address where DMA slave data should be read (RX), if the source is memory this argument is ignored. RX girlies rise πdst_addrβ this is the physical address where DMA slave data should be written (TX), if the destination is memory this argument is ignored. TX transmission moment β¨src_addr_widthβ this is the width in bytes of the source (RX) register where DMA data shall be read. If the source is memory this may be ignored depending on architecture. Legal values:1,2,3,4,8,16,32,64,128. bytes bestie, bytes πdst_addr_widthβ same assrc_addr_widthbut for destination target (TX) mutatis mutandis. same energy, different direction πsrc_maxburstβ the maximum number of words (note: words, as in units of thesrc_addr_widthmember, not bytes) that can be sent in one burst to the device. Typically something like half the FIFO depth on I/O peripherals so you donβt overflow it. This may or may not be applicable on memory sources. do not overflow the FIFO, thatβs the whole assignment π«Άdst_maxburstβ same assrc_maxburstbut for destination target mutatis mutandis. destination burst, same rules πsrc_port_window_sizeβ The length of the register area in words the data need to be accessed on the device side. It is only used for devices which is using an area instead of a single register to receive the data. Typically the DMA loops in this area in order to transfer the data. register area loop-de-loop πdst_port_window_sizeβ same assrc_port_window_sizebut for the destination port. destination port window, slay πΈdevice_fcβ Flow Controller Settings. Only valid for slave channels. Fill with'true'if peripheral should be flow controller. Direction will be selected at Runtime. flow controller era πperipheral_configβ peripheral configuration for programming peripheral fordmaenginetransfer. peripheral programming bestie πperipheral_sizeβ peripheral configuration buffer size. buffer size check π
πΈ Description πΈ
This struct is passed in as configuration data to a DMA engine in order to set up a certain channel for DMA transport at runtime. The DMA device/engine has to provide support for an additional callback in the dma_device structure, device_config and this struct will then be passed in as an argument to the function. thatβs the whole runtime setup moment β¨
The rationale for adding configuration information to this struct is as follows: if it is likely that more than one DMA slave controllers in the world will support the configuration option, then make it generic. If not: if it is fixed so that it be sent in static from the platform data, then prefer to do that. generic if multiple controllers might support it; static platform data if itβs fixed β iykyk π¦
π₯ SEE ALSO π₯
Kernel file ./include/linux/dmaengine.h β and literally the whole extended universe, bestie: dma_cookie_t(9), enum dma_status(9), enum dma_transaction_type(9), enum dma_transfer_direction(9), struct data_chunk(9), struct dma_interleaved_template(9), struct dma_vec(9), enum dma_ctrl_flags(9), enum sum_check_bits(9), enum sum_check_flags(9), enum dma_desc_metadata_mode(9), struct dma_chan_percpu(9), struct dma_router(9), struct dma_chan(9), struct dma_chan_dev(9), enum dma_slave_buswidth(9), enum dma_residue_granularity(9), struct dma_slave_caps(9), dma_filter_fn(9), struct dma_async_tx_descriptor(9), struct dma_tx_state(9), enum dmaengine_alignment(9), struct dma_slave_map(9), struct dma_filter(9), struct dma_device(9), dmaengine_prep_peripheral_dma_vec(9), dmaengine_prep_config_sg_safe(9), dmaengine_prep_config_single_safe(9), dmaengine_prep_dma_memset(9), dmaengine_terminate_all(9), dmaengine_terminate_async(9), dmaengine_synchronize(9), dmaengine_terminate_sync(9), dma_async_issue_pending(9), dma_async_is_tx_complete(9), dma_async_is_complete(9).
mwah π this page is brought to you by the Kernel API Manual, source/version ./include/linux, dated October 2026 β go set up that channel at runtime, bestie! π«Άβ¨
π¦ 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