summaryrefslogtreecommitdiff
path: root/drivers/clocksource
diff options
context:
space:
mode:
authorPeng Du <pdu@nvidia.com>2013-11-14 13:50:44 -0800
committerTom Cherry <tcherry@nvidia.com>2014-01-21 15:14:12 -0800
commitd725217e2cc5d3551fde3afe62577fd1dc4036ad (patch)
tree2cd122ed7f9fe5836ac9effb7e1045eea751ea02 /drivers/clocksource
parentd4fac315cee86f0a1cf792fa46ac6861a09acf3e (diff)
drivers: clocksource: fix Tegra timers for ARM64
Change-Id: Ie719ad8337d22e23377ce5f283af755802f60de4 Signed-off-by: Peng Du <pdu@nvidia.com>
Diffstat (limited to 'drivers/clocksource')
-rw-r--r--drivers/clocksource/Makefile2
-rw-r--r--drivers/clocksource/tegra-nvtimers.c4
-rw-r--r--drivers/clocksource/tegra-tsc-timer.c8
3 files changed, 8 insertions, 6 deletions
diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile
index ee5306157091..cccd451eda75 100644
--- a/drivers/clocksource/Makefile
+++ b/drivers/clocksource/Makefile
@@ -31,4 +31,6 @@ obj-$(CONFIG_CLKSRC_METAG_GENERIC) += metag_generic.o
obj-$(CONFIG_CLK_SRC_TEGRA_TIMER) += tegra-nvtimers.o
obj-$(CONFIG_CLK_SRC_TEGRA_TIMER) += tegra-wakeup-nvtimers.o
+ifneq ($(CONFIG_ARM64),y)
obj-$(CONFIG_ARM_ARCH_TIMER) += tegra-tsc-timer.o
+endif
diff --git a/drivers/clocksource/tegra-nvtimers.c b/drivers/clocksource/tegra-nvtimers.c
index 9d78a692a5b3..219ab865dc34 100644
--- a/drivers/clocksource/tegra-nvtimers.c
+++ b/drivers/clocksource/tegra-nvtimers.c
@@ -612,6 +612,7 @@ void __init tegra_init_timer(struct device_node *np)
tegra_clockevent.irq = tegra_timer_irq.irq;
clockevents_register_device(&tegra_clockevent);
+#ifndef CONFIG_ARM64
#ifdef CONFIG_ARM_ARCH_TIMER
/* Architectural timers take precedence over broadcast timers.
Only register a broadcast clockevent device if architectural
@@ -621,10 +622,13 @@ void __init tegra_init_timer(struct device_node *np)
/* Architectural timers do not exist or cannot be initialzied.
Fall back to using the broadcast timer as the sched clock. */
setup_sched_clock(tegra_read_sched_clock, 32, 1000000);
+#endif
register_syscore_ops(&tegra_timer_syscore_ops);
+#ifndef CONFIG_ARM64
late_time_init = tegra_init_late_timer;
+#endif
//arm_delay_ops.delay = __tegra_delay;
//arm_delay_ops.const_udelay = __tegra_const_udelay;
diff --git a/drivers/clocksource/tegra-tsc-timer.c b/drivers/clocksource/tegra-tsc-timer.c
index a56f963fd136..764e8b453ed4 100644
--- a/drivers/clocksource/tegra-tsc-timer.c
+++ b/drivers/clocksource/tegra-tsc-timer.c
@@ -61,20 +61,16 @@ static void __iomem *tsc;
#define TSC_CNTFID0 0x20 /* TSC freq id 0 */
#define tsc_writel(value, reg) \
- __raw_writel(value, (u32)tsc + (reg))
+ __raw_writel(value, tsc + (reg))
#define tsc_readl(reg) \
- __raw_readl((u32)tsc + (reg))
+ __raw_readl(tsc + (reg))
#endif /* CONFIG_TEGRA_PRE_SILICON_SUPPORT */
/* Is the optional system timer available? */
static int local_timer_is_architected(void)
{
-#ifdef CONFIG_ARM64
- return 1;
-#else
return (cpu_architecture() >= CPU_ARCH_ARMv7) &&
((read_cpuid_ext(CPUID_EXT_PFR1) >> 16) & 0xf) == 1;
-#endif
}
static unsigned long arch_timer_read_current_timer(void)