diff options
author | Stewart Smith <stewart@linux.ibm.com> | 2019-06-18 17:29:09 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2019-06-24 15:59:07 +1000 |
commit | bad74d247bcc8d06460fb1ea13d8413a69497344 (patch) | |
tree | 5b391e666c6d4ffbd76f4f22790b139e3de0050c | |
parent | d615b964a94644a7483b019360e670e78c6ea08f (diff) | |
download | skiboot-bad74d247bcc8d06460fb1ea13d8413a69497344.zip skiboot-bad74d247bcc8d06460fb1ea13d8413a69497344.tar.gz skiboot-bad74d247bcc8d06460fb1ea13d8413a69497344.tar.bz2 |
op_display: make platform function rather than "FSP" specific
We have an implementation for non-FSP systems now, and we shouldn't be
calling that from code in an fsp/ directory, so move op_display() to a
platform function.
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
-rw-r--r-- | core/platform.c | 6 | ||||
-rw-r--r-- | hw/fsp/fsp-op-panel.c | 6 | ||||
-rw-r--r-- | include/fsp.h | 2 | ||||
-rw-r--r-- | include/platform.h | 8 | ||||
-rw-r--r-- | platforms/astbmc/barreleye.c | 1 | ||||
-rw-r--r-- | platforms/astbmc/firestone.c | 1 | ||||
-rw-r--r-- | platforms/astbmc/garrison.c | 1 | ||||
-rw-r--r-- | platforms/astbmc/habanero.c | 1 | ||||
-rw-r--r-- | platforms/astbmc/p8dnu.c | 1 | ||||
-rw-r--r-- | platforms/astbmc/p8dtu.c | 2 | ||||
-rw-r--r-- | platforms/astbmc/p9dsu.c | 1 | ||||
-rw-r--r-- | platforms/astbmc/palmetto.c | 1 | ||||
-rw-r--r-- | platforms/astbmc/romulus.c | 1 | ||||
-rw-r--r-- | platforms/astbmc/talos.c | 1 | ||||
-rw-r--r-- | platforms/astbmc/vesnin.c | 1 | ||||
-rw-r--r-- | platforms/astbmc/witherspoon.c | 1 | ||||
-rw-r--r-- | platforms/astbmc/zaius.c | 1 | ||||
-rw-r--r-- | platforms/ibm-fsp/firenze.c | 1 | ||||
-rw-r--r-- | platforms/ibm-fsp/zz.c | 1 |
19 files changed, 34 insertions, 4 deletions
diff --git a/core/platform.c b/core/platform.c index afa00ad..efcf63d 100644 --- a/core/platform.c +++ b/core/platform.c @@ -295,3 +295,9 @@ int wait_for_resource_loaded(enum resource_id id, uint32_t idx) id, idx, waited); return r; } + +void op_display(enum op_severity sev, enum op_module mod, uint16_t code) +{ + if (platform.op_display) + platform.op_display(sev, mod, code); +} diff --git a/hw/fsp/fsp-op-panel.c b/hw/fsp/fsp-op-panel.c index 6477e73..530871f 100644 --- a/hw/fsp/fsp-op-panel.c +++ b/hw/fsp/fsp-op-panel.c @@ -49,16 +49,14 @@ static void fsp_op_display_fatal(uint32_t w0, uint32_t w1) fsp_fatal_msg(&op_msg); } -void op_display(enum op_severity sev, enum op_module mod, uint16_t code) +void fsp_op_display(enum op_severity sev, enum op_module mod, uint16_t code) { struct fsp_msg *op_msg; uint32_t w0; uint32_t w1; - if (!fsp_present()) { - op_display_lpc(sev, mod, code); + if (!fsp_present()) return; - } w0 = sev << 16 | mod; diff --git a/include/fsp.h b/include/fsp.h index cfa51af..0df7f93 100644 --- a/include/fsp.h +++ b/include/fsp.h @@ -853,4 +853,6 @@ extern void fsp_chiptod_init(void); /* Terminate immediate */ extern void __attribute__((noreturn)) ibm_fsp_terminate(const char *msg); +void fsp_op_display(enum op_severity sev, enum op_module mod, uint16_t code); + #endif /* __FSP_H */ diff --git a/include/platform.h b/include/platform.h index 4f8627a..9a77586 100644 --- a/include/platform.h +++ b/include/platform.h @@ -237,6 +237,14 @@ struct platform { * SEEPROM update routine */ void (*seeprom_update)(void); + + /* + * Operator Panel display + * Physical FSP op panel or LPC port 80h + * or any other "get boot status out to the user" thing. + */ + void (*op_display)(enum op_severity sev, enum op_module mod, + uint16_t code); }; extern struct platform __platforms_start; diff --git a/platforms/astbmc/barreleye.c b/platforms/astbmc/barreleye.c index 554aacf..6cc5537 100644 --- a/platforms/astbmc/barreleye.c +++ b/platforms/astbmc/barreleye.c @@ -172,4 +172,5 @@ DECLARE_PLATFORM(barreleye) = { .resource_loaded = flash_resource_loaded, .exit = ipmi_wdt_final_reset, .terminate = ipmi_terminate, + .op_display = op_display_lpc, }; diff --git a/platforms/astbmc/firestone.c b/platforms/astbmc/firestone.c index 28719e3..29ee377 100644 --- a/platforms/astbmc/firestone.c +++ b/platforms/astbmc/firestone.c @@ -159,4 +159,5 @@ DECLARE_PLATFORM(firestone) = { .resource_loaded = flash_resource_loaded, .exit = ipmi_wdt_final_reset, .terminate = ipmi_terminate, + .op_display = op_display_lpc, }; diff --git a/platforms/astbmc/garrison.c b/platforms/astbmc/garrison.c index ddd3372..b931057 100644 --- a/platforms/astbmc/garrison.c +++ b/platforms/astbmc/garrison.c @@ -306,4 +306,5 @@ DECLARE_PLATFORM(garrison) = { .exit = ipmi_wdt_final_reset, .terminate = ipmi_terminate, .seeprom_update = astbmc_seeprom_update, + .op_display = op_display_lpc, }; diff --git a/platforms/astbmc/habanero.c b/platforms/astbmc/habanero.c index ab01027..068c315 100644 --- a/platforms/astbmc/habanero.c +++ b/platforms/astbmc/habanero.c @@ -150,4 +150,5 @@ DECLARE_PLATFORM(habanero) = { .exit = ipmi_wdt_final_reset, .terminate = ipmi_terminate, .seeprom_update = astbmc_seeprom_update, + .op_display = op_display_lpc, }; diff --git a/platforms/astbmc/p8dnu.c b/platforms/astbmc/p8dnu.c index 391aa7a..8d7d16b 100644 --- a/platforms/astbmc/p8dnu.c +++ b/platforms/astbmc/p8dnu.c @@ -362,4 +362,5 @@ DECLARE_PLATFORM(p8dnu) = { .exit = ipmi_wdt_final_reset, .terminate = ipmi_terminate, .seeprom_update = astbmc_seeprom_update, + .op_display = op_display_lpc, }; diff --git a/platforms/astbmc/p8dtu.c b/platforms/astbmc/p8dtu.c index 6f66dc2..f4a0c7f 100644 --- a/platforms/astbmc/p8dtu.c +++ b/platforms/astbmc/p8dtu.c @@ -263,6 +263,7 @@ DECLARE_PLATFORM(p8dtu1u) = { .exit = ipmi_wdt_final_reset, .terminate = ipmi_terminate, .seeprom_update = astbmc_seeprom_update, + .op_display = op_display_lpc, }; DECLARE_PLATFORM(p8dtu2u) = { @@ -281,5 +282,6 @@ DECLARE_PLATFORM(p8dtu2u) = { .exit = ipmi_wdt_final_reset, .terminate = ipmi_terminate, .seeprom_update = astbmc_seeprom_update, + .op_display = op_display_lpc, }; diff --git a/platforms/astbmc/p9dsu.c b/platforms/astbmc/p9dsu.c index eeb8fd7..72645ec 100644 --- a/platforms/astbmc/p9dsu.c +++ b/platforms/astbmc/p9dsu.c @@ -732,4 +732,5 @@ DECLARE_PLATFORM(p9dsu1u) = { .elog_commit = ipmi_elog_commit, .exit = ipmi_wdt_final_reset, .terminate = ipmi_terminate, + .op_display = op_display_lpc, }; diff --git a/platforms/astbmc/palmetto.c b/platforms/astbmc/palmetto.c index 29739c0..9136d15 100644 --- a/platforms/astbmc/palmetto.c +++ b/platforms/astbmc/palmetto.c @@ -133,4 +133,5 @@ DECLARE_PLATFORM(palmetto) = { .resource_loaded = flash_resource_loaded, .exit = ipmi_wdt_final_reset, .terminate = ipmi_terminate, + .op_display = op_display_lpc, }; diff --git a/platforms/astbmc/romulus.c b/platforms/astbmc/romulus.c index 7bb07cc..3e4003a 100644 --- a/platforms/astbmc/romulus.c +++ b/platforms/astbmc/romulus.c @@ -82,4 +82,5 @@ DECLARE_PLATFORM(romulus) = { .elog_commit = ipmi_elog_commit, .exit = astbmc_exit, .terminate = ipmi_terminate, + .op_display = op_display_lpc, }; diff --git a/platforms/astbmc/talos.c b/platforms/astbmc/talos.c index 0dea87e..f4cbb76 100644 --- a/platforms/astbmc/talos.c +++ b/platforms/astbmc/talos.c @@ -83,4 +83,5 @@ DECLARE_PLATFORM(talos) = { .elog_commit = ipmi_elog_commit, .exit = astbmc_exit, .terminate = ipmi_terminate, + .op_display = op_display_lpc, }; diff --git a/platforms/astbmc/vesnin.c b/platforms/astbmc/vesnin.c index 47e98e7..8ec1ebc 100644 --- a/platforms/astbmc/vesnin.c +++ b/platforms/astbmc/vesnin.c @@ -352,4 +352,5 @@ DECLARE_PLATFORM(vesnin) = { .resource_loaded = flash_resource_loaded, .exit = ipmi_wdt_final_reset, .terminate = ipmi_terminate, + .op_display = op_display_lpc, }; diff --git a/platforms/astbmc/witherspoon.c b/platforms/astbmc/witherspoon.c index 52971ec..dd53b4f 100644 --- a/platforms/astbmc/witherspoon.c +++ b/platforms/astbmc/witherspoon.c @@ -512,4 +512,5 @@ DECLARE_PLATFORM(witherspoon) = { .pci_get_slot_info = dt_slot_get_slot_info, .ocapi = &witherspoon_ocapi, .npu2_device_detect = witherspoon_npu2_device_detect, + .op_display = op_display_lpc, }; diff --git a/platforms/astbmc/zaius.c b/platforms/astbmc/zaius.c index 23a4072..ae8ca4b 100644 --- a/platforms/astbmc/zaius.c +++ b/platforms/astbmc/zaius.c @@ -269,4 +269,5 @@ DECLARE_PLATFORM(zaius) = { .terminate = ipmi_terminate, .ocapi = &zaius_ocapi, .npu2_device_detect = npu2_i2c_presence_detect, + .op_display = op_display_lpc, }; diff --git a/platforms/ibm-fsp/firenze.c b/platforms/ibm-fsp/firenze.c index dc70546..8f6a392 100644 --- a/platforms/ibm-fsp/firenze.c +++ b/platforms/ibm-fsp/firenze.c @@ -226,4 +226,5 @@ DECLARE_PLATFORM(firenze) = { .resource_loaded = fsp_resource_loaded, .sensor_read = ibm_fsp_sensor_read, .terminate = ibm_fsp_terminate, + .op_display = fsp_op_display, }; diff --git a/platforms/ibm-fsp/zz.c b/platforms/ibm-fsp/zz.c index 705906a..09599f8 100644 --- a/platforms/ibm-fsp/zz.c +++ b/platforms/ibm-fsp/zz.c @@ -90,4 +90,5 @@ DECLARE_PLATFORM(zz) = { .terminate = ibm_fsp_terminate, .ocapi = &zz_ocapi, .npu2_device_detect = npu2_i2c_presence_detect, + .op_display = fsp_op_display, }; |