diff options
author | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-10-13 16:32:36 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-10-13 16:36:10 +1100 |
commit | fd19bdff9f67066216040d0455690e4e16036ca7 (patch) | |
tree | cc10a7cc07fc7194e0e861737e95862cddc6c2a0 /hw/fsp/fsp-leds.c | |
parent | d40160f6ffa919447807f2d62c25fbd547623361 (diff) | |
parent | e91d12a94866d4232e51aa757b87e5bf0891e6d2 (diff) | |
download | talos-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.c | 13 |
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 */ |