From: "Çağlar Kilimci" <ckilimci@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox <barebox@lists.infradead.org>
Subject: Re: State Framework and dtb
Date: Fri, 31 Mar 2017 10:18:05 +0300 [thread overview]
Message-ID: <CAGUZs0nPy2PCRz3YQjT-O=SE1RwLgudrBW4x9H90R7jRKUmDNQ@mail.gmail.com> (raw)
In-Reply-To: <20170331070209.ogz4znywovz2rneb@pengutronix.de>
2017-03-31 10:02 GMT+03:00 Sascha Hauer <s.hauer@pengutronix.de>:
> On Fri, Mar 31, 2017 at 09:54:56AM +0300, Çağlar Kilimci wrote:
>> Hello,
>>
>> > I should have never implemented this freeing of the stored device tree.
>> > There are too many pointers in the code to nodes of this tree. Please
>> > do not use this free/load device tree feature for state.
>>
>> Sure, I usually avoid using it. Here I use to test it if it is able to
>> read the dtb or not? Apparently, it "can" read and parse it but at the
>> boot stage, it does not care.
>>
>> > So you edited
>> > the devicetree in the barebox source code, built a new binary with it
>> > and started it. Now when you enter "of_dump /state@0" you should
>> > see the state node you created. Is that what happens?
>>
>> No, not at all. I could not any sign of state (or state@0).
>> barebox@Phytec phyCORE AM335x:/ of_dump /state@0
>> Cannot find nodepath /state@0
>> of_dump: No such file or directory
>
> Ok, here's your problem. I assume you edited
> arch/arm/dts/am335x-phytec-phycore-som.dts, right? Could you send the
> diff to that file (or to the one you edited)? There must be something
> wrong here.
Actually, I was using arch/arm/boot/dts/am335x-phycore-som.dtsi in the
linux-ti kernel and the diff is:
diff --git a/arch/arm/boot/dts/am335x-phycore-som.dtsi
b/arch/arm/boot/dts/am335x-phycore-som.dtsi
index 58e69f1..d8ae841 100644
--- a/arch/arm/boot/dts/am335x-phycore-som.dtsi
+++ b/arch/arm/boot/dts/am335x-phycore-som.dtsi
@@ -43,6 +43,27 @@
regulator-always-on;
};
};
+
+ state: state@0 {
+ magic = <0x27031993>;
+ compatible = "barebox,state";
+ backend-type = "dtb";
+ backend = <&state_partition>;
+
+ foo {
+ reg = <0x00 0x4>;
+ type = "uint32";
+ default = <0x0>;
+ };
+
+ bar {
+ reg = <0x10 0x4>;
+ type = "enum32";
+ names = "baz", "qux";
+ default = <1>;
+ };
+ };
+
};
/* Crypto Module */
@@ -131,6 +152,9 @@
pagesize = <32>;
reg = <0x52>;
status = "disabled";
+ state_partition: partition@1000 {
+ reg = <0x1000 0x2000>;
+ };
};
i2c_rtc: rtc@68 {
Let me edit "arch/arm/dts/am335x-phytec-phycore-som.dts" and try it.
--
Çağlar Kilimci
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2017-03-31 7:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-29 13:24 Çağlar Kilimci
2017-03-30 6:31 ` Sascha Hauer
2017-03-30 10:33 ` Çağlar Kilimci
2017-03-31 6:21 ` Sascha Hauer
2017-03-31 6:54 ` Çağlar Kilimci
2017-03-31 7:02 ` Sascha Hauer
2017-03-31 7:18 ` Çağlar Kilimci [this message]
2017-03-31 7:23 ` Sascha Hauer
2017-03-31 11:41 ` Çağlar Kilimci
2017-03-31 13:00 ` Sascha Hauer
2017-04-03 20:59 ` Çağlar Kilimci
2017-04-04 6:22 ` Sascha Hauer
2017-04-04 6:49 ` Çağlar Kilimci
2017-04-04 8:04 ` Jan Remmet
[not found] ` <58e3539f.0582540a.1e64d.751fSMTPIN_ADDED_BROKEN@mx.google.com>
2017-04-04 10:27 ` Çağlar Kilimci
2017-04-04 10:48 ` Ian Abbott
2017-04-05 6:01 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAGUZs0nPy2PCRz3YQjT-O=SE1RwLgudrBW4x9H90R7jRKUmDNQ@mail.gmail.com' \
--to=ckilimci@gmail.com \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox