Lines Matching refs:pdev
420 struct pci_dev *dev = ab_pci->pdev; in ath11k_pci_msi_config()
447 struct pci_dev *pci_dev = ab_pci->pdev; in ath11k_pci_alloc_msi()
459 num_vectors = pci_alloc_irq_vectors(ab_pci->pdev, in ath11k_pci_alloc_msi()
475 msi_desc = irq_get_msi_desc(ab_pci->pdev->irq); in ath11k_pci_alloc_msi()
499 pci_free_irq_vectors(ab_pci->pdev); in ath11k_pci_alloc_msi()
507 pci_free_irq_vectors(ab_pci->pdev); in ath11k_pci_free_msi()
514 msi_desc = irq_get_msi_desc(ab_pci->pdev->irq); in ath11k_pci_config_msi_data()
517 pci_free_irq_vectors(ab_pci->pdev); in ath11k_pci_config_msi_data()
529 static int ath11k_pci_claim(struct ath11k_pci *ab_pci, struct pci_dev *pdev) in ath11k_pci_claim() argument
535 pci_read_config_word(pdev, PCI_DEVICE_ID, &device_id); in ath11k_pci_claim()
543 ret = pci_assign_resource(pdev, ATH11K_PCI_BAR_NUM); in ath11k_pci_claim()
549 ret = pci_enable_device(pdev); in ath11k_pci_claim()
555 ret = pci_request_region(pdev, ATH11K_PCI_BAR_NUM, "ath11k_pci"); in ath11k_pci_claim()
561 ret = dma_set_mask_and_coherent(&pdev->dev, in ath11k_pci_claim()
569 pci_set_master(pdev); in ath11k_pci_claim()
571 ab->mem_len = pci_resource_len(pdev, ATH11K_PCI_BAR_NUM); in ath11k_pci_claim()
572 ab->mem = pci_iomap(pdev, ATH11K_PCI_BAR_NUM, 0); in ath11k_pci_claim()
585 pci_release_region(pdev, ATH11K_PCI_BAR_NUM); in ath11k_pci_claim()
587 pci_disable_device(pdev); in ath11k_pci_claim()
595 struct pci_dev *pci_dev = ab_pci->pdev; in ath11k_pci_free_region()
608 pcie_capability_read_word(ab_pci->pdev, PCI_EXP_LNKCTL, in ath11k_pci_aspm_disable()
617 pcie_capability_write_word(ab_pci->pdev, PCI_EXP_LNKCTL, in ath11k_pci_aspm_disable()
626 pcie_capability_write_word(ab_pci->pdev, PCI_EXP_LNKCTL, in ath11k_pci_aspm_restore()
759 return irq_set_affinity_hint(ab_pci->pdev->irq, m); in ath11k_pci_set_irq_affinity_hint()
762 static int ath11k_pci_probe(struct pci_dev *pdev, in ath11k_pci_probe() argument
775 ab = ath11k_core_alloc(&pdev->dev, sizeof(*ab_pci), ATH11K_BUS_PCI); in ath11k_pci_probe()
778 dev_err(&pdev->dev, "failed to allocate ath11k base\n"); in ath11k_pci_probe()
782 ab->dev = &pdev->dev; in ath11k_pci_probe()
783 pci_set_drvdata(pdev, ab); in ath11k_pci_probe()
787 ab_pci->pdev = pdev; in ath11k_pci_probe()
790 pci_set_drvdata(pdev, ab); in ath11k_pci_probe()
803 ret = ath11k_pci_claim(ab_pci, pdev); in ath11k_pci_probe()
810 pdev->vendor, pdev->device, in ath11k_pci_probe()
811 pdev->subsystem_vendor, pdev->subsystem_device); in ath11k_pci_probe()
813 ab->id.vendor = pdev->vendor; in ath11k_pci_probe()
814 ab->id.device = pdev->device; in ath11k_pci_probe()
815 ab->id.subsystem_vendor = pdev->subsystem_vendor; in ath11k_pci_probe()
816 ab->id.subsystem_device = pdev->subsystem_device; in ath11k_pci_probe()
827 dev_err(&pdev->dev, "Unsupported QCA6390 SOC hardware version: %d %d\n", in ath11k_pci_probe()
860 dev_err(&pdev->dev, "Unsupported WCN6855 SOC hardware version: %d %d\n", in ath11k_pci_probe()
869 dev_err(&pdev->dev, "Unknown PCI device found: 0x%x\n", in ath11k_pci_probe()
973 static void ath11k_pci_remove(struct pci_dev *pdev) in ath11k_pci_remove() argument
975 struct ath11k_base *ab = pci_get_drvdata(pdev); in ath11k_pci_remove()
1003 static void ath11k_pci_shutdown(struct pci_dev *pdev) in ath11k_pci_shutdown() argument
1005 struct ath11k_base *ab = pci_get_drvdata(pdev); in ath11k_pci_shutdown()