Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932123AbbBPMVJ (ORCPT ); Mon, 16 Feb 2015 07:21:09 -0500 Received: from mail-wg0-f47.google.com ([74.125.82.47]:43966 "EHLO mail-wg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752517AbbBPMVD convert rfc822-to-8bit (ORCPT ); Mon, 16 Feb 2015 07:21:03 -0500 MIME-Version: 1.0 In-Reply-To: <54E12F39.6030509@suse.de> References: <1423763164-5606-1-git-send-email-mcoquelin.stm32@gmail.com> <1423763164-5606-4-git-send-email-mcoquelin.stm32@gmail.com> <54E12F39.6030509@suse.de> Date: Mon, 16 Feb 2015 13:21:01 +0100 Message-ID: Subject: Re: [PATCH 03/14] clocksource: Add ARM System timer driver From: Maxime Coquelin To: =?UTF-8?Q?Andreas_F=C3=A4rber?= Cc: Rob Herring , Jonathan Corbet , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Philipp Zabel , Russell King , Daniel Lezcano , Thomas Gleixner , Linus Walleij , Greg Kroah-Hartman , Jiri Slaby , Arnd Bergmann , Andrew Morton , "David S. Miller" , Mauro Carvalho Chehab , Joe Perches , Antti Palosaari , Tejun Heo , Will Deacon , Nikolay Borisov , Rusty Russell , Kees Cook , Michal Marek , "linux-doc@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-gpio@vger.kernel.org" , "linux-serial@vger.kernel.org" , Linux-Arch , "linux-api@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2818 Lines: 74 2015-02-16 0:43 GMT+01:00 Andreas Färber : > Am 12.02.2015 um 18:45 schrieb Maxime Coquelin: >> This patch adds clocksource support for ARMv7-M's System timer, >> also known as SysTick. >> >> Signed-off-by: Maxime Coquelin >> --- >> .../devicetree/bindings/arm/system_timer.txt | 15 +++++ >> drivers/clocksource/Kconfig | 7 ++ >> drivers/clocksource/Makefile | 1 + >> drivers/clocksource/arm_system_timer.c | 74 ++++++++++++++++++++++ >> 4 files changed, 97 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/arm/system_timer.txt >> create mode 100644 drivers/clocksource/arm_system_timer.c >> >> diff --git a/Documentation/devicetree/bindings/arm/system_timer.txt b/Documentation/devicetree/bindings/arm/system_timer.txt >> new file mode 100644 >> index 0000000..35268b7 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/arm/system_timer.txt >> @@ -0,0 +1,15 @@ >> +* ARM System Timer >> + >> +ARMv7-M includes a system timer, known as SysTick. Current driver only >> +implements the clocksource feature. >> + >> +Required properties: >> +- compatible : Should be "arm,armv7m-systick" >> +- reg : The address range of the timer >> +- clocks : The input clock of the timer >> + >> +systick: system-timer { >> + compatible = "arm,armv7m-systick"; >> + reg = <0xe000e010 0x10>; >> + clocks = <&clk_systick>; >> +}; > > Binding documentation is supposed to go into its own patch: > https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/Documentation/devicetree/bindings/submitting-patches.txt Ok, will change this in the v2. > ... > > I've used a SysTick based implementation on my stm32 branch myself, but > looking at efm32 I got the impression that it would be better to use one > of the 32-bit TIM2/TIM5 as clocksource and the other as clockevents? > > Still this implementation will be handy to have, also for other targets. My view is that we should use as much generic parts of the Cortex-M as possible. Moreover, doing, that, we can keep one more IP instance under reset with associated clock gated, and so maybe reduce the power consumption a little (I haven't done any measurements) Do you see a case where it could be better to use the STM32 timers? Thanks, Maxime > > Regards, > Andreas > > -- > SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany > GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu, > Graham Norton; HRB 21284 (AG Nürnberg) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/