aboutsummaryrefslogtreecommitdiff
path: root/platforms
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
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')
-rw-r--r--platforms/ibm-fsp/apollo.c1
-rw-r--r--platforms/ibm-fsp/common.c10
-rw-r--r--platforms/ibm-fsp/firenze.c1
-rw-r--r--platforms/ibm-fsp/ibm-fsp.h1
4 files changed, 13 insertions, 0 deletions
diff --git a/platforms/ibm-fsp/apollo.c b/platforms/ibm-fsp/apollo.c
index fc01e64..54545de 100644
--- a/platforms/ibm-fsp/apollo.c
+++ b/platforms/ibm-fsp/apollo.c
@@ -51,6 +51,7 @@ DECLARE_PLATFORM(apollo) = {
.name = "Apollo",
.probe = apollo_probe,
.init = ibm_fsp_init,
+ .exit = ibm_fsp_exit,
.cec_power_down = ibm_fsp_cec_power_down,
.cec_reboot = ibm_fsp_cec_reboot,
.pci_setup_phb = apollo_setup_phb,
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;
diff --git a/platforms/ibm-fsp/firenze.c b/platforms/ibm-fsp/firenze.c
index 30fe1c7..194a19d 100644
--- a/platforms/ibm-fsp/firenze.c
+++ b/platforms/ibm-fsp/firenze.c
@@ -403,6 +403,7 @@ DECLARE_PLATFORM(firenze) = {
.name = "Firenze",
.probe = firenze_probe,
.init = firenze_init,
+ .exit = ibm_fsp_exit,
.cec_power_down = ibm_fsp_cec_power_down,
.cec_reboot = ibm_fsp_cec_reboot,
.pci_setup_phb = firenze_setup_phb,
diff --git a/platforms/ibm-fsp/ibm-fsp.h b/platforms/ibm-fsp/ibm-fsp.h
index 160038a..c045aac 100644
--- a/platforms/ibm-fsp/ibm-fsp.h
+++ b/platforms/ibm-fsp/ibm-fsp.h
@@ -19,6 +19,7 @@
#define __IBM_FSP_COMMON_H
extern void ibm_fsp_init(void);
+extern void ibm_fsp_exit(void);
extern int64_t ibm_fsp_cec_power_down(uint64_t request);
extern int64_t ibm_fsp_cec_reboot(void);