Skip to content

Commit

Permalink
core/timer: Use platform heartmeat_time call for FSP platforms
Browse files Browse the repository at this point in the history
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
  • Loading branch information
stewartsmith committed Jun 24, 2019
1 parent 77b1709 commit 5f64c9e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core/timer.c
Expand Up @@ -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;
}

Expand Down
6 changes: 6 additions & 0 deletions platforms/ibm-fsp/common.c
Expand Up @@ -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;
}
1 change: 1 addition & 0 deletions platforms/ibm-fsp/firenze.c
Expand Up @@ -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,
};
3 changes: 3 additions & 0 deletions platforms/ibm-fsp/ibm-fsp.h
Expand Up @@ -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 */
1 change: 1 addition & 0 deletions platforms/ibm-fsp/zz.c
Expand Up @@ -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,
};

0 comments on commit 5f64c9e

Please sign in to comment.