Lines Matching +full:enable +full:- +full:gsi +full:- +full:dma
1 /* SPDX-License-Identifier: GPL-2.0 */
3 /* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
4 * Copyright (C) 2018-2024 Linaro Ltd.
26 struct gsi;
51 * but taken from a fixed-size pool. The number of elements required for
68 dma_addr_t addr; /* DMA address if DMA pool (or 0) */
81 struct gsi_trans **map; /* TRE -> transaction map */
84 struct gsi_trans_pool cmd_pool; /* command payload DMA pool */
94 GSI_CHANNEL_STATE_FLOW_CONTROLLED = 0x5, /* IPA v4.2-v4.9 */
100 struct gsi *gsi; member
136 struct gsi { struct
147 u32 type_enabled_bitmap; /* GSI IRQ types enabled */
150 struct completion completion; /* Signals GSI command completion */
158 * gsi_setup() - Set up the GSI subsystem
159 * @gsi: Address of GSI structure embedded in an IPA structure argument
163 * Performs initialization that must wait until the GSI hardware is
166 int gsi_setup(struct gsi *gsi);
169 * gsi_teardown() - Tear down GSI subsystem
170 * @gsi: GSI address previously passed to a successful gsi_setup() call
172 void gsi_teardown(struct gsi *gsi);
175 * gsi_channel_tre_max() - Channel maximum number of in-flight TREs
176 * @gsi: GSI pointer
181 u32 gsi_channel_tre_max(struct gsi *gsi, u32 channel_id);
184 * gsi_channel_start() - Start an allocated GSI channel
185 * @gsi: GSI pointer
190 int gsi_channel_start(struct gsi *gsi, u32 channel_id);
193 * gsi_channel_stop() - Stop a started GSI channel
194 * @gsi: GSI pointer returned by gsi_setup()
199 int gsi_channel_stop(struct gsi *gsi, u32 channel_id);
202 * gsi_modem_channel_flow_control() - Set channel flow control state (IPA v4.2+)
203 * @gsi: GSI pointer returned by gsi_setup()
205 * @enable: Whether to enable flow control (i.e., prevent flow)
207 void gsi_modem_channel_flow_control(struct gsi *gsi, u32 channel_id,
208 bool enable);
211 * gsi_channel_reset() - Reset an allocated GSI channel
212 * @gsi: GSI pointer
214 * @doorbell: Whether to (possibly) enable the doorbell engine
219 * GSI hardware relinquishes ownership of all pending receive buffer
222 void gsi_channel_reset(struct gsi *gsi, u32 channel_id, bool doorbell);
225 * gsi_suspend() - Prepare the GSI subsystem for suspend
226 * @gsi: GSI pointer
228 void gsi_suspend(struct gsi *gsi);
231 * gsi_resume() - Resume the GSI subsystem following suspend
232 * @gsi: GSI pointer
234 void gsi_resume(struct gsi *gsi);
237 * gsi_channel_suspend() - Suspend a GSI channel
238 * @gsi: GSI pointer
243 int gsi_channel_suspend(struct gsi *gsi, u32 channel_id);
246 * gsi_channel_resume() - Resume a suspended GSI channel
247 * @gsi: GSI pointer
252 int gsi_channel_resume(struct gsi *gsi, u32 channel_id);
255 * gsi_init() - Initialize the GSI subsystem
256 * @gsi: Address of GSI structure embedded in an IPA structure
258 * @version: IPA hardware version (implies GSI version)
264 * Early stage initialization of the GSI subsystem, performing tasks
265 * that can be done before the GSI hardware is ready to use.
267 int gsi_init(struct gsi *gsi, struct platform_device *pdev,
272 * gsi_exit() - Exit the GSI subsystem
273 * @gsi: GSI address previously passed to a successful gsi_init() call
275 void gsi_exit(struct gsi *gsi);