From: Tony Lindgren <tony@atomide.com>
To: Daniel Lezcano <daniel.lezcano@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>,
Grygorii Strashko <grygorii.strashko@ti.com>,
Janusz Krzysztofik <jmkrzyszt@gmail.com>,
Keerthy <j-keerthy@ti.com>, Ladislav Michl <ladis@linux-mips.org>,
Nishanth Menon <nm@ti.com>, Suman Anna <s-anna@ti.com>,
Vignesh Raghavendra <vigneshr@ti.com>,
linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH 8/9] clocksource/drivers/timer-ti-dm: Add flag to detect omap1
Date: Mon, 15 Aug 2022 16:12:49 +0300 [thread overview]
Message-ID: <20220815131250.34603-9-tony@atomide.com> (raw)
In-Reply-To: <20220815131250.34603-1-tony@atomide.com>
Let's make it clear that some features need to be tested currently on
omap1. Only omap1 still uses platform_data.
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
drivers/clocksource/timer-ti-dm.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c
--- a/drivers/clocksource/timer-ti-dm.c
+++ b/drivers/clocksource/timer-ti-dm.c
@@ -133,6 +133,7 @@ struct dmtimer {
unsigned long rate;
unsigned reserved:1;
unsigned posted:1;
+ unsigned omap1:1;
struct timer_regs context;
int revision;
u32 capability;
@@ -423,7 +424,7 @@ static int omap_dm_timer_set_source(struct omap_dm_timer *cookie, int source)
* use the clock framework to set the parent clock. To be removed
* once OMAP1 migrated to using clock framework for dmtimers
*/
- if (pdata && pdata->set_timer_src)
+ if (timer->omap1 && pdata && pdata->set_timer_src)
return pdata->set_timer_src(timer->pdev, source);
#if defined(CONFIG_COMMON_CLK)
@@ -476,7 +477,7 @@ static int omap_dm_timer_prepare(struct dmtimer *timer)
* FIXME: OMAP1 devices do not use the clock framework for dmtimers so
* do not call clk_get() for these devices.
*/
- if (!(timer->capability & OMAP_TIMER_NEEDS_RESET)) {
+ if (!timer->omap1) {
timer->fclk = clk_get(&timer->pdev->dev, "fck");
if (WARN_ON_ONCE(IS_ERR(timer->fclk))) {
dev_err(&timer->pdev->dev, ": No fclk handle.\n");
@@ -763,7 +764,7 @@ static int omap_dm_timer_stop(struct omap_dm_timer *cookie)
dev = &timer->pdev->dev;
- if (!(timer->capability & OMAP_TIMER_NEEDS_RESET))
+ if (!timer->omap1)
rate = clk_get_rate(timer->fclk);
__omap_dm_timer_stop(timer, rate);
@@ -1119,6 +1120,8 @@ static int omap_dm_timer_probe(struct platform_device *pdev)
timer->reserved = omap_dm_timer_reserved_systimer(timer->id);
}
+ timer->omap1 = timer->capability & OMAP_TIMER_NEEDS_RESET;
+
if (!(timer->capability & OMAP_TIMER_ALWON)) {
timer->nb.notifier_call = omap_timer_context_notifier;
cpu_pm_register_notifier(&timer->nb);
--
2.37.1
next prev parent reply other threads:[~2022-08-15 13:14 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-15 13:12 [PATCH 0/9] Clean-up timer-ti-dm a bit Tony Lindgren
2022-08-15 13:12 ` [PATCH 1/9] clocksource/drivers/timer-ti-dm: Drop unused functions Tony Lindgren
2022-09-20 8:43 ` Daniel Lezcano
2022-10-04 9:27 ` [tip: timers/core] " tip-bot2 for Tony Lindgren
2022-08-15 13:12 ` [PATCH 2/9] clocksource/drivers/timer-ti-dm: Simplify register reads with dmtimer_read() Tony Lindgren
2022-10-04 9:27 ` [tip: timers/core] " tip-bot2 for Tony Lindgren
2022-08-15 13:12 ` [PATCH 3/9] clocksource/drivers/timer-ti-dm: Simplify register writes with dmtimer_write() Tony Lindgren
2022-10-04 9:27 ` [tip: timers/core] " tip-bot2 for Tony Lindgren
2022-08-15 13:12 ` [PATCH 4/9] clocksource/drivers/timer-ti-dm: Simplify register access further Tony Lindgren
2022-10-04 9:27 ` [tip: timers/core] " tip-bot2 for Tony Lindgren
2022-08-15 13:12 ` [PATCH 5/9] clocksource/drivers/timer-ti-dm: Move private defines to the driver Tony Lindgren
2022-10-04 9:27 ` [tip: timers/core] " tip-bot2 for Tony Lindgren
2022-08-15 13:12 ` [PATCH 6/9] clocksource/drivers/timer-ti-dm: Use runtime PM directly and check errors Tony Lindgren
2022-10-04 9:27 ` [tip: timers/core] " tip-bot2 for Tony Lindgren
2022-08-15 13:12 ` [PATCH 7/9] clocksource/drivers/timer-ti-dm: Move struct omap_dm_timer fields to driver Tony Lindgren
2022-10-04 9:27 ` [tip: timers/core] " tip-bot2 for Tony Lindgren
2022-08-15 13:12 ` Tony Lindgren [this message]
2022-10-04 9:27 ` [tip: timers/core] clocksource/drivers/timer-ti-dm: Add flag to detect omap1 tip-bot2 for Tony Lindgren
2022-08-15 13:12 ` [PATCH 9/9] clocksource/drivers/timer-ti-dm: Get clock in probe with devm_clk_get() Tony Lindgren
2022-10-04 9:27 ` [tip: timers/core] " tip-bot2 for Tony Lindgren
2022-08-22 22:29 ` [PATCH 0/9] Clean-up timer-ti-dm a bit Janusz Krzysztofik
2022-08-23 6:02 ` Tony Lindgren
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=20220815131250.34603-9-tony@atomide.com \
--to=tony@atomide.com \
--cc=aaro.koskinen@iki.fi \
--cc=daniel.lezcano@linaro.org \
--cc=grygorii.strashko@ti.com \
--cc=j-keerthy@ti.com \
--cc=jmkrzyszt@gmail.com \
--cc=ladis@linux-mips.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=nm@ti.com \
--cc=s-anna@ti.com \
--cc=tglx@linutronix.de \
--cc=vigneshr@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