diff options
author | Thibaut Varene <varenet@parisc-linux.org> | 2006-05-03 17:27:35 -0600 |
---|---|---|
committer | Kyle McMartin <kyle@hera.kernel.org> | 2006-06-27 23:28:37 +0000 |
commit | 8ffaeaf42e91930888df09d696a8a6ebe056d0e0 (patch) | |
tree | 7b1785ccab10b69c06f91184e382f8d96b1cc04d /arch/parisc/kernel/firmware.c | |
parent | c95f2e5f2f6f61d734a025414c9eb81872a5c831 (diff) | |
download | blackbird-op-linux-8ffaeaf42e91930888df09d696a8a6ebe056d0e0.tar.gz blackbird-op-linux-8ffaeaf42e91930888df09d696a8a6ebe056d0e0.zip |
[PARISC] PDC_CHASSIS is implemented on all machines
This patch removes a limitation of the original code, so that CHASSIS
codes can be sent to all machines. On machines with a LCD panel, this
code displays "INI" during bootup, "RUN" when the system is booted and
running, "FLT" when a panic occurs, etc.
This part of the code can be enabled/disabled through CONFIG_PDC_CHASSIS
This patch also adds minimalistic support for Chassis warnings, through
a proc entry '/proc/chassis', which will reflect the warnings status (PSU
or fans failure when they happen, NVRAM battery level and temperature
thresholds overflows).
This part of the code can be enabled/disabled through CONFIG_PDC_CHASSIS_WARN
Signed-off-by: Thibaut VARENE <varenet@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Diffstat (limited to 'arch/parisc/kernel/firmware.c')
-rw-r--r-- | arch/parisc/kernel/firmware.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/arch/parisc/kernel/firmware.c b/arch/parisc/kernel/firmware.c index 2dc06b8e1817..0596f27340cc 100644 --- a/arch/parisc/kernel/firmware.c +++ b/arch/parisc/kernel/firmware.c @@ -11,7 +11,7 @@ * Copyright 1999 The Puffin Group, (Alex deVries, David Kennedy) * Copyright 2003 Grant Grundler <grundler parisc-linux org> * Copyright 2003,2004 Ryan Bradetich <rbrad@parisc-linux.org> - * Copyright 2004 Thibaut VARENE <varenet@parisc-linux.org> + * Copyright 2004,2006 Thibaut VARENE <varenet@parisc-linux.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -252,10 +252,8 @@ int pdc_pat_chassis_send_log(unsigned long state, unsigned long data) #endif /** - * pdc_chassis_disp - Updates display + * pdc_chassis_disp - Updates chassis code * @retval: -1 on error, 0 on success - * - * Works on old PDC only (E class, others?) */ int pdc_chassis_disp(unsigned long disp) { @@ -269,6 +267,22 @@ int pdc_chassis_disp(unsigned long disp) } /** + * pdc_chassis_warn - Fetches chassis warnings + * @retval: -1 on error, 0 on success + */ +int pdc_chassis_warn(unsigned long *warn) +{ + int retval = 0; + + spin_lock_irq(&pdc_lock); + retval = mem_pdc_call(PDC_CHASSIS, PDC_CHASSIS_WARN, __pa(pdc_result)); + *warn = pdc_result[0]; + spin_unlock_irq(&pdc_lock); + + return retval; +} + +/** * pdc_coproc_cfg - To identify coprocessors attached to the processor. * @pdc_coproc_info: Return buffer address. * |