aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCyril Bur <cyril.bur@au1.ibm.com>2017-05-24 16:37:18 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-05-26 15:55:23 +1000
commit3476c6ec24140f538d5555a36afe42c064b13e31 (patch)
treed0e926cd8c361b36edaa35914a2b5aa94f65a5dd /include
parent0322cd881ab3fda2b8136d6beb3991fd9d2dc5e7 (diff)
downloadskiboot-3476c6ec24140f538d5555a36afe42c064b13e31.zip
skiboot-3476c6ec24140f538d5555a36afe42c064b13e31.tar.gz
skiboot-3476c6ec24140f538d5555a36afe42c064b13e31.tar.bz2
libflash/mbox-flash: Update to V2 of the protocol
Updated version 2 of the protocol can be found at: https://github.com/openbmc/mboxbridge/blob/master/Documentation/mbox_protocol.md This commit changes mbox-flash such that it will preferentially talk version 2 to any capable daemon but still remain capable of talking to v1 daemons. Version two changes some of the command definitions for increased consistency and usability. Version two includes more attention bits - these are now dealt with at a simple level. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com> Acked-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/lpc-mbox.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/lpc-mbox.h b/include/lpc-mbox.h
index 14e38cf..ca5e50c 100644
--- a/include/lpc-mbox.h
+++ b/include/lpc-mbox.h
@@ -33,6 +33,8 @@
#define MBOX_C_MARK_WRITE_DIRTY 0x07
#define MBOX_C_WRITE_FLUSH 0x08
#define MBOX_C_BMC_EVENT_ACK 0x09
+#define MBOX_C_MARK_WRITE_ERASED 0x0a
+#define MBOX_COMMAND_COUNT 10
#define MBOX_R_SUCCESS 0x01
#define MBOX_R_PARAM_ERROR 0x02
@@ -40,6 +42,12 @@
#define MBOX_R_SYSTEM_ERROR 0x04
#define MBOX_R_TIMEOUT 0x05
+#define MBOX_ATTN_ACK_MASK 0x3
+#define MBOX_ATTN_BMC_REBOOT (1 << 0)
+#define MBOX_ATTN_BMC_WINDOW_RESET (1 << 1)
+#define MBOX_ATTN_BMC_FLASH_LOST (1 << 6)
+#define MBOX_ATTN_BMC_DAEMON_READY (1 << 7)
+
/* Default poll interval before interrupts are working */
#define MBOX_DEFAULT_POLL_MS 200
@@ -55,4 +63,7 @@ struct bmc_mbox_msg {
int bmc_mbox_enqueue(struct bmc_mbox_msg *msg);
int bmc_mbox_register_callback(void (*callback)(struct bmc_mbox_msg *msg, void *priv),
void *drv_data);
+int bmc_mbox_register_attn(void (*callback)(uint8_t bits, void *priv),
+ void *drv_data);
+uint8_t bmc_mbox_get_attn_reg(void);
#endif /* __LPC_MBOX_H */