linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] Dedicated CLINT timer driver
@ 2020-05-21 13:45 Anup Patel
  2020-05-21 13:45 ` [PATCH 1/5] RISC-V: Add mechanism to provide custom IPI operations Anup Patel
                   ` (4 more replies)
  0 siblings, 5 replies; 23+ messages in thread
From: Anup Patel @ 2020-05-21 13:45 UTC (permalink / raw)
  To: Palmer Dabbelt, Paul Walmsley, Albert Ou, Rob Herring,
	Daniel Lezcano, Thomas Gleixner
  Cc: Damien Le Moal, Atish Patra, Alistair Francis, Anup Patel,
	linux-riscv, linux-kernel, devicetree, Anup Patel

The current RISC-V timer driver is convoluted and implements two
distinct timers:
 1. S-mode timer: This is for Linux RISC-V S-mode with MMU. The
    clocksource is implemented using TIME CSR and clockevent device
    is implemented using SBI Timer calls.
 2. M-mode timer: This is for Linux RISC-V M-mode without MMU. The
    clocksource is implemented using CLINT MMIO time register and
    clockevent device is implemented using CLINT MMIO timecmp registers.

This patchset removes clint related code from RISC-V timer driver and
arch/riscv directory. Instead, the series adds a dedicated MMIO based
CLINT driver under drivers/clocksource directory which can be used by
Linux RISC-V M-mode (i.e NoMMU Linux RISC-V).

The patchset is based up Linux-5.7-rc6 and can be found at riscv_clint_v1
branch of: https://github.com/avpatel/linux.git

These patches require "New RISC-V Local Interrupt Controller Driver"
which can be found at at riscv_intc_v5 branch of:
https://github.com/avpatel/linux.git

This series is tested on:
 1. QEMU RV64 virt machine using Linux RISC-V S-mode
 2. QEMU RV32 virt machine using Linux RISC-V S-mode
 3. QEMU RV64 virt machine using Linux RISC-V M-mode (i.e. NoMMU)

Anup Patel (5):
  RISC-V: Add mechanism to provide custom IPI operations
  RISC-V: Remove CLINT related code
  clocksource/drivers/timer-riscv: Remove MMIO related stuff
  clocksource/drivers: Add CLINT timer driver
  dt-bindings: timer: Add CLINT bindings

 .../bindings/timer/sifive,clint.txt           |  33 +++
 arch/riscv/Kconfig                            |   2 +-
 arch/riscv/include/asm/clint.h                |  39 ---
 arch/riscv/include/asm/smp.h                  |  11 +
 arch/riscv/include/asm/timex.h                |  28 +--
 arch/riscv/kernel/Makefile                    |   2 +-
 arch/riscv/kernel/clint.c                     |  44 ----
 arch/riscv/kernel/setup.c                     |   2 -
 arch/riscv/kernel/smp.c                       |  53 ++--
 arch/riscv/kernel/smpboot.c                   |   4 +-
 drivers/clocksource/Kconfig                   |  12 +-
 drivers/clocksource/Makefile                  |   1 +
 drivers/clocksource/timer-clint.c             | 226 ++++++++++++++++++
 drivers/clocksource/timer-riscv.c             |  17 +-
 include/linux/cpuhotplug.h                    |   1 +
 15 files changed, 330 insertions(+), 145 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/timer/sifive,clint.txt
 delete mode 100644 arch/riscv/include/asm/clint.h
 delete mode 100644 arch/riscv/kernel/clint.c
 create mode 100644 drivers/clocksource/timer-clint.c

-- 
2.25.1


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2020-06-27  5:40 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-21 13:45 [PATCH 0/5] Dedicated CLINT timer driver Anup Patel
2020-05-21 13:45 ` [PATCH 1/5] RISC-V: Add mechanism to provide custom IPI operations Anup Patel
2020-06-04 20:40   ` Palmer Dabbelt
2020-06-07  4:31     ` Anup Patel
2020-05-21 13:45 ` [PATCH 2/5] RISC-V: Remove CLINT related code Anup Patel
2020-06-04 20:40   ` Palmer Dabbelt
2020-06-07  4:13     ` Anup Patel
2020-05-21 13:45 ` [PATCH 3/5] clocksource/drivers/timer-riscv: Remove MMIO related stuff Anup Patel
2020-06-04 20:40   ` Palmer Dabbelt
2020-06-07  4:15     ` Anup Patel
2020-05-21 13:45 ` [PATCH 4/5] clocksource/drivers: Add CLINT timer driver Anup Patel
2020-06-04 20:40   ` Palmer Dabbelt
2020-06-07  4:26     ` Anup Patel
2020-05-21 13:45 ` [PATCH 5/5] dt-bindings: timer: Add CLINT bindings Anup Patel
2020-05-21 20:05   ` Sean Anderson
2020-05-22  5:54     ` Anup Patel
2020-05-22  6:29       ` Sean Anderson
2020-05-22  6:36         ` Anup Patel
2020-05-27  0:32         ` Palmer Dabbelt
2020-05-28 19:37           ` Sean Anderson
2020-05-28 23:18           ` Rob Herring
2020-06-27  5:40             ` Anup Patel
2020-06-04 20:40   ` Palmer Dabbelt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).