From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932148AbcF2QLY (ORCPT ); Wed, 29 Jun 2016 12:11:24 -0400 Received: from mail-wm0-f44.google.com ([74.125.82.44]:35355 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753136AbcF2QLV (ORCPT ); Wed, 29 Jun 2016 12:11:21 -0400 Subject: Re: [PATCH 3/6] Clocksource: add nuc970 clocksource driver To: Wan Zongshun References: <1466851042-22239-1-git-send-email-vw@iommu.org> <1466851042-22239-4-git-send-email-vw@iommu.org> <4184925.Jh1dkPbmzX@wuerfel> Cc: Arnd Bergmann , linux-arm-kernel@lists.infradead.org, Russell King , devicetree@vger.kernel.org, Thomas Gleixner , linux-kernel@vger.kernel.org, Wan Zongshun From: Daniel Lezcano Message-ID: <5773F30F.3020201@linaro.org> Date: Wed, 29 Jun 2016 18:10:55 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <4184925.Jh1dkPbmzX@wuerfel> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/29/2016 05:25 PM, Arnd Bergmann wrote: > On Saturday, June 25, 2016 6:37:19 PM CEST Wan Zongshun wrote: >> This patch is to add nuc970 clocksource driver support. >> >> Signed-off-by: Wan Zongshun >> --- >> .../mach-w90x900/include/mach/nuc970-regs-timer.h | 44 +++++ >> drivers/clocksource/Kconfig | 8 + >> drivers/clocksource/Makefile | 1 + >> drivers/clocksource/timer-nuc900.c | 207 +++++++++++++++++++++ >> 4 files changed, 260 insertions(+) >> create mode 100644 arch/arm/mach-w90x900/include/mach/nuc970-regs-timer.h >> create mode 100644 drivers/clocksource/timer-nuc900.c >> >> diff --git a/arch/arm/mach-w90x900/include/mach/nuc970-regs-timer.h b/arch/arm/mach-w90x900/include/mach/nuc970-regs-timer.h >> new file mode 100644 >> index 0000000..43d7e8b >> --- /dev/null >> +++ b/arch/arm/mach-w90x900/include/mach/nuc970-regs-timer.h > > Please move the contents of the header file into the driver. We try to not > have any new mach/*.h headers. > >> + >> +static unsigned int timer0_load; >> +static void __iomem *tmr_base; >> + >> +static int nuc970_clockevent_set_oneshot(struct clock_event_device *evt) >> +{ >> + unsigned int val; >> + >> + val = __raw_readl(tmr_base + REG_TMR_TCSR0); >> + val &= ~(0x03 << 27); >> + >> + val |= (ONESHOT | COUNTEN | INTEN | PRESCALE); >> + >> + __raw_writel(val, tmr_base + REG_TMR_TCSR0); >> + return 0; >> +} >> + > > writel() instead of __raw_writel() Wan Zongshun, FYI : https://lkml.org/lkml/2015/12/18/422 Not sure it does a noticeable difference on arm926. Thanks Arnd for the clarification. -- Daniel -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog