patch-2.3.43 linux/arch/ppc/kernel/gemini_setup.c
Next file: linux/arch/ppc/kernel/head.S
Previous file: linux/arch/ppc/kernel/galaxy_pci.c
Back to the patch index
Back to the overall index
- Lines: 49
- Date:
Wed Feb 9 19:43:47 2000
- Orig file:
v2.3.42/linux/arch/ppc/kernel/gemini_setup.c
- Orig date:
Tue Jan 11 22:31:37 2000
diff -u --recursive --new-file v2.3.42/linux/arch/ppc/kernel/gemini_setup.c linux/arch/ppc/kernel/gemini_setup.c
@@ -53,7 +53,7 @@
};
int chrp_get_irq(struct pt_regs *);
-void chrp_post_irq(int);
+void chrp_post_irq(struct pt_regs* regs, int);
static inline unsigned long _get_HID1(void)
{
@@ -132,6 +132,19 @@
extern int root_mountflags;
extern char cmd_line[];
+void
+gemini_heartbeat(void)
+{
+ static unsigned long led = GEMINI_LEDBASE+(4*8);
+ static char direction = 8;
+ *(char *)led = 0;
+ if ( (led + direction) > (GEMINI_LEDBASE+(7*8)) ||
+ (led + direction) < (GEMINI_LEDBASE+(4*8)) )
+ direction *= -1;
+ led += direction;
+ *(char *)led = 0xff;
+ ppc_md.heartbeat_count = ppc_md.heartbeat_reset;
+}
void __init gemini_setup_arch(void)
{
@@ -175,6 +188,10 @@
printk("CPU manufacturer: %s [rev=%04x]\n", (cpu & (1<<15)) ? "IBM" :
"Motorola", (cpu & 0xffff));
+ ppc_md.heartbeat = gemini_heartbeat;
+ ppc_md.heartbeat_reset = HZ/8;
+ ppc_md.heartbeat_count = 1;
+
/* take special pains to map the MPIC, since it isn't mapped yet */
gemini_openpic_init();
/* start the L2 */
@@ -505,7 +522,7 @@
return irq;
}
-void gemini_post_irq(int irq)
+void gemini_post_irq(struct pt_regs* regs, int irq)
{
/*
* If it's an i8259 irq then we've already done the
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)