Skip to contentSkip to conversation

Versatile AB/PB clocksource support

PATCH In review Rob Herring 3 participants 7 messages Jan 28, 2015 – Feb 3, 2015

Subsystems (2)
lore
Share & tools
lore

Rob Herring

author maintainer
#0 lore raw

cover Versatile AB/PB clocksource support

The Versatile clocksource driver can also be used on Versatile AB and PB platforms, not just Versatile Express. This series adds support for those boards.

I've split this off from the rest of the Versatile DT and multi-platform support as I'm not going to get it in place for 3.20. This part is fairly trivial and is ready to go.

Daniel, Can you please take the whole series.

Rob

Rob Herring (3):
dt/bindings: Add binding for Versatile system registers
clocksource: versatile: adapt for Versatile AB and PB boards
dts: versatile: add sysregs node

 Documentation/devicetree/bindings/arm/versatile-sysreg.txt | 10 ++++++++++
 arch/arm/boot/dts/versatile-ab.dts                         |  5 +++++
 drivers/clocksource/versatile.c                            |  4 +++-
 3 files changed, 18 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/arm/versatile-sysreg.txt
Signature · 1 line
2.1.0
author maintainer
#1 lore raw

PATCH 1/3 dt/bindings: Add binding for Versatile system registers

Add binding for Versatile board system registers found in the FPGA of the Versatile/AB and Versatile/PB boards.

Cc Pawel Moll <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Kumar Gala <[email protected]>
Cc devicetree at vger.kernel.org
---
 Documentation/devicetree/bindings/arm/versatile-sysreg.txt | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/versatile-sysreg.txt
Documentation/devicetree/bindings/arm/versatile-sysreg.txt new file +10 -0
new file mode 100644
index 0000000..a4f1526
@@ -0,0 +1,10 @@
+ARM Versatile system registers
+--------------------------------------
+
+This is a system control registers block, providing multiple low level
+platform functions like board detection and identification, software
+interrupt generation, MMC and NOR Flash control etc.
+
+Required node properties:
+- compatible value : = "arm,versatile-sysreg", "syscon"
+- reg : physical base address and the size of the registers window
Signature · 1 line
2.1.0
author maintainer
#3 lore raw

PATCH 2/3 clocksource: versatile: adapt for Versatile AB and PB boards

In reply to Rob Herring

The same 24MHz counter is also present on Versatile AB and PB boards, so add the compatible string for them.

Cc Liviu Dudau <[email protected]>
Cc Sudeep Holla <[email protected]>
Cc Lorenzo Pieralisi <[email protected]>
Cc Daniel Lezcano <[email protected]>
Cc Thomas Gleixner <[email protected]>
---
 drivers/clocksource/versatile.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/clocksource/versatile.c +3 -1
index 2798e74..0a26d3d 100644
@@ -36,5 +36,7 @@ static void __init versatile_sched_clock_init(struct device_node *node)
 
 	sched_clock_register(versatile_sys_24mhz_read, 32, 24000000);
 }
-CLOCKSOURCE_OF_DECLARE(versatile, "arm,vexpress-sysreg",
+CLOCKSOURCE_OF_DECLARE(vexpress, "arm,vexpress-sysreg",
+		       versatile_sched_clock_init);
+CLOCKSOURCE_OF_DECLARE(versatile, "arm,versatile-sysreg",
 		       versatile_sched_clock_init);
Signature · 1 line
2.1.0
author maintainer
#5 lore raw

PATCH 3/3 dts: versatile: add sysregs node

In reply to Rob Herring

The Versatile boards have the same sysregs as other ARM Ltd boards. Add the nodes in order to enable support for 24MHz counter as sched_clock.

This is a minimal node definition as the existing sub node definition used on VExpress has some issues raised by Linus W.

Cc Russell King <[email protected]>
Cc Linus Walleij <[email protected]>
Cc devicetree at vger.kernel.org
---
 arch/arm/boot/dts/versatile-ab.dts | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/boot/dts/versatile-ab.dts +5 -0
index 27d0d9c..01f4019 100644
@@ -252,6 +252,11 @@
 			#size-cells = <1>;
 			ranges = <0 0x10000000 0x10000>;
 
+			sysreg at 0 {
+				compatible = "arm,versatile-sysreg", "syscon";
+				reg = <0x00000 0x1000>;
+			};
+
 			aaci at 4000 {
 				compatible = "arm,primecell";
 				reg = <0x4000 0x1000>;
Signature · 1 line
2.1.0
Acked-by on v1 2/3
#4 lore raw

Re: [PATCH 2/3] clocksource: versatile: adapt for Versatile AB and PB boards

In reply to Rob Herring
Quoted 18 lines · Rob Herring

The same 24MHz counter is also present on Versatile AB and PB boards, so add the compatible string for them.

Cc Liviu Dudau <[email protected]>
Cc Sudeep Holla <[email protected]>
Cc Lorenzo Pieralisi <[email protected]>
Cc Daniel Lezcano <[email protected]>
Cc Thomas Gleixner <[email protected]>
---
 drivers/clocksource/versatile.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/clocksource/versatile.c +0 -0
index 2798e74..0a26d3d 100644

drivers/clocksource/versatile.c static void __init versatile_sched_clock_init(struct device_node *node) · line 42

Quoted 8 lines
drivers/clocksource/versatile.c +3 -1
@@ -36,5 +36,7 @@ static void __init versatile_sched_clock_init(struct device_node *node)
 
 	sched_clock_register(versatile_sys_24mhz_read, 32, 24000000);
 }
-CLOCKSOURCE_OF_DECLARE(versatile, "arm,vexpress-sysreg",
+CLOCKSOURCE_OF_DECLARE(vexpress, "arm,vexpress-sysreg",
+		       versatile_sched_clock_init);
+CLOCKSOURCE_OF_DECLARE(versatile, "arm,versatile-sysreg",
 		       versatile_sched_clock_init);
Quoted 4 lines
Signature · 1 line
2.1.0
Signature · 8 lines
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ?\_(?)_/?
Acked-by on v1 1/3
#2 lore raw

Re: [PATCH 1/3] dt/bindings: Add binding for Versatile system registers

In reply to Rob Herring
Quoted 9 lines · Rob Herring

Add binding for Versatile board system registers found in the FPGA of the Versatile/AB and Versatile/PB boards.

Cc Pawel Moll <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Kumar Gala <[email protected]>
Cc devicetree at vger.kernel.org

Yours,
Linus Walleij

Acked-by on v1 3/3
#6 lore raw

Re: [PATCH 3/3] dts: versatile: add sysregs node

In reply to Rob Herring
Quoted 10 lines · Rob Herring

The Versatile boards have the same sysregs as other ARM Ltd boards. Add the nodes in order to enable support for 24MHz counter as sched_clock.

This is a minimal node definition as the existing sub node definition used on VExpress has some issues raised by Linus W.

Cc Russell King <[email protected]>
Cc Linus Walleij <[email protected]>
Cc devicetree at vger.kernel.org

Yours,
Linus Walleij