diff options
author | Stewart Smith <stewart@linux.ibm.com> | 2019-06-18 17:29:20 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2019-06-24 15:59:07 +1000 |
commit | ddf48eae7697769a7bba57e3c06155ab79df37bd (patch) | |
tree | e9fe8e0a65cad0dfdbbe1191109b89fd61478860 | |
parent | d14cfe94cdbee46e4f83fd49194b94024de8b964 (diff) | |
download | skiboot-ddf48eae7697769a7bba57e3c06155ab79df37bd.zip skiboot-ddf48eae7697769a7bba57e3c06155ab79df37bd.tar.gz skiboot-ddf48eae7697769a7bba57e3c06155ab79df37bd.tar.bz2 |
fast-reboot: move platform specific bits to a platform call
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
-rw-r--r-- | core/fast-reboot.c | 4 | ||||
-rw-r--r-- | include/platform.h | 5 | ||||
-rw-r--r-- | platforms/ibm-fsp/firenze.c | 1 | ||||
-rw-r--r-- | platforms/ibm-fsp/zz.c | 1 |
4 files changed, 9 insertions, 2 deletions
diff --git a/core/fast-reboot.c b/core/fast-reboot.c index 07f83a3..35c9a2b 100644 --- a/core/fast-reboot.c +++ b/core/fast-reboot.c @@ -433,8 +433,8 @@ void __noreturn fast_reboot_entry(void) /* Start clearing memory */ start_mem_region_clear_unused(); - /* Poke the consoles (see comments in the code there) */ - fsp_console_reset(); + if (platform.fast_reboot_init) + platform.fast_reboot_init(); if (proc_gen == proc_gen_p8) { /* XXX */ diff --git a/include/platform.h b/include/platform.h index 9a77586..1a12718 100644 --- a/include/platform.h +++ b/include/platform.h @@ -125,6 +125,11 @@ struct platform { void (*init)(void); /* + * Called once every thread is back in skiboot as part of fast reboot. + */ + void (*fast_reboot_init)(void); + + /* * These are used to power down and reboot the machine */ int64_t (*cec_power_down)(uint64_t request); diff --git a/platforms/ibm-fsp/firenze.c b/platforms/ibm-fsp/firenze.c index 8f6a392..578bd15 100644 --- a/platforms/ibm-fsp/firenze.c +++ b/platforms/ibm-fsp/firenze.c @@ -211,6 +211,7 @@ DECLARE_PLATFORM(firenze) = { .name = "Firenze", .probe = firenze_probe, .init = firenze_init, + .fast_reboot_init = fsp_console_reset, .exit = ibm_fsp_exit, .cec_power_down = ibm_fsp_cec_power_down, .cec_reboot = ibm_fsp_cec_reboot, diff --git a/platforms/ibm-fsp/zz.c b/platforms/ibm-fsp/zz.c index 09599f8..c5ce01e 100644 --- a/platforms/ibm-fsp/zz.c +++ b/platforms/ibm-fsp/zz.c @@ -73,6 +73,7 @@ DECLARE_PLATFORM(zz) = { .name = "ZZ", .probe = zz_probe, .init = zz_init, + .fast_reboot_init = fsp_console_reset, .exit = ibm_fsp_exit, .cec_power_down = ibm_fsp_cec_power_down, .cec_reboot = ibm_fsp_cec_reboot, |