From 50d2e37faf5bb2fd154d4a1eeac465f8016e1f65 Mon Sep 17 00:00:00 2001 From: Joel Stanley Date: Tue, 12 Aug 2014 17:59:41 +1000 Subject: plat/palmetto: Add shutdown and reboot Rebooting and power down for the Palmetto is done by the BMC, which we speak to over the BT interface using IPMI. Implement the IPMI chassis commands which are used for power control, and hook them up to the palmetto platform callbacks for shutdown and reboot. Signed-off-by: Joel Stanley Signed-off-by: Alistair Popple Signed-off-by: Benjamin Herrenschmidt --- include/ipmi.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/ipmi.h') diff --git a/include/ipmi.h b/include/ipmi.h index 3e08cdb..8cc7e5a 100644 --- a/include/ipmi.h +++ b/include/ipmi.h @@ -37,6 +37,12 @@ #define IPMI_READ_EVENT_MSG_BUFFER_CMD 0x35 #define IPMI_GET_CHANNEL_INFO_CMD 0x42 +#define IPMI_NETFN_CHASSIS_REQUEST 0x00 +#define IPMI_NETFN_CHASSIS_RESPONSE 0x01 +#define IPMI_SET_CHASSIS_PWR_DOWN_CMD 0x00 +#define IPMI_SET_CHASSIS_PWR_UP_CMD 0x01 +#define IPMI_SET_CHASSIS_PWR_CYCLE_CMD 0x02 + #define IPMI_NETFN_STORAGE_REQUEST 0x0a #define IPMI_NETFN_STORAGE_RESPONSE 0x0b #define IPMI_GET_SEL_INFO_CMD 0x40 @@ -72,4 +78,7 @@ struct ipmi_msg { /* Initialise the IPMI interface */ void ipmi_init(void); +/* Change the power state of the P8 */ +int64_t ipmi_opal_chassis_request(uint64_t request); + #endif -- cgit v1.1