aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/common.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2009-05-28 18:45:14 -0400
committerTony Lindgren <tony@atomide.com>2009-05-28 18:45:14 -0400
commitcd07ecc828486e5887113c7dc4d9f9022145811b (patch)
treef3950d6077a794d4500244b2f372c6912af15eec /arch/arm/plat-omap/common.c
parent4c50d22a0cf240918d53afbf9a8416a9d93aacee (diff)
parentb04e8975e70d9b2bc27c017f92b356b312692544 (diff)
Merge branch 'omap4' into for-next
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 86ee23d6f73c..ebcf006406f9 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
@@ -216,6 +220,15 @@ static cycle_t omap34xx_32k_read(struct clocksource *cs)
216#define omap34xx_32k_read NULL 220#define omap34xx_32k_read NULL
217#endif 221#endif
218 222
223#ifdef CONFIG_ARCH_OMAP4
224static cycle_t omap44xx_32k_read(struct clocksource *cs)
225{
226 return omap_readl(OMAP4430_32KSYNCT_BASE + 0x10);
227}
228#else
229#define omap44xx_32k_read NULL
230#endif
231
219/* 232/*
220 * Kernel assumes that sched_clock can be called early but may not have 233 * Kernel assumes that sched_clock can be called early but may not have
221 * things ready yet. 234 * things ready yet.
@@ -263,6 +276,8 @@ static int __init omap_init_clocksource_32k(void)
263 clocksource_32k.read = omap2430_32k_read; 276 clocksource_32k.read = omap2430_32k_read;
264 else if (cpu_is_omap34xx()) 277 else if (cpu_is_omap34xx())
265 clocksource_32k.read = omap34xx_32k_read; 278 clocksource_32k.read = omap34xx_32k_read;
279 else if (cpu_is_omap44xx())
280 clocksource_32k.read = omap44xx_32k_read;
266 else 281 else
267 return -ENODEV; 282 return -ENODEV;
268 283
@@ -350,3 +365,19 @@ void __init omap2_set_globals_343x(void)
350} 365}
351#endif 366#endif
352 367
368#if defined(CONFIG_ARCH_OMAP4)
369static struct omap_globals omap4_globals = {
370 .class = OMAP443X_CLASS,
371 .tap = OMAP2_IO_ADDRESS(0x4830a000),
372 .ctrl = OMAP2_IO_ADDRESS(OMAP443X_CTRL_BASE),
373 .prm = OMAP2_IO_ADDRESS(OMAP4430_PRM_BASE),
374 .cm = OMAP2_IO_ADDRESS(OMAP4430_CM_BASE),
375};
376
377void __init omap2_set_globals_443x(void)
378{
379 omap2_set_globals_tap(&omap4_globals);
380 omap2_set_globals_control(&omap4_globals);
381}
382#endif
383