pci.h 2.2 KB

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