]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ARC: timer: gfrc, rtc: build under same option (64-bit timers)
authorVineet Gupta <vgupta@synopsys.com>
Mon, 31 Oct 2016 21:26:41 +0000 (14:26 -0700)
committerVineet Gupta <vgupta@synopsys.com>
Wed, 30 Nov 2016 19:54:25 +0000 (11:54 -0800)
The original distinction was done as they were developed at different
times and primarily because they are specific to UP (RTC) and SMP (GFRC).

But given that driver handles that at runtime, (i.e. not allowing
RTC as clocksource in SMP), we can simplify things a bit.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
arch/arc/Kconfig
arch/arc/configs/nsimosci_hs_smp_defconfig
arch/arc/configs/vdk_hs38_smp_defconfig
arch/arc/kernel/setup.c
arch/arc/kernel/time.c

index bd204bfa29edd52f8e4d43c989ab07024e66ab98..bde3e558d8bc8682cd5f860f18eec7acc1aefd7c 100644 (file)
@@ -410,15 +410,9 @@ config ARC_HAS_DIV_REM
        bool "Insn: div, divu, rem, remu"
        default y
 
-config ARC_HAS_RTC
-       bool "Local 64-bit r/o cycle counter"
-       default n
-       depends on !SMP
-
-config ARC_HAS_GFRC
-       bool "SMP synchronized 64-bit cycle counter"
+config ARC_TIMERS_64BIT
+       bool "64-bit r/o cycle counters RTC (up) and GFRC (smp)"
        default y
-       depends on SMP
 
 config ARC_NUMBER_OF_INTERRUPTS
        int "Number of interrupts"
index 6da71ba253a932275c133e55fe68fd19c7ec4379..155add7761ed63080bd81e830c819483fb55ee61 100644 (file)
@@ -21,7 +21,7 @@ CONFIG_MODULES=y
 CONFIG_ARC_PLAT_SIM=y
 CONFIG_ISA_ARCV2=y
 CONFIG_SMP=y
-# CONFIG_ARC_HAS_GFRC is not set
+# CONFIG_ARC_TIMERS_64BIT is not set
 CONFIG_ARC_BUILTIN_DTB_NAME="nsimosci_hs_idu"
 CONFIG_PREEMPT=y
 # CONFIG_COMPACTION is not set
index 969b206d6c67bbbb72ad80edb104946b81197193..573028f19de794b7794a04befc54dfc7e77ff8d1 100644 (file)
@@ -15,7 +15,7 @@ CONFIG_ARC_PLAT_AXS10X=y
 CONFIG_AXS103=y
 CONFIG_ISA_ARCV2=y
 CONFIG_SMP=y
-# CONFIG_ARC_HAS_GFRC is not set
+# CONFIG_ARC_TIMERS_64BIT is not set
 CONFIG_ARC_UBOOT_SUPPORT=y
 CONFIG_ARC_BUILTIN_DTB_NAME="vdk_hs38_smp"
 CONFIG_PREEMPT=y
index 0385df77a69738f06a45d45553b1c0d6e0980e30..c6914acb68a9188d8c1a71e686014cbb8d82d757 100644 (file)
@@ -234,11 +234,11 @@ static char *arc_cpu_mumbojumbo(int cpu_id, char *buf, int len)
                       is_isa_arcompact() ? "ARCompact" : "ARCv2",
                       IS_AVAIL1(cpu->isa.be, "[Big-Endian]"));
 
-       n += scnprintf(buf + n, len - n, "Timers\t\t: %s%s%s%s\nISA Extn\t: ",
+       n += scnprintf(buf + n, len - n, "Timers\t\t: %s%s%s%s%s%s\nISA Extn\t: ",
                       IS_AVAIL1(cpu->extn.timer0, "Timer0 "),
                       IS_AVAIL1(cpu->extn.timer1, "Timer1 "),
-                      IS_AVAIL2(cpu->extn.rtc, "Local-64-bit-Ctr ",
-                                CONFIG_ARC_HAS_RTC));
+                      IS_AVAIL2(cpu->extn.rtc, "RTC [UP 64-bit] ", CONFIG_ARC_TIMERS_64BIT),
+                      IS_AVAIL2(cpu->extn.gfrc, "GFRC [SMP 64-bit] ", CONFIG_ARC_TIMERS_64BIT));
 
        n += i = scnprintf(buf + n, len - n, "%s%s%s%s%s",
                           IS_AVAIL2(cpu->isa.atomic, "atomic ", CONFIG_ARC_HAS_LLSC),
index d3f3750a0d2d648e8a66a9c063cada5d117294b0..4d0c75b86b100ecc3f210c6df1d19a024daa9668 100644 (file)
@@ -81,7 +81,7 @@ static int noinline arc_get_timer_clk(struct device_node *node)
 
 /********** Clock Source Device *********/
 
-#ifdef CONFIG_ARC_HAS_GFRC
+#ifdef CONFIG_ARC_TIMERS_64BIT
 
 static cycle_t arc_read_gfrc(struct clocksource *cs)
 {
@@ -128,10 +128,6 @@ static int __init arc_cs_setup_gfrc(struct device_node *node)
 }
 CLOCKSOURCE_OF_DECLARE(arc_gfrc, "snps,archs-timer-gfrc", arc_cs_setup_gfrc);
 
-#endif
-
-#ifdef CONFIG_ARC_HAS_RTC
-
 #define AUX_RTC_CTRL   0x103
 #define AUX_RTC_LOW    0x104
 #define AUX_RTC_HIGH   0x105