From patchwork Mon Oct 14 05:17:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1175980 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46s6MJ3tSxz9sPp for ; Mon, 14 Oct 2019 16:20:12 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="IrrdMofn"; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 46s6MH2x9VzDqWF for ; Mon, 14 Oct 2019 16:20:11 +1100 (AEDT) X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 46s6K81M58zDqX8 for ; Mon, 14 Oct 2019 16:18:20 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="IrrdMofn"; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 46s6K75MKcz9sPj; Mon, 14 Oct 2019 16:18:19 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1571030299; bh=8/wYbS6x9FKgXfmU0cXQ1Tnm9dVxIuREh+R/9y5AwVg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IrrdMofn+jT7Hs/24gzLjz+0od8XQuE6U+ulH3WbkP7p6a0hDs4BX2LpZaCiX9JJN EcI951p+4XQbNzVpN6nafNGLVs7RAA+TKHvYybw4/dmbRl+z9ezOTvx6lmr+q/w2JV FqSUc+cSfe0jMuXDopIYUgRVVjsXP8uXzLfj04tWWpSd118be/pHX4jYf+/tQ8nH2w KoL5nZB77A6R9VvOGNLMBZ9ke59DBup95tadXSNL+7dzXrjFjJloip19v47IuzHCwT W/Exn2WV4+X1ut0tppF0fLNlTltJP6P/kvd0NGxIu7cUI+A8ciSKogNlec9CTB1hzH BE2lka+CvHiBQ== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Mon, 14 Oct 2019 16:17:46 +1100 Message-Id: <20191014051748.20190-29-amitay@ozlabs.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191014051748.20190-1-amitay@ozlabs.org> References: <20191014051748.20190-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v5 28/30] dts: Split P8 device trees into system and backend trees X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Amitay Isaacs Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- 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 69a21de..5829fb3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -72,7 +72,7 @@ endif DT = fake.dts fake2.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@0 { - #address-cells = <0x2>; - #size-cells = <0x1>; - compatible = "ibm,cronus-fsi"; - reg = <0x0 0x0 0x0>; - - index = <0x0>; - status = "mustexist"; - - pib@1000 { - #address-cells = <0x2>; - #size-cells = <0x1>; - reg = <0x0 0x1000 0x7>; - index = <0x0>; - compatible = "ibm,cronus-pib"; - include(p8-pib.dts.m4)dnl - }; - - hmfsi@100000 { - #address-cells = <0x2>; - #size-cells = <0x1>; - compatible = "ibm,cronus-hmfsi"; - reg = <0x0 0x100000 0x8000>; - port = <0x1>; - index = <0x1>; - - pib@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@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@100000 { @@ -37,6 +38,7 @@ reg = <0x0 0x100000 0x8000>; port = <0x1>; index = <0x1>; + system-path = "/proc1/fsi"; pib@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@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@20010 { #address-cells = <0x1>; @@ -28,6 +28,7 @@ reg = <0x100000 0x80000>; port = <0x1>; index = <0x1>; + system-path = "/proc1/fsi"; pib@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@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@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@100000 { @@ -29,6 +29,7 @@ reg = <0x0 0x100000 0x8000>; port = <0x1>; index = <0x1>; + system-path = "/proc1/fsi"; pib@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@2020000 { compatible = "ibm,power8-adu"; reg = <0x0 0x2020000 0x4>; + device_tree_path = "CONCAT(/mem,PROC_ID)"; }; nhtm@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); +};