From patchwork Tue Jun 28 10:51:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 71061 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp1517024qgy; Tue, 28 Jun 2016 03:55:01 -0700 (PDT) X-Received: by 10.98.152.76 with SMTP id q73mr696042pfd.38.1467111301588; Tue, 28 Jun 2016 03:55:01 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x185si5090458pfx.31.2016.06.28.03.55.01; Tue, 28 Jun 2016 03:55:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753060AbcF1Ky2 (ORCPT + 30 others); Tue, 28 Jun 2016 06:54:28 -0400 Received: from mail-wm0-f44.google.com ([74.125.82.44]:38819 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752822AbcF1KxO (ORCPT ); Tue, 28 Jun 2016 06:53:14 -0400 Received: by mail-wm0-f44.google.com with SMTP id r201so21625599wme.1 for ; Tue, 28 Jun 2016 03:52:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1L1c4Ih3C9Sb8VjyotV4Z/85rXmQVkun/eb1k51Gy3M=; b=HrYNwQpbCn0eWhiT5nP11fzVsr6+0apO+pEkee24AIHbCKaVPhKbPprh2QEzzptxRD pLcURPcUV0EweVvT2np+AnQB1XLm8cD45VlRorsOBhChlO2h2f65mDQTtI/ROvs9JEy4 gZZlbNG9G5e7ld+jwR6mrWRw35IOYmjmvJsQc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1L1c4Ih3C9Sb8VjyotV4Z/85rXmQVkun/eb1k51Gy3M=; b=MPL2T4i9OsDQxpiIcnUptzXN081dRM7ZFEPyrf3GyyI7VTwb6x4qp2X9k8Si8pkK2l IGsmEeRgP/dwWgSRSCV3U7nvEFhWHytpQV0mzljEZ213xcaEHRHbo+b+EF9eCpruKLB3 opYuKgYeKxs04Q2Thx4oqAu0V0XOdy/NBQvoMyHK/wuh3ghyPXnp135z/PPd/DRtSpSk oO2h0APZ4EuQMz52qKOF+AuZF7B/np9eCM4bFgGkfMQTHj/ei/pj+hLAnygPOOv4VLQk yG6W9wEyZUOVcAF4MAL6mgrys+oDdyWyttjJawvtT5vnJmaBkkSndDibuSamNQiOiIVc p5ag== X-Gm-Message-State: ALyK8tKMozVk1weoZzs4wfmdI3cSbh27bu3QHFQkDTXCjKaRWXnGaZHzYn5Y2amitHseKPcf X-Received: by 10.194.82.161 with SMTP id j1mr2628121wjy.65.1467111162243; Tue, 28 Jun 2016 03:52:42 -0700 (PDT) Received: from localhost.localdomain (sju31-1-78-210-255-2.fbx.proxad.net. [78.210.255.2]) by smtp.gmail.com with ESMTPSA id x194sm1577615wmf.13.2016.06.28.03.52.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 28 Jun 2016 03:52:41 -0700 (PDT) From: Daniel Lezcano To: daniel.lezcano@linaro.org, tglx@linutronix.de Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 85/92] clocksource/drivers/u300: Add the COMPILE_TEST option Date: Tue, 28 Jun 2016 12:51:43 +0200 Message-Id: <1467111111-12587-10-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1467111111-12587-1-git-send-email-daniel.lezcano@linaro.org> References: <577251A4.7030508@linaro.org> <1467111111-12587-1-git-send-email-daniel.lezcano@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Change the Kconfig option logic to fullfil with the current approach. A new Kconfig option is added, CONFIG_U300_TIMER and is selected by the platform. Then the clocksource's Kconfig is changed to make this option selectable by the user if the COMPILE_TEST option is set. Otherwise, it is up to the platform's Kconfig to select the timer. Due on the delay specific code, this driver will compile only on the ARM architecture. Signed-off-by: Daniel Lezcano --- arch/arm/mach-u300/Kconfig | 2 +- drivers/clocksource/Kconfig | 8 ++++++++ drivers/clocksource/Makefile | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) -- 1.9.1 diff --git a/arch/arm/mach-u300/Kconfig b/arch/arm/mach-u300/Kconfig index 301a984..4fdc342 100644 --- a/arch/arm/mach-u300/Kconfig +++ b/arch/arm/mach-u300/Kconfig @@ -4,7 +4,7 @@ menuconfig ARCH_U300 select ARCH_REQUIRE_GPIOLIB select ARM_AMBA select ARM_VIC - select CLKSRC_MMIO + select U300_TIMER select CPU_ARM926T select HAVE_TCM select PINCTRL diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig index c350fbd..d425f80 100644 --- a/drivers/clocksource/Kconfig +++ b/drivers/clocksource/Kconfig @@ -191,6 +191,14 @@ config PRIMA2_TIMER help Enables support for the Prima2 timer. +config U300_TIMER + bool "U300 timer driver" if COMPILE_TEST + depends on GENERIC_CLOCKEVENTS + depends on ARM + select CLKSRC_MMIO + help + Enables support for the U300 timer. + config CLKSRC_DBX500_PRCMU_SCHED_CLOCK bool "Clocksource PRCMU Timer sched_clock" depends on (CLKSRC_DBX500_PRCMU && !CLKSRC_NOMADIK_MTU_SCHED_CLOCK) diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile index b419d5d..adbc3a8 100644 --- a/drivers/clocksource/Makefile +++ b/drivers/clocksource/Makefile @@ -26,7 +26,7 @@ obj-$(CONFIG_MOXART_TIMER) += moxart_timer.o obj-$(CONFIG_MXS_TIMER) += mxs_timer.o obj-$(CONFIG_CLKSRC_PXA) += pxa_timer.o obj-$(CONFIG_PRIMA2_TIMER) += timer-prima2.o -obj-$(CONFIG_ARCH_U300) += timer-u300.o +obj-$(CONFIG_U300_TIMER) += timer-u300.o obj-$(CONFIG_SUN4I_TIMER) += sun4i_timer.o obj-$(CONFIG_SUN5I_HSTIMER) += timer-sun5i.o obj-$(CONFIG_MESON6_TIMER) += meson6_timer.o