diff options
author | imp <imp@FreeBSD.org> | 2006-04-20 04:12:02 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2006-04-20 04:12:02 +0000 |
commit | 09e17e600a13fabcd3d635b0147237e34c7bc0b3 (patch) | |
tree | 82c90a082268a65a1e1c4ca7e25628a06234a29a /sys/arm/xscale | |
parent | 2a2593f381c4a7250c17dcb28fe177ca0d6b97c9 (diff) | |
download | FreeBSD-src-09e17e600a13fabcd3d635b0147237e34c7bc0b3.zip FreeBSD-src-09e17e600a13fabcd3d635b0147237e34c7bc0b3.tar.gz |
When returning a resource that we've allocated with rman_reserve_resource,
go ahead and set the rid for that resource.
Diffstat (limited to 'sys/arm/xscale')
-rw-r--r-- | sys/arm/xscale/i80321/i80321_pci.c | 1 | ||||
-rw-r--r-- | sys/arm/xscale/i80321/iq80321.c | 12 | ||||
-rw-r--r-- | sys/arm/xscale/i80321/obio.c | 1 |
3 files changed, 10 insertions, 4 deletions
diff --git a/sys/arm/xscale/i80321/i80321_pci.c b/sys/arm/xscale/i80321/i80321_pci.c index 559b51f..b905bbf 100644 --- a/sys/arm/xscale/i80321/i80321_pci.c +++ b/sys/arm/xscale/i80321/i80321_pci.c @@ -380,6 +380,7 @@ i80321_pci_alloc_resource(device_t bus, device_t child, int type, int *rid, rv = rman_reserve_resource(rm, start, end, count, flags, child); if (rv == NULL) return (NULL); + rman_set_rid(rv, *rid); if (type != SYS_RES_IRQ) { if (type == SYS_RES_MEMORY) bh += (rman_get_start(rv)); diff --git a/sys/arm/xscale/i80321/iq80321.c b/sys/arm/xscale/i80321/iq80321.c index 26415e3..9537aa4 100644 --- a/sys/arm/xscale/i80321/iq80321.c +++ b/sys/arm/xscale/i80321/iq80321.c @@ -300,10 +300,14 @@ iq80321_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) { struct i80321_softc *sc = device_get_softc(dev); - - if (type == SYS_RES_IRQ) - return (rman_reserve_resource(&sc->sc_irq_rman, - start, end, count, flags, child)); + struct resource *rv; + + if (type == SYS_RES_IRQ) { + rv = rman_reserve_resource(&sc->sc_irq_rman, + start, end, count, flags, child); + if (rv != NULL) + rman_set_rid(rv, *rid); + } return (NULL); } diff --git a/sys/arm/xscale/i80321/obio.c b/sys/arm/xscale/i80321/obio.c index a79dcf0..b4026eb 100644 --- a/sys/arm/xscale/i80321/obio.c +++ b/sys/arm/xscale/i80321/obio.c @@ -124,6 +124,7 @@ obio_alloc_resource(device_t bus, device_t child, int type, int *rid, return (NULL); if (type == SYS_RES_IRQ) return (rv); + rman_set_rid(rv, *rid); rman_set_bustag(rv, bt); rman_set_bushandle(rv, bh); |