/external/dtc/tests/ |
find_property.c | 32 void *fdt; local 35 fdt = load_blob_arg(argc, argv); 37 check_property_cell(fdt, 0, "prop-int", TEST_VALUE_1); 38 check_property(fdt, 0, "prop-str", strlen(TEST_STRING_1)+1, TEST_STRING_1);
|
getprop.c | 33 void *fdt; local 36 fdt = load_blob_arg(argc, argv); 38 check_getprop_cell(fdt, 0, "prop-int", TEST_VALUE_1); 39 check_getprop(fdt, 0, "prop-str", strlen(TEST_STRING_1)+1, TEST_STRING_1);
|
propname_escapes.c | 33 void *fdt; local 36 fdt = load_blob_arg(argc, argv); 38 check_getprop_cell(fdt, 0, "#address-cells", 1); 39 check_getprop_cell(fdt, 0, "#gpio-cells", 2);
|
string_escapes.c | 32 void *fdt; local 35 fdt = load_blob_arg(argc, argv); 37 check_getprop(fdt, 0, "escape-str", 39 check_getprop(fdt, 0, "escape-str-2",
|
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);
|
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);
|
char_literal.c | 33 void *fdt; local 43 fdt = load_blob_arg(argc, argv); 45 check_getprop(fdt, 0, "char-literal-cells",
|
get_alias.c | 31 static void check_alias(void *fdt, const char *path, const char *alias) 35 aliaspath = fdt_get_alias(fdt, alias); 47 void *fdt; local 50 fdt = load_blob_arg(argc, argv); 52 check_alias(fdt, "/subnode@1", "s1"); 53 check_alias(fdt, "/subnode@1/subsubnode", "ss1"); 54 check_alias(fdt, "/subnode@1/subsubnode/subsubsubnode", "sss1");
|
get_mem_rsv.c | 33 void *fdt; local 37 fdt = load_blob_arg(argc, argv); 39 rc = fdt_num_mem_rsv(fdt); 45 check_mem_rsv(fdt, 0, TEST_ADDR_1, TEST_SIZE_1); 46 check_mem_rsv(fdt, 1, TEST_ADDR_2, TEST_SIZE_2);
|
root_node.c | 33 void *fdt; local 37 fdt = load_blob_arg(argc, argv); 39 nh = fdt_offset_ptr(fdt, 0, sizeof(*nh));
|
truncated_property.c | 33 void *fdt = &_truncated_property; local 39 prop = fdt_getprop(fdt, 0, "truncated", &len);
|
extra-terminating-null.c | 30 static void check_extranull(void *fdt, const char *prop, const char *str, int numnulls) 38 check_getprop(fdt, 0, prop, len+numnulls, checkbuf); 43 void *fdt; local 47 fdt = load_blob_arg(argc, argv); 49 check_extranull(fdt, "extranull0", TEST_STRING_1, 1); 50 check_extranull(fdt, "extranull1,1", TEST_STRING_1, 2); 51 check_extranull(fdt, "extranull1,2", TEST_STRING_1, 2); 52 check_extranull(fdt, "extranull2,1", TEST_STRING_1, 3); 53 check_extranull(fdt, "extranull2,2", TEST_STRING_1, 3); 54 check_extranull(fdt, "extranull2,3", TEST_STRING_1, 3) [all...] |
node_check_compatible.c | 31 static void check_compatible(const void *fdt, const char *path, 36 offset = fdt_path_offset(fdt, path); 40 err = fdt_node_check_compatible(fdt, offset, compat); 50 void *fdt; local 53 fdt = load_blob_arg(argc, argv); 55 check_compatible(fdt, "/", "test_tree1"); 56 check_compatible(fdt, "/subnode@1/subsubnode", "subsubnode1"); 57 check_compatible(fdt, "/subnode@1/subsubnode", "subsubnode"); 58 check_compatible(fdt, "/subnode@2/subsubnode", "subsubnode2"); 59 check_compatible(fdt, "/subnode@2/subsubnode", "subsubnode") [all...] |
path_offset_aliases.c | 31 static void check_alias(void *fdt, const char *full_path, const char *alias_path) 35 offset = fdt_path_offset(fdt, full_path); 36 offset_a = fdt_path_offset(fdt, alias_path); 45 void *fdt; local 48 fdt = load_blob_arg(argc, argv); 50 check_alias(fdt, "/subnode@1", "s1"); 51 check_alias(fdt, "/subnode@1/subsubnode", "ss1"); 52 check_alias(fdt, "/subnode@1/subsubnode", "s1/subsubnode"); 53 check_alias(fdt, "/subnode@1/subsubnode/subsubsubnode", "sss1"); 54 check_alias(fdt, "/subnode@1/subsubnode/subsubsubnode", "ss1/subsubsubnode") [all...] |
add_subnode_with_nops.c | 50 void *fdt; local 56 fdt = xmalloc(SPACE); 58 CHECK(fdt_create(fdt, SPACE)); 60 CHECK(fdt_finish_reservemap(fdt)); 61 CHECK(fdt_begin_node(fdt, "")); 62 CHECK(fdt_property_cell(fdt, "prop1", TEST_VALUE_1)); 63 CHECK(fdt_property_cell(fdt, "prop2", TEST_VALUE_2)); 64 CHECK(fdt_end_node(fdt)); 65 CHECK(fdt_finish(fdt)); 68 fdt_totalsize(fdt)); [all...] |
addr_size_cells.c | 30 static void check_node(const void *fdt, const char *path, int ac, int sc) 35 offset = fdt_path_offset(fdt, path); 39 xac = fdt_address_cells(fdt, offset); 40 xsc = fdt_size_cells(fdt, offset); 52 void *fdt; local 58 fdt = load_blob(argv[1]); 60 check_node(fdt, "/", 2, 2); 61 check_node(fdt, "/identity-bus@0", 2, 2); 62 check_node(fdt, "/simple-bus@1000000", 2, 1);
|
appendprop1.c | 43 void *fdt; local 50 fdt = xmalloc(SPACE); 51 CHECK(fdt_create(fdt, SPACE)); 52 CHECK(fdt_finish_reservemap(fdt)); 53 CHECK(fdt_begin_node(fdt, "")); 54 CHECK(fdt_end_node(fdt)); 55 CHECK(fdt_finish(fdt)); 58 CHECK(fdt_open_into(fdt, fdt, SPACE)); 60 CHECK(fdt_appendprop(fdt, 0, "prop-bytes", bytes, sizeof(bytes))) [all...] |
appendprop2.c | 43 void *fdt, *buf; local 48 fdt = load_blob_arg(argc, argv); 51 CHECK(fdt_open_into(fdt, buf, SPACE)); 52 fdt = buf; 54 CHECK(fdt_appendprop(fdt, 0, "prop-bytes", bytes, sizeof(bytes))); 55 CHECK(fdt_appendprop_cell(fdt, 0, "prop-int", TEST_VALUE_2)); 56 CHECK(fdt_appendprop_u64(fdt, 0, "prop-int64", TEST_VALUE64_1)); 57 CHECK(fdt_appendprop_string(fdt, 0, "prop-str", TEST_STRING_2)); 59 CHECK(fdt_pack(fdt)); 61 save_blob("appendprop2.test.dtb", fdt); [all...] |
get_phandle.c | 30 static void check_phandle(void *fdt, const char *path, uint32_t checkhandle) 35 offset = fdt_path_offset(fdt, path); 39 phandle = fdt_get_phandle(fdt, offset); 48 void *fdt; local 51 fdt = load_blob_arg(argc, argv); 53 check_phandle(fdt, "/", 0); 54 check_phandle(fdt, "/subnode@2", PHANDLE_1); 55 check_phandle(fdt, "/subnode@2/subsubnode@0", PHANDLE_2); 57 max = fdt_get_max_phandle(fdt);
|
node_offset_by_phandle.c | 31 static void check_search(void *fdt, uint32_t phandle, int target) 35 offset = fdt_node_offset_by_phandle(fdt, phandle); 44 void *fdt; local 48 fdt = load_blob_arg(argc, argv); 50 subnode2_offset = fdt_path_offset(fdt, "/subnode@2"); 51 subsubnode2_offset = fdt_path_offset(fdt, "/subnode@2/subsubnode@0"); 56 check_search(fdt, PHANDLE_1, subnode2_offset); 57 check_search(fdt, PHANDLE_2, subsubnode2_offset); 58 check_search(fdt, ~PHANDLE_1, -FDT_ERR_NOTFOUND); 59 check_search(fdt, 0, -FDT_ERR_BADPHANDLE) [all...] |
nop_node.c | 34 void *fdt; local 39 fdt = load_blob_arg(argc, argv); 41 subnode1_offset = fdt_path_offset(fdt, "/subnode@1"); 45 check_getprop_cell(fdt, subnode1_offset, "prop-int", TEST_VALUE_1); 47 subnode2_offset = fdt_path_offset(fdt, "/subnode@2"); 51 check_getprop_cell(fdt, subnode2_offset, "prop-int", TEST_VALUE_2); 53 subsubnode2_offset = fdt_path_offset(fdt, "/subnode@2/subsubnode"); 57 check_getprop_cell(fdt, subsubnode2_offset, "prop-int", TEST_VALUE_2); 59 err = fdt_nop_node(fdt, subnode1_offset); 63 subnode1_offset = fdt_path_offset(fdt, "/subnode@1") [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);
|
notfound.c | 39 void *fdt; local 45 fdt = load_blob_arg(argc, argv); 47 fdt_get_property(fdt, 0, "nonexistant-property", &lenerr); 50 fdt_getprop(fdt, 0, "nonexistant-property", &lenerr); 53 subnode1_offset = fdt_subnode_offset(fdt, 0, "subnode@1"); 57 fdt_getprop(fdt, subnode1_offset, "prop-str", &lenerr); 60 offset = fdt_subnode_offset(fdt, 0, "nonexistant-subnode"); 63 offset = fdt_subnode_offset(fdt, 0, "subsubnode"); 66 offset = fdt_path_offset(fdt, "/nonexistant-subnode");
|
del_node.c | 34 void *fdt; local 40 fdt = load_blob_arg(argc, argv); 42 fdt = open_blob_rw(fdt); 44 oldsize = fdt_totalsize(fdt); 46 subnode1_offset = fdt_path_offset(fdt, "/subnode@1"); 50 check_getprop_cell(fdt, subnode1_offset, "prop-int", TEST_VALUE_1); 52 subnode2_offset = fdt_path_offset(fdt, "/subnode@2"); 56 check_getprop_cell(fdt, subnode2_offset, "prop-int", TEST_VALUE_2); 58 subsubnode2_offset = fdt_path_offset(fdt, "/subnode@2/subsubnode") [all...] |
del_property.c | 34 void *fdt; local 41 fdt = load_blob_arg(argc, argv); 43 fdt = open_blob_rw(fdt); 45 oldsize = fdt_totalsize(fdt); 47 intp = check_getprop_cell(fdt, 0, "prop-int", TEST_VALUE_1); 50 err = fdt_delprop(fdt, 0, "prop-int"); 54 intp = fdt_getprop(fdt, 0, "prop-int", &lenerr); 61 strp = check_getprop(fdt, 0, "prop-str", strlen(TEST_STRING_1)+1, 64 err = fdt_delprop(fdt, 0, "prop-str") [all...] |