devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/2] riscv: Use GCR.U timer device as clocksource
@ 2025-07-11 21:56 Aleksa Paunovic via B4 Relay
  2025-07-11 21:56 ` [PATCH v5 1/2] dt-bindings: timer: mti,gcru Aleksa Paunovic via B4 Relay
  2025-07-11 21:56 ` [PATCH v5 2/2] riscv: Allow for riscv-clock to pick up mmio address Aleksa Paunovic via B4 Relay
  0 siblings, 2 replies; 5+ messages in thread
From: Aleksa Paunovic via B4 Relay @ 2025-07-11 21:56 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Alexandre Ghiti
  Cc: linux-kernel, devicetree, linux-riscv, Djordje Todorovic,
	Aleksa Paunovic, Conor Dooley

This series adds bindings for the GCR.U timer device and corresponding
driver support. Accessing the memory mapped mtime register in the GCR.U
region should be faster than trapping to M mode each time the timer
needs to be read.

Signed-off-by: Aleksa Paunovic <aleksa.paunovic@htecgroup.com>
---
Changes in v5:
- Fixed build issues on 32-bit RISC-V and sparse warnings
- Remove clint_time_val and clint.h, replace with riscv_time_val
- Depend on RISCV_TIMER in Kconfig
Changes in v4:
- Remove "select" from mti,gcru.yaml.
- Refactor the driver to use function pointers instead of static keys.

Previous versions:
v1: https://lore.kernel.org/lkml/20241227150056.191794-1-arikalo@gmail.com/#t
v2: https://lore.kernel.org/linux-riscv/20250409143816.15802-1-aleksa.paunovic@htecgroup.com/
v3: https://lore.kernel.org/linux-riscv/DU0PR09MB61968695A2A3146EE83B7708F6BA2@DU0PR09MB6196.eurprd09.prod.outlook.com/
v4: https://lore.kernel.org/r/20250514-riscv-time-mmio-v4-0-cb0cf2922d66@htecgroup.com

---
Aleksa Paunovic (2):
      dt-bindings: timer: mti,gcru
      riscv: Allow for riscv-clock to pick up mmio address.

 .../devicetree/bindings/timer/mti,gcru.yaml        | 38 +++++++++++++
 arch/riscv/include/asm/clint.h                     | 26 ---------
 arch/riscv/include/asm/timex.h                     | 63 ++++++++++++----------
 drivers/clocksource/Kconfig                        | 12 +++++
 drivers/clocksource/timer-clint.c                  | 20 ++++---
 drivers/clocksource/timer-riscv.c                  | 34 ++++++++++++
 6 files changed, 128 insertions(+), 65 deletions(-)
---
base-commit: 19272b37aa4f83ca52bdf9c16d5d81bdd1354494
change-id: 20250424-riscv-time-mmio-5628e0fca8af

Best regards,
-- 
Aleksa Paunovic <aleksa.paunovic@htecgroup.com>



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

end of thread, other threads:[~2025-08-06 12:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-11 21:56 [PATCH v5 0/2] riscv: Use GCR.U timer device as clocksource Aleksa Paunovic via B4 Relay
2025-07-11 21:56 ` [PATCH v5 1/2] dt-bindings: timer: mti,gcru Aleksa Paunovic via B4 Relay
2025-07-14  7:24   ` Krzysztof Kozlowski
2025-08-06 12:35     ` Aleksa Paunovic
2025-07-11 21:56 ` [PATCH v5 2/2] riscv: Allow for riscv-clock to pick up mmio address Aleksa Paunovic via B4 Relay

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).