1/* ********************************************************************* 2 * Broadcom Common Firmware Environment (CFE) 3 * 4 * PCI machine-dependent defs File: pci_machdep.h 5 * 6 * Machine-dependent stuff (mostly generic) 7 * 8 ********************************************************************* 9 * 10 * Copyright 2001,2002,2003 11 * Broadcom Corporation. All rights reserved. 12 * 13 * This software is furnished under license and may be used and 14 * copied only in accordance with the following terms and 15 * conditions. Subject to these conditions, you may download, 16 * copy, install, use, modify and distribute modified or unmodified 17 * copies of this software in source and/or binary form. No title 18 * or ownership is transferred hereby. 19 * 20 * 1) Any source code used, modified or distributed must reproduce 21 * and retain this copyright notice and list of conditions 22 * as they appear in the source file. 23 * 24 * 2) No right is granted to use any trade name, trademark, or 25 * logo of Broadcom Corporation. The "Broadcom Corporation" 26 * name may not be used to endorse or promote products derived 27 * from this software without the prior written permission of 28 * Broadcom Corporation. 29 * 30 * 3) THIS SOFTWARE IS PROVIDED "AS-IS" AND ANY EXPRESS OR 31 * IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED 32 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 33 * PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT 34 * SHALL BROADCOM BE LIABLE FOR ANY DAMAGES WHATSOEVER, AND IN 35 * PARTICULAR, BROADCOM SHALL NOT BE LIABLE FOR DIRECT, INDIRECT, 36 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 37 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 38 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 39 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 40 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 41 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE), EVEN IF ADVISED OF 42 * THE POSSIBILITY OF SUCH DAMAGE. 43 ********************************************************************* */ 44 45#ifndef _PCI_MACHDEP_H_ 46#define _PCI_MACHDEP_H_ 47 48/* 49 * Machine-specific definitions for PCI autoconfiguration. 50 * 51 * See the comments in pci_machdep.c for more explanation. 52 */ 53 54#include "lib_types.h" 55 56/* 57 * Address types, as integers. 58 */ 59typedef uint32_t pci_addr_t; 60typedef uint64_t phys_addr_t; /* Sonic physical addresses. */ 61 62/* 63 * Configuration tag; created from a {bus,device,function} triplet by 64 * pci_make_tag(), and passed to pci_conf_read() and pci_conf_write(). 65 */ 66typedef uint32_t pcitag_t; 67 68/* 69 * Type of a value read from or written to a configuration register. 70 * Always 32 bits. 71 */ 72typedef uint32_t pcireg_t; 73 74/* 75 * The number of rooted bus trees to be configured (i.e., host bridges 76 * with independent address spaces). 77 */ 78#define PCI_HOST_PORTS 1 79 80/* 81 * PCI addresses and memory addresses are the same. 82 */ 83 84#define PHYS_TO_PCI(a) ((uint32_t) (a)) 85#define PCI_TO_PHYS(a) ((uint32_t) (a)) 86 87#endif /* _PCI_MACHDEP_H_ */ 88