diff options
Diffstat (limited to 'arch/powerpc/include/asm/opal.h')
-rw-r--r-- | arch/powerpc/include/asm/opal.h | 19 |
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 */ |
181 | enum OpalVendorApiTokens { | 184 | enum 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 | ||
424 | struct opal_msg { | 427 | struct 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 | ||
430 | struct opal_machine_check_event { | 433 | struct opal_machine_check_event { |
@@ -730,7 +733,11 @@ typedef struct oppanel_line { | |||
730 | /* /sys/firmware/opal */ | 733 | /* /sys/firmware/opal */ |
731 | extern struct kobject *opal_kobj; | 734 | extern struct kobject *opal_kobj; |
732 | 735 | ||
736 | /* /ibm,opal */ | ||
737 | extern struct device_node *opal_node; | ||
738 | |||
733 | /* API functions */ | 739 | /* API functions */ |
740 | int64_t opal_invalid_call(void); | ||
734 | int64_t opal_console_write(int64_t term_number, __be64 *length, | 741 | int64_t opal_console_write(int64_t term_number, __be64 *length, |
735 | const uint8_t *buffer); | 742 | const uint8_t *buffer); |
736 | int64_t opal_console_read(int64_t term_number, __be64 *length, | 743 | int64_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); |
875 | int64_t opal_set_param(uint64_t token, uint32_t param_id, uint64_t buffer, | 882 | int64_t opal_set_param(uint64_t token, uint32_t param_id, uint64_t buffer, |
876 | size_t length); | 883 | size_t length); |
877 | int64_t opal_sensor_read(uint32_t sensor_hndl, int token, | 884 | int64_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 */ |
881 | extern int early_init_dt_scan_opal(unsigned long node, const char *uname, int depth, void *data); | 887 | extern 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 | ||
894 | extern int opal_notifier_register(struct notifier_block *nb); | 900 | extern int opal_notifier_register(struct notifier_block *nb); |
901 | extern int opal_notifier_unregister(struct notifier_block *nb); | ||
902 | |||
895 | extern int opal_message_notifier_register(enum OpalMessageType msg_type, | 903 | extern int opal_message_notifier_register(enum OpalMessageType msg_type, |
896 | struct notifier_block *nb); | 904 | struct notifier_block *nb); |
897 | extern void opal_notifier_enable(void); | 905 | extern void opal_notifier_enable(void); |
@@ -919,6 +927,7 @@ extern void opal_flash_init(void); | |||
919 | extern int opal_elog_init(void); | 927 | extern int opal_elog_init(void); |
920 | extern void opal_platform_dump_init(void); | 928 | extern void opal_platform_dump_init(void); |
921 | extern void opal_sys_param_init(void); | 929 | extern void opal_sys_param_init(void); |
930 | extern void opal_msglog_init(void); | ||
922 | 931 | ||
923 | extern int opal_machine_check(struct pt_regs *regs); | 932 | extern int opal_machine_check(struct pt_regs *regs); |
924 | extern bool opal_mce_check_early_recovery(struct pt_regs *regs); | 933 | extern bool opal_mce_check_early_recovery(struct pt_regs *regs); |