summaryrefslogtreecommitdiff
path: root/lib/sbi/sbi_timer.c
diff options
context:
space:
mode:
authorAnup Patel <anup.patel@wdc.com>2020-05-11 09:00:15 +0300
committerAnup Patel <anup@brainfault.org>2020-05-19 06:49:42 +0300
commit63b0f5f71a4d6bf8539a8cbfa27228dc76e7d71a (patch)
treeabbcdde88ebf1a646ef71829799718aa01a2fb3b /lib/sbi/sbi_timer.c
parent3a8fc8135714e39bef99cbf2a4b31e6f2f19a929 (diff)
downloadopensbi-63b0f5f71a4d6bf8539a8cbfa27228dc76e7d71a.tar.xz
include: sbi: Use scratch pointer as parmeter in HART feature APIs
It makes more sense to have scratch pointer as parameter in HART feature APIs because: 1. We already have scratch pointer at places where these APIs are used. 2. This is consistent with lot of other APIs in sbi_hart.h Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'lib/sbi/sbi_timer.c')
-rw-r--r--lib/sbi/sbi_timer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sbi/sbi_timer.c b/lib/sbi/sbi_timer.c
index 4a3ea24..b571b17 100644
--- a/lib/sbi/sbi_timer.c
+++ b/lib/sbi/sbi_timer.c
@@ -114,7 +114,7 @@ int sbi_timer_init(struct sbi_scratch *scratch, bool cold_boot)
if (ret)
return ret;
- if (sbi_hart_has_feature(current_hartid(), SBI_HART_HAS_TIME))
+ if (sbi_hart_has_feature(scratch, SBI_HART_HAS_TIME))
get_time_val = get_ticks;
else if (sbi_platform_has_timer_value(plat))
get_time_val = sbi_platform_timer_value;