From: Milton Miller <miltonm@bga.com>
To: Jon Loeliger <jdl@jdl.com>
Cc: linuxppc-dev@ozlabs.org, David Gibson <david@gibson.dropbear.id.au>
Subject: [PATCH 09/11] dtc: add a testcase with labels
Date: Sat, 7 Jul 2007 01:18:53 -0500 (CDT) [thread overview]
Message-ID: <dtc-5-09.miltonm@bga.com> (raw)
In-Reply-To: <dtc-5-00.miltonm@bga.com>
Create a source file with labels for use as a testcase
to check parsing dts files.
Signed-off-by: Milton Miller <miltonm@bga.com>
---
I started with the existing test01.dts and added labels and
a labeled subnode.
The labels could instead be added to that file if desired,
but that would mean the output of the compiler would not
match the input when writing dts from dts or dtb input.
I haven't studied how to use the new testsuite to check
the result. Initially I was going to suggest diff on the
asm output, but with the libfdt library we could write a
test to change the property and reserve contents then
use the library to fetch and compare.
Index: dtc/tests/label01.dts
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ dtc/tests/label01.dts 2007-06-14 22:17:39.000000000 -0500
@@ -0,0 +1,60 @@
+/memreserve/ 1000000000000000 0000000002000000;
+memrsv2: /memreserve/ 2000000000000000-20ffffffffffffff;
+/memreserve/ 0-13;
+
+/ {
+ model = "MyBoardName";
+ compatible = "MyBoardName", "MyBoardFamilyName";
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ cpus {
+ linux,phandle = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ PowerPC,970@0 {
+ name = "PowerPC,970";
+ device_type = "cpu";
+ reg = <0>;
+ clock-frequency = <5f5e1000>;
+ timebase-frequency = <1FCA055>;
+ linux,boot-cpu;
+ i-cache-size = <10000>;
+ d-cache-size = <8000>;
+ };
+
+ PowerPC,970@1 {
+ name = "PowerPC,970";
+ device_type = "cpu";
+ reg = <1>;
+ clock-frequency = <5f5e1000>;
+ timebase-frequency = <1FCA055>;
+ i-cache-size = <10000>;
+ d-cache-size = <8000>;
+ };
+
+ };
+
+ node: randomnode {
+ prop: string = data: "\xff\0stuffstuff\t\t\t\n\n\n" data_end: ;
+ blob = [byte: 0a 0b 0c 0d de ea ad be ef byte_end: ];
+ ref = < cell: &/memory@0 cell_end: >;
+ mixed = "abc", pre: [1234] post: , gap: < aligned: a b c>;
+ subnode: child {
+ };
+ /* subnode_end: is auto-generated by node emit */
+ };
+ /* node_end: is auto-generated by node emit */
+
+ memory@0 {
+ device_type = "memory";
+ memreg: reg = <00000000 00000000 00000000 20000000>;
+ };
+
+ chosen {
+ bootargs = "root=/dev/sda2";
+ linux,platform = <00000600>;
+ };
+
+};
+
next prev parent reply other threads:[~2007-07-07 6:18 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-07 6:18 [PATCH 00/11] dtc: some fixes, and make asm labels for data Milton Miller
2007-07-07 6:18 ` [PATCH 02/11] dtc: move declaration of yyerror Milton Miller
2007-07-19 5:02 ` David Gibson
2007-07-07 6:18 ` [PATCH 01/11] dtc: fix asm for version 17 Milton Miller
2007-07-18 1:56 ` David Gibson
2007-07-07 6:18 ` [PATCH 03/11] dtc: complain about unparsed digits in cell lists Milton Miller
2007-07-18 2:01 ` David Gibson
2007-07-07 6:18 ` [PATCH 05/11] dtc: clean up grow_data_for() Milton Miller
2007-07-07 6:18 ` [PATCH 04/11] dtc: implement labels on memory reserve slots Milton Miller
2007-07-07 6:18 ` [PATCH 06/11] dtc: allow a label: in any dts context Milton Miller
2007-07-07 6:18 ` [PATCH 07/11] dtc: implement labels on property data Milton Miller
2007-07-07 6:18 ` [PATCH 08/11] dtc: store labels in asscending order Milton Miller
2007-07-07 6:18 ` Milton Miller [this message]
2007-07-07 6:18 ` [PATCH 10/11] dtc: align header comments in asm output Milton Miller
2007-07-07 6:18 ` [PATCH 11/11] dtc: format memory reserve as pairs on two lines Milton Miller
2007-07-07 19:24 ` [PATCH 00/11] dtc: some fixes, and make asm labels for data Jon Loeliger
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=dtc-5-09.miltonm@bga.com \
--to=miltonm@bga.com \
--cc=david@gibson.dropbear.id.au \
--cc=jdl@jdl.com \
--cc=linuxppc-dev@ozlabs.org \
/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;
as well as URLs for NNTP newsgroup(s).