Wed Aug 4 01:21:27 2021 UTC ()
Adapt to CFARGS().


(thorpej)
diff -r1.5 -r1.5.8.1 src/sys/arch/i386/i386/i386_mainbus.c
diff -r1.57 -r1.57.8.1 src/sys/arch/i386/isa/lms.c
diff -r1.54 -r1.54.8.1 src/sys/arch/i386/isa/mms.c
diff -r1.51 -r1.51.8.1 src/sys/arch/i386/pci/elan520.c
diff -r1.14 -r1.14.8.1 src/sys/arch/i386/pci/gcscehci.c
diff -r1.16 -r1.16.8.1 src/sys/arch/i386/pci/geode.c
diff -r1.19 -r1.19.8.1 src/sys/arch/i386/pci/gscpcib.c
diff -r1.25 -r1.25.8.1 src/sys/arch/i386/pci/pceb.c
diff -r1.21 -r1.21.8.1 src/sys/arch/i386/pci/pcmb.c
diff -r1.18 -r1.18.8.1 src/sys/arch/i386/pci/viapcib.c
diff -r1.76 -r1.76.8.1 src/sys/arch/i386/pnpbios/pnpbios.c
diff -r1.23 -r1.23.8.1 src/sys/arch/i386/pnpbios/wss_pnpbios.c

cvs diff -r1.5 -r1.5.8.1 src/sys/arch/i386/i386/i386_mainbus.c (expand / switch to unified diff)

