summaryrefslogtreecommitdiffstats
path: root/sys/dev/pcic
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>1999-12-15 06:57:18 +0000
committerimp <imp@FreeBSD.org>1999-12-15 06:57:18 +0000
commit0c150ca4f78e5066e775859d5d37aaa79ae95504 (patch)
tree37187aae41196bb3eb5b34d9026e70f3fc12f707 /sys/dev/pcic
parentf3539c3f234bbeee39e923c93b2b82cd54486bac (diff)
downloadFreeBSD-src-0c150ca4f78e5066e775859d5d37aaa79ae95504.zip
FreeBSD-src-0c150ca4f78e5066e775859d5d37aaa79ae95504.tar.gz
Add alloc/release resource. Need to connect functionality later.
Diffstat (limited to 'sys/dev/pcic')
-rw-r--r--sys/dev/pcic/i82365.c16
-rw-r--r--sys/dev/pcic/i82365_isa.c2
-rw-r--r--sys/dev/pcic/i82365var.h4
3 files changed, 21 insertions, 1 deletions
diff --git a/sys/dev/pcic/i82365.c b/sys/dev/pcic/i82365.c
index 77de927..1a25bb7 100644
--- a/sys/dev/pcic/i82365.c
+++ b/sys/dev/pcic/i82365.c
@@ -1350,7 +1350,7 @@ int pcic_setup_intr(device_t dev, device_t child, struct resource *irqres,
h->ih_irq = irq;
- printf("card irq %d\n",irq);
+ device_printf(dev, "card irq %d\n", irq);
return 0;
}
@@ -1370,3 +1370,17 @@ int pcic_teardown_intr(device_t dev, device_t child, struct resource *irq,
return (bus_generic_teardown_intr(device_get_parent(dev), child, irq,
cookiep));
}
+
+int pcic_alloc_resource(device_t dev, device_t child, int type, int *rid,
+ u_long start, u_long end, u_long count, u_int flags)
+{
+ return bus_generic_alloc_resource(dev, child, type, rid, start, end,
+ count, flags);
+}
+
+int pcic_release_resource(device_t dev, device_t child, int type, int rid,
+ struct resource *r)
+{
+ return bus_generic_release_resource(dev, child, type, rid, r);
+}
+
diff --git a/sys/dev/pcic/i82365_isa.c b/sys/dev/pcic/i82365_isa.c
index bc05f4d..051c40d 100644
--- a/sys/dev/pcic/i82365_isa.c
+++ b/sys/dev/pcic/i82365_isa.c
@@ -371,6 +371,8 @@ static device_method_t pcic_isa_methods[] = {
/* Bus Interface */
DEVMETHOD(bus_driver_added, bus_generic_driver_added),
+ DEVMETHOD(bus_alloc_resource, pcic_alloc_resource),
+ DEVMETHOD(bus_release_resource, pcic_release_resource),
DEVMETHOD(bus_activate_resource, pcic_activate_resource),
DEVMETHOD(bus_deactivate_resource, pcic_deactivate_resource),
DEVMETHOD(bus_setup_intr, pcic_setup_intr),
diff --git a/sys/dev/pcic/i82365var.h b/sys/dev/pcic/i82365var.h
index 5d3391e..dcc2737 100644
--- a/sys/dev/pcic/i82365var.h
+++ b/sys/dev/pcic/i82365var.h
@@ -202,8 +202,12 @@ pcic_write(h, idx, data)
*/
int pcic_activate_resource(device_t dev, device_t child, int type, int rid,
struct resource *r);
+int pcic_alloc_resource(device_t dev, device_t child, int type, int *rid,
+ u_long start, u_long end, u_long count, u_int flags);
int pcic_deactivate_resource(device_t dev, device_t child, int type, int rid,
struct resource *r);
+int pcic_release_resource(device_t dev, device_t child, int type, int rid,
+ struct resource *r);
int pcic_setup_intr(device_t dev, device_t child, struct resource *irq,
int flags, driver_intr_t intr, void *arg, void **cookiep);
int pcic_teardown_intr(device_t dev, device_t child, struct resource *irq,
OpenPOWER on IntegriCloud