Define isa_dmadestroy and isa_detach_hook. Hook up a couple of

isa_detach_hook implementations.
This commit is contained in:
dyoung 2009-08-19 14:29:53 +00:00
parent a3d9e80f96
commit e178a961c9
3 changed files with 28 additions and 5 deletions

View File

@ -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 @@ struct alpha_isa_chipset {
*/
#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 @@ struct alpha_isa_chipset {
#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) \

View File

@ -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 int jensenio_eisa_maxslots(void *);
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 @@ jensenio_attach(device_t parent, device_t self, void *aux)
* 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 @@ jensenio_isa_attach_hook(device_t parent, device_t self,
/* Nothing to do. */
}
static void
jensenio_isa_detach_hook(device_t self)
{
/* Nothing to do. */
}

View File

@ -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 @@ union sio_attach_args {
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 @@ sio_bridge_callback(struct device *self)
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 @@ sio_isa_attach_hook(struct device *parent, struct device *self, struct isabus_at
/* Nothing to do. */
}
void
sio_isa_detach_hook(device_t self)
{
/* Nothing to do. */
}
#if NPCEB > 0
void