--- src/sys/arch/i386/i386/i386_mainbus.c 2021/04/24 23:36:39 1.5
+++ src/sys/arch/i386/i386/i386_mainbus.c 2021/08/04 01:21:26 1.5.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: i386_mainbus.c,v 1.5 2021/04/24 23:36:39 thorpej Exp $ */ 1/* $NetBSD: i386_mainbus.c,v 1.5.8.1 2021/08/04 01:21:26 thorpej Exp $ */
2/* NetBSD: mainbus.c,v 1.104 2018/12/02 08:19:44 cherry Exp */ 2/* NetBSD: mainbus.c,v 1.104 2018/12/02 08:19:44 cherry Exp */
3 3
4/* 4/*
5 * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. 5 * Copyright (c) 1996 Christopher G. Demetriou. 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.
@@ -22,27 +22,27 @@ @@ -22,27 +22,27 @@
22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
23 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 23 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
24 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 25 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
26 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
27 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
31 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 */ 32 */
33 33
34#include <sys/cdefs.h> 34#include <sys/cdefs.h>
35__KERNEL_RCSID(0, "$NetBSD: i386_mainbus.c,v 1.5 2021/04/24 23:36:39 thorpej Exp $"); 35__KERNEL_RCSID(0, "$NetBSD: i386_mainbus.c,v 1.5.8.1 2021/08/04 01:21:26 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/reboot.h> 40#include <sys/reboot.h>
41#include <sys/bus.h> 41#include <sys/bus.h>
42 42
43#include <dev/isa/isavar.h> 43#include <dev/isa/isavar.h>
44#include <dev/eisa/eisavar.h> 44#include <dev/eisa/eisavar.h>
45#include <dev/pci/pcivar.h> 45#include <dev/pci/pcivar.h>
46 46
47#include <dev/isa/isareg.h> /* for ISA_HOLE_VADDR */ 47#include <dev/isa/isareg.h> /* for ISA_HOLE_VADDR */
48 48
@@ -220,38 +220,36 @@ i386_mainbus_attach(device_t parent, dev @@ -220,38 +220,36 @@ i386_mainbus_attach(device_t parent, dev
220 220
221 i386_mainbus_rescan(self, "pcibus", NULL); 221 i386_mainbus_rescan(self, "pcibus", NULL);
222 222
223 i386_mainbus_rescan(self, "mcabus", NULL); 223 i386_mainbus_rescan(self, "mcabus", NULL);
224 224
225 if (memcmp(ISA_HOLE_VADDR(EISA_ID_PADDR), EISA_ID, EISA_ID_LEN) == 0 && 225 if (memcmp(ISA_HOLE_VADDR(EISA_ID_PADDR), EISA_ID, EISA_ID_LEN) == 0 &&
226 eisa_has_been_seen == 0) { 226 eisa_has_been_seen == 0) {
227 mba.mba_eba.eba_iot = x86_bus_space_io; 227 mba.mba_eba.eba_iot = x86_bus_space_io;
228 mba.mba_eba.eba_memt = x86_bus_space_mem; 228 mba.mba_eba.eba_memt = x86_bus_space_mem;
229#if NEISA > 0 229#if NEISA > 0
230 mba.mba_eba.eba_dmat = &eisa_bus_dma_tag; 230 mba.mba_eba.eba_dmat = &eisa_bus_dma_tag;
231#endif 231#endif
232 config_found(self, &mba.mba_eba, eisabusprint, 232 config_found(self, &mba.mba_eba, eisabusprint,
233 CFARG_IATTR, "eisabus", 233 CFARGS(.iattr = "eisabus"));
234 CFARG_EOL); 
235 } 234 }
236 235
237#if NISA > 0 236#if NISA > 0
238 if (isa_has_been_seen == 0) { 237 if (isa_has_been_seen == 0) {
239 mba.mba_iba = mba_iba; 238 mba.mba_iba = mba_iba;
240 mba.mba_iba.iba_iot = x86_bus_space_io; 239 mba.mba_iba.iba_iot = x86_bus_space_io;
241 mba.mba_iba.iba_memt = x86_bus_space_mem; 240 mba.mba_iba.iba_memt = x86_bus_space_mem;
242 config_found(self, &mba.mba_iba, isabusprint, 241 config_found(self, &mba.mba_iba, isabusprint,
243 CFARG_IATTR, "isabus", 242 CFARGS(.iattr = "isabus"));
244 CFARG_EOL); 
245 } 243 }
246#endif 244#endif
247 245
248 if (!pmf_device_register(self, NULL, NULL)) 246 if (!pmf_device_register(self, NULL, NULL))
249 aprint_error_dev(self, "couldn't establish power handler\n"); 247 aprint_error_dev(self, "couldn't establish power handler\n");
250} 248}
251 249
252/* scan for new children */ 250/* scan for new children */
253int 251int
254i386_mainbus_rescan(device_t self, const char *ifattr, const int *locators) 252i386_mainbus_rescan(device_t self, const char *ifattr, const int *locators)
255{ 253{
256 struct mainbus_softc *sc = device_private(self); 254 struct mainbus_softc *sc = device_private(self);
257#if NACPICA > 0 || NIPMI > 0 || NMCA > 0 || NPCI > 0 || NPNPBIOS > 0 255#if NACPICA > 0 || NIPMI > 0 || NMCA > 0 || NPCI > 0 || NPNPBIOS > 0
@@ -262,63 +260,60 @@ i386_mainbus_rescan(device_t self, const @@ -262,63 +260,60 @@ i386_mainbus_rescan(device_t self, const
262 acpi_present) { 260 acpi_present) {
263#if NACPICA > 0 261#if NACPICA > 0
264 mba.mba_acpi.aa_iot = x86_bus_space_io; 262 mba.mba_acpi.aa_iot = x86_bus_space_io;
265 mba.mba_acpi.aa_memt = x86_bus_space_mem; 263 mba.mba_acpi.aa_memt = x86_bus_space_mem;
266 mba.mba_acpi.aa_pc = NULL; 264 mba.mba_acpi.aa_pc = NULL;
267 mba.mba_acpi.aa_pciflags = 265 mba.mba_acpi.aa_pciflags =
268 PCI_FLAGS_IO_OKAY | PCI_FLAGS_MEM_OKAY | 266 PCI_FLAGS_IO_OKAY | PCI_FLAGS_MEM_OKAY |
269 PCI_FLAGS_MRL_OKAY | PCI_FLAGS_MRM_OKAY | 267 PCI_FLAGS_MRL_OKAY | PCI_FLAGS_MRM_OKAY |
270 PCI_FLAGS_MWI_OKAY; 268 PCI_FLAGS_MWI_OKAY;
271 mba.mba_acpi.aa_ic = &x86_isa_chipset; 269 mba.mba_acpi.aa_ic = &x86_isa_chipset;
272 mba.mba_acpi.aa_dmat = &pci_bus_dma_tag; 270 mba.mba_acpi.aa_dmat = &pci_bus_dma_tag;
273 mba.mba_acpi.aa_dmat64 = NULL; 271 mba.mba_acpi.aa_dmat64 = NULL;
274 sc->sc_acpi = config_found(self, &mba.mba_acpi, NULL, 272 sc->sc_acpi = config_found(self, &mba.mba_acpi, NULL,
275 CFARG_IATTR, "acpibus", 273 CFARGS(.iattr = "acpibus"));
276 CFARG_EOL); 
277#if 0 /* XXXJRT not yet */ 274#if 0 /* XXXJRT not yet */
278 if (acpi_active) { 275 if (acpi_active) {
279 /* 276 /*
280 * ACPI already did all the work for us, there 277 * ACPI already did all the work for us, there
281 * is nothing more for us to do. 278 * is nothing more for us to do.
282 */ 279 */
283 return; 280 return;
284 } 281 }
285#endif 282#endif
286#endif 283#endif
287 } 284 }
288 285
289 if (ifattr_match(ifattr, "pnpbiosbus") && sc->sc_pnpbios == NULL) { 286 if (ifattr_match(ifattr, "pnpbiosbus") && sc->sc_pnpbios == NULL) {
290#if NPNPBIOS > 0 287#if NPNPBIOS > 0
291#if NACPICA > 0 288#if NACPICA > 0
292 if (acpi_active == 0) 289 if (acpi_active == 0)
293#endif 290#endif
294 if (pnpbios_probe()) { 291 if (pnpbios_probe()) {
295 mba.mba_paa.paa_ic = &x86_isa_chipset; 292 mba.mba_paa.paa_ic = &x86_isa_chipset;
296 sc->sc_pnpbios = config_found(self, &mba.mba_paa, NULL, 293 sc->sc_pnpbios = config_found(self, &mba.mba_paa, NULL,
297 CFARG_IATTR, "pnpbiosbus", 294 CFARGS(.iattr = "pnpbiosbus"));
298 CFARG_EOL); 
299 } 295 }
300#endif 296#endif
301 } 297 }
302 298
303 if (ifattr_match(ifattr, "ipmibus") && sc->sc_ipmi == NULL) { 299 if (ifattr_match(ifattr, "ipmibus") && sc->sc_ipmi == NULL) {
304#if NIPMI > 0 300#if NIPMI > 0
305 memset(&mba.mba_ipmi, 0, sizeof(mba.mba_ipmi)); 301 memset(&mba.mba_ipmi, 0, sizeof(mba.mba_ipmi));
306 mba.mba_ipmi.iaa_iot = x86_bus_space_io; 302 mba.mba_ipmi.iaa_iot = x86_bus_space_io;
307 mba.mba_ipmi.iaa_memt = x86_bus_space_mem; 303 mba.mba_ipmi.iaa_memt = x86_bus_space_mem;
308 if (ipmi_probe(&mba.mba_ipmi)) { 304 if (ipmi_probe(&mba.mba_ipmi)) {
309 sc->sc_ipmi = config_found(self, &mba.mba_ipmi, NULL, 305 sc->sc_ipmi = config_found(self, &mba.mba_ipmi, NULL,
310 CFARG_IATTR, "ipmibus", 306 CFARGS(.iattr = "ipmibus"));
311 CFARG_EOL); 
312 } 307 }
313#endif 308#endif
314 } 309 }
315 310
316 /* 311 /*
317 * XXX Note also that the presence of a PCI bus should 312 * XXX Note also that the presence of a PCI bus should
318 * XXX _always_ be checked, and if present the bus should be 313 * XXX _always_ be checked, and if present the bus should be
319 * XXX 'found'. However, because of the structure of the code, 314 * XXX 'found'. However, because of the structure of the code,
320 * XXX that's not currently possible. 315 * XXX that's not currently possible.
321 */ 316 */
322#if NPCI > 0 317#if NPCI > 0
323 if (pci_mode_detect() != 0 && ifattr_match(ifattr, "pcibus")) { 318 if (pci_mode_detect() != 0 && ifattr_match(ifattr, "pcibus")) {
324 int npcibus = 0; 319 int npcibus = 0;
@@ -342,43 +337,41 @@ i386_mainbus_rescan(device_t self, const @@ -342,43 +337,41 @@ i386_mainbus_rescan(device_t self, const
342 mba.mba_pba.pba_sub = 255; 337 mba.mba_pba.pba_sub = 255;
343 mba.mba_pba.pba_bridgetag = NULL; 338 mba.mba_pba.pba_bridgetag = NULL;
344#if NACPICA > 0 && defined(ACPI_SCANPCI) 339#if NACPICA > 0 && defined(ACPI_SCANPCI)
345 if (npcibus == 0 && mpacpi_active) 340 if (npcibus == 0 && mpacpi_active)
346 npcibus = mp_pci_scan(self, &mba.mba_pba, pcibusprint); 341 npcibus = mp_pci_scan(self, &mba.mba_pba, pcibusprint);
347#endif 342#endif
348#if defined(MPBIOS) && defined(MPBIOS_SCANPCI) 343#if defined(MPBIOS) && defined(MPBIOS_SCANPCI)
349 if (npcibus == 0 && mpbios_scanned != 0) 344 if (npcibus == 0 && mpbios_scanned != 0)
350 npcibus = mp_pci_scan(self, &mba.mba_pba, pcibusprint); 345 npcibus = mp_pci_scan(self, &mba.mba_pba, pcibusprint);
351#endif 346#endif
352 if (npcibus == 0 && sc->sc_pci == NULL) { 347 if (npcibus == 0 && sc->sc_pci == NULL) {
353 sc->sc_pci = 348 sc->sc_pci =
354 config_found(self, &mba.mba_pba, pcibusprint, 349 config_found(self, &mba.mba_pba, pcibusprint,
355 CFARG_IATTR, "pcibus", 350 CFARGS(.iattr = "pcibus"));
356 CFARG_EOL); 
357 } 351 }
358#if NACPICA > 0 352#if NACPICA > 0
359 if (mp_verbose) 353 if (mp_verbose)
360 acpi_pci_link_state(); 354 acpi_pci_link_state();
361#endif 355#endif
362 } 356 }
363#endif 357#endif
364 358
365 359
366 if (ifattr_match(ifattr, "mcabus") && sc->sc_mca == NULL) { 360 if (ifattr_match(ifattr, "mcabus") && sc->sc_mca == NULL) {
367#if NMCA > 0 361#if NMCA > 0
368 /* Note: MCA bus probe is done in i386/machdep.c */ 362 /* Note: MCA bus probe is done in i386/machdep.c */
369 if (MCA_system) { 363 if (MCA_system) {
370 mba.mba_mba.mba_iot = x86_bus_space_io; 364 mba.mba_mba.mba_iot = x86_bus_space_io;
371 mba.mba_mba.mba_memt = x86_bus_space_mem; 365 mba.mba_mba.mba_memt = x86_bus_space_mem;
372 mba.mba_mba.mba_dmat = &mca_bus_dma_tag; 366 mba.mba_mba.mba_dmat = &mca_bus_dma_tag;
373 mba.mba_mba.mba_mc = NULL; 367 mba.mba_mba.mba_mc = NULL;
374 mba.mba_mba.mba_bus = 0; 368 mba.mba_mba.mba_bus = 0;
375 sc->sc_mca = config_found(self, 369 sc->sc_mca = config_found(self,
376 &mba.mba_mba, mcabusprint, 370 &mba.mba_mba, mcabusprint,
377 CFARG_IATTR, "mcabus", 371 CFARGS(.iattr = "mcabus"));
378 CFARG_EOL); 
379 } 372 }
380#endif 373#endif
381 } 374 }
382 return 0; 375 return 0;
383} 376}
384 377

cvs diff -r1.57 -r1.57.8.1 src/sys/arch/i386/isa/lms.c (expand / switch to unified diff)

--- src/sys/arch/i386/isa/lms.c 2021/04/24 23:36:39 1.57
+++ src/sys/arch/i386/isa/lms.c 2021/08/04 01:21:27 1.57.8.1
@@ -1,40 +1,40 @@ @@ -1,40 +1,40 @@
1/* $NetBSD: lms.c,v 1.57 2021/04/24 23:36:39 thorpej Exp $ */ 1/* $NetBSD: lms.c,v 1.57.8.1 2021/08/04 01:21:27 thorpej Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1993, 1994 Charles M. Hannum. 4 * Copyright (c) 1993, 1994 Charles M. Hannum.
5 * Copyright (c) 1992, 1993 Erik Forsberg. 5 * Copyright (c) 1992, 1993 Erik Forsberg.
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 * 13 *
14 * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND ANY EXPRESS OR IMPLIED 14 * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND ANY EXPRESS OR IMPLIED
15 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 15 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
16 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 16 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
17 * NO EVENT SHALL I BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 17 * NO EVENT SHALL I BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
21 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 21 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
22 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 22 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26#include <sys/cdefs.h> 26#include <sys/cdefs.h>
27__KERNEL_RCSID(0, "$NetBSD: lms.c,v 1.57 2021/04/24 23:36:39 thorpej Exp $"); 27__KERNEL_RCSID(0, "$NetBSD: lms.c,v 1.57.8.1 2021/08/04 01:21:27 thorpej Exp $");
28 28
29#include <sys/param.h> 29#include <sys/param.h>
30#include <sys/systm.h> 30#include <sys/systm.h>
31#include <sys/ioctl.h> 31#include <sys/ioctl.h>
32#include <sys/device.h> 32#include <sys/device.h>
33 33
34#include <sys/bus.h> 34#include <sys/bus.h>
35#include <machine/intr.h> 35#include <machine/intr.h>
36 36
37#include <dev/isa/isavar.h> 37#include <dev/isa/isavar.h>
38 38
39#include <dev/wscons/wsconsio.h> 39#include <dev/wscons/wsconsio.h>
40#include <dev/wscons/wsmousevar.h> 40#include <dev/wscons/wsmousevar.h>
@@ -156,27 +156,27 @@ lmsattach(device_t parent, device_t self @@ -156,27 +156,27 @@ lmsattach(device_t parent, device_t self
156 156
157 sc->sc_ih = isa_intr_establish(ia->ia_ic, ia->ia_irq[0].ir_irq, 157 sc->sc_ih = isa_intr_establish(ia->ia_ic, ia->ia_irq[0].ir_irq,
158 IST_PULSE, IPL_TTY, lmsintr, sc); 158 IST_PULSE, IPL_TTY, lmsintr, sc);
159 159
160 a.accessops = &lms_accessops; 160 a.accessops = &lms_accessops;
161 a.accesscookie = sc; 161 a.accesscookie = sc;
162 162
163 /* 163 /*
164 * Attach the wsmouse, saving a handle to it. 164 * Attach the wsmouse, saving a handle to it.
165 * Note that we don't need to check this pointer against NULL 165 * Note that we don't need to check this pointer against NULL
166 * here or in psmintr, because if this fails lms_enable() will 166 * here or in psmintr, because if this fails lms_enable() will
167 * never be called, so lmsintr() will never be called. 167 * never be called, so lmsintr() will never be called.
168 */ 168 */
169 sc->sc_wsmousedev = config_found(self, &a, wsmousedevprint, CFARG_EOL); 169 sc->sc_wsmousedev = config_found(self, &a, wsmousedevprint, CFARGS_NONE);
170} 170}
171 171
172static int 172static int
173lms_enable(void *v) 173lms_enable(void *v)
174{ 174{
175 struct lms_softc *sc = v; 175 struct lms_softc *sc = v;
176 176
177 if (sc->sc_enabled) 177 if (sc->sc_enabled)
178 return EBUSY; 178 return EBUSY;
179 179
180 sc->sc_enabled = 1; 180 sc->sc_enabled = 1;
181 sc->oldbuttons = 0; 181 sc->oldbuttons = 0;
182 182

cvs diff -r1.54 -r1.54.8.1 src/sys/arch/i386/isa/mms.c (expand / switch to unified diff)

--- src/sys/arch/i386/isa/mms.c 2021/04/24 23:36:39 1.54
+++ src/sys/arch/i386/isa/mms.c 2021/08/04 01:21:27 1.54.8.1
@@ -1,40 +1,40 @@ @@ -1,40 +1,40 @@
1/* $NetBSD: mms.c,v 1.54 2021/04/24 23:36:39 thorpej Exp $ */ 1/* $NetBSD: mms.c,v 1.54.8.1 2021/08/04 01:21:27 thorpej Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1993, 1994 Charles M. Hannum. 4 * Copyright (c) 1993, 1994 Charles M. Hannum.
5 * Copyright (c) 1992, 1993 Erik Forsberg. 5 * Copyright (c) 1992, 1993 Erik Forsberg.
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 * 13 *
14 * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND ANY EXPRESS OR IMPLIED 14 * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND ANY EXPRESS OR IMPLIED
15 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 15 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
16 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 16 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
17 * NO EVENT SHALL I BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 17 * NO EVENT SHALL I BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
21 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 21 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
22 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 22 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26#include <sys/cdefs.h> 26#include <sys/cdefs.h>
27__KERNEL_RCSID(0, "$NetBSD: mms.c,v 1.54 2021/04/24 23:36:39 thorpej Exp $"); 27__KERNEL_RCSID(0, "$NetBSD: mms.c,v 1.54.8.1 2021/08/04 01:21:27 thorpej Exp $");
28 28
29#include <sys/param.h> 29#include <sys/param.h>
30#include <sys/systm.h> 30#include <sys/systm.h>
31#include <sys/ioctl.h> 31#include <sys/ioctl.h>
32#include <sys/device.h> 32#include <sys/device.h>
33 33
34#include <machine/intr.h> 34#include <machine/intr.h>
35#include <sys/bus.h> 35#include <sys/bus.h>
36 36
37#include <dev/isa/isavar.h> 37#include <dev/isa/isavar.h>
38 38
39#include <dev/wscons/wsconsio.h> 39#include <dev/wscons/wsconsio.h>
40#include <dev/wscons/wsmousevar.h> 40#include <dev/wscons/wsmousevar.h>
@@ -147,27 +147,27 @@ mmsattach(device_t parent, device_t self @@ -147,27 +147,27 @@ mmsattach(device_t parent, device_t self
147 147
148 sc->sc_ih = isa_intr_establish(ia->ia_ic, ia->ia_irq[0].ir_irq, 148 sc->sc_ih = isa_intr_establish(ia->ia_ic, ia->ia_irq[0].ir_irq,
149 IST_PULSE, IPL_TTY, mmsintr, sc); 149 IST_PULSE, IPL_TTY, mmsintr, sc);
150 150
151 a.accessops = &mms_accessops; 151 a.accessops = &mms_accessops;
152 a.accesscookie = sc; 152 a.accesscookie = sc;
153 153
154 /* 154 /*
155 * Attach the wsmouse, saving a handle to it. 155 * Attach the wsmouse, saving a handle to it.
156 * Note that we don't need to check this pointer against NULL 156 * Note that we don't need to check this pointer against NULL
157 * here or in psmintr, because if this fails lms_enable() will 157 * here or in psmintr, because if this fails lms_enable() will
158 * never be called, so lmsintr() will never be called. 158 * never be called, so lmsintr() will never be called.
159 */ 159 */
160 sc->sc_wsmousedev = config_found(self, &a, wsmousedevprint, CFARG_EOL); 160 sc->sc_wsmousedev = config_found(self, &a, wsmousedevprint, CFARGS_NONE);
161} 161}
162 162
163static int 163static int
164mms_enable(void *v) 164mms_enable(void *v)
165{ 165{
166 struct mms_softc *sc = v; 166 struct mms_softc *sc = v;
167 167
168 if (sc->sc_enabled) 168 if (sc->sc_enabled)
169 return EBUSY; 169 return EBUSY;
170 170
171 sc->sc_enabled = 1; 171 sc->sc_enabled = 1;
172 172
173 /* Enable interrupts. */ 173 /* Enable interrupts. */

cvs diff -r1.51 -r1.51.8.1 src/sys/arch/i386/pci/elan520.c (expand / switch to unified diff)

--- src/sys/arch/i386/pci/elan520.c 2021/04/24 23:36:39 1.51
+++ src/sys/arch/i386/pci/elan520.c 2021/08/04 01:21:27 1.51.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: elan520.c,v 1.51 2021/04/24 23:36:39 thorpej Exp $ */ 1/* $NetBSD: elan520.c,v 1.51.8.1 2021/08/04 01:21:27 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 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Jason R. Thorpe. 8 * by Jason R. Thorpe.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -30,27 +30,27 @@ @@ -30,27 +30,27 @@
30 */ 30 */
31 31
32/* 32/*
33 * Device driver for the AMD Elan SC520 System Controller. This attaches 33 * Device driver for the AMD Elan SC520 System Controller. This attaches
34 * where the "pchb" driver might normally attach, and provides support for 34 * where the "pchb" driver might normally attach, and provides support for
35 * extra features on the SC520, such as the watchdog timer and GPIO. 35 * extra features on the SC520, such as the watchdog timer and GPIO.
36 * 36 *
37 * Information about the GP bus echo bug work-around is from code posted 37 * Information about the GP bus echo bug work-around is from code posted
38 * to the "soekris-tech" mailing list by Jasper Wallace. 38 * to the "soekris-tech" mailing list by Jasper Wallace.
39 */ 39 */
40 40
41#include <sys/cdefs.h> 41#include <sys/cdefs.h>
42 42
43__KERNEL_RCSID(0, "$NetBSD: elan520.c,v 1.51 2021/04/24 23:36:39 thorpej Exp $"); 43__KERNEL_RCSID(0, "$NetBSD: elan520.c,v 1.51.8.1 2021/08/04 01:21:27 thorpej Exp $");
44 44
45#include <sys/param.h> 45#include <sys/param.h>
46#include <sys/systm.h> 46#include <sys/systm.h>
47#include <sys/time.h> 47#include <sys/time.h>
48#include <sys/device.h> 48#include <sys/device.h>
49#include <sys/gpio.h> 49#include <sys/gpio.h>
50#include <sys/mutex.h> 50#include <sys/mutex.h>
51#include <sys/wdog.h> 51#include <sys/wdog.h>
52#include <sys/reboot.h> 52#include <sys/reboot.h>
53 53
54#include <uvm/uvm_extern.h> 54#include <uvm/uvm_extern.h>
55 55
56#include <sys/bus.h> 56#include <sys/bus.h>
@@ -1425,66 +1425,62 @@ elanpar_match(device_t parent, cfdata_t  @@ -1425,66 +1425,62 @@ elanpar_match(device_t parent, cfdata_t
1425 struct elansc_softc *sc = device_private(parent); 1425 struct elansc_softc *sc = device_private(parent);
1426 1426
1427 return sc->sc_par == NULL; 1427 return sc->sc_par == NULL;
1428} 1428}
1429 1429
1430/* scan for new children */ 1430/* scan for new children */
1431static int 1431static int
1432elansc_rescan(device_t self, const char *ifattr, const int *locators) 1432elansc_rescan(device_t self, const char *ifattr, const int *locators)
1433{ 1433{
1434 struct elansc_softc *sc = device_private(self); 1434 struct elansc_softc *sc = device_private(self);
1435 1435
1436 if (ifattr_match(ifattr, "elanparbus") && sc->sc_par == NULL) { 1436 if (ifattr_match(ifattr, "elanparbus") && sc->sc_par == NULL) {
1437 sc->sc_par = config_found(sc->sc_dev, NULL, NULL, 1437 sc->sc_par = config_found(sc->sc_dev, NULL, NULL,
1438 CFARG_IATTR, "elanparbus", 1438 CFARGS(.iattr = "elanparbus"));
1439 CFARG_EOL); 
1440 } 1439 }
1441 1440
1442 if (ifattr_match(ifattr, "elanpexbus") && sc->sc_pex == NULL) { 1441 if (ifattr_match(ifattr, "elanpexbus") && sc->sc_pex == NULL) {
1443 sc->sc_pex = config_found(sc->sc_dev, NULL, NULL, 1442 sc->sc_pex = config_found(sc->sc_dev, NULL, NULL,
1444 CFARG_IATTR, "elanpexbus", 1443 CFARGS(.iattr = "elanpexbus"));
1445 CFARG_EOL); 
1446 } 1444 }
1447 1445
1448 if (ifattr_match(ifattr, "gpiobus") && sc->sc_gpio == NULL) { 1446 if (ifattr_match(ifattr, "gpiobus") && sc->sc_gpio == NULL) {
1449#if NGPIO > 0 1447#if NGPIO > 0
1450 struct gpiobus_attach_args gba; 1448 struct gpiobus_attach_args gba;
1451 1449
1452 memset(&gba, 0, sizeof(gba)); 1450 memset(&gba, 0, sizeof(gba));
1453 1451
1454 gba.gba_gc = &sc->sc_gpio_gc; 1452 gba.gba_gc = &sc->sc_gpio_gc;
1455 gba.gba_pins = sc->sc_gpio_pins; 1453 gba.gba_pins = sc->sc_gpio_pins;
1456 gba.gba_npins = ELANSC_PIO_NPINS; 1454 gba.gba_npins = ELANSC_PIO_NPINS;
1457 sc->sc_gpio = config_found(sc->sc_dev, &gba, gpiobus_print, 1455 sc->sc_gpio = config_found(sc->sc_dev, &gba, gpiobus_print,
1458 CFARG_IATTR, "gpiobus", 1456 CFARGS(.iattr = "gpiobus"));
1459 CFARG_EOL); 
1460#endif 1457#endif
1461 } 1458 }
1462 1459
1463 if (ifattr_match(ifattr, "pcibus") && sc->sc_pci == NULL) { 1460 if (ifattr_match(ifattr, "pcibus") && sc->sc_pci == NULL) {
1464 struct pcibus_attach_args pba; 1461 struct pcibus_attach_args pba;
1465 1462
1466 memset(&pba, 0, sizeof(pba)); 1463 memset(&pba, 0, sizeof(pba));
1467 pba.pba_iot = sc->sc_iot; 1464 pba.pba_iot = sc->sc_iot;
1468 pba.pba_memt = sc->sc_memt; 1465 pba.pba_memt = sc->sc_memt;
1469 pba.pba_dmat = sc->sc_dmat; 1466 pba.pba_dmat = sc->sc_dmat;
1470 pba.pba_dmat64 = sc->sc_dmat64; 1467 pba.pba_dmat64 = sc->sc_dmat64;
1471 pba.pba_pc = sc->sc_pc; 1468 pba.pba_pc = sc->sc_pc;
1472 pba.pba_flags = sc->sc_pciflags; 1469 pba.pba_flags = sc->sc_pciflags;
1473 pba.pba_bus = 0; 1470 pba.pba_bus = 0;
1474 pba.pba_bridgetag = NULL; 1471 pba.pba_bridgetag = NULL;
1475 sc->sc_pci = config_found(self, &pba, pcibusprint, 1472 sc->sc_pci = config_found(self, &pba, pcibusprint,
1476 CFARG_IATTR, "pcibus", 1473 CFARGS(.iattr = "pcibus"));
1477 CFARG_EOL); 
1478 } 1474 }
1479 1475
1480 return 0; 1476 return 0;
1481} 1477}
1482 1478
1483CFATTACH_DECL3_NEW(elanpar, 0, 1479CFATTACH_DECL3_NEW(elanpar, 0,
1484 elanpar_match, elanpar_attach, elanpar_detach, NULL, NULL, NULL, 1480 elanpar_match, elanpar_attach, elanpar_detach, NULL, NULL, NULL,
1485 DVF_DETACH_SHUTDOWN); 1481 DVF_DETACH_SHUTDOWN);
1486 1482
1487CFATTACH_DECL3_NEW(elanpex, 0, 1483CFATTACH_DECL3_NEW(elanpex, 0,
1488 elanpex_match, elanpex_attach, elanpex_detach, NULL, NULL, NULL, 1484 elanpex_match, elanpex_attach, elanpex_detach, NULL, NULL, NULL,
1489 DVF_DETACH_SHUTDOWN); 1485 DVF_DETACH_SHUTDOWN);
1490 1486

cvs diff -r1.14 -r1.14.8.1 src/sys/arch/i386/pci/gcscehci.c (expand / switch to unified diff)

--- src/sys/arch/i386/pci/gcscehci.c 2021/04/24 23:36:39 1.14
+++ src/sys/arch/i386/pci/gcscehci.c 2021/08/04 01:21:27 1.14.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: gcscehci.c,v 1.14 2021/04/24 23:36:39 thorpej Exp $ */ 1/* $NetBSD: gcscehci.c,v 1.14.8.1 2021/08/04 01:21:27 thorpej Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001, 2002, 2007 The NetBSD Foundation, Inc. 4 * Copyright (c) 2001, 2002, 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 Lennart Augustsson (lennart@augustsson.net) 8 * by Lennart Augustsson (lennart@augustsson.net)
9 * and Jared D. McNeill (jmcneill@invisible.ca) 9 * and Jared D. McNeill (jmcneill@invisible.ca)
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions 12 * modification, are permitted provided that the following conditions
13 * are met: 13 * are met:
14 * 1. Redistributions of source code must retain the above copyright 14 * 1. Redistributions of source code must retain the above copyright
@@ -21,27 +21,27 @@ @@ -21,27 +21,27 @@
21 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 * POSSIBILITY OF SUCH DAMAGE. 30 * POSSIBILITY OF SUCH DAMAGE.
31 */ 31 */
32 32
33#include <sys/cdefs.h> 33#include <sys/cdefs.h>
34__KERNEL_RCSID(0, "$NetBSD: gcscehci.c,v 1.14 2021/04/24 23:36:39 thorpej Exp $"); 34__KERNEL_RCSID(0, "$NetBSD: gcscehci.c,v 1.14.8.1 2021/08/04 01:21:27 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/kernel.h> 38#include <sys/kernel.h>
39#include <sys/device.h> 39#include <sys/device.h>
40#include <sys/proc.h> 40#include <sys/proc.h>
41#include <sys/queue.h> 41#include <sys/queue.h>
42 42
43#include <sys/bus.h> 43#include <sys/bus.h>
44#include <machine/cpufunc.h> 44#include <machine/cpufunc.h>
45 45
46#include <dev/pci/pcidevs.h> 46#include <dev/pci/pcidevs.h>
47#include <dev/pci/pcivar.h> 47#include <dev/pci/pcivar.h>
@@ -162,18 +162,18 @@ gcscehci_attach(device_t parent, device_ @@ -162,18 +162,18 @@ gcscehci_attach(device_t parent, device_
162 break; 162 break;
163 } 163 }
164 } 164 }
165 sc->sc.sc_ncomp = ncomp; 165 sc->sc.sc_ncomp = ncomp;
166 166
167 int err = ehci_init(&sc->sc); 167 int err = ehci_init(&sc->sc);
168 if (err) { 168 if (err) {
169 aprint_error("%s: init failed, error=%d\n", devname, err); 169 aprint_error("%s: init failed, error=%d\n", devname, err);
170 return; 170 return;
171 } 171 }
172 172
173 /* Attach usb device. */ 173 /* Attach usb device. */
174 sc->sc.sc_child = config_found(self, &sc->sc.sc_bus, usbctlprint, 174 sc->sc.sc_child = config_found(self, &sc->sc.sc_bus, usbctlprint,
175 CFARG_EOL); 175 CFARGS_NONE);
176} 176}
177 177
178CFATTACH_DECL_NEW(gcscehci, sizeof(struct gcscehci_softc), 178CFATTACH_DECL_NEW(gcscehci, sizeof(struct gcscehci_softc),
179 gcscehci_match, gcscehci_attach, NULL, ehci_activate); 179 gcscehci_match, gcscehci_attach, NULL, ehci_activate);

