Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/pci/isa_pci.c
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | |||||
#include <machine/bus.h> | #include <machine/bus.h> | ||||
#include <sys/rman.h> | #include <sys/rman.h> | ||||
#include <machine/resource.h> | #include <machine/resource.h> | ||||
static int isab_pci_probe(device_t dev); | static int isab_pci_probe(device_t dev); | ||||
static int isab_pci_attach(device_t dev); | static int isab_pci_attach(device_t dev); | ||||
static struct resource * isab_pci_alloc_resource(device_t dev, | static struct resource * isab_pci_alloc_resource(device_t dev, | ||||
device_t child, int type, int *rid, u_long start, u_long end, u_long count, | device_t child, int type, int *rid, rman_res_t start, rman_res_t end, | ||||
u_int flags); | rman_res_t count, u_int flags); | ||||
static int isab_pci_release_resource(device_t dev, device_t child, | static int isab_pci_release_resource(device_t dev, device_t child, | ||||
int type, int rid, struct resource *r); | int type, int rid, struct resource *r); | ||||
static device_method_t isab_methods[] = { | static device_method_t isab_methods[] = { | ||||
/* Device interface */ | /* Device interface */ | ||||
DEVMETHOD(device_probe, isab_pci_probe), | DEVMETHOD(device_probe, isab_pci_probe), | ||||
DEVMETHOD(device_attach, isab_pci_attach), | DEVMETHOD(device_attach, isab_pci_attach), | ||||
DEVMETHOD(device_detach, bus_generic_detach), | DEVMETHOD(device_detach, bus_generic_detach), | ||||
▲ Show 20 Lines • Show All 99 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
bus_generic_probe(dev); | bus_generic_probe(dev); | ||||
return (isab_attach(dev)); | return (isab_attach(dev)); | ||||
} | } | ||||
static struct resource * | static struct resource * | ||||
isab_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, | isab_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, | ||||
u_long start, u_long end, u_long count, u_int flags) | rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) | ||||
{ | { | ||||
struct isab_pci_softc *sc; | struct isab_pci_softc *sc; | ||||
int bar; | int bar; | ||||
if (device_get_parent(child) != dev) | if (device_get_parent(child) != dev) | ||||
return bus_generic_alloc_resource(dev, child, type, rid, start, | return bus_generic_alloc_resource(dev, child, type, rid, start, | ||||
end, count, flags); | end, count, flags); | ||||
▲ Show 20 Lines • Show All 65 Lines • Show Last 20 Lines |