1 // SPDX-License-Identifier: GPL-2.0
3 /* Copyright (c) 2018, The Linux Foundation. All rights reserved.
4 * Copyright (C) 2018-2022 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 const 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_OPT_FLAG,
77 sizeof_field(struct ipa_indication_register_req,
78 endpoint_desc_ind_valid),
80 .offset = offsetof(struct ipa_indication_register_req,
81 endpoint_desc_ind_valid),
84 .data_type = QMI_UNSIGNED_1_BYTE,
87 sizeof_field(struct ipa_indication_register_req,
90 .offset = offsetof(struct ipa_indication_register_req,
94 .data_type = QMI_OPT_FLAG,
97 sizeof_field(struct ipa_indication_register_req,
100 .offset = offsetof(struct ipa_indication_register_req,
101 bw_change_ind_valid),
104 .data_type = QMI_UNSIGNED_1_BYTE,
107 sizeof_field(struct ipa_indication_register_req,
110 .offset = offsetof(struct ipa_indication_register_req,
114 .data_type = QMI_EOTI,
118 /* QMI message structure definition for struct ipa_indication_register_rsp */
119 const struct qmi_elem_info ipa_indication_register_rsp_ei[] = {
121 .data_type = QMI_STRUCT,
124 sizeof_field(struct ipa_indication_register_rsp,
127 .offset = offsetof(struct ipa_indication_register_rsp,
129 .ei_array = qmi_response_type_v01_ei,
132 .data_type = QMI_EOTI,
136 /* QMI message structure definition for struct ipa_driver_init_complete_req */
137 const struct qmi_elem_info ipa_driver_init_complete_req_ei[] = {
139 .data_type = QMI_UNSIGNED_1_BYTE,
142 sizeof_field(struct ipa_driver_init_complete_req,
145 .offset = offsetof(struct ipa_driver_init_complete_req,
149 .data_type = QMI_EOTI,
153 /* QMI message structure definition for struct ipa_driver_init_complete_rsp */
154 const struct qmi_elem_info ipa_driver_init_complete_rsp_ei[] = {
156 .data_type = QMI_STRUCT,
159 sizeof_field(struct ipa_driver_init_complete_rsp,
162 .offset = offsetof(struct ipa_driver_init_complete_rsp,
164 .ei_array = qmi_response_type_v01_ei,
167 .data_type = QMI_EOTI,
171 /* QMI message structure definition for struct ipa_init_complete_ind */
172 const struct qmi_elem_info ipa_init_complete_ind_ei[] = {
174 .data_type = QMI_STRUCT,
177 sizeof_field(struct ipa_init_complete_ind,
180 .offset = offsetof(struct ipa_init_complete_ind,
182 .ei_array = qmi_response_type_v01_ei,
185 .data_type = QMI_EOTI,
189 /* QMI message structure definition for struct ipa_mem_bounds */
190 const struct qmi_elem_info ipa_mem_bounds_ei[] = {
192 .data_type = QMI_UNSIGNED_4_BYTE,
195 sizeof_field(struct ipa_mem_bounds, start),
196 .offset = offsetof(struct ipa_mem_bounds, start),
199 .data_type = QMI_UNSIGNED_4_BYTE,
202 sizeof_field(struct ipa_mem_bounds, end),
203 .offset = offsetof(struct ipa_mem_bounds, end),
206 .data_type = QMI_EOTI,
210 /* QMI message structure definition for struct ipa_mem_array */
211 const struct qmi_elem_info ipa_mem_array_ei[] = {
213 .data_type = QMI_UNSIGNED_4_BYTE,
216 sizeof_field(struct ipa_mem_array, start),
217 .offset = offsetof(struct ipa_mem_array, start),
220 .data_type = QMI_UNSIGNED_4_BYTE,
223 sizeof_field(struct ipa_mem_array, count),
224 .offset = offsetof(struct ipa_mem_array, count),
227 .data_type = QMI_EOTI,
231 /* QMI message structure definition for struct ipa_mem_range */
232 const struct qmi_elem_info ipa_mem_range_ei[] = {
234 .data_type = QMI_UNSIGNED_4_BYTE,
237 sizeof_field(struct ipa_mem_range, start),
238 .offset = offsetof(struct ipa_mem_range, start),
241 .data_type = QMI_UNSIGNED_4_BYTE,
244 sizeof_field(struct ipa_mem_range, size),
245 .offset = offsetof(struct ipa_mem_range, size),
248 .data_type = QMI_EOTI,
252 /* QMI message structure definition for struct ipa_init_modem_driver_req */
253 const struct qmi_elem_info ipa_init_modem_driver_req_ei[] = {
255 .data_type = QMI_OPT_FLAG,
258 sizeof_field(struct ipa_init_modem_driver_req,
259 platform_type_valid),
261 .offset = offsetof(struct ipa_init_modem_driver_req,
262 platform_type_valid),
265 .data_type = QMI_SIGNED_4_BYTE_ENUM,
268 sizeof_field(struct ipa_init_modem_driver_req,
271 .offset = offsetof(struct ipa_init_modem_driver_req,
275 .data_type = QMI_OPT_FLAG,
278 sizeof_field(struct ipa_init_modem_driver_req,
281 .offset = offsetof(struct ipa_init_modem_driver_req,
285 .data_type = QMI_STRUCT,
288 sizeof_field(struct ipa_init_modem_driver_req,
291 .offset = offsetof(struct ipa_init_modem_driver_req,
293 .ei_array = ipa_mem_bounds_ei,
296 .data_type = QMI_OPT_FLAG,
299 sizeof_field(struct ipa_init_modem_driver_req,
300 v4_route_tbl_info_valid),
302 .offset = offsetof(struct ipa_init_modem_driver_req,
303 v4_route_tbl_info_valid),
306 .data_type = QMI_STRUCT,
309 sizeof_field(struct ipa_init_modem_driver_req,
312 .offset = offsetof(struct ipa_init_modem_driver_req,
314 .ei_array = ipa_mem_bounds_ei,
317 .data_type = QMI_OPT_FLAG,
320 sizeof_field(struct ipa_init_modem_driver_req,
321 v6_route_tbl_info_valid),
323 .offset = offsetof(struct ipa_init_modem_driver_req,
324 v6_route_tbl_info_valid),
327 .data_type = QMI_STRUCT,
330 sizeof_field(struct ipa_init_modem_driver_req,
333 .offset = offsetof(struct ipa_init_modem_driver_req,
335 .ei_array = ipa_mem_bounds_ei,
338 .data_type = QMI_OPT_FLAG,
341 sizeof_field(struct ipa_init_modem_driver_req,
342 v4_filter_tbl_start_valid),
344 .offset = offsetof(struct ipa_init_modem_driver_req,
345 v4_filter_tbl_start_valid),
348 .data_type = QMI_UNSIGNED_4_BYTE,
351 sizeof_field(struct ipa_init_modem_driver_req,
352 v4_filter_tbl_start),
354 .offset = offsetof(struct ipa_init_modem_driver_req,
355 v4_filter_tbl_start),
358 .data_type = QMI_OPT_FLAG,
361 sizeof_field(struct ipa_init_modem_driver_req,
362 v6_filter_tbl_start_valid),
364 .offset = offsetof(struct ipa_init_modem_driver_req,
365 v6_filter_tbl_start_valid),
368 .data_type = QMI_UNSIGNED_4_BYTE,
371 sizeof_field(struct ipa_init_modem_driver_req,
372 v6_filter_tbl_start),
374 .offset = offsetof(struct ipa_init_modem_driver_req,
375 v6_filter_tbl_start),
378 .data_type = QMI_OPT_FLAG,
381 sizeof_field(struct ipa_init_modem_driver_req,
382 modem_mem_info_valid),
384 .offset = offsetof(struct ipa_init_modem_driver_req,
385 modem_mem_info_valid),
388 .data_type = QMI_STRUCT,
391 sizeof_field(struct ipa_init_modem_driver_req,
394 .offset = offsetof(struct ipa_init_modem_driver_req,
396 .ei_array = ipa_mem_range_ei,
399 .data_type = QMI_OPT_FLAG,
402 sizeof_field(struct ipa_init_modem_driver_req,
403 ctrl_comm_dest_end_pt_valid),
405 .offset = offsetof(struct ipa_init_modem_driver_req,
406 ctrl_comm_dest_end_pt_valid),
409 .data_type = QMI_UNSIGNED_4_BYTE,
412 sizeof_field(struct ipa_init_modem_driver_req,
413 ctrl_comm_dest_end_pt),
415 .offset = offsetof(struct ipa_init_modem_driver_req,
416 ctrl_comm_dest_end_pt),
419 .data_type = QMI_OPT_FLAG,
422 sizeof_field(struct ipa_init_modem_driver_req,
425 .offset = offsetof(struct ipa_init_modem_driver_req,
429 .data_type = QMI_UNSIGNED_1_BYTE,
432 sizeof_field(struct ipa_init_modem_driver_req,
435 .offset = offsetof(struct ipa_init_modem_driver_req,
439 .data_type = QMI_OPT_FLAG,
442 sizeof_field(struct ipa_init_modem_driver_req,
443 hdr_proc_ctx_tbl_info_valid),
445 .offset = offsetof(struct ipa_init_modem_driver_req,
446 hdr_proc_ctx_tbl_info_valid),
449 .data_type = QMI_STRUCT,
452 sizeof_field(struct ipa_init_modem_driver_req,
453 hdr_proc_ctx_tbl_info),
455 .offset = offsetof(struct ipa_init_modem_driver_req,
456 hdr_proc_ctx_tbl_info),
457 .ei_array = ipa_mem_bounds_ei,
460 .data_type = QMI_OPT_FLAG,
463 sizeof_field(struct ipa_init_modem_driver_req,
466 .offset = offsetof(struct ipa_init_modem_driver_req,
470 .data_type = QMI_STRUCT,
473 sizeof_field(struct ipa_init_modem_driver_req,
476 .offset = offsetof(struct ipa_init_modem_driver_req,
478 .ei_array = ipa_mem_bounds_ei,
481 .data_type = QMI_OPT_FLAG,
484 sizeof_field(struct ipa_init_modem_driver_req,
485 v4_hash_route_tbl_info_valid),
487 .offset = offsetof(struct ipa_init_modem_driver_req,
488 v4_hash_route_tbl_info_valid),
491 .data_type = QMI_STRUCT,
494 sizeof_field(struct ipa_init_modem_driver_req,
495 v4_hash_route_tbl_info),
497 .offset = offsetof(struct ipa_init_modem_driver_req,
498 v4_hash_route_tbl_info),
499 .ei_array = ipa_mem_bounds_ei,
502 .data_type = QMI_OPT_FLAG,
505 sizeof_field(struct ipa_init_modem_driver_req,
506 v6_hash_route_tbl_info_valid),
508 .offset = offsetof(struct ipa_init_modem_driver_req,
509 v6_hash_route_tbl_info_valid),
512 .data_type = QMI_STRUCT,
515 sizeof_field(struct ipa_init_modem_driver_req,
516 v6_hash_route_tbl_info),
518 .offset = offsetof(struct ipa_init_modem_driver_req,
519 v6_hash_route_tbl_info),
520 .ei_array = ipa_mem_bounds_ei,
523 .data_type = QMI_OPT_FLAG,
526 sizeof_field(struct ipa_init_modem_driver_req,
527 v4_hash_filter_tbl_start_valid),
529 .offset = offsetof(struct ipa_init_modem_driver_req,
530 v4_hash_filter_tbl_start_valid),
533 .data_type = QMI_UNSIGNED_4_BYTE,
536 sizeof_field(struct ipa_init_modem_driver_req,
537 v4_hash_filter_tbl_start),
539 .offset = offsetof(struct ipa_init_modem_driver_req,
540 v4_hash_filter_tbl_start),
543 .data_type = QMI_OPT_FLAG,
546 sizeof_field(struct ipa_init_modem_driver_req,
547 v6_hash_filter_tbl_start_valid),
549 .offset = offsetof(struct ipa_init_modem_driver_req,
550 v6_hash_filter_tbl_start_valid),
553 .data_type = QMI_UNSIGNED_4_BYTE,
556 sizeof_field(struct ipa_init_modem_driver_req,
557 v6_hash_filter_tbl_start),
559 .offset = offsetof(struct ipa_init_modem_driver_req,
560 v6_hash_filter_tbl_start),
563 .data_type = QMI_OPT_FLAG,
566 sizeof_field(struct ipa_init_modem_driver_req,
567 hw_stats_quota_base_addr_valid),
569 .offset = offsetof(struct ipa_init_modem_driver_req,
570 hw_stats_quota_base_addr_valid),
573 .data_type = QMI_UNSIGNED_4_BYTE,
576 sizeof_field(struct ipa_init_modem_driver_req,
577 hw_stats_quota_base_addr),
579 .offset = offsetof(struct ipa_init_modem_driver_req,
580 hw_stats_quota_base_addr),
583 .data_type = QMI_OPT_FLAG,
586 sizeof_field(struct ipa_init_modem_driver_req,
587 hw_stats_quota_size_valid),
589 .offset = offsetof(struct ipa_init_modem_driver_req,
590 hw_stats_quota_size_valid),
593 .data_type = QMI_UNSIGNED_4_BYTE,
596 sizeof_field(struct ipa_init_modem_driver_req,
597 hw_stats_quota_size),
599 .offset = offsetof(struct ipa_init_modem_driver_req,
600 hw_stats_quota_size),
603 .data_type = QMI_OPT_FLAG,
606 sizeof_field(struct ipa_init_modem_driver_req,
607 hw_stats_drop_base_addr_valid),
609 .offset = offsetof(struct ipa_init_modem_driver_req,
610 hw_stats_drop_base_addr_valid),
613 .data_type = QMI_UNSIGNED_4_BYTE,
616 sizeof_field(struct ipa_init_modem_driver_req,
617 hw_stats_drop_base_addr),
619 .offset = offsetof(struct ipa_init_modem_driver_req,
620 hw_stats_drop_base_addr),
623 .data_type = QMI_OPT_FLAG,
626 sizeof_field(struct ipa_init_modem_driver_req,
627 hw_stats_drop_size_valid),
629 .offset = offsetof(struct ipa_init_modem_driver_req,
630 hw_stats_drop_size_valid),
633 .data_type = QMI_UNSIGNED_4_BYTE,
636 sizeof_field(struct ipa_init_modem_driver_req,
639 .offset = offsetof(struct ipa_init_modem_driver_req,
643 .data_type = QMI_EOTI,
647 /* QMI message structure definition for struct ipa_init_modem_driver_rsp */
648 const struct qmi_elem_info ipa_init_modem_driver_rsp_ei[] = {
650 .data_type = QMI_STRUCT,
653 sizeof_field(struct ipa_init_modem_driver_rsp,
656 .offset = offsetof(struct ipa_init_modem_driver_rsp,
658 .ei_array = qmi_response_type_v01_ei,
661 .data_type = QMI_OPT_FLAG,
664 sizeof_field(struct ipa_init_modem_driver_rsp,
665 ctrl_comm_dest_end_pt_valid),
667 .offset = offsetof(struct ipa_init_modem_driver_rsp,
668 ctrl_comm_dest_end_pt_valid),
671 .data_type = QMI_UNSIGNED_4_BYTE,
674 sizeof_field(struct ipa_init_modem_driver_rsp,
675 ctrl_comm_dest_end_pt),
677 .offset = offsetof(struct ipa_init_modem_driver_rsp,
678 ctrl_comm_dest_end_pt),
681 .data_type = QMI_OPT_FLAG,
684 sizeof_field(struct ipa_init_modem_driver_rsp,
685 default_end_pt_valid),
687 .offset = offsetof(struct ipa_init_modem_driver_rsp,
688 default_end_pt_valid),
691 .data_type = QMI_UNSIGNED_4_BYTE,
694 sizeof_field(struct ipa_init_modem_driver_rsp,
697 .offset = offsetof(struct ipa_init_modem_driver_rsp,
701 .data_type = QMI_OPT_FLAG,
704 sizeof_field(struct ipa_init_modem_driver_rsp,
705 modem_driver_init_pending_valid),
707 .offset = offsetof(struct ipa_init_modem_driver_rsp,
708 modem_driver_init_pending_valid),
711 .data_type = QMI_UNSIGNED_1_BYTE,
714 sizeof_field(struct ipa_init_modem_driver_rsp,
715 modem_driver_init_pending),
717 .offset = offsetof(struct ipa_init_modem_driver_rsp,
718 modem_driver_init_pending),
721 .data_type = QMI_EOTI,