[Skiboot] [PATCH 21/22] FSP/LEDS: Add OPAL interfaces for accessing or modifying the LED states

Stewart Smith stewart at linux.vnet.ibm.com
Wed Feb 18 11:30:38 AEDT 2015


Vasant Hegde <hegdevasant at linux.vnet.ibm.com> writes:
> From: Anshuman Khandual <khandual at linux.vnet.ibm.com>
>
> 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 max_led_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 max_led_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 max_led_type
> to figure out which part of it's request got served and which ones got
> ignored.

Please add API docs to doc/opal-api/



More information about the Skiboot mailing list