patch-2.4.19 linux-2.4.19/arch/mips/hp-lj/asic.c
Next file: linux-2.4.19/arch/mips/hp-lj/gdb_hook.c
Previous file: linux-2.4.19/arch/mips/hp-lj/Makefile
Back to the patch index
Back to the overall index
-  Lines: 29
-  Date:
Fri Aug  2 17:39:43 2002
-  Orig file: 
linux-2.4.18/arch/mips/hp-lj/asic.c
-  Orig date: 
Wed Dec 31 16:00:00 1969
diff -urN linux-2.4.18/arch/mips/hp-lj/asic.c linux-2.4.19/arch/mips/hp-lj/asic.c
@@ -0,0 +1,28 @@
+
+
+#include "asm/hp-lj/asic.h"
+
+AsicId GetAsicId(void)
+{
+   static int asic = IllegalAsic;
+
+   if (asic == IllegalAsic) {
+      if (*(unsigned int *)0xbff70000 == 0x1114103c)
+         asic = HarmonyAsic;
+      else if (*(unsigned int *)0xbff80000 == 0x110d103c)
+         asic = AndrosAsic;
+      else
+	 asic = UnknownAsic;
+   }
+   return asic;
+}
+
+
+const char* const GetAsicName(void)
+{
+   static const char* const Names[] = 
+        { "Illegal", "Unknown", "Andros", "Harmony" };
+
+   return Names[(int)GetAsicId()];
+}
+
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)