From: "Heiko Stübner" <heiko@sntech.de>
To: John Stultz <john.stultz@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Jamie Iles <jamie@jamieiles.com>,
Dinh Nguyen <dinguyen@altera.com>,
Grant Likely <grant.likely@linaro.org>,
linux-arm-kernel@lists.infradead.org,
Rob Herring <rob.herring@calxeda.com>,
devicetree-discuss@lists.ozlabs.org,
linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
Olof Johansson <olof@lixom.net>,
Ulrich Prinz <ulrich.prinz@googlemail.com>
Subject: Re: [PATCH 5/9] clocksource: dw_apb_timer: quirk for variants without EOI register
Date: Sat, 6 Jul 2013 00:58:51 +0200 [thread overview]
Message-ID: <201307060058.52177.heiko@sntech.de> (raw)
In-Reply-To: <201307060054.07784.heiko@sntech.de>
this patch should have had a
From: Ulrich Prinz <ulrich.prinz@googlemail.com>
sorry for the mistake
Am Samstag, 6. Juli 2013, 00:54:07 schrieb Heiko Stübner:
> Some variants of the dw_apb_timer don't have an eoi register but instead
> expect a one to be written to the int_status register at eoi time.
>
> Signed-off-by: Ulrich Prinz <ulrich.prinz@googlemail.com>
> ---
> drivers/clocksource/dw_apb_timer.c | 10 +++++++++-
> include/linux/dw_apb_timer.h | 5 +++++
> 2 files changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/clocksource/dw_apb_timer.c
> b/drivers/clocksource/dw_apb_timer.c index 5f80a30..23cd7c6 100644
> --- a/drivers/clocksource/dw_apb_timer.c
> +++ b/drivers/clocksource/dw_apb_timer.c
> @@ -104,6 +104,11 @@ static void apbt_eoi(struct dw_apb_timer *timer)
> apbt_readl(timer, timer->reg_eoi);
> }
>
> +static void apbt_eoi_int_status(struct dw_apb_timer *timer)
> +{
> + apbt_writel(timer, 1, timer->reg_int_status);
> +}
> +
> static irqreturn_t dw_apb_clockevent_irq(int irq, void *data)
> {
> struct clock_event_device *evt = data;
> @@ -286,7 +291,10 @@ dw_apb_clockevent_init(int cpu, const char *name,
> unsigned rating, IRQF_NOBALANCING |
> IRQF_DISABLED;
>
> - dw_ced->eoi = apbt_eoi;
> + if (quirks & APBTMR_QUIRK_NO_EOI)
> + dw_ced->eoi = apbt_eoi_int_status;
> + else
> + dw_ced->eoi = apbt_eoi;
> err = setup_irq(irq, &dw_ced->irqaction);
> if (err) {
> pr_err("failed to request timer irq\n");
> diff --git a/include/linux/dw_apb_timer.h b/include/linux/dw_apb_timer.h
> index 80f6686..fbe4c6b 100644
> --- a/include/linux/dw_apb_timer.h
> +++ b/include/linux/dw_apb_timer.h
> @@ -25,6 +25,11 @@
> */
> #define APBTMR_QUIRK_64BIT_COUNTER BIT(0)
>
> +/* The IP does not provide a end-of-interrupt register to clear pending
> + * interrupts, but requires to write a 1 to the interrupt-status register.
> + */
> +#define APBTMR_QUIRK_NO_EOI BIT(1)
> +
> struct dw_apb_timer {
> void __iomem *base;
> unsigned long freq;
next prev parent reply other threads:[~2013-07-05 22:59 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-05 22:51 [PATCH 0/9] clocksource: dw_apb_timer: support for timer variant used in rk3188 SoCs Heiko Stübner
2013-07-05 22:51 ` [PATCH 1/9] clocksource: dw_apb_timer: infrastructure to handle quirks Heiko Stübner
2013-07-05 22:52 ` [PATCH 2/9] clocksource: dw_apb_timer: flexible register addresses Heiko Stübner
2013-07-05 22:53 ` [PATCH 3/9] clocksource: dw_apb_timer: quirk for variants with 64bit counter Heiko Stübner
2013-07-05 23:45 ` Thomas Gleixner
2013-07-06 20:19 ` Ulrich Prinz
2013-07-05 22:53 ` [PATCH 4/9] clocksource: dw_apb_timer: use the eoi callback to clear pending interrupts Heiko Stübner
2013-07-05 22:59 ` Heiko Stübner
2013-07-05 22:54 ` [PATCH 5/9] clocksource: dw_apb_timer: quirk for variants without EOI register Heiko Stübner
2013-07-05 22:58 ` Heiko Stübner [this message]
2013-07-05 23:49 ` Thomas Gleixner
2013-07-05 22:54 ` [PATCH 6/9] clocksource: dw_apb_timer: quirk for inverted int mask Heiko Stübner
2013-07-05 22:58 ` Heiko Stübner
2013-07-05 23:51 ` Thomas Gleixner
2013-07-05 22:55 ` [PATCH 7/9] clocksource: dw_apb_timer: quirk for inverted timer mode setting Heiko Stübner
2013-07-05 22:56 ` [PATCH 8/9] clocksource: dw_apb_timer_of: add quirk handling Heiko Stübner
2013-07-05 22:56 ` [PATCH 9/9] clocksource: dw_apb_timer: special variant for rockchip rk3188 timers Heiko Stübner
2013-07-06 0:12 ` Thomas Gleixner
2013-07-06 20:28 ` Ulrich Prinz
2013-07-06 21:00 ` Thomas Gleixner
2013-07-11 22:44 ` Ulrich Prinz
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=201307060058.52177.heiko@sntech.de \
--to=heiko@sntech.de \
--cc=arnd@arndb.de \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=dinguyen@altera.com \
--cc=grant.likely@linaro.org \
--cc=jamie@jamieiles.com \
--cc=john.stultz@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=olof@lixom.net \
--cc=rob.herring@calxeda.com \
--cc=tglx@linutronix.de \
--cc=ulrich.prinz@googlemail.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