• Home
  • Raw
  • Download

Lines Matching +full:dma +full:- +full:pool

1 /* SPDX-License-Identifier: GPL-2.0 */
3 /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
4 * Copyright (C) 2019-2020 Linaro Ltd.
12 #include <linux/dma-direction.h>
25 * struct gsi_trans - a GSI transaction
38 * @direction: DMA transfer direction (DMA_NONE for commands)
72 * gsi_trans_pool_init() - Initialize a pool of structures for transactions
74 * @size: Size of elements in the pool
75 * @count: Minimum number of elements in the pool
76 * @max_alloc: Maximum number of elements allocated at a time from pool
80 int gsi_trans_pool_init(struct gsi_trans_pool *pool, size_t size, u32 count,
84 * gsi_trans_pool_alloc() - Allocate one or more elements from a pool
85 * @pool: Pool pointer
86 * @count: Number of elements to allocate from the pool
88 * Return: Virtual address of element(s) allocated from the pool
90 void *gsi_trans_pool_alloc(struct gsi_trans_pool *pool, u32 count);
93 * gsi_trans_pool_exit() - Inverse of gsi_trans_pool_init()
94 * @pool: Pool pointer
96 void gsi_trans_pool_exit(struct gsi_trans_pool *pool);
99 * gsi_trans_pool_init_dma() - Initialize a pool of DMA-able structures
100 * @dev: Device used for DMA
101 * @pool: Pool pointer
102 * @size: Size of elements in the pool
103 * @count: Minimum number of elements in the pool
104 * @max_alloc: Maximum number of elements allocated at a time from pool
108 * Structures in this pool reside in DMA-coherent memory.
110 int gsi_trans_pool_init_dma(struct device *dev, struct gsi_trans_pool *pool,
114 * gsi_trans_pool_alloc_dma() - Allocate an element from a DMA pool
115 * @pool: DMA pool pointer
116 * @addr: DMA address "handle" associated with the allocation
118 * Return: Virtual address of element allocated from the pool
120 * Only one element at a time may be allocated from a DMA pool.
122 void *gsi_trans_pool_alloc_dma(struct gsi_trans_pool *pool, dma_addr_t *addr);
125 * gsi_trans_pool_exit() - Inverse of gsi_trans_pool_init()
126 * @pool: Pool pointer
128 void gsi_trans_pool_exit_dma(struct device *dev, struct gsi_trans_pool *pool);
131 * gsi_channel_trans_alloc() - Allocate a GSI transaction on a channel
135 * @direction: DMA direction for entire SGL (or DMA_NONE)
145 * gsi_trans_free() - Free a previously-allocated GSI transaction
151 * gsi_trans_cmd_add() - Add an immediate command to a transaction
155 * @addr: DMA address for payload
156 * @direction: Direction of DMA transfer (or DMA_NONE if none required)
164 * gsi_trans_page_add() - Add a page transfer to a transaction
174 * gsi_trans_skb_add() - Add a socket transfer to a transaction
178 * Return: 0, or -EMSGSIZE if socket data won't fit in transaction.
183 * gsi_trans_commit() - Commit a GSI transaction
190 * gsi_trans_commit_wait() - Commit a GSI transaction and wait for it
197 * gsi_trans_commit_wait_timeout() - Commit a GSI transaction and wait for
206 * gsi_trans_read_byte() - Issue a single byte read TRE on a channel
209 * @addr: DMA address into which to transfer the one byte
217 * gsi_trans_read_byte_done() - Clean up after a single byte read TRE