Daisuke Nojiri has uploaded this change for review. ( https://review.coreboot.org/22657
Change subject: cr50: Make EC clear AP_OFF before hibnernate ......................................................................
cr50: Make EC clear AP_OFF before hibnernate
This patch makes AP send EC_REBOOT_HIBERNATE_CLEAR_AP_OFF, which makes EC clear AP_OFF flag then hibernate.
This is needed to make Chromebox boot when cr50 toggles the EC's reset line.
BUG=b:69721737 BRANCH=none TEST=Verify Fizz reboot after cr50 update.
Change-Id: I5f590286393ac21382cab64afdccae92d3fc14ba Signed-off-by: Daisuke Nojiri dnojiri@chromium.org --- M src/ec/google/chromeec/ec_commands.h M src/vendorcode/google/chromeos/cr50_enable_update.c 2 files changed, 7 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/57/22657/1
diff --git a/src/ec/google/chromeec/ec_commands.h b/src/ec/google/chromeec/ec_commands.h index aa63aa7..ee889b7 100644 --- a/src/ec/google/chromeec/ec_commands.h +++ b/src/ec/google/chromeec/ec_commands.h @@ -3785,7 +3785,8 @@ /* (command 3 was jump to RW-B) */ EC_REBOOT_COLD = 4, /* Cold-reboot */ EC_REBOOT_DISABLE_JUMP = 5, /* Disable jump until next reboot */ - EC_REBOOT_HIBERNATE = 6 /* Hibernate EC */ + EC_REBOOT_HIBERNATE = 6, /* Hibernate EC */ + EC_REBOOT_HIBERNATE_CLEAR_AP_OFF = 7, /* and clears AP_OFF flag */ };
/* Flags for ec_params_reboot_ec.reboot_flags */ diff --git a/src/vendorcode/google/chromeos/cr50_enable_update.c b/src/vendorcode/google/chromeos/cr50_enable_update.c index 6e67cc2..7917f1c 100644 --- a/src/vendorcode/google/chromeos/cr50_enable_update.c +++ b/src/vendorcode/google/chromeos/cr50_enable_update.c @@ -60,10 +60,12 @@ printk(BIOS_INFO, "Waiting for CR50 reset to pick up update.\n");
if (IS_ENABLED(CONFIG_POWER_OFF_ON_CR50_UPDATE)) { - if (IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC)) + if (IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC)) { printk(BIOS_INFO, "Hibernating EC.\n"); - google_chromeec_reboot(0, EC_REBOOT_HIBERNATE, - EC_REBOOT_FLAG_ON_AP_SHUTDOWN); + google_chromeec_reboot(0, + EC_REBOOT_HIBERNATE_CLEAR_AP_OFF, + EC_REBOOT_FLAG_ON_AP_SHUTDOWN); + } poweroff(); } halt();