aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/common.c
diff options
context:
space:
mode:
authorSantosh Shilimkar <santosh.shilimkar@ti.com>2009-05-28 17:16:04 -0400
committerTony Lindgren <tony@atomide.com>2009-05-28 17:16:04 -0400
commit44169075e6eaa87bab6a296209d8d0610879b394 (patch)
tree4aca7ea61215bb50d647476de30c558859c2f2f3 /arch/arm/plat-omap/common.c
parent7419045016e5002b3ccee72b28e41bf53dca68f2 (diff)
ARM: OMAP4: Add minimal support for omap4
This patch adds the support for OMAP4. The platform and machine specific headers and sources updated for OMAP4430 SDP platform. OMAP4430 is Texas Instrument's SOC based on ARM Cortex-A9 SMP architecture. It's a dual core SOC with GIC used for interrupt handling and SCU for cache coherency. Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap/common.c')
-rw-r--r--arch/arm/plat-omap/common.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c
index 70b68ef83201..66738c3854c3 100644
--- a/arch/arm/plat-omap/common.c
+++ b/arch/arm/plat-omap/common.c
@@ -2,6 +2,10 @@
2 * linux/arch/arm/plat-omap/common.c 2 * linux/arch/arm/plat-omap/common.c
3 * 3 *
4 * Code common to all OMAP machines. 4 * Code common to all OMAP machines.
5 * The file is created by Tony Lindgren <tony@atomide.com>
6 *
7 * Copyright (C) 2009 Texas Instruments
8 * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com>
5 * 9 *
6 * This program is free software; you can redistribute it and/or modify 10 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as 11 * it under the terms of the GNU General Public License version 2 as
@@ -217,6 +221,15 @@ static cycle_t omap34xx_32k_read(struct clocksource *cs)
217#define omap34xx_32k_read NULL 221#define omap34xx_32k_read NULL
218#endif 222#endif
219 223
224#ifdef CONFIG_ARCH_OMAP4
225static cycle_t omap44xx_32k_read(struct clocksource *cs)
226{
227 return omap_readl(OMAP4430_32KSYNCT_BASE + 0x10);
228}
229#else
230#define omap44xx_32k_read NULL
231#endif
232
220/* 233/*
221 * Kernel assumes that sched_clock can be called early but may not have 234 * Kernel assumes that sched_clock can be called early but may not have
222 * things ready yet. 235 * things ready yet.
@@ -264,6 +277,8 @@ static int __init omap_init_clocksource_32k(void)
264 clocksource_32k.read = omap2430_32k_read; 277 clocksource_32k.read = omap2430_32k_read;
265 else if (cpu_is_omap34xx()) 278 else if (cpu_is_omap34xx())
266 clocksource_32k.read = omap34xx_32k_read; 279 clocksource_32k.read = omap34xx_32k_read;
280 else if (cpu_is_omap44xx())
281 clocksource_32k.read = omap44xx_32k_read;
267 else 282 else
268 return -ENODEV; 283 return -ENODEV;
269 284
@@ -351,3 +366,19 @@ void __init omap2_set_globals_343x(void)
351} 366}
352#endif 367#endif
353 368
369#if defined(CONFIG_ARCH_OMAP4)
370static struct omap_globals omap4_globals = {
371 .class = OMAP443X_CLASS,
372 .tap = OMAP2_IO_ADDRESS(0x4830a000),
373 .ctrl = OMAP2_IO_ADDRESS(OMAP443X_CTRL_BASE),
374 .prm = OMAP2_IO_ADDRESS(OMAP4430_PRM_BASE),
375 .cm = OMAP2_IO_ADDRESS(OMAP4430_CM_BASE),
376};
377
378void __init omap2_set_globals_443x(void)
379{
380 omap2_set_globals_tap(&omap4_globals);
381 omap2_set_globals_control(&omap4_globals);
382}
383#endif
384