pm.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
  2. /*
  3. * This file is provided under a dual BSD/GPLv2 license. When using or
  4. * redistributing this file, you may do so under either license.
  5. *
  6. * Copyright(c) 2018 Intel Corporation
  7. */
  8. #ifndef __INCLUDE_SOUND_SOF_PM_H__
  9. #define __INCLUDE_SOUND_SOF_PM_H__
  10. #include <sound/sof/header.h>
  11. /*
  12. * PM
  13. */
  14. /* PM context element */
  15. struct sof_ipc_pm_ctx_elem {
  16. struct sof_ipc_hdr hdr;
  17. uint32_t type;
  18. uint32_t size;
  19. uint64_t addr;
  20. } __packed;
  21. /*
  22. * PM context - SOF_IPC_PM_CTX_SAVE, SOF_IPC_PM_CTX_RESTORE,
  23. * SOF_IPC_PM_CTX_SIZE
  24. */
  25. struct sof_ipc_pm_ctx {
  26. struct sof_ipc_cmd_hdr hdr;
  27. struct sof_ipc_host_buffer buffer;
  28. uint32_t num_elems;
  29. uint32_t size;
  30. /* reserved for future use */
  31. uint32_t reserved[8];
  32. struct sof_ipc_pm_ctx_elem elems[];
  33. } __packed;
  34. /* enable or disable cores - SOF_IPC_PM_CORE_ENABLE */
  35. struct sof_ipc_pm_core_config {
  36. struct sof_ipc_cmd_hdr hdr;
  37. uint32_t enable_mask;
  38. } __packed;
  39. struct sof_ipc_pm_gate {
  40. struct sof_ipc_cmd_hdr hdr;
  41. uint32_t flags; /* platform specific */
  42. /* reserved for future use */
  43. uint32_t reserved[5];
  44. } __packed;
  45. #endif