diff options
author | Atish Patra <atish.patra@wdc.com> | 2019-02-13 05:32:06 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2019-02-14 07:01:18 +0300 |
commit | 70a474d2c24dc3e0c8841e6ef5cc96797deadbf5 (patch) | |
tree | 0c1456134e4815aadea0f523d7fb570454e23d0d /lib/sbi_timer.c | |
parent | 4cb4d46875dd0f0dd01d3ff1fee4f0d6cefb857a (diff) | |
download | opensbi-70a474d2c24dc3e0c8841e6ef5cc96797deadbf5.tar.xz |
lib: Use CSR_<FOO> instead of <foo> for csr_*()
Some older toolchains may not have all the csr's defined. Update all
the csr functions to use the CSR_ #define values instead of the
toolchain defined values.
Suggested-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'lib/sbi_timer.c')
-rw-r--r-- | lib/sbi_timer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/sbi_timer.c b/lib/sbi_timer.c index a72c280..a687a5f 100644 --- a/lib/sbi_timer.c +++ b/lib/sbi_timer.c @@ -56,14 +56,14 @@ void sbi_timer_event_start(struct sbi_scratch *scratch, u64 next_event) { sbi_platform_timer_event_start(sbi_platform_ptr(scratch), next_event); - csr_clear(mip, MIP_STIP); - csr_set(mie, MIP_MTIP); + csr_clear(CSR_MIP, MIP_STIP); + csr_set(CSR_MIE, MIP_MTIP); } void sbi_timer_process(struct sbi_scratch *scratch) { - csr_clear(mie, MIP_MTIP); - csr_set(mip, MIP_STIP); + csr_clear(CSR_MIE, MIP_MTIP); + csr_set(CSR_MIP, MIP_STIP); } int sbi_timer_init(struct sbi_scratch *scratch, bool cold_boot) |