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
6 * Copyright (C) 2005-2007 Cavium Networks
8 #ifndef __OCTEON_PCI_COMMON_H__
9 #define __OCTEON_PCI_COMMON_H__
11 #include <linux/pci.h>
13 /* Some PCI cards require delays when accessing config space. */
14 #define PCI_CONFIG_SPACE_DELAY 10000
16 /* pcibios_map_irq() is defined inside pci-common.c. All it does is call the
17 Octeon specific version pointed to by this variable. This function needs to
18 change for PCI or PCIe based hosts */
19 extern typeof(pcibios_map_irq) *octeon_pcibios_map_irq;
21 /* The following defines are only used when octeon_dma_bar_type =
22 OCTEON_DMA_BAR_TYPE_BIG */
23 #define OCTEON_PCI_BAR1_HOLE_BITS 5
24 #define OCTEON_PCI_BAR1_HOLE_SIZE (1ul<<(OCTEON_PCI_BAR1_HOLE_BITS+3))
26 enum octeon_dma_bar_type {
27 OCTEON_DMA_BAR_TYPE_INVALID,
28 OCTEON_DMA_BAR_TYPE_SMALL,
29 OCTEON_DMA_BAR_TYPE_BIG,
30 OCTEON_DMA_BAR_TYPE_PCIE
34 * This is a variable to tell the DMA mapping system in dma-octeon.c
35 * how to map PCI DMA addresses.
37 extern enum octeon_dma_bar_type octeon_dma_bar_type;