Merge remote-tracking branch 'maz/local_timers-v3.3-rc4' into android-t114-3.4-rebased
Varun Wadekar [Thu, 21 Jun 2012 04:47:10 +0000 (09:47 +0530)]
Conflicts:
arch/arm/kernel/Makefile
arch/arm/kernel/smp.c
arch/arm/mach-msm/timer.c
arch/arm/mach-shmobile/include/mach/common.h
arch/arm/mach-shmobile/smp-r8a7779.c
arch/arm/mach-shmobile/smp-sh73a0.c
arch/arm/mach-shmobile/timer.c
arch/arm/mach-tegra/Makefile
arch/arm/mach-tegra/timer.c
arch/arm/mach-ux500/timer.c
arch/arm/mach-vexpress/ct-ca9x4.c

Change-Id: Id65fd2a5994e4b22cd682952b8f71f8b33b73823
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

1  2 
arch/arm/Kconfig
arch/arm/kernel/Makefile
arch/arm/kernel/smp.c
arch/arm/mach-shmobile/include/mach/common.h
arch/arm/mach-shmobile/smp-r8a7779.c
arch/arm/mach-shmobile/smp-sh73a0.c
arch/arm/mach-shmobile/timer.c
arch/arm/mach-ux500/timer.c

Simple merge
@@@ -34,11 -33,12 +34,12 @@@ obj-$(CONFIG_ARM_CPU_SUSPEND)      += sleep.
  obj-$(CONFIG_SMP)             += smp.o smp_tlb.o
  obj-$(CONFIG_HAVE_ARM_SCU)    += smp_scu.o
  obj-$(CONFIG_HAVE_ARM_TWD)    += smp_twd.o
 +obj-$(CONFIG_DYNAMIC_FTRACE)  += ftrace.o insn.o
 +obj-$(CONFIG_FUNCTION_GRAPH_TRACER)   += ftrace.o insn.o
 +obj-$(CONFIG_JUMP_LABEL)      += jump_label.o insn.o patch.o
+ obj-$(CONFIG_ARM_ARCH_TIMER)  += arch_timer.o
 -obj-$(CONFIG_DYNAMIC_FTRACE)  += ftrace.o
 -obj-$(CONFIG_FUNCTION_GRAPH_TRACER)   += ftrace.o
  obj-$(CONFIG_KEXEC)           += machine_kexec.o relocate_kernel.o
 -obj-$(CONFIG_KPROBES)         += kprobes.o kprobes-common.o
 +obj-$(CONFIG_KPROBES)         += kprobes.o kprobes-common.o patch.o
  ifdef CONFIG_THUMB2_KERNEL
  obj-$(CONFIG_KPROBES)         += kprobes-thumb.o
  else
Simple merge
@@@ -1,9 -1,9 +1,10 @@@
  #ifndef __ARCH_MACH_COMMON_H
  #define __ARCH_MACH_COMMON_H
  
 +extern void shmobile_earlytimer_init(void);
  extern struct sys_timer shmobile_timer;
  struct twd_local_timer;
+ void shmobile_twd_init(struct twd_local_timer *twd_local_timer);
  extern void shmobile_setup_console(void);
  extern void shmobile_secondary_vector(void);
  extern int shmobile_platform_cpu_kill(unsigned int cpu);
Simple merge
Simple merge
@@@ -42,10 -42,15 +42,19 @@@ void __init shmobile_earlytimer_init(vo
        late_time_init = shmobile_late_time_init;
  }
  
 +static void __init shmobile_timer_init(void)
 +{
 +}
 +
+ void __init shmobile_twd_init(struct twd_local_timer *twd_local_timer)
+ {
+ #ifdef CONFIG_HAVE_ARM_TWD
+       int err = twd_local_timer_register(twd_local_timer);
+       if (err)
+               pr_err("twd_local_timer_register failed %d\n", err);
+ #endif
+ }
  struct sys_timer shmobile_timer = {
        .init           = shmobile_timer_init,
  };
  
  #include <mach/setup.h>
  #include <mach/hardware.h>
 +#include <mach/irqs.h>
 +
 +#ifdef CONFIG_HAVE_ARM_TWD
 +static DEFINE_TWD_LOCAL_TIMER(u5500_twd_local_timer,
 +                            U5500_TWD_BASE, IRQ_LOCALTIMER);
 +static DEFINE_TWD_LOCAL_TIMER(u8500_twd_local_timer,
 +                            U8500_TWD_BASE, IRQ_LOCALTIMER);
 +
 +static void __init ux500_twd_init(void)
 +{
 +      struct twd_local_timer *twd_local_timer;
 +      int err;
 +
 +      twd_local_timer = cpu_is_u5500() ? &u5500_twd_local_timer :
 +                                         &u8500_twd_local_timer;
 +
 +      if (of_have_populated_dt())
 +              twd_local_timer_of_register();
 +      else {
 +              err = twd_local_timer_register(twd_local_timer);
 +              if (err)
 +                      pr_err("twd_local_timer_register failed %d\n", err);
 +      }
 +}
 +#else
 +#define ux500_twd_init()      do { } while(0)
 +#endif
  
+ #ifdef CONFIG_HAVE_ARM_TWD
+ static DEFINE_TWD_LOCAL_TIMER(u5500_twd_local_timer,
+                             U5500_TWD_BASE, IRQ_LOCALTIMER);
+ static DEFINE_TWD_LOCAL_TIMER(u8500_twd_local_timer,
+                             U8500_TWD_BASE, IRQ_LOCALTIMER);
+ static void __init ux500_twd_init(void)
+ {
+       struct twd_local_timer *twd_local_timer;
+       int err;
+       twd_local_timer = cpu_is_u5500() ? &u5500_twd_local_timer :
+                                          &u8500_twd_local_timer;
+       err = twd_local_timer_register(twd_local_timer);
+       if (err)
+               pr_err("twd_local_timer_register failed %d\n", err);
+ }
+ #else
+ #define ux500_twd_init()      do { } while(0)
+ #endif
  static void __init ux500_timer_init(void)
  {
 +      void __iomem *mtu_timer_base;
        void __iomem *prcmu_timer_base;
+       int err;
  
        if (cpu_is_u5500()) {
 -              mtu_base = __io_address(U5500_MTU0_BASE);
 +              mtu_timer_base = __io_address(U5500_MTU0_BASE);
                prcmu_timer_base = __io_address(U5500_PRCMU_TIMER_3_BASE);
        } else if (cpu_is_u8500()) {
 -              mtu_base = __io_address(U8500_MTU0_BASE);
 +              mtu_timer_base = __io_address(U8500_MTU0_BASE);
                prcmu_timer_base = __io_address(U8500_PRCMU_TIMER_4_BASE);
        } else {
                ux500_unknown_soc();