Commit 46283bf0 authored by Ye Li's avatar Ye Li

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: 's avatarYe Li <ye.li@nxp.com>
(cherry picked from commit e64a0eedb1ea84fbdbb67630fba88b92d1b49ed2)
parent 42d21af4
......@@ -1764,23 +1764,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");
......@@ -1799,6 +1802,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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment