Skip to contentSkip to conversation

ARM: mvebu: add a clock for mdio nodes on Armada 370/38x/XP

PATCH New Thomas Petazzoni 4 participants 6 messages Mar 25, 2014 – Apr 7, 2014 Device tree bindings

lore
Share & tools
lore
#0 lore raw

cover ARM: mvebu: add a clock for mdio nodes on Armada 370/38x/XP

Jason, Andrew, Gregory, Sebastian,

Here is a set of two patches that add a clock specification to the mdio node on Armada 370/XP and Armada 38x. This allows the mvmdio driver to work properly when loaded as a module, before mvneta is loaded.

I've separated the Armada 370/XP and Armada 38x fixes in two patches, because the Armada 370/XP fix should be pushed to stable, while the Armada 38x does not need to be pushed to stable since Armada 38x support only appears in 3.15.

Thanks,

Thomas

Thomas Petazzoni (2):
ARM: mvebu: ensure the mdio node has a clock reference on Armada

    370/XP

ARM: mvebu: ensure the mdio node has a clock reference on Armada 38x

 arch/arm/boot/dts/armada-370-xp.dtsi | 1 +
 arch/arm/boot/dts/armada-38x.dtsi    | 1 +
 2 files changed, 2 insertions(+)
Signature · 1 line
1.8.3.2
#1 lore raw

PATCH 1/2 ARM: mvebu: ensure the mdio node has a clock reference on Armada 370/XP

The mvmdio driver accesses some register of the Ethernet unit. It therefore takes a reference and enables a clock. However, on Armada 370/XP, no clock specification was given in the Device Tree, which leads the mvmdio driver to fail when being used as a module and loaded before the mvneta driver: it tries to access a register from a hardware unit that isn't clocked.

Cc stable at vger.kernel.org
---
 arch/arm/boot/dts/armada-370-xp.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/armada-370-xp.dtsi +1 -0
index bbb40f6..bb77970 100644
@@ -230,6 +230,7 @@
 				#size-cells = <0>;
 				compatible = "marvell,orion-mdio";
 				reg = <0x72004 0x4>;
+				clocks = <&gateclk 4>;
 			};
 
 			eth1: ethernet at 74000 {
Signature · 1 line
1.8.3.2
#2 lore raw

PATCH 2/2 ARM: mvebu: ensure the mdio node has a clock reference on Armada 38x

In reply to Thomas Petazzoni

The mvmdio driver accesses some register of the Ethernet unit. It therefore takes a reference and enables a clock. However, on Armada 38x, no clock specification was given in the Device Tree, which leads the mvmdio driver to fail when being used as a module and loaded before the mvneta driver: it tries to access a register from a hardware unit that isn't clocked.

---
 arch/arm/boot/dts/armada-38x.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/armada-38x.dtsi +1 -0
index a064f59..ca8813b 100644
@@ -336,6 +336,7 @@
 				#size-cells = <0>;
 				compatible = "marvell,orion-mdio";
 				reg = <0x72004 0x4>;
+				clocks = <&gateclk 4>;
 			};
 
 			coredivclk: clock at e4250 {
Signature · 1 line
1.8.3.2
#3 lore raw

cover ARM: mvebu: add a clock for mdio nodes on Armada 370/38x/XP

In reply to Thomas Petazzoni
Quoted 11 lines · Thomas Petazzoni

Jason, Andrew, Gregory, Sebastian,

Here is a set of two patches that add a clock specification to the mdio node on Armada 370/XP and Armada 38x. This allows the mvmdio driver to work properly when loaded as a module, before mvneta is loaded.

I've separated the Armada 370/XP and Armada 38x fixes in two patches, because the Armada 370/XP fix should be pushed to stable, while the Armada 38x does not need to be pushed to stable since Armada 38x support only appears in 3.15.

Andrew

#4 lore raw

cover ARM: mvebu: add a clock for mdio nodes on Armada 370/38x/XP

In reply to Thomas Petazzoni
Quoted 7 lines · Thomas Petazzoni

Jason, Andrew, Gregory, Sebastian,

Here is a set of two patches that add a clock specification to the mdio node on Armada 370/XP and Armada 38x. This allows the mvmdio driver to work properly when loaded as a module, before mvneta is loaded.

Quoted 9 lines

I've separated the Armada 370/XP and Armada 38x fixes in two patches, because the Armada 370/XP fix should be pushed to stable, while the Armada 38x does not need to be pushed to stable since Armada 38x support only appears in 3.15.

Thanks,

Thomas

For both patches:

Thanks,

Gregory

Quoted 9 lines

Thomas Petazzoni (2):
ARM: mvebu: ensure the mdio node has a clock reference on Armada

    370/XP

ARM: mvebu: ensure the mdio node has a clock reference on Armada 38x

 arch/arm/boot/dts/armada-370-xp.dtsi | 1 +
 arch/arm/boot/dts/armada-38x.dtsi    | 1 +
 2 files changed, 2 insertions(+)
Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
Applied
#5 lore raw

cover ARM: mvebu: add a clock for mdio nodes on Armada 370/38x/XP

In reply to Thomas Petazzoni
Quoted 16 lines · Thomas Petazzoni

Jason, Andrew, Gregory, Sebastian,

Here is a set of two patches that add a clock specification to the mdio node on Armada 370/XP and Armada 38x. This allows the mvmdio driver to work properly when loaded as a module, before mvneta is loaded.

I've separated the Armada 370/XP and Armada 38x fixes in two patches, because the Armada 370/XP fix should be pushed to stable, while the Armada 38x does not need to be pushed to stable since Armada 38x support only appears in 3.15.

Thanks,

Thomas

Quoted 8 lines

Thomas Petazzoni (2):
ARM: mvebu: ensure the mdio node has a clock reference on Armada

    370/XP

ARM: mvebu: ensure the mdio node has a clock reference on Armada 38x

 arch/arm/boot/dts/armada-370-xp.dtsi | 1 +
 arch/arm/boot/dts/armada-38x.dtsi    | 1 +
 2 files changed, 2 insertions(+)

Applied both to mvebu/dt-fixes-non-critical for v3.15. Updated for-next as well. If all goes well, I'll send a pull request later in the week.

thx,

Jason.