xref: /openbmc/linux/drivers/net/ipa/ipa_smp2p.h (revision 5b448065)
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_SMP2P_H_
7 #define _IPA_SMP2P_H_
8 
9 #include <linux/types.h>
10 
11 struct ipa;
12 
13 /**
14  * ipa_smp2p_init() - Initialize the IPA SMP2P subsystem
15  * @ipa:	IPA pointer
16  * @modem_init:	Whether the modem is responsible for GSI initialization
17  *
18  * Return:	0 if successful, or a negative error code
19  *
20  */
21 int ipa_smp2p_init(struct ipa *ipa, bool modem_init);
22 
23 /**
24  * ipa_smp2p_exit() - Inverse of ipa_smp2p_init()
25  * @ipa:	IPA pointer
26  */
27 void ipa_smp2p_exit(struct ipa *ipa);
28 
29 /**
30  * ipa_smp2p_disable() - Prevent "ipa-setup-ready" interrupt handling
31  * @ipa:	IPA pointer
32  *
33  * Prevent handling of the "setup ready" interrupt from the modem.
34  * This is used before initiating shutdown of the driver.
35  */
36 void ipa_smp2p_disable(struct ipa *ipa);
37 
38 /**
39  * ipa_smp2p_notify_reset() - Reset modem notification state
40  * @ipa:	IPA pointer
41  *
42  * If the modem crashes it queries the IPA clock state.  In cleaning
43  * up after such a crash this is used to reset some state maintained
44  * for managing this notification.
45  */
46 void ipa_smp2p_notify_reset(struct ipa *ipa);
47 
48 #endif /* _IPA_SMP2P_H_ */
49