of_dma_get_range(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ of_dma_get_range(9) β€” the of_dma_get_range manual page, bestie edition ✨

okay so this is a page from the Kernel API Manual (that's the manual name, iykyk πŸ‘‘), and it's literally about grabbing DMA range info and yeeting it into a map array. no cap. let's go πŸ’…


🌸 NAME 🌸

of_dma_get_range β€” get DMA range info and put it into a map array πŸŽ€


✨ SYNOPSIS ✨

int of_dma_get_range (struct device_node *np , const struct
       bus_dma_region **map );

like, that's the whole signature, keep it exactly as-is fr fr 🫢


πŸ’– ARGUMENTS πŸ’–

  • np β€” the device node you want the DMA range info from πŸ’«
  • map β€” the dma range structure that gets returned to you 🎁

πŸ’… DESCRIPTION πŸ’…

so the vibe here is: it looks bottom up for the first "dma-ranges" property and parses it. then it takes all that info and puts it into a DMA offset map array. iconic behavior honestly πŸ’…βœ¨

the dma-ranges format, laid out cutely:

DMA addr (dma_addr)     : naddr cells
CPU addr (phys_addr_t)  : pna cells
size                    : nsize cells

and then β€” important bestie moment 😭 β€”

it returns -ENODEV if the "dma-ranges" property was not found for this device in the DT. so if you get that back, that's why. don't come for me πŸ™ˆ

🌈 SEE ALSO 🌈

all the sibling pages, we stan a connected friend group πŸ«ΆπŸ’œ


okay bestie that's the whole thing, you ate that read πŸ’– this little cutie lives in ./drivers/of and the page is dated October 2026 β€” go forth and parse those ranges, main character πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from