Wed Aug 4 02:53:01 2021 UTC ()
Adapt to CFARGS().


(thorpej)
diff -r1.3 -r1.3.8.1 src/sys/arch/riscv/htif/htif.c
diff -r1.3 -r1.3.8.1 src/sys/arch/riscv/riscv/mainbus.c
diff -r1.5 -r1.5.8.1 src/sys/arch/rs6000/mca/ioplanar.c
diff -r1.6 -r1.6.8.1 src/sys/arch/rs6000/rs6000/mainbus.c
diff -r1.7 -r1.7.8.1 src/sys/arch/sandpoint/sandpoint/eumb.c
diff -r1.33 -r1.33.8.1 src/sys/arch/sandpoint/sandpoint/mainbus.c
diff -r1.3 -r1.3.8.1 src/sys/arch/sandpoint/sandpoint/nhpow.c
diff -r1.13 -r1.13.8.1 src/sys/arch/sbmips/sbmips/zbbus.c
diff -r1.48 -r1.48.8.1 src/sys/arch/sgimips/dev/crmfb.c
diff -r1.36 -r1.36.8.1 src/sys/arch/sgimips/dev/imc.c
diff -r1.18 -r1.18.8.1 src/sys/arch/sgimips/dev/pic.c
diff -r1.40 -r1.40.8.1 src/sys/arch/sgimips/dev/zs.c
diff -r1.12 -r1.12.8.1 src/sys/arch/sgimips/dev/zs_kbd.c
diff -r1.9 -r1.9.8.1 src/sys/arch/sgimips/dev/zs_ms.c
diff -r1.37 -r1.37.8.1 src/sys/arch/sgimips/gio/gio.c
diff -r1.17 -r1.17.8.1 src/sys/arch/sgimips/gio/grtwo.c
diff -r1.9 -r1.9.8.1 src/sys/arch/sgimips/gio/light.c
diff -r1.22 -r1.22.8.1 src/sys/arch/sgimips/gio/newport.c
diff -r1.18 -r1.18.8.1 src/sys/arch/sgimips/gio/pci_gio.c
diff -r1.72 -r1.72.8.1 src/sys/arch/sgimips/hpc/hpc.c
diff -r1.14 -r1.14.8.1 src/sys/arch/sgimips/hpc/pi1ppc.c
diff -r1.12 -r1.12.8.1 src/sys/arch/sgimips/ioc/ioc.c
diff -r1.5 -r1.5.8.1 src/sys/arch/sgimips/ioc/oioc.c
diff -r1.24 -r1.24.8.1 src/sys/arch/sgimips/mace/mace.c
diff -r1.24 -r1.24.8.1 src/sys/arch/sgimips/mace/pci_mace.c
diff -r1.21 -r1.21.8.1 src/sys/arch/sgimips/sgimips/mainbus.c
diff -r1.14 -r1.14.8.1 src/sys/arch/sh3/dev/adc.c
diff -r1.15 -r1.15.8.1 src/sys/arch/sh3/dev/shb.c
diff -r1.21 -r1.21.8.1 src/sys/arch/sh3/dev/shpcic.c

cvs diff -r1.3 -r1.3.8.1 src/sys/arch/riscv/htif/Attic/htif.c (expand / switch to unified diff)

--- src/sys/arch/riscv/htif/Attic/htif.c 2021/04/24 23:36:47 1.3
+++ src/sys/arch/riscv/htif/Attic/htif.c 2021/08/04 02:52:59 1.3.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: htif.c,v 1.3 2021/04/24 23:36:47 thorpej Exp $ */ 1/* $NetBSD: htif.c,v 1.3.8.1 2021/08/04 02:52:59 thorpej Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2014 The NetBSD Foundation, Inc. 4 * Copyright (c) 2014 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 Matt Thomas of 3am Software Foundry. 8 * by Matt Thomas of 3am Software Foundry.
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.
@@ -21,27 +21,27 @@ @@ -21,27 +21,27 @@
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 33
34__RCSID("$NetBSD: htif.c,v 1.3 2021/04/24 23:36:47 thorpej Exp $"); 34__RCSID("$NetBSD: htif.c,v 1.3.8.1 2021/08/04 02:52:59 thorpej Exp $");
35 35
36#include <sys/param.h> 36#include <sys/param.h>
37#include <sys/device.h> 37#include <sys/device.h>
38 38
39#include <riscv/locore.h> 39#include <riscv/locore.h>
40#include <riscv/htif/htif_var.h> 40#include <riscv/htif/htif_var.h>
41 41
42static int htif_mainbus_match(device_t, cfdata_t, void *); 42static int htif_mainbus_match(device_t, cfdata_t, void *);
43static void htif_mainbus_attach(device_t, device_t, void *); 43static void htif_mainbus_attach(device_t, device_t, void *);
44 44
45CFATTACH_DECL_NEW(htif_mainbus, 0, 45CFATTACH_DECL_NEW(htif_mainbus, 0,
46 htif_mainbus_match, htif_mainbus_attach, NULL, NULL); 46 htif_mainbus_match, htif_mainbus_attach, NULL, NULL);
47 47
@@ -58,17 +58,17 @@ htif_mainbus_match(device_t parent, cfda @@ -58,17 +58,17 @@ htif_mainbus_match(device_t parent, cfda
58 58
59static int 59static int
60htif_mainbus_print(void *aux, const char *name) 60htif_mainbus_print(void *aux, const char *name)
61{ 61{
62 return QUIET; 62 return QUIET;
63} 63}
64 64
65void 65void
66htif_mainbus_attach(device_t parent, device_t self, void *aux) 66htif_mainbus_attach(device_t parent, device_t self, void *aux)
67{ 67{
68 struct htif_attach_args haa; 68 struct htif_attach_args haa;
69 69
70 haa.haa_name = "htifcons"; 70 haa.haa_name = "htifcons";
71 config_found(self, &haa, htif_mainbus_print, CFARG_EOL); 71 config_found(self, &haa, htif_mainbus_print, CFARGS_NONE);
72 haa.haa_name = "htifdisk"; 72 haa.haa_name = "htifdisk";
73 config_found(self, &haa, htif_mainbus_print, CFARG_EOL); 73 config_found(self, &haa, htif_mainbus_print, CFARGS_NONE);
74} 74}

cvs diff -r1.3 -r1.3.8.1 src/sys/arch/riscv/riscv/mainbus.c (expand / switch to unified diff)

--- src/sys/arch/riscv/riscv/mainbus.c 2021/04/24 23:36:47 1.3
+++ src/sys/arch/riscv/riscv/mainbus.c 2021/08/04 02:52:59 1.3.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: mainbus.c,v 1.3 2021/04/24 23:36:47 thorpej Exp $ */ 1/* $NetBSD: mainbus.c,v 1.3.8.1 2021/08/04 02:52:59 thorpej Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2014 The NetBSD Foundation, Inc. 4 * Copyright (c) 2014 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 Matt Thomas of 3am Software Foundry. 8 * by Matt Thomas of 3am Software Foundry.
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.
@@ -23,27 +23,27 @@ @@ -23,27 +23,27 @@
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 "locators.h" 32#include "locators.h"
33 33
34#include <sys/cdefs.h> 34#include <sys/cdefs.h>
35 35
36__RCSID("$NetBSD: mainbus.c,v 1.3 2021/04/24 23:36:47 thorpej Exp $"); 36__RCSID("$NetBSD: mainbus.c,v 1.3.8.1 2021/08/04 02:52:59 thorpej Exp $");
37 37
38#include <sys/param.h> 38#include <sys/param.h>
39#include <sys/systm.h> 39#include <sys/systm.h>
40#include <sys/device.h> 40#include <sys/device.h>
41 41
42#include <riscv/locore.h> 42#include <riscv/locore.h>
43 43
44static int mainbus_match(device_t, cfdata_t, void *); 44static int mainbus_match(device_t, cfdata_t, void *);
45static void mainbus_attach(device_t, device_t, void *); 45static void mainbus_attach(device_t, device_t, void *);
46 46
47CFATTACH_DECL_NEW(mainbus, 0, 47CFATTACH_DECL_NEW(mainbus, 0,
48 mainbus_match, mainbus_attach, NULL, NULL); 48 mainbus_match, mainbus_attach, NULL, NULL);
49 49
@@ -62,15 +62,15 @@ int @@ -62,15 +62,15 @@ int
62mainbus_match(device_t parent, cfdata_t cf, void *aux) 62mainbus_match(device_t parent, cfdata_t cf, void *aux)
63{ 63{
64 return 1; 64 return 1;
65} 65}
66 66
67void 67void
68mainbus_attach(device_t parent, device_t self, void *aux) 68mainbus_attach(device_t parent, device_t self, void *aux)
69{ 69{
70 struct mainbus_attach_args maa; 70 struct mainbus_attach_args maa;
71 71
72 maa.maa_name = "cpu"; 72 maa.maa_name = "cpu";
73 maa.maa_instance = 0; 73 maa.maa_instance = 0;
74 74
75 config_found(self, &maa, mainbus_print, CFARG_EOL); 75 config_found(self, &maa, mainbus_print, CFARGS_NONE);
76} 76}

cvs diff -r1.5 -r1.5.8.1 src/sys/arch/rs6000/mca/ioplanar.c (expand / switch to unified diff)

--- src/sys/arch/rs6000/mca/ioplanar.c 2021/04/24 23:36:47 1.5
+++ src/sys/arch/rs6000/mca/ioplanar.c 2021/08/04 02:52:59 1.5.8.1
@@ -18,27 +18,27 @@ @@ -18,27 +18,27 @@
18 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 18 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
19 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 19 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 20 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
21 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27 * POSSIBILITY OF SUCH DAMAGE. 27 * POSSIBILITY OF SUCH DAMAGE.
28 */ 28 */
29 29
30#include <sys/cdefs.h> 30#include <sys/cdefs.h>
31__KERNEL_RCSID(0, "$NetBSD: ioplanar.c,v 1.5 2021/04/24 23:36:47 thorpej Exp $"); 31__KERNEL_RCSID(0, "$NetBSD: ioplanar.c,v 1.5.8.1 2021/08/04 02:52:59 thorpej Exp $");
32 32
33#include <sys/param.h> 33#include <sys/param.h>
34#include <sys/device.h> 34#include <sys/device.h>
35#include <sys/bus.h> 35#include <sys/bus.h>
36 36
37#include <machine/intr.h> 37#include <machine/intr.h>
38 38
39#include <dev/mca/mcavar.h> 39#include <dev/mca/mcavar.h>
40#include <dev/mca/mcadevs.h> 40#include <dev/mca/mcadevs.h>
41 41
42#include <rs6000/ioplanar/ioplanarvar.h> 42#include <rs6000/ioplanar/ioplanarvar.h>
43 43
44static int ioplanar_match(device_t, cfdata_t, void *); 44static int ioplanar_match(device_t, cfdata_t, void *);
@@ -77,50 +77,49 @@ ioplanar_attach(device_t parent, device_ @@ -77,50 +77,49 @@ ioplanar_attach(device_t parent, device_
77 struct mca_attach_args *ma = aux; 77 struct mca_attach_args *ma = aux;
78 78
79 aprint_normal("\n"); 79 aprint_normal("\n");
80 80
81 ioplanar_softc = sc; 81 ioplanar_softc = sc;
82 sc->sc_dev = self; 82 sc->sc_dev = self;
83 sc->sc_ic = ma->ma_mc; 83 sc->sc_ic = ma->ma_mc;
84 sc->sc_iot = ma->ma_iot; 84 sc->sc_iot = ma->ma_iot;
85 sc->sc_memt = ma->ma_memt; 85 sc->sc_memt = ma->ma_memt;
86 sc->sc_dmat = ma->ma_dmat; 86 sc->sc_dmat = ma->ma_dmat;
87 sc->sc_devid = ma->ma_id; 87 sc->sc_devid = ma->ma_id;
88 88
89 config_search(self, aux, 89 config_search(self, aux,
90 CFARG_SEARCH, ioplanar_search, 90 CFARGS(.search = ioplanar_search));
91 CFARG_EOL); 
92} 91}
93 92
94static int 93static int
95ioplanar_search(device_t parent, cfdata_t cf, const int *ldesc, void *aux) 94ioplanar_search(device_t parent, cfdata_t cf, const int *ldesc, void *aux)
96{ 95{
97 struct ioplanar_dev_attach_args idaa; 96 struct ioplanar_dev_attach_args idaa;
98 struct mca_attach_args *ma = aux; 97 struct mca_attach_args *ma = aux;
99 int i; 98 int i;
100 99
101 idaa.idaa_mc = ma->ma_mc; 100 idaa.idaa_mc = ma->ma_mc;
102 idaa.idaa_iot = ma->ma_iot; 101 idaa.idaa_iot = ma->ma_iot;
103 idaa.idaa_memt = ma->ma_memt;  102 idaa.idaa_memt = ma->ma_memt;
104 idaa.idaa_dmat = ma->ma_dmat; 103 idaa.idaa_dmat = ma->ma_dmat;
105 idaa.idaa_devid = ma->ma_id; 104 idaa.idaa_devid = ma->ma_id;
106 105
107 switch (ma->ma_id) { 106 switch (ma->ma_id) {
108 case MCA_PRODUCT_IBM_SIO_RAINBOW: 107 case MCA_PRODUCT_IBM_SIO_RAINBOW:
109 for (i=0; i < RAINBOW_DEVS; i++) { 108 for (i=0; i < RAINBOW_DEVS; i++) {
110 idaa.idaa_device = rainbow_map[i]; 109 idaa.idaa_device = rainbow_map[i];
111 if (config_probe(parent, cf, &idaa)) 110 if (config_probe(parent, cf, &idaa))
112 config_attach(parent, cf, &idaa, 111 config_attach(parent, cf, &idaa,
113 ioplanar_print, CFARG_EOL); 112 ioplanar_print, CFARGS_NONE);
114 } 113 }
115 break; 114 break;
116 default: 115 default:
117 return 0; 116 return 0;
118 } 117 }
119 return 0; 118 return 0;
120} 119}
121 120
122static int 121static int
123ioplanar_print(void *args, const char *name) 122ioplanar_print(void *args, const char *name)
124{ 123{
125 /*struct ioplanar_dev_attach_args *idaa = args;*/ 124 /*struct ioplanar_dev_attach_args *idaa = args;*/
126 125

cvs diff -r1.6 -r1.6.8.1 src/sys/arch/rs6000/rs6000/mainbus.c (expand / switch to unified diff)

--- src/sys/arch/rs6000/rs6000/mainbus.c 2021/04/24 23:36:47 1.6
+++ src/sys/arch/rs6000/rs6000/mainbus.c 2021/08/04 02:52:59 1.6.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: mainbus.c,v 1.6 2021/04/24 23:36:47 thorpej Exp $ */ 1/* $NetBSD: mainbus.c,v 1.6.8.1 2021/08/04 02:52:59 thorpej Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2007 The NetBSD Foundation, Inc. 4 * Copyright (c) 2007 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 Tim Rightnour 8 * by Tim Rightnour
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: mainbus.c,v 1.6 2021/04/24 23:36:47 thorpej Exp $"); 33__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.6.8.1 2021/08/04 02:52:59 thorpej Exp $");
34 34
35#include <sys/param.h> 35#include <sys/param.h>
36#include <sys/extent.h> 36#include <sys/extent.h>
37#include <sys/systm.h> 37#include <sys/systm.h>
38#include <sys/device.h> 38#include <sys/device.h>
39#include <sys/malloc.h> 39#include <sys/malloc.h>
40#include <sys/bus.h> 40#include <sys/bus.h>
41 41
42#include <machine/autoconf.h> 42#include <machine/autoconf.h>
43#include <powerpc/pio.h> 43#include <powerpc/pio.h>
44 44
45#include "mca.h" 45#include "mca.h"
46 46
@@ -86,50 +86,47 @@ mainbus_attach(device_t parent, device_t @@ -86,50 +86,47 @@ mainbus_attach(device_t parent, device_t
86{ 86{
87 union mainbus_attach_args mba; 87 union mainbus_attach_args mba;
88 struct confargs ca; 88 struct confargs ca;
89#if DEBUG 89#if DEBUG
90 int slot; 90 int slot;
91#endif 91#endif
92 mainbus_found = 1; 92 mainbus_found = 1;
93 93
94 aprint_normal("\n"); 94 aprint_normal("\n");
95 95
96 ca.ca_name = "cpu"; 96 ca.ca_name = "cpu";
97 ca.ca_node = 0; 97 ca.ca_node = 0;
98 config_found(self, &ca, mainbus_print, 98 config_found(self, &ca, mainbus_print,
99 CFARG_IATTR, "mainbus", 99 CFARGS(.iattr = "mainbus"));
100 CFARG_EOL); 
101 100
102#if DEBUG 101#if DEBUG
103 printf("scanning MCA bus\n"); 102 printf("scanning MCA bus\n");
104 for (slot=0; slot < 16; slot++) { 103 for (slot=0; slot < 16; slot++) {
105 printf("slot %d == %x%x\n", slot, 104 printf("slot %d == %x%x\n", slot,
106 inb(0xc0400100 + 1 + (slot<<16)), 105 inb(0xc0400100 + 1 + (slot<<16)),
107 inb(0xc0400100 + 0 + (slot<<16))); 106 inb(0xc0400100 + 0 + (slot<<16)));
108 } 107 }
109 printf("done\n"); 108 printf("done\n");
110 109
111 printf(" CFG reg (1)= %x\n", inl(0xc0010080)); 110 printf(" CFG reg (1)= %x\n", inl(0xc0010080));
112 printf(" TCE reg (1)= %x\n", inl(0xc001009c)); 111 printf(" TCE reg (1)= %x\n", inl(0xc001009c));
113#endif 112#endif
114 113
115 mba.mba_mba.mba_iot = &rs6000_iocc0_io_space_tag; 114 mba.mba_mba.mba_iot = &rs6000_iocc0_io_space_tag;
116 mba.mba_mba.mba_memt = &rs6000_iocc0_io_space_tag; /* XXX ??? */ 115 mba.mba_mba.mba_memt = &rs6000_iocc0_io_space_tag; /* XXX ??? */
117 mba.mba_mba.mba_dmat = NULL; /*&mca_bus_dma_tag;*/ 116 mba.mba_mba.mba_dmat = NULL; /*&mca_bus_dma_tag;*/
118 mba.mba_mba.mba_mc = NULL; 117 mba.mba_mba.mba_mc = NULL;
119 mba.mba_mba.mba_bus = 0; 118 mba.mba_mba.mba_bus = 0;
120 config_found(self, &mba.mba_mba, mcabusprint, 119 config_found(self, &mba.mba_mba, mcabusprint,
121 CFARG_IATTR, "mcabus", 120 CFARGS(.iattr = "mcabus"));
122 CFARG_EOL); 
123 
124} 121}
125 122
126int 123int
127mainbus_print(void *aux, const char *pnp) 124mainbus_print(void *aux, const char *pnp)
128{ 125{
129 union mainbus_attach_args *mba = aux; 126 union mainbus_attach_args *mba = aux;
130 127
131 if (pnp) 128 if (pnp)
132 aprint_normal("%s at %s", mba->mba_busname, pnp); 129 aprint_normal("%s at %s", mba->mba_busname, pnp);
133 130
134 return (UNCONF); 131 return (UNCONF);
135} 132}

