Index: arch/parisc/kernel/led.c
===================================================================
RCS file: /var/cvs/linux/arch/parisc/kernel/led.c,v
retrieving revision 1.24
diff -u -p -r1.24 led.c
--- arch/parisc/kernel/led.c	2001/10/22 15:45:36	1.24
+++ arch/parisc/kernel/led.c	2001/11/20 22:06:00
@@ -51,6 +51,30 @@ static int led_diskio = 1;
 static int led_lanrxtx = 1;
 static char lcd_text[32] = {0};
 
+/*****
+ * stuff for E55 and similar server with RUN/ATTENTION LED
+ */
+
+#define LED_CHASSIS_OFF            0
+#define LED_CHASSIS_FAULT          1
+#define LED_CHASSIS_TEST           2
+#define LED_CHASSIS_INIT           3
+#define LED_CHASSIS_SHUTDOWN       4
+#define LED_CHASSIS_WARNING        5
+#define LED_CHASSIS_RUN            6
+#define LED_CHASSIS_ALL_ON         7
+
+#define LED_CHASSIS_BYTE(v) ((unsigned long)((v) << 1))
+#define LED_CHASSIS_DISP_DATA(v) ((unsigned long)(LED_CHASSIS_BYTE(v) << 16))
+extern int pdc_chassis_disp (unsigned long);
+extern int pdc_model_sysmodel (char *);
+static int use_chassis_call = 0;
+static int chassis_run_mode = 0;
+
+void led_chassis_run (void);
+void led_chassis_attention (void);
+void led_chassis_init (void);
+
 #if 0
 #define DPRINTK(x)	printk x
 #else
@@ -450,13 +474,24 @@ static void led_tasket_func(unsigned lon
 
 	if (led_heartbeat)
 	{
+		/* for server with RUN led, switch it on, heartbeat is active,
+		   led_chassis_run() checks itself, if a machine of this
+		   type is used */
+		led_chassis_run ();
+		
 		/* flash heartbeat-LED like a real heart (2 x short then a long delay) */
 		if (count_HZ<HEARTBEAT_LEN || 
 		    (count_HZ>=HEARTBEAT_2ND_RANGE_START && count_HZ<HEARTBEAT_2ND_RANGE_END)) 
 		    currentleds |= LED_HEARTBEAT;
 		else
 		    currentleds &= ~LED_HEARTBEAT;
+	} else {
+		/* if no heartbeat, also let light ATTENTION on some
+		   machine. led_chassis_attention() will check itself,
+		   if a machine of this type is used */
+		led_chassis_attention();
 	}
+	
 
 	/* gather network and diskio statistics and flash LEDs respectively */
 
@@ -541,7 +576,10 @@ static int led_halt(struct notifier_bloc
 	else
 		if (led_func_ptr)
 			led_func_ptr(0xff); /* turn all LEDs ON */
-	
+	/* call led_chassis_attention(), routine cheks itself, if
+	   this display type is valid */
+	led_chassis_attention();
+
 	unregister_reboot_notifier(&led_notifier);
 	return NOTIFY_OK;
 }
@@ -673,6 +711,54 @@ int lcd_print( char *str )
 	return lcd_info.lcd_width;
 }
 
+
+/*
+   ** HP E55 (and similar) stuff
+   **
+   ** These series has only static LED
+   **
+   ** At the moment only two will be supported
+   **    RUN
+   **    ATTENTION
+   **
+   ** These to LEDs are used disjunct
+*/
+
+void led_chassis_run (void)
+{
+	if (use_chassis_call && !chassis_run_mode) {
+		pdc_chassis_disp (LED_CHASSIS_DISP_DATA(LED_CHASSIS_RUN));
+		chassis_run_mode = 1;
+	}
+}
+
+void led_chassis_attention (void)
+{
+	if (use_chassis_call && chassis_run_mode) {
+		pdc_chassis_disp (LED_CHASSIS_DISP_DATA(LED_CHASSIS_INIT));
+		chassis_run_mode = 0;
+	}
+}
+
+void led_chassis_init (void)
+{
+#define MODBUF_LEN 32
+	char buf [MODBUF_LEN];  /* small enough to lay on stack */
+	
+	if (pdc_model_sysmodel (buf) < 0) {
+		printk (KERN_NOTICE "%s: error reading sys model\n", 
+			__FUNCTION__);
+		return;
+	}
+	
+	if (strncmp (buf, "9000/856", MODBUF_LEN) == 0)
+		use_chassis_call = 1;
+
+	/* XXX CP: Add other models ! */
+
+	chassis_run_mode = 0;
+}
+
 /*
    ** led_init()
    ** 
@@ -703,6 +789,8 @@ int __init led_init(void)
 	}
 
 	/* initialize the struct, so that we can check for valid return values */
+	led_chassis_init();
+
 	lcd_info.model = DISPLAY_MODEL_NONE;
 	chassis_info.actcnt = chassis_info.maxcnt = 0;
Index: arch/parisc/kernel/firmware.c
===================================================================
RCS file: /var/cvs/linux/arch/parisc/kernel/firmware.c,v
retrieving revision 1.36
diff -u -p -r1.36 firmware.c
--- arch/parisc/kernel/firmware.c	2001/11/13 23:25:45	1.36
+++ arch/parisc/kernel/firmware.c	2001/11/20 22:06:44
@@ -136,6 +136,21 @@ int pdc_add_valid(unsigned long address)
 }
 
 /**
+ * pdc_chassis_disp, used for E-series (for example E55)
+ *
+ */
+int pdc_chassis_disp(unsigned long disp)
+{
+	int retval;
+
+	spin_lock_irq(&pdc_lock);
+	retval = mem_pdc_call(PDC_CHASSIS, PDC_CHASSIS_DISP, disp);
+	spin_unlock_irq(&pdc_lock);
+
+	return retval;
+}
+
+/**
  * pdc_chassis_info - Return chassis information.
  * @result: The return buffer.
  * @chassis_info: The memory buffer address. 
