2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
6 * identify.c: identify machine by looking up system identifier
8 * Copyright (C) 1998 Thomas Bogendoerfer
10 * This code is based on arch/mips/sgi/kernel/system.c, which is
12 * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
14 #include <linux/init.h>
15 #include <linux/kernel.h>
16 #include <linux/types.h>
17 #include <linux/string.h>
19 #include <asm/sgialib.h>
20 #include <asm/bootinfo.h>
29 static struct smatch mach_table
[] = {
31 .arcname
= "SGI-IP22",
33 .type
= MACH_SGI_IP22
,
34 .flags
= PROM_FLAG_ARCS
,
36 .arcname
= "SGI-IP27",
37 .liname
= "SGI Origin",
38 .type
= MACH_SGI_IP27
,
39 .flags
= PROM_FLAG_ARCS
,
41 .arcname
= "SGI-IP28",
43 .type
= MACH_SGI_IP28
,
44 .flags
= PROM_FLAG_ARCS
,
46 .arcname
= "SGI-IP30",
47 .liname
= "SGI Octane",
48 .type
= MACH_SGI_IP30
,
49 .flags
= PROM_FLAG_ARCS
,
51 .arcname
= "SGI-IP32",
53 .type
= MACH_SGI_IP32
,
54 .flags
= PROM_FLAG_ARCS
,
56 .arcname
= "Microsoft-Jazz",
57 .liname
= "Jazz MIPS_Magnum_4000",
58 .type
= MACH_MIPS_MAGNUM_4000
,
62 .liname
= "Jazz Acer_PICA_61",
63 .type
= MACH_ACER_PICA_61
,
66 .arcname
= "RM200PCI",
67 .liname
= "SNI RM200_PCI",
68 .type
= MACH_SNI_RM200_PCI
,
69 .flags
= PROM_FLAG_DONT_FREE_TEMP
,
75 static struct smatch
* __init
string_to_mach(const char *s
)
79 for (i
= 0; i
< ARRAY_SIZE(mach_table
); i
++) {
80 if (!strcmp(s
, mach_table
[i
].arcname
))
81 return &mach_table
[i
];
84 panic("Yeee, could not determine architecture type <%s>", s
);
89 const char *get_system_type(void)
94 void __init
prom_identify_arch(void)
101 * The root component tells us what machine architecture we have here.
103 p
= ArcGetChild(PROM_NULL_COMPONENT
);
105 #ifdef CONFIG_SGI_IP27
106 /* IP27 PROM misbehaves, seems to not implement ARC
107 GetChild(). So we just assume it's an IP27. */
113 iname
= (char *) (long) p
->iname
;
115 printk("ARCH: %s\n", iname
);
116 mach
= string_to_mach(iname
);
117 system_type
= mach
->liname
;
119 mips_machtype
= mach
->type
;
120 prom_flags
= mach
->flags
;