cns3xxx: fix adding twd local timers
authorFelix Fietkau <nbd@openwrt.org>
Mon, 18 Jan 2016 22:38:03 +0000 (22:38 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 18 Jan 2016 22:38:03 +0000 (22:38 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 48331

target/linux/cns3xxx/patches-3.18/025-smp_support.patch
target/linux/cns3xxx/patches-3.18/040-fiq_support.patch
target/linux/cns3xxx/patches-3.18/045-twd_base.patch
target/linux/cns3xxx/patches-3.18/090-timers.patch
target/linux/cns3xxx/patches-3.18/095-gpio_support.patch
target/linux/cns3xxx/patches-3.18/097-l2x0_cmdline_disable.patch

index 418c065a976abc121586213f89be6147ca342a22..2a9d997a508bf0f7cebe831c1169ea0e60bd0f1e 100644 (file)
@@ -13,7 +13,7 @@
        select ARM_GIC
        select PCI_DOMAINS if PCI
 +      select HAVE_ARM_SCU if SMP
-+      select HAVE_ARM_TWD if LOCAL_TIMERS
++      select HAVE_ARM_TWD
 +      select HAVE_SMP
        help
          Support for Cavium Networks CNS3XXX platform.
index 4f09a36f1486722aa5533c8c6bbb95e427610aee..16774a6a3e987c27fbf97431cfe6f171d11381c8 100644 (file)
@@ -2,7 +2,7 @@
 +++ b/arch/arm/mach-cns3xxx/Kconfig
 @@ -5,6 +5,7 @@ menuconfig ARCH_CNS3XXX
        select HAVE_ARM_SCU if SMP
-       select HAVE_ARM_TWD if LOCAL_TIMERS
+       select HAVE_ARM_TWD
        select HAVE_SMP
 +      select FIQ
        help
index f61b8ed3b413e77844ed1293aa955595b18e5de3..a265f9ca8b67ec8716724c5b9e064a3a64e7665f 100644 (file)
  static struct map_desc cns3xxx_io_desc[] __initdata = {
        {
                .virtual        = CNS3XXX_TC11MP_SCU_BASE_VIRT,
-@@ -191,6 +194,17 @@ static struct irqaction cns3xxx_timer_ir
+@@ -191,6 +194,15 @@ static struct irqaction cns3xxx_timer_ir
        .handler        = cns3xxx_timer_interrupt,
  };
  
 +static void __init cns3xxx_init_twd(void)
 +{
-+#ifdef CONFIG_LOCAL_TIMERS
 +      static DEFINE_TWD_LOCAL_TIMER(cns3xx_twd_local_timer,
 +              CNS3XXX_TC11MP_TWD_BASE,
 +              IRQ_LOCALTIMER);
 +
 +      twd_local_timer_register(&cns3xx_twd_local_timer);
-+#endif
 +}
 +
  /*
   * Set up the clock source and clock events devices
   */
-@@ -244,6 +258,7 @@ static void __init __cns3xxx_timer_init(
+@@ -244,6 +256,7 @@ static void __init __cns3xxx_timer_init(
        setup_irq(timer_irq, &cns3xxx_timer_irq);
  
        cns3xxx_clockevents_init(timer_irq);
index a88402138411767a3410760808e30a3682472714..0bf686d22f28e0f0f3667040e2cd401ca4f1e028 100644 (file)
@@ -24,8 +24,8 @@
        .cpumask        = cpu_all_mask,
  };
  
-@@ -215,6 +216,35 @@ static void __init cns3xxx_init_twd(void
- #endif
+@@ -213,6 +214,35 @@ static void __init cns3xxx_init_twd(void
+       twd_local_timer_register(&cns3xx_twd_local_timer);
  }
  
 +static cycle_t cns3xxx_get_cycles(struct clocksource *cs)
@@ -60,7 +60,7 @@
  /*
   * Set up the clock source and clock events devices
   */
-@@ -232,13 +262,12 @@ static void __init __cns3xxx_timer_init(
+@@ -230,13 +260,12 @@ static void __init __cns3xxx_timer_init(
        /* stop free running timer3 */
        writel(0, cns3xxx_tmr1 + TIMER_FREERUN_CONTROL_OFFSET);
  
@@ -77,7 +77,7 @@
        /* mask irq, non-mask timer1 overflow */
        irq_mask = readl(cns3xxx_tmr1 + TIMER1_2_INTERRUPT_MASK_OFFSET);
        irq_mask &= ~(1 << 2);
-@@ -250,23 +279,9 @@ static void __init __cns3xxx_timer_init(
+@@ -248,23 +277,9 @@ static void __init __cns3xxx_timer_init(
        val |= (1 << 9);
        writel(val, cns3xxx_tmr1 + TIMER1_2_CONTROL_OFFSET);
  
index a6ce177493f767c1384fed0771f8a1c0ee61fb78..79a937a606e2768a387672c7cf632fc2ba198b77 100644 (file)
@@ -21,7 +21,7 @@
 +      select GENERIC_IRQ_CHIP
        select PCI_DOMAINS if PCI
        select HAVE_ARM_SCU if SMP
-       select HAVE_ARM_TWD if LOCAL_TIMERS
+       select HAVE_ARM_TWD
 --- a/arch/arm/mach-cns3xxx/Makefile
 +++ b/arch/arm/mach-cns3xxx/Makefile
 @@ -1,7 +1,7 @@
index f575348cba2416dbf120d60f8114debec6ddb3ae..da49e20604234833c8441159112617f923ed2cf7 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/arm/mach-cns3xxx/core.c
 +++ b/arch/arm/mach-cns3xxx/core.c
-@@ -305,13 +305,26 @@ void __init cns3xxx_timer_init(void)
+@@ -303,13 +303,26 @@ void __init cns3xxx_timer_init(void)
  
  #ifdef CONFIG_CACHE_L2X0
  
@@ -30,7 +30,7 @@
  
        /*
         * Tag RAM Control register
-@@ -341,7 +354,10 @@ void __init cns3xxx_l2x0_init(void)
+@@ -339,7 +352,10 @@ void __init cns3xxx_l2x0_init(void)
  
        /* 32 KiB, 8-way, parity disable */
        l2x0_init(base, 0x00500000, 0xfe0f0fff);