aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMarius Strobl <marius@FreeBSD.org>2004-08-11 21:09:40 +0000
committerMarius Strobl <marius@FreeBSD.org>2004-08-11 21:09:40 +0000
commita4954466bdeed39eb97b96a9b4dc6761b06e9f5a (patch)
treed40582f26ce7e681a76614d74bc7ff22eb97a16d /sys
parent0f54f48225739fac679bfa2758e28da58ddefa58 (diff)
Notes
Diffstat (limited to 'sys')
-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
-rw-r--r--sys/powerpc/powerpc/openpic.c15
-rw-r--r--sys/powerpc/psim/iobus.c1
-rw-r--r--sys/powerpc/psim/openpic_iobus.c1
8 files changed, 16 insertions, 20 deletions
diff --git a/sys/powerpc/powermac/grackle.c b/sys/powerpc/powermac/grackle.c
index 1609b83c3e340..56a28b0cd8181 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 bf1a1343a6263..6b8cafff7e88f 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 00cd7838e5089..300cbe7c167b1 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 0c392a7d8458a..0f8b0e2552000 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 3c7782d8a981f..c609a00586777 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 cd52039a3e864..8f6d981d8fbed 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 9345a748db271..1a6cfb736a029 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 a057c4b943896..638e747e2d597 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>