summaryrefslogtreecommitdiff
path: root/include/fastboot.h
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-09-03 09:48:28 -0400
committerTom Rini <trini@konsulko.com>2020-09-03 09:48:28 -0400
commit9bfb567e5f1bfe7de8eb41f8c6d00f49d2b9a426 (patch)
tree50aa5bfd07887062e0d6808158a02434c9a85116 /include/fastboot.h
parent7f4d3c044504668fcbc547af52e0c2c4fd715d27 (diff)
parent293a6dfeb96129abebf1ad927fa9aedf03a66d34 (diff)
Merge branch 'master' of git://git.denx.de/u-boot-usb
- Mostly DFU fixes and r8152 fixes
Diffstat (limited to 'include/fastboot.h')
-rw-r--r--include/fastboot.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/include/fastboot.h b/include/fastboot.h
index 1933b1d98e..8e9ee80907 100644
--- a/include/fastboot.h
+++ b/include/fastboot.h
@@ -32,6 +32,8 @@ enum {
FASTBOOT_COMMAND_CONTINUE,
FASTBOOT_COMMAND_REBOOT,
FASTBOOT_COMMAND_REBOOT_BOOTLOADER,
+ FASTBOOT_COMMAND_REBOOT_FASTBOOTD,
+ FASTBOOT_COMMAND_REBOOT_RECOVERY,
FASTBOOT_COMMAND_SET_ACTIVE,
#if CONFIG_IS_ENABLED(FASTBOOT_CMD_OEM_FORMAT)
FASTBOOT_COMMAND_OEM_FORMAT,
@@ -41,6 +43,25 @@ enum {
};
/**
+ * Reboot reasons
+ */
+enum fastboot_reboot_reason {
+ FASTBOOT_REBOOT_REASON_BOOTLOADER,
+ FASTBOOT_REBOOT_REASON_FASTBOOTD,
+ FASTBOOT_REBOOT_REASON_RECOVERY,
+ FASTBOOT_REBOOT_REASONS_COUNT
+};
+
+/**
+ * BCB boot commands
+ */
+static const char * const fastboot_boot_cmds[] = {
+ [FASTBOOT_REBOOT_REASON_BOOTLOADER] = "bootonce-bootloader",
+ [FASTBOOT_REBOOT_REASON_FASTBOOTD] = "boot-fastboot",
+ [FASTBOOT_REBOOT_REASON_RECOVERY] = "boot-recovery"
+};
+
+/**
* fastboot_response() - Writes a response of the form "$tag$reason".
*
* @tag: The first part of the response
@@ -77,7 +98,7 @@ void fastboot_okay(const char *reason, char *response);
* which sets whatever flag your board specific Android bootloader flow
* requires in order to re-enter the bootloader.
*/
-int fastboot_set_reboot_flag(void);
+int fastboot_set_reboot_flag(enum fastboot_reboot_reason reason);
/**
* fastboot_set_progress_callback() - set progress callback