STRUCT AT_DMA_CHAN(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct at_dma_chan(9) β€” the kernel API manual, but make it cute

okay so bestie, this is the page for struct at_dma_chan β€” literally the internal representation of an Atmel HDMAC channel. like, the behind-the-scenes glow-up of one single DMA channel. no cap, it's giving "private backstage pass" energy πŸŽ€


✨ SYNOPSIS ✨

here's the whole struct, verbatim, don't touch a character of it 🫢

struct at_dma_chan {
    struct virt_dma_chan    vc;
    struct at_dma           *atdma;
    void __iomem            *ch_regs;
    u8 mask;
    u8 per_if;
    u8 mem_if;
    unsigned long           status;
    u32 save_cfg;
    u32 save_dscr;
    struct dma_slave_config dma_sconfig;
    struct at_desc          *desc;
 };

🌸 Members 🌸

  • vc β€” the virtual dma channel entry. that's her main character moment in the virt-dma world πŸ’«
  • atdma β€” pointer to the driver data. like, who she really belongs to 😌
  • ch_regs β€” memory mapped register base. the actual address where the hardware lives, iconic
  • mask β€” channel index in a mask. tiny but important, she's a bitmask girlie
  • per_if β€” peripheral interface
  • mem_if β€” memory interface
  • status β€” transmit status information from irq/prep* functions to tasklet β€” and listen, use atomic operations on this one fr fr, it's not a vibe to just write it willy-nilly πŸ’€
  • save_cfg β€” configuration register that is saved on suspend/resume cycle. she gets packed up and unpacked, cozy πŸŽ€
  • save_dscr β€” for cyclic operations, preserve next descriptor address in the cyclic list on suspend/resume cycle. lowkey the "bookmark" of the cyclic list πŸ”–
  • dma_sconfig β€” configuration for slave transfers, passed via .device_config. this is how the settings get handed over ✨
  • desc β€” pointer to the atmel dma descriptor. her plus-one 🫢

πŸ¦‹ SEE ALSO πŸ¦‹

all the linked lore, and yes, you're gonna want to read it all, bestie:

Kernel file ./drivers/dma/at_hdmac.c β€” then struct atdma_sg(9), struct at_desc(9), enum atc_status(9), struct at_dma(9), atc_chan_is_enabled(9), atc_chan_is_paused(9), atc_chan_is_cyclic(9), set_lli_eol(9), struct at_dma_platform_data(9), struct at_dma_slave(9), atc_dostart(9), atc_calc_bytes_left(9), atc_get_llis_residue(9), atc_get_residue(9), atc_handle_error(9), atc_prep_dma_interleaved(9), atc_prep_dma_memcpy(9), atc_prep_dma_memset(9), atc_prep_slave_sg(9), atc_prep_dma_cyclic(9), atc_tx_status(9), atc_alloc_chan_resources(9), atc_free_chan_resources(9), at_dma_off(9)

and that's the whole page, periodt πŸ’…

okay and for the sign-off: this one lives over in ./drivers/dma, it's dated October 2026, and the whole thing is filed under struct at_dma_chan(9) β€” slay, go read the next one, ily πŸ§šπŸ’–

πŸ“¦ where this page comes from