summaryrefslogtreecommitdiffstats
path: root/hw/fsp/fsp-leds.c
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2015-10-13 16:32:36 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-10-13 16:36:10 +1100
commitfd19bdff9f67066216040d0455690e4e16036ca7 (patch)
treecc10a7cc07fc7194e0e861737e95862cddc6c2a0 /hw/fsp/fsp-leds.c
parentd40160f6ffa919447807f2d62c25fbd547623361 (diff)
parente91d12a94866d4232e51aa757b87e5bf0891e6d2 (diff)
downloadtalos-skiboot-fd19bdff9f67066216040d0455690e4e16036ca7.tar.gz
talos-skiboot-fd19bdff9f67066216040d0455690e4e16036ca7.zip
Merge branch 'stable': FSP leds fix and skiboot 5.1.7 release notes
Diffstat (limited to 'hw/fsp/fsp-leds.c')
-rw-r--r--hw/fsp/fsp-leds.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/hw/fsp/fsp-leds.c b/hw/fsp/fsp-leds.c
index c20049e3..4933dfac 100644
--- a/hw/fsp/fsp-leds.c
+++ b/hw/fsp/fsp-leds.c
@@ -57,6 +57,7 @@ static enum led_support_state led_support = LED_STATE_ABSENT;
*
*/
static void *led_buffer;
+static u8 *loc_code_list_buffer = NULL;
/* Maintain list of all LEDs
*
@@ -777,8 +778,13 @@ static void fsp_ret_loc_code_list(u16 req_type, char *loc_code)
u32 bytes_sent = 0, total_size = 0;
u16 header_size = 0, flags = 0;
+ if (loc_code_list_buffer == NULL) {
+ prerror("No loc_code_list_buffer\n");
+ return;
+ }
+
/* Init the addresses */
- data = (u8 *) PSI_DMA_LOC_COD_BUF;
+ data = loc_code_list_buffer;
out_data = NULL;
/* Unmapping through FSP_CMD_RET_LOC_BUFFER command */
@@ -1875,6 +1881,11 @@ void fsp_led_init(void)
list_head_init(&spcn_cmdq);
fsp_leds_query_spcn();
+
+ loc_code_list_buffer = memalign(TCE_PSIZE, PSI_DMA_LOC_COD_BUF_SZ);
+ if (loc_code_list_buffer == NULL)
+ prerror("ERROR: Unable to allocate loc_code_list_buffer!\n");
+
prlog(PR_TRACE, "Init completed\n");
/* Get System attention indicator state */
OpenPOWER on IntegriCloud