|
| 1 | +/* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | + |
| 3 | +/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. |
| 4 | + * Copyright (C) 2019-2020 Linaro Ltd. |
| 5 | + */ |
| 6 | +#ifndef _IPA_GSI_TRANS_H_ |
| 7 | +#define _IPA_GSI_TRANS_H_ |
| 8 | + |
| 9 | +#include <linux/types.h> |
| 10 | + |
| 11 | +struct gsi_trans; |
| 12 | + |
| 13 | +/** |
| 14 | + * ipa_gsi_trans_complete() - GSI transaction completion callback |
| 15 | + * @trans: Transaction that has completed |
| 16 | + * |
| 17 | + * This called from the GSI layer to notify the IPA layer that a |
| 18 | + * transaction has completed. |
| 19 | + */ |
| 20 | +void ipa_gsi_trans_complete(struct gsi_trans *trans); |
| 21 | + |
| 22 | +/** |
| 23 | + * ipa_gsi_trans_release() - GSI transaction release callback |
| 24 | + * @trans: Transaction whose resources should be freed |
| 25 | + * |
| 26 | + * This called from the GSI layer to notify the IPA layer that a |
| 27 | + * transaction is about to be freed, so any resources associated |
| 28 | + * with it should be released. |
| 29 | + */ |
| 30 | +void ipa_gsi_trans_release(struct gsi_trans *trans); |
| 31 | + |
| 32 | +/** |
| 33 | + * ipa_gsi_channel_tx_queued() - GSI queued to hardware notification |
| 34 | + * @gsi: GSI pointer |
| 35 | + * @channel_id: Channel number |
| 36 | + * @count: Number of transactions queued |
| 37 | + * @byte_count: Number of bytes to transfer represented by transactions |
| 38 | + * |
| 39 | + * This called from the GSI layer to notify the IPA layer that some |
| 40 | + * number of transactions have been queued to hardware for execution. |
| 41 | + */ |
| 42 | +void ipa_gsi_channel_tx_queued(struct gsi *gsi, u32 channel_id, u32 count, |
| 43 | + u32 byte_count); |
| 44 | +/** |
| 45 | + * ipa_gsi_trans_complete() - GSI transaction completion callback |
| 46 | +ipa_gsi_channel_tx_completed() |
| 47 | + * @gsi: GSI pointer |
| 48 | + * @channel_id: Channel number |
| 49 | + * @count: Number of transactions completed since last report |
| 50 | + * @byte_count: Number of bytes transferred represented by transactions |
| 51 | + * |
| 52 | + * This called from the GSI layer to notify the IPA layer that the hardware |
| 53 | + * has reported the completion of some number of transactions. |
| 54 | + */ |
| 55 | +void ipa_gsi_channel_tx_completed(struct gsi *gsi, u32 channel_id, u32 count, |
| 56 | + u32 byte_count); |
| 57 | + |
| 58 | +bool ipa_gsi_endpoint_data_empty(const struct ipa_gsi_endpoint_data *data); |
| 59 | + |
| 60 | +#endif /* _IPA_GSI_TRANS_H_ */ |
0 commit comments