diff mbox series

[5/5] arm64: dts: marvell: armada-cp110: Switch to per-port SATA interrupts

Message ID 20190222145356.23072-6-miquel.raynal@bootlin.com (mailing list archive)
State New, archived
Headers show
Series Enable per-port SATA interrupts and drop an hack in the IRQ subsystem | expand

Commit Message

Miquel Raynal Feb. 22, 2019, 2:53 p.m. UTC
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

There are two SATA ports per CP110. Each of them has a dedicated
interrupt. Describe the real hardware by adding two SATA ports to the
CP110 SATA node and enabling them in all the DTs including it
(7040-db/8040-db/8040-clearfog).

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 arch/arm64/boot/dts/marvell/armada-7040-db.dts |  7 ++++++-
 arch/arm64/boot/dts/marvell/armada-8040-db.dts | 14 ++++++++++++--
 arch/arm64/boot/dts/marvell/armada-cp110.dtsi  | 16 ++++++++++++++--
 3 files changed, 32 insertions(+), 5 deletions(-)

Comments

Russell King (Oracle) Feb. 22, 2019, 3:13 p.m. UTC | #1
On Fri, Feb 22, 2019 at 03:53:56PM +0100, Miquel Raynal wrote:
> From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> 
> There are two SATA ports per CP110. Each of them has a dedicated
> interrupt. Describe the real hardware by adding two SATA ports to the
> CP110 SATA node and enabling them in all the DTs including it
> (7040-db/8040-db/8040-clearfog).
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
>  arch/arm64/boot/dts/marvell/armada-7040-db.dts |  7 ++++++-
>  arch/arm64/boot/dts/marvell/armada-8040-db.dts | 14 ++++++++++++--
>  arch/arm64/boot/dts/marvell/armada-cp110.dtsi  | 16 ++++++++++++++--
>  3 files changed, 32 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/marvell/armada-7040-db.dts b/arch/arm64/boot/dts/marvell/armada-7040-db.dts
> index 412efdb46e7c..54c1c0ddc813 100644
> --- a/arch/arm64/boot/dts/marvell/armada-7040-db.dts
> +++ b/arch/arm64/boot/dts/marvell/armada-7040-db.dts
> @@ -194,7 +194,12 @@
>  };
>  
>  &cp0_sata0 {
> -	status = "okay";
> +	sata-port@0 {

Don't these all need a reg = <N> to correspond with @N in the node name?

> +		status = "okay";
> +	};
> +	sata-port@1 {
> +		status = "okay";
> +	};
>  };
>  
>  &cp0_usb3_0 {
> diff --git a/arch/arm64/boot/dts/marvell/armada-8040-db.dts b/arch/arm64/boot/dts/marvell/armada-8040-db.dts
> index 1bac437369a1..988cc7dc15d9 100644
> --- a/arch/arm64/boot/dts/marvell/armada-8040-db.dts
> +++ b/arch/arm64/boot/dts/marvell/armada-8040-db.dts
> @@ -147,7 +147,12 @@
>  
>  /* CON4 on CP0 expansion */
>  &cp0_sata0 {
> -	status = "okay";
> +	sata-port@0 {
> +		status = "okay";
> +	};
> +	sata-port@1 {
> +		status = "okay";
> +	};
>  };
>  
>  /* CON9 on CP0 expansion */
> @@ -279,7 +284,12 @@
>  
>  /* CON4 on CP1 expansion */
>  &cp1_sata0 {
> -	status = "okay";
> +	sata-port@0 {
> +		status = "okay";
> +	};
> +	sata-port@1 {
> +		status = "okay";
> +	};
>  };
>  
>  /* CON9 on CP1 expansion */
> diff --git a/arch/arm64/boot/dts/marvell/armada-cp110.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110.dtsi
> index b9d9f31e3ba1..f27edddcacd1 100644
> --- a/arch/arm64/boot/dts/marvell/armada-cp110.dtsi
> +++ b/arch/arm64/boot/dts/marvell/armada-cp110.dtsi
> @@ -292,10 +292,22 @@
>  			"generic-ahci";
>  			reg = <0x540000 0x30000>;
>  			dma-coherent;
> -			interrupts = <107 IRQ_TYPE_LEVEL_HIGH>;
>  			clocks = <&CP110_LABEL(clk) 1 15>,
>  				 <&CP110_LABEL(clk) 1 16>;
> -			status = "disabled";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +
> +			sata-port@0 {
> +				reg = <0>;
> +				interrupts = <109 IRQ_TYPE_LEVEL_HIGH>;
> +				status = "disabled";
> +			};
> +
> +			sata-port@1 {
> +				reg = <1>;
> +				interrupts = <107 IRQ_TYPE_LEVEL_HIGH>;
> +				status = "disabled";
> +			};
>  		};
>  
>  		CP110_LABEL(xor0): xor@6a0000 {
> -- 
> 2.19.1
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
Miquel Raynal Feb. 22, 2019, 3:29 p.m. UTC | #2
Hi Russell,

Thanks for the review,

Russell King - ARM Linux admin <linux@armlinux.org.uk> wrote on Fri, 22
Feb 2019 15:13:35 +0000:

> On Fri, Feb 22, 2019 at 03:53:56PM +0100, Miquel Raynal wrote:
> > From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> > 
> > There are two SATA ports per CP110. Each of them has a dedicated
> > interrupt. Describe the real hardware by adding two SATA ports to the
> > CP110 SATA node and enabling them in all the DTs including it
> > (7040-db/8040-db/8040-clearfog).
> > 
> > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> > ---
> >  arch/arm64/boot/dts/marvell/armada-7040-db.dts |  7 ++++++-
> >  arch/arm64/boot/dts/marvell/armada-8040-db.dts | 14 ++++++++++++--
> >  arch/arm64/boot/dts/marvell/armada-cp110.dtsi  | 16 ++++++++++++++--
> >  3 files changed, 32 insertions(+), 5 deletions(-)
> > 
> > diff --git a/arch/arm64/boot/dts/marvell/armada-7040-db.dts b/arch/arm64/boot/dts/marvell/armada-7040-db.dts
> > index 412efdb46e7c..54c1c0ddc813 100644
> > --- a/arch/arm64/boot/dts/marvell/armada-7040-db.dts
> > +++ b/arch/arm64/boot/dts/marvell/armada-7040-db.dts
> > @@ -194,7 +194,12 @@
> >  };
> >  
> >  &cp0_sata0 {
> > -	status = "okay";
> > +	sata-port@0 {  
> 
> Don't these all need a reg = <N> to correspond with @N in the node name?

Yes a reg property is added to the sata-port(s) sub-nodes when they are
defined (here they are just enabled, see below).

> 
> > +		status = "okay";
> > +	};
> > +	sata-port@1 {
> > +		status = "okay";
> > +	};
> >  };
> >  
> >  &cp0_usb3_0 {
> > diff --git a/arch/arm64/boot/dts/marvell/armada-8040-db.dts b/arch/arm64/boot/dts/marvell/armada-8040-db.dts
> > index 1bac437369a1..988cc7dc15d9 100644
> > --- a/arch/arm64/boot/dts/marvell/armada-8040-db.dts
> > +++ b/arch/arm64/boot/dts/marvell/armada-8040-db.dts
> > @@ -147,7 +147,12 @@
> >  
> >  /* CON4 on CP0 expansion */
> >  &cp0_sata0 {
> > -	status = "okay";
> > +	sata-port@0 {
> > +		status = "okay";
> > +	};
> > +	sata-port@1 {
> > +		status = "okay";
> > +	};
> >  };
> >  
> >  /* CON9 on CP0 expansion */
> > @@ -279,7 +284,12 @@
> >  
> >  /* CON4 on CP1 expansion */
> >  &cp1_sata0 {
> > -	status = "okay";
> > +	sata-port@0 {
> > +		status = "okay";
> > +	};
> > +	sata-port@1 {
> > +		status = "okay";
> > +	};
> >  };
> >  
> >  /* CON9 on CP1 expansion */
> > diff --git a/arch/arm64/boot/dts/marvell/armada-cp110.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110.dtsi
> > index b9d9f31e3ba1..f27edddcacd1 100644
> > --- a/arch/arm64/boot/dts/marvell/armada-cp110.dtsi
> > +++ b/arch/arm64/boot/dts/marvell/armada-cp110.dtsi
> > @@ -292,10 +292,22 @@
> >  			"generic-ahci";
> >  			reg = <0x540000 0x30000>;
> >  			dma-coherent;
> > -			interrupts = <107 IRQ_TYPE_LEVEL_HIGH>;
> >  			clocks = <&CP110_LABEL(clk) 1 15>,
> >  				 <&CP110_LABEL(clk) 1 16>;
> > -			status = "disabled";
> > +			#address-cells = <1>;
> > +			#size-cells = <0>;
> > +
> > +			sata-port@0 {
> > +				reg = <0>;

Here                            ^

> > +				interrupts = <109 IRQ_TYPE_LEVEL_HIGH>;
> > +				status = "disabled";
> > +			};
> > +
> > +			sata-port@1 {
> > +				reg = <1>;
> > +				interrupts = <107 IRQ_TYPE_LEVEL_HIGH>;
> > +				status = "disabled";
> > +			};
> >  		};
> >  
> >  		CP110_LABEL(xor0): xor@6a0000 {
> > -- 
> > 2.19.1
> > 
> > 
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> >   
> 


Thanks,
Miquèl
Marc Zyngier Feb. 23, 2019, 7:21 p.m. UTC | #3
On Fri, 22 Feb 2019 14:53:56 +0000,
Miquel Raynal <miquel.raynal@bootlin.com> wrote:
> 
> From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> 
> There are two SATA ports per CP110. Each of them has a dedicated
> interrupt. Describe the real hardware by adding two SATA ports to the
> CP110 SATA node and enabling them in all the DTs including it
> (7040-db/8040-db/8040-clearfog).
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
>  arch/arm64/boot/dts/marvell/armada-7040-db.dts |  7 ++++++-
>  arch/arm64/boot/dts/marvell/armada-8040-db.dts | 14 ++++++++++++--
>  arch/arm64/boot/dts/marvell/armada-cp110.dtsi  | 16 ++++++++++++++--
>  3 files changed, 32 insertions(+), 5 deletions(-)
> 

[...]

> diff --git a/arch/arm64/boot/dts/marvell/armada-cp110.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110.dtsi
> index b9d9f31e3ba1..f27edddcacd1 100644
> --- a/arch/arm64/boot/dts/marvell/armada-cp110.dtsi
> +++ b/arch/arm64/boot/dts/marvell/armada-cp110.dtsi
> @@ -292,10 +292,22 @@
>  			"generic-ahci";
>  			reg = <0x540000 0x30000>;
>  			dma-coherent;
> -			interrupts = <107 IRQ_TYPE_LEVEL_HIGH>;
>  			clocks = <&CP110_LABEL(clk) 1 15>,
>  				 <&CP110_LABEL(clk) 1 16>;
> -			status = "disabled";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +
> +			sata-port@0 {
> +				reg = <0>;
> +				interrupts = <109 IRQ_TYPE_LEVEL_HIGH>;

Where has this change to the binding been documented?

> +				status = "disabled";
> +			};
> +
> +			sata-port@1 {
> +				reg = <1>;
> +				interrupts = <107 IRQ_TYPE_LEVEL_HIGH>;
> +				status = "disabled";
> +			};
>  		};
>  
>  		CP110_LABEL(xor0): xor@6a0000 {
> -- 
> 2.19.1
> 

Thanks,

	M.
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/marvell/armada-7040-db.dts b/arch/arm64/boot/dts/marvell/armada-7040-db.dts
index 412efdb46e7c..54c1c0ddc813 100644
--- a/arch/arm64/boot/dts/marvell/armada-7040-db.dts
+++ b/arch/arm64/boot/dts/marvell/armada-7040-db.dts
@@ -194,7 +194,12 @@ 
 };
 
 &cp0_sata0 {
-	status = "okay";
+	sata-port@0 {
+		status = "okay";
+	};
+	sata-port@1 {
+		status = "okay";
+	};
 };
 
 &cp0_usb3_0 {
diff --git a/arch/arm64/boot/dts/marvell/armada-8040-db.dts b/arch/arm64/boot/dts/marvell/armada-8040-db.dts
index 1bac437369a1..988cc7dc15d9 100644
--- a/arch/arm64/boot/dts/marvell/armada-8040-db.dts
+++ b/arch/arm64/boot/dts/marvell/armada-8040-db.dts
@@ -147,7 +147,12 @@ 
 
 /* CON4 on CP0 expansion */
 &cp0_sata0 {
-	status = "okay";
+	sata-port@0 {
+		status = "okay";
+	};
+	sata-port@1 {
+		status = "okay";
+	};
 };
 
 /* CON9 on CP0 expansion */
@@ -279,7 +284,12 @@ 
 
 /* CON4 on CP1 expansion */
 &cp1_sata0 {
-	status = "okay";
+	sata-port@0 {
+		status = "okay";
+	};
+	sata-port@1 {
+		status = "okay";
+	};
 };
 
 /* CON9 on CP1 expansion */
diff --git a/arch/arm64/boot/dts/marvell/armada-cp110.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110.dtsi
index b9d9f31e3ba1..f27edddcacd1 100644
--- a/arch/arm64/boot/dts/marvell/armada-cp110.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-cp110.dtsi
@@ -292,10 +292,22 @@ 
 			"generic-ahci";
 			reg = <0x540000 0x30000>;
 			dma-coherent;
-			interrupts = <107 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&CP110_LABEL(clk) 1 15>,
 				 <&CP110_LABEL(clk) 1 16>;
-			status = "disabled";
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			sata-port@0 {
+				reg = <0>;
+				interrupts = <109 IRQ_TYPE_LEVEL_HIGH>;
+				status = "disabled";
+			};
+
+			sata-port@1 {
+				reg = <1>;
+				interrupts = <107 IRQ_TYPE_LEVEL_HIGH>;
+				status = "disabled";
+			};
 		};
 
 		CP110_LABEL(xor0): xor@6a0000 {