1 | /* $XFree86: xc/programs/Xserver/hw/xfree86/scanpci/xf86PciData.h,v 1.3 2003/08/24 17:37:10 dawes Exp $ */
|
---|
2 |
|
---|
3 | /*
|
---|
4 | * Copyright (c) 2000-2002 by The XFree86 Project, Inc.
|
---|
5 | *
|
---|
6 | * Permission is hereby granted, free of charge, to any person obtaining a
|
---|
7 | * copy of this software and associated documentation files (the "Software"),
|
---|
8 | * to deal in the Software without restriction, including without limitation
|
---|
9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
---|
10 | * and/or sell copies of the Software, and to permit persons to whom the
|
---|
11 | * Software is furnished to do so, subject to the following conditions:
|
---|
12 | *
|
---|
13 | * The above copyright notice and this permission notice shall be included in
|
---|
14 | * all copies or substantial portions of the Software.
|
---|
15 | *
|
---|
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
---|
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
---|
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
---|
19 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
---|
20 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
---|
21 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
---|
22 | * OTHER DEALINGS IN THE SOFTWARE.
|
---|
23 | *
|
---|
24 | * Except as contained in this notice, the name of the copyright holder(s)
|
---|
25 | * and author(s) shall not be used in advertising or otherwise to promote
|
---|
26 | * the sale, use or other dealings in this Software without prior written
|
---|
27 | * authorization from the copyright holder(s) and author(s).
|
---|
28 | */
|
---|
29 |
|
---|
30 | #ifdef HAVE_XORG_CONFIG_H
|
---|
31 | #include <xorg-config.h>
|
---|
32 | #endif
|
---|
33 |
|
---|
34 | #ifndef PCI_DATA_H_
|
---|
35 | #define PCI_DATA_H_
|
---|
36 |
|
---|
37 | #define NOVENDOR 0xFFFF
|
---|
38 | #define NODEVICE 0xFFFF
|
---|
39 | #define NOSUBSYS 0xFFFF
|
---|
40 |
|
---|
41 | typedef Bool (*ScanPciSetupProcPtr)(void);
|
---|
42 | typedef void (*ScanPciCloseProcPtr)(void);
|
---|
43 | typedef int (*ScanPciFindByDeviceProcPtr)(
|
---|
44 | unsigned short vendor, unsigned short device,
|
---|
45 | unsigned short svendor, unsigned short subsys,
|
---|
46 | const char **vname, const char **dname,
|
---|
47 | const char **svname, const char **sname);
|
---|
48 | typedef int (*ScanPciFindBySubsysProcPtr)(
|
---|
49 | unsigned short svendor, unsigned short subsys,
|
---|
50 | const char **svname, const char **sname);
|
---|
51 |
|
---|
52 | /*
|
---|
53 | * Whoever loads this module needs to define these and initialise them
|
---|
54 | * after loading.
|
---|
55 | */
|
---|
56 | extern ScanPciSetupProcPtr xf86SetupPciIds;
|
---|
57 | extern ScanPciCloseProcPtr xf86ClosePciIds;
|
---|
58 | extern ScanPciFindByDeviceProcPtr xf86FindPciNamesByDevice;
|
---|
59 | extern ScanPciFindBySubsysProcPtr xf86FindPciNamesBySubsys;
|
---|
60 |
|
---|
61 | Bool ScanPciSetupPciIds(void);
|
---|
62 | void ScanPciClosePciIds(void);
|
---|
63 | int ScanPciFindPciNamesByDevice(unsigned short vendor, unsigned short device,
|
---|
64 | unsigned short svendor, unsigned short subsys,
|
---|
65 | const char **vname, const char **dname,
|
---|
66 | const char **svname, const char **sname);
|
---|
67 | int ScanPciFindPciNamesBySubsys(unsigned short svendor, unsigned short subsys,
|
---|
68 | const char **svname, const char **sname);
|
---|
69 |
|
---|
70 | #endif
|
---|