summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/powermac
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2004-08-11 21:09:40 +0000
committermarius <marius@FreeBSD.org>2004-08-11 21:09:40 +0000
commit12f47e5a96e5c45ab2226b047ff6cda4c6c88ed7 (patch)
treed40582f26ce7e681a76614d74bc7ff22eb97a16d /sys/powerpc/powermac
parent765ec5c83bd7d7bd0a1d56b931ae040a3daebef5 (diff)
downloadFreeBSD-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/powermac')
-rw-r--r--sys/powerpc/powermac/grackle.c1
-rw-r--r--sys/powerpc/powermac/hrowpic.c15
-rw-r--r--sys/powerpc/powermac/macio.c1
-rw-r--r--sys/powerpc/powermac/openpic_macio.c1
-rw-r--r--sys/powerpc/powermac/uninorth.c1
5 files changed, 8 insertions, 11 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>
OpenPOWER on IntegriCloud