pci_32.h 1.6 KB

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