From 62d6f572a826b05d236b56030ad3c4a29ea5b624 Mon Sep 17 00:00:00 2001 From: njl Date: Tue, 24 Aug 2004 19:22:54 +0000 Subject: [PATCH] Catch up with i386 nexus.c rev 1.59: add bus_get_resource_list(). --- sys/amd64/amd64/nexus.c | 10 ++++++++++ sys/ia64/ia64/nexus.c | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/sys/amd64/amd64/nexus.c b/sys/amd64/amd64/nexus.c index d45ace1cd5d8..0b6fdfa7bd3e 100644 --- a/sys/amd64/amd64/nexus.c +++ b/sys/amd64/amd64/nexus.c @@ -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) { diff --git a/sys/ia64/ia64/nexus.c b/sys/ia64/ia64/nexus.c index 9f41994d11fc..4522314d8095 100644 --- a/sys/ia64/ia64/nexus.c +++ b/sys/ia64/ia64/nexus.c @@ -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) {