Explorar o código

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 <sjg@chromium.org>
Simon Glass %!s(int64=4) %!d(string=hai) anos
pai
achega
807765b067
Modificáronse 38 ficheiros con 50 adicións e 12 borrados
  1. 1 0
      arch/riscv/lib/bootm.c
  2. 1 0
      board/esd/vme8349/vme8349.c
  3. 1 0
      board/freescale/b4860qds/b4860qds.c
  4. 1 0
      board/freescale/corenet_ds/corenet_ds.c
  5. 1 0
      board/freescale/ls1012afrdm/ls1012afrdm.c
  6. 1 0
      board/freescale/ls1012ardb/ls1012ardb.c
  7. 1 0
      board/freescale/ls1021aiot/ls1021aiot.c
  8. 1 0
      board/freescale/ls1021aqds/ls1021aqds.c
  9. 1 0
      board/freescale/ls1021atsn/ls1021atsn.c
  10. 1 0
      board/freescale/ls1021atwr/ls1021atwr.c
  11. 1 0
      board/freescale/mpc8313erdb/mpc8313erdb.c
  12. 1 0
      board/freescale/mpc8323erdb/mpc8323erdb.c
  13. 1 0
      board/freescale/mpc832xemds/mpc832xemds.c
  14. 1 0
      board/freescale/mpc8349emds/mpc8349emds.c
  15. 1 0
      board/freescale/mpc8349itx/mpc8349itx.c
  16. 1 0
      board/freescale/p2041rdb/p2041rdb.c
  17. 1 0
      board/freescale/t102xqds/t102xqds.c
  18. 1 0
      board/freescale/t102xrdb/t102xrdb.c
  19. 1 0
      board/freescale/t1040qds/t1040qds.c
  20. 1 0
      board/freescale/t104xrdb/t104xrdb.c
  21. 1 0
      board/freescale/t208xqds/t208xqds.c
  22. 1 0
      board/freescale/t208xrdb/t208xrdb.c
  23. 1 0
      board/freescale/t4qds/t4240emu.c
  24. 1 0
      board/freescale/t4qds/t4240qds.c
  25. 1 0
      board/freescale/t4rdb/t4240rdb.c
  26. 1 0
      board/hisilicon/hikey/hikey.c
  27. 1 0
      board/ids/ids8313/ids8313.c
  28. 1 0
      board/keymile/km83xx/km83xx.c
  29. 1 0
      board/keymile/kmp204x/kmp204x.c
  30. 1 0
      board/sbc8349/sbc8349.c
  31. 1 0
      board/ti/am43xx/board.c
  32. 1 0
      board/ti/am57xx/board.c
  33. 1 0
      board/ti/dra7xx/evm.c
  34. 1 0
      board/tqc/tqm834x/tqm834x.c
  35. 1 0
      board/varisys/cyrus/cyrus.c
  36. 1 0
      board/ve8313/ve8313.c
  37. 0 12
      include/common.h
  38. 14 0
      include/fdt_support.h

+ 1 - 0
arch/riscv/lib/bootm.c

@@ -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>

+ 1 - 0
board/esd/vme8349/vme8349.c

@@ -12,6 +12,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <ioports.h>
 #include <mpc83xx.h>
 #include <asm/mpc8349_pci.h>

+ 1 - 0
board/freescale/b4860qds/b4860qds.c

@@ -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>

+ 1 - 0
board/freescale/corenet_ds/corenet_ds.c

@@ -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>

+ 1 - 0
board/freescale/ls1012afrdm/ls1012afrdm.c

@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <i2c.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>

+ 1 - 0
board/freescale/ls1012ardb/ls1012ardb.c

@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <i2c.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>

+ 1 - 0
board/freescale/ls1021aiot/ls1021aiot.c

@@ -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>

+ 1 - 0
board/freescale/ls1021aqds/ls1021aqds.c

