diff options
author | Tom Rini <trini@konsulko.com> | 2023-11-17 08:38:05 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-11-17 08:38:05 -0500 |
commit | ae7ec8b0be41b59ef323f7531c0fe6745e8fef45 (patch) | |
tree | d3b5bff2626d743a15533b8400985974817f1cc3 /drivers/fastboot/fb_common.c | |
parent | 6c1608b1ffb372d4dabf1b879e68428712353709 (diff) | |
parent | b83fae673a9cd9795e531883936c1468e75510a5 (diff) |
Merge branch '2023-11-16-assorted-updates' into next
- squashfs improvements, remove common.h in some places, assorted code
fixes, fix a few CONFIG symbol names in Kconfig files, bring in
linux's <linux/time.h> conversion functions, poplar updates, bcb
improvements.
Diffstat (limited to 'drivers/fastboot/fb_common.c')
-rw-r--r-- | drivers/fastboot/fb_common.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/fastboot/fb_common.c b/drivers/fastboot/fb_common.c index 4e9d9b719c6..3576b067729 100644 --- a/drivers/fastboot/fb_common.c +++ b/drivers/fastboot/fb_common.c @@ -91,6 +91,7 @@ void fastboot_okay(const char *reason, char *response) */ int __weak fastboot_set_reboot_flag(enum fastboot_reboot_reason reason) { + int ret; static const char * const boot_cmds[] = { [FASTBOOT_REBOOT_REASON_BOOTLOADER] = "bootonce-bootloader", [FASTBOOT_REBOOT_REASON_FASTBOOTD] = "boot-fastboot", @@ -105,7 +106,18 @@ int __weak fastboot_set_reboot_flag(enum fastboot_reboot_reason reason) if (reason >= FASTBOOT_REBOOT_REASONS_COUNT) return -EINVAL; - return bcb_write_reboot_reason(mmc_dev, "misc", boot_cmds[reason]); + ret = bcb_find_partition_and_load("mmc", mmc_dev, "misc"); + if (ret) + goto out; + + ret = bcb_set(BCB_FIELD_COMMAND, boot_cmds[reason]); + if (ret) + goto out; + + ret = bcb_store(); +out: + bcb_reset(); + return ret; } /** |