aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/opal.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/include/asm/opal.h')
-rw-r--r--arch/powerpc/include/asm/opal.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h
index fe2aa0b48d2b..a2efdaa020b0 100644
--- a/arch/powerpc/include/asm/opal.h
+++ b/arch/powerpc/include/asm/opal.h
@@ -87,6 +87,7 @@ extern int opal_enter_rtas(struct rtas_args *args,
87#define OPAL_ASYNC_COMPLETION -15 87#define OPAL_ASYNC_COMPLETION -15
88 88
89/* API Tokens (in r0) */ 89/* API Tokens (in r0) */
90#define OPAL_INVALID_CALL -1
90#define OPAL_CONSOLE_WRITE 1 91#define OPAL_CONSOLE_WRITE 1
91#define OPAL_CONSOLE_READ 2 92#define OPAL_CONSOLE_READ 2
92#define OPAL_RTC_READ 3 93#define OPAL_RTC_READ 3
@@ -177,6 +178,8 @@ extern int opal_enter_rtas(struct rtas_args *args,
177 178
178#ifndef __ASSEMBLY__ 179#ifndef __ASSEMBLY__
179 180
181#include <linux/notifier.h>
182
180/* Other enums */ 183/* Other enums */
181enum OpalVendorApiTokens { 184enum OpalVendorApiTokens {
182 OPAL_START_VENDOR_API_RANGE = 1000, OPAL_END_VENDOR_API_RANGE = 1999 185 OPAL_START_VENDOR_API_RANGE = 1000, OPAL_END_VENDOR_API_RANGE = 1999
@@ -422,9 +425,9 @@ enum OpalSysparamPerm {
422}; 425};
423 426
424struct opal_msg { 427struct opal_msg {
425 uint32_t msg_type; 428 __be32 msg_type;
426 uint32_t reserved; 429 __be32 reserved;
427 uint64_t params[8]; 430 __be64 params[8];
428}; 431};
429 432
430struct opal_machine_check_event { 433struct opal_machine_check_event {
@@ -730,7 +733,11 @@ typedef struct oppanel_line {
730/* /sys/firmware/opal */ 733/* /sys/firmware/opal */
731extern struct kobject *opal_kobj; 734extern struct kobject *opal_kobj;
732 735
736/* /ibm,opal */
737extern struct device_node *opal_node;
738
733/* API functions */ 739/* API functions */
740int64_t opal_invalid_call(void);
734int64_t opal_console_write(int64_t term_number, __be64 *length, 741int64_t opal_console_write(int64_t term_number, __be64 *length,
735 const uint8_t *buffer); 742 const uint8_t *buffer);
736int64_t opal_console_read(int64_t term_number, __be64 *length, 743int64_t opal_console_read(int64_t term_number, __be64 *length,
@@ -874,8 +881,7 @@ int64_t opal_get_param(uint64_t token, uint32_t param_id, uint64_t buffer,
874 size_t length); 881 size_t length);
875int64_t opal_set_param(uint64_t token, uint32_t param_id, uint64_t buffer, 882int64_t opal_set_param(uint64_t token, uint32_t param_id, uint64_t buffer,
876 size_t length); 883 size_t length);
877int64_t opal_sensor_read(uint32_t sensor_hndl, int token, 884int64_t opal_sensor_read(uint32_t sensor_hndl, int token, __be32 *sensor_data);
878 uint32_t *sensor_data);
879 885
880/* Internal functions */ 886/* Internal functions */
881extern int early_init_dt_scan_opal(unsigned long node, const char *uname, int depth, void *data); 887extern int early_init_dt_scan_opal(unsigned long node, const char *uname, int depth, void *data);
@@ -892,6 +898,8 @@ extern int early_init_dt_scan_opal(unsigned long node, const char *uname,
892 int depth, void *data); 898 int depth, void *data);
893 899
894extern int opal_notifier_register(struct notifier_block *nb); 900extern int opal_notifier_register(struct notifier_block *nb);
901extern int opal_notifier_unregister(struct notifier_block *nb);
902
895extern int opal_message_notifier_register(enum OpalMessageType msg_type, 903extern int opal_message_notifier_register(enum OpalMessageType msg_type,
896 struct notifier_block *nb); 904 struct notifier_block *nb);
897extern void opal_notifier_enable(void); 905extern void opal_notifier_enable(void);
@@ -919,6 +927,7 @@ extern void opal_flash_init(void);
919extern int opal_elog_init(void); 927extern int opal_elog_init(void);
920extern void opal_platform_dump_init(void); 928extern void opal_platform_dump_init(void);
921extern void opal_sys_param_init(void); 929extern void opal_sys_param_init(void);
930extern void opal_msglog_init(void);
922 931
923extern int opal_machine_check(struct pt_regs *regs); 932extern int opal_machine_check(struct pt_regs *regs);
924extern bool opal_mce_check_early_recovery(struct pt_regs *regs); 933extern bool opal_mce_check_early_recovery(struct pt_regs *regs);