xref: /openbmc/linux/arch/powerpc/include/asm/pnv-pci.h (revision 6f963ec2)
180c49c7eSIan Munsie /*
280c49c7eSIan Munsie  * Copyright 2014 IBM Corp.
380c49c7eSIan Munsie  *
480c49c7eSIan Munsie  * This program is free software; you can redistribute it and/or
580c49c7eSIan Munsie  * modify it under the terms of the GNU General Public License
680c49c7eSIan Munsie  * as published by the Free Software Foundation; either version
780c49c7eSIan Munsie  * 2 of the License, or (at your option) any later version.
880c49c7eSIan Munsie  */
980c49c7eSIan Munsie 
1080c49c7eSIan Munsie #ifndef _ASM_PNV_PCI_H
1180c49c7eSIan Munsie #define _ASM_PNV_PCI_H
1280c49c7eSIan Munsie 
1380c49c7eSIan Munsie #include <linux/pci.h>
1480c49c7eSIan Munsie #include <misc/cxl.h>
1580c49c7eSIan Munsie 
161212aa1cSRyan Grimm int pnv_phb_to_cxl_mode(struct pci_dev *dev, uint64_t mode);
1780c49c7eSIan Munsie int pnv_cxl_ioda_msi_setup(struct pci_dev *dev, unsigned int hwirq,
1880c49c7eSIan Munsie 			   unsigned int virq);
1980c49c7eSIan Munsie int pnv_cxl_alloc_hwirqs(struct pci_dev *dev, int num);
2080c49c7eSIan Munsie void pnv_cxl_release_hwirqs(struct pci_dev *dev, int hwirq, int num);
2180c49c7eSIan Munsie int pnv_cxl_get_irq_count(struct pci_dev *dev);
226f963ec2SRyan Grimm struct device_node *pnv_pci_get_phb_node(struct pci_dev *dev);
2380c49c7eSIan Munsie 
2480c49c7eSIan Munsie #ifdef CONFIG_CXL_BASE
2580c49c7eSIan Munsie int pnv_cxl_alloc_hwirq_ranges(struct cxl_irq_ranges *irqs,
2680c49c7eSIan Munsie 			       struct pci_dev *dev, int num);
2780c49c7eSIan Munsie void pnv_cxl_release_hwirq_ranges(struct cxl_irq_ranges *irqs,
2880c49c7eSIan Munsie 				  struct pci_dev *dev);
2980c49c7eSIan Munsie #endif
3080c49c7eSIan Munsie 
3180c49c7eSIan Munsie #endif
32