Module Name: src
Committed By: dyoung
Date: Wed Aug 19 14:29:54 UTC 2009
Modified Files:
src/sys/arch/alpha/include: isa_machdep.h
src/sys/arch/alpha/jensenio: jensenio.c
src/sys/arch/alpha/pci: sio.c
Log Message:
Define isa_dmadestroy and isa_detach_hook. Hook up a couple of
isa_detach_hook implementations.
To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/alpha/include/isa_machdep.h
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/alpha/jensenio/jensenio.c
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/alpha/pci/sio.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/alpha/include/isa_machdep.h
diff -u src/sys/arch/alpha/include/isa_machdep.h:1.9 src/sys/arch/alpha/include/isa_machdep.h:1.10
--- src/sys/arch/alpha/include/isa_machdep.h:1.9 Mon Apr 28 20:23:11 2008
+++ src/sys/arch/alpha/include/isa_machdep.h Wed Aug 19 14:29:53 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: isa_machdep.h,v 1.9 2008/04/28 20:23:11 martin Exp $ */
+/* $NetBSD: isa_machdep.h,v 1.10 2009/08/19 14:29:53 dyoung Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -83,6 +83,8 @@
*/
#define isa_attach_hook(p, s, a) \
(*(a)->iba_ic->ic_attach_hook)((p), (s), (a))
+#define isa_detach_hook(s) \
+ (*(a)->iba_ic->ic_detach_hook)((s))
#define isa_intr_evcnt(c, i) \
(*(c)->ic_intr_evcnt)((c)->ic_v, (i))
#define isa_intr_establish(c, i, t, l, f, a) \
@@ -94,6 +96,8 @@
#define isa_dmainit(ic, bst, dmat, d) \
_isa_dmainit(&(ic)->ic_dmastate, (bst), (dmat), (d))
+#define isa_dmadestroy(ic) \
+ _isa_dmadestroy(&(ic)->ic_dmastate)
#define isa_dmacascade(ic, c) \
_isa_dmacascade(&(ic)->ic_dmastate, (c))
#define isa_dmamaxsize(ic, c) \
Index: src/sys/arch/alpha/jensenio/jensenio.c
diff -u src/sys/arch/alpha/jensenio/jensenio.c:1.17 src/sys/arch/alpha/jensenio/jensenio.c:1.18
--- src/sys/arch/alpha/jensenio/jensenio.c:1.17 Wed Jul 9 21:19:23 2008
+++ src/sys/arch/alpha/jensenio/jensenio.c Wed Aug 19 14:29:53 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: jensenio.c,v 1.17 2008/07/09 21:19:23 joerg Exp $ */
+/* $NetBSD: jensenio.c,v 1.18 2009/08/19 14:29:53 dyoung Exp $ */
/*-
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -43,7 +43,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: jensenio.c,v 1.17 2008/07/09 21:19:23 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: jensenio.c,v 1.18 2009/08/19 14:29:53 dyoung Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -97,6 +97,8 @@
static void jensenio_isa_attach_hook(device_t, device_t,
struct isabus_attach_args *);
+static void jensenio_isa_detach_hook(device_t);
+
/*
* Set up the Jensen's function pointers.
*/
@@ -203,6 +205,7 @@
* Attach the ISA bus.
*/
jcp->jc_ic.ic_attach_hook = jensenio_isa_attach_hook;
+ jcp->jc_ic.ic_detach_hook = jensenio_isa_detach_hook;
ja.ja_isa.iba_iot = &jcp->jc_eisa_iot;
ja.ja_isa.iba_memt = &jcp->jc_eisa_memt;
@@ -254,3 +257,10 @@
/* Nothing to do. */
}
+
+static void
+jensenio_isa_detach_hook(device_t self)
+{
+
+ /* Nothing to do. */
+}
Index: src/sys/arch/alpha/pci/sio.c
diff -u src/sys/arch/alpha/pci/sio.c:1.46 src/sys/arch/alpha/pci/sio.c:1.47
--- src/sys/arch/alpha/pci/sio.c:1.46 Sat Mar 14 21:04:02 2009
+++ src/sys/arch/alpha/pci/sio.c Wed Aug 19 14:29:54 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: sio.c,v 1.46 2009/03/14 21:04:02 dsl Exp $ */
+/* $NetBSD: sio.c,v 1.47 2009/08/19 14:29:54 dyoung Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: sio.c,v 1.46 2009/03/14 21:04:02 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sio.c,v 1.47 2009/08/19 14:29:54 dyoung Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -125,6 +125,7 @@
void sio_isa_attach_hook(struct device *, struct device *,
struct isabus_attach_args *);
+void sio_isa_detach_hook(device_t);
#if NPCEB > 0
void sio_eisa_attach_hook(struct device *, struct device *,
struct eisabus_attach_args *);
@@ -258,6 +259,7 @@
sc->sc_ic->ic_v = NULL;
sc->sc_ic->ic_attach_hook = sio_isa_attach_hook;
+ sc->sc_ic->ic_detach_hook = sio_isa_detach_hook;
/*
* Deal with platforms that hook up ISA interrupts differently.
@@ -291,6 +293,13 @@
/* Nothing to do. */
}
+void
+sio_isa_detach_hook(device_t self)
+{
+
+ /* Nothing to do. */
+}
+
#if NPCEB > 0
void