All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@codeaurora.org>
To: Srinivas KANDAGATLA <srinivas.kandagatla@st.com>
Cc: John Stultz <john.stultz@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Grant Likely <grant.likely@linaro.org>,
	Rob Herring <rob.herring@calxeda.com>,
	Rob Landley <rob@landley.net>,
	devicetree-discuss@lists.ozlabs.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Linus Walleij <linus.walleij@linaro.org>,
	Stuart Menefy <stuart.menefy@st.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Rob Herring <robherring2@gmail.com>,
	Will Deacon <will.deacon@arm.com>
Subject: Re: [PATCH v5] clocksource:arm_global_timer: Add ARM global timer support.
Date: Mon, 24 Jun 2013 15:08:28 -0700	[thread overview]
Message-ID: <51C8C35C.70307@codeaurora.org> (raw)
In-Reply-To: <1372089195-29219-1-git-send-email-srinivas.kandagatla@st.com>

On 06/24/13 08:53, Srinivas KANDAGATLA wrote:
> +#include <linux/clkdev.h>

Why do you need this include?

> +#include <asm/mach/irq.h>

And this one?

> +static u64 gt_counter_read(void)
> +{
> +	u64 counter;
> +	u32 lower;
> +	u32 upper, old_upper;
> +
> +	upper = readl_relaxed(gt_base + GT_COUNTER1);
> +	do {
> +		old_upper = upper;
> +		lower = readl_relaxed(gt_base + GT_COUNTER0);
> +		upper = readl_relaxed(gt_base + GT_COUNTER1);
[snip]
> +static void gt_compare_set(unsigned long delta, int periodic)
> +{
> +	u64 counter = gt_counter_read();
> +	unsigned long ctrl = readl(gt_base + GT_CONTROL);
> +
> +	counter += delta;
> +	ctrl &=  ~(GT_CONTROL_COMP_ENABLE | GT_CONTROL_IRQ_ENABLE);
> +
> +	writel(ctrl, gt_base + GT_CONTROL);
> +	writel(lower_32_bits(counter), gt_base + GT_COMP0);
> +	writel(upper_32_bits(counter), gt_base + GT_COMP1);
> +
> +	if (periodic) {
> +		writel(delta, gt_base + GT_AUTO_INC);
> +		ctrl |= GT_CONTROL_AUTO_INC;
> +	}
> +
> +	ctrl |= GT_CONTROL_COMP_ENABLE | GT_CONTROL_IRQ_ENABLE;
> +	writel(ctrl, gt_base + GT_CONTROL);
> +}

Why is there a mix of the relaxed and non-relaxed io accessors?

> +#ifdef CONFIG_CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK
> +static u32 gt_sched_clock_read(void)

notrace

> +{
> +	if (!gt_base)
> +		return 0;

Seems impossible? Remove this check?

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation


  parent reply	other threads:[~2013-06-24 22:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-24 15:53 [PATCH v5] clocksource:arm_global_timer: Add ARM global timer support Srinivas KANDAGATLA
     [not found] ` <1372089195-29219-1-git-send-email-srinivas.kandagatla-qxv4g6HH51o@public.gmane.org>
2013-06-24 20:01   ` Thomas Gleixner
2013-06-24 20:01     ` Thomas Gleixner
2013-06-24 21:10     ` Srinivas KANDAGATLA
2013-06-24 20:06 ` Stephen Boyd
2013-06-24 21:08   ` Srinivas KANDAGATLA
2013-06-24 22:00     ` Stephen Boyd
     [not found]       ` <51C8C172.8020207-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2013-06-25  8:40         ` Srinivas KANDAGATLA
2013-06-25  8:40           ` Srinivas KANDAGATLA
2013-06-24 22:08 ` Stephen Boyd [this message]
2013-06-25  8:38   ` Srinivas KANDAGATLA

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=51C8C35C.70307@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=arnd@arndb.de \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@linaro.org \
    --cc=john.stultz@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rob.herring@calxeda.com \
    --cc=rob@landley.net \
    --cc=robherring2@gmail.com \
    --cc=srinivas.kandagatla@st.com \
    --cc=stuart.menefy@st.com \
    --cc=tglx@linutronix.de \
    --cc=will.deacon@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.