]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/alpha/alpha/dec_3000_500.c
Next phase in the PCI subsystem cleanup.
[FreeBSD/FreeBSD.git] / sys / alpha / alpha / dec_3000_500.c
1 /* $FreeBSD$ */
2 /*
3  * Copyright (c) 1997 by Matthew Jacob
4  * NASA AMES Research Center.
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  * 1. Redistributions of source code must retain the above copyright
11  *    notice immediately at the beginning of the file, without modification,
12  *    this list of conditions, and the following disclaimer.
13  * 2. Redistributions in binary form must reproduce the above copyright
14  *    notice, this list of conditions and the following disclaimer in the
15  *    documentation and/or other materials provided with the distribution.
16  * 3. The name of the author may not be used to endorse or promote products
17  *    derived from this software without specific prior written permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
20  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
23  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29  * SUCH DAMAGE.
30  */
31
32 #include "opt_cpu.h"
33
34 #include <sys/param.h>
35 #include <sys/systm.h>
36 #include <sys/termios.h>
37 #include <sys/bus.h>
38
39 #include <machine/rpb.h>
40 #include <machine/cpuconf.h>
41
42 #include <alpha/tlsb/tlsbreg.h>
43 #include <alpha/tlsb/gbusreg.h>
44 #include <alpha/tlsb/zsvar.h>
45
46 void dec_3000_500_init(int);
47 static void dec_3000_500_cons_init(void);
48
49 static const char dec_3000_500_sp[] = "DEC 3000/400 (\"Sandpiper\")";
50 static const char dec_3000_500_sf[] = "DEC 3000/500 (\"Flamingo\")";
51
52 const struct alpha_variation_table dec_3000_500_variations[] = {
53         { SV_ST_SANDPIPER, dec_3000_500_sp },
54         { SV_ST_FLAMINGO, dec_3000_500_sf },
55         { SV_ST_HOTPINK, "DEC 3000/500X (\"Hot Pink\")" },
56         { SV_ST_FLAMINGOPLUS, "DEC 3000/800 (\"Flamingo+\")" },
57         { SV_ST_SANDPLUS, "DEC 3000/600 (\"Sandpiper+\")" },
58         { SV_ST_SANDPIPER45, "DEC 3000/700 (\"Sandpiper45\")" },
59         { SV_ST_FLAMINGO45, "DEC 3000/900 (\"Flamingo45\")" },
60         { 0, NULL },
61 };
62
63 void
64 dec_3000_500_init(int cputype)
65 {
66         u_int64_t variation;
67
68         platform.family = "DEC 3000/500 (\"Flamingo\")";
69
70         if ((platform.model = alpha_dsr_sysname()) == NULL) {
71                 variation = hwrpb->rpb_variation & SV_ST_MASK;
72                 if (variation == SV_ST_ULTRA) {
73                         /* These are really the same. */
74                         variation = SV_ST_FLAMINGOPLUS;
75                 }
76                 if ((platform.model = alpha_variation_name(variation,
77                     dec_3000_500_variations)) == NULL) {
78                         /*
79                          * This is how things used to be done.
80                          */
81                         if (variation == SV_ST_RESERVED) {
82                                 if (hwrpb->rpb_variation & SV_GRAPHICS)
83                                         platform.model = dec_3000_500_sf;
84                                 else
85                                         platform.model = dec_3000_500_sp;
86                         } else
87                                 platform.model = alpha_unknown_sysname();
88                 }
89         }
90
91         platform.iobus = "tcasic";
92         platform.cons_init = dec_3000_500_cons_init;
93 }
94
95 /*
96  * dec_3000_500_cons_init- not needed right now.
97  *
98  */
99 static void
100 dec_3000_500_cons_init(void)
101 {
102
103         return;
104 }