2 * Copyright (c) 2004, Joerg Sonnenberger <joerg@bec.de>
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice unmodified, this list of conditions, and the following
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 * $DragonFly: src/sys/bus/pci/pci_private.h,v 1.5 2005/02/04 02:52:15 dillon Exp $
30 extern devclass_t pci_devclass;
32 struct pci_devinfo *pci_read_device(device_t, int, int, int, size_t);
33 struct resource_list *pci_get_resource_list (device_t dev, device_t child);
34 struct resource *pci_alloc_resource(device_t dev, device_t child,
35 int type, int *rid, u_long start, u_long end,
36 u_long count, u_int flags);
39 u_int32_t pci_read_config_method(device_t dev, device_t child,
41 void pci_write_config_method(device_t dev, device_t child,
42 int reg, u_int32_t val, int width);
44 const char *pci_class_to_string(int class);
45 void pci_delete_resource(device_t dev, device_t child, int type, int rid);
46 void pci_print_verbose(struct pci_devinfo *);
47 void pci_probe_nomatch(device_t dev, device_t child);
48 void pci_add_children(device_t dev, int busno, size_t dinfo_size);
49 void pci_add_child(device_t bus, struct pci_devinfo *dinfo);
50 int pci_freecfg(struct pci_devinfo *);
51 int pci_read_ivar(device_t, device_t, int, uintptr_t *);
52 int pci_write_ivar(device_t, device_t, int, uintptr_t);
53 int pci_resume(device_t dev);
54 int pci_print_child(device_t dev, device_t child);
55 int pci_assign_interrupt_method(device_t dev, device_t child);
56 int pci_set_powerstate_method(device_t dev, device_t child, int state);
57 int pci_get_powerstate_method(device_t dev, device_t child);
58 int pci_enable_busmaster_method(device_t dev, device_t child);
59 int pci_disable_busmaster_method(device_t dev, device_t child);
60 int pci_enable_io_method(device_t dev, device_t child, int space);
61 int pci_disable_io_method(device_t dev, device_t child, int space);
63 int pci_child_pnpinfo_str_method(device_t cbdev, device_t child,
64 char *buf, size_t buflen);
65 int pci_child_location_str_method(device_t cbdev, device_t child,
66 char *buf, size_t buflen);