soc/intel: Remove blank lines before '}' and after '{'
[coreboot2.git] / src / mainboard / emulation / qemu-riscv / clint.c
blob10827faa10e99c31d879e73f3da617019a2f1e4e
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <mcall.h>
4 #include <device/mmio.h>
5 #include <mainboard/addressmap.h>
7 /* This function is used to initialize HLS()->time/HLS()->timecmp */
8 void mtime_init(void)
10 long hart_id = read_csr(mhartid);
11 HLS()->time = (uint64_t *)(QEMU_VIRT_CLINT + 0xbff8);
12 HLS()->timecmp = (uint64_t *)(QEMU_VIRT_CLINT + 0x4000 + 8 * hart_id);
15 void set_msip(int hartid, int val)
17 write32((void *)(QEMU_VIRT_CLINT + 4 * (uintptr_t)hartid), !!val);