From: Lokesh Vutla <lokeshvutla@ti.com>
To: Tony Lindgren <tony@atomide.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>
Cc: Linux OMAP Mailing List <linux-omap@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <narmstrong@baylibre.com>,
Sekhar Nori <nsekhar@ti.com>, Tero Kristo <t-kristo@ti.com>,
Lokesh Vutla <lokeshvutla@ti.com>
Subject: [PATCH 2/2] clocksource: timer-ti-dm: Do not update counter on updating the period
Date: Mon, 24 Feb 2020 10:37:53 +0530 [thread overview]
Message-ID: <20200224050753.17784-3-lokeshvutla@ti.com> (raw)
In-Reply-To: <20200224050753.17784-1-lokeshvutla@ti.com>
Write to trigger register(OMAP_TIMER_TRIGGER_REG) will load the value
in Load register(OMAP_TIMER_LOAD_REG) into Counter register
(OMAP_TIMER_COUNTER_REG).
omap_dm_timer_set_load() writes into trigger register every time load
register is updated. When timer is configured in pwm mode, this causes
disruption in current pwm cycle, which is not expected especially when
pwm is used as PPS signal for synchronized PTP clocks. So do not write
into trigger register on updating the period.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
drivers/clocksource/timer-ti-dm.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c
index 40742715ed21..62b145ef3bb8 100644
--- a/drivers/clocksource/timer-ti-dm.c
+++ b/drivers/clocksource/timer-ti-dm.c
@@ -574,7 +574,6 @@ static int omap_dm_timer_set_load(struct omap_dm_timer *timer, int autoreload,
omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l);
omap_dm_timer_write_reg(timer, OMAP_TIMER_LOAD_REG, load);
- omap_dm_timer_write_reg(timer, OMAP_TIMER_TRIGGER_REG, 0);
/* Save the context */
timer->context.tclr = l;
timer->context.tldr = load;
--
2.23.0
next prev parent reply other threads:[~2020-02-24 5:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-24 5:07 [PATCH 0/2] clocksource: timer-ti-dm: Misc fixes for omap dm timer Lokesh Vutla
2020-02-24 5:07 ` [PATCH 1/2] clocksource: timer-ti-dm: Do not restore context on every timer enable Lokesh Vutla
2020-02-26 17:09 ` Tony Lindgren
2020-02-24 5:07 ` Lokesh Vutla [this message]
2020-02-26 17:29 ` [PATCH 2/2] clocksource: timer-ti-dm: Do not update counter on updating the period 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=20200224050753.17784-3-lokeshvutla@ti.com \
--to=lokeshvutla@ti.com \
--cc=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=narmstrong@baylibre.com \
--cc=nsekhar@ti.com \
--cc=t-kristo@ti.com \
--cc=tglx@linutronix.de \
--cc=tony@atomide.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;
as well as URLs for NNTP newsgroup(s).