qcom_q6v5.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. #include <linux/soc/qcom/qcom_aoss.h>
  7. struct icc_path;
  8. struct rproc;
  9. struct qcom_smem_state;
  10. struct qcom_sysmon;
  11. struct qcom_q6v5 {
  12. struct device *dev;
  13. struct rproc *rproc;
  14. struct qcom_smem_state *state;
  15. struct qmp *qmp;
  16. struct icc_path *path;
  17. unsigned stop_bit;
  18. int wdog_irq;
  19. int fatal_irq;
  20. int ready_irq;
  21. int handover_irq;
  22. int stop_irq;
  23. bool handover_issued;
  24. struct completion start_done;
  25. struct completion stop_done;
  26. int crash_reason;
  27. bool running;
  28. const char *load_state;
  29. void (*handover)(struct qcom_q6v5 *q6v5);
  30. };
  31. int qcom_q6v5_init(struct qcom_q6v5 *q6v5, struct platform_device *pdev,
  32. struct rproc *rproc, int crash_reason, const char *load_state,
  33. void (*handover)(struct qcom_q6v5 *q6v5));
  34. void qcom_q6v5_deinit(struct qcom_q6v5 *q6v5);
  35. int qcom_q6v5_prepare(struct qcom_q6v5 *q6v5);
  36. int qcom_q6v5_unprepare(struct qcom_q6v5 *q6v5);
  37. int qcom_q6v5_request_stop(struct qcom_q6v5 *q6v5, struct qcom_sysmon *sysmon);
  38. int qcom_q6v5_wait_for_start(struct qcom_q6v5 *q6v5, int timeout);
  39. unsigned long qcom_q6v5_panic(struct qcom_q6v5 *q6v5);
  40. #endif