From patchwork Tue Apr 26 15:28:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Grygorii Strashko X-Patchwork-Id: 8940081 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E95439F441 for ; Tue, 26 Apr 2016 15:32:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5AED220166 for ; Tue, 26 Apr 2016 15:32:11 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8F36B20148 for ; Tue, 26 Apr 2016 15:32:06 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1av4w7-0007Ny-Bw; Tue, 26 Apr 2016 15:30:03 +0000 Received: from devils.ext.ti.com ([198.47.26.153]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1av4w2-0007Cx-Kz; Tue, 26 Apr 2016 15:30:00 +0000 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id u3QFSvuw023187; Tue, 26 Apr 2016 10:28:57 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id u3QFSvbC013751; Tue, 26 Apr 2016 10:28:57 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.224.2; Tue, 26 Apr 2016 10:28:55 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id u3QFSsVp000778; Tue, 26 Apr 2016 10:28:54 -0500 From: Grygorii Strashko To: Daniel Lezcano , Arnd Bergmann , Olof Johansson , Subject: [PATCH v1] ARM: clocksource: make ARM_GLOBAL_TIMER selectable Date: Tue, 26 Apr 2016 18:28:52 +0300 Message-ID: <1461684532-16848-1-git-send-email-grygorii.strashko@ti.com> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160426_082958_943258_FBBBAD56 X-CRM114-Status: GOOD ( 12.10 ) X-Spam-Score: -7.9 (-------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel@stlinux.com, Tony Lindgren , Sekhar Nori , Masahiro Yamada , Wei Xu , Jesper Nilsson , Florian Fainelli , Russell King , Michal Simek , linux-arm-kernel@axis.com, linux-rockchip@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, Grygorii Strashko , Mike Looijmans , Liviu Dudau , Lars Persson , linux-omap@vger.kernel.org, Maxime Coquelin , Srinivas Kandagatla , linux-kernel@vger.kernel.org, Sascha Hauer , Sudeep Holla , Jun Nie , Shawn Guo Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch intended to fix following cases: - SoC-A has ARM GT, defines DT node for ARM GT and selects ARM_GLOBAL_TIMER statically in Kconfig file. SoC-B has ARM GT and defines DT node for ARM GT, but do not selects ARM_GLOBAL_TIMER statically in Kconfig file. In case of multiplatform build ARM GT will be implicitly enabled for SoC-B. - There is no way to disable ARM GT without modifying Kconfig file, once ARM_GLOBAL_TIMER is selected statically in Kconfig file. Hence, fix above case by defining both HAVE_ARM_GLOBAL_TIMER and ARM_GLOBAL_TIMER as recommended by 'Adding common features and make the usage configurable' section in kconfig-language.txt. All places in ARM folder where ARM_GLOBAL_TIMER was used now replaced on HAVE_ARM_GLOBAL_TIMER. Cc: Daniel Lezcano Cc: Florian Fainelli Cc: Russell King Cc: Wei Xu Cc: Shawn Guo Cc: Sascha Hauer Cc: Srinivas Kandagatla Cc: Maxime Coquelin Cc: Masahiro Yamada Cc: Liviu Dudau Cc: Sudeep Holla Cc: Jun Nie Cc: Michal Simek Cc: Jesper Nilsson Cc: Lars Persson Cc: Mike Looijmans Acked-by: Sören Brinkmann Acked-by: Moritz Fischer Signed-off-by: Grygorii Strashko --- Changes is v1: - updated mach-artpec - rebased on top of tip: timers/core commit: 86d3473 time: Introduce do_sys_settimeofday64() arch/arm/mach-artpec/Kconfig | 2 +- arch/arm/mach-bcm/Kconfig | 4 ++-- arch/arm/mach-hisi/Kconfig | 2 +- arch/arm/mach-imx/Kconfig | 2 +- arch/arm/mach-rockchip/Kconfig | 2 +- arch/arm/mach-sti/Kconfig | 2 +- arch/arm/mach-uniphier/Kconfig | 2 +- arch/arm/mach-vexpress/Kconfig | 2 +- arch/arm/mach-zx/Kconfig | 2 +- arch/arm/mach-zynq/Kconfig | 2 +- drivers/clocksource/Kconfig | 7 ++++++- 11 files changed, 17 insertions(+), 12 deletions(-) diff --git a/arch/arm/mach-artpec/Kconfig b/arch/arm/mach-artpec/Kconfig index 6cbe5a2..6cbca77 100644 --- a/arch/arm/mach-artpec/Kconfig +++ b/arch/arm/mach-artpec/Kconfig @@ -9,7 +9,7 @@ config MACH_ARTPEC6 depends on ARCH_MULTI_V7 select ARM_AMBA select ARM_GIC - select ARM_GLOBAL_TIMER + select HAVE_ARM_GLOBAL_TIMER select ARM_PSCI select HAVE_ARM_ARCH_TIMER select HAVE_ARM_SCU diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig index 7ef1214..d4d079a7 100644 --- a/arch/arm/mach-bcm/Kconfig +++ b/arch/arm/mach-bcm/Kconfig @@ -14,7 +14,7 @@ config ARCH_BCM_IPROC select CACHE_L2X0 select HAVE_ARM_SCU if SMP select HAVE_ARM_TWD if SMP - select ARM_GLOBAL_TIMER + select HAVE_ARM_GLOBAL_TIMER select COMMON_CLK_IPROC select CLKSRC_MMIO select ARCH_REQUIRE_GPIOLIB @@ -156,7 +156,7 @@ config ARCH_BCM_63XX select ARM_ERRATA_754322 select ARM_ERRATA_764369 if SMP select ARM_GIC - select ARM_GLOBAL_TIMER + select HAVE_ARM_GLOBAL_TIMER select CACHE_L2X0 select HAVE_ARM_ARCH_TIMER select HAVE_ARM_TWD if SMP diff --git a/arch/arm/mach-hisi/Kconfig b/arch/arm/mach-hisi/Kconfig index a3b091a..251bb03 100644 --- a/arch/arm/mach-hisi/Kconfig +++ b/arch/arm/mach-hisi/Kconfig @@ -28,7 +28,7 @@ config ARCH_HIP01 depends on ARCH_MULTI_V7 select HAVE_ARM_SCU if SMP select HAVE_ARM_TWD if SMP - select ARM_GLOBAL_TIMER + select HAVE_ARM_GLOBAL_TIMER help Support for Hisilicon HIP01 SoC family diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 8973fae..3fbf38c 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -602,7 +602,7 @@ choice config VF_USE_ARM_GLOBAL_TIMER bool "Use ARM Global Timer" depends on ARCH_MULTI_V7 - select ARM_GLOBAL_TIMER + select HAVE_ARM_GLOBAL_TIMER select CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK help Use the ARM Global Timer as clocksource diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig index cef42fd..a53b787 100644 --- a/arch/arm/mach-rockchip/Kconfig +++ b/arch/arm/mach-rockchip/Kconfig @@ -14,7 +14,7 @@ config ARCH_ROCKCHIP select DW_APB_TIMER_OF select REGULATOR if PM select ROCKCHIP_TIMER - select ARM_GLOBAL_TIMER + select HAVE_ARM_GLOBAL_TIMER select CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK help Support for Rockchip's Cortex-A9 Single-to-Quad-Core-SoCs diff --git a/arch/arm/mach-sti/Kconfig b/arch/arm/mach-sti/Kconfig index a196d14..c799f9d 100644 --- a/arch/arm/mach-sti/Kconfig +++ b/arch/arm/mach-sti/Kconfig @@ -3,7 +3,7 @@ menuconfig ARCH_STI depends on ARCH_MULTI_V7 select ARM_GIC select ST_IRQCHIP - select ARM_GLOBAL_TIMER + select HAVE_ARM_GLOBAL_TIMER select CLKSRC_ST_LPC select PINCTRL select PINCTRL_ST diff --git a/arch/arm/mach-uniphier/Kconfig b/arch/arm/mach-uniphier/Kconfig index 82dddee..81bdf77 100644 --- a/arch/arm/mach-uniphier/Kconfig +++ b/arch/arm/mach-uniphier/Kconfig @@ -2,7 +2,7 @@ config ARCH_UNIPHIER bool "Socionext UniPhier SoCs" depends on ARCH_MULTI_V7 select ARM_AMBA - select ARM_GLOBAL_TIMER + select HAVE_ARM_GLOBAL_TIMER select ARM_GIC select HAVE_ARM_SCU select HAVE_ARM_TWD if SMP diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig index 398a297..e89941d 100644 --- a/arch/arm/mach-vexpress/Kconfig +++ b/arch/arm/mach-vexpress/Kconfig @@ -5,7 +5,7 @@ menuconfig ARCH_VEXPRESS select ARCH_SUPPORTS_BIG_ENDIAN select ARM_AMBA select ARM_GIC - select ARM_GLOBAL_TIMER + select HAVE_ARM_GLOBAL_TIMER select ARM_TIMER_SP804 select COMMON_CLK_VERSATILE select HAVE_ARM_SCU if SMP diff --git a/arch/arm/mach-zx/Kconfig b/arch/arm/mach-zx/Kconfig index 209c979..e84b0c2 100644 --- a/arch/arm/mach-zx/Kconfig +++ b/arch/arm/mach-zx/Kconfig @@ -11,7 +11,7 @@ if ARCH_ZX config SOC_ZX296702 def_bool y select ARM_GIC - select ARM_GLOBAL_TIMER + select HAVE_ARM_GLOBAL_TIMER select HAVE_ARM_SCU if SMP select HAVE_ARM_TWD if SMP select PM_GENERIC_DOMAINS if PM diff --git a/arch/arm/mach-zynq/Kconfig b/arch/arm/mach-zynq/Kconfig index fd0aeeb..3165720 100644 --- a/arch/arm/mach-zynq/Kconfig +++ b/arch/arm/mach-zynq/Kconfig @@ -5,7 +5,7 @@ config ARCH_ZYNQ select ARCH_SUPPORTS_BIG_ENDIAN select ARM_AMBA select ARM_GIC - select ARM_GLOBAL_TIMER if !CPU_FREQ + select HAVE_ARM_GLOBAL_TIMER if !CPU_FREQ select CADENCE_TTC_TIMER select HAVE_ARM_SCU if SMP select HAVE_ARM_TWD if SMP diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig index c346be6..c686811 100644 --- a/drivers/clocksource/Kconfig +++ b/drivers/clocksource/Kconfig @@ -207,9 +207,14 @@ config ARM_ARCH_TIMER_EVTSTREAM This must be disabled for hardware validation purposes to detect any hardware anomalies of missing events. -config ARM_GLOBAL_TIMER +config HAVE_ARM_GLOBAL_TIMER bool + +config ARM_GLOBAL_TIMER + bool "Support for ARM global timer unit" select CLKSRC_OF if OF + default y + depends on HAVE_ARM_GLOBAL_TIMER help This options enables support for the ARM global timer unit