参照元

説明

引数

返り値

参考

実装

static int rmem_dma_device_init(struct reserved_mem *rmem, struct device *dev)
{
        struct dma_coherent_mem *mem = rmem->priv;
        if (!mem &&
            dma_init_coherent_memory(rmem->base, rmem->base, rmem->size,
                                     DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE,
                                     &mem) != DMA_MEMORY_MAP) {
                pr_err("Reserved memory: failed to init DMA memory pool at %pa, size %ld MiB\n",
                        &rmem->base, (unsigned long)rmem->size / SZ_1M);
                return -ENODEV;
        }
        rmem->priv = mem;
        dma_assign_coherent_memory(dev, mem);
        return 0;
}

コメント


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS