Deleted Added
sdiff udiff text old ( 126560 ) new ( 128058 )
full compact
1/*-
2 * Copyright (c) 2000 Michael Smith
3 * Copyright (c) 2000 BSDi
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 10 unchanged lines hidden (view full) ---

19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
27 * $FreeBSD: head/sys/dev/acpica/acpi_pcib_acpi.c 126560 2004-03-03 18:34:42Z njl $
28 */
29#include "opt_acpi.h"
30#include <sys/param.h>
31#include <sys/bus.h>
32#include <sys/malloc.h>
33#include <sys/kernel.h>
34
35#include "acpi.h"

--- 29 unchanged lines hidden (view full) ---

65static int acpi_pcib_acpi_resume(device_t bus);
66static int acpi_pcib_read_ivar(device_t dev, device_t child, int which, uintptr_t *result);
67static int acpi_pcib_write_ivar(device_t dev, device_t child, int which, uintptr_t value);
68static u_int32_t acpi_pcib_read_config(device_t dev, int bus, int slot, int func, int reg, int bytes);
69static void acpi_pcib_write_config(device_t dev, int bus, int slot, int func, int reg,
70 u_int32_t data, int bytes);
71static int acpi_pcib_acpi_route_interrupt(device_t pcib,
72 device_t dev, int pin);
73
74static device_method_t acpi_pcib_acpi_methods[] = {
75 /* Device interface */
76 DEVMETHOD(device_probe, acpi_pcib_acpi_probe),
77 DEVMETHOD(device_attach, acpi_pcib_acpi_attach),
78 DEVMETHOD(device_shutdown, bus_generic_shutdown),
79 DEVMETHOD(device_suspend, bus_generic_suspend),
80 DEVMETHOD(device_resume, acpi_pcib_acpi_resume),
81
82 /* Bus interface */
83 DEVMETHOD(bus_print_child, bus_generic_print_child),
84 DEVMETHOD(bus_read_ivar, acpi_pcib_read_ivar),
85 DEVMETHOD(bus_write_ivar, acpi_pcib_write_ivar),
86 DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource),
87 DEVMETHOD(bus_release_resource, bus_generic_release_resource),
88 DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
89 DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
90 DEVMETHOD(bus_setup_intr, bus_generic_setup_intr),
91 DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr),
92
93 /* pcib interface */
94 DEVMETHOD(pcib_maxslots, pcib_maxslots),

--- 189 unchanged lines hidden (view full) ---

284acpi_pcib_acpi_route_interrupt(device_t pcib, device_t dev, int pin)
285{
286 struct acpi_hpcib_softc *sc;
287
288 /* find the bridge softc */
289 sc = device_get_softc(pcib);
290 return (acpi_pcib_route_interrupt(pcib, dev, pin, &sc->ap_prt));
291}