[Pdbg] [PATCH v2 21/22] dts: Split P9 device trees into system and backend trees

Alistair Popple alistair at popple.id.au
Mon Sep 23 14:43:21 AEST 2019


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

On Friday, 20 September 2019 3:16:50 PM AEST Amitay Isaacs wrote:
> Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
> ---
>  Makefile.am      |  2 +-
>  p9-cronus.dts.m4 | 50 ++++++++++++++++--------------------------------
>  p9-fsi.dtsi.m4   |  7 ++++---
>  p9-host.dts.m4   |  4 ++--
>  p9-kernel.dts.m4 | 13 ++++++++-----
>  p9-pib.dts.m4    |  5 +++++
>  p9.dts.m4        | 27 ++++++++++++++++++++++++++
>  7 files changed, 64 insertions(+), 44 deletions(-)
>  create mode 100644 p9.dts.m4
> 
> diff --git a/Makefile.am b/Makefile.am
> index 618b98d..1f7ab63 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -68,7 +68,7 @@ endif
>  DT = fake.dts p8-cronus.dts p9-cronus.dts \
>       p8-fsi.dts p8-i2c.dts p8-kernel.dts \
>       p9w-fsi.dts p9r-fsi.dts p9z-fsi.dts p9-kernel.dts \
> -     p8-host.dts p9-host.dts p8.dts
> +     p8-host.dts p9-host.dts p8.dts p9.dts
>  
>  DT_sources = $(DT:.dts=.dtb.S)
>  DT_headers = $(DT:.dts=.dt.h)
> diff --git a/p9-cronus.dts.m4 b/p9-cronus.dts.m4
> index c560442..2221a68 100644
> --- a/p9-cronus.dts.m4
> +++ b/p9-cronus.dts.m4
> @@ -1,43 +1,27 @@
>  /dts-v1/;
>  
>  / {
> -	#address-cells = <0x1>;
> -	#size-cells = <0x0>;
> -
> -	fsi0: kernelfsi at 0 {
> -		#address-cells = <0x2>;
> -		#size-cells = <0x1>;
> +       fsi0 {
>  		compatible = "ibm,cronus-fsi";
> -		reg = <0x0 0x0 0x0>;
> -
>  		index = <0x0>;
> -		status = "mustexist";
> +		system-path = "/proc0/fsi";
> +	};
>  
> -		pib at 1000 {
> -			#address-cells = <0x2>;
> -			#size-cells = <0x1>;
> -			reg = <0x0 0x1000 0x7>;
> -			index = <0x0>;
> -			compatible = "ibm,cronus-pib";
> -			include(p9-pib.dts.m4)dnl
> -		};
> +	pib0 {
> +		compatible = "ibm,cronus-pib";
> +		index = <0x0>;
> +		system-path = "/proc0/pib";
> +	};
>  
> -		hmfsi at 100000 {
> -			#address-cells = <0x2>;
> -			#size-cells = <0x1>;
> -			compatible = "ibm,cronus-fsi";
> -			reg = <0x0 0x100000 0x8000>;
> -			port = <0x1>;
> -			index = <0x1>;
> +	fsi1 {
> +		compatible = "ibm,cronus-fsi";
> +		index = <0x1>;
> +		system-path = "/proc1/fsi";
> +	};
>  
> -			pib at 1000 {
> -				#address-cells = <0x2>;
> -				#size-cells = <0x1>;
> -				 reg = <0x0 0x1000 0x7>;
> -				 index = <0x1>;
> -				 compatible = "ibm,cronus-pib";
> -				 include(p9-pib.dts.m4)dnl
> -			};
> -		};
> +	pib1 {
> +		compatible = "ibm,cronus-pib";
> +		index = <0x1>;
> +		system-path = "/proc1/pib";
>  	};
>  };
> diff --git a/p9-fsi.dtsi.m4 b/p9-fsi.dtsi.m4
> index afa7d39..3bbe43d 100644
> --- a/p9-fsi.dtsi.m4
> +++ b/p9-fsi.dtsi.m4
> @@ -8,9 +8,9 @@
>  		#size-cells = <0x1>;
>  		compatible = "ibm,bmcfsi";
>  		reg = <0x0 0x0 0x0>;
> -
>  		index = <0x0>;
>  		status = "mustexist";
> +		system-path = "/proc0/fsi";
>  
>  		pib at 1000 {
>  			 #address-cells = <0x2>;
> @@ -18,7 +18,7 @@
>  			 reg = <0x0 0x1000 0x7>;
>  			 index = <0x0>;
>  			 compatible = "ibm,fsi-pib", "ibm,power9-fsi-pib";
> -			 include(p9-pib.dts.m4)dnl
> +			 system-path = "/proc0/pib";
>  		};
>  
>  		hmfsi at 100000 {
> @@ -28,6 +28,7 @@
>  			reg = <0x0 0x100000 0x8000>;
>  			port = <0x1>;
>  			index = <0x1>;
> +			system-path = "/proc1/fsi";
>  
>  			pib at 1000 {
>  				#address-cells = <0x2>;
> @@ -35,7 +36,7 @@
>  				reg = <0x0 0x1000 0x7>;
>  				index = <0x1>;
>  				compatible = "ibm,fsi-pib", "ibm,power9-fsi-pib";
> -				include(p9-pib.dts.m4)dnl
> +				system-path = "/proc1/pib";
>  			};
>  		};
>  
> diff --git a/p9-host.dts.m4 b/p9-host.dts.m4
> index 52973ff..3b4c2b2 100644
> --- a/p9-host.dts.m4
> +++ b/p9-host.dts.m4
> @@ -11,7 +11,7 @@
>  	      compatible = "ibm,host-pib";
>  	      reg = <0x0>;
>  	      index = <0x0>;
> -	      include(p9-pib.dts.m4)dnl
> +	      system-path = "/proc0/pib";
>  	};
>  
>  	pib at 8 {
> @@ -20,6 +20,6 @@
>  	      compatible = "ibm,host-pib";
>  	      reg = <0x8>;
>  	      index = <0x8>;
> -	      include(p9-pib.dts.m4)dnl
> +	      system-path = "/proc1/pib";
>  	};
>  };
> diff --git a/p9-kernel.dts.m4 b/p9-kernel.dts.m4
> index aa4bcac..8c2c35b 100644
> --- a/p9-kernel.dts.m4
> +++ b/p9-kernel.dts.m4
> @@ -9,9 +9,9 @@
>  		#size-cells = <0x1>;
>  		compatible = "ibm,kernel-fsi";
>  		reg = <0x0 0x0 0x0>;
> -
>  		index = <0x0>;
>  		status = "mustexist";
> +		system-path = "/proc0/fsi";
>  
>  		pib at 1000 {
>  			#address-cells = <0x2>;
> @@ -20,7 +20,7 @@
>  			index = <0x0>;
>  			compatible = "ibm,kernel-pib";
>  			device-path = "/dev/scom1";
> -			include(p9-pib.dts.m4)dnl
> +			system-path = "/proc0/pib";
>  		};
>  
>  		sbefifo at 2400 { /* Bogus address */
> @@ -29,8 +29,9 @@
>  			compatible = "ibm,kernel-sbefifo";
>  			device-path = "/dev/sbefifo1";
>  
> -			sbefifo-mem at 0 {
> +			sbefifo-mem {
>  				      compatible = "ibm,sbefifo-mem";
> +				      system-path = "/mem0";
>  			};
>  		};
>  
> @@ -41,6 +42,7 @@
>  			reg = <0x0 0x100000 0x8000>;
>  			port = <0x1>;
>  			index = <0x1>;
> +			system-path = "/proc1/fsi";
>  
>  			pib at 1000 {
>  				#address-cells = <0x2>;
> @@ -49,7 +51,7 @@
>  				 index = <0x1>;
>  				 compatible = "ibm,kernel-pib";
>  				 device-path = "/dev/scom2";
> -				 include(p9-pib.dts.m4)dnl
> +				 system-path = "/proc1/pib";
>  			};
>  
>  			sbefifo at 2400 { /* Bogus address */
> @@ -58,8 +60,9 @@
>  				compatible = "ibm,kernel-sbefifo";
>  				device-path = "/dev/sbefifo2";
>  
> -				sbefifo-mem at 0 {
> +				sbefifo-mem {
>  				      compatible = "ibm,sbefifo-mem";
> +				      system-path = "/mem1";
>  				};
>  			};
>  		};
> diff --git a/p9-pib.dts.m4 b/p9-pib.dts.m4
> index 3a99157..8c9dfaf 100644
> --- a/p9-pib.dts.m4
> +++ b/p9-pib.dts.m4
> @@ -35,6 +35,11 @@ index = <HEX(eval($1, 16))>;
>  reg = <0x0 HEX(CHIPLET_BASE($1)) 0xfffff>;
>  }')dnl
>  
> +adu at 90000 {
> +	compatible = "ibm-power9-adu";
> +	reg = <0x0 0x90000 0x50>;
> +	system-path = "CONCAT(/mem,PROC_ID)";
> +};
>  
>  htm at 5012880 {
>  	compatible = "ibm,power9-nhtm";
> diff --git a/p9.dts.m4 b/p9.dts.m4
> new file mode 100644
> index 0000000..dd46ace
> --- /dev/null
> +++ b/p9.dts.m4
> @@ -0,0 +1,27 @@
> +define(`PROC',`
> +define(`PROC_ID',`$1')dnl
> +	proc$1 {
> +		index = <$1>;
> +
> +		fsi {
> +			index = <$1>;
> +		};
> +
> +		pib {
> +			#address-cells = <0x2>;
> +			#size-cells = <0x1>;
> +			index = <$1>;
> +			include(p9-pib.dts.m4)dnl
> +		};
> +	};
> +	mem$1 {
> +		index = <$1>;
> +	}'
> +)dnl
> +
> +/dts-v1/;
> +
> +/ {
> +	PROC(0);
> +	PROC(1);
> +};
> 






More information about the Pdbg mailing list