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)
committerTom Rini <trini@konsulko.com>
Fri, 17 Jan 2020 18:27:27 +0000 (13:27 -0500)
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 e96137a50cb124657381fb12c18f14642920781c..d1d1573c622c9241b05dd116849a6ab4b5809e84 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 4c220fa8e1353cc485e1f5a48c03d24db17b2647..49d085acf981e640ccfaa2aa8399a9a7cca90e63 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 45650b4f088d74909bf229ba41174903dbe80ffc..e7f684bfb3a4da03887a386689ce68d60c892f0a 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 c2fa60e321b0d0ec1c6c13920dcf3695f4317563..66eea32e0779c78bf72527bc908e1a8eb6c0fd71 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 31e41ce169679c3b6023f0939a11b4ec1c1bd215..d138c9384eb0b156e8bf6d7f10a1132875ddb1ab 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 e4527c19b88af522e9af950977bd1bf3bc4b63bb..90c1824e467e98f4b10e8c5bce7576fb4b7dc295 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 eda5cc7a9edf86816042f944dadb78aa2269adb0..8de13c88f645bc9776e6a8b31b2f775100823257 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 3efdbe9a690a163c2f356e462b5f0b10ff39ea1a..377f4b7bce02a90062dae68d61b7062025ec0d5e 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <i2c.h>
 #include <init.h>
 #include <asm/io.h>
index 8039fd55f47394d2b879a387b08c86af0b018820..532ca89d9452e7f9c8d9c93469469e98df28ac3d 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 c4ff6775c3b0a3218414c12232344e6434d4c9b7..3f09c5150c6262a51d9d3663e44bbd1bd2955e6e 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <i2c.h>
 #include <init.h>
 #include <asm/io.h>
index 55a3529296d580e764d70c9f50a22b8c41d69c14..1445d29bad2cb5528a274379ada3ec13842af081 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 6c47cb2b3835314f4eeecbc6470e6daedee65184..e513d0bfd533dd80e23856bc5ae0c64099ad6489 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 c9f2ac44a6243db087d8bab30032ca95ee747c45..d4922fe1e123f372dd00e9bfc059d9d84258e1cb 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <init.h>
 #include <ioports.h>
 #include <mpc83xx.h>
index 913b5843e9518ad457f53fc361a64a68c606e329..0996b87c0fc88fbe19cfffc74975b13a079901bd 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 81b3f00b56e8cfdb4e384cfe33a9cbd86733ffe2..a2e284f1a229a8696fd25c981af130448bc70d41 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <ioports.h>
 #include <mpc83xx.h>
 #include <i2c.h>
index 78f89fc4cb713303854e5059a1a5ff83f33373c8..95ed0ef429eb570b60edcc13919c46eacaadcc7e 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 85f8517d79823f98a3b7e4ab2ee8d1d1eff2414b..e42337e47a4570d98b0b98c0c4969c8442bfb539 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 ab07c1f8ddb23d44f805cfea1b1cb0801a6a0b21..eee09a57019e1780f6a7397f484555bde2c121b7 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 61dedf4c06c5404a4a1ea85ef610df8881de855d..92dd9237ec7f884e368fe03309c57b1de202af0c 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 7dacd0c5f1f829995ba31dd9b08d90669a1197c1..dc3b59d26f9d10b967dacb92968153d5d8db5818 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 6c34db421998cd4ebf22ba3dd8aca3712a8b52a2..79cc1543f95a337225da20d9f4e3a3bdd8e57edf 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 3ac61f009c90acf01333173d77cc5bf7433dcb0f..b5c20112d0e5b2d40b64ef92ac0222974fec2520 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 da050bf800f2b35cb4d5e877d29fdebf40a13d45..104b40a110969dfc9006ff61ae92e157dce37cb1 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 11f7489fa21840f3fcfc07f7a4bb8b2443316180..5608774afd19e3194808179d0c8494da5af235be 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 48aa6b6822e9faa44654891e46d6485954c4d14f..8015666eccd93a9e3852fa718992e62f0c102d84 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 940ae82c45bc8b7352c9eb6b17a00a96050e5099..28f5cf7fc4c5bd2fcd93942baa33fc33542b898f 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 caa36064f053b467d2fe239edc64419aa0920802..2b6e4df86f298d1be48251ca06556aa2a065c533 100644 (file)
@@ -12,6 +12,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <mpc83xx.h>
 #include <spi.h>
 #include <linux/libfdt.h>
index feca7be37276701013cb6abd88db1056eabf2522..23bbdcccacf796736d83195b06294ae83294b63d 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 9e1956c8b7ffba834e6e326edcd390f1302554f9..cfb23a53f7458275f5cc829bc90a0c3d809d8063 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 a647de6b11217b0b05aa6b2741566b19df8c4215..9051392cd09f12c5f483bba4c970d8c060a96c99 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 d12f1ebfdf9534e1852fe4ed9cabfa8d848b7289..36f86926bc31345a09fc263288c15e9ed6a4d7fb 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 c755821b74f9d55abc00a32754c84212b08d0ad1..c57473c80245c69daf8dcd2da86fb7d8f89150d4 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 79b8363b868a931f70d974a16b25fab02783d517..94001a4dc39c534602dce69d15ecb95dad7b5a25 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 04941b26be457ceb08ae19827e15c000a9eb686d..95f95a5c8201358880c3a2b87dd69fb329f38eac 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 0515ebbad243da48a6ab8c4bba2cb4d2598be73d..13429072c79b0ff53148c41e3028cd9296bcc2be 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 781a07f1d8384c542589d21df1a631fe02e06a08..2ea762ccfa4a17e21efa9c3c94eff690276f7700 100644 (file)
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <init.h>
 #include <linux/libfdt.h>
 #include <pci.h>
index 4ee14f78d0ab5a3dc4aaf59411ee3432301f8aff..463eeb5d43f0121af836cefce2d558551bb5d98a 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 3f4bc643d4453b394523a082c5dea65b118c162f..ba14acd7f622b75de4cb4dadce6540e993c36d38 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,