Merge remote-tracking branch 'tip/timers/core' into fordlezcano/3.13/sched-clock64...
authorJohn Stultz <john.stultz@linaro.org>
Thu, 26 Sep 2013 19:05:54 +0000 (12:05 -0700)
committerJohn Stultz <john.stultz@linaro.org>
Thu, 26 Sep 2013 19:05:54 +0000 (12:05 -0700)
Update to tip/timers/core and resolve minor conflict.

Conflicts:
drivers/clocksource/samsung_pwm_timer.c

Signed-off-by: John Stultz <john.stultz@linaro.org>
1  2 
drivers/clocksource/nomadik-mtu.c
drivers/clocksource/samsung_pwm_timer.c
drivers/clocksource/time-armada-370-xp.c

Simple merge
index 09e8bc7bc92f8a94c64ad6de53756dc77bdf4d0f,ab29476ee5f9e21dd85de872a45df747dec4a0e4..85082e8d305298ac41b085df4bdb493aca95c682
@@@ -310,14 -331,9 +331,9 @@@ static struct clocksource samsung_clock
   * this wraps around for now, since it is just a relative time
   * stamp. (Inspired by U300 implementation.)
   */
 -static u32 notrace samsung_read_sched_clock(void)
 +static u64 notrace samsung_read_sched_clock(void)
  {
-       void __iomem *reg = samsung_timer_reg();
-       if (!reg)
-               return 0;
-       return ~__raw_readl(reg);
+       return samsung_clocksource_read(NULL);
  }
  
  static void __init samsung_clocksource_init(void)
        samsung_time_setup(pwm.source_id, pwm.tcnt_max);
        samsung_time_start(pwm.source_id, true);
  
 -      setup_sched_clock(samsung_read_sched_clock,
+       if (pwm.source_id == 4)
+               pwm.source_reg = pwm.base + 0x40;
+       else
+               pwm.source_reg = pwm.base + pwm.source_id * 0x0c + 0x14;
 +      sched_clock_register(samsung_read_sched_clock,
                                                pwm.variant.bits, clock_rate);
  
-       ret = clocksource_mmio_init(reg, "samsung_clocksource_timer",
-                                       clock_rate, 250, pwm.variant.bits,
-                                       clocksource_mmio_readl_down);
+       samsung_clocksource.mask = CLOCKSOURCE_MASK(pwm.variant.bits);
+       ret = clocksource_register_hz(&samsung_clocksource, clock_rate);
        if (ret)
                panic("samsung_clocksource_timer: can't register clocksource\n");
  }
index 2bec8dca74b646afb796bb7636f4a390d69b01f7,0198504ef6b02388c8847bc4897eca4e58328479..d8e47e5027858faf9f99c0b3ad99883bd7bc9cc2
@@@ -69,9 -82,21 +82,21 @@@ static bool timer25Mhz = true
   */
  static u32 ticks_per_jiffy;
  
- static struct clock_event_device __percpu **percpu_armada_370_xp_evt;
+ static struct clock_event_device __percpu *armada_370_xp_evt;
+ static void timer_ctrl_clrset(u32 clr, u32 set)
+ {
+       writel((readl(timer_base + TIMER_CTRL_OFF) & ~clr) | set,
+               timer_base + TIMER_CTRL_OFF);
+ }
+ static void local_timer_ctrl_clrset(u32 clr, u32 set)
+ {
+       writel((readl(local_base + TIMER_CTRL_OFF) & ~clr) | set,
+               local_base + TIMER_CTRL_OFF);
+ }
  
 -static u32 notrace armada_370_xp_read_sched_clock(void)
 +static u64 notrace armada_370_xp_read_sched_clock(void)
  {
        return ~readl(timer_base + TIMER0_VAL_OFF);
  }