diff mbox series

[04/11] dts: Populate all possible chips in bmc-cronus device tree

Message ID 20200430030544.234289-5-amitay@ozlabs.org
State Accepted
Headers show
Series Reorganization of device trees | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch warning Failed to apply on branch master (6c10b68bf774a9fe21affd5ef0b40084cd49800d)
snowpatch_ozlabs/apply_patch fail Failed to apply to any branch

Commit Message

Amitay Isaacs April 30, 2020, 3:05 a.m. UTC
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
---
 bmc-cronus.dts.m4 | 73 +++++++++++++++++++----------------------------
 1 file changed, 29 insertions(+), 44 deletions(-)

Comments

Alistair Popple May 6, 2020, 12:42 a.m. UTC | #1
Looks good to me.

Reviewed-by: Alistair Popple <alistair@popple.id.au>

On Thursday, 30 April 2020 1:05:37 PM AEST Amitay Isaacs wrote:
> Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
> ---
>  bmc-cronus.dts.m4 | 73 +++++++++++++++++++----------------------------
>  1 file changed, 29 insertions(+), 44 deletions(-)
> 
> diff --git a/bmc-cronus.dts.m4 b/bmc-cronus.dts.m4
> index b9173b2..1ec49b5 100644
> --- a/bmc-cronus.dts.m4
> +++ b/bmc-cronus.dts.m4
> @@ -1,67 +1,52 @@
> -/dts-v1/;
> -
> -/ {
> -       fsi0 {
> -		compatible = "ibm,cronus-fsi";
> -		index = <0x0>;
> -		system-path = "/proc0/fsi";
> -	};
> -
> -	pib0 {
> -		compatible = "ibm,cronus-pib";
> -		index = <0x0>;
> -		system-path = "/proc0/pib";
> -	};
> -
> -	fsi1 {
> +dnl
> +dnl CHIP([index])
> +dnl
> +define(`CHIP',
> +`
> +       fsi$1 {
>  		compatible = "ibm,cronus-fsi";
> -		index = <0x1>;
> -		system-path = "/proc1/fsi";
> +		index = <0x$1>;
> +		system-path = "/proc$1/fsi";
>  	};
> 
> -	pib1 {
> +	pib$1 {
>  		compatible = "ibm,cronus-pib";
> -		index = <0x1>;
> -		system-path = "/proc1/pib";
> +		index = <0x$1>;
> +		system-path = "/proc$1/pib";
>  	};
> 
> -	sbefifo0 {
> -		index = <0x0>;
> +	sbefifo$1 {
>  		compatible = "ibm,cronus-sbefifo";
> +		index = <0x$1>;
> 
>  		sbefifo-chipop {
>  			compatible = "ibm,sbefifo-chipop";
> -			index = <0x0>;
> +			index = <0x$1>;
>  		};
> 
>  		sbefifo-mem {
>  			compatible = "ibm,sbefifo-mem";
> -			system-path = "/mem0";
> +			index = <0x$1>;
> +			system-path = "/mem$1";
>  		};
> 
>  		sbefifo-pba {
>  			compatible = "ibm,sbefifo-mem-pba";
> -			system-path = "/mempba0";
> +			index = <0x$1>;
> +			system-path = "/mempba$1";
>  		};
>  	};
> +')dnl
> 
> -	sbefifo1 {
> -		index = <0x1>;
> -		compatible = "ibm,cronus-sbefifo";
> -
> -		sbefifo-chipop {
> -			compatible = "ibm,sbefifo-chipop";
> -			index = <0x1>;
> -		};
> -
> -		sbefifo-mem {
> -			compatible = "ibm,sbefifo-mem";
> -			system-path = "/mem1";
> -		};
> +/dts-v1/;
> 
> -		sbefifo-pba {
> -			compatible = "ibm,sbefifo-mem-pba";
> -			system-path = "/mempba1";
> -		};
> -	};
> +/ {
> +	CHIP(0)
> +	CHIP(1)
> +	CHIP(2)
> +	CHIP(3)
> +	CHIP(4)
> +	CHIP(5)
> +	CHIP(6)
> +	CHIP(7)
>  };
diff mbox series

Patch

diff --git a/bmc-cronus.dts.m4 b/bmc-cronus.dts.m4
index b9173b2..1ec49b5 100644
--- a/bmc-cronus.dts.m4
+++ b/bmc-cronus.dts.m4
@@ -1,67 +1,52 @@ 
-/dts-v1/;
-
-/ {
-       fsi0 {
-		compatible = "ibm,cronus-fsi";
-		index = <0x0>;
-		system-path = "/proc0/fsi";
-	};
-
-	pib0 {
-		compatible = "ibm,cronus-pib";
-		index = <0x0>;
-		system-path = "/proc0/pib";
-	};
-
-	fsi1 {
+dnl
+dnl CHIP([index])
+dnl
+define(`CHIP',
+`
+       fsi$1 {
 		compatible = "ibm,cronus-fsi";
-		index = <0x1>;
-		system-path = "/proc1/fsi";
+		index = <0x$1>;
+		system-path = "/proc$1/fsi";
 	};
 
-	pib1 {
+	pib$1 {
 		compatible = "ibm,cronus-pib";
-		index = <0x1>;
-		system-path = "/proc1/pib";
+		index = <0x$1>;
+		system-path = "/proc$1/pib";
 	};
 
-	sbefifo0 {
-		index = <0x0>;
+	sbefifo$1 {
 		compatible = "ibm,cronus-sbefifo";
+		index = <0x$1>;
 
 		sbefifo-chipop {
 			compatible = "ibm,sbefifo-chipop";
-			index = <0x0>;
+			index = <0x$1>;
 		};
 
 		sbefifo-mem {
 			compatible = "ibm,sbefifo-mem";
-			system-path = "/mem0";
+			index = <0x$1>;
+			system-path = "/mem$1";
 		};
 
 		sbefifo-pba {
 			compatible = "ibm,sbefifo-mem-pba";
-			system-path = "/mempba0";
+			index = <0x$1>;
+			system-path = "/mempba$1";
 		};
 	};
+')dnl
 
-	sbefifo1 {
-		index = <0x1>;
-		compatible = "ibm,cronus-sbefifo";
-
-		sbefifo-chipop {
-			compatible = "ibm,sbefifo-chipop";
-			index = <0x1>;
-		};
-
-		sbefifo-mem {
-			compatible = "ibm,sbefifo-mem";
-			system-path = "/mem1";
-		};
+/dts-v1/;
 
-		sbefifo-pba {
-			compatible = "ibm,sbefifo-mem-pba";
-			system-path = "/mempba1";
-		};
-	};
+/ {
+	CHIP(0)
+	CHIP(1)
+	CHIP(2)
+	CHIP(3)
+	CHIP(4)
+	CHIP(5)
+	CHIP(6)
+	CHIP(7)
 };