Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 
0003 /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
0004  * Copyright (C) 2019-2020 Linaro Ltd.
0005  */
0006 #ifndef _IPA_GSI_TRANS_H_
0007 #define _IPA_GSI_TRANS_H_
0008 
0009 #include <linux/types.h>
0010 
0011 struct gsi;
0012 struct gsi_trans;
0013 struct ipa_gsi_endpoint_data;
0014 
0015 /**
0016  * ipa_gsi_trans_complete() - GSI transaction completion callback
0017  * @trans:  Transaction that has completed
0018  *
0019  * This called from the GSI layer to notify the IPA layer that a
0020  * transaction has completed.
0021  */
0022 void ipa_gsi_trans_complete(struct gsi_trans *trans);
0023 
0024 /**
0025  * ipa_gsi_trans_release() - GSI transaction release callback
0026  * @trans:  Transaction whose resources should be freed
0027  *
0028  * This called from the GSI layer to notify the IPA layer that a
0029  * transaction is about to be freed, so any resources associated
0030  * with it should be released.
0031  */
0032 void ipa_gsi_trans_release(struct gsi_trans *trans);
0033 
0034 /**
0035  * ipa_gsi_channel_tx_queued() - GSI queued to hardware notification
0036  * @gsi:    GSI pointer
0037  * @channel_id: Channel number
0038  * @count:  Number of transactions queued
0039  * @byte_count: Number of bytes to transfer represented by transactions
0040  *
0041  * This called from the GSI layer to notify the IPA layer that some
0042  * number of transactions have been queued to hardware for execution.
0043  */
0044 void ipa_gsi_channel_tx_queued(struct gsi *gsi, u32 channel_id, u32 count,
0045                    u32 byte_count);
0046 
0047 /**
0048  * ipa_gsi_channel_tx_completed() - GSI transaction completion callback
0049  * @gsi:    GSI pointer
0050  * @channel_id: Channel number
0051  * @count:  Number of transactions completed since last report
0052  * @byte_count: Number of bytes transferred represented by transactions
0053  *
0054  * This called from the GSI layer to notify the IPA layer that the hardware
0055  * has reported the completion of some number of transactions.
0056  */
0057 void ipa_gsi_channel_tx_completed(struct gsi *gsi, u32 channel_id, u32 count,
0058                   u32 byte_count);
0059 
0060 /* ipa_gsi_endpoint_data_empty() - Empty endpoint config data test
0061  * @data:   endpoint configuration data
0062  *
0063  * Determines whether an endpoint configuration data entry is empty,
0064  * meaning it contains no valid configuration information and should
0065  * be ignored.
0066  *
0067  * Return:  true if empty; false otherwise
0068  */
0069 bool ipa_gsi_endpoint_data_empty(const struct ipa_gsi_endpoint_data *data);
0070 
0071 #endif /* _IPA_GSI_TRANS_H_ */