Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zephyr: decouple from platform pm_runtime.h interface #9495

Merged
merged 5 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 0 additions & 61 deletions src/platform/imx8/include/platform/lib/pm_runtime.h

This file was deleted.

62 changes: 0 additions & 62 deletions src/platform/imx8ulp/include/platform/lib/pm_runtime.h

This file was deleted.

56 changes: 0 additions & 56 deletions src/platform/imx93_a55/include/platform/lib/pm_runtime.h

This file was deleted.

97 changes: 0 additions & 97 deletions src/platform/intel/cavs/include/cavs/lib/pm_runtime.h

This file was deleted.

26 changes: 0 additions & 26 deletions src/platform/intel/cavs/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include <sof/lib/memory.h>
#include <sof/lib/mm_heap.h>
#include <sof/lib/notifier.h>
#include <sof/lib/pm_runtime.h>
#include <rtos/wait.h>
#include <sof/platform.h>
#include <sof/schedule/edf_schedule.h>
Expand Down Expand Up @@ -96,11 +95,6 @@ int platform_boot_complete(uint32_t boot_message)
{
struct ipc_cmd_hdr header;

#if CONFIG_TIGERLAKE
/* TGL specific HW recommended flow */
pm_runtime_get(PM_RUNTIME_DSP, PWRD_BY_HPRO | (CONFIG_CORE_COUNT - 1));
#endif

mailbox_dspbox_write(0, &ready, sizeof(ready));

/* get any IPC specific boot message and optional data */
Expand All @@ -121,17 +115,6 @@ static struct pm_notifier pm_state_notifier = {
int platform_init(struct sof *sof)
{
int ret;
int i;

/* Turn off memory for all unused cores */
for (i = 0; i < CONFIG_CORE_COUNT; i++)
if (i != PLATFORM_PRIMARY_CORE_ID)
pm_runtime_put(CORE_MEMORY_POW, i);

/* pm runtime already initialized, request the DSP to stay in D0
* until we are allowed to do full power gating (by the IPC req).
*/
pm_runtime_disable(PM_RUNTIME_DSP, 0);

trace_point(TRACE_BOOT_PLATFORM_CLOCK);
platform_clock_init(sof);
Expand All @@ -150,15 +133,6 @@ int platform_init(struct sof *sof)
/* Set CPU to max frequency for booting (single shim_write below) */
trace_point(TRACE_BOOT_PLATFORM_CPU_FREQ);

#if CONFIG_TIGERLAKE
/* prevent DSP Common power gating */
pm_runtime_get(PM_RUNTIME_DSP, PLATFORM_PRIMARY_CORE_ID);

#if CONFIG_DSP_RESIDENCY_COUNTERS
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this configuration option is now unused and can be removed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lyakh It's still implemented in XTOS pm_runtime.c and would be removing a feature from XTOS builds. So keeping in at least for now.

init_dsp_r_state(r0_r_state);
#endif /* CONFIG_DSP_RESIDENCY_COUNTERS */
#endif /* CONFIG_TIGERLAKE */

/* init DMACs */
trace_point(TRACE_BOOT_PLATFORM_DMA);
ret = dmac_init(sof);
Expand Down
Loading
Loading