Update of /cvsroot/linuxconsole/ruby/linux/arch/mips/sgi/kernel
In directory usw-pr-cvs1:/tmp/cvs-serv25708/linux/arch/mips/sgi/kernel
Modified Files:
setup.c
Log Message:
Synced to 2.4.10
Index: setup.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/arch/mips/sgi/kernel/setup.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- setup.c 2001/05/12 22:02:08 1.5
+++ setup.c 2001/10/06 16:11:12 1.6
@@ -23,6 +23,7 @@
#include <asm/sgi/sgimc.h>
#include <asm/sgi/sgihpc.h>
#include <asm/sgi/sgint23.h>
+#include <asm/time.h>
#include <asm/gdb-stub.h>
#ifdef CONFIG_REMOTE_DEBUG
@@ -31,7 +32,7 @@
static int remote_debug = 0;
#endif
-#if defined(CONFIG_SERIAL_CONSOLE) || defined(CONFIG_SGI_PROM_CONSOLE)
+#if defined(CONFIG_SERIAL_CONSOLE) || defined(CONFIG_ARC_CONSOLE)
extern void console_setup(char *);
#endif
@@ -116,28 +117,6 @@
sgi_read_status
};
-static void __init sgi_irq_setup(void)
-{
- sgint_init();
-
-#ifdef CONFIG_REMOTE_DEBUG
- if (remote_debug)
- set_debug_traps();
- breakpoint(); /* you may move this line to whereever you want :-) */
-#endif
-}
-
-int __init page_is_ram(unsigned long pagenr)
-{
- if ((pagenr<<PAGE_SHIFT) < 0x2000UL)
- return 1;
- if ((pagenr<<PAGE_SHIFT) > 0x08002000)
- return 1;
- return 0;
-}
-
-void (*board_time_init)(struct irqaction *irq);
-
static unsigned long dosample(volatile unsigned char *tcwp,
volatile unsigned char *tc2p)
{
@@ -160,14 +139,16 @@
ct1 = read_32bit_cp0_register(CP0_COUNT);
} while(msb);
- /* Stop the counter. */
- *tcwp = (SGINT_TCWORD_CNT2 | SGINT_TCWORD_CALL | SGINT_TCWORD_MSWST);
+ /* Stop the counter. */
+ *tcwp = (SGINT_TCWORD_CNT2 | SGINT_TCWORD_CALL | SGINT_TCWORD_MSWST);
- /* Return the difference, this is how far the r4k counter increments
- * for every 1/HZ seconds. We round off the nearest 1 MHz of
- * master clock (= 1000000 / 100 / 2 = 5000 count).
- */
- return ((ct1 - ct0) / 5000) * 5000;
+ /*
+ * Return the difference, this is how far the r4k counter increments
+ * for every 1/HZ seconds. We round off the nearest 1 MHz of master
+ * clock (= 1000000 / 100 / 2 = 5000 count).
+ */
+
+ return ((ct1 - ct0) / 5000) * 5000;
}
#define ALLINTS (IE_IRQ0 | IE_IRQ1 | IE_IRQ2 | IE_IRQ3 | IE_IRQ4 | IE_IRQ5)
@@ -179,7 +160,7 @@
*/
struct sgi_ioc_timers *p;
volatile unsigned char *tcwp, *tc2p;
- unsigned long r4k_ticks[3] = { 0, 0, 0 };
+ unsigned long r4k_ticks[3];
unsigned long r4k_next;
/* Figure out the r4k offset, the algorithm is very simple
@@ -200,10 +181,12 @@
dosample(tcwp, tc2p); /* Prime cache. */
dosample(tcwp, tc2p); /* Prime cache. */
/* Zero is NOT an option. */
- while (!r4k_ticks[0])
+ do {
r4k_ticks[0] = dosample (tcwp, tc2p);
- while (!r4k_ticks[1])
+ } while (!r4k_ticks[0]);
+ do {
r4k_ticks[1] = dosample (tcwp, tc2p);
+ } while (!r4k_ticks[1]);
if (r4k_ticks[0] != r4k_ticks[1]) {
printk ("warning: timer counts differ, retrying...");
@@ -225,7 +208,7 @@
/* Set ourselves up for future interrupts */
r4k_next = (read_32bit_cp0_register(CP0_COUNT) + r4k_interval);
write_32bit_cp0_register(CP0_COMPARE, r4k_next);
- set_cp0_status(ST0_IM, ALLINTS);
+ change_cp0_status(ST0_IM, ALLINTS);
sti ();
}
@@ -238,8 +221,6 @@
char *kgdb_ttyd;
#endif
-
- irq_setup = sgi_irq_setup;
board_time_init = sgi_time_init;
/* Init the INDY HPC I/O controller. Need to call this before
@@ -281,7 +262,7 @@
line ? 1 : 2);
rs_kgdb_hook(line);
- prom_printf("KGDB: Using serial line /dev/ttyd%d for session, "
+ printk("KGDB: Using serial line /dev/ttyd%d for session, "
"please connect your debugger\n", line ? 1 : 2);
remote_debug = 1;
@@ -289,7 +270,7 @@
}
#endif
-#ifdef CONFIG_SGI_PROM_CONSOLE
+#ifdef CONFIG_ARC_CONSOLE
console_setup("ttyS0");
#endif
@@ -320,5 +301,4 @@
#ifdef CONFIG_VIDEO_VINO
init_vino();
#endif
-
}
|