[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200715173211.GA10993@atomide.com>
Date: Wed, 15 Jul 2020 10:32:11 -0700
From: Tony Lindgren <tony@...mide.com>
To: Grygorii Strashko <grygorii.strashko@...com>
Cc: Daniel Lezcano <daniel.lezcano@...aro.org>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org, linux-omap@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, Carlos Hernandez <ceh@...com>
Subject: Re: [PATCH] clocksource/drivers/timer-ti-dm: Fix suspend and resume
for am3 and am4
* Grygorii Strashko <grygorii.strashko@...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
Powered by blists - more mailing lists