summaryrefslogtreecommitdiff
path: root/drivers/soc/qcom/pdr_internal.h
blob: 8d17f7fb79e782a9ab0696666c39de3cfc989795 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __QCOM_PDR_HELPER_INTERNAL__
#define __QCOM_PDR_HELPER_INTERNAL__

#include <linux/soc/qcom/pdr.h>

#define SERVREG_LOCATOR_SERVICE				0x40
#define SERVREG_NOTIFIER_SERVICE			0x42

#define SERVREG_REGISTER_LISTENER_REQ			0x20
#define SERVREG_GET_DOMAIN_LIST_REQ			0x21
#define SERVREG_STATE_UPDATED_IND_ID			0x22
#define SERVREG_SET_ACK_REQ				0x23
#define SERVREG_RESTART_PD_REQ				0x24

#define SERVREG_LOC_PFR_REQ				0x24

#define SERVREG_DOMAIN_LIST_LENGTH			32
#define SERVREG_RESTART_PD_REQ_MAX_LEN			67
#define SERVREG_REGISTER_LISTENER_REQ_LEN		71
#define SERVREG_SET_ACK_REQ_LEN				72
#define SERVREG_GET_DOMAIN_LIST_REQ_MAX_LEN		74
#define SERVREG_STATE_UPDATED_IND_MAX_LEN		79
#define SERVREG_GET_DOMAIN_LIST_RESP_MAX_LEN		2389
#define SERVREG_LOC_PFR_RESP_MAX_LEN			10

struct servreg_location_entry {
	char name[SERVREG_NAME_LENGTH + 1];
	u8 service_data_valid;
	u32 service_data;
	u32 instance;
};

struct servreg_get_domain_list_req {
	char service_name[SERVREG_NAME_LENGTH + 1];
	u8 domain_offset_valid;
	u32 domain_offset;
};

struct servreg_get_domain_list_resp {
	struct qmi_response_type_v01 resp;
	u8 total_domains_valid;
	u16 total_domains;
	u8 db_rev_count_valid;
	u16 db_rev_count;
	u8 domain_list_valid;
	u32 domain_list_len;
	struct servreg_location_entry domain_list[SERVREG_DOMAIN_LIST_LENGTH];
};

struct servreg_register_listener_req {
	u8 enable;
	char service_path[SERVREG_NAME_LENGTH + 1];
};

struct servreg_register_listener_resp {
	struct qmi_response_type_v01 resp;
	u8 curr_state_valid;
	enum servreg_service_state curr_state;
};

struct servreg_restart_pd_req {
	char service_path[SERVREG_NAME_LENGTH + 1];
};

struct servreg_restart_pd_resp {
	struct qmi_response_type_v01 resp;
};

struct servreg_state_updated_ind {
	enum servreg_service_state curr_state;
	char service_path[SERVREG_NAME_LENGTH + 1];
	u16 transaction_id;
};

struct servreg_set_ack_req {
	char service_path[SERVREG_NAME_LENGTH + 1];
	u16 transaction_id;
};

struct servreg_set_ack_resp {
	struct qmi_response_type_v01 resp;
};

struct servreg_loc_pfr_req {
	char service[SERVREG_NAME_LENGTH + 1];
	char reason[257];
};

struct servreg_loc_pfr_resp {
	struct qmi_response_type_v01 rsp;
};

extern const struct qmi_elem_info servreg_location_entry_ei[];
extern const struct qmi_elem_info servreg_get_domain_list_req_ei[];
extern const struct qmi_elem_info servreg_get_domain_list_resp_ei[];
extern const struct qmi_elem_info servreg_register_listener_req_ei[];
extern const struct qmi_elem_info servreg_register_listener_resp_ei[];
extern const struct qmi_elem_info servreg_restart_pd_req_ei[];
extern const struct qmi_elem_info servreg_restart_pd_resp_ei[];
extern const struct qmi_elem_info servreg_state_updated_ind_ei[];
extern const struct qmi_elem_info servreg_set_ack_req_ei[];
extern const struct qmi_elem_info servreg_set_ack_resp_ei[];
extern const struct qmi_elem_info servreg_loc_pfr_req_ei[];
extern const struct qmi_elem_info servreg_loc_pfr_resp_ei[];

#endif