From patchwork Thu Jun 2 21:41:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 69205 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp327133qgf; Thu, 2 Jun 2016 14:42:57 -0700 (PDT) X-Received: by 10.98.26.18 with SMTP id a18mr654781pfa.39.1464903777575; Thu, 02 Jun 2016 14:42:57 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y7si968692par.183.2016.06.02.14.42.57; Thu, 02 Jun 2016 14:42:57 -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 S933178AbcFBVmu (ORCPT + 31 others); Thu, 2 Jun 2016 17:42:50 -0400 Received: from mail-wm0-f51.google.com ([74.125.82.51]:38552 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932989AbcFBVmI (ORCPT ); Thu, 2 Jun 2016 17:42:08 -0400 Received: by mail-wm0-f51.google.com with SMTP id a20so83364390wma.1 for ; Thu, 02 Jun 2016 14:42:08 -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=IbhOIvJsMMGtt/V9+zcd97fYa9XDLL/Lh7Zgpcs637U=; b=GmBjkXnAPLd6dP3NU1Wc2pUqiT3bNdS7or1wLTh9Qq3a+8xSzYTZxLGw052acIVRFz rHTvHvQNQmJVam1TxXsiNAE9fMFlNd2YjMLSEb6Khm76EnR7pFORTbR+aV/tyNlP+qCp OpaSkFJyWJa+yqZaUsIr7rbP7/yEUAlRAD1DI= 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=IbhOIvJsMMGtt/V9+zcd97fYa9XDLL/Lh7Zgpcs637U=; b=C38Fhw8OKfGMttt1wQy+9C0ocF+i9AGpq5eDFPghzEbXC7/7nEtyv8w0iCpo7F2V9h tW3BeJ5JXYxXkLaAvxnCrZFnJ045ZejqkERzf0fS68eyXp1gBWsaah6g6OmBTor8+daI kBYPJn0MCgrbAcSSmWWh2GXI/akw4Uun0fpUf+h4wIkJvrAJMHBNQ7HpNPHD8EI126dB 5G90zqpsfXWvnFFGeaT4c8SpyXzSQ7aVk/gZh0j+aYEbquskgdZ66zh36EnE7DNJLSAo Q4/TwNamjeMtPmJyAy134yEl/mUkGCz6et2CfAG+dijNvGZ/EMXOgR+QxUNDIZQ1C6PS J0uw== X-Gm-Message-State: ALyK8tKn6/LNO/mOe3CA210ZjvXNTtdIBEPp106Ayu5R8YKsGlz5jC5AAogIbtDquxIenb8I X-Received: by 10.28.85.69 with SMTP id j66mr708148wmb.91.1464903726354; Thu, 02 Jun 2016 14:42:06 -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 c62sm3173705wmd.1.2016.06.02.14.42.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 02 Jun 2016 14:42:05 -0700 (PDT) From: Daniel Lezcano To: daniel.lezcano@linaro.org, tglx@linutronix.de Cc: linux-kernel@vger.kernel.org, Florian Fainelli , Ray Jui , Scott Branden , Russell King , linux-arm-kernel@lists.infradead.org (moderated list:ARM SUB-ARCHITECT...), bcm-kernel-feedback-list@broadcom.com (open list:BROADCOM BCM281XX...) Subject: [PATCH 3/6] clocksource/drivers/bcm2835: Add the COMPILE_TEST option Date: Thu, 2 Jun 2016 23:41:34 +0200 Message-Id: <1464903697-3802-3-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1464903697-3802-1-git-send-email-daniel.lezcano@linaro.org> References: <1464903697-3802-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_BCM2835_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. Signed-off-by: Daniel Lezcano --- arch/arm/mach-bcm/Kconfig | 1 + drivers/clocksource/Kconfig | 7 +++++++ drivers/clocksource/Makefile | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) -- 1.9.1 diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig index 7ef1214..b7414df 100644 --- a/arch/arm/mach-bcm/Kconfig +++ b/arch/arm/mach-bcm/Kconfig @@ -143,6 +143,7 @@ config ARCH_BCM2835 select ARM_TIMER_SP804 select HAVE_ARM_ARCH_TIMER if ARCH_MULTI_V7 select CLKSRC_OF + select BCM2835_TIMER select PINCTRL select PINCTRL_BCM2835 help diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig index 6ff327a..34053ab 100644 --- a/drivers/clocksource/Kconfig +++ b/drivers/clocksource/Kconfig @@ -27,6 +27,13 @@ config CLKBLD_I8253 config CLKSRC_MMIO bool +config BCM2835_TIMER + bool "BCM2835 timer driver" if COMPILE_TEST + depends on GENERIC_CLOCKEVENTS + select CLKSRC_MMIO + help + Enables the support for the BCM2835 timer driver. + config DIGICOLOR_TIMER bool "Digicolor timer driver" if COMPILE_TEST depends on GENERIC_CLOCKEVENTS diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile index b0a3c96..6e278d4 100644 --- a/drivers/clocksource/Makefile +++ b/drivers/clocksource/Makefile @@ -19,7 +19,7 @@ obj-$(CONFIG_CLKSRC_NOMADIK_MTU) += nomadik-mtu.o obj-$(CONFIG_CLKSRC_DBX500_PRCMU) += clksrc-dbx500-prcmu.o obj-$(CONFIG_ARMADA_370_XP_TIMER) += time-armada-370-xp.o obj-$(CONFIG_ORION_TIMER) += time-orion.o -obj-$(CONFIG_ARCH_BCM2835) += bcm2835_timer.o +obj-$(CONFIG_BCM2835_TIMER) += bcm2835_timer.o obj-$(CONFIG_ARCH_CLPS711X) += clps711x-timer.o obj-$(CONFIG_ARCH_ATLAS7) += timer-atlas7.o obj-$(CONFIG_ARCH_MOXART) += moxart_timer.o