pci-common.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Copyright (C) 2005-2007 Cavium Networks
  7. */
  8. #ifndef __OCTEON_PCI_COMMON_H__
  9. #define __OCTEON_PCI_COMMON_H__
  10. #include <linux/pci.h>
  11. /* Some PCI cards require delays when accessing config space. */
  12. #define PCI_CONFIG_SPACE_DELAY 10000
  13. /* pcibios_map_irq() is defined inside pci-common.c. All it does is call the
  14. Octeon specific version pointed to by this variable. This function needs to
  15. change for PCI or PCIe based hosts */
  16. extern typeof(pcibios_map_irq) *octeon_pcibios_map_irq;
  17. /* The following defines are only used when octeon_dma_bar_type =
  18. OCTEON_DMA_BAR_TYPE_BIG */
  19. #define OCTEON_PCI_BAR1_HOLE_BITS 5
  20. #define OCTEON_PCI_BAR1_HOLE_SIZE (1ul<<(OCTEON_PCI_BAR1_HOLE_BITS+3))
  21. enum octeon_dma_bar_type {
  22. OCTEON_DMA_BAR_TYPE_INVALID,
  23. OCTEON_DMA_BAR_TYPE_SMALL,
  24. OCTEON_DMA_BAR_TYPE_BIG,
  25. OCTEON_DMA_BAR_TYPE_PCIE
  26. };
  27. /**
  28. * This is a variable to tell the DMA mapping system in dma-octeon.c
  29. * how to map PCI DMA addresses.
  30. */
  31. extern enum octeon_dma_bar_type octeon_dma_bar_type;
  32. #endif