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.
6 #ifndef _IPA_GSI_TRANS_H_
7 #define _IPA_GSI_TRANS_H_
9 #include <linux/types.h>
13 struct ipa_gsi_endpoint_data
;
16 * ipa_gsi_trans_complete() - GSI transaction completion callback
17 * @trans: Transaction that has completed
19 * This called from the GSI layer to notify the IPA layer that a
20 * transaction has completed.
22 void ipa_gsi_trans_complete(struct gsi_trans
*trans
);
25 * ipa_gsi_trans_release() - GSI transaction release callback
26 * @trans: Transaction whose resources should be freed
28 * This called from the GSI layer to notify the IPA layer that a
29 * transaction is about to be freed, so any resources associated
30 * with it should be released.
32 void ipa_gsi_trans_release(struct gsi_trans
*trans
);
35 * ipa_gsi_channel_tx_queued() - GSI queued to hardware notification
37 * @channel_id: Channel number
38 * @count: Number of transactions queued
39 * @byte_count: Number of bytes to transfer represented by transactions
41 * This called from the GSI layer to notify the IPA layer that some
42 * number of transactions have been queued to hardware for execution.
44 void ipa_gsi_channel_tx_queued(struct gsi
*gsi
, u32 channel_id
, u32 count
,
48 * ipa_gsi_channel_tx_completed() - GSI transaction completion callback
50 * @channel_id: Channel number
51 * @count: Number of transactions completed since last report
52 * @byte_count: Number of bytes transferred represented by transactions
54 * This called from the GSI layer to notify the IPA layer that the hardware
55 * has reported the completion of some number of transactions.
57 void ipa_gsi_channel_tx_completed(struct gsi
*gsi
, u32 channel_id
, u32 count
,
60 /* ipa_gsi_endpoint_data_empty() - Empty endpoint config data test
61 * @data: endpoint configuration data
63 * Determines whether an endpoint configuration data entry is empty,
64 * meaning it contains no valid configuration information and should
67 * Return: true if empty; false otherwise
69 bool ipa_gsi_endpoint_data_empty(const struct ipa_gsi_endpoint_data
*data
);
71 #endif /* _IPA_GSI_TRANS_H_ */