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_UC_H_ 7 #define _IPA_UC_H_ 8 9 struct ipa; 10 11 /** 12 * ipa_uc_config() - Configure the IPA microcontroller subsystem 13 * @ipa: IPA pointer 14 */ 15 void ipa_uc_config(struct ipa *ipa); 16 17 /** 18 * ipa_uc_deconfig() - Inverse of ipa_uc_config() 19 * @ipa: IPA pointer 20 */ 21 void ipa_uc_deconfig(struct ipa *ipa); 22 23 /** 24 * ipa_uc_clock() - Take a proxy clock reference for the microcontroller 25 * @ipa: IPA pointer 26 * 27 * The first time the modem boots, it loads firmware for and starts the 28 * IPA-resident microcontroller. The microcontroller signals that it 29 * has completed its initialization by sending an INIT_COMPLETED response 30 * message to the AP. The AP must ensure the IPA core clock is operating 31 * until it receives this message, and to do so we take a "proxy" clock 32 * reference on its behalf here. Once we receive the INIT_COMPLETED 33 * message (in ipa_uc_response_hdlr()) we drop this clock reference. 34 */ 35 void ipa_uc_clock(struct ipa *ipa); 36 37 /** 38 * ipa_uc_panic_notifier() 39 * @ipa: IPA pointer 40 * 41 * Notifier function called when the system crashes, to inform the 42 * microcontroller of the event. 43 */ 44 void ipa_uc_panic_notifier(struct ipa *ipa); 45 46 #endif /* _IPA_UC_H_ */ 47