]> git.baikalelectronics.ru Git - kernel.git/commit
RISC-V: Resurrect the MMIO timer implementation for M-mode systems
authorPalmer Dabbelt <palmerdabbelt@google.com>
Mon, 14 Sep 2020 16:56:30 +0000 (09:56 -0700)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Sat, 19 Sep 2020 20:21:11 +0000 (13:21 -0700)
commit0db46a28e92b6bd00674121440a4b5b806de5fb1
tree23ca84b9c2f1ae9f5f1ac483bf72c60e9934786b
parent52a1b5b9595fcd0ba67e97e724d3c29ff8eb0537
RISC-V: Resurrect the MMIO timer implementation for M-mode systems

The K210 doesn't implement rdtime in M-mode, and since that's where Linux runs
in the NOMMU systems that means we can't use rdtime.  The K210 is the only
system that anyone is currently running NOMMU or M-mode on, so here we're just
inlining the timer read directly.

This also adds the CLINT driver as an !MMU dependency, as it's currently the
only timer driver availiable for these systems and without it we get a build
failure for some configurations.

Tested-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/Kconfig
arch/riscv/include/asm/clint.h [new file with mode: 0644]
arch/riscv/include/asm/timex.h
drivers/clocksource/timer-clint.c