* [PATCH v4 0/3] clocksource/drivers/timer-ti-dm: Add clocksource and clockevent support
@ 2026-03-09 10:45 Markus Schneider-Pargmann (TI.com)
2026-03-09 10:45 ` [PATCH v4 1/3] clocksource/drivers/timer-ti-dm: Fix property name in comment Markus Schneider-Pargmann (TI.com)
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Markus Schneider-Pargmann (TI.com) @ 2026-03-09 10:45 UTC (permalink / raw)
To: Daniel Lezcano, Thomas Gleixner
Cc: Vishal Mahaveer, Kevin Hilman, Dhruva Gole, Sebin Francis,
Kendall Willis, Akashdeep Kaur, linux-kernel,
Markus Schneider-Pargmann (TI.com)
Hi,
this series adds support for both clocksource and clockevent to the TI
Dual-Mode Timer driver. This can be used as a time source for low power
modes in which the CPUs are temporarily not running.
The driver looks for two always on timers in the DT to be used for
clocksource and clockevent. These are then handled as reserved and can
not be used for normal use.
This series is based on v7.0-rc1.
Best
Markus
Signed-off-by: Markus Schneider-Pargmann (TI.com) <msp@baylibre.com>
---
Changes in v4:
- Rebased onto v7.0
- Link to v3: https://lore.kernel.org/r/20260204-topic-ti-dm-clkevt-v6-16-v3-0-83e65d01f4ae@baylibre.com
Changes in v3:
- Use devm_add_action_or_reset() to cleanup clocksource registration
- Use RESOURCE_SIZE_MAX instead of -1 if no timers suitable for
clocksource or clockevent were found
- Link to v2: https://lore.kernel.org/r/20251216-topic-ti-dm-clkevt-v6-16-v2-0-bfd7dd085c19@baylibre.com
Changes in v2:
- Rebased to v6.19-rc1
- Previous compile issues because of the __init section of
sched_clock_register() was solved upstream by removing it from the
__init section in
https://lore.kernel.org/r/20250602151853.1942521-8-daniel.lezcano@linaro.org
- Link to v1: https://lore.kernel.org/r/20250623-topic-ti-dm-clkevt-v6-16-v1-0-b00086761ee1@baylibre.com
---
Markus Schneider-Pargmann (TI.com) (3):
clocksource/drivers/timer-ti-dm: Fix property name in comment
clocksource/drivers/timer-ti-dm: Add clocksource support
clocksource/drivers/timer-ti-dm: Add clockevent support
drivers/clocksource/timer-ti-dm-systimer.c | 2 +-
drivers/clocksource/timer-ti-dm.c | 265 +++++++++++++++++++++++++++++
2 files changed, 266 insertions(+), 1 deletion(-)
---
base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
change-id: 20250623-topic-ti-dm-clkevt-v6-16-b5e6599b7c01
Best regards,
--
Markus Schneider-Pargmann (TI) <msp@baylibre.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v4 1/3] clocksource/drivers/timer-ti-dm: Fix property name in comment
2026-03-09 10:45 [PATCH v4 0/3] clocksource/drivers/timer-ti-dm: Add clocksource and clockevent support Markus Schneider-Pargmann (TI.com)
@ 2026-03-09 10:45 ` Markus Schneider-Pargmann (TI.com)
2026-03-09 10:45 ` [PATCH v4 2/3] clocksource/drivers/timer-ti-dm: Add clocksource support Markus Schneider-Pargmann (TI.com)
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Markus Schneider-Pargmann (TI.com) @ 2026-03-09 10:45 UTC (permalink / raw)
To: Daniel Lezcano, Thomas Gleixner
Cc: Vishal Mahaveer, Kevin Hilman, Dhruva Gole, Sebin Francis,
Kendall Willis, Akashdeep Kaur, linux-kernel,
Markus Schneider-Pargmann (TI.com)
ti,always-on property doesn't exist. ti,timer-alwon is meant here. Fix
this minor bug in the comment.
Signed-off-by: Markus Schneider-Pargmann (TI.com) <msp@baylibre.com>
---
drivers/clocksource/timer-ti-dm-systimer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clocksource/timer-ti-dm-systimer.c b/drivers/clocksource/timer-ti-dm-systimer.c
index eb0dfe4b9b7caf31c21dd065a69f38641cb0c053..3804c1234522499bb43cf174afc017cedb79ea38 100644
--- a/drivers/clocksource/timer-ti-dm-systimer.c
+++ b/drivers/clocksource/timer-ti-dm-systimer.c
@@ -226,7 +226,7 @@ static bool __init dmtimer_is_preferred(struct device_node *np)
* Some omap3 boards with unreliable oscillator must not use the counter_32k
* or dmtimer1 with 32 KiHz source. Additionally, the boards with unreliable
* oscillator should really set counter_32k as disabled, and delete dmtimer1
- * ti,always-on property, but let's not count on it. For these quirky cases,
+ * ti,timer-alwon property, but let's not count on it. For these quirky cases,
* we prefer using the always-on secure dmtimer12 with the internal 32 KiHz
* clock as the clocksource, and any available dmtimer as clockevent.
*
--
2.53.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v4 2/3] clocksource/drivers/timer-ti-dm: Add clocksource support
2026-03-09 10:45 [PATCH v4 0/3] clocksource/drivers/timer-ti-dm: Add clocksource and clockevent support Markus Schneider-Pargmann (TI.com)
2026-03-09 10:45 ` [PATCH v4 1/3] clocksource/drivers/timer-ti-dm: Fix property name in comment Markus Schneider-Pargmann (TI.com)
@ 2026-03-09 10:45 ` Markus Schneider-Pargmann (TI.com)
2026-03-09 10:45 ` [PATCH v4 3/3] clocksource/drivers/timer-ti-dm: Add clockevent support Markus Schneider-Pargmann (TI.com)
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Markus Schneider-Pargmann (TI.com) @ 2026-03-09 10:45 UTC (permalink / raw)
To: Daniel Lezcano, Thomas Gleixner
Cc: Vishal Mahaveer, Kevin Hilman, Dhruva Gole, Sebin Francis,
Kendall Willis, Akashdeep Kaur, linux-kernel,
Markus Schneider-Pargmann (TI.com)
Add support for using the TI Dual-Mode Timer as a clocksource. The
driver automatically picks the first timer that is marked as always-on
on with the "ti,timer-alwon" property to be the clocksource.
The timer can then be used for CPU independent time keeping.
Signed-off-by: Markus Schneider-Pargmann (TI.com) <msp@baylibre.com>
---
drivers/clocksource/timer-ti-dm.c | 137 ++++++++++++++++++++++++++++++++++++++
1 file changed, 137 insertions(+)
diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c
index 793e7cdcb1b16b58db3a81668e3c8144efc7baaf..75f38394e2598d76c41dd2b250c0c42f9f48bbe0 100644
--- a/drivers/clocksource/timer-ti-dm.c
+++ b/drivers/clocksource/timer-ti-dm.c
@@ -20,6 +20,7 @@
#include <linux/clk.h>
#include <linux/clk-provider.h>
+#include <linux/clocksource.h>
#include <linux/cpu_pm.h>
#include <linux/module.h>
#include <linux/io.h>
@@ -27,8 +28,10 @@
#include <linux/err.h>
#include <linux/pm_runtime.h>
#include <linux/of.h>
+#include <linux/of_address.h>
#include <linux/platform_device.h>
#include <linux/platform_data/dmtimer-omap.h>
+#include <linux/sched_clock.h>
#include <clocksource/timer-ti-dm.h>
#include <linux/delay.h>
@@ -148,6 +151,15 @@ static u32 omap_reserved_systimers;
static LIST_HEAD(omap_timer_list);
static DEFINE_SPINLOCK(dm_timer_lock);
+struct dmtimer_clocksource {
+ struct clocksource dev;
+ struct dmtimer *timer;
+ unsigned int loadval;
+};
+
+static resource_size_t omap_dm_timer_clocksource_base;
+static void __iomem *omap_dm_timer_sched_clock_counter;
+
enum {
REQUEST_ANY = 0,
REQUEST_BY_ID,
@@ -1185,6 +1197,117 @@ static const struct dev_pm_ops omap_dm_timer_pm_ops = {
static const struct of_device_id omap_timer_match[];
+static void omap_dm_timer_find_alwon(void)
+{
+ struct device_node *np;
+
+ for_each_matching_node(np, omap_timer_match) {
+ struct resource res;
+
+ if (!of_device_is_available(np))
+ continue;
+
+ if (!of_property_read_bool(np, "ti,timer-alwon"))
+ continue;
+
+ if (of_address_to_resource(np, 0, &res))
+ continue;
+
+ omap_dm_timer_clocksource_base = res.start;
+
+ of_node_put(np);
+ return;
+ }
+
+ omap_dm_timer_clocksource_base = RESOURCE_SIZE_MAX;
+}
+
+static struct dmtimer_clocksource *omap_dm_timer_to_clocksource(struct clocksource *cs)
+{
+ return container_of(cs, struct dmtimer_clocksource, dev);
+}
+
+static u64 omap_dm_timer_read_cycles(struct clocksource *cs)
+{
+ struct dmtimer_clocksource *clksrc = omap_dm_timer_to_clocksource(cs);
+ struct dmtimer *timer = clksrc->timer;
+
+ return (u64)__omap_dm_timer_read_counter(timer);
+}
+
+static u64 notrace omap_dm_timer_read_sched_clock(void)
+{
+ /* Posted mode is not active here, so we can read directly */
+ return readl_relaxed(omap_dm_timer_sched_clock_counter);
+}
+
+static void omap_dm_timer_clocksource_suspend(struct clocksource *cs)
+{
+ struct dmtimer_clocksource *clksrc = omap_dm_timer_to_clocksource(cs);
+ struct dmtimer *timer = clksrc->timer;
+
+ clksrc->loadval = __omap_dm_timer_read_counter(timer);
+ __omap_dm_timer_stop(timer);
+}
+
+static void omap_dm_timer_clocksource_resume(struct clocksource *cs)
+{
+ struct dmtimer_clocksource *clksrc = omap_dm_timer_to_clocksource(cs);
+ struct dmtimer *timer = clksrc->timer;
+
+ dmtimer_write(timer, OMAP_TIMER_COUNTER_REG, clksrc->loadval);
+ dmtimer_write(timer, OMAP_TIMER_CTRL_REG, OMAP_TIMER_CTRL_ST | OMAP_TIMER_CTRL_AR);
+}
+
+static void omap_dm_timer_clocksource_unregister(void *data)
+{
+ struct clocksource *cs = data;
+
+ clocksource_unregister(cs);
+}
+
+static int omap_dm_timer_setup_clocksource(struct dmtimer *timer)
+{
+ struct device *dev = &timer->pdev->dev;
+ struct dmtimer_clocksource *clksrc;
+ int err;
+
+ __omap_dm_timer_init_regs(timer);
+
+ timer->reserved = 1;
+
+ clksrc = devm_kzalloc(dev, sizeof(*clksrc), GFP_KERNEL);
+ if (!clksrc)
+ return -ENOMEM;
+
+ clksrc->timer = timer;
+
+ clksrc->dev.name = "omap_dm_timer";
+ clksrc->dev.rating = 300;
+ clksrc->dev.read = omap_dm_timer_read_cycles;
+ clksrc->dev.mask = CLOCKSOURCE_MASK(32);
+ clksrc->dev.flags = CLOCK_SOURCE_IS_CONTINUOUS;
+ clksrc->dev.suspend = omap_dm_timer_clocksource_suspend;
+ clksrc->dev.resume = omap_dm_timer_clocksource_resume;
+
+ dmtimer_write(timer, OMAP_TIMER_COUNTER_REG, 0);
+ dmtimer_write(timer, OMAP_TIMER_LOAD_REG, 0);
+ dmtimer_write(timer, OMAP_TIMER_CTRL_REG, OMAP_TIMER_CTRL_ST | OMAP_TIMER_CTRL_AR);
+
+ omap_dm_timer_sched_clock_counter = timer->func_base + _OMAP_TIMER_COUNTER_OFFSET;
+ sched_clock_register(omap_dm_timer_read_sched_clock, 32, timer->fclk_rate);
+
+ err = clocksource_register_hz(&clksrc->dev, timer->fclk_rate);
+ if (err)
+ return dev_err_probe(dev, err, "Could not register as clocksource\n");
+
+ err = devm_add_action_or_reset(dev, omap_dm_timer_clocksource_unregister, &clksrc->dev);
+ if (err)
+ return dev_err_probe(dev, err, "Could not register clocksource_unregister action\n");
+
+ return 0;
+}
+
/**
* omap_dm_timer_probe - probe function called for every registered device
* @pdev: pointer to current timer platform device
@@ -1198,8 +1321,12 @@ static int omap_dm_timer_probe(struct platform_device *pdev)
struct dmtimer *timer;
struct device *dev = &pdev->dev;
const struct dmtimer_platform_data *pdata;
+ struct resource *res;
int ret;
+ if (!omap_dm_timer_clocksource_base)
+ omap_dm_timer_find_alwon();
+
pdata = of_device_get_match_data(dev);
if (!pdata)
pdata = dev_get_platdata(dev);
@@ -1272,6 +1399,16 @@ static int omap_dm_timer_probe(struct platform_device *pdev)
timer->pdev = pdev;
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+
+ if (omap_dm_timer_clocksource_base && res &&
+ res->start == omap_dm_timer_clocksource_base &&
+ !IS_ERR_OR_NULL(timer->fclk)) {
+ ret = omap_dm_timer_setup_clocksource(timer);
+ if (ret)
+ return ret;
+ }
+
pm_runtime_enable(dev);
if (!timer->reserved) {
--
2.53.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v4 3/3] clocksource/drivers/timer-ti-dm: Add clockevent support
2026-03-09 10:45 [PATCH v4 0/3] clocksource/drivers/timer-ti-dm: Add clocksource and clockevent support Markus Schneider-Pargmann (TI.com)
2026-03-09 10:45 ` [PATCH v4 1/3] clocksource/drivers/timer-ti-dm: Fix property name in comment Markus Schneider-Pargmann (TI.com)
2026-03-09 10:45 ` [PATCH v4 2/3] clocksource/drivers/timer-ti-dm: Add clocksource support Markus Schneider-Pargmann (TI.com)
@ 2026-03-09 10:45 ` Markus Schneider-Pargmann (TI.com)
2026-04-23 17:55 ` [PATCH v4 0/3] clocksource/drivers/timer-ti-dm: Add clocksource and " Kevin Hilman
2026-04-23 17:58 ` Kevin Hilman
4 siblings, 0 replies; 6+ messages in thread
From: Markus Schneider-Pargmann (TI.com) @ 2026-03-09 10:45 UTC (permalink / raw)
To: Daniel Lezcano, Thomas Gleixner
Cc: Vishal Mahaveer, Kevin Hilman, Dhruva Gole, Sebin Francis,
Kendall Willis, Akashdeep Kaur, linux-kernel,
Markus Schneider-Pargmann (TI.com)
Add support for using the TI Dual-Mode Timer for clockevents. The second
always on device with the "ti,timer-alwon" property is selected to be
used for clockevents. The first one is used as clocksource.
This allows clockevents to be setup independently of the CPU.
Signed-off-by: Markus Schneider-Pargmann (TI.com) <msp@baylibre.com>
---
drivers/clocksource/timer-ti-dm.c | 138 ++++++++++++++++++++++++++++++++++++--
1 file changed, 133 insertions(+), 5 deletions(-)
diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c
index 75f38394e2598d76c41dd2b250c0c42f9f48bbe0..cefed71ac243e86e951405e50801239e35abe290 100644
--- a/drivers/clocksource/timer-ti-dm.c
+++ b/drivers/clocksource/timer-ti-dm.c
@@ -21,8 +21,10 @@
#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/clocksource.h>
+#include <linux/clockchips.h>
#include <linux/cpu_pm.h>
#include <linux/module.h>
+#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/device.h>
#include <linux/err.h>
@@ -157,7 +159,14 @@ struct dmtimer_clocksource {
unsigned int loadval;
};
+struct omap_dm_timer_clockevent {
+ struct clock_event_device dev;
+ struct dmtimer *timer;
+ u32 period;
+};
+
static resource_size_t omap_dm_timer_clocksource_base;
+static resource_size_t omap_dm_timer_clockevent_base;
static void __iomem *omap_dm_timer_sched_clock_counter;
enum {
@@ -1201,6 +1210,9 @@ static void omap_dm_timer_find_alwon(void)
{
struct device_node *np;
+ if (omap_dm_timer_clocksource_base && omap_dm_timer_clockevent_base)
+ return;
+
for_each_matching_node(np, omap_timer_match) {
struct resource res;
@@ -1213,13 +1225,22 @@ static void omap_dm_timer_find_alwon(void)
if (of_address_to_resource(np, 0, &res))
continue;
- omap_dm_timer_clocksource_base = res.start;
+ if (!omap_dm_timer_clocksource_base) {
+ omap_dm_timer_clocksource_base = res.start;
+ continue;
+ }
- of_node_put(np);
- return;
+ if (res.start != omap_dm_timer_clocksource_base) {
+ omap_dm_timer_clockevent_base = res.start;
+
+ of_node_put(np);
+ return;
+ }
}
- omap_dm_timer_clocksource_base = RESOURCE_SIZE_MAX;
+ if (!omap_dm_timer_clocksource_base)
+ omap_dm_timer_clocksource_base = RESOURCE_SIZE_MAX;
+ omap_dm_timer_clockevent_base = RESOURCE_SIZE_MAX;
}
static struct dmtimer_clocksource *omap_dm_timer_to_clocksource(struct clocksource *cs)
@@ -1308,6 +1329,105 @@ static int omap_dm_timer_setup_clocksource(struct dmtimer *timer)
return 0;
}
+static struct omap_dm_timer_clockevent *to_dm_timer_clockevent(struct clock_event_device *evt)
+{
+ return container_of(evt, struct omap_dm_timer_clockevent, dev);
+}
+
+static int omap_dm_timer_evt_set_next_event(unsigned long cycles,
+ struct clock_event_device *evt)
+{
+ struct omap_dm_timer_clockevent *clkevt = to_dm_timer_clockevent(evt);
+ struct dmtimer *timer = clkevt->timer;
+
+ dmtimer_write(timer, OMAP_TIMER_COUNTER_REG, 0xffffffff - cycles);
+ dmtimer_write(timer, OMAP_TIMER_CTRL_REG, OMAP_TIMER_CTRL_ST);
+
+ return 0;
+}
+
+static int omap_dm_timer_evt_shutdown(struct clock_event_device *evt)
+{
+ struct omap_dm_timer_clockevent *clkevt = to_dm_timer_clockevent(evt);
+ struct dmtimer *timer = clkevt->timer;
+
+ __omap_dm_timer_stop(timer);
+
+ return 0;
+}
+
+static int omap_dm_timer_evt_set_periodic(struct clock_event_device *evt)
+{
+ struct omap_dm_timer_clockevent *clkevt = to_dm_timer_clockevent(evt);
+ struct dmtimer *timer = clkevt->timer;
+
+ omap_dm_timer_evt_shutdown(evt);
+
+ omap_dm_timer_set_load(&timer->cookie, clkevt->period);
+ dmtimer_write(timer, OMAP_TIMER_COUNTER_REG, clkevt->period);
+ dmtimer_write(timer, OMAP_TIMER_CTRL_REG,
+ OMAP_TIMER_CTRL_AR | OMAP_TIMER_CTRL_ST);
+
+ return 0;
+}
+
+static irqreturn_t omap_dm_timer_evt_interrupt(int irq, void *dev_id)
+{
+ struct omap_dm_timer_clockevent *clkevt = dev_id;
+ struct dmtimer *timer = clkevt->timer;
+
+ __omap_dm_timer_write_status(timer, OMAP_TIMER_INT_OVERFLOW);
+
+ clkevt->dev.event_handler(&clkevt->dev);
+
+ return IRQ_HANDLED;
+}
+
+static int omap_dm_timer_setup_clockevent(struct dmtimer *timer)
+{
+ struct device *dev = &timer->pdev->dev;
+ struct omap_dm_timer_clockevent *clkevt;
+ int ret;
+
+ clkevt = devm_kzalloc(dev, sizeof(*clkevt), GFP_KERNEL);
+ if (!clkevt)
+ return -ENOMEM;
+
+ timer->reserved = 1;
+ clkevt->timer = timer;
+
+ clkevt->dev.name = "omap_dm_timer";
+ clkevt->dev.features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT;
+ clkevt->dev.rating = 300;
+ clkevt->dev.set_next_event = omap_dm_timer_evt_set_next_event;
+ clkevt->dev.set_state_shutdown = omap_dm_timer_evt_shutdown;
+ clkevt->dev.set_state_periodic = omap_dm_timer_evt_set_periodic;
+ clkevt->dev.set_state_oneshot = omap_dm_timer_evt_shutdown;
+ clkevt->dev.set_state_oneshot_stopped = omap_dm_timer_evt_shutdown;
+ clkevt->dev.tick_resume = omap_dm_timer_evt_shutdown;
+ clkevt->dev.cpumask = cpu_possible_mask;
+ clkevt->period = 0xffffffff - DIV_ROUND_CLOSEST(timer->fclk_rate, HZ);
+
+ __omap_dm_timer_init_regs(timer);
+ __omap_dm_timer_stop(timer);
+ __omap_dm_timer_enable_posted(timer);
+
+ ret = devm_request_irq(dev, timer->irq, omap_dm_timer_evt_interrupt,
+ IRQF_TIMER, "omap_dm_timer_clockevent", clkevt);
+ if (ret) {
+ dev_err(dev, "Failed to request interrupt: %d\n", ret);
+ return ret;
+ }
+
+ __omap_dm_timer_int_enable(timer, OMAP_TIMER_INT_OVERFLOW);
+
+ clockevents_config_and_register(&clkevt->dev, timer->fclk_rate,
+ 3,
+ 0xffffffff);
+
+ return 0;
+}
+
/**
* omap_dm_timer_probe - probe function called for every registered device
* @pdev: pointer to current timer platform device
@@ -1324,7 +1444,7 @@ static int omap_dm_timer_probe(struct platform_device *pdev)
struct resource *res;
int ret;
- if (!omap_dm_timer_clocksource_base)
+ if (!omap_dm_timer_clocksource_base || !omap_dm_timer_clockevent_base)
omap_dm_timer_find_alwon();
pdata = of_device_get_match_data(dev);
@@ -1401,6 +1521,14 @@ static int omap_dm_timer_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (omap_dm_timer_clockevent_base && res &&
+ res->start == omap_dm_timer_clockevent_base &&
+ !IS_ERR_OR_NULL(timer->fclk)) {
+ ret = omap_dm_timer_setup_clockevent(timer);
+ if (ret)
+ return ret;
+ }
+
if (omap_dm_timer_clocksource_base && res &&
res->start == omap_dm_timer_clocksource_base &&
!IS_ERR_OR_NULL(timer->fclk)) {
--
2.53.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v4 0/3] clocksource/drivers/timer-ti-dm: Add clocksource and clockevent support
2026-03-09 10:45 [PATCH v4 0/3] clocksource/drivers/timer-ti-dm: Add clocksource and clockevent support Markus Schneider-Pargmann (TI.com)
` (2 preceding siblings ...)
2026-03-09 10:45 ` [PATCH v4 3/3] clocksource/drivers/timer-ti-dm: Add clockevent support Markus Schneider-Pargmann (TI.com)
@ 2026-04-23 17:55 ` Kevin Hilman
2026-04-23 17:58 ` Kevin Hilman
4 siblings, 0 replies; 6+ messages in thread
From: Kevin Hilman @ 2026-04-23 17:55 UTC (permalink / raw)
To: Daniel Lezcano, Markus Schneider-Pargmann (TI.com)
Cc: Vishal Mahaveer, Dhruva Gole, Sebin Francis, Kendall Willis,
Akashdeep Kaur, linux-kernel, Markus Schneider-Pargmann (TI.com)
[ off list ]
"Markus Schneider-Pargmann (TI.com)" <msp@baylibre.com> writes:
> Hi,
>
> this series adds support for both clocksource and clockevent to the TI
> Dual-Mode Timer driver. This can be used as a time source for low power
> modes in which the CPUs are temporarily not running.
>
> The driver looks for two always on timers in the DT to be used for
> clocksource and clockevent. These are then handled as reserved and can
> not be used for normal use.
>
> This series is based on v7.0-rc1.
>
> Best
> Markus
>
> Signed-off-by: Markus Schneider-Pargmann (TI.com) <msp@baylibre.com>
> ---
> Changes in v4:
> - Rebased onto v7.0
> - Link to v3: https://lore.kernel.org/r/20260204-topic-ti-dm-clkevt-v6-16-v3-0-83e65d01f4ae@baylibre.com
>
> Changes in v3:
> - Use devm_add_action_or_reset() to cleanup clocksource registration
> - Use RESOURCE_SIZE_MAX instead of -1 if no timers suitable for
> clocksource or clockevent were found
> - Link to v2: https://lore.kernel.org/r/20251216-topic-ti-dm-clkevt-v6-16-v2-0-bfd7dd085c19@baylibre.com
>
> Changes in v2:
> - Rebased to v6.19-rc1
> - Previous compile issues because of the __init section of
> sched_clock_register() was solved upstream by removing it from the
> __init section in
> https://lore.kernel.org/r/20250602151853.1942521-8-daniel.lezcano@linaro.org
> - Link to v1: https://lore.kernel.org/r/20250623-topic-ti-dm-clkevt-v6-16-v1-0-b00086761ee1@baylibre.com
>
> ---
> Markus Schneider-Pargmann (TI.com) (3):
> clocksource/drivers/timer-ti-dm: Fix property name in comment
> clocksource/drivers/timer-ti-dm: Add clocksource support
> clocksource/drivers/timer-ti-dm: Add clockevent support
>
> drivers/clocksource/timer-ti-dm-systimer.c | 2 +-
> drivers/clocksource/timer-ti-dm.c | 265 +++++++++++++++++++++++++++++
> 2 files changed, 266 insertions(+), 1 deletion(-)
> ---
> base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
> change-id: 20250623-topic-ti-dm-clkevt-v6-16-b5e6599b7c01
>
> Best regards,
> --
> Markus Schneider-Pargmann (TI) <msp@baylibre.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v4 0/3] clocksource/drivers/timer-ti-dm: Add clocksource and clockevent support
2026-03-09 10:45 [PATCH v4 0/3] clocksource/drivers/timer-ti-dm: Add clocksource and clockevent support Markus Schneider-Pargmann (TI.com)
` (3 preceding siblings ...)
2026-04-23 17:55 ` [PATCH v4 0/3] clocksource/drivers/timer-ti-dm: Add clocksource and " Kevin Hilman
@ 2026-04-23 17:58 ` Kevin Hilman
4 siblings, 0 replies; 6+ messages in thread
From: Kevin Hilman @ 2026-04-23 17:58 UTC (permalink / raw)
To: Markus Schneider-Pargmann (TI.com), Daniel Lezcano,
Thomas Gleixner
Cc: Vishal Mahaveer, Dhruva Gole, Sebin Francis, Kendall Willis,
Akashdeep Kaur, linux-kernel, Markus Schneider-Pargmann (TI.com)
[ Updating Daniel's email, and gentle reminder ping ]
"Markus Schneider-Pargmann (TI.com)" <msp@baylibre.com> writes:
> Hi,
>
> this series adds support for both clocksource and clockevent to the TI
> Dual-Mode Timer driver. This can be used as a time source for low power
> modes in which the CPUs are temporarily not running.
>
> The driver looks for two always on timers in the DT to be used for
> clocksource and clockevent. These are then handled as reserved and can
> not be used for normal use.
>
> This series is based on v7.0-rc1.
>
> Best
> Markus
>
> Signed-off-by: Markus Schneider-Pargmann (TI.com) <msp@baylibre.com>
> ---
> Changes in v4:
> - Rebased onto v7.0
> - Link to v3: https://lore.kernel.org/r/20260204-topic-ti-dm-clkevt-v6-16-v3-0-83e65d01f4ae@baylibre.com
>
> Changes in v3:
> - Use devm_add_action_or_reset() to cleanup clocksource registration
> - Use RESOURCE_SIZE_MAX instead of -1 if no timers suitable for
> clocksource or clockevent were found
> - Link to v2: https://lore.kernel.org/r/20251216-topic-ti-dm-clkevt-v6-16-v2-0-bfd7dd085c19@baylibre.com
>
> Changes in v2:
> - Rebased to v6.19-rc1
> - Previous compile issues because of the __init section of
> sched_clock_register() was solved upstream by removing it from the
> __init section in
> https://lore.kernel.org/r/20250602151853.1942521-8-daniel.lezcano@linaro.org
> - Link to v1: https://lore.kernel.org/r/20250623-topic-ti-dm-clkevt-v6-16-v1-0-b00086761ee1@baylibre.com
>
> ---
> Markus Schneider-Pargmann (TI.com) (3):
> clocksource/drivers/timer-ti-dm: Fix property name in comment
> clocksource/drivers/timer-ti-dm: Add clocksource support
> clocksource/drivers/timer-ti-dm: Add clockevent support
>
> drivers/clocksource/timer-ti-dm-systimer.c | 2 +-
> drivers/clocksource/timer-ti-dm.c | 265 +++++++++++++++++++++++++++++
> 2 files changed, 266 insertions(+), 1 deletion(-)
> ---
> base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
> change-id: 20250623-topic-ti-dm-clkevt-v6-16-b5e6599b7c01
>
> Best regards,
> --
> Markus Schneider-Pargmann (TI) <msp@baylibre.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-04-23 17:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-09 10:45 [PATCH v4 0/3] clocksource/drivers/timer-ti-dm: Add clocksource and clockevent support Markus Schneider-Pargmann (TI.com)
2026-03-09 10:45 ` [PATCH v4 1/3] clocksource/drivers/timer-ti-dm: Fix property name in comment Markus Schneider-Pargmann (TI.com)
2026-03-09 10:45 ` [PATCH v4 2/3] clocksource/drivers/timer-ti-dm: Add clocksource support Markus Schneider-Pargmann (TI.com)
2026-03-09 10:45 ` [PATCH v4 3/3] clocksource/drivers/timer-ti-dm: Add clockevent support Markus Schneider-Pargmann (TI.com)
2026-04-23 17:55 ` [PATCH v4 0/3] clocksource/drivers/timer-ti-dm: Add clocksource and " Kevin Hilman
2026-04-23 17:58 ` Kevin Hilman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox