ipa_uc.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
  3. * Copyright (C) 2019-2024 Linaro Ltd.
  4. */
  5. #ifndef _IPA_UC_H_
  6. #define _IPA_UC_H_
  7. struct ipa;
  8. /**
  9. * ipa_uc_interrupt_handler() - Handler for microcontroller IPA interrupts
  10. * @ipa: IPA pointer
  11. * @irq_id: IPA interrupt ID
  12. */
  13. void ipa_uc_interrupt_handler(struct ipa *ipa, enum ipa_irq_id irq_id);
  14. /**
  15. * ipa_uc_config() - Configure the IPA microcontroller subsystem
  16. * @ipa: IPA pointer
  17. */
  18. void ipa_uc_config(struct ipa *ipa);
  19. /**
  20. * ipa_uc_deconfig() - Inverse of ipa_uc_config()
  21. * @ipa: IPA pointer
  22. */
  23. void ipa_uc_deconfig(struct ipa *ipa);
  24. /**
  25. * ipa_uc_power() - Take a proxy power reference for the microcontroller
  26. * @ipa: IPA pointer
  27. *
  28. * The first time the modem boots, it loads firmware for and starts the
  29. * IPA-resident microcontroller. The microcontroller signals that it
  30. * has completed its initialization by sending an INIT_COMPLETED response
  31. * message to the AP. The AP must ensure the IPA is powered until
  32. * it receives this message, and to do so we take a "proxy" clock
  33. * reference on its behalf here. Once we receive the INIT_COMPLETED
  34. * message (in ipa_uc_response_hdlr()) we drop this power reference.
  35. */
  36. void ipa_uc_power(struct ipa *ipa);
  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. #endif /* _IPA_UC_H_ */