Skip to contentSkip to conversation

common: Further reduce common.h

PATCH Superseded Simon Glass 3 participants 47 messages Sep 30, 2019 Page 2 of 2

Subsystems (69)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#37 lore raw

PATCH 37/41 common: Move some board functions out of common.h

In reply to Simon Glass

A number of board function belong in init.h with the others. Move them.

---

 arch/arm/cpu/armv8/fsl-layerscape/soc.c                   | 1 +
 arch/arm/mach-imx/mx6/opos6ul.c                           | 1 +
 arch/arm/mach-imx/mx6/soc.c                               | 1 +
 arch/arm/mach-imx/mx7ulp/soc.c                            | 1 +
 arch/arm/mach-meson/board-common.c                        | 1 +
 arch/arm/mach-rockchip/board.c                            | 1 +
 arch/arm/mach-rockchip/rk3288/rk3288.c                    | 1 +
 arch/arm/mach-uniphier/board_late_init.c                  | 1 +
 arch/arm/mach-zynqmp/spl.c                                | 1 +
 arch/powerpc/cpu/mpc85xx/cpu_init.c                       | 1 +
 board/Arcturus/ucp1020/ucp1020.c                          | 1 +
 board/BuR/brppt1/board.c                                  | 1 +
 board/BuR/brsmarc1/board.c                                | 1 +
 board/BuR/brxre1/board.c                                  | 1 +
 board/CZ.NIC/turris_mox/turris_mox.c                      | 1 +
 board/CZ.NIC/turris_omnia/turris_omnia.c                  | 1 +
 board/Marvell/mvebu_armada-8k/board.c                     | 1 +
 board/advantech/dms-ba16/dms-ba16.c                       | 1 +
 board/aristainetos/aristainetos-v2.c                      | 1 +
 board/armadeus/opos6uldev/board.c                         | 1 +
 board/atmark-techno/armadillo-800eva/armadillo-800eva.c   | 1 +
 board/atmel/at91sam9x5ek/at91sam9x5ek.c                   | 1 +
 board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c           | 1 +
 board/atmel/sama5d2_icp/sama5d2_icp.c                     | 1 +
 board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c               | 1 +
 board/atmel/sama5d2_xplained/sama5d2_xplained.c           | 1 +
 board/atmel/sama5d3_xplained/sama5d3_xplained.c           | 1 +
 board/atmel/sama5d3xek/sama5d3xek.c                       | 1 +
 board/atmel/sama5d4_xplained/sama5d4_xplained.c           | 1 +
 board/atmel/sama5d4ek/sama5d4ek.c                         | 1 +
 board/beckhoff/mx53cx9020/mx53cx9020.c                    | 1 +
 board/birdland/bav335x/board.c                            | 1 +
 board/bluewater/gurnard/gurnard.c                         | 1 +
 board/bosch/shc/board.c                                   | 1 +
 board/broadcom/bcmstb/bcmstb.c                            | 1 +
 board/cadence/xtfpga/xtfpga.c                             | 1 +
 board/ccv/xpress/xpress.c                                 | 1 +
 board/chipspark/popmetal_rk3288/popmetal-rk3288.c         | 1 +
 board/compulab/cl-som-imx7/cl-som-imx7.c                  | 1 +
 board/compulab/cm_fx6/cm_fx6.c                            | 1 +
 board/congatec/cgtqmx6eval/cgtqmx6eval.c                  | 1 +
 .../congatec/conga-qeval20-qa3-e3845/conga-qeval20-qa3.c  | 1 +
 board/coreboot/coreboot/coreboot.c                        | 1 +
 board/cssi/MCR3000/MCR3000.c                              | 1 +
 board/dfi/dfi-bt700/dfi-bt700.c                           | 1 +
 board/dhelectronics/dh_imx6/dh_imx6.c                     | 1 +
 board/eets/pdu001/board.c                                 | 1 +
 board/efi/efi-x86_payload/payload.c                       | 1 +
 board/el/el6x/el6x.c                                      | 1 +
 board/embest/mx6boards/mx6boards.c                        | 1 +
 board/emulation/qemu-riscv/qemu-riscv.c                   | 1 +
 board/engicam/common/board.c                              | 1 +
 board/freescale/b4860qds/b4860qds.c                       | 1 +
 board/freescale/bsc9132qds/bsc9132qds.c                   | 1 +
 board/freescale/c29xpcie/c29xpcie.c                       | 1 +
 board/freescale/corenet_ds/corenet_ds.c                   | 1 +
 board/freescale/imx8mq_evk/imx8mq_evk.c                   | 1 +
 board/freescale/imx8qm_mek/imx8qm_mek.c                   | 1 +
 board/freescale/imx8qxp_mek/imx8qxp_mek.c                 | 1 +
 board/freescale/ls1021aiot/ls1021aiot.c                   | 1 +
 board/freescale/ls1021aqds/ls1021aqds.c                   | 1 +
 board/freescale/ls1021atsn/ls1021atsn.c                   | 1 +
 board/freescale/ls1021atwr/ls1021atwr.c                   | 1 +
 board/freescale/mpc8313erdb/mpc8313erdb.c                 | 1 +
 board/freescale/mpc832xemds/mpc832xemds.c                 | 1 +
 board/freescale/mpc837xemds/mpc837xemds.c                 | 1 +
 board/freescale/mpc8536ds/mpc8536ds.c                     | 1 +
 board/freescale/mpc8569mds/mpc8569mds.c                   | 1 +
 board/freescale/mpc8572ds/mpc8572ds.c                     | 1 +
 board/freescale/mx25pdk/mx25pdk.c                         | 1 +
 board/freescale/mx31pdk/mx31pdk.c                         | 1 +
 board/freescale/mx35pdk/mx35pdk.c                         | 1 +
 board/freescale/mx51evk/mx51evk.c                         | 1 +
 board/freescale/mx53evk/mx53evk.c                         | 1 +
 board/freescale/mx53loco/mx53loco.c                       | 1 +
 board/freescale/mx6sabreauto/mx6sabreauto.c               | 1 +
 board/freescale/mx6sabresd/mx6sabresd.c                   | 1 +
 board/freescale/mx6sllevk/mx6sllevk.c                     | 1 +
 board/freescale/mx6sxsabreauto/mx6sxsabreauto.c           | 1 +
 board/freescale/mx6sxsabresd/mx6sxsabresd.c               | 1 +
 board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c         | 1 +
 board/freescale/mx6ullevk/mx6ullevk.c                     | 1 +
 board/freescale/mx7dsabresd/mx7dsabresd.c                 | 1 +
 board/freescale/p1010rdb/p1010rdb.c                       | 1 +
 board/freescale/p1022ds/p1022ds.c                         | 1 +
 board/freescale/p1023rdb/p1023rdb.c                       | 1 +
 board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c               | 1 +
 board/freescale/p1_twr/p1_twr.c                           | 1 +
 board/freescale/p2041rdb/p2041rdb.c                       | 1 +
 board/freescale/t102xqds/t102xqds.c                       | 1 +
 board/freescale/t102xrdb/t102xrdb.c                       | 1 +
 board/freescale/t1040qds/t1040qds.c                       | 1 +
 board/freescale/t104xrdb/t104xrdb.c                       | 1 +
 board/freescale/t208xqds/t208xqds.c                       | 1 +
 board/freescale/t208xrdb/t208xrdb.c                       | 1 +
 board/freescale/t4qds/t4240emu.c                          | 1 +
 board/freescale/t4qds/t4240qds.c                          | 1 +
 board/freescale/t4rdb/t4240rdb.c                          | 1 +
 board/gardena/smart-gateway-at91sam/board.c               | 1 +
 board/gardena/smart-gateway-mt7688/board.c                | 1 +
 board/gdsys/a38x/controlcenterdc.c                        | 1 +
 board/gdsys/mpc8308/gazerbeam.c                           | 1 +
 board/gdsys/mpc8308/mpc8308.c                             | 1 +
 board/gdsys/p1022/controlcenterd.c                        | 1 +
 board/ge/bx50v3/bx50v3.c                                  | 1 +
 board/ge/mx53ppd/mx53ppd.c                                | 1 +
 board/grinn/chiliboard/board.c                            | 1 +
 board/grinn/liteboard/board.c                             | 1 +
 board/intel/edison/edison.c                               | 1 +
 board/intel/slimbootloader/slimbootloader.c               | 1 +
 board/isee/igep003x/board.c                               | 1 +
 board/k+p/kp_imx53/kp_imx53.c                             | 1 +
 board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c                     | 1 +
 board/keymile/km83xx/km83xx.c                             | 1 +
 board/keymile/km_arm/km_arm.c                             | 1 +
 board/keymile/kmp204x/kmp204x.c                           | 1 +
 board/kosagi/novena/novena.c                              | 1 +
 board/kosagi/novena/novena_spl.c                          | 1 +
 board/laird/wb50n/wb50n.c                                 | 1 +
 board/liebherr/mccmon6/mccmon6.c                          | 1 +
 board/logicpd/imx6/imx6logic.c                            | 1 +
 board/logicpd/omap3som/omap3logic.c                       | 1 +
 board/mscc/jr2/jr2.c                                      | 1 +
 board/mscc/luton/luton.c                                  | 1 +
 board/mscc/ocelot/ocelot.c                                | 1 +
 board/mscc/serval/serval.c                                | 1 +
 board/mscc/servalt/servalt.c                              | 1 +
 board/phytec/pcm052/pcm052.c                              | 1 +
 board/phytec/pcm058/pcm058.c                              | 1 +
 board/phytec/pfla02/pfla02.c                              | 1 +
 board/phytec/phycore_rk3288/phycore-rk3288.c              | 1 +
 board/qualcomm/dragonboard410c/dragonboard410c.c          | 1 +
 board/renesas/r2dplus/r2dplus.c                           | 1 +
 board/renesas/sh7752evb/sh7752evb.c                       | 1 +
 board/renesas/sh7753evb/sh7753evb.c                       | 1 +
 board/renesas/sh7757lcr/sh7757lcr.c                       | 1 +
 board/rockchip/kylin_rk3036/kylin_rk3036.c                | 1 +
 board/rockchip/tinker_rk3288/tinker-rk3288.c              | 1 +
 board/samsung/common/board.c                              | 1 +
 board/samtec/vining_fpga/socfpga.c                        | 1 +
 board/sandbox/sandbox.c                                   | 1 +
 board/siemens/draco/board.c                               | 1 +
 board/siemens/pxm2/board.c                                | 1 +
 board/siemens/rut/board.c                                 | 1 +
 board/softing/vining_2000/vining_2000.c                   | 1 +
 board/solidrun/mx6cuboxi/mx6cuboxi.c                      | 1 +
 board/spear/x600/x600.c                                   | 1 +
 board/st/stm32f746-disco/stm32f746-disco.c                | 1 +
 board/st/stm32h743-disco/stm32h743-disco.c                | 1 +
 board/st/stm32h743-eval/stm32h743-eval.c                  | 1 +
 board/st/stm32mp1/stm32mp1.c                              | 1 +
 board/synopsys/hsdk/hsdk.c                                | 1 +
 board/syteco/zmx25/zmx25.c                                | 1 +
 board/tcl/sl50/board.c                                    | 1 +
 board/technexion/pico-imx7d/pico-imx7d.c                  | 1 +
 board/theadorable/theadorable.c                           | 1 +
 board/ti/am335x/board.c                                   | 1 +
 board/ti/am43xx/board.c                                   | 1 +
 board/ti/am57xx/board.c                                   | 1 +
 board/ti/dra7xx/evm.c                                     | 1 +
 board/ti/ks2_evm/board_k2g.c                              | 1 +
 board/toradex/apalis-imx8/apalis-imx8.c                   | 1 +
 board/toradex/apalis_imx6/apalis_imx6.c                   | 1 +
 board/toradex/colibri-imx6ull/colibri-imx6ull.c           | 1 +
 board/toradex/colibri-imx8x/colibri-imx8x.c               | 1 +
 board/toradex/colibri_imx6/colibri_imx6.c                 | 1 +
 board/toradex/colibri_vf/colibri_vf.c                     | 1 +
 board/tqc/tqma6/tqma6.c                                   | 1 +
 board/tqc/tqma6/tqma6_mba6.c                              | 1 +
 board/tqc/tqma6/tqma6_wru4.c                              | 1 +
 board/udoo/neo/neo.c                                      | 1 +
 board/udoo/udoo.c                                         | 1 +
 board/varisys/cyrus/cyrus.c                               | 1 +
 board/vscom/baltos/board.c                                | 1 +
 board/wandboard/wandboard.c                               | 1 +
 board/warp/warp.c                                         | 1 +
 board/warp7/warp7.c                                       | 1 +
 board/work-microwave/work_92105/work_92105.c              | 1 +
 board/xes/xpedite517x/xpedite517x.c                       | 1 +
 board/xes/xpedite520x/xpedite520x.c                       | 1 +
 board/xes/xpedite537x/xpedite537x.c                       | 1 +
 board/xes/xpedite550x/xpedite550x.c                       | 1 +
 board/xilinx/microblaze-generic/microblaze-generic.c      | 1 +
 board/xilinx/versal/board.c                               | 1 +
 board/xilinx/zynq/board.c                                 | 1 +
 board/xilinx/zynqmp/zynqmp.c                              | 1 +
 include/common.h                                          | 7 -------
 include/init.h                                            | 8 ++++++++
 188 files changed, 194 insertions(+), 7 deletions(-)
