return err;
}
- err = fdtdec_set_carveout(dst, node, "memory-region", 0, "framebuffer",
- NULL, 0, &fb);
+ err = fdtdec_set_carveout(dst, node, "memory-region", 0, &fb,
+ "framebuffer", NULL, 0);
if (err < 0) {
printf("failed to set carveout for %s: %d\n", node, err);
return err;
return err;
}
- err = fdtdec_set_carveout(dst, node, "memory-region", 0, "framebuffer",
- NULL, 0, &fb);
+ err = fdtdec_set_carveout(dst, node, "memory-region", 0, &fb,
+ "framebuffer", NULL, 0);
if (err < 0) {
printf("failed to set carveout for %s: %d\n", node, err);
return err;
return err;
}
- err = fdtdec_set_carveout(dst, node, "memory-region", 0, "framebuffer",
- NULL, 0, &fb);
+ err = fdtdec_set_carveout(dst, node, "memory-region", 0, &fb,
+ "framebuffer", NULL, 0);
if (err < 0) {
printf("failed to set carveout for %s: %d\n", node, err);
return err;
* @param prop_name name of the property in which to store the phandle of
* the carveout
* @param index index of the phandle to store
- * @param name base name of the reserved-memory node to create
* @param carveout information about the carveout to add
+ * @param name base name of the reserved-memory node to create
* @param compatibles compatible strings to set for the carveout
* @param count number of compatible strings
* @return 0 on success or a negative error code on failure
*/
int fdtdec_set_carveout(void *blob, const char *node, const char *prop_name,
- unsigned int index, const char *name,
- const char **compatibles, unsigned int count,
- const struct fdt_memory *carveout);
+ unsigned int index, const struct fdt_memory *carveout,
+ const char *name, const char **compatibles,
+ unsigned int count);
/**
* Set up the device tree ready for use
}
int fdtdec_set_carveout(void *blob, const char *node, const char *prop_name,
- unsigned int index, const char *name,
- const char **compatibles, unsigned int count,
- const struct fdt_memory *carveout)
+ unsigned int index, const struct fdt_memory *carveout,
+ const char *name, const char **compatibles,
+ unsigned int count)
{
uint32_t phandle;
int err, offset, len;
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", NULL, 0, &carveout);
+ return fdtdec_set_carveout(fdt, name, "memory-region", 0, &carveout,
+ "framebuffer", NULL, 0);
}
static int check_fdt_carveout(void *fdt, uint32_t address_cells,
resv.start = 0x1000;
resv.end = 0x2000;
- ut_assertok(fdtdec_set_carveout(blob, "/a-test",
- "memory-region", 2, "test_resv1",
- NULL, 0, &resv));
+ ut_assertok(fdtdec_set_carveout(blob, "/a-test", "memory-region", 2,
+ &resv, "test_resv1", NULL, 0));
resv.start = 0x10000;
resv.end = 0x20000;
- ut_assertok(fdtdec_set_carveout(blob, "/a-test",
- "memory-region", 1, "test_resv2",
- NULL, 0, &resv));
+ ut_assertok(fdtdec_set_carveout(blob, "/a-test", "memory-region", 1,
+ &resv, "test_resv2", NULL, 0));
resv.start = 0x100000;
resv.end = 0x200000;
- ut_assertok(fdtdec_set_carveout(blob, "/a-test",
- "memory-region", 0, "test_resv3",
- NULL, 0, &resv));
+ ut_assertok(fdtdec_set_carveout(blob, "/a-test", "memory-region", 0,
+ &resv, "test_resv3", NULL, 0));
offset = fdt_path_offset(blob, "/a-test");
ut_assert(offset > 0);