power_domain: intel_adsp: Use register definitions
Make it a little bit easier to read using already existent definitions for the registers used here. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
b496d0e52d
commit
693b65583c
1 changed files with 6 additions and 5 deletions
|
@ -8,6 +8,7 @@
|
||||||
#include <zephyr/pm/device.h>
|
#include <zephyr/pm/device.h>
|
||||||
#include <zephyr/pm/device_runtime.h>
|
#include <zephyr/pm/device_runtime.h>
|
||||||
#include <adsp_shim.h>
|
#include <adsp_shim.h>
|
||||||
|
#include <adsp_power.h>
|
||||||
|
|
||||||
#if CONFIG_SOC_INTEL_ACE15_MTPM
|
#if CONFIG_SOC_INTEL_ACE15_MTPM
|
||||||
#include <adsp_power.h>
|
#include <adsp_power.h>
|
||||||
|
@ -27,10 +28,10 @@ static int pd_intel_adsp_set_power_enable(struct pg_bits *bits, bool power_enabl
|
||||||
uint16_t SPA_bit_mask = BIT(bits->SPA_bit);
|
uint16_t SPA_bit_mask = BIT(bits->SPA_bit);
|
||||||
|
|
||||||
if (power_enable) {
|
if (power_enable) {
|
||||||
sys_write16(sys_read16((mem_addr_t)&ACE_DfPMCCU.dfpwrctl) | SPA_bit_mask,
|
sys_write16(sys_read16((mem_addr_t)ACE_PWRCTL) | SPA_bit_mask,
|
||||||
(mem_addr_t)&ACE_DfPMCCU.dfpwrctl);
|
(mem_addr_t)ACE_PWRCTL);
|
||||||
|
|
||||||
if (!WAIT_FOR(sys_read16((mem_addr_t)&ACE_DfPMCCU.dfpwrsts) & BIT(bits->CPA_bit),
|
if (!WAIT_FOR(sys_read16((mem_addr_t)ACE_PWRSTS) & BIT(bits->CPA_bit),
|
||||||
10000, k_busy_wait(1))) {
|
10000, k_busy_wait(1))) {
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
@ -46,8 +47,8 @@ static int pd_intel_adsp_set_power_enable(struct pg_bits *bits, bool power_enabl
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
sys_write16(sys_read16((mem_addr_t)&ACE_DfPMCCU.dfpwrctl) & ~(SPA_bit_mask),
|
sys_write16(sys_read16((mem_addr_t)ACE_PWRCTL) & ~(SPA_bit_mask),
|
||||||
(mem_addr_t)&ACE_DfPMCCU.dfpwrctl);
|
(mem_addr_t)ACE_PWRCTL);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue