diff options
| author | Olof Johansson <[email protected]> | 2019-04-10 17:41:52 -0700 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2019-04-24 09:49:46 +0530 |
| commit | 10baa64c02f6746fd506136e0693aa2d592574fb (patch) | |
| tree | da00e48f0cb5d1434cbc7c31bb6ca15efa7d4564 /platform/common/sys | |
| parent | fbf986ac2a0b926ae97e6796b87e366610d7589e (diff) | |
all: run clang-format and update checked-in files
Noisy commit, no functional changes.
Generated with an current upstream clang-format and:
clang-format -i $(find . -name \*.[ch])
Signed-off-by: Olof Johansson <[email protected]>
Diffstat (limited to 'platform/common/sys')
| -rw-r--r-- | platform/common/sys/clint.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/platform/common/sys/clint.c b/platform/common/sys/clint.c index ee79a544..eba056f1 100644 --- a/platform/common/sys/clint.c +++ b/platform/common/sys/clint.c @@ -74,8 +74,8 @@ int clint_cold_ipi_init(unsigned long base, u32 hart_count) { /* Figure-out CLINT IPI register address */ clint_ipi_hart_count = hart_count; - clint_ipi_base = (void *)base; - clint_ipi = (u32 *)clint_ipi_base; + clint_ipi_base = (void *)base; + clint_ipi = (u32 *)clint_ipi_base; return 0; } @@ -105,7 +105,7 @@ void clint_timer_event_stop(void) if (clint_time_hart_count <= target_hart) return; - /* Clear CLINT Time Compare */ + /* Clear CLINT Time Compare */ #if __riscv_xlen == 64 writeq_relaxed(-1ULL, &clint_time_cmp[target_hart]); #else @@ -121,13 +121,14 @@ void clint_timer_event_start(u64 next_event) if (clint_time_hart_count <= target_hart) return; - /* Program CLINT Time Compare */ + /* Program CLINT Time Compare */ #if __riscv_xlen == 64 writeq_relaxed(next_event, &clint_time_cmp[target_hart]); #else u32 mask = -1UL; writel_relaxed(next_event & mask, &clint_time_cmp[target_hart]); - writel_relaxed(next_event >> 32, (void *)(&clint_time_cmp[target_hart]) + 0x04); + writel_relaxed(next_event >> 32, + (void *)(&clint_time_cmp[target_hart]) + 0x04); #endif } @@ -135,11 +136,10 @@ int clint_warm_timer_init(void) { u32 target_hart = sbi_current_hartid(); - if (clint_time_hart_count <= target_hart || - !clint_time_base) + if (clint_time_hart_count <= target_hart || !clint_time_base) return -1; - /* Clear CLINT Time Compare */ + /* Clear CLINT Time Compare */ #if __riscv_xlen == 64 writeq_relaxed(-1ULL, &clint_time_cmp[target_hart]); #else @@ -154,9 +154,9 @@ int clint_cold_timer_init(unsigned long base, u32 hart_count) { /* Figure-out CLINT Time register address */ clint_time_hart_count = hart_count; - clint_time_base = (void *)base; - clint_time_val = (u64 *)(clint_time_base + 0xbff8); - clint_time_cmp = (u64 *)(clint_time_base + 0x4000); + clint_time_base = (void *)base; + clint_time_val = (u64 *)(clint_time_base + 0xbff8); + clint_time_cmp = (u64 *)(clint_time_base + 0x4000); return 0; } |
