summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/common.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2009-05-28 15:45:14 -0700
committerTony Lindgren <tony@atomide.com>2009-05-28 15:45:14 -0700
commitcd07ecc828486e5887113c7dc4d9f9022145811b (patch)
treef3950d6077a794d4500244b2f372c6912af15eec /arch/arm/plat-omap/common.c
parent4c50d22a0cf240918d53afbf9a8416a9d93aacee (diff)
parentb04e8975e70d9b2bc27c017f92b356b312692544 (diff)
downloadlinux-cd07ecc828486e5887113c7dc4d9f9022145811b.tar.bz2
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 @@
* linux/arch/arm/plat-omap/common.c
*
* Code common to all OMAP machines.
+ * The file is created by Tony Lindgren <tony@atomide.com>
+ *
+ * Copyright (C) 2009 Texas Instruments
+ * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com>
*
* This program is free software; you can redistribute it and/or modify
* 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)
#define omap34xx_32k_read NULL
#endif
+#ifdef CONFIG_ARCH_OMAP4
+static cycle_t omap44xx_32k_read(struct clocksource *cs)
+{
+ return omap_readl(OMAP4430_32KSYNCT_BASE + 0x10);
+}
+#else
+#define omap44xx_32k_read NULL
+#endif
+
/*
* Kernel assumes that sched_clock can be called early but may not have
* things ready yet.
@@ -263,6 +276,8 @@ static int __init omap_init_clocksource_32k(void)
clocksource_32k.read = omap2430_32k_read;
else if (cpu_is_omap34xx())
clocksource_32k.read = omap34xx_32k_read;
+ else if (cpu_is_omap44xx())
+ clocksource_32k.read = omap44xx_32k_read;
else
return -ENODEV;
@@ -350,3 +365,19 @@ void __init omap2_set_globals_343x(void)
}
#endif
+#if defined(CONFIG_ARCH_OMAP4)
+static struct omap_globals omap4_globals = {
+ .class = OMAP443X_CLASS,
+ .tap = OMAP2_IO_ADDRESS(0x4830a000),
+ .ctrl = OMAP2_IO_ADDRESS(OMAP443X_CTRL_BASE),
+ .prm = OMAP2_IO_ADDRESS(OMAP4430_PRM_BASE),
+ .cm = OMAP2_IO_ADDRESS(OMAP4430_CM_BASE),
+};
+
+void __init omap2_set_globals_443x(void)
+{
+ omap2_set_globals_tap(&omap4_globals);
+ omap2_set_globals_control(&omap4_globals);
+}
+#endif
+