pci.h 719 B

12345678910111213141516171819202122232425262728293031323334353637
  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 0
  12. #define PCIBIOS_MIN_MEM 0
  13. /* RISC-V shim does not initialize PCI bus */
  14. #define pcibios_assign_all_busses() 1
  15. extern int isa_dma_bridge_buggy;
  16. #ifdef CONFIG_PCI
  17. static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
  18. {
  19. /* no legacy IRQ on risc-v */
  20. return -ENODEV;
  21. }
  22. static inline int pci_proc_domain(struct pci_bus *bus)
  23. {
  24. /* always show the domain in /proc */
  25. return 1;
  26. }
  27. #endif /* CONFIG_PCI */
  28. #endif /* _ASM_RISCV_PCI_H */