]> git.ipfire.org Git - thirdparty/u-boot.git/blobdiff - lib/fdtdec_test.c
initcall: break loop immediately on failure
[thirdparty/u-boot.git] / lib / fdtdec_test.c
index e8bfd1fb1ec3c2bdeda6f2e588cfdbf6b525196f..1e4d5fc8326433fbdc0f3f31da32ca8918b34871 100644 (file)
@@ -6,7 +6,7 @@
  * Copyright (c) 2011 The Chromium OS Authors.
  */
 
-#include <common.h>
+#include <command.h>
 #include <fdtdec.h>
 #include <linux/libfdt.h>
 #include <malloc.h>
@@ -188,8 +188,8 @@ static int make_fdt_carveout_device(void *fdt, uint32_t na, uint32_t ns)
        offset = CHECK(fdt_add_subnode(fdt, 0, name + 1));
        CHECK(fdt_setprop(fdt, offset, "reg", cells, (na + ns) * sizeof(*cells)));
 
-       return fdtdec_set_carveout(fdt, name, "memory-region", 0,
-                                  "framebuffer", &carveout);
+       return fdtdec_set_carveout(fdt, name, "memory-region", 0, &carveout,
+                                  "framebuffer", NULL, 0, 0);
 }
 
 static int check_fdt_carveout(void *fdt, uint32_t address_cells,
@@ -213,7 +213,8 @@ static int check_fdt_carveout(void *fdt, uint32_t address_cells,
        printf("carveout: %pap-%pap na=%u ns=%u: ", &expected.start,
               &expected.end, address_cells, size_cells);
 
-       CHECK(fdtdec_get_carveout(fdt, name, "memory-region", 0, &carveout));
+       CHECK(fdtdec_get_carveout(fdt, name, "memory-region", 0, &carveout,
+                                 NULL, NULL, NULL, NULL));
 
        if ((carveout.start != expected.start) ||
            (carveout.end != expected.end)) {
@@ -297,8 +298,8 @@ static int check_carveout(void)
        return 0;
 }
 
-static int do_test_fdtdec(cmd_tbl_t *cmdtp, int flag, int argc,
-                         char * const argv[])
+static int do_test_fdtdec(struct cmd_tbl *cmdtp, int flag, int argc,
+                         char *const argv[])
 {
        /* basic tests */
        CHECKOK(run_test("", "", ""));