]> www.infradead.org Git - users/jedix/linux-maple.git/commit
clocksource/drivers: Add EcoNet Timer HPT driver
authorCaleb James DeLisle <cjd@cjdns.fr>
Wed, 7 May 2025 13:44:55 +0000 (13:44 +0000)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Fri, 16 May 2025 09:10:33 +0000 (11:10 +0200)
commit3b4c33ac87d0d11308f4445ecec2a124e2e77724
tree92b199e6334aa3cecc78b0a3ed83620184c7bd63
parent30fddbd5325459102e448c9a26a1bc15ef563381
clocksource/drivers: Add EcoNet Timer HPT driver

Introduce a clocksource driver for the so-called high-precision timer (HPT)
in the EcoNet EN751221 and EN751627 MIPS SoCs.

It's a 32 bit upward-counting one-shot timer which relies on the crystal so it
is unaffected by CPU power mode. On MIPS 34K devices (single core) there is
one timer, and on 1004K devices (dual core) there are two.

Each timer has two sets of count/compare registers so that there is one for
each of the VPEs on the core. Because each core has 2 VPEs, register selection
takes the CPU number / 2 for the timer corrisponding to the core, then CPU
number % 2 for the register corrisponding to the VPE.

These timers use a percpu-devid IRQ to route interrupts to the VPE which set
the event.

Signed-off-by: Caleb James DeLisle <cjd@cjdns.fr>
Link: https://lore.kernel.org/r/20250507134500.390547-3-cjd@cjdns.fr
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/clocksource/Kconfig
drivers/clocksource/Makefile
drivers/clocksource/timer-econet-en751221.c [new file with mode: 0644]