From 8a65bd63720b813d8082a2c14bdde5ade4673d87 Mon Sep 17 00:00:00 2001 From: Alex Kiernan Date: Tue, 29 May 2018 15:30:46 +0000 Subject: fastboot: Rename fb_set_reboot_flag to fastboot_set_reboot_flag Rename fb_set_reboot_flag to fastboot_set_reboot_flag so it matches all other fastboot code in the global name space. Fix the guards around them so that they're dependent on FASTBOOT, not just USB_FUNCTION_FASTBOOT. Move the weak implementation of fastboot_set_reboot_flag to fb_common.c so we can call it from non-USB fastboot code. Signed-off-by: Alex Kiernan Reviewed-by: Simon Glass Acked-by: Joe Hershberger --- drivers/fastboot/fb_common.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'drivers/fastboot') diff --git a/drivers/fastboot/fb_common.c b/drivers/fastboot/fb_common.c index c4a7702bb3..79e080ac87 100644 --- a/drivers/fastboot/fb_common.c +++ b/drivers/fastboot/fb_common.c @@ -59,3 +59,18 @@ void fastboot_okay(const char *reason, char *response) else fastboot_response("OKAY", response, NULL); } + +/** + * 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 __weak fastboot_set_reboot_flag(void) +{ + return -ENOSYS; +} -- cgit v1.2.3