diff options
Diffstat (limited to 'arch/arm/mach-mmp/mmp2.c')
| -rw-r--r-- | arch/arm/mach-mmp/mmp2.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/arm/mach-mmp/mmp2.c b/arch/arm/mach-mmp/mmp2.c index 7f5eb059bb01..daf3993349f8 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> |
| @@ -26,6 +27,7 @@ | |||
| 26 | #include <mach/mfp.h> | 27 | #include <mach/mfp.h> |
| 27 | #include <mach/gpio.h> | 28 | #include <mach/gpio.h> |
| 28 | #include <mach/devices.h> | 29 | #include <mach/devices.h> |
| 30 | #include <mach/mmp2.h> | ||
| 29 | 31 | ||
| 30 | #include "common.h" | 32 | #include "common.h" |
| 31 | #include "clock.h" | 33 | #include "clock.h" |
| @@ -158,6 +160,26 @@ static int __init mmp2_init(void) | |||
| 158 | } | 160 | } |
| 159 | postcore_initcall(mmp2_init); | 161 | postcore_initcall(mmp2_init); |
| 160 | 162 | ||
| 163 | static void __init mmp2_timer_init(void) | ||
| 164 | { | ||
| 165 | unsigned long clk_rst; | ||
| 166 | |||
| 167 | __raw_writel(APBC_APBCLK | APBC_RST, APBC_MMP2_TIMERS); | ||
| 168 | |||
| 169 | /* | ||
| 170 | * enable bus/functional clock, enable 6.5MHz (divider 4), | ||
| 171 | * release reset | ||
| 172 | */ | ||
| 173 | clk_rst = APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(1); | ||
| 174 | __raw_writel(clk_rst, APBC_MMP2_TIMERS); | ||
| 175 | |||
| 176 | timer_init(IRQ_MMP2_TIMER1); | ||
| 177 | } | ||
| 178 | |||
| 179 | struct sys_timer mmp2_timer = { | ||
| 180 | .init = mmp2_timer_init, | ||
| 181 | }; | ||
| 182 | |||
| 161 | /* on-chip devices */ | 183 | /* on-chip devices */ |
| 162 | MMP2_DEVICE(uart1, "pxa2xx-uart", 0, UART1, 0xd4030000, 0x30, 4, 5); | 184 | MMP2_DEVICE(uart1, "pxa2xx-uart", 0, UART1, 0xd4030000, 0x30, 4, 5); |
| 163 | MMP2_DEVICE(uart2, "pxa2xx-uart", 1, UART2, 0xd4017000, 0x30, 20, 21); | 185 | MMP2_DEVICE(uart2, "pxa2xx-uart", 1, UART2, 0xd4017000, 0x30, 20, 21); |
