pci.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Copyright (C) 2016 SiFive
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * as published by the Free Software Foundation, version 2.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. */
  13. #ifndef __ASM_RISCV_PCI_H
  14. #define __ASM_RISCV_PCI_H
  15. #include <linux/types.h>
  16. #include <linux/slab.h>
  17. #include <linux/dma-mapping.h>
  18. #include <asm/io.h>
  19. #define PCIBIOS_MIN_IO 0
  20. #define PCIBIOS_MIN_MEM 0
  21. /* RISC-V shim does not initialize PCI bus */
  22. #define pcibios_assign_all_busses() 1
  23. extern int isa_dma_bridge_buggy;
  24. #ifdef CONFIG_PCI
  25. static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
  26. {
  27. /* no legacy IRQ on risc-v */
  28. return -ENODEV;
  29. }
  30. static inline int pci_proc_domain(struct pci_bus *bus)
  31. {
  32. /* always show the domain in /proc */
  33. return 1;
  34. }
  35. #endif /* CONFIG_PCI */
  36. #endif /* __ASM_PCI_H */