STRUCT MTK_HSDMA_DEVICE(9)
๐ฆ struct mtk_hsdma_device(9) โ the Kernel API Manual glow-up โจ
okay bestie, so we're in the Kernel API Manual and today's main character is struct mtk_hsdma_device(9). buckle up, this one's a struct, and it's literally the whole vibe of an HSDMA device. ๐
โจ NAME โจ
struct mtk_hsdma_device โ this is the struct that holds all the info describing an HSDMA device. it's giving "one struct to hold them all" and honestly? iconic. ๐
๐ธ SYNOPSIS ๐ธ
like, here's the whole thing, verbatim, no cap:
struct mtk_hsdma_device {
struct dma_device ddev;
void __iomem *base;
struct clk *clk;
u32 irq;
u32 dma_requests;
struct mtk_hsdma_vchan *vc;
struct mtk_hsdma_pchan *pc;
refcount_t pc_refcnt;
spinlock_t lock;
const struct mtk_hsdma_soc *soc;
};
๐ Members ๐
okay so let's go member by member, iykyk:
ddevโ an instance forstruct dma_device. the DMA-side rep, fr fr.baseโ the mapped register I/O base. where the registers live. ๐clkโ the clock that the device internals are using. gotta keep that heartbeat going โฐirqโ the IRQ that the device is using. it will interrupt you, and that's the point ๐dma_requestsโ the number of VCs the device supports. count 'em ๐งฎvcโ the pointer to all the available VCs. all of them, together, squad goals ๐ซถpcโ the pointer to the underlying PC. the one holding it down underneath ๐pc_refcntโ tracks how many VCs are using the PC. a whole refcount just keeping score ๐ญlockโ lock protecting against multiple VCs accessing the PC. one at a time, bestie, we don't do chaos here ๐socโ the pointer to the area holding the differences among the various platforms. every platform's little quirks, filed neatly โญ
๐ฆ SEE ALSO ๐ฆ
kernel file ./drivers/dma/mediatek/mtk-hsdma.c, and the whole friend group:
struct mtk_hsdma_pdesc(9)struct mtk_hsdma_vdesc(9)struct mtk_hsdma_cb(9)struct mtk_hsdma_ring(9)struct mtk_hsdma_pchan(9)struct mtk_hsdma_vchan(9)struct mtk_hsdma_soc(9)
go read them, they're all slay, no notes ๐
that's the whole page, bestie!! brought to you by ./drivers/dma/mediatek, the October 2026 edition, and the letter struct mtk_hsdma_device(9) โ mwah, bye! ๐
โจ
๐ฆ 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