return 0;
}
-int fdt_chosen(void *fdt, int force)
+int fdt_chosen(void *fdt)
{
int nodeoffset;
int err;
char *str; /* used to set string properties */
- const char *path;
err = fdt_check_header(fdt);
if (err < 0) {
if (nodeoffset < 0)
return nodeoffset;
- /*
- * Create /chosen properites that don't exist in the fdt.
- * If the property exists, update it only if the "force" parameter
- * is true.
- */
str = getenv("bootargs");
if (str != NULL) {
- path = fdt_getprop(fdt, nodeoffset, "bootargs", NULL);
- if ((path == NULL) || force) {
- err = fdt_setprop(fdt, nodeoffset,
- "bootargs", str, strlen(str)+1);
- if (err < 0)
- printf("WARNING: could not set bootargs %s.\n",
- fdt_strerror(err));
- }
+ err = fdt_setprop(fdt, nodeoffset,
+ "bootargs", str, strlen(str)+1);
+ if (err < 0)
+ printf("WARNING: could not set bootargs %s.\n",
+ fdt_strerror(err));
}
#ifdef CONFIG_OF_STDOUT_VIA_ALIAS
- path = fdt_getprop(fdt, nodeoffset, "linux,stdout-path", NULL);
- if ((path == NULL) || force)
- err = fdt_fixup_stdout(fdt, nodeoffset);
+ err = fdt_fixup_stdout(fdt, nodeoffset);
#endif
#ifdef OF_STDOUT_PATH
- path = fdt_getprop(fdt, nodeoffset, "linux,stdout-path", NULL);
- if ((path == NULL) || force) {
- err = fdt_setprop(fdt, nodeoffset,
- "linux,stdout-path", OF_STDOUT_PATH, strlen(OF_STDOUT_PATH)+1);
- if (err < 0)
- printf("WARNING: could not set linux,stdout-path %s.\n",
- fdt_strerror(err));
- }
+ err = fdt_setprop(fdt, nodeoffset, "linux,stdout-path",
+ OF_STDOUT_PATH, strlen(OF_STDOUT_PATH)+1);
+ if (err < 0)
+ printf("WARNING: could not set linux,stdout-path %s.\n",
+ fdt_strerror(err));
#endif
return err;
const char *prop, const u32 dflt);
u32 fdt_getprop_u32_default(const void *fdt, const char *path,
const char *prop, const u32 dflt);
-int fdt_chosen(void *fdt, int force);
+int fdt_chosen(void *fdt);
int fdt_initrd(void *fdt, ulong initrd_start, ulong initrd_end);
void do_fixup_by_path(void *fdt, const char *path, const char *prop,
const void *val, int len, int create);