ipa_smp2p.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
  3. * Copyright (C) 2019-2022 Linaro Ltd.
  4. */
  5. #ifndef _IPA_SMP2P_H_
  6. #define _IPA_SMP2P_H_
  7. #include <linux/types.h>
  8. struct platform_device;
  9. struct ipa;
  10. /**
  11. * ipa_smp2p_init() - Initialize the IPA SMP2P subsystem
  12. * @ipa: IPA pointer
  13. * @pdev: Platform device pointer
  14. * @modem_init: Whether the modem is responsible for GSI initialization
  15. *
  16. * Return: 0 if successful, or a negative error code
  17. */
  18. int ipa_smp2p_init(struct ipa *ipa, struct platform_device *pdev,
  19. bool modem_init);
  20. /**
  21. * ipa_smp2p_exit() - Inverse of ipa_smp2p_init()
  22. * @ipa: IPA pointer
  23. */
  24. void ipa_smp2p_exit(struct ipa *ipa);
  25. /**
  26. * ipa_smp2p_irq_disable_setup() - Disable the "setup ready" interrupt
  27. * @ipa: IPA pointer
  28. *
  29. * Disable the "ipa-setup-ready" interrupt from the modem.
  30. */
  31. void ipa_smp2p_irq_disable_setup(struct ipa *ipa);
  32. /**
  33. * ipa_smp2p_notify_reset() - Reset modem notification state
  34. * @ipa: IPA pointer
  35. *
  36. * If the modem crashes it queries the IPA power state. In cleaning
  37. * up after such a crash this is used to reset some state maintained
  38. * for managing this notification.
  39. */
  40. void ipa_smp2p_notify_reset(struct ipa *ipa);
  41. #endif /* _IPA_SMP2P_H_ */