pci.h 728 B

123456789101112131415161718192021222324252627282930313233
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (C) 2016 SiFive
  4. */
  5. #ifndef _ASM_RISCV_PCI_H
  6. #define _ASM_RISCV_PCI_H
  7. #include <linux/types.h>
  8. #include <linux/slab.h>
  9. #include <linux/dma-mapping.h>
  10. #include <asm/io.h>
  11. #define PCIBIOS_MIN_IO 4
  12. #define PCIBIOS_MIN_MEM 16
  13. #if defined(CONFIG_PCI) && defined(CONFIG_NUMA)
  14. static inline int pcibus_to_node(struct pci_bus *bus)
  15. {
  16. return dev_to_node(&bus->dev);
  17. }
  18. #ifndef cpumask_of_pcibus
  19. #define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \
  20. cpu_all_mask : \
  21. cpumask_of_node(pcibus_to_node(bus)))
  22. #endif
  23. #endif /* defined(CONFIG_PCI) && defined(CONFIG_NUMA) */
  24. /* Generic PCI */
  25. #include <asm-generic/pci.h>
  26. #endif /* _ASM_RISCV_PCI_H */