aboutsummaryrefslogtreecommitdiff
path: root/platforms/ibm-fsp/common.c
diff options
context:
space:
mode:
authorVasant Hegde <hegdevasant@linux.vnet.ibm.com>2015-03-08 16:12:47 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-03-20 02:29:07 +1100
commit4abc10f25e39547f3def70cd5b72407e1cc4ee0d (patch)
tree9a2ef92a7b6e1425186e4b034a86ef0eaaa26162 /platforms/ibm-fsp/common.c
parentc3137a50fb71a253e16b56bb92f62591f288552d (diff)
downloadskiboot-4abc10f25e39547f3def70cd5b72407e1cc4ee0d.zip
skiboot-4abc10f25e39547f3def70cd5b72407e1cc4ee0d.tar.gz
skiboot-4abc10f25e39547f3def70cd5b72407e1cc4ee0d.tar.bz2
FSP/LEDS: Add device tree nodes
This patch creates a parent LED device node called 'led' under the root 'opal' device node. This also creates child device nodes under 'led' corresponding to all individual LEDs on the system whether it is an enclosure type or a descendant type with their location code as name. The location code information will be used by the host to enlist and access all the individual LEDs present on the system. The child LED device nodes also have the properties 'led-types' and 'led-loc' representing what kind of LEDs present on the same loation code and whether it is an enclosure type LED or a descendant type LED. Sample device tree output: ibm,opal { .. .. led { compatible = "ibm,opal-v3-led"; phandle = <0x1000006b>; linux,phandle = <0x1000006b>; U78C9.001.RST0027-P1-C1 { led-types = "identify", "fault"; led-loc = "descendent"; phandle = <0x1000006f>; linux,phandle = <0x1000006f>; }; <snip> }; }; Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com> [stewart@linux.vnet.ibm.com: Move create_led_device_nodes to FSP platform.exit] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'platforms/ibm-fsp/common.c')
-rw-r--r--platforms/ibm-fsp/common.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/platforms/ibm-fsp/common.c b/platforms/ibm-fsp/common.c
index 2bc1f05..da1da5a 100644
--- a/platforms/ibm-fsp/common.c
+++ b/platforms/ibm-fsp/common.c
@@ -159,6 +159,16 @@ void ibm_fsp_init(void)
fsp_console_add_nodes();
}
+void ibm_fsp_exit(void)
+{
+ /*
+ * LED related SPCN commands might take a while to
+ * complete. Call this as late as possible to
+ * ensure we have all the LED information.
+ */
+ create_led_device_nodes();
+}
+
int64_t ibm_fsp_cec_reboot(void)
{
uint32_t cmd = FSP_CMD_REBOOT;