atc_prep_dma_cyclic(9)
π atc_prep_dma_cyclic β Kernel API Manual β¨
okay so bestie, this is the one that prepares a cyclic DMA transfer β like, the DMA goes round and round forever, no cap. It's an iconic little function and honestly it's giving main character energy in ./drivers/dma/at_hdmac.c. π¦
πΈ SYNOPSIS πΈ
struct dma_async_tx_descriptor * atc_prep_dma_cyclic (struct dma_chan
*chan , dma_addr_t buf_addr , size_t buf_len , size_t period_len , enum
dma_transfer_direction direction , unsigned long flags );
like, yes, that's the whole signature, copy it exactly bestie, don't be weird about it π
π ARGUMENTS π
chanβ the DMA channel you're prepping. this is your channel, the one you're setting up. π«Άbuf_addrβ the physical DMA address where the buffer starts. physical, bestie, not the virtual one, ok? πbuf_lenβ total number of bytes for the entire buffer. the whole thing. periodt. β¨period_lenβ number of bytes for each period. so like, the buffer gets chopped into periods of this size, iykyk. πdirectionβ transfer direction, to or from device. lowkey self-explanatory but we said it anyway πflagsβ tx descriptor status flags. the flags go here. yes, those flags. β
π SEE ALSO π
k so the source file is ./drivers/dma/at_hdmac.c and honestly there's a whole friend group hanging out with this function, go say hi to all of them:
struct atdma_sg(9)struct at_desc(9)enum atc_status(9)struct at_dma_chan(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_tx_status(9)atc_alloc_chan_resources(9)atc_free_chan_resources(9)at_dma_off(9)
ngl this whole page lives under ./drivers/dma β that's the directory, bestie, go look π
and that's the page!! π slayed, ate, left no crumbs. this iconic piece of documentation is stamped October 2026 and lives at ./drivers/dma, and the page itself is atc_prep_dma_cyclic(9) β mwah, love u, go prep some cyclic DMA ππβ¨
π¦ 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