summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHu, Hebo <hebo.hu@intel.com>2019-07-02 17:34:08 +0800
committerCommit Bot <commit-bot@chromium.org>2019-07-08 13:43:16 +0000
commit354f0a141460c1821682ae0931704d533cfaf5f1 (patch)
treeb3cff1787c2f9e8aca72d117c66058ab7143fbfd
parentb3afc3b3f4448873f01006d02b8805c154b797d9 (diff)
downloadchrome-ec-354f0a141460c1821682ae0931704d533cfaf5f1.tar.gz
ish: fix osscaisonally not load issue when doing shutdown & reboot
Before switch to aon task, cache and ROM will be power gated (PMU_RF_ROM_PWR_CTRL control register) in ecos, and resume after switched back to ecos. But for reset_prep/D3 process, aon task will reset minute ia to ROM finally but forget to resume the power of ROM. This keeps ROM still power gated and make ROM code can't run correctly. The fix is simple, just disable power gating of ROM before reset to ROM in aon task. BUG=b:136265450 BRANCH=none TEST=ISH fw should always load Change-Id: Ib26678bbfdd5dbb17389154478f2565c44d392ab Signed-off-by: Hu, Hebo <hebo.hu@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1690419 Reviewed-by: Jett Rink <jettrink@chromium.org> Commit-Queue: Jett Rink <jettrink@chromium.org> Tested-by: Jett Rink <jettrink@chromium.org>
-rw-r--r--chip/ish/aontaskfw/ish_aontask.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/chip/ish/aontaskfw/ish_aontask.c b/chip/ish/aontaskfw/ish_aontask.c
index 5e16ee7d6a..7020f2e323 100644
--- a/chip/ish/aontaskfw/ish_aontask.c
+++ b/chip/ish/aontaskfw/ish_aontask.c
@@ -593,6 +593,16 @@ static void handle_reset(int pm_state)
/* clear error register in MISC space */
MISC_ISH_ECC_ERR_SRESP = 1;
+ /*
+ * Disable power gating of RF(Cache) and ROMs.
+ *
+ * Before switch to aon task, RF and ROMs are already
+ * power gated, so we need disable the power gating
+ * before reset to ROM, to make sure ROM code runs
+ * correctly.
+ */
+ PMU_RF_ROM_PWR_CTRL = 0;
+
/* reset ISH minute-ia cpu core, will goto ISH ROM */
ish_mia_reset();