Merge branch '2018-11-25-master-imports'
[oweals/u-boot.git] / cmd / fdt.c
index b783b0df427c848ffd04f07662e27147fa6e2e22..84be26f4f1926f20df01a9d0bc490c74edac8732 100644 (file)
--- a/cmd/fdt.c
+++ b/cmd/fdt.c
@@ -1,11 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2007
  * Gerald Van Baren, Custom IDEAS, vanbaren@cideas.com
  * Based on code written by:
  *   Pantelis Antoniou <pantelis.antoniou@gmail.com> and
  *   Matthew McClintock <msm@freescale.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -13,7 +12,7 @@
 #include <linux/ctype.h>
 #include <linux/types.h>
 #include <asm/global_data.h>
-#include <libfdt.h>
+#include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <mapmem.h>
 #include <asm/io.h>
@@ -203,7 +202,7 @@ static int do_fdt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
                                fdt_strerror(err));
                        return 1;
                }
-               working_fdt = newaddr;
+               set_working_fdt_addr((ulong)newaddr);
 #ifdef CONFIG_OF_SYSTEM_SETUP
        /* Call the board-specific fixup routine */
        } else if (strncmp(argv[1], "sys", 3) == 0) {
@@ -597,6 +596,9 @@ static int do_fdt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
                               fdt_strerror(err));
                        return CMD_RET_FAILURE;
                }
+#ifdef CONFIG_SOC_KEYSTONE
+               ft_board_setup_ex(working_fdt, gd->bd);
+#endif
        }
 #endif
        /* Create a chosen node */