aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorVasant Hegde <hegdevasant@linux.vnet.ibm.com>2021-08-04 12:51:37 +0530
committerVasant Hegde <hegdevasant@linux.vnet.ibm.com>2021-08-06 12:34:05 +0530
commit820d43c0a7751e75a8830561f35535dfffd522bd (patch)
tree6e0c96708f74fa9fc09518c9b0ddb1186a457369 /hw
parenta649c51cc134b2770e6ec166a778b6aa824e9810 (diff)
downloadskiboot-820d43c0a7751e75a8830561f35535dfffd522bd.zip
skiboot-820d43c0a7751e75a8830561f35535dfffd522bd.tar.gz
skiboot-820d43c0a7751e75a8830561f35535dfffd522bd.tar.bz2
hw/chiptod: Abort if core frequency is not set
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Reza Arbab <arbab@linux.ibm.com> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/chiptod.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/chiptod.c b/hw/chiptod.c
index fd94149..7c0a1ff 100644
--- a/hw/chiptod.c
+++ b/hw/chiptod.c
@@ -499,6 +499,12 @@ static void chiptod_setup_base_tfmr(void)
core_freq = dt_prop_get_u64(cpu, "ibm,extended-clock-frequency");
else
core_freq = dt_prop_get_u32(cpu, "clock-frequency");
+
+ if (!core_freq) {
+ prlog(PR_ERR, "CPU clock frequency is not set\n");
+ abort();
+ }
+
tod_freq = 32000000;
/* Calculate the "Max Cycles Between Steps" value according