k3-cppi-desc-pool.h (1017B)
1/* SPDX-License-Identifier: GPL-2.0 */ 2/* TI K3 CPPI5 descriptors pool 3 * 4 * Copyright (C) 2020 Texas Instruments Incorporated - http://www.ti.com 5 */ 6 7#ifndef K3_CPPI_DESC_POOL_H_ 8#define K3_CPPI_DESC_POOL_H_ 9 10#include <linux/device.h> 11#include <linux/types.h> 12 13struct k3_cppi_desc_pool; 14 15void k3_cppi_desc_pool_destroy(struct k3_cppi_desc_pool *pool); 16struct k3_cppi_desc_pool * 17k3_cppi_desc_pool_create_name(struct device *dev, size_t size, 18 size_t desc_size, 19 const char *name); 20#define k3_cppi_desc_pool_create(dev, size, desc_size) \ 21 k3_cppi_desc_pool_create_name(dev, size, desc_size, NULL) 22dma_addr_t 23k3_cppi_desc_pool_virt2dma(struct k3_cppi_desc_pool *pool, void *addr); 24void * 25k3_cppi_desc_pool_dma2virt(struct k3_cppi_desc_pool *pool, dma_addr_t dma); 26void *k3_cppi_desc_pool_alloc(struct k3_cppi_desc_pool *pool); 27void k3_cppi_desc_pool_free(struct k3_cppi_desc_pool *pool, void *addr); 28size_t k3_cppi_desc_pool_avail(struct k3_cppi_desc_pool *pool); 29 30#endif /* K3_CPPI_DESC_POOL_H_ */