diff options
Diffstat (limited to 'arch/powerpc/include/asm/opal.h')
-rw-r--r-- | arch/powerpc/include/asm/opal.h | 42 |
1 files changed, 19 insertions, 23 deletions
diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h index a2efdaa020b0..66ad7a74116f 100644 --- a/arch/powerpc/include/asm/opal.h +++ b/arch/powerpc/include/asm/opal.h | |||
@@ -41,14 +41,14 @@ struct opal_takeover_args { | |||
41 | * size except the last one in the list to be as well. | 41 | * size except the last one in the list to be as well. |
42 | */ | 42 | */ |
43 | struct opal_sg_entry { | 43 | struct opal_sg_entry { |
44 | void *data; | 44 | __be64 data; |
45 | long length; | 45 | __be64 length; |
46 | }; | 46 | }; |
47 | 47 | ||
48 | /* sg list */ | 48 | /* SG list */ |
49 | struct opal_sg_list { | 49 | struct opal_sg_list { |
50 | unsigned long num_entries; | 50 | __be64 length; |
51 | struct opal_sg_list *next; | 51 | __be64 next; |
52 | struct opal_sg_entry entry[]; | 52 | struct opal_sg_entry entry[]; |
53 | }; | 53 | }; |
54 | 54 | ||
@@ -858,8 +858,8 @@ int64_t opal_lpc_write(uint32_t chip_id, enum OpalLPCAddressType addr_type, | |||
858 | int64_t opal_lpc_read(uint32_t chip_id, enum OpalLPCAddressType addr_type, | 858 | int64_t opal_lpc_read(uint32_t chip_id, enum OpalLPCAddressType addr_type, |
859 | uint32_t addr, __be32 *data, uint32_t sz); | 859 | uint32_t addr, __be32 *data, uint32_t sz); |
860 | 860 | ||
861 | int64_t opal_read_elog(uint64_t buffer, size_t size, uint64_t log_id); | 861 | int64_t opal_read_elog(uint64_t buffer, uint64_t size, uint64_t log_id); |
862 | int64_t opal_get_elog_size(uint64_t *log_id, size_t *size, uint64_t *elog_type); | 862 | int64_t opal_get_elog_size(__be64 *log_id, __be64 *size, __be64 *elog_type); |
863 | int64_t opal_write_elog(uint64_t buffer, uint64_t size, uint64_t offset); | 863 | int64_t opal_write_elog(uint64_t buffer, uint64_t size, uint64_t offset); |
864 | int64_t opal_send_ack_elog(uint64_t log_id); | 864 | int64_t opal_send_ack_elog(uint64_t log_id); |
865 | void opal_resend_pending_logs(void); | 865 | void opal_resend_pending_logs(void); |
@@ -868,23 +868,24 @@ int64_t opal_validate_flash(uint64_t buffer, uint32_t *size, uint32_t *result); | |||
868 | int64_t opal_manage_flash(uint8_t op); | 868 | int64_t opal_manage_flash(uint8_t op); |
869 | int64_t opal_update_flash(uint64_t blk_list); | 869 | int64_t opal_update_flash(uint64_t blk_list); |
870 | int64_t opal_dump_init(uint8_t dump_type); | 870 | int64_t opal_dump_init(uint8_t dump_type); |
871 | int64_t opal_dump_info(uint32_t *dump_id, uint32_t *dump_size); | 871 | int64_t opal_dump_info(__be32 *dump_id, __be32 *dump_size); |
872 | int64_t opal_dump_info2(uint32_t *dump_id, uint32_t *dump_size, uint32_t *dump_type); | 872 | int64_t opal_dump_info2(__be32 *dump_id, __be32 *dump_size, __be32 *dump_type); |
873 | int64_t opal_dump_read(uint32_t dump_id, uint64_t buffer); | 873 | int64_t opal_dump_read(uint32_t dump_id, uint64_t buffer); |
874 | int64_t opal_dump_ack(uint32_t dump_id); | 874 | int64_t opal_dump_ack(uint32_t dump_id); |
875 | int64_t opal_dump_resend_notification(void); | 875 | int64_t opal_dump_resend_notification(void); |
876 | 876 | ||
877 | int64_t opal_get_msg(uint64_t buffer, size_t size); | 877 | int64_t opal_get_msg(uint64_t buffer, uint64_t size); |
878 | int64_t opal_check_completion(uint64_t buffer, size_t size, uint64_t token); | 878 | int64_t opal_check_completion(uint64_t buffer, uint64_t size, uint64_t token); |
879 | int64_t opal_sync_host_reboot(void); | 879 | int64_t opal_sync_host_reboot(void); |
880 | int64_t opal_get_param(uint64_t token, uint32_t param_id, uint64_t buffer, | 880 | int64_t opal_get_param(uint64_t token, uint32_t param_id, uint64_t buffer, |
881 | size_t length); | 881 | uint64_t length); |
882 | 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, |
883 | size_t length); | 883 | uint64_t length); |
884 | int64_t opal_sensor_read(uint32_t sensor_hndl, int token, __be32 *sensor_data); | 884 | int64_t opal_sensor_read(uint32_t sensor_hndl, int token, __be32 *sensor_data); |
885 | 885 | ||
886 | /* Internal functions */ | 886 | /* Internal functions */ |
887 | 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, |
888 | int depth, void *data); | ||
888 | extern int early_init_dt_scan_recoverable_ranges(unsigned long node, | 889 | extern int early_init_dt_scan_recoverable_ranges(unsigned long node, |
889 | const char *uname, int depth, void *data); | 890 | const char *uname, int depth, void *data); |
890 | 891 | ||
@@ -893,10 +894,6 @@ extern int opal_put_chars(uint32_t vtermno, const char *buf, int total_len); | |||
893 | 894 | ||
894 | extern void hvc_opal_init_early(void); | 895 | extern void hvc_opal_init_early(void); |
895 | 896 | ||
896 | /* Internal functions */ | ||
897 | extern int early_init_dt_scan_opal(unsigned long node, const char *uname, | ||
898 | int depth, void *data); | ||
899 | |||
900 | extern int opal_notifier_register(struct notifier_block *nb); | 897 | extern int opal_notifier_register(struct notifier_block *nb); |
901 | extern int opal_notifier_unregister(struct notifier_block *nb); | 898 | extern int opal_notifier_unregister(struct notifier_block *nb); |
902 | 899 | ||
@@ -906,9 +903,6 @@ extern void opal_notifier_enable(void); | |||
906 | extern void opal_notifier_disable(void); | 903 | extern void opal_notifier_disable(void); |
907 | extern void opal_notifier_update_evt(uint64_t evt_mask, uint64_t evt_val); | 904 | extern void opal_notifier_update_evt(uint64_t evt_mask, uint64_t evt_val); |
908 | 905 | ||
909 | extern int opal_get_chars(uint32_t vtermno, char *buf, int count); | ||
910 | extern int opal_put_chars(uint32_t vtermno, const char *buf, int total_len); | ||
911 | |||
912 | extern int __opal_async_get_token(void); | 906 | extern int __opal_async_get_token(void); |
913 | extern int opal_async_get_token_interruptible(void); | 907 | extern int opal_async_get_token_interruptible(void); |
914 | extern int __opal_async_release_token(int token); | 908 | extern int __opal_async_release_token(int token); |
@@ -916,8 +910,6 @@ extern int opal_async_release_token(int token); | |||
916 | extern int opal_async_wait_response(uint64_t token, struct opal_msg *msg); | 910 | extern int opal_async_wait_response(uint64_t token, struct opal_msg *msg); |
917 | extern int opal_get_sensor_data(u32 sensor_hndl, u32 *sensor_data); | 911 | extern int opal_get_sensor_data(u32 sensor_hndl, u32 *sensor_data); |
918 | 912 | ||
919 | extern void hvc_opal_init_early(void); | ||
920 | |||
921 | struct rtc_time; | 913 | struct rtc_time; |
922 | extern int opal_set_rtc_time(struct rtc_time *tm); | 914 | extern int opal_set_rtc_time(struct rtc_time *tm); |
923 | extern void opal_get_rtc_time(struct rtc_time *tm); | 915 | extern void opal_get_rtc_time(struct rtc_time *tm); |
@@ -937,6 +929,10 @@ extern int opal_resync_timebase(void); | |||
937 | 929 | ||
938 | extern void opal_lpc_init(void); | 930 | extern void opal_lpc_init(void); |
939 | 931 | ||
932 | struct opal_sg_list *opal_vmalloc_to_sg_list(void *vmalloc_addr, | ||
933 | unsigned long vmalloc_size); | ||
934 | void opal_free_sg_list(struct opal_sg_list *sg); | ||
935 | |||
940 | #endif /* __ASSEMBLY__ */ | 936 | #endif /* __ASSEMBLY__ */ |
941 | 937 | ||
942 | #endif /* __OPAL_H */ | 938 | #endif /* __OPAL_H */ |