From 3d67df923a05a5108ef1f00586880e35acf89d82 Mon Sep 17 00:00:00 2001 From: Aseda Aboagye Date: Tue, 27 Jul 2021 18:33:46 -0700 Subject: flash: Set CBI EEPROM WP immediately if SW WP set With `CONFIG_EEPROM_CBI_WP`, the EC will set the the CBI EEPROM WP according to `system_is_locked`. The system lock status is also cached. In order to prevent requiring an EC reboot after setting the software write protect status, this commit will set the CBI EEPROM WP status when the SW WP is asserted along with the HW WP. This is the same criteria that `system_is_locked` would use when deciding if the system is locked. BUG=b:181769483 BRANCH=None TEST=Build and flash a reworked lalala, enable HW WP, enable SW WP via `flashrom -p ec --wp-enable` and verify that EC_CBI_WP is asserted immediately without requiring an EC reboot. Signed-off-by: Aseda Aboagye Change-Id: I987a5b7652134be11c82855aab9ed4eb1442b57c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3058077 Tested-by: Aseda Aboagye Reviewed-by: Daisuke Nojiri Commit-Queue: Aseda Aboagye --- baseboard/dedede/baseboard.c | 1 + 1 file changed, 1 insertion(+) (limited to 'baseboard') diff --git a/baseboard/dedede/baseboard.c b/baseboard/dedede/baseboard.c index 3754f04b36..2f71f03068 100644 --- a/baseboard/dedede/baseboard.c +++ b/baseboard/dedede/baseboard.c @@ -16,6 +16,7 @@ #include "gpio.h" #include "hooks.h" #include "host_command.h" +#include "power/icelake.h" #include "power/intel_x86.h" #include "system.h" #include "usb_pd.h" -- cgit v1.2.1