diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-05-08 15:33:30 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-05-23 18:04:51 +0100 |
commit | bfe45e0be88d8a2e408226d473bff60da4a97d1f (patch) | |
tree | 4586e8933a35af1599f314adb73f2bae504b49b5 /arch/arm/plat-mxc/epit.c | |
parent | 234b6ceddb4fc2a4bc5b9a7670f070f6e69e0868 (diff) | |
download | linux-3.10-bfe45e0be88d8a2e408226d473bff60da4a97d1f.tar.gz linux-3.10-bfe45e0be88d8a2e408226d473bff60da4a97d1f.tar.bz2 linux-3.10-bfe45e0be88d8a2e408226d473bff60da4a97d1f.zip |
clocksource: convert ARM 32-bit down counting clocksources
Convert SP804, MXC, Nomadik and Orion 32-bit down-counting clocksources
to generic mmio clocksource infrastructure.
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Alessandro Rubini <rubini@unipv.it>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Cc: Lennert Buytenhek <kernel@wantstofly.org>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/plat-mxc/epit.c')
-rw-r--r-- | arch/arm/plat-mxc/epit.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/arch/arm/plat-mxc/epit.c b/arch/arm/plat-mxc/epit.c index d69d343ff61..d3467f818c3 100644 --- a/arch/arm/plat-mxc/epit.c +++ b/arch/arm/plat-mxc/epit.c @@ -83,26 +83,12 @@ static void epit_irq_acknowledge(void) __raw_writel(EPITSR_OCIF, timer_base + EPITSR); } -static cycle_t epit_read(struct clocksource *cs) -{ - return 0 - __raw_readl(timer_base + EPITCNR); -} - -static struct clocksource clocksource_epit = { - .name = "epit", - .rating = 200, - .read = epit_read, - .mask = CLOCKSOURCE_MASK(32), - .flags = CLOCK_SOURCE_IS_CONTINUOUS, -}; - static int __init epit_clocksource_init(struct clk *timer_clk) { unsigned int c = clk_get_rate(timer_clk); - clocksource_register_hz(&clocksource_epit, c); - - return 0; + return clocksource_mmio_init(timer_base + EPITCNR, "epit", c, 200, 32, + clocksource_mmio_readl_down); } /* clock event */ |