1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * PCI Endpoint *Function* side MSI header file 4 * 5 * Copyright (C) 2024 NXP 6 * Author: Frank Li <Frank.Li@nxp.com> 7 */ 8 9 #ifndef __PCI_EP_MSI__ 10 #define __PCI_EP_MSI__ 11 12 struct pci_epf; 13 14 #ifdef CONFIG_PCI_ENDPOINT_MSI_DOORBELL 15 int pci_epf_alloc_doorbell(struct pci_epf *epf, u16 nums); 16 void pci_epf_free_doorbell(struct pci_epf *epf); 17 #else pci_epf_alloc_doorbell(struct pci_epf * epf,u16 nums)18static inline int pci_epf_alloc_doorbell(struct pci_epf *epf, u16 nums) 19 { 20 return -ENODATA; 21 } 22 pci_epf_free_doorbell(struct pci_epf * epf)23static inline void pci_epf_free_doorbell(struct pci_epf *epf) 24 { 25 } 26 #endif /* CONFIG_GENERIC_MSI_IRQ */ 27 28 #endif /* __PCI_EP_MSI__ */ 29