net: share fastboot boot handle logic between transports

Introduce reboot, boot and continue commands support to
TCP fastboot by moving existing UDP logic into the common module.

Signed-off-by: Dmitrii Merkurev <dimorinny@google.com>
Cc: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Cc: Simon Glass <sjg@chromium.org>
Сс: Joe Hershberger <joe.hershberger@ni.com>
Сс: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Dmitrii Merkurev
2023-04-12 19:49:31 +01:00
committed by Tom Rini
parent 443d319180
commit c8acbbbf08
4 changed files with 46 additions and 31 deletions

View File

@@ -123,6 +123,15 @@ void fastboot_init(void *buf_addr, u32 buf_size);
*/
void fastboot_boot(void);
/**
* fastboot_handle_boot() - Shared implementation of system reaction to
* fastboot commands
*
* Making desceisions about device boot state (stay in fastboot, reboot
* to bootloader, reboot to OS, etc).
*/
void fastboot_handle_boot(int command, bool success);
/**
* fastboot_handle_command() - Handle fastboot command
*