From mboxrd@z Thu Jan 1 00:00:00 1970 From: vw@iommu.org (Wan Zongshun) Date: Tue, 5 Jul 2016 15:43:03 +0800 Subject: [PATCH 3/6] Clocksource: add nuc970 clocksource driver In-Reply-To: <4184925.Jh1dkPbmzX@wuerfel> References: <1466851042-22239-1-git-send-email-vw@iommu.org> <1466851042-22239-4-git-send-email-vw@iommu.org> <4184925.Jh1dkPbmzX@wuerfel> Message-ID: <577B6507.2040803@iommu.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 2016?06?29? 23:25, 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. Ok, done. > >> + >> +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() Ok, so this change will apply to all drivers. > > Arnd > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel at lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wan Zongshun Subject: Re: [PATCH 3/6] Clocksource: add nuc970 clocksource driver Date: Tue, 5 Jul 2016 15:43:03 +0800 Message-ID: <577B6507.2040803@iommu.org> References: <1466851042-22239-1-git-send-email-vw@iommu.org> <1466851042-22239-4-git-send-email-vw@iommu.org> <4184925.Jh1dkPbmzX@wuerfel> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <4184925.Jh1dkPbmzX@wuerfel> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Arnd Bergmann Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Wan Zongshun , Daniel Lezcano , Russell King , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Thomas Gleixner , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: devicetree@vger.kernel.org On 2016=E5=B9=B406=E6=9C=8829=E6=97=A5 23:25, 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 t= o not > have any new mach/*.h headers. Ok, done. > >> + >> +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 =3D __raw_readl(tmr_base + REG_TMR_TCSR0); >> + val &=3D ~(0x03 << 27); >> + >> + val |=3D (ONESHOT | COUNTEN | INTEN | PRESCALE); >> + >> + __raw_writel(val, tmr_base + REG_TMR_TCSR0); >> + return 0; >> +} >> + > > writel() instead of __raw_writel() Ok, so this change will apply to all drivers. > > Arnd > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > > -- To unsubscribe from this list: send the line "unsubscribe devicetree" i= n the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754717AbcGEHnO (ORCPT ); Tue, 5 Jul 2016 03:43:14 -0400 Received: from m199-177.yeah.net ([123.58.177.199]:58157 "EHLO m199-177.yeah.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751301AbcGEHnL (ORCPT ); Tue, 5 Jul 2016 03:43:11 -0400 Subject: Re: [PATCH 3/6] Clocksource: add nuc970 clocksource driver To: Arnd Bergmann References: <1466851042-22239-1-git-send-email-vw@iommu.org> <1466851042-22239-4-git-send-email-vw@iommu.org> <4184925.Jh1dkPbmzX@wuerfel> Cc: devicetree@vger.kernel.org, Wan Zongshun , Daniel Lezcano , Russell King , linux-kernel@vger.kernel.org, Thomas Gleixner , linux-arm-kernel@lists.infradead.org From: Wan Zongshun Message-ID: <577B6507.2040803@iommu.org> Date: Tue, 5 Jul 2016 15:43:03 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <4184925.Jh1dkPbmzX@wuerfel> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1koWUFPN1dZCBgUCR5ZQVZIVU1KSEtLS0pOT09CTklIQkhXWQkOFx4IWU FZKCs9JDU0NT4kMjUkMz46Pz4pQUtVS0A2IyQiPigkMjUkMz46Pz4pQUtVS0ArLykkNTQkMjUkMz 46Pz4pQUtVS0A4NC41LykiJDg1QUtVS0ApPjwyNDUkOigyOkFLVUtAKyk0LTI1OD4kKDM6NTwzOj JBS1VLQD8iNTo2MjgkMiskNTQkMjUkMz46Pz4pQUtVS0A2LjcvMiQpOCsvJD8yPT0#KT41LyQyNS QzPjo*PilBSVVLQDIrJC80PzoiJDg1LyRLJEpLS0FLVUtAMiskSiQ2MjUuLz4kODUvJEskSktBS1 VLQDIrJEhLJDYyNS4vPiQ4NS8kSyROS0FLVUtAMiskTiQ2MjUuLz4kODUvJEskSktBS1VLQDIrJE okMzQuKSQ4NS8kSyRKS0tBS1VLQCguOTE#OC8kLzQ*OiIkODUvJEskSktLQUtVS0AoLjkxPjgvJE okMzQuKSQ4NS8kSyRKS0tBS1VLQCguOTE#OC8kTiQ2MjUuLz4kODUvJEskSktBS1VLQCg5MSQ3Pj UkT0skI0FLVUtLSktALz4jLyQ3PjUkSklDSyQjQUtVS0tKS0A4NS8kMy82NyQ3PjUkSjAkTjBBS1 VLS0pLQCk#OD4yLT4pJDg1LyROJCNBS1VLS0pLQCM2OjI3PikkNS43N0FLVUtLSktAPz43Mi0#KS Q3PjUkS0FLVUtLSktANzo1PCQ#NUFLVUtLSktAPTUkNjoiJE9KQiQzNzEkSiRLQ0tIS09BS1VISE A9KyQpPiQ9LCQzNzEkS0NLSEtNQVZMVU5AKC45JD5BSlVOTlkG X-HM-Sender-Digest: e1kSHx4VD1lBWUc6M006Qhw6IzoaCDxLNQ0MLhRKGDAaFDlVSlVKT01M TEtPTkNOSk5PVTMWGhIXVQ0MOxIUFhYOVRQJHEVZV1kMHhlZQR0aFwgeV1kIAVlBSE9LSjdXWRIL WUFZSUpLVUpIVUJMVUpNQ1kG X-HM-Tid: 0a55ba02ab3d642788d4f11054e3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016年06月29日 23:25, 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. Ok, done. > >> + >> +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() Ok, so this change will apply to all drivers. > > Arnd > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > >