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