/* * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * * Copyright (C) 2007, 2008 Cavium Networks */#include<linux/kernel.h>#include<linux/init.h>#include<linux/pci.h>#include<linux/interrupt.h>#include<linux/time.h>#include<linux/delay.h>#include<asm/octeon/octeon.h>#include<asm/octeon/cvmx-npei-defs.h>#include<asm/octeon/cvmx-pciercx-defs.h>#include<asm/octeon/cvmx-pescx-defs.h>#include<asm/octeon/cvmx-pexp-defs.h>#include<asm/octeon/cvmx-helper-errata.h>#include<asm/octeon/pci-octeon.h>unioncvmx_pcie_address{uint64_tu64;struct{uint64_tupper:2;/* Normally 2 for XKPHYS */uint64_treserved_49_61:13;/* Must be zero */uint64_tio:1;/* 1 for IO space access */uint64_tdid:5;/* PCIe DID = 3 */uint64_tsubdid:3;/* PCIe SubDID = 1 */uint64_treserved_36_39:4;/* Must be zero */uint64_tes:2;/* Endian swap = 1 */uint64_tport:2;/* PCIe port 0,1 */uint64_treserved_29_31:3;/* Must be zero *//* * Selects the type of the configuration request (0 = type 0, * 1 = type 1). */uint64_tty:1;/* Target bus number sent in the ID in the request. */uint64_tbus:8;/* * Target device number sent in the ID in the * request. Note that Dev must be zero for type 0 * configuration requests. */uint64_tdev:5;/* Target function number sent in the ID in the request. */uint64_tfunc:3;/* * Selects a register in the configuration space of * the target. */uint64_treg:12;}config;struct{uint64_tupper:2;/* Normally 2 for XKPHYS */uint64_treserved_49_61:13;/* Must be zero */uint64_tio:1;/* 1 for IO space access */uint64_tdid:5;/* PCIe DID = 3 */uint64_tsubdid:3;/* PCIe SubDID = 2 */uint64_treserved_36_39:4;/* Must be zero */uint64_tes:2