xref: /linux/drivers/net/ipa/ipa_uc.h (revision 621cde16e49b3ecf7d59a8106a20aaebfb4a59a9)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 
3 /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
4  * Copyright (C) 2019-2024 Linaro Ltd.
5  */
6 #ifndef _IPA_UC_H_
7 #define _IPA_UC_H_
8 
9 struct ipa;
10 
11 /**
12  * ipa_uc_interrupt_handler() - Handler for microcontroller IPA interrupts
13  * @ipa:	IPA pointer
14  * @irq_id:	IPA interrupt ID
15  */
16 void ipa_uc_interrupt_handler(struct ipa *ipa, enum ipa_irq_id irq_id);
17 
18 /**
19  * ipa_uc_config() - Configure the IPA microcontroller subsystem
20  * @ipa:	IPA pointer
21  */
22 void ipa_uc_config(struct ipa *ipa);
23 
24 /**
25  * ipa_uc_deconfig() - Inverse of ipa_uc_config()
26  * @ipa:	IPA pointer
27  */
28 void ipa_uc_deconfig(struct ipa *ipa);
29 
30 /**
31  * ipa_uc_power() - Take a proxy power reference for the microcontroller
32  * @ipa:	IPA pointer
33  *
34  * The first time the modem boots, it loads firmware for and starts the
35  * IPA-resident microcontroller.  The microcontroller signals that it
36  * has completed its initialization by sending an INIT_COMPLETED response
37  * message to the AP.  The AP must ensure the IPA is powered until
38  * it receives this message, and to do so we take a "proxy" clock
39  * reference on its behalf here.  Once we receive the INIT_COMPLETED
40  * message (in ipa_uc_response_hdlr()) we drop this power reference.
41  */
42 void ipa_uc_power(struct ipa *ipa);
43 
44 /**
45  * ipa_uc_panic_notifier()
46  * @ipa:	IPA pointer
47  *
48  * Notifier function called when the system crashes, to inform the
49  * microcontroller of the event.
50  */
51 void ipa_uc_panic_notifier(struct ipa *ipa);
52 
53 #endif /* _IPA_UC_H_ */
54