diff options
Diffstat (limited to 'sys')
69 files changed, 816 insertions, 124 deletions
diff --git a/sys/arch/alpha/include/bus.old.h b/sys/arch/alpha/include/bus.old.h new file mode 100644 index 00000000000..a133e382e92 --- /dev/null +++ b/sys/arch/alpha/include/bus.old.h @@ -0,0 +1,219 @@ +/* $OpenBSD: bus.old.h,v 1.1 1996/11/12 20:29:27 niklas Exp $ */ +/* $NetBSD: bus.h,v 1.4 1996/06/11 21:16:21 cgd Exp $ */ + +/* + * Copyright (c) 1996 Carnegie-Mellon University. + * All rights reserved. + * + * Author: Chris G. Demetriou + * + * Permission to use, copy, modify and distribute this software and + * its documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND + * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie the + * rights to redistribute these changes. + */ + +#ifndef _ALPHA_BUS_H_ +#define _ALPHA_BUS_H_ + +/* + * I/O addresses (in bus space) + */ +typedef u_long bus_io_addr_t; +typedef u_long bus_io_size_t; + +/* + * Memory addresses (in bus space) + */ +typedef u_long bus_mem_addr_t; +typedef u_long bus_mem_size_t; + +/* + * Access methods for bus resources, I/O space, and memory space. + */ +typedef struct alpha_bus_chipset *bus_chipset_tag_t; +typedef u_long bus_io_handle_t; +typedef u_long bus_mem_handle_t; + +struct alpha_bus_chipset { + /* I/O-space cookie */ + void *bc_i_v; + + /* I/O-space control functions */ + int (*bc_i_map) __P((void *v, bus_io_addr_t port, + bus_io_size_t size, bus_io_handle_t *iohp)); + void (*bc_i_unmap) __P((void *v, bus_io_handle_t ioh, + bus_io_size_t size)); + int (*bc_i_subregion) __P((void *v, bus_io_handle_t ioh, + bus_io_size_t offset, bus_io_size_t size, + bus_io_handle_t *nioh)); + + /* I/O-space read functions */ + u_int8_t (*bc_ir1) __P((void *v, bus_io_handle_t ioh, + bus_io_size_t off)); + u_int16_t (*bc_ir2) __P((void *v, bus_io_handle_t ioh, + bus_io_size_t off)); + u_int32_t (*bc_ir4) __P((void *v, bus_io_handle_t ioh, + bus_io_size_t off)); + u_int64_t (*bc_ir8) __P((void *v, bus_io_handle_t ioh, + bus_io_size_t off)); + + /* I/O-space read-multiple functions */ + void (*bc_irm1) __P((void *v, bus_io_handle_t ioh, + bus_io_size_t off, u_int8_t *addr, + bus_io_size_t count)); + void (*bc_irm2) __P((void *v, bus_io_handle_t ioh, + bus_io_size_t off, u_int16_t *addr, + bus_io_size_t count)); + void (*bc_irm4) __P((void *v, bus_io_handle_t ioh, + bus_io_size_t off, u_int32_t *addr, + bus_io_size_t count)); + void (*bc_irm8) __P((void *v, bus_io_handle_t ioh, + bus_io_size_t off, u_int64_t *addr, + bus_io_size_t count)); + + /* I/O-space write functions */ + void (*bc_iw1) __P((void *v, bus_io_handle_t ioh, + bus_io_size_t off, u_int8_t val)); + void (*bc_iw2) __P((void *v, bus_io_handle_t ioh, + bus_io_size_t off, u_int16_t val)); + void (*bc_iw4) __P((void *v, bus_io_handle_t ioh, + bus_io_size_t off, u_int32_t val)); + void (*bc_iw8) __P((void *v, bus_io_handle_t ioh, + bus_io_size_t off, u_int64_t val)); + + /* I/O-space write-multiple functions */ + void (*bc_iwm1) __P((void *v, bus_io_handle_t ioh, + bus_io_size_t off, const u_int8_t *addr, + bus_io_size_t count)); + void (*bc_iwm2) __P((void *v, bus_io_handle_t ioh, + bus_io_size_t off, const u_int16_t *addr, + bus_io_size_t count)); + void (*bc_iwm4) __P((void *v, bus_io_handle_t ioh, + bus_io_size_t off, const u_int32_t *addr, + bus_io_size_t count)); + void (*bc_iwm8) __P((void *v, bus_io_handle_t ioh, + bus_io_size_t off, const u_int64_t *addr, + bus_io_size_t count)); + + /* Mem-space cookie */ + void *bc_m_v; + + /* Mem-space control functions */ + int (*bc_m_map) __P((void *v, bus_mem_addr_t buspa, + bus_mem_size_t size, int cacheable, + bus_mem_handle_t *mhp)); + void (*bc_m_unmap) __P((void *v, bus_mem_handle_t mh, + bus_mem_size_t size)); + int (*bc_m_subregion) __P((void *v, bus_mem_handle_t memh, + bus_mem_size_t offset, bus_mem_size_t size, + bus_mem_handle_t *nmemh)); + + /* Mem-space read functions */ + u_int8_t (*bc_mr1) __P((void *v, bus_mem_handle_t memh, + bus_mem_size_t off)); + u_int16_t (*bc_mr2) __P((void *v, bus_mem_handle_t memh, + bus_mem_size_t off)); + u_int32_t (*bc_mr4) __P((void *v, bus_mem_handle_t memh, + bus_mem_size_t off)); + u_int64_t (*bc_mr8) __P((void *v, bus_mem_handle_t memh, + bus_mem_size_t off)); + + /* Mem-space write functions */ + void (*bc_mw1) __P((void *v, bus_mem_handle_t memh, + bus_mem_size_t off, u_int8_t val)); + void (*bc_mw2) __P((void *v, bus_mem_handle_t memh, + bus_mem_size_t off, u_int16_t val)); + void (*bc_mw4) __P((void *v, bus_mem_handle_t memh, + bus_mem_size_t off, u_int32_t val)); + void (*bc_mw8) __P((void *v, bus_mem_handle_t memh, + bus_mem_size_t off, u_int64_t val)); + + /* XXX THIS DOES NOT YET BELONG HERE */ + vm_offset_t (*bc_XXX_dmamap) __P((void *addr)); +}; + +#define __bc_CONCAT(A,B) __CONCAT(A,B) +#define __bc_ABC(A,B,C) __bc_CONCAT(A,__bc_CONCAT(B,C)) +#define __bc_ABCD(A,B,C,D) __bc_CONCAT(__bc_ABC(A,B,C),D) + +#define __bc_rd(t, h, o, sz, sp) \ + (*(t)->__bc_ABCD(bc_,sp,r,sz))((t)->__bc_ABC(bc_,sp,_v), h, o) + +#define __bc_wr(t, h, o, v, sz, sp) \ + (*(t)->__bc_ABCD(bc_,sp,w,sz))((t)->__bc_ABC(bc_,sp,_v), h, o, v) + +#define bus_io_map(t, port, size, iohp) \ + (*(t)->bc_i_map)((t)->bc_i_v, (port), (size), (iohp)) +#define bus_io_unmap(t, ioh, size) \ + (*(t)->bc_i_unmap)((t)->bc_i_v, (ioh), (size)) +#define bus_io_subregion(t, ioh, offset, size, nioh) \ + (*(t)->bc_i_unmap)((t)->bc_i_v, (ioh), (offset), (size), (nioh)) + +#define __bc_io_multi(t, h, o, a, s, dir, sz) \ + (*(t)->__bc_ABCD(bc_i,dir,m,sz))((t)->bc_i_v, h, o, a, s) + +#define bus_io_read_1(t, h, o) __bc_rd((t),(h),(o),1,i) +#define bus_io_read_2(t, h, o) __bc_rd((t),(h),(o),2,i) +#define bus_io_read_4(t, h, o) __bc_rd((t),(h),(o),4,i) +#define bus_io_read_8(t, h, o) __bc_rd((t),(h),(o),8,i) + +#define bus_io_read_multi_1(t, h, o, a, s) \ + __bc_io_multi((t),(h),(o),(a),(s),r,1) +#define bus_io_read_multi_2(t, h, o, a, s) \ + __bc_io_multi((t),(h),(o),(a),(s),r,2) +#define bus_io_read_multi_4(t, h, o, a, s) \ + __bc_io_multi((t),(h),(o),(a),(s),r,4) +#define bus_io_read_multi_8(t, h, o, a, s) \ + __bc_io_multi((t),(h),(o),(a),(s),r,8) + +#define bus_io_write_1(t, h, o, v) __bc_wr((t),(h),(o),(v),1,i) +#define bus_io_write_2(t, h, o, v) __bc_wr((t),(h),(o),(v),2,i) +#define bus_io_write_4(t, h, o, v) __bc_wr((t),(h),(o),(v),4,i) +#define bus_io_write_8(t, h, o, v) __bc_wr((t),(h),(o),(v),8,i) + +#define bus_io_write_multi_1(t, h, o, a, s) \ + __bc_io_multi((t),(h),(o),(a),(s),w,1) +#define bus_io_write_multi_2(t, h, o, a, s) \ + __bc_io_multi((t),(h),(o),(a),(s),w,2) +#define bus_io_write_multi_4(t, h, o, a, s) \ + __bc_io_multi((t),(h),(o),(a),(s),w,4) +#define bus_io_write_multi_8(t, h, o, a, s) \ + __bc_io_multi((t),(h),(o),(a),(s),w,8) + +#define bus_mem_map(t, bpa, size, cacheable, mhp) \ + (*(t)->bc_m_map)((t)->bc_m_v, (bpa), (size), (cacheable), (mhp)) +#define bus_mem_unmap(t, memh, size) \ + (*(t)->bc_m_unmap)((t)->bc_m_v, (memh), (size)) +#define bus_mem_subregion(t, memh, offset, size, nmemh) \ + (*(t)->bc_m_unmap)((t)->bc_i_v, (memh), (offset), (size), (nmemh)) + +#define bus_mem_read_1(t, h, o) __bc_rd((t),(h),(o),1,m) +#define bus_mem_read_2(t, h, o) __bc_rd((t),(h),(o),2,m) +#define bus_mem_read_4(t, h, o) __bc_rd((t),(h),(o),4,m) +#define bus_mem_read_8(t, h, o) __bc_rd((t),(h),(o),8,m) + +#define bus_mem_write_1(t, h, o, v) __bc_wr((t),(h),(o),(v),1,m) +#define bus_mem_write_2(t, h, o, v) __bc_wr((t),(h),(o),(v),2,m) +#define bus_mem_write_4(t, h, o, v) __bc_wr((t),(h),(o),(v),4,m) +#define bus_mem_write_8(t, h, o, v) __bc_wr((t),(h),(o),(v),8,m) + +/* XXX THIS DOES NOT BELONG HERE YET. */ +#define __alpha_bus_XXX_dmamap(t, va) (*(t)->bc_XXX_dmamap)((va)) + +#endif /* _ALPHA_BUS_H_ */ diff --git a/sys/arch/alpha/isa/mcclock_isa.c b/sys/arch/alpha/isa/mcclock_isa.c index 11667b25338..69ec713f3e4 100644 --- a/sys/arch/alpha/isa/mcclock_isa.c +++ b/sys/arch/alpha/isa/mcclock_isa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mcclock_isa.c,v 1.3 1996/10/30 22:39:39 niklas Exp $ */ +/* $OpenBSD: mcclock_isa.c,v 1.4 1996/11/12 20:29:31 niklas Exp $ */ /* $NetBSD: mcclock_isa.c,v 1.2 1996/04/17 22:22:46 cgd Exp $ */ /* @@ -33,7 +33,7 @@ #include <sys/systm.h> #include <sys/device.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <alpha/alpha/clockvar.h> #include <alpha/alpha/mcclockvar.h> diff --git a/sys/arch/alpha/isa/pckbd.c b/sys/arch/alpha/isa/pckbd.c index f43a4961137..481c707ec84 100644 --- a/sys/arch/alpha/isa/pckbd.c +++ b/sys/arch/alpha/isa/pckbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pckbd.c,v 1.6 1996/10/30 22:39:40 niklas Exp $ */ +/* $OpenBSD: pckbd.c,v 1.7 1996/11/12 20:29:32 niklas Exp $ */ /* $NetBSD: pckbd.c,v 1.9 1996/10/13 02:59:56 christos Exp $ */ /*- @@ -54,7 +54,7 @@ #include <sys/device.h> #include <machine/intr.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <dev/isa/isareg.h> #include <dev/isa/isavar.h> diff --git a/sys/arch/alpha/pci/apecs_lca_bus_io.c b/sys/arch/alpha/pci/apecs_lca_bus_io.c index 8b2fa459a34..cb38a68f56c 100644 --- a/sys/arch/alpha/pci/apecs_lca_bus_io.c +++ b/sys/arch/alpha/pci/apecs_lca_bus_io.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apecs_lca_bus_io.c,v 1.3 1996/10/30 22:39:48 niklas Exp $ */ +/* $OpenBSD: apecs_lca_bus_io.c,v 1.4 1996/11/12 20:29:33 niklas Exp $ */ /* $NetBSD: apecs_lca_bus_io.c,v 1.4 1996/08/27 16:29:23 cgd Exp $ */ /* @@ -35,7 +35,7 @@ #include <sys/device.h> #include <vm/vm.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <alpha/pci/apecsreg.h> #include <alpha/pci/lcareg.h> diff --git a/sys/arch/alpha/pci/apecs_lca_bus_mem.c b/sys/arch/alpha/pci/apecs_lca_bus_mem.c index e06744504ac..e0d00e83b6e 100644 --- a/sys/arch/alpha/pci/apecs_lca_bus_mem.c +++ b/sys/arch/alpha/pci/apecs_lca_bus_mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apecs_lca_bus_mem.c,v 1.3 1996/10/30 22:39:48 niklas Exp $ */ +/* $OpenBSD: apecs_lca_bus_mem.c,v 1.4 1996/11/12 20:29:34 niklas Exp $ */ /* $NetBSD: apecs_lca_bus_mem.c,v 1.5 1996/08/27 16:29:24 cgd Exp $ */ /* @@ -35,7 +35,7 @@ #include <sys/device.h> #include <vm/vm.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <alpha/pci/apecsreg.h> #include <alpha/pci/lcareg.h> diff --git a/sys/arch/alpha/pci/cia_bus_io.c b/sys/arch/alpha/pci/cia_bus_io.c index 75f7d27fc1e..6623986cfa0 100644 --- a/sys/arch/alpha/pci/cia_bus_io.c +++ b/sys/arch/alpha/pci/cia_bus_io.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cia_bus_io.c,v 1.3 1996/10/30 22:39:54 niklas Exp $ */ +/* $OpenBSD: cia_bus_io.c,v 1.4 1996/11/12 20:29:35 niklas Exp $ */ /* $NetBSD: cia_bus_io.c,v 1.5 1996/08/27 16:29:25 cgd Exp $ */ /* @@ -35,7 +35,7 @@ #include <sys/device.h> #include <vm/vm.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <alpha/pci/ciareg.h> #include <alpha/pci/ciavar.h> diff --git a/sys/arch/alpha/pci/cia_bus_mem.c b/sys/arch/alpha/pci/cia_bus_mem.c index 47d83a467fc..2293e001d09 100644 --- a/sys/arch/alpha/pci/cia_bus_mem.c +++ b/sys/arch/alpha/pci/cia_bus_mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cia_bus_mem.c,v 1.3 1996/10/30 22:39:55 niklas Exp $ */ +/* $OpenBSD: cia_bus_mem.c,v 1.4 1996/11/12 20:29:36 niklas Exp $ */ /* $NetBSD: cia_bus_mem.c,v 1.5 1996/08/27 16:29:26 cgd Exp $ */ /* @@ -35,7 +35,7 @@ #include <sys/device.h> #include <vm/vm.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <alpha/pci/ciareg.h> #include <alpha/pci/ciavar.h> diff --git a/sys/arch/alpha/pci/pci_2100_a50.c b/sys/arch/alpha/pci/pci_2100_a50.c index 1fa315bd8ae..01cacb4fb4b 100644 --- a/sys/arch/alpha/pci/pci_2100_a50.c +++ b/sys/arch/alpha/pci/pci_2100_a50.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_2100_a50.c,v 1.7 1996/10/30 22:40:03 niklas Exp $ */ +/* $OpenBSD: pci_2100_a50.c,v 1.8 1996/11/12 20:29:37 niklas Exp $ */ /* $NetBSD: pci_2100_a50.c,v 1.10 1996/10/13 03:00:09 christos Exp $ */ /* @@ -37,7 +37,7 @@ #include <vm/vm.h> #include <machine/autoconf.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/intr.h> #include <dev/isa/isavar.h> diff --git a/sys/arch/alpha/pci/pci_axppci_33.c b/sys/arch/alpha/pci/pci_axppci_33.c index 2cf58634136..2808568bb69 100644 --- a/sys/arch/alpha/pci/pci_axppci_33.c +++ b/sys/arch/alpha/pci/pci_axppci_33.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_axppci_33.c,v 1.6 1996/10/30 22:40:05 niklas Exp $ */ +/* $OpenBSD: pci_axppci_33.c,v 1.7 1996/11/12 20:29:38 niklas Exp $ */ /* $NetBSD: pci_axppci_33.c,v 1.8 1996/10/13 03:00:11 christos Exp $ */ /* @@ -37,7 +37,7 @@ #include <vm/vm.h> #include <machine/autoconf.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/intr.h> #include <dev/isa/isavar.h> diff --git a/sys/arch/alpha/pci/sio.c b/sys/arch/alpha/pci/sio.c index 0923402ac7f..4dfca1d5e64 100644 --- a/sys/arch/alpha/pci/sio.c +++ b/sys/arch/alpha/pci/sio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sio.c,v 1.5 1996/10/30 22:40:14 niklas Exp $ */ +/* $OpenBSD: sio.c,v 1.6 1996/11/12 20:29:39 niklas Exp $ */ /* $NetBSD: sio.c,v 1.11 1996/10/13 03:00:18 christos Exp $ */ /* @@ -34,7 +34,7 @@ #include <sys/device.h> #include <machine/intr.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <dev/isa/isavar.h> #include <dev/eisa/eisavar.h> diff --git a/sys/arch/alpha/pci/sio_pic.c b/sys/arch/alpha/pci/sio_pic.c index 0a6952ea2a3..2eb744515ab 100644 --- a/sys/arch/alpha/pci/sio_pic.c +++ b/sys/arch/alpha/pci/sio_pic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sio_pic.c,v 1.6 1996/10/30 22:40:15 niklas Exp $ */ +/* $OpenBSD: sio_pic.c,v 1.7 1996/11/12 20:29:39 niklas Exp $ */ /* $NetBSD: sio_pic.c,v 1.13 1996/10/13 03:00:20 christos Exp $ */ /* @@ -35,7 +35,7 @@ #include <sys/syslog.h> #include <machine/intr.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <dev/isa/isareg.h> #include <dev/isa/isavar.h> diff --git a/sys/arch/alpha/pci/tga.c b/sys/arch/alpha/pci/tga.c index 7f5b1a12560..ac4f6d976dd 100644 --- a/sys/arch/alpha/pci/tga.c +++ b/sys/arch/alpha/pci/tga.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tga.c,v 1.5 1996/10/30 22:40:19 niklas Exp $ */ +/* $OpenBSD: tga.c,v 1.6 1996/11/12 20:29:41 niklas Exp $ */ /* $NetBSD: tga.c,v 1.10 1996/10/13 03:00:22 christos Exp $ */ /* @@ -37,7 +37,7 @@ #include <sys/conf.h> #include <sys/ioctl.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/intr.h> #include <dev/pci/pcireg.h> diff --git a/sys/arch/alpha/tc/cfb.c b/sys/arch/alpha/tc/cfb.c index 0f78f75e769..b415f314504 100644 --- a/sys/arch/alpha/tc/cfb.c +++ b/sys/arch/alpha/tc/cfb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cfb.c,v 1.3 1996/10/30 22:41:01 niklas Exp $ */ +/* $OpenBSD: cfb.c,v 1.4 1996/11/12 20:29:42 niklas Exp $ */ /* $NetBSD: cfb.c,v 1.5 1996/10/13 03:00:27 christos Exp $ */ /* @@ -37,7 +37,7 @@ #include <sys/conf.h> #include <sys/ioctl.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/intr.h> #include <dev/tc/tcvar.h> diff --git a/sys/arch/alpha/tc/sfb.c b/sys/arch/alpha/tc/sfb.c index 1d6abccf59b..16c14521d80 100644 --- a/sys/arch/alpha/tc/sfb.c +++ b/sys/arch/alpha/tc/sfb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sfb.c,v 1.3 1996/10/30 22:41:14 niklas Exp $ */ +/* $OpenBSD: sfb.c,v 1.4 1996/11/12 20:29:43 niklas Exp $ */ /* $NetBSD: sfb.c,v 1.5 1996/10/13 03:00:35 christos Exp $ */ /* @@ -37,7 +37,7 @@ #include <sys/conf.h> #include <sys/ioctl.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/intr.h> #include <dev/tc/tcvar.h> diff --git a/sys/arch/alpha/tc/tc_bus_io.c b/sys/arch/alpha/tc/tc_bus_io.c index 731d237b820..ad0ff6f5dc6 100644 --- a/sys/arch/alpha/tc/tc_bus_io.c +++ b/sys/arch/alpha/tc/tc_bus_io.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tc_bus_io.c,v 1.3 1996/10/30 22:41:20 niklas Exp $ */ +/* $OpenBSD: tc_bus_io.c,v 1.4 1996/11/12 20:29:44 niklas Exp $ */ /* $NetBSD: tc_bus_io.c,v 1.3 1996/07/09 00:55:31 cgd Exp $ */ /* @@ -40,7 +40,7 @@ #include <sys/device.h> #include <vm/vm.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <dev/tc/tcvar.h> int tc_io_map __P((void *, bus_io_addr_t, bus_io_size_t, diff --git a/sys/arch/alpha/tc/tc_bus_mem.c b/sys/arch/alpha/tc/tc_bus_mem.c index 558dd764c0f..90087369d6c 100644 --- a/sys/arch/alpha/tc/tc_bus_mem.c +++ b/sys/arch/alpha/tc/tc_bus_mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tc_bus_mem.c,v 1.3 1996/10/30 22:41:21 niklas Exp $ */ +/* $OpenBSD: tc_bus_mem.c,v 1.4 1996/11/12 20:29:45 niklas Exp $ */ /* $NetBSD: tc_bus_mem.c,v 1.7 1996/07/09 00:55:33 cgd Exp $ */ /* @@ -39,7 +39,7 @@ #include <sys/device.h> #include <vm/vm.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <dev/tc/tcvar.h> int tc_mem_map __P((void *, bus_mem_addr_t, bus_mem_size_t, diff --git a/sys/arch/amiga/include/bus.old.h b/sys/arch/amiga/include/bus.old.h new file mode 100644 index 00000000000..6e4dc4a5560 --- /dev/null +++ b/sys/arch/amiga/include/bus.old.h @@ -0,0 +1,198 @@ +/* $OpenBSD: bus.old.h,v 1.1 1996/11/12 20:29:46 niklas Exp $ */ + +/* + * Copyright (c) 1996 Niklas Hallqvist. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the Niklas Hallqvist. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef _MACHINE_BUS_H_ +#define _MACHINE_BUS_H_ + +/* I/O access types. */ +typedef u_long bus_io_addr_t; +typedef u_long bus_io_size_t; +typedef u_long bus_io_handle_t; + +/* Memory access types. */ +typedef u_long bus_mem_addr_t; +typedef u_long bus_mem_size_t; +typedef u_long bus_mem_handle_t; + +/* + * The big switch, that delegates each bus operation to the right + * implementation. + */ +typedef struct amiga_bus_chipset *bus_chipset_tag_t; + +struct amiga_bus_chipset { + void *bc_data; + + int (*bc_io_map)(bus_chipset_tag_t, bus_io_addr_t, bus_io_size_t, + bus_io_handle_t *); + int (*bc_io_unmap)(bus_io_handle_t, bus_io_size_t); + + u_int8_t (*bc_io_read_1)(bus_io_handle_t, bus_io_size_t); + u_int16_t (*bc_io_read_2)(bus_io_handle_t, bus_io_size_t); + u_int32_t (*bc_io_read_4)(bus_io_handle_t, bus_io_size_t); + u_int64_t (*bc_io_read_8)(bus_io_handle_t, bus_io_size_t); + + void (*bc_io_read_multi_1)(bus_io_handle_t, bus_io_size_t, + u_int8_t *, bus_io_size_t); + void (*bc_io_read_multi_2)(bus_io_handle_t, bus_io_size_t, + u_int16_t *, bus_io_size_t); + void (*bc_io_read_multi_4)(bus_io_handle_t, bus_io_size_t, + u_int32_t *, bus_io_size_t); + void (*bc_io_read_multi_8)(bus_io_handle_t, bus_io_size_t, + u_int64_t *, bus_io_size_t); + + void (*bc_io_write_1)(bus_io_handle_t, bus_io_size_t, u_int8_t); + void (*bc_io_write_2)(bus_io_handle_t, bus_io_size_t, u_int16_t); + void (*bc_io_write_4)(bus_io_handle_t, bus_io_size_t, u_int32_t); + void (*bc_io_write_8)(bus_io_handle_t, bus_io_size_t, u_int64_t); + + void (*bc_io_write_multi_1)(bus_io_handle_t, bus_io_size_t, + const u_int8_t *, bus_io_size_t); + void (*bc_io_write_multi_2)(bus_io_handle_t, bus_io_size_t, + const u_int16_t *, bus_io_size_t); + void (*bc_io_write_multi_4)(bus_io_handle_t, bus_io_size_t, + const u_int32_t *, bus_io_size_t); + void (*bc_io_write_multi_8)(bus_io_handle_t, bus_io_size_t, + const u_int64_t *, bus_io_size_t); + + int (*bc_mem_map)(bus_chipset_tag_t, bus_mem_addr_t, + bus_mem_size_t, int, bus_mem_handle_t *); + int (*bc_mem_unmap)(bus_mem_handle_t, bus_mem_size_t); + + u_int8_t (*bc_mem_read_1)(bus_mem_handle_t, bus_mem_size_t); + u_int16_t (*bc_mem_read_2)(bus_mem_handle_t, bus_mem_size_t); + u_int32_t (*bc_mem_read_4)(bus_mem_handle_t, bus_mem_size_t); + u_int64_t (*bc_mem_read_8)(bus_mem_handle_t, bus_mem_size_t); + + void (*bc_mem_write_1)(bus_mem_handle_t, bus_mem_size_t, u_int8_t); + void (*bc_mem_write_2)(bus_mem_handle_t, bus_mem_size_t, u_int16_t); + void (*bc_mem_write_4)(bus_mem_handle_t, bus_mem_size_t, u_int32_t); + void (*bc_mem_write_8)(bus_mem_handle_t, bus_mem_size_t, u_int64_t); + + /* These are extensions to the general NetBSD bus interface. */ + void (*bc_io_read_raw_multi_2)(bus_io_handle_t, bus_io_size_t, + u_int8_t *, bus_io_size_t); + void (*bc_io_read_raw_multi_4)(bus_io_handle_t, bus_io_size_t, + u_int8_t *, bus_io_size_t); + void (*bc_io_read_raw_multi_8)(bus_io_handle_t, bus_io_size_t, + u_int8_t *, bus_io_size_t); + + void (*bc_io_write_raw_multi_2)(bus_io_handle_t, bus_io_size_t, + const u_int8_t *, bus_io_size_t); + void (*bc_io_write_raw_multi_4)(bus_io_handle_t, bus_io_size_t, + const u_int8_t *, bus_io_size_t); + void (*bc_io_write_raw_multi_8)(bus_io_handle_t, bus_io_size_t, + const u_int8_t *, bus_io_size_t); +}; + +#define bus_io_map(t, port, size, iohp) \ + (*(t)->bc_io_map)((t), (port), (size), (iohp)) +#define bus_io_unmap(t, iohp, size) \ + (*(t)->bc_io_unmap)((iohp), (size)) + +#define bus_io_read_1(t, h, o) \ + (*(t)->bc_io_read_1)((h), (o)) +#define bus_io_read_2(t, h, o) \ + (*(t)->bc_io_read_2)((h), (o)) +#define bus_io_read_4(t, h, o) \ + (*(t)->bc_io_read_4)((h), (o)) +#define bus_io_read_8(t, h, o) \ + (*(t)->bc_io_read_8)((h), (o)) + +#define bus_io_read_multi_1(t, h, o, a, s) \ + (*(t)->bc_io_read_multi_1)((h), (o), (a), (s)) +#define bus_io_read_multi_2(t, h, o, a, s) \ + (*(t)->bc_io_read_multi_2)((h), (o), (a), (s)) +#define bus_io_read_multi_4(t, h, o, a, s) \ + (*(t)->bc_io_read_multi_4)((h), (o), (a), (s)) +#define bus_io_read_multi_8(t, h, o, a, s) \ + (*(t)->bc_io_read_multi_8)((h), (o), (a), (s)) + +#define bus_io_write_1(t, h, o, v) \ + (*(t)->bc_io_write_1)((h), (o), (v)) +#define bus_io_write_2(t, h, o, v) \ + (*(t)->bc_io_write_2)((h), (o), (v)) +#define bus_io_write_4(t, h, o, v) \ + (*(t)->bc_io_write_4)((h), (o), (v)) +#define bus_io_write_8(t, h, o, v) \ + (*(t)->bc_io_write_8)((h), (o), (v)) + +#define bus_io_write_multi_1(t, h, o, a, s) \ + (*(t)->bc_io_write_multi_1)((h), (o), (a), (s)) +#define bus_io_write_multi_2(t, h, o, a, s) \ + (*(t)->bc_io_write_multi_2)((h), (o), (a), (s)) +#define bus_io_write_multi_4(t, h, o, a, s) \ + (*(t)->bc_io_write_multi_4)((h), (o), (a), (s)) +#define bus_io_write_multi_8(t, h, o, a, s) \ + (*(t)->bc_io_write_multi_8)((h), (o), (a), (s)) + +#define bus_mem_map(t, port, size, cacheable, mhp) \ + (*(t)->bc_mem_map)((t), (port), (size), (cacheable), (mhp)) +#define bus_mem_unmap(t, mhp, size) \ + (*(t)->bc_mem_unmap)((mhp), (size)) + +#define bus_mem_read_1(t, h, o) \ + (*(t)->bc_mem_read_1)((h), (o)) +#define bus_mem_read_2(t, h, o) \ + (*(t)->bc_mem_read_2)((h), (o)) +#define bus_mem_read_4(t, h, o) \ + (*(t)->bc_mem_read_4)((h), (o)) +#define bus_mem_read_8(t, h, o) \ + (*(t)->bc_mem_read_8)((h), (o)) + +#define bus_mem_write_1(t, h, o, v) \ + (*(t)->bc_mem_write_1)((h), (o), (v)) +#define bus_mem_write_2(t, h, o, v) \ + (*(t)->bc_mem_write_2)((h), (o), (v)) +#define bus_mem_write_4(t, h, o, v) \ + (*(t)->bc_mem_write_4)((h), (o), (v)) +#define bus_mem_write_8(t, h, o, v) \ + (*(t)->bc_mem_write_8)((h), (o), (v)) + +/* OpenBSD extensions */ +#define bus_io_read_raw_multi_2(t, h, o, a, s) \ + (*(t)->bc_io_read_raw_multi_2)((h), (o), (a), (s)) +#define bus_io_read_raw_multi_4(t, h, o, a, s) \ + (*(t)->bc_io_read_raw_multi_4)((h), (o), (a), (s)) +#define bus_io_read_raw_multi_8(t, h, o, a, s) \ + (*(t)->bc_io_read_raw_multi_8)((h), (o), (a), (s)) + +#define bus_io_write_raw_multi_2(t, h, o, a, s) \ + (*(t)->bc_io_write_raw_multi_2)((h), (o), (a), (s)) +#define bus_io_write_raw_multi_4(t, h, o, a, s) \ + (*(t)->bc_io_write_raw_multi_4)((h), (o), (a), (s)) +#define bus_io_write_raw_multi_8(t, h, o, a, s) \ + (*(t)->bc_io_write_raw_multi_8)((h), (o), (a), (s)) + +#endif /* _MACHINE_BUS_H_ */ diff --git a/sys/arch/amiga/isa/cross.c b/sys/arch/amiga/isa/cross.c index 22f5fded230..00bd72a2f25 100644 --- a/sys/arch/amiga/isa/cross.c +++ b/sys/arch/amiga/isa/cross.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cross.c,v 1.5 1996/08/04 01:30:48 niklas Exp $ */ +/* $OpenBSD: cross.c,v 1.6 1996/11/12 20:29:47 niklas Exp $ */ /* * Copyright (c) 1994, 1996 Niklas Hallqvist, Carsten Hammer @@ -37,7 +37,7 @@ #include <sys/syslog.h> #include <sys/systm.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/cpu.h> #include <machine/intr.h> diff --git a/sys/arch/amiga/isa/ggbus.c b/sys/arch/amiga/isa/ggbus.c index 7864220395a..f3dd8323a55 100644 --- a/sys/arch/amiga/isa/ggbus.c +++ b/sys/arch/amiga/isa/ggbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ggbus.c,v 1.5 1996/08/04 01:30:49 niklas Exp $ */ +/* $OpenBSD: ggbus.c,v 1.6 1996/11/12 20:29:49 niklas Exp $ */ /* * Copyright (c) 1994, 1995, 1996 Niklas Hallqvist @@ -37,7 +37,7 @@ #include <sys/syslog.h> #include <sys/systm.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/cpu.h> #include <machine/intr.h> diff --git a/sys/arch/amiga/isa/if_isaed.c b/sys/arch/amiga/isa/if_isaed.c index ab7c1149f0e..fbc720e52fc 100644 --- a/sys/arch/amiga/isa/if_isaed.c +++ b/sys/arch/amiga/isa/if_isaed.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_isaed.c,v 1.12 1996/10/05 00:08:41 niklas Exp $ */ +/* $OpenBSD: if_isaed.c,v 1.13 1996/11/12 20:29:51 niklas Exp $ */ /* * Derived from sys/dev/isa/if_ed.c: @@ -53,7 +53,7 @@ #endif #include <machine/cpu.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/intr.h> #include <dev/isa/isareg.h> diff --git a/sys/arch/arc/dev/ace.c b/sys/arch/arc/dev/ace.c index 6820a2e9b39..f5e22feb9a9 100644 --- a/sys/arch/arc/dev/ace.c +++ b/sys/arch/arc/dev/ace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ace.c,v 1.6 1996/09/14 15:58:21 pefo Exp $ */ +/* $OpenBSD: ace.c,v 1.7 1996/11/12 20:29:53 niklas Exp $ */ /* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */ /*- @@ -58,7 +58,7 @@ #include <sys/device.h> #include <arc/arc/arctype.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/intr.h> #include <dev/isa/isavar.h> diff --git a/sys/arch/arc/dev/lpr.c b/sys/arch/arc/dev/lpr.c index 7f84a7b96b6..6c5e6d61d7c 100644 --- a/sys/arch/arc/dev/lpr.c +++ b/sys/arch/arc/dev/lpr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lpr.c,v 1.2 1996/09/14 15:58:21 pefo Exp $ */ +/* $OpenBSD: lpr.c,v 1.3 1996/11/12 20:29:54 niklas Exp $ */ /* * Copyright (c) 1993, 1994 Charles Hannum. @@ -65,7 +65,7 @@ #include <sys/conf.h> #include <sys/syslog.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/intr.h> #include <dev/isa/isavar.h> diff --git a/sys/arch/arc/include/bus.old.h b/sys/arch/arc/include/bus.old.h new file mode 100644 index 00000000000..fbf8f293bab --- /dev/null +++ b/sys/arch/arc/include/bus.old.h @@ -0,0 +1,140 @@ +/* $OpenBSD: bus.old.h,v 1.1 1996/11/12 20:29:56 niklas Exp $ */ + +/* + * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Christopher G. Demetriou + * for the NetBSD Project. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _ARC_BUS_H_ +#define _ARC_BUS_H_ + +#include <machine/autoconf.h> +#include <machine/pio.h> + +/* + * I/O addresses (in bus space) + */ +typedef u_long bus_io_addr_t; +typedef u_long bus_io_size_t; +typedef u_long bus_io_handle_t; + +/* + * Memory addresses (in bus space) + */ +typedef u_long bus_mem_addr_t; +typedef u_long bus_mem_size_t; +typedef caddr_t bus_mem_handle_t; + +/* + * Access methods for bus resources, I/O space, and memory space. + */ +typedef +struct arc_isa_busmap { + void *isa_io_base; + void *isa_mem_base; +} *bus_chipset_tag_t; + + +#define bus_io_map(t, port, size, iohp) \ + (*iohp = (t == NULL ? port : port + (ulong)(t->isa_io_base)), 0) +#define bus_io_unmap(t, ioh, size) + +#define bus_io_read_1(t, h, o) inb((h) + (o)) +#define bus_io_read_2(t, h, o) inw((h) + (o)) +#define bus_io_read_4(t, h, o) inl((h) + (o)) +#if 0 /* Cause a link error for bus_io_read_8 */ +#define bus_io_read_8(t, h, o) !!! bus_io_read_8 unimplemented !!! +#endif + +#define bus_io_read_multi_1(t, h, o, a, c) \ + insb((h) + (o), (a), (c)) +#define bus_io_read_multi_2(t, h, o, a, c) \ + insw((h) + (o), (a), (c)) +#define bus_io_read_multi_4(t, h, o, a, c) \ + insl((h) + (o), (a), (c)) +#if 0 /* Cause a link error for bus_io_read_multi_8 */ +#define bus_io_read_multi_8(t, h, o, a, c) \ + !!! bus_io_read_multi_8 unimplemented !!! +#endif + +#define bus_io_write_1(t, h, o, v) outb((h) + (o), (v)) +#define bus_io_write_2(t, h, o, v) outw((h) + (o), (v)) +#define bus_io_write_4(t, h, o, v) outl((h) + (o), (v)) +#if 0 /* Cause a link error for bus_io_write_8 */ +#define bus_io_write_8(t, h, o, v) !!! bus_io_write_8 unimplemented !!! +#endif + +#define bus_io_write_multi_1(t, h, o, a, c) \ + outsb((h) + (o), (a), (c)) +#define bus_io_write_multi_2(t, h, o, a, c) \ + outsw((h) + (o), (a), (c)) +#define bus_io_write_multi_4(t, h, o, a, c) \ + outsl((h) + (o), (a), (c)) +#if 0 /* Cause a link error for bus_io_write_multi_8 */ +#define bus_io_write_multi_8(t, h, o, a, c) \ + !!! bus_io_write_multi_8 unimplimented !!! +#endif + +#define bus_mem_map(t, addr, size, cacheable, mhp) \ + (*mhp = (bus_mem_handle_t)(t == NULL ? addr : addr + (ulong)(t->isa_mem_base)), 0) +#define bus_mem_unmap(t, ioh, size) + +#define bus_mem_read_1(t, h, o) (*(volatile u_int8_t *)((h) + (o))) +#define bus_mem_read_2(t, h, o) (*(volatile u_int16_t *)((h) + (o))) +#define bus_mem_read_4(t, h, o) (*(volatile u_int32_t *)((h) + (o))) +#define bus_mem_read_8(t, h, o) (*(volatile u_int64_t *)((h) + (o))) + +#define bus_mem_write_1(t, h, o, v) \ + ((void)(*(volatile u_int8_t *)((h) + (o)) = (v))) +#define bus_mem_write_2(t, h, o, v) \ + ((void)(*(volatile u_int16_t *)((h) + (o)) = (v))) +#define bus_mem_write_4(t, h, o, v) \ + ((void)(*(volatile u_int32_t *)((h) + (o)) = (v))) +#define bus_mem_write_8(t, h, o, v) \ + ((void)(*(volatile u_int64_t *)((h) + (o)) = (v))) + +/* These are extensions to the general NetBSD bus interface. */ +#define bus_io_read_raw_multi_2(t, h, o, a, c) \ + insw((h) + (o), (a), ((c) >> 1)) +#define bus_io_read_raw_multi_4(t, h, o, a, c) \ + insl((h) + (o), (a), ((c) >> 2)) +#if 0 /* Cause a link error for bus_io_read_raw_multi_8 */ +#define bus_io_read_raw_multi_8(t, h, o, a, c) \ + !!! bus_io_read_raw_multi_8 unimplemented !!! +#endif + +#define bus_io_write_raw_multi_2(t, h, o, a, c) \ + outsw((h) + (o), (a), ((c) >> 1)) +#define bus_io_write_raw_multi_4(t, h, o, a, c) \ + outsl((h) + (o), (a), ((c) >> 2)) +#if 0 /* Cause a link error for bus_io_write_raw_multi_8 */ +#define bus_io_write_raw_multi_8(t, h, o, a, c) \ + !!! bus_io_write_raw_multi_8 unimplimented !!! +#endif + +#endif /* _ARC_BUS_H_ */ diff --git a/sys/arch/i386/i386/mainbus.c b/sys/arch/i386/i386/mainbus.c index a7cfcf65def..a8b3951f0bd 100644 --- a/sys/arch/i386/i386/mainbus.c +++ b/sys/arch/i386/i386/mainbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mainbus.c,v 1.5 1996/05/30 09:30:08 deraadt Exp $ */ +/* $OpenBSD: mainbus.c,v 1.6 1996/11/12 20:29:57 niklas Exp $ */ /* $NetBSD: mainbus.c,v 1.8 1996/04/11 22:13:37 cgd Exp $ */ /* @@ -35,7 +35,7 @@ #include <sys/systm.h> #include <sys/device.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <dev/isa/isavar.h> #include <dev/eisa/eisavar.h> diff --git a/sys/arch/i386/include/bus.old.h b/sys/arch/i386/include/bus.old.h new file mode 100644 index 00000000000..93b8c496b1f --- /dev/null +++ b/sys/arch/i386/include/bus.old.h @@ -0,0 +1,135 @@ +/* $OpenBSD: bus.old.h,v 1.1 1996/11/12 20:29:58 niklas Exp $ */ +/* $NetBSD: bus.h,v 1.3 1996/05/03 19:22:18 christos Exp $ */ + +/* + * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Christopher G. Demetriou + * for the NetBSD Project. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _I386_BUS_H_ +#define _I386_BUS_H_ + +#include <machine/pio.h> + +/* + * I/O addresses (in bus space) + */ +typedef u_long bus_io_addr_t; +typedef u_long bus_io_size_t; + +/* + * Memory addresses (in bus space) + */ +typedef u_long bus_mem_addr_t; +typedef u_long bus_mem_size_t; + +/* + * Access methods for bus resources, I/O space, and memory space. + */ +typedef void *bus_chipset_tag_t; +typedef u_long bus_io_handle_t; +typedef caddr_t bus_mem_handle_t; + +#define bus_io_map(t, port, size, iohp) \ + ((void) t, *iohp = port, 0) +#define bus_io_unmap(t, ioh, size) + +#define bus_io_read_1(t, h, o) ((void) t, inb((h) + (o))) +#define bus_io_read_2(t, h, o) ((void) t, inw((h) + (o))) +#define bus_io_read_4(t, h, o) ((void) t, inl((h) + (o))) +#if 0 /* Cause a link error for bus_io_read_8 */ +#define bus_io_read_8(t, h, o) !!! bus_io_read_8 unimplemented !!! +#endif + +#define bus_io_read_multi_1(t, h, o, a, c) \ + ((void) t, insb((h) + (o), (a), (c))) +#define bus_io_read_multi_2(t, h, o, a, c) \ + ((void) t, insw((h) + (o), (a), (c))) +#define bus_io_read_multi_4(t, h, o, a, c) \ + ((void) t, insl((h) + (o), (a), (c))) +#if 0 /* Cause a link error for bus_io_read_multi_8 */ +#define bus_io_read_multi_8(t, h, o, a, c) \ + !!! bus_io_read_multi_8 unimplemented !!! +#endif + +#define bus_io_write_1(t, h, o, v) ((void) t, outb((h) + (o), (v))) +#define bus_io_write_2(t, h, o, v) ((void) t, outw((h) + (o), (v))) +#define bus_io_write_4(t, h, o, v) ((void) t, outl((h) + (o), (v))) +#if 0 /* Cause a link error for bus_io_write_8 */ +#define bus_io_write_8(t, h, o, v) !!! bus_io_write_8 unimplemented !!! +#endif + +#define bus_io_write_multi_1(t, h, o, a, c) \ + ((void) t, outsb((h) + (o), (a), (c))) +#define bus_io_write_multi_2(t, h, o, a, c) \ + ((void) t, outsw((h) + (o), (a), (c))) +#define bus_io_write_multi_4(t, h, o, a, c) \ + ((void) t, outsl((h) + (o), (a), (c))) +#if 0 /* Cause a link error for bus_io_write_multi_8 */ +#define bus_io_write_multi_8(t, h, o, a, c) \ + !!! bus_io_write_multi_8 unimplimented !!! +#endif + +int bus_mem_map __P((bus_chipset_tag_t t, bus_mem_addr_t bpa, + bus_mem_size_t size, int cacheable, bus_mem_handle_t *mhp)); +void bus_mem_unmap __P((bus_chipset_tag_t t, bus_mem_handle_t memh, + bus_mem_size_t size)); + +#define bus_mem_read_1(t, h, o) ((void) t, (*(volatile u_int8_t *)((h) + (o)))) +#define bus_mem_read_2(t, h, o) ((void) t, (*(volatile u_int16_t *)((h) + (o)))) +#define bus_mem_read_4(t, h, o) ((void) t, (*(volatile u_int32_t *)((h) + (o)))) +#define bus_mem_read_8(t, h, o) ((void) t, (*(volatile u_int64_t *)((h) + (o)))) + +#define bus_mem_write_1(t, h, o, v) \ + ((void) t, ((void)(*(volatile u_int8_t *)((h) + (o)) = (v)))) +#define bus_mem_write_2(t, h, o, v) \ + ((void) t, ((void)(*(volatile u_int16_t *)((h) + (o)) = (v)))) +#define bus_mem_write_4(t, h, o, v) \ + ((void) t, ((void)(*(volatile u_int32_t *)((h) + (o)) = (v)))) +#define bus_mem_write_8(t, h, o, v) \ + ((void) t, ((void)(*(volatile u_int64_t *)((h) + (o)) = (v)))) + +#define bus_io_read_raw_multi_2(t, h, o, a, c) \ + ((void) t, insw((h) + (o), (a), (c) >> 1)) +#define bus_io_read_raw_multi_4(t, h, o, a, c) \ + ((void) t, insl((h) + (o), (a), (c) >> 2)) +#if 0 /* Cause a link error for bus_io_read_raw_multi_8 */ +#define bus_io_read_raw_multi_8(t, h, o, a, c) \ + !!! bus_io_read_multi_8 unimplemented !!! +#endif + +#define bus_io_write_raw_multi_2(t, h, o, a, c) \ + ((void) t, outsw((h) + (o), (a), (c) >> 1)) +#define bus_io_write_raw_multi_4(t, h, o, a, c) \ + ((void) t, outsl((h) + (o), (a), (c) >> 2)) +#if 0 /* Cause a link error for bus_io_write_raw_multi_8 */ +#define bus_io_write_raw_multi_8(t, h, o, a, c) \ + !!! bus_io_write_multi_8 unimplimented !!! +#endif + +#endif /* _I386_BUS_H_ */ diff --git a/sys/arch/i386/isa/ahc_isa.c b/sys/arch/i386/isa/ahc_isa.c index 3efe4ec3827..30bcb3a771f 100644 --- a/sys/arch/i386/isa/ahc_isa.c +++ b/sys/arch/i386/isa/ahc_isa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ahc_isa.c,v 1.1 1996/10/04 02:51:20 deraadt Exp $ */ +/* $OpenBSD: ahc_isa.c,v 1.2 1996/11/12 20:30:00 niklas Exp $ */ /* $NetBSD: ahc_isa.c,v 1.1 1996/08/05 21:14:29 soda Exp $ */ /* @@ -70,7 +70,7 @@ #include <sys/queue.h> #include <sys/malloc.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/intr.h> #include <scsi/scsi_all.h> diff --git a/sys/arch/i386/isa/lms.c b/sys/arch/i386/isa/lms.c index 6d8b997034c..13e56adaa9e 100644 --- a/sys/arch/i386/isa/lms.c +++ b/sys/arch/i386/isa/lms.c @@ -37,7 +37,7 @@ #include <sys/device.h> #include <machine/cpu.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/intr.h> #include <machine/mouse.h> #include <machine/conf.h> diff --git a/sys/arch/i386/isa/pccom.c b/sys/arch/i386/isa/pccom.c index cd819913d99..2beaeb78ba5 100644 --- a/sys/arch/i386/isa/pccom.c +++ b/sys/arch/i386/isa/pccom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pccom.c,v 1.5 1996/11/09 21:56:22 tholo Exp $ */ +/* $OpenBSD: pccom.c,v 1.6 1996/11/12 20:30:05 niklas Exp $ */ /* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */ /*- @@ -57,7 +57,7 @@ #include <sys/device.h> #include <machine/intr.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <dev/isa/isavar.h> #include <dev/isa/comreg.h> diff --git a/sys/dev/eisa/aha1742.c b/sys/dev/eisa/aha1742.c index bc0f6062431..0052eb1825b 100644 --- a/sys/dev/eisa/aha1742.c +++ b/sys/dev/eisa/aha1742.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aha1742.c,v 1.11 1996/10/16 12:38:05 deraadt Exp $ */ +/* $OpenBSD: aha1742.c,v 1.12 1996/11/12 20:30:07 niklas Exp $ */ /* $NetBSD: aha1742.c,v 1.61 1996/05/12 23:40:01 mycroft Exp $ */ /* @@ -59,7 +59,7 @@ #include <sys/proc.h> #include <sys/user.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/intr.h> #include <dev/eisa/eisareg.h> diff --git a/sys/dev/eisa/ahc_eisa.c b/sys/dev/eisa/ahc_eisa.c index 0f15cd9b2f0..1cdb81f6268 100644 --- a/sys/dev/eisa/ahc_eisa.c +++ b/sys/dev/eisa/ahc_eisa.c @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ahc_eisa.c,v 1.5 1996/10/16 12:38:07 deraadt Exp $ + * $Id: ahc_eisa.c,v 1.6 1996/11/12 20:30:08 niklas Exp $ */ #if defined(__FreeBSD__) @@ -46,7 +46,7 @@ #if defined(__NetBSD__) || defined(__OpenBSD__) #include <sys/device.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/intr.h> #endif /* defined(__NetBSD__) */ diff --git a/sys/dev/eisa/eisa.c b/sys/dev/eisa/eisa.c index a0ce33873cb..d774725cd31 100644 --- a/sys/dev/eisa/eisa.c +++ b/sys/dev/eisa/eisa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eisa.c,v 1.3 1996/05/05 12:42:23 deraadt Exp $ */ +/* $OpenBSD: eisa.c,v 1.4 1996/11/12 20:30:09 niklas Exp $ */ /* $NetBSD: eisa.c,v 1.11 1996/04/09 22:46:11 cgd Exp $ */ /* @@ -43,7 +43,7 @@ #include <sys/systm.h> #include <sys/device.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <dev/eisa/eisareg.h> #include <dev/eisa/eisavar.h> diff --git a/sys/dev/eisa/eisavar.h b/sys/dev/eisa/eisavar.h index 6b7b54ffe26..658ee4defcd 100644 --- a/sys/dev/eisa/eisavar.h +++ b/sys/dev/eisa/eisavar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: eisavar.h,v 1.4 1996/04/21 22:20:45 deraadt Exp $ */ +/* $OpenBSD: eisavar.h,v 1.5 1996/11/12 20:30:10 niklas Exp $ */ /* $NetBSD: eisavar.h,v 1.9 1996/04/12 06:34:36 cgd Exp $ */ /* @@ -43,7 +43,7 @@ * separated into eisa_machdep.h. */ -#include <machine/bus.h> +#include <machine/bus.old.h> #include <dev/eisa/eisareg.h> /* For ID register & string info. */ /* diff --git a/sys/dev/eisa/if_ep_eisa.c b/sys/dev/eisa/if_ep_eisa.c index 38692ddedd5..9520a12a16a 100644 --- a/sys/dev/eisa/if_ep_eisa.c +++ b/sys/dev/eisa/if_ep_eisa.c @@ -61,7 +61,7 @@ #endif #include <machine/cpu.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/intr.h> #include <dev/ic/elink3var.h> diff --git a/sys/dev/eisa/if_fea.c b/sys/dev/eisa/if_fea.c index 68d4852d4fd..49b7b5cd146 100644 --- a/sys/dev/eisa/if_fea.c +++ b/sys/dev/eisa/if_fea.c @@ -91,7 +91,7 @@ #include <i386/eisa/pdqreg.h> #elif defined(__NetBSD__) || defined(__OpenBSD__) #include <machine/cpu.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <dev/ic/pdqvar.h> #include <dev/ic/pdqreg.h> diff --git a/sys/dev/ic/aic7xxx.c b/sys/dev/ic/aic7xxx.c index d643af8d520..82c1d5bbaf9 100644 --- a/sys/dev/ic/aic7xxx.c +++ b/sys/dev/ic/aic7xxx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aic7xxx.c,v 1.11 1996/10/31 01:01:24 niklas Exp $ */ +/* $OpenBSD: aic7xxx.c,v 1.12 1996/11/12 20:30:15 niklas Exp $ */ /* * Generic driver for the aic7xxx based adaptec SCSI controllers @@ -118,7 +118,7 @@ #include <sys/systm.h> #if defined(__NetBSD__) || defined(__OpenBSD__) #include <sys/device.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/intr.h> #endif /* defined(__NetBSD__) */ diff --git a/sys/dev/ic/com.c b/sys/dev/ic/com.c index f37d5ce0a5d..7c06bfbed0e 100644 --- a/sys/dev/ic/com.c +++ b/sys/dev/ic/com.c @@ -1,4 +1,4 @@ -/* $OpenBSD: com.c,v 1.26 1996/11/09 21:50:43 tholo Exp $ */ +/* $OpenBSD: com.c,v 1.27 1996/11/12 20:30:27 niklas Exp $ */ /* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */ /*- @@ -57,7 +57,7 @@ #include <sys/types.h> #include <sys/device.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/intr.h> #include <dev/isa/isavar.h> diff --git a/sys/dev/ic/cy.c b/sys/dev/ic/cy.c index 14a17d9c091..96d56b7a0b7 100644 --- a/sys/dev/ic/cy.c +++ b/sys/dev/ic/cy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cy.c,v 1.3 1996/10/16 12:38:16 deraadt Exp $ */ +/* $OpenBSD: cy.c,v 1.4 1996/11/12 20:30:17 niklas Exp $ */ /* * cy.c @@ -46,7 +46,7 @@ #include <sys/malloc.h> #include <sys/systm.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/intr.h> #if NCY_ISA > 0 diff --git a/sys/dev/ic/elink3.c b/sys/dev/ic/elink3.c index 6134e69697f..2732699b22c 100644 --- a/sys/dev/ic/elink3.c +++ b/sys/dev/ic/elink3.c @@ -1,4 +1,4 @@ -/* $OpenBSD: elink3.c,v 1.14 1996/10/31 01:01:28 niklas Exp $ */ +/* $OpenBSD: elink3.c,v 1.15 1996/11/12 20:30:18 niklas Exp $ */ /* $NetBSD: elink3.c,v 1.7 1996/05/14 22:22:05 thorpej Exp $ */ /* @@ -63,7 +63,7 @@ #endif #include <machine/cpu.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/intr.h> #include <dev/ic/elink3var.h> diff --git a/sys/dev/ic/midway.c b/sys/dev/ic/midway.c index 793d30b7ffb..61fe659c81a 100644 --- a/sys/dev/ic/midway.c +++ b/sys/dev/ic/midway.c @@ -1,4 +1,4 @@ -/* $OpenBSD: midway.c,v 1.14 1996/11/09 03:43:10 chuck Exp $ */ +/* $OpenBSD: midway.c,v 1.15 1996/11/12 20:30:20 niklas Exp $ */ /* (sync'd to midway.c 1.63) */ /* @@ -114,7 +114,7 @@ #if !defined(sparc) && !defined(__FreeBSD__) -#include <machine/bus.h> +#include <machine/bus.old.h> #endif #if defined(__NetBSD__) || defined(__OpenBSD__) diff --git a/sys/dev/ic/midwayreg.h b/sys/dev/ic/midwayreg.h index cbd43d5dc3e..54bf1f75596 100644 --- a/sys/dev/ic/midwayreg.h +++ b/sys/dev/ic/midwayreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: midwayreg.h,v 1.4 1996/07/16 22:08:16 chuck Exp $ */ +/* $OpenBSD: midwayreg.h,v 1.5 1996/11/12 20:30:21 niklas Exp $ */ /* * m i d w a y r e g . h @@ -9,7 +9,7 @@ */ #if defined(sparc) || defined(__FreeBSD__) -/* XXX: gross. netbsd/sparc doesn't have machine/bus.h yet. */ +/* XXX: gross. netbsd/sparc doesn't have machine/bus.old.h yet. */ typedef void * bus_chipset_tag_t; typedef u_int32_t pci_chipset_tag_t; typedef caddr_t bus_mem_handle_t; diff --git a/sys/dev/ic/pdqvar.h b/sys/dev/ic/pdqvar.h index fe2607da168..a71f3baa264 100644 --- a/sys/dev/ic/pdqvar.h +++ b/sys/dev/ic/pdqvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pdqvar.h,v 1.8 1996/10/31 01:01:38 niklas Exp $ */ +/* $OpenBSD: pdqvar.h,v 1.9 1996/11/12 20:30:22 niklas Exp $ */ /* $NetBSD: pdqvar.h,v 1.8 1996/07/10 18:55:05 cgd Exp $ */ /*- @@ -127,7 +127,7 @@ typedef pdq_bus_memaddr_t pdq_bus_memoffset_t; #elif defined(__NetBSD__) || defined(__OpenBSD__) -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/intr.h> #define PDQ_OS_PTR_FMT "%p" typedef void ifnet_ret_t; diff --git a/sys/dev/ic/smc93cx6.c b/sys/dev/ic/smc93cx6.c index 4138fdd4954..5be19b4332d 100644 --- a/sys/dev/ic/smc93cx6.c +++ b/sys/dev/ic/smc93cx6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smc93cx6.c,v 1.4 1996/10/31 01:01:40 niklas Exp $ */ +/* $OpenBSD: smc93cx6.c,v 1.5 1996/11/12 20:30:23 niklas Exp $ */ /* * Interface for the 93C46/26/06 serial eeprom parts. @@ -59,7 +59,7 @@ #include <machine/clock.h> #include <i386/scsi/93cx6.h> #elif defined(__NetBSD__) || defined(__OpenBSD__) -#include <machine/bus.h> +#include <machine/bus.old.h> #include <dev/ic/smc93cx6var.h> #endif diff --git a/sys/dev/isa/ast.c b/sys/dev/isa/ast.c index f67c593823c..2353dd42e60 100644 --- a/sys/dev/isa/ast.c +++ b/sys/dev/isa/ast.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ast.c,v 1.12 1996/06/02 17:23:02 niklas Exp $ */ +/* $OpenBSD: ast.c,v 1.13 1996/11/12 20:30:25 niklas Exp $ */ /* $NetBSD: ast.c,v 1.28 1996/05/12 23:51:45 mycroft Exp $ */ /* @@ -39,7 +39,7 @@ #include <sys/device.h> #include <sys/termios.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/intr.h> #include <dev/isa/isavar.h> diff --git a/sys/dev/isa/boca.c b/sys/dev/isa/boca.c index 6473e0f82a3..1f868b8e133 100644 --- a/sys/dev/isa/boca.c +++ b/sys/dev/isa/boca.c @@ -1,4 +1,4 @@ -/* $OpenBSD: boca.c,v 1.10 1996/05/26 00:27:12 deraadt Exp $ */ +/* $OpenBSD: boca.c,v 1.11 1996/11/12 20:30:26 niklas Exp $ */ /* $NetBSD: boca.c,v 1.15 1996/05/12 23:51:50 mycroft Exp $ */ /* @@ -39,7 +39,7 @@ #include <sys/device.h> #include <sys/termios.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/intr.h> #include <dev/isa/isavar.h> diff --git a/sys/dev/isa/com.c b/sys/dev/isa/com.c index f37d5ce0a5d..7c06bfbed0e 100644 --- a/sys/dev/isa/com.c +++ b/sys/dev/isa/com.c @@ -1,4 +1,4 @@ -/* $OpenBSD: com.c,v 1.26 1996/11/09 21:50:43 tholo Exp $ */ +/* $OpenBSD: com.c,v 1.27 1996/11/12 20:30:27 niklas Exp $ */ /* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */ /*- @@ -57,7 +57,7 @@ #include <sys/types.h> #include <sys/device.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/intr.h> #include <dev/isa/isavar.h> diff --git a/sys/dev/isa/cy_isa.c b/sys/dev/isa/cy_isa.c index f16a63358a8..d7b810b57ce 100644 --- a/sys/dev/isa/cy_isa.c +++ b/sys/dev/isa/cy_isa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cy_isa.c,v 1.1 1996/07/27 07:20:05 deraadt Exp $ */ +/* $OpenBSD: cy_isa.c,v 1.2 1996/11/12 20:30:28 niklas Exp $ */ /* * cy.c @@ -38,7 +38,7 @@ #include <sys/device.h> #include <sys/malloc.h> #include <sys/systm.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <dev/isa/isavar.h> #include <dev/isa/isareg.h> diff --git a/sys/dev/isa/elink.c b/sys/dev/isa/elink.c index f97d1acff65..6f738fac5b8 100644 --- a/sys/dev/isa/elink.c +++ b/sys/dev/isa/elink.c @@ -39,7 +39,7 @@ #include <sys/malloc.h> #include <sys/queue.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <dev/isa/elink.h> diff --git a/sys/dev/isa/fd.c b/sys/dev/isa/fd.c index d75e90b8ec5..d5aee45735c 100644 --- a/sys/dev/isa/fd.c +++ b/sys/dev/isa/fd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fd.c,v 1.27 1996/10/28 00:36:18 downsj Exp $ */ +/* $OpenBSD: fd.c,v 1.28 1996/11/12 20:30:31 niklas Exp $ */ /* $NetBSD: fd.c,v 1.90 1996/05/12 23:12:03 mycroft Exp $ */ /*- @@ -64,7 +64,7 @@ #include <sys/queue.h> #include <machine/cpu.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/conf.h> #include <machine/intr.h> #include <machine/ioctl_fd.h> diff --git a/sys/dev/isa/fdc.c b/sys/dev/isa/fdc.c index 7dcaad4cad9..876bd7ed0a8 100644 --- a/sys/dev/isa/fdc.c +++ b/sys/dev/isa/fdc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fdc.c,v 1.5 1996/10/28 00:06:21 downsj Exp $ */ +/* $OpenBSD: fdc.c,v 1.6 1996/11/12 20:30:32 niklas Exp $ */ /* $NetBSD: fd.c,v 1.90 1996/05/12 23:12:03 mycroft Exp $ */ /*- @@ -63,7 +63,7 @@ #include <sys/queue.h> #include <machine/cpu.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/conf.h> #include <machine/intr.h> #include <machine/ioctl_fd.h> diff --git a/sys/dev/isa/if_ed.c b/sys/dev/isa/if_ed.c index bf4ae525cc1..976993f5416 100644 --- a/sys/dev/isa/if_ed.c +++ b/sys/dev/isa/if_ed.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ed.c,v 1.23 1996/11/07 11:25:10 niklas Exp $ */ +/* $OpenBSD: if_ed.c,v 1.24 1996/11/12 20:30:34 niklas Exp $ */ /* $NetBSD: if_ed.c,v 1.100 1996/05/12 23:52:19 mycroft Exp $ */ /* @@ -49,7 +49,7 @@ #endif #include <machine/cpu.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/intr.h> #include <dev/isa/isareg.h> diff --git a/sys/dev/isa/if_ep_isa.c b/sys/dev/isa/if_ep_isa.c index 2d7b424b2b8..839166a370e 100644 --- a/sys/dev/isa/if_ep_isa.c +++ b/sys/dev/isa/if_ep_isa.c @@ -67,7 +67,7 @@ #endif #include <machine/cpu.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/intr.h> #include <dev/ic/elink3var.h> diff --git a/sys/dev/isa/if_ie.c b/sys/dev/isa/if_ie.c index 00ef51c0a63..bb965d84db9 100644 --- a/sys/dev/isa/if_ie.c +++ b/sys/dev/isa/if_ie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ie.c,v 1.14 1996/10/17 19:12:50 niklas Exp $ */ +/* $OpenBSD: if_ie.c,v 1.15 1996/11/12 20:30:37 niklas Exp $ */ /* $NetBSD: if_ie.c,v 1.51 1996/05/12 23:52:48 mycroft Exp $ */ /*- @@ -142,7 +142,7 @@ iomem, and to make 16-pointers, we subtract sc_maddr and and with 0xffff. #include <machine/cpu.h> #include <machine/pio.h> /* XXX convert this driver! */ -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/intr.h> #include <dev/isa/isareg.h> diff --git a/sys/dev/isa/isapnp.c b/sys/dev/isa/isapnp.c index 633ff52416e..66c00e1a6d4 100644 --- a/sys/dev/isa/isapnp.c +++ b/sys/dev/isa/isapnp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: isapnp.c,v 1.6 1996/10/18 15:39:34 mickey Exp $ */ +/* $OpenBSD: isapnp.c,v 1.7 1996/11/12 20:30:39 niklas Exp $ */ /* * Copyright (c) 1996, Shawn Hsiao <shawn@alpha.secc.fju.edu.tw> @@ -62,7 +62,7 @@ #include <sys/malloc.h> #include <sys/queue.h> #include <sys/extent.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <dev/isa/isavar.h> diff --git a/sys/dev/isa/isavar.h b/sys/dev/isa/isavar.h index 13f37dabd05..61137d1945a 100644 --- a/sys/dev/isa/isavar.h +++ b/sys/dev/isa/isavar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: isavar.h,v 1.17 1996/10/31 01:05:10 niklas Exp $ */ +/* $OpenBSD: isavar.h,v 1.18 1996/11/12 20:30:40 niklas Exp $ */ /* $NetBSD: isavar.h,v 1.23 1996/05/08 23:32:31 thorpej Exp $ */ /* @@ -45,7 +45,7 @@ */ #include <sys/queue.h> -#include <machine/bus.h> +#include <machine/bus.old.h> /* * Structures and definitions needed by the machine-dependent header. diff --git a/sys/dev/isa/lpt.c b/sys/dev/isa/lpt.c index 1824e1c2182..1989ab94f2f 100644 --- a/sys/dev/isa/lpt.c +++ b/sys/dev/isa/lpt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lpt.c,v 1.18 1996/06/30 03:51:55 dm Exp $ */ +/* $OpenBSD: lpt.c,v 1.19 1996/11/12 20:30:41 niklas Exp $ */ /* $NetBSD: lpt.c,v 1.39 1996/05/12 23:53:06 mycroft Exp $ */ /* @@ -66,7 +66,7 @@ #include <sys/conf.h> #include <sys/syslog.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/intr.h> #include <dev/isa/isavar.h> diff --git a/sys/dev/isa/rtfps.c b/sys/dev/isa/rtfps.c index 310b5ab527a..d1ff59cdf8c 100644 --- a/sys/dev/isa/rtfps.c +++ b/sys/dev/isa/rtfps.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtfps.c,v 1.11 1996/10/17 19:04:02 niklas Exp $ */ +/* $OpenBSD: rtfps.c,v 1.12 1996/11/12 20:30:42 niklas Exp $ */ /* $NetBSD: rtfps.c,v 1.23 1996/05/12 23:53:29 mycroft Exp $ */ /* @@ -39,7 +39,7 @@ #include <sys/device.h> #include <sys/termios.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/intr.h> #include <dev/isa/isavar.h> diff --git a/sys/dev/isa/wd.c b/sys/dev/isa/wd.c index 2d2d63418e1..1bcb02de03e 100644 --- a/sys/dev/isa/wd.c +++ b/sys/dev/isa/wd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wd.c,v 1.19 1996/09/22 09:02:32 downsj Exp $ */ +/* $OpenBSD: wd.c,v 1.20 1996/11/12 20:30:43 niklas Exp $ */ /* $NetBSD: wd.c,v 1.150 1996/05/12 23:54:03 mycroft Exp $ */ /* @@ -53,7 +53,7 @@ #include <vm/vm.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/cpu.h> #include <machine/intr.h> diff --git a/sys/dev/isa/wdc.c b/sys/dev/isa/wdc.c index 869414c6297..00a513b79d2 100644 --- a/sys/dev/isa/wdc.c +++ b/sys/dev/isa/wdc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wdc.c,v 1.13 1996/11/06 09:43:10 niklas Exp $ */ +/* $OpenBSD: wdc.c,v 1.14 1996/11/12 20:30:45 niklas Exp $ */ /* $NetBSD: wd.c,v 1.150 1996/05/12 23:54:03 mycroft Exp $ */ /* @@ -57,7 +57,7 @@ #include <vm/vm.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/cpu.h> #include <machine/intr.h> diff --git a/sys/dev/isa/wds.c b/sys/dev/isa/wds.c index ef50f0829f1..603a5efd42c 100644 --- a/sys/dev/isa/wds.c +++ b/sys/dev/isa/wds.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wds.c,v 1.8 1996/11/09 08:40:53 niklas Exp $ */ +/* $OpenBSD: wds.c,v 1.9 1996/11/12 20:30:46 niklas Exp $ */ /* $NetBSD: wds.c,v 1.7 1996/05/12 23:54:09 mycroft Exp $ */ #undef WDSDIAG @@ -65,7 +65,7 @@ #include <sys/proc.h> #include <sys/user.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/intr.h> #include <machine/pio.h> diff --git a/sys/dev/pci/ahc_pci.c b/sys/dev/pci/ahc_pci.c index 51dbef09864..b14533456c1 100644 --- a/sys/dev/pci/ahc_pci.c +++ b/sys/dev/pci/ahc_pci.c @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ahc_pci.c,v 1.4 1996/10/16 12:40:55 deraadt Exp $ + * $Id: ahc_pci.c,v 1.5 1996/11/12 20:30:48 niklas Exp $ */ #if defined(__FreeBSD__) @@ -43,7 +43,7 @@ #include <sys/queue.h> #if defined(__NetBSD__) || defined(__OpenBSD__) #include <sys/device.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/intr.h> #endif /* defined(__NetBSD__) */ diff --git a/sys/dev/pci/cy_pci.c b/sys/dev/pci/cy_pci.c index c196cc58b7f..ff5d6280cac 100644 --- a/sys/dev/pci/cy_pci.c +++ b/sys/dev/pci/cy_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cy_pci.c,v 1.1 1996/07/27 07:20:07 deraadt Exp $ */ +/* $OpenBSD: cy_pci.c,v 1.2 1996/11/12 20:30:49 niklas Exp $ */ /* * cy.c @@ -41,7 +41,7 @@ #include <sys/device.h> #include <sys/malloc.h> #include <sys/systm.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <dev/pci/pcivar.h> #include <dev/pci/pcireg.h> #include <dev/pci/pcidevs.h> diff --git a/sys/dev/pci/if_de.c b/sys/dev/pci/if_de.c index b016eb83a32..303c70fd7b9 100644 --- a/sys/dev/pci/if_de.c +++ b/sys/dev/pci/if_de.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_de.c,v 1.13 1996/08/23 16:24:50 niklas Exp $ */ +/* $OpenBSD: if_de.c,v 1.14 1996/11/12 20:30:51 niklas Exp $ */ /* $NetBSD: if_de.c,v 1.22.4.1 1996/06/03 20:32:07 cgd Exp $ */ /*- @@ -103,7 +103,7 @@ #endif /* __bsdi__ */ #if defined(__NetBSD__) || defined(__OpenBSD__) -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/intr.h> #include <dev/pci/pcireg.h> diff --git a/sys/dev/pci/if_ep_pci.c b/sys/dev/pci/if_ep_pci.c index 1149736f810..15bee326225 100644 --- a/sys/dev/pci/if_ep_pci.c +++ b/sys/dev/pci/if_ep_pci.c @@ -60,7 +60,7 @@ #endif #include <machine/cpu.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/intr.h> #include <dev/ic/elink3var.h> diff --git a/sys/dev/pci/if_le_pci.c b/sys/dev/pci/if_le_pci.c index 3c89f62d516..d7157bba3ff 100644 --- a/sys/dev/pci/if_le_pci.c +++ b/sys/dev/pci/if_le_pci.c @@ -62,7 +62,7 @@ #include <vm/vm.h> #include <machine/cpu.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/intr.h> #include <dev/pci/pcireg.h> diff --git a/sys/dev/pci/ncr.c b/sys/dev/pci/ncr.c index 530c79c43b8..0cf2491fed0 100644 --- a/sys/dev/pci/ncr.c +++ b/sys/dev/pci/ncr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ncr.c,v 1.17 1996/10/31 01:05:12 niklas Exp $ */ +/* $OpenBSD: ncr.c,v 1.18 1996/11/12 20:30:57 niklas Exp $ */ /* $NetBSD: ncr.c,v 1.35.4.1 1996/06/03 20:32:17 cgd Exp $ */ /************************************************************************** @@ -206,7 +206,7 @@ #include <pci/ncrreg.h> #else #include <sys/device.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <machine/intr.h> #include <dev/pci/ncr_reg.h> #include <dev/pci/pcireg.h> diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h index 42c170f4971..e674d904e93 100644 --- a/sys/dev/pci/pcivar.h +++ b/sys/dev/pci/pcivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pcivar.h,v 1.7 1996/04/21 22:25:51 deraadt Exp $ */ +/* $OpenBSD: pcivar.h,v 1.8 1996/11/12 20:30:59 niklas Exp $ */ /* $NetBSD: pcivar.h,v 1.15 1996/03/28 02:16:23 cgd Exp $ */ /* @@ -42,7 +42,7 @@ * provided by pci_machdep.h. */ -#include <machine/bus.h> +#include <machine/bus.old.h> #include <dev/pci/pcireg.h> /* diff --git a/sys/dev/pcmcia/if_ep_pcmcia.c b/sys/dev/pcmcia/if_ep_pcmcia.c index 0a921e1f153..dd39a139527 100644 --- a/sys/dev/pcmcia/if_ep_pcmcia.c +++ b/sys/dev/pcmcia/if_ep_pcmcia.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ep_pcmcia.c,v 1.4 1996/10/16 12:36:29 deraadt Exp $ */ +/* $OpenBSD: if_ep_pcmcia.c,v 1.5 1996/11/12 20:31:00 niklas Exp $ */ /* $NetBSD: if_ep.c,v 1.90 1996/04/11 22:29:15 cgd Exp $ */ /* @@ -63,7 +63,7 @@ #endif #include <machine/cpu.h> -#include <machine/bus.h> +#include <machine/bus.old.h> #include <dev/ic/elink3var.h> #include <dev/ic/elink3reg.h> diff --git a/sys/dev/pcmcia/pcmciavar.h b/sys/dev/pcmcia/pcmciavar.h index 2e4f597b703..de30025d8eb 100644 --- a/sys/dev/pcmcia/pcmciavar.h +++ b/sys/dev/pcmcia/pcmciavar.h @@ -1,4 +1,4 @@ -/* $Id: pcmciavar.h,v 1.1 1996/04/29 14:17:39 hvozda Exp $ */ +/* $Id: pcmciavar.h,v 1.2 1996/11/12 20:31:01 niklas Exp $ */ /* * Copyright (c) 1995,1996 John T. Kohl. All rights reserved. * Copyright (c) 1993, 1994 Stefan Grefen. All rights reserved. @@ -37,7 +37,7 @@ #include <sys/queue.h> #include <sys/select.h> #include <machine/cpu.h> -#include <machine/bus.h> +#include <machine/bus.old.h> /* * The following documentation tries to describe the relationship between the diff --git a/sys/dev/tc/tcvar.h b/sys/dev/tc/tcvar.h index 566e0dcc01c..487e25b3c1b 100644 --- a/sys/dev/tc/tcvar.h +++ b/sys/dev/tc/tcvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tcvar.h,v 1.4 1996/05/26 00:27:56 deraadt Exp $ */ +/* $OpenBSD: tcvar.h,v 1.5 1996/11/12 20:31:02 niklas Exp $ */ /* $NetBSD: tcvar.h,v 1.5 1996/05/17 23:38:16 cgd Exp $ */ /* @@ -35,8 +35,8 @@ * Definitions for TurboChannel autoconfiguration. */ -#ifdef __alpha__ /* XXX pmax does not yet have machine/bus.h */ -#include <machine/bus.h> +#ifdef __alpha__ /* XXX pmax does not yet have machine/bus.old.h */ +#include <machine/bus.old.h> #endif #include <dev/tc/tcreg.h> |