Use DEVICE_COMPAT_EOL.diff -r1.12 -r1.13 src/sys/dev/ofisa/atppc_ofisa.c
(thorpej)
--- src/sys/dev/ofisa/atppc_ofisa.c 2021/01/25 16:21:41 1.12
+++ src/sys/dev/ofisa/atppc_ofisa.c 2021/01/27 02:31:03 1.13
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: atppc_ofisa.c,v 1.12 2021/01/25 16:21:41 thorpej Exp $ */ | 1 | /* $NetBSD: atppc_ofisa.c,v 1.13 2021/01/27 02:31:03 thorpej Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2004 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2004 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 Jaromir Dolecek. | 8 | * by Jaromir Dolecek. | |
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. | |
@@ -20,27 +20,27 @@ | @@ -20,27 +20,27 @@ | |||
20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | 20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
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 | #include <sys/cdefs.h> | 32 | #include <sys/cdefs.h> | |
33 | __KERNEL_RCSID(0, "$NetBSD: atppc_ofisa.c,v 1.12 2021/01/25 16:21:41 thorpej Exp $"); | 33 | __KERNEL_RCSID(0, "$NetBSD: atppc_ofisa.c,v 1.13 2021/01/27 02:31:03 thorpej Exp $"); | |
34 | 34 | |||
35 | #include "opt_atppc.h" | 35 | #include "opt_atppc.h" | |
36 | 36 | |||
37 | #include <sys/param.h> | 37 | #include <sys/param.h> | |
38 | #include <sys/systm.h> | 38 | #include <sys/systm.h> | |
39 | #include <sys/errno.h> | 39 | #include <sys/errno.h> | |
40 | #include <sys/ioctl.h> | 40 | #include <sys/ioctl.h> | |
41 | #include <sys/syslog.h> | 41 | #include <sys/syslog.h> | |
42 | #include <sys/device.h> | 42 | #include <sys/device.h> | |
43 | #include <sys/proc.h> | 43 | #include <sys/proc.h> | |
44 | #include <sys/termios.h> | 44 | #include <sys/termios.h> | |
45 | 45 | |||
46 | #include <sys/bus.h> | 46 | #include <sys/bus.h> | |
@@ -66,27 +66,27 @@ CFATTACH_DECL_NEW(atppc_ofisa, sizeof(st | @@ -66,27 +66,27 @@ CFATTACH_DECL_NEW(atppc_ofisa, sizeof(st | |||
66 | atppc_ofisa_attach, NULL, NULL); | 66 | atppc_ofisa_attach, NULL, NULL); | |
67 | 67 | |||
68 | static int atppc_ofisa_dma_start(struct atppc_softc *, void *, u_int, | 68 | static int atppc_ofisa_dma_start(struct atppc_softc *, void *, u_int, | |
69 | u_int8_t); | 69 | u_int8_t); | |
70 | static int atppc_ofisa_dma_finish(struct atppc_softc *); | 70 | static int atppc_ofisa_dma_finish(struct atppc_softc *); | |
71 | static int atppc_ofisa_dma_abort(struct atppc_softc *); | 71 | static int atppc_ofisa_dma_abort(struct atppc_softc *); | |
72 | static int atppc_ofisa_dma_malloc(device_t, void **, bus_addr_t *, | 72 | static int atppc_ofisa_dma_malloc(device_t, void **, bus_addr_t *, | |
73 | bus_size_t); | 73 | bus_size_t); | |
74 | static void atppc_ofisa_dma_free(device_t, void **, bus_addr_t *, | 74 | static void atppc_ofisa_dma_free(device_t, void **, bus_addr_t *, | |
75 | bus_size_t); | 75 | bus_size_t); | |
76 | 76 | |||
77 | static const struct device_compatible_entry compat_data[] = { | 77 | static const struct device_compatible_entry compat_data[] = { | |
78 | { .compat = "pnpPNP,401" }, | 78 | { .compat = "pnpPNP,401" }, | |
79 | { } | 79 | DEVICE_COMPAT_EOL | |
80 | }; | 80 | }; | |
81 | 81 | |||
82 | /* | 82 | /* | |
83 | * atppc_ofisa_match: autoconf(9) match routine | 83 | * atppc_ofisa_match: autoconf(9) match routine | |
84 | */ | 84 | */ | |
85 | static int | 85 | static int | |
86 | atppc_ofisa_match(device_t parent, cfdata_t match, void *aux) | 86 | atppc_ofisa_match(device_t parent, cfdata_t match, void *aux) | |
87 | { | 87 | { | |
88 | struct ofisa_attach_args *aa = aux; | 88 | struct ofisa_attach_args *aa = aux; | |
89 | int rv; | 89 | int rv; | |
90 | 90 | |||
91 | rv = of_match_compat_data(aa->oba.oba_phandle, compat_data) ? 5 : 0; | 91 | rv = of_match_compat_data(aa->oba.oba_phandle, compat_data) ? 5 : 0; | |
92 | #ifdef _LPT_OFISA_MD_MATCH | 92 | #ifdef _LPT_OFISA_MD_MATCH |
--- src/sys/dev/ofisa/com_ofisa.c 2021/01/25 16:21:41 1.18
+++ src/sys/dev/ofisa/com_ofisa.c 2021/01/27 02:31:03 1.19
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: com_ofisa.c,v 1.18 2021/01/25 16:21:41 thorpej Exp $ */ | 1 | /* $NetBSD: com_ofisa.c,v 1.19 2021/01/27 02:31:03 thorpej Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright 1997, 1998 | 4 | * Copyright 1997, 1998 | |
5 | * Digital Equipment Corporation. All rights reserved. | 5 | * Digital Equipment Corporation. All rights reserved. | |
6 | * | 6 | * | |
7 | * This software is furnished under license and may be used and | 7 | * This software is furnished under license and may be used and | |
8 | * copied only in accordance with the following terms and conditions. | 8 | * copied only in accordance with the following terms and conditions. | |
9 | * Subject to these conditions, you may download, copy, install, | 9 | * Subject to these conditions, you may download, copy, install, | |
10 | * use, modify and distribute this software in source and/or binary | 10 | * use, modify and distribute this software in source and/or binary | |
11 | * form. No title or ownership is transferred hereby. | 11 | * form. No title or ownership is transferred hereby. | |
12 | * | 12 | * | |
13 | * 1) Any source code used, modified or distributed must reproduce | 13 | * 1) Any source code used, modified or distributed must reproduce | |
14 | * and retain this copyright notice and list of conditions as | 14 | * and retain this copyright notice and list of conditions as | |
@@ -28,27 +28,27 @@ | @@ -28,27 +28,27 @@ | |||
28 | * liable for any damages whatsoever, and in particular, DIGITAL | 28 | * liable for any damages whatsoever, and in particular, DIGITAL | |
29 | * shall not be liable for special, indirect, consequential, or | 29 | * shall not be liable for special, indirect, consequential, or | |
30 | * incidental damages or damages for lost profits, loss of | 30 | * incidental damages or damages for lost profits, loss of | |
31 | * revenue or loss of use, whether such damages arise in contract, | 31 | * revenue or loss of use, whether such damages arise in contract, | |
32 | * negligence, tort, under statute, in equity, at law or otherwise, | 32 | * negligence, tort, under statute, in equity, at law or otherwise, | |
33 | * even if advised of the possibility of such damage. | 33 | * even if advised of the possibility of such damage. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | /* | 36 | /* | |
37 | * OFW Attachment for 'com' serial driver | 37 | * OFW Attachment for 'com' serial driver | |
38 | */ | 38 | */ | |
39 | 39 | |||
40 | #include <sys/cdefs.h> | 40 | #include <sys/cdefs.h> | |
41 | __KERNEL_RCSID(0, "$NetBSD: com_ofisa.c,v 1.18 2021/01/25 16:21:41 thorpej Exp $"); | 41 | __KERNEL_RCSID(0, "$NetBSD: com_ofisa.c,v 1.19 2021/01/27 02:31:03 thorpej Exp $"); | |
42 | 42 | |||
43 | #include <sys/param.h> | 43 | #include <sys/param.h> | |
44 | #include <sys/device.h> | 44 | #include <sys/device.h> | |
45 | #include <sys/systm.h> | 45 | #include <sys/systm.h> | |
46 | #include <sys/tty.h> | 46 | #include <sys/tty.h> | |
47 | 47 | |||
48 | #include <sys/intr.h> | 48 | #include <sys/intr.h> | |
49 | #include <sys/bus.h> | 49 | #include <sys/bus.h> | |
50 | 50 | |||
51 | #include <dev/ofw/openfirm.h> | 51 | #include <dev/ofw/openfirm.h> | |
52 | #include <dev/isa/isavar.h> | 52 | #include <dev/isa/isavar.h> | |
53 | #include <dev/ofisa/ofisavar.h> | 53 | #include <dev/ofisa/ofisavar.h> | |
54 | 54 | |||
@@ -60,27 +60,27 @@ struct com_ofisa_softc { | @@ -60,27 +60,27 @@ struct com_ofisa_softc { | |||
60 | 60 | |||
61 | /* OFW ISA-specific goo. */ | 61 | /* OFW ISA-specific goo. */ | |
62 | void *sc_ih; /* interrupt handler */ | 62 | void *sc_ih; /* interrupt handler */ | |
63 | }; | 63 | }; | |
64 | 64 | |||
65 | int com_ofisa_probe(device_t, cfdata_t , void *); | 65 | int com_ofisa_probe(device_t, cfdata_t , void *); | |
66 | void com_ofisa_attach(device_t, device_t, void *); | 66 | void com_ofisa_attach(device_t, device_t, void *); | |
67 | 67 | |||
68 | CFATTACH_DECL_NEW(com_ofisa, sizeof(struct com_ofisa_softc), | 68 | CFATTACH_DECL_NEW(com_ofisa, sizeof(struct com_ofisa_softc), | |
69 | com_ofisa_probe, com_ofisa_attach, NULL, NULL); | 69 | com_ofisa_probe, com_ofisa_attach, NULL, NULL); | |
70 | 70 | |||
71 | static const struct device_compatible_entry compat_data[] = { | 71 | static const struct device_compatible_entry compat_data[] = { | |
72 | { .compat = "pnpPNP,501" }, | 72 | { .compat = "pnpPNP,501" }, | |
73 | { } | 73 | DEVICE_COMPAT_EOL | |
74 | }; | 74 | }; | |
75 | 75 | |||
76 | int | 76 | int | |
77 | com_ofisa_probe(device_t parent, cfdata_t cf, void *aux) | 77 | com_ofisa_probe(device_t parent, cfdata_t cf, void *aux) | |
78 | { | 78 | { | |
79 | struct ofisa_attach_args *aa = aux; | 79 | struct ofisa_attach_args *aa = aux; | |
80 | int rv; | 80 | int rv; | |
81 | 81 | |||
82 | rv = of_match_compat_data(aa->oba.oba_phandle, compat_data) ? 5 : 0; | 82 | rv = of_match_compat_data(aa->oba.oba_phandle, compat_data) ? 5 : 0; | |
83 | #ifdef _COM_OFISA_MD_MATCH | 83 | #ifdef _COM_OFISA_MD_MATCH | |
84 | if (!rv) | 84 | if (!rv) | |
85 | rv = com_ofisa_md_match(parent, cf, aux); | 85 | rv = com_ofisa_md_match(parent, cf, aux); | |
86 | #endif | 86 | #endif |
--- src/sys/dev/ofisa/joy_ofisa.c 2021/01/25 16:21:41 1.18
+++ src/sys/dev/ofisa/joy_ofisa.c 2021/01/27 02:31:03 1.19
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: joy_ofisa.c,v 1.18 2021/01/25 16:21:41 thorpej Exp $ */ | 1 | /* $NetBSD: joy_ofisa.c,v 1.19 2021/01/27 02:31:03 thorpej Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1996, 1998, 2008 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1996, 1998, 2008 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 Jason R. Thorpe. | 8 | * by Jason R. Thorpe. | |
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. | |
@@ -20,27 +20,27 @@ | @@ -20,27 +20,27 @@ | |||
20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | 20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
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 | #include <sys/cdefs.h> | 32 | #include <sys/cdefs.h> | |
33 | __KERNEL_RCSID(0, "$NetBSD: joy_ofisa.c,v 1.18 2021/01/25 16:21:41 thorpej Exp $"); | 33 | __KERNEL_RCSID(0, "$NetBSD: joy_ofisa.c,v 1.19 2021/01/27 02:31:03 thorpej Exp $"); | |
34 | 34 | |||
35 | #include <sys/param.h> | 35 | #include <sys/param.h> | |
36 | #include <sys/systm.h> | 36 | #include <sys/systm.h> | |
37 | #include <sys/kernel.h> | 37 | #include <sys/kernel.h> | |
38 | #include <sys/device.h> | 38 | #include <sys/device.h> | |
39 | 39 | |||
40 | #include <sys/bus.h> | 40 | #include <sys/bus.h> | |
41 | 41 | |||
42 | #include <dev/ofw/openfirm.h> | 42 | #include <dev/ofw/openfirm.h> | |
43 | #include <dev/isa/isavar.h> | 43 | #include <dev/isa/isavar.h> | |
44 | #include <dev/ofisa/ofisavar.h> | 44 | #include <dev/ofisa/ofisavar.h> | |
45 | 45 | |||
46 | #include <dev/ic/joyvar.h> | 46 | #include <dev/ic/joyvar.h> | |
@@ -50,27 +50,27 @@ __KERNEL_RCSID(0, "$NetBSD: joy_ofisa.c, | @@ -50,27 +50,27 @@ __KERNEL_RCSID(0, "$NetBSD: joy_ofisa.c, | |||
50 | struct joy_ofisa_softc { | 50 | struct joy_ofisa_softc { | |
51 | struct joy_softc sc_joy; | 51 | struct joy_softc sc_joy; | |
52 | kmutex_t sc_lock; | 52 | kmutex_t sc_lock; | |
53 | }; | 53 | }; | |
54 | 54 | |||
55 | static int joy_ofisa_match(device_t, cfdata_t, void *); | 55 | static int joy_ofisa_match(device_t, cfdata_t, void *); | |
56 | static void joy_ofisa_attach(device_t, device_t, void *); | 56 | static void joy_ofisa_attach(device_t, device_t, void *); | |
57 | 57 | |||
58 | CFATTACH_DECL_NEW(joy_ofisa, sizeof(struct joy_ofisa_softc), | 58 | CFATTACH_DECL_NEW(joy_ofisa, sizeof(struct joy_ofisa_softc), | |
59 | joy_ofisa_match, joy_ofisa_attach, NULL, NULL); | 59 | joy_ofisa_match, joy_ofisa_attach, NULL, NULL); | |
60 | 60 | |||
61 | static const struct device_compatible_entry compat_data[] = { | 61 | static const struct device_compatible_entry compat_data[] = { | |
62 | { .compat = "pnpPNP,b02f" }, /* generic joystick */ | 62 | { .compat = "pnpPNP,b02f" }, /* generic joystick */ | |
63 | { } | 63 | DEVICE_COMPAT_EOL | |
64 | }; | 64 | }; | |
65 | 65 | |||
66 | static int | 66 | static int | |
67 | joy_ofisa_match(device_t parent, cfdata_t match, void *aux) | 67 | joy_ofisa_match(device_t parent, cfdata_t match, void *aux) | |
68 | { | 68 | { | |
69 | struct ofisa_attach_args *aa = aux; | 69 | struct ofisa_attach_args *aa = aux; | |
70 | 70 | |||
71 | return of_match_compat_data(aa->oba.oba_phandle, compat_data); | 71 | return of_match_compat_data(aa->oba.oba_phandle, compat_data); | |
72 | } | 72 | } | |
73 | 73 | |||
74 | static void | 74 | static void | |
75 | joy_ofisa_attach(device_t parent, device_t self, void *aux) | 75 | joy_ofisa_attach(device_t parent, device_t self, void *aux) | |
76 | { | 76 | { |
--- src/sys/dev/ofisa/ess_ofisa.c 2021/01/25 16:21:41 1.30
+++ src/sys/dev/ofisa/ess_ofisa.c 2021/01/27 02:31:03 1.31
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: ess_ofisa.c,v 1.30 2021/01/25 16:21:41 thorpej Exp $ */ | 1 | /* $NetBSD: ess_ofisa.c,v 1.31 2021/01/27 02:31:03 thorpej 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 Jason R. Thorpe of the Numerical Aerospace Simulation Facility, | 8 | * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, | |
9 | * NASA Ames Research Center. | 9 | * NASA Ames Research Center. | |
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 | |
@@ -21,27 +21,27 @@ | @@ -21,27 +21,27 @@ | |||
21 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | 21 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
24 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 24 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
25 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 25 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
26 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 26 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
27 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 27 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
28 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 28 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
29 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 29 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
30 | * POSSIBILITY OF SUCH DAMAGE. | 30 | * POSSIBILITY OF SUCH DAMAGE. | |
31 | */ | 31 | */ | |
32 | 32 | |||
33 | #include <sys/cdefs.h> | 33 | #include <sys/cdefs.h> | |
34 | __KERNEL_RCSID(0, "$NetBSD: ess_ofisa.c,v 1.30 2021/01/25 16:21:41 thorpej Exp $"); | 34 | __KERNEL_RCSID(0, "$NetBSD: ess_ofisa.c,v 1.31 2021/01/27 02:31:03 thorpej Exp $"); | |
35 | 35 | |||
36 | #include <sys/param.h> | 36 | #include <sys/param.h> | |
37 | #include <sys/systm.h> | 37 | #include <sys/systm.h> | |
38 | #include <sys/device.h> | 38 | #include <sys/device.h> | |
39 | 39 | |||
40 | #include <sys/bus.h> | 40 | #include <sys/bus.h> | |
41 | #include <sys/intr.h> | 41 | #include <sys/intr.h> | |
42 | 42 | |||
43 | #include <sys/audioio.h> | 43 | #include <sys/audioio.h> | |
44 | #include <dev/audio/audio_if.h> | 44 | #include <dev/audio/audio_if.h> | |
45 | 45 | |||
46 | #include <dev/ofw/openfirm.h> | 46 | #include <dev/ofw/openfirm.h> | |
47 | #include <dev/isa/isavar.h> | 47 | #include <dev/isa/isavar.h> | |
@@ -50,27 +50,27 @@ __KERNEL_RCSID(0, "$NetBSD: ess_ofisa.c, | @@ -50,27 +50,27 @@ __KERNEL_RCSID(0, "$NetBSD: ess_ofisa.c, | |||
50 | #include <dev/isa/essreg.h> | 50 | #include <dev/isa/essreg.h> | |
51 | #include <dev/isa/essvar.h> | 51 | #include <dev/isa/essvar.h> | |
52 | 52 | |||
53 | int ess_ofisa_match(device_t, cfdata_t, void *); | 53 | int ess_ofisa_match(device_t, cfdata_t, void *); | |
54 | void ess_ofisa_attach(device_t, device_t, void *); | 54 | void ess_ofisa_attach(device_t, device_t, void *); | |
55 | 55 | |||
56 | CFATTACH_DECL_NEW(ess_ofisa, sizeof(struct ess_softc), | 56 | CFATTACH_DECL_NEW(ess_ofisa, sizeof(struct ess_softc), | |
57 | ess_ofisa_match, ess_ofisa_attach, NULL, NULL); | 57 | ess_ofisa_match, ess_ofisa_attach, NULL, NULL); | |
58 | 58 | |||
59 | static const struct device_compatible_entry compat_data[] = { | 59 | static const struct device_compatible_entry compat_data[] = { | |
60 | { .compat = "ESST,es1887-codec" }, /* ESS 1887 */ | 60 | { .compat = "ESST,es1887-codec" }, /* ESS 1887 */ | |
61 | { .compat = "ESST,es1888-codec" }, /* ESS 1888 */ | 61 | { .compat = "ESST,es1888-codec" }, /* ESS 1888 */ | |
62 | { .compat = "ESST,es888-codec" }, /* ESS 888 */ | 62 | { .compat = "ESST,es888-codec" }, /* ESS 888 */ | |
63 | { } | 63 | DEVICE_COMPAT_EOL | |
64 | }; | 64 | }; | |
65 | 65 | |||
66 | int | 66 | int | |
67 | ess_ofisa_match(device_t parent, cfdata_t cf, void *aux) | 67 | ess_ofisa_match(device_t parent, cfdata_t cf, void *aux) | |
68 | { | 68 | { | |
69 | struct ofisa_attach_args *aa = aux; | 69 | struct ofisa_attach_args *aa = aux; | |
70 | 70 | |||
71 | /* beat generic SB */ | 71 | /* beat generic SB */ | |
72 | return of_match_compat_data(aa->oba.oba_phandle, compat_data) ? 10 : 0; | 72 | return of_match_compat_data(aa->oba.oba_phandle, compat_data) ? 10 : 0; | |
73 | } | 73 | } | |
74 | 74 | |||
75 | void | 75 | void | |
76 | ess_ofisa_attach(device_t parent, device_t self, void *aux) | 76 | ess_ofisa_attach(device_t parent, device_t self, void *aux) |
--- src/sys/dev/ofisa/if_cs_ofisa.c 2021/01/25 16:21:41 1.29
+++ src/sys/dev/ofisa/if_cs_ofisa.c 2021/01/27 02:31:03 1.30
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: if_cs_ofisa.c,v 1.29 2021/01/25 16:21:41 thorpej Exp $ */ | 1 | /* $NetBSD: if_cs_ofisa.c,v 1.30 2021/01/27 02:31:03 thorpej 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 Jason R. Thorpe of the Numerical Aerospace Simulation Facility, | 8 | * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, | |
9 | * NASA Ames Research Center. | 9 | * NASA Ames Research Center. | |
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 | |
@@ -21,27 +21,27 @@ | @@ -21,27 +21,27 @@ | |||
21 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | 21 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
24 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 24 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
25 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 25 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
26 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 26 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
27 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 27 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
28 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 28 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
29 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 29 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
30 | * POSSIBILITY OF SUCH DAMAGE. | 30 | * POSSIBILITY OF SUCH DAMAGE. | |
31 | */ | 31 | */ | |
32 | 32 | |||
33 | #include <sys/cdefs.h> | 33 | #include <sys/cdefs.h> | |
34 | __KERNEL_RCSID(0, "$NetBSD: if_cs_ofisa.c,v 1.29 2021/01/25 16:21:41 thorpej Exp $"); | 34 | __KERNEL_RCSID(0, "$NetBSD: if_cs_ofisa.c,v 1.30 2021/01/27 02:31:03 thorpej Exp $"); | |
35 | 35 | |||
36 | #include <sys/param.h> | 36 | #include <sys/param.h> | |
37 | #include <sys/systm.h> | 37 | #include <sys/systm.h> | |
38 | #include <sys/socket.h> | 38 | #include <sys/socket.h> | |
39 | #include <sys/device.h> | 39 | #include <sys/device.h> | |
40 | #include <sys/malloc.h> | 40 | #include <sys/malloc.h> | |
41 | 41 | |||
42 | #include <sys/rndsource.h> | 42 | #include <sys/rndsource.h> | |
43 | 43 | |||
44 | #include <net/if.h> | 44 | #include <net/if.h> | |
45 | #include <net/if_ether.h> | 45 | #include <net/if_ether.h> | |
46 | #include <net/if_media.h> | 46 | #include <net/if_media.h> | |
47 | #ifdef INET | 47 | #ifdef INET | |
@@ -60,27 +60,27 @@ __KERNEL_RCSID(0, "$NetBSD: if_cs_ofisa. | @@ -60,27 +60,27 @@ __KERNEL_RCSID(0, "$NetBSD: if_cs_ofisa. | |||
60 | #include <dev/ic/cs89x0var.h> | 60 | #include <dev/ic/cs89x0var.h> | |
61 | #include <dev/isa/cs89x0isavar.h> | 61 | #include <dev/isa/cs89x0isavar.h> | |
62 | 62 | |||
63 | static int cs_ofisa_match(device_t, cfdata_t, void *); | 63 | static int cs_ofisa_match(device_t, cfdata_t, void *); | |
64 | static void cs_ofisa_attach(device_t, device_t, void *); | 64 | static void cs_ofisa_attach(device_t, device_t, void *); | |
65 | 65 | |||
66 | CFATTACH_DECL_NEW(cs_ofisa, sizeof(struct cs_softc_isa), | 66 | CFATTACH_DECL_NEW(cs_ofisa, sizeof(struct cs_softc_isa), | |
67 | cs_ofisa_match, cs_ofisa_attach, NULL, NULL); | 67 | cs_ofisa_match, cs_ofisa_attach, NULL, NULL); | |
68 | 68 | |||
69 | static const struct device_compatible_entry compat_data[] = { | 69 | static const struct device_compatible_entry compat_data[] = { | |
70 | { .compat = "CRUS,CS8900" }, | 70 | { .compat = "CRUS,CS8900" }, | |
71 | /* XXX CS8920, CS8920M? */ | 71 | /* XXX CS8920, CS8920M? */ | |
72 | /* XXX PNP names? */ | 72 | /* XXX PNP names? */ | |
73 | { } | 73 | DEVICE_COMPAT_EOL | |
74 | }; | 74 | }; | |
75 | 75 | |||
76 | int | 76 | int | |
77 | cs_ofisa_match(device_t parent, cfdata_t cf, void *aux) | 77 | cs_ofisa_match(device_t parent, cfdata_t cf, void *aux) | |
78 | { | 78 | { | |
79 | struct ofisa_attach_args *aa = aux; | 79 | struct ofisa_attach_args *aa = aux; | |
80 | int rv; | 80 | int rv; | |
81 | 81 | |||
82 | rv = of_match_compat_data(aa->oba.oba_phandle, compat_data) ? 5 : 0; | 82 | rv = of_match_compat_data(aa->oba.oba_phandle, compat_data) ? 5 : 0; | |
83 | #ifdef _CS_OFISA_MD_MATCH | 83 | #ifdef _CS_OFISA_MD_MATCH | |
84 | if (rv == 0) | 84 | if (rv == 0) | |
85 | rv = cs_ofisa_md_match(parent, cf, aux); | 85 | rv = cs_ofisa_md_match(parent, cf, aux); | |
86 | #endif | 86 | #endif |
--- src/sys/dev/ofisa/lpt_ofisa.c 2021/01/25 16:21:41 1.17
+++ src/sys/dev/ofisa/lpt_ofisa.c 2021/01/27 02:31:03 1.18
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: lpt_ofisa.c,v 1.17 2021/01/25 16:21:41 thorpej Exp $ */ | 1 | /* $NetBSD: lpt_ofisa.c,v 1.18 2021/01/27 02:31:03 thorpej Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright 1997, 1998 | 4 | * Copyright 1997, 1998 | |
5 | * Digital Equipment Corporation. All rights reserved. | 5 | * Digital Equipment Corporation. All rights reserved. | |
6 | * | 6 | * | |
7 | * This software is furnished under license and may be used and | 7 | * This software is furnished under license and may be used and | |
8 | * copied only in accordance with the following terms and conditions. | 8 | * copied only in accordance with the following terms and conditions. | |
9 | * Subject to these conditions, you may download, copy, install, | 9 | * Subject to these conditions, you may download, copy, install, | |
10 | * use, modify and distribute this software in source and/or binary | 10 | * use, modify and distribute this software in source and/or binary | |
11 | * form. No title or ownership is transferred hereby. | 11 | * form. No title or ownership is transferred hereby. | |
12 | * | 12 | * | |
13 | * 1) Any source code used, modified or distributed must reproduce | 13 | * 1) Any source code used, modified or distributed must reproduce | |
14 | * and retain this copyright notice and list of conditions as | 14 | * and retain this copyright notice and list of conditions as | |
@@ -28,27 +28,27 @@ | @@ -28,27 +28,27 @@ | |||
28 | * liable for any damages whatsoever, and in particular, DIGITAL | 28 | * liable for any damages whatsoever, and in particular, DIGITAL | |
29 | * shall not be liable for special, indirect, consequential, or | 29 | * shall not be liable for special, indirect, consequential, or | |
30 | * incidental damages or damages for lost profits, loss of | 30 | * incidental damages or damages for lost profits, loss of | |
31 | * revenue or loss of use, whether such damages arise in contract, | 31 | * revenue or loss of use, whether such damages arise in contract, | |
32 | * negligence, tort, under statute, in equity, at law or otherwise, | 32 | * negligence, tort, under statute, in equity, at law or otherwise, | |
33 | * even if advised of the possibility of such damage. | 33 | * even if advised of the possibility of such damage. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | /* | 36 | /* | |
37 | * OFW Attachment for 'lpt' parallel port driver | 37 | * OFW Attachment for 'lpt' parallel port driver | |
38 | */ | 38 | */ | |
39 | 39 | |||
40 | #include <sys/cdefs.h> | 40 | #include <sys/cdefs.h> | |
41 | __KERNEL_RCSID(0, "$NetBSD: lpt_ofisa.c,v 1.17 2021/01/25 16:21:41 thorpej Exp $"); | 41 | __KERNEL_RCSID(0, "$NetBSD: lpt_ofisa.c,v 1.18 2021/01/27 02:31:03 thorpej Exp $"); | |
42 | 42 | |||
43 | #include <sys/param.h> | 43 | #include <sys/param.h> | |
44 | #include <sys/device.h> | 44 | #include <sys/device.h> | |
45 | #include <sys/systm.h> | 45 | #include <sys/systm.h> | |
46 | #include <sys/tty.h> | 46 | #include <sys/tty.h> | |
47 | 47 | |||
48 | #include <sys/intr.h> | 48 | #include <sys/intr.h> | |
49 | #include <sys/bus.h> | 49 | #include <sys/bus.h> | |
50 | 50 | |||
51 | #include <dev/ofw/openfirm.h> | 51 | #include <dev/ofw/openfirm.h> | |
52 | #include <dev/isa/isavar.h> | 52 | #include <dev/isa/isavar.h> | |
53 | #include <dev/ofisa/ofisavar.h> | 53 | #include <dev/ofisa/ofisavar.h> | |
54 | 54 | |||
@@ -60,27 +60,27 @@ struct lpt_ofisa_softc { | @@ -60,27 +60,27 @@ struct lpt_ofisa_softc { | |||
60 | 60 | |||
61 | /* OFW ISA-specific goo. */ | 61 | /* OFW ISA-specific goo. */ | |
62 | void *sc_ih; /* interrupt handler */ | 62 | void *sc_ih; /* interrupt handler */ | |
63 | }; | 63 | }; | |
64 | 64 | |||
65 | int lpt_ofisa_probe(device_t, cfdata_t , void *); | 65 | int lpt_ofisa_probe(device_t, cfdata_t , void *); | |
66 | void lpt_ofisa_attach(device_t, device_t, void *); | 66 | void lpt_ofisa_attach(device_t, device_t, void *); | |
67 | 67 | |||
68 | CFATTACH_DECL_NEW(lpt_ofisa, sizeof(struct lpt_ofisa_softc), | 68 | CFATTACH_DECL_NEW(lpt_ofisa, sizeof(struct lpt_ofisa_softc), | |
69 | lpt_ofisa_probe, lpt_ofisa_attach, NULL, NULL); | 69 | lpt_ofisa_probe, lpt_ofisa_attach, NULL, NULL); | |
70 | 70 | |||
71 | static const struct device_compatible_entry compat_data[] = { | 71 | static const struct device_compatible_entry compat_data[] = { | |
72 | { .compat = "pnpPNP,401" }, | 72 | { .compat = "pnpPNP,401" }, | |
73 | { } | 73 | DEVICE_COMPAT_EOL | |
74 | }; | 74 | }; | |
75 | 75 | |||
76 | int | 76 | int | |
77 | lpt_ofisa_probe(device_t parent, cfdata_t cf, void *aux) | 77 | lpt_ofisa_probe(device_t parent, cfdata_t cf, void *aux) | |
78 | { | 78 | { | |
79 | struct ofisa_attach_args *aa = aux; | 79 | struct ofisa_attach_args *aa = aux; | |
80 | int rv; | 80 | int rv; | |
81 | 81 | |||
82 | rv = of_match_compat_data(aa->oba.oba_phandle, compat_data) ? 5 : 0; | 82 | rv = of_match_compat_data(aa->oba.oba_phandle, compat_data) ? 5 : 0; | |
83 | #ifdef _LPT_OFISA_MD_MATCH | 83 | #ifdef _LPT_OFISA_MD_MATCH | |
84 | if (!rv) | 84 | if (!rv) | |
85 | rv = lpt_ofisa_md_match(parent, cf, aux); | 85 | rv = lpt_ofisa_md_match(parent, cf, aux); | |
86 | #endif | 86 | #endif |
--- src/sys/dev/ofisa/pckbc_ofisa.c 2021/01/25 16:21:41 1.17
+++ src/sys/dev/ofisa/pckbc_ofisa.c 2021/01/27 02:31:03 1.18
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: pckbc_ofisa.c,v 1.17 2021/01/25 16:21:41 thorpej Exp $ */ | 1 | /* $NetBSD: pckbc_ofisa.c,v 1.18 2021/01/27 02:31:03 thorpej Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1998 | 4 | * Copyright (c) 1998 | |
5 | * Matthias Drochner. All rights reserved. | 5 | * Matthias Drochner. All rights reserved. | |
6 | * Copyright (c) 2001 | 6 | * Copyright (c) 2001 | |
7 | * Matt Thomas. All rights reserved. | 7 | * Matt Thomas. All rights reserved. | |
8 | * | 8 | * | |
9 | * Redistribution and use in source and binary forms, with or without | 9 | * Redistribution and use in source and binary forms, with or without | |
10 | * modification, are permitted provided that the following conditions | 10 | * modification, are permitted provided that the following conditions | |
11 | * are met: | 11 | * are met: | |
12 | * 1. Redistributions of source code must retain the above copyright | 12 | * 1. Redistributions of source code must retain the above copyright | |
13 | * notice, this list of conditions and the following disclaimer. | 13 | * notice, this list of conditions and the following disclaimer. | |
14 | * 2. Redistributions in binary form must reproduce the above copyright | 14 | * 2. Redistributions in binary form must reproduce the above copyright | |
@@ -18,27 +18,27 @@ | @@ -18,27 +18,27 @@ | |||
18 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | 18 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | |
19 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | 19 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | |
20 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | 20 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | |
21 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | 21 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | |
22 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | 22 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | |
23 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 23 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
24 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 24 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
25 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 25 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | |
27 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
28 | */ | 28 | */ | |
29 | 29 | |||
30 | #include <sys/cdefs.h> | 30 | #include <sys/cdefs.h> | |
31 | __KERNEL_RCSID(0, "$NetBSD: pckbc_ofisa.c,v 1.17 2021/01/25 16:21:41 thorpej Exp $"); | 31 | __KERNEL_RCSID(0, "$NetBSD: pckbc_ofisa.c,v 1.18 2021/01/27 02:31:03 thorpej Exp $"); | |
32 | 32 | |||
33 | #include <sys/param.h> | 33 | #include <sys/param.h> | |
34 | #include <sys/systm.h> | 34 | #include <sys/systm.h> | |
35 | #include <sys/kernel.h> | 35 | #include <sys/kernel.h> | |
36 | #include <sys/proc.h> | 36 | #include <sys/proc.h> | |
37 | #include <sys/device.h> | 37 | #include <sys/device.h> | |
38 | #include <sys/malloc.h> | 38 | #include <sys/malloc.h> | |
39 | #include <sys/errno.h> | 39 | #include <sys/errno.h> | |
40 | #include <sys/queue.h> | 40 | #include <sys/queue.h> | |
41 | #include <sys/bus.h> | 41 | #include <sys/bus.h> | |
42 | 42 | |||
43 | #include <dev/isa/isareg.h> | 43 | #include <dev/isa/isareg.h> | |
44 | #include <dev/isa/isavar.h> | 44 | #include <dev/isa/isavar.h> | |
@@ -56,33 +56,33 @@ struct pckbc_ofisa_softc { | @@ -56,33 +56,33 @@ struct pckbc_ofisa_softc { | |||
56 | struct pckbc_softc sc_pckbc; | 56 | struct pckbc_softc sc_pckbc; | |
57 | 57 | |||
58 | isa_chipset_tag_t sc_ic; | 58 | isa_chipset_tag_t sc_ic; | |
59 | struct ofisa_intr_desc sc_intr[PCKBC_NSLOTS]; | 59 | struct ofisa_intr_desc sc_intr[PCKBC_NSLOTS]; | |
60 | }; | 60 | }; | |
61 | 61 | |||
62 | CFATTACH_DECL_NEW(pckbc_ofisa, sizeof(struct pckbc_ofisa_softc), | 62 | CFATTACH_DECL_NEW(pckbc_ofisa, sizeof(struct pckbc_ofisa_softc), | |
63 | pckbc_ofisa_match, pckbc_ofisa_attach, NULL, NULL); | 63 | pckbc_ofisa_match, pckbc_ofisa_attach, NULL, NULL); | |
64 | 64 | |||
65 | static void pckbc_ofisa_intr_establish (struct pckbc_softc *, pckbc_slot_t); | 65 | static void pckbc_ofisa_intr_establish (struct pckbc_softc *, pckbc_slot_t); | |
66 | 66 | |||
67 | static const struct device_compatible_entry compat_data[] = { | 67 | static const struct device_compatible_entry compat_data[] = { | |
68 | { .compat = "INTC,80c42" }, | 68 | { .compat = "INTC,80c42" }, | |
69 | { } | 69 | DEVICE_COMPAT_EOL | |
70 | }; | 70 | }; | |
71 | 71 | |||
72 | static const struct device_compatible_entry port_compat_data[] = { | 72 | static const struct device_compatible_entry port_compat_data[] = { | |
73 | { .compat = "pnpPNP,303", .value = PCKBC_KBD_SLOT }, | 73 | { .compat = "pnpPNP,303", .value = PCKBC_KBD_SLOT }, | |
74 | { .compat = "pnpPNP,f03", .value = PCKBC_AUX_SLOT }, | 74 | { .compat = "pnpPNP,f03", .value = PCKBC_AUX_SLOT }, | |
75 | { } | 75 | DEVICE_COMPAT_EOL | |
76 | }; | 76 | }; | |
77 | 77 | |||
78 | static int | 78 | static int | |
79 | pckbc_ofisa_match(device_t parent, cfdata_t match, void *aux) | 79 | pckbc_ofisa_match(device_t parent, cfdata_t match, void *aux) | |
80 | { | 80 | { | |
81 | struct ofisa_attach_args *aa = aux; | 81 | struct ofisa_attach_args *aa = aux; | |
82 | 82 | |||
83 | return of_match_compat_data(aa->oba.oba_phandle, compat_data) ? 5 : 0; | 83 | return of_match_compat_data(aa->oba.oba_phandle, compat_data) ? 5 : 0; | |
84 | } | 84 | } | |
85 | 85 | |||
86 | static void | 86 | static void | |
87 | pckbc_ofisa_attach(device_t parent, device_t self, void *aux) | 87 | pckbc_ofisa_attach(device_t parent, device_t self, void *aux) | |
88 | { | 88 | { |
--- src/sys/dev/ofisa/ofisa.c 2021/01/25 16:21:41 1.28
+++ src/sys/dev/ofisa/ofisa.c 2021/01/27 02:31:03 1.29
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: ofisa.c,v 1.28 2021/01/25 16:21:41 thorpej Exp $ */ | 1 | /* $NetBSD: ofisa.c,v 1.29 2021/01/27 02:31:03 thorpej Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright 1997, 1998 | 4 | * Copyright 1997, 1998 | |
5 | * Digital Equipment Corporation. All rights reserved. | 5 | * Digital Equipment Corporation. All rights reserved. | |
6 | * | 6 | * | |
7 | * This software is furnished under license and may be used and | 7 | * This software is furnished under license and may be used and | |
8 | * copied only in accordance with the following terms and conditions. | 8 | * copied only in accordance with the following terms and conditions. | |
9 | * Subject to these conditions, you may download, copy, install, | 9 | * Subject to these conditions, you may download, copy, install, | |
10 | * use, modify and distribute this software in source and/or binary | 10 | * use, modify and distribute this software in source and/or binary | |
11 | * form. No title or ownership is transferred hereby. | 11 | * form. No title or ownership is transferred hereby. | |
12 | * | 12 | * | |
13 | * 1) Any source code used, modified or distributed must reproduce | 13 | * 1) Any source code used, modified or distributed must reproduce | |
14 | * and retain this copyright notice and list of conditions as | 14 | * and retain this copyright notice and list of conditions as | |
@@ -24,27 +24,27 @@ | @@ -24,27 +24,27 @@ | |||
24 | * 3) This software is provided "AS-IS" and any express or implied | 24 | * 3) This software is provided "AS-IS" and any express or implied | |
25 | * warranties, including but not limited to, any implied warranties | 25 | * warranties, including but not limited to, any implied warranties | |
26 | * of merchantability, fitness for a particular purpose, or | 26 | * of merchantability, fitness for a particular purpose, or | |
27 | * non-infringement are disclaimed. In no event shall DIGITAL be | 27 | * non-infringement are disclaimed. In no event shall DIGITAL be | |
28 | * liable for any damages whatsoever, and in particular, DIGITAL | 28 | * liable for any damages whatsoever, and in particular, DIGITAL | |
29 | * shall not be liable for special, indirect, consequential, or | 29 | * shall not be liable for special, indirect, consequential, or | |
30 | * incidental damages or damages for lost profits, loss of | 30 | * incidental damages or damages for lost profits, loss of | |
31 | * revenue or loss of use, whether such damages arise in contract, | 31 | * revenue or loss of use, whether such damages arise in contract, | |
32 | * negligence, tort, under statute, in equity, at law or otherwise, | 32 | * negligence, tort, under statute, in equity, at law or otherwise, | |
33 | * even if advised of the possibility of such damage. | 33 | * even if advised of the possibility of such damage. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <sys/cdefs.h> | 36 | #include <sys/cdefs.h> | |
37 | __KERNEL_RCSID(0, "$NetBSD: ofisa.c,v 1.28 2021/01/25 16:21:41 thorpej Exp $"); | 37 | __KERNEL_RCSID(0, "$NetBSD: ofisa.c,v 1.29 2021/01/27 02:31:03 thorpej Exp $"); | |
38 | 38 | |||
39 | #include <sys/param.h> | 39 | #include <sys/param.h> | |
40 | #include <sys/systm.h> | 40 | #include <sys/systm.h> | |
41 | #include <sys/device.h> | 41 | #include <sys/device.h> | |
42 | #include <sys/malloc.h> | 42 | #include <sys/malloc.h> | |
43 | #include <sys/bus.h> | 43 | #include <sys/bus.h> | |
44 | #include <sys/intr.h> | 44 | #include <sys/intr.h> | |
45 | 45 | |||
46 | #include <dev/ofw/openfirm.h> | 46 | #include <dev/ofw/openfirm.h> | |
47 | #include <dev/isa/isavar.h> | 47 | #include <dev/isa/isavar.h> | |
48 | #include <dev/ofisa/ofisavar.h> | 48 | #include <dev/ofisa/ofisavar.h> | |
49 | 49 | |||
50 | #include "isadma.h" | 50 | #include "isadma.h" | |
@@ -67,27 +67,27 @@ ofisaprint(void *aux, const char *pnp) | @@ -67,27 +67,27 @@ ofisaprint(void *aux, const char *pnp) | |||
67 | struct ofbus_attach_args *oba = aux; | 67 | struct ofbus_attach_args *oba = aux; | |
68 | char name[64]; | 68 | char name[64]; | |
69 | 69 | |||
70 | (void)of_packagename(oba->oba_phandle, name, sizeof name); | 70 | (void)of_packagename(oba->oba_phandle, name, sizeof name); | |
71 | if (pnp) | 71 | if (pnp) | |
72 | aprint_normal("%s at %s", name, pnp); | 72 | aprint_normal("%s at %s", name, pnp); | |
73 | else | 73 | else | |
74 | aprint_normal(" (%s)", name); | 74 | aprint_normal(" (%s)", name); | |
75 | return UNCONF; | 75 | return UNCONF; | |
76 | } | 76 | } | |
77 | 77 | |||
78 | static const struct device_compatible_entry compat_data[] = { | 78 | static const struct device_compatible_entry compat_data[] = { | |
79 | { .compat = "pnpPNP,a00" }, | 79 | { .compat = "pnpPNP,a00" }, | |
80 | { } | 80 | DEVICE_COMPAT_EOL | |
81 | }; | 81 | }; | |
82 | 82 | |||
83 | int | 83 | int | |
84 | ofisamatch(device_t parent, cfdata_t cf, void *aux) | 84 | ofisamatch(device_t parent, cfdata_t cf, void *aux) | |
85 | { | 85 | { | |
86 | struct ofbus_attach_args *oba = aux; | 86 | struct ofbus_attach_args *oba = aux; | |
87 | int rv; | 87 | int rv; | |
88 | 88 | |||
89 | rv = of_match_compat_data(oba->oba_phandle, compat_data) ? 5 : 0; | 89 | rv = of_match_compat_data(oba->oba_phandle, compat_data) ? 5 : 0; | |
90 | #ifdef _OFISA_MD_MATCH | 90 | #ifdef _OFISA_MD_MATCH | |
91 | if (!rv) | 91 | if (!rv) | |
92 | rv = ofisa_md_match(parent, cf, aux); | 92 | rv = ofisa_md_match(parent, cf, aux); | |
93 | #endif | 93 | #endif |
--- src/sys/dev/ofisa/sb_ofisa.c 2021/01/25 16:21:41 1.21
+++ src/sys/dev/ofisa/sb_ofisa.c 2021/01/27 02:31:03 1.22
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: sb_ofisa.c,v 1.21 2021/01/25 16:21:41 thorpej Exp $ */ | 1 | /* $NetBSD: sb_ofisa.c,v 1.22 2021/01/27 02:31:03 thorpej 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 Jason R. Thorpe of the Numerical Aerospace Simulation Facility, | 8 | * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, | |
9 | * NASA Ames Research Center. | 9 | * NASA Ames Research Center. | |
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 | |
@@ -21,27 +21,27 @@ | @@ -21,27 +21,27 @@ | |||
21 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | 21 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
24 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 24 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
25 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 25 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
26 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 26 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
27 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 27 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
28 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 28 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
29 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 29 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
30 | * POSSIBILITY OF SUCH DAMAGE. | 30 | * POSSIBILITY OF SUCH DAMAGE. | |
31 | */ | 31 | */ | |
32 | 32 | |||
33 | #include <sys/cdefs.h> | 33 | #include <sys/cdefs.h> | |
34 | __KERNEL_RCSID(0, "$NetBSD: sb_ofisa.c,v 1.21 2021/01/25 16:21:41 thorpej Exp $"); | 34 | __KERNEL_RCSID(0, "$NetBSD: sb_ofisa.c,v 1.22 2021/01/27 02:31:03 thorpej Exp $"); | |
35 | 35 | |||
36 | #include <sys/param.h> | 36 | #include <sys/param.h> | |
37 | #include <sys/systm.h> | 37 | #include <sys/systm.h> | |
38 | #include <sys/device.h> | 38 | #include <sys/device.h> | |
39 | 39 | |||
40 | #include <sys/bus.h> | 40 | #include <sys/bus.h> | |
41 | #include <sys/intr.h> | 41 | #include <sys/intr.h> | |
42 | 42 | |||
43 | #include <sys/audioio.h> | 43 | #include <sys/audioio.h> | |
44 | #include <dev/audio/audio_if.h> | 44 | #include <dev/audio/audio_if.h> | |
45 | #include <dev/midi_if.h> | 45 | #include <dev/midi_if.h> | |
46 | 46 | |||
47 | #include <dev/ofw/openfirm.h> | 47 | #include <dev/ofw/openfirm.h> | |
@@ -53,27 +53,27 @@ __KERNEL_RCSID(0, "$NetBSD: sb_ofisa.c,v | @@ -53,27 +53,27 @@ __KERNEL_RCSID(0, "$NetBSD: sb_ofisa.c,v | |||
53 | #include <dev/isa/sbdspvar.h> | 53 | #include <dev/isa/sbdspvar.h> | |
54 | 54 | |||
55 | int sb_ofisa_match(device_t, cfdata_t, void *); | 55 | int sb_ofisa_match(device_t, cfdata_t, void *); | |
56 | void sb_ofisa_attach(device_t, device_t, void *); | 56 | void sb_ofisa_attach(device_t, device_t, void *); | |
57 | 57 | |||
58 | CFATTACH_DECL_NEW(sb_ofisa, sizeof(struct sbdsp_softc), | 58 | CFATTACH_DECL_NEW(sb_ofisa, sizeof(struct sbdsp_softc), | |
59 | sb_ofisa_match, sb_ofisa_attach, NULL, NULL); | 59 | sb_ofisa_match, sb_ofisa_attach, NULL, NULL); | |
60 | 60 | |||
61 | static const struct device_compatible_entry compat_data[] = { | 61 | static const struct device_compatible_entry compat_data[] = { | |
62 | { .compat = "pnpPNP,b000" }, /* generic SB 1.5 */ | 62 | { .compat = "pnpPNP,b000" }, /* generic SB 1.5 */ | |
63 | { .compat = "pnpPNP,b001" }, /* generic SB 2.0 */ | 63 | { .compat = "pnpPNP,b001" }, /* generic SB 2.0 */ | |
64 | { .compat = "pnpPNP,b002" }, /* generic SB Pro */ | 64 | { .compat = "pnpPNP,b002" }, /* generic SB Pro */ | |
65 | { .compat = "pnpPNP,b003" }, /* generic SB 16 */ | 65 | { .compat = "pnpPNP,b003" }, /* generic SB 16 */ | |
66 | { } | 66 | DEVICE_COMPAT_EOL | |
67 | }; | 67 | }; | |
68 | 68 | |||
69 | int | 69 | int | |
70 | sb_ofisa_match(device_t parent, cfdata_t cf, void *aux) | 70 | sb_ofisa_match(device_t parent, cfdata_t cf, void *aux) | |
71 | { | 71 | { | |
72 | struct ofisa_attach_args *aa = aux; | 72 | struct ofisa_attach_args *aa = aux; | |
73 | 73 | |||
74 | /* | 74 | /* | |
75 | * Use a low match priority so that a more specific driver | 75 | * Use a low match priority so that a more specific driver | |
76 | * can match, e.g. a native ESS driver. | 76 | * can match, e.g. a native ESS driver. | |
77 | */ | 77 | */ | |
78 | return of_match_compat_data(aa->oba.oba_phandle, compat_data) ? 1 : 0; | 78 | return of_match_compat_data(aa->oba.oba_phandle, compat_data) ? 1 : 0; | |
79 | } | 79 | } |
--- src/sys/dev/ofisa/wdc_ofisa.c 2021/01/25 16:21:41 1.38
+++ src/sys/dev/ofisa/wdc_ofisa.c 2021/01/27 02:31:03 1.39
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: wdc_ofisa.c,v 1.38 2021/01/25 16:21:41 thorpej Exp $ */ | 1 | /* $NetBSD: wdc_ofisa.c,v 1.39 2021/01/27 02:31:03 thorpej Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright 1997, 1998 | 4 | * Copyright 1997, 1998 | |
5 | * Digital Equipment Corporation. All rights reserved. | 5 | * Digital Equipment Corporation. All rights reserved. | |
6 | * | 6 | * | |
7 | * This software is furnished under license and may be used and | 7 | * This software is furnished under license and may be used and | |
8 | * copied only in accordance with the following terms and conditions. | 8 | * copied only in accordance with the following terms and conditions. | |
9 | * Subject to these conditions, you may download, copy, install, | 9 | * Subject to these conditions, you may download, copy, install, | |
10 | * use, modify and distribute this software in source and/or binary | 10 | * use, modify and distribute this software in source and/or binary | |
11 | * form. No title or ownership is transferred hereby. | 11 | * form. No title or ownership is transferred hereby. | |
12 | * | 12 | * | |
13 | * 1) Any source code used, modified or distributed must reproduce | 13 | * 1) Any source code used, modified or distributed must reproduce | |
14 | * and retain this copyright notice and list of conditions as | 14 | * and retain this copyright notice and list of conditions as | |
@@ -28,27 +28,27 @@ | @@ -28,27 +28,27 @@ | |||
28 | * liable for any damages whatsoever, and in particular, DIGITAL | 28 | * liable for any damages whatsoever, and in particular, DIGITAL | |
29 | * shall not be liable for special, indirect, consequential, or | 29 | * shall not be liable for special, indirect, consequential, or | |
30 | * incidental damages or damages for lost profits, loss of | 30 | * incidental damages or damages for lost profits, loss of | |
31 | * revenue or loss of use, whether such damages arise in contract, | 31 | * revenue or loss of use, whether such damages arise in contract, | |
32 | * negligence, tort, under statute, in equity, at law or otherwise, | 32 | * negligence, tort, under statute, in equity, at law or otherwise, | |
33 | * even if advised of the possibility of such damage. | 33 | * even if advised of the possibility of such damage. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | /* | 36 | /* | |
37 | * OFW Attachment for 'wdc' disk controller driver | 37 | * OFW Attachment for 'wdc' disk controller driver | |
38 | */ | 38 | */ | |
39 | 39 | |||
40 | #include <sys/cdefs.h> | 40 | #include <sys/cdefs.h> | |
41 | __KERNEL_RCSID(0, "$NetBSD: wdc_ofisa.c,v 1.38 2021/01/25 16:21:41 thorpej Exp $"); | 41 | __KERNEL_RCSID(0, "$NetBSD: wdc_ofisa.c,v 1.39 2021/01/27 02:31:03 thorpej Exp $"); | |
42 | 42 | |||
43 | #include <sys/param.h> | 43 | #include <sys/param.h> | |
44 | #include <sys/device.h> | 44 | #include <sys/device.h> | |
45 | #include <sys/systm.h> | 45 | #include <sys/systm.h> | |
46 | #include <sys/tty.h> | 46 | #include <sys/tty.h> | |
47 | #include <sys/malloc.h> | 47 | #include <sys/malloc.h> | |
48 | 48 | |||
49 | #include <sys/intr.h> | 49 | #include <sys/intr.h> | |
50 | #include <sys/bus.h> | 50 | #include <sys/bus.h> | |
51 | 51 | |||
52 | #include <dev/ofw/openfirm.h> | 52 | #include <dev/ofw/openfirm.h> | |
53 | #include <dev/isa/isavar.h> | 53 | #include <dev/isa/isavar.h> | |
54 | #include <dev/ofisa/ofisavar.h> | 54 | #include <dev/ofisa/ofisavar.h> | |
@@ -63,27 +63,27 @@ struct wdc_ofisa_softc { | @@ -63,27 +63,27 @@ struct wdc_ofisa_softc { | |||
63 | struct ata_channel sc_channel; | 63 | struct ata_channel sc_channel; | |
64 | struct wdc_regs wdc_regs; | 64 | struct wdc_regs wdc_regs; | |
65 | void *sc_ih; | 65 | void *sc_ih; | |
66 | }; | 66 | }; | |
67 | 67 | |||
68 | static int wdc_ofisa_probe(device_t, cfdata_t, void *); | 68 | static int wdc_ofisa_probe(device_t, cfdata_t, void *); | |
69 | static void wdc_ofisa_attach(device_t, device_t, void *); | 69 | static void wdc_ofisa_attach(device_t, device_t, void *); | |
70 | 70 | |||
71 | CFATTACH_DECL_NEW(wdc_ofisa, sizeof(struct wdc_ofisa_softc), | 71 | CFATTACH_DECL_NEW(wdc_ofisa, sizeof(struct wdc_ofisa_softc), | |
72 | wdc_ofisa_probe, wdc_ofisa_attach, NULL, NULL); | 72 | wdc_ofisa_probe, wdc_ofisa_attach, NULL, NULL); | |
73 | 73 | |||
74 | static const struct device_compatible_entry compat_data[] = { | 74 | static const struct device_compatible_entry compat_data[] = { | |
75 | { .compat = "pnpPNP,600" }, | 75 | { .compat = "pnpPNP,600" }, | |
76 | { } | 76 | DEVICE_COMPAT_EOL | |
77 | }; | 77 | }; | |
78 | 78 | |||
79 | static int | 79 | static int | |
80 | wdc_ofisa_probe(device_t parent, cfdata_t cf, void *aux) | 80 | wdc_ofisa_probe(device_t parent, cfdata_t cf, void *aux) | |
81 | { | 81 | { | |
82 | struct ofisa_attach_args *aa = aux; | 82 | struct ofisa_attach_args *aa = aux; | |
83 | int rv; | 83 | int rv; | |
84 | 84 | |||
85 | rv = of_match_compat_data(aa->oba.oba_phandle, compat_data) ? 5 : 0; | 85 | rv = of_match_compat_data(aa->oba.oba_phandle, compat_data) ? 5 : 0; | |
86 | #ifdef _WDC_OFISA_MD_MATCH | 86 | #ifdef _WDC_OFISA_MD_MATCH | |
87 | if (!rv) | 87 | if (!rv) | |
88 | rv = wdc_ofisa_md_match(parent, cf, aux); | 88 | rv = wdc_ofisa_md_match(parent, cf, aux); | |
89 | #endif | 89 | #endif |