powerpc: Update in-kernel dtc and libfdt to version 1.2.0
Some time ago, a copies of the upstream dtc and libfdt sources were included in the kernel tree to avoid having these as external dependencies for building the kernel. Since then development on the upstream dtc and libfdt has continued. This updates the in-kernel versions to match the recently released upstream dtc version 1.2.0. This includes a number of bugfixes, many cleanups and a few new features. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
committed by
Paul Mackerras
parent
0ec27c049d
commit
ed95d7450d
@@ -23,20 +23,23 @@
|
||||
|
||||
extern FILE *yyin;
|
||||
extern int yyparse(void);
|
||||
extern void yyerror(char const *);
|
||||
|
||||
struct boot_info *the_boot_info;
|
||||
int treesource_error;
|
||||
|
||||
struct boot_info *dt_from_source(const char *fname)
|
||||
{
|
||||
the_boot_info = NULL;
|
||||
treesource_error = 0;
|
||||
|
||||
push_input_file(fname);
|
||||
srcpos_file = dtc_open_file(fname, NULL);
|
||||
yyin = srcpos_file->file;
|
||||
|
||||
if (yyparse() != 0)
|
||||
return NULL;
|
||||
die("Unable to parse input tree\n");
|
||||
|
||||
fill_fullpaths(the_boot_info->dt, "");
|
||||
if (treesource_error)
|
||||
die("Syntax error parsing input tree\n");
|
||||
|
||||
return the_boot_info;
|
||||
}
|
||||
@@ -144,7 +147,7 @@ static void write_propval_cells(FILE *f, struct data val)
|
||||
m = m->next;
|
||||
}
|
||||
|
||||
fprintf(f, "0x%x", be32_to_cpu(*cp++));
|
||||
fprintf(f, "0x%x", fdt32_to_cpu(*cp++));
|
||||
if ((void *)cp >= propend)
|
||||
break;
|
||||
fprintf(f, " ");
|
||||
@@ -173,7 +176,7 @@ static void write_propval_bytes(FILE *f, struct data val)
|
||||
}
|
||||
|
||||
fprintf(f, "%02hhx", *bp++);
|
||||
if ((void *)bp >= propend)
|
||||
if ((const void *)bp >= propend)
|
||||
break;
|
||||
fprintf(f, " ");
|
||||
}
|
||||
|
Reference in New Issue
Block a user