1
0
Fork 0

MLK-19132-1 fastboot: Use CONFIG_BCB_SUPPORT to control bcb relevant operations

BSP u-boot has enabled fastboot for uuu. But the BCB is not needed. It will
gives some errors during u-boot boot up.
This patch uses CONFIG_BCB_SUPPORT to control bcb codes, so that BSP u-boot can
disable it.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit e64a0eedb1ea84fbdbb67630fba88b92d1b49ed2)
zero-sugar
Ye Li 2018-08-07 23:45:28 -07:00
parent bbbdd19839
commit 0fe527d322
1 changed files with 6 additions and 2 deletions

View File

@ -1726,23 +1726,26 @@ void fastboot_setup(void)
/* Write the bcb with fastboot bootloader commands */
static void enable_fastboot_command(void)
{
#ifdef CONFIG_BCB_SUPPORT
char fastboot_command[32] = {0};
strncpy(fastboot_command, FASTBOOT_BCB_CMD, 31);
bcb_write_command(fastboot_command);
#endif
}
/* Get the Boot mode from BCB cmd or Key pressed */
static FbBootMode fastboot_get_bootmode(void)
{
int ret = 0;
int boot_mode = BOOTMODE_NORMAL;
char command[32];
#ifdef CONFIG_ANDROID_RECOVERY
if(is_recovery_key_pressing()) {
boot_mode = BOOTMODE_RECOVERY_KEY_PRESSED;
return boot_mode;
}
#endif
#ifdef CONFIG_BCB_SUPPORT
int ret = 0;
char command[32];
ret = bcb_read_command(command);
if (ret < 0) {
printf("read command failed\n");
@ -1761,6 +1764,7 @@ static FbBootMode fastboot_get_bootmode(void)
no matter what in the mode string */
memset(command, 0, 32);
bcb_write_command(command);
#endif
return boot_mode;
}