patch-2.4.22 linux-2.4.22/arch/mips/cobalt/setup.c
Next file: linux-2.4.22/arch/mips/cobalt/via.c
Previous file: linux-2.4.22/arch/mips/cobalt/reset.c
Back to the patch index
Back to the overall index
- Lines: 76
- Date:
2003-08-25 04:44:39.000000000 -0700
- Orig file:
linux-2.4.21/arch/mips/cobalt/setup.c
- Orig date:
2002-11-28 15:53:09.000000000 -0800
diff -urN linux-2.4.21/arch/mips/cobalt/setup.c linux-2.4.22/arch/mips/cobalt/setup.c
@@ -6,7 +6,7 @@
* for more details.
*
* Copyright (C) 1996, 1997 by Ralf Baechle
- * Copyright (C) 2001 by Liam Davies (ldavies@agile.tv)
+ * Copyright (C) 2001, 2002, 2003 by Liam Davies (ldavies@agile.tv)
*
*/
@@ -21,11 +21,11 @@
#include <asm/time.h>
#include <asm/io.h>
#include <asm/irq.h>
-#include <asm/cobalt/cobalt.h>
-#include <asm/pci.h>
#include <asm/processor.h>
#include <asm/reboot.h>
-#include <asm/traps.h>
+#include <asm/gt64120/gt64120.h>
+
+#include <asm/cobalt/cobalt.h>
extern void cobalt_machine_restart(char *command);
extern void cobalt_machine_halt(void);
@@ -53,13 +53,6 @@
}
-#define GALILEO_T0_VAL 0xb4000850
-#define GALILEO_TIMER_CTRL 0xb4000864
-#define GALILEO_CPU_MASK 0xb4000c1c
-
-#define GALILEO_ENTC0 0x01
-#define GALILEO_SELTC0 0x02
-
static void __init cobalt_time_init(void)
{
rtc_ops = &std_rtc_ops;
@@ -68,24 +61,18 @@
static void __init cobalt_timer_setup(struct irqaction *irq)
{
/* Load timer value for 150 Hz */
- volatile unsigned long *timer_reg = (volatile unsigned long *)GALILEO_T0_VAL;
-
- *timer_reg = 500000;
+ GALILEO_OUTL(500000, GT_TC0_OFS);
/* Register our timer interrupt */
setup_irq(COBALT_TIMER_IRQ, irq);
/* Enable timer ints */
- *((volatile unsigned long *) GALILEO_TIMER_CTRL) =
- (unsigned long) (GALILEO_ENTC0 | GALILEO_SELTC0);
+ GALILEO_OUTL((GALILEO_ENTC0 | GALILEO_SELTC0), GT_TC_CONTROL_OFS);
/* Unmask timer int */
- *((volatile unsigned long *) GALILEO_CPU_MASK) = (unsigned long) 0x00000100;
+ GALILEO_OUTL(0x100, GT_INTRMASK_OFS);
}
-void __init bus_error_init(void) { /* nothing */ }
-
-
void __init cobalt_setup(void)
{
@@ -99,7 +86,8 @@
#ifdef CONFIG_BLK_DEV_IDE
ide_ops = &std_ide_ops;
#endif
- set_io_port_base(0xb0000000);
+
+ set_io_port_base(KSEG1ADDR(0x10000000));
/*
* This is a prom style console. We just poke at the
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)