diff options
author | Roman Kovalivskyi <roman.kovalivskyi@globallogic.com> | 2021-01-26 22:54:55 +0200 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2021-02-07 19:22:54 +0100 |
commit | f80798122a726602a239ad7667164a89e98c8328 (patch) | |
tree | b4ca7ff40cbabebedd1a8552747b3d8a961a2a8f | |
parent | a045bc18d6d2752b9dbf6894e9396a8674e642a2 (diff) | |
download | u-boot-f80798122a726602a239ad7667164a89e98c8328.tar.gz u-boot-f80798122a726602a239ad7667164a89e98c8328.tar.bz2 u-boot-f80798122a726602a239ad7667164a89e98c8328.zip |
Revert "fastboot: Add default fastboot_set_reboot_flag implementation"
This reverts commit 0ebf9842e56c5b8cb7cb1f990bb452cc14af6225.
Current generic implementation of fastboot_set_reboot_flag is somewhat
messy and requires some additional configuration option to be enabled
besides CMD_BCB, so it reverts that implementtion in order to bring a
new cleaner one.
Next commit introduces new generic implementation of
fastboot_set_reboot_flag.
Signed-off-by: Roman Kovalivskyi <roman.kovalivskyi@globallogic.com>
-rw-r--r-- | drivers/fastboot/Kconfig | 12 | ||||
-rw-r--r-- | drivers/fastboot/Makefile | 1 | ||||
-rw-r--r-- | drivers/fastboot/fb_bcb_impl.c | 43 | ||||
-rw-r--r-- | include/fastboot.h | 9 |
4 files changed, 0 insertions, 65 deletions
diff --git a/drivers/fastboot/Kconfig b/drivers/fastboot/Kconfig index 4352ba67a7..d4436dfc91 100644 --- a/drivers/fastboot/Kconfig +++ b/drivers/fastboot/Kconfig @@ -165,18 +165,6 @@ config FASTBOOT_CMD_OEM_FORMAT relies on the env variable partitions to contain the list of partitions as required by the gpt command. -config FASTBOOT_USE_BCB_SET_REBOOT_FLAG - bool "Use BCB by fastboot to set boot reason" - depends on CMD_BCB && !ARCH_MESON && !ARCH_ROCKCHIP && !TARGET_KC1 && \ - !TARGET_SNIPER && !TARGET_AM57XX_EVM && !TARGET_DRA7XX_EVM - default y - help - Fastboot could implement setting of reboot reason in a generic fashion - via BCB commands. BCB commands are able to write reboot reason into - command field of boot control block. In general case it is sufficient - implementation if your platform supports BCB commands and doesn't - require any specific reboot reason handling. - endif # FASTBOOT endmenu diff --git a/drivers/fastboot/Makefile b/drivers/fastboot/Makefile index 2b2c390fe4..048af5aa82 100644 --- a/drivers/fastboot/Makefile +++ b/drivers/fastboot/Makefile @@ -5,4 +5,3 @@ obj-y += fb_getvar.o obj-y += fb_command.o obj-$(CONFIG_FASTBOOT_FLASH_MMC) += fb_mmc.o obj-$(CONFIG_FASTBOOT_FLASH_NAND) += fb_nand.o -obj-$(CONFIG_FASTBOOT_USE_BCB_SET_REBOOT_FLAG) += fb_bcb_impl.o diff --git a/drivers/fastboot/fb_bcb_impl.c b/drivers/fastboot/fb_bcb_impl.c deleted file mode 100644 index 89ec3601b6..0000000000 --- a/drivers/fastboot/fb_bcb_impl.c +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Copyright 2020 GlobalLogic. - * Roman Kovalivskyi <roman.kovalivskyi@globallogic.com> - */ - -#include <common.h> -#include <fastboot.h> - -/** - * fastboot_set_reboot_flag() - Set flag to indicate reboot-bootloader - * - * Set flag which indicates that we should reboot into the bootloader - * following the reboot that fastboot executes after this function. - * - * This function should be overridden in your board file with one - * which sets whatever flag your board specific Android bootloader flow - * requires in order to re-enter the bootloader. - */ -int fastboot_set_reboot_flag(enum fastboot_reboot_reason reason) -{ - char cmd[64]; - - if (reason >= FASTBOOT_REBOOT_REASONS_COUNT) - return -EINVAL; - - snprintf(cmd, sizeof(cmd), "bcb load %d misc", - CONFIG_FASTBOOT_FLASH_MMC_DEV); - - if (run_command(cmd, 0)) - return -ENODEV; - - snprintf(cmd, sizeof(cmd), "bcb set command %s", - fastboot_boot_cmds[reason]); - - if (run_command(cmd, 0)) - return -ENOEXEC; - - if (run_command("bcb store", 0)) - return -EIO; - - return 0; -} diff --git a/include/fastboot.h b/include/fastboot.h index 8e9ee80907..b86b508e69 100644 --- a/include/fastboot.h +++ b/include/fastboot.h @@ -53,15 +53,6 @@ enum fastboot_reboot_reason { }; /** - * 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 |