Lines Matching refs:ipc_pcie
9 static void ipc_write_dbell_reg(struct iosm_pcie *ipc_pcie, int irq_n, u32 data) in ipc_write_dbell_reg() argument
16 write_reg = (void __iomem *)((u8 __iomem *)ipc_pcie->ipc_regs + in ipc_write_dbell_reg()
17 ipc_pcie->doorbell_write + in ipc_write_dbell_reg()
18 (irq_n * ipc_pcie->doorbell_reg_offset)); in ipc_write_dbell_reg()
26 void ipc_doorbell_fire(struct iosm_pcie *ipc_pcie, int irq_n, u32 data) in ipc_doorbell_fire() argument
28 ipc_write_dbell_reg(ipc_pcie, irq_n, data); in ipc_doorbell_fire()
34 struct iosm_pcie *ipc_pcie = dev_id; in ipc_msi_interrupt() local
35 int instance = irq - ipc_pcie->pci->irq; in ipc_msi_interrupt()
40 if (instance >= ipc_pcie->nvec) in ipc_msi_interrupt()
43 if (!test_bit(0, &ipc_pcie->suspend)) in ipc_msi_interrupt()
44 ipc_imem_irq_process(ipc_pcie->imem, instance); in ipc_msi_interrupt()
49 void ipc_release_irq(struct iosm_pcie *ipc_pcie) in ipc_release_irq() argument
51 struct pci_dev *pdev = ipc_pcie->pci; in ipc_release_irq()
54 while (--ipc_pcie->nvec >= 0) in ipc_release_irq()
55 free_irq(pdev->irq + ipc_pcie->nvec, ipc_pcie); in ipc_release_irq()
60 int ipc_acquire_irq(struct iosm_pcie *ipc_pcie) in ipc_acquire_irq() argument
62 struct pci_dev *pdev = ipc_pcie->pci; in ipc_acquire_irq()
65 ipc_pcie->nvec = pci_alloc_irq_vectors(pdev, IPC_MSI_VECTORS, in ipc_acquire_irq()
68 if (ipc_pcie->nvec < 0) { in ipc_acquire_irq()
69 rc = ipc_pcie->nvec; in ipc_acquire_irq()
76 for (i = 0; i < ipc_pcie->nvec; ++i) { in ipc_acquire_irq()
79 KBUILD_MODNAME, ipc_pcie); in ipc_acquire_irq()
81 dev_err(ipc_pcie->dev, "unable to grab IRQ, rc=%d", rc); in ipc_acquire_irq()
82 ipc_pcie->nvec = i; in ipc_acquire_irq()
83 ipc_release_irq(ipc_pcie); in ipc_acquire_irq()