Skip to contentSkip to conversation

arm64: dts: marvell: cp110: add required clocks for mdio interface

PATCH New Thomas Petazzoni 4 participants 5 messages Jun 6, 2017 – Jun 8, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: marvell: cp110: add required clocks for mdio interface

From: Russell King <[email protected]>

Add the three required clocks for the MDIO interface to be functional on Armada 8k platforms. Without this, the CPU hangs, causing RCU stalls or the system to become unresponsive.

[Thomas:
- remove mg_core_clock, since it's a parent of mg_clock
- also add clock references to the slave CP mdio instance]

---
 arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi | 1 +
 arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi  | 1 +
 2 files changed, 2 insertions(+)
arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi +1 -0
index 00af338..c33e891 100644
@@ -95,6 +95,7 @@
 				#size-cells = <0>;
 				compatible = "marvell,orion-mdio";
 				reg = <0x12a200 0x10>;
+				clocks = <&cpm_syscon0 1 9>, <&cpm_syscon0 1 5>;
 			};
 
 			cpm_icu: interrupt-controller at 1e0000 {
arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi +1 -0
index bee48ae..2a99ff8 100644
@@ -100,6 +100,7 @@
 				#size-cells = <0>;
 				compatible = "marvell,orion-mdio";
 				reg = <0x12a200 0x10>;
+				clocks = <&cps_syscon0 1 9>, <&cps_syscon0 1 5>;
 			};
 
 			cps_icu: interrupt-controller at 1e0000 {
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 arm64: dts: marvell: cp110: add required clocks for mdio interface

Quoted 11 lines · Thomas Petazzoni

From: Russell King <[email protected]>

Add the three required clocks for the MDIO interface to be functional on Armada 8k platforms. Without this, the CPU hangs, causing RCU stalls or the system to become unresponsive.

[Thomas:
- remove mg_core_clock, since it's a parent of mg_clock
- also add clock references to the slave CP mdio instance]

Thanks,

	M.
Signature · 1 line
Jazz is not dead. It just smells funny...
#2 lore raw

PATCH 1/1 arm64: dts: marvell: cp110: add required clocks for mdio interface

In reply to Thomas Petazzoni

Hi Thomas,

Quoted 3 lines · Thomas Petazzoni

From: Russell King <[email protected]>

Add the three required clocks for the MDIO interface to be functional

You should also maybe update the commit log and speaking of two clocks as you removed the third one.

Quoted 2 lines

on Armada 8k platforms. Without this, the CPU hangs, causing RCU stalls or the system to become unresponsive.

According to this comment, I guess this patch is a fix and should be applied in v4.12-rc.

Gregory

Quoted 38 lines

[Thomas:
- remove mg_core_clock, since it's a parent of mg_clock
- also add clock references to the slave CP mdio instance]

---
 arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi | 1 +
 arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi  | 1 +
 2 files changed, 2 insertions(+)
arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi +1 -0
index 00af338..c33e891 100644
@@ -95,6 +95,7 @@
 				#size-cells = <0>;
 				compatible = "marvell,orion-mdio";
 				reg = <0x12a200 0x10>;
+				clocks = <&cpm_syscon0 1 9>, <&cpm_syscon0 1 5>;
 			};
 
 			cpm_icu: interrupt-controller at 1e0000 {
arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi +1 -0
index bee48ae..2a99ff8 100644
@@ -100,6 +100,7 @@
 				#size-cells = <0>;
 				compatible = "marvell,orion-mdio";
 				reg = <0x12a200 0x10>;
+				clocks = <&cps_syscon0 1 9>, <&cps_syscon0 1 5>;
 			};
 
 			cps_icu: interrupt-controller at 1e0000 {
Signature · 1 line
2.7.4
Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#3 lore raw

PATCH 1/1 arm64: dts: marvell: cp110: add required clocks for mdio interface

Quoted 10 lines · Gregory CLEMENT

Hi Thomas,

Quoted 3 lines · Thomas Petazzoni

From: Russell King <[email protected]>

Add the three required clocks for the MDIO interface to be functional

You should also maybe update the commit log and speaking of two clocks as you removed the third one.

When I came up with the patch, I tried to find the minimum number of clocks, and it seemed to be the three that were in my original commit.

If people are finding that without the patch, they see hangs, but this iteration of the patch fixes it for them, then that's good.

However, with Thomas' comment after my sign-off, I don't think there's a need to update the commit text - that comment explains that there were originally three clocks, and it's now reduced down to two. It also indicates that the patch has been modified.

Signature · 3 lines
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
#4 lore raw

PATCH 1/1 arm64: dts: marvell: cp110: add required clocks for mdio interface

In reply to Thomas Petazzoni

Hi Thomas,

Quoted 11 lines · Thomas Petazzoni

From: Russell King <[email protected]>

Add the three required clocks for the MDIO interface to be functional on Armada 8k platforms. Without this, the CPU hangs, causing RCU stalls or the system to become unresponsive.

[Thomas:
- remove mg_core_clock, since it's a parent of mg_clock
- also add clock references to the slave CP mdio instance]

Applied on mvebu/dt64

Thanks,

Gregory

Quoted 32 lines
---
 arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi | 1 +
 arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi  | 1 +
 2 files changed, 2 insertions(+)
arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi +1 -0
index 00af338..c33e891 100644
@@ -95,6 +95,7 @@
 				#size-cells = <0>;
 				compatible = "marvell,orion-mdio";
 				reg = <0x12a200 0x10>;
+				clocks = <&cpm_syscon0 1 9>, <&cpm_syscon0 1 5>;
 			};
 
 			cpm_icu: interrupt-controller at 1e0000 {
arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi +1 -0
index bee48ae..2a99ff8 100644
@@ -100,6 +100,7 @@
 				#size-cells = <0>;
 				compatible = "marvell,orion-mdio";
 				reg = <0x12a200 0x10>;
+				clocks = <&cps_syscon0 1 9>, <&cps_syscon0 1 5>;
 			};
 
 			cps_icu: interrupt-controller at 1e0000 {
Signature · 1 line
2.7.4
Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com