pcibus.h revision 198160
1190214Srpaulo/*-
2190214Srpaulo * Copyright (c) 1998 Doug Rabson
3190214Srpaulo * All rights reserved.
4190214Srpaulo *
5190214Srpaulo * Redistribution and use in source and binary forms, with or without
6190214Srpaulo * modification, are permitted provided that the following conditions
7190214Srpaulo * are met:
8190214Srpaulo * 1. Redistributions of source code must retain the above copyright
9190214Srpaulo *    notice, this list of conditions and the following disclaimer.
10190214Srpaulo * 2. Redistributions in binary form must reproduce the above copyright
11190214Srpaulo *    notice, this list of conditions and the following disclaimer in the
12190214Srpaulo *    documentation and/or other materials provided with the distribution.
13190214Srpaulo *
14190214Srpaulo * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15190214Srpaulo * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16190214Srpaulo * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17190214Srpaulo * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18190214Srpaulo * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19190214Srpaulo * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20190214Srpaulo * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21190214Srpaulo * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22190214Srpaulo * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23190214Srpaulo * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24190214Srpaulo * SUCH DAMAGE.
25190214Srpaulo *
26190214Srpaulo * $FreeBSD: src/sys/alpha/pci/pcibus.h,v 1.5 2002/02/28 18:18:41 gallatin Exp $
27190214Srpaulo */
28190214Srpaulo#define DEFAULT_PCI_CONFIG_BASE         0x18000000
29214518Srpaulo
30190214Srpaulo#define MSI_MIPS_ADDR_BASE             0xfee00000
31190214Srpaulo
32190214Srpaulo
33190214Srpaulo#define PCIE_LINK0_MSI_STATUS        0x90
34190214Srpaulo#define PCIE_LINK1_MSI_STATUS        0x94
35190214Srpaulo#define PCIE_LINK2_MSI_STATUS        0x190
36190214Srpaulo#define PCIE_LINK3_MSI_STATUS        0x194
37190214Srpaulo
38190214Srpaulovoid pci_init_resources(void);
39190214Srpaulostruct resource *xlr_pci_alloc_resource(device_t bus, device_t child,
40190214Srpaulo				    int type, int *rid,
41190214Srpaulo				    u_long start, u_long end, u_long count,
42190214Srpaulo				    u_int flags);
43190214Srpauloint pci_activate_resource(device_t bus, device_t child, int type, int rid,
44190214Srpaulo			  struct resource *r);
45190214Srpauloint pci_deactivate_resource(device_t bus, device_t child, int type, int rid,
46190214Srpaulo			    struct resource *r);
47190214Srpauloint pci_release_resource(device_t bus, device_t child, int type, int rid,
48190214Srpaulo			 struct resource *r);
49190214Srpaulostruct rman *pci_get_rman(device_t dev, int type);
50190214Srpaulo