summaryrefslogtreecommitdiff
path: root/include/fastboot.h
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2024-01-11 10:03:51 -0500
committerTom Rini <trini@konsulko.com>2024-01-11 10:03:51 -0500
commitd3dba8a28bb7f57a4558c944f9c329c467144633 (patch)
tree517ec69555b6f0f1dafd0f114ec67c7b9ddbcdf0 /include/fastboot.h
parent7a59d520ef0bfd29b339cba5282149271d5ac3b2 (diff)
parent6c2f753f4ad3dcee60190949d1286736a6d51d17 (diff)
Merge tag 'u-boot-dfu-20240111' of https://source.denx.de/u-boot/custodians/u-boot-dfu
u-boot-dfu-20240111 - Implement fastboot multi-response. This allows multi-line response and most importantly, finally adds support for fastboot getvar all command. - New 'fastboot oem console' command. Useful for debugging to send data the u-boot shell via fastboot - Console recording fixes
Diffstat (limited to 'include/fastboot.h')
-rw-r--r--include/fastboot.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/fastboot.h b/include/fastboot.h
index 296451f89d4..1e7920eb913 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)
@@ -37,6 +47,7 @@ enum {
FASTBOOT_COMMAND_OEM_PARTCONF,
FASTBOOT_COMMAND_OEM_BOOTBUS,
FASTBOOT_COMMAND_OEM_RUN,
+ FASTBOOT_COMMAND_OEM_CONSOLE,
FASTBOOT_COMMAND_ACMD,
FASTBOOT_COMMAND_UCMD,
FASTBOOT_COMMAND_COUNT
@@ -172,5 +183,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_ */