common: Move device-tree setup functions to fdt_support.h
authorSimon Glass <sjg@chromium.org>
Sat, 28 Dec 2019 17:44:54 +0000 (10:44 -0700)
committerJagan Teki <jagan@amarulasolutions.com>
Fri, 24 Jan 2020 17:36:48 +0000 (23:06 +0530)
These functions relate to setting up the device tree for booting the OS.
The fdt_support.h header file supports similar functions, so move these
there.

Signed-off-by: Simon Glass <sjg@chromium.org>
38 files changed:
arch/riscv/lib/bootm.c
board/esd/vme8349/vme8349.c
board/freescale/b4860qds/b4860qds.c
board/freescale/corenet_ds/corenet_ds.c
board/freescale/ls1012afrdm/ls1012afrdm.c
board/freescale/ls1012ardb/ls1012ardb.c
board/freescale/ls1021aiot/ls1021aiot.c
board/freescale/ls1021aqds/ls1021aqds.c
board/freescale/ls1021atsn/ls1021atsn.c
board/freescale/ls1021atwr/ls1021atwr.c
board/freescale/mpc8313erdb/mpc8313erdb.c
board/freescale/mpc8323erdb/mpc8323erdb.c
board/freescale/mpc832xemds/mpc832xemds.c
board/freescale/mpc8349emds/mpc8349emds.c
board/freescale/mpc8349itx/mpc8349itx.c
board/freescale/p2041rdb/p2041rdb.c
board/freescale/t102xqds/t102xqds.c
board/freescale/t102xrdb/t102xrdb.c
board/freescale/t1040qds/t1040qds.c
board/freescale/t104xrdb/t104xrdb.c
board/freescale/t208xqds/t208xqds.c
board/freescale/t208xrdb/t208xrdb.c
board/freescale/t4qds/t4240emu.c
board/freescale/t4qds/t4240qds.c
board/freescale/t4rdb/t4240rdb.c
board/hisilicon/hikey/hikey.c
board/ids/ids8313/ids8313.c
board/keymile/km83xx/km83xx.c
board/keymile/kmp204x/kmp204x.c
board/sbc8349/sbc8349.c
board/ti/am43xx/board.c
board/ti/am57xx/board.c
board/ti/dra7xx/evm.c
board/tqc/tqm834x/tqm834x.c
board/varisys/cyrus/cyrus.c
board/ve8313/ve8313.c
include/common.h
include/fdt_support.h

index e96137a..d1d1573 100644 (file)
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <command.h>
 #include <dm.h>
+#include <fdt_support.h>
 #include <dm/root.h>
 #include <image.h>
 #include <asm/byteorder.h>
index 4c220fa..49d085a 100644 (file)
@@ -12,6 +12,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <ioports.h>
 #include <mpc83xx.h>
 #include <asm/mpc8349_pci.h>
index 45650b4..e7f684b 100644 (file)
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <fdt_support.h>
 #include <i2c.h>
 #include <init.h>
 #include <irq_func.h>
index c2fa60e..66eea32 100644 (file)
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <fdt_support.h>
 #include <init.h>
 #include <netdev.h>
 #include <linux/compiler.h>
index 31e41ce..d138c93 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <i2c.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
index e4527c1..90c1824 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <i2c.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
index eda5cc7..8de13c8 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <init.h>
 #include <asm/arch/immap_ls102xa.h>
 #include <asm/arch/clock.h>
index 3efdbe9..377f4b7 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <i2c.h>
 #include <init.h>
 #include <asm/io.h>
index 8039fd5..532ca89 100644 (file)
@@ -2,6 +2,7 @@
 /* Copyright 2016-2019 NXP Semiconductors
  */
 #include <common.h>
+#include <fdt_support.h>
 #include <init.h>
 #include <asm/arch-ls102xa/ls102xa_soc.h>
 #include <asm/arch/ls102xa_devdis.h>
index c4ff677..3f09c51 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <i2c.h>
 #include <init.h>
 #include <asm/io.h>
index 55a3529..1445d29 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <init.h>
 #if defined(CONFIG_OF_LIBFDT)
 #include <linux/libfdt.h>
index 6c47cb2..e513d0b 100644 (file)
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <eeprom.h>
 #include <env.h>
+#include <fdt_support.h>
 #include <init.h>
 #include <ioports.h>
 #include <mpc83xx.h>
index c9f2ac4..d4922fe 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <init.h>
 #include <ioports.h>
 #include <mpc83xx.h>
index 913b584..0996b87 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <ioports.h>
 #include <mpc83xx.h>
 #include <asm/mpc8349_pci.h>
index 81b3f00..a2e284f 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <ioports.h>
 #include <mpc83xx.h>
 #include <i2c.h>
index 78f89fc..95ed0ef 100644 (file)
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <fdt_support.h>
 #include <init.h>
 #include <netdev.h>
 #include <linux/compiler.h>
index 85f8517..e42337e 100644 (file)
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <fdt_support.h>
 #include <i2c.h>
 #include <init.h>
 #include <netdev.h>
