Merge tag 'cleanup2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
[linux-2.6-block.git] / arch / arm / mach-shmobile / smp-sh73a0.c
index 667d53dd70128ca71139cad62b6eb36b5ac9b5ba..14ad8b052f1a0944400d41ec559bc7188b8c5571 100644 (file)
@@ -42,6 +42,8 @@ static void __iomem *scu_base_addr(void)
 static DEFINE_SPINLOCK(scu_lock);
 static unsigned long tmp;
 
+static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, 0xf0000600, 29);
+
 static void modify_scu_cpu_psr(unsigned long set, unsigned long clr)
 {
        void __iomem *scu_base = scu_base_addr();
@@ -60,11 +62,7 @@ unsigned int __init sh73a0_get_core_count(void)
 {
        void __iomem *scu_base = scu_base_addr();
 
-#ifdef CONFIG_HAVE_ARM_TWD
-       /* twd_base needs to be initialized before percpu_timer_setup() */
-       twd_base = (void __iomem *)0xf0000600;
-#endif
-
+       shmobile_twd_init(&twd_local_timer);
        return scu_get_core_count(scu_base);
 }
 
@@ -80,7 +78,7 @@ int __cpuinit sh73a0_boot_secondary(unsigned int cpu)
        /* enable cache coherency */
        modify_scu_cpu_psr(0, 3 << (cpu * 8));
 
-       if (((__raw_readw(PSTR) >> (4 * cpu)) & 3) == 3)
+       if (((__raw_readl(PSTR) >> (4 * cpu)) & 3) == 3)
                __raw_writel(1 << cpu, WUPCR);  /* wake up */
        else
                __raw_writel(1 << cpu, SRESCR); /* reset */