Lines Matching +full:wed +full:- +full:pcie

1 // SPDX-License-Identifier: ISC
38 val = readl(hif->regs + MT_PCIE_RECOG_ID); in mt7996_pci_get_hif2()
43 get_device(hif->dev); in mt7996_pci_get_hif2()
59 put_device(hif->dev); in mt7996_put_hif2()
80 hif = devm_kzalloc(&pdev->dev, sizeof(*hif), GFP_KERNEL); in mt7996_pci_hif2_probe()
82 return -ENOMEM; in mt7996_pci_hif2_probe()
84 hif->dev = &pdev->dev; in mt7996_pci_hif2_probe()
85 hif->regs = pcim_iomap_table(pdev)[0]; in mt7996_pci_hif2_probe()
86 hif->irq = pdev->irq; in mt7996_pci_hif2_probe()
88 list_add(&hif->list, &hif_list); in mt7996_pci_hif2_probe()
114 ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(36)); in mt7996_pci_probe()
118 ret = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32)); in mt7996_pci_probe()
124 if (id->device == 0x7991 || id->device == 0x799a) in mt7996_pci_probe()
127 dev = mt7996_mmio_probe(&pdev->dev, pcim_iomap_table(pdev)[0], in mt7996_pci_probe()
128 id->device); in mt7996_pci_probe()
132 mdev = &dev->mt76; in mt7996_pci_probe()
145 irq = pdev->irq; in mt7996_pci_probe()
148 ret = devm_request_irq(mdev->dev, irq, mt7996_irq_handler, in mt7996_pci_probe()
154 /* master switch of PCIe tnterrupt enable */ in mt7996_pci_probe()
158 hif2_dev = container_of(hif2->dev, struct pci_dev, dev); in mt7996_pci_probe()
159 dev->hif2 = hif2; in mt7996_pci_probe()
171 dev->hif2->irq = hif2_dev->irq; in mt7996_pci_probe()
172 hif2_irq = dev->hif2->irq; in mt7996_pci_probe()
175 ret = devm_request_irq(mdev->dev, hif2_irq, mt7996_irq_handler, in mt7996_pci_probe()
176 IRQF_SHARED, KBUILD_MODNAME "-hif", in mt7996_pci_probe()
182 /* master switch of PCIe tnterrupt enable */ in mt7996_pci_probe()
193 if (dev->hif2) in mt7996_pci_probe()
194 devm_free_irq(mdev->dev, hif2_irq, dev); in mt7996_pci_probe()
196 if (dev->hif2) { in mt7996_pci_probe()
197 if (mtk_wed_device_active(&dev->mt76.mmio.wed_hif2)) in mt7996_pci_probe()
198 mtk_wed_device_detach(&dev->mt76.mmio.wed_hif2); in mt7996_pci_probe()
203 if (dev->hif2) in mt7996_pci_probe()
204 put_device(dev->hif2->dev); in mt7996_pci_probe()
205 devm_free_irq(mdev->dev, irq, dev); in mt7996_pci_probe()
207 if (mtk_wed_device_active(&dev->mt76.mmio.wed)) in mt7996_pci_probe()
208 mtk_wed_device_detach(&dev->mt76.mmio.wed); in mt7996_pci_probe()
212 mt76_free_device(&dev->mt76); in mt7996_pci_probe()
221 list_del(&hif->list); in mt7996_hif_remove()
231 mt7996_put_hif2(dev->hif2); in mt7996_pci_remove()