From patchwork Tue Jul 10 11:23:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Machek X-Patchwork-Id: 1177091 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 14BC9DFF34 for ; Tue, 10 Jul 2012 11:26:51 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SoYXI-0001QX-QR; Tue, 10 Jul 2012 11:23:20 +0000 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SoYXC-0001Po-Vy for linux-arm-kernel@lists.infradead.org; Tue, 10 Jul 2012 11:23:16 +0000 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 46AB9F08BB; Tue, 10 Jul 2012 13:23:12 +0200 (CEST) Date: Tue, 10 Jul 2012 13:23:09 +0200 From: Pavel Machek To: Thomas Gleixner Subject: Re: Move designware timer OF glue into drivers/clocksource Message-ID: <20120710112308.GC8701@elf.ucw.cz> References: <20120710094249.GF10225@elf.ucw.cz> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Warning: Reading this can be dangerous to your mental health. User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Note: CRM114 invocation failed X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [195.113.26.193 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: thomas.petazzoni@free-electrons.com, wd@denx.de, johnstul@us.ibm.com, linux-arm-kernel@lists.infradead.org, jamie@jamieiles.com, dinguyen@altera.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Hi! > > -obj-y := common.o time.o > > +obj-y := common.o ../../../drivers/clocksource/dw_apb_timer_of.o > > Urgh! Why can't we just compile it from drivers/clocksource/Makefile ? > > Otherwise, yes please move the code instead of creating a copy. Ok, what about this? Would it be ok to submit dw_apb_timer_of.c for merge now, so that picoxcell can switch to it and upcomming mach-socfpga can use it? Thanks, Pavel commit eb710d44cc1b9e7a5d5516a87c43c3c0c62a8936 Author: Pavel Date: Tue Jul 10 13:21:24 2012 +0200 Create a config option to avoid compile-from-different-directory hack. Signed-off-by: Pavel Machek \ No newline at end of file diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index b7064f5..dbdf53d 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -258,6 +258,7 @@ config ARCH_SOCFPGA select CLKDEV_LOOKUP select CPU_V7 select DW_APB_TIMER + select DW_APB_TIMER_OF select GENERIC_CLOCKEVENTS select GPIO_PL061 if GPIOLIB select HAVE_MACH_CLKDEV diff --git a/arch/arm/mach-socfpga/Makefile b/arch/arm/mach-socfpga/Makefile index 239b8a0..a44f4ff 100644 --- a/arch/arm/mach-socfpga/Makefile +++ b/arch/arm/mach-socfpga/Makefile @@ -2,5 +2,5 @@ # Makefile for the linux kernel. # -obj-y := common.o ../../../drivers/clocksource/dw_apb_timer_of.o +obj-y := common.o obj-$(CONFIG_MACH_SOCFPGA_CYCLONE5) += socfpga_cyclone5.o diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig index 99c6b20..e62bc7e 100644 --- a/drivers/clocksource/Kconfig +++ b/drivers/clocksource/Kconfig @@ -16,6 +16,9 @@ config CLKSRC_MMIO config DW_APB_TIMER bool +config DW_APB_TIMER_OF + bool + config CLKSRC_DBX500_PRCMU bool "Clocksource PRCMU Timer" depends on UX500_SOC_DB8500 diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile index dd3e661..2cdaf7d 100644 --- a/drivers/clocksource/Makefile +++ b/drivers/clocksource/Makefile @@ -10,4 +10,5 @@ obj-$(CONFIG_EM_TIMER_STI) += em_sti.o obj-$(CONFIG_CLKBLD_I8253) += i8253.o obj-$(CONFIG_CLKSRC_MMIO) += mmio.o obj-$(CONFIG_DW_APB_TIMER) += dw_apb_timer.o +obj-$(CONFIG_DW_APB_TIMER_OF) += dw_apb_timer_of.o obj-$(CONFIG_CLKSRC_DBX500_PRCMU) += clksrc-dbx500-prcmu.o