| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: cia.c,v 1.73 2012/02/06 02:14:14 matt Exp $ */ | | 1 | /* $NetBSD: cia.c,v 1.74 2015/10/11 08:46:43 martin Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 1998, 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 Jason R. Thorpe of the Numerical Aerospace Simulation Facility, | | 8 | * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, |
9 | * NASA Ames Research Center. | | 9 | * NASA Ames Research Center. |
10 | * | | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | | 11 | * Redistribution and use in source and binary forms, with or without |
12 | * modification, are permitted provided that the following conditions | | 12 | * modification, are permitted provided that the following conditions |
13 | * are met: | | 13 | * are met: |
14 | * 1. Redistributions of source code must retain the above copyright | | 14 | * 1. Redistributions of source code must retain the above copyright |
| @@ -55,27 +55,27 @@ | | | @@ -55,27 +55,27 @@ |
55 | * | | 55 | * |
56 | * any improvements or extensions that they make and grant Carnegie the | | 56 | * any improvements or extensions that they make and grant Carnegie the |
57 | * rights to redistribute these changes. | | 57 | * rights to redistribute these changes. |
58 | */ | | 58 | */ |
59 | | | 59 | |
60 | #include "opt_dec_eb164.h" | | 60 | #include "opt_dec_eb164.h" |
61 | #include "opt_dec_kn20aa.h" | | 61 | #include "opt_dec_kn20aa.h" |
62 | #include "opt_dec_550.h" | | 62 | #include "opt_dec_550.h" |
63 | #include "opt_dec_1000a.h" | | 63 | #include "opt_dec_1000a.h" |
64 | #include "opt_dec_1000.h" | | 64 | #include "opt_dec_1000.h" |
65 | | | 65 | |
66 | #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ | | 66 | #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ |
67 | | | 67 | |
68 | __KERNEL_RCSID(0, "$NetBSD: cia.c,v 1.73 2012/02/06 02:14:14 matt Exp $"); | | 68 | __KERNEL_RCSID(0, "$NetBSD: cia.c,v 1.74 2015/10/11 08:46:43 martin Exp $"); |
69 | | | 69 | |
70 | #include <sys/param.h> | | 70 | #include <sys/param.h> |
71 | #include <sys/systm.h> | | 71 | #include <sys/systm.h> |
72 | #include <sys/kernel.h> | | 72 | #include <sys/kernel.h> |
73 | #include <sys/malloc.h> | | 73 | #include <sys/malloc.h> |
74 | #include <sys/device.h> | | 74 | #include <sys/device.h> |
75 | | | 75 | |
76 | #include <machine/autoconf.h> | | 76 | #include <machine/autoconf.h> |
77 | #include <machine/rpb.h> | | 77 | #include <machine/rpb.h> |
78 | #include <machine/sysarch.h> | | 78 | #include <machine/sysarch.h> |
79 | #include <machine/alpha.h> | | 79 | #include <machine/alpha.h> |
80 | | | 80 | |
81 | #include <dev/isa/isareg.h> | | 81 | #include <dev/isa/isareg.h> |
| @@ -258,50 +258,47 @@ cia_init(struct cia_config *ccp, int mal | | | @@ -258,50 +258,47 @@ cia_init(struct cia_config *ccp, int mal |
258 | alpha_pci_chipset = &ccp->cc_pc; | | 258 | alpha_pci_chipset = &ccp->cc_pc; |
259 | | | 259 | |
260 | ccp->cc_initted = 1; | | 260 | ccp->cc_initted = 1; |
261 | } | | 261 | } |
262 | | | 262 | |
263 | void | | 263 | void |
264 | ciaattach(device_t parent, device_t self, void *aux) | | 264 | ciaattach(device_t parent, device_t self, void *aux) |
265 | { | | 265 | { |
266 | struct cia_softc *sc = device_private(self); | | 266 | struct cia_softc *sc = device_private(self); |
267 | struct cia_config *ccp; | | 267 | struct cia_config *ccp; |
268 | struct pcibus_attach_args pba; | | 268 | struct pcibus_attach_args pba; |
269 | char bits[64]; | | 269 | char bits[64]; |
270 | const char *name; | | 270 | const char *name; |
271 | int pass; | | | |
272 | | | 271 | |
273 | /* note that we've attached the chipset; can't have 2 CIAs. */ | | 272 | /* note that we've attached the chipset; can't have 2 CIAs. */ |
274 | ciafound = 1; | | 273 | ciafound = 1; |
275 | sc->sc_dev = self; | | 274 | sc->sc_dev = self; |
276 | | | 275 | |
277 | /* | | 276 | /* |
278 | * set up the chipset's info; done once at console init time | | 277 | * set up the chipset's info; done once at console init time |
279 | * (maybe), but we must do it here as well to take care of things | | 278 | * (maybe), but we must do it here as well to take care of things |
280 | * that need to use memory allocation. | | 279 | * that need to use memory allocation. |
281 | */ | | 280 | */ |
282 | ccp = sc->sc_ccp = &cia_configuration; | | 281 | ccp = sc->sc_ccp = &cia_configuration; |
283 | cia_init(ccp, 1); | | 282 | cia_init(ccp, 1); |
284 | | | 283 | |
285 | if (ccp->cc_flags & CCF_ISPYXIS) { | | 284 | if (ccp->cc_flags & CCF_ISPYXIS) { |
286 | name = "Pyxis"; | | 285 | name = "Pyxis"; |
287 | pass = ccp->cc_rev; | | | |
288 | } else { | | 286 | } else { |
289 | name = "ALCOR/ALCOR2"; | | 287 | name = "ALCOR/ALCOR2"; |
290 | pass = ccp->cc_rev + 1; | | | |
291 | } | | 288 | } |
292 | | | 289 | |
293 | aprint_normal(": DECchip 2117x Core Logic Chipset (%s), pass %d\n", | | 290 | aprint_normal(": DECchip 2117x Core Logic Chipset (%s), pass %d\n", |
294 | name, pass); | | 291 | name, ccp->cc_rev + 1); |
295 | if (ccp->cc_cnfg) { | | 292 | if (ccp->cc_cnfg) { |
296 | snprintb(bits, sizeof(bits), CIA_CSR_CNFG_BITS, ccp->cc_cnfg); | | 293 | snprintb(bits, sizeof(bits), CIA_CSR_CNFG_BITS, ccp->cc_cnfg); |
297 | aprint_normal_dev(self, "extended capabilities: %s\n", bits); | | 294 | aprint_normal_dev(self, "extended capabilities: %s\n", bits); |
298 | } | | 295 | } |
299 | | | 296 | |
300 | switch (ccp->cc_flags & (CCF_PCI_USE_BWX|CCF_BUS_USE_BWX)) { | | 297 | switch (ccp->cc_flags & (CCF_PCI_USE_BWX|CCF_BUS_USE_BWX)) { |
301 | case CCF_PCI_USE_BWX|CCF_BUS_USE_BWX: | | 298 | case CCF_PCI_USE_BWX|CCF_BUS_USE_BWX: |
302 | name = "PCI config and bus"; | | 299 | name = "PCI config and bus"; |
303 | break; | | 300 | break; |
304 | case CCF_PCI_USE_BWX: | | 301 | case CCF_PCI_USE_BWX: |
305 | name = "PCI config"; | | 302 | name = "PCI config"; |
306 | break; | | 303 | break; |
307 | case CCF_BUS_USE_BWX: | | 304 | case CCF_BUS_USE_BWX: |