patch-2.1.115 linux/arch/sparc/kernel/sun4c_irq.c
Next file: linux/arch/sparc/kernel/sun4d_irq.c
Previous file: linux/arch/sparc/kernel/sparc_ksyms.c
Back to the patch index
Back to the overall index
- Lines: 77
- Date:
Tue Aug 4 23:57:51 1998
- Orig file:
v2.1.114/linux/arch/sparc/kernel/sun4c_irq.c
- Orig date:
Sat Apr 25 18:13:10 1998
diff -u --recursive --new-file v2.1.114/linux/arch/sparc/kernel/sun4c_irq.c linux/arch/sparc/kernel/sun4c_irq.c
@@ -9,6 +9,7 @@
* Copyright (C) 1996 Dave Redman (djhr@tadpole.co.uk)
*/
+#include <linux/config.h>
#include <linux/ptrace.h>
#include <linux/errno.h>
#include <linux/linkage.h>
@@ -108,9 +109,22 @@
volatile struct sun4c_timer_info *sun4c_timers;
+#ifdef CONFIG_SUN4
+/* This is an ugly hack to work around the
+ current timer code, and make it work with
+ the sun4/260 intersil
+ */
+volatile struct sun4c_timer_info sun4_timer;
+#endif
+
static void sun4c_clear_clock_irq(void)
{
volatile unsigned int clear_intr;
+#ifdef CONFIG_SUN4
+ if( idprom->id_machtype == SM_SUN4 | SM_4_260 )
+ clear_intr = sun4_timer.timer_limit10;
+ else
+#endif
clear_intr = sun4c_timers->timer_limit10;
}
@@ -131,6 +145,11 @@
/* Map the Timer chip, this is implemented in hardware inside
* the cache chip on the sun4c.
*/
+#ifdef CONFIG_SUN4
+ if (idprom->id_machtype == SM_SUN4 | SM_4_260)
+ sun4c_timers = &sun4_timer;
+ else
+#endif
sun4c_timers = sparc_alloc_io (SUN_TIMER_PHYSADDR, 0,
sizeof(struct sun4c_timer_info),
"timer", 0x0, 0x0);
@@ -152,6 +171,7 @@
prom_halt();
}
+ sun4c_enable_irq(10);
claim_ticker14(NULL, PROFILE_IRQ, 0);
}
@@ -159,6 +179,8 @@
static void sun4c_nop(void) {}
#endif
+extern char *sun4m_irq_itoa(unsigned int irq);
+
__initfunc(void sun4c_init_IRQ(void))
{
struct linux_prom_registers int_regs[2];
@@ -166,7 +188,7 @@
if (ARCH_SUN4) {
interrupt_enable =
- (char *) sparc_alloc_io(SUN4_IE_PHYSADDR, 0,
+ (char *) sparc_alloc_io(sun4_ie_physaddr, 0,
PAGE_SIZE,
"sun4c_interrupts",
0x0, 0x0);
@@ -193,6 +215,7 @@
BTFIXUPSET_CALL(clear_clock_irq, sun4c_clear_clock_irq, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(clear_profile_irq, sun4c_clear_profile_irq, BTFIXUPCALL_NOP);
BTFIXUPSET_CALL(load_profile_irq, sun4c_load_profile_irq, BTFIXUPCALL_NOP);
+ BTFIXUPSET_CALL(__irq_itoa, sun4m_irq_itoa, BTFIXUPCALL_NORM);
init_timers = sun4c_init_timers;
#ifdef __SMP__
BTFIXUPSET_CALL(set_cpu_int, sun4c_nop, BTFIXUPCALL_NOP);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov