| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: tc_vsbus.c,v 1.8 2017/06/09 17:55:18 flxd Exp $ */ | | 1 | /* $NetBSD: tc_vsbus.c,v 1.9 2017/06/09 18:02:40 flxd Exp $ */ |
2 | /*- | | 2 | /*- |
3 | * Copyright (c) 2008 The NetBSD Foundation, Inc. | | 3 | * Copyright (c) 2008 The NetBSD Foundation, Inc. |
4 | * All rights reserved. | | 4 | * All rights reserved. |
5 | * | | 5 | * |
6 | * This code is derived from software contributed to The NetBSD Foundation | | 6 | * This code is derived from software contributed to The NetBSD Foundation |
7 | * by Matt Thomas <matt@3am-software.com>. | | 7 | * by Matt Thomas <matt@3am-software.com>. |
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 |
| @@ -19,27 +19,27 @@ | | | @@ -19,27 +19,27 @@ |
19 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | | 19 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
20 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | | 20 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
21 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | | 21 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS |
22 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | | 22 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | | 23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | | 24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | | 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | | 26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | | 27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
28 | * POSSIBILITY OF SUCH DAMAGE. | | 28 | * POSSIBILITY OF SUCH DAMAGE. |
29 | */ | | 29 | */ |
30 | | | 30 | |
31 | #include <sys/cdefs.h> | | 31 | #include <sys/cdefs.h> |
32 | __KERNEL_RCSID(0, "$NetBSD: tc_vsbus.c,v 1.8 2017/06/09 17:55:18 flxd Exp $"); | | 32 | __KERNEL_RCSID(0, "$NetBSD: tc_vsbus.c,v 1.9 2017/06/09 18:02:40 flxd Exp $"); |
33 | | | 33 | |
34 | #include <sys/param.h> | | 34 | #include <sys/param.h> |
35 | #include <sys/bus.h> | | 35 | #include <sys/bus.h> |
36 | #include <sys/cpu.h> | | 36 | #include <sys/cpu.h> |
37 | #include <sys/device.h> | | 37 | #include <sys/device.h> |
38 | | | 38 | |
39 | #include <machine/cpu.h> | | 39 | #include <machine/cpu.h> |
40 | #include <machine/pte.h> | | 40 | #include <machine/pte.h> |
41 | #include <machine/scb.h> | | 41 | #include <machine/scb.h> |
42 | #include <machine/sid.h> | | 42 | #include <machine/sid.h> |
43 | #include <machine/vsbus.h> | | 43 | #include <machine/vsbus.h> |
44 | | | 44 | |
45 | #include <dev/tc/tcvar.h> | | 45 | #include <dev/tc/tcvar.h> |
| @@ -146,30 +146,30 @@ tc_vsbus_match(device_t parent, cfdata_t | | | @@ -146,30 +146,30 @@ tc_vsbus_match(device_t parent, cfdata_t |
146 | int found, rc; | | 146 | int found, rc; |
147 | | | 147 | |
148 | if (va->va_paddr != KA4x_TCA_CSR) | | 148 | if (va->va_paddr != KA4x_TCA_CSR) |
149 | return 0; | | 149 | return 0; |
150 | | | 150 | |
151 | /* Bus adaptor present? */ | | 151 | /* Bus adaptor present? */ |
152 | switch (vax_boardtype) { | | 152 | switch (vax_boardtype) { |
153 | case VAX_BTYP_46: | | 153 | case VAX_BTYP_46: |
154 | if (bus_space_map(bst, KA46_BWF0, KA46_BWF0_SZ, 0, &bsh)) | | 154 | if (bus_space_map(bst, KA46_BWF0, KA46_BWF0_SZ, 0, &bsh)) |
155 | return 0; | | 155 | return 0; |
156 | found = ((bus_space_read_4(bst, bsh, 0) & KA46_BWF0_ADP) != 0); | | 156 | found = ((bus_space_read_4(bst, bsh, 0) & KA46_BWF0_ADP) != 0); |
157 | bus_space_unmap(bst, bsh, KA46_BWF0_SZ); | | 157 | bus_space_unmap(bst, bsh, KA46_BWF0_SZ); |
158 | /* | | 158 | /* |
159 | * On VS4000/60, although interrupting on a real vector, fool | | 159 | * On VS4000/60, although interrupting on a real vector, fool |
160 | * vsbus interrupt, as no interrupt bit will be set in | | 160 | * vsbus interrupt, as no interrupt bit will be set in |
161 | * vsbus_softc's sc_intreq for TC adaptor. | | 161 | * vsbus_softc's sc_intreq for TC adaptor. |
162 | */ | | 162 | */ |
163 | rc = 20; | | 163 | rc = 20; |
164 | break; | | 164 | break; |
165 | case VAX_BTYP_49: | | 165 | case VAX_BTYP_49: |
166 | if (bus_space_map(bst, KA49_CFG, KA49_CFG_SZ, 0, &bsh)) | | 166 | if (bus_space_map(bst, KA49_CFG, KA49_CFG_SZ, 0, &bsh)) |
167 | return 0; | | 167 | return 0; |
168 | found = ((bus_space_read_2(bst, bsh, 0) & KA49_CFG_BA) != 0); | | 168 | found = ((bus_space_read_2(bst, bsh, 0) & KA49_CFG_BA) != 0); |
169 | bus_space_unmap(bst, bsh, KA49_CFG_SZ); | | 169 | bus_space_unmap(bst, bsh, KA49_CFG_SZ); |
170 | rc = 10; | | 170 | rc = 10; |
171 | break; | | 171 | break; |
172 | default: | | 172 | default: |
173 | return 0; | | 173 | return 0; |
174 | } | | 174 | } |
175 | if (!found) | | 175 | if (!found) |