Lines Matching refs:trans

25 	struct iwl_trans *trans = (struct iwl_trans *)data;
28 IWL_DEBUG_FW(trans,
35 static int iwl_pnvm_handle_section(struct iwl_trans *trans, const u8 *data,
44 IWL_DEBUG_FW(trans, "Handling PNVM section\n");
58 IWL_ERR(trans, "invalid TLV len: %zd/%u\n",
68 IWL_DEBUG_FW(trans,
76 IWL_DEBUG_FW(trans,
83 IWL_DEBUG_FW(trans,
95 IWL_DEBUG_FW(trans,
99 if (mac_type == CSR_HW_REV_TYPE(trans->hw_rev) &&
100 rf_id == CSR_HW_RFID_TYPE(trans->hw_rf_id))
107 IWL_DEBUG_FW(trans,
113 IWL_DEBUG_FW(trans, "Ignoring separator.\n");
118 IWL_DEBUG_FW(trans,
123 IWL_DEBUG_FW(trans, "Adding data (size %d)\n",
133 if (iwl_uefi_handle_tlv_mem_desc(trans, data, tlv_len,
138 IWL_DEBUG_FW(trans,
142 IWL_DEBUG_FW(trans, "Found TLV 0x%0x, len %d\n",
153 IWL_DEBUG_FW(trans,
155 CSR_HW_REV_TYPE(trans->hw_rev),
156 CSR_HW_RFID_TYPE(trans->hw_rf_id));
161 IWL_DEBUG_FW(trans, "Empty PNVM, skipping.\n");
168 static int iwl_pnvm_parse(struct iwl_trans *trans, const u8 *data,
174 IWL_DEBUG_FW(trans, "Parsing PNVM file\n");
187 IWL_ERR(trans, "invalid TLV len: %zd/%u\n",
196 IWL_DEBUG_FW(trans,
199 IWL_DEBUG_FW(trans, "sku_id 0x%0x 0x%0x 0x%0x\n",
207 trans->reduced_cap_sku = false;
208 rf_type = CSR_HW_RFID_TYPE(trans->hw_rf_id);
209 if ((trans->sku_id[0] & IWL_PNVM_REDUCED_CAP_BIT) &&
211 trans->reduced_cap_sku = true;
213 IWL_DEBUG_FW(trans,
215 trans->reduced_cap_sku);
217 if (trans->sku_id[0] == le32_to_cpu(sku_id->data[0]) &&
218 trans->sku_id[1] == le32_to_cpu(sku_id->data[1]) &&
219 trans->sku_id[2] == le32_to_cpu(sku_id->data[2])) {
222 ret = iwl_pnvm_handle_section(trans, data, len,
227 IWL_DEBUG_FW(trans, "SKU ID didn't match!\n");
238 static int iwl_pnvm_get_from_fs(struct iwl_trans *trans, u8 **data, size_t *len)
245 iwl_pnvm_get_fs_name(trans, pnvm_name, sizeof(pnvm_name));
247 ret = firmware_request_nowarn(&pnvm, pnvm_name, trans->dev);
249 IWL_DEBUG_FW(trans, "PNVM file %s not found %d\n",
297 static void iwl_pnvm_load_pnvm_to_trans(struct iwl_trans *trans,
306 if (trans->fail_to_parse_pnvm_image)
309 if (trans->pnvm_loaded)
312 data = iwl_get_pnvm_image(trans, &length);
314 trans->fail_to_parse_pnvm_image = true;
322 ret = iwl_pnvm_parse(trans, data, length, pnvm_data);
324 trans->fail_to_parse_pnvm_image = true;
328 ret = iwl_trans_load_pnvm(trans, pnvm_data, capa);
331 IWL_INFO(trans, "loaded PNVM version %08x\n", pnvm_data->version);
334 iwl_trans_set_pnvm(trans, capa);
341 iwl_pnvm_load_reduce_power_to_trans(struct iwl_trans *trans,
349 if (trans->failed_to_load_reduce_power_image)
352 if (trans->reduce_power_loaded)
355 data = iwl_uefi_get_reduced_power(trans, &length);
357 trans->failed_to_load_reduce_power_image = true;
365 ret = iwl_uefi_reduce_power_parse(trans, data, length, pnvm_data);
367 trans->failed_to_load_reduce_power_image = true;
371 ret = iwl_trans_load_reduce_power(trans, pnvm_data, capa);
373 IWL_DEBUG_FW(trans,
376 trans->failed_to_load_reduce_power_image = true;
381 iwl_trans_set_reduce_power(trans, capa);
387 int iwl_pnvm_load(struct iwl_trans *trans,
396 if (!trans->sku_id[0] && !trans->sku_id[1] && !trans->sku_id[2])
399 iwl_pnvm_load_pnvm_to_trans(trans, capa);
400 iwl_pnvm_load_reduce_power_to_trans(trans, capa);
404 iwl_pnvm_complete_fn, trans);
407 iwl_write_umac_prph(trans, UREG_DOORBELL_TO_ISR6,