summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/timer.c')
-rw-r--r--arch/arm/mach-omap2/timer.c44
1 files changed, 42 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index a35b65b27aae..5aac9716232e 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -46,7 +46,6 @@
#include <plat/omap_hwmod.h>
#include <plat/omap_device.h>
#include <plat/omap-pm.h>
-#include <mach/omap4-common.h>
#include "powerdomain.h"
@@ -342,6 +341,47 @@ OMAP_SYS_TIMER_INIT(3_secure, OMAP3_SECURE_TIMER, OMAP3_CLKEV_SOURCE,
OMAP_SYS_TIMER(3_secure)
#endif
+#if 0
+#ifdef CONFIG_ARM_SMP_TWD
+static struct resource omap4_twd_resources[] __initdata = {
+ {
+ .start = OMAP44XX_LOCAL_TWD_BASE,
+ .end = OMAP44XX_LOCAL_TWD_BASE + 0x10,
+ .flags = IORESOURCE_MEM,
+ },
+ {
+ .start = OMAP44XX_IRQ_LOCALTIMER,
+ .end = OMAP44XX_IRQ_LOCALTIMER,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static void __init omap4_twd_init(void)
+{
+ int err;
+
+ /* Local timers are not supprted on OMAP4430 ES1.0 */
+ if (omap_rev() == OMAP4430_REV_ES1_0)
+ return;
+
+ err = twd_timer_register(omap4_twd_resources,
+ ARRAY_SIZE(omap4_twd_resources));
+ if (err)
+ pr_err("twd_timer_register failed %d\n", err);
+}
+
+#else
+#define omap4_twd_init NULL
+#endif
+
+/* main twd code wants to see this, despite it is deprecated now */
+
+int __cpuinit local_timer_setup(struct clock_event_device *evt)
+{
+ return 0;
+}
+#endif
+
#ifdef CONFIG_ARCH_OMAP4
#ifdef CONFIG_LOCAL_TIMERS
static DEFINE_TWD_LOCAL_TIMER(twd_local_timer,
@@ -535,7 +575,7 @@ static int __init omap_timer_init(struct omap_hwmod *oh, void *unused)
pdata->get_context_loss_count = omap_pm_get_dev_context_loss_count;
#endif
pdev = omap_device_build(name, id, oh, pdata, sizeof(*pdata),
- NULL, 0, 0);
+ omap2_dmtimer_latency, ARRAY_SIZE(omap2_dmtimer_latency), 0);
if (IS_ERR(pdev)) {
pr_err("%s: Can't build omap_device for %s: %s.\n",