summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/greybus_protocols.h
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2016-04-28 10:06:38 +0530
committerGreg Kroah-Hartman <gregkh@google.com>2016-04-29 14:34:32 -0700
commitcca22207673896262443c72f19b049552d65f88e (patch)
tree210b5f5de80bdd89340301f5cf95574ef42ac5cd /drivers/staging/greybus/greybus_protocols.h
parent7adb32b429ce38bae39e277ae2cc37c93770104f (diff)
greybus: firmware: Add firmware-download protocol driver
This patch adds Firmware Download Protocol support to firmware core, which allows an Interface to download a firmware package over Unipro. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Jun Li <li_jun@projectara.com> 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.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/drivers/staging/greybus/greybus_protocols.h b/drivers/staging/greybus/greybus_protocols.h
index f1e8b345a761..b73acc0c3ee5 100644
--- a/drivers/staging/greybus/greybus_protocols.h
+++ b/drivers/staging/greybus/greybus_protocols.h
@@ -213,6 +213,43 @@ struct gb_control_timesync_authoritative_request {
#define GB_APB_REQUEST_CPORT_FEAT_EN 0x0b
#define GB_APB_REQUEST_CPORT_FEAT_DIS 0x0c
+/* Firmware Download Protocol */
+
+/* Request Types */
+#define GB_FW_DOWNLOAD_TYPE_FIND_FIRMWARE 0x01
+#define GB_FW_DOWNLOAD_TYPE_FETCH_FIRMWARE 0x02
+#define GB_FW_DOWNLOAD_TYPE_RELEASE_FIRMWARE 0x03
+
+#define GB_FIRMWARE_TAG_MAX_LEN 10
+
+/* firmware download find firmware request/response */
+struct gb_fw_download_find_firmware_request {
+ __u8 firmware_tag[GB_FIRMWARE_TAG_MAX_LEN];
+} __packed;
+
+struct gb_fw_download_find_firmware_response {
+ __u8 firmware_id;
+ __le32 size;
+} __packed;
+
+/* firmware download fetch firmware request/response */
+struct gb_fw_download_fetch_firmware_request {
+ __u8 firmware_id;
+ __le32 offset;
+ __le32 size;
+} __packed;
+
+struct gb_fw_download_fetch_firmware_response {
+ __u8 data[0];
+} __packed;
+
+/* firmware download release firmware request */
+struct gb_fw_download_release_firmware_request {
+ __u8 firmware_id;
+} __packed;
+/* firmware download release firmware response has no payload */
+
+
/* Bootrom Protocol */
/* Version of the Greybus bootrom protocol we support */