From b4c70fd9371ecc133161d513c32d7546ccf00c5c Mon Sep 17 00:00:00 2001 From: Denis Brockus Date: Wed, 19 Jun 2019 10:14:34 -0600 Subject: ish: power management temp code is really needed Adjust the comments for the ISH VNN_REQ that indicate code can be removed once power management is put in place. The ipc_heci.c instances are needed to make sure write power is enabled for the heci interface so we can receive the message. The system_state_subsys.c instances disable and re-enable power based on message flow request to suspend/resume. I am going to leave the code as is and adjust the comments a little. BUG=b:135279314 BRANCH=none TEST=make buildall -j Change-Id: I3467e7005ce466bcb06c57a0590834f42aea9ddb Signed-off-by: Denis Brockus Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1667929 Reviewed-by: Jack Rosenthal --- chip/ish/ipc_heci.c | 10 ++-------- chip/ish/system_state_subsys.c | 6 ------ 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/chip/ish/ipc_heci.c b/chip/ish/ipc_heci.c index 9e62c33520..cce3298f01 100644 --- a/chip/ish/ipc_heci.c +++ b/chip/ish/ipc_heci.c @@ -448,10 +448,7 @@ static void ipc_host2ish_isr(void) uint32_t pimr = IPC_PIMR; /* - * TODO(b/122364080): Remove this code once proper power management is - * in place for ISH. - * - * Ensure that the host IPC power is requested after getting an + * Ensure that the host IPC write power is requested after getting an * interrupt otherwise the resume message will never get delivered (via * host ipc communication). Resume is where we would like to restore all * power settings, but that is too late for this power request. @@ -687,10 +684,7 @@ void ipc_mng_task(void) ipc_handle_t handle; /* - * TODO(b/122364080): Remove this code once proper power management is - * in place for ISH. - * - * Ensure that power for host IPCs is requested and ack'ed + * Ensure that power for host IPC writes is requested and ack'ed */ if (IS_ENABLED(CHIP_FAMILY_ISH5)) { PMU_VNN_REQ = VNN_REQ_IPC_HOST_WRITE & ~PMU_VNN_REQ; diff --git a/chip/ish/system_state_subsys.c b/chip/ish/system_state_subsys.c index 93539d2ddf..36b79c747a 100644 --- a/chip/ish/system_state_subsys.c +++ b/chip/ish/system_state_subsys.c @@ -107,9 +107,6 @@ static int ss_subsys_suspend(void) } /* - * TODO(b/122364080): Remove this code once proper power management is - * in place for ISH. - * * PMU_VNN_REQ is used by ISH FW to assert power requirements of ISH to * PMC. The system won't enter S0ix if ISH is requesting any power * rails. Setting a bit to 1 both sets and clears a requested value. @@ -127,9 +124,6 @@ static int ss_subsys_resume(void) int i; /* - * TODO(b/122364080): Remove this code once proper power management is - * in place for ISH. - * * Restore VNN power request from before suspend. */ if (IS_ENABLED(CHIP_FAMILY_ISH5) && -- cgit v1.2.1