ARM: Build fix after Tegra14 K3.4 merge
[linux-3.10.git] / arch / arm / mach-tegra / timer.c
index 9f0597c..540d1ed 100644 (file)
@@ -49,8 +49,6 @@
 #include "timer.h"
 #include "fuse.h"
 
-extern int __init arch_timer_register(struct arch_timer *at);
-
 static void __iomem *timer_reg_base = IO_ADDRESS(TEGRA_TMR1_BASE);
 static void __iomem *rtc_base = IO_ADDRESS(TEGRA_RTC_BASE);
 
@@ -119,6 +117,11 @@ static u32 notrace tegra_read_usec(void)
        return cyc;
 }
 
+u32 notrace tegra_read_usec_raw(void)
+{
+       return timer_readl(TIMERUS_CNTR_1US);
+}
+
 static u32 notrace tegra_read_sched_clock(void)
 {
        return tegra_read_usec();
@@ -130,7 +133,7 @@ static u32 notrace tegra_read_sched_clock(void)
  * tegra_rtc driver could be executing to avoid race conditions
  * on the RTC shadow register
  */
-static u64 tegra_rtc_read_ms(void)
+u64 tegra_rtc_read_ms(void)
 {
        u32 ms = readl(rtc_base + RTC_MILLISECONDS);
        u32 s = readl(rtc_base + RTC_SHADOW_SECONDS);
@@ -272,6 +275,8 @@ static void __init tegra_init_late_timer(void)
 #define tegra_twd_get_state    do {} while(0)
 #define tegra_twd_suspend      do {} while(0)
 #define tegra_twd_resume       do {} while(0)
+void __init tegra_cpu_timer_init(void) {}
+static void __init tegra_init_late_timer(void) {}
 #endif
 
 #ifdef CONFIG_ARM_ARCH_TIMER
@@ -446,6 +451,8 @@ static int __init tegra_init_arch_timer(void)
        if (!local_timer_is_architected())
                return -ENODEV;
 
+       arch_timer_of_register();
+
        err = arch_timer_sched_clock_init();
        if (err) {
                pr_err("%s: Unable to initialize arch timer sched_clock: %d\n",
@@ -459,30 +466,8 @@ static int __init tegra_init_arch_timer(void)
        return 0;
 }
 
-static struct arch_timer tegra_arch_timer = {
-       .res[0] = {
-               .start  = 29,
-               .end    = 29,
-               .flags  = IORESOURCE_IRQ,
-       },
-       .res[1] = {
-               .start  = 30,
-               .end    = 30,
-               .flags  = IORESOURCE_IRQ,
-       },
-};
-
 static void __init tegra_init_late_timer(void)
-{
-       int err = -ENODEV;
-
-       if (arch_timer_initialized) {
-               err = arch_timer_register(&tegra_arch_timer);
-               if (err)
-                       pr_err("%s: Unable to register arch timer: %d\n",
-                            __func__, err);
-       }
-}
+{}
 
 #ifdef CONFIG_PM_SLEEP
 
@@ -610,7 +595,7 @@ void __init tegra_init_timer(void)
                break;
 #endif
        default:
-               if (tegra_revision == TEGRA_REVISION_QT) {
+               if (tegra_platform_is_qt()) {
                        timer_writel(0x000c, TIMERUS_USEC_CFG);
                        break;
                }
@@ -661,7 +646,7 @@ void __init tegra_init_timer(void)
 
        register_persistent_clock(NULL, tegra_read_persistent_clock);
 
-       arm_delay_ops.delay             = __tegra_delay;
-       arm_delay_ops.const_udelay      = __tegra_const_udelay;
-       arm_delay_ops.udelay            = __tegra_udelay;
+       //arm_delay_ops.delay           = __tegra_delay;
+       //arm_delay_ops.const_udelay    = __tegra_const_udelay;
+       //arm_delay_ops.udelay          = __tegra_udelay;
 }