diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2007-10-10 17:12:12 +1000 |
---|---|---|
committer | Jon Loeliger <jdl@freescale.com> | 2007-10-15 08:31:52 -0500 |
commit | fd1bf3a5ae46962528ef89a824261a88830758a2 (patch) | |
tree | 9d141fecf1d7d495b3800993e2ecc810f25a468a /tests/trees.S | |
parent | ad9593f229362782b953da4b805df713e8468df0 (diff) | |
download | dtc-fd1bf3a5ae46962528ef89a824261a88830758a2.zip dtc-fd1bf3a5ae46962528ef89a824261a88830758a2.tar.gz dtc-fd1bf3a5ae46962528ef89a824261a88830758a2.tar.bz2 |
libfdt: Add functions to get/add/delete memory reservemap entries
This patch adds functions to libfdt for accessing the memory
reservation map section of a device tree blob. fdt_num_mem_rsv()
retreives the number of reservation entries in a dtb, and
fdt_get_mem_rsv() retreives a specific reservation entry.
fdt_add_mem_rsv() adds a new entry, and fdt_del_mem_rsv() removes a
specific numbered entry.
Testcases for these new functions are also included.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tests/trees.S')
-rw-r--r-- | tests/trees.S | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/trees.S b/tests/trees.S index 78c92d7..bb662a6 100644 --- a/tests/trees.S +++ b/tests/trees.S @@ -37,6 +37,11 @@ tree: \ FDTQUAD(addr) ; \ FDTQUAD(len) ; +#define EMPTY_RSVMAP(tree) \ + .balign 8 ; \ +tree##_rsvmap: ; \ + RSVMAP_ENTRY(0, 0) + #define PROPHDR(tree, name, len) \ FDTLONG(FDT_PROP) ; \ FDTLONG(len) ; \ @@ -70,7 +75,10 @@ tree##_##name: \ TREE_HDR(test_tree1) + .balign 8 test_tree1_rsvmap: + RSVMAP_ENTRY(TEST_ADDR_1, TEST_SIZE_1) + RSVMAP_ENTRY(TEST_ADDR_2, TEST_SIZE_2) RSVMAP_ENTRY(0, 0) test_tree1_struct: @@ -103,8 +111,7 @@ test_tree1_strings: test_tree1_end: TREE_HDR(truncated_property) -truncated_property_rsvmap: - RSVMAP_ENTRY(0, 0) + EMPTY_RSVMAP(truncated_property) truncated_property_struct: BEGIN_NODE("") |