Date: Mon, 20 Oct 2008 10:39:25 GMT From: Andrew Turner <andrew@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 151595 for review Message-ID: <200810201039.m9KAdP9X070493@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=151595 Change 151595 by andrew@andrew_bender on 2008/10/20 10:39:25 Add a teardown_intr function and store the start, end and count of an allocation in it's resource list Affected files ... .. //depot/projects/arm/src/sys/arm/s3c2xx0/s3c2410.c#16 edit Differences ... ==== //depot/projects/arm/src/sys/arm/s3c2xx0/s3c2410.c#16 (text+ko) ==== @@ -62,6 +62,8 @@ static void s3c2410_identify(driver_t *, device_t); static int s3c2410_setup_intr(device_t, device_t, struct resource *, int, driver_filter_t *, driver_intr_t *, void *, void **); +static int s3c2410_teardown_intr(device_t, device_t, struct resource *, + void *); static struct resource *s3c2410_alloc_resource(device_t, device_t, int, int *, u_long, u_long, u_long, u_int); static int s3c2410_activate_resource(device_t, device_t, int, int, @@ -75,6 +77,7 @@ DEVMETHOD(device_attach, s3c2410_attach), DEVMETHOD(device_identify, s3c2410_identify), DEVMETHOD(bus_setup_intr, s3c2410_setup_intr), + DEVMETHOD(bus_teardown_intr, s3c2410_teardown_intr), DEVMETHOD(bus_alloc_resource, s3c2410_alloc_resource), DEVMETHOD(bus_activate_resource, s3c2410_activate_resource), DEVMETHOD(bus_release_resource, s3c2410_release_resource), @@ -135,6 +138,13 @@ return (0); } +static int +s3c2410_teardown_intr(device_t dev, device_t child, struct resource *res, + void *cookie) +{ + return (BUS_TEARDOWN_INTR(device_get_parent(dev), child, res, cookie)); +} + static struct resource * s3c2410_alloc_resource(device_t bus, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) @@ -209,8 +219,12 @@ if (res != NULL) { rman_set_rid(res, *rid); - if (rle != NULL) + if (rle != NULL) { rle->res = res; + rle->start = rman_get_start(res); + rle->end = rman_get_end(res); + rle->count = count; + } } return (res);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810201039.m9KAdP9X070493>