xref: /openbmc/linux/arch/sparc/include/asm/machines.h (revision b2441318)
1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
2a439fe51SSam Ravnborg /*
3a439fe51SSam Ravnborg  * machines.h:  Defines for taking apart the machine type value in the
4a439fe51SSam Ravnborg  *              idprom and determining the kind of machine we are on.
5a439fe51SSam Ravnborg  *
6a439fe51SSam Ravnborg  * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
7a439fe51SSam Ravnborg  */
8a439fe51SSam Ravnborg #ifndef _SPARC_MACHINES_H
9a439fe51SSam Ravnborg #define _SPARC_MACHINES_H
10a439fe51SSam Ravnborg 
11a439fe51SSam Ravnborg struct Sun_Machine_Models {
12a439fe51SSam Ravnborg 	char *name;
13a439fe51SSam Ravnborg 	unsigned char id_machtype;
14a439fe51SSam Ravnborg };
15a439fe51SSam Ravnborg 
16a439fe51SSam Ravnborg /* The machine type in the idprom area looks like this:
17a439fe51SSam Ravnborg  *
18a439fe51SSam Ravnborg  * ---------------
19a439fe51SSam Ravnborg  * | ARCH | MACH |
20a439fe51SSam Ravnborg  * ---------------
21a439fe51SSam Ravnborg  *  7    4 3    0
22a439fe51SSam Ravnborg  *
23ee906c9eSDavid S. Miller  * The ARCH field determines the architecture line (sun4m, etc).
24a439fe51SSam Ravnborg  * The MACH field determines the machine make within that architecture.
25a439fe51SSam Ravnborg  */
26a439fe51SSam Ravnborg 
27a439fe51SSam Ravnborg #define SM_ARCH_MASK  0xf0
280fd7ef1fSKonrad Eisele #define  M_LEON       0x30
29a439fe51SSam Ravnborg #define SM_SUN4M      0x70
30a439fe51SSam Ravnborg #define SM_SUN4M_OBP  0x80
31a439fe51SSam Ravnborg 
32a439fe51SSam Ravnborg #define SM_TYP_MASK   0x0f
33a439fe51SSam Ravnborg 
340fd7ef1fSKonrad Eisele /* Leon machines */
350fd7ef1fSKonrad Eisele #define M_LEON3_SOC   0x02    /* Leon3 SoC */
360fd7ef1fSKonrad Eisele 
37a439fe51SSam Ravnborg /* Sun4m machines, these predate the OpenBoot.  These values only mean
38a439fe51SSam Ravnborg  * something if the value in the ARCH field is SM_SUN4M, if it is
39a439fe51SSam Ravnborg  * SM_SUN4M_OBP then you have the following situation:
40a439fe51SSam Ravnborg  * 1) You either have a sun4d, a sun4e, or a recently made sun4m.
41a439fe51SSam Ravnborg  * 2) You have to consult OpenBoot to determine which machine this is.
42a439fe51SSam Ravnborg  */
43a439fe51SSam Ravnborg #define SM_4M_SS60    0x01    /* Sun4m SparcSystem 600                  */
44a439fe51SSam Ravnborg #define SM_4M_SS50    0x02    /* Sun4m SparcStation 10                  */
45a439fe51SSam Ravnborg #define SM_4M_SS40    0x03    /* Sun4m SparcStation 5                   */
46a439fe51SSam Ravnborg 
47a439fe51SSam Ravnborg /* Sun4d machines -- N/A */
48a439fe51SSam Ravnborg /* Sun4e machines -- N/A */
49a439fe51SSam Ravnborg /* Sun4u machines -- N/A */
50a439fe51SSam Ravnborg 
51a439fe51SSam Ravnborg #endif /* !(_SPARC_MACHINES_H) */
52