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

Alistair Popple alistair at popple.id.au
Mon Sep 23 14:42:45 AEST 2019


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

On Friday, 20 September 2019 3:16:49 PM AEST Amitay Isaacs wrote:
> Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
> ---
>  Makefile.am      |  2 +-
>  p8-cronus.dts.m4 | 64 +++++++++++++++++-------------------------------
>  p8-fsi.dts.m4    |  9 ++++---
>  p8-host.dts.m4   |  2 +-
>  p8-i2c.dts.m4    |  8 +++---
>  p8-kernel.dts.m4 |  7 +++---
>  p8-pib.dts.m4    |  1 +
>  p8.dts.m4        | 55 +++++++++++++++++++++++++++++++++++++++++
>  8 files changed, 96 insertions(+), 52 deletions(-)
>  create mode 100644 p8.dts.m4
> 
> diff --git a/Makefile.am b/Makefile.am
> index d5bc9ac..618b98d 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-host.dts p9-host.dts p8.dts
>  
>  DT_sources = $(DT:.dts=.dtb.S)
>  DT_headers = $(DT:.dts=.dt.h)
> diff --git a/p8-cronus.dts.m4 b/p8-cronus.dts.m4
> index 4b62b9a..2221a68 100644
> --- a/p8-cronus.dts.m4
> +++ b/p8-cronus.dts.m4
> @@ -1,45 +1,27 @@
>  /dts-v1/;
>  
>  / {
> -       #address-cells = <0x1>;
> -       #size-cells = <0x0>;
> -
> -       fsi0: kernelfsi at 0 {
> -	       #address-cells = <0x2>;
> -	       #size-cells = <0x1>;
> -	       compatible = "ibm,cronus-fsi";
> -	       reg = <0x0 0x0 0x0>;
> -
> -	       index = <0x0>;
> -	       status = "mustexist";
> -
> -	       pib at 1000 {
> -			#address-cells = <0x2>;
> -			#size-cells = <0x1>;
> -			reg = <0x0 0x1000 0x7>;
> -			index = <0x0>;
> -			compatible = "ibm,cronus-pib";
> -			include(p8-pib.dts.m4)dnl
> -	       };
> -
> -	       hmfsi at 100000 {
> -		       #address-cells = <0x2>;
> -		       #size-cells = <0x1>;
> -		       compatible = "ibm,cronus-hmfsi";
> -		       reg = <0x0 0x100000 0x8000>;
> -		       port = <0x1>;
> -		       index = <0x1>;
> -
> -		       pib at 1000 {
> -				#address-cells = <0x2>;
> -				#size-cells = <0x1>;
> -				reg = <0x0 0x1000 0x7>;
> -				compatible = "ibm,cronus-pib";
> -				index = <0x1>;
> -				include(p8-pib.dts.m4)dnl
> -		       };
> -
> -	       };
> -       };
> +       fsi0 {
> +		compatible = "ibm,cronus-fsi";
> +		index = <0x0>;
> +		system-path = "/proc0/fsi";
> +	};
> +
> +	pib0 {
> +		compatible = "ibm,cronus-pib";
> +		index = <0x0>;
> +		system-path = "/proc0/pib";
> +	};
> +
> +	fsi1 {
> +		compatible = "ibm,cronus-fsi";
> +		index = <0x1>;
> +		system-path = "/proc1/fsi";
> +	};
> +
> +	pib1 {
> +		compatible = "ibm,cronus-pib";
> +		index = <0x1>;
> +		system-path = "/proc1/pib";
> +	};
>  };
> -
> diff --git a/p8-fsi.dts.m4 b/p8-fsi.dts.m4
> index 406a8dc..70fdb14 100644
> --- a/p8-fsi.dts.m4
> +++ b/p8-fsi.dts.m4
> @@ -20,6 +20,7 @@
>  
>  		index = <0x0>;
>  		status = "mustexist";
> +		system-path = "/proc0/fsi";
>  
>  		pib at 1000 {
>  			#address-cells = <0x2>;
> @@ -27,7 +28,7 @@
>  			reg = <0x0 0x1000 0x7>;
>  			compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib";
>  			index = <0x0>;
> -			include(p8-pib.dts.m4)dnl
> +			system-path = "/proc0/pib";
>  		};
>  
>  		hmfsi at 100000 {
> @@ -37,6 +38,7 @@
>  			reg = <0x0 0x100000 0x8000>;
>  			port = <0x1>;
>  			index = <0x1>;
> +			system-path = "/proc1/fsi";
>  
>  			pib at 1000 {
>  				#address-cells = <0x2>;
> @@ -44,7 +46,7 @@
>  				reg = <0x0 0x1000 0x7>;
>  				compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib";
>  				index = <0x1>;
> -				include(p8-pib.dts.m4)dnl
> +				system-path = "/proc1/pib";
>  			};
>  
>  		};
> @@ -56,6 +58,7 @@
>  			reg = <0x0 0x180000 0x80000>;
>  			port = <0x2>;
>  			index = <0x2>;
> +			system-path = "/proc2/fsi";
>  
>  			pib at 1000 {
>  				#address-cells = <0x2>;
> @@ -63,7 +66,7 @@
>  				reg = <0x0 0x1000 0x7>;
>  				compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib";
>  				index = <0x2>;
> -				include(p8-pib.dts.m4)dnl
> +				system-path = "/proc2/pib";
>  			};
>  		};
>  	};
> diff --git a/p8-host.dts.m4 b/p8-host.dts.m4
> index 7a2d253..c3f1a45 100644
> --- a/p8-host.dts.m4
> +++ b/p8-host.dts.m4
> @@ -4,7 +4,7 @@ define(`CHIP',`pib@$1 {
>  	      compatible = "ibm,host-pib";
>  	      reg = <$1>;
>  	      index = <$1>;
> -	      include(p8-pib.dts.m4)dnl
> +	      system-path = "/proc$1/pib";
>  	}')dnl
>  
>  /dts-v1/;
> diff --git a/p8-i2c.dts.m4 b/p8-i2c.dts.m4
> index f1fcbd3..3ea4b59 100644
> --- a/p8-i2c.dts.m4
> +++ b/p8-i2c.dts.m4
> @@ -13,7 +13,7 @@
>  		reg = <0x50>;
>  		index = <0x0>;
>  		status = "mustexist";
> -		include(p8-pib.dts.m4)dnl
> +		system-path = "/proc0/pib";
>  
>  		opb at 20010 {
>  			#address-cells = <0x1>;
> @@ -28,6 +28,7 @@
>  				reg = <0x100000 0x80000>;
>  				port = <0x1>;
>  				index = <0x1>;
> +				system-path = "/proc1/fsi";
>  
>  				pib at 1000 {
>  					#address-cells = <0x2>;
> @@ -35,7 +36,7 @@
>  					reg = <0x0 0x1000 0x7>;
>  					compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib";
>  					index = <0x1>;
> -					include(p8-pib.dts.m4)dnl
> +					system-path = "/proc1/pib";
>  				};
>  			};
>  
> @@ -46,6 +47,7 @@
>  				reg = <0x180000 0x80000>;
>  				port = <0x2>;
>  				index = <0x2>;
> +				system-path = "/proc2/fsi";
>  
>  				pib at 1000 {
>  					#address-cells = <0x2>;
> @@ -53,7 +55,7 @@
>  					reg = <0x0 0x1000 0x7>;
>  					compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib";
>  					index = <0x2>;
> -					include(p8-pib.dts.m4)dnl
> +					system-path = "/proc2/pib";
>  				};
>  			};
>  		};
> diff --git a/p8-kernel.dts.m4 b/p8-kernel.dts.m4
> index 4a59b78..6eacb92 100644
> --- a/p8-kernel.dts.m4
> +++ b/p8-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>;
> @@ -19,7 +19,7 @@
>  			reg = <0x0 0x1000 0x7>;
>  			index = <0x0>;
>  			compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib";
> -			include(p8-pib.dts.m4)dnl
> +			system-path = "/proc0/pib";
>  	       };
>  
>  	       hmfsi at 100000 {
> @@ -29,6 +29,7 @@
>  		       reg = <0x0 0x100000 0x8000>;
>  		       port = <0x1>;
>  		       index = <0x1>;
> +		       system-path = "/proc1/fsi";
>  
>  		       pib at 1000 {
>  				#address-cells = <0x2>;
> @@ -36,7 +37,7 @@
>  				reg = <0x0 0x1000 0x7>;
>  				compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib";
>  				index = <0x1>;
> -				include(p8-pib.dts.m4)dnl
> +				system-path = "/proc1/pib";
>  		       };
>  
>  	       };
> diff --git a/p8-pib.dts.m4 b/p8-pib.dts.m4
> index 82d11d8..044ce2b 100644
> --- a/p8-pib.dts.m4
> +++ b/p8-pib.dts.m4
> @@ -44,6 +44,7 @@ CORE(14, 14)')dnl
>  adu at 2020000 {
>  	compatible = "ibm,power8-adu";
>  	reg = <0x0 0x2020000 0x4>;
> +	device_tree_path = "CONCAT(/mem,PROC_ID)";
>  };
>  
>  nhtm at 2010880 {
> diff --git a/p8.dts.m4 b/p8.dts.m4
> new file mode 100644
> index 0000000..aff477a
> --- /dev/null
> +++ b/p8.dts.m4
> @@ -0,0 +1,55 @@
> +define(`PROC',`
> +define(`PROC_ID',`$1')dnl
> +	proc$1 {
> +		index = <$1>;
> +
> +		fsi {
> +			index = <$1>;
> +		};
> +
> +		pib {
> +			#address-cells = <0x2>;
> +			#size-cells = <0x1>;
> +			index = <$1>;
> +			include(p8-pib.dts.m4)dnl
> +		};
> +	};
> +	mem$1 {
> +		index = <$1>;
> +	}'
> +)dnl
> +
> +/dts-v1/;
> +
> +/ {
> +	PROC(0);
> +	PROC(1);
> +	PROC(2);
> +	PROC(3);
> +	PROC(4);
> +	PROC(5);
> +	PROC(6);
> +	PROC(7);
> +	PROC(9);
> +	PROC(10);
> +	PROC(11);
> +	PROC(12);
> +	PROC(13);
> +	PROC(14);
> +	PROC(15);
> +	PROC(16);
> +	PROC(17);
> +	PROC(18);
> +	PROC(19);
> +	PROC(21);
> +	PROC(22);
> +	PROC(23);
> +	PROC(24);
> +	PROC(25);
> +	PROC(26);
> +	PROC(27);
> +	PROC(28);
> +	PROC(29);
> +	PROC(30);
> +	PROC(31);
> +};
> 






More information about the Pdbg mailing list