Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: pxa: Add non device-tree timer link to clocksource

As clocksource pxa_timer was moved to clocksource framework, the
pxa_timer initialization needs to be a bit amended, to pass the
necessary informations to clocksource, ie :
- the timer interrupt (mach specific)
- the timer registers base (ditto)
- the timer clockrate

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

authored by

Robert Jarzmik and committed by
Daniel Lezcano
a38b1f60 6f6caeaa

+29
+11
arch/arm/mach-pxa/generic.c
··· 25 25 #include <asm/mach/map.h> 26 26 #include <asm/mach-types.h> 27 27 28 + #include <mach/irqs.h> 28 29 #include <mach/reset.h> 29 30 #include <mach/smemc.h> 30 31 #include <mach/pxa3xx-regs.h> 31 32 32 33 #include "generic.h" 34 + #include <clocksource/pxa.h> 33 35 34 36 void clear_reset_status(unsigned int mask) 35 37 { ··· 57 55 return clock_tick_rate; 58 56 } 59 57 EXPORT_SYMBOL(get_clock_tick_rate); 58 + 59 + /* 60 + * For non device-tree builds, keep legacy timer init 61 + */ 62 + void pxa_timer_init(void) 63 + { 64 + pxa_timer_nodt_init(IRQ_OST0, io_p2v(0x40a00000), 65 + get_clock_tick_rate()); 66 + } 60 67 61 68 /* 62 69 * Get the clock frequency as reflected by CCCR and the turbo flag.
+18
include/clocksource/pxa.h
··· 1 + /* 2 + * PXA clocksource, clockevents, and OST interrupt handlers. 3 + * 4 + * Copyright (C) 2014 Robert Jarzmik 5 + * 6 + * This program is free software; you can redistribute it and/or modify 7 + * it under the terms of the GNU General Public License as published by 8 + * the Free Software Foundation; version 2 of the License. 9 + * 10 + */ 11 + 12 + #ifndef _CLOCKSOURCE_PXA_H 13 + #define _CLOCKSOURCE_PXA_H 14 + 15 + extern void pxa_timer_nodt_init(int irq, void __iomem *base, 16 + unsigned long clock_tick_rate); 17 + 18 + #endif