From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [patch 13/16] arm plat-mxc: Use clocksource based sched_clock
Date: Tue, 26 Apr 2011 09:23:52 +0200 [thread overview]
Message-ID: <20110426072351.GK14770@pengutronix.de> (raw)
In-Reply-To: <20110423205132.860828603@linutronix.de>
On Sat, Apr 23, 2011 at 08:54:53PM -0000, Thomas Gleixner wrote:
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> ---
> arch/arm/plat-mxc/time.c | 28 +++-------------------------
> 1 file changed, 3 insertions(+), 25 deletions(-)
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
>
> Index: linux-2.6-tip/arch/arm/plat-mxc/time.c
> ===================================================================
> --- linux-2.6-tip.orig/arch/arm/plat-mxc/time.c
> +++ linux-2.6-tip/arch/arm/plat-mxc/time.c
> @@ -27,7 +27,6 @@
> #include <linux/clk.h>
>
> #include <mach/hardware.h>
> -#include <asm/sched_clock.h>
> #include <asm/mach/time.h>
> #include <mach/common.h>
>
> @@ -106,17 +105,12 @@ static void gpt_irq_acknowledge(void)
> __raw_writel(V2_TSTAT_OF1, timer_base + V2_TSTAT);
> }
>
> -static cycle_t dummy_get_cycles(struct clocksource *cs)
> -{
> - return 0;
> -}
> -
> -static cycle_t mx1_2_get_cycles(struct clocksource *cs)
> +static cycle_t notrace mx1_2_get_cycles(struct clocksource *cs)
> {
> return __raw_readl(timer_base + MX1_2_TCN);
> }
>
> -static cycle_t v2_get_cycles(struct clocksource *cs)
> +static cycle_t notrace v2_get_cycles(struct clocksource *cs)
> {
> return __raw_readl(timer_base + V2_TCN);
> }
> @@ -124,25 +118,10 @@ static cycle_t v2_get_cycles(struct cloc
> static struct clocksource clocksource_mxc = {
> .name = "mxc_timer1",
> .rating = 200,
> - .read = dummy_get_cycles,
> .mask = CLOCKSOURCE_MASK(32),
> - .flags = CLOCK_SOURCE_IS_CONTINUOUS,
> + .flags = CLOCK_SOURCE_IS_CONTINUOUS | CLOCK_SOURCE_SCHED_CLOCK,
> };
>
> -static DEFINE_CLOCK_DATA(cd);
> -unsigned long long notrace sched_clock(void)
> -{
> - cycle_t cyc = clocksource_mxc.read(&clocksource_mxc);
> -
> - return cyc_to_sched_clock(&cd, cyc, (u32)~0);
> -}
> -
> -static void notrace mxc_update_sched_clock(void)
> -{
> - cycle_t cyc = clocksource_mxc.read(&clocksource_mxc);
> - update_sched_clock(&cd, cyc, (u32)~0);
> -}
> -
> static int __init mxc_clocksource_init(struct clk *timer_clk)
> {
> unsigned int c = clk_get_rate(timer_clk);
> @@ -152,7 +131,6 @@ static int __init mxc_clocksource_init(s
> else
> clocksource_mxc.read = mx1_2_get_cycles;
>
> - init_sched_clock(&cd, mxc_update_sched_clock, 32, c);
> clocksource_register_hz(&clocksource_mxc, c);
>
> return 0;
>
>
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2011-04-26 7:23 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-23 20:54 [patch 00/16] arm: Replace arm sched_clock by clocksource based sched_clock Thomas Gleixner
2011-04-23 20:54 ` [patch 01/16] time: Provide clocksource based sched_clock() Thomas Gleixner
2011-04-23 21:33 ` Stephen Boyd
2011-04-23 21:40 ` Thomas Gleixner
2011-04-25 7:10 ` Kukjin Kim
2011-04-26 16:36 ` Stephen Boyd
2011-04-23 20:54 ` [patch 02/16] arm: plat-orion: Use clocksource based sched_clock Thomas Gleixner
2011-04-23 20:54 ` [patch 03/16] arm: s5p: " Thomas Gleixner
2011-04-23 21:33 ` Stephen Boyd
2011-04-23 21:41 ` Thomas Gleixner
2011-04-25 7:08 ` Kukjin Kim
2011-04-23 20:54 ` [patch 04/16] arm: davinci: " Thomas Gleixner
2011-04-26 15:40 ` Nori, Sekhar
2011-04-23 20:54 ` [patch 05/16] arm: ixp4xx: " Thomas Gleixner
2011-04-23 20:54 ` [patch 06/16] arm: mmp: " Thomas Gleixner
2011-04-23 20:54 ` [patch 07/16] arm: omap: " Thomas Gleixner
2011-04-29 11:57 ` Tony Lindgren
2011-04-29 12:28 ` Thomas Gleixner
2011-04-29 12:51 ` Tony Lindgren
2011-04-29 14:19 ` Thomas Gleixner
2011-05-02 8:10 ` Tony Lindgren
2011-04-23 20:54 ` [patch 08/16] arm: pxa: " Thomas Gleixner
2011-04-25 16:25 ` Eric
2011-04-26 7:23 ` Sascha Hauer
2011-04-26 7:26 ` Eric Miao
2011-04-23 20:54 ` [patch 09/16] arm: sa1100: " Thomas Gleixner
2011-04-23 20:54 ` [patch 10/16] arm: tegra: " Thomas Gleixner
2011-04-23 20:54 ` [patch 11/16] arm: u300: " Thomas Gleixner
2011-04-24 7:03 ` Linus Walleij
2011-04-23 20:54 ` [patch 12/16] arm: plat-iop: " Thomas Gleixner
2011-04-23 20:54 ` [patch 13/16] arm plat-mxc: " Thomas Gleixner
2011-04-26 7:23 ` Sascha Hauer [this message]
2011-04-23 20:54 ` [patch 14/16] arm: nomadik: " Thomas Gleixner
2011-04-24 7:04 ` Linus Walleij
2011-04-23 20:54 ` [patch 15/16] arm: versatile: " Thomas Gleixner
2011-04-23 20:54 ` [patch 16/16] arm: Remove sched_clock code Thomas Gleixner
2011-04-25 7:11 ` Kukjin Kim
2011-04-24 7:27 ` [patch 00/16] arm: Replace arm sched_clock by clocksource based sched_clock Linus Walleij
2011-04-25 19:10 ` john stultz
2011-04-26 7:45 ` Linus Walleij
2011-04-26 8:50 ` Tony Lindgren
2011-04-26 8:02 ` Thomas Gleixner
2011-04-29 9:46 ` Russell King - ARM Linux
2011-04-29 10:22 ` Thomas Gleixner
2011-04-29 10:32 ` Tony Lindgren
2011-04-29 17:01 ` Thomas Gleixner
2011-04-29 21:53 ` Linus Walleij
2011-04-29 21:57 ` Thomas Gleixner
2011-05-02 8:18 ` Tony Lindgren
2011-05-08 20:34 ` Linus Walleij
2011-06-13 2:32 ` Rob Herring
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=20110426072351.GK14770@pengutronix.de \
--to=s.hauer@pengutronix.de \
--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).