diff options
author | Namyoon Woo <namyoon@chromium.org> | 2020-03-10 18:36:01 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-03-12 01:27:37 +0000 |
commit | 708277bd1ebb5d9a4dccc875708c3d5018eebd8f (patch) | |
tree | 58c24e958f8d9b48397947a85c0b5f095d460d4c /common | |
parent | 3def48bef02dbd81acab77163924bc3bbb20983b (diff) | |
download | chrome-ec-708277bd1ebb5d9a4dccc875708c3d5018eebd8f.tar.gz |
change the init proiorities of ec_efs_init() and ec_comm_init()release-R82-12974.B-cr50_stab
This patch reprioritizes ec_comm_init() and ec_efs_init() so that
they won't be executed prior to board_init(), which executes
nvmem_init().
BUG=b:151187315
BRANCH=cr50
TEST=let cr50 reboot a few times, and checked the console message
and the ec_comm command output that Kernel secdata was reloaded
without error. Swapped cr50 image from normal to dev, vice versa,
and repeated the rebooting.
[Reset cause: hard]
[0.003799 Inits done]
strap pin readings: a1:2 a9:3 a6:0 a12:0
[0.005893 Valid strap: 0xe properties: 0xa00041]
[0.007991 init_jittery_clock_locking_optional: run level high, ...
[0.045539 init took 29953]
[0.051185 tpm_rst_asserted]
[0.052074 EC-COMM: Initializtion]
Console is enabled; type HELP for help.
...
> ec_comm
...
response : 0xec00
ec_hash : LOADED
secdata_error_code : 0x00000000
>
Change-Id: Ia695896986374ac9d23ac111fe0086ec6a13923e
Signed-off-by: Namyoon Woo <namyoon@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2093102
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/ec_comm.c | 2 | ||||
-rw-r--r-- | common/ec_efs.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/common/ec_comm.c b/common/ec_comm.c index 169e65eb55..eaf26b4509 100644 --- a/common/ec_comm.c +++ b/common/ec_comm.c @@ -76,7 +76,7 @@ static void ec_comm_init_(void) if (gpio_get_level(GPIO_EC_PACKET_MODE_EN)) ec_comm_packet_mode_en(GPIO_EC_PACKET_MODE_EN); } -DECLARE_HOOK(HOOK_INIT, ec_comm_init_, HOOK_PRIO_DEFAULT + 1); +DECLARE_HOOK(HOOK_INIT, ec_comm_init_, HOOK_PRIO_INIT_EC_CR50_COMM); /* * Process the received packet. diff --git a/common/ec_efs.c b/common/ec_efs.c index 9952e0bc1c..207056dce0 100644 --- a/common/ec_efs.c +++ b/common/ec_efs.c @@ -116,7 +116,7 @@ static void ec_efs_init_(void) ec_efs_refresh(); } -DECLARE_HOOK(HOOK_INIT, ec_efs_init_, HOOK_PRIO_DEFAULT); +DECLARE_HOOK(HOOK_INIT, ec_efs_init_, HOOK_PRIO_INIT_EC_EFS); /** * TPM vendor command handler to respond with EC Boot Mode. |