Lines Matching full:trans

54 #include "iwl-trans.h"
60 static void *_iwl_pcie_ctxt_info_dma_alloc_coherent(struct iwl_trans *trans, in _iwl_pcie_ctxt_info_dma_alloc_coherent() argument
71 result = dma_alloc_coherent(trans->dev, size, phys, GFP_KERNEL); in _iwl_pcie_ctxt_info_dma_alloc_coherent()
80 result = _iwl_pcie_ctxt_info_dma_alloc_coherent(trans, size, in _iwl_pcie_ctxt_info_dma_alloc_coherent()
83 dma_free_coherent(trans->dev, size, old, oldphys); in _iwl_pcie_ctxt_info_dma_alloc_coherent()
89 static void *iwl_pcie_ctxt_info_dma_alloc_coherent(struct iwl_trans *trans, in iwl_pcie_ctxt_info_dma_alloc_coherent() argument
93 return _iwl_pcie_ctxt_info_dma_alloc_coherent(trans, size, phys, 0); in iwl_pcie_ctxt_info_dma_alloc_coherent()
96 int iwl_pcie_ctxt_info_alloc_dma(struct iwl_trans *trans, in iwl_pcie_ctxt_info_alloc_dma() argument
100 dram->block = iwl_pcie_ctxt_info_dma_alloc_coherent(trans, len, in iwl_pcie_ctxt_info_alloc_dma()
111 void iwl_pcie_ctxt_info_free_paging(struct iwl_trans *trans) in iwl_pcie_ctxt_info_free_paging() argument
113 struct iwl_self_init_dram *dram = &trans->init_dram; in iwl_pcie_ctxt_info_free_paging()
123 dma_free_coherent(trans->dev, dram->paging[i].size, in iwl_pcie_ctxt_info_free_paging()
132 int iwl_pcie_init_fw_sec(struct iwl_trans *trans, in iwl_pcie_init_fw_sec() argument
136 struct iwl_self_init_dram *dram = &trans->init_dram; in iwl_pcie_init_fw_sec()
142 iwl_pcie_ctxt_info_free_paging(trans); in iwl_pcie_init_fw_sec()
159 ret = iwl_pcie_ctxt_info_alloc_dma(trans, fw->sec[i].data, in iwl_pcie_init_fw_sec()
172 ret = iwl_pcie_ctxt_info_alloc_dma(trans, in iwl_pcie_init_fw_sec()
197 ret = iwl_pcie_ctxt_info_alloc_dma(trans, fw->sec[fw_idx].data, in iwl_pcie_init_fw_sec()
211 int iwl_pcie_ctxt_info_init(struct iwl_trans *trans, in iwl_pcie_ctxt_info_init() argument
214 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); in iwl_pcie_ctxt_info_init()
221 ctxt_info = iwl_pcie_ctxt_info_dma_alloc_coherent(trans, in iwl_pcie_ctxt_info_init()
231 cpu_to_le16((u16)iwl_read32(trans, CSR_HW_REV)); in iwl_pcie_ctxt_info_init()
253 WARN_ON(RX_QUEUE_CB_SIZE(trans->cfg->num_rbds) > 12); in iwl_pcie_ctxt_info_init()
256 u32_encode_bits(RX_QUEUE_CB_SIZE(trans->cfg->num_rbds), in iwl_pcie_ctxt_info_init()
269 cpu_to_le64(trans->txqs.txq[trans->txqs.cmd.q_id]->dma_addr); in iwl_pcie_ctxt_info_init()
274 ret = iwl_pcie_init_fw_sec(trans, fw, &ctxt_info->dram); in iwl_pcie_ctxt_info_init()
276 dma_free_coherent(trans->dev, sizeof(*trans_pcie->ctxt_info), in iwl_pcie_ctxt_info_init()
283 iwl_enable_fw_load_int_ctx_info(trans); in iwl_pcie_ctxt_info_init()
286 if (iwl_pcie_dbg_on(trans)) in iwl_pcie_ctxt_info_init()
287 iwl_pcie_apply_destination(trans); in iwl_pcie_ctxt_info_init()
290 iwl_write64(trans, CSR_CTXT_INFO_BA, trans_pcie->ctxt_info_dma_addr); in iwl_pcie_ctxt_info_init()
291 iwl_write_prph(trans, UREG_CPU_INIT_RUN, 1); in iwl_pcie_ctxt_info_init()
298 void iwl_pcie_ctxt_info_free(struct iwl_trans *trans) in iwl_pcie_ctxt_info_free() argument
300 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); in iwl_pcie_ctxt_info_free()
305 dma_free_coherent(trans->dev, sizeof(*trans_pcie->ctxt_info), in iwl_pcie_ctxt_info_free()
311 iwl_pcie_ctxt_info_free_fw_img(trans); in iwl_pcie_ctxt_info_free()