cvs diff -r1.16 -r1.16.8.1 src/sys/arch/i386/pci/geode.c (expand / switch to unified diff)

--- src/sys/arch/i386/pci/geode.c 2021/04/24 23:36:39 1.16
+++ src/sys/arch/i386/pci/geode.c 2021/08/04 01:21:27 1.16.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: geode.c,v 1.16 2021/04/24 23:36:39 thorpej Exp $ */ 1/* $NetBSD: geode.c,v 1.16.8.1 2021/08/04 01:21:27 thorpej Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2005 David Young. All rights reserved. 4 * Copyright (c) 2005 David Young. All rights reserved.
5 * 5 *
6 * This code was written by David Young and merged with geodecntr code 6 * This code was written by David Young and merged with geodecntr code
7 * by Frank Kardel. 7 * by Frank Kardel.
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
@@ -54,27 +54,27 @@ @@ -54,27 +54,27 @@
54 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 54 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
55 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 55 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
56 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 56 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
57 * POSSIBILITY OF SUCH DAMAGE. 57 * POSSIBILITY OF SUCH DAMAGE.
58 */ 58 */
59 59
60/* 60/*
61 * Device driver for the special devices attached to the GBA (watchdog, high 61 * Device driver for the special devices attached to the GBA (watchdog, high
62 * resolution counter, ...) in the AMD Geode SC1100 processor. 62 * resolution counter, ...) in the AMD Geode SC1100 processor.
63 */ 63 */
64 64
65#include <sys/cdefs.h> 65#include <sys/cdefs.h>
66 66
67__KERNEL_RCSID(0, "$NetBSD: geode.c,v 1.16 2021/04/24 23:36:39 thorpej Exp $"); 67__KERNEL_RCSID(0, "$NetBSD: geode.c,v 1.16.8.1 2021/08/04 01:21:27 thorpej Exp $");
68 68
69#include <sys/param.h> 69#include <sys/param.h>
70#include <sys/systm.h> 70#include <sys/systm.h>
71#include <sys/device.h> 71#include <sys/device.h>
72#include <sys/wdog.h> 72#include <sys/wdog.h>
73#include <uvm/uvm_extern.h> 73#include <uvm/uvm_extern.h>
74#include <sys/bus.h> 74#include <sys/bus.h>
75#include <dev/pci/pcivar.h> 75#include <dev/pci/pcivar.h>
76#include <dev/pci/pcidevs.h> 76#include <dev/pci/pcidevs.h>
77#include <arch/i386/pci/geodevar.h> 77#include <arch/i386/pci/geodevar.h>
78#include <arch/i386/pci/geodereg.h> 78#include <arch/i386/pci/geodereg.h>
79#include <dev/sysmon/sysmonvar.h> 79#include <dev/sysmon/sysmonvar.h>
80 80
@@ -110,27 +110,27 @@ geode_gcb_attach(device_t parent, device @@ -110,27 +110,27 @@ geode_gcb_attach(device_t parent, device
110 &sc->sc_ioh) != 0) { 110 &sc->sc_ioh) != 0) {
111 aprint_error(": unable to map registers\n"); 111 aprint_error(": unable to map registers\n");
112 return; 112 return;
113 } 113 }
114 114
115 GEODE_DPRINTF(("%s: mapped %u bytes at %#08" PRIx32 "\n", 115 GEODE_DPRINTF(("%s: mapped %u bytes at %#08" PRIx32 "\n",
116 device_xname(self), SC1100_GCB_SIZE, cba)); 116 device_xname(self), SC1100_GCB_SIZE, cba));
117 117
118 rev = bus_space_read_1(sc->sc_iot, sc->sc_ioh, SC1100_GCB_REV_B); 118 rev = bus_space_read_1(sc->sc_iot, sc->sc_ioh, SC1100_GCB_REV_B);
119 119
120 aprint_naive("\n"); 120 aprint_naive("\n");
121 aprint_normal(": AMD Geode GCB (rev. 0x%02x)\n", rev); 121 aprint_normal(": AMD Geode GCB (rev. 0x%02x)\n", rev);
122 122
123 while (config_found(self, NULL, NULL, CFARG_EOL) != NULL) 123 while (config_found(self, NULL, NULL, CFARGS_NONE) != NULL)
124 /* empty */; 124 /* empty */;
125} 125}
126static int 126static int
127geode_gcb_detach(device_t self, int flags) 127geode_gcb_detach(device_t self, int flags)
128{ 128{
129 int rc; 129 int rc;
130 struct geode_gcb_softc *sc = device_private(self); 130 struct geode_gcb_softc *sc = device_private(self);
131 131
132 if ((rc = config_detach_children(self, flags)) != 0) 132 if ((rc = config_detach_children(self, flags)) != 0)
133 return rc; 133 return rc;
134 134
135 bus_space_unmap(sc->sc_iot, sc->sc_ioh, SC1100_GCB_SIZE); 135 bus_space_unmap(sc->sc_iot, sc->sc_ioh, SC1100_GCB_SIZE);
136 return 0; 136 return 0;

cvs diff -r1.19 -r1.19.8.1 src/sys/arch/i386/pci/gscpcib.c (expand / switch to unified diff)

--- src/sys/arch/i386/pci/gscpcib.c 2021/04/24 23:36:39 1.19
+++ src/sys/arch/i386/pci/gscpcib.c 2021/08/04 01:21:27 1.19.8.1
@@ -1,39 +1,39 @@ @@ -1,39 +1,39 @@
1/* $NetBSD: gscpcib.c,v 1.19 2021/04/24 23:36:39 thorpej Exp $ */ 1/* $NetBSD: gscpcib.c,v 1.19.8.1 2021/08/04 01:21:27 thorpej Exp $ */
2/* $OpenBSD: gscpcib.c,v 1.3 2004/10/05 19:02:33 grange Exp $ */ 2/* $OpenBSD: gscpcib.c,v 1.3 2004/10/05 19:02:33 grange Exp $ */
3/* 3/*
4 * Copyright (c) 2004 Alexander Yurchenko <grange@openbsd.org> 4 * Copyright (c) 2004 Alexander Yurchenko <grange@openbsd.org>
5 * 5 *
6 * Permission to use, copy, modify, and distribute this software for any 6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above 7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies. 8 * copyright notice and this permission notice appear in all copies.
9 * 9 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 */ 17 */
18 18
19/* 19/*
20 * Special driver for the National Semiconductor Geode SC1100 PCI-ISA bridge 20 * Special driver for the National Semiconductor Geode SC1100 PCI-ISA bridge
21 * that attaches instead of pcib(4). In addition to the core pcib(4) 21 * that attaches instead of pcib(4). In addition to the core pcib(4)
22 * functionality this driver provides support for the GPIO interface. 22 * functionality this driver provides support for the GPIO interface.
23 */ 23 */
24 24
25#include <sys/cdefs.h> 25#include <sys/cdefs.h>
26__KERNEL_RCSID(0, "$NetBSD: gscpcib.c,v 1.19 2021/04/24 23:36:39 thorpej Exp $"); 26__KERNEL_RCSID(0, "$NetBSD: gscpcib.c,v 1.19.8.1 2021/08/04 01:21:27 thorpej Exp $");
27 27
28#include <sys/param.h> 28#include <sys/param.h>
29#include <sys/systm.h> 29#include <sys/systm.h>
30#include <sys/device.h> 30#include <sys/device.h>
31#include <sys/gpio.h> 31#include <sys/gpio.h>
32#include <sys/kernel.h> 32#include <sys/kernel.h>
33 33
34#include <sys/bus.h> 34#include <sys/bus.h>
35 35
36#include <dev/pci/pcireg.h> 36#include <dev/pci/pcireg.h>
37#include <dev/pci/pcivar.h> 37#include <dev/pci/pcivar.h>
38#include <dev/pci/pcidevs.h> 38#include <dev/pci/pcidevs.h>
39 39
@@ -90,28 +90,27 @@ gscpcib_rescan(device_t self, const char @@ -90,28 +90,27 @@ gscpcib_rescan(device_t self, const char
90#if NGPIO > 0 90#if NGPIO > 0
91 struct gscpcib_softc *sc = device_private(self); 91 struct gscpcib_softc *sc = device_private(self);
92 92
93 /* Attach GPIO framework */ 93 /* Attach GPIO framework */
94 if (sc->sc_gpio_present && ifattr_match(ifattr, "gpiobus") && 94 if (sc->sc_gpio_present && ifattr_match(ifattr, "gpiobus") &&
95 sc->sc_gpiobus == NULL) { 95 sc->sc_gpiobus == NULL) {
96 struct gpiobus_attach_args gba; 96 struct gpiobus_attach_args gba;
97 97
98 gba.gba_gc = &sc->sc_gpio_gc; 98 gba.gba_gc = &sc->sc_gpio_gc;
99 gba.gba_pins = sc->sc_gpio_pins; 99 gba.gba_pins = sc->sc_gpio_pins;
100 gba.gba_npins = GSCGPIO_NPINS; 100 gba.gba_npins = GSCGPIO_NPINS;
101 101
102 sc->sc_gpiobus = config_found(self, &gba, gpiobus_print, 102 sc->sc_gpiobus = config_found(self, &gba, gpiobus_print,
103 CFARG_IATTR, "gpiobus", 103 CFARGS(.iattr = "gpiobus"));
104 CFARG_EOL); 
105 return 0; 104 return 0;
106 } 105 }
107#endif 106#endif
108 107
109 return pcibrescan(self, ifattr, loc); 108 return pcibrescan(self, ifattr, loc);
110} 109}
111 110
112int 111int
113gscpcib_match(device_t parent, cfdata_t match, void *aux) 112gscpcib_match(device_t parent, cfdata_t match, void *aux)
114{ 113{
115 struct pci_attach_args *pa = aux; 114 struct pci_attach_args *pa = aux;
116 115
117 if (PCI_CLASS(pa->pa_class) != PCI_CLASS_BRIDGE || 116 if (PCI_CLASS(pa->pa_class) != PCI_CLASS_BRIDGE ||

cvs diff -r1.25 -r1.25.8.1 src/sys/arch/i386/pci/pceb.c (expand / switch to unified diff)

--- src/sys/arch/i386/pci/pceb.c 2021/04/24 23:36:39 1.25
+++ src/sys/arch/i386/pci/pceb.c 2021/08/04 01:21:27 1.25.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: pceb.c,v 1.25 2021/04/24 23:36:39 thorpej Exp $ */ 1/* $NetBSD: pceb.c,v 1.25.8.1 2021/08/04 01:21:27 thorpej Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1996, 1998 The NetBSD Foundation, Inc. 4 * Copyright (c) 1996, 1998 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Jason R. Thorpe. 8 * by Jason R. Thorpe.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -20,27 +20,27 @@ @@ -20,27 +20,27 @@
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32#include <sys/cdefs.h> 32#include <sys/cdefs.h>
33__KERNEL_RCSID(0, "$NetBSD: pceb.c,v 1.25 2021/04/24 23:36:39 thorpej Exp $"); 33__KERNEL_RCSID(0, "$NetBSD: pceb.c,v 1.25.8.1 2021/08/04 01:21:27 thorpej Exp $");
34 34
35#include <sys/types.h> 35#include <sys/types.h>
36#include <sys/param.h> 36#include <sys/param.h>
37#include <sys/systm.h> 37#include <sys/systm.h>
38#include <sys/device.h> 38#include <sys/device.h>
39 39
40#include <sys/bus.h> 40#include <sys/bus.h>
41 41
42#include <dev/isa/isavar.h> 42#include <dev/isa/isavar.h>
43#include <dev/eisa/eisavar.h> 43#include <dev/eisa/eisavar.h>
44 44
45#include <dev/pci/pcivar.h> 45#include <dev/pci/pcivar.h>
46#include <dev/pci/pcireg.h> 46#include <dev/pci/pcireg.h>
@@ -117,29 +117,27 @@ pceb_callback(device_t self) @@ -117,29 +117,27 @@ pceb_callback(device_t self)
117{ 117{
118 union pceb_attach_args ea; 118 union pceb_attach_args ea;
119 119
120 /* 120 /*
121 * Attach the EISA bus behind this bridge. 121 * Attach the EISA bus behind this bridge.
122 */ 122 */
123 memset(&ea, 0, sizeof(ea)); 123 memset(&ea, 0, sizeof(ea));
124 ea.ea_eba.eba_iot = x86_bus_space_io; 124 ea.ea_eba.eba_iot = x86_bus_space_io;
125 ea.ea_eba.eba_memt = x86_bus_space_mem; 125 ea.ea_eba.eba_memt = x86_bus_space_mem;
126#if NEISA > 0 126#if NEISA > 0
127 ea.ea_eba.eba_dmat = &eisa_bus_dma_tag; 127 ea.ea_eba.eba_dmat = &eisa_bus_dma_tag;
128#endif 128#endif
129 config_found(self, &ea.ea_eba, eisabusprint, 129 config_found(self, &ea.ea_eba, eisabusprint,
130 CFARG_IATTR, "eisabus", 130 CFARGS(.iattr = "eisabus"));
131 CFARG_EOL); 
132 131
133 /* 132 /*
134 * Attach the ISA bus behind this bridge. 133 * Attach the ISA bus behind this bridge.
135 */ 134 */
136 memset(&ea, 0, sizeof(ea)); 135 memset(&ea, 0, sizeof(ea));
137 ea.ea_iba.iba_iot = x86_bus_space_io; 136 ea.ea_iba.iba_iot = x86_bus_space_io;
138 ea.ea_iba.iba_memt = x86_bus_space_mem; 137 ea.ea_iba.iba_memt = x86_bus_space_mem;
139#if NISA > 0 138#if NISA > 0
140 ea.ea_iba.iba_dmat = &isa_bus_dma_tag; 139 ea.ea_iba.iba_dmat = &isa_bus_dma_tag;
141#endif 140#endif
142 config_found(self, &ea.ea_iba, isabusprint, 141 config_found(self, &ea.ea_iba, isabusprint,
143 CFARG_IATTR, "isabus", 142 CFARGS(.iattr = "isabus"));
144 CFARG_EOL); 
145} 143}

cvs diff -r1.21 -r1.21.8.1 src/sys/arch/i386/pci/pcmb.c (expand / switch to unified diff)

--- src/sys/arch/i386/pci/pcmb.c 2021/04/24 23:36:39 1.21
+++ src/sys/arch/i386/pci/pcmb.c 2021/08/04 01:21:27 1.21.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: pcmb.c,v 1.21 2021/04/24 23:36:39 thorpej Exp $ */ 1/* $NetBSD: pcmb.c,v 1.21.8.1 2021/08/04 01:21:27 thorpej Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1996, 1998 The NetBSD Foundation, Inc. 4 * Copyright (c) 1996, 1998 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Jason R. Thorpe and Jaromir Dolecek. 8 * by Jason R. Thorpe and Jaromir Dolecek.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -24,27 +24,27 @@ @@ -24,27 +24,27 @@
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/* 32/*
33 * "Driver" for PCI-MCA Bridges. 33 * "Driver" for PCI-MCA Bridges.
34 */ 34 */
35 35
36#include <sys/cdefs.h> 36#include <sys/cdefs.h>
37__KERNEL_RCSID(0, "$NetBSD: pcmb.c,v 1.21 2021/04/24 23:36:39 thorpej Exp $"); 37__KERNEL_RCSID(0, "$NetBSD: pcmb.c,v 1.21.8.1 2021/08/04 01:21:27 thorpej Exp $");
38 38
39#include <sys/types.h> 39#include <sys/types.h>
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/bus.h> 43#include <sys/bus.h>
44 44
45#include <dev/mca/mcavar.h> 45#include <dev/mca/mcavar.h>
46 46
47#include <dev/pci/pcivar.h> 47#include <dev/pci/pcivar.h>
48#include <dev/pci/pcireg.h> 48#include <dev/pci/pcireg.h>
49 49
50#include <dev/pci/pcidevs.h> 50#include <dev/pci/pcidevs.h>
@@ -98,15 +98,15 @@ pcmb_callback(device_t self) @@ -98,15 +98,15 @@ pcmb_callback(device_t self)
98{ 98{
99 struct mcabus_attach_args ma; 99 struct mcabus_attach_args ma;
100 100
101 /* 101 /*
102 * Attach MCA bus behind this bridge. 102 * Attach MCA bus behind this bridge.
103 */ 103 */
104 ma.mba_iot = x86_bus_space_io; 104 ma.mba_iot = x86_bus_space_io;
105 ma.mba_memt = x86_bus_space_mem; 105 ma.mba_memt = x86_bus_space_mem;
106#if NMCA > 0 106#if NMCA > 0
107 ma.mba_dmat = &mca_bus_dma_tag; 107 ma.mba_dmat = &mca_bus_dma_tag;
108#endif 108#endif
109 ma.mba_mc = NULL; 109 ma.mba_mc = NULL;
110 ma.mba_bus = 0; 110 ma.mba_bus = 0;
111 config_found(self, &ma, mcabusprint, CFARG_EOL); 111 config_found(self, &ma, mcabusprint, CFARGS_NONE);
112} 112}

cvs diff -r1.18 -r1.18.8.1 src/sys/arch/i386/pci/viapcib.c (expand / switch to unified diff)

--- src/sys/arch/i386/pci/viapcib.c 2021/04/24 23:36:39 1.18
+++ src/sys/arch/i386/pci/viapcib.c 2021/08/04 01:21:27 1.18.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: viapcib.c,v 1.18 2021/04/24 23:36:39 thorpej Exp $ */ 1/* $NetBSD: viapcib.c,v 1.18.8.1 2021/08/04 01:21:27 thorpej Exp $ */
2/* $FreeBSD: src/sys/pci/viapm.c,v 1.10 2005/05/29 04:42:29 nyan Exp $ */ 2/* $FreeBSD: src/sys/pci/viapm.c,v 1.10 2005/05/29 04:42:29 nyan Exp $ */
3 3
4/*- 4/*-
5 * Copyright (c) 2005, 2006 Jared D. McNeill <jmcneill@invisible.ca> 5 * Copyright (c) 2005, 2006 Jared D. McNeill <jmcneill@invisible.ca>
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
@@ -45,27 +45,27 @@ @@ -45,27 +45,27 @@
45 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 45 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
46 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 46 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
47 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 47 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
48 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 48 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
49 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 49 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
50 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 50 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
51 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 51 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
52 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 52 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
53 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 53 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
54 * SUCH DAMAGE. 54 * SUCH DAMAGE.
55 */ 55 */
56 56
57#include <sys/cdefs.h> 57#include <sys/cdefs.h>
58__KERNEL_RCSID(0, "$NetBSD: viapcib.c,v 1.18 2021/04/24 23:36:39 thorpej Exp $"); 58__KERNEL_RCSID(0, "$NetBSD: viapcib.c,v 1.18.8.1 2021/08/04 01:21:27 thorpej Exp $");
59 59
60#include <sys/types.h> 60#include <sys/types.h>
61#include <sys/param.h> 61#include <sys/param.h>
62#include <sys/systm.h> 62#include <sys/systm.h>
63#include <sys/device.h> 63#include <sys/device.h>
64#include <sys/mutex.h> 64#include <sys/mutex.h>
65#include <sys/bus.h> 65#include <sys/bus.h>
66 66
67#include <dev/pci/pcireg.h> 67#include <dev/pci/pcireg.h>
68#include <dev/pci/pcivar.h> 68#include <dev/pci/pcivar.h>
69#include <dev/pci/pcidevs.h> 69#include <dev/pci/pcidevs.h>
70 70
71#include <dev/i2c/i2cvar.h> 71#include <dev/i2c/i2cvar.h>
@@ -205,28 +205,27 @@ core_pcib: @@ -205,28 +205,27 @@ core_pcib:
205 device_xname(self), addr, sc->sc_revision); 205 device_xname(self), addr, sc->sc_revision);
206  206
207 /* Disable slave function */ 207 /* Disable slave function */
208 b = viapcib_smbus_read(sc, SMBSLVCNT); 208 b = viapcib_smbus_read(sc, SMBSLVCNT);
209 viapcib_smbus_write(sc, SMBSLVCNT, b & ~1); 209 viapcib_smbus_write(sc, SMBSLVCNT, b & ~1);
210 210
211 memset(&iba, 0, sizeof(iba)); 211 memset(&iba, 0, sizeof(iba));
212 iba.iba_tag = &sc->sc_i2c; 212 iba.iba_tag = &sc->sc_i2c;
213 iic_tag_init(&sc->sc_i2c); 213 iic_tag_init(&sc->sc_i2c);
214 iba.iba_tag->ic_cookie = (void *)sc; 214 iba.iba_tag->ic_cookie = (void *)sc;
215 iba.iba_tag->ic_exec = viapcib_exec; 215 iba.iba_tag->ic_exec = viapcib_exec;
216 216
217 config_found(self, &iba, iicbus_print, 217 config_found(self, &iba, iicbus_print,
218 CFARG_IATTR, "i2cbus", 218 CFARGS(.iattr = "i2cbus"));
219 CFARG_EOL); 
220 } 219 }
221} 220}
222 221
223static int 222static int
224viapcib_wait(struct viapcib_softc *sc) 223viapcib_wait(struct viapcib_softc *sc)
225{ 224{
226 int rv, timeout; 225 int rv, timeout;
227 uint8_t val = 0; 226 uint8_t val = 0;
228 227
229 timeout = VIAPCIB_SMBUS_TIMEOUT; 228 timeout = VIAPCIB_SMBUS_TIMEOUT;
230 rv = 0; 229 rv = 0;
231 230
232 while (timeout--) { 231 while (timeout--) {

cvs diff -r1.76 -r1.76.8.1 src/sys/arch/i386/pnpbios/pnpbios.c (expand / switch to unified diff)

--- src/sys/arch/i386/pnpbios/pnpbios.c 2021/04/24 23:36:39 1.76
+++ src/sys/arch/i386/pnpbios/pnpbios.c 2021/08/04 01:21:27 1.76.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: pnpbios.c,v 1.76 2021/04/24 23:36:39 thorpej Exp $ */ 1/* $NetBSD: pnpbios.c,v 1.76.8.1 2021/08/04 01:21:27 thorpej Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000 Jason R. Thorpe. All rights reserved. 4 * Copyright (c) 2000 Jason R. Thorpe. All rights reserved.
5 * Copyright (c) 2000 Christian E. Hopps. All rights reserved. 5 * Copyright (c) 2000 Christian E. Hopps. All rights reserved.
6 * Copyright (c) 1999 6 * Copyright (c) 1999
7 * Matthias Drochner. All rights reserved. 7 * Matthias Drochner. 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
@@ -31,27 +31,27 @@ @@ -31,27 +31,27 @@
31/* 31/*
32 * PnP BIOS documentation is available at the following locations. 32 * PnP BIOS documentation is available at the following locations.
33 * 33 *
34 * http://www.microsoft.com/hwdev/download/respec/pnpbios.zip 34 * http://www.microsoft.com/hwdev/download/respec/pnpbios.zip
35 * http://www.microsoft.com/hwdev/download/respec/biosclar.zip 35 * http://www.microsoft.com/hwdev/download/respec/biosclar.zip
36 * http://www.microsoft.com/hwdev/download/resources/specs/devids.txt 36 * http://www.microsoft.com/hwdev/download/resources/specs/devids.txt
37 * 37 *
38 * PNPBIOSEVENTS is unfinished. After coding what I did I discovered 38 * PNPBIOSEVENTS is unfinished. After coding what I did I discovered
39 * I had no platforms to test on so someone else will need to finish 39 * I had no platforms to test on so someone else will need to finish
40 * it. I didn't want to toss the code though 40 * it. I didn't want to toss the code though
41 */ 41 */
42 42
43#include <sys/cdefs.h> 43#include <sys/cdefs.h>
44__KERNEL_RCSID(0, "$NetBSD: pnpbios.c,v 1.76 2021/04/24 23:36:39 thorpej Exp $"); 44__KERNEL_RCSID(0, "$NetBSD: pnpbios.c,v 1.76.8.1 2021/08/04 01:21:27 thorpej Exp $");
45 45
46#include <sys/param.h> 46#include <sys/param.h>
47#include <sys/systm.h> 47#include <sys/systm.h>
48#include <sys/device.h> 48#include <sys/device.h>
49#include <sys/malloc.h> 49#include <sys/malloc.h>
50#include <sys/kernel.h> 50#include <sys/kernel.h>
51#include <sys/kthread.h> 51#include <sys/kthread.h>
52 52
53#include <uvm/uvm_extern.h> 53#include <uvm/uvm_extern.h>
54 54
55#include <machine/isa_machdep.h> 55#include <machine/isa_machdep.h>
56#include <machine/segments.h> 56#include <machine/segments.h>
57 57
@@ -763,34 +763,32 @@ pnpbios_print_devres(device_t dev, struc @@ -763,34 +763,32 @@ pnpbios_print_devres(device_t dev, struc
763 aprint_normal("\n"); 763 aprint_normal("\n");
764} 764}
765 765
766static int 766static int
767pnpbios_attachchild(struct pnpbios_softc *sc, 767pnpbios_attachchild(struct pnpbios_softc *sc,
768 struct pnpbiosdev_attach_args *aa, int matchonly) 768 struct pnpbiosdev_attach_args *aa, int matchonly)
769{ 769{
770 int locs[PNPBIOSCF_NLOCS]; 770 int locs[PNPBIOSCF_NLOCS];
771 771
772 locs[PNPBIOSCF_INDEX] = aa->idx; 772 locs[PNPBIOSCF_INDEX] = aa->idx;
773 773
774 if (matchonly) 774 if (matchonly)
775 return (config_search(sc->sc_dev, aa, 775 return (config_search(sc->sc_dev, aa,
776 CFARG_SUBMATCH, config_stdsubmatch, 776 CFARGS(.submatch = config_stdsubmatch,
777 CFARG_LOCATORS, locs, 777 .locators = locs)) != NULL);
778 CFARG_EOL) != NULL); 
779 else  778 else
780 return (config_found(sc->sc_dev, aa, pnpbios_print, 779 return (config_found(sc->sc_dev, aa, pnpbios_print,
781 CFARG_SUBMATCH, config_stdsubmatch, 780 CFARGS(.submatch = config_stdsubmatch,
782 CFARG_LOCATORS, locs, 781 .locators = locs)) != NULL);
783 CFARG_EOL) != NULL); 
784} 782}
785 783
786static int 784static int
787pnpbios_attachnode(struct pnpbios_softc *sc, int idx, const uint8_t *buf, 785pnpbios_attachnode(struct pnpbios_softc *sc, int idx, const uint8_t *buf,
788 size_t len, int matchonly) 786 size_t len, int matchonly)
789{ 787{
790 const struct pnpdevnode *dn; 788 const struct pnpdevnode *dn;
791 const uint8_t *p; 789 const uint8_t *p;
792 char idstr[8]; 790 char idstr[8];
793 struct pnpresources r, s; 791 struct pnpresources r, s;
794 struct pnpbiosdev_attach_args aa; 792 struct pnpbiosdev_attach_args aa;
795 struct pnp_compatid *compatid; 793 struct pnp_compatid *compatid;
796 int res, i; 794 int res, i;

cvs diff -r1.23 -r1.23.8.1 src/sys/arch/i386/pnpbios/wss_pnpbios.c (expand / switch to unified diff)

--- src/sys/arch/i386/pnpbios/wss_pnpbios.c 2021/04/24 23:36:39 1.23
+++ src/sys/arch/i386/pnpbios/wss_pnpbios.c 2021/08/04 01:21:27 1.23.8.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: wss_pnpbios.c,v 1.23 2021/04/24 23:36:39 thorpej Exp $ */ 1/* $NetBSD: wss_pnpbios.c,v 1.23.8.1 2021/08/04 01:21:27 thorpej Exp $ */
2/* 2/*
3 * Copyright (c) 1999 3 * Copyright (c) 1999
4 * Matthias Drochner. All rights reserved. 4 * Matthias Drochner. 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 * 14 *
@@ -16,27 +16,27 @@ @@ -16,27 +16,27 @@
16 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE. 25 * SUCH DAMAGE.
26 */ 26 */
27 27
28#include <sys/cdefs.h> 28#include <sys/cdefs.h>
29__KERNEL_RCSID(0, "$NetBSD: wss_pnpbios.c,v 1.23 2021/04/24 23:36:39 thorpej Exp $"); 29__KERNEL_RCSID(0, "$NetBSD: wss_pnpbios.c,v 1.23.8.1 2021/08/04 01:21:27 thorpej Exp $");
30 30
31#include <sys/param.h> 31#include <sys/param.h>
32#include <sys/systm.h> 32#include <sys/systm.h>
33#include <sys/errno.h> 33#include <sys/errno.h>
34#include <sys/ioctl.h> 34#include <sys/ioctl.h>
35#include <sys/syslog.h> 35#include <sys/syslog.h>
36#include <sys/device.h> 36#include <sys/device.h>
37#include <sys/proc.h> 37#include <sys/proc.h>
38 38
39#include <sys/bus.h> 39#include <sys/bus.h>
40 40
41#include <sys/audioio.h> 41#include <sys/audioio.h>
42#include <dev/audio/audio_if.h> 42#include <dev/audio/audio_if.h>
@@ -158,16 +158,16 @@ wss_pnpbios_attach(device_t parent, devi @@ -158,16 +158,16 @@ wss_pnpbios_attach(device_t parent, devi
158 aprint_error_dev(self, "ad1848 probe failed\n"); 158 aprint_error_dev(self, "ad1848 probe failed\n");
159 return; 159 return;
160 } 160 }
161 161
162 wssattach(sc); 162 wssattach(sc);
163#if 0 163#if 0
164 /* XXX recdrq */ 164 /* XXX recdrq */
165 bus_space_write_1(sc->sc_iot, sc->sc_ioh, WSS_CONFIG, 165 bus_space_write_1(sc->sc_iot, sc->sc_ioh, WSS_CONFIG,
166 (interrupt_bits[sc->wss_irq] | dma_bits[sc->wss_playdrq])); 166 (interrupt_bits[sc->wss_irq] | dma_bits[sc->wss_playdrq]));
167#endif 167#endif
168 arg.type = AUDIODEV_TYPE_OPL; 168 arg.type = AUDIODEV_TYPE_OPL;
169 arg.hwif = 0; 169 arg.hwif = 0;
170 arg.hdl = 0; 170 arg.hdl = 0;
171 (void)config_found(self, &arg, audioprint, CFARG_EOL); 171 (void)config_found(self, &arg, audioprint, CFARGS_NONE);
172} 172}
173 173