intel-adsp: use proper error codes
Use proper errno.h error codes in pd_intel_adsp_set_power_enable() instead of -1. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This commit is contained in:
parent
16a54f251a
commit
ac71dfae90
1 changed files with 2 additions and 2 deletions
|
@ -32,7 +32,7 @@ static int pd_intel_adsp_set_power_enable(struct pg_bits *bits, bool power_enabl
|
||||||
|
|
||||||
if (!WAIT_FOR(sys_read16((mem_addr_t)&ACE_DfPMCCU.dfpwrsts) & BIT(bits->CPA_bit),
|
if (!WAIT_FOR(sys_read16((mem_addr_t)&ACE_DfPMCCU.dfpwrsts) & BIT(bits->CPA_bit),
|
||||||
10000, k_busy_wait(1))) {
|
10000, k_busy_wait(1))) {
|
||||||
return -1;
|
return -EIO;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
#if CONFIG_ACE_VERSION_1_5
|
#if CONFIG_ACE_VERSION_1_5
|
||||||
|
@ -43,7 +43,7 @@ static int pd_intel_adsp_set_power_enable(struct pg_bits *bits, bool power_enabl
|
||||||
uint32_t key_value = *key_read_ptr;
|
uint32_t key_value = *key_read_ptr;
|
||||||
|
|
||||||
if (key_value != INTEL_ADSP_ACE15_MAGIC_KEY)
|
if (key_value != INTEL_ADSP_ACE15_MAGIC_KEY)
|
||||||
return -1;
|
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_DfPMCCU.dfpwrctl) & ~(SPA_bit_mask),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue