1 2 3 #include "asm/hp-lj/asic.h" 4 GetAsicId(void)5AsicId GetAsicId(void) 6 { 7 static int asic = IllegalAsic; 8 9 if (asic == IllegalAsic) { 10 if (*(unsigned int *)0xbff70000 == 0x1114103c) 11 asic = HarmonyAsic; 12 else if (*(unsigned int *)0xbff80000 == 0x110d103c) 13 asic = AndrosAsic; 14 else 15 asic = UnknownAsic; 16 } 17 return asic; 18 } 19 20 GetAsicName(void)21const char* const GetAsicName(void) 22 { 23 static const char* const Names[] = 24 { "Illegal", "Unknown", "Andros", "Harmony" }; 25 26 return Names[(int)GetAsicId()]; 27 } 28 29