patch-2.4.19 linux-2.4.19/arch/mips64/arc/identify.c
Next file: linux-2.4.19/arch/mips64/arc/init.c
Previous file: linux-2.4.19/arch/mips64/arc/arc_con.c
Back to the patch index
Back to the overall index
- Lines: 99
- Date:
Fri Aug 2 17:39:43 2002
- Orig file:
linux-2.4.18/arch/mips64/arc/identify.c
- Orig date:
Wed Jul 4 11:50:39 2001
diff -urN linux-2.4.18/arch/mips64/arc/identify.c linux-2.4.19/arch/mips64/arc/identify.c
@@ -21,38 +21,75 @@
#include <asm/bootinfo.h>
struct smatch {
- char *name;
+ char *arcname;
+ char *liname;
int group;
int type;
int flags;
};
static struct smatch mach_table[] = {
- { "SGI-IP22", MACH_GROUP_SGI, MACH_SGI_INDY, PROM_FLAG_ARCS },
- { "SGI-IP27", MACH_GROUP_SGI, MACH_SGI_IP27, PROM_FLAG_ARCS },
- { "Microsoft-Jazz", MACH_GROUP_JAZZ, MACH_MIPS_MAGNUM_4000, 0 },
- { "PICA-61", MACH_GROUP_JAZZ, MACH_ACER_PICA_61, 0 },
- { "RM200PCI", MACH_GROUP_SNI_RM, MACH_SNI_RM200_PCI, 0 }
+ { "SGI-IP22",
+ "SGI Indy",
+ MACH_GROUP_SGI,
+ MACH_SGI_INDY,
+ PROM_FLAG_ARCS
+ }, { "SGI-IP27",
+ "SGI Origin",
+ MACH_GROUP_SGI,
+ MACH_SGI_IP27,
+ PROM_FLAG_ARCS
+ }, { "SGI-IP28",
+ "SGI IP28",
+ MACH_GROUP_SGI,
+ MACH_SGI_IP28,
+ PROM_FLAG_ARCS
+ }, { "SGI-IP32",
+ "SGI IP32",
+ MACH_GROUP_SGI,
+ MACH_SGI_IP32,
+ PROM_FLAG_ARCS
+ }, { "Microsoft-Jazz",
+ "Jazz MIPS_Magnum_4000",
+ MACH_GROUP_JAZZ,
+ MACH_MIPS_MAGNUM_4000,
+ 0
+ }, { "PICA-61",
+ "Jazz Acer_PICA_61",
+ MACH_GROUP_JAZZ,
+ MACH_ACER_PICA_61,
+ 0
+ }, { "RM200PCI",
+ "SNI RM200_PCI",
+ MACH_GROUP_SNI_RM,
+ MACH_SNI_RM200_PCI,
+ 0
+ }
};
int prom_flags;
-static struct smatch * __init
-string_to_mach(const char *s)
+static struct smatch * __init string_to_mach(const char *s)
{
int i;
for (i = 0; i < (sizeof (mach_table) / sizeof (mach_table[0])); i++) {
- if(!strcmp(s, mach_table[i].name))
+ if(!strcmp(s, mach_table[i].arcname))
return &mach_table[i];
}
- panic("\nYeee, could not determine architecture type <%s>", s);
+ panic("Yeee, could not determine architecture type <%s>", s);
return NULL;
}
-void __init
-prom_identify_arch(void)
+char *system_type;
+
+const char *get_system_type(void)
+{
+ return system_type;
+}
+
+void __init prom_identify_arch(void)
{
pcomponent *p;
struct smatch *mach;
@@ -70,8 +107,9 @@
} else
iname = (char *) (long) p->iname;
- printk("ARCH: %s\n", iname);
+ printk(KERN_INFO "ARCH: %s\n", iname);
mach = string_to_mach(iname);
+ system_type = mach->liname;
mips_machgroup = mach->group;
mips_machtype = mach->type;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)