Lines Matching full:handle
36 #define AE(handle, ae) ((handle)->hal_handle->aes[ae]) argument
69 void qat_hal_set_live_ctx(struct icp_qat_fw_loader_handle *handle, in qat_hal_set_live_ctx() argument
72 AE(handle, ae).live_ctx_mask = ctx_mask; in qat_hal_set_live_ctx()
76 static int qat_hal_rd_ae_csr(struct icp_qat_fw_loader_handle *handle, in qat_hal_rd_ae_csr() argument
83 value = GET_AE_CSR(handle, ae, csr); in qat_hal_rd_ae_csr()
84 if (!(GET_AE_CSR(handle, ae, LOCAL_CSR_STATUS) & LCS_STATUS)) in qat_hal_rd_ae_csr()
92 static int qat_hal_wr_ae_csr(struct icp_qat_fw_loader_handle *handle, in qat_hal_wr_ae_csr() argument
99 SET_AE_CSR(handle, ae, csr, value); in qat_hal_wr_ae_csr()
100 if (!(GET_AE_CSR(handle, ae, LOCAL_CSR_STATUS) & LCS_STATUS)) in qat_hal_wr_ae_csr()
108 static void qat_hal_get_wakeup_event(struct icp_qat_fw_loader_handle *handle, in qat_hal_get_wakeup_event() argument
114 cur_ctx = qat_hal_rd_ae_csr(handle, ae, CSR_CTX_POINTER); in qat_hal_get_wakeup_event()
115 qat_hal_wr_ae_csr(handle, ae, CSR_CTX_POINTER, ctx); in qat_hal_get_wakeup_event()
116 *events = qat_hal_rd_ae_csr(handle, ae, CTX_WAKEUP_EVENTS_INDIRECT); in qat_hal_get_wakeup_event()
117 qat_hal_wr_ae_csr(handle, ae, CSR_CTX_POINTER, cur_ctx); in qat_hal_get_wakeup_event()
120 static int qat_hal_wait_cycles(struct icp_qat_fw_loader_handle *handle, in qat_hal_wait_cycles() argument
129 base_cnt = qat_hal_rd_ae_csr(handle, ae, PROFILE_COUNT); in qat_hal_wait_cycles()
133 csr = qat_hal_rd_ae_csr(handle, ae, ACTIVE_CTX_STATUS); in qat_hal_wait_cycles()
135 cur_cnt = qat_hal_rd_ae_csr(handle, ae, PROFILE_COUNT); in qat_hal_wait_cycles()
156 int qat_hal_set_ae_ctx_mode(struct icp_qat_fw_loader_handle *handle, in qat_hal_set_ae_ctx_mode() argument
167 csr = qat_hal_rd_ae_csr(handle, ae, CTX_ENABLES); in qat_hal_set_ae_ctx_mode()
172 qat_hal_wr_ae_csr(handle, ae, CTX_ENABLES, new_csr); in qat_hal_set_ae_ctx_mode()
176 int qat_hal_set_ae_nn_mode(struct icp_qat_fw_loader_handle *handle, in qat_hal_set_ae_nn_mode() argument
181 csr = qat_hal_rd_ae_csr(handle, ae, CTX_ENABLES); in qat_hal_set_ae_nn_mode()
189 qat_hal_wr_ae_csr(handle, ae, CTX_ENABLES, new_csr); in qat_hal_set_ae_nn_mode()
194 int qat_hal_set_ae_lm_mode(struct icp_qat_fw_loader_handle *handle, in qat_hal_set_ae_lm_mode() argument
200 csr = qat_hal_rd_ae_csr(handle, ae, CTX_ENABLES); in qat_hal_set_ae_lm_mode()
229 qat_hal_wr_ae_csr(handle, ae, CTX_ENABLES, new_csr); in qat_hal_set_ae_lm_mode()
233 void qat_hal_set_ae_tindex_mode(struct icp_qat_fw_loader_handle *handle, in qat_hal_set_ae_tindex_mode() argument
238 csr = qat_hal_rd_ae_csr(handle, ae, CTX_ENABLES); in qat_hal_set_ae_tindex_mode()
244 qat_hal_wr_ae_csr(handle, ae, CTX_ENABLES, new_csr); in qat_hal_set_ae_tindex_mode()
302 void qat_hal_reset(struct icp_qat_fw_loader_handle *handle) in qat_hal_reset() argument
304 unsigned int reset_mask = handle->chip_info->icp_rst_mask; in qat_hal_reset()
305 unsigned int reset_csr = handle->chip_info->icp_rst_csr; in qat_hal_reset()
308 csr_val = GET_CAP_CSR(handle, reset_csr); in qat_hal_reset()
310 SET_CAP_CSR(handle, reset_csr, csr_val); in qat_hal_reset()
313 static void qat_hal_wr_indr_csr(struct icp_qat_fw_loader_handle *handle, in qat_hal_wr_indr_csr() argument
319 cur_ctx = qat_hal_rd_ae_csr(handle, ae, CSR_CTX_POINTER); in qat_hal_wr_indr_csr()
324 qat_hal_wr_ae_csr(handle, ae, CSR_CTX_POINTER, ctx); in qat_hal_wr_indr_csr()
325 qat_hal_wr_ae_csr(handle, ae, ae_csr, csr_val); in qat_hal_wr_indr_csr()
328 qat_hal_wr_ae_csr(handle, ae, CSR_CTX_POINTER, cur_ctx); in qat_hal_wr_indr_csr()
331 static unsigned int qat_hal_rd_indr_csr(struct icp_qat_fw_loader_handle *handle, in qat_hal_rd_indr_csr() argument
337 cur_ctx = qat_hal_rd_ae_csr(handle, ae, CSR_CTX_POINTER); in qat_hal_rd_indr_csr()
338 qat_hal_wr_ae_csr(handle, ae, CSR_CTX_POINTER, ctx); in qat_hal_rd_indr_csr()
339 csr_val = qat_hal_rd_ae_csr(handle, ae, ae_csr); in qat_hal_rd_indr_csr()
340 qat_hal_wr_ae_csr(handle, ae, CSR_CTX_POINTER, cur_ctx); in qat_hal_rd_indr_csr()
345 static void qat_hal_put_sig_event(struct icp_qat_fw_loader_handle *handle, in qat_hal_put_sig_event() argument
351 cur_ctx = qat_hal_rd_ae_csr(handle, ae, CSR_CTX_POINTER); in qat_hal_put_sig_event()
355 qat_hal_wr_ae_csr(handle, ae, CSR_CTX_POINTER, ctx); in qat_hal_put_sig_event()
356 qat_hal_wr_ae_csr(handle, ae, CTX_SIG_EVENTS_INDIRECT, events); in qat_hal_put_sig_event()
358 qat_hal_wr_ae_csr(handle, ae, CSR_CTX_POINTER, cur_ctx); in qat_hal_put_sig_event()
361 static void qat_hal_put_wakeup_event(struct icp_qat_fw_loader_handle *handle, in qat_hal_put_wakeup_event() argument
367 cur_ctx = qat_hal_rd_ae_csr(handle, ae, CSR_CTX_POINTER); in qat_hal_put_wakeup_event()
371 qat_hal_wr_ae_csr(handle, ae, CSR_CTX_POINTER, ctx); in qat_hal_put_wakeup_event()
372 qat_hal_wr_ae_csr(handle, ae, CTX_WAKEUP_EVENTS_INDIRECT, in qat_hal_put_wakeup_event()
375 qat_hal_wr_ae_csr(handle, ae, CSR_CTX_POINTER, cur_ctx); in qat_hal_put_wakeup_event()
378 static int qat_hal_check_ae_alive(struct icp_qat_fw_loader_handle *handle) in qat_hal_check_ae_alive() argument
380 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_hal_check_ae_alive()
385 for_each_set_bit(ae, &ae_mask, handle->hal_handle->ae_max_num) { in qat_hal_check_ae_alive()
386 base_cnt = qat_hal_rd_ae_csr(handle, ae, PROFILE_COUNT); in qat_hal_check_ae_alive()
390 cur_cnt = qat_hal_rd_ae_csr(handle, ae, PROFILE_COUNT); in qat_hal_check_ae_alive()
403 int qat_hal_check_ae_active(struct icp_qat_fw_loader_handle *handle, in qat_hal_check_ae_active() argument
408 enable = qat_hal_rd_ae_csr(handle, ae, CTX_ENABLES); in qat_hal_check_ae_active()
409 active = qat_hal_rd_ae_csr(handle, ae, ACTIVE_CTX_STATUS); in qat_hal_check_ae_active()
417 static void qat_hal_reset_timestamp(struct icp_qat_fw_loader_handle *handle) in qat_hal_reset_timestamp() argument
419 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_hal_reset_timestamp()
423 misc_ctl_csr = handle->chip_info->misc_ctl_csr; in qat_hal_reset_timestamp()
425 misc_ctl = GET_CAP_CSR(handle, misc_ctl_csr); in qat_hal_reset_timestamp()
427 SET_CAP_CSR(handle, misc_ctl_csr, misc_ctl & in qat_hal_reset_timestamp()
430 for_each_set_bit(ae, &ae_mask, handle->hal_handle->ae_max_num) { in qat_hal_reset_timestamp()
431 qat_hal_wr_ae_csr(handle, ae, TIMESTAMP_LOW, 0); in qat_hal_reset_timestamp()
432 qat_hal_wr_ae_csr(handle, ae, TIMESTAMP_HIGH, 0); in qat_hal_reset_timestamp()
435 SET_CAP_CSR(handle, misc_ctl_csr, misc_ctl | MC_TIMESTAMP_ENABLE); in qat_hal_reset_timestamp()
442 static int qat_hal_init_esram(struct icp_qat_fw_loader_handle *handle) in qat_hal_init_esram() argument
445 (void __iomem *)((uintptr_t)handle->hal_ep_csr_addr_v + in qat_hal_init_esram()
450 if (handle->pci_dev->device != PCI_DEVICE_ID_INTEL_QAT_DH895XCC) in qat_hal_init_esram()
462 qat_hal_wait_cycles(handle, 0, ESRAM_AUTO_INIT_USED_CYCLES, 0); in qat_hal_init_esram()
473 int qat_hal_clr_reset(struct icp_qat_fw_loader_handle *handle) in qat_hal_clr_reset() argument
475 unsigned int clk_csr = handle->chip_info->glb_clk_enable_csr; in qat_hal_clr_reset()
476 unsigned int reset_mask = handle->chip_info->icp_rst_mask; in qat_hal_clr_reset()
477 unsigned int reset_csr = handle->chip_info->icp_rst_csr; in qat_hal_clr_reset()
478 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_hal_clr_reset()
484 csr_val = GET_CAP_CSR(handle, reset_csr); in qat_hal_clr_reset()
487 SET_CAP_CSR(handle, reset_csr, csr_val); in qat_hal_clr_reset()
490 csr_val = GET_CAP_CSR(handle, reset_csr); in qat_hal_clr_reset()
494 csr_val = GET_CAP_CSR(handle, clk_csr); in qat_hal_clr_reset()
496 SET_CAP_CSR(handle, clk_csr, csr_val); in qat_hal_clr_reset()
497 if (qat_hal_check_ae_alive(handle)) in qat_hal_clr_reset()
501 for_each_set_bit(ae, &ae_mask, handle->hal_handle->ae_max_num) { in qat_hal_clr_reset()
502 qat_hal_wr_ae_csr(handle, ae, CTX_ENABLES, in qat_hal_clr_reset()
504 qat_hal_wr_indr_csr(handle, ae, ICP_QAT_UCLO_AE_ALL_CTX, in qat_hal_clr_reset()
506 handle->hal_handle->upc_mask & in qat_hal_clr_reset()
508 qat_hal_wr_ae_csr(handle, ae, CTX_ARB_CNTL, INIT_CTX_ARB_VALUE); in qat_hal_clr_reset()
509 qat_hal_wr_ae_csr(handle, ae, CC_ENABLE, INIT_CCENABLE_VALUE); in qat_hal_clr_reset()
510 qat_hal_put_wakeup_event(handle, ae, in qat_hal_clr_reset()
513 qat_hal_put_sig_event(handle, ae, in qat_hal_clr_reset()
517 if (qat_hal_init_esram(handle)) in qat_hal_clr_reset()
519 if (qat_hal_wait_cycles(handle, 0, SHRAM_INIT_CYCLES, 0)) in qat_hal_clr_reset()
521 qat_hal_reset_timestamp(handle); in qat_hal_clr_reset()
529 static void qat_hal_disable_ctx(struct icp_qat_fw_loader_handle *handle, in qat_hal_disable_ctx() argument
534 ctx = qat_hal_rd_ae_csr(handle, ae, CTX_ENABLES); in qat_hal_disable_ctx()
537 qat_hal_wr_ae_csr(handle, ae, CTX_ENABLES, ctx); in qat_hal_disable_ctx()
570 void qat_hal_wr_uwords(struct icp_qat_fw_loader_handle *handle, in qat_hal_wr_uwords() argument
577 ustore_addr = qat_hal_rd_ae_csr(handle, ae, USTORE_ADDRESS); in qat_hal_wr_uwords()
579 qat_hal_wr_ae_csr(handle, ae, USTORE_ADDRESS, uaddr); in qat_hal_wr_uwords()
587 qat_hal_wr_ae_csr(handle, ae, USTORE_DATA_LOWER, uwrd_lo); in qat_hal_wr_uwords()
588 qat_hal_wr_ae_csr(handle, ae, USTORE_DATA_UPPER, uwrd_hi); in qat_hal_wr_uwords()
590 qat_hal_wr_ae_csr(handle, ae, USTORE_ADDRESS, ustore_addr); in qat_hal_wr_uwords()
593 static void qat_hal_enable_ctx(struct icp_qat_fw_loader_handle *handle, in qat_hal_enable_ctx() argument
598 ctx = qat_hal_rd_ae_csr(handle, ae, CTX_ENABLES); in qat_hal_enable_ctx()
602 qat_hal_wr_ae_csr(handle, ae, CTX_ENABLES, ctx); in qat_hal_enable_ctx()
605 static void qat_hal_clear_xfer(struct icp_qat_fw_loader_handle *handle) in qat_hal_clear_xfer() argument
607 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_hal_clear_xfer()
611 for_each_set_bit(ae, &ae_mask, handle->hal_handle->ae_max_num) { in qat_hal_clear_xfer()
613 qat_hal_init_rd_xfer(handle, ae, 0, ICP_SR_RD_ABS, in qat_hal_clear_xfer()
615 qat_hal_init_rd_xfer(handle, ae, 0, ICP_DR_RD_ABS, in qat_hal_clear_xfer()
621 static int qat_hal_clear_gpr(struct icp_qat_fw_loader_handle *handle) in qat_hal_clear_gpr() argument
623 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_hal_clear_gpr()
631 for_each_set_bit(ae, &ae_mask, handle->hal_handle->ae_max_num) { in qat_hal_clear_gpr()
632 csr_val = qat_hal_rd_ae_csr(handle, ae, AE_MISC_CONTROL); in qat_hal_clear_gpr()
634 qat_hal_wr_ae_csr(handle, ae, AE_MISC_CONTROL, csr_val); in qat_hal_clear_gpr()
635 csr_val = qat_hal_rd_ae_csr(handle, ae, CTX_ENABLES); in qat_hal_clear_gpr()
637 if (handle->chip_info->nn) in qat_hal_clear_gpr()
640 qat_hal_wr_ae_csr(handle, ae, CTX_ENABLES, csr_val); in qat_hal_clear_gpr()
641 qat_hal_wr_uwords(handle, ae, 0, ARRAY_SIZE(inst), in qat_hal_clear_gpr()
643 qat_hal_wr_indr_csr(handle, ae, ctx_mask, CTX_STS_INDIRECT, in qat_hal_clear_gpr()
644 handle->hal_handle->upc_mask & in qat_hal_clear_gpr()
646 savctx = qat_hal_rd_ae_csr(handle, ae, ACTIVE_CTX_STATUS); in qat_hal_clear_gpr()
647 qat_hal_wr_ae_csr(handle, ae, ACTIVE_CTX_STATUS, 0); in qat_hal_clear_gpr()
648 qat_hal_put_wakeup_event(handle, ae, ctx_mask, XCWE_VOLUNTARY); in qat_hal_clear_gpr()
649 qat_hal_wr_indr_csr(handle, ae, ctx_mask, in qat_hal_clear_gpr()
651 qat_hal_wr_ae_csr(handle, ae, CTX_SIG_EVENTS_ACTIVE, 0); in qat_hal_clear_gpr()
652 qat_hal_enable_ctx(handle, ae, ctx_mask); in qat_hal_clear_gpr()
654 for_each_set_bit(ae, &ae_mask, handle->hal_handle->ae_max_num) { in qat_hal_clear_gpr()
657 ret = qat_hal_wait_cycles(handle, ae, 20, 1); in qat_hal_clear_gpr()
664 qat_hal_disable_ctx(handle, ae, ctx_mask); in qat_hal_clear_gpr()
665 qat_hal_wr_ae_csr(handle, ae, ACTIVE_CTX_STATUS, in qat_hal_clear_gpr()
667 qat_hal_wr_ae_csr(handle, ae, CTX_ENABLES, in qat_hal_clear_gpr()
669 qat_hal_wr_indr_csr(handle, ae, ctx_mask, CTX_STS_INDIRECT, in qat_hal_clear_gpr()
670 handle->hal_handle->upc_mask & in qat_hal_clear_gpr()
672 qat_hal_wr_ae_csr(handle, ae, CTX_ARB_CNTL, INIT_CTX_ARB_VALUE); in qat_hal_clear_gpr()
673 qat_hal_wr_ae_csr(handle, ae, CC_ENABLE, INIT_CCENABLE_VALUE); in qat_hal_clear_gpr()
674 qat_hal_put_wakeup_event(handle, ae, ctx_mask, in qat_hal_clear_gpr()
676 qat_hal_put_sig_event(handle, ae, ctx_mask, in qat_hal_clear_gpr()
682 static int qat_hal_chip_init(struct icp_qat_fw_loader_handle *handle, in qat_hal_chip_init() argument
695 handle->pci_dev = pci_info->pci_dev; in qat_hal_chip_init()
696 switch (handle->pci_dev->device) { in qat_hal_chip_init()
701 handle->chip_info->mmp_sram_size = 0; in qat_hal_chip_init()
702 handle->chip_info->nn = false; in qat_hal_chip_init()
703 handle->chip_info->lm2lm3 = true; in qat_hal_chip_init()
704 handle->chip_info->lm_size = ICP_QAT_UCLO_MAX_LMEM_REG_2X; in qat_hal_chip_init()
705 handle->chip_info->icp_rst_csr = ICP_RESET_CPP0; in qat_hal_chip_init()
706 if (handle->pci_dev->device == ADF_420XX_PCI_DEVICE_ID) in qat_hal_chip_init()
707 handle->chip_info->icp_rst_mask = 0x100155; in qat_hal_chip_init()
709 handle->chip_info->icp_rst_mask = 0x100015; in qat_hal_chip_init()
710 handle->chip_info->glb_clk_enable_csr = ICP_GLOBAL_CLK_ENABLE_CPP0; in qat_hal_chip_init()
711 handle->chip_info->misc_ctl_csr = MISC_CONTROL_C4XXX; in qat_hal_chip_init()
712 handle->chip_info->wakeup_event_val = 0x80000000; in qat_hal_chip_init()
713 handle->chip_info->fw_auth = true; in qat_hal_chip_init()
714 handle->chip_info->css_3k = true; in qat_hal_chip_init()
715 handle->chip_info->tgroup_share_ustore = true; in qat_hal_chip_init()
716 handle->chip_info->fcu_ctl_csr = FCU_CONTROL_4XXX; in qat_hal_chip_init()
717 handle->chip_info->fcu_sts_csr = FCU_STATUS_4XXX; in qat_hal_chip_init()
718 handle->chip_info->fcu_dram_addr_hi = FCU_DRAM_ADDR_HI_4XXX; in qat_hal_chip_init()
719 handle->chip_info->fcu_dram_addr_lo = FCU_DRAM_ADDR_LO_4XXX; in qat_hal_chip_init()
720 handle->chip_info->fcu_loaded_ae_csr = FCU_AE_LOADED_4XXX; in qat_hal_chip_init()
721 handle->chip_info->fcu_loaded_ae_pos = 0; in qat_hal_chip_init()
723 handle->hal_cap_g_ctl_csr_addr_v = pmisc_addr + ICP_QAT_CAP_OFFSET_4XXX; in qat_hal_chip_init()
724 handle->hal_cap_ae_xfer_csr_addr_v = pmisc_addr + ICP_QAT_AE_OFFSET_4XXX; in qat_hal_chip_init()
725 handle->hal_ep_csr_addr_v = pmisc_addr + ICP_QAT_EP_OFFSET_4XXX; in qat_hal_chip_init()
726 handle->hal_cap_ae_local_csr_addr_v = in qat_hal_chip_init()
727 (void __iomem *)((uintptr_t)handle->hal_cap_ae_xfer_csr_addr_v in qat_hal_chip_init()
732 handle->chip_info->mmp_sram_size = 0; in qat_hal_chip_init()
733 handle->chip_info->nn = true; in qat_hal_chip_init()
734 handle->chip_info->lm2lm3 = false; in qat_hal_chip_init()
735 handle->chip_info->lm_size = ICP_QAT_UCLO_MAX_LMEM_REG; in qat_hal_chip_init()
736 handle->chip_info->icp_rst_csr = ICP_RESET; in qat_hal_chip_init()
737 handle->chip_info->icp_rst_mask = (hw_data->ae_mask << RST_CSR_AE_LSB) | in qat_hal_chip_init()
739 handle->chip_info->glb_clk_enable_csr = ICP_GLOBAL_CLK_ENABLE; in qat_hal_chip_init()
740 handle->chip_info->misc_ctl_csr = MISC_CONTROL; in qat_hal_chip_init()
741 handle->chip_info->wakeup_event_val = WAKEUP_EVENT; in qat_hal_chip_init()
742 handle->chip_info->fw_auth = true; in qat_hal_chip_init()
743 handle->chip_info->css_3k = false; in qat_hal_chip_init()
744 handle->chip_info->tgroup_share_ustore = false; in qat_hal_chip_init()
745 handle->chip_info->fcu_ctl_csr = FCU_CONTROL; in qat_hal_chip_init()
746 handle->chip_info->fcu_sts_csr = FCU_STATUS; in qat_hal_chip_init()
747 handle->chip_info->fcu_dram_addr_hi = FCU_DRAM_ADDR_HI; in qat_hal_chip_init()
748 handle->chip_info->fcu_dram_addr_lo = FCU_DRAM_ADDR_LO; in qat_hal_chip_init()
749 handle->chip_info->fcu_loaded_ae_csr = FCU_STATUS; in qat_hal_chip_init()
750 handle->chip_info->fcu_loaded_ae_pos = FCU_LOADED_AE_POS; in qat_hal_chip_init()
751 handle->hal_cap_g_ctl_csr_addr_v = pmisc_addr + ICP_QAT_CAP_OFFSET; in qat_hal_chip_init()
752 handle->hal_cap_ae_xfer_csr_addr_v = pmisc_addr + ICP_QAT_AE_OFFSET; in qat_hal_chip_init()
753 handle->hal_ep_csr_addr_v = pmisc_addr + ICP_QAT_EP_OFFSET; in qat_hal_chip_init()
754 handle->hal_cap_ae_local_csr_addr_v = in qat_hal_chip_init()
755 (void __iomem *)((uintptr_t)handle->hal_cap_ae_xfer_csr_addr_v in qat_hal_chip_init()
759 handle->chip_info->mmp_sram_size = 0x40000; in qat_hal_chip_init()
760 handle->chip_info->nn = true; in qat_hal_chip_init()
761 handle->chip_info->lm2lm3 = false; in qat_hal_chip_init()
762 handle->chip_info->lm_size = ICP_QAT_UCLO_MAX_LMEM_REG; in qat_hal_chip_init()
763 handle->chip_info->icp_rst_csr = ICP_RESET; in qat_hal_chip_init()
764 handle->chip_info->icp_rst_mask = (hw_data->ae_mask << RST_CSR_AE_LSB) | in qat_hal_chip_init()
766 handle->chip_info->glb_clk_enable_csr = ICP_GLOBAL_CLK_ENABLE; in qat_hal_chip_init()
767 handle->chip_info->misc_ctl_csr = MISC_CONTROL; in qat_hal_chip_init()
768 handle->chip_info->wakeup_event_val = WAKEUP_EVENT; in qat_hal_chip_init()
769 handle->chip_info->fw_auth = false; in qat_hal_chip_init()
770 handle->chip_info->css_3k = false; in qat_hal_chip_init()
771 handle->chip_info->tgroup_share_ustore = false; in qat_hal_chip_init()
772 handle->chip_info->fcu_ctl_csr = 0; in qat_hal_chip_init()
773 handle->chip_info->fcu_sts_csr = 0; in qat_hal_chip_init()
774 handle->chip_info->fcu_dram_addr_hi = 0; in qat_hal_chip_init()
775 handle->chip_info->fcu_dram_addr_lo = 0; in qat_hal_chip_init()
776 handle->chip_info->fcu_loaded_ae_csr = 0; in qat_hal_chip_init()
777 handle->chip_info->fcu_loaded_ae_pos = 0; in qat_hal_chip_init()
778 handle->hal_cap_g_ctl_csr_addr_v = pmisc_addr + ICP_QAT_CAP_OFFSET; in qat_hal_chip_init()
779 handle->hal_cap_ae_xfer_csr_addr_v = pmisc_addr + ICP_QAT_AE_OFFSET; in qat_hal_chip_init()
780 handle->hal_ep_csr_addr_v = pmisc_addr + ICP_QAT_EP_OFFSET; in qat_hal_chip_init()
781 handle->hal_cap_ae_local_csr_addr_v = in qat_hal_chip_init()
782 (void __iomem *)((uintptr_t)handle->hal_cap_ae_xfer_csr_addr_v in qat_hal_chip_init()
790 if (handle->chip_info->mmp_sram_size > 0) { in qat_hal_chip_init()
793 handle->hal_sram_addr_v = sram_bar->virt_addr; in qat_hal_chip_init()
795 handle->hal_handle->revision_id = accel_dev->accel_pci_dev.revid; in qat_hal_chip_init()
796 handle->hal_handle->ae_mask = hw_data->ae_mask; in qat_hal_chip_init()
797 handle->hal_handle->admin_ae_mask = hw_data->admin_ae_mask; in qat_hal_chip_init()
798 handle->hal_handle->slice_mask = hw_data->accel_mask; in qat_hal_chip_init()
799 handle->cfg_ae_mask = ALL_AE_MASK; in qat_hal_chip_init()
801 handle->hal_handle->upc_mask = 0x1ffff; in qat_hal_chip_init()
802 handle->hal_handle->max_ustore = 0x4000; in qat_hal_chip_init()
804 ae_mask = handle->hal_handle->ae_mask; in qat_hal_chip_init()
806 handle->hal_handle->aes[ae].free_addr = 0; in qat_hal_chip_init()
807 handle->hal_handle->aes[ae].free_size = in qat_hal_chip_init()
808 handle->hal_handle->max_ustore; in qat_hal_chip_init()
809 handle->hal_handle->aes[ae].ustore_size = in qat_hal_chip_init()
810 handle->hal_handle->max_ustore; in qat_hal_chip_init()
811 handle->hal_handle->aes[ae].live_ctx_mask = in qat_hal_chip_init()
815 handle->hal_handle->ae_max_num = max_en_ae_id + 1; in qat_hal_chip_init()
818 for_each_set_bit(ae, &ae_mask, handle->hal_handle->ae_max_num) { in qat_hal_chip_init()
819 csr_val = qat_hal_rd_ae_csr(handle, ae, SIGNATURE_ENABLE); in qat_hal_chip_init()
821 qat_hal_wr_ae_csr(handle, ae, SIGNATURE_ENABLE, csr_val); in qat_hal_chip_init()
829 struct icp_qat_fw_loader_handle *handle; in qat_hal_init() local
832 handle = kzalloc(sizeof(*handle), GFP_KERNEL); in qat_hal_init()
833 if (!handle) in qat_hal_init()
836 handle->hal_handle = kzalloc(sizeof(*handle->hal_handle), GFP_KERNEL); in qat_hal_init()
837 if (!handle->hal_handle) { in qat_hal_init()
842 handle->chip_info = kzalloc(sizeof(*handle->chip_info), GFP_KERNEL); in qat_hal_init()
843 if (!handle->chip_info) { in qat_hal_init()
848 ret = qat_hal_chip_init(handle, accel_dev); in qat_hal_init()
855 ret = qat_hal_clr_reset(handle); in qat_hal_init()
861 qat_hal_clear_xfer(handle); in qat_hal_init()
862 if (!handle->chip_info->fw_auth) { in qat_hal_init()
863 ret = qat_hal_clear_gpr(handle); in qat_hal_init()
868 accel_dev->fw_loader->fw_loader = handle; in qat_hal_init()
872 kfree(handle->chip_info); in qat_hal_init()
874 kfree(handle->hal_handle); in qat_hal_init()
876 kfree(handle); in qat_hal_init()
880 void qat_hal_deinit(struct icp_qat_fw_loader_handle *handle) in qat_hal_deinit() argument
882 if (!handle) in qat_hal_deinit()
884 kfree(handle->chip_info); in qat_hal_deinit()
885 kfree(handle->hal_handle); in qat_hal_deinit()
886 kfree(handle); in qat_hal_deinit()
889 int qat_hal_start(struct icp_qat_fw_loader_handle *handle) in qat_hal_start() argument
891 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_hal_start()
892 u32 wakeup_val = handle->chip_info->wakeup_event_val; in qat_hal_start()
899 if (handle->chip_info->fw_auth) { in qat_hal_start()
900 fcu_ctl_csr = handle->chip_info->fcu_ctl_csr; in qat_hal_start()
901 fcu_sts_csr = handle->chip_info->fcu_sts_csr; in qat_hal_start()
903 SET_CAP_CSR(handle, fcu_ctl_csr, FCU_CTRL_CMD_START); in qat_hal_start()
906 fcu_sts = GET_CAP_CSR(handle, fcu_sts_csr); in qat_hal_start()
913 for_each_set_bit(ae, &ae_mask, handle->hal_handle->ae_max_num) { in qat_hal_start()
914 qat_hal_put_wakeup_event(handle, ae, 0, wakeup_val); in qat_hal_start()
915 qat_hal_enable_ctx(handle, ae, ICP_QAT_UCLO_AE_ALL_CTX); in qat_hal_start()
922 void qat_hal_stop(struct icp_qat_fw_loader_handle *handle, unsigned char ae, in qat_hal_stop() argument
925 if (!handle->chip_info->fw_auth) in qat_hal_stop()
926 qat_hal_disable_ctx(handle, ae, ctx_mask); in qat_hal_stop()
929 void qat_hal_set_pc(struct icp_qat_fw_loader_handle *handle, in qat_hal_set_pc() argument
932 qat_hal_wr_indr_csr(handle, ae, ctx_mask, CTX_STS_INDIRECT, in qat_hal_set_pc()
933 handle->hal_handle->upc_mask & upc); in qat_hal_set_pc()
936 static void qat_hal_get_uwords(struct icp_qat_fw_loader_handle *handle, in qat_hal_get_uwords() argument
943 misc_control = qat_hal_rd_ae_csr(handle, ae, AE_MISC_CONTROL); in qat_hal_get_uwords()
944 qat_hal_wr_ae_csr(handle, ae, AE_MISC_CONTROL, in qat_hal_get_uwords()
946 ustore_addr = qat_hal_rd_ae_csr(handle, ae, USTORE_ADDRESS); in qat_hal_get_uwords()
949 qat_hal_wr_ae_csr(handle, ae, USTORE_ADDRESS, uaddr); in qat_hal_get_uwords()
951 uwrd_lo = qat_hal_rd_ae_csr(handle, ae, USTORE_DATA_LOWER); in qat_hal_get_uwords()
952 uwrd_hi = qat_hal_rd_ae_csr(handle, ae, USTORE_DATA_UPPER); in qat_hal_get_uwords()
956 qat_hal_wr_ae_csr(handle, ae, AE_MISC_CONTROL, misc_control); in qat_hal_get_uwords()
957 qat_hal_wr_ae_csr(handle, ae, USTORE_ADDRESS, ustore_addr); in qat_hal_get_uwords()
960 void qat_hal_wr_umem(struct icp_qat_fw_loader_handle *handle, in qat_hal_wr_umem() argument
966 ustore_addr = qat_hal_rd_ae_csr(handle, ae, USTORE_ADDRESS); in qat_hal_wr_umem()
968 qat_hal_wr_ae_csr(handle, ae, USTORE_ADDRESS, uaddr); in qat_hal_wr_umem()
979 qat_hal_wr_ae_csr(handle, ae, USTORE_DATA_LOWER, uwrd_lo); in qat_hal_wr_umem()
980 qat_hal_wr_ae_csr(handle, ae, USTORE_DATA_UPPER, uwrd_hi); in qat_hal_wr_umem()
982 qat_hal_wr_ae_csr(handle, ae, USTORE_ADDRESS, ustore_addr); in qat_hal_wr_umem()
986 static int qat_hal_exec_micro_inst(struct icp_qat_fw_loader_handle *handle, in qat_hal_exec_micro_inst() argument
1005 if ((inst_num > handle->hal_handle->max_ustore) || !micro_inst) { in qat_hal_exec_micro_inst()
1010 ind_lm_addr0 = qat_hal_rd_indr_csr(handle, ae, ctx, LM_ADDR_0_INDIRECT); in qat_hal_exec_micro_inst()
1011 ind_lm_addr1 = qat_hal_rd_indr_csr(handle, ae, ctx, LM_ADDR_1_INDIRECT); in qat_hal_exec_micro_inst()
1012 ind_lm_addr_byte0 = qat_hal_rd_indr_csr(handle, ae, ctx, in qat_hal_exec_micro_inst()
1014 ind_lm_addr_byte1 = qat_hal_rd_indr_csr(handle, ae, ctx, in qat_hal_exec_micro_inst()
1016 if (handle->chip_info->lm2lm3) { in qat_hal_exec_micro_inst()
1017 ind_lm_addr2 = qat_hal_rd_indr_csr(handle, ae, ctx, in qat_hal_exec_micro_inst()
1019 ind_lm_addr3 = qat_hal_rd_indr_csr(handle, ae, ctx, in qat_hal_exec_micro_inst()
1021 ind_lm_addr_byte2 = qat_hal_rd_indr_csr(handle, ae, ctx, in qat_hal_exec_micro_inst()
1023 ind_lm_addr_byte3 = qat_hal_rd_indr_csr(handle, ae, ctx, in qat_hal_exec_micro_inst()
1025 ind_t_index = qat_hal_rd_indr_csr(handle, ae, ctx, in qat_hal_exec_micro_inst()
1027 ind_t_index_byte = qat_hal_rd_indr_csr(handle, ae, ctx, in qat_hal_exec_micro_inst()
1031 qat_hal_get_uwords(handle, ae, 0, inst_num, savuwords); in qat_hal_exec_micro_inst()
1032 qat_hal_get_wakeup_event(handle, ae, ctx, &wakeup_events); in qat_hal_exec_micro_inst()
1033 savpc = qat_hal_rd_indr_csr(handle, ae, ctx, CTX_STS_INDIRECT); in qat_hal_exec_micro_inst()
1034 savpc = (savpc & handle->hal_handle->upc_mask) >> 0; in qat_hal_exec_micro_inst()
1035 ctx_enables = qat_hal_rd_ae_csr(handle, ae, CTX_ENABLES); in qat_hal_exec_micro_inst()
1037 savcc = qat_hal_rd_ae_csr(handle, ae, CC_ENABLE); in qat_hal_exec_micro_inst()
1038 savctx = qat_hal_rd_ae_csr(handle, ae, ACTIVE_CTX_STATUS); in qat_hal_exec_micro_inst()
1039 ctxarb_ctl = qat_hal_rd_ae_csr(handle, ae, CTX_ARB_CNTL); in qat_hal_exec_micro_inst()
1040 ind_cnt_sig = qat_hal_rd_indr_csr(handle, ae, ctx, in qat_hal_exec_micro_inst()
1042 ind_sig = qat_hal_rd_indr_csr(handle, ae, ctx, in qat_hal_exec_micro_inst()
1044 act_sig = qat_hal_rd_ae_csr(handle, ae, CTX_SIG_EVENTS_ACTIVE); in qat_hal_exec_micro_inst()
1046 qat_hal_wr_ae_csr(handle, ae, CTX_ENABLES, ctx_enables); in qat_hal_exec_micro_inst()
1047 qat_hal_wr_uwords(handle, ae, 0, inst_num, micro_inst); in qat_hal_exec_micro_inst()
1048 qat_hal_wr_indr_csr(handle, ae, (1 << ctx), CTX_STS_INDIRECT, 0); in qat_hal_exec_micro_inst()
1049 qat_hal_wr_ae_csr(handle, ae, ACTIVE_CTX_STATUS, ctx & ACS_ACNO); in qat_hal_exec_micro_inst()
1051 qat_hal_wr_ae_csr(handle, ae, CC_ENABLE, savcc & 0xffffdfff); in qat_hal_exec_micro_inst()
1052 qat_hal_put_wakeup_event(handle, ae, (1 << ctx), XCWE_VOLUNTARY); in qat_hal_exec_micro_inst()
1053 qat_hal_wr_indr_csr(handle, ae, (1 << ctx), CTX_SIG_EVENTS_INDIRECT, 0); in qat_hal_exec_micro_inst()
1054 qat_hal_wr_ae_csr(handle, ae, CTX_SIG_EVENTS_ACTIVE, 0); in qat_hal_exec_micro_inst()
1055 qat_hal_enable_ctx(handle, ae, (1 << ctx)); in qat_hal_exec_micro_inst()
1057 if (qat_hal_wait_cycles(handle, ae, max_cycle, 1) != 0) in qat_hal_exec_micro_inst()
1062 ctx_status = qat_hal_rd_indr_csr(handle, ae, ctx, in qat_hal_exec_micro_inst()
1064 *endpc = ctx_status & handle->hal_handle->upc_mask; in qat_hal_exec_micro_inst()
1067 qat_hal_disable_ctx(handle, ae, (1 << ctx)); in qat_hal_exec_micro_inst()
1069 qat_hal_wr_uwords(handle, ae, 0, inst_num, savuwords); in qat_hal_exec_micro_inst()
1070 qat_hal_put_wakeup_event(handle, ae, (1 << ctx), wakeup_events); in qat_hal_exec_micro_inst()
1071 qat_hal_wr_indr_csr(handle, ae, (1 << ctx), CTX_STS_INDIRECT, in qat_hal_exec_micro_inst()
1072 handle->hal_handle->upc_mask & savpc); in qat_hal_exec_micro_inst()
1073 csr_val = qat_hal_rd_ae_csr(handle, ae, AE_MISC_CONTROL); in qat_hal_exec_micro_inst()
1075 qat_hal_wr_ae_csr(handle, ae, AE_MISC_CONTROL, newcsr_val); in qat_hal_exec_micro_inst()
1076 qat_hal_wr_ae_csr(handle, ae, CC_ENABLE, savcc); in qat_hal_exec_micro_inst()
1077 qat_hal_wr_ae_csr(handle, ae, ACTIVE_CTX_STATUS, savctx & ACS_ACNO); in qat_hal_exec_micro_inst()
1078 qat_hal_wr_ae_csr(handle, ae, CTX_ARB_CNTL, ctxarb_ctl); in qat_hal_exec_micro_inst()
1079 qat_hal_wr_indr_csr(handle, ae, (1 << ctx), in qat_hal_exec_micro_inst()
1081 qat_hal_wr_indr_csr(handle, ae, (1 << ctx), in qat_hal_exec_micro_inst()
1083 qat_hal_wr_indr_csr(handle, ae, (1 << ctx), in qat_hal_exec_micro_inst()
1085 qat_hal_wr_indr_csr(handle, ae, (1 << ctx), in qat_hal_exec_micro_inst()
1087 if (handle->chip_info->lm2lm3) { in qat_hal_exec_micro_inst()
1088 qat_hal_wr_indr_csr(handle, ae, BIT(ctx), LM_ADDR_2_INDIRECT, in qat_hal_exec_micro_inst()
1090 qat_hal_wr_indr_csr(handle, ae, BIT(ctx), LM_ADDR_3_INDIRECT, in qat_hal_exec_micro_inst()
1092 qat_hal_wr_indr_csr(handle, ae, BIT(ctx), in qat_hal_exec_micro_inst()
1095 qat_hal_wr_indr_csr(handle, ae, BIT(ctx), in qat_hal_exec_micro_inst()
1098 qat_hal_wr_indr_csr(handle, ae, BIT(ctx), in qat_hal_exec_micro_inst()
1100 qat_hal_wr_indr_csr(handle, ae, BIT(ctx), in qat_hal_exec_micro_inst()
1104 qat_hal_wr_indr_csr(handle, ae, (1 << ctx), in qat_hal_exec_micro_inst()
1106 qat_hal_wr_indr_csr(handle, ae, (1 << ctx), in qat_hal_exec_micro_inst()
1108 qat_hal_wr_ae_csr(handle, ae, CTX_SIG_EVENTS_ACTIVE, act_sig); in qat_hal_exec_micro_inst()
1109 qat_hal_wr_ae_csr(handle, ae, CTX_ENABLES, ctx_enables); in qat_hal_exec_micro_inst()
1114 static int qat_hal_rd_rel_reg(struct icp_qat_fw_loader_handle *handle, in qat_hal_rd_rel_reg() argument
1138 savctx = qat_hal_rd_ae_csr(handle, ae, ACTIVE_CTX_STATUS); in qat_hal_rd_rel_reg()
1139 ctxarb_cntl = qat_hal_rd_ae_csr(handle, ae, CTX_ARB_CNTL); in qat_hal_rd_rel_reg()
1140 ctx_enables = qat_hal_rd_ae_csr(handle, ae, CTX_ENABLES); in qat_hal_rd_rel_reg()
1143 qat_hal_wr_ae_csr(handle, ae, ACTIVE_CTX_STATUS, in qat_hal_rd_rel_reg()
1145 qat_hal_get_uwords(handle, ae, 0, 1, &savuword); in qat_hal_rd_rel_reg()
1146 qat_hal_wr_ae_csr(handle, ae, CTX_ENABLES, ctx_enables); in qat_hal_rd_rel_reg()
1147 ustore_addr = qat_hal_rd_ae_csr(handle, ae, USTORE_ADDRESS); in qat_hal_rd_rel_reg()
1149 qat_hal_wr_ae_csr(handle, ae, USTORE_ADDRESS, uaddr); in qat_hal_rd_rel_reg()
1153 qat_hal_wr_ae_csr(handle, ae, USTORE_DATA_LOWER, uwrd_lo); in qat_hal_rd_rel_reg()
1154 qat_hal_wr_ae_csr(handle, ae, USTORE_DATA_UPPER, uwrd_hi); in qat_hal_rd_rel_reg()
1155 qat_hal_wr_ae_csr(handle, ae, USTORE_ADDRESS, uaddr); in qat_hal_rd_rel_reg()
1157 qat_hal_wait_cycles(handle, ae, 0x8, 0); in qat_hal_rd_rel_reg()
1163 *data = qat_hal_rd_ae_csr(handle, ae, ALU_OUT); in qat_hal_rd_rel_reg()
1164 qat_hal_wr_ae_csr(handle, ae, USTORE_ADDRESS, ustore_addr); in qat_hal_rd_rel_reg()
1165 qat_hal_wr_uwords(handle, ae, 0, 1, &savuword); in qat_hal_rd_rel_reg()
1167 qat_hal_wr_ae_csr(handle, ae, ACTIVE_CTX_STATUS, in qat_hal_rd_rel_reg()
1169 qat_hal_wr_ae_csr(handle, ae, CTX_ARB_CNTL, ctxarb_cntl); in qat_hal_rd_rel_reg()
1170 qat_hal_wr_ae_csr(handle, ae, CTX_ENABLES, ctx_enables); in qat_hal_rd_rel_reg()
1175 static int qat_hal_wr_rel_reg(struct icp_qat_fw_loader_handle *handle, in qat_hal_wr_rel_reg() argument
1218 return qat_hal_exec_micro_inst(handle, ae, ctx, insts, num_inst, in qat_hal_wr_rel_reg()
1256 static int qat_hal_exec_micro_init_lm(struct icp_qat_fw_loader_handle *handle, in qat_hal_exec_micro_init_lm() argument
1266 qat_hal_rd_rel_reg(handle, ae, ctx, ICP_GPA_REL, 0, &gpra0); in qat_hal_exec_micro_init_lm()
1267 qat_hal_rd_rel_reg(handle, ae, ctx, ICP_GPA_REL, 0x1, &gpra1); in qat_hal_exec_micro_init_lm()
1268 qat_hal_rd_rel_reg(handle, ae, ctx, ICP_GPA_REL, 0x2, &gpra2); in qat_hal_exec_micro_init_lm()
1269 qat_hal_rd_rel_reg(handle, ae, ctx, ICP_GPB_REL, 0, &gprb0); in qat_hal_exec_micro_init_lm()
1270 qat_hal_rd_rel_reg(handle, ae, ctx, ICP_GPB_REL, 0x1, &gprb1); in qat_hal_exec_micro_init_lm()
1273 stat = qat_hal_exec_micro_inst(handle, ae, ctx, micro_inst, inst_num, 1, in qat_hal_exec_micro_init_lm()
1277 qat_hal_wr_rel_reg(handle, ae, ctx, ICP_GPA_REL, 0, gpra0); in qat_hal_exec_micro_init_lm()
1278 qat_hal_wr_rel_reg(handle, ae, ctx, ICP_GPA_REL, 0x1, gpra1); in qat_hal_exec_micro_init_lm()
1279 qat_hal_wr_rel_reg(handle, ae, ctx, ICP_GPA_REL, 0x2, gpra2); in qat_hal_exec_micro_init_lm()
1280 qat_hal_wr_rel_reg(handle, ae, ctx, ICP_GPB_REL, 0, gprb0); in qat_hal_exec_micro_init_lm()
1281 qat_hal_wr_rel_reg(handle, ae, ctx, ICP_GPB_REL, 0x1, gprb1); in qat_hal_exec_micro_init_lm()
1286 int qat_hal_batch_wr_lm(struct icp_qat_fw_loader_handle *handle, in qat_hal_batch_wr_lm() argument
1299 if ((unsigned int)alloc_inst_size > handle->hal_handle->max_ustore) in qat_hal_batch_wr_lm()
1300 alloc_inst_size = handle->hal_handle->max_ustore; in qat_hal_batch_wr_lm()
1321 stat = qat_hal_exec_micro_init_lm(handle, ae, 0, &first_exec, in qat_hal_batch_wr_lm()
1329 static int qat_hal_put_rel_rd_xfer(struct icp_qat_fw_loader_handle *handle, in qat_hal_put_rel_rd_xfer() argument
1340 ctx_enables = qat_hal_rd_ae_csr(handle, ae, CTX_ENABLES); in qat_hal_put_rel_rd_xfer()
1357 SET_AE_XFER(handle, ae, reg_addr, val); in qat_hal_put_rel_rd_xfer()
1361 SET_AE_XFER(handle, ae, (reg_addr + dr_offset), val); in qat_hal_put_rel_rd_xfer()
1370 static int qat_hal_put_rel_wr_xfer(struct icp_qat_fw_loader_handle *handle, in qat_hal_put_rel_wr_xfer() argument
1390 ctx_enables = qat_hal_rd_ae_csr(handle, ae, CTX_ENABLES); in qat_hal_put_rel_wr_xfer()
1407 status = qat_hal_rd_rel_reg(handle, ae, ctx, ICP_GPB_REL, gprnum, &gprval); in qat_hal_put_rel_wr_xfer()
1425 status = qat_hal_exec_micro_inst(handle, ae, ctx, micro_inst, num_inst, in qat_hal_put_rel_wr_xfer()
1427 qat_hal_wr_rel_reg(handle, ae, ctx, ICP_GPB_REL, gprnum, gprval); in qat_hal_put_rel_wr_xfer()
1431 static int qat_hal_put_rel_nn(struct icp_qat_fw_loader_handle *handle, in qat_hal_put_rel_nn() argument
1438 ctx_enables = qat_hal_rd_ae_csr(handle, ae, CTX_ENABLES); in qat_hal_put_rel_nn()
1440 qat_hal_wr_ae_csr(handle, ae, CTX_ENABLES, ctx_enables | CE_NN_MODE); in qat_hal_put_rel_nn()
1442 stat = qat_hal_put_rel_wr_xfer(handle, ae, ctx, ICP_NEIGH_REL, nn, val); in qat_hal_put_rel_nn()
1443 qat_hal_wr_ae_csr(handle, ae, CTX_ENABLES, ctx_enables); in qat_hal_put_rel_nn()
1448 *handle, unsigned char ae, in qat_hal_convert_abs_to_rel()
1455 ctx_enables = qat_hal_rd_ae_csr(handle, ae, CTX_ENABLES); in qat_hal_convert_abs_to_rel()
1468 int qat_hal_init_gpr(struct icp_qat_fw_loader_handle *handle, in qat_hal_init_gpr() argument
1483 qat_hal_convert_abs_to_rel(handle, ae, reg_num, ®, in qat_hal_init_gpr()
1492 stat = qat_hal_wr_rel_reg(handle, ae, ctx, type, reg, regdata); in qat_hal_init_gpr()
1502 int qat_hal_init_wr_xfer(struct icp_qat_fw_loader_handle *handle, in qat_hal_init_wr_xfer() argument
1517 qat_hal_convert_abs_to_rel(handle, ae, reg_num, ®, in qat_hal_init_wr_xfer()
1526 stat = qat_hal_put_rel_wr_xfer(handle, ae, ctx, type, reg, in qat_hal_init_wr_xfer()
1537 int qat_hal_init_rd_xfer(struct icp_qat_fw_loader_handle *handle, in qat_hal_init_rd_xfer() argument
1552 qat_hal_convert_abs_to_rel(handle, ae, reg_num, ®, in qat_hal_init_rd_xfer()
1561 stat = qat_hal_put_rel_rd_xfer(handle, ae, ctx, type, reg, in qat_hal_init_rd_xfer()
1572 int qat_hal_init_nn(struct icp_qat_fw_loader_handle *handle, in qat_hal_init_nn() argument
1578 if (!handle->chip_info->nn) { in qat_hal_init_nn()
1579 dev_err(&handle->pci_dev->dev, "QAT: No next neigh in 0x%x\n", in qat_hal_init_nn()
1580 handle->pci_dev->device); in qat_hal_init_nn()
1590 stat = qat_hal_put_rel_nn(handle, ae, ctx, reg_num, regdata); in qat_hal_init_nn()