STRUCT DW_DMA_PLATFORM_DATA(9)
π NAME π
struct dw_dma_platform_data β the controller configuration parameters bestie, that's literally the whole vibe β¨
okay so quick note before we dive in: this page lives in the Kernel API Manual, and it's all about this one struct that holds every knob your DW DMA controller cares about. buckle up π
β¨ SYNOPSIS β¨
here's the whole struct, no cap, every field exactly as it is:
struct dw_dma_platform_data {
u32 nr_masters;
u32 nr_channels;
#define CHAN_ALLOCATION_ASCENDING 0 ;
#define CHAN_ALLOCATION_DESCENDING 1 ;
u32 chan_allocation_order;
#define CHAN_PRIORITY_ASCENDING 0 ;
#define CHAN_PRIORITY_DESCENDING 1 ;
u32 chan_priority;
u32 block_size;
u32 data_width[DW_DMA_MAX_NR_MASTERS];
u32 multi_block[DW_DMA_MAX_NR_CHANNELS];
u32 max_burst[DW_DMA_MAX_NR_CHANNELS];
#define CHAN_PROTCTL_PRIVILEGED BIT(0);
#define CHAN_PROTCTL_BUFFERABLE BIT(1);
#define CHAN_PROTCTL_CACHEABLE BIT(2);
#define CHAN_PROTCTL_MASK GENMASK(2, 0);
u32 protctl;
#define DW_DMA_QUIRK_XBAR_PRESENT BIT(0);
u32 quirks;
};
like, iconic. the #defines are just chillin' inside the struct body, that's the house style π
π«Ά Members π«Ά
let me walk you through each one, bestie, one at a time π¦
nr_mastersβ how many AHB masters the controller supports. that's it, that's the number πnr_channelsβ how many channels the hardware actually supports (max 8, so don't get greedy β)chan_allocation_orderβ whether we allocate channels starting from 0 or from 7. fr fr, that's the whole choice πΈchan_priorityβ sets the channel priority as increasing from 0 to 7, or from 7 to 0. pick your direction, gorl πblock_sizeβ the maximum block size the controller can handle πdata_widthβ the max data width the hardware supports per AHB master. units are bytes, and it's gotta be a power of 2, okurrr β¨multi_blockβ multi block transfers supported by hardware, per channel. one entry per channel, lowkey organized ποΈmax_burstβ the maximum value of burst transaction size the hardware supports per channel, measured in units ofCTL.SRC_TR_WIDTH/CTL.DST_TR_WIDTH. yes, exactly that, iykyk π₯protctlβ the protection control signals setting, per channel π‘οΈquirksβ optional platform quirks. the little extra-flavor bits π
π SEE ALSO π
- the kernel file
./include/linux/platform_data/dma-dw.hβ go read it, it's right there π struct dw_dma_slave(9)β the related struct, give it a vibe check too π§
and that's the page, bestie!! π this one came from ./include/linux/platform_data, dated October 2026, and it's literally the struct dw_dma_platform_data(9) page β π mwah, go configure some controllers π
π¦ 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