From: daniel.lezcano@linaro.org (Daniel Lezcano)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/6] Clocksource: add nuc970 clocksource driver
Date: Wed, 29 Jun 2016 18:10:55 +0200 [thread overview]
Message-ID: <5773F30F.3020201@linaro.org> (raw)
In-Reply-To: <4184925.Jh1dkPbmzX@wuerfel>
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 <mcuos.com@gmail.com>
>> ---
>> .../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
--
<http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
WARNING: multiple messages have this Message-ID (diff)
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Wan Zongshun <vw@iommu.org>
Cc: devicetree@vger.kernel.org, Wan Zongshun <mcuos.com@gmail.com>,
Arnd Bergmann <arnd@arndb.de>,
linux-kernel@vger.kernel.org,
Russell King <linux@armlinux.org.uk>,
Thomas Gleixner <tglx@linutronix.de>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 3/6] Clocksource: add nuc970 clocksource driver
Date: Wed, 29 Jun 2016 18:10:55 +0200 [thread overview]
Message-ID: <5773F30F.3020201@linaro.org> (raw)
In-Reply-To: <4184925.Jh1dkPbmzX@wuerfel>
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 <mcuos.com@gmail.com>
>> ---
>> .../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
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Wan Zongshun <vw@iommu.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
linux-arm-kernel@lists.infradead.org,
Russell King <linux@armlinux.org.uk>,
devicetree@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>,
linux-kernel@vger.kernel.org, Wan Zongshun <mcuos.com@gmail.com>
Subject: Re: [PATCH 3/6] Clocksource: add nuc970 clocksource driver
Date: Wed, 29 Jun 2016 18:10:55 +0200 [thread overview]
Message-ID: <5773F30F.3020201@linaro.org> (raw)
In-Reply-To: <4184925.Jh1dkPbmzX@wuerfel>
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 <mcuos.com@gmail.com>
>> ---
>> .../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
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
next prev parent reply other threads:[~2016-06-29 16:10 UTC|newest]
Thread overview: 78+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-25 10:37 [PATCH 0/6] ARM: NUC900: Add NUC970 SoC support Wan Zongshun
2016-06-25 10:37 ` Wan Zongshun
2016-06-25 10:37 ` Wan Zongshun
2016-06-25 10:37 ` [PATCH 1/6] ARM: NUC900: Add nuc970 machine support Wan Zongshun
2016-06-25 10:37 ` Wan Zongshun
2016-06-25 10:37 ` Wan Zongshun
2016-06-29 15:19 ` Arnd Bergmann
2016-06-29 15:19 ` Arnd Bergmann
2016-06-29 15:19 ` Arnd Bergmann
2016-07-05 7:38 ` Wan Zongshun
2016-07-05 7:38 ` Wan Zongshun
2016-07-05 7:38 ` Wan Zongshun
2016-07-05 8:09 ` Arnd Bergmann
2016-07-05 8:09 ` Arnd Bergmann
2016-07-05 8:09 ` Arnd Bergmann
2016-06-25 10:37 ` [PATCH 2/6] ARM: dts: nuc900: Add nuc970 dts files Wan Zongshun
2016-06-25 10:37 ` Wan Zongshun
2016-06-25 10:37 ` Wan Zongshun
2016-06-28 20:56 ` Rob Herring
2016-06-28 20:56 ` Rob Herring
2016-06-29 15:24 ` Arnd Bergmann
2016-06-29 15:24 ` Arnd Bergmann
2016-06-29 15:24 ` Arnd Bergmann
2016-06-25 10:37 ` [PATCH 3/6] Clocksource: add nuc970 clocksource driver Wan Zongshun
2016-06-25 10:37 ` Wan Zongshun
2016-06-25 10:37 ` Wan Zongshun
2016-06-27 19:46 ` Daniel Lezcano
2016-06-27 19:46 ` Daniel Lezcano
2016-06-27 19:46 ` Daniel Lezcano
2016-07-05 8:21 ` Wan Zongshun
2016-07-05 8:21 ` Wan Zongshun
2016-07-05 8:21 ` Wan Zongshun
2016-07-05 10:03 ` Daniel Lezcano
2016-07-05 10:03 ` Daniel Lezcano
2016-07-05 10:03 ` Daniel Lezcano
2016-06-29 15:25 ` Arnd Bergmann
2016-06-29 15:25 ` Arnd Bergmann
2016-06-29 15:25 ` Arnd Bergmann
2016-06-29 16:10 ` Daniel Lezcano [this message]
2016-06-29 16:10 ` Daniel Lezcano
2016-06-29 16:10 ` Daniel Lezcano
2016-07-05 7:43 ` Wan Zongshun
2016-07-05 7:43 ` Wan Zongshun
2016-07-05 7:43 ` Wan Zongshun
2016-06-25 10:37 ` [PATCH 4/6] irqchip: add irqchip driver for nuc900 Wan Zongshun
2016-06-25 10:37 ` Wan Zongshun
2016-06-25 10:37 ` Wan Zongshun
2016-06-29 15:27 ` Arnd Bergmann
2016-06-29 15:27 ` Arnd Bergmann
2016-06-29 15:27 ` Arnd Bergmann
2016-07-05 7:47 ` Wan Zongshun
2016-07-05 7:47 ` Wan Zongshun
2016-07-05 8:09 ` Arnd Bergmann
2016-07-05 8:09 ` Arnd Bergmann
2016-07-05 8:09 ` Arnd Bergmann
2016-07-09 3:25 ` Wan Zongshun
2016-07-09 3:25 ` Wan Zongshun
2016-07-09 20:17 ` Arnd Bergmann
2016-07-09 20:17 ` Arnd Bergmann
2016-07-09 20:17 ` Arnd Bergmann
2016-07-22 2:37 ` Wan ZongShun
2016-07-22 2:37 ` Wan ZongShun
2016-07-22 2:37 ` Wan ZongShun
2016-06-30 16:30 ` Jason Cooper
2016-06-30 16:30 ` Jason Cooper
2016-06-25 10:37 ` [PATCH 5/6] clk: add Clock driver for nuc970 Wan Zongshun
2016-06-25 10:37 ` Wan Zongshun
2016-06-29 15:28 ` Arnd Bergmann
2016-06-29 15:28 ` Arnd Bergmann
2016-06-29 15:28 ` Arnd Bergmann
2016-06-25 10:37 ` [PATCH 6/6] nuc900: add nuc970 platform defconfig file Wan Zongshun
2016-06-25 10:37 ` Wan Zongshun
2016-06-29 15:29 ` Arnd Bergmann
2016-06-29 15:29 ` Arnd Bergmann
2016-06-29 15:29 ` Arnd Bergmann
2016-06-29 15:32 ` [PATCH 0/6] ARM: NUC900: Add NUC970 SoC support Arnd Bergmann
2016-06-29 15:32 ` Arnd Bergmann
2016-06-29 15:32 ` Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5773F30F.3020201@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.