Lines Matching refs:iwl_trans

1356 static int get_crf_id(struct iwl_trans *iwl_trans)  in get_crf_id()  argument
1363 if (iwl_trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210) in get_crf_id()
1368 if (!iwl_trans_grab_nic_access(iwl_trans)) { in get_crf_id()
1369 IWL_ERR(iwl_trans, "Failed to grab nic access before reading crf id\n"); in get_crf_id()
1375 val = iwl_read_umac_prph_no_grab(iwl_trans, WFPM_CTRL_REG); in get_crf_id()
1377 iwl_write_umac_prph_no_grab(iwl_trans, WFPM_CTRL_REG, val); in get_crf_id()
1380 val = iwl_read_prph_no_grab(iwl_trans, sd_reg_ver_addr); in get_crf_id()
1383 cdb = iwl_read_umac_prph_no_grab(iwl_trans, WFPM_OTP_CFG1_ADDR); in get_crf_id()
1388 iwl_trans->hw_rf_id = (IWL_CFG_RF_TYPE_JF1 << 12); in get_crf_id()
1391 iwl_trans->hw_rf_id = (IWL_CFG_RF_TYPE_JF2 << 12); in get_crf_id()
1394 iwl_trans->hw_rf_id = (IWL_CFG_RF_TYPE_HR1 << 12); in get_crf_id()
1397 iwl_trans->hw_rf_id = (IWL_CFG_RF_TYPE_HR2 << 12); in get_crf_id()
1400 iwl_trans->hw_rf_id = (IWL_CFG_RF_TYPE_GF << 12); in get_crf_id()
1403 iwl_trans->hw_rf_id = (IWL_CFG_RF_TYPE_MR << 12); in get_crf_id()
1406 iwl_trans->hw_rf_id = (IWL_CFG_RF_TYPE_FM << 12); in get_crf_id()
1410 IWL_ERR(iwl_trans, in get_crf_id()
1419 iwl_trans->hw_rf_id += BIT(28); in get_crf_id()
1420 IWL_INFO(iwl_trans, "Adding cdb to rf id\n"); in get_crf_id()
1423 IWL_INFO(iwl_trans, "Detected RF 0x%x from crf id 0x%x\n", in get_crf_id()
1424 iwl_trans->hw_rf_id, REG_CRF_ID_TYPE(val)); in get_crf_id()
1427 iwl_trans_release_nic_access(iwl_trans); in get_crf_id()
1501 struct iwl_trans *iwl_trans; in iwl_pci_probe() local
1519 iwl_trans = iwl_trans_pcie_alloc(pdev, ent, trans); in iwl_pci_probe()
1520 if (IS_ERR(iwl_trans)) in iwl_pci_probe()
1521 return PTR_ERR(iwl_trans); in iwl_pci_probe()
1523 trans_pcie = IWL_TRANS_GET_PCIE_TRANS(iwl_trans); in iwl_pci_probe()
1532 ret = iwl_pcie_prepare_card_hw(iwl_trans); in iwl_pci_probe()
1534 ret = iwl_finish_nic_init(iwl_trans); in iwl_pci_probe()
1537 if (iwl_trans_grab_nic_access(iwl_trans)) { in iwl_pci_probe()
1539 iwl_trans_release_nic_access(iwl_trans); in iwl_pci_probe()
1546 iwl_trans->hw_rf_id = iwl_read32(iwl_trans, CSR_HW_RF_ID); in iwl_pci_probe()
1553 if (iwl_trans->trans_cfg->rf_id && in iwl_pci_probe()
1554 iwl_trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_9000 && in iwl_pci_probe()
1555 !CSR_HW_RFID_TYPE(iwl_trans->hw_rf_id) && get_crf_id(iwl_trans)) { in iwl_pci_probe()
1561 CSR_HW_REV_TYPE(iwl_trans->hw_rev), in iwl_pci_probe()
1562 iwl_trans->hw_rev_step, in iwl_pci_probe()
1563 CSR_HW_RFID_TYPE(iwl_trans->hw_rf_id), in iwl_pci_probe()
1564 CSR_HW_RFID_IS_CDB(iwl_trans->hw_rf_id), in iwl_pci_probe()
1565 CSR_HW_RFID_IS_JACKET(iwl_trans->hw_rf_id), in iwl_pci_probe()
1571 iwl_trans->cfg = dev_info->cfg; in iwl_pci_probe()
1572 iwl_trans->name = dev_info->name; in iwl_pci_probe()
1584 if (CSR_HW_REV_TYPE(iwl_trans->hw_rev) == IWL_CFG_MAC_TYPE_SNJ) in iwl_pci_probe()
1585 iwl_trans->trans_cfg = &iwl_so_trans_cfg; in iwl_pci_probe()
1601 (iwl_trans->hw_rev & CSR_HW_REV_TYPE_MSK) == CSR_HW_REV_TYPE_7265D) in iwl_pci_probe()
1602 iwl_trans->cfg = cfg_7265d; in iwl_pci_probe()
1610 if (iwl_trans->hw_rev == CSR_HW_REV_TYPE_QU_C0) { in iwl_pci_probe()
1611 if (iwl_trans->cfg == &iwl_ax201_cfg_qu_hr) in iwl_pci_probe()
1612 iwl_trans->cfg = &iwl_ax201_cfg_qu_c0_hr_b0; in iwl_pci_probe()
1613 else if (iwl_trans->cfg == &killer1650s_2ax_cfg_qu_b0_hr_b0) in iwl_pci_probe()
1614 iwl_trans->cfg = &killer1650s_2ax_cfg_qu_c0_hr_b0; in iwl_pci_probe()
1615 else if (iwl_trans->cfg == &killer1650i_2ax_cfg_qu_b0_hr_b0) in iwl_pci_probe()
1616 iwl_trans->cfg = &killer1650i_2ax_cfg_qu_c0_hr_b0; in iwl_pci_probe()
1620 if (iwl_trans->hw_rev == CSR_HW_REV_TYPE_QUZ) { in iwl_pci_probe()
1621 if (iwl_trans->cfg == &iwl_ax201_cfg_qu_hr) in iwl_pci_probe()
1622 iwl_trans->cfg = &iwl_ax201_cfg_quz_hr; in iwl_pci_probe()
1623 else if (iwl_trans->cfg == &killer1650s_2ax_cfg_qu_b0_hr_b0) in iwl_pci_probe()
1624 iwl_trans->cfg = &iwl_ax1650s_cfg_quz_hr; in iwl_pci_probe()
1625 else if (iwl_trans->cfg == &killer1650i_2ax_cfg_qu_b0_hr_b0) in iwl_pci_probe()
1626 iwl_trans->cfg = &iwl_ax1650i_cfg_quz_hr; in iwl_pci_probe()
1634 if (!iwl_trans->cfg) { in iwl_pci_probe()
1638 iwl_trans->hw_rev, iwl_trans->hw_rf_id); in iwl_pci_probe()
1642 iwl_trans->cfg = cfg; in iwl_pci_probe()
1646 if (!iwl_trans->name) in iwl_pci_probe()
1647 iwl_trans->name = iwl_trans->cfg->name; in iwl_pci_probe()
1649 if (iwl_trans->trans_cfg->mq_rx_supported) { in iwl_pci_probe()
1650 if (WARN_ON(!iwl_trans->cfg->num_rbds)) { in iwl_pci_probe()
1654 trans_pcie->num_rx_bufs = iwl_trans->cfg->num_rbds; in iwl_pci_probe()
1659 ret = iwl_trans_init(iwl_trans); in iwl_pci_probe()
1663 pci_set_drvdata(pdev, iwl_trans); in iwl_pci_probe()
1666 iwl_pcie_prepare_card_hw(iwl_trans); in iwl_pci_probe()
1668 iwl_trans->drv = iwl_drv_start(iwl_trans); in iwl_pci_probe()
1670 if (IS_ERR(iwl_trans->drv)) { in iwl_pci_probe()
1671 ret = PTR_ERR(iwl_trans->drv); in iwl_pci_probe()
1676 iwl_trans_pcie_dbgfs_register(iwl_trans); in iwl_pci_probe()
1681 iwl_trans_pcie_free(iwl_trans); in iwl_pci_probe()
1687 struct iwl_trans *trans = pci_get_drvdata(pdev); in iwl_pci_remove()
1709 struct iwl_trans *trans = pci_get_drvdata(pdev); in iwl_pci_resume()