Module Name: src Committed By: dyoung Date: Tue Aug 18 17:02:01 UTC 2009
Modified Files: src/sys/arch/arm/footbridge/isa: isa_machdep.c src/sys/arch/atari/isa: isa_machdep.c src/sys/arch/evbarm/tsarm/isa: isa_machdep.c src/sys/arch/hpcmips/isa: isa_machdep.c plumisa_machdep.c src/sys/arch/mipsco/isa: isa_machdep.c src/sys/arch/shark/isa: isa_shark_machdep.c src/sys/arch/x86/include: isa_machdep.h src/sys/arch/x86/isa: isa_machdep.c src/sys/arch/xen/xen: isa_machdep.c Log Message: These are stragglers from my last commit ("Let us safely detach the ISA bus and devices attaching to the ISA bus"). Define isa_detach_hook() in MD ISA implementations. Define isa_dmadestroy(). To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/footbridge/isa/isa_machdep.c cvs rdiff -u -r1.33 -r1.34 src/sys/arch/atari/isa/isa_machdep.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbarm/tsarm/isa/isa_machdep.c cvs rdiff -u -r1.36 -r1.37 src/sys/arch/hpcmips/isa/isa_machdep.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hpcmips/isa/plumisa_machdep.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/mipsco/isa/isa_machdep.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/shark/isa/isa_shark_machdep.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/x86/include/isa_machdep.h cvs rdiff -u -r1.26 -r1.27 src/sys/arch/x86/isa/isa_machdep.c cvs rdiff -u -r1.20 -r1.21 src/sys/arch/xen/xen/isa_machdep.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/arm/footbridge/isa/isa_machdep.c diff -u src/sys/arch/arm/footbridge/isa/isa_machdep.c:1.13 src/sys/arch/arm/footbridge/isa/isa_machdep.c:1.14 --- src/sys/arch/arm/footbridge/isa/isa_machdep.c:1.13 Wed Mar 18 10:22:23 2009 +++ src/sys/arch/arm/footbridge/isa/isa_machdep.c Tue Aug 18 17:02:00 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: isa_machdep.c,v 1.13 2009/03/18 10:22:23 cegger Exp $ */ +/* $NetBSD: isa_machdep.c,v 1.14 2009/08/18 17:02:00 dyoung Exp $ */ /*- * Copyright (c) 1996-1998 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.13 2009/03/18 10:22:23 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.14 2009/08/18 17:02:00 dyoung Exp $"); #include "opt_irqstats.h" @@ -500,6 +500,14 @@ #endif } +void +isa_detach_hook(device_t self) +{ +#if NISADMA > 0 + isa_dma_destroy(); +#endif +} + int isa_irqdispatch(void *arg) { Index: src/sys/arch/atari/isa/isa_machdep.c diff -u src/sys/arch/atari/isa/isa_machdep.c:1.33 src/sys/arch/atari/isa/isa_machdep.c:1.34 --- src/sys/arch/atari/isa/isa_machdep.c:1.33 Sat Mar 14 21:04:06 2009 +++ src/sys/arch/atari/isa/isa_machdep.c Tue Aug 18 17:02:00 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: isa_machdep.c,v 1.33 2009/03/14 21:04:06 dsl Exp $ */ +/* $NetBSD: isa_machdep.c,v 1.34 2009/08/18 17:02:00 dyoung Exp $ */ /* * Copyright (c) 1997 Leo Weppelman. All rights reserved. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.33 2009/03/14 21:04:06 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.34 2009/08/18 17:02:00 dyoung Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -154,6 +154,11 @@ { } +void +isa_detach_hook(device_t self) +{ +} + const struct evcnt * isa_intr_evcnt(isa_chipset_tag_t ic, int irq) { Index: src/sys/arch/evbarm/tsarm/isa/isa_machdep.c diff -u src/sys/arch/evbarm/tsarm/isa/isa_machdep.c:1.8 src/sys/arch/evbarm/tsarm/isa/isa_machdep.c:1.9 --- src/sys/arch/evbarm/tsarm/isa/isa_machdep.c:1.8 Mon Mar 16 23:11:11 2009 +++ src/sys/arch/evbarm/tsarm/isa/isa_machdep.c Tue Aug 18 17:02:00 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: isa_machdep.c,v 1.8 2009/03/16 23:11:11 dsl Exp $ */ +/* $NetBSD: isa_machdep.c,v 1.9 2009/08/18 17:02:00 dyoung Exp $ */ /*- * Copyright (c) 1996-1998 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.8 2009/03/16 23:11:11 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.9 2009/08/18 17:02:00 dyoung Exp $"); #include "opt_irqstats.h" @@ -194,3 +194,8 @@ iba->iba_ic = &isa_chipset_tag; printf(": PC/104 expansion bus"); } + +void +isa_detach_hook(device_t self) +{ +} Index: src/sys/arch/hpcmips/isa/isa_machdep.c diff -u src/sys/arch/hpcmips/isa/isa_machdep.c:1.36 src/sys/arch/hpcmips/isa/isa_machdep.c:1.37 --- src/sys/arch/hpcmips/isa/isa_machdep.c:1.36 Wed Mar 18 10:22:29 2009 +++ src/sys/arch/hpcmips/isa/isa_machdep.c Tue Aug 18 17:02:00 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: isa_machdep.c,v 1.36 2009/03/18 10:22:29 cegger Exp $ */ +/* $NetBSD: isa_machdep.c,v 1.37 2009/08/18 17:02:00 dyoung Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.36 2009/03/18 10:22:29 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.37 2009/08/18 17:02:00 dyoung Exp $"); #include "opt_vr41xx.h" @@ -199,6 +199,11 @@ } +void +isa_detach_hook(device_t self) +{ +} + const struct evcnt * isa_intr_evcnt(isa_chipset_tag_t ic, int irq) { Index: src/sys/arch/hpcmips/isa/plumisa_machdep.c diff -u src/sys/arch/hpcmips/isa/plumisa_machdep.c:1.9 src/sys/arch/hpcmips/isa/plumisa_machdep.c:1.10 --- src/sys/arch/hpcmips/isa/plumisa_machdep.c:1.9 Mon Apr 28 20:23:21 2008 +++ src/sys/arch/hpcmips/isa/plumisa_machdep.c Tue Aug 18 17:02:00 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: plumisa_machdep.c,v 1.9 2008/04/28 20:23:21 martin Exp $ */ +/* $NetBSD: plumisa_machdep.c,v 1.10 2009/08/18 17:02:00 dyoung Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: plumisa_machdep.c,v 1.9 2008/04/28 20:23:21 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: plumisa_machdep.c,v 1.10 2009/08/18 17:02:00 dyoung Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -139,6 +139,11 @@ } +void +isa_detach_hook(device_t self) +{ +} + void * isa_intr_establish(isa_chipset_tag_t ic, int irq, int type, int level, int (*ih_fun)(void *), void *ih_arg) Index: src/sys/arch/mipsco/isa/isa_machdep.c diff -u src/sys/arch/mipsco/isa/isa_machdep.c:1.12 src/sys/arch/mipsco/isa/isa_machdep.c:1.13 --- src/sys/arch/mipsco/isa/isa_machdep.c:1.12 Mon Mar 16 23:11:12 2009 +++ src/sys/arch/mipsco/isa/isa_machdep.c Tue Aug 18 17:02:00 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: isa_machdep.c,v 1.12 2009/03/16 23:11:12 dsl Exp $ */ +/* $NetBSD: isa_machdep.c,v 1.13 2009/08/18 17:02:00 dyoung Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.12 2009/03/16 23:11:12 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.13 2009/08/18 17:02:00 dyoung Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -161,6 +161,11 @@ { } +void +isa_detach_hook(device_t self) +{ +} + const struct evcnt * isa_intr_evcnt(isa_chipset_tag_t ic, int irq) { Index: src/sys/arch/shark/isa/isa_shark_machdep.c diff -u src/sys/arch/shark/isa/isa_shark_machdep.c:1.12 src/sys/arch/shark/isa/isa_shark_machdep.c:1.13 --- src/sys/arch/shark/isa/isa_shark_machdep.c:1.12 Mon Mar 16 23:11:15 2009 +++ src/sys/arch/shark/isa/isa_shark_machdep.c Tue Aug 18 17:02:00 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: isa_shark_machdep.c,v 1.12 2009/03/16 23:11:15 dsl Exp $ */ +/* $NetBSD: isa_shark_machdep.c,v 1.13 2009/08/18 17:02:00 dyoung Exp $ */ /* * Copyright 1997 @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isa_shark_machdep.c,v 1.12 2009/03/16 23:11:15 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isa_shark_machdep.c,v 1.13 2009/08/18 17:02:00 dyoung Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -226,3 +226,8 @@ */ iba->iba_ic = &isa_chipset_tag; } + +void +isa_detach_hook(device_t self) +{ +} Index: src/sys/arch/x86/include/isa_machdep.h diff -u src/sys/arch/x86/include/isa_machdep.h:1.8 src/sys/arch/x86/include/isa_machdep.h:1.9 --- src/sys/arch/x86/include/isa_machdep.h:1.8 Wed Mar 25 22:56:00 2009 +++ src/sys/arch/x86/include/isa_machdep.h Tue Aug 18 17:02:00 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: isa_machdep.h,v 1.8 2009/03/25 22:56:00 dyoung Exp $ */ +/* $NetBSD: isa_machdep.h,v 1.9 2009/08/18 17:02:00 dyoung Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -100,6 +100,7 @@ */ void isa_attach_hook(device_t, device_t, struct isabus_attach_args *); +void isa_detach_hook(device_t); int isa_intr_alloc(isa_chipset_tag_t, int, int, int *); const struct evcnt *isa_intr_evcnt(isa_chipset_tag_t ic, int irq); void *isa_intr_establish(isa_chipset_tag_t ic, int irq, int type, @@ -109,6 +110,8 @@ bus_addr_t, int, bus_addr_t *, bus_space_handle_t *); void isa_mem_free(bus_space_tag_t, bus_space_handle_t, bus_size_t); +#define isa_dmadestroy(ic) \ + _isa_dmadestroy(&(ic)->ic_dmastate) #define isa_dmainit(ic, bst, dmat, d) \ _isa_dmainit(&(ic)->ic_dmastate, (bst), (dmat), (d)) #define isa_dmacascade(ic, c) \ Index: src/sys/arch/x86/isa/isa_machdep.c diff -u src/sys/arch/x86/isa/isa_machdep.c:1.26 src/sys/arch/x86/isa/isa_machdep.c:1.27 --- src/sys/arch/x86/isa/isa_machdep.c:1.26 Sun Apr 19 14:11:37 2009 +++ src/sys/arch/x86/isa/isa_machdep.c Tue Aug 18 17:02:00 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: isa_machdep.c,v 1.26 2009/04/19 14:11:37 ad Exp $ */ +/* $NetBSD: isa_machdep.c,v 1.27 2009/08/18 17:02:00 dyoung Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.26 2009/04/19 14:11:37 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.27 2009/08/18 17:02:00 dyoung Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -290,6 +290,14 @@ iba->iba_ic = &x86_isa_chipset; } +void +isa_detach_hook(device_t self) +{ + extern int isa_has_been_seen; + + isa_has_been_seen = 0; +} + int isa_mem_alloc(bus_space_tag_t t, bus_size_t size, bus_size_t align, bus_addr_t boundary, int flags, bus_addr_t *addrp, bus_space_handle_t *bshp) Index: src/sys/arch/xen/xen/isa_machdep.c diff -u src/sys/arch/xen/xen/isa_machdep.c:1.20 src/sys/arch/xen/xen/isa_machdep.c:1.21 --- src/sys/arch/xen/xen/isa_machdep.c:1.20 Wed Jul 29 12:02:09 2009 +++ src/sys/arch/xen/xen/isa_machdep.c Tue Aug 18 17:02:01 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: isa_machdep.c,v 1.20 2009/07/29 12:02:09 cegger Exp $ */ +/* $NetBSD: isa_machdep.c,v 1.21 2009/08/18 17:02:01 dyoung Exp $ */ /* NetBSD isa_machdep.c,v 1.11 2004/06/20 18:04:08 thorpej Exp */ /*- @@ -66,7 +66,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.20 2009/07/29 12:02:09 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.21 2009/08/18 17:02:01 dyoung Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -196,6 +196,7 @@ //XXX intr_disestablish(ih); } +/* XXX share with x86 */ void isa_attach_hook(device_t parent, device_t self, struct isabus_attach_args *iba) { @@ -218,6 +219,15 @@ iba->iba_ic = &x86_isa_chipset; } +/* XXX share with x86 */ +void +isa_detach_hook(device_t self) +{ + extern int isa_has_been_seen; + + isa_has_been_seen = 0; +} + int isa_mem_alloc(bus_space_tag_t t, bus_size_t size, bus_size_t align, bus_addr_t boundary, int flags, bus_addr_t *addrp, bus_space_handle_t *bshp) {