struct device * -> device_t.diff -r1.16 -r1.17 src/sys/arch/x68k/dev/xel.c
(isaki)
--- src/sys/arch/x68k/dev/xel.c 2008/12/18 05:56:42 1.16
+++ src/sys/arch/x68k/dev/xel.c 2008/12/31 09:50:21 1.17
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: xel.c,v 1.16 2008/12/18 05:56:42 isaki Exp $ */ | 1 | /* $NetBSD: xel.c,v 1.17 2008/12/31 09:50:21 isaki Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1998 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1998 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Minoura Makoto. | 8 | * by Minoura Makoto. | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -25,27 +25,27 @@ | @@ -25,27 +25,27 @@ | |||
25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
29 | * POSSIBILITY OF SUCH DAMAGE. | 29 | * POSSIBILITY OF SUCH DAMAGE. | |
30 | */ | 30 | */ | |
31 | 31 | |||
32 | /* | 32 | /* | |
33 | * TSR Xellent30 driver. | 33 | * TSR Xellent30 driver. | |
34 | * Detect Xellent30, and reserve its I/O area. | 34 | * Detect Xellent30, and reserve its I/O area. | |
35 | */ | 35 | */ | |
36 | 36 | |||
37 | #include <sys/cdefs.h> | 37 | #include <sys/cdefs.h> | |
38 | __KERNEL_RCSID(0, "$NetBSD: xel.c,v 1.16 2008/12/18 05:56:42 isaki Exp $"); | 38 | __KERNEL_RCSID(0, "$NetBSD: xel.c,v 1.17 2008/12/31 09:50:21 isaki Exp $"); | |
39 | 39 | |||
40 | #include <sys/param.h> | 40 | #include <sys/param.h> | |
41 | #include <sys/systm.h> | 41 | #include <sys/systm.h> | |
42 | #include <sys/kernel.h> | 42 | #include <sys/kernel.h> | |
43 | #include <sys/device.h> | 43 | #include <sys/device.h> | |
44 | 44 | |||
45 | #include <machine/cpu.h> | 45 | #include <machine/cpu.h> | |
46 | #include <machine/bus.h> | 46 | #include <machine/bus.h> | |
47 | 47 | |||
48 | #include <arch/x68k/dev/intiovar.h> | 48 | #include <arch/x68k/dev/intiovar.h> | |
49 | 49 | |||
50 | static paddr_t xel_addr(device_t, cfdata_t, struct intio_attach_args *); | 50 | static paddr_t xel_addr(device_t, cfdata_t, struct intio_attach_args *); | |
51 | static int xel_probe(paddr_t); | 51 | static int xel_probe(paddr_t); | |
@@ -156,27 +156,27 @@ xel_probe(paddr_t addr) | @@ -156,27 +156,27 @@ xel_probe(paddr_t addr) | |||
156 | } | 156 | } | |
157 | sram[0] = b1; | 157 | sram[0] = b1; | |
158 | sram[1] = b2; | 158 | sram[1] = b2; | |
159 | #endif | 159 | #endif | |
160 | 160 | |||
161 | /* Unmap. */ | 161 | /* Unmap. */ | |
162 | start[0] = XEL_MODE_UNMAP_RAM | XEL_MODE_MPU_030; | 162 | start[0] = XEL_MODE_UNMAP_RAM | XEL_MODE_MPU_030; | |
163 | 163 | |||
164 | nofault = NULL; | 164 | nofault = NULL; | |
165 | return 1; | 165 | return 1; | |
166 | } | 166 | } | |
167 | 167 | |||
168 | static int | 168 | static int | |
169 | xel_match(struct device *parent, cfdata_t match, void *aux) | 169 | xel_match(device_t parent, cfdata_t match, void *aux) | |
170 | { | 170 | { | |
171 | struct intio_attach_args *ia = aux; | 171 | struct intio_attach_args *ia = aux; | |
172 | 172 | |||
173 | if (strcmp(ia->ia_name, "xel") != 0) | 173 | if (strcmp(ia->ia_name, "xel") != 0) | |
174 | return 0; | 174 | return 0; | |
175 | 175 | |||
176 | if (xel_addr(parent, match, ia)) { | 176 | if (xel_addr(parent, match, ia)) { | |
177 | #ifdef DIAGNOSTIC | 177 | #ifdef DIAGNOSTIC | |
178 | if (cputype != CPU_68030) | 178 | if (cputype != CPU_68030) | |
179 | panic("Non-030 Xellent???"); | 179 | panic("Non-030 Xellent???"); | |
180 | #endif | 180 | #endif | |
181 | return 1; | 181 | return 1; | |
182 | } | 182 | } |
--- src/sys/arch/x68k/dev/zs.c 2008/12/18 05:56:42 1.39
+++ src/sys/arch/x68k/dev/zs.c 2008/12/31 09:50:21 1.40
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: zs.c,v 1.39 2008/12/18 05:56:42 isaki Exp $ */ | 1 | /* $NetBSD: zs.c,v 1.40 2008/12/31 09:50:21 isaki Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1998 Minoura Makoto | 4 | * Copyright (c) 1998 Minoura Makoto | |
5 | * Copyright (c) 1996 The NetBSD Foundation, Inc. | 5 | * Copyright (c) 1996 The NetBSD Foundation, Inc. | |
6 | * All rights reserved. | 6 | * All rights reserved. | |
7 | * | 7 | * | |
8 | * This code is derived from software contributed to The NetBSD Foundation | 8 | * This code is derived from software contributed to The NetBSD Foundation | |
9 | * by Gordon W. Ross. | 9 | * by Gordon W. Ross. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -30,27 +30,27 @@ | @@ -30,27 +30,27 @@ | |||
30 | * POSSIBILITY OF SUCH DAMAGE. | 30 | * POSSIBILITY OF SUCH DAMAGE. | |
31 | */ | 31 | */ | |
32 | 32 | |||
33 | /* | 33 | /* | |
34 | * Zilog Z8530 Dual UART driver (machine-dependent part) | 34 | * Zilog Z8530 Dual UART driver (machine-dependent part) | |
35 | * | 35 | * | |
36 | * X68k uses one Z8530 built-in. Channel A is for RS-232C serial port; | 36 | * X68k uses one Z8530 built-in. Channel A is for RS-232C serial port; | |
37 | * while channel B is dedicated to the mouse. | 37 | * while channel B is dedicated to the mouse. | |
38 | * Extra Z8530's can be installed for serial ports. This driver | 38 | * Extra Z8530's can be installed for serial ports. This driver | |
39 | * supports up to 5 chips including the built-in one. | 39 | * supports up to 5 chips including the built-in one. | |
40 | */ | 40 | */ | |
41 | 41 | |||
42 | #include <sys/cdefs.h> | 42 | #include <sys/cdefs.h> | |
43 | __KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.39 2008/12/18 05:56:42 isaki Exp $"); | 43 | __KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.40 2008/12/31 09:50:21 isaki Exp $"); | |
44 | 44 | |||
45 | #include <sys/param.h> | 45 | #include <sys/param.h> | |
46 | #include <sys/systm.h> | 46 | #include <sys/systm.h> | |
47 | #include <sys/conf.h> | 47 | #include <sys/conf.h> | |
48 | #include <sys/device.h> | 48 | #include <sys/device.h> | |
49 | #include <sys/file.h> | 49 | #include <sys/file.h> | |
50 | #include <sys/ioctl.h> | 50 | #include <sys/ioctl.h> | |
51 | #include <sys/kernel.h> | 51 | #include <sys/kernel.h> | |
52 | #include <sys/proc.h> | 52 | #include <sys/proc.h> | |
53 | #include <sys/tty.h> | 53 | #include <sys/tty.h> | |
54 | #include <sys/time.h> | 54 | #include <sys/time.h> | |
55 | #include <sys/syslog.h> | 55 | #include <sys/syslog.h> | |
56 | #include <sys/cpu.h> | 56 | #include <sys/cpu.h> | |
@@ -184,27 +184,27 @@ zs_attach(device_t parent, device_t self | @@ -184,27 +184,27 @@ zs_attach(device_t parent, device_t self | |||
184 | zsc->zsc_addr = (void *)ia->ia_addr; | 184 | zsc->zsc_addr = (void *)ia->ia_addr; | |
185 | 185 | |||
186 | ia->ia_size = 8; | 186 | ia->ia_size = 8; | |
187 | r = intio_map_allocate_region(parent, ia, INTIO_MAP_ALLOCATE); | 187 | r = intio_map_allocate_region(parent, ia, INTIO_MAP_ALLOCATE); | |
188 | #ifdef DIAGNOSTIC | 188 | #ifdef DIAGNOSTIC | |
189 | if (r) | 189 | if (r) | |
190 | panic("zs: intio IO map corruption"); | 190 | panic("zs: intio IO map corruption"); | |
191 | #endif | 191 | #endif | |
192 | 192 | |||
193 | /* | 193 | /* | |
194 | * Initialize software state for each channel. | 194 | * Initialize software state for each channel. | |
195 | */ | 195 | */ | |
196 | for (channel = 0; channel < 2; channel++) { | 196 | for (channel = 0; channel < 2; channel++) { | |
197 | struct device *child; | 197 | device_t child; | |
198 | 198 | |||
199 | zsc_args.channel = channel; | 199 | zsc_args.channel = channel; | |
200 | zsc_args.hwflags = 0; | 200 | zsc_args.hwflags = 0; | |
201 | cs = &zsc->zsc_cs_store[channel]; | 201 | cs = &zsc->zsc_cs_store[channel]; | |
202 | zsc->zsc_cs[channel] = cs; | 202 | zsc->zsc_cs[channel] = cs; | |
203 | 203 | |||
204 | zs_lock_init(cs); | 204 | zs_lock_init(cs); | |
205 | cs->cs_channel = channel; | 205 | cs->cs_channel = channel; | |
206 | cs->cs_private = NULL; | 206 | cs->cs_private = NULL; | |
207 | cs->cs_ops = &zsops_null; | 207 | cs->cs_ops = &zsops_null; | |
208 | cs->cs_brg_clk = PCLK / 16; | 208 | cs->cs_brg_clk = PCLK / 16; | |
209 | 209 | |||
210 | if (channel == 0) | 210 | if (channel == 0) |