Update of /cvsroot/linux-mips/linux/arch/mips/sgi-ip22
In directory usw-pr-cvs1:/tmp/cvs-serv3535/arch/mips/sgi-ip22
Modified Files:
ip22-hpc.c
Log Message:
More OSS syncing..
Index: ip22-hpc.c
===================================================================
RCS file: /cvsroot/linux-mips/linux/arch/mips/sgi-ip22/ip22-hpc.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- ip22-hpc.c 12 Dec 2001 18:30:53 -0000 1.2
+++ ip22-hpc.c 21 Apr 2002 20:01:13 -0000 1.3
@@ -13,13 +13,17 @@
#include <asm/sgialib.h>
#include <asm/bootinfo.h>
-/* #define DEBUG_SGIHPC */
+#if 0
+#define HPC_DEBUG(args...) printk(args)
+#else
+#define HPC_DEBUG(args...)
+#endif
struct hpc3_regs *hpc3c0, *hpc3c1;
struct hpc3_miscregs *hpc3mregs;
/* We need software copies of these because they are write only. */
-unsigned int sgi_hpc_write1, sgi_hpc_write2;
+u32 sgi_hpc_write1, sgi_hpc_write2;
/* Machine specific identifier knobs. */
int sgi_has_ioc2 = 0;
@@ -30,7 +34,7 @@
void __init sgihpc_init(void)
{
- unsigned long sid, crev, brev;
+ unsigned int sid, crev, brev;
hpc3c0 = (struct hpc3_regs *) (KSEG1 + HPC3_CHIP0_PBASE);
hpc3c1 = (struct hpc3_regs *) (KSEG1 + HPC3_CHIP1_PBASE);
@@ -41,64 +45,43 @@
crev = (sid & 0xe0) >> 5;
brev = (sid & 0x1e) >> 1;
-#ifdef DEBUG_SGIHPC
- prom_printf("sgihpc_init: crev<%2x> brev<%2x>\n", crev, brev);
- prom_printf("sgihpc_init: ");
-#endif
+ HPC_DEBUG("sgihpc_init: crev<%2x> brev<%2x>\n", crev, brev);
+ HPC_DEBUG("sgihpc_init: ");
/* This test works now thanks to William J. Earl */
if ((sid & 1) == 0 ) {
-#ifdef DEBUG_SGIHPC
- prom_printf("GUINESS ");
-#endif
+ HPC_DEBUG("GUINESS ");
sgi_guiness = 1;
mips_machtype = MACH_SGI_INDY;
- strcat(system_type, "Indy");
+ system_type = "SGI Indy";
} else {
-#ifdef DEBUG_SGIHPC
- prom_printf("FULLHOUSE ");
-#endif
+ HPC_DEBUG("FULLHOUSE ");
mips_machtype = MACH_SGI_INDIGO2;
sgi_guiness = 0;
- strcat(system_type, "Indigo2");
+ system_type = "SGI Indigo2";
}
sgi_boardid = brev;
-#ifdef DEBUG_SGIHPC
- prom_printf("sgi_boardid<%d> ", sgi_boardid);
-#endif
+ HPC_DEBUG("sgi_boardid<%d> ", sgi_boardid);
if(crev == 1) {
if((sid & 1) || (brev >= 2)) {
-#ifdef DEBUG_SGIHPC
- prom_printf("IOC2 ");
-#endif
+ HPC_DEBUG("IOC2 ");
sgi_has_ioc2 = 1;
} else {
-#ifdef DEBUG_SGIHPC
- prom_printf("IOC1 revision 1 ");
-#endif
+ HPC_DEBUG("IOC1 revision 1 ");
}
} else {
-#ifdef DEBUG_SGIHPC
- prom_printf("IOC1 revision 0 ");
-#endif
+ HPC_DEBUG("IOC1 revision 0 ");
}
-#ifdef DEBUG_SGIHPC
- prom_printf("\n");
-#endif
+ HPC_DEBUG("\n");
- sgi_hpc_write1 = (HPC3_WRITE1_PRESET |
- HPC3_WRITE1_KMRESET |
- HPC3_WRITE1_ERESET |
- HPC3_WRITE1_LC0OFF);
+ sgi_hpc_write1 = (HPC3_WRITE1_PRESET | HPC3_WRITE1_KMRESET |
+ HPC3_WRITE1_ERESET | HPC3_WRITE1_LC0OFF);
- sgi_hpc_write2 = (HPC3_WRITE2_EASEL |
- HPC3_WRITE2_NTHRESH |
- HPC3_WRITE2_TPSPEED |
- HPC3_WRITE2_EPSEL |
- HPC3_WRITE2_U0AMODE |
- HPC3_WRITE2_U1AMODE);
+ sgi_hpc_write2 = (HPC3_WRITE2_EASEL | HPC3_WRITE2_NTHRESH |
+ HPC3_WRITE2_TPSPEED | HPC3_WRITE2_EPSEL |
+ HPC3_WRITE2_U0AMODE | HPC3_WRITE2_U1AMODE);
if(!sgi_guiness)
sgi_hpc_write1 |= HPC3_WRITE1_GRESET;
|