index ab07c1f..eee09a5 100644 (file)
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <fdt_support.h>
 #include <i2c.h>
 #include <init.h>
 #include <netdev.h>
index 61dedf4..92dd923 100644 (file)
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <fdt_support.h>
 #include <i2c.h>
 #include <init.h>
 #include <netdev.h>
index 7dacd0c..dc3b59d 100644 (file)
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <fdt_support.h>
 #include <hwconfig.h>
 #include <init.h>
 #include <netdev.h>
index 6c34db4..79cc154 100644 (file)
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <fdt_support.h>
 #include <i2c.h>
 #include <init.h>
 #include <netdev.h>
index 3ac61f0..b5c2011 100644 (file)
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <fdt_support.h>
 #include <i2c.h>
 #include <init.h>
 #include <netdev.h>
index da050bf..104b40a 100644 (file)
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <fdt_support.h>
 #include <i2c.h>
 #include <init.h>
 #include <netdev.h>
index 11f7489..5608774 100644 (file)
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <fdt_support.h>
 #include <i2c.h>
 #include <init.h>
 #include <irq_func.h>
index 48aa6b6..8015666 100644 (file)
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <fdt_support.h>
 #include <i2c.h>
 #include <init.h>
 #include <netdev.h>
index 940ae82..28f5cf7 100644 (file)
@@ -5,6 +5,7 @@
  */
 #include <common.h>
 #include <dm.h>
+#include <fdt_support.h>
 #include <dm/platform_data/serial_pl01x.h>
 #include <errno.h>
 #include <malloc.h>
index caa3606..2b6e4df 100644 (file)
@@ -12,6 +12,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <mpc83xx.h>
 #include <spi.h>
 #include <linux/libfdt.h>
index feca7be..23bbdcc 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <fdt_support.h>
 #include <init.h>
 #include <ioports.h>
 #include <mpc83xx.h>
index 9e1956c..cfb23a5 100644 (file)
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <fdt_support.h>
 #include <init.h>
 #include <netdev.h>
 #include <linux/compiler.h>
index a647de6..9051392 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <ioports.h>
 #include <mpc83xx.h>
 #include <asm/mpc8349_pci.h>
index d12f1eb..36f8692 100644 (file)
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <eeprom.h>
 #include <env.h>
+#include <fdt_support.h>
 #include <i2c.h>
 #include <init.h>
 #include <linux/errno.h>
index c755821..c57473c 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <fdt_support.h>
 #include <init.h>
 #include <palmas.h>
 #include <sata.h>
index 79b8363..94001a4 100644 (file)
@@ -11,6 +11,7 @@
  */
 #include <common.h>
 #include <env.h>
+#include <fdt_support.h>
 #include <init.h>
 #include <palmas.h>
 #include <sata.h>
index 04941b2..95f95a5 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <ioports.h>
 #include <mpc83xx.h>
 #include <asm/mpc8349_pci.h>
index 0515ebb..1342907 100644 (file)
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <fdt_support.h>
 #include <init.h>
 #include <netdev.h>
 #include <linux/compiler.h>
index 781a07f..2ea762c 100644 (file)
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <init.h>
 #include <linux/libfdt.h>
 #include <pci.h>
index 4ee14f7..463eeb5 100644 (file)
@@ -59,16 +59,6 @@ void hang            (void) __attribute__ ((noreturn));
 
 #include <display_options.h>
 
-/**
- * arch_fixup_fdt() - Write arch-specific information to fdt
- *
- * Defined in arch/$(ARCH)/lib/bootm-fdt.c
- *
- * @blob:      FDT blob to write to
- * @return 0 if ok, or -ve FDT_ERR_... on failure
- */
-int arch_fixup_fdt(void *blob);
-
 /* common/cmd_source.c */
 int    source (ulong addr, const char *fit_uname);
 
@@ -90,8 +80,6 @@ void  upmconfig     (unsigned int, unsigned int *, unsigned int);
 ulong  get_tbclk     (void);
 void   reset_misc    (void);
 void   reset_cpu     (ulong addr);
-void ft_cpu_setup(void *blob, bd_t *bd);
-void ft_pci_setup(void *blob, bd_t *bd);
 
 /* $(CPU)/speed.c */
 int    get_clocks (void);
index 3f4bc64..ba14acd 100644 (file)
 #include <asm/u-boot.h>
 #include <linux/libfdt.h>
 
+/**
+ * arch_fixup_fdt() - Write arch-specific information to fdt
+ *
+ * Defined in arch/$(ARCH)/lib/bootm-fdt.c
+ *
+ * @blob:      FDT blob to write to
+ * @return 0 if ok, or -ve FDT_ERR_... on failure
+ */
+int arch_fixup_fdt(void *blob);
+
+void ft_cpu_setup(void *blob, bd_t *bd);
+
+void ft_pci_setup(void *blob, bd_t *bd);
+
 u32 fdt_getprop_u32_default_node(const void *fdt, int off, int cell,
                                const char *prop, const u32 dflt);
 u32 fdt_getprop_u32_default(const void *fdt, const char *path,