[Skiboot] [PATCH 14/17] core/timer: Use platform heartmeat_time call for FSP platforms

Stewart Smith stewart at linux.ibm.com
Tue Jun 18 17:29:22 AEST 2019


Signed-off-by: Stewart Smith <stewart at linux.ibm.com>
---
 core/timer.c                | 2 +-
 platforms/ibm-fsp/common.c  | 6 ++++++
 platforms/ibm-fsp/firenze.c | 1 +
 platforms/ibm-fsp/ibm-fsp.h | 3 +++
 platforms/ibm-fsp/zz.c      | 1 +
 5 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/core/timer.c b/core/timer.c
index 1c539517839e..8f754cd480dc 100644
--- a/core/timer.c
+++ b/core/timer.c
@@ -278,7 +278,7 @@ void late_init_timers(void)
 		heartbeat = platform.heartbeat_time();
 	} else if (p9_sbe_timer_ok()) {
 		heartbeat = HEARTBEAT_DEFAULT_MS * 10;
-	} else if (p8_sbe_timer_ok() || fsp_present()) {
+	} else if (p8_sbe_timer_ok()) {
 		heartbeat = HEARTBEAT_DEFAULT_MS * 10;
 	}
 
diff --git a/platforms/ibm-fsp/common.c b/platforms/ibm-fsp/common.c
index 3bcb45801ea8..055a75ce2119 100644
--- a/platforms/ibm-fsp/common.c
+++ b/platforms/ibm-fsp/common.c
@@ -255,3 +255,9 @@ int64_t ibm_fsp_sensor_read(uint32_t sensor_hndl, int token,
 {
 	return fsp_opal_read_sensor(sensor_hndl, token, sensor_data);
 }
+
+int __attrconst fsp_heartbeat_time(void)
+{
+	/* Same as core/timer.c HEARTBEAT_DEFAULT_MS * 10 */
+	return 200 * 10;
+}
diff --git a/platforms/ibm-fsp/firenze.c b/platforms/ibm-fsp/firenze.c
index 43f1af9cbcd8..1aedc0576632 100644
--- a/platforms/ibm-fsp/firenze.c
+++ b/platforms/ibm-fsp/firenze.c
@@ -229,4 +229,5 @@ DECLARE_PLATFORM(firenze) = {
 	.terminate		= ibm_fsp_terminate,
 	.op_display		= fsp_op_display,
 	.vpd_iohub_load		= vpd_iohub_load,
+	.heartbeat_time		= fsp_heartbeat_time,
 };
diff --git a/platforms/ibm-fsp/ibm-fsp.h b/platforms/ibm-fsp/ibm-fsp.h
index 5466775277cf..c67202669a09 100644
--- a/platforms/ibm-fsp/ibm-fsp.h
+++ b/platforms/ibm-fsp/ibm-fsp.h
@@ -47,5 +47,8 @@ extern void firenze_pci_get_slot_info(struct phb *phb,
 void vpd_iohub_load(struct dt_node *hub_node);
 void vpd_preload(struct dt_node *hub_node);
 
+/* Platform heartbeat time */
+int fsp_heartbeat_time(void);
+
 
 #endif /*  __IBM_FSP_COMMON_H */
diff --git a/platforms/ibm-fsp/zz.c b/platforms/ibm-fsp/zz.c
index ac3e1c926cbb..87d06417d02f 100644
--- a/platforms/ibm-fsp/zz.c
+++ b/platforms/ibm-fsp/zz.c
@@ -93,4 +93,5 @@ DECLARE_PLATFORM(zz) = {
 	.npu2_device_detect	= npu2_i2c_presence_detect,
 	.op_display		= fsp_op_display,
 	.vpd_iohub_load		= vpd_iohub_load,
+	.heartbeat_time		= fsp_heartbeat_time,
 };
-- 
2.21.0



More information about the Skiboot mailing list