From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: "Markus Schneider-Pargmann (TI.com)" <msp@baylibre.com>,
Thomas Gleixner <tglx@linutronix.de>
Cc: Vishal Mahaveer <vishalm@ti.com>,
Kevin Hilman <khilman@baylibre.com>, Dhruva Gole <d-gole@ti.com>,
Sebin Francis <sebin.francis@ti.com>,
Kendall Willis <k-willis@ti.com>, Akashdeep Kaur <a-kaur@ti.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/3] clocksource/drivers/timer-ti-dm: Add clocksource support
Date: Tue, 20 Jan 2026 16:04:33 +0100 [thread overview]
Message-ID: <9563edd5-aa0c-4a43-9a42-15fd34e1c918@linaro.org> (raw)
In-Reply-To: <20251216-topic-ti-dm-clkevt-v6-16-v2-2-bfd7dd085c19@baylibre.com>
On 12/16/25 21:03, Markus Schneider-Pargmann (TI.com) wrote:
> 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>
> ---
[ ... ]
> +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;
> + timer->clksrc = clksrc;
This is a cyclic dependency which is not desired in general.
I suggest to have struct dmtimer_clocksource containing struct dmtimer timer
[ ... ]
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
next prev parent reply other threads:[~2026-01-20 15:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-16 20:03 [PATCH v2 0/3] clocksource/drivers/timer-ti-dm: Add clocksource and clockevent support Markus Schneider-Pargmann (TI.com)
2025-12-16 20:03 ` [PATCH v2 1/3] clocksource/drivers/timer-ti-dm: Fix property name in comment Markus Schneider-Pargmann (TI.com)
2025-12-16 20:03 ` [PATCH v2 2/3] clocksource/drivers/timer-ti-dm: Add clocksource support Markus Schneider-Pargmann (TI.com)
2026-01-20 15:04 ` Daniel Lezcano [this message]
2026-01-30 15:17 ` Markus Schneider-Pargmann
2025-12-16 20:03 ` [PATCH v2 3/3] clocksource/drivers/timer-ti-dm: Add clockevent support Markus Schneider-Pargmann (TI.com)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9563edd5-aa0c-4a43-9a42-15fd34e1c918@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=a-kaur@ti.com \
--cc=d-gole@ti.com \
--cc=k-willis@ti.com \
--cc=khilman@baylibre.com \
--cc=linux-kernel@vger.kernel.org \
--cc=msp@baylibre.com \
--cc=sebin.francis@ti.com \
--cc=tglx@linutronix.de \
--cc=vishalm@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®