pci.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. *
  4. * Based on powerpc version
  5. */
  6. #ifndef __ASM_MICROBLAZE_PCI_H
  7. #define __ASM_MICROBLAZE_PCI_H
  8. #ifdef __KERNEL__
  9. #include <linux/types.h>
  10. #include <linux/slab.h>
  11. #include <linux/string.h>
  12. #include <linux/dma-mapping.h>
  13. #include <linux/pci.h>
  14. #include <linux/scatterlist.h>
  15. #include <asm/io.h>
  16. #include <asm/pci-bridge.h>
  17. #define PCIBIOS_MIN_IO 0x1000
  18. #define PCIBIOS_MIN_MEM 0x10000000
  19. /* Values for the `which' argument to sys_pciconfig_iobase syscall. */
  20. #define IOBASE_BRIDGE_NUMBER 0
  21. #define IOBASE_MEMORY 1
  22. #define IOBASE_IO 2
  23. #define IOBASE_ISA_IO 3
  24. #define IOBASE_ISA_MEM 4
  25. #define pcibios_scan_all_fns(a, b) 0
  26. /*
  27. * Set this to 1 if you want the kernel to re-assign all PCI
  28. * bus numbers (don't do that on ppc64 yet !)
  29. */
  30. #define pcibios_assign_all_busses() 0
  31. extern int pci_domain_nr(struct pci_bus *bus);
  32. /* Decide whether to display the domain number in /proc */
  33. extern int pci_proc_domain(struct pci_bus *bus);
  34. struct vm_area_struct;
  35. /* Tell PCI code what kind of PCI resource mappings we support */
  36. #define HAVE_PCI_MMAP 1
  37. #define ARCH_GENERIC_PCI_MMAP_RESOURCE 1
  38. #define arch_can_pci_mmap_io() 1
  39. extern int pci_legacy_read(struct pci_bus *bus, loff_t port, u32 *val,
  40. size_t count);
  41. extern int pci_legacy_write(struct pci_bus *bus, loff_t port, u32 val,
  42. size_t count);
  43. extern int pci_mmap_legacy_page_range(struct pci_bus *bus,
  44. struct vm_area_struct *vma,
  45. enum pci_mmap_state mmap_state);
  46. #define HAVE_PCI_LEGACY 1
  47. extern void pcibios_resource_survey(void);
  48. struct file;
  49. /* This part of code was originally in xilinx-pci.h */
  50. #ifdef CONFIG_PCI_XILINX
  51. extern void __init xilinx_pci_init(void);
  52. #else
  53. static inline void __init xilinx_pci_init(void) { return; }
  54. #endif
  55. #endif /* __KERNEL__ */
  56. #endif /* __ASM_MICROBLAZE_PCI_H */