From 769bb4fbb2a959b40c8a6ec408f1011464287b69 Mon Sep 17 00:00:00 2001 From: Mary Ruthven Date: Wed, 5 May 2021 10:45:57 -0500 Subject: add CONFIG_CMD_WP Add CONFIG_CMD_WP to control building the wp commands. This adds the wp console command, the bpforce console command, and the wp vendor command. BUG=b:186663661 TEST=flash usage doesn't change with make -j BOARD=cr50 Change-Id: I707ace6d35b691a49d983b714ad519ae85c7e01f Signed-off-by: Mary Ruthven Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2875470 Reviewed-by: Vadim Sukhomlinov Reviewed-by: Namyoon Woo --- board/cr50/wp.c | 2 ++ include/config.h | 1 + 2 files changed, 3 insertions(+) diff --git a/board/cr50/wp.c b/board/cr50/wp.c index d8d8f760b9..7b8f02b24d 100644 --- a/board/cr50/wp.c +++ b/board/cr50/wp.c @@ -120,6 +120,7 @@ static void force_write_protect(int force, int wp_en) set_wp_state(wp_en); } +#ifdef CONFIG_CMD_WP static enum vendor_cmd_rc vc_set_wp(enum vendor_cmd_cc code, void *buf, size_t input_size, @@ -246,6 +247,7 @@ static int command_wp(int argc, char **argv) DECLARE_SAFE_CONSOLE_COMMAND(wp, command_wp, "[/follow_batt_pres [atboot]]", "Get/set the flash HW write-protect signal"); +#endif /* CONFIG_CMD_WP */ void set_bp_follow_ccd_config(void) { diff --git a/include/config.h b/include/config.h index 86f8346bbf..e5f4d34b05 100644 --- a/include/config.h +++ b/include/config.h @@ -1183,6 +1183,7 @@ #undef CONFIG_CMD_USB_PD_CABLE #undef CONFIG_CMD_USB_PD_PE #define CONFIG_CMD_WAITMS +#define CONFIG_CMD_WP #undef CONFIG_CMD_AP_RESET_LOG /*****************************************************************************/ -- cgit v1.2.1