pci.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #ifndef __ASM_CRIS_PCI_H
  2. #define __ASM_CRIS_PCI_H
  3. #ifdef __KERNEL__
  4. #include <linux/mm.h> /* for struct page */
  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. #define pcibios_assign_all_busses(void) 1
  9. extern unsigned long pci_mem_start;
  10. #define PCIBIOS_MIN_IO 0x1000
  11. #define PCIBIOS_MIN_MEM 0x10000000
  12. #define PCIBIOS_MIN_CARDBUS_IO 0x4000
  13. void pcibios_config_init(void);
  14. struct pci_bus * pcibios_scan_root(int bus);
  15. int pcibios_assign_resources(void);
  16. void pcibios_set_master(struct pci_dev *dev);
  17. void pcibios_penalize_isa_irq(int irq);
  18. struct irq_routing_table *pcibios_get_irq_routing_table(void);
  19. int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq);
  20. /* Dynamic DMA mapping stuff.
  21. * i386 has everything mapped statically.
  22. */
  23. #include <linux/types.h>
  24. #include <linux/slab.h>
  25. #include <asm/scatterlist.h>
  26. #include <linux/string.h>
  27. #include <asm/io.h>
  28. struct pci_dev;
  29. /* The PCI address space does equal the physical memory
  30. * address space. The networking and block device layers use
  31. * this boolean for bounce buffer decisions.
  32. */
  33. #define PCI_DMA_BUS_IS_PHYS (1)
  34. /* pci_unmap_{page,single} is a nop so... */
  35. #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)
  36. #define DECLARE_PCI_UNMAP_LEN(LEN_NAME)
  37. #define pci_unmap_addr(PTR, ADDR_NAME) (0)
  38. #define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) do { } while (0)
  39. #define pci_unmap_len(PTR, LEN_NAME) (0)
  40. #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0)
  41. #define HAVE_PCI_MMAP
  42. extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
  43. enum pci_mmap_state mmap_state, int write_combine);
  44. #endif /* __KERNEL__ */
  45. /* implement the pci_ DMA API in terms of the generic device dma_ one */
  46. #include <asm-generic/pci-dma-compat.h>
  47. /* generic pci stuff */
  48. #include <asm-generic/pci.h>
  49. #endif /* __ASM_CRIS_PCI_H */