pci_32.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. #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. *strat = PCI_DMA_BURST_INFINITY;
  31. *strategy_parameter = ~0UL;
  32. }
  33. #endif
  34. #endif /* __KERNEL__ */
  35. #ifndef CONFIG_LEON_PCI
  36. /* generic pci stuff */
  37. #include <asm-generic/pci.h>
  38. #else
  39. /*
  40. * On LEON PCI Memory space is mapped 1:1 with physical address space.
  41. *
  42. * I/O space is located at low 64Kbytes in PCI I/O space. The I/O addresses
  43. * are converted into CPU addresses to virtual addresses that are mapped with
  44. * MMU to the PCI Host PCI I/O space window which are translated to the low
  45. * 64Kbytes by the Host controller.
  46. */
  47. extern void
  48. pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
  49. struct resource *res);
  50. extern void
  51. pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
  52. struct pci_bus_region *region);
  53. static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
  54. {
  55. return PCI_IRQ_NONE;
  56. }
  57. #endif
  58. #endif /* __SPARC_PCI_H */