linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM64: dts: marvell: armada-cp110: Fix clock resources for various node
@ 2018-01-05 15:30 Gregory CLEMENT
  2018-01-05 15:41 ` Gregory CLEMENT
  0 siblings, 1 reply; 2+ messages in thread
From: Gregory CLEMENT @ 2018-01-05 15:30 UTC (permalink / raw)
  To: linux-arm-kernel

On the CP modules we found on Armada 7K/8K, many IP block actually also
need a "logical" clock (from the bus). This patch add them which allows
to fix some issues hanging the kernel:

If Ethernet and sdhci driver are built as modules and sdhci was loaded
first then the kernel hang.

Fixes: bb16ea1742c8 ("mmc: sdhci-xenon: Fix clock resource by adding an
optional bus clock")
Cc: stable at vger.kernel.org
Reported-by: Riku Voipio <riku.voipio@linaro.org>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
---
 arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi | 13 ++++++++-----
 arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi  |  9 ++++++---
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
index e3b64d03fbd8..9c7724e82aff 100644
--- a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
@@ -63,8 +63,10 @@
 			cpm_ethernet: ethernet at 0 {
 				compatible = "marvell,armada-7k-pp22";
 				reg = <0x0 0x100000>, <0x129000 0xb000>;
-				clocks = <&cpm_clk 1 3>, <&cpm_clk 1 9>, <&cpm_clk 1 5>;
-				clock-names = "pp_clk", "gop_clk", "mg_clk";
+				clocks = <&cpm_clk 1 3>, <&cpm_clk 1 9>,
+					 <&cpm_clk 1 5>, <&cpm_clk 1 18>;
+				clock-names = "pp_clk", "gop_clk",
+					      "mg_clk","axi_clk";
 				marvell,system-controller = <&cpm_syscon0>;
 				status = "disabled";
 				dma-coherent;
@@ -155,7 +157,8 @@
 				#size-cells = <0>;
 				compatible = "marvell,orion-mdio";
 				reg = <0x12a200 0x10>;
-				clocks = <&cpm_clk 1 9>, <&cpm_clk 1 5>;
+				clocks = <&cpm_clk 1 9>, <&cpm_clk 1 5>,
+					 <&cpm_clk 1 6>, <&cpm_clk 1 18>;
 				status = "disabled";
 			};
 
@@ -338,8 +341,8 @@
 				compatible = "marvell,armada-cp110-sdhci";
 				reg = <0x780000 0x300>;
 				interrupts = <ICU_GRP_NSR 27 IRQ_TYPE_LEVEL_HIGH>;
-				clock-names = "core";
-				clocks = <&cpm_clk 1 4>;
+				clock-names = "core","axi";
+				clocks = <&cpm_clk 1 4>, <&cpm_clk 1 18>;
 				dma-coherent;
 				status = "disabled";
 			};
diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
index 0d51096c69f8..87ac68b2cf37 100644
--- a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
@@ -63,8 +63,10 @@
 			cps_ethernet: ethernet at 0 {
 				compatible = "marvell,armada-7k-pp22";
 				reg = <0x0 0x100000>, <0x129000 0xb000>;
-				clocks = <&cps_clk 1 3>, <&cps_clk 1 9>, <&cps_clk 1 5>;
-				clock-names = "pp_clk", "gop_clk", "mg_clk";
+				clocks = <&cps_clk 1 3>, <&cps_clk 1 9>,
+					 <&cps_clk 1 5>, <&cps_clk 1 18>;
+				clock-names = "pp_clk", "gop_clk",
+					      "mg_clk", "axi_clk";
 				marvell,system-controller = <&cps_syscon0>;
 				status = "disabled";
 				dma-coherent;
@@ -155,7 +157,8 @@
 				#size-cells = <0>;
 				compatible = "marvell,orion-mdio";
 				reg = <0x12a200 0x10>;
-				clocks = <&cps_clk 1 9>, <&cps_clk 1 5>;
+				clocks = <&cps_clk 1 9>, <&cps_clk 1 5>,
+					 <&cps_clk 1 6>, <&cps_clk 1 18>;
 				status = "disabled";
 			};
 
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] ARM64: dts: marvell: armada-cp110: Fix clock resources for various node
  2018-01-05 15:30 [PATCH] ARM64: dts: marvell: armada-cp110: Fix clock resources for various node Gregory CLEMENT
@ 2018-01-05 15:41 ` Gregory CLEMENT
  0 siblings, 0 replies; 2+ messages in thread
