[04/11] host: Handle more chips

Message ID 20180607065438.18257-4-mikey@neuling.org
State Accepted
Headers show
Series
  • [01/11] Cleanup exit code
Related show

Commit Message

Michael Neuling June 7, 2018, 6:54 a.m.
Tuletta can have 2 x DCMs where chip ids end up as 0,1,16,17

Signed-off-by: Michael Neuling <mikey@neuling.org>
---
 p8-host.dts.m4 | 62 ++++++++++++++++++++++++++++++++++----------------
 1 file changed, 42 insertions(+), 20 deletions(-)

Patch

diff --git a/p8-host.dts.m4 b/p8-host.dts.m4
index ed88a55576..aef7e93ed7 100644
--- a/p8-host.dts.m4
+++ b/p8-host.dts.m4
@@ -1,27 +1,49 @@ 
+define(`CHIP',`pib@$1 {
+	      #address-cells = <0x2>;
+	      #size-cells = <0x1>;
+	      compatible = "ibm,host-pib";
+	      reg = <$1>;
+	      chip-id = <$1>;
+	      index = <$1>;
+	      include(p8-pib.dts.m4)dnl
+	}')dnl
+
 /dts-v1/;
 
 / {
 	#address-cells = <0x1>;
 	#size-cells = <0x0>;
 
-	/* Host based debugfs access */
-	pib@0 {
-	      #address-cells = <0x2>;
-	      #size-cells = <0x1>;
-	      compatible = "ibm,host-pib";
-	      reg = <0x0>;
-	      chip-id = <0x0>;
-	      index = <0x0>;
-	      include(p8-pib.dts.m4)dnl
-	};
-
-	pib@8 {
-	      #address-cells = <0x2>;
-	      #size-cells = <0x1>;
-	      compatible = "ibm,host-pib";
-	      reg = <0x8>;
-	      chip-id = <0x8>;
-	      index = <0x1>;
-	      include(p8-pib.dts.m4)dnl
-	};
+	CHIP(0);
+	CHIP(1);
+	CHIP(2);
+	CHIP(3);
+	CHIP(4);
+	CHIP(5);
+	CHIP(6);
+	CHIP(7);
+	CHIP(8);
+	CHIP(9);
+	CHIP(10);
+	CHIP(11);
+	CHIP(12);
+	CHIP(13);
+	CHIP(14);
+	CHIP(15);
+	CHIP(16);
+	CHIP(17);
+	CHIP(18);
+	CHIP(19);
+	CHIP(20);
+	CHIP(21);
+	CHIP(22);
+	CHIP(23);
+	CHIP(24);
+	CHIP(25);
+	CHIP(26);
+	CHIP(27);
+	CHIP(28);
+	CHIP(29);
+	CHIP(30);
+	CHIP(31);
 };