1 // SPDX-License-Identifier: GPL-2.0
3 /* Copyright (c) 2018, The Linux Foundation. All rights reserved.
4 * Copyright (C) 2018-2020 Linaro Ltd.
6 #include <linux/stddef.h>
7 #include <linux/soc/qcom/qmi.h>
9 #include "ipa_qmi_msg.h"
11 /* QMI message structure definition for struct ipa_indication_register_req */
12 struct qmi_elem_info ipa_indication_register_req_ei[] = {
14 .data_type = QMI_OPT_FLAG,
17 sizeof_field(struct ipa_indication_register_req,
18 master_driver_init_complete_valid),
20 .offset = offsetof(struct ipa_indication_register_req,
21 master_driver_init_complete_valid),
24 .data_type = QMI_UNSIGNED_1_BYTE,
27 sizeof_field(struct ipa_indication_register_req,
28 master_driver_init_complete),
30 .offset = offsetof(struct ipa_indication_register_req,
31 master_driver_init_complete),
34 .data_type = QMI_OPT_FLAG,
37 sizeof_field(struct ipa_indication_register_req,
38 data_usage_quota_reached_valid),
40 .offset = offsetof(struct ipa_indication_register_req,
41 data_usage_quota_reached_valid),
44 .data_type = QMI_UNSIGNED_1_BYTE,
47 sizeof_field(struct ipa_indication_register_req,
48 data_usage_quota_reached),
50 .offset = offsetof(struct ipa_indication_register_req,
51 data_usage_quota_reached),
54 .data_type = QMI_OPT_FLAG,
57 sizeof_field(struct ipa_indication_register_req,
58 ipa_mhi_ready_ind_valid),
60 .offset = offsetof(struct ipa_indication_register_req,
61 ipa_mhi_ready_ind_valid),
64 .data_type = QMI_UNSIGNED_1_BYTE,
67 sizeof_field(struct ipa_indication_register_req,
70 .offset = offsetof(struct ipa_indication_register_req,
74 .data_type = QMI_EOTI,
78 /* QMI message structure definition for struct ipa_indication_register_rsp */
79 struct qmi_elem_info ipa_indication_register_rsp_ei[] = {
81 .data_type = QMI_STRUCT,
84 sizeof_field(struct ipa_indication_register_rsp,
87 .offset = offsetof(struct ipa_indication_register_rsp,
89 .ei_array = qmi_response_type_v01_ei,
92 .data_type = QMI_EOTI,
96 /* QMI message structure definition for struct ipa_driver_init_complete_req */
97 struct qmi_elem_info ipa_driver_init_complete_req_ei[] = {
99 .data_type = QMI_UNSIGNED_1_BYTE,
102 sizeof_field(struct ipa_driver_init_complete_req,
105 .offset = offsetof(struct ipa_driver_init_complete_req,
109 .data_type = QMI_EOTI,
113 /* QMI message structure definition for struct ipa_driver_init_complete_rsp */
114 struct qmi_elem_info ipa_driver_init_complete_rsp_ei[] = {
116 .data_type = QMI_STRUCT,
119 sizeof_field(struct ipa_driver_init_complete_rsp,
122 .offset = offsetof(struct ipa_driver_init_complete_rsp,
124 .ei_array = qmi_response_type_v01_ei,
127 .data_type = QMI_EOTI,
131 /* QMI message structure definition for struct ipa_init_complete_ind */
132 struct qmi_elem_info ipa_init_complete_ind_ei[] = {
134 .data_type = QMI_STRUCT,
137 sizeof_field(struct ipa_init_complete_ind,
140 .offset = offsetof(struct ipa_init_complete_ind,
142 .ei_array = qmi_response_type_v01_ei,
145 .data_type = QMI_EOTI,
149 /* QMI message structure definition for struct ipa_mem_bounds */
150 struct qmi_elem_info ipa_mem_bounds_ei[] = {
152 .data_type = QMI_UNSIGNED_4_BYTE,
155 sizeof_field(struct ipa_mem_bounds, start),
156 .offset = offsetof(struct ipa_mem_bounds, start),
159 .data_type = QMI_UNSIGNED_4_BYTE,
162 sizeof_field(struct ipa_mem_bounds, end),
163 .offset = offsetof(struct ipa_mem_bounds, end),
166 .data_type = QMI_EOTI,
170 /* QMI message structure definition for struct ipa_mem_array */
171 struct qmi_elem_info ipa_mem_array_ei[] = {
173 .data_type = QMI_UNSIGNED_4_BYTE,
176 sizeof_field(struct ipa_mem_array, start),
177 .offset = offsetof(struct ipa_mem_array, start),
180 .data_type = QMI_UNSIGNED_4_BYTE,
183 sizeof_field(struct ipa_mem_array, count),
184 .offset = offsetof(struct ipa_mem_array, count),
187 .data_type = QMI_EOTI,
191 /* QMI message structure definition for struct ipa_mem_range */
192 struct qmi_elem_info ipa_mem_range_ei[] = {
194 .data_type = QMI_UNSIGNED_4_BYTE,
197 sizeof_field(struct ipa_mem_range, start),
198 .offset = offsetof(struct ipa_mem_range, start),
201 .data_type = QMI_UNSIGNED_4_BYTE,
204 sizeof_field(struct ipa_mem_range, size),
205 .offset = offsetof(struct ipa_mem_range, size),
208 .data_type = QMI_EOTI,
212 /* QMI message structure definition for struct ipa_init_modem_driver_req */
213 struct qmi_elem_info ipa_init_modem_driver_req_ei[] = {
215 .data_type = QMI_OPT_FLAG,
218 sizeof_field(struct ipa_init_modem_driver_req,
219 platform_type_valid),
221 .offset = offsetof(struct ipa_init_modem_driver_req,
222 platform_type_valid),
225 .data_type = QMI_SIGNED_4_BYTE_ENUM,
228 sizeof_field(struct ipa_init_modem_driver_req,
231 .offset = offsetof(struct ipa_init_modem_driver_req,
235 .data_type = QMI_OPT_FLAG,
238 sizeof_field(struct ipa_init_modem_driver_req,
241 .offset = offsetof(struct ipa_init_modem_driver_req,
245 .data_type = QMI_STRUCT,
248 sizeof_field(struct ipa_init_modem_driver_req,
251 .offset = offsetof(struct ipa_init_modem_driver_req,
253 .ei_array = ipa_mem_bounds_ei,
256 .data_type = QMI_OPT_FLAG,
259 sizeof_field(struct ipa_init_modem_driver_req,
260 v4_route_tbl_info_valid),
262 .offset = offsetof(struct ipa_init_modem_driver_req,
263 v4_route_tbl_info_valid),
266 .data_type = QMI_STRUCT,
269 sizeof_field(struct ipa_init_modem_driver_req,
272 .offset = offsetof(struct ipa_init_modem_driver_req,
274 .ei_array = ipa_mem_bounds_ei,
277 .data_type = QMI_OPT_FLAG,
280 sizeof_field(struct ipa_init_modem_driver_req,
281 v6_route_tbl_info_valid),
283 .offset = offsetof(struct ipa_init_modem_driver_req,
284 v6_route_tbl_info_valid),
287 .data_type = QMI_STRUCT,
290 sizeof_field(struct ipa_init_modem_driver_req,
293 .offset = offsetof(struct ipa_init_modem_driver_req,
295 .ei_array = ipa_mem_bounds_ei,
298 .data_type = QMI_OPT_FLAG,
301 sizeof_field(struct ipa_init_modem_driver_req,
302 v4_filter_tbl_start_valid),
304 .offset = offsetof(struct ipa_init_modem_driver_req,
305 v4_filter_tbl_start_valid),
308 .data_type = QMI_UNSIGNED_4_BYTE,
311 sizeof_field(struct ipa_init_modem_driver_req,
312 v4_filter_tbl_start),
314 .offset = offsetof(struct ipa_init_modem_driver_req,
315 v4_filter_tbl_start),
318 .data_type = QMI_OPT_FLAG,
321 sizeof_field(struct ipa_init_modem_driver_req,
322 v6_filter_tbl_start_valid),
324 .offset = offsetof(struct ipa_init_modem_driver_req,
325 v6_filter_tbl_start_valid),
328 .data_type = QMI_UNSIGNED_4_BYTE,
331 sizeof_field(struct ipa_init_modem_driver_req,
332 v6_filter_tbl_start),
334 .offset = offsetof(struct ipa_init_modem_driver_req,
335 v6_filter_tbl_start),
338 .data_type = QMI_OPT_FLAG,
341 sizeof_field(struct ipa_init_modem_driver_req,
342 modem_mem_info_valid),
344 .offset = offsetof(struct ipa_init_modem_driver_req,
345 modem_mem_info_valid),
348 .data_type = QMI_STRUCT,
351 sizeof_field(struct ipa_init_modem_driver_req,
354 .offset = offsetof(struct ipa_init_modem_driver_req,
356 .ei_array = ipa_mem_range_ei,
359 .data_type = QMI_OPT_FLAG,
362 sizeof_field(struct ipa_init_modem_driver_req,
363 ctrl_comm_dest_end_pt_valid),
365 .offset = offsetof(struct ipa_init_modem_driver_req,
366 ctrl_comm_dest_end_pt_valid),
369 .data_type = QMI_UNSIGNED_4_BYTE,
372 sizeof_field(struct ipa_init_modem_driver_req,
373 ctrl_comm_dest_end_pt),
375 .offset = offsetof(struct ipa_init_modem_driver_req,
376 ctrl_comm_dest_end_pt),
379 .data_type = QMI_OPT_FLAG,
382 sizeof_field(struct ipa_init_modem_driver_req,
385 .offset = offsetof(struct ipa_init_modem_driver_req,
389 .data_type = QMI_UNSIGNED_1_BYTE,
392 sizeof_field(struct ipa_init_modem_driver_req,
395 .offset = offsetof(struct ipa_init_modem_driver_req,
399 .data_type = QMI_OPT_FLAG,
402 sizeof_field(struct ipa_init_modem_driver_req,
403 hdr_proc_ctx_tbl_info_valid),
405 .offset = offsetof(struct ipa_init_modem_driver_req,
406 hdr_proc_ctx_tbl_info_valid),
409 .data_type = QMI_STRUCT,
412 sizeof_field(struct ipa_init_modem_driver_req,
413 hdr_proc_ctx_tbl_info),
415 .offset = offsetof(struct ipa_init_modem_driver_req,
416 hdr_proc_ctx_tbl_info),
417 .ei_array = ipa_mem_bounds_ei,
420 .data_type = QMI_OPT_FLAG,
423 sizeof_field(struct ipa_init_modem_driver_req,
426 .offset = offsetof(struct ipa_init_modem_driver_req,
430 .data_type = QMI_STRUCT,
433 sizeof_field(struct ipa_init_modem_driver_req,
436 .offset = offsetof(struct ipa_init_modem_driver_req,
438 .ei_array = ipa_mem_bounds_ei,
441 .data_type = QMI_OPT_FLAG,
444 sizeof_field(struct ipa_init_modem_driver_req,
445 v4_hash_route_tbl_info_valid),
447 .offset = offsetof(struct ipa_init_modem_driver_req,
448 v4_hash_route_tbl_info_valid),
451 .data_type = QMI_STRUCT,
454 sizeof_field(struct ipa_init_modem_driver_req,
455 v4_hash_route_tbl_info),
457 .offset = offsetof(struct ipa_init_modem_driver_req,
458 v4_hash_route_tbl_info),
459 .ei_array = ipa_mem_bounds_ei,
462 .data_type = QMI_OPT_FLAG,
465 sizeof_field(struct ipa_init_modem_driver_req,
466 v6_hash_route_tbl_info_valid),
468 .offset = offsetof(struct ipa_init_modem_driver_req,
469 v6_hash_route_tbl_info_valid),
472 .data_type = QMI_STRUCT,
475 sizeof_field(struct ipa_init_modem_driver_req,
476 v6_hash_route_tbl_info),
478 .offset = offsetof(struct ipa_init_modem_driver_req,
479 v6_hash_route_tbl_info),
480 .ei_array = ipa_mem_bounds_ei,
483 .data_type = QMI_OPT_FLAG,
486 sizeof_field(struct ipa_init_modem_driver_req,
487 v4_hash_filter_tbl_start_valid),
489 .offset = offsetof(struct ipa_init_modem_driver_req,
490 v4_hash_filter_tbl_start_valid),
493 .data_type = QMI_UNSIGNED_4_BYTE,
496 sizeof_field(struct ipa_init_modem_driver_req,
497 v4_hash_filter_tbl_start),
499 .offset = offsetof(struct ipa_init_modem_driver_req,
500 v4_hash_filter_tbl_start),
503 .data_type = QMI_OPT_FLAG,
506 sizeof_field(struct ipa_init_modem_driver_req,
507 v6_hash_filter_tbl_start_valid),
509 .offset = offsetof(struct ipa_init_modem_driver_req,
510 v6_hash_filter_tbl_start_valid),
513 .data_type = QMI_UNSIGNED_4_BYTE,
516 sizeof_field(struct ipa_init_modem_driver_req,
517 v6_hash_filter_tbl_start),
519 .offset = offsetof(struct ipa_init_modem_driver_req,
520 v6_hash_filter_tbl_start),
523 .data_type = QMI_OPT_FLAG,
526 sizeof_field(struct ipa_init_modem_driver_req,
527 hw_stats_quota_base_addr_valid),
529 .offset = offsetof(struct ipa_init_modem_driver_req,
530 hw_stats_quota_base_addr_valid),
533 .data_type = QMI_SIGNED_4_BYTE_ENUM,
536 sizeof_field(struct ipa_init_modem_driver_req,
537 hw_stats_quota_base_addr),
539 .offset = offsetof(struct ipa_init_modem_driver_req,
540 hw_stats_quota_base_addr),
543 .data_type = QMI_OPT_FLAG,
546 sizeof_field(struct ipa_init_modem_driver_req,
547 hw_stats_quota_size_valid),
549 .offset = offsetof(struct ipa_init_modem_driver_req,
550 hw_stats_quota_size_valid),
553 .data_type = QMI_SIGNED_4_BYTE_ENUM,
556 sizeof_field(struct ipa_init_modem_driver_req,
557 hw_stats_quota_size),
559 .offset = offsetof(struct ipa_init_modem_driver_req,
560 hw_stats_quota_size),
563 .data_type = QMI_OPT_FLAG,
566 sizeof_field(struct ipa_init_modem_driver_req,
567 hw_stats_drop_size_valid),
569 .offset = offsetof(struct ipa_init_modem_driver_req,
570 hw_stats_drop_size_valid),
573 .data_type = QMI_SIGNED_4_BYTE_ENUM,
576 sizeof_field(struct ipa_init_modem_driver_req,
579 .offset = offsetof(struct ipa_init_modem_driver_req,
583 .data_type = QMI_EOTI,
587 /* QMI message structure definition for struct ipa_init_modem_driver_rsp */
588 struct qmi_elem_info ipa_init_modem_driver_rsp_ei[] = {
590 .data_type = QMI_STRUCT,
593 sizeof_field(struct ipa_init_modem_driver_rsp,
596 .offset = offsetof(struct ipa_init_modem_driver_rsp,
598 .ei_array = qmi_response_type_v01_ei,
601 .data_type = QMI_OPT_FLAG,
604 sizeof_field(struct ipa_init_modem_driver_rsp,
605 ctrl_comm_dest_end_pt_valid),
607 .offset = offsetof(struct ipa_init_modem_driver_rsp,
608 ctrl_comm_dest_end_pt_valid),
611 .data_type = QMI_UNSIGNED_4_BYTE,
614 sizeof_field(struct ipa_init_modem_driver_rsp,
615 ctrl_comm_dest_end_pt),
617 .offset = offsetof(struct ipa_init_modem_driver_rsp,
618 ctrl_comm_dest_end_pt),
621 .data_type = QMI_OPT_FLAG,
624 sizeof_field(struct ipa_init_modem_driver_rsp,
625 default_end_pt_valid),
627 .offset = offsetof(struct ipa_init_modem_driver_rsp,
628 default_end_pt_valid),
631 .data_type = QMI_UNSIGNED_4_BYTE,
634 sizeof_field(struct ipa_init_modem_driver_rsp,
637 .offset = offsetof(struct ipa_init_modem_driver_rsp,
641 .data_type = QMI_OPT_FLAG,
644 sizeof_field(struct ipa_init_modem_driver_rsp,
645 modem_driver_init_pending_valid),
647 .offset = offsetof(struct ipa_init_modem_driver_rsp,
648 modem_driver_init_pending_valid),
651 .data_type = QMI_UNSIGNED_1_BYTE,
654 sizeof_field(struct ipa_init_modem_driver_rsp,
655 modem_driver_init_pending),
657 .offset = offsetof(struct ipa_init_modem_driver_rsp,
658 modem_driver_init_pending),
661 .data_type = QMI_EOTI,