From: Gregory CLEMENT @ 2018-01-05 15:41 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,
 
 On ven., janv. 05 2018, Gregory CLEMENT <gregory.clement@free-electrons.com> wrote:

> On the CP modules we found on Armada 7K/8K, many IP block actually also
> need a "logical" clock (from the bus). This patch add them which allows
> to fix some issues hanging the kernel:
>
> If Ethernet and sdhci driver are built as modules and sdhci was loaded
> first then the kernel hang.
>
> Fixes: bb16ea1742c8 ("mmc: sdhci-xenon: Fix clock resource by adding an
> optional bus clock")
> Cc: stable at vger.kernel.org
> Reported-by: Riku Voipio <riku.voipio@linaro.org>
> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>

Applied on mvebu/fixes

Gregory

> ---
>  arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi | 13 ++++++++-----
>  arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi  |  9 ++++++---
>  2 files changed, 14 insertions(+), 8 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
> index e3b64d03fbd8..9c7724e82aff 100644
> --- a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
> +++ b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
> @@ -63,8 +63,10 @@
>  			cpm_ethernet: ethernet at 0 {
>  				compatible = "marvell,armada-7k-pp22";
>  				reg = <0x0 0x100000>, <0x129000 0xb000>;
> -				clocks = <&cpm_clk 1 3>, <&cpm_clk 1 9>, <&cpm_clk 1 5>;
> -				clock-names = "pp_clk", "gop_clk", "mg_clk";
> +				clocks = <&cpm_clk 1 3>, <&cpm_clk 1 9>,
> +					 <&cpm_clk 1 5>, <&cpm_clk 1 18>;
> +				clock-names = "pp_clk", "gop_clk",
> +					      "mg_clk","axi_clk";
>  				marvell,system-controller = <&cpm_syscon0>;
>  				status = "disabled";
>  				dma-coherent;
> @@ -155,7 +157,8 @@
>  				#size-cells = <0>;
>  				compatible = "marvell,orion-mdio";
>  				reg = <0x12a200 0x10>;
> -				clocks = <&cpm_clk 1 9>, <&cpm_clk 1 5>;
> +				clocks = <&cpm_clk 1 9>, <&cpm_clk 1 5>,
> +					 <&cpm_clk 1 6>, <&cpm_clk 1 18>;
>  				status = "disabled";
>  			};
>  
> @@ -338,8 +341,8 @@
>  				compatible = "marvell,armada-cp110-sdhci";
>  				reg = <0x780000 0x300>;
>  				interrupts = <ICU_GRP_NSR 27 IRQ_TYPE_LEVEL_HIGH>;
> -				clock-names = "core";
> -				clocks = <&cpm_clk 1 4>;
> +				clock-names = "core","axi";
> +				clocks = <&cpm_clk 1 4>, <&cpm_clk 1 18>;
>  				dma-coherent;
>  				status = "disabled";
>  			};
> diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
> index 0d51096c69f8..87ac68b2cf37 100644
> --- a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
> +++ b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
> @@ -63,8 +63,10 @@
>  			cps_ethernet: ethernet at 0 {
>  				compatible = "marvell,armada-7k-pp22";
>  				reg = <0x0 0x100000>, <0x129000 0xb000>;
> -				clocks = <&cps_clk 1 3>, <&cps_clk 1 9>, <&cps_clk 1 5>;
> -				clock-names = "pp_clk", "gop_clk", "mg_clk";
> +				clocks = <&cps_clk 1 3>, <&cps_clk 1 9>,
> +					 <&cps_clk 1 5>, <&cps_clk 1 18>;
> +				clock-names = "pp_clk", "gop_clk",
> +					      "mg_clk", "axi_clk";
>  				marvell,system-controller = <&cps_syscon0>;
>  				status = "disabled";
>  				dma-coherent;
> @@ -155,7 +157,8 @@
>  				#size-cells = <0>;
>  				compatible = "marvell,orion-mdio";
>  				reg = <0x12a200 0x10>;
> -				clocks = <&cps_clk 1 9>, <&cps_clk 1 5>;
> +				clocks = <&cps_clk 1 9>, <&cps_clk 1 5>,
> +					 <&cps_clk 1 6>, <&cps_clk 1 18>;
>  				status = "disabled";
>  			};
>  
> -- 
> 2.15.1
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-01-05 15:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-05 15:30 [PATCH] ARM64: dts: marvell: armada-cp110: Fix clock resources for various node Gregory CLEMENT
2018-01-05 15:41 ` Gregory CLEMENT

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).