1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2016 SiFive
6 #ifndef _ASM_RISCV_PCI_H
7 #define _ASM_RISCV_PCI_H
9 #include <linux/types.h>
10 #include <linux/slab.h>
11 #include <linux/dma-mapping.h>
15 #define PCIBIOS_MIN_IO 4
16 #define PCIBIOS_MIN_MEM 16
18 #if defined(CONFIG_PCI) && defined(CONFIG_NUMA)
19 static inline int pcibus_to_node(struct pci_bus
*bus
)
21 return dev_to_node(&bus
->dev
);
23 #ifndef cpumask_of_pcibus
24 #define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \
26 cpumask_of_node(pcibus_to_node(bus)))
28 #endif /* defined(CONFIG_PCI) && defined(CONFIG_NUMA) */
31 #include <asm-generic/pci.h>
33 #endif /* _ASM_RISCV_PCI_H */