arch/arm/cpu/armv8/fsl-layerscape/soc.c +1 -0
index 3fd34e3a435..1c2570fe653 100644
@@ -8,6 +8,7 @@
 #include <env.h>
 #include <fsl_immap.h>
 #include <fsl_ifc.h>
+#include <init.h>
 #include <asm/arch/fsl_serdes.h>
 #include <asm/arch/soc.h>
 #include <asm/io.h>
arch/arm/mach-imx/mx6/opos6ul.c +1 -0
index 3ab9a3f022f..5cd36d99eb0 100644
@@ -3,6 +3,7 @@
  * Copyright (C) 2018 Armadeus Systems
  */
 
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/imx-regs.h>
arch/arm/mach-imx/mx6/soc.c +1 -0
index 075d2467ce4..7c725fb0bc3 100644
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
arch/arm/mach-imx/mx7ulp/soc.c +1 -0
index c72f0ed3fc6..e20a52f1785 100644
@@ -2,6 +2,7 @@
 /*
  * Copyright (C) 2016 Freescale Semiconductor, Inc.
  */
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
arch/arm/mach-meson/board-common.c +1 -0
index 6c77e379669..d33e7f17415 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/arch/boot.h>
 #include <env.h>
 #include <linux/libfdt.h>
arch/arm/mach-rockchip/board.c +1 -0
index d1cff2424c3..26a2b00425c 100644
@@ -6,6 +6,7 @@
 #include <clk.h>
 #include <cpu_legacy.h>
 #include <dm.h>
+#include <init.h>
 #include <ram.h>
 #include <syscon.h>
 #include <asm/io.h>
arch/arm/mach-rockchip/rk3288/rk3288.c +1 -0
index 057ce920809..0e0a6ae477c 100644
@@ -6,6 +6,7 @@
 #include <dm.h>
 #include <env.h>
 #include <clk.h>
+#include <init.h>
 #include <asm/armv7.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/bootrom.h>
arch/arm/mach-uniphier/board_late_init.c +1 -0
index 14b61fc7dfd..793283058c3 100644
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <init.h>
 #include <spl.h>
 #include <linux/libfdt.h>
 #include <nand.h>
arch/arm/mach-zynqmp/spl.c +1 -0
index b52ac178535..6ba42bb42f6 100644
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <debug_uart.h>
+#include <init.h>
 #include <spl.h>
 
 #include <asm/io.h>
arch/powerpc/cpu/mpc85xx/cpu_init.c +1 -0
index cac92807904..2c5c743d04b 100644
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <init.h>
 #include <watchdog.h>
 #include <asm/processor.h>
 #include <ioports.h>
board/Arcturus/ucp1020/ucp1020.c +1 -0
index 6a880c97bcb..b641b72aaa7 100644
@@ -12,6 +12,7 @@
 #include <command.h>
 #include <env.h>
 #include <hwconfig.h>
+#include <init.h>
 #include <pci.h>
 #include <i2c.h>
 #include <miiphy.h>
board/BuR/brppt1/board.c +1 -0
index e0d1707ac13..dd9649ca072 100644
@@ -13,6 +13,7 @@
 #include <bootcount.h>
 #include <env.h>
 #include <errno.h>
+#include <init.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/hardware.h>
board/BuR/brsmarc1/board.c +1 -0
index 4c703461482..5b9108a89f9 100644
@@ -10,6 +10,7 @@
  */
 #include <common.h>
 #include <errno.h>
+#include <init.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/hardware.h>
board/BuR/brxre1/board.c +1 -0
index 873208c668d..5d57e19fde0 100644
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <env.h>
 #include <errno.h>
+#include <init.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/hardware.h>
board/CZ.NIC/turris_mox/turris_mox.c +1 -0
index 946e20ab492..377191baefb 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <dm.h>
board/CZ.NIC/turris_omnia/turris_omnia.c +1 -0
index 4d21e62e733..e1775d30047 100644
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <env.h>
 #include <i2c.h>
+#include <init.h>
 #include <miiphy.h>
 #include <netdev.h>
 #include <asm/io.h>
board/Marvell/mvebu_armada-8k/board.c +1 -0
index e927e338ea6..499e89367f8 100644
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <i2c.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
board/advantech/dms-ba16/dms-ba16.c +1 -0
index 2eccc053d8f..299f2f102d1 100644
@@ -5,6 +5,7 @@
  * Copyright 2012 Freescale Semiconductor, Inc.
  */
 
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
board/aristainetos/aristainetos-v2.c +1 -0
index c0a2e41f02e..a12c063e5bb 100644
@@ -9,6 +9,7 @@
  * Author: Fabio Estevam <[email protected]>
  */
 
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
board/armadeus/opos6uldev/board.c +1 -0
index cbf40d5c4ae..bc2835610e6 100644
@@ -3,6 +3,7 @@
  * Copyright (C) 2018 Armadeus Systems
  */
 
+#include <init.h>
 #include <asm/arch/mx6-pins.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/gpio.h>
board/atmark-techno/armadillo-800eva/armadillo-800eva.c +1 -0
index d95ba7b8bfe..867fa82c177 100644
@@ -21,6 +21,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <malloc.h>
 #include <asm/processor.h>
 #include <asm/mach-types.h>
board/atmel/at91sam9x5ek/at91sam9x5ek.c +1 -0
index 0856786a0f8..2c071075bac 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/at91sam9x5_matrix.h>
 #include <asm/arch/at91sam9_smc.h>
board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c +1 -0
index 83634345f3d..f3816c83345 100644
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <debug_uart.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/at91_common.h>
 #include <asm/arch/atmel_pio4.h>
board/atmel/sama5d2_icp/sama5d2_icp.c +1 -0
index 1593e2bd4ea..7c34df48b87 100644
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <debug_uart.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/at91_common.h>
 #include <asm/arch/atmel_pio4.h>
board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c +1 -0
index 17e08fa9b26..4b3a703f260 100644
@@ -8,6 +8,7 @@
 #include <debug_uart.h>
 #include <dm.h>
 #include <i2c.h>
+#include <init.h>
 #include <nand.h>
 #include <version.h>
 #include <asm/io.h>
board/atmel/sama5d2_xplained/sama5d2_xplained.c +1 -0
index fccd80ec70a..2116b788378 100644
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <debug_uart.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/at91_common.h>
 #include <asm/arch/atmel_pio4.h>
board/atmel/sama5d3_xplained/sama5d3_xplained.c +1 -0
index 289f8d84999..84c561be6fc 100644
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/sama5d3_smc.h>
 #include <asm/arch/at91_common.h>
board/atmel/sama5d3xek/sama5d3xek.c +1 -0
index acf61486d20..3aa46b1774a 100644
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/sama5d3_smc.h>
 #include <asm/arch/at91_common.h>
board/atmel/sama5d4_xplained/sama5d4_xplained.c +1 -0
index 4da64890b35..93cc183a5b4 100644
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/at91_common.h>
 #include <asm/arch/at91_rstc.h>
board/atmel/sama5d4ek/sama5d4ek.c +1 -0
index 2708d8e75e4..4b3883e20f8 100644
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/at91_common.h>
 #include <asm/arch/at91_rstc.h>
board/beckhoff/mx53cx9020/mx53cx9020.c +1 -0
index 73cf8b1194a..aeb14fe780d 100644
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <cpu_legacy.h>
+#include <init.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/iomux-mx53.h>
board/birdland/bav335x/board.c +1 -0
index 1f3f44a8675..c946ea408fb 100644
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <env.h>
 #include <errno.h>
+#include <init.h>
 #include <serial.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
board/bluewater/gurnard/gurnard.c +1 -0
index 48e31d9065a..4ae70e1aa54 100644
@@ -13,6 +13,7 @@
 #include <atmel_mci.h>
 #include <dm.h>
 #include <env.h>
+#include <init.h>
 #include <lcd.h>
 #include <net.h>
 #ifndef CONFIG_DM_ETH
board/bosch/shc/board.c +1 -0
index 2ceb836019e..890b92c562d 100644
@@ -14,6 +14,7 @@
 #include <common.h>
 #include <env.h>
 #include <errno.h>
+#include <init.h>
 #include <irq_legacy.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
board/broadcom/bcmstb/bcmstb.c +1 -0
index 6af49a368d9..34389a20d85 100644
@@ -7,6 +7,7 @@
  */
 
 #include <cpu_legacy.h>
+#include <init.h>
 #include <time.h>
 #include <linux/types.h>
 #include <common.h>
board/cadence/xtfpga/xtfpga.c +1 -0
index 256611638a5..2869e5cf688 100644
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <command.h>
 #include <dm.h>
+#include <init.h>
 #include <dm/platform_data/net_ethoc.h>
 #include <env.h>
 #include <linux/ctype.h>
board/ccv/xpress/xpress.c +1 -0
index 05286e643c0..0caeea58853 100644
@@ -3,6 +3,7 @@
  * Copyright (C) 2015-2016 Stefan Roese <[email protected]>
  */
 
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/imx-regs.h>
board/chipspark/popmetal_rk3288/popmetal-rk3288.c +1 -0
index 47b921a7486..e6909b3b1c5 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/gpio.h>
 
 #define GPIO7A3_HUB_RST	227
board/compulab/cl-som-imx7/cl-som-imx7.c +1 -0
index 395d5dce178..9277094e441 100644
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <init.h>
 #include <mmc.h>
 #include <phy.h>
 #include <netdev.h>
board/compulab/cm_fx6/cm_fx6.c +1 -0
index feb7a71f007..b20ca168dfb 100644
@@ -13,6 +13,7 @@
 #include <dwc_ahsata.h>
 #include <env.h>
 #include <fsl_esdhc_imx.h>
+#include <init.h>
 #include <miiphy.h>
 #include <mtd_node.h>
 #include <netdev.h>
board/congatec/cgtqmx6eval/cgtqmx6eval.c +1 -0
index 6b3d5b833f4..49c731f8911 100644
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
board/congatec/conga-qeval20-qa3-e3845/conga-qeval20-qa3.c +1 -0
index 9751337a474..315b6dc5429 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <init.h>
 #include <winbond_w83627.h>
 #include <asm/gpio.h>
 #include <asm/ibmpc.h>
