summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/greybus_protocols.h
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2016-07-25 14:38:08 -0700
committerGreg Kroah-Hartman <gregkh@google.com>2016-07-26 16:16:15 -0700
commit5e10f0047a1b79e6c8ac1ee0e9a0165e7d0bc7d6 (patch)
tree6cdedb0ee56fc7dc3452708208658c1f9ef7e0fa /drivers/staging/greybus/greybus_protocols.h
parent911415ae6ee29cb76e018e8df8715c743a3a3d63 (diff)
greybus: firmware: Add 'status' byte to backend fw version response
The backend processor may not be ready to return the version of firmware it is running by the time AP requests for it. The greybus specification is updated to return 1-byte 'status' to return the error type, RETRY is one of them. This patch implements that in greybus now. Note that the version structure was common across interface and backend version requests earlier, but that is changing as well. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/greybus_protocols.h')
-rw-r--r--drivers/staging/greybus/greybus_protocols.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/staging/greybus/greybus_protocols.h b/drivers/staging/greybus/greybus_protocols.h
index e51c2b14875f..edbc5dfc448f 100644
--- a/drivers/staging/greybus/greybus_protocols.h
+++ b/drivers/staging/greybus/greybus_protocols.h
@@ -370,6 +370,12 @@ struct gb_fw_download_release_firmware_request {
#define GB_FW_BACKEND_FW_STATUS_RETRY 0x06
#define GB_FW_BACKEND_FW_STATUS_NOT_SUPPORTED 0x07
+#define GB_FW_BACKEND_VERSION_STATUS_SUCCESS 0x01
+#define GB_FW_BACKEND_VERSION_STATUS_NOT_AVAILABLE 0x02
+#define GB_FW_BACKEND_VERSION_STATUS_NOT_SUPPORTED 0x03
+#define GB_FW_BACKEND_VERSION_STATUS_RETRY 0x04
+#define GB_FW_BACKEND_VERSION_STATUS_FAIL_INT 0x05
+
/* firmware management interface firmware version request has no payload */
struct gb_fw_mgmt_interface_fw_version_response {
__u8 firmware_tag[GB_FIRMWARE_TAG_MAX_LEN];
@@ -402,6 +408,7 @@ struct gb_fw_mgmt_backend_fw_version_request {
struct gb_fw_mgmt_backend_fw_version_response {
__le16 major;
__le16 minor;
+ __u8 status;
} __packed;
/* firmware management backend firmware update request */