Lines Matching full:ipa

11 #include "ipa.h"
24 * complete, the AP and modem may begin IPA operation. This occurs
25 * only when the AP IPA driver, modem IPA driver, and IPA microcontroller
32 * contains a success result, the AP knows the modem IPA driver is ready.
34 * The modem is responsible for loading firmware on the IPA microcontroller.
49 * - Whenever the AP learns the modem has booted and its IPA QMI service
52 * - On the initial boot, the modem sets up the IPA microcontroller, and
82 struct ipa *ipa = container_of(ipa_qmi, struct ipa, qmi); in ipa_server_init_complete() local
95 dev_err(ipa->dev, in ipa_server_init_complete()
114 * We know everything (else) is ready when we know the IPA driver on
124 struct ipa *ipa; in ipa_qmi_ready() local
144 ipa = container_of(ipa_qmi, struct ipa, qmi); in ipa_qmi_ready()
145 ret = ipa_modem_start(ipa); in ipa_qmi_ready()
147 dev_err(ipa->dev, "error %d starting modem\n", ret); in ipa_qmi_ready()
182 struct ipa *ipa; in ipa_server_indication_register() local
186 ipa = container_of(ipa_qmi, struct ipa, qmi); in ipa_server_indication_register()
198 dev_err(ipa->dev, in ipa_server_indication_register()
211 struct ipa *ipa; in ipa_server_driver_init_complete() local
215 ipa = container_of(ipa_qmi, struct ipa, qmi); in ipa_server_driver_init_complete()
227 dev_err(ipa->dev, in ipa_server_driver_init_complete()
282 struct ipa *ipa = container_of(ipa_qmi, struct ipa, qmi); in init_modem_driver_req() local
283 u32 modem_route_count = ipa->modem_route_count; in init_modem_driver_req()
289 req.skip_uc_load = ipa->uc_loaded ? 1 : 0; in init_modem_driver_req()
298 mem = ipa_mem_find(ipa, IPA_MEM_MODEM_HEADER); in init_modem_driver_req()
301 req.hdr_tbl_info.start = ipa->mem_offset + mem->offset; in init_modem_driver_req()
305 mem = ipa_mem_find(ipa, IPA_MEM_V4_ROUTE); in init_modem_driver_req()
307 req.v4_route_tbl_info.start = ipa->mem_offset + mem->offset; in init_modem_driver_req()
310 mem = ipa_mem_find(ipa, IPA_MEM_V6_ROUTE); in init_modem_driver_req()
312 req.v6_route_tbl_info.start = ipa->mem_offset + mem->offset; in init_modem_driver_req()
315 mem = ipa_mem_find(ipa, IPA_MEM_V4_FILTER); in init_modem_driver_req()
317 req.v4_filter_tbl_start = ipa->mem_offset + mem->offset; in init_modem_driver_req()
319 mem = ipa_mem_find(ipa, IPA_MEM_V6_FILTER); in init_modem_driver_req()
321 req.v6_filter_tbl_start = ipa->mem_offset + mem->offset; in init_modem_driver_req()
323 mem = ipa_mem_find(ipa, IPA_MEM_MODEM); in init_modem_driver_req()
326 req.modem_mem_info.start = ipa->mem_offset + mem->offset; in init_modem_driver_req()
332 ipa->name_map[IPA_ENDPOINT_AP_MODEM_RX]->endpoint_id; in init_modem_driver_req()
336 mem = ipa_mem_find(ipa, IPA_MEM_MODEM_PROC_CTX); in init_modem_driver_req()
340 ipa->mem_offset + mem->offset; in init_modem_driver_req()
347 mem = ipa_mem_find(ipa, IPA_MEM_V4_ROUTE_HASHED); in init_modem_driver_req()
351 ipa->mem_offset + mem->offset; in init_modem_driver_req()
355 mem = ipa_mem_find(ipa, IPA_MEM_V6_ROUTE_HASHED); in init_modem_driver_req()
359 ipa->mem_offset + mem->offset; in init_modem_driver_req()
363 mem = ipa_mem_find(ipa, IPA_MEM_V4_FILTER_HASHED); in init_modem_driver_req()
366 req.v4_hash_filter_tbl_start = ipa->mem_offset + mem->offset; in init_modem_driver_req()
369 mem = ipa_mem_find(ipa, IPA_MEM_V6_FILTER_HASHED); in init_modem_driver_req()
372 req.v6_hash_filter_tbl_start = ipa->mem_offset + mem->offset; in init_modem_driver_req()
375 /* The stats fields are only valid for IPA v4.0+ */ in init_modem_driver_req()
376 if (ipa->version >= IPA_VERSION_4_0) { in init_modem_driver_req()
377 mem = ipa_mem_find(ipa, IPA_MEM_STATS_QUOTA_MODEM); in init_modem_driver_req()
381 ipa->mem_offset + mem->offset; in init_modem_driver_req()
383 req.hw_stats_quota_size = ipa->mem_offset + mem->size; in init_modem_driver_req()
387 mem = ipa_mem_find(ipa, IPA_MEM_STATS_DROP); in init_modem_driver_req()
391 ipa->mem_offset + mem->offset; in init_modem_driver_req()
393 req.hw_stats_drop_size = ipa->mem_offset + mem->size; in init_modem_driver_req()
409 struct ipa *ipa; in ipa_client_init_driver_work() local
415 ipa = container_of(ipa_qmi, struct ipa, qmi); in ipa_client_init_driver_work()
416 dev = ipa->dev; in ipa_client_init_driver_work()
468 int ipa_qmi_setup(struct ipa *ipa) in ipa_qmi_setup() argument
470 struct ipa_qmi *ipa_qmi = &ipa->qmi; in ipa_qmi_setup()
523 /* Tear down IPA QMI handles */
524 void ipa_qmi_teardown(struct ipa *ipa) in ipa_qmi_teardown() argument
526 cancel_work_sync(&ipa->qmi.init_driver_work); in ipa_qmi_teardown()
528 qmi_handle_release(&ipa->qmi.client_handle); in ipa_qmi_teardown()
529 memset(&ipa->qmi.client_handle, 0, sizeof(ipa->qmi.client_handle)); in ipa_qmi_teardown()
531 qmi_handle_release(&ipa->qmi.server_handle); in ipa_qmi_teardown()
532 memset(&ipa->qmi.server_handle, 0, sizeof(ipa->qmi.server_handle)); in ipa_qmi_teardown()