pci.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /*
  2. * linux/include/asm-xtensa/pci.h
  3. *
  4. * This file is subject to the terms and conditions of the GNU General Public
  5. * License. See the file "COPYING" in the main directory of this archive
  6. * for more details.
  7. *
  8. * Copyright (C) 2001 - 2005 Tensilica Inc.
  9. */
  10. #ifndef _XTENSA_PCI_H
  11. #define _XTENSA_PCI_H
  12. #ifdef __KERNEL__
  13. /* Can be used to override the logic in pci_scan_bus for skipping
  14. * already-configured bus numbers - to be used for buggy BIOSes
  15. * or architectures with incomplete PCI setup by the loader
  16. */
  17. #define pcibios_assign_all_busses() 0
  18. extern struct pci_controller* pcibios_alloc_controller(void);
  19. static inline void pcibios_set_master(struct pci_dev *dev)
  20. {
  21. /* No special bus mastering setup handling */
  22. }
  23. static inline void pcibios_penalize_isa_irq(int irq)
  24. {
  25. /* We don't do dynamic PCI IRQ allocation */
  26. }
  27. /* Assume some values. (We should revise them, if necessary) */
  28. #define PCIBIOS_MIN_IO 0x2000
  29. #define PCIBIOS_MIN_MEM 0x10000000
  30. /* Dynamic DMA mapping stuff.
  31. * Xtensa has everything mapped statically like x86.
  32. */
  33. #include <linux/types.h>
  34. #include <linux/slab.h>
  35. #include <asm/scatterlist.h>
  36. #include <linux/string.h>
  37. #include <asm/io.h>
  38. struct pci_dev;
  39. /* The PCI address space does equal the physical memory address space.
  40. * The networking and block device layers use this boolean for bounce buffer
  41. * decisions.
  42. */
  43. #define PCI_DMA_BUS_IS_PHYS (1)
  44. /* pci_unmap_{page,single} is a no-op, so */
  45. #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)
  46. #define DECLARE_PCI_UNMAP_LEN(LEN_NAME)
  47. #define pci_unmap_addr(PTR, ADDR_NAME) (0)
  48. #define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) do { } while (0)
  49. #define pci_ubnmap_len(PTR, LEN_NAME) (0)
  50. #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0)
  51. /* We cannot access memory above 4GB */
  52. #define pci_dac_dma_supported(pci_dev, mask) (0)
  53. /* Map a range of PCI memory or I/O space for a device into user space */
  54. int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma,
  55. enum pci_mmap_state mmap_state, int write_combine);
  56. /* Tell drivers/pci/proc.c that we have pci_mmap_page_range() */
  57. #define HAVE_PCI_MMAP 1
  58. static inline void pcibios_add_platform_entries(struct pci_dev *dev)
  59. {
  60. }
  61. #endif /* __KERNEL__ */
  62. /* Implement the pci_ DMA API in terms of the generic device dma_ one */
  63. #include <asm-generic/pci-dma-compat.h>
  64. /* Generic PCI */
  65. #include <asm-generic/pci.h>
  66. #endif /* _XTENSA_PCI_H */