aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-nomadik/board-nhk8815.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-nomadik/board-nhk8815.c')
-rw-r--r--arch/arm/mach-nomadik/board-nhk8815.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/arm/mach-nomadik/board-nhk8815.c b/arch/arm/mach-nomadik/board-nhk8815.c
index 6bfd537d5afb..116394484e71 100644
--- a/arch/arm/mach-nomadik/board-nhk8815.c
+++ b/arch/arm/mach-nomadik/board-nhk8815.c
@@ -25,11 +25,18 @@
25#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
26#include <asm/mach/irq.h> 26#include <asm/mach/irq.h>
27#include <asm/mach/flash.h> 27#include <asm/mach/flash.h>
28
29#include <plat/mtu.h>
30
28#include <mach/setup.h> 31#include <mach/setup.h>
29#include <mach/nand.h> 32#include <mach/nand.h>
30#include <mach/fsmc.h> 33#include <mach/fsmc.h>
31#include "clock.h" 34#include "clock.h"
32 35
36/* Initial value for SRC control register: all timers use MXTAL/8 source */
37#define SRC_CR_INIT_MASK 0x00007fff
38#define SRC_CR_INIT_VAL 0x2aaa8000
39
33/* These adresses span 16MB, so use three individual pages */ 40/* These adresses span 16MB, so use three individual pages */
34static struct resource nhk8815_nand_resources[] = { 41static struct resource nhk8815_nand_resources[] = {
35 { 42 {
@@ -239,6 +246,26 @@ static struct platform_device *nhk8815_platform_devices[] __initdata = {
239 /* will add more devices */ 246 /* will add more devices */
240}; 247};
241 248
249static void __init nomadik_timer_init(void)
250{
251 u32 src_cr;
252
253 /* Configure timer sources in "system reset controller" ctrl reg */
254 src_cr = readl(io_p2v(NOMADIK_SRC_BASE));
255 src_cr &= SRC_CR_INIT_MASK;
256 src_cr |= SRC_CR_INIT_VAL;
257 writel(src_cr, io_p2v(NOMADIK_SRC_BASE));
258
259 /* Save global pointer to mtu, used by platform timer code */
260 mtu_base = io_p2v(NOMADIK_MTU0_BASE);
261
262 nmdk_timer_init();
263}
264
265static struct sys_timer nomadik_timer = {
266 .init = nomadik_timer_init,
267};
268
242static void __init nhk8815_platform_init(void) 269static void __init nhk8815_platform_init(void)
243{ 270{
244 int i; 271 int i;