aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mmp/mmp2.c
diff options
context:
space:
mode:
authorEric Miao <eric.y.miao@gmail.com>2010-07-15 09:54:20 -0400
committerEric Miao <eric.y.miao@gmail.com>2010-08-05 02:34:45 -0400
commit4d4a339dd51390066d09701876a499996f1a5fdc (patch)
treeb65deef07a2c7ce037e58effdc5fc039dfb339dc /arch/arm/mach-mmp/mmp2.c
parent8022887cda044524610ef2a5a45feb9d96b11b4f (diff)
[ARM] mmp: move mmp2 specific timer code to mmp2.c
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/mach-mmp/mmp2.c')
-rw-r--r--arch/arm/mach-mmp/mmp2.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/mach-mmp/mmp2.c b/arch/arm/mach-mmp/mmp2.c
index 7f5eb059bb01..b3fddacc7cb5 100644
--- a/arch/arm/mach-mmp/mmp2.c
+++ b/arch/arm/mach-mmp/mmp2.c
@@ -17,6 +17,7 @@
17 17
18#include <asm/hardware/cache-tauros2.h> 18#include <asm/hardware/cache-tauros2.h>
19 19
20#include <asm/mach/time.h>
20#include <mach/addr-map.h> 21#include <mach/addr-map.h>
21#include <mach/regs-apbc.h> 22#include <mach/regs-apbc.h>
22#include <mach/regs-apmu.h> 23#include <mach/regs-apmu.h>
@@ -158,6 +159,26 @@ static int __init mmp2_init(void)
158} 159}
159postcore_initcall(mmp2_init); 160postcore_initcall(mmp2_init);
160 161
162static void __init mmp2_timer_init(void)
163{
164 unsigned long clk_rst;
165
166 __raw_writel(APBC_APBCLK | APBC_RST, APBC_MMP2_TIMERS);
167
168 /*
169 * enable bus/functional clock, enable 6.5MHz (divider 4),
170 * release reset
171 */
172 clk_rst = APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(1);
173 __raw_writel(clk_rst, APBC_MMP2_TIMERS);
174
175 timer_init(IRQ_MMP2_TIMER1);
176}
177
178struct sys_timer mmp2_timer = {
179 .init = mmp2_timer_init,
180};
181
161/* on-chip devices */ 182/* on-chip devices */
162MMP2_DEVICE(uart1, "pxa2xx-uart", 0, UART1, 0xd4030000, 0x30, 4, 5); 183MMP2_DEVICE(uart1, "pxa2xx-uart", 0, UART1, 0xd4030000, 0x30, 4, 5);
163MMP2_DEVICE(uart2, "pxa2xx-uart", 1, UART2, 0xd4017000, 0x30, 20, 21); 184MMP2_DEVICE(uart2, "pxa2xx-uart", 1, UART2, 0xd4017000, 0x30, 20, 21);