struct device * -> device_t, use device_privatediff -r1.17 -r1.18 src/sys/arch/i386/pnpbios/ess_pnpbios.c
(cegger)
--- src/sys/arch/i386/pnpbios/ess_pnpbios.c 2008/04/28 20:23:25 1.17
+++ src/sys/arch/i386/pnpbios/ess_pnpbios.c 2009/05/04 12:13:19 1.18
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: ess_pnpbios.c,v 1.17 2008/04/28 20:23:25 martin Exp $ */ | 1 | /* $NetBSD: ess_pnpbios.c,v 1.18 2009/05/04 12:13:19 cegger Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2000 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 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 Nathan J. Williams. | 8 | * by Nathan J. Williams. | |
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,82 +20,82 @@ | @@ -20,82 +20,82 @@ | |||
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: ess_pnpbios.c,v 1.17 2008/04/28 20:23:25 martin Exp $"); | 33 | __KERNEL_RCSID(0, "$NetBSD: ess_pnpbios.c,v 1.18 2009/05/04 12:13:19 cegger Exp $"); | |
34 | 34 | |||
35 | #include <sys/param.h> | 35 | #include <sys/param.h> | |
36 | #include <sys/systm.h> | 36 | #include <sys/systm.h> | |
37 | #include <sys/errno.h> | 37 | #include <sys/errno.h> | |
38 | #include <sys/ioctl.h> | 38 | #include <sys/ioctl.h> | |
39 | #include <sys/syslog.h> | 39 | #include <sys/syslog.h> | |
40 | #include <sys/device.h> | 40 | #include <sys/device.h> | |
41 | #include <sys/proc.h> | 41 | #include <sys/proc.h> | |
42 | 42 | |||
43 | #include <machine/bus.h> | 43 | #include <machine/bus.h> | |
44 | 44 | |||
45 | #include <sys/audioio.h> | 45 | #include <sys/audioio.h> | |
46 | #include <dev/audio_if.h> | 46 | #include <dev/audio_if.h> | |
47 | #include <dev/midi_if.h> | 47 | #include <dev/midi_if.h> | |
48 | #include <dev/mulaw.h> | 48 | #include <dev/mulaw.h> | |
49 | 49 | |||
50 | #include <dev/isa/isavar.h> | 50 | #include <dev/isa/isavar.h> | |
51 | #include <dev/isa/isadmavar.h> | 51 | #include <dev/isa/isadmavar.h> | |
52 | 52 | |||
53 | #include <i386/pnpbios/pnpbiosvar.h> | 53 | #include <i386/pnpbios/pnpbiosvar.h> | |
54 | 54 | |||
55 | #include <dev/isa/essreg.h> | 55 | #include <dev/isa/essreg.h> | |
56 | #include <dev/isa/essvar.h> | 56 | #include <dev/isa/essvar.h> | |
57 | 57 | |||
58 | int ess_pnpbios_match(struct device *, struct cfdata *, void *); | 58 | int ess_pnpbios_match(device_t, cfdata_t, void *); | |
59 | void ess_pnpbios_attach(struct device *, struct device *, void *); | 59 | void ess_pnpbios_attach(device_t, device_t, void *); | |
60 | 60 | |||
61 | CFATTACH_DECL(ess_pnpbios, sizeof(struct ess_softc), | 61 | CFATTACH_DECL(ess_pnpbios, sizeof(struct ess_softc), | |
62 | ess_pnpbios_match, ess_pnpbios_attach, NULL, NULL); | 62 | ess_pnpbios_match, ess_pnpbios_attach, NULL, NULL); | |
63 | 63 | |||
64 | int | 64 | int | |
65 | ess_pnpbios_match(struct device *parent, struct cfdata *match, | 65 | ess_pnpbios_match(device_t parent, cfdata_t match, | |
66 | void *aux) | 66 | void *aux) | |
67 | { | 67 | { | |
68 | struct pnpbiosdev_attach_args *aa = aux; | 68 | struct pnpbiosdev_attach_args *aa = aux; | |
69 | 69 | |||
70 | if (strcmp(aa->idstr, "ESS0104") && /* 1788 */ | 70 | if (strcmp(aa->idstr, "ESS0104") && /* 1788 */ | |
71 | strcmp(aa->idstr, "ESS0114") && /* 1788 */ | 71 | strcmp(aa->idstr, "ESS0114") && /* 1788 */ | |
72 | strcmp(aa->idstr, "CPQAE27") && /* 1788 */ | 72 | strcmp(aa->idstr, "CPQAE27") && /* 1788 */ | |
73 | strcmp(aa->idstr, "ESS1869") && /* 1869 */ | 73 | strcmp(aa->idstr, "ESS1869") && /* 1869 */ | |
74 | strcmp(aa->idstr, "CPQB0AB") && /* 1869 */ | 74 | strcmp(aa->idstr, "CPQB0AB") && /* 1869 */ | |
75 | strcmp(aa->idstr, "CPQB0AC") && /* 1869 */ | 75 | strcmp(aa->idstr, "CPQB0AC") && /* 1869 */ | |
76 | strcmp(aa->idstr, "CPQB0AD") && /* 1869 */ | 76 | strcmp(aa->idstr, "CPQB0AD") && /* 1869 */ | |
77 | strcmp(aa->idstr, "CPQB0F1") && /* 1869 */ | 77 | strcmp(aa->idstr, "CPQB0F1") && /* 1869 */ | |
78 | strcmp(aa->idstr, "ESS1879")) /* 1879 */ | 78 | strcmp(aa->idstr, "ESS1879")) /* 1879 */ | |
79 | return (0); | 79 | return (0); | |
80 | 80 | |||
81 | return (1); | 81 | return (1); | |
82 | } | 82 | } | |
83 | 83 | |||
84 | void | 84 | void | |
85 | ess_pnpbios_attach(struct device *parent, struct device *self, | 85 | ess_pnpbios_attach(device_t parent, device_t self, | |
86 | void *aux) | 86 | void *aux) | |
87 | { | 87 | { | |
88 | struct ess_softc *sc = (void *)self; | 88 | struct ess_softc *sc = device_private(self); | |
89 | struct pnpbiosdev_attach_args *aa = aux; | 89 | struct pnpbiosdev_attach_args *aa = aux; | |
90 | 90 | |||
91 | if (pnpbios_io_map(aa->pbt, aa->resc, 0, &sc->sc_iot, &sc->sc_ioh)) { | 91 | if (pnpbios_io_map(aa->pbt, aa->resc, 0, &sc->sc_iot, &sc->sc_ioh)) { | |
92 | printf(": can't map i/o space\n"); | 92 | printf(": can't map i/o space\n"); | |
93 | return; | 93 | return; | |
94 | } | 94 | } | |
95 | 95 | |||
96 | sc->sc_ic = aa->ic; | 96 | sc->sc_ic = aa->ic; | |
97 | 97 | |||
98 | /* XXX These are only for setting chip configuration registers. */ | 98 | /* XXX These are only for setting chip configuration registers. */ | |
99 | pnpbios_getiobase(aa->pbt, aa->resc, 0, 0, &sc->sc_iobase); | 99 | pnpbios_getiobase(aa->pbt, aa->resc, 0, 0, &sc->sc_iobase); | |
100 | 100 | |||
101 | sc->sc_audio1.ist = IST_EDGE; | 101 | sc->sc_audio1.ist = IST_EDGE; |
--- src/sys/arch/i386/pnpbios/wss_pnpbios.c 2009/03/14 15:36:07 1.17
+++ src/sys/arch/i386/pnpbios/wss_pnpbios.c 2009/05/04 12:13:19 1.18
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: wss_pnpbios.c,v 1.17 2009/03/14 15:36:07 dsl Exp $ */ | 1 | /* $NetBSD: wss_pnpbios.c,v 1.18 2009/05/04 12:13:19 cegger 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,52 +16,52 @@ | @@ -16,52 +16,52 @@ | |||
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.17 2009/03/14 15:36:07 dsl Exp $"); | 29 | __KERNEL_RCSID(0, "$NetBSD: wss_pnpbios.c,v 1.18 2009/05/04 12:13:19 cegger 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 <machine/bus.h> | 39 | #include <machine/bus.h> | |
40 | 40 | |||
41 | #include <sys/audioio.h> | 41 | #include <sys/audioio.h> | |
42 | #include <dev/audio_if.h> | 42 | #include <dev/audio_if.h> | |
43 | 43 | |||
44 | #include <dev/isa/isavar.h> | 44 | #include <dev/isa/isavar.h> | |
45 | #include <dev/isa/isadmavar.h> | 45 | #include <dev/isa/isadmavar.h> | |
46 | 46 | |||
47 | #include <i386/pnpbios/pnpbiosvar.h> | 47 | #include <i386/pnpbios/pnpbiosvar.h> | |
48 | 48 | |||
49 | #include <dev/isa/ad1848var.h> | 49 | #include <dev/isa/ad1848var.h> | |
50 | #include <dev/isa/wssreg.h> | 50 | #include <dev/isa/wssreg.h> | |
51 | #include <dev/isa/wssvar.h> | 51 | #include <dev/isa/wssvar.h> | |
52 | 52 | |||
53 | int wss_pnpbios_match(struct device *, struct cfdata *, void *); | 53 | int wss_pnpbios_match(device_t, cfdata_t, void *); | |
54 | void wss_pnpbios_attach(struct device *, struct device *, void *); | 54 | void wss_pnpbios_attach(device_t, device_t, void *); | |
55 | int wss_pnpbios_hints_index(const char *); | 55 | int wss_pnpbios_hints_index(const char *); | |
56 | 56 | |||
57 | 57 | |||
58 | CFATTACH_DECL(wss_pnpbios, sizeof(struct wss_softc), | 58 | CFATTACH_DECL(wss_pnpbios, sizeof(struct wss_softc), | |
59 | wss_pnpbios_match, wss_pnpbios_attach, NULL, NULL); | 59 | wss_pnpbios_match, wss_pnpbios_attach, NULL, NULL); | |
60 | 60 | |||
61 | struct wss_pnpbios_hint { | 61 | struct wss_pnpbios_hint { | |
62 | char idstr[8]; | 62 | char idstr[8]; | |
63 | int io_region_idx_ad1848; /* which region index is the DAC? */ | 63 | int io_region_idx_ad1848; /* which region index is the DAC? */ | |
64 | int io_region_idx_opl; /* which region index is the OPL? */ | 64 | int io_region_idx_opl; /* which region index is the OPL? */ | |
65 | int offset_ad1848; /* offset from start of DAC region */ | 65 | int offset_ad1848; /* offset from start of DAC region */ | |
66 | }; | 66 | }; | |
67 | 67 | |||
@@ -78,42 +78,42 @@ wss_pnpbios_hints_index(const char *idst | @@ -78,42 +78,42 @@ wss_pnpbios_hints_index(const char *idst | |||
78 | { | 78 | { | |
79 | int idx = 0; | 79 | int idx = 0; | |
80 | 80 | |||
81 | while (wss_pnpbios_hints[idx].idstr[0] != 0) { | 81 | while (wss_pnpbios_hints[idx].idstr[0] != 0) { | |
82 | if (!strcmp(wss_pnpbios_hints[idx].idstr, idstr)) | 82 | if (!strcmp(wss_pnpbios_hints[idx].idstr, idstr)) | |
83 | return idx; | 83 | return idx; | |
84 | ++idx; | 84 | ++idx; | |
85 | } | 85 | } | |
86 | 86 | |||
87 | return -1; | 87 | return -1; | |
88 | } | 88 | } | |
89 | 89 | |||
90 | int | 90 | int | |
91 | wss_pnpbios_match(struct device *parent, | 91 | wss_pnpbios_match(device_t parent, | |
92 | struct cfdata *match, void *aux) | 92 | cfdata_t match, void *aux) | |
93 | { | 93 | { | |
94 | struct pnpbiosdev_attach_args *aa = aux; | 94 | struct pnpbiosdev_attach_args *aa = aux; | |
95 | 95 | |||
96 | if (wss_pnpbios_hints_index(aa->idstr) == -1) | 96 | if (wss_pnpbios_hints_index(aa->idstr) == -1) | |
97 | return (0); | 97 | return (0); | |
98 | 98 | |||
99 | return (2); /* beat sb */ | 99 | return (2); /* beat sb */ | |
100 | } | 100 | } | |
101 | 101 | |||
102 | void | 102 | void | |
103 | wss_pnpbios_attach(struct device *parent, struct device *self, | 103 | wss_pnpbios_attach(device_t parent, device_t self, | |
104 | void *aux) | 104 | void *aux) | |
105 | { | 105 | { | |
106 | struct wss_softc *sc = (void *)self; | 106 | struct wss_softc *sc = device_private(self); | |
107 | struct pnpbiosdev_attach_args *aa = aux; | 107 | struct pnpbiosdev_attach_args *aa = aux; | |
108 | struct audio_attach_args arg; | 108 | struct audio_attach_args arg; | |
109 | struct wss_pnpbios_hint *wph; | 109 | struct wss_pnpbios_hint *wph; | |
110 | 110 | |||
111 | #if 0 | 111 | #if 0 | |
112 | static u_char interrupt_bits[12] = { | 112 | static u_char interrupt_bits[12] = { | |
113 | -1, -1, -1, -1, -1, -1, -1, 0x08, -1, 0x10, 0x18, 0x20 | 113 | -1, -1, -1, -1, -1, -1, -1, 0x08, -1, 0x10, 0x18, 0x20 | |
114 | }; | 114 | }; | |
115 | static u_char dma_bits[4] = {1, 2, 0, 3}; | 115 | static u_char dma_bits[4] = {1, 2, 0, 3}; | |
116 | #endif | 116 | #endif | |
117 | 117 | |||
118 | wph = &wss_pnpbios_hints[wss_pnpbios_hints_index(aa->idstr)]; | 118 | wph = &wss_pnpbios_hints[wss_pnpbios_hints_index(aa->idstr)]; | |
119 | 119 |
--- src/sys/arch/i386/pnpbios/pnpbios.c 2009/03/11 10:30:52 1.65
+++ src/sys/arch/i386/pnpbios/pnpbios.c 2009/05/04 12:13:19 1.66
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: pnpbios.c,v 1.65 2009/03/11 10:30:52 cegger Exp $ */ | 1 | /* $NetBSD: pnpbios.c,v 1.66 2009/05/04 12:13:19 cegger 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.65 2009/03/11 10:30:52 cegger Exp $"); | 44 | __KERNEL_RCSID(0, "$NetBSD: pnpbios.c,v 1.66 2009/05/04 12:13:19 cegger 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 | |||
@@ -116,30 +116,28 @@ static int pnpbios_getnode(int, int *, | @@ -116,30 +116,28 @@ static int pnpbios_getnode(int, int *, | |||
116 | static int pnpbios_getnumnodes(int *, size_t *); | 116 | static int pnpbios_getnumnodes(int *, size_t *); | |
117 | 117 | |||
118 | #ifdef PNPBIOSEVENTS | 118 | #ifdef PNPBIOSEVENTS | |
119 | static int pnpbios_getdockinfo(struct pnpdockinfo *); | 119 | static int pnpbios_getdockinfo(struct pnpdockinfo *); | |
120 | 120 | |||
121 | static int pnpbios_getevent(uint16_t *); | 121 | static int pnpbios_getevent(uint16_t *); | |
122 | static void pnpbios_event_thread(void *); | 122 | static void pnpbios_event_thread(void *); | |
123 | static int pnpbios_sendmessage(int); | 123 | static int pnpbios_sendmessage(int); | |
124 | #endif | 124 | #endif | |
125 | 125 | |||
126 | /* configuration stuff */ | 126 | /* configuration stuff */ | |
127 | static void * pnpbios_mapit(paddr_t, u_long, int); | 127 | static void * pnpbios_mapit(paddr_t, u_long, int); | |
128 | static void * pnpbios_find(void); | 128 | static void * pnpbios_find(void); | |
129 | static int pnpbios_match(struct device *, | 129 | static int pnpbios_match(device_t, cfdata_t, void *); | |
130 | struct cfdata *, void *); | 130 | static void pnpbios_attach(device_t, device_t, void *); | |
131 | static void pnpbios_attach(struct device *, | |||
132 | struct device *, void *); | |||
133 | static void pnpbios_printres(struct pnpresources *); | 131 | static void pnpbios_printres(struct pnpresources *); | |
134 | static int pnpbios_print(void *aux, const char *); | 132 | static int pnpbios_print(void *aux, const char *); | |
135 | static void pnpbios_id_to_string(uint32_t, char *); | 133 | static void pnpbios_id_to_string(uint32_t, char *); | |
136 | static int pnpbios_attachnode(struct pnpbios_softc *, | 134 | static int pnpbios_attachnode(struct pnpbios_softc *, | |
137 | int, const uint8_t *, | 135 | int, const uint8_t *, | |
138 | size_t, int); | 136 | size_t, int); | |
139 | 137 | |||
140 | static int pnp_scan(const uint8_t **, size_t, | 138 | static int pnp_scan(const uint8_t **, size_t, | |
141 | struct pnpresources *, int); | 139 | struct pnpresources *, int); | |
142 | extern int pnpbioscall(int); | 140 | extern int pnpbioscall(int); | |
143 | 141 | |||
144 | static void pnpbios_enumerate(struct pnpbios_softc *); | 142 | static void pnpbios_enumerate(struct pnpbios_softc *); | |
145 | #ifdef PNPBIOSEVENTS | 143 | #ifdef PNPBIOSEVENTS | |
@@ -751,27 +749,27 @@ pnpbios_print(void *aux, const char *pnp | @@ -751,27 +749,27 @@ pnpbios_print(void *aux, const char *pnp | |||
751 | return (QUIET); | 749 | return (QUIET); | |
752 | 750 | |||
753 | aprint_normal(" index %d (%s", aa->idx, aa->primid); | 751 | aprint_normal(" index %d (%s", aa->idx, aa->primid); | |
754 | if (aa->resc->longname) | 752 | if (aa->resc->longname) | |
755 | aprint_normal(", %s", aa->resc->longname); | 753 | aprint_normal(", %s", aa->resc->longname); | |
756 | if (aa->idstr != aa->primid) | 754 | if (aa->idstr != aa->primid) | |
757 | aprint_normal(", attached as %s", aa->idstr); | 755 | aprint_normal(", attached as %s", aa->idstr); | |
758 | aprint_normal(")"); | 756 | aprint_normal(")"); | |
759 | 757 | |||
760 | return (0); | 758 | return (0); | |
761 | } | 759 | } | |
762 | 760 | |||
763 | void | 761 | void | |
764 | pnpbios_print_devres(struct device *dev, struct pnpbiosdev_attach_args *aa) | 762 | pnpbios_print_devres(device_t dev, struct pnpbiosdev_attach_args *aa) | |
765 | { | 763 | { | |
766 | 764 | |||
767 | aprint_normal_dev(dev, ""); | 765 | aprint_normal_dev(dev, ""); | |
768 | pnpbios_printres(aa->resc); | 766 | pnpbios_printres(aa->resc); | |
769 | aprint_normal("\n"); | 767 | aprint_normal("\n"); | |
770 | } | 768 | } | |
771 | 769 | |||
772 | static int | 770 | static int | |
773 | pnpbios_attachchild(struct pnpbios_softc *sc, | 771 | pnpbios_attachchild(struct pnpbios_softc *sc, | |
774 | struct pnpbiosdev_attach_args *aa, int matchonly) | 772 | struct pnpbiosdev_attach_args *aa, int matchonly) | |
775 | { | 773 | { | |
776 | int locs[PNPBIOSCF_NLOCS]; | 774 | int locs[PNPBIOSCF_NLOCS]; | |
777 | 775 |
--- src/sys/arch/i386/pnpbios/pnpbiosvar.h 2005/12/26 19:24:00 1.10
+++ src/sys/arch/i386/pnpbios/pnpbiosvar.h 2009/05/04 12:13:19 1.11
@@ -1,40 +1,42 @@ | @@ -1,40 +1,42 @@ | |||
1 | /* $NetBSD: pnpbiosvar.h,v 1.10 2005/12/26 19:24:00 perry Exp $ */ | 1 | /* $NetBSD: pnpbiosvar.h,v 1.11 2009/05/04 12:13:19 cegger 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 | * | |
15 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND | 15 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND | |
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/device.h> /* for device_t */ | |||
29 | ||||
28 | struct pnpbios_attach_args { | 30 | struct pnpbios_attach_args { | |
29 | isa_chipset_tag_t paa_ic; | 31 | isa_chipset_tag_t paa_ic; | |
30 | }; | 32 | }; | |
31 | 33 | |||
32 | int pnpbios_probe(void); | 34 | int pnpbios_probe(void); | |
33 | 35 | |||
34 | struct pnp_compatid { | 36 | struct pnp_compatid { | |
35 | char idstr[8]; | 37 | char idstr[8]; | |
36 | struct pnp_compatid *next; | 38 | struct pnp_compatid *next; | |
37 | }; | 39 | }; | |
38 | 40 | |||
39 | struct pnp_mem { | 41 | struct pnp_mem { | |
40 | SIMPLEQ_ENTRY(pnp_mem) next; | 42 | SIMPLEQ_ENTRY(pnp_mem) next; | |
@@ -86,14 +88,14 @@ struct pnpbiosdev_attach_args { | @@ -86,14 +88,14 @@ struct pnpbiosdev_attach_args { | |||
86 | 88 | |||
87 | int pnpbios_io_map(pnpbios_tag_t, struct pnpresources *, int, | 89 | int pnpbios_io_map(pnpbios_tag_t, struct pnpresources *, int, | |
88 | bus_space_tag_t *, bus_space_handle_t *); | 90 | bus_space_tag_t *, bus_space_handle_t *); | |
89 | void pnpbios_io_unmap(pnpbios_tag_t, struct pnpresources *, int, | 91 | void pnpbios_io_unmap(pnpbios_tag_t, struct pnpresources *, int, | |
90 | bus_space_tag_t, bus_space_handle_t); | 92 | bus_space_tag_t, bus_space_handle_t); | |
91 | void *pnpbios_intr_establish(pnpbios_tag_t, struct pnpresources *, int, | 93 | void *pnpbios_intr_establish(pnpbios_tag_t, struct pnpresources *, int, | |
92 | int, int (*)(void *), void *); | 94 | int, int (*)(void *), void *); | |
93 | 95 | |||
94 | int pnpbios_getiobase(pnpbios_tag_t, struct pnpresources *, int, | 96 | int pnpbios_getiobase(pnpbios_tag_t, struct pnpresources *, int, | |
95 | bus_space_tag_t *, int *); | 97 | bus_space_tag_t *, int *); | |
96 | int pnpbios_getiosize(pnpbios_tag_t, struct pnpresources *, int, int *); | 98 | int pnpbios_getiosize(pnpbios_tag_t, struct pnpresources *, int, int *); | |
97 | int pnpbios_getirqnum(pnpbios_tag_t, struct pnpresources *, int, int *, int *); | 99 | int pnpbios_getirqnum(pnpbios_tag_t, struct pnpresources *, int, int *, int *); | |
98 | int pnpbios_getdmachan(pnpbios_tag_t, struct pnpresources *, int, int *); | 100 | int pnpbios_getdmachan(pnpbios_tag_t, struct pnpresources *, int, int *); | |
99 | void pnpbios_print_devres(struct device *, struct pnpbiosdev_attach_args *); | 101 | void pnpbios_print_devres(device_t, struct pnpbiosdev_attach_args *); |
--- src/sys/arch/i386/pnpbios/ym_pnpbios.c 2008/04/04 22:18:05 1.14
+++ src/sys/arch/i386/pnpbios/ym_pnpbios.c 2009/05/04 12:13:19 1.15
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: ym_pnpbios.c,v 1.14 2008/04/04 22:18:05 cegger Exp $ */ | 1 | /* $NetBSD: ym_pnpbios.c,v 1.15 2009/05/04 12:13:19 cegger Exp $ */ | |
2 | /* | 2 | /* | |
3 | * Copyright (c) 1999 | 3 | * Copyright (c) 1999 | |
4 | * Matthias Drochner. All rights reserved. | 4 | * Matthias Drochner. All rights reserved. | |
5 | * Soren S. Jorvang. All rights reserved. | 5 | * Soren S. Jorvang. 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 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | |
20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
22 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 22 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
23 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 23 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
24 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 24 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
25 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 25 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
26 | * SUCH DAMAGE. | 26 | * SUCH DAMAGE. | |
27 | */ | 27 | */ | |
28 | 28 | |||
29 | #include <sys/cdefs.h> | 29 | #include <sys/cdefs.h> | |
30 | __KERNEL_RCSID(0, "$NetBSD: ym_pnpbios.c,v 1.14 2008/04/04 22:18:05 cegger Exp $"); | 30 | __KERNEL_RCSID(0, "$NetBSD: ym_pnpbios.c,v 1.15 2009/05/04 12:13:19 cegger Exp $"); | |
31 | 31 | |||
32 | #include "mpu_ym.h" | 32 | #include "mpu_ym.h" | |
33 | 33 | |||
34 | #include <sys/param.h> | 34 | #include <sys/param.h> | |
35 | #include <sys/systm.h> | 35 | #include <sys/systm.h> | |
36 | #include <sys/errno.h> | 36 | #include <sys/errno.h> | |
37 | #include <sys/ioctl.h> | 37 | #include <sys/ioctl.h> | |
38 | #include <sys/syslog.h> | 38 | #include <sys/syslog.h> | |
39 | #include <sys/device.h> | 39 | #include <sys/device.h> | |
40 | #include <sys/proc.h> | 40 | #include <sys/proc.h> | |
41 | 41 | |||
42 | #include <machine/bus.h> | 42 | #include <machine/bus.h> | |
43 | 43 | |||
@@ -51,49 +51,49 @@ __KERNEL_RCSID(0, "$NetBSD: ym_pnpbios.c | @@ -51,49 +51,49 @@ __KERNEL_RCSID(0, "$NetBSD: ym_pnpbios.c | |||
51 | 51 | |||
52 | #include <i386/pnpbios/pnpbiosvar.h> | 52 | #include <i386/pnpbios/pnpbiosvar.h> | |
53 | 53 | |||
54 | #include <dev/ic/ad1848reg.h> | 54 | #include <dev/ic/ad1848reg.h> | |
55 | #include <dev/isa/ad1848var.h> | 55 | #include <dev/isa/ad1848var.h> | |
56 | 56 | |||
57 | #include <dev/ic/cs4231reg.h> | 57 | #include <dev/ic/cs4231reg.h> | |
58 | #include <dev/isa/cs4231var.h> | 58 | #include <dev/isa/cs4231var.h> | |
59 | 59 | |||
60 | #include <dev/ic/opl3sa3reg.h> | 60 | #include <dev/ic/opl3sa3reg.h> | |
61 | #include <dev/isa/wssreg.h> | 61 | #include <dev/isa/wssreg.h> | |
62 | #include <dev/isa/ymvar.h> | 62 | #include <dev/isa/ymvar.h> | |
63 | 63 | |||
64 | int ym_pnpbios_match(struct device *, struct cfdata *, void *); | 64 | int ym_pnpbios_match(device_t, cfdata_t, void *); | |
65 | void ym_pnpbios_attach(struct device *, struct device *, void *); | 65 | void ym_pnpbios_attach(device_t, device_t, void *); | |
66 | 66 | |||
67 | CFATTACH_DECL(ym_pnpbios, sizeof(struct ym_softc), | 67 | CFATTACH_DECL(ym_pnpbios, sizeof(struct ym_softc), | |
68 | ym_pnpbios_match, ym_pnpbios_attach, NULL, NULL); | 68 | ym_pnpbios_match, ym_pnpbios_attach, NULL, NULL); | |
69 | 69 | |||
70 | int | 70 | int | |
71 | ym_pnpbios_match(struct device *parent, | 71 | ym_pnpbios_match(device_t parent, | |
72 | struct cfdata *match, void *aux) | 72 | cfdata_t match, void *aux) | |
73 | { | 73 | { | |
74 | struct pnpbiosdev_attach_args *aa = aux; | 74 | struct pnpbiosdev_attach_args *aa = aux; | |
75 | 75 | |||
76 | if (strcmp(aa->idstr, "YMH0021")) | 76 | if (strcmp(aa->idstr, "YMH0021")) | |
77 | return 0; | 77 | return 0; | |
78 | 78 | |||
79 | return 1; | 79 | return 1; | |
80 | } | 80 | } | |
81 | 81 | |||
82 | void | 82 | void | |
83 | ym_pnpbios_attach(struct device *parent, struct device *self, | 83 | ym_pnpbios_attach(device_t parent, device_t self, | |
84 | void *aux) | 84 | void *aux) | |
85 | { | 85 | { | |
86 | struct ym_softc *sc = (void *)self; | 86 | struct ym_softc *sc = device_private(self); | |
87 | struct ad1848_softc *ac = &sc->sc_ad1848.sc_ad1848; | 87 | struct ad1848_softc *ac = &sc->sc_ad1848.sc_ad1848; | |
88 | struct pnpbiosdev_attach_args *aa = aux; | 88 | struct pnpbiosdev_attach_args *aa = aux; | |
89 | 89 | |||
90 | if (pnpbios_io_map(aa->pbt, aa->resc, 0, | 90 | if (pnpbios_io_map(aa->pbt, aa->resc, 0, | |
91 | &sc->sc_iot, &sc->sc_sb_ioh) != 0) { | 91 | &sc->sc_iot, &sc->sc_sb_ioh) != 0) { | |
92 | printf(": can't map sb i/o space\n"); | 92 | printf(": can't map sb i/o space\n"); | |
93 | return; | 93 | return; | |
94 | } | 94 | } | |
95 | if (pnpbios_io_map(aa->pbt, aa->resc, 1, | 95 | if (pnpbios_io_map(aa->pbt, aa->resc, 1, | |
96 | &sc->sc_iot, &sc->sc_ioh) != 0) { | 96 | &sc->sc_iot, &sc->sc_ioh) != 0) { | |
97 | printf(": can't map sb i/o space\n"); | 97 | printf(": can't map sb i/o space\n"); | |
98 | return; | 98 | return; | |
99 | } | 99 | } |