summaryrefslogtreecommitdiff
path: root/drivers/timer
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2017-07-25 20:12:02 -0700
committerBin Meng <bmeng.cn@gmail.com>2017-08-01 20:17:02 +0800
commitfde1801eaa09adcbb26b53e53a52e5067e23d1dd (patch)
treec279116b7f7987d3f1f32073ed235e7b617ea65f /drivers/timer
parent0b992e4932303b0a379f590f67ec9759fc97275e (diff)
downloadu-boot-fde1801eaa09adcbb26b53e53a52e5067e23d1dd.tar.gz
u-boot-fde1801eaa09adcbb26b53e53a52e5067e23d1dd.tar.bz2
u-boot-fde1801eaa09adcbb26b53e53a52e5067e23d1dd.zip
x86: tsc: Remove the fail handling in try_msr_calibrate_tsc()
If either ratio or freq is zero, the return value is zero. There is no need to create a fail branch and return zero there. This keeps in sync with Linux kernel commit: 14bb4e3: x86/tsc_msr: Remove debugging messages Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/timer')
-rw-r--r--drivers/timer/tsc_timer.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/timer/tsc_timer.c b/drivers/timer/tsc_timer.c
index 4d01c9bce7..bdbecac196 100644
--- a/drivers/timer/tsc_timer.c
+++ b/drivers/timer/tsc_timer.c
@@ -103,9 +103,6 @@ static unsigned long __maybe_unused try_msr_calibrate_tsc(void)
}
debug("Maximum core-clock to bus-clock ratio: 0x%x\n", ratio);
- if (!ratio)
- goto fail;
-
if (freq_desc_tables[cpu_index].msr_plat == 2) {
/* TODO: Figure out how best to deal with this */
freq = FREQ_100;
@@ -118,18 +115,12 @@ static unsigned long __maybe_unused try_msr_calibrate_tsc(void)
debug("Resolved frequency ID: %u, frequency: %u KHz\n",
freq_id, freq);
}
- if (!freq)
- goto fail;
/* TSC frequency = maximum resolved freq * maximum resolved bus ratio */
res = freq * ratio / 1000;
debug("TSC runs at %lu MHz\n", res);
return res;
-
-fail:
- debug("Fast TSC calibration using MSR failed\n");
- return 0;
}
/*