Lines Matching full:trans
24 struct iwl_trans *trans = (struct iwl_trans *)data; in iwl_pnvm_complete_fn() local
27 IWL_DEBUG_FW(trans, in iwl_pnvm_complete_fn()
34 static int iwl_pnvm_handle_section(struct iwl_trans *trans, const u8 *data, in iwl_pnvm_handle_section() argument
44 IWL_DEBUG_FW(trans, "Handling PNVM section\n"); in iwl_pnvm_handle_section()
56 IWL_ERR(trans, "invalid TLV len: %zd/%u\n", in iwl_pnvm_handle_section()
67 IWL_DEBUG_FW(trans, in iwl_pnvm_handle_section()
75 IWL_DEBUG_FW(trans, in iwl_pnvm_handle_section()
81 IWL_DEBUG_FW(trans, in iwl_pnvm_handle_section()
90 IWL_DEBUG_FW(trans, in iwl_pnvm_handle_section()
94 if (mac_type != CSR_HW_REV_TYPE(trans->hw_rev) || in iwl_pnvm_handle_section()
95 rf_id != CSR_HW_RFID_TYPE(trans->hw_rf_id)) { in iwl_pnvm_handle_section()
96 IWL_DEBUG_FW(trans, in iwl_pnvm_handle_section()
98 CSR_HW_REV_TYPE(trans->hw_rev), trans->hw_rf_id); in iwl_pnvm_handle_section()
108 IWL_DEBUG_FW(trans, in iwl_pnvm_handle_section()
114 IWL_DEBUG_FW(trans, "Ignoring separator.\n"); in iwl_pnvm_handle_section()
118 IWL_DEBUG_FW(trans, "Adding data (size %d)\n", in iwl_pnvm_handle_section()
123 IWL_DEBUG_FW(trans, in iwl_pnvm_handle_section()
139 IWL_DEBUG_FW(trans, in iwl_pnvm_handle_section()
143 IWL_DEBUG_FW(trans, "Found TLV 0x%0x, len %d\n", in iwl_pnvm_handle_section()
154 IWL_DEBUG_FW(trans, "Empty PNVM, skipping.\n"); in iwl_pnvm_handle_section()
159 IWL_INFO(trans, "loaded PNVM version 0x%0x\n", sha1); in iwl_pnvm_handle_section()
161 ret = iwl_trans_set_pnvm(trans, pnvm_data, size); in iwl_pnvm_handle_section()
167 static int iwl_pnvm_parse(struct iwl_trans *trans, const u8 *data, in iwl_pnvm_parse() argument
172 IWL_DEBUG_FW(trans, "Parsing PNVM file\n"); in iwl_pnvm_parse()
184 IWL_ERR(trans, "invalid TLV len: %zd/%u\n", in iwl_pnvm_parse()
193 IWL_DEBUG_FW(trans, in iwl_pnvm_parse()
196 IWL_DEBUG_FW(trans, "sku_id 0x%0x 0x%0x 0x%0x\n", in iwl_pnvm_parse()
201 if (trans->sku_id[0] == le32_to_cpu(sku_id->data[0]) && in iwl_pnvm_parse()
202 trans->sku_id[1] == le32_to_cpu(sku_id->data[1]) && in iwl_pnvm_parse()
203 trans->sku_id[2] == le32_to_cpu(sku_id->data[2])) { in iwl_pnvm_parse()
209 ret = iwl_pnvm_handle_section(trans, data, len); in iwl_pnvm_parse()
213 IWL_DEBUG_FW(trans, "SKU ID didn't match!\n"); in iwl_pnvm_parse()
224 int iwl_pnvm_load(struct iwl_trans *trans, in iwl_pnvm_load() argument
235 if (!trans->sku_id[0] && !trans->sku_id[1] && !trans->sku_id[2]) in iwl_pnvm_load()
239 if (trans->pnvm_loaded) in iwl_pnvm_load()
247 trans->cfg->fw_name_pre); in iwl_pnvm_load()
250 if (strlen(trans->cfg->fw_name_pre) < sizeof(pnvm_name)) in iwl_pnvm_load()
251 pnvm_name[strlen(trans->cfg->fw_name_pre) - 1] = '.'; in iwl_pnvm_load()
253 ret = firmware_request_nowarn(&pnvm, pnvm_name, trans->dev); in iwl_pnvm_load()
255 IWL_DEBUG_FW(trans, "PNVM file %s not found %d\n", in iwl_pnvm_load()
258 iwl_pnvm_parse(trans, pnvm->data, pnvm->size); in iwl_pnvm_load()
265 iwl_pnvm_complete_fn, trans); in iwl_pnvm_load()
268 iwl_write_umac_prph(trans, UREG_DOORBELL_TO_ISR6, in iwl_pnvm_load()