1178172Simp/*-
2178172Simp * Copyright (c) 1997, Stefan Esser <se@freebsd.org>
3178172Simp * All rights reserved.
4178172Simp *
5178172Simp * Redistribution and use in source and binary forms, with or without
6178172Simp * modification, are permitted provided that the following conditions
7178172Simp * are met:
8178172Simp * 1. Redistributions of source code must retain the above copyright
9178172Simp *    notice unmodified, this list of conditions, and the following
10178172Simp *    disclaimer.
11178172Simp * 2. Redistributions in binary form must reproduce the above copyright
12178172Simp *    notice, this list of conditions and the following disclaimer in the
13178172Simp *    documentation and/or other materials provided with the distribution.
14178172Simp *
15178172Simp * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16178172Simp * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17178172Simp * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18178172Simp * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19178172Simp * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20178172Simp * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21178172Simp * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22178172Simp * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23178172Simp * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24178172Simp * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25178172Simp *
26178172Simp * $FreeBSD$
27178172Simp *
28178172Simp */
29178172Simp
30178172Simp#define CONF1_ADDR_PORT    0x0cf8
31178172Simp#define CONF1_DATA_PORT    0x0cfc
32178172Simp
33178172Simp#define CONF1_ENABLE       0x80000000ul
34178172Simp#define CONF1_ENABLE_CHK   0x80000000ul
35178172Simp#define CONF1_ENABLE_MSK   0x7f000000ul
36178172Simp#define CONF1_ENABLE_CHK1  0xff000001ul
37178172Simp#define CONF1_ENABLE_MSK1  0x80000001ul
38178172Simp#define CONF1_ENABLE_RES1  0x80000000ul
39178172Simp
40178172Simp#define CONF2_ENABLE_PORT  0x0cf8
41178172Simp#define CONF2_FORWARD_PORT 0x0cfa
42178172Simp#define CONF2_ENABLE_CHK   0x0e
43178172Simp#define CONF2_ENABLE_RES   0x0e
44178172Simp
45178172Simpint		pci_cfgregopen(void);
46178172Simpu_int32_t	pci_cfgregread(int bus, int slot, int func, int reg, int bytes);
47178172Simpvoid		pci_cfgregwrite(int bus, int slot, int func, int reg, u_int32_t data, int bytes);
48