board/coreboot/coreboot/coreboot.c +1 -0
index ed5606d4a44..b791b82ef48 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 
 int board_early_init_r(void)
 {
board/cssi/MCR3000/MCR3000.c +1 -0
index dcd2c1c9753..138d0c61f15 100644
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <env.h>
 #include <hwconfig.h>
+#include <init.h>
 #include <mpc8xx.h>
 #include <fdt_support.h>
 #include <serial.h>
board/dfi/dfi-bt700/dfi-bt700.c +1 -0
index 50cf6dc987e..f4c4b1d6636 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <nuvoton_nct6102d.h>
 #include <asm/gpio.h>
 #include <asm/ibmpc.h>
board/dhelectronics/dh_imx6/dh_imx6.c +1 -0
index 2d0f78da118..85e281ebb9c 100644
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 #include <dm/device-internal.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
board/eets/pdu001/board.c +1 -0
index 8a3d0ada270..fc4587ed0d5 100644
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <env.h>
 #include <errno.h>
+#include <init.h>
 #include <spl.h>
 #include <i2c.h>
 #include <watchdog.h>
board/efi/efi-x86_payload/payload.c +1 -0
index 4eeb49a27ac..5d4492cdc77 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <usb.h>
 
 int board_early_init_r(void)
board/el/el6x/el6x.c +1 -0
index 18d69a7da38..9aa71b99419 100644
@@ -5,6 +5,7 @@
  * Based on other i.MX6 boards
  */
 
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
board/embest/mx6boards/mx6boards.c +1 -0
index bcfe1250adb..bf5c020af13 100644
@@ -12,6 +12,7 @@
  * Copyright (C) 2013 Jon Nettleton <[email protected]>.
  */
 
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/imx-regs.h>
board/emulation/qemu-riscv/qemu-riscv.c +1 -0
index 37d48d04f2d..cbce5ffe6e3 100644
@@ -8,6 +8,7 @@
 #include <env.h>
 #include <fdtdec.h>
 #include <spl.h>
+#include <init.h>
 #include <virtio_types.h>
 #include <virtio.h>
 
board/engicam/common/board.c +1 -0
index 31ff297b756..e5358b47f33 100644
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <init.h>
 #include <mmc.h>
 #include <asm/arch/sys_proto.h>
 #include <watchdog.h>
board/freescale/b4860qds/b4860qds.c +1 -0
index 29c9fa00789..e1828e081e5 100644
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <env.h>
 #include <i2c.h>
+#include <init.h>
 #include <irq_legacy.h>
 #include <netdev.h>
 #include <linux/compiler.h>
board/freescale/bsc9132qds/bsc9132qds.c +1 -0
index dd9ad905085..ab05d84190f 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #include <asm/cache.h>
board/freescale/c29xpcie/c29xpcie.c +1 -0
index 6d103be7ffc..a9ea986579a 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #include <asm/cache.h>
board/freescale/corenet_ds/corenet_ds.c +1 -0
index 3ce9a76aae1..c2fa60e321b 100644
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <init.h>
 #include <netdev.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
board/freescale/imx8mq_evk/imx8mq_evk.c +1 -0
index 1463e6e6963..cb39d0f2d68 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <init.h>
 #include <malloc.h>
 #include <errno.h>
 #include <asm/io.h>
board/freescale/imx8qm_mek/imx8qm_mek.c +1 -0
index 76634a3a28a..68be0fe0cf7 100644
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <env.h>
 #include <errno.h>
+#include <init.h>
 #include <linux/libfdt.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
board/freescale/imx8qxp_mek/imx8qxp_mek.c +1 -0
index 4ba83142841..671064fae27 100644
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <env.h>
 #include <errno.h>
+#include <init.h>
 #include <linux/libfdt.h>
 #include <fsl_esdhc_imx.h>
 #include <asm/io.h>
board/freescale/ls1021aiot/ls1021aiot.c +1 -0
index 70992a5ce4e..d53b99d1129 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/arch/immap_ls102xa.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/fsl_serdes.h>
board/freescale/ls1021aqds/ls1021aqds.c +1 -0
index 2ca2bd99093..03eaf0c79ec 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/immap_ls102xa.h>
 #include <asm/arch/clock.h>
board/freescale/ls1021atsn/ls1021atsn.c +1 -0
index 39e825ca496..8039fd55f47 100644
@@ -2,6 +2,7 @@
 /* Copyright 2016-2019 NXP Semiconductors
  */
 #include <common.h>
+#include <init.h>
 #include <asm/arch-ls102xa/ls102xa_soc.h>
 #include <asm/arch/ls102xa_devdis.h>
 #include <asm/arch/immap_ls102xa.h>
board/freescale/ls1021atwr/ls1021atwr.c +1 -0
index fcf2ec97889..375cbb99f37 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/immap_ls102xa.h>
 #include <asm/arch/clock.h>
board/freescale/mpc8313erdb/mpc8313erdb.c +1 -0
index 72d2d33e0b5..55a3529296d 100644
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #if defined(CONFIG_OF_LIBFDT)
 #include <linux/libfdt.h>
 #endif
board/freescale/mpc832xemds/mpc832xemds.c +1 -0
index 61b95c601e6..c9f2ac44a62 100644
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <ioports.h>
 #include <mpc83xx.h>
 #include <i2c.h>
board/freescale/mpc837xemds/mpc837xemds.c +1 -0
index 16922087c01..1ae2308e9b8 100644
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <hwconfig.h>
 #include <i2c.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/fsl_mpc83xx_serdes.h>
 #include <spd_sdram.h>
board/freescale/mpc8536ds/mpc8536ds.c +1 -0
index 659770e568a..e55ee400260 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <init.h>
 #include <pci.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
board/freescale/mpc8569mds/mpc8569mds.c +1 -0
index 134ed5294a6..cf5d8a5244f 100644
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <console.h>
 #include <hwconfig.h>
+#include <init.h>
 #include <pci.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
board/freescale/mpc8572ds/mpc8572ds.c +1 -0
index 89f4d6c05f2..4111d69b4b9 100644
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <init.h>
 #include <pci.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
board/freescale/mx25pdk/mx25pdk.c +1 -0
index c59f0fb922a..6898e9c4d64 100644
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <asm/arch/imx-regs.h>
board/freescale/mx31pdk/mx31pdk.c +1 -0
index b31a97b5d01..fb57f263573 100644
@@ -8,6 +8,7 @@
 
 
 #include <common.h>
+#include <init.h>
 #include <netdev.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
board/freescale/mx35pdk/mx35pdk.c +1 -0
index aba17a6b825..d0f7f045a5b 100644
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <asm/arch/imx-regs.h>
board/freescale/mx51evk/mx51evk.c +1 -0
index d1bb852f371..3314badf9e7 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <asm/arch/imx-regs.h>
board/freescale/mx53evk/mx53evk.c +1 -0
index 56985c63d74..76a112eaac0 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
board/freescale/mx53loco/mx53loco.c +1 -0
index a177815bb8a..381c1ca808f 100644
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
board/freescale/mx6sabreauto/mx6sabreauto.c +1 -0
index dc156efbbcb..140f24459d7 100644
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
board/freescale/mx6sabresd/mx6sabresd.c +1 -0
index b0c0117968b..b346ca4ced9 100644
@@ -5,6 +5,7 @@
  * Author: Fabio Estevam <[email protected]>
  */
 
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
board/freescale/mx6sllevk/mx6sllevk.c +1 -0
index 83babe18e25..227d178e076 100644
@@ -3,6 +3,7 @@
  * Copyright (C) 2016 Freescale Semiconductor, Inc.
  */
 
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/iomux.h>
board/freescale/mx6sxsabreauto/mx6sxsabreauto.c +1 -0
index 15e921aecac..0c7904204f7 100644
@@ -5,6 +5,7 @@
  * Author: Ye Li <[email protected]>
  */
 
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/iomux.h>
board/freescale/mx6sxsabresd/mx6sxsabresd.c +1 -0
index 1c10958879b..9fff8ffc4cf 100644
@@ -5,6 +5,7 @@
  * Author: Fabio Estevam <[email protected]>
  */
 
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/iomux.h>
board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c +1 -0
index ccbe4044786..6a237cfef4d 100644
@@ -3,6 +3,7 @@
  * Copyright (C) 2015 Freescale Semiconductor, Inc.
  */
 
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/imx-regs.h>
board/freescale/mx6ullevk/mx6ullevk.c +1 -0
index e1193478026..2a2688c7355 100644
@@ -3,6 +3,7 @@
  * Copyright (C) 2016 Freescale Semiconductor, Inc.
  */
 
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/imx-regs.h>
board/freescale/mx7dsabresd/mx7dsabresd.c +1 -0
index 86bf030d355..f1120d67e37 100644
@@ -3,6 +3,7 @@
  * Copyright (C) 2015 Freescale Semiconductor, Inc.
  */
 
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/mx7-pins.h>
board/freescale/p1010rdb/p1010rdb.c +1 -0
index 449df937e6a..a0866926832 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #include <asm/cache.h>
board/freescale/p1022ds/p1022ds.c +1 -0
index 9406e755170..ebf822acb5f 100644
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <init.h>
 #include <pci.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
board/freescale/p1023rdb/p1023rdb.c +1 -0
index 7db04043ca5..eeb13ccc9b9 100644
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <init.h>
 #include <pci.h>
 #include <asm/io.h>
 #include <asm/cache.h>
board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c +1 -0
index 3649f16598f..c85243f58ba 100644
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <env.h>
 #include <hwconfig.h>
+#include <init.h>
 #include <pci.h>
 #include <i2c.h>
 #include <asm/processor.h>
board/freescale/p1_twr/p1_twr.c +1 -0
index 01cac181b34..72fe1b41660 100644
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <env.h>
 #include <hwconfig.h>
+#include <init.h>
 #include <pci.h>
 #include <i2c.h>
 #include <asm/processor.h>
board/freescale/p2041rdb/p2041rdb.c +1 -0
index baf1506908e..78f89fc4cb7 100644
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <init.h>
 #include <netdev.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
board/freescale/t102xqds/t102xqds.c +1 -0
index 6c754503d19..85f8517d798 100644
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <env.h>
 #include <i2c.h>
+#include <init.h>
 #include <netdev.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
board/freescale/t102xrdb/t102xrdb.c +1 -0
index 793f54d69ea..d578a0b1a5b 100644
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <env.h>
 #include <i2c.h>
+#include <init.h>
 #include <netdev.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
board/freescale/t1040qds/t1040qds.c +1 -0
index 55516b9f067..61dedf4c06c 100644
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <env.h>
 #include <i2c.h>
+#include <init.h>
 #include <netdev.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
board/freescale/t104xrdb/t104xrdb.c +1 -0
index c7a645108f4..7dacd0c5f1f 100644
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <env.h>
 #include <hwconfig.h>
+#include <init.h>
 #include <netdev.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
board/freescale/t208xqds/t208xqds.c +1 -0
index 86d6b1defe9..6c34db42199 100644
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <env.h>
 #include <i2c.h>
+#include <init.h>
 #include <netdev.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
board/freescale/t208xrdb/t208xrdb.c +1 -0
index d03d48bcfaf..3ac61f009c9 100644
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <env.h>
 #include <i2c.h>
+#include <init.h>
 #include <netdev.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
board/freescale/t4qds/t4240emu.c +1 -0
index d9cb967c220..da050bf800f 100644
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <env.h>
 #include <i2c.h>
+#include <init.h>
 #include <netdev.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
board/freescale/t4qds/t4240qds.c +1 -0
index 8b60121ddf1..ae49fcd5f9a 100644
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <env.h>
 #include <i2c.h>
+#include <init.h>
 #include <irq_legacy.h>
 #include <netdev.h>
 #include <linux/compiler.h>
board/freescale/t4rdb/t4240rdb.c +1 -0
index 0c95607762e..48aa6b6822e 100644
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <env.h>
 #include <i2c.h>
+#include <init.h>
 #include <netdev.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
board/gardena/smart-gateway-at91sam/board.c +1 -0
index 3e2da0d6f8e..45c947fcbb4 100644
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <debug_uart.h>
 #include <env.h>
+#include <init.h>
 #include <led.h>
 #include <asm/arch/at91_common.h>
 #include <asm/arch/clk.h>
board/gardena/smart-gateway-mt7688/board.c +1 -0
index 1a598395699..5c3e84b0b40 100644
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <env.h>
 #include <env_internal.h>
+#include <init.h>
 #include <led.h>
 #include <net.h>
 #include <spi.h>
board/gdsys/a38x/controlcenterdc.c +1 -0
index 9e448fcd10d..4eb7d76660e 100644
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 #include <miiphy.h>
 #include <tpm-v1.h>
 #include <asm/io.h>
board/gdsys/mpc8308/gazerbeam.c +1 -0
index ddd6ee89538..8c9636d292e 100644
@@ -11,6 +11,7 @@
 #include <env.h>
 #include <fdt_support.h>
 #include <fsl_esdhc.h>
+#include <init.h>
 #include <miiphy.h>
 #include <misc.h>
 #include <tpm-v1.h>
board/gdsys/mpc8308/mpc8308.c +1 -0
index ae77fc2fd12..d4108457d92 100644
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <init.h>
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <asm/global_data.h>
board/gdsys/p1022/controlcenterd.c +1 -0
index 6eb3d6c5d06..8e868165ed6 100644
@@ -24,6 +24,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <init.h>
 #include <pci.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
board/ge/bx50v3/bx50v3.c +1 -0
index 917ecc4c181..2f6747b70a3 100644
@@ -5,6 +5,7 @@
  * Copyright 2012 Freescale Semiconductor, Inc.
  */
 
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
board/ge/mx53ppd/mx53ppd.c +1 -0
index 54485672982..51b5d8996d6 100644
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
board/grinn/chiliboard/board.c +1 -0
index c6d53600fa1..7f0de5e42b0 100644
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/arch/chilisom.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/hardware.h>
board/grinn/liteboard/board.c +1 -0
index 151041a789e..5d71b639df0 100644
@@ -5,6 +5,7 @@
  */
 
 #include <command.h>
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/imx-regs.h>
board/intel/edison/edison.c +1 -0
index f56b5b1affe..652f9755155 100644
@@ -5,6 +5,7 @@
 #include <common.h>
 #include <dwc3-uboot.h>
 #include <env.h>
+#include <init.h>
 #include <mmc.h>
 #include <u-boot/md5.h>
 #include <usb.h>
board/intel/slimbootloader/slimbootloader.c +1 -0
index f50eeb823f6..b20ddf0c682 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 
 int board_early_init_r(void)
 {
board/isee/igep003x/board.c +1 -0
index d59121296e4..bc9fdcd1e6c 100644
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <env.h>
 #include <errno.h>
+#include <init.h>
 #include <serial.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
board/k+p/kp_imx53/kp_imx53.c +1 -0
index 84cddd48949..2f57310e27a 100644
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c +1 -0
index 2c541ace021..7c7f84e87f9 100644
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/imx-regs.h>
board/keymile/km83xx/km83xx.c +1 -0
index 8846b64f7d7..abbf985eb2e 100644
@@ -15,6 +15,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <init.h>
 #include <ioports.h>
 #include <mpc83xx.h>
 #include <i2c.h>
board/keymile/km_arm/km_arm.c +1 -0
index 922cc621f78..7f83ec180ec 100644
@@ -14,6 +14,7 @@
 #include <common.h>
 #include <env.h>
 #include <i2c.h>
+#include <init.h>
 #include <nand.h>
 #include <netdev.h>
 #include <miiphy.h>
board/keymile/kmp204x/kmp204x.c +1 -0
index 4d1e38aa3a7..ae9653db78f 100644
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <init.h>
 #include <netdev.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
board/kosagi/novena/novena.c +1 -0
index b7b747d1965..e4f0e81004e 100644
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 #include <dm/device-internal.h>
 #include <ahci.h>
 #include <env.h>
board/kosagi/novena/novena_spl.c +1 -0
index 00210ab254f..7521cacaf95 100644
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/iomux.h>
board/laird/wb50n/wb50n.c +1 -0
index a2f8eaf0ba3..bf2a024c7de 100644
@@ -3,6 +3,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/sama5_sfr.h>
 #include <asm/arch/sama5d3_smc.h>
board/liebherr/mccmon6/mccmon6.c +1 -0
index 60a43038899..f32c492c615 100644
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <init.h>
 #include <serial.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/iomux.h>
board/logicpd/imx6/imx6logic.c +1 -0
index be6e5a72c39..85f6c049810 100644
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <init.h>
 #include <miiphy.h>
 #include <input.h>
 #include <mmc.h>
board/logicpd/omap3som/omap3logic.c +1 -0
index ab5e6e8b97a..89c64bfa35a 100644
@@ -12,6 +12,7 @@
  */
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 #include <ns16550.h>
 #include <netdev.h>
 #include <flash.h>
board/mscc/jr2/jr2.c +1 -0
index 6e5ef4c97f4..067907ba52c 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <led.h>
 #include <miiphy.h>
board/mscc/luton/luton.c +1 -0
index 114f7fd9d9b..e614058d10f 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <led.h>
 #include <miiphy.h>
board/mscc/ocelot/ocelot.c +1 -0
index 91d03951dbb..ad227a41693 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
board/mscc/serval/serval.c +1 -0
index da7f55620de..6c6dbf2bfff 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <led.h>
 #include <miiphy.h>
board/mscc/servalt/servalt.c +1 -0
index 566f9765c29..71891f6fe38 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <led.h>
 
board/phytec/pcm052/pcm052.c +1 -0
index e1ebe8e75d0..664e4f244d3 100644
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux-vf610.h>
board/phytec/pcm058/pcm058.c +1 -0
index ac5e3a23283..820b5fde142 100644
@@ -10,6 +10,7 @@
  * same pins (SD4)
  */
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
board/phytec/pfla02/pfla02.c +1 -0
index 57de1f8e556..bfd0deb2aa5 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <cpu_legacy.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
board/phytec/phycore_rk3288/phycore-rk3288.c +1 -0
index 5fcbf65b7c9..dac59cd55df 100644
@@ -4,6 +4,7 @@
  * Author: Wadim Egorov <[email protected]>
  */
 
+#include <init.h>
 #include <asm/io.h>
 #include <common.h>
 #include <dm.h>
board/qualcomm/dragonboard410c/dragonboard410c.c +1 -0
index d7f0f93fb10..254af7907ad 100644
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
+#include <init.h>
 #include <usb.h>
 #include <asm/gpio.h>
 #include <fdt_support.h>
board/renesas/r2dplus/r2dplus.c +1 -0
index 6eff98706f7..f2da4686c3f 100644
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <ide.h>
+#include <init.h>
 #include <netdev.h>
 #include <asm/processor.h>
 #include <asm/io.h>
board/renesas/sh7752evb/sh7752evb.c +1 -0
index d0b850f35d4..d675f65c127 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <init.h>
 #include <malloc.h>
 #include <asm/processor.h>
 #include <asm/io.h>
board/renesas/sh7753evb/sh7753evb.c +1 -0
index e1bed7dcc37..43e13829f38 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <init.h>
 #include <malloc.h>
 #include <asm/processor.h>
 #include <asm/io.h>
board/renesas/sh7757lcr/sh7757lcr.c +1 -0
index d2671202e98..1d7ed9977ee 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <init.h>
 #include <malloc.h>
 #include <asm/processor.h>
 #include <asm/io.h>
board/rockchip/kylin_rk3036/kylin_rk3036.c +1 -0
index 2faeab9baf5..c5e28df258f 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/uart.h>
 #include <asm/arch-rockchip/sdram_rk3036.h>
board/rockchip/tinker_rk3288/tinker-rk3288.c +1 -0
index 6c76c3c25c4..93e9d2f4653 100644
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <env.h>
 #include <i2c_eeprom.h>
+#include <init.h>
 #include <netdev.h>
 
 static int get_ethaddr_from_eeprom(u8 *addr)
board/samsung/common/board.c +1 -0
index 9adbd1e2cf9..ee2fc7971eb 100644
@@ -8,6 +8,7 @@
 #include <cros_ec.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <init.h>
 #include <spi.h>
 #include <tmu.h>
 #include <netdev.h>
board/samtec/vining_fpga/socfpga.c +1 -0
index 2d32ad94571..1ea89063889 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <init.h>
 #include <status_led.h>
 #include <asm/arch/reset_manager.h>
 #include <asm/io.h>
board/sandbox/sandbox.c +1 -0
index 68e8071d262..b9c92279409 100644
@@ -7,6 +7,7 @@
 #include <cpu_legacy.h>
 #include <cros_ec.h>
 #include <dm.h>
+#include <init.h>
 #include <led.h>
 #include <os.h>
 #include <asm/test.h>
board/siemens/draco/board.c +1 -0
index a6840b895b2..94bd71ad097 100644
@@ -15,6 +15,7 @@
 #include <common.h>
 #include <env.h>
 #include <errno.h>
+#include <init.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/hardware.h>
board/siemens/pxm2/board.c +1 -0
index 30f0902701e..b5a10ebf8be 100644
@@ -15,6 +15,7 @@
 #include <common.h>
 #include <env.h>
 #include <errno.h>
+#include <init.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/hardware.h>
board/siemens/rut/board.c +1 -0
index 539ecef22cb..d7d9738a6d0 100644
@@ -13,6 +13,7 @@
 #include <common.h>
 #include <env.h>
 #include <errno.h>
+#include <init.h>
 #include <spi.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
board/softing/vining_2000/vining_2000.c +1 -0
index 51985b91c22..78692e92408 100644
@@ -6,6 +6,7 @@
  * Author: Christoph Fritz <[email protected]>
  */
 
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/iomux.h>
board/solidrun/mx6cuboxi/mx6cuboxi.c +1 -0
index f82fb0786a9..d6e0c83e0d2 100644
@@ -13,6 +13,7 @@
  * Ported to SolidRun microSOM by Rabeeh Khoury <[email protected]>
  */
 
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
board/spear/x600/x600.c +1 -0
index d6508ee44dd..e1232edd143 100644
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <micrel.h>
 #include <nand.h>
 #include <netdev.h>
board/st/stm32f746-disco/stm32f746-disco.c +1 -0
index 5be60af18ca..df907426d2e 100644
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 #include <lcd.h>
 #include <miiphy.h>
 #include <phy_interface.h>
board/st/stm32h743-disco/stm32h743-disco.c +1 -0
index 3ab95188048..6aab2e243ed 100644
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
board/st/stm32h743-eval/stm32h743-eval.c +1 -0
index 3ab95188048..6aab2e243ed 100644
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
board/st/stm32mp1/stm32mp1.c +1 -0
index 18f9b848765..d700c446760 100644
@@ -13,6 +13,7 @@
 #include <g_dnl.h>
 #include <generic-phy.h>
 #include <i2c.h>
+#include <init.h>
 #include <led.h>
 #include <misc.h>
 #include <mtd.h>
board/synopsys/hsdk/hsdk.c +1 -0
index 6e226e5d7dd..27062fbe82f 100644
@@ -8,6 +8,7 @@
 #include <config.h>
 #include <cpu_legacy.h>
 #include <env.h>
+#include <init.h>
 #include <irq_legacy.h>
 #include <linux/printk.h>
 #include <linux/kernel.h>
board/syteco/zmx25/zmx25.c +1 -0
index f64fadde033..2e41cd8689b 100644
@@ -15,6 +15,7 @@
  */
 #include <common.h>
 #include <cpu_legacy.h>
+#include <init.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
board/tcl/sl50/board.c +1 -0
index a9588275076..7537fa213aa 100644
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <env.h>
 #include <errno.h>
+#include <init.h>
 #include <serial.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
board/technexion/pico-imx7d/pico-imx7d.c +1 -0
index 216475c8dec..ba8741e0ede 100644
@@ -3,6 +3,7 @@
  * Copyright (C) 2017 NXP Semiconductors
  */
 
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/imx-regs.h>
board/theadorable/theadorable.c +1 -0
index 2958d5ff882..621e26905ba 100644
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <console.h>
 #include <i2c.h>
+#include <init.h>
 #include <pci.h>
 #if !defined(CONFIG_SPL_BUILD)
 #include <bootcount.h>
board/ti/am335x/board.c +1 -0
index 7eaa6cd96d6..56d354c3d27 100644
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <env.h>
 #include <errno.h>
+#include <init.h>
 #include <spl.h>
 #include <serial.h>
 #include <asm/arch/cpu.h>
board/ti/am43xx/board.c +1 -0
index 2e09cc20e8c..c4018498aad 100644
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <env.h>
 #include <i2c.h>
+#include <init.h>
 #include <linux/errno.h>
 #include <spl.h>
 #include <usb.h>
board/ti/am57xx/board.c +1 -0
index 2451cb056ef..b0a6412b1f4 100644
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <init.h>
 #include <palmas.h>
 #include <sata.h>
 #include <serial.h>
board/ti/dra7xx/evm.c +1 -0
index ea8523541f8..04e9b894d54 100644
@@ -11,6 +11,7 @@
  */
 #include <common.h>
 #include <env.h>
+#include <init.h>
 #include <palmas.h>
 #include <sata.h>
 #include <serial.h>
board/ti/ks2_evm/board_k2g.c +1 -0
index 4ff9a44b371..a0fd03a39fb 100644
@@ -7,6 +7,7 @@
  */
 #include <common.h>
 #include <env.h>
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/ti-common/keystone_net.h>
 #include <asm/arch/psc_defs.h>
board/toradex/apalis-imx8/apalis-imx8.c +1 -0
index af48b560952..3e5174ef8a6 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 
 #include <asm/arch/clock.h>
 #include <asm/arch/imx8-pins.h>
board/toradex/apalis_imx6/apalis_imx6.c +1 -0
index 6421a22c25a..ed4a366a154 100644
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 
 #include <ahci.h>
 #include <asm/arch/clock.h>
board/toradex/colibri-imx6ull/colibri-imx6ull.c +1 -0
index d1ae463941a..7dfe8aec88d 100644
@@ -3,6 +3,7 @@
  * Copyright (C) 2018-2019 Toradex AG
  */
 #include <common.h>
+#include <init.h>
 
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
board/toradex/colibri-imx8x/colibri-imx8x.c +1 -0
index eae3c591a16..adeee676434 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 
 #include <asm/arch/clock.h>
 #include <asm/arch/imx8-pins.h>
board/toradex/colibri_imx6/colibri_imx6.c +1 -0
index ad40b589c1e..1fd0f2c122a 100644
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
+#include <init.h>
 
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
board/toradex/colibri_vf/colibri_vf.c +1 -0
index 04d8ffd1e66..92c5dbfc5ac 100644
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
board/tqc/tqma6/tqma6.c +1 -0
index 5b20afd4881..c8ddc2c1f85 100644
@@ -7,6 +7,7 @@
  * Author: Markus Niebel <[email protected]>
  */
 
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/mx6-pins.h>
 #include <asm/arch/imx-regs.h>
board/tqc/tqma6/tqma6_mba6.c +1 -0
index 8a2431edab9..154ea0e9258 100644
@@ -7,6 +7,7 @@
  * Author: Markus Niebel <[email protected]>
  */
 
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/mx6-pins.h>
board/tqc/tqma6/tqma6_wru4.c +1 -0
index 99196ad6857..3a5957f7601 100644
@@ -9,6 +9,7 @@
  * Copyright (C) 2015 Stefan Roese <[email protected]>
  */
 
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/mx6-pins.h>
board/udoo/neo/neo.c +1 -0
index 5c468a6a973..2ba98c7b52e 100644
@@ -8,6 +8,7 @@
  * Author: Francesco Montefoschi <[email protected]>
  */
 
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/imx-regs.h>
board/udoo/udoo.c +1 -0
index f2c2bf47b0f..2a4e790d88a 100644
@@ -5,6 +5,7 @@
  * Author: Fabio Estevam <[email protected]>
  */
 
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
board/varisys/cyrus/cyrus.c +1 -0
index fa02fefefa5..0515ebbad24 100644
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <init.h>
 #include <netdev.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
board/vscom/baltos/board.c +1 -0
index 588f6db1724..02ea1c0533f 100644
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <env.h>
 #include <errno.h>
+#include <init.h>
 #include <serial.h>
 #include <linux/libfdt.h>
 #include <spl.h>
board/wandboard/wandboard.c +1 -0
index 69cdf3e9c96..3252e5b5564 100644
@@ -6,6 +6,7 @@
  * Author: Fabio Estevam <[email protected]>
  */
 
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/iomux.h>
board/warp/warp.c +1 -0
index a44a5789e45..f7bff5334d9 100644
@@ -7,6 +7,7 @@
  * Author: Otavio Salvador <[email protected]>
  */
 
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/imx-regs.h>
board/warp7/warp7.c +1 -0
index 39ae9822573..95be016931f 100644
@@ -4,6 +4,7 @@
  * Author: Fabio Estevam <[email protected]>
  */
 
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/mx7-pins.h>
board/work-microwave/work_92105/work_92105.c +1 -0
index 3f23af9ed40..5cc2566e2a1 100644
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/cpu.h>
board/xes/xpedite517x/xpedite517x.c +1 -0
index 0d8fba851d1..41644932775 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/processor.h>
 #include <fsl_ddr_sdram.h>
 #include <asm/mmu.h>
board/xes/xpedite520x/xpedite520x.c +1 -0
index 8daa18e97cd..5a4a36cad1e 100644
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <init.h>
 #include <pci.h>
 #include <asm/processor.h>
 #include <asm/immap_85xx.h>
board/xes/xpedite537x/xpedite537x.c +1 -0
index 8776a02302c..4842096c244 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <init.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #include <asm/immap_85xx.h>
board/xes/xpedite550x/xpedite550x.c +1 -0
index 378e5b67ff0..6ee70d6d299 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <init.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #include <asm/immap_85xx.h>
board/xilinx/microblaze-generic/microblaze-generic.c +1 -0
index ba82292e35a..bf7b794a211 100644
@@ -13,6 +13,7 @@
 #include <common.h>
 #include <config.h>
 #include <dm.h>
+#include <init.h>
 #include <dm/lists.h>
 #include <fdtdec.h>
 #include <asm/processor.h>
board/xilinx/versal/board.c +1 -0
index 50013c83cc9..a8514ad0907 100644
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <fdtdec.h>
+#include <init.h>
 #include <malloc.h>
 #include <time.h>
 #include <asm/io.h>
board/xilinx/zynq/board.c +1 -0
index 35191b2f813..6609cb7c33a 100644
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <dm/uclass.h>
 #include <env.h>
 #include <fdtdec.h>
board/xilinx/zynqmp/zynqmp.c +1 -0
index babec5f34fd..abf59ac1124 100644
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <cpu_legacy.h>
 #include <env.h>
+#include <init.h>
 #include <sata.h>
 #include <ahci.h>
 #include <scsi.h>
include/common.h +0 -7
index 9bdd1cf85c4..3001296ff21 100644
@@ -137,13 +137,6 @@ int  eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned c
 # define CONFIG_SYS_DEF_EEPROM_ADDR CONFIG_SYS_I2C_EEPROM_ADDR
 #endif
 
-/* $(BOARD)/$(BOARD).c */
-int board_early_init_f (void);
-int board_fix_fdt (void *rw_fdt_blob); /* manipulate the U-Boot fdt before its relocation */
-int board_late_init (void);
-int board_postclk_init (void); /* after clocks/timebase, before env/serial */
-int board_early_init_r (void);
-
 #if defined(CONFIG_SYS_DRAM_TEST)
 int testdram(void);
 #endif /* CONFIG_SYS_DRAM_TEST */
include/init.h +8 -0
index 6076283d2c8..e506cd30dd1 100644
@@ -197,6 +197,14 @@ int show_board_info(void);
  */
 ulong board_get_usable_ram_top(ulong total_size);
 
+int board_early_init_f(void);
+
+/* manipulate the U-Boot fdt before its relocation */
+int board_fix_fdt(void *rw_fdt_blob);
+int board_late_init(void);
+int board_postclk_init(void); /* after clocks/timebase, before env/serial */
+int board_early_init_r(void);
+
 #endif	/* __ASSEMBLY__ */
 /* Put only stuff here that the assembler can digest */
 
Signature · 1 line
2.23.0.444.g18eeb5a265-goog
#38 lore raw

PATCH 38/41 common: Move pci_init_board() out of common.h

In reply to Simon Glass

This function can be dropped when all boards use driver model for PCI. For now, move it into init.h with a comment.

---

 board/armltd/integrator/pci.c               | 1 +
 board/cavium/thunderx/thunderx.c            | 1 +
 board/esd/vme8349/pci.c                     | 1 +
 board/freescale/b4860qds/pci.c              | 1 +
 board/freescale/common/p_corenet/pci.c      | 1 +
 board/freescale/m54455evb/m54455evb.c       | 1 +
 board/freescale/m547xevb/m547xevb.c         | 1 +
 board/freescale/m548xevb/m548xevb.c         | 1 +
 board/freescale/mpc8308rdb/mpc8308rdb.c     | 1 +
 board/freescale/mpc8315erdb/mpc8315erdb.c   | 1 +
 board/freescale/mpc8323erdb/mpc8323erdb.c   | 1 +
 board/freescale/mpc832xemds/pci.c           | 1 +
 board/freescale/mpc8349emds/pci.c           | 1 +
 board/freescale/mpc8349itx/pci.c            | 1 +
 board/freescale/mpc837xemds/pci.c           | 1 +
 board/freescale/mpc837xerdb/pci.c           | 1 +
 board/freescale/mpc8541cds/mpc8541cds.c     | 1 +
 board/freescale/mpc8544ds/mpc8544ds.c       | 1 +
 board/freescale/mpc8548cds/mpc8548cds.c     | 1 +
 board/freescale/mpc8555cds/mpc8555cds.c     | 1 +
 board/freescale/mpc8568mds/mpc8568mds.c     | 1 +
 board/freescale/mpc8610hpcd/mpc8610hpcd.c   | 1 +
 board/freescale/mpc8641hpcn/mpc8641hpcn.c   | 1 +
 board/freescale/qemu-ppce500/qemu-ppce500.c | 1 +
 board/freescale/t102xqds/pci.c              | 1 +
 board/freescale/t102xrdb/pci.c              | 1 +
 board/freescale/t1040qds/pci.c              | 1 +
 board/freescale/t104xrdb/pci.c              | 1 +
 board/freescale/t208xqds/pci.c              | 1 +
 board/freescale/t208xrdb/pci.c              | 1 +
 board/freescale/t4qds/pci.c                 | 1 +
 board/freescale/t4rdb/pci.c                 | 1 +
 board/gdsys/mpc8308/hrcon.c                 | 1 +
 board/gdsys/mpc8308/strider.c               | 1 +
 board/imgtec/malta/malta.c                  | 1 +
 board/keymile/kmp204x/pci.c                 | 1 +
 board/mpc8308_p1m/mpc8308_p1m.c             | 1 +
 board/renesas/r7780mp/r7780mp.c             | 1 +
 board/sbc8349/pci.c                         | 1 +
 board/sbc8548/sbc8548.c                     | 1 +
 board/sbc8641d/sbc8641d.c                   | 1 +
 board/tqc/tqm834x/pci.c                     | 1 +
 board/varisys/cyrus/pci.c                   | 1 +
 board/ve8313/ve8313.c                       | 1 +
 board/xes/common/fsl_8xxx_pci.c             | 1 +
 drivers/pci/pci.c                           | 1 +
 drivers/pci/pcie_imx.c                      | 1 +
 include/common.h                            | 2 --
 include/init.h                              | 3 +++
 49 files changed, 50 insertions(+), 2 deletions(-)
board/armltd/integrator/pci.c +1 -0
index 5e57f7f4c96..c189d23eecd 100644
@@ -20,6 +20,7 @@
  * Linus Walleij <[email protected]>
  */
 #include <common.h>
+#include <init.h>
 #include <pci.h>
 #include <asm/io.h>
 #include "integrator-sc.h"
board/cavium/thunderx/thunderx.c +1 -0
index cf55b633c3e..940455de5b2 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 #include <malloc.h>
 #include <errno.h>
 #include <linux/compiler.h>
board/esd/vme8349/pci.c +1 -0
index 82347f258c9..349e7b567c4 100644
@@ -10,6 +10,7 @@
  * Based on MPC8349 PCI support but w/o PIB related code.
  */
 
+#include <init.h>
 #include <asm/mmu.h>
 #include <asm/io.h>
 #include <common.h>
board/freescale/b4860qds/pci.c +1 -0
index 3663b14bc37..45dd461e772 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <init.h>
 #include <pci.h>
 #include <asm/fsl_pci.h>
 #include <linux/libfdt.h>
board/freescale/common/p_corenet/pci.c +1 -0
index a6abe66dc0e..94e4715f1c9 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <init.h>
 #include <pci.h>
 #include <asm/fsl_pci.h>
 #include <linux/libfdt.h>
board/freescale/m54455evb/m54455evb.c +1 -0
index 98af3be595b..146cd918c4d 100644
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <pci.h>
 #include <asm/immap.h>
 #include <asm/io.h>
board/freescale/m547xevb/m547xevb.c +1 -0
index 9e1aa99bbcf..e8d86113d64 100644
@@ -9,6 +9,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <init.h>
 #include <pci.h>
 #include <asm/immap.h>
 #include <asm/io.h>
board/freescale/m548xevb/m548xevb.c +1 -0
index b4915184681..40e01c6f24f 100644
@@ -9,6 +9,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <init.h>
 #include <pci.h>
 #include <asm/immap.h>
 #include <asm/io.h>
board/freescale/mpc8308rdb/mpc8308rdb.c +1 -0
index fc29e2f0dce..ae73246e5bf 100644
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <hwconfig.h>
 #include <i2c.h>
+#include <init.h>
 #include <spi.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
board/freescale/mpc8315erdb/mpc8315erdb.c +1 -0
index 84b85f8b103..93e0fca083f 100644
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <hwconfig.h>
 #include <i2c.h>
+#include <init.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <pci.h>
board/freescale/mpc8323erdb/mpc8323erdb.c +1 -0
index 003e95cb6ba..cbec8a44e4d 100644
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <init.h>
 #include <ioports.h>
 #include <mpc83xx.h>
 #include <i2c.h>
board/freescale/mpc832xemds/pci.c +1 -0
index d94269a6ea4..45c7294832d 100644
@@ -6,6 +6,7 @@
 /*
  * PCI Configuration space access support for MPC83xx PCI Bridge
  */
+#include <init.h>
 #include <asm/mmu.h>
 #include <asm/io.h>
 #include <common.h>
board/freescale/mpc8349emds/pci.c +1 -0
index 005190ed87d..7615a1dfaa2 100644
@@ -3,6 +3,7 @@
  * Copyright (C) 2006-2009 Freescale Semiconductor, Inc.
  */
 
+#include <init.h>
 #include <asm/mmu.h>
 #include <asm/io.h>
 #include <common.h>
board/freescale/mpc8349itx/pci.c +1 -0
index c3c2328dcd2..550a2afcb73 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 
 #include <asm/mmu.h>
 #include <asm/io.h>
board/freescale/mpc837xemds/pci.c +1 -0
index 41b78cf5e4d..c72e49fbe1a 100644
@@ -3,6 +3,7 @@
  * Copyright (C) 2006-2009 Freescale Semiconductor, Inc.
  */
 
+#include <init.h>
 #include <asm/mmu.h>
 #include <asm/io.h>
 #include <common.h>
board/freescale/mpc837xerdb/pci.c +1 -0
index 38954587aba..07471e0ae56 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <mpc83xx.h>
 #include <pci.h>
 #include <asm/io.h>
board/freescale/mpc8541cds/mpc8541cds.c +1 -0
index be79a7ca7b8..cb130b4a86b 100644
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <pci.h>
 #include <vsprintf.h>
 #include <asm/processor.h>
board/freescale/mpc8544ds/mpc8544ds.c +1 -0
index dbfa80a216c..2d4aace98d0 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <init.h>
 #include <pci.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
board/freescale/mpc8548cds/mpc8548cds.c +1 -0
index 28f8a998ce7..a4455d3f612 100644
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <pci.h>
 #include <vsprintf.h>
 #include <asm/processor.h>
board/freescale/mpc8555cds/mpc8555cds.c +1 -0
index bc1ebc51edb..47193dd20e7 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <pci.h>
 #include <vsprintf.h>
 #include <asm/processor.h>
board/freescale/mpc8568mds/mpc8568mds.c +1 -0
index dd2d15ea00c..5167f81be71 100644
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <pci.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
board/freescale/mpc8610hpcd/mpc8610hpcd.c +1 -0
index 5c8538fa1d7..86edd66bca2 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <init.h>
 #include <pci.h>
 #include <asm/processor.h>
 #include <asm/immap_86xx.h>
board/freescale/mpc8641hpcn/mpc8641hpcn.c +1 -0
index ea4f3d670bb..d9e538b868f 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <pci.h>
 #include <asm/processor.h>
 #include <asm/immap_86xx.h>
board/freescale/qemu-ppce500/qemu-ppce500.c +1 -0
index 6814bed27c7..e5820659754 100644
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <cpu_legacy.h>
 #include <env.h>
+#include <init.h>
 #include <pci.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
board/freescale/t102xqds/pci.c +1 -0
index 4100370e209..1b1cc0483ca 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <init.h>
 #include <pci.h>
 #include <asm/fsl_pci.h>
 #include <linux/libfdt.h>
board/freescale/t102xrdb/pci.c +1 -0
index adc128d9241..bd0e29744c9 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <init.h>
 #include <pci.h>
 #include <asm/fsl_pci.h>
 #include <linux/libfdt.h>
board/freescale/t1040qds/pci.c +1 -0
index 9fd66594f4a..5152cdf18ac 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <init.h>
 #include <pci.h>
 #include <asm/fsl_pci.h>
 #include <linux/libfdt.h>
board/freescale/t104xrdb/pci.c +1 -0
index 6b666ba2d24..ff7cf364468 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <init.h>
 #include <pci.h>
 #include <asm/fsl_pci.h>
 #include <linux/libfdt.h>
board/freescale/t208xqds/pci.c +1 -0
index ef26f14c461..e3355927766 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <init.h>
 #include <pci.h>
 #include <asm/fsl_pci.h>
 #include <linux/libfdt.h>
board/freescale/t208xrdb/pci.c +1 -0
index adc128d9241..bd0e29744c9 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <init.h>
 #include <pci.h>
 #include <asm/fsl_pci.h>
 #include <linux/libfdt.h>
board/freescale/t4qds/pci.c +1 -0
index 4860ab6ed13..26e2a0af4aa 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <init.h>
 #include <pci.h>
 #include <asm/fsl_pci.h>
 #include <linux/libfdt.h>
board/freescale/t4rdb/pci.c +1 -0
index 7d670e1a2f8..ac0c95687a5 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <init.h>
 #include <pci.h>
 #include <asm/fsl_pci.h>
 #include <linux/libfdt.h>
board/gdsys/mpc8308/hrcon.c +1 -0
index 60faa4688cf..d1110157a2e 100644
@@ -8,6 +8,7 @@
 #include <env.h>
 #include <hwconfig.h>
 #include <i2c.h>
+#include <init.h>
 #include <spi.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
board/gdsys/mpc8308/strider.c +1 -0
index 886bc2b035d..9ba9e4278a5 100644
@@ -8,6 +8,7 @@
 #include <env.h>
 #include <hwconfig.h>
 #include <i2c.h>
+#include <init.h>
 #include <spi.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
board/imgtec/malta/malta.c +1 -0
index b742e3738f5..77ce75ecf26 100644
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <ide.h>
+#include <init.h>
 #include <netdev.h>
 #include <pci.h>
 #include <pci_gt64120.h>
board/keymile/kmp204x/pci.c +1 -0
index 965a8ce98b6..a8047457f24 100644
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <init.h>
 #include <pci.h>
 #include <asm/fsl_pci.h>
 #include <linux/libfdt.h>
board/mpc8308_p1m/mpc8308_p1m.c +1 -0
index ab724da0d2a..5b2fd9c23f6 100644
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <init.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <pci.h>
board/renesas/r7780mp/r7780mp.c +1 -0
index e2c5c5ba937..8dbeeb6e680 100644
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <ide.h>
+#include <init.h>
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <asm/pci.h>
board/sbc8349/pci.c +1 -0
index b173c9c5027..b6435f34f22 100644
@@ -7,6 +7,7 @@
  * Based on MPC8349 PCI support but w/o PIB related code.
  */
 
+#include <init.h>
 #include <asm/mmu.h>
 #include <asm/io.h>
 #include <common.h>
board/sbc8548/sbc8548.c +1 -0
index 0c36ded8627..d246dce36d0 100644
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <pci.h>
 #include <asm/processor.h>
 #include <asm/immap_85xx.h>
board/sbc8641d/sbc8641d.c +1 -0
index fb5db6c93d7..0a9dab89396 100644
@@ -13,6 +13,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <init.h>
 #include <pci.h>
 #include <asm/processor.h>
 #include <asm/immap_86xx.h>
board/tqc/tqm834x/pci.c +1 -0
index c9b05e44c24..08342077665 100644
@@ -5,6 +5,7 @@
  * Copyright (C) 2006-2009 Freescale Semiconductor, Inc.
  */
 
+#include <init.h>
 #include <asm/mmu.h>
 #include <asm/io.h>
 #include <common.h>
board/varisys/cyrus/pci.c +1 -0
index a2df928fc52..66c4b30eb10 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <init.h>
 #include <pci.h>
 #include <asm/fsl_pci.h>
 #include <linux/libfdt.h>
board/ve8313/ve8313.c +1 -0
index 1559ff210da..781a07f1d83 100644
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <linux/libfdt.h>
 #include <pci.h>
 #include <mpc83xx.h>
board/xes/common/fsl_8xxx_pci.c +1 -0
index 84ca4d12154..9981d04c622 100644
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <pci.h>
 #include <asm/fsl_pci.h>
 #include <asm/fsl_serdes.h>
drivers/pci/pci.c +1 -0
index 5db24f1c51d..e8285bf9363 100644
@@ -15,6 +15,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 
 #include <command.h>
 #include <env.h>
drivers/pci/pcie_imx.c +1 -0
index 10b8fb4c889..d53d6298bf3 100644
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <pci.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/iomux.h>
include/common.h +0 -2
index 3001296ff21..a292d919390 100644
@@ -102,8 +102,6 @@ int do_fat_fsload(cmd_tbl_t *, int, int, char * const []);
 /* common/cmd_ext2.c */
 int do_ext2load(cmd_tbl_t *, int, int, char * const []);
 
-void	pci_init_board(void);
-
 /* common/exports.c */
 void	jumptable_init(void);
 
include/init.h +3 -0
index e506cd30dd1..3b45e631fca 100644
@@ -205,6 +205,9 @@ int board_late_init(void);
 int board_postclk_init(void); /* after clocks/timebase, before env/serial */
 int board_early_init_r(void);
 
+/* TODO(sjg at chromium.org): Drop this when DM_PCI migration is completed */
+void pci_init_board(void);
+
 #endif	/* __ASSEMBLY__ */
 /* Put only stuff here that the assembler can digest */
 
Signature · 1 line
2.23.0.444.g18eeb5a265-goog
#39 lore raw

PATCH 39/41 common: Move trap_init() out of common.h

In reply to Simon Glass

Move this function into the irq_legacy.h header file.

---

 arch/m68k/lib/traps.c | 1 +
 arch/mips/lib/traps.c | 1 +
 include/common.h      | 1 -
 include/irq_legacy.h  | 2 ++
 4 files changed, 4 insertions(+), 1 deletion(-)
arch/m68k/lib/traps.c +1 -0
index 5d802077453..b2e7e9fe407 100644
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <irq_legacy.h>
 #include <watchdog.h>
 #include <command.h>
 #include <asm/processor.h>
arch/mips/lib/traps.c +1 -0
index ff02d437a87..d173a1b0134 100644
@@ -12,6 +12,7 @@
 
 #include <common.h>
 #include <cpu_legacy.h>
+#include <irq_legacy.h>
 #include <asm/mipsregs.h>
 #include <asm/addrspace.h>
 #include <asm/system.h>
include/common.h +0 -1
index a292d919390..e946e4d9b7f 100644
@@ -145,7 +145,6 @@ void	relocate_code(ulong);
 void	relocate_code(ulong, gd_t *, ulong) __attribute__ ((noreturn));
 #endif
 ulong	get_endaddr   (void);
-void	trap_init     (ulong);
 
 void s_init(void);
 
include/irq_legacy.h +2 -0
index 91b523d043a..a029c54b702 100644
@@ -21,4 +21,6 @@ void reset_timer(void);
 void enable_interrupts(void);
 int disable_interrupts(void);
 
+void trap_init(unsigned long reloc_addr);
+
 #endif
Signature · 1 line
2.23.0.444.g18eeb5a265-goog
#40 lore raw

PATCH 39/41 common: Move trap_init() out of common.h

Quoted 53 lines · Simon Glass

Move this function into the irq_legacy.h header file.

---

 arch/m68k/lib/traps.c | 1 +
 arch/mips/lib/traps.c | 1 +
 include/common.h      | 1 -
 include/irq_legacy.h  | 2 ++
 4 files changed, 4 insertions(+), 1 deletion(-)
arch/m68k/lib/traps.c +1 -0
index 5d802077453..b2e7e9fe407 100644
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <irq_legacy.h>
 #include <watchdog.h>
 #include <command.h>
 #include <asm/processor.h>
arch/mips/lib/traps.c +1 -0
index ff02d437a87..d173a1b0134 100644
@@ -12,6 +12,7 @@
 
 #include <common.h>
 #include <cpu_legacy.h>
+#include <irq_legacy.h>
 #include <asm/mipsregs.h>
 #include <asm/addrspace.h>
 #include <asm/system.h>
include/common.h +0 -1
index a292d919390..e946e4d9b7f 100644
@@ -145,7 +145,6 @@ void        relocate_code(ulong);
 void   relocate_code(ulong, gd_t *, ulong) __attribute__ ((noreturn));
 #endif
 ulong  get_endaddr   (void);
-void   trap_init     (ulong);
 
 void s_init(void);
 
include/irq_legacy.h +0 -0
index 91b523d043a..a029c54b702 100644

include/irq_legacy.h void reset_timer(void);

Quoted 7 lines
include/irq_legacy.h +2 -1
@@ -21,4 +21,6 @@ void reset_timer(void);
 void enable_interrupts(void);
 int disable_interrupts(void);
 
+void trap_init(unsigned long reloc_addr);
+
 #endif
--

hm, at least on MIPS this is regular CPU exception handling and has nothing to do with interrupts nor with DM. I don't know about M68 but there it looks like traps are used for exceptions and interrupts. I think it would better fit into a include/traps.h or so.

Signature · 1 line
- Daniel
#41 lore raw

PATCH 39/41 common: Move trap_init() out of common.h

Hi Daniel,

Quoted 58 lines · Daniel Schwierzeck
Quoted 56 lines · Simon Glass

Move this function into the irq_legacy.h header file.

---

 arch/m68k/lib/traps.c | 1 +
 arch/mips/lib/traps.c | 1 +
 include/common.h      | 1 -
 include/irq_legacy.h  | 2 ++
 4 files changed, 4 insertions(+), 1 deletion(-)
arch/m68k/lib/traps.c +1 -0
index 5d802077453..b2e7e9fe407 100644
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <irq_legacy.h>
 #include <watchdog.h>
 #include <command.h>
 #include <asm/processor.h>
arch/mips/lib/traps.c +1 -0
index ff02d437a87..d173a1b0134 100644
@@ -12,6 +12,7 @@
 
 #include <common.h>
 #include <cpu_legacy.h>
+#include <irq_legacy.h>
 #include <asm/mipsregs.h>
 #include <asm/addrspace.h>
 #include <asm/system.h>
include/common.h +0 -1
index a292d919390..e946e4d9b7f 100644
@@ -145,7 +145,6 @@ void        relocate_code(ulong);
 void   relocate_code(ulong, gd_t *, ulong) __attribute__ ((noreturn));
 #endif
 ulong  get_endaddr   (void);
-void   trap_init     (ulong);
 
 void s_init(void);
 
include/irq_legacy.h +0 -0
index 91b523d043a..a029c54b702 100644
@@ -21,4 +21,6 @@ void reset_timer(void);
 void enable_interrupts(void);
 int disable_interrupts(void);
 
Quoted 9 lines

include/irq_legacy.h void reset_timer(void);

Quoted 4 lines
include/irq_legacy.h +2 -1
+void trap_init(unsigned long reloc_addr);
+
 #endif
--

hm, at least on MIPS this is regular CPU exception handling and has nothing to do with interrupts nor with DM. I don't know about M68 but there it looks like traps are used for exceptions and interrupts. I think it would better fit into a include/traps.h or so.

I think we tend to think of interrupts and exceptions as being similar.

Are you suggesting creating a new traps_legacy.h?

Regards,
Simon

#42 lore raw

PATCH 39/41 common: Move trap_init() out of common.h

Quoted 73 lines · Simon Glass

Hi Daniel,

Quoted 58 lines · Daniel Schwierzeck
Quoted 56 lines · Simon Glass

Move this function into the irq_legacy.h header file.

---

 arch/m68k/lib/traps.c | 1 +
 arch/mips/lib/traps.c | 1 +
 include/common.h      | 1 -
 include/irq_legacy.h  | 2 ++
 4 files changed, 4 insertions(+), 1 deletion(-)
arch/m68k/lib/traps.c +1 -0
index 5d802077453..b2e7e9fe407 100644
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <irq_legacy.h>
 #include <watchdog.h>
 #include <command.h>
 #include <asm/processor.h>
arch/mips/lib/traps.c +1 -0
index ff02d437a87..d173a1b0134 100644
@@ -12,6 +12,7 @@
 
 #include <common.h>
 #include <cpu_legacy.h>
+#include <irq_legacy.h>
 #include <asm/mipsregs.h>
 #include <asm/addrspace.h>
 #include <asm/system.h>
include/common.h +0 -1
index a292d919390..e946e4d9b7f 100644
@@ -145,7 +145,6 @@ void        relocate_code(ulong);
 void   relocate_code(ulong, gd_t *, ulong) __attribute__ ((noreturn));
 #endif
 ulong  get_endaddr   (void);
-void   trap_init     (ulong);
 
 void s_init(void);
 
include/irq_legacy.h +0 -0
index 91b523d043a..a029c54b702 100644
@@ -21,4 +21,6 @@ void reset_timer(void);
 void enable_interrupts(void);
 int disable_interrupts(void);
 
Quoted 9 lines

include/irq_legacy.h void reset_timer(void);

Quoted 4 lines
include/irq_legacy.h +2 -1
+void trap_init(unsigned long reloc_addr);
+
 #endif
--

hm, at least on MIPS this is regular CPU exception handling and has nothing to do with interrupts nor with DM. I don't know about M68 but there it looks like traps are used for exceptions and interrupts. I think it would better fit into a include/traps.h or so.

Quoted 4 lines

I think we tend to think of interrupts and exceptions as being similar.

Are you suggesting creating a new traps_legacy.h?

either traps.h without _legacy because this code is not legacy at all. As far as I understand from your patch series, you're mainly using _legacy to separate non-DM code?

Another option would be init.h because board_init_r.c:initr_trap() is the only caller.

Signature · 1 line
- Daniel
#43 lore raw

PATCH 39/41 common: Move trap_init() out of common.h

Quoted 79 lines · Daniel Schwierzeck
Quoted 73 lines · Simon Glass

Hi Daniel,

Quoted 58 lines · Daniel Schwierzeck
Quoted 56 lines · Simon Glass

Move this function into the irq_legacy.h header file.

---

 arch/m68k/lib/traps.c | 1 +
 arch/mips/lib/traps.c | 1 +
 include/common.h      | 1 -
 include/irq_legacy.h  | 2 ++
 4 files changed, 4 insertions(+), 1 deletion(-)
arch/m68k/lib/traps.c +1 -0
index 5d802077453..b2e7e9fe407 100644
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <irq_legacy.h>
 #include <watchdog.h>
 #include <command.h>
 #include <asm/processor.h>
arch/mips/lib/traps.c +1 -0
index ff02d437a87..d173a1b0134 100644
@@ -12,6 +12,7 @@
 
 #include <common.h>
 #include <cpu_legacy.h>
+#include <irq_legacy.h>
 #include <asm/mipsregs.h>
 #include <asm/addrspace.h>
 #include <asm/system.h>
include/common.h +0 -1
index a292d919390..e946e4d9b7f 100644
@@ -145,7 +145,6 @@ void        relocate_code(ulong);
 void   relocate_code(ulong, gd_t *, ulong) __attribute__ ((noreturn));
 #endif
 ulong  get_endaddr   (void);
-void   trap_init     (ulong);
 
 void s_init(void);
 
include/irq_legacy.h +0 -0
index 91b523d043a..a029c54b702 100644
@@ -21,4 +21,6 @@ void reset_timer(void);
 void enable_interrupts(void);
 int disable_interrupts(void);
 
Quoted 9 lines

include/irq_legacy.h void reset_timer(void);

Quoted 4 lines
include/irq_legacy.h +2 -1
+void trap_init(unsigned long reloc_addr);
+
 #endif
--

hm, at least on MIPS this is regular CPU exception handling and has nothing to do with interrupts nor with DM. I don't know about M68 but there it looks like traps are used for exceptions and interrupts. I think it would better fit into a include/traps.h or so.

Quoted 4 lines

I think we tend to think of interrupts and exceptions as being similar.

Are you suggesting creating a new traps_legacy.h?

Quoted 6 lines

either traps.h without _legacy because this code is not legacy at all. As far as I understand from your patch series, you're mainly using _legacy to separate non-DM code?

Another option would be init.h because board_init_r.c:initr_trap() is the only caller.

Yes, we need to be careful when calling something legacy or not. init.h also sounds like a good place in this case, thanks!

Signature · 1 line
Tom
#44 lore raw

PATCH 39/41 common: Move trap_init() out of common.h

In reply to Daniel Schwierzeck

Hi Daniel,

Quoted 75 lines · Daniel Schwierzeck
Quoted 73 lines · Simon Glass

Hi Daniel,

Quoted 67 lines · Daniel Schwierzeck
Quoted 53 lines · Simon Glass

Move this function into the irq_legacy.h header file.

---

 arch/m68k/lib/traps.c | 1 +
 arch/mips/lib/traps.c | 1 +
 include/common.h      | 1 -
 include/irq_legacy.h  | 2 ++
 4 files changed, 4 insertions(+), 1 deletion(-)
arch/m68k/lib/traps.c +1 -0
index 5d802077453..b2e7e9fe407 100644
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <irq_legacy.h>
 #include <watchdog.h>
 #include <command.h>
 #include <asm/processor.h>
arch/mips/lib/traps.c +1 -0
index ff02d437a87..d173a1b0134 100644
@@ -12,6 +12,7 @@
 
 #include <common.h>
 #include <cpu_legacy.h>
+#include <irq_legacy.h>
 #include <asm/mipsregs.h>
 #include <asm/addrspace.h>
 #include <asm/system.h>
include/common.h +0 -1
index a292d919390..e946e4d9b7f 100644
@@ -145,7 +145,6 @@ void        relocate_code(ulong);
 void   relocate_code(ulong, gd_t *, ulong) __attribute__ ((noreturn));
 #endif
 ulong  get_endaddr   (void);
-void   trap_init     (ulong);
 
 void s_init(void);
 
include/irq_legacy.h +0 -0
index 91b523d043a..a029c54b702 100644

include/irq_legacy.h void reset_timer(void);

Quoted 7 lines
include/irq_legacy.h +2 -1
@@ -21,4 +21,6 @@ void reset_timer(void);
 void enable_interrupts(void);
 int disable_interrupts(void);
 
+void trap_init(unsigned long reloc_addr);
+
 #endif
--

hm, at least on MIPS this is regular CPU exception handling and has nothing to do with interrupts nor with DM. I don't know about M68 but there it looks like traps are used for exceptions and interrupts. I think it would better fit into a include/traps.h or so.

Quoted 8 lines
Quoted 4 lines

I think we tend to think of interrupts and exceptions as being similar.

Are you suggesting creating a new traps_legacy.h?

either traps.h without _legacy because this code is not legacy at all. As far as I understand from your patch series, you're mainly using _legacy to separate non-DM code?

Yes that's right. It makes it clear what needs changing. It would be worth thinking about how to include traps_init() into a driver somewhere.

Quoted 3 lines

Another option would be init.h because board_init_r.c:initr_trap() is the only caller.

That sounds good.

Regards,
SImon

#45 lore raw

PATCH 40/41 common: Drop get_endaddr()

In reply to Simon Glass

This is not used in U-Boot. Drop it.

---

 include/common.h | 1 -
 1 file changed, 1 deletion(-)
include/common.h +0 -1
index e946e4d9b7f..64d0cf542e8 100644
@@ -144,7 +144,6 @@ void	relocate_code(ulong);
 #else
 void	relocate_code(ulong, gd_t *, ulong) __attribute__ ((noreturn));
 #endif
-ulong	get_endaddr   (void);
 
 void s_init(void);
 
Signature · 1 line
2.23.0.444.g18eeb5a265-goog
#46 lore raw

PATCH 41/41 common: Move old EEPROM functions into a new header

In reply to Simon Glass

These functions do not use driver model but are still used. Move them to a new eeprom_legacy.h header file.

---

 board/atmel/common/mac_eeprom.c               |  1 +
 board/compulab/common/eeprom.c                |  1 +
 board/corscience/tricorder/tricorder-eeprom.c |  1 +
 board/dhelectronics/dh_imx6/dh_imx6.c         |  1 +
 board/freescale/mpc8323erdb/mpc8323erdb.c     |  1 +
 board/kosagi/novena/novena.c                  |  1 +
 board/phytec/phycore_rk3288/phycore-rk3288.c  |  1 +
 board/rockchip/tinker_rk3288/tinker-rk3288.c  |  1 +
 board/samtec/vining_fpga/socfpga.c            |  1 +
 board/ti/am43xx/board.c                       |  1 +
 board/ti/common/board_detect.c                |  1 +
 board/ti/ks2_evm/board_k2g.c                  |  1 +
 cmd/eeprom.c                                  |  1 +
 drivers/misc/i2c_eeprom.c                     |  1 +
 drivers/mtd/mw_eeprom.c                       |  1 +
 drivers/rtc/rv3029.c                          |  1 +
 env/eeprom.c                                  |  1 +
 include/common.h                              | 15 ------------
 include/eeprom_legacy.h                       | 24 +++++++++++++++++++
 19 files changed, 41 insertions(+), 15 deletions(-)
 create mode 100644 include/eeprom_legacy.h
board/atmel/common/mac_eeprom.c +1 -0
index 83a7778e995..cb9df31a6aa 100644
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <eeprom_legacy.h>
 #include <env.h>
 #include <i2c_eeprom.h>
 #include <netdev.h>
board/compulab/common/eeprom.c +1 -0
index 81f69d38502..7e4ce893672 100644
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <eeprom_legacy.h>
 #include <i2c.h>
 #include <eeprom_layout.h>
 #include <eeprom_field.h>
board/corscience/tricorder/tricorder-eeprom.c +1 -0
index b28189dafdc..faec265fd93 100644
@@ -5,6 +5,7 @@
  * Andreas Bießmann <[email protected]>
  */
 #include <common.h>
+#include <eeprom_legacy.h>
 #include <i2c.h>
 #include <u-boot/crc.h>
 
board/dhelectronics/dh_imx6/dh_imx6.c +1 -0
index 85e281ebb9c..3abfcc6694e 100644
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <eeprom_legacy.h>
 #include <init.h>
 #include <dm/device-internal.h>
 #include <asm/arch/clock.h>
board/freescale/mpc8323erdb/mpc8323erdb.c +1 -0
index cbec8a44e4d..a6f4dd06c25 100644
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <eeprom_legacy.h>
 #include <env.h>
 #include <init.h>
 #include <ioports.h>
board/kosagi/novena/novena.c +1 -0
index e4f0e81004e..9b2bd8f1dcf 100644
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <eeprom_legacy.h>
 #include <init.h>
 #include <dm/device-internal.h>
 #include <ahci.h>
board/phytec/phycore_rk3288/phycore-rk3288.c +1 -0
index dac59cd55df..da3119d3cec 100644
@@ -4,6 +4,7 @@
  * Author: Wadim Egorov <[email protected]>
  */
 
+#include <eeprom_legacy.h>
 #include <init.h>
 #include <asm/io.h>
 #include <common.h>
board/rockchip/tinker_rk3288/tinker-rk3288.c +1 -0
index 93e9d2f4653..740d309747d 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <eeprom_legacy.h>
 #include <env.h>
 #include <i2c_eeprom.h>
 #include <init.h>
board/samtec/vining_fpga/socfpga.c +1 -0
index 1ea89063889..9a57b3deefb 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <eeprom_legacy.h>
 #include <env.h>
 #include <init.h>
 #include <status_led.h>
board/ti/am43xx/board.c +1 -0
index c4018498aad..99ab7c86cc9 100644
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <eeprom_legacy.h>
 #include <env.h>
 #include <i2c.h>
 #include <init.h>
board/ti/common/board_detect.c +1 -0
index bc89cc57bd7..79f6ea423d6 100644
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <eeprom_legacy.h>
 #include <asm/arch/hardware.h>
 #include <asm/omap_common.h>
 #include <dm/uclass.h>
board/ti/ks2_evm/board_k2g.c +1 -0
index a0fd03a39fb..05f17727251 100644
@@ -6,6 +6,7 @@
  *     Texas Instruments Incorporated, <www.ti.com>
  */
 #include <common.h>
+#include <eeprom_legacy.h>
 #include <env.h>
 #include <init.h>
 #include <asm/arch/clock.h>
cmd/eeprom.c +1 -0
index 19953df082f..8ed27a66215 100644
@@ -22,6 +22,7 @@
 #include <common.h>
 #include <config.h>
 #include <command.h>
+#include <eeprom_legacy.h>
 #include <i2c.h>
 #include <eeprom_layout.h>
 
drivers/misc/i2c_eeprom.c +1 -0
index 8f2349ad5a7..8999b05f4a5 100644
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <eeprom_legacy.h>
 #include <linux/err.h>
 #include <linux/kernel.h>
 #include <dm.h>
drivers/mtd/mw_eeprom.c +1 -0
index f7791b51a04..a2453902d44 100644
@@ -1,6 +1,7 @@
 /* Three-wire (MicroWire) serial eeprom driver (for 93C46 and compatibles) */
 
 #include <common.h>
+#include <eeprom_legacy.h>
 #include <asm/ic/ssi.h>
 
 /*
drivers/rtc/rv3029.c +1 -0
index 38acb9c9924..de9b68959fc 100644
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <command.h>
 #include <dm.h>
+#include <eeprom_legacy.h>
 #include <i2c.h>
 #include <rtc.h>
 
env/eeprom.c +1 -0
index f0bdf2a1416..cfd5dba10a6 100644
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <eeprom_legacy.h>
 #include <env.h>
 #include <env_internal.h>
 #include <linux/stddef.h>
include/common.h +0 -15
index 64d0cf542e8..8b37b587474 100644
@@ -116,21 +116,6 @@ phys_size_t get_effective_memsize(void);
 void	reset_phy     (void);
 void	fdc_hw_init   (void);
 
-/* $(BOARD)/eeprom.c */
-#ifdef CONFIG_CMD_EEPROM
-void eeprom_init  (int bus);
-int  eeprom_read  (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cnt);
-int  eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cnt);
-#else
-/*
- * Some EEPROM code is depecated because it used the legacy I2C interface. Add
- * some macros here so we don't have to touch every one of those uses
- */
-#define eeprom_init(bus)
-#define eeprom_read(dev_addr, offset, buffer, cnt) ((void)-ENOSYS)
-#define eeprom_write(dev_addr, offset, buffer, cnt) ((void)-ENOSYS)
-#endif
-
 #if !defined(CONFIG_ENV_EEPROM_IS_ON_I2C) && defined(CONFIG_SYS_I2C_EEPROM_ADDR)
 # define CONFIG_SYS_DEF_EEPROM_ADDR CONFIG_SYS_I2C_EEPROM_ADDR
 #endif
include/eeprom_legacy.h new file +24 -0
new file mode 100644
index 00000000000..61eb826a734
@@ -0,0 +1,24 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * (C) Copyright 2000-2009
+ * Wolfgang Denk, DENX Software Engineering, wd at denx.de.
+ */
+
+#ifndef __EEPROM_LEGACY_H
+#define __EEPROM_LEGACY_H
+
+#ifdef CONFIG_CMD_EEPROM
+void eeprom_init(int bus);
+int eeprom_read(uint dev_addr, uint offset, uchar *buffer, uint cnt);
+int eeprom_write(uint dev_addr, uint offset, uchar *buffer, uint cnt);
+#else
+/*
+ * Some EEPROM code is depecated because it used the legacy I2C interface. Add
+ * some macros here so we don't have to touch every one of those uses
+ */
+#define eeprom_init(bus)
+#define eeprom_read(dev_addr, offset, buffer, cnt) ((void)-ENOSYS)
+#define eeprom_write(dev_addr, offset, buffer, cnt) ((void)-ENOSYS)
+#endif
+
+#endif
Signature · 1 line
2.23.0.444.g18eeb5a265-goog