* [PATCH 00/22] SH MTU2 DT support
@ 2014-03-04 17:47 Laurent Pinchart
2014-03-04 17:47 ` [PATCH 22/22] clocksource: sh_mtu2: Add " Laurent Pinchart
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Laurent Pinchart @ 2014-03-04 17:47 UTC (permalink / raw)
To: linux-sh
Hello,
This patch set implements DT support for the MTU2 driver.
The first 17 patches clean up the driver to get rid of its platform data.
Patches 18/22 and 19/22 then remove platform data from arch/ code. Patches
20/22 and 21/22 drop support for platform data completely from the driver,
and patch 22/22 finally add DT support.
The patches are compile-tested only as I lack test hardware. Wolfram, would
you be able to test this series with your CCF support patch set for RZ/A1H ?
Laurent Pinchart (22):
clocksource: sh_mtu2: Use request_irq() instead of setup_irq()
clocksource: sh_mtu2: Turn sh_mtu2_priv fields into local variables
clocksource: sh_mtu2: Split channel fields from sh_mtu2_priv
clocksource: sh_mtu2: Rename struct sh_mtu2_priv to sh_mtu2_device
clocksource: sh_mtu2: Split channel setup to separate function
clocksource: sh_mtu2: Constify name argument to sh_mtu2_register()
clocksource: sh_mtu2: Add memory base to sh_mtu2_channel structure
clocksource: sh_mtu2: Add index to struct sh_mtu2_channel
clocksource: sh_mtu2: Replace kmalloc + memset with kzalloc
clocksource: sh_mtu2: Allocate channels dynamically
clocksource: sh_mtu2: Replace hardcoded register values with macros
clocksource: sh_mtu2: Set cpumask to cpu_possible_mask
clocksource: sh_mtu2: Hardcode MTU2 clock event rating to 200
clocksource: sh_mtu2: Add support for multiple channels per device
clocksource: sh_mtu2: Rename clock to "fck" in the non-legacy case
clocksource: sh_mtu2: Remove FSF mail address from GPL notice
clocksource: sh_mtu2: Sort headers alphabetically
sh: Switch to new style MTU2 device
ARM: shmobile: r7s72100: Switch to new style MTU2 device
clocksource: sh_mtu2: Drop support for legacy platform data
clocksource: sh_mtu2: Replace global spinlock with a per-device
spinlock
clocksource: sh_mtu2: Add DT support
.../devicetree/bindings/timer/renesas,mtu2.txt | 37 ++
arch/arm/mach-shmobile/clock-r7s72100.c | 2 +-
arch/arm/mach-shmobile/setup-r7s72100.c | 26 +-
arch/sh/kernel/cpu/clock-cpg.c | 2 +-
arch/sh/kernel/cpu/sh2a/clock-sh7264.c | 2 +-
arch/sh/kernel/cpu/sh2a/clock-sh7269.c | 2 +-
arch/sh/kernel/cpu/sh2a/setup-mxg.c | 98 +----
arch/sh/kernel/cpu/sh2a/setup-sh7201.c | 98 +----
arch/sh/kernel/cpu/sh2a/setup-sh7203.c | 67 +--
arch/sh/kernel/cpu/sh2a/setup-sh7206.c | 98 +----
arch/sh/kernel/cpu/sh2a/setup-sh7264.c | 71 +---
arch/sh/kernel/cpu/sh2a/setup-sh7269.c | 67 +--
drivers/clocksource/sh_mtu2.c | 452 +++++++++++++--------
13 files changed, 412 insertions(+), 610 deletions(-)
create mode 100644 Documentation/devicetree/bindings/timer/renesas,mtu2.txt
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 22/22] clocksource: sh_mtu2: Add DT support
2014-03-04 17:47 [PATCH 00/22] SH MTU2 DT support Laurent Pinchart
@ 2014-03-04 17:47 ` Laurent Pinchart
2014-03-05 13:56 ` [PATCH 00/22] SH MTU2 " Wolfram Sang
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Laurent Pinchart @ 2014-03-04 17:47 UTC (permalink / raw)
To: linux-sh; +Cc: Wolfram Sang, Daniel Lezcano, Thomas Gleixner, devicetree
Cc: devicetree@vger.kernel.org
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
.../devicetree/bindings/timer/renesas,mtu2.txt | 37 ++++++++++++++++++++++
drivers/clocksource/sh_mtu2.c | 8 +++++
2 files changed, 45 insertions(+)
create mode 100644 Documentation/devicetree/bindings/timer/renesas,mtu2.txt
diff --git a/Documentation/devicetree/bindings/timer/renesas,mtu2.txt b/Documentation/devicetree/bindings/timer/renesas,mtu2.txt
new file mode 100644
index 0000000..67edd25
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/renesas,mtu2.txt
@@ -0,0 +1,37 @@
+* Renesas R-Car Multi-Function Timer Pulse Unit 2 (MTU2)
+
+The MTU2 is a multi-purpose, multi-channel timer/counter with configurable
+clock inputs and programmable compare match.
+
+Channels share hardware resources but their counter and compare match value
+are independent. The MTU2 hardware supports five channels indexed from 0 to 4.
+
+Required Properties:
+
+ - compatible: must contain "renesas,mtu2"
+
+ - reg: base address and length of the registers block for the timer module.
+
+ - interrupt-parent, interrupts: interrupt specifiers for the timer, one for
+ each entry in interrupt-names.
+ - interrupt-names: must contain one entry named "tgi?a" for each enabled
+ channel, where "?" is the channel index expressed as one digit from "0" to
+ "4".
+
+ - clocks: a list of phandle + clock-specifier pairs, one for each entry
+ in clock-names.
+ - clock-names: must contain "fck" for the functional clock.
+
+
+Example: R7S72100 (RZ/A1H) MTU2 node
+
+ mtu2: timer@fcff0000 {
+ compatible = "renesas,mtu2";
+ reg = <0xfcff0000 0x400>;
+ interrupt-parent = <&gic>;
+ interrupts = <0 142 IRQ_TYPE_LEVEL_HIGH>,
+ <0 142 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "tgi0a", "tgi1a", "tgi2a";
+ clocks = <&mstp3_clks R7S72100_CLK_MTU2>;
+ clock-names = "fck";
+ };
diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c
index ebdf9d1..79387af 100644
--- a/drivers/clocksource/sh_mtu2.c
+++ b/drivers/clocksource/sh_mtu2.c
@@ -23,6 +23,7 @@
#include <linux/ioport.h>
#include <linux/irq.h>
#include <linux/module.h>
+#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_domain.h>
#include <linux/pm_runtime.h>
@@ -502,11 +503,18 @@ static const struct platform_device_id sh_mtu2_id_table[] = {
};
MODULE_DEVICE_TABLE(platform, sh_mtu2_id_table);
+static const struct of_device_id sh_mtu2_of_table[] = {
+ { .compatible = "renesas,mtu2" },
+ { }
+};
+MODULE_DEVICE_TABLE(of, sh_mtu2_of_table);
+
static struct platform_driver sh_mtu2_device_driver = {
.probe = sh_mtu2_probe,
.remove = sh_mtu2_remove,
.driver = {
.name = "sh_mtu2",
+ .of_match_table = of_match_ptr(sh_mtu2_of_table),
},
.id_table = sh_mtu2_id_table,
};
--
1.8.3.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 00/22] SH MTU2 DT support
2014-03-04 17:47 [PATCH 00/22] SH MTU2 DT support Laurent Pinchart
2014-03-04 17:47 ` [PATCH 22/22] clocksource: sh_mtu2: Add " Laurent Pinchart
@ 2014-03-05 13:56 ` Wolfram Sang
2014-03-12 8:29 ` Wolfram Sang
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Wolfram Sang @ 2014-03-05 13:56 UTC (permalink / raw)
To: linux-sh
[-- Attachment #1: Type: text/plain, Size: 263 bytes --]
> This patch set implements DT support for the MTU2 driver.
Cool!
> The patches are compile-tested only as I lack test hardware. Wolfram, would
> you be able to test this series with your CCF support patch set for RZ/A1H ?
Yes, will do, hopefully this week.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 00/22] SH MTU2 DT support
2014-03-04 17:47 [PATCH 00/22] SH MTU2 DT support Laurent Pinchart
2014-03-04 17:47 ` [PATCH 22/22] clocksource: sh_mtu2: Add " Laurent Pinchart
2014-03-05 13:56 ` [PATCH 00/22] SH MTU2 " Wolfram Sang
@ 2014-03-12 8:29 ` Wolfram Sang
2014-03-12 12:26 ` Laurent Pinchart
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Wolfram Sang @ 2014-03-12 8:29 UTC (permalink / raw)
To: linux-sh
[-- Attachment #1: Type: text/plain, Size: 705 bytes --]
On Tue, Mar 04, 2014 at 06:47:07PM +0100, Laurent Pinchart wrote:
> Hello,
>
> This patch set implements DT support for the MTU2 driver.
>
> The first 17 patches clean up the driver to get rid of its platform data.
> Patches 18/22 and 19/22 then remove platform data from arch/ code. Patches
> 20/22 and 21/22 drop support for platform data completely from the driver,
> and patch 22/22 finally add DT support.
>
> The patches are compile-tested only as I lack test hardware. Wolfram, would
> you be able to test this series with your CCF support patch set for RZ/A1H ?
Applying to current renesas/devel fails. What is this based on? Or
better: is there a branch available somewhere?
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 00/22] SH MTU2 DT support
2014-03-04 17:47 [PATCH 00/22] SH MTU2 DT support Laurent Pinchart
` (2 preceding siblings ...)
2014-03-12 8:29 ` Wolfram Sang
@ 2014-03-12 12:26 ` Laurent Pinchart
2014-03-12 18:04 ` Wolfram Sang
2014-03-12 18:22 ` Laurent Pinchart
5 siblings, 0 replies; 7+ messages in thread
From: Laurent Pinchart @ 2014-03-12 12:26 UTC (permalink / raw)
To: linux-sh
[-- Attachment #1: Type: text/plain, Size: 1208 bytes --]
Hi Wolfram,
On Wednesday 12 March 2014 09:29:44 Wolfram Sang wrote:
> On Tue, Mar 04, 2014 at 06:47:07PM +0100, Laurent Pinchart wrote:
> > Hello,
> >
> > This patch set implements DT support for the MTU2 driver.
> >
> > The first 17 patches clean up the driver to get rid of its platform data.
> > Patches 18/22 and 19/22 then remove platform data from arch/ code. Patches
> > 20/22 and 21/22 drop support for platform data completely from the driver,
> > and patch 22/22 finally add DT support.
> >
> > The patches are compile-tested only as I lack test hardware. Wolfram,
> > would you be able to test this series with your CCF support patch set for
> > RZ/A1H ?
>
> Applying to current renesas/devel fails. What is this based on? Or
> better: is there a branch available somewhere?
I've just rebased my timers devel branch on top of Simon's latest devel branch
and pushed the result to
git://linuxtv.org/pinchartl/fbdev.git timers/devel
Please ignore the WIP and other hacks before "clocksource: sh_mtu2: Use
request_irq() instead of setup_irq()", and the very last "ARM: shmobile:
Remove unused sh_timer_config members" patch.
--
Regards,
Laurent Pinchart
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 00/22] SH MTU2 DT support
2014-03-04 17:47 [PATCH 00/22] SH MTU2 DT support Laurent Pinchart
` (3 preceding siblings ...)
2014-03-12 12:26 ` Laurent Pinchart
@ 2014-03-12 18:04 ` Wolfram Sang
2014-03-12 18:22 ` Laurent Pinchart
5 siblings, 0 replies; 7+ messages in thread
From: Wolfram Sang @ 2014-03-12 18:04 UTC (permalink / raw)
To: linux-sh
[-- Attachment #1: Type: text/plain, Size: 798 bytes --]
> > > The patches are compile-tested only as I lack test hardware. Wolfram,
> > > would you be able to test this series with your CCF support patch set for
> > > RZ/A1H ?
> >
> > Applying to current renesas/devel fails. What is this based on? Or
> > better: is there a branch available somewhere?
>
> I've just rebased my timers devel branch on top of Simon's latest devel branch
> and pushed the result to
>
> git://linuxtv.org/pinchartl/fbdev.git timers/devel
Thanks! I merged this into my r7s-ccf branch now. I could boot into a
shell and the printk-timestamps make sense. So, for the whole series
Tested-by: Wolfram Sang <wsa@sang-engineering.com>
Daniel, I assume you use git-filter-branch, or shall I tag every patch
individually?
Kind regards,
Wolfram
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 00/22] SH MTU2 DT support
2014-03-04 17:47 [PATCH 00/22] SH MTU2 DT support Laurent Pinchart
` (4 preceding siblings ...)
2014-03-12 18:04 ` Wolfram Sang
@ 2014-03-12 18:22 ` Laurent Pinchart
5 siblings, 0 replies; 7+ messages in thread
From: Laurent Pinchart @ 2014-03-12 18:22 UTC (permalink / raw)
To: linux-sh
[-- Attachment #1: Type: text/plain, Size: 1169 bytes --]
Hi Wolfram,
On Wednesday 12 March 2014 19:04:02 Wolfram Sang wrote:
> > > > The patches are compile-tested only as I lack test hardware. Wolfram,
> > > > would you be able to test this series with your CCF support patch set
> > > > for RZ/A1H ?
> > >
> > > Applying to current renesas/devel fails. What is this based on? Or
> > > better: is there a branch available somewhere?
> >
> > I've just rebased my timers devel branch on top of Simon's latest devel
> > branch and pushed the result to
> >
> > git://linuxtv.org/pinchartl/fbdev.git timers/devel
>
> Thanks! I merged this into my r7s-ccf branch now. I could boot into a
> shell and the printk-timestamps make sense. So, for the whole series
>
> Tested-by: Wolfram Sang <wsa@sang-engineering.com>
>
> Daniel, I assume you use git-filter-branch, or shall I tag every patch
> individually?
Thank you for the tests. I'll apply your Tested-by tag to my branch. We're
still missing review of the DT bindings for this series. I'll ping the
devicetree mailing list, and if I don't get a reply in a week, I'll just send
a pull request to Daniel.
--
Regards,
Laurent Pinchart
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-03-12 18:22 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-04 17:47 [PATCH 00/22] SH MTU2 DT support Laurent Pinchart
2014-03-04 17:47 ` [PATCH 22/22] clocksource: sh_mtu2: Add " Laurent Pinchart
2014-03-05 13:56 ` [PATCH 00/22] SH MTU2 " Wolfram Sang
2014-03-12 8:29 ` Wolfram Sang
2014-03-12 12:26 ` Laurent Pinchart
2014-03-12 18:04 ` Wolfram Sang
2014-03-12 18:22 ` Laurent Pinchart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).