Fix the strange 2-space indentation that appears only in this one function.
This commit is contained in:
parent
9e9ea73715
commit
f5658746ab
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=262326
@ -250,39 +250,42 @@ fdt_load_dtb_addr(struct fdt_header *header)
|
|||||||
static int
|
static int
|
||||||
fdt_setup_fdtp()
|
fdt_setup_fdtp()
|
||||||
{
|
{
|
||||||
struct preloaded_file *bfp;
|
struct preloaded_file *bfp;
|
||||||
struct fdt_header *hdr;
|
struct fdt_header *hdr;
|
||||||
const char *s;
|
const char *s;
|
||||||
char *p;
|
char *p;
|
||||||
vm_offset_t va;
|
vm_offset_t va;
|
||||||
|
|
||||||
|
if ((bfp = file_findfile(NULL, "dtb")) != NULL) {
|
||||||
|
printf("Using DTB from loaded file.\n");
|
||||||
|
return fdt_load_dtb(bfp->f_addr);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fdt_to_load != NULL) {
|
||||||
|
printf("Using DTB from memory address 0x%08X.\n",
|
||||||
|
(unsigned int)fdt_to_load);
|
||||||
|
return fdt_load_dtb_addr(fdt_to_load);
|
||||||
|
}
|
||||||
|
|
||||||
if ((bfp = file_findfile(NULL, "dtb")) != NULL) {
|
/* Board vendors use both fdtaddr and fdt_addr. Grrrr. */
|
||||||
printf("Using DTB from loaded file.\n");
|
s = ub_env_get("fdtaddr");
|
||||||
return fdt_load_dtb(bfp->f_addr);
|
if (s == NULL)
|
||||||
}
|
s = ub_env_get("fdt_addr");
|
||||||
|
if (s != NULL && *s != '\0') {
|
||||||
if (fdt_to_load != NULL) {
|
hdr = (struct fdt_header *)strtoul(s, &p, 16);
|
||||||
printf("Using DTB from memory address 0x%08X.\n",
|
if (*p == '\0') {
|
||||||
(unsigned int)fdt_to_load);
|
printf("Using DTB provided by U-Boot.\n");
|
||||||
return fdt_load_dtb_addr(fdt_to_load);
|
return fdt_load_dtb_addr(hdr);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
s = ub_env_get("fdtaddr");
|
|
||||||
if (s != NULL && *s != '\0') {
|
if ((va = fdt_find_static_dtb()) != 0) {
|
||||||
hdr = (struct fdt_header *)strtoul(s, &p, 16);
|
printf("Using DTB compiled into kernel.\n");
|
||||||
if (*p == '\0') {
|
return (fdt_load_dtb(va));
|
||||||
printf("Using DTB provided by U-Boot.\n");
|
}
|
||||||
return fdt_load_dtb_addr(hdr);
|
|
||||||
}
|
command_errmsg = "no device tree blob found!";
|
||||||
}
|
return (1);
|
||||||
|
|
||||||
if ((va = fdt_find_static_dtb()) != 0) {
|
|
||||||
printf("Using DTB compiled into kernel.\n");
|
|
||||||
return (fdt_load_dtb(va));
|
|
||||||
}
|
|
||||||
|
|
||||||
command_errmsg = "no device tree blob found!";
|
|
||||||
return (1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define fdt_strtovect(str, cellbuf, lim, cellsize) _fdt_strtovect((str), \
|
#define fdt_strtovect(str, cellbuf, lim, cellsize) _fdt_strtovect((str), \
|
||||||
|
Loading…
Reference in New Issue
Block a user