[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9563edd5-aa0c-4a43-9a42-15fd34e1c918@linaro.org>
Date: Tue, 20 Jan 2026 16:04:33 +0100
From: Daniel Lezcano <daniel.lezcano@...aro.org>
To: "Markus Schneider-Pargmann (TI.com)" <msp@...libre.com>,
Thomas Gleixner <tglx@...utronix.de>
Cc: Vishal Mahaveer <vishalm@...com>, Kevin Hilman <khilman@...libre.com>,
Dhruva Gole <d-gole@...com>, Sebin Francis <sebin.francis@...com>,
Kendall Willis <k-willis@...com>, Akashdeep Kaur <a-kaur@...com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/3] clocksource/drivers/timer-ti-dm: Add clocksource
support
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@...libre.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
Powered by blists - more mailing lists