Lines Matching refs:fdt
28 static void *fdt; variable
30 static int ut_fdt_getprop_u32_by_index(void *fdt, const char *path, in ut_fdt_getprop_u32_by_index() argument
38 node_off = fdt_path_offset(fdt, path); in ut_fdt_getprop_u32_by_index()
42 val = fdt_getprop(fdt, node_off, name, &len); in ut_fdt_getprop_u32_by_index()
51 static int ut_fdt_getprop_u32(void *fdt, const char *path, const char *name, in ut_fdt_getprop_u32() argument
54 return ut_fdt_getprop_u32_by_index(fdt, path, name, 0, out); in ut_fdt_getprop_u32()
57 static int fdt_getprop_str(void *fdt, const char *path, const char *name, in fdt_getprop_str() argument
63 node_off = fdt_path_offset(fdt, path); in fdt_getprop_str()
67 *out = fdt_stringlist_get(fdt, node_off, name, 0, &len); in fdt_getprop_str()
76 ut_assertok(ut_fdt_getprop_u32(fdt, "/test-node", "test-int-property", in fdt_overlay_change_int_property()
88 ut_assertok(fdt_getprop_str(fdt, "/test-node", "test-str-property", in fdt_overlay_change_str_property()
100 ut_assertok(fdt_getprop_str(fdt, "/test-node", "test-str-property-2", in fdt_overlay_add_str_property()
112 off = fdt_path_offset(fdt, "/test-node/new-node"); in fdt_overlay_add_node_by_phandle()
115 ut_assertnonnull(fdt_getprop(fdt, off, "new-property", NULL)); in fdt_overlay_add_node_by_phandle()
125 off = fdt_path_offset(fdt, "/new-node"); in fdt_overlay_add_node_by_path()
128 ut_assertnonnull(fdt_getprop(fdt, off, "new-property", NULL)); in fdt_overlay_add_node_by_path()
138 off = fdt_path_offset(fdt, "/test-node/sub-test-node"); in fdt_overlay_add_subnode_property()
141 ut_assertnonnull(fdt_getprop(fdt, off, "sub-test-property", NULL)); in fdt_overlay_add_subnode_property()
142 ut_assertnonnull(fdt_getprop(fdt, off, "new-sub-test-property", NULL)); in fdt_overlay_add_subnode_property()
154 off = fdt_path_offset(fdt, "/new-local-node"); in fdt_overlay_local_phandle()
157 local_phandle = fdt_get_phandle(fdt, off); in fdt_overlay_local_phandle()
160 ut_assertok(ut_fdt_getprop_u32_by_index(fdt, "/", "test-several-phandle", in fdt_overlay_local_phandle()
164 ut_assertok(ut_fdt_getprop_u32_by_index(fdt, "/", "test-several-phandle", in fdt_overlay_local_phandle()
178 off = fdt_path_offset(fdt, "/new-local-node"); in fdt_overlay_local_phandles()
181 local_phandle = fdt_get_phandle(fdt, off); in fdt_overlay_local_phandles()
184 off = fdt_path_offset(fdt, "/test-node"); in fdt_overlay_local_phandles()
187 test_phandle = fdt_get_phandle(fdt, off); in fdt_overlay_local_phandles()
190 ut_assertok(ut_fdt_getprop_u32_by_index(fdt, "/", "test-phandle", 0, in fdt_overlay_local_phandles()
194 ut_assertok(ut_fdt_getprop_u32_by_index(fdt, "/", "test-phandle", 1, in fdt_overlay_local_phandles()
206 ut_assertok(ut_fdt_getprop_u32(fdt, "/new-local-node", in fdt_overlay_stacked()
233 fdt = malloc(FDT_COPY_SIZE); in do_ut_overlay()
234 if (!fdt) in do_ut_overlay()
251 ut_assertok(fdt_open_into(fdt_base, fdt, FDT_COPY_SIZE)); in do_ut_overlay()
272 ut_assertok(fdt_overlay_apply(fdt, fdt_overlay_copy)); in do_ut_overlay()
275 ut_assertok(fdt_overlay_apply(fdt, fdt_overlay_stacked_copy)); in do_ut_overlay()
283 free(fdt); in do_ut_overlay()