[Skiboot] [PATCH 2/4] platforms: Use astbmc_exit
Nicholas Piggin
npiggin at gmail.com
Sat May 13 22:12:24 AEST 2023
Move all platforms using astbmc_init() to use astbmc_exit().
Move ipmi_set_boot_count() to astbmc_exit from ipmi_wdt_final_reset().
Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
---
hw/ipmi/ipmi-watchdog.c | 1 -
platforms/astbmc/barreleye.c | 2 +-
platforms/astbmc/common.c | 2 ++
platforms/astbmc/firestone.c | 2 +-
platforms/astbmc/garrison.c | 2 +-
platforms/astbmc/habanero.c | 2 +-
platforms/astbmc/mihawk.c | 2 +-
platforms/astbmc/p8dnu.c | 2 +-
platforms/astbmc/p8dtu.c | 4 ++--
platforms/astbmc/p9dsu.c | 2 +-
platforms/astbmc/palmetto.c | 2 +-
platforms/astbmc/vesnin.c | 2 +-
platforms/astbmc/zaius.c | 2 +-
13 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/hw/ipmi/ipmi-watchdog.c b/hw/ipmi/ipmi-watchdog.c
index dc0a9e5b..38fbff8c 100644
--- a/hw/ipmi/ipmi-watchdog.c
+++ b/hw/ipmi/ipmi-watchdog.c
@@ -200,7 +200,6 @@ void ipmi_wdt_final_reset(void)
#else
set_wdt(WDT_NO_ACTION, 100, 0, false, false);
#endif
- ipmi_set_boot_count();
}
void ipmi_wdt_init(void)
diff --git a/platforms/astbmc/barreleye.c b/platforms/astbmc/barreleye.c
index f7542d66..ad51bd63 100644
--- a/platforms/astbmc/barreleye.c
+++ b/platforms/astbmc/barreleye.c
@@ -159,7 +159,7 @@ DECLARE_PLATFORM(barreleye) = {
.elog_commit = ipmi_elog_commit,
.start_preload_resource = flash_start_preload_resource,
.resource_loaded = flash_resource_loaded,
- .exit = ipmi_wdt_final_reset,
+ .exit = astbmc_exit,
.terminate = ipmi_terminate,
.op_display = op_display_lpc,
};
diff --git a/platforms/astbmc/common.c b/platforms/astbmc/common.c
index 83ef70ad..9ce22b38 100644
--- a/platforms/astbmc/common.c
+++ b/platforms/astbmc/common.c
@@ -502,6 +502,8 @@ void astbmc_early_init(void)
void astbmc_exit(void)
{
ipmi_wdt_final_reset();
+
+ ipmi_set_boot_count();
}
static const struct bmc_sw_config bmc_sw_ami = {
diff --git a/platforms/astbmc/firestone.c b/platforms/astbmc/firestone.c
index ae5603eb..c29dee09 100644
--- a/platforms/astbmc/firestone.c
+++ b/platforms/astbmc/firestone.c
@@ -143,7 +143,7 @@ DECLARE_PLATFORM(firestone) = {
.elog_commit = ipmi_elog_commit,
.start_preload_resource = flash_start_preload_resource,
.resource_loaded = flash_resource_loaded,
- .exit = ipmi_wdt_final_reset,
+ .exit = astbmc_exit,
.terminate = ipmi_terminate,
.op_display = op_display_lpc,
};
diff --git a/platforms/astbmc/garrison.c b/platforms/astbmc/garrison.c
index e698e2f6..ddf1d747 100644
--- a/platforms/astbmc/garrison.c
+++ b/platforms/astbmc/garrison.c
@@ -278,7 +278,7 @@ DECLARE_PLATFORM(garrison) = {
.elog_commit = ipmi_elog_commit,
.start_preload_resource = flash_start_preload_resource,
.resource_loaded = flash_resource_loaded,
- .exit = ipmi_wdt_final_reset,
+ .exit = astbmc_exit,
.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 b98ff896..92788a6f 100644
--- a/platforms/astbmc/habanero.c
+++ b/platforms/astbmc/habanero.c
@@ -133,7 +133,7 @@ DECLARE_PLATFORM(habanero) = {
.elog_commit = ipmi_elog_commit,
.start_preload_resource = flash_start_preload_resource,
.resource_loaded = flash_resource_loaded,
- .exit = ipmi_wdt_final_reset,
+ .exit = astbmc_exit,
.terminate = ipmi_terminate,
.seeprom_update = astbmc_seeprom_update,
.op_display = op_display_lpc,
diff --git a/platforms/astbmc/mihawk.c b/platforms/astbmc/mihawk.c
index 54c28841..e12b21b4 100644
--- a/platforms/astbmc/mihawk.c
+++ b/platforms/astbmc/mihawk.c
@@ -560,7 +560,7 @@ DECLARE_PLATFORM(mihawk) = {
.cec_power_down = astbmc_ipmi_power_down,
.cec_reboot = astbmc_ipmi_reboot,
.elog_commit = ipmi_elog_commit,
- .exit = ipmi_wdt_final_reset,
+ .exit = astbmc_exit,
.terminate = ipmi_terminate,
.ocapi = &mihawk_ocapi,
.npu2_device_detect = npu2_i2c_presence_detect,
diff --git a/platforms/astbmc/p8dnu.c b/platforms/astbmc/p8dnu.c
index e223d158..9d4a130a 100644
--- a/platforms/astbmc/p8dnu.c
+++ b/platforms/astbmc/p8dnu.c
@@ -337,7 +337,7 @@ DECLARE_PLATFORM(p8dnu) = {
.elog_commit = ipmi_elog_commit,
.start_preload_resource = flash_start_preload_resource,
.resource_loaded = flash_resource_loaded,
- .exit = ipmi_wdt_final_reset,
+ .exit = astbmc_exit,
.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 a9d8dc06..e5703e38 100644
--- a/platforms/astbmc/p8dtu.c
+++ b/platforms/astbmc/p8dtu.c
@@ -249,7 +249,7 @@ DECLARE_PLATFORM(p8dtu1u) = {
.elog_commit = ipmi_elog_commit,
.start_preload_resource = flash_start_preload_resource,
.resource_loaded = flash_resource_loaded,
- .exit = ipmi_wdt_final_reset,
+ .exit = astbmc_exit,
.terminate = ipmi_terminate,
.seeprom_update = astbmc_seeprom_update,
.op_display = op_display_lpc,
@@ -268,7 +268,7 @@ DECLARE_PLATFORM(p8dtu2u) = {
.elog_commit = ipmi_elog_commit,
.start_preload_resource = flash_start_preload_resource,
.resource_loaded = flash_resource_loaded,
- .exit = ipmi_wdt_final_reset,
+ .exit = astbmc_exit,
.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 5c9756ec..554b940b 100644
--- a/platforms/astbmc/p9dsu.c
+++ b/platforms/astbmc/p9dsu.c
@@ -719,7 +719,7 @@ DECLARE_PLATFORM(p9dsu1u) = {
.cec_power_down = astbmc_ipmi_power_down,
.cec_reboot = astbmc_ipmi_reboot,
.elog_commit = ipmi_elog_commit,
- .exit = ipmi_wdt_final_reset,
+ .exit = astbmc_exit,
.terminate = ipmi_terminate,
.op_display = op_display_lpc,
};
diff --git a/platforms/astbmc/palmetto.c b/platforms/astbmc/palmetto.c
index 546d5119..b0d4da25 100644
--- a/platforms/astbmc/palmetto.c
+++ b/platforms/astbmc/palmetto.c
@@ -117,7 +117,7 @@ DECLARE_PLATFORM(palmetto) = {
.elog_commit = ipmi_elog_commit,
.start_preload_resource = flash_start_preload_resource,
.resource_loaded = flash_resource_loaded,
- .exit = ipmi_wdt_final_reset,
+ .exit = astbmc_exit,
.terminate = ipmi_terminate,
.op_display = op_display_lpc,
};
diff --git a/platforms/astbmc/vesnin.c b/platforms/astbmc/vesnin.c
index f7e1844f..9ad5dccc 100644
--- a/platforms/astbmc/vesnin.c
+++ b/platforms/astbmc/vesnin.c
@@ -340,7 +340,7 @@ DECLARE_PLATFORM(vesnin) = {
.elog_commit = ipmi_elog_commit,
.start_preload_resource = flash_start_preload_resource,
.resource_loaded = flash_resource_loaded,
- .exit = ipmi_wdt_final_reset,
+ .exit = astbmc_exit,
.terminate = ipmi_terminate,
.op_display = op_display_lpc,
};
diff --git a/platforms/astbmc/zaius.c b/platforms/astbmc/zaius.c
index f3807a00..a122c2d6 100644
--- a/platforms/astbmc/zaius.c
+++ b/platforms/astbmc/zaius.c
@@ -250,7 +250,7 @@ DECLARE_PLATFORM(zaius) = {
.cec_power_down = astbmc_ipmi_power_down,
.cec_reboot = astbmc_ipmi_reboot,
.elog_commit = ipmi_elog_commit,
- .exit = ipmi_wdt_final_reset,
+ .exit = astbmc_exit,
.terminate = ipmi_terminate,
.ocapi = &zaius_ocapi,
.npu2_device_detect = npu2_i2c_presence_detect,
--
2.40.1
More information about the Skiboot
mailing list