cvs diff -r1.7 -r1.7.8.1 src/sys/arch/sandpoint/sandpoint/eumb.c (expand / switch to unified diff)

--- src/sys/arch/sandpoint/sandpoint/eumb.c 2021/04/24 23:36:47 1.7
+++ src/sys/arch/sandpoint/sandpoint/eumb.c 2021/08/04 02:52:59 1.7.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: eumb.c,v 1.7 2021/04/24 23:36:47 thorpej Exp $ */ 1/* $NetBSD: eumb.c,v 1.7.8.1 2021/08/04 02:52:59 thorpej Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2007 The NetBSD Foundation, Inc. 4 * Copyright (c) 2007 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 Tohru Nishimura. 8 * by Tohru Nishimura.
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: eumb.c,v 1.7 2021/04/24 23:36:47 thorpej Exp $"); 33__KERNEL_RCSID(0, "$NetBSD: eumb.c,v 1.7.8.1 2021/08/04 02:52:59 thorpej Exp $");
34 34
35#include <sys/param.h> 35#include <sys/param.h>
36#include <sys/device.h> 36#include <sys/device.h>
37#include <sys/tty.h> 37#include <sys/tty.h>
38#include <sys/systm.h> 38#include <sys/systm.h>
39 39
40#include <machine/autoconf.h> 40#include <machine/autoconf.h>
41#include <machine/intr.h> 41#include <machine/intr.h>
42 42
43#include <sandpoint/sandpoint/eumbvar.h> 43#include <sandpoint/sandpoint/eumbvar.h>
44#include "locators.h" 44#include "locators.h"
45 45
46static int eumb_match(device_t, cfdata_t, void *); 46static int eumb_match(device_t, cfdata_t, void *);
@@ -60,41 +60,40 @@ eumb_match(device_t parent, cfdata_t cf, @@ -60,41 +60,40 @@ eumb_match(device_t parent, cfdata_t cf,
60 60
61 if (strcmp(ma->ma_name, eumb_cd.cd_name) != 0) 61 if (strcmp(ma->ma_name, eumb_cd.cd_name) != 0)
62 return 0; 62 return 0;
63 return 1; 63 return 1;
64} 64}
65 65
66static void 66static void
67eumb_attach(device_t parent, device_t self, void *aux) 67eumb_attach(device_t parent, device_t self, void *aux)
68{ 68{
69 69
70 aprint_naive("\n"); 70 aprint_naive("\n");
71 aprint_normal("\n"); 71 aprint_normal("\n");
72 config_search(self, aux, 72 config_search(self, aux,
73 CFARG_SEARCH, eumb_search, 73 CFARGS(.search = eumb_search));
74 CFARG_EOL); 
75} 74}
76 75
77static int 76static int
78eumb_search(device_t parent, cfdata_t cf, const int *ldesc, void *aux) 77eumb_search(device_t parent, cfdata_t cf, const int *ldesc, void *aux)
79{ 78{
80 struct mainbus_attach_args *ma = aux; 79 struct mainbus_attach_args *ma = aux;
81 struct eumb_attach_args eaa; 80 struct eumb_attach_args eaa;
82 81
83 eaa.eumb_name = cf->cf_name; 82 eaa.eumb_name = cf->cf_name;
84 eaa.eumb_bt = ma->ma_bst; 83 eaa.eumb_bt = ma->ma_bst;
85 eaa.eumb_unit = cf->cf_loc[EUMBCF_UNIT]; 84 eaa.eumb_unit = cf->cf_loc[EUMBCF_UNIT];
86 if (config_probe(parent, cf, &eaa)) 85 if (config_probe(parent, cf, &eaa))
87 config_attach(parent, cf, &eaa, eumb_print, CFARG_EOL); 86 config_attach(parent, cf, &eaa, eumb_print, CFARGS_NONE);
88 87
89 return 0; 88 return 0;
90} 89}
91 90
92static int 91static int
93eumb_print(void *aux, const char *pnp) 92eumb_print(void *aux, const char *pnp)
94{ 93{
95 struct eumb_attach_args *eaa = aux; 94 struct eumb_attach_args *eaa = aux;
96 95
97 if (pnp) 96 if (pnp)
98 printf("%s at %s", eaa->eumb_name, pnp); 97 printf("%s at %s", eaa->eumb_name, pnp);
99 if (eaa->eumb_unit != EUMBCF_UNIT_DEFAULT) 98 if (eaa->eumb_unit != EUMBCF_UNIT_DEFAULT)
100 printf(" unit %d", eaa->eumb_unit); 99 printf(" unit %d", eaa->eumb_unit);

cvs diff -r1.33 -r1.33.8.1 src/sys/arch/sandpoint/sandpoint/mainbus.c (expand / switch to unified diff)

--- src/sys/arch/sandpoint/sandpoint/mainbus.c 2021/04/24 23:36:47 1.33
+++ src/sys/arch/sandpoint/sandpoint/mainbus.c 2021/08/04 02:52:59 1.33.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: mainbus.c,v 1.33 2021/04/24 23:36:47 thorpej Exp $ */ 1/* $NetBSD: mainbus.c,v 1.33.8.1 2021/08/04 02:52:59 thorpej Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. 4 * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright 11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the 12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution. 13 * documentation and/or other materials provided with the distribution.
14 * 3. All advertising materials mentioning features or use of this software 14 * 3. All advertising materials mentioning features or use of this software
@@ -21,27 +21,27 @@ @@ -21,27 +21,27 @@
21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 22 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 23 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 24 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */ 31 */
32 32
33#include <sys/cdefs.h> 33#include <sys/cdefs.h>
34__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.33 2021/04/24 23:36:47 thorpej Exp $"); 34__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.33.8.1 2021/08/04 02:52:59 thorpej Exp $");
35 35
36#include "opt_pci.h" 36#include "opt_pci.h"
37#include "pci.h" 37#include "pci.h"
38 38
39#include <sys/param.h> 39#include <sys/param.h>
40#include <sys/device.h> 40#include <sys/device.h>
41#include <sys/malloc.h> 41#include <sys/malloc.h>
42#include <sys/systm.h> 42#include <sys/systm.h>
43 43
44#include <machine/autoconf.h> 44#include <machine/autoconf.h>
45#include <machine/bootinfo.h> 45#include <machine/bootinfo.h>
46#include <machine/isa_machdep.h> 46#include <machine/isa_machdep.h>
47 47
@@ -82,50 +82,46 @@ mainbus_match(device_t parent, cfdata_t  @@ -82,50 +82,46 @@ mainbus_match(device_t parent, cfdata_t
82 */ 82 */
83void 83void
84mainbus_attach(device_t parent, device_t self, void *aux) 84mainbus_attach(device_t parent, device_t self, void *aux)
85{ 85{
86 struct mainbus_attach_args mba; 86 struct mainbus_attach_args mba;
87 struct pcibus_attach_args pba; 87 struct pcibus_attach_args pba;
88 struct btinfo_prodfamily *pfam; 88 struct btinfo_prodfamily *pfam;
89 89
90 aprint_naive("\n"); 90 aprint_naive("\n");
91 aprint_normal("\n"); 91 aprint_normal("\n");
92 92
93 mba.ma_name = "cpu"; 93 mba.ma_name = "cpu";
94 config_found(self, &mba, mainbus_print, 94 config_found(self, &mba, mainbus_print,
95 CFARG_IATTR, "mainbus", 95 CFARGS(.iattr = "mainbus"));
96 CFARG_EOL); 
97 96
98 mba.ma_name = "eumb"; 97 mba.ma_name = "eumb";
99 mba.ma_bst = &sandpoint_eumb_space_tag; 98 mba.ma_bst = &sandpoint_eumb_space_tag;
100 config_found(self, &mba, mainbus_print, 99 config_found(self, &mba, mainbus_print,
101 CFARG_IATTR, "mainbus", 100 CFARGS(.iattr = "mainbus"));
102 CFARG_EOL); 
103 101
104 pfam = lookup_bootinfo(BTINFO_PRODFAMILY); 102 pfam = lookup_bootinfo(BTINFO_PRODFAMILY);
105 if (pfam != NULL && strcmp(pfam->name, "nhnas") == 0) { 103 if (pfam != NULL && strcmp(pfam->name, "nhnas") == 0) {
106 /* attach nhpow(4) for NH230/231 only */ 104 /* attach nhpow(4) for NH230/231 only */
107 mba.ma_name = "nhpow"; 105 mba.ma_name = "nhpow";
108 mba.ma_bst = &sandpoint_nhgpio_space_tag; 106 mba.ma_bst = &sandpoint_nhgpio_space_tag;
109 config_found(self, &mba, mainbus_print, 107 config_found(self, &mba, mainbus_print,
110 CFARG_IATTR, "mainbus", 108 CFARGS(.iattr = "mainbus"));
111 CFARG_EOL); 
112 } 109 }
113 110
114 mba.ma_name = "cfi"; 111 mba.ma_name = "cfi";
115 mba.ma_bst = &sandpoint_flash_space_tag; 112 mba.ma_bst = &sandpoint_flash_space_tag;
116 config_found(self, &mba, mainbus_print, 113 config_found(self, &mba, mainbus_print,
117 CFARG_IATTR, "mainbus", 114 CFARGS(.iattr = "mainbus"));
118 CFARG_EOL); 
119 115
120 /* 116 /*
121 * XXX Note also that the presence of a PCI bus should 117 * XXX Note also that the presence of a PCI bus should
122 * XXX _always_ be checked, and if present the bus should be 118 * XXX _always_ be checked, and if present the bus should be
123 * XXX 'found'. However, because of the structure of the code, 119 * XXX 'found'. However, because of the structure of the code,
124 * XXX that's not currently possible. 120 * XXX that's not currently possible.
125 */ 121 */
126#if NPCI > 0 122#if NPCI > 0
127#if defined(PCI_NETBSD_CONFIGURE) 123#if defined(PCI_NETBSD_CONFIGURE)
128 struct pciconf_resources *pcires = pciconf_resource_init(); 124 struct pciconf_resources *pcires = pciconf_resource_init();
129 125
130 pciconf_resource_add(pcires, PCICONF_RESOURCE_IO, 126 pciconf_resource_add(pcires, PCICONF_RESOURCE_IO,
131 PCI_IO_START, PCI_IO_SIZE); 127 PCI_IO_START, PCI_IO_SIZE);
@@ -137,28 +133,27 @@ mainbus_attach(device_t parent, device_t @@ -137,28 +133,27 @@ mainbus_attach(device_t parent, device_t
137 pciconf_resource_fini(pcires); 133 pciconf_resource_fini(pcires);
138#endif 134#endif
139 135
140 pba.pba_iot = &sandpoint_io_space_tag; 136 pba.pba_iot = &sandpoint_io_space_tag;
141 pba.pba_memt = &sandpoint_mem_space_tag; 137 pba.pba_memt = &sandpoint_mem_space_tag;
142 pba.pba_dmat = &pci_bus_dma_tag; 138 pba.pba_dmat = &pci_bus_dma_tag;
143 pba.pba_dmat64 = NULL; 139 pba.pba_dmat64 = NULL;
144 pba.pba_bus = 0; 140 pba.pba_bus = 0;
145 pba.pba_pc = 0; 141 pba.pba_pc = 0;
146 pba.pba_bridgetag = NULL; 142 pba.pba_bridgetag = NULL;
147 pba.pba_flags = PCI_FLAGS_IO_OKAY | PCI_FLAGS_MEM_OKAY; 143 pba.pba_flags = PCI_FLAGS_IO_OKAY | PCI_FLAGS_MEM_OKAY;
148 144
149 config_found(self, &pba, pcibusprint, 145 config_found(self, &pba, pcibusprint,
150 CFARG_IATTR, "pcibus", 146 CFARGS(.iattr = "pcibus"));
151 CFARG_EOL); 
152#endif 147#endif
153} 148}
154 149
155static int cpu_match(device_t, cfdata_t, void *); 150static int cpu_match(device_t, cfdata_t, void *);
156static void cpu_attach(device_t, device_t, void *); 151static void cpu_attach(device_t, device_t, void *);
157 152
158CFATTACH_DECL_NEW(cpu, 0, cpu_match, cpu_attach, NULL, NULL); 153CFATTACH_DECL_NEW(cpu, 0, cpu_match, cpu_attach, NULL, NULL);
159 154
160extern struct cfdriver cpu_cd; 155extern struct cfdriver cpu_cd;
161 156
162int 157int
163cpu_match(device_t parent, cfdata_t cf, void *aux) 158cpu_match(device_t parent, cfdata_t cf, void *aux)
164{ 159{

cvs diff -r1.3 -r1.3.8.1 src/sys/arch/sandpoint/sandpoint/nhpow.c (expand / switch to unified diff)

--- src/sys/arch/sandpoint/sandpoint/nhpow.c 2021/04/24 23:36:47 1.3
+++ src/sys/arch/sandpoint/sandpoint/nhpow.c 2021/08/04 02:52:59 1.3.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: nhpow.c,v 1.3 2021/04/24 23:36:47 thorpej Exp $ */ 1/* $NetBSD: nhpow.c,v 1.3.8.1 2021/08/04 02:52:59 thorpej Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2012 Frank Wille. 4 * Copyright (c) 2012 Frank Wille.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Written by Frank Wille for The NetBSD Project. 7 * Written by Frank Wille for The NetBSD Project.
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
@@ -22,27 +22,27 @@ @@ -22,27 +22,27 @@
22 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 * POSSIBILITY OF SUCH DAMAGE. 28 * POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31/* 31/*
32 * NH230/231 power and LED control, button handling 32 * NH230/231 power and LED control, button handling
33 */ 33 */
34#include <sys/cdefs.h> 34#include <sys/cdefs.h>
35__KERNEL_RCSID(0, "$NetBSD: nhpow.c,v 1.3 2021/04/24 23:36:47 thorpej Exp $"); 35__KERNEL_RCSID(0, "$NetBSD: nhpow.c,v 1.3.8.1 2021/08/04 02:52:59 thorpej Exp $");
36#include "gpio.h" 36#include "gpio.h"
37 37
38#include <sys/param.h> 38#include <sys/param.h>
39#include <sys/device.h> 39#include <sys/device.h>
40#if NGPIO > 0 40#if NGPIO > 0
41#include <sys/gpio.h> 41#include <sys/gpio.h>
42#endif 42#endif
43#include <sys/callout.h> 43#include <sys/callout.h>
44#include <sys/kernel.h> 44#include <sys/kernel.h>
45#include <sys/proc.h> 45#include <sys/proc.h>
46#include <sys/reboot.h> 46#include <sys/reboot.h>
47#include <sys/sysctl.h> 47#include <sys/sysctl.h>
48 48
@@ -198,27 +198,27 @@ nhpow_attach(device_t parent, device_t s @@ -198,27 +198,27 @@ nhpow_attach(device_t parent, device_t s
198 sc->sc_gpio_pins[i].pin_state = 198 sc->sc_gpio_pins[i].pin_state =
199 (sc->sc_gpio_wrstate & (1 << i)) ? 199 (sc->sc_gpio_wrstate & (1 << i)) ?
200 GPIO_PIN_HIGH : GPIO_PIN_LOW; 200 GPIO_PIN_HIGH : GPIO_PIN_LOW;
201 } 201 }
202 202
203 /* create controller tag and attach GPIO framework */ 203 /* create controller tag and attach GPIO framework */
204 sc->sc_gpio_gc.gp_cookie = sc; 204 sc->sc_gpio_gc.gp_cookie = sc;
205 sc->sc_gpio_gc.gp_pin_read = nhgpio_pin_read; 205 sc->sc_gpio_gc.gp_pin_read = nhgpio_pin_read;
206 sc->sc_gpio_gc.gp_pin_write = nhgpio_pin_write; 206 sc->sc_gpio_gc.gp_pin_write = nhgpio_pin_write;
207 sc->sc_gpio_gc.gp_pin_ctl = nhgpio_pin_ctl; 207 sc->sc_gpio_gc.gp_pin_ctl = nhgpio_pin_ctl;
208 gba.gba_gc = &sc->sc_gpio_gc; 208 gba.gba_gc = &sc->sc_gpio_gc;
209 gba.gba_pins = sc->sc_gpio_pins; 209 gba.gba_pins = sc->sc_gpio_pins;
210 gba.gba_npins = NHGPIO_PINS; 210 gba.gba_npins = NHGPIO_PINS;
211 config_found(self, &gba, gpiobus_print, CFARG_EOL); 211 config_found(self, &gba, gpiobus_print, CFARGS_NONE);
212#endif 212#endif
213} 213}
214 214
215static void 215static void
216nhgpio_pin_write(void *arg, int pin, int value) 216nhgpio_pin_write(void *arg, int pin, int value)
217{ 217{
218 struct nhpow_softc *sc = arg; 218 struct nhpow_softc *sc = arg;
219 int p; 219 int p;
220 220
221 KASSERT(sc != NULL); 221 KASSERT(sc != NULL);
222 p = pin % NHGPIO_PINS; 222 p = pin % NHGPIO_PINS;
223 if (value) 223 if (value)
224 sc->sc_gpio_wrstate |= (1 << p); 224 sc->sc_gpio_wrstate |= (1 << p);

cvs diff -r1.13 -r1.13.8.1 src/sys/arch/sbmips/sbmips/zbbus.c (expand / switch to unified diff)

--- src/sys/arch/sbmips/sbmips/zbbus.c 2021/04/24 23:36:47 1.13
+++ src/sys/arch/sbmips/sbmips/zbbus.c 2021/08/04 02:53:00 1.13.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: zbbus.c,v 1.13 2021/04/24 23:36:47 thorpej Exp $ */ 1/* $NetBSD: zbbus.c,v 1.13.8.1 2021/08/04 02:53:00 thorpej Exp $ */
2 2
3/* 3/*
4 * Copyright 2000, 2001 4 * Copyright 2000, 2001
5 * Broadcom Corporation. All rights reserved. 5 * Broadcom Corporation. All rights reserved.
6 * 6 *
7 * This software is furnished under license and may be used and copied only 7 * This software is furnished under license and may be used and copied only
8 * in accordance with the following terms and conditions. Subject to these 8 * in accordance with the following terms and conditions. Subject to these
9 * conditions, you may download, copy, install, use, modify and distribute 9 * conditions, you may download, copy, install, use, modify and distribute
10 * modified or unmodified copies of this software in source and/or binary 10 * modified or unmodified copies of 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 and 13 * 1) Any source code used, modified or distributed must reproduce and
14 * retain this copyright notice and list of conditions as they appear in 14 * retain this copyright notice and list of conditions as they appear in
@@ -23,27 +23,27 @@ @@ -23,27 +23,27 @@
23 * WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF 23 * WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR 24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
25 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL BROADCOM BE LIABLE 25 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL BROADCOM BE LIABLE
26 * FOR ANY DAMAGES WHATSOEVER, AND IN PARTICULAR, BROADCOM SHALL NOT BE 26 * FOR ANY DAMAGES WHATSOEVER, AND IN PARTICULAR, BROADCOM SHALL NOT BE
27 * LIABLE FOR DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 * LIABLE FOR DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 29 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
30 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 30 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
31 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 31 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
32 * OR OTHERWISE), EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * OR OTHERWISE), EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35#include <sys/cdefs.h> 35#include <sys/cdefs.h>
36__KERNEL_RCSID(0, "$NetBSD: zbbus.c,v 1.13 2021/04/24 23:36:47 thorpej Exp $"); 36__KERNEL_RCSID(0, "$NetBSD: zbbus.c,v 1.13.8.1 2021/08/04 02:53:00 thorpej Exp $");
37 37
38#include <sys/param.h> 38#include <sys/param.h>
39#include <sys/systm.h> 39#include <sys/systm.h>
40#include <sys/device.h> 40#include <sys/device.h>
41 41
42#include <mips/sibyte/include/zbbusvar.h> 42#include <mips/sibyte/include/zbbusvar.h>
43 43
44#include "locators.h" 44#include "locators.h"
45 45
46static int zbbus_match(device_t, cfdata_t, void *); 46static int zbbus_match(device_t, cfdata_t, void *);
47static void zbbus_attach(device_t, device_t, void *); 47static void zbbus_attach(device_t, device_t, void *);
48 48
49CFATTACH_DECL_NEW(zbbus, 0, 49CFATTACH_DECL_NEW(zbbus, 0,
@@ -79,28 +79,27 @@ zbbus_attach(device_t parent, device_t s @@ -79,28 +79,27 @@ zbbus_attach(device_t parent, device_t s
79{ 79{
80 struct zbbus_attach_args za; 80 struct zbbus_attach_args za;
81 int i; 81 int i;
82 82
83 printf("\n"); 83 printf("\n");
84 zbbus_attached = 1; 84 zbbus_attached = 1;
85 85
86 sb1250_icu_init(); 86 sb1250_icu_init();
87 87
88 for (i = 0; i < sb1250_zbbus_dev_count; i++) { 88 for (i = 0; i < sb1250_zbbus_dev_count; i++) {
89 memset(&za, 0, sizeof za); 89 memset(&za, 0, sizeof za);
90 za.za_locs = sb1250_zbbus_devs[i]; 90 za.za_locs = sb1250_zbbus_devs[i];
91 config_found(self, &za, zbbus_print, 91 config_found(self, &za, zbbus_print,
92 CFARG_SUBMATCH, zbbus_submatch, 92 CFARGS(.submatch = zbbus_submatch));
93 CFARG_EOL); 
94 } 93 }
95 94
96 return; 95 return;
97} 96}
98 97
99int 98int
100zbbus_print(void *aux, const char *pnp) 99zbbus_print(void *aux, const char *pnp)
101{ 100{
102 struct zbbus_attach_args *zap = aux; 101 struct zbbus_attach_args *zap = aux;
103 102
104 if (pnp) 103 if (pnp)
105 aprint_normal("%s at %s", 104 aprint_normal("%s at %s",
106 zbbus_entity_type_name(zap->za_locs.za_type), pnp); 105 zbbus_entity_type_name(zap->za_locs.za_type), pnp);

cvs diff -r1.48 -r1.48.8.1 src/sys/arch/sgimips/dev/crmfb.c (expand / switch to unified diff)

--- src/sys/arch/sgimips/dev/crmfb.c 2021/04/24 23:36:47 1.48
+++ src/sys/arch/sgimips/dev/crmfb.c 2021/08/04 02:53:00 1.48.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: crmfb.c,v 1.48 2021/04/24 23:36:47 thorpej Exp $ */ 1/* $NetBSD: crmfb.c,v 1.48.8.1 2021/08/04 02:53:00 thorpej Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2007 Jared D. McNeill <jmcneill@invisible.ca> 4 * Copyright (c) 2007 Jared D. McNeill <jmcneill@invisible.ca>
5 * 2008 Michael Lorenz <macallan@netbsd.org> 5 * 2008 Michael Lorenz <macallan@netbsd.org>
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
11 * 1. Redistributions of source code must retain the above copyright 11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer. 12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
@@ -22,27 +22,27 @@ @@ -22,27 +22,27 @@
22 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27 * POSSIBILITY OF SUCH DAMAGE. 27 * POSSIBILITY OF SUCH DAMAGE.
28 */ 28 */
29 29
30/* 30/*
31 * SGI-CRM (O2) Framebuffer driver 31 * SGI-CRM (O2) Framebuffer driver
32 */ 32 */
33 33
34#include <sys/cdefs.h> 34#include <sys/cdefs.h>
35__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.48 2021/04/24 23:36:47 thorpej Exp $"); 35__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.48.8.1 2021/08/04 02:53:00 thorpej Exp $");
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/device.h> 39#include <sys/device.h>
40#include <sys/malloc.h> 40#include <sys/malloc.h>
41 41
42#include <machine/autoconf.h> 42#include <machine/autoconf.h>
43#include <sys/bus.h> 43#include <sys/bus.h>
44#include <machine/machtype.h> 44#include <machine/machtype.h>
45#include <machine/vmparam.h> 45#include <machine/vmparam.h>
46 46
47#include <dev/arcbios/arcbios.h> 47#include <dev/arcbios/arcbios.h>
48#include <dev/arcbios/arcbiosvar.h> 48#include <dev/arcbios/arcbiosvar.h>
@@ -405,27 +405,27 @@ crmfb_attach(device_t parent, device_t s @@ -405,27 +405,27 @@ crmfb_attach(device_t parent, device_t s
405 ri->ri_devcmap[(defattr >> 16) & 0xff]); 405 ri->ri_devcmap[(defattr >> 16) & 0xff]);
406 406
407 consdev = arcbios_GetEnvironmentVariable("ConsoleOut"); 407 consdev = arcbios_GetEnvironmentVariable("ConsoleOut");
408 if (consdev != NULL && strcmp(consdev, "video()") == 0) { 408 if (consdev != NULL && strcmp(consdev, "video()") == 0) {
409 wsdisplay_cnattach(&crmfb_defaultscreen, ri, 0, 0, defattr); 409 wsdisplay_cnattach(&crmfb_defaultscreen, ri, 0, 0, defattr);
410 vcons_replay_msgbuf(&crmfb_console_screen); 410 vcons_replay_msgbuf(&crmfb_console_screen);
411 aa.console = 1; 411 aa.console = 1;
412 } else 412 } else
413 aa.console = 0; 413 aa.console = 0;
414 aa.scrdata = &crmfb_screenlist; 414 aa.scrdata = &crmfb_screenlist;
415 aa.accessops = &crmfb_accessops; 415 aa.accessops = &crmfb_accessops;
416 aa.accesscookie = &sc->sc_vd; 416 aa.accesscookie = &sc->sc_vd;
417 417
418 config_found(self, &aa, wsemuldisplaydevprint, CFARG_EOL); 418 config_found(self, &aa, wsemuldisplaydevprint, CFARGS_NONE);
419 419
420 sc->sc_cur_x = 0; 420 sc->sc_cur_x = 0;
421 sc->sc_cur_y = 0; 421 sc->sc_cur_y = 0;
422 sc->sc_hot_x = 0; 422 sc->sc_hot_x = 0;
423 sc->sc_hot_y = 0; 423 sc->sc_hot_y = 0;
424 424
425 return; 425 return;
426} 426}
427 427
428int 428int
429crmfb_probe(void) 429crmfb_probe(void)
430{ 430{
431 431

cvs diff -r1.36 -r1.36.8.1 src/sys/arch/sgimips/dev/imc.c (expand / switch to unified diff)

--- src/sys/arch/sgimips/dev/imc.c 2021/04/24 23:36:47 1.36
+++ src/sys/arch/sgimips/dev/imc.c 2021/08/04 02:53:00 1.36.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: imc.c,v 1.36 2021/04/24 23:36:47 thorpej Exp $ */ 1/* $NetBSD: imc.c,v 1.36.8.1 2021/08/04 02:53:00 thorpej Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001 Rafal K. Boni 4 * Copyright (c) 2001 Rafal K. Boni
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -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: imc.c,v 1.36 2021/04/24 23:36:47 thorpej Exp $"); 31__KERNEL_RCSID(0, "$NetBSD: imc.c,v 1.36.8.1 2021/08/04 02:53:00 thorpej Exp $");
32 32
33#include <sys/param.h> 33#include <sys/param.h>
34#include <sys/device.h> 34#include <sys/device.h>
35#include <sys/systm.h> 35#include <sys/systm.h>
36 36
37#include <machine/cpu.h> 37#include <machine/cpu.h>
38#include <machine/locore.h> 38#include <machine/locore.h>
39#include <machine/autoconf.h> 39#include <machine/autoconf.h>
40#include <sys/bus.h> 40#include <sys/bus.h>
41#include <machine/machtype.h> 41#include <machine/machtype.h>
42#include <machine/sysconf.h> 42#include <machine/sysconf.h>
43 43
44#include <sgimips/dev/imcreg.h> 44#include <sgimips/dev/imcreg.h>
@@ -221,36 +221,34 @@ imc_attach(device_t parent, device_t sel @@ -221,36 +221,34 @@ imc_attach(device_t parent, device_t sel
221 IMC_GIO64ARB_EISAMST); 221 IMC_GIO64ARB_EISAMST);
222 } 222 }
223 break; 223 break;
224 } 224 }
225 } 225 }
226 226
227 bus_space_write_4(isc.iot, isc.ioh, IMC_GIO64ARB, reg); 227 bus_space_write_4(isc.iot, isc.ioh, IMC_GIO64ARB, reg);
228 228
229 if (isc.eisa_present) { 229 if (isc.eisa_present) {
230#if notyet 230#if notyet
231 memset(&iaa, 0, sizeof(iaa)); 231 memset(&iaa, 0, sizeof(iaa));
232 232
233 config_found(self, &iaa, eisabusprint, 233 config_found(self, &iaa, eisabusprint,
234 CFARG_IATTR, "eisabus", 234 CFARGS(.iattr = "eisabus"));
235 CFARG_EOL); 
236#endif 235#endif
237 } 236 }
238 237
239 memset(&iaa, 0, sizeof(iaa)); 238 memset(&iaa, 0, sizeof(iaa));
240 239
241 config_found(self, &iaa, imc_print, 240 config_found(self, &iaa, imc_print,
242 CFARG_IATTR, "giobus", 241 CFARGS(.iattr = "giobus"));
243 CFARG_EOL); 
244 242
245 imc_watchdog_enable(); 243 imc_watchdog_enable();
246} 244}
247 245
248 246
249static int 247static int
250imc_print(void *aux, const char *name) 248imc_print(void *aux, const char *name)
251{ 249{
252 250
253 if (name) 251 if (name)
254 aprint_normal("gio at %s", name); 252 aprint_normal("gio at %s", name);
255 253
256 return UNCONF; 254 return UNCONF;

cvs diff -r1.18 -r1.18.8.1 src/sys/arch/sgimips/dev/pic.c (expand / switch to unified diff)

--- src/sys/arch/sgimips/dev/pic.c 2021/04/24 23:36:47 1.18
+++ src/sys/arch/sgimips/dev/pic.c 2021/08/04 02:53:00 1.18.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: pic.c,v 1.18 2021/04/24 23:36:47 thorpej Exp $ */ 1/* $NetBSD: pic.c,v 1.18.8.1 2021/08/04 02:53:00 thorpej Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2002 Steve Rumble 4 * Copyright (c) 2002 Steve Rumble
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -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: pic.c,v 1.18 2021/04/24 23:36:47 thorpej Exp $"); 31__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.18.8.1 2021/08/04 02:53:00 thorpej Exp $");
32 32
33#include <sys/param.h> 33#include <sys/param.h>
34#include <sys/device.h> 34#include <sys/device.h>
35#include <sys/systm.h> 35#include <sys/systm.h>
36 36
37#include <machine/cpu.h> 37#include <machine/cpu.h>
38#include <machine/locore.h> 38#include <machine/locore.h>
39#include <machine/autoconf.h> 39#include <machine/autoconf.h>
40#include <sys/bus.h> 40#include <sys/bus.h>
41#include <machine/machtype.h> 41#include <machine/machtype.h>
42#include <machine/sysconf.h> 42#include <machine/sysconf.h>
43 43
44#include <sgimips/dev/picreg.h> 44#include <sgimips/dev/picreg.h>
@@ -174,27 +174,27 @@ pic_attach(device_t parent, device_t sel @@ -174,27 +174,27 @@ pic_attach(device_t parent, device_t sel
174 /* default gio32 delay time */ 174 /* default gio32 delay time */
175 bus_space_write_4(psc.iot, psc.ioh, PIC_GIO32ARB_DELAY, 175 bus_space_write_4(psc.iot, psc.ioh, PIC_GIO32ARB_DELAY,
176 PIC_GIO32ARB_DEFDELAY); 176 PIC_GIO32ARB_DEFDELAY);
177 177
178 printf("\n"); 178 printf("\n");
179 179
180 platform.intr5 = pic_bus_error; 180 platform.intr5 = pic_bus_error;
181 181
182 /* 182 /*
183 * A GIO bus exists on all IP12's. However, Personal Iris 183 * A GIO bus exists on all IP12's. However, Personal Iris
184 * machines use VME for their expansion bus. 184 * machines use VME for their expansion bus.
185 */ 185 */
186 iaa.iaa_name = "gio"; 186 iaa.iaa_name = "gio";
187 (void)config_found(self, (void *)&iaa, pic_print, CFARG_EOL); 187 (void)config_found(self, (void *)&iaa, pic_print, CFARGS_NONE);
188 188
189 pic_watchdog_enable(); 189 pic_watchdog_enable();
190} 190}
191 191
192 192
193static int 193static int
194pic_print(void *aux, const char *name) 194pic_print(void *aux, const char *name)
195{ 195{
196 struct pic_attach_args *iaa = aux; 196 struct pic_attach_args *iaa = aux;
197 197
198 if (name) 198 if (name)
199 aprint_normal("%s at %s", iaa->iaa_name, name); 199 aprint_normal("%s at %s", iaa->iaa_name, name);
200 200

cvs diff -r1.40 -r1.40.8.1 src/sys/arch/sgimips/dev/zs.c (expand / switch to unified diff)

--- src/sys/arch/sgimips/dev/zs.c 2021/04/24 23:36:47 1.40
+++ src/sys/arch/sgimips/dev/zs.c 2021/08/04 02:53:00 1.40.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: zs.c,v 1.40 2021/04/24 23:36:47 thorpej Exp $ */ 1/* $NetBSD: zs.c,v 1.40.8.1 2021/08/04 02:53:00 thorpej Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1996, 2000 The NetBSD Foundation, Inc. 4 * Copyright (c) 1996, 2000 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 Gordon W. Ross and Wayne Knowles 8 * by Gordon W. Ross and Wayne Knowles
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.
@@ -27,27 +27,27 @@ @@ -27,27 +27,27 @@
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 * Zilog Z8530 Dual UART driver (machine-dependent part) 33 * Zilog Z8530 Dual UART driver (machine-dependent part)
34 * 34 *
35 * Runs two serial lines per chip using slave drivers. 35 * Runs two serial lines per chip using slave drivers.
36 * Plain tty/async lines use the zs_async slave. 36 * Plain tty/async lines use the zs_async slave.
37 */ 37 */
38 38
39#include <sys/cdefs.h> 39#include <sys/cdefs.h>
40__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.40 2021/04/24 23:36:47 thorpej Exp $"); 40__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.40.8.1 2021/08/04 02:53:00 thorpej Exp $");
41 41
42#include "opt_ddb.h" 42#include "opt_ddb.h"
43#include "opt_kgdb.h" 43#include "opt_kgdb.h"
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>
@@ -305,27 +305,27 @@ zs_hpc_attach(device_t parent, device_t  @@ -305,27 +305,27 @@ zs_hpc_attach(device_t parent, device_t
305 /* 305 /*
306 * Clear the master interrupt enable. 306 * Clear the master interrupt enable.
307 * The INTENA is common to both channels, 307 * The INTENA is common to both channels,
308 * so just do it on the A channel. 308 * so just do it on the A channel.
309 */ 309 */
310 if (channel == 0) { 310 if (channel == 0) {
311 zs_write_reg(cs, 9, 0); 311 zs_write_reg(cs, 9, 0);
312 } 312 }
313 /* 313 /*
314 * Look for a child driver for this channel. 314 * Look for a child driver for this channel.
315 * The child attach will setup the hardware. 315 * The child attach will setup the hardware.
316 */ 316 */
317 if (!config_found(self, (void *)&zsc_args, zs_print, 317 if (!config_found(self, (void *)&zsc_args, zs_print,
318 CFARG_EOL)) { 318 CFARGS_NONE)) {
319 /* No sub-driver. Just reset it. */ 319 /* No sub-driver. Just reset it. */
320 uint8_t reset = (channel == 0) ? 320 uint8_t reset = (channel == 0) ?
321 ZSWR9_A_RESET : ZSWR9_B_RESET; 321 ZSWR9_A_RESET : ZSWR9_B_RESET;
322 322
323 s = splhigh(); 323 s = splhigh();
324 zs_write_reg(cs, 9, reset); 324 zs_write_reg(cs, 9, reset);
325 splx(s); 325 splx(s);
326 } 326 }
327 } 327 }
328 328
329 329
330 zsc->sc_si = softint_establish(SOFTINT_SERIAL, zssoft, zsc); 330 zsc->sc_si = softint_establish(SOFTINT_SERIAL, zssoft, zsc);
331 cpu_intr_establish(haa->ha_irq, IPL_TTY, zshard, NULL); 331 cpu_intr_establish(haa->ha_irq, IPL_TTY, zshard, NULL);

cvs diff -r1.12 -r1.12.8.1 src/sys/arch/sgimips/dev/zs_kbd.c (expand / switch to unified diff)

--- src/sys/arch/sgimips/dev/zs_kbd.c 2021/04/24 23:36:47 1.12
+++ src/sys/arch/sgimips/dev/zs_kbd.c 2021/08/04 02:53:00 1.12.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: zs_kbd.c,v 1.12 2021/04/24 23:36:47 thorpej Exp $ */ 1/* $NetBSD: zs_kbd.c,v 1.12.8.1 2021/08/04 02:53:00 thorpej Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2004 Steve Rumble 4 * Copyright (c) 2004 Steve Rumble
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -23,27 +23,27 @@ @@ -23,27 +23,27 @@
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/* 30/*
31 * IP12/IP20 serial keyboard driver attached to zs channel 0 at 600bps. 31 * IP12/IP20 serial keyboard driver attached to zs channel 0 at 600bps.
32 * This layer is the parent of wskbd. 32 * This layer is the parent of wskbd.
33 */ 33 */
34 34
35#include <sys/cdefs.h> 35#include <sys/cdefs.h>
36__KERNEL_RCSID(0, "$NetBSD: zs_kbd.c,v 1.12 2021/04/24 23:36:47 thorpej Exp $"); 36__KERNEL_RCSID(0, "$NetBSD: zs_kbd.c,v 1.12.8.1 2021/08/04 02:53:00 thorpej Exp $");
37 37
38#include <sys/param.h> 38#include <sys/param.h>
39#include <sys/kmem.h> 39#include <sys/kmem.h>
40#include <sys/systm.h> 40#include <sys/systm.h>
41#include <sys/conf.h> 41#include <sys/conf.h>
42#include <sys/device.h> 42#include <sys/device.h>
43 43
44#include <dev/wscons/wsconsio.h> 44#include <dev/wscons/wsconsio.h>
45#include <dev/wscons/wskbdvar.h> 45#include <dev/wscons/wskbdvar.h>
46#include <dev/wscons/wsksymdef.h> 46#include <dev/wscons/wsksymdef.h>
47#include <dev/wscons/wsksymvar.h> 47#include <dev/wscons/wsksymvar.h>
48 48
49#include <dev/ic/z8530reg.h> 49#include <dev/ic/z8530reg.h>
@@ -238,27 +238,27 @@ zskbd_attach(device_t parent, device_t s @@ -238,27 +238,27 @@ zskbd_attach(device_t parent, device_t s
238 zs_set_speed(cs, ZSKBD_BAUD); 238 zs_set_speed(cs, ZSKBD_BAUD);
239 zs_loadchannelregs(cs); 239 zs_loadchannelregs(cs);
240 240
241 /* request DIP switch settings just in case */ 241 /* request DIP switch settings just in case */
242 zskbd_ctrl(cs, ZSKBD_CTRL_A_RCB, 0, 0, 0); 242 zskbd_ctrl(cs, ZSKBD_CTRL_A_RCB, 0, 0, 0);
243 243
244 splx(s); 244 splx(s);
245 245
246 /* attach wskbd */ 246 /* attach wskbd */
247 wskaa.keymap = &sgikbd_wskbd_keymapdata; 247 wskaa.keymap = &sgikbd_wskbd_keymapdata;
248 wskaa.accessops = &zskbd_wskbd_accessops; 248 wskaa.accessops = &zskbd_wskbd_accessops;
249 wskaa.accesscookie = cs; 249 wskaa.accesscookie = cs;
250 sc->sc_dc->wskbddev = config_found(self, &wskaa, wskbddevprint, 250 sc->sc_dc->wskbddev = config_found(self, &wskaa, wskbddevprint,
251 CFARG_EOL); 251 CFARGS_NONE);
252} 252}
253 253
254static void 254static void
255zskbd_rxint(struct zs_chanstate *cs) 255zskbd_rxint(struct zs_chanstate *cs)
256{ 256{
257 struct zskbd_softc *sc; 257 struct zskbd_softc *sc;
258 struct zskbd_devconfig *dc; 258 struct zskbd_devconfig *dc;
259 uint8_t c, r; 259 uint8_t c, r;
260 260
261 sc = cs->cs_private; 261 sc = cs->cs_private;
262 dc = sc->sc_dc; 262 dc = sc->sc_dc;
263 263
264 /* clear errors */ 264 /* clear errors */

cvs diff -r1.9 -r1.9.8.1 src/sys/arch/sgimips/dev/zs_ms.c (expand / switch to unified diff)

--- src/sys/arch/sgimips/dev/zs_ms.c 2021/04/24 23:36:47 1.9
+++ src/sys/arch/sgimips/dev/zs_ms.c 2021/08/04 02:53:00 1.9.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: zs_ms.c,v 1.9 2021/04/24 23:36:47 thorpej Exp $ */ 1/* $NetBSD: zs_ms.c,v 1.9.8.1 2021/08/04 02:53:00 thorpej Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2004 Steve Rumble 4 * Copyright (c) 2004 Steve Rumble
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -26,27 +26,27 @@ @@ -26,27 +26,27 @@
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/* 30/*
31 * IP12/IP20 serial mouse driver attached to zs channel 1 at 4800bps. 31 * IP12/IP20 serial mouse driver attached to zs channel 1 at 4800bps.
32 * This layer feeds wsmouse. 32 * This layer feeds wsmouse.
33 * 33 *
34 * 5 byte packets: sync, x1, y1, x2, y2 34 * 5 byte packets: sync, x1, y1, x2, y2
35 * sync format: binary 10000LMR (left, middle, right) 0 is down 35 * sync format: binary 10000LMR (left, middle, right) 0 is down
36 */ 36 */
37 37
38#include <sys/cdefs.h> 38#include <sys/cdefs.h>
39__KERNEL_RCSID(0, "$NetBSD: zs_ms.c,v 1.9 2021/04/24 23:36:47 thorpej Exp $"); 39__KERNEL_RCSID(0, "$NetBSD: zs_ms.c,v 1.9.8.1 2021/08/04 02:53:00 thorpej Exp $");
40 40
41#include <sys/param.h> 41#include <sys/param.h>
42#include <sys/systm.h> 42#include <sys/systm.h>
43#include <sys/conf.h> 43#include <sys/conf.h>
44#include <sys/device.h> 44#include <sys/device.h>
45 45
46#include <dev/wscons/wsconsio.h> 46#include <dev/wscons/wsconsio.h>
47#include <dev/wscons/wsmousevar.h> 47#include <dev/wscons/wsmousevar.h>
48 48
49#include <dev/ic/z8530reg.h> 49#include <dev/ic/z8530reg.h>
50#include <machine/machtype.h> 50#include <machine/machtype.h>
51#include <machine/z8530var.h> 51#include <machine/z8530var.h>
52 52
@@ -161,27 +161,27 @@ zsms_attach(device_t parent, device_t se @@ -161,27 +161,27 @@ zsms_attach(device_t parent, device_t se
161 aprint_normal(": baud rate %d\n", ZSMS_BAUD); 161 aprint_normal(": baud rate %d\n", ZSMS_BAUD);
162 162
163 s = splzs(); 163 s = splzs();
164 zs_write_reg(cs, 9, (channel == 0) ? ZSWR9_A_RESET : ZSWR9_B_RESET); 164 zs_write_reg(cs, 9, (channel == 0) ? ZSWR9_A_RESET : ZSWR9_B_RESET);
165 cs->cs_preg[1] = ZSWR1_RIE; 165 cs->cs_preg[1] = ZSWR1_RIE;
166 zs_set_speed(cs, ZSMS_BAUD); 166 zs_set_speed(cs, ZSMS_BAUD);
167 zs_loadchannelregs(cs); 167 zs_loadchannelregs(cs);
168 splx(s); 168 splx(s);
169 169
170 /* attach wsmouse */ 170 /* attach wsmouse */
171 wsmaa.accessops = &zsms_wsmouse_accessops; 171 wsmaa.accessops = &zsms_wsmouse_accessops;
172 wsmaa.accesscookie = sc; 172 wsmaa.accesscookie = sc;
173 sc->wsmousedev = config_found(self, &wsmaa, wsmousedevprint, 173 sc->wsmousedev = config_found(self, &wsmaa, wsmousedevprint,
174 CFARG_EOL); 174 CFARGS_NONE);
175} 175}
176 176
177void 177void
178zsms_rxint(struct zs_chanstate *cs) 178zsms_rxint(struct zs_chanstate *cs)
179{ 179{
180 uint8_t c, r; 180 uint8_t c, r;
181 struct zsms_softc *sc = cs->cs_private; 181 struct zsms_softc *sc = cs->cs_private;
182 182
183 /* clear errors */ 183 /* clear errors */
184 r = zs_read_reg(cs, 1); 184 r = zs_read_reg(cs, 1);
185 if (r & (ZSRR1_FE | ZSRR1_DO | ZSRR1_PE)) 185 if (r & (ZSRR1_FE | ZSRR1_DO | ZSRR1_PE))
186 zs_write_csr(cs, ZSWR0_RESET_ERRORS); 186 zs_write_csr(cs, ZSWR0_RESET_ERRORS);
187 187

cvs diff -r1.37 -r1.37.8.1 src/sys/arch/sgimips/gio/gio.c (expand / switch to unified diff)

--- src/sys/arch/sgimips/gio/gio.c 2021/04/24 23:36:48 1.37
+++ src/sys/arch/sgimips/gio/gio.c 2021/08/04 02:53:00 1.37.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: gio.c,v 1.37 2021/04/24 23:36:48 thorpej Exp $ */ 1/* $NetBSD: gio.c,v 1.37.8.1 2021/08/04 02:53:00 thorpej Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000 Soren S. Jorvang 4 * Copyright (c) 2000 Soren S. Jorvang
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -23,27 +23,27 @@ @@ -23,27 +23,27 @@
23 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 23 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
24 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 24 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
25 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 25 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
26 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 26 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
27 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 27 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
28 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35#include <sys/cdefs.h> 35#include <sys/cdefs.h>
36__KERNEL_RCSID(0, "$NetBSD: gio.c,v 1.37 2021/04/24 23:36:48 thorpej Exp $"); 36__KERNEL_RCSID(0, "$NetBSD: gio.c,v 1.37.8.1 2021/08/04 02:53:00 thorpej Exp $");
37 37
38#include "opt_ddb.h" 38#include "opt_ddb.h"
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/device.h> 42#include <sys/device.h>
43 43
44#include <sys/bus.h> 44#include <sys/bus.h>
45#include <machine/machtype.h> 45#include <machine/machtype.h>
46#include <machine/sysconf.h> 46#include <machine/sysconf.h>
47 47
48#include <sgimips/gio/gioreg.h> 48#include <sgimips/gio/gioreg.h>
49#include <sgimips/gio/giovar.h> 49#include <sgimips/gio/giovar.h>
@@ -210,28 +210,27 @@ gio_attach(device_t parent, device_t sel @@ -210,28 +210,27 @@ gio_attach(device_t parent, device_t sel
210 /* XXX */ 210 /* XXX */
211 if (platform.badaddr((void *)MIPS_PHYS_TO_KSEG1(ga.ga_addr), 211 if (platform.badaddr((void *)MIPS_PHYS_TO_KSEG1(ga.ga_addr),
212 sizeof(uint32_t))) 212 sizeof(uint32_t)))
213 continue; 213 continue;
214 ga.ga_iot = normal_memt; 214 ga.ga_iot = normal_memt;
215 if (bus_space_map(normal_memt, ga.ga_addr, 0, 215 if (bus_space_map(normal_memt, ga.ga_addr, 0,
216 BUS_SPACE_MAP_LINEAR, &ga.ga_ioh) != 0) 216 BUS_SPACE_MAP_LINEAR, &ga.ga_ioh) != 0)
217 continue; 217 continue;
218 ga.ga_dmat = &sgimips_default_bus_dma_tag; 218 ga.ga_dmat = &sgimips_default_bus_dma_tag;
219 ga.ga_product = -1; 219 ga.ga_product = -1;
220 220
221  221
222 if (config_found(self, &ga, gio_print, 222 if (config_found(self, &ga, gio_print,
223 CFARG_SUBMATCH, gio_submatch, 223 CFARGS(.submatch = gio_submatch)) != NULL) {
224 CFARG_EOL) != NULL) { 
225 if (ngfx == MAXGFX) 224 if (ngfx == MAXGFX)
226 panic("gio_attach: MAXGFX"); 225 panic("gio_attach: MAXGFX");
227 gfx[ngfx++] = gfx_bases[i].base; 226 gfx[ngfx++] = gfx_bases[i].base;
228 } 227 }
229 } 228 }
230 229
231 /* 230 /*
232 * Now attach any GIO expansion cards. 231 * Now attach any GIO expansion cards.
233 * 232 *
234 * Be sure to skip any addresses to which a graphics device has 233 * Be sure to skip any addresses to which a graphics device has
235 * already been attached. 234 * already been attached.
236 */ 235 */
237 for (i = 0; slot_bases[i].base != 0; i++) { 236 for (i = 0; slot_bases[i].base != 0; i++) {
@@ -259,33 +258,31 @@ gio_attach(device_t parent, device_t sel @@ -259,33 +258,31 @@ gio_attach(device_t parent, device_t sel
259 /* XXX */ 258 /* XXX */
260 if (platform.badaddr((void *)MIPS_PHYS_TO_KSEG1(ga.ga_addr), 259 if (platform.badaddr((void *)MIPS_PHYS_TO_KSEG1(ga.ga_addr),
261 sizeof(uint32_t))) 260 sizeof(uint32_t)))
262 continue; 261 continue;
263 ga.ga_iot = normal_memt; 262 ga.ga_iot = normal_memt;
264 if (bus_space_map(normal_memt, ga.ga_addr, 0, 263 if (bus_space_map(normal_memt, ga.ga_addr, 0,
265 BUS_SPACE_MAP_LINEAR, &ga.ga_ioh) != 0) 264 BUS_SPACE_MAP_LINEAR, &ga.ga_ioh) != 0)
266 continue; 265 continue;
267 ga.ga_dmat = &sgimips_default_bus_dma_tag; 266 ga.ga_dmat = &sgimips_default_bus_dma_tag;
268 267
269 ga.ga_product = bus_space_read_4(ga.ga_iot, ga.ga_ioh, 0); 268 ga.ga_product = bus_space_read_4(ga.ga_iot, ga.ga_ioh, 0);
270 269
271 config_found(self, &ga, gio_print, 270 config_found(self, &ga, gio_print,
272 CFARG_SUBMATCH, gio_submatch, 271 CFARGS(.submatch = gio_submatch));
273 CFARG_EOL); 
274 } 272 }
275 273
276 config_search(self, &ga, 274 config_search(self, &ga,
277 CFARG_SEARCH, gio_search, 275 CFARGS(.search = gio_search));
278 CFARG_EOL); 
279} 276}
280 277
281static int 278static int
282gio_print(void *aux, const char *pnp) 279gio_print(void *aux, const char *pnp)
283{ 280{
284 struct gio_attach_args *ga = aux; 281 struct gio_attach_args *ga = aux;
285 int i = 0; 282 int i = 0;
286 283
287 /* gfx probe */ 284 /* gfx probe */
288 if (ga->ga_product == -1) 285 if (ga->ga_product == -1)
289 return (QUIET); 286 return (QUIET);
290 287
291 if (pnp != NULL) { 288 if (pnp != NULL) {
@@ -327,27 +324,27 @@ gio_search(device_t parent, cfdata_t cf, @@ -327,27 +324,27 @@ gio_search(device_t parent, cfdata_t cf,
327 struct gio_attach_args *ga = aux; 324 struct gio_attach_args *ga = aux;
328 325
329 do { 326 do {
330 /* Handled by direct configuration, so skip here */ 327 /* Handled by direct configuration, so skip here */
331 if (cf->cf_loc[GIOCF_ADDR] == GIOCF_ADDR_DEFAULT) 328 if (cf->cf_loc[GIOCF_ADDR] == GIOCF_ADDR_DEFAULT)
332 return 0; 329 return 0;
333 330
334 ga->ga_slot = cf->cf_loc[GIOCF_SLOT]; 331 ga->ga_slot = cf->cf_loc[GIOCF_SLOT];
335 ga->ga_addr = cf->cf_loc[GIOCF_ADDR]; 332 ga->ga_addr = cf->cf_loc[GIOCF_ADDR];
336 ga->ga_iot = normal_memt; 333 ga->ga_iot = normal_memt;
337 ga->ga_ioh = MIPS_PHYS_TO_KSEG1(ga->ga_addr); 334 ga->ga_ioh = MIPS_PHYS_TO_KSEG1(ga->ga_addr);
338 335
339 if (config_probe(parent, cf, ga)) 336 if (config_probe(parent, cf, ga))
340 config_attach(parent, cf, ga, gio_print, CFARG_EOL); 337 config_attach(parent, cf, ga, gio_print, CFARGS_NONE);
341 } while (cf->cf_fstate == FSTATE_STAR); 338 } while (cf->cf_fstate == FSTATE_STAR);
342 339
343 return 0; 340 return 0;
344} 341}
345 342
346static int 343static int
347gio_submatch(device_t parent, cfdata_t cf, const int *ldesc, void *aux) 344gio_submatch(device_t parent, cfdata_t cf, const int *ldesc, void *aux)
348{ 345{
349 struct gio_attach_args *ga = aux; 346 struct gio_attach_args *ga = aux;
350 347
351 if (cf->cf_loc[GIOCF_SLOT] != GIOCF_SLOT_DEFAULT && 348 if (cf->cf_loc[GIOCF_SLOT] != GIOCF_SLOT_DEFAULT &&
352 cf->cf_loc[GIOCF_SLOT] != ga->ga_slot) 349 cf->cf_loc[GIOCF_SLOT] != ga->ga_slot)
353 return 0; 350 return 0;

cvs diff -r1.17 -r1.17.8.1 src/sys/arch/sgimips/gio/grtwo.c (expand / switch to unified diff)

--- src/sys/arch/sgimips/gio/grtwo.c 2021/04/24 23:36:48 1.17
+++ src/sys/arch/sgimips/gio/grtwo.c 2021/08/04 02:53:00 1.17.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: grtwo.c,v 1.17 2021/04/24 23:36:48 thorpej Exp $ */ 1/* $NetBSD: grtwo.c,v 1.17.8.1 2021/08/04 02:53:00 thorpej Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2004 Christopher SEKIYA 4 * Copyright (c) 2004 Christopher SEKIYA
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -25,27 +25,27 @@ @@ -25,27 +25,27 @@
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 * <<Id: LICENSE_GC,v 1.1 2001/10/01 23:24:05 cgd Exp>> 29 * <<Id: LICENSE_GC,v 1.1 2001/10/01 23:24:05 cgd Exp>>
30 */ 30 */
31 31
32/* wscons driver for SGI GR2 family of framebuffers 32/* wscons driver for SGI GR2 family of framebuffers
33 *  33 *
34 * Heavily based on the newport wscons driver. 34 * Heavily based on the newport wscons driver.
35 */ 35 */
36 36
37#include <sys/cdefs.h> 37#include <sys/cdefs.h>
38__KERNEL_RCSID(0, "$NetBSD: grtwo.c,v 1.17 2021/04/24 23:36:48 thorpej Exp $"); 38__KERNEL_RCSID(0, "$NetBSD: grtwo.c,v 1.17.8.1 2021/08/04 02:53:00 thorpej 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/device.h> 42#include <sys/device.h>
43#include <sys/kmem.h> 43#include <sys/kmem.h>
44 44
45#include <machine/sysconf.h> 45#include <machine/sysconf.h>
46 46
47#include <dev/wscons/wsconsio.h> 47#include <dev/wscons/wsconsio.h>
48#include <dev/wscons/wsdisplayvar.h> 48#include <dev/wscons/wsdisplayvar.h>
49#include <dev/wsfont/wsfont.h> 49#include <dev/wsfont/wsfont.h>
50 50
51#include <sgimips/gio/giovar.h> 51#include <sgimips/gio/giovar.h>
@@ -518,27 +518,27 @@ grtwo_attach(device_t parent, device_t s @@ -518,27 +518,27 @@ grtwo_attach(device_t parent, device_t s
518 aprint_normal(": GR2 (board rev %x, monitor %d, depth %d)\n", 518 aprint_normal(": GR2 (board rev %x, monitor %d, depth %d)\n",
519 sc->sc_dc->boardrev, sc->sc_dc->monitor, sc->sc_dc->depth); 519 sc->sc_dc->boardrev, sc->sc_dc->monitor, sc->sc_dc->depth);
520 520
521 wa.scrdata = &grtwo_screenlist; 521 wa.scrdata = &grtwo_screenlist;
522 wa.accessops = &grtwo_accessops; 522 wa.accessops = &grtwo_accessops;
523 wa.accesscookie = sc->sc_dc; 523 wa.accesscookie = sc->sc_dc;
524 524
525 if ((cpu_intr_establish(0, IPL_TTY, grtwo_intr0, sc)) == NULL) 525 if ((cpu_intr_establish(0, IPL_TTY, grtwo_intr0, sc)) == NULL)
526 printf(": unable to establish interrupt!\n"); 526 printf(": unable to establish interrupt!\n");
527 527
528 if ((cpu_intr_establish(6, IPL_TTY, grtwo_intr6, sc)) == NULL) 528 if ((cpu_intr_establish(6, IPL_TTY, grtwo_intr6, sc)) == NULL)
529 printf(": unable to establish interrupt!\n"); 529 printf(": unable to establish interrupt!\n");
530 530
531 config_found(self, &wa, wsemuldisplaydevprint, CFARG_EOL); 531 config_found(self, &wa, wsemuldisplaydevprint, CFARGS_NONE);
532} 532}
533 533
534int 534int
535grtwo_cnattach(struct gio_attach_args * ga) 535grtwo_cnattach(struct gio_attach_args * ga)
536{ 536{
537 long defattr = GR2_ATTR_ENCODE(WSCOL_WHITE, WSCOL_BLACK); 537 long defattr = GR2_ATTR_ENCODE(WSCOL_WHITE, WSCOL_BLACK);
538 538
539 if (!grtwo_match(NULL, NULL, ga)) { 539 if (!grtwo_match(NULL, NULL, ga)) {
540 return ENXIO; 540 return ENXIO;
541 } 541 }
542 542
543 grtwo_attach_common(&grtwo_console_dc, ga); 543 grtwo_attach_common(&grtwo_console_dc, ga);
544 wsdisplay_cnattach(&grtwo_screen, &grtwo_console_dc, 0, 0, defattr); 544 wsdisplay_cnattach(&grtwo_screen, &grtwo_console_dc, 0, 0, defattr);

cvs diff -r1.9 -r1.9.8.1 src/sys/arch/sgimips/gio/light.c (expand / switch to unified diff)

--- src/sys/arch/sgimips/gio/light.c 2021/04/24 23:36:48 1.9
+++ src/sys/arch/sgimips/gio/light.c 2021/08/04 02:53:00 1.9.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $Id: light.c,v 1.9 2021/04/24 23:36:48 thorpej Exp $ */ 1/* $Id: light.c,v 1.9.8.1 2021/08/04 02:53:00 thorpej Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2006 Stephen M. Rumble 4 * Copyright (c) 2006 Stephen M. Rumble
5 * Copyright (c) 2003 Ilpo Ruotsalainen 5 * Copyright (c) 2003 Ilpo Ruotsalainen
6 * All rights reserved. 6 * All rights reserved.
7 *  7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
11 * 1. Redistributions of source code must retain the above copyright 11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer. 12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
@@ -33,27 +33,27 @@ @@ -33,27 +33,27 @@
33/* 33/*
34 * SGI "Light" graphics, a.k.a. "Entry", "Starter", "LG1", and "LG2". 34 * SGI "Light" graphics, a.k.a. "Entry", "Starter", "LG1", and "LG2".
35 * 35 *
36 * 1024x768 8bpp at 60Hz. 36 * 1024x768 8bpp at 60Hz.
37 * 37 *
38 * This driver supports the boards found in Indigo R3k and R4k machines. 38 * This driver supports the boards found in Indigo R3k and R4k machines.
39 * There is a Crimson variant, but the register offsets differ significantly. 39 * There is a Crimson variant, but the register offsets differ significantly.
40 * 40 *
41 * Light's REX chip is the precursor of the REX3 found in "newport", hence 41 * Light's REX chip is the precursor of the REX3 found in "newport", hence
42 * much similarity exists. 42 * much similarity exists.
43 */ 43 */
44 44
45#include <sys/cdefs.h> 45#include <sys/cdefs.h>
46__KERNEL_RCSID(0, "$NetBSD: light.c,v 1.9 2021/04/24 23:36:48 thorpej Exp $"); 46__KERNEL_RCSID(0, "$NetBSD: light.c,v 1.9.8.1 2021/08/04 02:53:00 thorpej Exp $");
47 47
48#include <sys/param.h> 48#include <sys/param.h>
49#include <sys/systm.h> 49#include <sys/systm.h>
50#include <sys/device.h> 50#include <sys/device.h>
51#include <sys/kmem.h> 51#include <sys/kmem.h>
52 52
53#include <machine/sysconf.h> 53#include <machine/sysconf.h>
54 54
55#include <dev/wscons/wsconsio.h> 55#include <dev/wscons/wsconsio.h>
56#include <dev/wscons/wsdisplayvar.h> 56#include <dev/wscons/wsdisplayvar.h>
57#include <dev/wsfont/wsfont.h> 57#include <dev/wsfont/wsfont.h>
58 58
59#include <sgimips/gio/giovar.h> 59#include <sgimips/gio/giovar.h>
@@ -326,27 +326,27 @@ light_attach(device_t parent, device_t s @@ -326,27 +326,27 @@ light_attach(device_t parent, device_t s
326 light_attach_common(sc->sc_dc, ga); 326 light_attach_common(sc->sc_dc, ga);
327 } 327 }
328 328
329 aprint_naive(": Display adapter\n"); 329 aprint_naive(": Display adapter\n");
330 330
331 aprint_normal(": SGI LG%d (board revision %d)\n", 331 aprint_normal(": SGI LG%d (board revision %d)\n",
332 LIGHT_IS_LG1(sc->sc_dc->dc_boardrev) ? 1 : 2, 332 LIGHT_IS_LG1(sc->sc_dc->dc_boardrev) ? 1 : 2,
333 sc->sc_dc->dc_boardrev); 333 sc->sc_dc->dc_boardrev);
334 334
335 wa.scrdata = &light_screenlist; 335 wa.scrdata = &light_screenlist;
336 wa.accessops = &light_accessops; 336 wa.accessops = &light_accessops;
337 wa.accesscookie = sc->sc_dc; 337 wa.accesscookie = sc->sc_dc;
338 338
339 config_found(self, &wa, wsemuldisplaydevprint, CFARG_EOL); 339 config_found(self, &wa, wsemuldisplaydevprint, CFARGS_NONE);
340} 340}
341 341
342int 342int
343light_cnattach(struct gio_attach_args *ga) 343light_cnattach(struct gio_attach_args *ga)
344{ 344{
345 345
346 if (!light_match(NULL, NULL, ga)) 346 if (!light_match(NULL, NULL, ga))
347 return (ENXIO); 347 return (ENXIO);
348 348
349 light_attach_common(&light_console_dc, ga); 349 light_attach_common(&light_console_dc, ga);
350 350
351 wsdisplay_cnattach(&light_screen, &light_console_dc, 0, 0, 351 wsdisplay_cnattach(&light_screen, &light_console_dc, 0, 0,
352 LIGHT_ATTR_ENCODE(WSCOL_WHITE, WSCOL_BLACK)); 352 LIGHT_ATTR_ENCODE(WSCOL_WHITE, WSCOL_BLACK));

cvs diff -r1.22 -r1.22.8.1 src/sys/arch/sgimips/gio/newport.c (expand / switch to unified diff)

--- src/sys/arch/sgimips/gio/newport.c 2021/04/24 23:36:48 1.22
+++ src/sys/arch/sgimips/gio/newport.c 2021/08/04 02:53:00 1.22.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: newport.c,v 1.22 2021/04/24 23:36:48 thorpej Exp $ */ 1/* $NetBSD: newport.c,v 1.22.8.1 2021/08/04 02:53:00 thorpej Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2003 Ilpo Ruotsalainen 4 * Copyright (c) 2003 Ilpo Ruotsalainen
5 * 2009 Michael Lorenz 5 * 2009 Michael Lorenz
6 * All rights reserved. 6 * All rights reserved.
7 *  7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
11 * 1. Redistributions of source code must retain the above copyright 11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer. 12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
@@ -21,27 +21,27 @@ @@ -21,27 +21,27 @@
21 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 21 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 22 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 23 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 *  29 *
30 * <<Id: LICENSE_GC,v 1.1 2001/10/01 23:24:05 cgd Exp>> 30 * <<Id: LICENSE_GC,v 1.1 2001/10/01 23:24:05 cgd Exp>>
31 */ 31 */
32 32
33#include <sys/cdefs.h> 33#include <sys/cdefs.h>
34__KERNEL_RCSID(0, "$NetBSD: newport.c,v 1.22 2021/04/24 23:36:48 thorpej Exp $"); 34__KERNEL_RCSID(0, "$NetBSD: newport.c,v 1.22.8.1 2021/08/04 02:53:00 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#include <sys/kmem.h> 39#include <sys/kmem.h>
40 40
41#include <machine/sysconf.h> 41#include <machine/sysconf.h>
42 42
43#include <dev/wscons/wsconsio.h> 43#include <dev/wscons/wsconsio.h>
44#include <dev/wscons/wsdisplayvar.h> 44#include <dev/wscons/wsdisplayvar.h>
45#include <dev/wsfont/wsfont.h> 45#include <dev/wsfont/wsfont.h>
46#include <dev/rasops/rasops.h> 46#include <dev/rasops/rasops.h>
47#include <dev/wscons/wsdisplay_vconsvar.h> 47#include <dev/wscons/wsdisplay_vconsvar.h>
@@ -629,27 +629,27 @@ newport_attach(device_t parent, device_t @@ -629,27 +629,27 @@ newport_attach(device_t parent, device_t
629 sc->sc_dc->dc_vd.init_screen = newport_init_screen; 629 sc->sc_dc->dc_vd.init_screen = newport_init_screen;
630 if (newport_is_console) { 630 if (newport_is_console) {
631 newport_console_screen.scr_flags |= VCONS_SCREEN_IS_STATIC; 631 newport_console_screen.scr_flags |= VCONS_SCREEN_IS_STATIC;
632 vcons_init_screen(&sc->sc_dc->dc_vd, &newport_console_screen, 632 vcons_init_screen(&sc->sc_dc->dc_vd, &newport_console_screen,
633 1, &defattr); 633 1, &defattr);
634 sc->sc_dc->dc_screen->textops = 634 sc->sc_dc->dc_screen->textops =
635 &newport_console_screen.scr_ri.ri_ops; 635 &newport_console_screen.scr_ri.ri_ops;
636 vcons_replay_msgbuf(&newport_console_screen); 636 vcons_replay_msgbuf(&newport_console_screen);
637 } 637 }
638 wa.scrdata = &newport_screenlist; 638 wa.scrdata = &newport_screenlist;
639 wa.accessops = &newport_accessops; 639 wa.accessops = &newport_accessops;
640 wa.accesscookie = &sc->sc_dc->dc_vd; 640 wa.accesscookie = &sc->sc_dc->dc_vd;
641 641
642 config_found(sc->sc_dev, &wa, wsemuldisplaydevprint, CFARG_EOL); 642 config_found(sc->sc_dev, &wa, wsemuldisplaydevprint, CFARGS_NONE);
643} 643}
644 644
645int 645int
646newport_cnattach(struct gio_attach_args *ga) 646newport_cnattach(struct gio_attach_args *ga)
647{ 647{
648 struct rasops_info *ri = &newport_console_screen.scr_ri; 648 struct rasops_info *ri = &newport_console_screen.scr_ri;
649 long defattr = 0x000f0000; 649 long defattr = 0x000f0000;
650 650
651 if (!newport_match(NULL, NULL, ga)) { 651 if (!newport_match(NULL, NULL, ga)) {
652 return ENXIO; 652 return ENXIO;
653 } 653 }
654 654
655 newport_attach_common(&newport_console_dc, ga); 655 newport_attach_common(&newport_console_dc, ga);

cvs diff -r1.18 -r1.18.8.1 src/sys/arch/sgimips/gio/pci_gio.c (expand / switch to unified diff)

--- src/sys/arch/sgimips/gio/pci_gio.c 2021/04/24 23:36:48 1.18
+++ src/sys/arch/sgimips/gio/pci_gio.c 2021/08/04 02:53:00 1.18.8.1
@@ -1,41 +1,41 @@ @@ -1,41 +1,41 @@
1/* $NetBSD: pci_gio.c,v 1.18 2021/04/24 23:36:48 thorpej Exp $ */ 1/* $NetBSD: pci_gio.c,v 1.18.8.1 2021/08/04 02:53:00 thorpej Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2006 Stephen M. Rumble 4 * Copyright (c) 2006 Stephen M. Rumble
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. The name of the author may not be used to endorse or promote products 12 * 2. The name of the author may not be used to endorse or promote products
13 * derived from this software without specific prior written permission. 13 * derived from this software without specific prior written permission.
14 * 14 *
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */ 25 */
26 26
27#include <sys/cdefs.h> 27#include <sys/cdefs.h>
28__KERNEL_RCSID(0, "$NetBSD: pci_gio.c,v 1.18 2021/04/24 23:36:48 thorpej Exp $"); 28__KERNEL_RCSID(0, "$NetBSD: pci_gio.c,v 1.18.8.1 2021/08/04 02:53:00 thorpej Exp $");
29 29
30/* 30/*
31 * Glue for PCI devices that are connected to the GIO bus by various little 31 * Glue for PCI devices that are connected to the GIO bus by various little
32 * GIO<->PCI ASICs. 32 * GIO<->PCI ASICs.
33 * 33 *
34 * We presently support the following boards: 34 * We presently support the following boards:
35 * o Phobos G100/G130/G160 (if_tlp, lxtphy) 35 * o Phobos G100/G130/G160 (if_tlp, lxtphy)
36 * o Set Engineering GFE (if_tl, nsphy) 36 * o Set Engineering GFE (if_tl, nsphy)
37 */ 37 */
38 38
39#include "opt_pci.h" 39#include "opt_pci.h"
40#include "pci.h" 40#include "pci.h"
41 41
@@ -227,27 +227,27 @@ giopci_attach(device_t parent, device_t  @@ -227,27 +227,27 @@ giopci_attach(device_t parent, device_t
227 pci_configure_bus(pc, pcires, 0, 227 pci_configure_bus(pc, pcires, 0,
228 mips_cache_info.mci_dcache_align); 228 mips_cache_info.mci_dcache_align);
229 229
230 pciconf_resource_fini(pcires); 230 pciconf_resource_fini(pcires);
231#endif 231#endif
232 232
233 memset(&pba, 0, sizeof(pba)); 233 memset(&pba, 0, sizeof(pba));
234 pba.pba_memt = gio_pci_memt; 234 pba.pba_memt = gio_pci_memt;
235 pba.pba_dmat = ga->ga_dmat; 235 pba.pba_dmat = ga->ga_dmat;
236 pba.pba_pc = pc; 236 pba.pba_pc = pc;
237 pba.pba_flags = PCI_FLAGS_MEM_OKAY; 237 pba.pba_flags = PCI_FLAGS_MEM_OKAY;
238 /* NB: do not set PCI_FLAGS_{MRL,MRM,MWI}_OKAY -- true ?! */ 238 /* NB: do not set PCI_FLAGS_{MRL,MRM,MWI}_OKAY -- true ?! */
239 239
240 config_found(self, &pba, pcibusprint, CFARG_EOL); 240 config_found(self, &pba, pcibusprint, CFARGS_NONE);
241} 241}
242 242
243static int 243static int
244giopci_bus_maxdevs(pci_chipset_tag_t pc, int busno) 244giopci_bus_maxdevs(pci_chipset_tag_t pc, int busno)
245{ 245{
246  246
247 return (busno == 0); 247 return (busno == 0);
248} 248}
249 249
250static pcireg_t 250static pcireg_t
251giopci_conf_read(pci_chipset_tag_t pc, pcitag_t tag, int reg) 251giopci_conf_read(pci_chipset_tag_t pc, pcitag_t tag, int reg)
252{ 252{
253 struct giopci_softc *sc = pc->cookie; 253 struct giopci_softc *sc = pc->cookie;

cvs diff -r1.72 -r1.72.8.1 src/sys/arch/sgimips/hpc/hpc.c (expand / switch to unified diff)

--- src/sys/arch/sgimips/hpc/hpc.c 2021/04/24 23:36:48 1.72
+++ src/sys/arch/sgimips/hpc/hpc.c 2021/08/04 02:53:00 1.72.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: hpc.c,v 1.72 2021/04/24 23:36:48 thorpej Exp $ */ 1/* $NetBSD: hpc.c,v 1.72.8.1 2021/08/04 02:53:00 thorpej Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000 Soren S. Jorvang 4 * Copyright (c) 2000 Soren S. Jorvang
5 * Copyright (c) 2001 Rafal K. Boni 5 * Copyright (c) 2001 Rafal K. Boni
6 * Copyright (c) 2001 Jason R. Thorpe 6 * Copyright (c) 2001 Jason R. Thorpe
7 * All rights reserved. 7 * 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
@@ -25,27 +25,27 @@ @@ -25,27 +25,27 @@
25 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 25 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
26 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 26 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
27 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 27 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
28 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 28 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
29 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 29 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
30 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 30 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 31 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 */ 35 */
36 36
37#include <sys/cdefs.h> 37#include <sys/cdefs.h>
38__KERNEL_RCSID(0, "$NetBSD: hpc.c,v 1.72 2021/04/24 23:36:48 thorpej Exp $"); 38__KERNEL_RCSID(0, "$NetBSD: hpc.c,v 1.72.8.1 2021/08/04 02:53:00 thorpej 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#include <sys/reboot.h> 44#include <sys/reboot.h>
45#include <sys/callout.h> 45#include <sys/callout.h>
46 46
47#include <sys/bus.h> 47#include <sys/bus.h>
48#include <machine/machtype.h> 48#include <machine/machtype.h>
49#include <machine/sysconf.h> 49#include <machine/sysconf.h>
50 50
51#include <sgimips/gio/gioreg.h> 51#include <sgimips/gio/gioreg.h>
@@ -527,32 +527,30 @@ hpc_attach(device_t parent, device_t sel @@ -527,32 +527,30 @@ hpc_attach(device_t parent, device_t sel
527 if (bus_space_map(normal_memt, sc->sc_base, 0, 527 if (bus_space_map(normal_memt, sc->sc_base, 0,
528 BUS_SPACE_MAP_LINEAR, &ha.ha_sh) != 0) 528 BUS_SPACE_MAP_LINEAR, &ha.ha_sh) != 0)
529 continue; 529 continue;
530 ha.ha_dmat = &sgimips_default_bus_dma_tag; 530 ha.ha_dmat = &sgimips_default_bus_dma_tag;
531 if (hpctype == 3) 531 if (hpctype == 3)
532 ha.hpc_regs = &hpc3_values; 532 ha.hpc_regs = &hpc3_values;
533 else 533 else
534 ha.hpc_regs = &hpc1_values; 534 ha.hpc_regs = &hpc1_values;
535 ha.hpc_regs->revision = hpctype; 535 ha.hpc_regs->revision = hpctype;
536 536
537 /* XXXgross! avoid complaining in E++ and GIO32 SCSI cases */ 537 /* XXXgross! avoid complaining in E++ and GIO32 SCSI cases */
538 if (hpctype != 3 && sc->sc_base != HPC_BASE_ADDRESS_0) { 538 if (hpctype != 3 && sc->sc_base != HPC_BASE_ADDRESS_0) {
539 config_found(self, &ha, NULL, 539 config_found(self, &ha, NULL,
540 CFARG_SUBMATCH, hpc_submatch, 540 CFARGS(.submatch = hpc_submatch));
541 CFARG_EOL); 
542 } else { 541 } else {
543 config_found(self, &ha, hpc_print, 542 config_found(self, &ha, hpc_print,
544 CFARG_SUBMATCH, hpc_submatch, 543 CFARGS(.submatch = hpc_submatch));
545 CFARG_EOL); 
546 } 544 }
547 } 545 }
548 546
549#if defined(BLINK) 547#if defined(BLINK)
550 if (mach_type == MACH_SGI_IP12 || mach_type == MACH_SGI_IP20) 548 if (mach_type == MACH_SGI_IP12 || mach_type == MACH_SGI_IP20)
551 hpc_blink(sc); 549 hpc_blink(sc);
552#endif 550#endif
553} 551}
554 552
555/* 553/*
556 * HPC revision detection isn't as simple as it should be. Devices probe 554 * HPC revision detection isn't as simple as it should be. Devices probe
557 * differently depending on their slots, but luckily there is only one 555 * differently depending on their slots, but luckily there is only one
558 * instance in which we have to decide the major revision (HPC1 vs HPC3). 556 * instance in which we have to decide the major revision (HPC1 vs HPC3).

cvs diff -r1.14 -r1.14.8.1 src/sys/arch/sgimips/hpc/pi1ppc.c (expand / switch to unified diff)

--- src/sys/arch/sgimips/hpc/pi1ppc.c 2021/04/24 23:36:48 1.14
+++ src/sys/arch/sgimips/hpc/pi1ppc.c 2021/08/04 02:53:00 1.14.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: pi1ppc.c,v 1.14 2021/04/24 23:36:48 thorpej Exp $ */ 1/* $NetBSD: pi1ppc.c,v 1.14.8.1 2021/08/04 02:53:00 thorpej Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001 Alcove - Nicolas Souchu 4 * Copyright (c) 2001 Alcove - Nicolas Souchu
5 * Copyright (c) 2003, 2004 Gary Thorpe <gathorpe@users.sourceforge.net> 5 * Copyright (c) 2003, 2004 Gary Thorpe <gathorpe@users.sourceforge.net>
6 * Copyright (c) 2005 Joe Britt <britt@danger.com> - SGI PI1 version 6 * Copyright (c) 2005 Joe Britt <britt@danger.com> - SGI PI1 version
7 * All rights reserved. 7 * All rights reserved.
8 * 8 *
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.
@@ -23,27 +23,27 @@ @@ -23,27 +23,27 @@
23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE. 29 * SUCH DAMAGE.
30 * 30 *
31 * FreeBSD: src/sys/isa/ppc.c,v 1.26.2.5 2001/10/02 05:21:45 nsouch Exp 31 * FreeBSD: src/sys/isa/ppc.c,v 1.26.2.5 2001/10/02 05:21:45 nsouch Exp
32 * 32 *
33 */ 33 */
34 34
35#include <sys/cdefs.h> 35#include <sys/cdefs.h>
36__KERNEL_RCSID(0, "$NetBSD: pi1ppc.c,v 1.14 2021/04/24 23:36:48 thorpej Exp $"); 36__KERNEL_RCSID(0, "$NetBSD: pi1ppc.c,v 1.14.8.1 2021/08/04 02:53:00 thorpej Exp $");
37 37
38#include "opt_pi1ppc.h" 38#include "opt_pi1ppc.h"
39 39
40#include <sys/types.h> 40#include <sys/types.h>
41#include <sys/param.h> 41#include <sys/param.h>
42#include <sys/kernel.h> 42#include <sys/kernel.h>
43#include <sys/kmem.h> 43#include <sys/kmem.h>
44#include <sys/device.h> 44#include <sys/device.h>
45#include <sys/systm.h> 45#include <sys/systm.h>
46 46
47#include <sys/bus.h> 47#include <sys/bus.h>
48/*#include <machine/intr.h>*/ 48/*#include <machine/intr.h>*/
49 49
@@ -271,27 +271,27 @@ pi1ppc_sc_attach(struct pi1ppc_softc *ls @@ -271,27 +271,27 @@ pi1ppc_sc_attach(struct pi1ppc_softc *ls
271 271
272 /* Initialize handler list, may be added to by grandchildren */ 272 /* Initialize handler list, may be added to by grandchildren */
273 SLIST_INIT(&(lsc->sc_handler_listhead)); 273 SLIST_INIT(&(lsc->sc_handler_listhead));
274 274
275 /* Initialize interrupt state */ 275 /* Initialize interrupt state */
276 lsc->sc_irqstat = PI1PPC_IRQ_NONE; 276 lsc->sc_irqstat = PI1PPC_IRQ_NONE;
277 lsc->sc_ecr_intr = lsc->sc_ctr_intr = lsc->sc_str_intr = 0; 277 lsc->sc_ecr_intr = lsc->sc_ctr_intr = lsc->sc_str_intr = 0;
278 278
279 /* Disable DMA/interrupts (each ppbus driver selects usage itself) */ 279 /* Disable DMA/interrupts (each ppbus driver selects usage itself) */
280 lsc->sc_use = 0; 280 lsc->sc_use = 0;
281 281
282 /* Configure child of the device. */ 282 /* Configure child of the device. */
283 lsc->child = config_found(lsc->sc_dev, &(sc_parport_adapter), 283 lsc->child = config_found(lsc->sc_dev, &(sc_parport_adapter),
284 pi1ppc_print, CFARG_EOL); 284 pi1ppc_print, CFARGS_NONE);
285 285
286 return; 286 return;
287} 287}
288 288
289/* Soft configuration detach */ 289/* Soft configuration detach */
290int 290int
291pi1ppc_sc_detach(struct pi1ppc_softc *lsc, int flag) 291pi1ppc_sc_detach(struct pi1ppc_softc *lsc, int flag)
292{ 292{
293 device_t dev = lsc->sc_dev; 293 device_t dev = lsc->sc_dev;
294 294
295 /* Detach children devices */ 295 /* Detach children devices */
296 if (config_detach(lsc->child, flag) && !(flag & DETACH_QUIET)) { 296 if (config_detach(lsc->child, flag) && !(flag & DETACH_QUIET)) {
297 printf("%s not able to detach child device, ", device_xname(dev)); 297 printf("%s not able to detach child device, ", device_xname(dev));

cvs diff -r1.12 -r1.12.8.1 src/sys/arch/sgimips/ioc/ioc.c (expand / switch to unified diff)

--- src/sys/arch/sgimips/ioc/ioc.c 2021/04/24 23:36:48 1.12
+++ src/sys/arch/sgimips/ioc/ioc.c 2021/08/04 02:53:00 1.12.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: ioc.c,v 1.12 2021/04/24 23:36:48 thorpej Exp $ */ 1/* $NetBSD: ioc.c,v 1.12.8.1 2021/08/04 02:53:00 thorpej Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2003 Christopher Sekiya 4 * Copyright (c) 2003 Christopher Sekiya
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -27,27 +27,27 @@ @@ -27,27 +27,27 @@
27 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 27 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
28 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/* 35/*
36 * ip20/22/24 I/O Controller (IOC) 36 * ip20/22/24 I/O Controller (IOC)
37 */ 37 */
38 38
39#include <sys/cdefs.h> 39#include <sys/cdefs.h>
40__KERNEL_RCSID(0, "$NetBSD: ioc.c,v 1.12 2021/04/24 23:36:48 thorpej Exp $"); 40__KERNEL_RCSID(0, "$NetBSD: ioc.c,v 1.12.8.1 2021/08/04 02:53:00 thorpej Exp $");
41 41
42#include <sys/param.h> 42#include <sys/param.h>
43#include <sys/systm.h> 43#include <sys/systm.h>
44#include <sys/device.h> 44#include <sys/device.h>
45#include <sys/callout.h> 45#include <sys/callout.h>
46#include <sys/malloc.h> 46#include <sys/malloc.h>
47#include <sys/kernel.h> 47#include <sys/kernel.h>
48#include <sys/socket.h> 48#include <sys/socket.h>
49#include <sys/ioctl.h> 49#include <sys/ioctl.h>
50#include <sys/errno.h> 50#include <sys/errno.h>
51#include <sys/syslog.h> 51#include <sys/syslog.h>
52 52
53#include <uvm/uvm_extern.h> 53#include <uvm/uvm_extern.h>
@@ -148,28 +148,27 @@ ioc_attach(device_t parent, device_t sel @@ -148,28 +148,27 @@ ioc_attach(device_t parent, device_t sel
148#if defined(BLINK) 148#if defined(BLINK)
149 ioc_blink(sc); 149 ioc_blink(sc);
150#endif 150#endif
151 151
152#if defined(notyet) 152#if defined(notyet)
153 /* 153 /*
154 * pckbc, zstty, and lpt should attach under the IOC. This begs the 154 * pckbc, zstty, and lpt should attach under the IOC. This begs the
155 * question of how we sort things out with ip20, which has no IOC. 155 * question of how we sort things out with ip20, which has no IOC.
156 * For now, we pretend that everything attaches at HPC and ignore 156 * For now, we pretend that everything attaches at HPC and ignore
157 * the IOC. 157 * the IOC.
158 */ 158 */
159 159
160 config_search(self, NULL, 160 config_search(self, NULL,
161 CFARG_SEARCH, ioc_search, 161 CFARGS(.search = ioc_search));
162 CFARG_EOL); 
163#endif 162#endif
164} 163}
165 164
166#if defined(notyet) 165#if defined(notyet)
167static int 166static int
168ioc_print(void *aux, const char *pnp) 167ioc_print(void *aux, const char *pnp)
169{ 168{
170 struct ioc_attach_args *iaa = aux; 169 struct ioc_attach_args *iaa = aux;
171 170
172 if (pnp != 0) 171 if (pnp != 0)
173 return QUIET; 172 return QUIET;
174 173
175 if (iaa->iaa_offset != IOCCF_OFFSET_DEFAULT) 174 if (iaa->iaa_offset != IOCCF_OFFSET_DEFAULT)
@@ -185,27 +184,27 @@ ioc_search(device_t parent, cfdata_t cf, @@ -185,27 +184,27 @@ ioc_search(device_t parent, cfdata_t cf,
185{ 184{
186 struct ioc_softc *sc = device_private(parent); 185 struct ioc_softc *sc = device_private(parent);
187 struct ioc_attach_args iaa; 186 struct ioc_attach_args iaa;
188 int tryagain; 187 int tryagain;
189 188
190 do { 189 do {
191 iaa.iaa_offset = cf->cf_loc[IOCCF_OFFSET]; 190 iaa.iaa_offset = cf->cf_loc[IOCCF_OFFSET];
192 iaa.iaa_intr = cf->cf_loc[IOCCF_INTR]; 191 iaa.iaa_intr = cf->cf_loc[IOCCF_INTR];
193 iaa.iaa_st = normal_memt; 192 iaa.iaa_st = normal_memt;
194 iaa.iaa_sh = sc->sc_ioh; /* XXX */ 193 iaa.iaa_sh = sc->sc_ioh; /* XXX */
195 194
196 tryagain = 0; 195 tryagain = 0;
197 if (config_probe(parent, cf, &iaa)) { 196 if (config_probe(parent, cf, &iaa)) {
198 config_attach(parent, cf, &iaa, ioc_print, CFARG_EOL); 197 config_attach(parent, cf, &iaa, ioc_print, CFARGS_NONE);
199 tryagain = (cf->cf_fstate == FSTATE_STAR); 198 tryagain = (cf->cf_fstate == FSTATE_STAR);
200 } 199 }
201 } while (tryagain); 200 } while (tryagain);
202 201
203 return 0; 202 return 0;
204} 203}
205#endif 204#endif
206 205
207#if defined(BLINK) 206#if defined(BLINK)
208static void 207static void
209ioc_blink(void *self) 208ioc_blink(void *self)
210{ 209{
211 struct ioc_softc *sc = device_private(self); 210 struct ioc_softc *sc = device_private(self);

cvs diff -r1.5 -r1.5.8.1 src/sys/arch/sgimips/ioc/oioc.c (expand / switch to unified diff)

--- src/sys/arch/sgimips/ioc/oioc.c 2021/04/24 23:36:48 1.5
+++ src/sys/arch/sgimips/ioc/oioc.c 2021/08/04 02:53:00 1.5.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: oioc.c,v 1.5 2021/04/24 23:36:48 thorpej Exp $ */ 1/* $NetBSD: oioc.c,v 1.5.8.1 2021/08/04 02:53:00 thorpej Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2009 Stephen M. Rumble 4 * Copyright (c) 2009 Stephen M. Rumble
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. The name of the author may not be used to endorse or promote products 12 * 2. The name of the author may not be used to endorse or promote products
13 * derived from this software without specific prior written permission. 13 * derived from this software without specific prior written permission.
14 * 14 *
@@ -27,27 +27,27 @@ @@ -27,27 +27,27 @@
27/* 27/*
28 * IOC1/IOC2 chips on IP4 and IP6/IP10 machines. This interfaces the SCSI 28 * IOC1/IOC2 chips on IP4 and IP6/IP10 machines. This interfaces the SCSI
29 * and Ethernet controllers, performs DMA for the former, and does address 29 * and Ethernet controllers, performs DMA for the former, and does address
30 * space translation for the latter (maps the lance memory space to physical 30 * space translation for the latter (maps the lance memory space to physical
31 * pages). 31 * pages).
32 * 32 *
33 * 'I/O Controller' is a sufficiently generic name that SGI created another 33 * 'I/O Controller' is a sufficiently generic name that SGI created another
34 * one for IP24, which basically stuffed a bunch of miscellany on an ASIC. 34 * one for IP24, which basically stuffed a bunch of miscellany on an ASIC.
35 * So, we'll call ourselves 'Old IOC' and hope that there wasn't an even older 35 * So, we'll call ourselves 'Old IOC' and hope that there wasn't an even older
36 * one. 36 * one.
37 */ 37 */
38 38
39#include <sys/cdefs.h> 39#include <sys/cdefs.h>
40__KERNEL_RCSID(0, "$NetBSD: oioc.c,v 1.5 2021/04/24 23:36:48 thorpej Exp $"); 40__KERNEL_RCSID(0, "$NetBSD: oioc.c,v 1.5.8.1 2021/08/04 02:53:00 thorpej Exp $");
41 41
42#include <sys/param.h> 42#include <sys/param.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/locore.h> 46#include <machine/locore.h>
47#include <machine/autoconf.h> 47#include <machine/autoconf.h>
48#include <sys/bus.h> 48#include <sys/bus.h>
49#include <machine/machtype.h> 49#include <machine/machtype.h>
50#include <machine/sysconf.h> 50#include <machine/sysconf.h>
51 51
52#include <sgimips/ioc/oiocreg.h> 52#include <sgimips/ioc/oiocreg.h>
53#include <sgimips/ioc/oiocvar.h> 53#include <sgimips/ioc/oiocvar.h>
@@ -138,27 +138,27 @@ oioc_attach(device_t parent, device_t se @@ -138,27 +138,27 @@ oioc_attach(device_t parent, device_t se
138 138
139 printf("oioc0: Burst DMA %ssupported\n", 139 printf("oioc0: Burst DMA %ssupported\n",
140 (sc->sc_burst_dma) ? "" : "not "); 140 (sc->sc_burst_dma) ? "" : "not ");
141 141
142 for (i = 0; oioc_devices[i].od_name != NULL; i++) { 142 for (i = 0; oioc_devices[i].od_name != NULL; i++) {
143 struct oioc_attach_args oa; 143 struct oioc_attach_args oa;
144 144
145 oa.oa_name = oioc_devices[i].od_name; 145 oa.oa_name = oioc_devices[i].od_name;
146 oa.oa_irq = oioc_devices[i].od_irq; 146 oa.oa_irq = oioc_devices[i].od_irq;
147 oa.oa_burst_dma = sc->sc_burst_dma; 147 oa.oa_burst_dma = sc->sc_burst_dma;
148 oa.oa_st = normal_memt; 148 oa.oa_st = normal_memt;
149 oa.oa_sh = sc->sc_ioh; 149 oa.oa_sh = sc->sc_ioh;
150 oa.oa_dmat = &sgimips_default_bus_dma_tag; 150 oa.oa_dmat = &sgimips_default_bus_dma_tag;
151 config_found(self, &oa, oioc_print, CFARG_EOL); 151 config_found(self, &oa, oioc_print, CFARGS_NONE);
152 } 152 }
153} 153}
154 154
155static int 155static int
156oioc_print(void *aux, const char *pnp) 156oioc_print(void *aux, const char *pnp)
157{ 157{
158 struct oioc_attach_args *oa = aux; 158 struct oioc_attach_args *oa = aux;
159 159
160 if (pnp) 160 if (pnp)
161 printf("%s at %s", oa->oa_name, pnp); 161 printf("%s at %s", oa->oa_name, pnp);
162 162
163 return (UNCONF); 163 return (UNCONF);
164} 164}

cvs diff -r1.24 -r1.24.8.1 src/sys/arch/sgimips/mace/mace.c (expand / switch to unified diff)

--- src/sys/arch/sgimips/mace/mace.c 2021/04/24 23:36:48 1.24
+++ src/sys/arch/sgimips/mace/mace.c 2021/08/04 02:53:00 1.24.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: mace.c,v 1.24 2021/04/24 23:36:48 thorpej Exp $ */ 1/* $NetBSD: mace.c,v 1.24.8.1 2021/08/04 02:53:00 thorpej Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2003 Christopher Sekiya 4 * Copyright (c) 2003 Christopher Sekiya
5 * Copyright (c) 2002,2003 Rafal K. Boni 5 * Copyright (c) 2002,2003 Rafal K. Boni
6 * Copyright (c) 2000 Soren S. Jorvang 6 * Copyright (c) 2000 Soren S. Jorvang
7 * All rights reserved. 7 * 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
@@ -35,27 +35,27 @@ @@ -35,27 +35,27 @@
35 */ 35 */
36 36
37/* 37/*
38 * O2 MACE 38 * O2 MACE
39 * 39 *
40 * The MACE is weird -- although it is a 32-bit device, writes only seem to 40 * The MACE is weird -- although it is a 32-bit device, writes only seem to
41 * work properly if they are 64-bit-at-once writes (at least, out in ISA 41 * work properly if they are 64-bit-at-once writes (at least, out in ISA
42 * space and probably MEC space -- the PCI stuff seems to be okay with _4). 42 * space and probably MEC space -- the PCI stuff seems to be okay with _4).
43 * Therefore, the _8* routines are used even though the top 32 bits are 43 * Therefore, the _8* routines are used even though the top 32 bits are
44 * thrown away. 44 * thrown away.
45 */ 45 */
46 46
47#include <sys/cdefs.h> 47#include <sys/cdefs.h>
48__KERNEL_RCSID(0, "$NetBSD: mace.c,v 1.24 2021/04/24 23:36:48 thorpej Exp $"); 48__KERNEL_RCSID(0, "$NetBSD: mace.c,v 1.24.8.1 2021/08/04 02:53:00 thorpej Exp $");
49 49
50#include <sys/param.h> 50#include <sys/param.h>
51#include <sys/systm.h> 51#include <sys/systm.h>
52#include <sys/device.h> 52#include <sys/device.h>
53#include <sys/callout.h> 53#include <sys/callout.h>
54#include <sys/mbuf.h> 54#include <sys/mbuf.h>
55#include <sys/malloc.h> 55#include <sys/malloc.h>
56#include <sys/kernel.h> 56#include <sys/kernel.h>
57#include <sys/socket.h> 57#include <sys/socket.h>
58#include <sys/ioctl.h> 58#include <sys/ioctl.h>
59#include <sys/errno.h> 59#include <sys/errno.h>
60#include <sys/syslog.h> 60#include <sys/syslog.h>
61 61
@@ -187,28 +187,27 @@ mace_attach(device_t parent, device_t se @@ -187,28 +187,27 @@ mace_attach(device_t parent, device_t se
187 bus_space_write_8(sc->iot, sc->ioh, MACE_ISA_FLASH_NIC_REG, scratch); 187 bus_space_write_8(sc->iot, sc->ioh, MACE_ISA_FLASH_NIC_REG, scratch);
188 188
189#if defined(BLINK) 189#if defined(BLINK)
190 mace_blink(sc); 190 mace_blink(sc);
191#endif 191#endif
192 192
193 /* Initialize the maceintr elements to sane values */ 193 /* Initialize the maceintr elements to sane values */
194 for (scratch = 0; scratch < MACE_NINTR; scratch++) { 194 for (scratch = 0; scratch < MACE_NINTR; scratch++) {
195 maceintrtab[scratch].func = NULL; 195 maceintrtab[scratch].func = NULL;
196 maceintrtab[scratch].irq = 0; 196 maceintrtab[scratch].irq = 0;
197 } 197 }
198 198
199 config_search(self, NULL, 199 config_search(self, NULL,
200 CFARG_SEARCH, mace_search, 200 CFARGS(.search = mace_search));
201 CFARG_EOL); 
202} 201}
203 202
204 203
205static int 204static int
206mace_print(void *aux, const char *pnp) 205mace_print(void *aux, const char *pnp)
207{ 206{
208 struct mace_attach_args *maa = aux; 207 struct mace_attach_args *maa = aux;
209 208
210 if (pnp != 0) 209 if (pnp != 0)
211 return QUIET; 210 return QUIET;
212 211
213 if (maa->maa_offset != MACECF_OFFSET_DEFAULT) 212 if (maa->maa_offset != MACECF_OFFSET_DEFAULT)
214 aprint_normal(" offset 0x%lx", maa->maa_offset); 213 aprint_normal(" offset 0x%lx", maa->maa_offset);
@@ -228,27 +227,27 @@ mace_search(device_t parent, struct cfda @@ -228,27 +227,27 @@ mace_search(device_t parent, struct cfda
228 int tryagain; 227 int tryagain;
229 228
230 do { 229 do {
231 maa.maa_offset = cf->cf_loc[MACECF_OFFSET]; 230 maa.maa_offset = cf->cf_loc[MACECF_OFFSET];
232 maa.maa_intr = cf->cf_loc[MACECF_INTR]; 231 maa.maa_intr = cf->cf_loc[MACECF_INTR];
233 maa.maa_intrmask = cf->cf_loc[MACECF_INTRMASK]; 232 maa.maa_intrmask = cf->cf_loc[MACECF_INTRMASK];
234 maa.maa_st = normal_memt; 233 maa.maa_st = normal_memt;
235 maa.maa_sh = sc->ioh; /* XXX */ 234 maa.maa_sh = sc->ioh; /* XXX */
236 maa.maa_dmat = &sgimips_default_bus_dma_tag; 235 maa.maa_dmat = &sgimips_default_bus_dma_tag;
237 maa.isa_ringbuffer = sc->isa_ringbuffer; 236 maa.isa_ringbuffer = sc->isa_ringbuffer;
238 237
239 tryagain = 0; 238 tryagain = 0;
240 if (config_probe(parent, cf, &maa)) { 239 if (config_probe(parent, cf, &maa)) {
241 config_attach(parent, cf, &maa, mace_print, CFARG_EOL); 240 config_attach(parent, cf, &maa, mace_print, CFARGS_NONE);
242 tryagain = (cf->cf_fstate == FSTATE_STAR); 241 tryagain = (cf->cf_fstate == FSTATE_STAR);
243 } 242 }
244 243
245 } while (tryagain); 244 } while (tryagain);
246 245
247 return 0; 246 return 0;
248} 247}
249 248
250void * 249void *
251mace_intr_establish(int intr, int level, int (*func)(void *), void *arg) 250mace_intr_establish(int intr, int level, int (*func)(void *), void *arg)
252{ 251{
253 int i; 252 int i;
254 253

cvs diff -r1.24 -r1.24.8.1 src/sys/arch/sgimips/mace/pci_mace.c (expand / switch to unified diff)

--- src/sys/arch/sgimips/mace/pci_mace.c 2021/04/24 23:36:48 1.24
+++ src/sys/arch/sgimips/mace/pci_mace.c 2021/08/04 02:53:00 1.24.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: pci_mace.c,v 1.24 2021/04/24 23:36:48 thorpej Exp $ */ 1/* $NetBSD: pci_mace.c,v 1.24.8.1 2021/08/04 02:53:00 thorpej Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001,2003 Christopher Sekiya 4 * Copyright (c) 2001,2003 Christopher Sekiya
5 * Copyright (c) 2000 Soren S. Jorvang 5 * Copyright (c) 2000 Soren S. Jorvang
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
11 * 1. Redistributions of source code must retain the above copyright 11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer. 12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
@@ -24,27 +24,27 @@ @@ -24,27 +24,27 @@
24 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 24 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
25 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 25 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
26 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 26 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
27 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 27 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
28 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 28 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
29 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
33 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 * THIS SOFTWARE, 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: pci_mace.c,v 1.24 2021/04/24 23:36:48 thorpej Exp $"); 37__KERNEL_RCSID(0, "$NetBSD: pci_mace.c,v 1.24.8.1 2021/08/04 02:53:00 thorpej Exp $");
38 38
39#include "opt_pci.h" 39#include "opt_pci.h"
40#include "pci.h" 40#include "pci.h"
41 41
42#include <sys/param.h> 42#include <sys/param.h>
43#include <sys/device.h> 43#include <sys/device.h>
44#include <sys/systm.h> 44#include <sys/systm.h>
45 45
46#include <machine/cpu.h> 46#include <machine/cpu.h>
47#include <machine/locore.h> 47#include <machine/locore.h>
48#include <machine/autoconf.h> 48#include <machine/autoconf.h>
49#include <machine/vmparam.h> 49#include <machine/vmparam.h>
50#include <sys/bus.h> 50#include <sys/bus.h>
@@ -195,27 +195,27 @@ macepci_attach(device_t parent, device_t @@ -195,27 +195,27 @@ macepci_attach(device_t parent, device_t
195 pba.pba_bus = 0; 195 pba.pba_bus = 0;
196 pba.pba_bridgetag = NULL; 196 pba.pba_bridgetag = NULL;
197 pba.pba_flags = PCI_FLAGS_IO_OKAY | PCI_FLAGS_MEM_OKAY | 197 pba.pba_flags = PCI_FLAGS_IO_OKAY | PCI_FLAGS_MEM_OKAY |
198 PCI_FLAGS_MRL_OKAY | PCI_FLAGS_MRM_OKAY | PCI_FLAGS_MWI_OKAY; 198 PCI_FLAGS_MRL_OKAY | PCI_FLAGS_MRM_OKAY | PCI_FLAGS_MWI_OKAY;
199 pba.pba_pc = pc; 199 pba.pba_pc = pc;
200 200
201#ifdef MACEPCI_IO_WAS_BUGGY 201#ifdef MACEPCI_IO_WAS_BUGGY
202 if (rev == 0) 202 if (rev == 0)
203 pba.pba_flags &= ~PCI_FLAGS_IO_OKAY; /* Buggy? */ 203 pba.pba_flags &= ~PCI_FLAGS_IO_OKAY; /* Buggy? */
204#endif 204#endif
205 205
206 cpu_intr_establish(maa->maa_intr, IPL_NONE, macepci_intr, sc); 206 cpu_intr_establish(maa->maa_intr, IPL_NONE, macepci_intr, sc);
207 207
208 config_found(self, &pba, pcibusprint, CFARG_EOL); 208 config_found(self, &pba, pcibusprint, CFARGS_NONE);
209#endif 209#endif
210} 210}
211 211
212int 212int
213macepci_bus_maxdevs(pci_chipset_tag_t pc, int busno) 213macepci_bus_maxdevs(pci_chipset_tag_t pc, int busno)
214{ 214{
215 215
216 if (busno == 0) 216 if (busno == 0)
217 return 5; /* 2 on-board SCSI chips, slots 0, 1 and 2 */ 217 return 5; /* 2 on-board SCSI chips, slots 0, 1 and 2 */
218 else 218 else
219 return 0; /* XXX */ 219 return 0; /* XXX */
220} 220}
221 221

cvs diff -r1.21 -r1.21.8.1 src/sys/arch/sgimips/sgimips/mainbus.c (expand / switch to unified diff)

--- src/sys/arch/sgimips/sgimips/mainbus.c 2021/04/24 23:36:48 1.21
+++ src/sys/arch/sgimips/sgimips/mainbus.c 2021/08/04 02:53:00 1.21.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: mainbus.c,v 1.21 2021/04/24 23:36:48 thorpej Exp $ */ 1/* $NetBSD: mainbus.c,v 1.21.8.1 2021/08/04 02:53:00 thorpej Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000 Soren S. Jorvang 4 * Copyright (c) 2000 Soren S. Jorvang
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -23,27 +23,27 @@ @@ -23,27 +23,27 @@
23 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 23 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
24 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 24 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
25 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 25 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
26 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 26 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
27 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 27 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
28 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35#include <sys/cdefs.h> 35#include <sys/cdefs.h>
36__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.21 2021/04/24 23:36:48 thorpej Exp $"); 36__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.21.8.1 2021/08/04 02:53:00 thorpej Exp $");
37 37
38#include <sys/param.h> 38#include <sys/param.h>
39#include <sys/systm.h> 39#include <sys/systm.h>
40#include <sys/device.h> 40#include <sys/device.h>
41 41
42#include <mips/cpuregs.h> 42#include <mips/cpuregs.h>
43 43
44#include <machine/autoconf.h> 44#include <machine/autoconf.h>
45#include <machine/machtype.h> 45#include <machine/machtype.h>
46 46
47#include <dev/arcbios/arcbios.h> 47#include <dev/arcbios/arcbios.h>
48#include <dev/arcbios/arcbiosvar.h> 48#include <dev/arcbios/arcbiosvar.h>
49 49
@@ -64,42 +64,41 @@ mainbus_match(device_t parent, cfdata_t  @@ -64,42 +64,41 @@ mainbus_match(device_t parent, cfdata_t
64} 64}
65 65
66static void 66static void
67mainbus_attach(device_t parent, device_t self, void *aux) 67mainbus_attach(device_t parent, device_t self, void *aux)
68{ 68{
69 struct mainbus_attach_args ma; 69 struct mainbus_attach_args ma;
70 70
71 aprint_normal(": %s [%s, %s], %d processor%s\n", 71 aprint_normal(": %s [%s, %s], %d processor%s\n",
72 arcbios_system_identifier, 72 arcbios_system_identifier,
73 arcbios_sysid_vendor, arcbios_sysid_product, 73 arcbios_sysid_vendor, arcbios_sysid_product,
74 ncpus, ncpus == 1 ? "" : "s"); 74 ncpus, ncpus == 1 ? "" : "s");
75 75
76 config_search(self, &ma, 76 config_search(self, &ma,
77 CFARG_SEARCH, mainbus_search, 77 CFARGS(.search = mainbus_search));
78 CFARG_EOL); 
79} 78}
80 79
81static int 80static int
82mainbus_search(device_t parent, cfdata_t cf, const int *ldesc, void *aux) 81mainbus_search(device_t parent, cfdata_t cf, const int *ldesc, void *aux)
83{ 82{
84 struct mainbus_attach_args *ma = aux; 83 struct mainbus_attach_args *ma = aux;
85 84
86 do { 85 do {
87 ma->ma_name = NULL; 86 ma->ma_name = NULL;
88 ma->ma_addr = cf->cf_loc[MAINBUSCF_ADDR]; 87 ma->ma_addr = cf->cf_loc[MAINBUSCF_ADDR];
89 ma->ma_iot = 0; 88 ma->ma_iot = 0;
90 ma->ma_ioh = MIPS_PHYS_TO_KSEG1(ma->ma_addr); 89 ma->ma_ioh = MIPS_PHYS_TO_KSEG1(ma->ma_addr);
91 if (config_probe(parent, cf, ma)) 90 if (config_probe(parent, cf, ma))
92 config_attach(parent, cf, ma, mainbus_print, CFARG_EOL); 91 config_attach(parent, cf, ma, mainbus_print, CFARGS_NONE);
93 } while (cf->cf_fstate == FSTATE_STAR); 92 } while (cf->cf_fstate == FSTATE_STAR);
94 93
95 return 0; 94 return 0;
96} 95}
97 96
98int 97int
99mainbus_print(void *aux, const char *pnp) 98mainbus_print(void *aux, const char *pnp)
100{ 99{
101 struct mainbus_attach_args *ma = aux; 100 struct mainbus_attach_args *ma = aux;
102 101
103 if (pnp != 0) 102 if (pnp != 0)
104 return QUIET; 103 return QUIET;
105 104

cvs diff -r1.14 -r1.14.8.1 src/sys/arch/sh3/dev/adc.c (expand / switch to unified diff)

--- src/sys/arch/sh3/dev/adc.c 2021/04/24 23:36:48 1.14
+++ src/sys/arch/sh3/dev/adc.c 2021/08/04 02:53:01 1.14.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: adc.c,v 1.14 2021/04/24 23:36:48 thorpej Exp $ */ 1/* $NetBSD: adc.c,v 1.14.8.1 2021/08/04 02:53:01 thorpej Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2003 Valeriy E. Ushakov 4 * Copyright (c) 2003 Valeriy E. Ushakov
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -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: adc.c,v 1.14 2021/04/24 23:36:48 thorpej Exp $"); 31__KERNEL_RCSID(0, "$NetBSD: adc.c,v 1.14.8.1 2021/08/04 02:53:01 thorpej Exp $");
32 32
33#include <sys/param.h> 33#include <sys/param.h>
34#include <sys/kernel.h> 34#include <sys/kernel.h>
35#include <sys/device.h> 35#include <sys/device.h>
36#include <sys/malloc.h> 36#include <sys/malloc.h>
37#include <sys/systm.h> 37#include <sys/systm.h>
38 38
39#include <sh3/adcreg.h> 39#include <sh3/adcreg.h>
40#include <sh3/dev/adcvar.h> 40#include <sh3/dev/adcvar.h>
41 41
42#define ADC_(x) (*((volatile uint8_t *)SH7709_AD ## x)) 42#define ADC_(x) (*((volatile uint8_t *)SH7709_AD ## x))
43 43
44 44
@@ -70,46 +70,45 @@ adc_match(device_t parent, cfdata_t cf,  @@ -70,46 +70,45 @@ adc_match(device_t parent, cfdata_t cf,
70 70
71 71
72static void 72static void
73adc_attach(device_t parent, device_t self, void *aux) 73adc_attach(device_t parent, device_t self, void *aux)
74{ 74{
75 75
76 ADC_(CSR) = 0; 76 ADC_(CSR) = 0;
77 ADC_(CR) = 0; 77 ADC_(CR) = 0;
78 78
79 aprint_naive("\n"); 79 aprint_naive("\n");
80 aprint_normal("\n"); 80 aprint_normal("\n");
81 81
82 config_search(self, NULL, 82 config_search(self, NULL,
83 CFARG_SEARCH, adc_search, 83 CFARGS(.search = adc_search));
84 CFARG_EOL); 
85 84
86 /* 85 /*
87 * XXX: TODO: provide hooks to manage power. For now register 86 * XXX: TODO: provide hooks to manage power. For now register
88 * null hooks which is no worse than before. 87 * null hooks which is no worse than before.
89 * 88 *
90 * NB: ADC registers are reset by standby! 89 * NB: ADC registers are reset by standby!
91 */ 90 */
92 if (!pmf_device_register(self, NULL, NULL)) 91 if (!pmf_device_register(self, NULL, NULL))
93 aprint_error_dev(self, "unable to establish power handler\n"); 92 aprint_error_dev(self, "unable to establish power handler\n");
94} 93}
95 94
96 95
97static int 96static int
98adc_search(device_t parent, cfdata_t cf, const int *ldesc, void *aux) 97adc_search(device_t parent, cfdata_t cf, const int *ldesc, void *aux)
99{ 98{
100 99
101 if (config_probe(parent, cf, NULL)) 100 if (config_probe(parent, cf, NULL))
102 config_attach(parent, cf, NULL, adc_print, CFARG_EOL); 101 config_attach(parent, cf, NULL, adc_print, CFARGS_NONE);
103 102
104 return (0); 103 return (0);
105} 104}
106 105
107 106
108static int 107static int
109adc_print(void *aux, const char *pnp) 108adc_print(void *aux, const char *pnp)
110{ 109{
111 110
112 return (pnp ? QUIET : UNCONF); 111 return (pnp ? QUIET : UNCONF);
113} 112}
114 113
115 114

cvs diff -r1.15 -r1.15.8.1 src/sys/arch/sh3/dev/shb.c (expand / switch to unified diff)

--- src/sys/arch/sh3/dev/shb.c 2021/04/24 23:36:48 1.15
+++ src/sys/arch/sh3/dev/shb.c 2021/08/04 02:53:01 1.15.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: shb.c,v 1.15 2021/04/24 23:36:48 thorpej Exp $ */ 1/* $NetBSD: shb.c,v 1.15.8.1 2021/08/04 02:53:01 thorpej Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2002 The NetBSD Foundation, Inc. 4 * Copyright (c) 2002 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -17,27 +17,27 @@ @@ -17,27 +17,27 @@
17 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
18 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 18 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 * POSSIBILITY OF SUCH DAMAGE. 26 * POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29#include <sys/cdefs.h> 29#include <sys/cdefs.h>
30__KERNEL_RCSID(0, "$NetBSD: shb.c,v 1.15 2021/04/24 23:36:48 thorpej Exp $"); 30__KERNEL_RCSID(0, "$NetBSD: shb.c,v 1.15.8.1 2021/08/04 02:53:01 thorpej Exp $");
31 31
32#include <sys/param.h> 32#include <sys/param.h>
33#include <sys/systm.h> 33#include <sys/systm.h>
34#include <sys/device.h> 34#include <sys/device.h>
35 35
36#include <machine/autoconf.h> 36#include <machine/autoconf.h>
37 37
38extern struct cfdriver shb_cd; 38extern struct cfdriver shb_cd;
39 39
40static int shb_match(device_t, cfdata_t, void *); 40static int shb_match(device_t, cfdata_t, void *);
41static void shb_attach(device_t, device_t, void *); 41static void shb_attach(device_t, device_t, void *);
42static int shb_print(void *, const char *); 42static int shb_print(void *, const char *);
43static int shb_search(device_t, cfdata_t, const int *, void *); 43static int shb_search(device_t, cfdata_t, const int *, void *);
@@ -55,40 +55,39 @@ shb_match(device_t parent, cfdata_t cf,  @@ -55,40 +55,39 @@ shb_match(device_t parent, cfdata_t cf,
55 return (0); 55 return (0);
56 56
57 return (1); 57 return (1);
58} 58}
59 59
60static void 60static void
61shb_attach(device_t parent, device_t self, void *aux) 61shb_attach(device_t parent, device_t self, void *aux)
62{ 62{
63 63
64 aprint_naive("\n"); 64 aprint_naive("\n");
65 aprint_normal("\n"); 65 aprint_normal("\n");
66 66
67 config_search(self, NULL, 67 config_search(self, NULL,
68 CFARG_SEARCH, shb_search, 68 CFARGS(.search = shb_search));
69 CFARG_EOL); 
70 69
71 /* 70 /*
72 * XXX: TODO: provide hooks to manage on-chip modules. For 71 * XXX: TODO: provide hooks to manage on-chip modules. For
73 * now register null hooks which is no worse than before. 72 * now register null hooks which is no worse than before.
74 */ 73 */
75 if (!pmf_device_register(self, NULL, NULL)) 74 if (!pmf_device_register(self, NULL, NULL))
76 aprint_error_dev(self, "unable to establish power handler\n"); 75 aprint_error_dev(self, "unable to establish power handler\n");
77} 76}
78 77
79static int 78static int
80shb_search(device_t parent, cfdata_t cf, const int *ldesc, void *aux) 79shb_search(device_t parent, cfdata_t cf, const int *ldesc, void *aux)
81{ 80{
82 81
83 if (config_probe(parent, cf, NULL)) 82 if (config_probe(parent, cf, NULL))
84 config_attach(parent, cf, NULL, shb_print, CFARG_EOL); 83 config_attach(parent, cf, NULL, shb_print, CFARGS_NONE);
85 84
86 return (0); 85 return (0);
87} 86}
88 87
89static int 88static int
90shb_print(void *aux, const char *pnp) 89shb_print(void *aux, const char *pnp)
91{ 90{
92 91
93 return (pnp ? QUIET : UNCONF); 92 return (pnp ? QUIET : UNCONF);
94} 93}

cvs diff -r1.21 -r1.21.8.1 src/sys/arch/sh3/dev/shpcic.c (expand / switch to unified diff)

--- src/sys/arch/sh3/dev/shpcic.c 2021/04/24 23:36:48 1.21
+++ src/sys/arch/sh3/dev/shpcic.c 2021/08/04 02:53:01 1.21.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: shpcic.c,v 1.21 2021/04/24 23:36:48 thorpej Exp $ */ 1/* $NetBSD: shpcic.c,v 1.21.8.1 2021/08/04 02:53:01 thorpej Exp $ */
2 2
3/*- 3/*-
4 * Copyright (C) 2005 NONAKA Kimihiro <nonaka@netbsd.org> 4 * Copyright (C) 2005 NONAKA Kimihiro <nonaka@netbsd.org>
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -16,27 +16,27 @@ @@ -16,27 +16,27 @@
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28#include <sys/cdefs.h> 28#include <sys/cdefs.h>
29__KERNEL_RCSID(0, "$NetBSD: shpcic.c,v 1.21 2021/04/24 23:36:48 thorpej Exp $"); 29__KERNEL_RCSID(0, "$NetBSD: shpcic.c,v 1.21.8.1 2021/08/04 02:53:01 thorpej Exp $");
30 30
31#include "opt_pci.h" 31#include "opt_pci.h"
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/device.h> 36#include <sys/device.h>
37#include <sys/malloc.h> 37#include <sys/malloc.h>
38 38
39#include <dev/pci/pcireg.h> 39#include <dev/pci/pcireg.h>
40#include <dev/pci/pcivar.h> 40#include <dev/pci/pcivar.h>
41#include <dev/pci/pciconf.h> 41#include <dev/pci/pciconf.h>
42#include <dev/pci/pcidevs.h> 42#include <dev/pci/pcidevs.h>
@@ -234,27 +234,27 @@ shpcic_attach(device_t parent, device_t  @@ -234,27 +234,27 @@ shpcic_attach(device_t parent, device_t
234 pciconf_resource_fini(pcires); 234 pciconf_resource_fini(pcires);
235#endif 235#endif
236 236
237 /* PCI bus */ 237 /* PCI bus */
238 memset(&pba, 0, sizeof(pba)); 238 memset(&pba, 0, sizeof(pba));
239 pba.pba_iot = shpcic_get_bus_io_tag(); 239 pba.pba_iot = shpcic_get_bus_io_tag();
240 pba.pba_memt = shpcic_get_bus_mem_tag(); 240 pba.pba_memt = shpcic_get_bus_mem_tag();
241 pba.pba_dmat = shpcic_get_bus_dma_tag(); 241 pba.pba_dmat = shpcic_get_bus_dma_tag();
242 pba.pba_dmat64 = NULL; 242 pba.pba_dmat64 = NULL;
243 pba.pba_pc = NULL; 243 pba.pba_pc = NULL;
244 pba.pba_bus = 0; 244 pba.pba_bus = 0;
245 pba.pba_bridgetag = NULL; 245 pba.pba_bridgetag = NULL;
246 pba.pba_flags = PCI_FLAGS_IO_OKAY | PCI_FLAGS_MEM_OKAY; 246 pba.pba_flags = PCI_FLAGS_IO_OKAY | PCI_FLAGS_MEM_OKAY;
247 config_found(self, &pba, NULL, CFARG_EOL); 247 config_found(self, &pba, NULL, CFARGS_NONE);
248} 248}
249 249
250int 250int
251shpcic_bus_maxdevs(void *v, int busno) 251shpcic_bus_maxdevs(void *v, int busno)
252{ 252{
253 253
254 /* 254 /*
255 * Bus number is irrelevant. Configuration Mechanism 1 is in 255 * Bus number is irrelevant. Configuration Mechanism 1 is in
256 * use, can have devices 0-32 (i.e. the `normal' range). 256 * use, can have devices 0-32 (i.e. the `normal' range).
257 */ 257 */
258 return (32); 258 return (32);
259} 259}
260 260