mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com>
To: "Markus Schneider-Pargmann (TI.com)" <msp@baylibre.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>,
	Thomas Gleixner <tglx@kernel.org>,
	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 v4 2/3] clocksource/drivers/timer-ti-dm: Add clocksource support
Date: Wed, 6 May 2026 17:11:31 +0200	[thread overview]
Message-ID: <aftaI34KTrJSgeyD@mai.linaro.org> (raw)
In-Reply-To: <20260309-topic-ti-dm-clkevt-v6-16-v4-2-bb8d2a04c45e@baylibre.com>

On Mon, Mar 09, 2026 at 11:45:47AM +0100, Markus Schneider-Pargmann 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>
> ---
>  drivers/clocksource/timer-ti-dm.c | 137 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 137 insertions(+)

[ ... ]

>  
>  	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;
> +	}

No please, this is very confusing.

 timer->capability |= OMAP_TIMER_ALWON is available
 res->start has not to be checked against omap_dm_timer_clocksource_base

Basically, you should endup with one change in this probe function.

  if (!omap_dm_timer_clocksource_base) {
    ret = omap_dm_timer_setup_clocksource(timer);
      if (ret)
        return ret;
  }

I suggest to do some cleanups in the driver in order to set the scene
for your changes.

> +
>  	pm_runtime_enable(dev);
>  
>  	if (!timer->reserved) {
> 
> -- 
> 2.53.0
> 

-- 

  reply	other threads:[~2026-05-06 15:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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-05-06 15:11   ` Daniel Lezcano [this message]
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

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=aftaI34KTrJSgeyD@mai.linaro.org \
    --to=daniel.lezcano@oss.qualcomm.com \
    --cc=a-kaur@ti.com \
    --cc=d-gole@ti.com \
    --cc=daniel.lezcano@linaro.org \
    --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@kernel.org \
    --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

Powered by JetHome