aboutsummaryrefslogtreecommitdiff
path: root/drivers/fastboot/fb_command.c
diff options
context:
space:
mode:
authorIon Agorria <ion@agorria.com>2024-01-05 09:22:06 +0200
committerMattijs Korpershoek <mkorpershoek@baylibre.com>2024-01-09 14:58:33 +0100
commit85fcd69dc2c03025648a1b1b511c1f10abf87c1e (patch)
tree5028e73fe98e012861dcc95d2627bc95d54bf4b7 /drivers/fastboot/fb_command.c
parentc5e461fbf7cc72f0c1c8a79226b6a5170e56cb4d (diff)
fastboot: multiresponse support
Currently u-boot fastboot can only send one message back to host, so if there is a need to print more than one line messages must be kept sending until all the required data is obtained. This behavior can be adjusted using multiresponce ability (getting multiple lines of response) proposed in this patch. Signed-off-by: Ion Agorria <ion@agorria.com> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Link: https://lore.kernel.org/r/20240105072212.6615-2-clamor95@gmail.com Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Diffstat (limited to 'drivers/fastboot/fb_command.c')
-rw-r--r--drivers/fastboot/fb_command.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/fastboot/fb_command.c b/drivers/fastboot/fb_command.c
index 5fcadcdf50..ab72d8c781 100644
--- a/drivers/fastboot/fb_command.c
+++ b/drivers/fastboot/fb_command.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <command.h>
+#include <console.h>
#include <env.h>
#include <fastboot.h>
#include <fastboot-internal.h>
@@ -152,6 +153,15 @@ int fastboot_handle_command(char *cmd_string, char *response)
return -1;
}
+void fastboot_multiresponse(int cmd, char *response)
+{
+ switch (cmd) {
+ default:
+ fastboot_fail("Unknown multiresponse command", response);
+ break;
+ }
+}
+
/**
* okay() - Send bare OKAY response
*