linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Carlos Hernandez <ceh@ti.com>
Subject: Re: [PATCH] clocksource/drivers/timer-ti-dm: Fix suspend and resume for am3 and am4
Date: Wed, 15 Jul 2020 10:32:11 -0700	[thread overview]
Message-ID: <20200715173211.GA10993@atomide.com> (raw)
In-Reply-To: <1972bace-e9d1-b901-eb33-b4081a4b175d@ti.com>

* Grygorii Strashko <grygorii.strashko@ti.com> [200715 10:17]:
> On 13/07/2020 19:26, Tony Lindgren wrote:
> > @@ -653,8 +679,8 @@ static int __init dmtimer_clocksource_init(struct device_node *np)
> >   	dev->mask = CLOCKSOURCE_MASK(32);
> >   	dev->flags = CLOCK_SOURCE_IS_CONTINUOUS;
> > -	if (of_device_is_compatible(np, "ti,am33xx") ||
> > -	    of_device_is_compatible(np, "ti,am43")) {
> > +	/* Unlike for clockevent, legacy code sets suspend only for am4 */
> > +	if (of_machine_is_compatible("ti,am43")) {
> >   		dev->suspend = dmtimer_clocksource_suspend;
> >   		dev->resume = dmtimer_clocksource_resume;
> >   	}
> > 
> 
> It might be better to use SOC_BUS infra here, which is available on OMAP platforms by default,
> instead if DT. What do you think?

Well we have time_init() run very early, and some SoCs have only external
timers. So timer-ti-dm-systimer must be initialized early. And I think
soc_device_match() depends on soc_bus_register() that runs later at
core_initcall().

If you are thinking of something else, or we can use soc_device_match()
early, sure :) But sounds like that change should be a separate patch
then.

The reason for why we need to check for the SoC, we have the compatible
for ti,am335x-timer already in use on am3/4 and dm814x, so we can't use
TIMER_OF_DECLARE alone here.

Regards,

Tony

  reply	other threads:[~2020-07-15 17:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-13 16:26 [PATCH] clocksource/drivers/timer-ti-dm: Fix suspend and resume for am3 and am4 Tony Lindgren
2020-07-15 10:17 ` Grygorii Strashko
2020-07-15 17:32   ` Tony Lindgren [this message]
2020-07-15 18:43     ` Grygorii Strashko
2020-07-17 10:29 ` Daniel Lezcano
     [not found]   ` <f96cb9d8-c940-672a-b1d2-a26570d6f775@ti.com>
2020-07-20 13:56     ` Carlos Hernandez
2020-07-20 14:30     ` Tony Lindgren
2020-07-21  3:35       ` Sekhar Nori
2020-07-21 13:11   ` Carlos Hernandez
2020-07-21 13:49     ` Daniel Lezcano

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=20200715173211.GA10993@atomide.com \
    --to=tony@atomide.com \
    --cc=ceh@ti.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=grygorii.strashko@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).