protocol: Add get_flash_info
Change-Id: Iff6c452c1399bc8e8f65219779c6a0f2375c68e6
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/protocol.h b/protocol.h
index d7827c0..9503812 100644
--- a/protocol.h
+++ b/protocol.h
@@ -29,10 +29,27 @@
} resp;
};
+struct protocol_get_flash_info {
+ struct {
+ union {
+ struct {
+ uint32_t flash_size;
+ uint32_t erase_size;
+ } v1;
+ struct {
+ uint16_t flash_size;
+ uint16_t erase_size;
+ } v2;
+ };
+ } resp;
+};
+
struct protocol_ops {
int (*reset)(struct mbox_context *context);
int (*get_info)(struct mbox_context *context,
struct protocol_get_info *io);
+ int (*get_flash_info)(struct mbox_context *context,
+ struct protocol_get_flash_info *io);
};
int protocol_init(struct mbox_context *context);
@@ -44,9 +61,13 @@
int protocol_v1_reset(struct mbox_context *context);
int protocol_v1_get_info(struct mbox_context *context,
struct protocol_get_info *io);
+int protocol_v1_get_flash_info(struct mbox_context *context,
+ struct protocol_get_flash_info *io);
/* Protocol v2 */
int protocol_v2_get_info(struct mbox_context *context,
struct protocol_get_info *io);
+int protocol_v2_get_flash_info(struct mbox_context *context,
+ struct protocol_get_flash_info *io);
#endif /* PROTOCOL_H */