diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-05-08 17:10:14 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-05-23 18:04:52 +0100 |
commit | d6e15d78537d2483bff05f0ee5b5cec6c4678fd5 (patch) | |
tree | c2300cafb150461f7f5035008c708a37b4e83279 /arch/arm/plat-spear | |
parent | c5039f52329ff796d7fea9024e5615abee02dbfb (diff) | |
download | linux-d6e15d78537d2483bff05f0ee5b5cec6c4678fd5.tar.gz linux-d6e15d78537d2483bff05f0ee5b5cec6c4678fd5.tar.bz2 linux-d6e15d78537d2483bff05f0ee5b5cec6c4678fd5.zip |
clocksource: convert SPEAr platforms 16-bit up counting clocksource
Convert SPEAr platforms 16-bit up counting clocksource, which requires
a 16-bit register access read rather than 32-bit.
Acked-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/plat-spear')
-rw-r--r-- | arch/arm/plat-spear/time.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/arch/arm/plat-spear/time.c b/arch/arm/plat-spear/time.c index dbb6e4fff79d..0c77e4298675 100644 --- a/arch/arm/plat-spear/time.c +++ b/arch/arm/plat-spear/time.c @@ -70,19 +70,6 @@ static void clockevent_set_mode(enum clock_event_mode mode, static int clockevent_next_event(unsigned long evt, struct clock_event_device *clk_event_dev); -static cycle_t clocksource_read_cycles(struct clocksource *cs) -{ - return (cycle_t) readw(gpt_base + COUNT(CLKSRC)); -} - -static struct clocksource clksrc = { - .name = "tmr1", - .rating = 200, /* its a pretty decent clock */ - .read = clocksource_read_cycles, - .mask = 0xFFFF, /* 16 bits */ - .flags = CLOCK_SOURCE_IS_CONTINUOUS, -}; - static void spear_clocksource_init(void) { u32 tick_rate; @@ -103,7 +90,8 @@ static void spear_clocksource_init(void) writew(val, gpt_base + CR(CLKSRC)); /* register the clocksource */ - clocksource_register_hz(&clksrc, tick_rate); + clocksource_mmio_init(gpt_base + COUNT(CLKSRC), "tmr1", tick_rate, + 200, 16, clocksource_mmio_readw_up); } static struct clock_event_device clkevt = { |