STRUCT MTK_HSDMA_DEVICE(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐Ÿฆ‹ 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 for struct 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