aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx3/mx31ads.c
diff options
context:
space:
mode:
authorJuergen Beisert <j.beisert@pengutronix.de>2008-07-05 04:02:50 -0400
committerRobert Schwebel <r.schwebel@pengutronix.de>2008-07-05 04:02:50 -0400
commitd0f349fbce2905607e0473d2358f97f48866e52c (patch)
tree7b6892554648c4ab2eae4b29a054787399a49094 /arch/arm/mach-mx3/mx31ads.c
parent90292ea60f1c730efb9fea02b2e12676da89ebef (diff)
i.MXC family: Adding timer support
This patch adds timer support for the i.MX machine family. This code can be used on the following machs: - i.MX1 (tested) - i.MX2 (i.MX21 (to be tested), i.MX27 (tested)) - i.MX3 (i.MX31 (tested)) TODO: It seems impossible to build a kernel for more than one CPU because the timer do not follow the platform device rules. So it does only work if timer 1 can be accessed on all CPUs at the same address. Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx3/mx31ads.c')
-rw-r--r--arch/arm/mach-mx3/mx31ads.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/arm/mach-mx3/mx31ads.c b/arch/arm/mach-mx3/mx31ads.c
index 5addbb7f711c..eba3e0cd4283 100644
--- a/arch/arm/mach-mx3/mx31ads.c
+++ b/arch/arm/mach-mx3/mx31ads.c
@@ -26,6 +26,7 @@
26#include <asm/hardware.h> 26#include <asm/hardware.h>
27#include <asm/mach-types.h> 27#include <asm/mach-types.h>
28#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
29#include <asm/mach/time.h>
29#include <asm/memory.h> 30#include <asm/memory.h>
30#include <asm/mach/map.h> 31#include <asm/mach/map.h>
31#include <asm/arch/common.h> 32#include <asm/arch/common.h>
@@ -127,6 +128,16 @@ static void __init mxc_board_init(void)
127 mxc_init_extuart(); 128 mxc_init_extuart();
128} 129}
129 130
131static void __init mx31ads_timer_init(void)
132{
133 mxc_clocks_init(26000000);
134 mxc_timer_init("ipg_clk.0");
135}
136
137struct sys_timer mx31ads_timer = {
138 .init = mx31ads_timer_init,
139};
140
130/* 141/*
131 * The following uses standard kernel macros defined in arch.h in order to 142 * The following uses standard kernel macros defined in arch.h in order to
132 * initialize __mach_desc_MX31ADS data structure. 143 * initialize __mach_desc_MX31ADS data structure.
@@ -139,5 +150,5 @@ MACHINE_START(MX31ADS, "Freescale MX31ADS")
139 .map_io = mx31ads_map_io, 150 .map_io = mx31ads_map_io,
140 .init_irq = mxc_init_irq, 151 .init_irq = mxc_init_irq,
141 .init_machine = mxc_board_init, 152 .init_machine = mxc_board_init,
142 .timer = &mxc_timer, 153 .timer = &mx31ads_timer,
143MACHINE_END 154MACHINE_END