aboutsummaryrefslogtreecommitdiff
path: root/include/fastboot.h
diff options
context:
space:
mode:
authorIon Agorria2024-01-05 09:22:06 +0200
committerMattijs Korpershoek2024-01-09 14:58:33 +0100
commit85fcd69dc2c03025648a1b1b511c1f10abf87c1e (patch)
tree5028e73fe98e012861dcc95d2627bc95d54bf4b7 /include/fastboot.h
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 'include/fastboot.h')
-rw-r--r--include/fastboot.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/fastboot.h b/include/fastboot.h
index 296451f89d4..59cbea61eca 100644
--- a/include/fastboot.h
+++ b/include/fastboot.h
@@ -14,6 +14,16 @@
#define FASTBOOT_VERSION "0.4"
+/*
+ * Signals u-boot fastboot code to send multiple responses by
+ * calling response generating function repeatedly until a OKAY/FAIL
+ * is generated as final response.
+ *
+ * This status code is only used internally to signal, must NOT
+ * be sent to host.
+ */
+#define FASTBOOT_MULTIRESPONSE_START ("MORE")
+
/* The 64 defined bytes plus \0 */
#define FASTBOOT_COMMAND_LEN (64 + 1)
#define FASTBOOT_RESPONSE_LEN (64 + 1)
@@ -172,5 +182,13 @@ void fastboot_data_download(const void *fastboot_data,
*/
void fastboot_data_complete(char *response);
+/**
+ * fastboot_handle_multiresponse() - Called for each response to send
+ *
+ * @cmd: Command id that requested multiresponse
+ * @response: Pointer to fastboot response buffer
+ */
+void fastboot_multiresponse(int cmd, char *response);
+
void fastboot_acmd_complete(void);
#endif /* _FASTBOOT_H_ */