Skip to content

Commit a38b1f6

Browse files
rjarzmikdlezcano
authored andcommitted
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 <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
1 parent 6f6caea commit a38b1f6

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

arch/arm/mach-pxa/generic.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@
2525
#include <asm/mach/map.h>
2626
#include <asm/mach-types.h>
2727

28+
#include <mach/irqs.h>
2829
#include <mach/reset.h>
2930
#include <mach/smemc.h>
3031
#include <mach/pxa3xx-regs.h>
3132

3233
#include "generic.h"
34+
#include <clocksource/pxa.h>
3335

3436
void clear_reset_status(unsigned int mask)
3537
{
@@ -56,6 +58,15 @@ unsigned long get_clock_tick_rate(void)
5658
}
5759
EXPORT_SYMBOL(get_clock_tick_rate);
5860

61+
/*
62+
* For non device-tree builds, keep legacy timer init
63+
*/
64+
void pxa_timer_init(void)
65+
{
66+
pxa_timer_nodt_init(IRQ_OST0, io_p2v(0x40a00000),
67+
get_clock_tick_rate());
68+
}
69+
5970
/*
6071
* Get the clock frequency as reflected by CCCR and the turbo flag.
6172
* We assume these values have been applied via a fcs.

include/clocksource/pxa.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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

0 commit comments

Comments
 (0)