Catch up with i386 nexus.c rev 1.59: add bus_get_resource_list().

This commit is contained in:
njl 2004-08-24 19:22:54 +00:00
parent 8b2104d07b
commit 62d6f572a8
2 changed files with 20 additions and 0 deletions

View File

@ -97,6 +97,7 @@ static int nexus_setup_intr(device_t, device_t, struct resource *, int flags,
void (*)(void *), void *, void **);
static int nexus_teardown_intr(device_t, device_t, struct resource *,
void *);
static struct resource_list *nexus_get_reslist(device_t dev, device_t child);
static int nexus_set_resource(device_t, device_t, int, int, u_long, u_long);
static int nexus_get_resource(device_t, device_t, int, int, u_long *, u_long *);
static void nexus_delete_resource(device_t, device_t, int, int);
@ -120,6 +121,7 @@ static device_method_t nexus_methods[] = {
DEVMETHOD(bus_setup_intr, nexus_setup_intr),
DEVMETHOD(bus_teardown_intr, nexus_teardown_intr),
DEVMETHOD(bus_config_intr, nexus_config_intr),
DEVMETHOD(bus_get_resource_list, nexus_get_reslist),
DEVMETHOD(bus_set_resource, nexus_set_resource),
DEVMETHOD(bus_get_resource, nexus_get_resource),
DEVMETHOD(bus_delete_resource, nexus_delete_resource),
@ -464,6 +466,14 @@ nexus_config_intr(device_t dev, int irq, enum intr_trigger trig,
return (intr_config_intr(irq, trig, pol));
}
static struct resource_list *
nexus_get_reslist(device_t dev, device_t child)
{
struct nexus_device *ndev = DEVTONX(child);
return (&ndev->nx_resources);
}
static int
nexus_set_resource(device_t dev, device_t child, int type, int rid, u_long start, u_long count)
{

View File

@ -97,6 +97,7 @@ static int nexus_setup_intr(device_t, device_t, struct resource *, int flags,
void (*)(void *), void *, void **);
static int nexus_teardown_intr(device_t, device_t, struct resource *,
void *);
static struct resource_list *nexus_get_reslist(device_t dev, device_t child);
static int nexus_set_resource(device_t, device_t, int, int, u_long, u_long);
static int nexus_get_resource(device_t, device_t, int, int, u_long *,
u_long *);
@ -124,6 +125,7 @@ static device_method_t nexus_methods[] = {
DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource),
DEVMETHOD(bus_setup_intr, nexus_setup_intr),
DEVMETHOD(bus_teardown_intr, nexus_teardown_intr),
DEVMETHOD(bus_get_resource_list, nexus_get_reslist),
DEVMETHOD(bus_set_resource, nexus_set_resource),
DEVMETHOD(bus_get_resource, nexus_get_resource),
DEVMETHOD(bus_delete_resource, nexus_delete_resource),
@ -502,6 +504,14 @@ nexus_teardown_intr(device_t dev, device_t child, struct resource *r, void *ih)
#endif
}
static struct resource_list *
nexus_get_reslist(device_t dev, device_t child)
{
struct nexus_device *ndev = DEVTONX(child);
return (&ndev->nx_resources);
}
static int
nexus_set_resource(device_t dev, device_t child, int type, int rid, u_long start, u_long count)
{