aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorVasant Hegde <hegdevasant@linux.vnet.ibm.com>2015-03-08 16:28:44 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-03-20 04:17:34 +1100
commit2a824b4c3935b3ba9d99c8bc00f4dd747f60dbea (patch)
tree4f8a2a38ee4d89f4c45e7556fb467d49e3b23e3c /doc
parentb8581a7e7bf4429df5dc9bbfe0719182a3cc6520 (diff)
downloadskiboot-2a824b4c3935b3ba9d99c8bc00f4dd747f60dbea.zip
skiboot-2a824b4c3935b3ba9d99c8bc00f4dd747f60dbea.tar.gz
skiboot-2a824b4c3935b3ba9d99c8bc00f4dd747f60dbea.tar.bz2
FSP/LEDS: Add OPAL interfaces for accessing or modifying the LED states
This patch adds and registers the following two new OPAL interfaces for the LED subsystem. With the help of these new OPAL calls, the host will be able to set or query the state of various LEDs on the system at any given location code (as passed in the device tree). As of now, it supports two kinds of LEDs on the same location code one is "Identify LED" and the other being the "Fault LED". (1) OPAL_LEDS_GET_INDICATOR fsp_opal_leds_get_ind (2) OPAL_LEDS_SET_INDICATOR fsp_opal_leds_set_ind The signtaure of these OPAL interfaces are like the following (1) fsp_opal_leds_get_ind(loc_code, led_mask, led_value, led_max_type) The host will pass the location code of the LED (loc_code) and maximum number of LED types it understands (led_max_type). Sapphire updates the led_mask with set bits pointing to LED types whose status is availbale and updates the led_value with actual status. Sapphire checks the led_max_type to understand whether host is newer or older compared to itself. In the case where the Sapphire is newer compared to host (Sapphire's led_max_type > host's led_max_type), it will update led_mask and led_value according to led_max_type requested by the host. When the host is newer compared to the Sapphire (host's led_max_type > Sapphire's led_max_type), Sapphire updates led_max_type to the maximum number of LED type it understands and updates led_mask, led_value based on that maximum value. (2) fsp_opal_leds_set_ind(loc_code, led_mask, led_value, led_max_type) The host will pass the location code of the LED types, mask, value and maximum number of LED types it understands. Sapphire will update LED status for all the LED types mentioned in the mask with their value mentioned. Sapphire checks the 'led_max_type' to understand whether the host is newer or older compared to itself. In case where the Sapphire is newer compared to the host (Sapphire's led_max_type > host's led_max_type), it updates LED status based on led_max_type requested from the host. When the host is newer compared to the Sapphire (host's led_max_type > Sapphire's led_max_type), Sapphire updates 'led_max_type' to the maximum number of LED type it understands and then it updates LED status based on that updated maximum value of LED types. Host needs to check the returned updated value of led_max_type to figure out which part of it's request got served and which ones got ignored. Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/opal-api/opal-led-get-set-114-115.txt36
1 files changed, 36 insertions, 0 deletions
diff --git a/doc/opal-api/opal-led-get-set-114-115.txt b/doc/opal-api/opal-led-get-set-114-115.txt
new file mode 100644
index 0000000..4644adc
--- /dev/null
+++ b/doc/opal-api/opal-led-get-set-114-115.txt
@@ -0,0 +1,36 @@
+Service Indicators (LEDS)
+-------------------------
+
+The service indicator is one element of an overall hardware service strategy
+where end user simplicity is a high priority. The goal is system firmware or
+operating system code to isolate hardware failures to the failing FRU and
+automatically activate the fault indicator associated with the failing FRU.
+The end user then needs only to look for the FRU with the active fault
+indicator to know which part to replace.
+
+Different types of indicators handled by LED code:
+ - System attention indicator (Check log indicator)
+ Indicates there is a problem with the system that needs attention.
+ - Identify
+ Helps the user locate/identify a particular FRU or resource in the
+ system.
+ - Fault
+ Indicates there is a problem with the FRU or resource at the
+ location with which the indicator is associated.
+
+
+Note:
+ - For more information regarding service indicator refer to PAPR spec
+ (Service Indicators chapter).
+
+There are two OPAL calls relating to LED operations.
+
+OPAL_LEDS_GET_INDICATOR
+-----------------------
+ Returns LED state for the given location code.
+
+OPAL_LEDS_SET_INDICATOR
+-----------------------
+ Sets LED state for the given location code.
+
+See hw/fsp/fsp-leds.c for more deatails.