From 851737ab8922742732bea5f70407cb95cafcb3ee Mon Sep 17 00:00:00 2001 From: Roman Kovalivskyi Date: Tue, 28 Jul 2020 23:35:32 +0300 Subject: fastboot: Extend fastboot_set_reboot_flag with reboot reason Extend fastboot_set_reboot_flag arguments with reboot reason so that it could handle different reboot cases in future. Signed-off-by: Roman Kovalivskyi --- board/ti/am57xx/board.c | 6 +++++- board/ti/dra7xx/evm.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'board/ti') diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c index 69dce70a60..7809875510 100644 --- a/board/ti/am57xx/board.c +++ b/board/ti/am57xx/board.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -1172,8 +1173,11 @@ int board_fit_config_name_match(const char *name) #endif #if CONFIG_IS_ENABLED(FASTBOOT) && !CONFIG_IS_ENABLED(ENV_IS_NOWHERE) -int fastboot_set_reboot_flag(void) +int fastboot_set_reboot_flag(enum fastboot_reboot_reason reason) { + if (reason != FASTBOOT_REBOOT_REASON_BOOTLOADER) + return -ENOTSUPP; + printf("Setting reboot to fastboot flag ...\n"); env_set("dofastboot", "1"); env_save(); diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c index 5ae179f69b..ca1976e16a 100644 --- a/board/ti/dra7xx/evm.c +++ b/board/ti/dra7xx/evm.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -1050,8 +1051,11 @@ int board_fit_config_name_match(const char *name) #endif #if CONFIG_IS_ENABLED(FASTBOOT) && !CONFIG_IS_ENABLED(ENV_IS_NOWHERE) -int fastboot_set_reboot_flag(void) +int fastboot_set_reboot_flag(enum fastboot_reboot_reason reason) { + if (reason != FASTBOOT_REBOOT_REASON_BOOTLOADER) + return -ENOTSUPP; + printf("Setting reboot to fastboot flag ...\n"); env_set("dofastboot", "1"); env_save(); -- cgit v1.2.3