linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: daniel.lezcano@linaro.org (Daniel Lezcano)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/7] clocksource/cadence_ttc: Adjust interval in clock notifier
Date: Tue, 12 Nov 2013 17:29:45 +0100	[thread overview]
Message-ID: <52825779.2050106@linaro.org> (raw)
In-Reply-To: <1383945677-29674-5-git-send-email-soren.brinkmann@xilinx.com>

On 11/08/2013 10:21 PM, Soren Brinkmann wrote:
> The clockevent has to be reprogrammed if the timer's input
> clock frequency changes and the timer is in periodic mode, in order to
> maintain the correct timer interval.
>
> Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
> ---
>   drivers/clocksource/cadence_ttc_timer.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/drivers/clocksource/cadence_ttc_timer.c b/drivers/clocksource/cadence_ttc_timer.c
> index a92350b55d32..68a336038d8f 100644
> --- a/drivers/clocksource/cadence_ttc_timer.c
> +++ b/drivers/clocksource/cadence_ttc_timer.c
> @@ -338,6 +338,10 @@ static int ttc_rate_change_clockevent_cb(struct notifier_block *nb,
>   		/* update cached frequency */
>   		ttc->freq = ndata->new_rate;
>
> +		if (ttcce->ce.mode == CLOCK_EVT_MODE_PERIODIC)
> +			ttc_set_interval(ttc, DIV_ROUND_CLOSEST(ttc->freq,
> +						PRESCALE * HZ));
> +

Couldn't be racy ?

>   		/* fall through */
>   	}
>   	case PRE_RATE_CHANGE:
>


-- 
  <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

  reply	other threads:[~2013-11-12 16:29 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-08 21:21 [PATCH 0/7] arm: zynq: cpufreq support Soren Brinkmann
2013-11-08 21:21 ` [PATCH 1/7] arm: dt: zynq: Remove 'clock-ranges' from TTC nodes Soren Brinkmann
2013-11-12 15:29   ` Daniel Lezcano
2013-11-08 21:21 ` [PATCH 2/7] arm: dt: zynq: Add 'cpus' node Soren Brinkmann
2013-11-11 18:57   ` Sudeep KarkadaNagesha
2013-11-12 18:06     ` Sören Brinkmann
2013-11-12 21:58       ` Sören Brinkmann
2013-11-13  9:54         ` Sudeep KarkadaNagesha
2013-11-08 21:21 ` [PATCH 3/7] clocksource/cadence_ttc: Store timer frequency in driver data Soren Brinkmann
2013-11-12 16:26   ` Daniel Lezcano
2013-11-08 21:21 ` [PATCH 4/7] clocksource/cadence_ttc: Adjust interval in clock notifier Soren Brinkmann
2013-11-12 16:29   ` Daniel Lezcano [this message]
2013-11-22 18:06     ` Sören Brinkmann
2013-11-08 21:21 ` [PATCH 5/7] clocksource/cadence_ttc: Overhaul clocksource frequency adjustment Soren Brinkmann
2013-11-12 19:01   ` Daniel Lezcano
2013-11-12 21:13     ` Sören Brinkmann
2013-11-13  8:03     ` Viresh Kumar
2013-11-13 10:29       ` Daniel Lezcano
2013-11-13 17:14       ` Sören Brinkmann
2013-11-23  1:30     ` Sören Brinkmann
2013-11-08 21:21 ` [PATCH 6/7] clocksource/cadence_ttc: Use only one counter Soren Brinkmann
2013-11-08 21:21 ` [PATCH 7/7] arm: zynq: Add support for cpufreq Soren Brinkmann

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=52825779.2050106@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).