Lines Matching refs:msg

43 static void report_version(struct scmi_msg *msg)  in report_version()  argument
50 if (msg->in_size) { in report_version()
51 scmi_status_response(msg, SCMI_PROTOCOL_ERROR); in report_version()
55 scmi_write_response(msg, &return_values, sizeof(return_values)); in report_version()
58 static void report_attributes(struct scmi_msg *msg) in report_attributes() argument
62 .attributes = plat_scmi_rd_count(msg->channel_id), in report_attributes()
65 if (msg->in_size) { in report_attributes()
66 scmi_status_response(msg, SCMI_PROTOCOL_ERROR); in report_attributes()
70 scmi_write_response(msg, &return_values, sizeof(return_values)); in report_attributes()
73 static void report_message_attributes(struct scmi_msg *msg) in report_message_attributes() argument
75 struct scmi_protocol_message_attributes_a2p *in_args = (void *)msg->in; in report_message_attributes()
82 if (msg->in_size != sizeof(*in_args)) { in report_message_attributes()
83 scmi_status_response(msg, SCMI_PROTOCOL_ERROR); in report_message_attributes()
88 scmi_status_response(msg, SCMI_NOT_FOUND); in report_message_attributes()
92 scmi_write_response(msg, &return_values, sizeof(return_values)); in report_message_attributes()
95 static void reset_domain_attributes(struct scmi_msg *msg) in reset_domain_attributes() argument
97 struct scmi_reset_domain_attributes_a2p *in_args = (void *)msg->in; in reset_domain_attributes()
102 if (msg->in_size != sizeof(*in_args)) { in reset_domain_attributes()
103 scmi_status_response(msg, SCMI_PROTOCOL_ERROR); in reset_domain_attributes()
107 if (in_args->domain_id >= plat_scmi_rd_count(msg->channel_id)) { in reset_domain_attributes()
108 scmi_status_response(msg, SCMI_INVALID_PARAMETERS); in reset_domain_attributes()
113 plat_scmi_rd_count(msg->channel_id)); in reset_domain_attributes()
115 name = plat_scmi_rd_get_name(msg->channel_id, domain_id); in reset_domain_attributes()
117 scmi_status_response(msg, SCMI_NOT_FOUND); in reset_domain_attributes()
126 scmi_write_response(msg, &return_values, sizeof(return_values)); in reset_domain_attributes()
129 static void reset_request(struct scmi_msg *msg) in reset_request() argument
131 struct scmi_reset_domain_request_a2p *in_args = (void *)msg->in; in reset_request()
138 plat_scmi_rd_count(msg->channel_id)); in reset_request()
140 if (msg->in_size != sizeof(*in_args)) { in reset_request()
141 scmi_status_response(msg, SCMI_PROTOCOL_ERROR); in reset_request()
145 if (in_args->domain_id >= plat_scmi_rd_count(msg->channel_id)) { in reset_request()
146 scmi_status_response(msg, SCMI_NOT_FOUND); in reset_request()
151 out_args.status = plat_scmi_rd_autonomous(msg->channel_id, in reset_request()
155 out_args.status = plat_scmi_rd_set_state(msg->channel_id, in reset_request()
158 out_args.status = plat_scmi_rd_set_state(msg->channel_id, in reset_request()
162 scmi_status_response(msg, out_args.status); in reset_request()
164 scmi_write_response(msg, &out_args, sizeof(out_args)); in reset_request()
181 scmi_msg_handler_t scmi_msg_get_rd_handler(struct scmi_msg *msg) in scmi_msg_get_rd_handler() argument
186 if (msg->message_id >= array_size) { in scmi_msg_get_rd_handler()
187 DMSG("Reset domain handle not found %u", msg->message_id); in scmi_msg_get_rd_handler()
191 message_id = confine_array_index(msg->message_id, array_size); in scmi_msg_get_rd_handler()