aboutsummaryrefslogtreecommitdiff
path: root/platforms
diff options
context:
space:
mode:
authorOliver O'Halloran <oohall@gmail.com>2019-07-11 17:41:44 +1000
committerStewart Smith <stewart@linux.ibm.com>2019-07-15 13:48:33 +1000
commit4c929bb54629fc60d8178383b4e5f854a8d1909c (patch)
treecc8c17c8abd00175c8df3428a4ee20567b4a6d03 /platforms
parent3af76b4e53b7102f25a3637629fc8b86bcfb86df (diff)
downloadskiboot-4c929bb54629fc60d8178383b4e5f854a8d1909c.zip
skiboot-4c929bb54629fc60d8178383b4e5f854a8d1909c.tar.gz
skiboot-4c929bb54629fc60d8178383b4e5f854a8d1909c.tar.bz2
ibm-fsp: Use finalise_dt() for DT fixups
>From Gautham's patch to fix pstates_init() that this was based on: > On FSP based systems (particularly POWER8), we perform > occ_pstates_init() late in the boot to allow OCC to be loaded. Hence > this was being performed in platform.exit(). occ_pstates_init() would > add pstate information into the device-tree. > > A recent commit 9fc0c1287ada ("Move FSP specific op-panel calls to > platform.exit()") moved the invocation of platform.exit() after the > creation of device-tree blob. As a result, on FSP based systems, we > don't have the pstate information in the device-tree, and thus the > Kernel is unable to perform frequency scaling. > > Fix this by moving occ_pstates_init() out of ibm_fsp_exit() and call > it before the creation of the device-tree blob. The same patch also broke fast-reboot on ZZ. Without this patch applied we get the following assert() fail when fast rebooting: [ 1153.398889405,5] CUPD: Waiting read marker LID and in flight parsm completion... [ 1153.398892228,3] Duplicate property "mi-version" in node /ibm,opal/firmware [ 1153.398894036,0] Aborting! CPU 0054 Backtrace: S: 0000000031ea39b0 R: 0000000030013828 .backtrace+0x34 S: 0000000031ea3a70 R: 000000003001b268 ._abort+0x4c S: 0000000031ea3af0 R: 0000000030027788 .new_property+0x80 S: 0000000031ea3b80 R: 00000000300278d0 .dt_add_property+0xa8 S: 0000000031ea3c10 R: 0000000030081a98 .fsp_code_update_wait_vpd+0x19c S: 0000000031ea3d10 R: 000000003008ff98 .ibm_fsp_exit+0x1c S: 0000000031ea3d80 R: 0000000030014864 .load_and_boot_kernel+0xb14 S: 0000000031ea3e60 R: 000000003002685c .fast_reboot_entry+0x38c S: 0000000031ea3f00 R: 0000000030002988 reset_fast_reboot_wakeup+0x40 This happens because fsp_code_update_wait_vpd(true) adds some properties to the DT so moving it to finalise_dt fixes that crash too. Cc: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Cc: Gautham R. Shenoy <ego@linux.vnet.ibm.com> Cc: Vaidyanathan Srinivasan <svaidy@linux.ibm.com> Fixes: 9fc0c1287ada ("Move FSP specific op-panel calls to platform.exit()") Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Tested-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com> Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'platforms')
-rw-r--r--platforms/ibm-fsp/common.c17
-rw-r--r--platforms/ibm-fsp/firenze.c1
-rw-r--r--platforms/ibm-fsp/ibm-fsp.h1
-rw-r--r--platforms/ibm-fsp/zz.c1
4 files changed, 14 insertions, 6 deletions
diff --git a/platforms/ibm-fsp/common.c b/platforms/ibm-fsp/common.c
index 7f7a1f2..6f9d57a 100644
--- a/platforms/ibm-fsp/common.c
+++ b/platforms/ibm-fsp/common.c
@@ -174,8 +174,11 @@ void ibm_fsp_init(void)
preload_io_vpd();
}
-void ibm_fsp_exit(void)
+void ibm_fsp_finalise_dt(bool is_reboot)
{
+ if (is_reboot)
+ return;
+
/*
* LED related SPCN commands might take a while to
* complete. Call this as late as possible to
@@ -183,18 +186,20 @@ void ibm_fsp_exit(void)
*/
create_led_device_nodes();
- /* Wait for FW VPD data read to complete */
- fsp_code_update_wait_vpd(true);
-
/*
* OCC takes few secs to boot. Call this as late as
* as possible to avoid delay.
*/
- if (fsp_present())
- occ_pstates_init();
+ occ_pstates_init();
+
+ /* Wait for FW VPD data read to complete */
+ fsp_code_update_wait_vpd(true);
fsp_console_select_stdout();
+}
+void ibm_fsp_exit(void)
+{
op_panel_disable_src_echo();
/* Clear SRCs on the op-panel when Linux starts */
diff --git a/platforms/ibm-fsp/firenze.c b/platforms/ibm-fsp/firenze.c
index 2328334..db18e2f 100644
--- a/platforms/ibm-fsp/firenze.c
+++ b/platforms/ibm-fsp/firenze.c
@@ -214,6 +214,7 @@ DECLARE_PLATFORM(firenze) = {
.probe = firenze_probe,
.init = firenze_init,
.fast_reboot_init = fsp_console_reset,
+ .finalise_dt = ibm_fsp_finalise_dt,
.exit = ibm_fsp_exit,
.cec_power_down = ibm_fsp_cec_power_down,
.cec_reboot = ibm_fsp_cec_reboot,
diff --git a/platforms/ibm-fsp/ibm-fsp.h b/platforms/ibm-fsp/ibm-fsp.h
index dc3969e..c055d4a 100644
--- a/platforms/ibm-fsp/ibm-fsp.h
+++ b/platforms/ibm-fsp/ibm-fsp.h
@@ -20,6 +20,7 @@
extern void ibm_fsp_init(void);
extern void ibm_fsp_exit(void);
+void ibm_fsp_finalise_dt(bool is_reboot);
extern int64_t ibm_fsp_cec_power_down(uint64_t request);
extern int64_t ibm_fsp_cec_reboot(void);
diff --git a/platforms/ibm-fsp/zz.c b/platforms/ibm-fsp/zz.c
index f44c618..e369f8d 100644
--- a/platforms/ibm-fsp/zz.c
+++ b/platforms/ibm-fsp/zz.c
@@ -79,6 +79,7 @@ DECLARE_PLATFORM(zz) = {
.probe = zz_probe,
.init = zz_init,
.fast_reboot_init = fsp_console_reset,
+ .finalise_dt = ibm_fsp_finalise_dt,
.exit = ibm_fsp_exit,
.cec_power_down = ibm_fsp_cec_power_down,
.cec_reboot = ibm_fsp_cec_reboot,