pci.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. /* We do not have an IOMMU */
  24. #define PCI_DMA_BUS_IS_PHYS 1
  25. extern int isa_dma_bridge_buggy;
  26. #ifdef CONFIG_PCI
  27. static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
  28. {
  29. /* no legacy IRQ on risc-v */
  30. return -ENODEV;
  31. }
  32. static inline int pci_proc_domain(struct pci_bus *bus)
  33. {
  34. /* always show the domain in /proc */
  35. return 1;
  36. }
  37. #endif /* CONFIG_PCI */
  38. #endif /* __ASM_PCI_H */