pci_32.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #ifndef __SPARC_PCI_H
  2. #define __SPARC_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. static inline void pcibios_set_master(struct pci_dev *dev)
  14. {
  15. /* No special bus mastering setup handling */
  16. }
  17. static inline void pcibios_penalize_isa_irq(int irq, int active)
  18. {
  19. /* We don't do dynamic PCI IRQ allocation */
  20. }
  21. /* Dynamic DMA mapping stuff.
  22. */
  23. #define PCI_DMA_BUS_IS_PHYS (0)
  24. struct pci_dev;
  25. /* pci_unmap_{single,page} is not a nop, thus... */
  26. #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \
  27. dma_addr_t ADDR_NAME;
  28. #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) \
  29. __u32 LEN_NAME;
  30. #define pci_unmap_addr(PTR, ADDR_NAME) \
  31. ((PTR)->ADDR_NAME)
  32. #define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) \
  33. (((PTR)->ADDR_NAME) = (VAL))
  34. #define pci_unmap_len(PTR, LEN_NAME) \
  35. ((PTR)->LEN_NAME)
  36. #define pci_unmap_len_set(PTR, LEN_NAME, VAL) \
  37. (((PTR)->LEN_NAME) = (VAL))
  38. #ifdef CONFIG_PCI
  39. static inline void pci_dma_burst_advice(struct pci_dev *pdev,
  40. enum pci_dma_burst_strategy *strat,
  41. unsigned long *strategy_parameter)
  42. {
  43. *strat = PCI_DMA_BURST_INFINITY;
  44. *strategy_parameter = ~0UL;
  45. }
  46. #endif
  47. struct device_node;
  48. extern struct device_node *pci_device_to_OF_node(struct pci_dev *pdev);
  49. #endif /* __KERNEL__ */
  50. /* generic pci stuff */
  51. #include <asm-generic/pci.h>
  52. #endif /* __SPARC_PCI_H */