diff options
-rw-r--r-- | board/cr50/board.c | 20 | ||||
-rw-r--r-- | include/config.h | 1 |
2 files changed, 12 insertions, 9 deletions
diff --git a/board/cr50/board.c b/board/cr50/board.c index 399d28786d..43e4e8cd3b 100644 --- a/board/cr50/board.c +++ b/board/cr50/board.c @@ -1034,15 +1034,6 @@ void deassert_sys_rst(void) gpio_set_level(GPIO_SYS_RST_L_OUT, 1); } -static int is_sys_rst_asserted(void) -{ - /* - * SYS_RST_L is pseudo open drain. It is only an output when it's - * asserted. - */ - return gpio_get_flags(GPIO_SYS_RST_L_OUT) & GPIO_OUTPUT; -} - /** * Reboot the AP */ @@ -1089,6 +1080,16 @@ static void key_combo0_irq(void) } DECLARE_IRQ(GC_IRQNUM_RBOX0_INTR_BUTTON_COMBO0_RDY_INT, key_combo0_irq, 0); +#ifdef CONFIG_CMD_SYSRST +static int is_sys_rst_asserted(void) +{ + /* + * SYS_RST_L is pseudo open drain. It is only an output when it's + * asserted. + */ + return gpio_get_flags(GPIO_SYS_RST_L_OUT) & GPIO_OUTPUT; +} + /** * Console command to toggle system (AP) reset */ @@ -1130,6 +1131,7 @@ static int command_sys_rst(int argc, char **argv) DECLARE_SAFE_CONSOLE_COMMAND(sysrst, command_sys_rst, "[pulse [time] | <BOOLEAN>]", "Assert/deassert SYS_RST_L to reset the AP"); +#endif /* CONFIG_CMD_SYSRST */ /* * Set RBOX register controlling EC reset and wait until RBOX updates the diff --git a/include/config.h b/include/config.h index 7395dbf306..86f8346bbf 100644 --- a/include/config.h +++ b/include/config.h @@ -1172,6 +1172,7 @@ #define CONFIG_CMD_SYSINFO #define CONFIG_CMD_SYSJUMP #define CONFIG_CMD_SYSLOCK +#define CONFIG_CMD_SYSRST #undef CONFIG_CMD_TASK_RESET #undef CONFIG_CMD_TASKREADY #define CONFIG_CMD_TEMP_SENSOR |