diff options
author | marius <marius@FreeBSD.org> | 2004-08-11 21:09:40 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2004-08-11 21:09:40 +0000 |
commit | 12f47e5a96e5c45ab2226b047ff6cda4c6c88ed7 (patch) | |
tree | d40582f26ce7e681a76614d74bc7ff22eb97a16d /sys/powerpc | |
parent | 765ec5c83bd7d7bd0a1d56b931ae040a3daebef5 (diff) | |
download | FreeBSD-src-12f47e5a96e5c45ab2226b047ff6cda4c6c88ed7.zip FreeBSD-src-12f47e5a96e5c45ab2226b047ff6cda4c6c88ed7.tar.gz |
- Use the rman_get_* functions instead of reaching into struct resource.
- Remove __RMAN_RESORUCE_VISIBLE again. It's no longer required either
because of the above change or because struct rman is no longer hidden.
Reviewed by: grehan
Tested by: cross-compile on i386
Diffstat (limited to 'sys/powerpc')
-rw-r--r-- | sys/powerpc/powermac/grackle.c | 1 | ||||
-rw-r--r-- | sys/powerpc/powermac/hrowpic.c | 15 | ||||
-rw-r--r-- | sys/powerpc/powermac/macio.c | 1 | ||||
-rw-r--r-- | sys/powerpc/powermac/openpic_macio.c | 1 | ||||
-rw-r--r-- | sys/powerpc/powermac/uninorth.c | 1 | ||||
-rw-r--r-- | sys/powerpc/powerpc/openpic.c | 15 | ||||
-rw-r--r-- | sys/powerpc/psim/iobus.c | 1 | ||||
-rw-r--r-- | sys/powerpc/psim/openpic_iobus.c | 1 |
8 files changed, 16 insertions, 20 deletions
diff --git a/sys/powerpc/powermac/grackle.c b/sys/powerpc/powermac/grackle.c index 1609b83..56a28b0 100644 --- a/sys/powerpc/powermac/grackle.c +++ b/sys/powerpc/powermac/grackle.c @@ -27,7 +27,6 @@ * $FreeBSD$ */ -#define __RMAN_RESOURCE_VISIBLE #include <sys/param.h> #include <sys/systm.h> #include <sys/module.h> diff --git a/sys/powerpc/powermac/hrowpic.c b/sys/powerpc/powermac/hrowpic.c index bf1a134..6b8caff 100644 --- a/sys/powerpc/powermac/hrowpic.c +++ b/sys/powerpc/powermac/hrowpic.c @@ -39,7 +39,6 @@ * prior to this are activated. */ -#define __RMAN_RESOURCE_VISIBLE #include <sys/param.h> #include <sys/systm.h> #include <sys/module.h> @@ -224,11 +223,13 @@ hrowpic_setup_intr(device_t picdev, device_t child, struct resource *res, int flags, driver_intr_t *intr, void *arg, void **cookiep) { struct hrowpic_softc *sc; + u_long start; int error; sc = device_get_softc(picdev); + start = rman_get_start(res); - if ((res->r_flags & RF_SHAREABLE) == 0) + if ((rman_get_flags(res) & RF_SHAREABLE) == 0) flags |= INTR_EXCL; /* @@ -238,16 +239,16 @@ hrowpic_setup_intr(device_t picdev, device_t child, struct resource *res, if (error) return (error); - error = inthand_add(device_get_nameunit(child), res->r_start, intr, - arg, flags, cookiep); + error = inthand_add(device_get_nameunit(child), start, intr, arg, + flags, cookiep); if (!error) { /* * Record irq request, and enable if h/w has been probed */ - sc->sc_irq[res->r_start] = 1; + sc->sc_irq[start] = 1; if (sc->sc_memr) { - hrowpic_toggle_irq(sc, res->r_start, 1); + hrowpic_toggle_irq(sc, start, 1); } } @@ -264,7 +265,7 @@ hrowpic_teardown_intr(device_t picdev, device_t child, struct resource *res, if (error) return (error); - error = inthand_remove(res->r_start, ih); + error = inthand_remove(rman_get_start(res), ih); return (error); } diff --git a/sys/powerpc/powermac/macio.c b/sys/powerpc/powermac/macio.c index 00cd783..300cbe7 100644 --- a/sys/powerpc/powermac/macio.c +++ b/sys/powerpc/powermac/macio.c @@ -31,7 +31,6 @@ * Driver for KeyLargo/Pangea, the MacPPC south bridge ASIC. */ -#define __RMAN_RESOURCE_VISIBLE #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> diff --git a/sys/powerpc/powermac/openpic_macio.c b/sys/powerpc/powermac/openpic_macio.c index 0c392a7..0f8b0e2 100644 --- a/sys/powerpc/powermac/openpic_macio.c +++ b/sys/powerpc/powermac/openpic_macio.c @@ -38,7 +38,6 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#define __RMAN_RESOURCE_VISIBLE #include <sys/param.h> #include <sys/systm.h> #include <sys/module.h> diff --git a/sys/powerpc/powermac/uninorth.c b/sys/powerpc/powermac/uninorth.c index 3c7782d..c609a00 100644 --- a/sys/powerpc/powermac/uninorth.c +++ b/sys/powerpc/powermac/uninorth.c @@ -25,7 +25,6 @@ * $FreeBSD$ */ -#define __RMAN_RESOURCE_VISIBLE #include <sys/param.h> #include <sys/systm.h> #include <sys/module.h> diff --git a/sys/powerpc/powerpc/openpic.c b/sys/powerpc/powerpc/openpic.c index cd52039..8f6d981 100644 --- a/sys/powerpc/powerpc/openpic.c +++ b/sys/powerpc/powerpc/openpic.c @@ -25,7 +25,6 @@ * $FreeBSD$ */ -#define __RMAN_RESOURCE_VISIBLE #include <sys/param.h> #include <sys/systm.h> #include <sys/bus.h> @@ -232,9 +231,11 @@ openpic_setup_intr(device_t dev, device_t child, struct resource *res, int flags, driver_intr_t *intr, void *arg, void **cookiep) { struct openpic_softc *sc; + u_long start; int error; sc = device_get_softc(dev); + start = rman_get_start(res); if (res == NULL) { device_printf(dev, "null interrupt resource from %s\n", @@ -242,7 +243,7 @@ openpic_setup_intr(device_t dev, device_t child, struct resource *res, return (EINVAL); } - if ((res->r_flags & RF_SHAREABLE) == 0) + if ((rman_get_flags(res) & RF_SHAREABLE) == 0) flags |= INTR_EXCL; /* @@ -252,13 +253,13 @@ openpic_setup_intr(device_t dev, device_t child, struct resource *res, if (error) return (error); - error = inthand_add(device_get_nameunit(child), res->r_start, intr, - arg, flags, cookiep); + error = inthand_add(device_get_nameunit(child), start, intr, arg, + flags, cookiep); if (sc->sc_hwprobed) - openpic_enable_irq(sc, res->r_start, IST_LEVEL); + openpic_enable_irq(sc, start, IST_LEVEL); else - sc->sc_irqrsv[res->r_start] = 1; + sc->sc_irqrsv[start] = 1; return (error); } @@ -273,7 +274,7 @@ openpic_teardown_intr(device_t dev, device_t child, struct resource *res, if (error) return (error); - error = inthand_remove(res->r_start, ih); + error = inthand_remove(rman_get_start(res), ih); return (error); } diff --git a/sys/powerpc/psim/iobus.c b/sys/powerpc/psim/iobus.c index 9345a74..1a6cfb7 100644 --- a/sys/powerpc/psim/iobus.c +++ b/sys/powerpc/psim/iobus.c @@ -35,7 +35,6 @@ * Code borrowed from various nexus.c and uninorth.c :-) */ -#define __RMAN_RESOURCE_VISIBLE #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> diff --git a/sys/powerpc/psim/openpic_iobus.c b/sys/powerpc/psim/openpic_iobus.c index a057c4b..638e747 100644 --- a/sys/powerpc/psim/openpic_iobus.c +++ b/sys/powerpc/psim/openpic_iobus.c @@ -33,7 +33,6 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#define __RMAN_RESOURCE_VISIBLE #include <sys/param.h> #include <sys/systm.h> #include <sys/module.h> |