Name

of_dma_get_range — Get DMA range info

Synopsis

int of_dma_get_range (struct device_node * np,
 u64 * dma_addr,
 u64 * paddr,
 u64 * size);
 

Arguments

np

Device node to get DMA range info

dma_addr

Pointer used to return initial DMA address of DMA range

paddr

Pointer used to return initial CPU address of DMA range

size

Pointer used to return size of DMA range

Description

Look in bottom up direction for the first dma-ranges property and parse it.

dma-ranges format:

DMA addr (dma_addr) : naddr cells

CPU addr (phys_addr_t) : pna cells

size

nsize cells

Return

0 on success, -ENODEV if dma-ranges property was not found, and -EINVAL if unable to translate the DMA address.