pci_64.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #ifndef __SPARC64_PCI_H
  2. #define __SPARC64_PCI_H
  3. #ifdef __KERNEL__
  4. #include <linux/dma-mapping.h>
  5. /* Can be used to override the logic in pci_scan_bus for skipping
  6. * already-configured bus numbers - to be used for buggy BIOSes
  7. * or architectures with incomplete PCI setup by the loader.
  8. */
  9. #define pcibios_assign_all_busses() 0
  10. #define PCIBIOS_MIN_IO 0UL
  11. #define PCIBIOS_MIN_MEM 0UL
  12. #define PCI_IRQ_NONE 0xffffffff
  13. /* The PCI address space does not equal the physical memory
  14. * address space. The networking and block device layers use
  15. * this boolean for bounce buffer decisions.
  16. */
  17. #define PCI_DMA_BUS_IS_PHYS (0)
  18. /* PCI IOMMU mapping bypass support. */
  19. /* PCI 64-bit addressing works for all slots on all controller
  20. * types on sparc64. However, it requires that the device
  21. * can drive enough of the 64 bits.
  22. */
  23. #define PCI64_REQUIRED_MASK (~(u64)0)
  24. #define PCI64_ADDR_BASE 0xfffc000000000000UL
  25. #ifdef CONFIG_PCI
  26. static inline void pci_dma_burst_advice(struct pci_dev *pdev,
  27. enum pci_dma_burst_strategy *strat,
  28. unsigned long *strategy_parameter)
  29. {
  30. unsigned long cacheline_size;
  31. u8 byte;
  32. pci_read_config_byte(pdev, PCI_CACHE_LINE_SIZE, &byte);
  33. if (byte == 0)
  34. cacheline_size = 1024;
  35. else
  36. cacheline_size = (int) byte * 4;
  37. *strat = PCI_DMA_BURST_BOUNDARY;
  38. *strategy_parameter = cacheline_size;
  39. }
  40. #endif
  41. /* Return the index of the PCI controller for device PDEV. */
  42. int pci_domain_nr(struct pci_bus *bus);
  43. static inline int pci_proc_domain(struct pci_bus *bus)
  44. {
  45. return 1;
  46. }
  47. /* Platform support for /proc/bus/pci/X/Y mmap()s. */
  48. #define HAVE_PCI_MMAP
  49. #define HAVE_ARCH_PCI_GET_UNMAPPED_AREA
  50. #define get_pci_unmapped_area get_fb_unmapped_area
  51. int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
  52. enum pci_mmap_state mmap_state,
  53. int write_combine);
  54. static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
  55. {
  56. return PCI_IRQ_NONE;
  57. }
  58. #define HAVE_ARCH_PCI_RESOURCE_TO_USER
  59. void pci_resource_to_user(const struct pci_dev *dev, int bar,
  60. const struct resource *rsrc,
  61. resource_size_t *start, resource_size_t *end);
  62. #endif /* __KERNEL__ */
  63. #endif /* __SPARC64_PCI_H */