From: Simon Glass Date: Sat, 28 Dec 2019 17:44:54 +0000 (-0700) Subject: common: Move device-tree setup functions to fdt_support.h X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=7fefef5078d427e5b9e22e19352d492029cea6f2;p=u-boot.git common: Move device-tree setup functions to fdt_support.h 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 --- diff --git a/arch/riscv/lib/bootm.c b/arch/riscv/lib/bootm.c index e96137a50c..d1d1573c62 100644 --- a/arch/riscv/lib/bootm.c +++ b/arch/riscv/lib/bootm.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/board/esd/vme8349/vme8349.c b/board/esd/vme8349/vme8349.c index 4c220fa8e1..49d085acf9 100644 --- a/board/esd/vme8349/vme8349.c +++ b/board/esd/vme8349/vme8349.c @@ -12,6 +12,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/b4860qds/b4860qds.c b/board/freescale/b4860qds/b4860qds.c index 45650b4f08..e7f684bfb3 100644 --- a/board/freescale/b4860qds/b4860qds.c +++ b/board/freescale/b4860qds/b4860qds.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/corenet_ds/corenet_ds.c b/board/freescale/corenet_ds/corenet_ds.c index c2fa60e321..66eea32e07 100644 --- a/board/freescale/corenet_ds/corenet_ds.c +++ b/board/freescale/corenet_ds/corenet_ds.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/ls1012afrdm/ls1012afrdm.c b/board/freescale/ls1012afrdm/ls1012afrdm.c index 31e41ce169..d138c9384e 100644 --- a/board/freescale/ls1012afrdm/ls1012afrdm.c +++ b/board/freescale/ls1012afrdm/ls1012afrdm.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/ls1012ardb/ls1012ardb.c b/board/freescale/ls1012ardb/ls1012ardb.c index e4527c19b8..90c1824e46 100644 --- a/board/freescale/ls1012ardb/ls1012ardb.c +++ b/board/freescale/ls1012ardb/ls1012ardb.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/ls1021aiot/ls1021aiot.c b/board/freescale/ls1021aiot/ls1021aiot.c index eda5cc7a9e..8de13c88f6 100644 --- a/board/freescale/ls1021aiot/ls1021aiot.c +++ b/board/freescale/ls1021aiot/ls1021aiot.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/ls1021aqds/ls1021aqds.c b/board/freescale/ls1021aqds/ls1021aqds.c index 3efdbe9a69..377f4b7bce 100644 --- a/board/freescale/ls1021aqds/ls1021aqds.c +++ b/board/freescale/ls1021aqds/ls1021aqds.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/ls1021atsn/ls1021atsn.c b/board/freescale/ls1021atsn/ls1021atsn.c index 8039fd55f4..532ca89d94 100644 --- a/board/freescale/ls1021atsn/ls1021atsn.c +++ b/board/freescale/ls1021atsn/ls1021atsn.c @@ -2,6 +2,7 @@ /* Copyright 2016-2019 NXP Semiconductors */ #include +#include #include #include #include diff --git a/board/freescale/ls1021atwr/ls1021atwr.c b/board/freescale/ls1021atwr/ls1021atwr.c index c4ff6775c3..3f09c5150c 100644 --- a/board/freescale/ls1021atwr/ls1021atwr.c +++ b/board/freescale/ls1021atwr/ls1021atwr.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/mpc8313erdb/mpc8313erdb.c b/board/freescale/mpc8313erdb/mpc8313erdb.c index 55a3529296..1445d29bad 100644 --- a/board/freescale/mpc8313erdb/mpc8313erdb.c +++ b/board/freescale/mpc8313erdb/mpc8313erdb.c @@ -6,6 +6,7 @@ */ #include +#include #include #if defined(CONFIG_OF_LIBFDT) #include diff --git a/board/freescale/mpc8323erdb/mpc8323erdb.c b/board/freescale/mpc8323erdb/mpc8323erdb.c index 6c47cb2b38..e513d0bfd5 100644 --- a/board/freescale/mpc8323erdb/mpc8323erdb.c +++ b/board/freescale/mpc8323erdb/mpc8323erdb.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/mpc832xemds/mpc832xemds.c b/board/freescale/mpc832xemds/mpc832xemds.c index c9f2ac44a6..d4922fe1e1 100644 --- a/board/freescale/mpc832xemds/mpc832xemds.c +++ b/board/freescale/mpc832xemds/mpc832xemds.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/mpc8349emds/mpc8349emds.c b/board/freescale/mpc8349emds/mpc8349emds.c index 913b5843e9..0996b87c0f 100644 --- a/board/freescale/mpc8349emds/mpc8349emds.c +++ b/board/freescale/mpc8349emds/mpc8349emds.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/mpc8349itx/mpc8349itx.c b/board/freescale/mpc8349itx/mpc8349itx.c index 81b3f00b56..a2e284f1a2 100644 --- a/board/freescale/mpc8349itx/mpc8349itx.c +++ b/board/freescale/mpc8349itx/mpc8349itx.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/p2041rdb/p2041rdb.c b/board/freescale/p2041rdb/p2041rdb.c index 78f89fc4cb..95ed0ef429 100644 --- a/board/freescale/p2041rdb/p2041rdb.c +++ b/board/freescale/p2041rdb/p2041rdb.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/t102xqds/t102xqds.c b/board/freescale/t102xqds/t102xqds.c index 85f8517d79..e42337e47a 100644 --- a/board/freescale/t102xqds/t102xqds.c +++ b/board/freescale/t102xqds/t102xqds.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/t102xrdb/t102xrdb.c b/board/freescale/t102xrdb/t102xrdb.c index ab07c1f8dd..eee09a5701 100644 --- a/board/freescale/t102xrdb/t102xrdb.c +++ b/board/freescale/t102xrdb/t102xrdb.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/t1040qds/t1040qds.c b/board/freescale/t1040qds/t1040qds.c index 61dedf4c06..92dd9237ec 100644 --- a/board/freescale/t1040qds/t1040qds.c +++ b/board/freescale/t1040qds/t1040qds.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/t104xrdb/t104xrdb.c b/board/freescale/t104xrdb/t104xrdb.c index 7dacd0c5f1..dc3b59d26f 100644 --- a/board/freescale/t104xrdb/t104xrdb.c +++ b/board/freescale/t104xrdb/t104xrdb.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/t208xqds/t208xqds.c b/board/freescale/t208xqds/t208xqds.c index 6c34db4219..79cc1543f9 100644 --- a/board/freescale/t208xqds/t208xqds.c +++ b/board/freescale/t208xqds/t208xqds.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/t208xrdb/t208xrdb.c b/board/freescale/t208xrdb/t208xrdb.c index 3ac61f009c..b5c20112d0 100644 --- a/board/freescale/t208xrdb/t208xrdb.c +++ b/board/freescale/t208xrdb/t208xrdb.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/t4qds/t4240emu.c b/board/freescale/t4qds/t4240emu.c index da050bf800..104b40a110 100644 --- a/board/freescale/t4qds/t4240emu.c +++ b/board/freescale/t4qds/t4240emu.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/t4qds/t4240qds.c b/board/freescale/t4qds/t4240qds.c index 11f7489fa2..5608774afd 100644 --- a/board/freescale/t4qds/t4240qds.c +++ b/board/freescale/t4qds/t4240qds.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/t4rdb/t4240rdb.c b/board/freescale/t4rdb/t4240rdb.c index 48aa6b6822..8015666ecc 100644 --- a/board/freescale/t4rdb/t4240rdb.c +++ b/board/freescale/t4rdb/t4240rdb.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/hisilicon/hikey/hikey.c b/board/hisilicon/hikey/hikey.c index 940ae82c45..28f5cf7fc4 100644 --- a/board/hisilicon/hikey/hikey.c +++ b/board/hisilicon/hikey/hikey.c @@ -5,6 +5,7 @@ */ #include #include +#include #include #include #include diff --git a/board/ids/ids8313/ids8313.c b/board/ids/ids8313/ids8313.c index caa36064f0..2b6e4df86f 100644 --- a/board/ids/ids8313/ids8313.c +++ b/board/ids/ids8313/ids8313.c @@ -12,6 +12,7 @@ */ #include +#include #include #include #include diff --git a/board/keymile/km83xx/km83xx.c b/board/keymile/km83xx/km83xx.c index feca7be372..23bbdcccac 100644 --- a/board/keymile/km83xx/km83xx.c +++ b/board/keymile/km83xx/km83xx.c @@ -15,6 +15,7 @@ #include #include +#include #include #include #include diff --git a/board/keymile/kmp204x/kmp204x.c b/board/keymile/kmp204x/kmp204x.c index 9e1956c8b7..cfb23a53f7 100644 --- a/board/keymile/kmp204x/kmp204x.c +++ b/board/keymile/kmp204x/kmp204x.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/board/sbc8349/sbc8349.c b/board/sbc8349/sbc8349.c index a647de6b11..9051392cd0 100644 --- a/board/sbc8349/sbc8349.c +++ b/board/sbc8349/sbc8349.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c index d12f1ebfdf..36f86926bc 100644 --- a/board/ti/am43xx/board.c +++ b/board/ti/am43xx/board.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c index c755821b74..c57473c802 100644 --- a/board/ti/am57xx/board.c +++ b/board/ti/am57xx/board.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c index 79b8363b86..94001a4dc3 100644 --- a/board/ti/dra7xx/evm.c +++ b/board/ti/dra7xx/evm.c @@ -11,6 +11,7 @@ */ #include #include +#include #include #include #include diff --git a/board/tqc/tqm834x/tqm834x.c b/board/tqc/tqm834x/tqm834x.c index 04941b26be..95f95a5c82 100644 --- a/board/tqc/tqm834x/tqm834x.c +++ b/board/tqc/tqm834x/tqm834x.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/varisys/cyrus/cyrus.c b/board/varisys/cyrus/cyrus.c index 0515ebbad2..13429072c7 100644 --- a/board/varisys/cyrus/cyrus.c +++ b/board/varisys/cyrus/cyrus.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/ve8313/ve8313.c b/board/ve8313/ve8313.c index 781a07f1d8..2ea762ccfa 100644 --- a/board/ve8313/ve8313.c +++ b/board/ve8313/ve8313.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include diff --git a/include/common.h b/include/common.h index 4ee14f78d0..463eeb5d43 100644 --- a/include/common.h +++ b/include/common.h @@ -59,16 +59,6 @@ void hang (void) __attribute__ ((noreturn)); #include -/** - * 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); diff --git a/include/fdt_support.h b/include/fdt_support.h index 3f4bc643d4..ba14acd7f6 100644 --- a/include/fdt_support.h +++ b/include/fdt_support.h @@ -12,6 +12,20 @@ #include #include +/** + * 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,