MA-14916-10 fix fastboot reboot bootloader issue
authorfaqiang.zhu <faqiang.zhu@nxp.com>
Tue, 9 Jul 2019 10:52:12 +0000 (18:52 +0800)
committerfaqiang.zhu <faqiang.zhu@nxp.com>
Mon, 15 Jul 2019 07:13:42 +0000 (15:13 +0800)
In Android, the reboot bootloader flag is written to misc partition, in
the boot flow, u-boot will check that message to decide whether enter
fastboot mode or not. To be compatible with the common implemention,
keep the fastboot_set_reboot_flag there and redefine it to avoid the
error return value which block the reboot process.

Change-Id: Ifb55236d5a5daf3edd124d3ed01851ff6e916e1a
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
drivers/fastboot/fb_fsl/fb_fsl_command.c

index 5da84cf..fbbcbe9 100755 (executable)
@@ -722,6 +722,19 @@ static void erase(char *cmd, char *response)
 }
 #endif
 
+/**
+ * fastboot_set_reboot_flag() - Set flag to indicate reboot-bootloader
+ *
+ * This is a redefinition, since BSP dose not need the function of
+ * "reboot into bootloader", and with BCB support, the flag can be
+ * set with another way. Redefine this function to override the weak
+ * definition to avoid error return value.
+ */
+int fastboot_set_reboot_flag(void)
+{
+       return 0;
+}
+
 #if CONFIG_IS_ENABLED(FASTBOOT_UUU_SUPPORT)
 /**
  * run_ucmd() - Execute the UCmd command