qcom_q6v5.h 941 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __QCOM_Q6V5_H__
  3. #define __QCOM_Q6V5_H__
  4. #include <linux/kernel.h>
  5. #include <linux/completion.h>
  6. struct rproc;
  7. struct qcom_smem_state;
  8. struct qcom_q6v5 {
  9. struct device *dev;
  10. struct rproc *rproc;
  11. struct qcom_smem_state *state;
  12. unsigned stop_bit;
  13. int wdog_irq;
  14. int fatal_irq;
  15. int ready_irq;
  16. int handover_irq;
  17. int stop_irq;
  18. bool handover_issued;
  19. struct completion start_done;
  20. struct completion stop_done;
  21. int crash_reason;
  22. bool running;
  23. void (*handover)(struct qcom_q6v5 *q6v5);
  24. };
  25. int qcom_q6v5_init(struct qcom_q6v5 *q6v5, struct platform_device *pdev,
  26. struct rproc *rproc, int crash_reason,
  27. void (*handover)(struct qcom_q6v5 *q6v5));
  28. int qcom_q6v5_prepare(struct qcom_q6v5 *q6v5);
  29. int qcom_q6v5_unprepare(struct qcom_q6v5 *q6v5);
  30. int qcom_q6v5_request_stop(struct qcom_q6v5 *q6v5);
  31. int qcom_q6v5_wait_for_start(struct qcom_q6v5 *q6v5, int timeout);
  32. #endif