Skip to content

Commit

Permalink
drivers: gpdma: pm runtime works only on ace
Browse files Browse the repository at this point in the history
CAVS platforms are not fully integrated with zephyr. Some of the
registers are still programed from SOF side. This feature can be enabled
for those platforms later when integration is fully done.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
  • Loading branch information
tmleman authored and carlescufi committed Apr 25, 2023
1 parent 3d6e9ee commit 9028ad5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/dma/dma_intel_adsp_gpdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ static int intel_adsp_gpdma_config(const struct device *dev, uint32_t channel,
static int intel_adsp_gpdma_start(const struct device *dev, uint32_t channel)
{
int ret = 0;
#if CONFIG_PM_DEVICE
#if CONFIG_PM_DEVICE && CONFIG_SOC_SERIES_INTEL_ACE
bool first_use = false;
enum pm_device_state state;

Expand All @@ -187,7 +187,7 @@ static int intel_adsp_gpdma_start(const struct device *dev, uint32_t channel)
intel_adsp_gpdma_llp_disable(dev, channel);
}

#if CONFIG_PM_DEVICE
#if CONFIG_PM_DEVICE && CONFIG_SOC_SERIES_INTEL_ACE
/* Device usage is counted by the calls of dw_dma_start and dw_dma_stop. For the first use,
* we need to make sure that the pm_device_runtime_get and pm_device_runtime_put functions
* calls are balanced.
Expand Down Expand Up @@ -433,14 +433,14 @@ int intel_adsp_gpdma_init(const struct device *dev)
dev_data->dma_ctx.magic = DMA_MAGIC;
dev_data->dma_ctx.dma_channels = DW_MAX_CHAN;
dev_data->dma_ctx.atomic = dev_data->channels_atomic;
#if CONFIG_PM_DEVICE
#if CONFIG_PM_DEVICE && CONFIG_SOC_SERIES_INTEL_ACE
if (pm_device_on_power_domain(dev)) {
pm_device_init_off(dev);
} else {
pm_device_init_suspended(dev);
}

return pm_device_runtime_enable(dev);
return 0;
#else
return intel_adsp_gpdma_power_on(dev);
#endif
Expand Down
3 changes: 3 additions & 0 deletions dts/xtensa/intel/intel_adsp_ace15_mtpm.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,7 @@
dma-copy-alignment = <4>;
status = "okay";
power-domain = <&hub_ulp_domain>;
zephyr,pm-device-runtime-auto;
};

lpgpdma1: dma@7d000 {
Expand All @@ -575,6 +576,7 @@
dma-copy-alignment = <4>;
status = "okay";
power-domain = <&io0_domain>;
zephyr,pm-device-runtime-auto;
};

lpgpdma2: dma@7e000 {
Expand All @@ -588,6 +590,7 @@
dma-copy-alignment = <4>;
power-domain = <&io0_domain>;
status = "okay";
zephyr,pm-device-runtime-auto;
};

sha: adsp-sha@17df00 {
Expand Down

0 comments on commit 9028ad5

Please sign in to comment.