MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / ofw_dma_map_alloc

Function ofw_dma_map_alloc

components/drivers/dma/dma_pool.c:102–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102static void *ofw_dma_map_alloc(struct rt_device *dev, rt_size_t size,
103 rt_ubase_t *dma_handle, rt_ubase_t flags)
104{
105 void *cpu_addr = dma_alloc(dev, size, dma_handle, flags);
106
107 if (cpu_addr && dma_handle)
108 {
109 *dma_handle = ofw_addr_cpu2dma(dev, *dma_handle);
110 }
111
112 return cpu_addr;
113}
114
115static void ofw_dma_map_free(struct rt_device *dev, rt_size_t size,
116 void *cpu_addr, rt_ubase_t dma_handle, rt_ubase_t flags)

Callers

nothing calls this directly

Calls 2

dma_allocFunction · 0.85
ofw_addr_cpu2dmaFunction · 0.85

Tested by

no test coverage detected