From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dsmA8-0001ot-Sc for barebox@lists.infradead.org; Fri, 15 Sep 2017 08:39:49 +0000 Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7] helo=dude.pengutronix.de.) by metis.ext.pengutronix.de with esmtp (Exim 4.84_2) (envelope-from ) id 1dsm9i-0005Jd-T4 for barebox@lists.infradead.org; Fri, 15 Sep 2017 10:39:22 +0200 From: Lucas Stach Date: Fri, 15 Sep 2017 10:39:20 +0200 Message-Id: <20170915083922.25134-11-l.stach@pengutronix.de> In-Reply-To: <20170915083922.25134-1-l.stach@pengutronix.de> References: <20170915083922.25134-1-l.stach@pengutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 10/12] vexpress: add bootstate node to the device tree To: barebox@lists.infradead.org From: Michael Olbrich Signed-off-by: Michael Olbrich Signed-off-by: Lucas Stach --- arch/arm/dts/vexpress-v2p-ca9.dts | 63 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/arch/arm/dts/vexpress-v2p-ca9.dts b/arch/arm/dts/vexpress-v2p-ca9.dts index 541840ae22dc..d0975330f205 100644 --- a/arch/arm/dts/vexpress-v2p-ca9.dts +++ b/arch/arm/dts/vexpress-v2p-ca9.dts @@ -6,6 +6,10 @@ device-path = &barebox_env; }; + aliases { + state = &state; + }; + smb@4000000 { motherboard { flash@0,00000000 { @@ -21,6 +25,65 @@ label = "barebox-environment"; reg = <0x80000 0x80000>; }; + + state_storage: partition@100000 { + label = "barebox-state"; + reg = <0x100000 0x100000>; + }; + }; + }; + }; + + /* State: mutable part */ + state: state { + magic = <0x4d433230>; + compatible = "barebox,state"; + backend-type = "raw"; + backend = <&state_storage>; + backend-stridesize = <0x40>; + backend-storage-type = "circular"; + #address-cells = <1>; + #size-cells = <1>; + + bootstate { + #address-cells = <1>; + #size-cells = <1>; + + system0 { /* the node's name here must match the subnode's name in the 'bootstate' node */ + #address-cells = <1>; + #size-cells = <1>; + + remaining_attempts@0 { + reg = <0x0 0x4>; + type = "uint32"; + default = <3>; + }; + priority@4 { + reg = <0x4 0x4>; + type = "uint32"; + default = <20>; + }; + }; + + system1 { /* the node's name here must match the subnode's name in the 'bootstate' node */ + #address-cells = <1>; + #size-cells = <1>; + + remaining_attempts@8 { + reg = <0x8 0x4>; + type = "uint32"; + default = <3>; + }; + priority@c { + reg = <0xC 0x4>; + type = "uint32"; + default = <20>; + }; + }; + + last_chosen@10 { + reg = <0x10 0x4>; + type = "uint32"; }; }; }; -- 2.11.0 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox