/external/dtc/tests/ |
property_iterate.c | 34 static void test_node(void *fdt, int parent_offset) 46 prop = fdt_getprop(fdt, parent_offset, "test-properties", &len); 49 fdt_get_name(fdt, parent_offset, NULL)); 54 offset = fdt_first_subnode(fdt, parent_offset); 58 fdt_for_each_property_offset(property, fdt, offset) 63 fdt_get_name(fdt, parent_offset, NULL), properties, 68 static void check_fdt_next_subnode(void *fdt) 73 fdt_for_each_subnode(offset, fdt, 0) { 74 test_node(fdt, offset); 84 void *fdt; local [all...] |
nop_property.c | 34 void *fdt; local 41 fdt = load_blob_arg(argc, argv); 43 intp = check_getprop_cell(fdt, 0, "prop-int", TEST_VALUE_1); 46 err = fdt_nop_property(fdt, 0, "prop-int"); 50 intp = fdt_getprop(fdt, 0, "prop-int", &lenerr); 56 strp = check_getprop(fdt, 0, "prop-str", strlen(TEST_STRING_1)+1, 59 err = fdt_nop_property(fdt, 0, "prop-str"); 63 strp = fdt_getprop(fdt, 0, "prop-str", &lenerr);
|
boot-cpuid.c | 31 void *fdt; local 39 fdt = load_blob(argv[1]); 42 if (fdt_boot_cpuid_phys(fdt) != cpuid) 44 fdt_boot_cpuid_phys(fdt), cpuid);
|
set_name.c | 30 static void check_set_name(void *fdt, const char *path, const char *newname) 41 offset = fdt_path_offset(fdt, path); 45 getname = fdt_get_name(fdt, offset, &len); 59 err = fdt_set_name(fdt, offset, newname); 64 getname = fdt_get_name(fdt, offset, &len); 79 void *fdt; local 82 fdt = load_blob_arg(argc, argv); 83 fdt = open_blob_rw(fdt); 85 check_set_name(fdt, "/subnode@1", "subnode@17") [all...] |
subnode_iterate.c | 34 static void test_node(void *fdt, int parent_offset) 43 prop = fdt_getprop(fdt, parent_offset, "subnodes", &len); 46 fdt_get_name(fdt, parent_offset, NULL)); 51 fdt_for_each_subnode(offset, fdt, parent_offset) 56 fdt_get_name(fdt, parent_offset, NULL), subnodes, 61 static void check_fdt_next_subnode(void *fdt) 66 fdt_for_each_subnode(offset, fdt, 0) { 67 test_node(fdt, offset); 77 void *fdt; local 83 fdt = load_blob(argv[1]) [all...] |
references.c | 30 static void check_ref(const void *fdt, int node, uint32_t checkref) 36 p = fdt_getprop(fdt, node, "ref", &len); 47 p = fdt_getprop(fdt, node, "lref", &len); 59 static void check_rref(const void *fdt) 65 p = fdt_getprop(fdt, 0, "rref", &len); 72 if (ref != fdt_get_phandle(fdt, 0)) 78 void *fdt; local 83 fdt = load_blob_arg(argc, argv); 85 n1 = fdt_path_offset(fdt, "/node1"); 88 n2 = fdt_path_offset(fdt, "/node2") [all...] |
pylibfdt_tests.py | 72 """Read a device tree file into an Fdt object, ready for use 78 Fdt bytearray suitable for passing to libfdt functions 80 return libfdt.Fdt(open(fname).read()) 86 fdt: Device tree file used for testing 91 self.fdt = _ReadFdt('test_tree1.dtb') 103 node = self.fdt.path_offset(node_path) 104 poffset = self.fdt.first_property_offset(node, QUIET_NOTFOUND) 106 prop = self.fdt.get_property_by_offset(poffset) 108 poffset = self.fdt.next_property_offset(poffset, QUIET_NOTFOUND) 118 fdt = libfdt.Fdt('a string' [all...] |
asm_tree_dump.c | 37 void *fdt; local 48 fdt = dlsym(sohandle, "dt_blob_start"); 49 if (!fdt) 53 err = fdt_check_header(fdt); 58 save_blob(argv[2], fdt);
|
get_name.c | 30 static void check_name(void *fdt, const char *path) 41 offset = fdt_path_offset(fdt, path); 45 getname = fdt_get_name(fdt, offset, &len); 60 getname2 = fdt_get_name(fdt, offset, NULL); 70 void *fdt; local 73 fdt = load_blob_arg(argc, argv); 75 check_name(fdt, "/"); 76 check_name(fdt, "/subnode@1"); 77 check_name(fdt, "/subnode@2"); 78 check_name(fdt, "/subnode@1/subsubnode") [all...] |
parent_offset.c | 42 static void check_path(struct fdt_header *fdt, const char *path) 54 nodeoffset = fdt_path_offset(fdt, path); 58 parentpathoffset = fdt_path_offset(fdt, parentpath); 63 parentoffset = fdt_parent_offset(fdt, nodeoffset); 74 void *fdt; local 78 fdt = load_blob_arg(argc, argv); 80 check_path(fdt, "/subnode@1"); 81 check_path(fdt, "/subnode@2"); 82 check_path(fdt, "/subnode@1/subsubnode"); 83 check_path(fdt, "/subnode@2/subsubnode@0") [all...] |
setprop_inplace.c | 35 void *fdt; local 44 fdt = load_blob_arg(argc, argv); 46 intp = check_getprop_cell(fdt, 0, "prop-int", TEST_VALUE_1); 49 err = fdt_setprop_inplace_cell(fdt, 0, "prop-int", ~TEST_VALUE_1); 53 intp = check_getprop_cell(fdt, 0, "prop-int", ~TEST_VALUE_1); 56 strp = check_getprop(fdt, 0, "prop-str", strlen(TEST_STRING_1)+1, 60 int64p = check_getprop_64(fdt, 0, "prop-int64", TEST_VALUE64_1); 63 err = fdt_setprop_inplace_u64(fdt, 0, "prop-int64", ~TEST_VALUE64_1); 67 int64p = check_getprop_64(fdt, 0, "prop-int64", ~TEST_VALUE64_1); 70 strp = check_getprop(fdt, 0, "prop-str", strlen(TEST_STRING_1)+1 [all...] |
sized_cells.c | 31 static void check_compare_properties(void *fdt, 38 propval = fdt_getprop(fdt, 0, name_one, &proplen); 45 check_getprop(fdt, 0, name_two, proplen, propval); 50 void *fdt; local 73 fdt = load_blob_arg(argc, argv); 75 check_getprop(fdt, 0, "cells-8b", sizeof(expected_8), expected_8); 76 check_getprop(fdt, 0, "cells-16b", sizeof(expected_16), expected_16); 77 check_getprop(fdt, 0, "cells-32b", sizeof(expected_32), expected_32); 78 check_getprop(fdt, 0, "cells-64b", sizeof(expected_64), expected_64); 80 check_compare_properties(fdt, "cells-one-16b", "cells-one-32b") [all...] |
mangle-layout.c | 45 static void new_header(struct bufstate *buf, int version, const void *fdt) 62 fdt_set_boot_cpuid_phys(buf->buf, fdt_boot_cpuid_phys(fdt)); 65 static void add_block(struct bufstate *buf, int version, char block, const void *fdt) 75 src = (const char *)fdt + fdt_off_mem_rsvmap(fdt); 76 size = (fdt_num_mem_rsv(fdt) + 1) 83 src = (const char *)fdt + fdt_off_dt_struct(fdt); 84 size = fdt_size_dt_struct(fdt); 90 src = (const char *)fdt + fdt_off_dt_strings(fdt) 124 void *fdt; local [all...] |
supernode_atdepth_offset.c | 69 static void check_supernode_atdepth(struct fdt_header *fdt, const char *path, 85 nodeoffset = fdt_path_offset(fdt, path); 88 superpathoffset = fdt_path_offset(fdt, superpath); 93 supernodeoffset = fdt_supernode_atdepth_offset(fdt, nodeoffset, 108 static void check_supernode_overdepth(struct fdt_header *fdt, const char *path) 113 nodeoffset = fdt_path_offset(fdt, path); 117 err = fdt_supernode_atdepth_offset(fdt, nodeoffset, pdepth + 1, NULL); 123 static void check_path(struct fdt_header *fdt, const char *path) 128 check_supernode_atdepth(fdt, path, i); 129 check_supernode_overdepth(fdt, path) 133 void *fdt; local [all...] |
root_node.c | 33 void *fdt; local 37 fdt = load_blob_arg(argc, argv); 39 nh = fdt_offset_ptr(fdt, 0, sizeof(*nh));
|
phandle_format.c | 36 void *fdt; local 45 fdt = load_blob(argv[1]); 56 n4 = fdt_path_offset(fdt, "/node4"); 60 h4 = fdt_get_phandle(fdt, n4); 65 check_getprop_cell(fdt, n4, "linux,phandle", h4); 67 if (fdt_getprop(fdt, n4, "linux,phandle", NULL)) 71 check_getprop_cell(fdt, n4, "phandle", h4); 73 if (fdt_getprop(fdt, n4, "phandle", NULL))
|
value-labels.c | 61 static void check_prop_labels(void *sohandle, void *fdt, const char *name, 69 prop = fdt_get_property(fdt, 0, name, &len); 100 void *fdt; local 111 fdt = dlsym(sohandle, "dt_blob_start"); 112 if (!fdt) 116 err = fdt_check_header(fdt); 122 check_prop_labels(sohandle, fdt, "prop1", labels1, ARRAY_SIZE(labels1)); 123 check_prop_labels(sohandle, fdt, "prop2", labels2, ARRAY_SIZE(labels2)); 124 check_prop_labels(sohandle, fdt, "prop3", labels3, ARRAY_SIZE(labels3));
|
/device/linaro/bootloader/edk2/EmbeddedPkg/Library/FdtLib/ |
fdt_ro.c | 53 #include <fdt.h>
58 static int _fdt_nodename_eq(const void *fdt, int offset,
61 const char *p = fdt_offset_ptr(fdt, offset + FDT_TAGSIZE, len+1);
78 const char *fdt_string(const void *fdt, int stroffset)
80 return (const char *)fdt + fdt_off_dt_strings(fdt) + stroffset;
83 static int _fdt_string_eq(const void *fdt, int stroffset,
86 const char *p = fdt_string(fdt, stroffset);
91 int fdt_get_mem_rsv(const void *fdt, int n, uint64_t *address, uint64_t *size)
93 FDT_CHECK_HEADER(fdt);
[all...] |
fdt.c | 53 #include <fdt.h>
58 int fdt_check_header(const void *fdt)
60 if (fdt_magic(fdt) == FDT_MAGIC) {
62 if (fdt_version(fdt) < FDT_FIRST_SUPPORTED_VERSION)
64 if (fdt_last_comp_version(fdt) > FDT_LAST_SUPPORTED_VERSION)
66 } else if (fdt_magic(fdt) == FDT_SW_MAGIC) {
68 if (fdt_size_dt_struct(fdt) == 0)
77 const void *fdt_offset_ptr(const void *fdt, int offset, unsigned int len)
81 if (fdt_version(fdt) >= 0x11)
83 || ((offset + len) > fdt_size_dt_struct(fdt)))
[all...] |
fdt_wip.c | 53 #include <fdt.h>
58 int fdt_setprop_inplace(void *fdt, int nodeoffset, const char *name,
64 propval = fdt_getprop_w(fdt, nodeoffset, name, &proplen);
83 int fdt_nop_property(void *fdt, int nodeoffset, const char *name)
88 prop = fdt_get_property_w(fdt, nodeoffset, name, &len);
97 int _fdt_node_end_offset(void *fdt, int offset)
102 offset = fdt_next_node(fdt, offset, &depth);
107 int fdt_nop_node(void *fdt, int nodeoffset)
111 endoffset = _fdt_node_end_offset(fdt, nodeoffset);
115 _fdt_nop_region(fdt_offset_ptr_w(fdt, nodeoffset, 0), [all...] |
/device/linaro/bootloader/arm-trusted-firmware/lib/libfdt/ |
fdt_addresses.c | 53 #include <fdt.h> 58 int fdt_address_cells(const void *fdt, int nodeoffset) 64 ac = fdt_getprop(fdt, nodeoffset, "#address-cells", &len); 78 int fdt_size_cells(const void *fdt, int nodeoffset) 84 sc = fdt_getprop(fdt, nodeoffset, "#size-cells", &len);
|
/external/dtc/libfdt/ |
fdt_addresses.c | 53 #include <fdt.h> 58 int fdt_address_cells(const void *fdt, int nodeoffset) 64 ac = fdt_getprop(fdt, nodeoffset, "#address-cells", &len); 78 int fdt_size_cells(const void *fdt, int nodeoffset) 84 sc = fdt_getprop(fdt, nodeoffset, "#size-cells", &len);
|
/device/linaro/bootloader/arm-trusted-firmware/plat/qemu/ |
qemu_private.h | 23 int dt_add_psci_node(void *fdt); 24 int dt_add_psci_cpu_enable_methods(void *fdt);
|
/external/e2fsprogs/util/ |
libecho.c | 41 struct _finddata_t fdt; local 63 ff = _findfirst(f, &fdt); 70 printf("%s%s%s\n", prefix, filepath, fdt.name); 73 if (_findnext(ff, &fdt) < 0) 75 printf("%s%s%s\n", prefix, filepath, fdt.name);
|
/device/linaro/bootloader/OpenPlatformPkg/Platforms/AMD/Styx/Drivers/FdtDxe/ |
BdsLinuxFdt.c | 33 // Additional size that could be used for FDT entries added by the UEFI OS Loader
194 IN VOID *fdt,
201 node = fdt_subnode_offset (fdt, 0, "smb");
203 subnode = fdt_subnode_offset (fdt, node, device);
205 rc = fdt_setprop_string(fdt, subnode, "status", enable ? "ok" : "disabled");
218 IN VOID *fdt,
225 node = fdt_subnode_offset (fdt, 0, "smb");
227 subnode = fdt_subnode_offset (fdt, node, device);
229 rc = fdt_setprop(fdt, subnode, "mac-address", (void *)&mac_addr, 6);
241 IN VOID *fdt
371 VOID *fdt; local [all...] |