]> asedeno.scripts.mit.edu Git - linux.git/commit
riscv: add support for MMIO access to the timer registers
authorChristoph Hellwig <hch@lst.de>
Mon, 28 Oct 2019 12:10:37 +0000 (13:10 +0100)
committerPaul Walmsley <paul.walmsley@sifive.com>
Wed, 13 Nov 2019 22:10:40 +0000 (14:10 -0800)
commit4f9bbcefa142862782275a4b29f390ca8d8b9242
tree5a2bf6fa74323148ba54e12bd828b16a77a26604
parent8bf90f320d9ab4d642cdc0c1c5f05e8aa0a68db6
riscv: add support for MMIO access to the timer registers

When running in M-mode we can't use the SBI to set the timer, and
don't have access to the time CSR as that usually is emulated by
M-mode.  Instead provide code that directly accesses the MMIO for
the timer.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Anup Patel <anup@brainfault.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de> # for drivers/clocksource
[paul.walmsley@sifive.com: updated to apply; fixed checkpatch
 issue; timex.h now includes asm/mmio.h to resolve header file
 problems]
Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
arch/riscv/include/asm/sbi.h
arch/riscv/include/asm/timex.h
drivers/clocksource/timer-riscv.c