@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <i2c.h>
 #include <init.h>
 #include <asm/io.h>

+ 1 - 0
board/freescale/ls1021atsn/ls1021atsn.c

@@ -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>

+ 1 - 0
board/freescale/ls1021atwr/ls1021atwr.c

@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <i2c.h>
 #include <init.h>
 #include <asm/io.h>

+ 1 - 0
board/freescale/mpc8313erdb/mpc8313erdb.c

@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <init.h>
 #if defined(CONFIG_OF_LIBFDT)
 #include <linux/libfdt.h>

+ 1 - 0
board/freescale/mpc8323erdb/mpc8323erdb.c

@@ -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>

+ 1 - 0
board/freescale/mpc832xemds/mpc832xemds.c

@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <init.h>
 #include <ioports.h>
 #include <mpc83xx.h>

+ 1 - 0
board/freescale/mpc8349emds/mpc8349emds.c

@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <ioports.h>
 #include <mpc83xx.h>
 #include <asm/mpc8349_pci.h>

+ 1 - 0
board/freescale/mpc8349itx/mpc8349itx.c

@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <ioports.h>
 #include <mpc83xx.h>
 #include <i2c.h>

+ 1 - 0
board/freescale/p2041rdb/p2041rdb.c

@@ -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>

+ 1 - 0
board/freescale/t102xqds/t102xqds.c

@@ -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>

+ 1 - 0
board/freescale/t102xrdb/t102xrdb.c

@@ -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>

+ 1 - 0
board/freescale/t1040qds/t1040qds.c

@@ -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>

+ 1 - 0
board/freescale/t104xrdb/t104xrdb.c

@@ -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>

+ 1 - 0
board/freescale/t208xqds/t208xqds.c

@@ -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>

+ 1 - 0
board/freescale/t208xrdb/t208xrdb.c

@@ -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>

+ 1 - 0
board/freescale/t4qds/t4240emu.c

@@ -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>

+ 1 - 0
board/freescale/t4qds/t4240qds.c

@@ -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>

+ 1 - 0
board/freescale/t4rdb/t4240rdb.c

@@ -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>

+ 1 - 0
board/hisilicon/hikey/hikey.c

@@ -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>

+ 1 - 0
board/ids/ids8313/ids8313.c

@@ -12,6 +12,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <mpc83xx.h>
 #include <spi.h>
 #include <linux/libfdt.h>

+ 1 - 0
board/keymile/km83xx/km83xx.c

@@ -15,6 +15,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <fdt_support.h>
 #include <init.h>
 #include <ioports.h>
 #include <mpc83xx.h>

+ 1 - 0
board/keymile/kmp204x/kmp204x.c

@@ -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>

+ 1 - 0
board/sbc8349/sbc8349.c

@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <ioports.h>
 #include <mpc83xx.h>
 #include <asm/mpc8349_pci.h>

+ 1 - 0
board/ti/am43xx/board.c

@@ -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>

+ 1 - 0
board/ti/am57xx/board.c

@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <fdt_support.h>
 #include <init.h>
 #include <palmas.h>
 #include <sata.h>

+ 1 - 0
board/ti/dra7xx/evm.c

@@ -11,6 +11,7 @@
  */
 #include <common.h>
 #include <env.h>
+#include <fdt_support.h>
 #include <init.h>
 #include <palmas.h>
 #include <sata.h>

+ 1 - 0
board/tqc/tqm834x/tqm834x.c

@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <ioports.h>
 #include <mpc83xx.h>
 #include <asm/mpc8349_pci.h>

+ 1 - 0
board/varisys/cyrus/cyrus.c

@@ -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>

+ 1 - 0
board/ve8313/ve8313.c

@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <init.h>
 #include <linux/libfdt.h>
 #include <pci.h>

+ 0 - 12
include/common.h

@@ -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);

+ 14 - 0
include/fdt_support.h

@@ -12,6 +12,20 @@
 #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,