Lines Matching refs:pdev
145 int irq = wil->pdev->irq; in wil_disable_irq()
156 int irq = wil->pdev->irq; in wil_enable_irq()
182 struct pci_dev *pdev = wil->pdev; in wil_if_pcie_enable() local
188 int msi_only = pdev->msi_enabled; in wil_if_pcie_enable()
192 pci_set_master(pdev); in wil_if_pcie_enable()
209 pci_alloc_irq_vectors(pdev, n_msi, n_msi, PCI_IRQ_MSI) < n_msi) { in wil_if_pcie_enable()
214 if (n_msi == 1 && pci_enable_msi(pdev)) { in wil_if_pcie_enable()
227 rc = wil6210_init_irq(wil, pdev->irq); in wil_if_pcie_enable()
241 wil6210_fini_irq(wil, pdev->irq); in wil_if_pcie_enable()
244 pci_free_irq_vectors(pdev); in wil_if_pcie_enable()
246 pci_clear_master(pdev); in wil_if_pcie_enable()
252 struct pci_dev *pdev = wil->pdev; in wil_if_pcie_disable() local
256 pci_clear_master(pdev); in wil_if_pcie_disable()
258 wil6210_fini_irq(wil, pdev->irq); in wil_if_pcie_disable()
260 pci_disable_msi(pdev); in wil_if_pcie_disable()
295 static int wil_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id) in wil_pcie_probe() argument
298 struct device *dev = &pdev->dev; in wil_pcie_probe()
304 u32 bar_size = pci_resource_len(pdev, 0); in wil_pcie_probe()
309 dev_info(&pdev->dev, WIL_NAME in wil_pcie_probe()
311 (int)pdev->vendor, (int)pdev->device, (int)pdev->revision, in wil_pcie_probe()
316 dev_err(&pdev->dev, "Unexpected BAR0 size 0x%x\n", in wil_pcie_probe()
328 wil->pdev = pdev; in wil_pcie_probe()
329 pci_set_drvdata(pdev, wil); in wil_pcie_probe()
334 wil_platform_init(&pdev->dev, &wil->platform_ops, &rops, wil); in wil_pcie_probe()
341 rc = pci_enable_device(pdev); in wil_pcie_probe()
342 if (rc && pdev->msi_enabled == 0) { in wil_pcie_probe()
348 pdev->msi_enabled = 1; in wil_pcie_probe()
349 rc = pci_enable_device(pdev); in wil_pcie_probe()
357 pci_set_power_state(pdev, PCI_D0); in wil_pcie_probe()
359 rc = pci_request_region(pdev, 0, WIL_NAME); in wil_pcie_probe()
366 wil->csr = pci_ioremap_bar(pdev, 0); in wil_pcie_probe()
373 wil_info(wil, "CSR at %pR -> 0x%p\n", &pdev->resource[0], wil->csr); in wil_pcie_probe()
450 pci_iounmap(pdev, wil->csr); in wil_pcie_probe()
452 pci_release_region(pdev, 0); in wil_pcie_probe()
454 pci_disable_device(pdev); in wil_pcie_probe()
463 static void wil_pcie_remove(struct pci_dev *pdev) in wil_pcie_remove() argument
465 struct wil6210_priv *wil = pci_get_drvdata(pdev); in wil_pcie_remove()
483 pci_iounmap(pdev, csr); in wil_pcie_remove()
484 pci_release_region(pdev, 0); in wil_pcie_remove()
485 pci_disable_device(pdev); in wil_pcie_remove()
501 struct pci_dev *pdev = to_pci_dev(dev); in wil6210_suspend() local
502 struct wil6210_priv *wil = pci_get_drvdata(pdev); in wil6210_suspend()
523 pci_clear_master(pdev); in wil6210_suspend()
536 struct pci_dev *pdev = to_pci_dev(dev); in wil6210_resume() local
537 struct wil6210_priv *wil = pci_get_drvdata(pdev); in wil6210_resume()
552 pci_set_master(pdev); in wil6210_resume()
557 pci_clear_master(pdev); in wil6210_resume()