summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlistair Popple <alistair@popple.id.au>2017-08-14 16:25:12 +1000
committerAlistair Popple <alistair@popple.id.au>2017-08-14 16:27:19 +1000
commit03a3c429598f530cf765cefd845ab2f05ceca1af (patch)
treee853b4e3098109332553c305a407a297bd66959a
parent39b31a75bf639edc93a0b786c9e1bdffdd435fa2 (diff)
downloadpdbg-03a3c429598f530cf765cefd845ab2f05ceca1af.tar.gz
pdbg-03a3c429598f530cf765cefd845ab2f05ceca1af.zip
Rework POWER9 device-trees to share common definitions
The description of the PIB is the same regardless of access mechanism (OpenFSI, direct, etc.) so to ease updates move the common definitions into a seperate file which can be easily shared between backends similar to how P8 works. Signed-off-by: Alistair Popple <alistair@popple.id.au>
-rw-r--r--p9-fsi.dtsi.m498
-rw-r--r--p9-kernel.dts24
-rw-r--r--p9-pib.dts.m455
3 files changed, 68 insertions, 109 deletions
diff --git a/p9-fsi.dtsi.m4 b/p9-fsi.dtsi.m4
index 4a25ea2..fde71e4 100644
--- a/p9-fsi.dtsi.m4
+++ b/p9-fsi.dtsi.m4
@@ -1,25 +1,3 @@
-define(`CONCAT', `$1$2')dnl
-define(`HEX', `CONCAT(0x, $1)')dnl
-define(`CORE_BASE', `eval(0x20000000 + $1 * 0x1000000, 16)')dnl
-define(`CORE', `core@CORE_BASE($1) {
-#address-cells = <0x1>;
-#size-cells = <0x0>;
-compatible = "ibm,power9-core";
-reg = <0x0 HEX(CORE_BASE($1)) 0xfffff>;
-index = <HEX(eval($2, 16))>;
-
-THREAD(0);
-THREAD(1);
-THREAD(2);
-THREAD(3);
-}')dnl
-define(`THREAD_BASE', `eval($1, 16)')dnl
-define(`THREAD',`thread@THREAD_BASE($1) {
-compatible = "ibm,power9-thread";
-reg = <0x0>;
-tid = <HEX(eval($1, 16))>;
-index = <HEX(eval($1, 16))>;
-}')dnl
/ {
#address-cells = <0x1>;
@@ -35,41 +13,10 @@ index = <HEX(eval($1, 16))>;
status = "hidden";
pib@1000 {
- #address-cells = <0x2>;
- #size-cells = <0x1>;
- reg = <0x0 0x1000 0x7>;
- compatible = "ibm,fsi-pib", "ibm,power9-fsi-pib";
- index = <0x0>;
-
- adu@90000 {
- compatible = "ibm,power9-adu";
- reg = <0x0 0x90000 0x5>;
- };
-
- CORE(0, 0);
- CORE(1, 1);
- CORE(2, 2);
- CORE(3, 3);
- CORE(4, 4);
- CORE(5, 5);
- CORE(6, 6);
- CORE(7, 7);
- CORE(8, 8);
- CORE(9, 9);
- CORE(10, 10);
- CORE(11, 11);
- CORE(12, 12);
- CORE(13, 13);
- CORE(14, 14);
- CORE(15, 15);
- CORE(16, 16);
- CORE(17, 17);
- CORE(18, 18);
- CORE(19, 19);
- CORE(20, 20);
- CORE(21, 21);
- CORE(22, 22);
- CORE(23, 23);
+ reg = <0x0 0x1000 0x7>;
+ index = <0x0>;
+ compatible = "ibm,fsi-pib", "ibm,power9-fsi-pib";
+ include(p9-pib.dts.m4)dnl
};
hmfsi@100000 {
@@ -79,42 +26,11 @@ index = <HEX(eval($1, 16))>;
index = <0x1>;
pib@1000 {
- #address-cells = <0x2>;
- #size-cells = <0x1>;
reg = <0x0 0x1000 0x7>;
- compatible = "ibm,fsi-pib", "ibm,power9-fsi-pib";
index = <0x1>;
-
- adu@90000 {
- compatible = "ibm,power9-adu";
- reg = <0x0 0x90000 0x5>;
- };
-
- CORE(0, 0);
- CORE(1, 1);
- CORE(2, 2);
- CORE(3, 3);
- CORE(4, 4);
- CORE(5, 5);
- CORE(6, 6);
- CORE(7, 7);
- CORE(8, 8);
- CORE(9, 9);
- CORE(10, 10);
- CORE(11, 11);
- CORE(12, 12);
- CORE(13, 13);
- CORE(14, 14);
- CORE(15, 15);
- CORE(16, 16);
- CORE(17, 17);
- CORE(18, 18);
- CORE(19, 19);
- CORE(20, 20);
- CORE(21, 21);
- CORE(22, 22);
- CORE(23, 23);
- };
+ compatible = "ibm,fsi-pib", "ibm,power9-fsi-pib";
+ include(p9-pib.dts.m4)dnl
+ };
};
};
diff --git a/p9-kernel.dts b/p9-kernel.dts
index e74e282..ff19779 100644
--- a/p9-kernel.dts
+++ b/p9-kernel.dts
@@ -14,16 +14,10 @@
status = "hidden";
pib@1000 {
- #address-cells = <0x2>;
- #size-cells = <0x1>;
reg = <0x0 0x1000 0x7>;
- compatible = "ibm,fsi-pib", "ibm,power9-fsi-pib";
index = <0x0>;
-
- adu@90000 {
- compatible = "ibm,power9-adu";
- reg = <0x0 0x90000 0x5>;
- };
+ compatible = "ibm,fsi-pib", "ibm,power9-fsi-pib";
+ include(p9-pib.dts.m4)dnl
};
hmfsi@100000 {
@@ -33,16 +27,10 @@
index = <0x1>;
pib@1000 {
- #address-cells = <0x2>;
- #size-cells = <0x1>;
- reg = <0x0 0x1000 0x7>;
- compatible = "ibm,fsi-pib", "ibm,power9-fsi-pib";
- index = <0x1>;
-
- adu@90000 {
- compatible = "ibm,power9-adu";
- reg = <0x0 0x90000 0x5>;
- };
+ reg = <0x0 0x1000 0x7>;
+ index = <0x1>;
+ compatible = "ibm,fsi-pib", "ibm,power9-fsi-pib";
+ include(p9-pib.dts.m4)dnl
};
};
};
diff --git a/p9-pib.dts.m4 b/p9-pib.dts.m4
new file mode 100644
index 0000000..9cb0e3e
--- /dev/null
+++ b/p9-pib.dts.m4
@@ -0,0 +1,55 @@
+define(`CONCAT', `$1$2')dnl
+define(`HEX', `CONCAT(0x, $1)')dnl
+define(`CORE_BASE', `eval(0x20000000 + $1 * 0x1000000, 16)')dnl
+define(`CORE', `core@CORE_BASE($1) {
+#address-cells = <0x1>;
+#size-cells = <0x0>;
+compatible = "ibm,power9-core";
+reg = <0x0 HEX(CORE_BASE($1)) 0xfffff>;
+index = <HEX(eval($2, 16))>;
+
+THREAD(0);
+THREAD(1);
+THREAD(2);
+THREAD(3);
+}')dnl
+define(`THREAD_BASE', `eval($1, 16)')dnl
+define(`THREAD',`thread@THREAD_BASE($1) {
+compatible = "ibm,power9-thread";
+reg = <0x0>;
+tid = <HEX(eval($1, 16))>;
+index = <HEX(eval($1, 16))>;
+}')dnl
+
+#address-cells = <0x2>;
+#size-cells = <0x1>;
+
+adu@90000 {
+ compatible = "ibm,power9-adu";
+ reg = <0x0 0x90000 0x5>;
+};
+
+CORE(0, 0);
+CORE(1, 1);
+CORE(2, 2);
+CORE(3, 3);
+CORE(4, 4);
+CORE(5, 5);
+CORE(6, 6);
+CORE(7, 7);
+CORE(8, 8);
+CORE(9, 9);
+CORE(10, 10);
+CORE(11, 11);
+CORE(12, 12);
+CORE(13, 13);
+CORE(14, 14);
+CORE(15, 15);
+CORE(16, 16);
+CORE(17, 17);
+CORE(18, 18);
+CORE(19, 19);
+CORE(20, 20);
+CORE(21, 21);
+CORE(22, 22);
+CORE(23, 23);
OpenPOWER on IntegriCloud