summaryrefslogtreecommitdiff
path: root/include/fsl_fastboot.h
diff options
context:
space:
mode:
authorChen Guoyin <guoyin.chen@nxp.com>2016-11-15 17:57:25 +0800
committerChen Guoyin <guoyin.chen@nxp.com>2016-11-16 18:36:34 +0800
commita5a753d62da1c6352235845629470e5337f4f347 (patch)
treef50e64b95766bc861fe18bb2dfd584576fa2e76c /include/fsl_fastboot.h
parent7f652587219cf14755c07c35e9271b45f150b518 (diff)
downloadu-boot-imx-a5a753d62da1c6352235845629470e5337f4f347.zip
u-boot-imx-a5a753d62da1c6352235845629470e5337f4f347.tar.gz
u-boot-imx-a5a753d62da1c6352235845629470e5337f4f347.tar.bz2
MA-9012 Support boot commands from bcb info
* Remove recovery/bootloader mode checking based on snvs register * Use the API fastboot_run_bootmode() as the entry to check different boot mode * Set boot mode based on commands stored in bcb structure to align Android's bootloader_message_writer.cpp bootonce-bootloader -- > Fastboot mode boot-recovery -- > Recovery mode * Rename the recovery.c as recovery_keypad.c as only handle keypad Change-Id: If34bee0c78bdca252e33296d61443d01a8fc8e96 Signed-off-by: Chen Guoyin <guoyin.chen@nxp.com>
Diffstat (limited to 'include/fsl_fastboot.h')
-rw-r--r--include/fsl_fastboot.h31
1 files changed, 21 insertions, 10 deletions
diff --git a/include/fsl_fastboot.h b/include/fsl_fastboot.h
index 7dce98a..b702ff2 100644
--- a/include/fsl_fastboot.h
+++ b/include/fsl_fastboot.h
@@ -78,6 +78,19 @@ enum {
DEV_NAND
};
+typedef enum {
+#ifdef CONFIG_ANDROID_RECOVERY
+ /* Revoery boot due to combo keys pressed */
+ BOOTMODE_RECOVERY_KEY_PRESSED,
+ /* Recovery boot due to boot-recovery cmd in misc parition */
+ BOOTMODE_RECOVERY_BCB_CMD,
+#endif
+ /* Fastboot boot due to bootonce-bootloader cmd in misc parition */
+ BOOTMODE_FASTBOOT_BCB_CMD,
+ /* Normal boot */
+ BOOTMODE_NORMAL
+}FbBootMode;
+
struct cmd_fastboot_interface {
/* This function is called when a buffer has been
recieved from the client app.
@@ -183,20 +196,18 @@ struct fastboot_ptentry *fastboot_flash_get_ptn(unsigned n);
unsigned int fastboot_flash_get_ptn_count(void);
void fastboot_flash_dump_ptn(void);
-
-/* Check the board special boot mode reboot to fastboot mode. */
-int fastboot_check_and_clean_flag(void);
-int fastboot_check_and_clean_command(void);
-
-/* Set the flag which reboot to fastboot mode*/
-void fastboot_enable_flag(void);
-
-/*check if fastboot mode is requested by user*/
-void check_fastboot(void);
+/* Make board into special boot mode */
+void fastboot_run_bootmode(void);
/*Setup board-relative fastboot environment */
void board_fastboot_setup(void);
+/* Check whether the combo keys pressed
+ * Return 1 if combo keys pressed for recovery boot
+ * Return 0 if no combo keys pressed
+ */
+int is_recovery_key_pressing(void);
+
#ifdef CONFIG_FASTBOOT_STORAGE_NAND
/*Save parameters for NAND storage partitions */
void save_parts_values(struct fastboot_ptentry *ptn,