aboutsummaryrefslogtreecommitdiff
path: root/tests/testdata.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2007-10-10 17:12:12 +1000
committerJon Loeliger <jdl@freescale.com>2007-10-15 08:31:52 -0500
commitfd1bf3a5ae46962528ef89a824261a88830758a2 (patch)
tree9d141fecf1d7d495b3800993e2ecc810f25a468a /tests/testdata.h
parentad9593f229362782b953da4b805df713e8468df0 (diff)
downloaddtc-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/testdata.h')
-rw-r--r--tests/testdata.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/testdata.h b/tests/testdata.h
index 15a4a35..3d08ff7 100644
--- a/tests/testdata.h
+++ b/tests/testdata.h
@@ -9,6 +9,17 @@
| (((x) << 8) & 0xff0000) | (((x) << 24) & 0xff000000))
#endif
+#ifdef __ASSEMBLY__
+#define ASM_CONST_LL(x) (x)
+#else
+#define ASM_CONST_LL(x) (x##ULL)
+#endif
+
+#define TEST_ADDR_1 ASM_CONST_LL(0xdeadbeef00000000)
+#define TEST_SIZE_1 ASM_CONST_LL(0x100000)
+#define TEST_ADDR_2 ASM_CONST_LL(0xabcd1234)
+#define TEST_SIZE_2 ASM_CONST_LL(0x1234)
+
#define TEST_VALUE_1 cell_to_fdt(0xdeadbeef)
#define TEST_VALUE_2 cell_to_fdt(0xabcd1234)