Alex Elder | a646d6e | 2020-03-05 22:28:27 -0600 | [diff] [blame] | 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 | /** |
Alex Elder | dc8f7e3 | 2021-07-26 15:11:35 -0500 | [diff] [blame] | 12 | * ipa_uc_config() - Configure the IPA microcontroller subsystem |
Alex Elder | a646d6e | 2020-03-05 22:28:27 -0600 | [diff] [blame] | 13 | * @ipa: IPA pointer |
| 14 | */ |
Alex Elder | dc8f7e3 | 2021-07-26 15:11:35 -0500 | [diff] [blame] | 15 | void ipa_uc_config(struct ipa *ipa); |
Alex Elder | a646d6e | 2020-03-05 22:28:27 -0600 | [diff] [blame] | 16 | |
| 17 | /** |
Alex Elder | dc8f7e3 | 2021-07-26 15:11:35 -0500 | [diff] [blame] | 18 | * ipa_uc_deconfig() - Inverse of ipa_uc_config() |
Alex Elder | a646d6e | 2020-03-05 22:28:27 -0600 | [diff] [blame] | 19 | * @ipa: IPA pointer |
| 20 | */ |
Alex Elder | dc8f7e3 | 2021-07-26 15:11:35 -0500 | [diff] [blame] | 21 | void ipa_uc_deconfig(struct ipa *ipa); |
Alex Elder | a646d6e | 2020-03-05 22:28:27 -0600 | [diff] [blame] | 22 | |
| 23 | /** |
Alex Elder | 7aa0e8b | 2021-08-20 11:01:28 -0500 | [diff] [blame] | 24 | * ipa_uc_power() - Take a proxy power reference for the microcontroller |
Alex Elder | e2f154e | 2021-07-26 15:11:36 -0500 | [diff] [blame] | 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 |
Alex Elder | 7aa0e8b | 2021-08-20 11:01:28 -0500 | [diff] [blame] | 30 | * message to the AP. The AP must ensure the IPA is powered until |
| 31 | * it receives this message, and to do so we take a "proxy" clock |
Alex Elder | e2f154e | 2021-07-26 15:11:36 -0500 | [diff] [blame] | 32 | * reference on its behalf here. Once we receive the INIT_COMPLETED |
Alex Elder | 7aa0e8b | 2021-08-20 11:01:28 -0500 | [diff] [blame] | 33 | * message (in ipa_uc_response_hdlr()) we drop this power reference. |
Alex Elder | e2f154e | 2021-07-26 15:11:36 -0500 | [diff] [blame] | 34 | */ |
Alex Elder | 7aa0e8b | 2021-08-20 11:01:28 -0500 | [diff] [blame] | 35 | void ipa_uc_power(struct ipa *ipa); |
Alex Elder | e2f154e | 2021-07-26 15:11:36 -0500 | [diff] [blame] | 36 | |
| 37 | /** |
Alex Elder | a646d6e | 2020-03-05 22:28:27 -0600 | [diff] [blame] | 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_ */ |