All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/22] common: Further reduce the size of common.h
@ 2020-05-10 17:39 Simon Glass
  2020-05-10 17:39 ` [PATCH v3 01/22] common: Drop uuid.h from common header Simon Glass
                   ` (22 more replies)
  0 siblings, 23 replies; 53+ messages in thread
From: Simon Glass @ 2020-05-10 17:39 UTC (permalink / raw)
  To: u-boot

This is yet another series to remove the contents of common.h so that
individual files include the headers they need.

With this series there are only 14 includes left.

In order to get this far the commits include a number of small clean-ups:

- Fixing code style like 'udelay (2)' to 'udelay(1)
- Dropping typedefs so that forward struct declarations can be used
- Actually adding common.h in a few files where it is missing (thus
   causing inconsistent blk.h config in EFI, for example)

Unfortunately removing a header from common.h does not always just affect
the files that rely on that header. For example, removing net.h from
common.h created problems since net.h itself includes a lots of headers.
Rather than blindly add net.h to each of those files, I chose to add what
those files actually needed.

Changes in v3:
- Update imxrt1020-evk, etc.
- Update stm32mp15_optee, etc.
- Update vocore2, etc.
- Rebase to master
- Addition fix for xilinx_zynqmp_mini etc.

Changes in v2:
- Split out code-style changes for flash functions into a new patch
- Adjustments for more boards
- Adjustments for chromebook_coral, etc.
- Split out code-style changes for log functions into a new patch
- Split out code-style changes for time functions into a new patch
- Add new patch to fix occurances of __ASSEMBLER__

Simon Glass (22):
  common: Drop uuid.h from common header
  flash: Tidy up coding style for flash functions
  common: Drop flash.h from common header
  arm: Don't include common.h in header files
  common: Drop net.h from common header
  part: Drop disk_partition_t typedef
  common: Drop part.h from common header
  bootstage: Use BOOTSTAGE instead of BOOTSTATE
  common: Drop bootstage.h from common header
  common: Drop image.h from common header
  common: Drop init.h from common header
  command: Remove the cmd_tbl_t typedef
  Fix some checkpatch warnings in calls to debug()
  common: Drop log.h from common header
  common: Drop asm/ptrace.h from common header
  common: Drop asm_offsets.h from common header
  common: Drop linux/bug.h from common header
  common: Drop linux/stringify.h from common header
  Fix some checkpatch warnings in calls to udelay()
  common: Drop linux/delay.h from common header
  Use __ASSEMBLY__ as the assembly macros
  common: Drop linux/bitops.h from common header

 api/api.c                                     |   1 +
 api/api_display.c                             |   1 +
 api/api_storage.c                             |   1 +
 arch/arc/include/asm/arcregs.h                |   2 +
 arch/arc/lib/bootm.c                          |   7 +-
 arch/arc/lib/cache.c                          |   1 +
 arch/arc/lib/cpu.c                            |   2 +
 arch/arc/lib/init_helpers.c                   |   1 +
 arch/arc/lib/relocate.c                       |   1 +
 arch/arc/lib/reset.c                          |   2 +-
 arch/arm/cpu/arm11/cpu.c                      |   1 +
 arch/arm/cpu/arm1136/mx31/generic.c           |   1 +
 arch/arm/cpu/arm1136/mx31/timer.c             |   1 +
 arch/arm/cpu/arm1136/mx35/generic.c           |   7 +-
 arch/arm/cpu/arm1136/mx35/timer.c             |   2 +
 arch/arm/cpu/arm920t/ep93xx/timer.c           |   2 +
 arch/arm/cpu/arm920t/imx/timer.c              |   3 +-
 arch/arm/cpu/arm926ejs/armada100/cpu.c        |   1 +
 arch/arm/cpu/arm926ejs/armada100/dram.c       |   1 +
 arch/arm/cpu/arm926ejs/armada100/timer.c      |   2 +
 arch/arm/cpu/arm926ejs/cache.c                |   1 +
 arch/arm/cpu/arm926ejs/cpu.c                  |   1 +
 arch/arm/cpu/arm926ejs/lpc32xx/cpu.c          |   2 +
 arch/arm/cpu/arm926ejs/lpc32xx/dram.c         |   1 +
 arch/arm/cpu/arm926ejs/lpc32xx/timer.c        |   2 +
 arch/arm/cpu/arm926ejs/mx25/generic.c         |   2 +
 arch/arm/cpu/arm926ejs/mx25/timer.c           |   2 +
 arch/arm/cpu/arm926ejs/mx27/generic.c         |   1 +
 arch/arm/cpu/arm926ejs/mx27/timer.c           |   3 +
 arch/arm/cpu/arm926ejs/mxs/clock.c            |   1 +
 arch/arm/cpu/arm926ejs/mxs/mxs.c              |   7 +-
 arch/arm/cpu/arm926ejs/mxs/spl_boot.c         |   2 +
 arch/arm/cpu/arm926ejs/mxs/spl_lradc_init.c   |   1 +
 arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c     |   1 +
 arch/arm/cpu/arm926ejs/mxs/spl_power_init.c   |   1 +
 arch/arm/cpu/arm926ejs/mxs/timer.c            |   2 +
 arch/arm/cpu/arm926ejs/spear/cpu.c            |   4 +-
 arch/arm/cpu/arm926ejs/spear/reset.c          |   1 +
 arch/arm/cpu/arm926ejs/spear/spl.c            |   2 +
 arch/arm/cpu/arm926ejs/spear/spr_misc.c       |   3 +-
 arch/arm/cpu/arm926ejs/spear/timer.c          |   3 +
 arch/arm/cpu/armv7/arch_timer.c               |   1 +
 arch/arm/cpu/armv7/bcm235xx/clk-core.c        |   2 +
 arch/arm/cpu/armv7/bcm235xx/clk-core.h        |   1 +
 arch/arm/cpu/armv7/bcm235xx/clk-eth.c         |   1 +
 arch/arm/cpu/armv7/bcm281xx/clk-core.c        |   2 +
 arch/arm/cpu/armv7/bcm281xx/clk-core.h        |   1 +
 arch/arm/cpu/armv7/bcm281xx/clk-eth.c         |   1 +
 arch/arm/cpu/armv7/cache_v7.c                 |   1 +
 arch/arm/cpu/armv7/exception_level.c          |   1 +
 .../cpu/armv7/iproc-common/hwinit-common.c    |   1 +
 arch/arm/cpu/armv7/iproc-common/timer.c       |   2 +
 .../arm/cpu/armv7/kona-common/hwinit-common.c |   1 +
 arch/arm/cpu/armv7/ls102xa/cpu.c              |   3 +
 arch/arm/cpu/armv7/ls102xa/fdt.c              |   1 +
 arch/arm/cpu/armv7/ls102xa/soc.c              |   1 +
 arch/arm/cpu/armv7/ls102xa/timer.c            |   2 +
 arch/arm/cpu/armv7/mpu_v7r.c                  |   1 +
 arch/arm/cpu/armv7/s5p-common/cpu_info.c      |   1 +
 arch/arm/cpu/armv7/s5p-common/timer.c         |   2 +
 arch/arm/cpu/armv7/stv0991/reset.c            |   1 +
 arch/arm/cpu/armv7/stv0991/timer.c            |   2 +
 arch/arm/cpu/armv7/sunxi/psci.c               |   1 +
 arch/arm/cpu/armv7/sunxi/timer.c              |   2 +
 arch/arm/cpu/armv7/vf610/generic.c            |   8 +-
 arch/arm/cpu/armv7/vf610/timer.c              |   2 +
 arch/arm/cpu/armv7/virt-dt.c                  |   1 +
 arch/arm/cpu/armv7/virt-v7.c                  |   1 +
 arch/arm/cpu/armv7m/cache.c                   |   3 +
 arch/arm/cpu/armv7m/systick-timer.c           |   2 +
 arch/arm/cpu/armv8/cache_v8.c                 |   2 +
 arch/arm/cpu/armv8/cpu-dt.c                   |   1 +
 arch/arm/cpu/armv8/cpu.c                      |   1 +
 arch/arm/cpu/armv8/exception_level.c          |   2 +
 arch/arm/cpu/armv8/fsl-layerscape/cpu.c       |   4 +
 arch/arm/cpu/armv8/fsl-layerscape/fdt.c       |   2 +
 .../armv8/fsl-layerscape/fsl_lsch2_serdes.c   |   2 +
 .../armv8/fsl-layerscape/fsl_lsch3_serdes.c   |   4 +
 .../arm/cpu/armv8/fsl-layerscape/ls1028_ids.c |   2 +
 arch/arm/cpu/armv8/fsl-layerscape/mp.c        |   5 +-
 arch/arm/cpu/armv8/fsl-layerscape/ppa.c       |   2 +
 arch/arm/cpu/armv8/fsl-layerscape/soc.c       |   2 +
 arch/arm/cpu/armv8/fsl-layerscape/spl.c       |   4 +
 arch/arm/cpu/armv8/fwcall.c                   |   2 +
 arch/arm/cpu/armv8/generic_timer.c            |   2 +
 arch/arm/cpu/armv8/hisilicon/pinmux.c         |   2 +
 arch/arm/cpu/armv8/s32v234/cpu.c              |   3 +
 arch/arm/cpu/armv8/s32v234/generic.c          |   2 +
 arch/arm/cpu/armv8/sec_firmware.c             |   5 +
 arch/arm/cpu/pxa/cache.c                      |   1 +
 arch/arm/cpu/pxa/cpuinfo.c                    |   1 +
 arch/arm/cpu/pxa/pxa2xx.c                     |   2 +
 arch/arm/cpu/pxa/timer.c                      |   1 +
 arch/arm/cpu/pxa/usb.c                        |   1 +
 arch/arm/cpu/sa1100/timer.c                   |   3 +-
 .../include/asm/arch-am33xx/clk_synthesizer.h |   2 -
 arch/arm/include/asm/arch-am33xx/cpu.h        |   1 +
 .../include/asm/arch-am33xx/hardware_am43xx.h |   4 +
 arch/arm/include/asm/arch-am33xx/mux.h        |   1 -
 arch/arm/include/asm/arch-am33xx/mux_am33xx.h |   1 -
 arch/arm/include/asm/arch-am33xx/mux_am43xx.h |   1 -
 arch/arm/include/asm/arch-am33xx/mux_ti816x.h |   1 -
 .../include/asm/arch-fsl-layerscape/clock.h   |   2 -
 .../include/asm/arch-fsl-layerscape/config.h  |   4 +
 .../asm/arch-fsl-layerscape/immap_lsch2.h     |   3 +
 .../asm/arch-fsl-layerscape/immap_lsch3.h     |   2 +-
 arch/arm/include/asm/arch-hi3660/hi3660.h     |   4 +
 arch/arm/include/asm/arch-imx8/iomux.h        |   4 +
 arch/arm/include/asm/arch-imx8/sci/sci.h      |   1 +
 .../arm/include/asm/arch-imx8m/clock_imx8mm.h |   4 +
 .../arm/include/asm/arch-imx8m/clock_imx8mq.h |   4 +
 arch/arm/include/asm/arch-lpc32xx/dma.h       |   2 -
 arch/arm/include/asm/arch-lpc32xx/i2c.h       |   1 -
 arch/arm/include/asm/arch-ls102xa/clock.h     |   2 -
 arch/arm/include/asm/arch-meson/axg.h         |   4 +
 arch/arm/include/asm/arch-meson/g12a.h        |   4 +
 arch/arm/include/asm/arch-meson/gx.h          |   4 +
 arch/arm/include/asm/arch-meson/sd_emmc.h     |   4 +
 arch/arm/include/asm/arch-mx25/clock.h        |   2 -
 arch/arm/include/asm/arch-mx27/regs-rtc.h     |   2 +-
 arch/arm/include/asm/arch-mx31/clock.h        |   2 -
 arch/arm/include/asm/arch-mx35/clock.h        |   2 -
 arch/arm/include/asm/arch-mx5/clock.h         |   2 -
 arch/arm/include/asm/arch-mx5/imx-regs.h      |   2 +-
 arch/arm/include/asm/arch-mx6/clock.h         |   7 +-
 arch/arm/include/asm/arch-mx6/imx-regs.h      |   3 +-
 arch/arm/include/asm/arch-mx7/clock.h         |   1 -
 arch/arm/include/asm/arch-mx7/imx-regs.h      |   3 +-
 arch/arm/include/asm/arch-mx7/mx7-ddr.h       |   4 +
 arch/arm/include/asm/arch-mx7ulp/clock.h      |   1 -
 arch/arm/include/asm/arch-mx7ulp/pcc.h        |   1 -
 arch/arm/include/asm/arch-mx7ulp/scg.h        |   2 -
 arch/arm/include/asm/arch-omap4/clock.h       |   1 -
 arch/arm/include/asm/arch-omap5/clock.h       |   1 -
 .../include/asm/arch-omap5/dra7xx_iodelay.h   |   1 -
 arch/arm/include/asm/arch-rk3308/cru_rk3308.h |   2 -
 arch/arm/include/asm/arch-rk3308/grf_rk3308.h |   2 -
 arch/arm/include/asm/arch-rockchip/cru.h      |   4 +
 arch/arm/include/asm/arch-rockchip/cru_px30.h |   2 -
 .../include/asm/arch-rockchip/cru_rk3036.h    |   2 -
 .../include/asm/arch-rockchip/cru_rk3128.h    |   4 +-
 .../include/asm/arch-rockchip/cru_rk322x.h    |   2 -
 .../include/asm/arch-rockchip/cru_rk3328.h    |   2 -
 .../include/asm/arch-rockchip/cru_rk3368.h    |   5 +-
 .../include/asm/arch-rockchip/cru_rk3399.h    |   2 -
 .../include/asm/arch-rockchip/cru_rv1108.h    |   4 +-
 .../include/asm/arch-rockchip/ddr_rk3368.h    |   4 +
 arch/arm/include/asm/arch-rockchip/grf_px30.h |   2 -
 .../include/asm/arch-rockchip/grf_rk3036.h    |   2 -
 .../include/asm/arch-rockchip/grf_rk3128.h    |   2 -
 .../include/asm/arch-rockchip/grf_rk322x.h    |   2 -
 .../include/asm/arch-rockchip/grf_rk3368.h    |   4 +-
 .../include/asm/arch-rockchip/grf_rv1108.h    |   2 -
 .../include/asm/arch-rockchip/lvds_rk3288.h   |   4 +
 .../asm/arch-rockchip/sdram_pctl_px30.h       |   4 +
 .../asm/arch-rockchip/sdram_phy_px30.h        |   4 +
 .../include/asm/arch-rockchip/sdram_rk3036.h  |   2 -
 .../include/asm/arch-rockchip/sdram_rk322x.h  |   4 +-
 .../include/asm/arch-rockchip/sdram_rk3399.h  |   3 +
 arch/arm/include/asm/arch-s32v234/clock.h     |   2 -
 arch/arm/include/asm/arch-s32v234/imx-regs.h  |   2 +-
 arch/arm/include/asm/arch-stih410/sdhci.h     |   4 +
 arch/arm/include/asm/arch-stm32f4/stm32_pwr.h |   5 +
 arch/arm/include/asm/arch-stm32f7/stm32_pwr.h |   5 +
 arch/arm/include/asm/arch-stm32f7/syscfg.h    |   4 +
 arch/arm/include/asm/arch-sunxi/ccu.h         |   4 +
 .../include/asm/arch-sunxi/clock_sun50i_h6.h  |   4 +
 arch/arm/include/asm/arch-sunxi/clock_sun9i.h |   4 +
 .../include/asm/arch-sunxi/dram_sun50i_h6.h   |   3 +
 arch/arm/include/asm/arch-sunxi/dram_sun6i.h  |   4 +
 .../include/asm/arch-sunxi/dram_sun8i_a33.h   |   4 +
 .../include/asm/arch-sunxi/dram_sun8i_a83t.h  |   4 +
 arch/arm/include/asm/arch-sunxi/dram_sun9i.h  |   4 +
 arch/arm/include/asm/arch-sunxi/pwm.h         |   4 +
 arch/arm/include/asm/arch-sunxi/rsb.h         |   1 -
 arch/arm/include/asm/arch-tegra/cboot.h       |   3 +
 arch/arm/include/asm/arch-tegra/dc.h          |   4 +
 arch/arm/include/asm/arch-tegra/ivc.h         |   2 -
 arch/arm/include/asm/arch-tegra/pmc.h         |   4 +
 arch/arm/include/asm/arch-tegra/tegra_mmc.h   |   1 -
 arch/arm/include/asm/arch-tegra124/flow.h     |   4 +
 arch/arm/include/asm/arch-vf610/clock.h       |   2 -
 arch/arm/include/asm/arch-vf610/imx-regs.h    |   3 +-
 arch/arm/include/asm/armv7_mpu.h              |   4 +
 arch/arm/include/asm/bitops.h                 |  10 +-
 arch/arm/include/asm/dma-mapping.h            |   2 +-
 arch/arm/include/asm/emif.h                   |   1 -
 arch/arm/include/asm/gic-v3.h                 |   4 +
 arch/arm/include/asm/mach-imx/dma.h           |   1 +
 arch/arm/include/asm/mach-imx/iomux-v3.h      |   2 +-
 arch/arm/include/asm/mach-imx/sys_proto.h     |   6 +-
 arch/arm/include/asm/omap_common.h            |  10 +-
 arch/arm/include/asm/omap_mmc.h               |   3 +
 arch/arm/include/asm/omap_sec_common.h        |   2 -
 arch/arm/include/asm/psci.h                   |   5 +
 arch/arm/include/asm/system.h                 |   3 +-
 arch/arm/include/asm/ti-common/keystone_net.h |   3 +
 arch/arm/include/asm/ti-common/omap_wdt.h     |   4 +
 arch/arm/include/asm/ti-common/ti-edma3.h     |   3 +
 arch/arm/lib/bootm.c                          |   6 +-
 arch/arm/lib/cache-cp15.c                     |   1 +
 arch/arm/lib/cache.c                          |   2 +
 arch/arm/lib/cmd_boot.c                       |   2 +-
 arch/arm/lib/gic-v3-its.c                     |   1 +
 arch/arm/lib/image.c                          |   2 +
 arch/arm/lib/interrupts.c                     |   1 +
 arch/arm/lib/interrupts_64.c                  |   1 +
 arch/arm/lib/psci-dt.c                        |   1 +
 arch/arm/lib/reset.c                          |   6 +-
 arch/arm/lib/semihosting.c                    |   5 +-
 arch/arm/lib/spl.c                            |   3 +
 arch/arm/lib/stack.c                          |   1 +
 arch/arm/lib/zimage.c                         |   1 +
 arch/arm/mach-aspeed/ast2500-board.c          |   2 +
 arch/arm/mach-aspeed/ast2500/sdram_ast2500.c  |   1 +
 arch/arm/mach-at91/arm920t/cpu.c              |   1 +
 arch/arm/mach-at91/arm920t/timer.c            |   2 +
 arch/arm/mach-at91/arm926ejs/cpu.c            |   1 +
 arch/arm/mach-at91/arm926ejs/eflash.c         |  10 +-
 arch/arm/mach-at91/arm926ejs/timer.c          |   1 +
 arch/arm/mach-at91/armv7/clock.c              |   1 +
 arch/arm/mach-at91/armv7/cpu.c                |   1 +
 arch/arm/mach-at91/armv7/timer.c              |   1 +
 arch/arm/mach-at91/include/mach/at91_pmc.h    |   1 +
 arch/arm/mach-at91/include/mach/at91_sfr.h    |   1 +
 arch/arm/mach-at91/include/mach/atmel_pio4.h  |   1 +
 arch/arm/mach-at91/mpddrc.c                   |   1 +
 arch/arm/mach-at91/phy.c                      |   1 +
 arch/arm/mach-at91/spl_at91.c                 |   2 +
 arch/arm/mach-at91/spl_atmel.c                |   2 +
 arch/arm/mach-bcm283x/include/mach/timer.h    |   1 +
 arch/arm/mach-bcm283x/init.c                  |   1 +
 arch/arm/mach-bcm283x/mbox.c                  |   2 +
 arch/arm/mach-davinci/cpu.c                   |   1 +
 arch/arm/mach-davinci/da850_lowlevel.c        |   1 +
 arch/arm/mach-davinci/misc.c                  |   1 +
 arch/arm/mach-davinci/spl.c                   |   1 +
 arch/arm/mach-davinci/timer.c                 |   2 +
 arch/arm/mach-exynos/clock.c                  |   1 +
 arch/arm/mach-exynos/include/mach/clock.h     |   1 +
 arch/arm/mach-exynos/include/mach/dp_info.h   |   1 +
 arch/arm/mach-exynos/lowlevel_init.c          |   2 +
 arch/arm/mach-exynos/pinmux.c                 |   1 +
 arch/arm/mach-exynos/soc.c                    |   1 +
 arch/arm/mach-exynos/spl_boot.c               |   3 +
 arch/arm/mach-highbank/timer.c                |   1 +
 arch/arm/mach-imx/cache.c                     |   1 +
 arch/arm/mach-imx/cmd_bmode.c                 |   6 +-
 arch/arm/mach-imx/cmd_dek.c                   |   4 +-
 arch/arm/mach-imx/cmd_hdmidet.c               |   4 +-
 arch/arm/mach-imx/cmd_nandbcb.c               |  11 +-
 arch/arm/mach-imx/cpu.c                       |   3 +
 arch/arm/mach-imx/ddrmc-vf610-calibration.c   |   1 +
 arch/arm/mach-imx/ddrmc-vf610.c               |   2 +
 arch/arm/mach-imx/hab.c                       |  21 +-
 arch/arm/mach-imx/i2c-mxv7.c                  |   1 +
 arch/arm/mach-imx/imx8/ahab.c                 |  14 +-
 arch/arm/mach-imx/imx8/cpu.c                  |   2 +
 arch/arm/mach-imx/imx8/fdt.c                  |   1 +
 arch/arm/mach-imx/imx8/image.c                |   1 +
 arch/arm/mach-imx/imx8/iomux.c                |   1 +
 arch/arm/mach-imx/imx8/misc.c                 |   1 +
 arch/arm/mach-imx/imx8/parse-container.c      |   1 +
 arch/arm/mach-imx/imx8/snvs_security_sc.c     |  13 +-
 arch/arm/mach-imx/imx8m/clock_imx8mm.c        |   2 +
 arch/arm/mach-imx/imx8m/clock_imx8mq.c        |   6 +-
 arch/arm/mach-imx/imx8m/soc.c                 |   3 +
 arch/arm/mach-imx/imx_bootaux.c               |   4 +-
 arch/arm/mach-imx/imxrt/soc.c                 |   2 +
 arch/arm/mach-imx/misc.c                      |   3 +
 arch/arm/mach-imx/mx5/clock.c                 |   5 +-
 arch/arm/mach-imx/mx5/soc.c                   |   1 +
 arch/arm/mach-imx/mx6/clock.c                 |   5 +-
 arch/arm/mach-imx/mx6/ddr.c                   |   2 +
 arch/arm/mach-imx/mx6/litesom.c               |   1 +
 arch/arm/mach-imx/mx6/soc.c                   |   1 +
 arch/arm/mach-imx/mx7/clock.c                 |   5 +-
 arch/arm/mach-imx/mx7/psci-mx7.c              |   1 +
 arch/arm/mach-imx/mx7/soc.c                   |   2 +
 arch/arm/mach-imx/mx7ulp/clock.c              |   4 +-
 arch/arm/mach-imx/mx7ulp/iomux.c              |   1 +
 arch/arm/mach-imx/mx7ulp/pcc.c                |   1 +
 arch/arm/mach-imx/mx7ulp/scg.c                |   2 +
 arch/arm/mach-imx/mx7ulp/soc.c                |   4 +
 arch/arm/mach-imx/sata.c                      |   1 +
 arch/arm/mach-imx/sip.c                       |   2 +
 arch/arm/mach-imx/spl.c                       |   2 +
 arch/arm/mach-imx/spl_imx_romapi.c            |   1 +
 arch/arm/mach-imx/syscounter.c                |   2 +
 arch/arm/mach-imx/timer.c                     |   1 +
 arch/arm/mach-k3/am6_init.c                   |   1 +
 arch/arm/mach-k3/common.c                     |   4 +
 arch/arm/mach-k3/include/mach/am6_hardware.h  |   3 +
 .../arm/mach-k3/include/mach/j721e_hardware.h |   3 +
 arch/arm/mach-k3/include/mach/j721e_spl.h     |   1 +
 arch/arm/mach-k3/j721e_init.c                 |   1 +
 arch/arm/mach-k3/security.c                   |   3 +
 arch/arm/mach-k3/sysfw-loader.c               |   3 +
 arch/arm/mach-keystone/clock.c                |   1 +
 arch/arm/mach-keystone/cmd_clock.c            |   7 +-
 arch/arm/mach-keystone/cmd_mon.c              |   8 +-
 arch/arm/mach-keystone/cmd_poweroff.c         |   2 +-
 arch/arm/mach-keystone/ddr3.c                 |   2 +
 arch/arm/mach-keystone/ddr3_spd.c             |   1 +
 .../mach-keystone/include/mach/clock_defs.h   |   3 +
 .../include/mach/hardware-k2hk.h              |   4 +
 .../mach-keystone/include/mach/hardware-k2l.h |   4 +
 .../arm/mach-keystone/include/mach/hardware.h |   1 +
 .../include/mach/xhci-keystone.h              |   4 +
 arch/arm/mach-keystone/init.c                 |   3 +
 arch/arm/mach-keystone/keystone.c             |   2 +
 arch/arm/mach-keystone/mon.c                  |   1 +
 arch/arm/mach-keystone/psc.c                  |   1 +
 arch/arm/mach-kirkwood/cache.c                |   1 +
 arch/arm/mach-kirkwood/cpu.c                  |   3 +
 arch/arm/mach-kirkwood/mpp.c                  |   1 +
 arch/arm/mach-mediatek/cpu.c                  |   1 +
 arch/arm/mach-mediatek/mt7622/init.c          |   2 +
 arch/arm/mach-mediatek/mt7629/init.c          |   3 +
 arch/arm/mach-mediatek/mt8512/init.c          |   3 +
 arch/arm/mach-mediatek/mt8516/init.c          |   2 +
 arch/arm/mach-mediatek/mt8518/init.c          |   2 +
 arch/arm/mach-mediatek/spl.c                  |   1 +
 arch/arm/mach-meson/board-axg.c               |   1 +
 arch/arm/mach-meson/board-common.c            |   3 +
 arch/arm/mach-meson/board-g12a.c              |   2 +
 arch/arm/mach-meson/board-gx.c                |   1 +
 arch/arm/mach-meson/board-info.c              |   2 +
 arch/arm/mach-meson/sm.c                      |  18 +-
 arch/arm/mach-mvebu/arm64-common.c            |   2 +
 arch/arm/mach-mvebu/armada3700/cpu.c          |   2 +
 arch/arm/mach-mvebu/armada8k/dram.c           |   1 +
 arch/arm/mach-mvebu/cpu.c                     |   3 +
 arch/arm/mach-mvebu/efuse.c                   |   2 +
 arch/arm/mach-mvebu/include/mach/soc.h        |   4 +
 arch/arm/mach-mvebu/mbus.c                    |   1 +
 arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c    |   2 +
 .../serdes/a38x/high_speed_env_spec.c         |   1 +
 arch/arm/mach-mvebu/serdes/a38x/seq_exec.c    |   1 +
 .../serdes/axp/high_speed_env_lib.c           |   1 +
 arch/arm/mach-mvebu/spl.c                     |   2 +
 arch/arm/mach-mvebu/timer.c                   |   2 +
 arch/arm/mach-omap2/abb.c                     |   1 +
 arch/arm/mach-omap2/am33xx/board.c            |   2 +
 arch/arm/mach-omap2/am33xx/chilisom.c         |   1 +
 arch/arm/mach-omap2/am33xx/clock.c            |   2 +
 arch/arm/mach-omap2/am33xx/clock_ti814x.c     |   1 +
 arch/arm/mach-omap2/am33xx/clock_ti816x.c     |   1 +
 arch/arm/mach-omap2/am33xx/ddr.c              |   3 +
 arch/arm/mach-omap2/am33xx/sys_info.c         |   1 +
 arch/arm/mach-omap2/am33xx/ti816x_emif4.c     |   1 +
 arch/arm/mach-omap2/boot-common.c             |   1 +
 arch/arm/mach-omap2/clocks-common.c           |   2 +
 arch/arm/mach-omap2/emif-common.c             |   2 +
 arch/arm/mach-omap2/fdt-common.c              |   1 +
 arch/arm/mach-omap2/hwinit-common.c           |   1 +
 arch/arm/mach-omap2/omap-cache.c              |   1 +
 arch/arm/mach-omap2/omap3/am35x_musb.c        |   1 +
 arch/arm/mach-omap2/omap3/board.c             |   5 +-
 arch/arm/mach-omap2/omap3/emac.c              |   1 +
 arch/arm/mach-omap2/omap3/emif4.c             |   1 +
 arch/arm/mach-omap2/omap3/sdrc.c              |   1 +
 arch/arm/mach-omap2/omap4/sdram_elpida.c      |   1 +
 arch/arm/mach-omap2/omap5/abb.c               |   1 +
 arch/arm/mach-omap2/omap5/dra7xx_iodelay.c    |   1 +
 arch/arm/mach-omap2/omap5/emif.c              |   1 +
 arch/arm/mach-omap2/omap5/fdt.c               |   1 +
 arch/arm/mach-omap2/omap5/hwinit.c            |   1 +
 arch/arm/mach-omap2/omap5/sdram.c             |   1 +
 arch/arm/mach-omap2/pipe3-phy.c               |   2 +
 arch/arm/mach-omap2/sec-common.c              |   2 +
 arch/arm/mach-omap2/timer.c                   |   2 +
 arch/arm/mach-omap2/utils.c                   |   3 +-
 arch/arm/mach-orion5x/cpu.c                   |   2 +
 arch/arm/mach-orion5x/timer.c                 |   2 +
 arch/arm/mach-owl/soc.c                       |   2 +
 arch/arm/mach-rmobile/board.c                 |   1 +
 arch/arm/mach-rmobile/cpu_info.c              |   2 +
 arch/arm/mach-rmobile/emac.c                  |   1 +
 .../include/mach/rcar-gen3-base.h             |   1 +
 arch/arm/mach-rmobile/include/mach/sh_sdhi.h  |   1 +
 arch/arm/mach-rmobile/timer.c                 |   2 +
 arch/arm/mach-rockchip/board.c                |   2 +
 arch/arm/mach-rockchip/boot_mode.c            |   3 +
 arch/arm/mach-rockchip/bootrom.c              |   1 +
 arch/arm/mach-rockchip/cpu-info.c             |   2 +
 arch/arm/mach-rockchip/misc.c                 |   2 +
 arch/arm/mach-rockchip/px30-board-tpl.c       |   1 +
 arch/arm/mach-rockchip/px30/px30.c            |   1 +
 arch/arm/mach-rockchip/px30/syscon_px30.c     |   1 +
 arch/arm/mach-rockchip/rk3036-board-spl.c     |   1 +
 arch/arm/mach-rockchip/rk3036/rk3036.c        |   3 +
 arch/arm/mach-rockchip/rk3036/sdram_rk3036.c  |   2 +
 arch/arm/mach-rockchip/rk3128/rk3128.c        |   1 +
 arch/arm/mach-rockchip/rk3188/rk3188.c        |   2 +
 arch/arm/mach-rockchip/rk3188/syscon_rk3188.c |   1 +
 arch/arm/mach-rockchip/rk322x/rk322x.c        |   1 +
 arch/arm/mach-rockchip/rk3288/rk3288.c        |   5 +-
 arch/arm/mach-rockchip/rk3288/syscon_rk3288.c |   1 +
 arch/arm/mach-rockchip/rk3308/rk3308.c        |   2 +
 arch/arm/mach-rockchip/rk3328/rk3328.c        |   1 +
 arch/arm/mach-rockchip/rk3368/rk3368.c        |   3 +
 arch/arm/mach-rockchip/rk3368/syscon_rk3368.c |   1 +
 arch/arm/mach-rockchip/rk3399/rk3399.c        |   4 +
 arch/arm/mach-rockchip/rk3399/syscon_rk3399.c |   1 +
 arch/arm/mach-rockchip/sdram.c                |   1 +
 arch/arm/mach-rockchip/spl-boot-order.c       |   1 +
 arch/arm/mach-rockchip/spl.c                  |   4 +
 arch/arm/mach-rockchip/tpl.c                  |   3 +
 arch/arm/mach-s5pc1xx/cache.c                 |   1 +
 arch/arm/mach-snapdragon/dram.c               |   2 +
 arch/arm/mach-snapdragon/pinctrl-snapdragon.c |   1 +
 arch/arm/mach-socfpga/board.c                 |   1 +
 arch/arm/mach-socfpga/clock_manager.c         |   5 +-
 arch/arm/mach-socfpga/clock_manager_agilex.c  |   1 +
 arch/arm/mach-socfpga/clock_manager_arria10.c |   1 +
 arch/arm/mach-socfpga/freeze_controller.c     |   1 +
 .../mach-socfpga/include/mach/clock_manager.h |   2 +-
 .../include/mach/clock_manager_arria10.h      |   7 +-
 .../include/mach/clock_manager_gen5.h         |   7 +-
 .../include/mach/clock_manager_s10.h          |   1 +
 arch/arm/mach-socfpga/include/mach/firewall.h |   2 +
 .../include/mach/fpga_manager_arria10.h       |   1 +
 .../include/mach/fpga_manager_gen5.h          |   1 +
 .../mach-socfpga/include/mach/mailbox_s10.h   |   1 +
 .../include/mach/reset_manager_arria10.h      |   1 +
 .../mach-socfpga/include/mach/sdram_arria10.h |   3 +-
 .../include/mach/system_manager.h             |   1 +
 .../include/mach/system_manager_soc64.h       |   1 +
 arch/arm/mach-socfpga/misc.c                  |   6 +-
 arch/arm/mach-socfpga/misc_arria10.c          |   1 +
 arch/arm/mach-socfpga/misc_gen5.c             |   2 +
 arch/arm/mach-socfpga/misc_s10.c              |   2 +
 arch/arm/mach-socfpga/pinmux_arria10.c        |   1 +
 arch/arm/mach-socfpga/reset_manager_gen5.c    |   1 +
 arch/arm/mach-socfpga/scan_manager.c          |   1 +
 arch/arm/mach-socfpga/spl_a10.c               |   1 +
 arch/arm/mach-socfpga/spl_agilex.c            |   2 +
 arch/arm/mach-socfpga/spl_gen5.c              |   3 +
 arch/arm/mach-socfpga/spl_s10.c               |   2 +
 arch/arm/mach-socfpga/timer.c                 |   1 +
 arch/arm/mach-socfpga/timer_s10.c             |   1 +
 arch/arm/mach-stm32/soc.c                     |   1 +
 arch/arm/mach-stm32mp/bsec.c                  |   1 +
 arch/arm/mach-stm32mp/cmd_stm32key.c          |   4 +-
 arch/arm/mach-stm32mp/cpu.c                   |   4 +
 arch/arm/mach-stm32mp/dram_init.c             |   2 +
 arch/arm/mach-stm32mp/fdt.c                   |   1 +
 arch/arm/mach-stm32mp/include/mach/stm32.h    |   6 +-
 arch/arm/mach-stm32mp/psci.c                  |   2 +
 arch/arm/mach-stm32mp/pwr_regulator.c         |   1 +
 arch/arm/mach-stm32mp/spl.c                   |   2 +
 arch/arm/mach-sunxi/board.c                   |   3 +
 arch/arm/mach-sunxi/clock_sun6i.c             |   2 +
 arch/arm/mach-sunxi/clock_sun8i_a83t.c        |   1 +
 arch/arm/mach-sunxi/cpu_info.c                |   1 +
 arch/arm/mach-sunxi/dram_sun4i.c              |   1 +
 arch/arm/mach-sunxi/dram_sun50i_h6.c          |   5 +-
 arch/arm/mach-sunxi/dram_sun6i.c              |   2 +
 arch/arm/mach-sunxi/dram_sun8i_a23.c          |   2 +
 arch/arm/mach-sunxi/dram_sun8i_a33.c          |   2 +
 arch/arm/mach-sunxi/dram_sun8i_a83t.c         |   2 +
 arch/arm/mach-sunxi/dram_sun9i.c              |   2 +
 arch/arm/mach-sunxi/dram_sunxi_dw.c           |   3 +
 arch/arm/mach-sunxi/spl_spi_sunxi.c           |   4 +
 arch/arm/mach-tegra/ap.c                      |   1 +
 arch/arm/mach-tegra/board.c                   |   2 +
 arch/arm/mach-tegra/board2.c                  |   1 +
 arch/arm/mach-tegra/cboot.c                   |   3 +
 arch/arm/mach-tegra/clock.c                   |   2 +
 arch/arm/mach-tegra/cmd_enterrcm.c            |   6 +-
 arch/arm/mach-tegra/cpu.c                     |   2 +
 arch/arm/mach-tegra/gpu.c                     |   1 +
 arch/arm/mach-tegra/ivc.c                     |   1 +
 arch/arm/mach-tegra/pinmux-common.c           |   1 +
 arch/arm/mach-tegra/pmc.c                     |   1 +
 arch/arm/mach-tegra/powergate.c               |   1 +
 arch/arm/mach-tegra/spl.c                     |   1 +
 arch/arm/mach-tegra/sys_info.c                |   1 +
 arch/arm/mach-tegra/tegra114/clock.c          |   3 +
 arch/arm/mach-tegra/tegra114/cpu.c            |   2 +
 arch/arm/mach-tegra/tegra114/funcmux.c        |   1 +
 arch/arm/mach-tegra/tegra124/clock.c          |   3 +
 arch/arm/mach-tegra/tegra124/cpu.c            |   2 +
 arch/arm/mach-tegra/tegra124/funcmux.c        |   1 +
 arch/arm/mach-tegra/tegra124/xusb-padctl.c    |   2 +
 arch/arm/mach-tegra/tegra20/clock.c           |   3 +
 arch/arm/mach-tegra/tegra20/cpu.c             |   1 +
 arch/arm/mach-tegra/tegra20/crypto.c          |   1 +
 arch/arm/mach-tegra/tegra20/emc.c             |   1 +
 arch/arm/mach-tegra/tegra20/funcmux.c         |   1 +
 arch/arm/mach-tegra/tegra20/pmu.c             |   1 +
 arch/arm/mach-tegra/tegra210/clock.c          |   5 +
 arch/arm/mach-tegra/tegra210/funcmux.c        |   1 +
 arch/arm/mach-tegra/tegra210/xusb-padctl.c    |   2 +
 arch/arm/mach-tegra/tegra30/clock.c           |   3 +
 arch/arm/mach-tegra/tegra30/cpu.c             |   2 +
 arch/arm/mach-tegra/tegra30/funcmux.c         |   1 +
 arch/arm/mach-tegra/xusb-padctl-common.c      |   1 +
 arch/arm/mach-u8500/cache.c                   |   1 +
 arch/arm/mach-u8500/cpuinfo.c                 |   1 +
 arch/arm/mach-uniphier/arm32/psci.c           |   1 +
 arch/arm/mach-uniphier/arm32/timer.c          |   1 +
 arch/arm/mach-uniphier/board_init.c           |   1 +
 .../boot-device/boot-device-pxs3.c            |   1 +
 .../mach-uniphier/boot-device/boot-device.c   |   6 +-
 arch/arm/mach-uniphier/clk/clk-ld11.c         |   1 +
 arch/arm/mach-uniphier/clk/dpll-ld4.c         |   1 +
 arch/arm/mach-uniphier/clk/dpll-pro4.c        |   1 +
 arch/arm/mach-uniphier/cpu-info.c             |   1 +
 arch/arm/mach-uniphier/dram/cmd_ddrmphy.c     |   4 +-
 arch/arm/mach-uniphier/dram/cmd_ddrphy.c      |   4 +-
 arch/arm/mach-uniphier/dram/ddrphy-regs.h     |   1 +
 arch/arm/mach-uniphier/dram/ddrphy-training.c |   1 +
 arch/arm/mach-uniphier/dram/umc-pxs2.c        |   3 +
 arch/arm/mach-uniphier/dram_init.c            |   1 +
 arch/arm/mach-uniphier/init.h                 |   1 +
 arch/arm/mach-uniphier/micro-support-card.c   |   5 +-
 arch/arm/mach-uniphier/mmc-first-dev.c        |   7 +-
 arch/arm/mach-uniphier/nand-reset.c           |   1 +
 arch/arm/mach-versal/clk.c                    |   1 +
 arch/arm/mach-versal/cpu.c                    |   2 +
 arch/arm/mach-versal/include/mach/hardware.h  |   4 +
 arch/arm/mach-zynq/clk.c                      |   1 +
 arch/arm/mach-zynq/cpu.c                      |   2 +
 arch/arm/mach-zynq/spl.c                      |   3 +
 arch/arm/mach-zynq/timer.c                    |   1 +
 arch/arm/mach-zynqmp-r5/cpu.c                 |   1 +
 arch/arm/mach-zynqmp/clk.c                    |   1 +
 arch/arm/mach-zynqmp/cpu.c                    |   2 +
 arch/arm/mach-zynqmp/include/mach/hardware.h  |   4 +
 arch/arm/mach-zynqmp/mp.c                     |   4 +-
 arch/arm/mach-zynqmp/psu_spl_init.c           |   1 +
 arch/arm/mach-zynqmp/spl.c                    |   3 +
 arch/m68k/cpu/mcf5227x/cpu.c                  |   4 +-
 arch/m68k/cpu/mcf5227x/cpu_init.c             |   1 +
 arch/m68k/cpu/mcf523x/cpu.c                   |   4 +-
 arch/m68k/cpu/mcf523x/cpu_init.c              |   1 +
 arch/m68k/cpu/mcf52x2/cpu.c                   |  17 +-
 arch/m68k/cpu/mcf52x2/cpu_init.c              |   1 +
 arch/m68k/cpu/mcf52x2/speed.c                 |   1 +
 arch/m68k/cpu/mcf530x/cpu.c                   |   4 +-
 arch/m68k/cpu/mcf530x/cpu_init.c              |   1 +
 arch/m68k/cpu/mcf532x/cpu.c                   |   5 +-
 arch/m68k/cpu/mcf532x/cpu_init.c              |   1 +
 arch/m68k/cpu/mcf5445x/cpu.c                  |   5 +-
 arch/m68k/cpu/mcf5445x/cpu_init.c             |   1 +
 arch/m68k/cpu/mcf5445x/pci.c                  |   1 +
 arch/m68k/cpu/mcf547x_8x/cpu.c                |   4 +-
 arch/m68k/cpu/mcf547x_8x/cpu_init.c           |   1 +
 arch/m68k/cpu/mcf547x_8x/pci.c                |   1 +
 arch/m68k/cpu/mcf547x_8x/slicetimer.c         |   2 +
 arch/m68k/lib/bootm.c                         |   6 +-
 arch/m68k/lib/interrupts.c                    |   1 +
 arch/m68k/lib/time.c                          |   2 +
 arch/m68k/lib/traps.c                         |   1 +
 arch/microblaze/cpu/cache.c                   |   1 +
 arch/microblaze/cpu/interrupts.c              |   3 +-
 arch/microblaze/cpu/spl.c                     |   4 +-
 arch/microblaze/cpu/timer.c                   |   3 +
 arch/microblaze/lib/bootm.c                   |   6 +-
 arch/mips/cpu/cpu.c                           |   3 +-
 arch/mips/include/asm/cacheops.h              |   2 +
 arch/mips/include/asm/cm.h                    |   1 +
 arch/mips/include/asm/mipsregs.h              |   1 +
 arch/mips/lib/bootm.c                         |   7 +-
 arch/mips/lib/cache.c                         |   2 +
 arch/mips/lib/reloc.c                         |   1 +
 arch/mips/lib/spl.c                           |   1 +
 arch/mips/lib/stack.c                         |   2 +
 arch/mips/lib/traps.c                         |   2 +
 arch/mips/mach-ath79/ar933x/ddr.c             |   1 +
 arch/mips/mach-ath79/ar934x/clk.c             |   6 +-
 arch/mips/mach-ath79/ar934x/ddr.c             |   2 +
 arch/mips/mach-ath79/cpu.c                    |   1 +
 arch/mips/mach-ath79/qca953x/ddr.c            |   2 +
 arch/mips/mach-ath79/qca956x/clk.c            |   1 +
 arch/mips/mach-ath79/qca956x/ddr.c            |   1 +
 arch/mips/mach-ath79/reset.c                  |   2 +
 arch/mips/mach-bmips/dram.c                   |   2 +
 .../mach-jz47xx/include/mach/jz4780_dram.h    |   1 +
 arch/mips/mach-jz47xx/jz4780/gpio.c           |   1 +
 arch/mips/mach-jz47xx/jz4780/jz4780.c         |   1 +
 arch/mips/mach-jz47xx/jz4780/pll.c            |   2 +
 arch/mips/mach-jz47xx/jz4780/reset.c          |   1 +
 arch/mips/mach-jz47xx/jz4780/sdram.c          |   3 +
 arch/mips/mach-jz47xx/jz4780/timer.c          |   3 +
 arch/mips/mach-mscc/cpu.c                     |   2 +
 arch/mips/mach-mscc/dram.c                    |   1 +
 arch/mips/mach-mscc/gpio.c                    |   1 +
 arch/mips/mach-mscc/include/mach/ddr.h        |   1 +
 .../include/mach/jr2/jr2_devcpu_gcb.h         |   2 +
 .../mach/jr2/jr2_devcpu_gcb_miim_regs.h       |   2 +
 .../mach-mscc/include/mach/jr2/jr2_icpu_cfg.h |   2 +
 .../include/mach/luton/luton_devcpu_gcb.h     |   1 +
 .../mach/luton/luton_devcpu_gcb_miim_regs.h   |   1 +
 .../include/mach/luton/luton_icpu_cfg.h       |   1 +
 .../include/mach/ocelot/ocelot_devcpu_gcb.h   |   1 +
 .../mach/ocelot/ocelot_devcpu_gcb_miim_regs.h |   1 +
 .../include/mach/ocelot/ocelot_icpu_cfg.h     |   1 +
 .../include/mach/serval/serval_devcpu_gcb.h   |   1 +
 .../mach/serval/serval_devcpu_gcb_miim_regs.h |   1 +
 .../include/mach/serval/serval_icpu_cfg.h     |   1 +
 .../include/mach/servalt/servalt_devcpu_gcb.h |   1 +
 .../servalt/servalt_devcpu_gcb_miim_regs.h    |   1 +
 .../include/mach/servalt/servalt_icpu_cfg.h   |   1 +
 arch/mips/mach-mscc/include/mach/tlb.h        |   1 +
 arch/mips/mach-mscc/phy.c                     |   1 +
 arch/mips/mach-mtmips/cpu.c                   |   2 +
 arch/mips/mach-mtmips/ddr_calibrate.c         | 312 ++++++++++++++++++
 arch/mips/mach-mtmips/ddr_init.c              |   1 +
 arch/mips/mach-mtmips/mt7628/ddr.c            |   1 +
 arch/mips/mach-mtmips/spl.c                   |   1 +
 arch/mips/mach-pic32/cpu.c                    |   1 +
 arch/nds32/cpu/n1213/ae3xx/cpu.c              |   2 +-
 arch/nds32/cpu/n1213/ag101/cpu.c              |   2 +-
 arch/nds32/cpu/n1213/ag101/timer.c            |   3 +
 arch/nds32/include/asm/u-boot-nds32.h         |   2 +
 arch/nds32/lib/boot.c                         |   2 +-
 arch/nds32/lib/bootm.c                        |   2 +
 arch/nds32/lib/cache.c                        |   1 +
 arch/nios2/cpu/cpu.c                          |   5 +-
 arch/nios2/cpu/interrupts.c                   |   2 +-
 arch/nios2/lib/bootm.c                        |   6 +-
 arch/powerpc/cpu/mpc83xx/cpu.c                |   5 +-
 arch/powerpc/cpu/mpc83xx/cpu_init.c           |   2 +
 arch/powerpc/cpu/mpc83xx/ecc.c                |   2 +-
 arch/powerpc/cpu/mpc83xx/interrupts.c         |   5 +-
 arch/powerpc/cpu/mpc83xx/law.c                |   1 +
 arch/powerpc/cpu/mpc83xx/pci.c                |   3 +
 arch/powerpc/cpu/mpc83xx/pcie.c               |   1 +
 arch/powerpc/cpu/mpc83xx/serdes.c             |   1 +
 arch/powerpc/cpu/mpc83xx/spd_sdram.c          |   3 +
 arch/powerpc/cpu/mpc83xx/speed.c              |   3 +-
 arch/powerpc/cpu/mpc83xx/spl_minimal.c        |   1 +
 arch/powerpc/cpu/mpc83xx/traps.c              |   1 +
 arch/powerpc/cpu/mpc85xx/bsc9132_serdes.c     |   1 +
 arch/powerpc/cpu/mpc85xx/c29x_serdes.c        |   1 +
 arch/powerpc/cpu/mpc85xx/cmd_errata.c         |   4 +-
 arch/powerpc/cpu/mpc85xx/commproc.c           |   1 +
 arch/powerpc/cpu/mpc85xx/cpu.c                |   5 +-
 arch/powerpc/cpu/mpc85xx/cpu_init.c           |   2 +
 arch/powerpc/cpu/mpc85xx/cpu_init_early.c     |   1 +
 arch/powerpc/cpu/mpc85xx/fdt.c                |   1 +
 .../powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c |   2 +
 arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c |   2 +
 arch/powerpc/cpu/mpc85xx/interrupts.c         |   4 +-
 arch/powerpc/cpu/mpc85xx/liodn.c              |   1 +
 arch/powerpc/cpu/mpc85xx/mp.c                 |   4 +-
 arch/powerpc/cpu/mpc85xx/mpc8536_serdes.c     |   1 +
 arch/powerpc/cpu/mpc85xx/mpc8544_serdes.c     |   1 +
 arch/powerpc/cpu/mpc85xx/mpc8548_serdes.c     |   1 +
 arch/powerpc/cpu/mpc85xx/mpc8568_serdes.c     |   1 +
 arch/powerpc/cpu/mpc85xx/mpc8569_serdes.c     |   1 +
 arch/powerpc/cpu/mpc85xx/mpc8572_serdes.c     |   1 +
 arch/powerpc/cpu/mpc85xx/p1010_serdes.c       |   1 +
 arch/powerpc/cpu/mpc85xx/p1021_serdes.c       |   2 +
 arch/powerpc/cpu/mpc85xx/p1022_serdes.c       |   1 +
 arch/powerpc/cpu/mpc85xx/p1023_serdes.c       |   1 +
 arch/powerpc/cpu/mpc85xx/p2020_serdes.c       |   1 +
 arch/powerpc/cpu/mpc85xx/pci.c                |   1 +
 arch/powerpc/cpu/mpc85xx/spl_minimal.c        |   1 +
 arch/powerpc/cpu/mpc85xx/tlb.c                |   1 +
 arch/powerpc/cpu/mpc85xx/traps.c              |   1 +
 arch/powerpc/cpu/mpc86xx/cpu.c                |   3 +-
 arch/powerpc/cpu/mpc86xx/cpu_init.c           |   2 +
 arch/powerpc/cpu/mpc86xx/interrupts.c         |   4 +-
 arch/powerpc/cpu/mpc86xx/mp.c                 |   2 +-
 arch/powerpc/cpu/mpc86xx/mpc8610_serdes.c     |   1 +
 arch/powerpc/cpu/mpc86xx/mpc8641_serdes.c     |   1 +
 arch/powerpc/cpu/mpc86xx/traps.c              |   1 +
 arch/powerpc/cpu/mpc8xx/cpu.c                 |   3 +-
 arch/powerpc/cpu/mpc8xx/cpu_init.c            |   1 +
 arch/powerpc/cpu/mpc8xx/immap.c               |  19 +-
 arch/powerpc/cpu/mpc8xx/interrupts.c          |   1 +
 arch/powerpc/cpu/mpc8xx/traps.c               |   1 +
 arch/powerpc/cpu/mpc8xxx/cpu.c                |   2 +
 arch/powerpc/cpu/mpc8xxx/fsl_lbc.c            |   1 +
 arch/powerpc/cpu/mpc8xxx/fsl_pamu.c           |   2 +
 arch/powerpc/cpu/mpc8xxx/law.c                |   1 +
 arch/powerpc/cpu/mpc8xxx/pamu_table.c         |   1 +
 arch/powerpc/cpu/mpc8xxx/srio.c               |   2 +
 arch/powerpc/include/asm/fsl_i2c.h            |   1 +
 arch/powerpc/include/asm/mmu.h                |   1 +
 arch/powerpc/include/asm/u-boot.h             |   2 +
 arch/powerpc/lib/bootm.c                      |  17 +-
 arch/powerpc/lib/extable.c                    |   1 +
 arch/powerpc/lib/interrupts.c                 |   1 +
 arch/powerpc/lib/kgdb.c                       |   3 +-
 arch/powerpc/lib/spl.c                        |   1 +
 arch/powerpc/lib/stack.c                      |   1 +
 arch/powerpc/lib/time.c                       |   2 +
 arch/riscv/cpu/ax25/cache.c                   |   1 +
 arch/riscv/cpu/cpu.c                          |   2 +
 arch/riscv/cpu/generic/cpu.c                  |   1 +
 arch/riscv/include/asm/encoding.h             |   3 +
 arch/riscv/lib/boot.c                         |   2 +-
 arch/riscv/lib/bootm.c                        |   6 +-
 arch/riscv/lib/fdt_fixup.c                    |   1 +
 arch/riscv/lib/image.c                        |   1 +
 arch/riscv/lib/reset.c                        |   2 +-
 arch/riscv/lib/spl.c                          |   2 +
 arch/sandbox/cpu/cpu.c                        |   3 +
 arch/sandbox/cpu/spl.c                        |   2 +
 arch/sandbox/cpu/start.c                      |   1 +
 arch/sandbox/cpu/state.c                      |   1 +
 arch/sandbox/include/asm/eth.h                |   2 +
 arch/sandbox/lib/bootm.c                      |   2 +
 arch/sandbox/lib/pci_io.c                     |   1 +
 arch/sh/cpu/sh4/cache.c                       |   1 +
 arch/sh/cpu/sh4/cpu.c                         |   3 +-
 arch/sh/lib/bootm.c                           |   5 +-
 arch/sh/lib/time.c                            |   2 +
 arch/sh/lib/time_sh2.c                        |   2 +
 arch/sh/lib/zimageboot.c                      |   5 +-
 arch/x86/cpu/acpi_gpe.c                       |   1 +
 arch/x86/cpu/apollolake/cpu_spl.c             |   1 +
 arch/x86/cpu/apollolake/fsp_m.c               |   1 +
 arch/x86/cpu/apollolake/fsp_s.c               |   4 +
 arch/x86/cpu/apollolake/hostbridge.c          |   1 +
 arch/x86/cpu/apollolake/lpc.c                 |   1 +
 arch/x86/cpu/apollolake/pmc.c                 |   2 +
 arch/x86/cpu/apollolake/punit.c               |   2 +
 arch/x86/cpu/apollolake/spl.c                 |   3 +
 arch/x86/cpu/baytrail/acpi.c                  |   1 +
 arch/x86/cpu/baytrail/cpu.c                   |   1 +
 arch/x86/cpu/baytrail/fsp_configs.c           |   1 +
 arch/x86/cpu/baytrail/valleyview.c            |   1 +
 arch/x86/cpu/braswell/braswell.c              |   1 +
 arch/x86/cpu/braswell/fsp_configs.c           |   1 +
 arch/x86/cpu/broadwell/adsp.c                 |   1 +
 arch/x86/cpu/broadwell/cpu.c                  |   2 +
 arch/x86/cpu/broadwell/cpu_from_spl.c         |   2 +
 arch/x86/cpu/broadwell/cpu_full.c             |   3 +
 arch/x86/cpu/broadwell/iobp.c                 |   1 +
 arch/x86/cpu/broadwell/lpc.c                  |   1 +
 arch/x86/cpu/broadwell/me.c                   |   2 +
 arch/x86/cpu/broadwell/pch.c                  |   2 +
 arch/x86/cpu/broadwell/pinctrl_broadwell.c    |   1 +
 arch/x86/cpu/broadwell/power_state.c          |   1 +
 arch/x86/cpu/broadwell/refcode.c              |   2 +
 arch/x86/cpu/broadwell/sata.c                 |   2 +
 arch/x86/cpu/broadwell/sdram.c                |   1 +
 arch/x86/cpu/coreboot/coreboot.c              |   1 +
 arch/x86/cpu/coreboot/timestamp.c             |   1 +
 arch/x86/cpu/cpu.c                            |   2 +
 arch/x86/cpu/efi/app.c                        |   1 +
 arch/x86/cpu/efi/payload.c                    |   1 +
 arch/x86/cpu/i386/interrupt.c                 |   1 +
 arch/x86/cpu/intel_common/cpu.c               |   1 +
 arch/x86/cpu/intel_common/cpu_from_spl.c      |   1 +
 arch/x86/cpu/intel_common/itss.c              |   1 +
 arch/x86/cpu/intel_common/lpc.c               |   1 +
 arch/x86/cpu/intel_common/me_status.c         |   1 +
 arch/x86/cpu/intel_common/microcode.c         |   1 +
 arch/x86/cpu/intel_common/mrc.c               |   1 +
 arch/x86/cpu/intel_common/p2sb.c              |   2 +
 arch/x86/cpu/intel_common/report_platform.c   |   1 +
 arch/x86/cpu/ioapic.c                         |   1 +
 arch/x86/cpu/irq.c                            |   1 +
 arch/x86/cpu/ivybridge/bd82x6x.c              |   3 +
 arch/x86/cpu/ivybridge/cpu.c                  |   2 +
 arch/x86/cpu/ivybridge/early_me.c             |   2 +
 arch/x86/cpu/ivybridge/fsp_configs.c          |   1 +
 arch/x86/cpu/ivybridge/ivybridge.c            |   1 +
 arch/x86/cpu/ivybridge/lpc.c                  |   1 +
 arch/x86/cpu/ivybridge/model_206ax.c          |   1 +
 arch/x86/cpu/ivybridge/northbridge.c          |   2 +
 arch/x86/cpu/ivybridge/sata.c                 |   1 +
 arch/x86/cpu/ivybridge/sdram.c                |   1 +
 arch/x86/cpu/ivybridge/sdram_nop.c            |   1 +
 arch/x86/cpu/lapic.c                          |   1 +
 arch/x86/cpu/mp_init.c                        |   2 +
 arch/x86/cpu/mtrr.c                           |   2 +
 arch/x86/cpu/pci.c                            |   1 +
 arch/x86/cpu/qemu/qemu.c                      |   1 +
 arch/x86/cpu/quark/dram.c                     |   2 +
 arch/x86/cpu/quark/mrc_util.h                 |   2 +
 arch/x86/cpu/quark/quark.c                    |   3 +
 arch/x86/cpu/queensbay/tnc.c                  |   1 +
 arch/x86/cpu/slimbootloader/serial.c          |   1 +
 arch/x86/cpu/slimbootloader/slimbootloader.c  |   2 +
 arch/x86/cpu/tangier/pinmux.c                 |   1 +
 arch/x86/cpu/tangier/sdram.c                  |   1 +
 arch/x86/cpu/tangier/tangier.c                |   1 +
 arch/x86/cpu/turbo.c                          |   1 +
 arch/x86/cpu/x86_64/cpu.c                     |   1 +
 arch/x86/include/asm/arch-apollolake/lpc.h    |   1 +
 .../include/asm/arch-apollolake/systemagent.h |   1 +
 .../include/asm/arch-braswell/fsp/fsp_vpd.h   |   2 +
 arch/x86/include/asm/arch-broadwell/adsp.h    |   1 +
 .../x86/include/asm/arch-broadwell/serialio.h |   1 +
 arch/x86/include/asm/atomic.h                 |   1 +
 arch/x86/include/asm/fast_spi.h               |   1 +
 arch/x86/include/asm/fsp/fsp_api.h            |   2 +
 arch/x86/include/asm/fsp/fsp_fv.h             |   2 +
 arch/x86/include/asm/intel_pinctrl.h          |   1 +
 arch/x86/include/asm/mp.h                     |   1 +
 arch/x86/include/asm/msr-index.h              |   4 +
 arch/x86/include/asm/mtrr.h                   |   2 +-
 arch/x86/include/asm/sipi.h                   |   4 +-
 arch/x86/lib/acpi.c                           |   1 +
 arch/x86/lib/acpi_table.c                     |   1 +
 arch/x86/lib/bios.c                           |   1 +
 arch/x86/lib/bios_interrupts.c                |   1 +
 arch/x86/lib/bootm.c                          |   6 +-
 arch/x86/lib/cmd_boot.c                       |   2 +-
 arch/x86/lib/coreboot_table.c                 |   1 +
 arch/x86/lib/fsp/fsp_common.c                 |   2 +
 arch/x86/lib/fsp/fsp_dram.c                   |   1 +
 arch/x86/lib/fsp/fsp_graphics.c               |   2 +
 arch/x86/lib/fsp/fsp_support.c                |   1 +
 arch/x86/lib/fsp1/fsp_common.c                |   2 +
 arch/x86/lib/fsp1/fsp_dram.c                  |   1 +
 arch/x86/lib/fsp1/fsp_support.c               |   1 +
 arch/x86/lib/fsp2/fsp_dram.c                  |   2 +
 arch/x86/lib/fsp2/fsp_init.c                  |   2 +
 arch/x86/lib/fsp2/fsp_meminit.c               |   6 +-
 arch/x86/lib/fsp2/fsp_silicon_init.c          |   6 +-
 arch/x86/lib/fsp2/fsp_support.c               |   1 +
 arch/x86/lib/i8259.c                          |   1 +
 arch/x86/lib/interrupts.c                     |   3 +-
 arch/x86/lib/mpspec.c                         |   1 +
 arch/x86/lib/mrccache.c                       |   1 +
 arch/x86/lib/physmem.c                        |   1 +
 arch/x86/lib/pinctrl_ich6.c                   |   1 +
 arch/x86/lib/pirq_routing.c                   |   1 +
 arch/x86/lib/pmu.c                            |   1 +
 arch/x86/lib/relocate.c                       |   1 +
 arch/x86/lib/scu.c                            |   2 +
 arch/x86/lib/spl.c                            |   3 +
 arch/x86/lib/tpl.c                            |   3 +
 arch/x86/lib/zimage.c                         |   3 +-
 arch/xtensa/cpu/cpu.c                         |   1 +
 arch/xtensa/cpu/exceptions.c                  |   1 +
 arch/xtensa/lib/bootm.c                       |   1 +
 arch/xtensa/lib/time.c                        |   1 +
 board/AndesTech/adp-ae3xx/adp-ae3xx.c         |   2 +
 board/AndesTech/adp-ag101p/adp-ag101p.c       |   2 +
 board/AndesTech/ax25-ae350/ax25-ae350.c       |   3 +
 board/Arcturus/ucp1020/cmd_arc.c              |   6 +-
 board/Arcturus/ucp1020/ucp1020.c              |   2 +
 board/BuR/brppt2/board.c                      |   1 +
 board/BuR/common/br_resetc.c                  |   1 +
 board/BuR/common/common.c                     |   2 +
 board/BuS/eb_cpu5282/eb_cpu5282.c             |   2 +-
 board/CZ.NIC/turris_mox/mox_sp.c              |   2 +
 board/CZ.NIC/turris_mox/turris_mox.c          |   2 +
 board/CZ.NIC/turris_omnia/turris_omnia.c      |   3 +
 board/CarMediaLab/flea3/flea3.c               |   1 +
 board/LaCie/net2big_v2/net2big_v2.c           |   4 +-
 board/LaCie/netspace_v2/netspace_v2.c         |   3 +-
 board/Marvell/aspenite/aspenite.c             |   1 +
 board/Marvell/db-88f6281-bp/db-88f6281-bp.c   |   2 +
 board/Marvell/db-88f6720/db-88f6720.c         |   3 +
 board/Marvell/db-88f6820-amc/db-88f6820-amc.c |   3 +
 board/Marvell/db-88f6820-gp/db-88f6820-gp.c   |   3 +
 board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c   |   3 +
 board/Marvell/db-xc3-24g4xg/db-xc3-24g4xg.c   |   2 +
 board/Marvell/dreamplug/dreamplug.c           |   1 +
 board/Marvell/gplugd/gplugd.c                 |   3 +
 board/Marvell/guruplug/guruplug.c             |   1 +
 board/Marvell/mvebu_armada-37xx/board.c       |   2 +
 board/Marvell/mvebu_armada-8k/board.c         |   1 +
 board/Marvell/openrd/openrd.c                 |   1 +
 board/Marvell/sheevaplug/sheevaplug.c         |   1 +
 board/Seagate/dockstar/dockstar.c             |   2 +
 board/Seagate/goflexhome/goflexhome.c         |   2 +
 board/Seagate/nas220/nas220.c                 |   1 +
 board/Synology/ds109/ds109.c                  |   2 +
 board/Synology/ds414/cmd_syno.c               |  10 +-
 board/Synology/ds414/ds414.c                  |   2 +
 board/abilis/tb100/tb100.c                    |   1 +
 board/advantech/dms-ba16/dms-ba16.c           |   2 +
 .../imx8qm_rom7720_a1/imx8qm_rom7720_a1.c     |   3 +
 board/advantech/imx8qm_rom7720_a1/spl.c       |   3 +
 .../som-db5800-som-6867/som-db5800-som-6867.c |   1 +
 board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c   |   3 +
 .../alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c |   2 +
 board/alliedtelesis/x530/x530.c               |   2 +
 board/amazon/kc1/kc1.c                        |   1 +
 board/amlogic/p200/p200.c                     |   2 +
 board/amlogic/p201/p201.c                     |   2 +
 board/amlogic/p212/p212.c                     |   2 +
 board/amlogic/q200/q200.c                     |   2 +
 board/amlogic/s400/s400.c                     |   2 +
 board/amlogic/sei510/sei510.c                 |   3 +
 board/amlogic/sei610/sei610.c                 |   3 +
 board/amlogic/u200/u200.c                     |   2 +
 board/amlogic/w400/w400.c                     |   2 +
 board/aristainetos/aristainetos.c             |   3 +
 board/armadeus/apf27/fpga.c                   |   2 +
 board/armltd/integrator/integrator.c          |   2 +
 board/armltd/integrator/pci.c                 |   3 +
 board/armltd/integrator/timer.c               |   3 +-
 board/armltd/vexpress/vexpress_common.c       |   2 +
 board/armltd/vexpress64/pcie.c                |   3 +
 board/armltd/vexpress64/vexpress64.c          |   2 +
 board/astro/mcf5373l/mcf5373l.c               |   1 +
 board/atmel/at91rm9200ek/at91rm9200ek.c       |   1 +
 board/atmel/at91sam9260ek/led.c               |   1 +
 board/atmel/at91sam9263ek/at91sam9263ek.c     |   1 +
 board/atmel/at91sam9n12ek/at91sam9n12ek.c     |   1 +
 board/atmel/common/mac-spi-nor.c              |   1 +
 board/atmel/common/mac_eeprom.c               |   1 +
 board/atmel/common/video_display.c            |   1 +
 board/avionic-design/common/tamonten-ng.c     |   1 +
 board/bachmann/ot1200/ot1200.c                |   2 +
 board/bachmann/ot1200/ot1200_spl.c            |   1 +
 board/barco/platinum/platinum.c               |   1 +
 board/barco/platinum/platinum_picon.c         |   1 +
 board/barco/platinum/platinum_titanium.c      |   1 +
 board/barco/platinum/spl_picon.c              |   1 +
 board/barco/platinum/spl_titanium.c           |   1 +
 board/barco/titanium/titanium.c               |   2 +
 board/beckhoff/mx53cx9020/mx53cx9020.c        |   1 +
 board/birdland/bav335x/board.c                |   1 +
 board/bluegiga/apx4devkit/apx4devkit.c        |   2 +
 board/bluewater/gurnard/gurnard.c             |   1 +
 board/bluewater/snapper9260/snapper9260.c     |   1 +
 board/bosch/guardian/board.c                  |   2 +
 board/bosch/shc/board.c                       |   3 +
 board/boundary/nitrogen6x/nitrogen6x.c        |   6 +-
 board/broadcom/bcm23550_w1d/bcm23550_w1d.c    |   1 +
 board/broadcom/bcm28155_ap/bcm28155_ap.c      |   1 +
 board/broadcom/bcm963158/bcm963158.c          |   1 +
 board/broadcom/bcm968360bg/bcm968360bg.c      |   1 +
 board/broadcom/bcm968580xref/bcm968580xref.c  |   1 +
 board/broadcom/bcm_ep/board.c                 |   2 +
 board/broadcom/bcmns2/northstar2.c            |   1 +
 board/broadcom/bcmstb/bcmstb.c                |   1 +
 board/bticino/mamoj/mamoj.c                   |   1 +
 board/bticino/mamoj/spl.c                     |   2 +
 board/buffalo/lsxl/lsxl.c                     |   5 +
 board/cavium/thunderx/atf.c                   |   5 +-
 board/cavium/thunderx/thunderx.c              |   1 +
 board/ccv/xpress/spl.c                        |   1 +
 board/ccv/xpress/xpress.c                     |   2 +
 board/cirrus/edb93xx/edb93xx.c                |   2 +
 board/cloudengines/pogo_e02/pogo_e02.c        |   2 +
 board/cobra5272/flash.c                       |  21 +-
 board/compal/paz00/paz00.c                    |   1 +
 board/compulab/cl-som-imx7/cl-som-imx7.c      |   2 +
 board/compulab/cm_fx6/cm_fx6.c                |   2 +
 board/compulab/cm_fx6/spl.c                   |   1 +
 board/compulab/cm_t335/cm_t335.c              |   2 +
 board/compulab/cm_t335/spl.c                  |   1 +
 board/compulab/cm_t35/cm_t35.c                |   2 +
 board/compulab/cm_t43/cm_t43.c                |   2 +
 board/compulab/cm_t54/cm_t54.c                |   2 +
 board/compulab/cm_t54/mux.c                   |   1 +
 board/compulab/common/common.c                |   1 +
 board/compulab/common/omap3_smc911x.c         |   1 +
 board/congatec/cgtqmx6eval/cgtqmx6eval.c      |   2 +
 board/corscience/tricorder/tricorder-eeprom.c |   3 +-
 board/corscience/tricorder/tricorder.c        |   1 +
 board/cortina/presidio-asic/presidio.c        |   2 +
 board/creative/xfi3/xfi3.c                    |   3 +
 board/cssi/MCR3000/MCR3000.c                  |   1 +
 board/d-link/dns325/dns325.c                  |   2 +
 board/davinci/da8xxevm/da850evm.c             |   1 +
 board/davinci/da8xxevm/omapl138_lcdk.c        |   1 +
 board/dfi/dfi-bt700/dfi-bt700.c               |   2 +
 board/dhelectronics/dh_imx6/dh_imx6.c         |   3 +
 board/dhelectronics/dh_imx6/dh_imx6_spl.c     |   2 +
 board/dhelectronics/dh_stm32mp1/board.c       |   4 +
 board/ea/mx7ulp_com/mx7ulp_com.c              |   1 +
 board/eets/pdu001/board.c                     |   1 +
 board/egnite/ethernut5/ethernut5_pwrman.c     |   4 +-
 board/el/el6x/el6x.c                          |   3 +
 board/elgin/elgin_rv1108/elgin_rv1108.c       |   1 +
 board/embest/mx6boards/mx6boards.c            |   3 +
 board/emulation/qemu-arm/qemu-arm.c           |   2 +
 board/emulation/qemu-riscv/qemu-riscv.c       |   2 +
 board/engicam/common/board.c                  |   1 +
 board/engicam/common/spl.c                    |   3 +
 board/esd/meesc/meesc.c                       |   1 +
 board/esd/vme8349/caddy.c                     |   3 +-
 board/esd/vme8349/pci.c                       |   1 +
 board/esd/vme8349/vme8349.c                   |   1 +
 board/firefly/firefly-rk3288/firefly-rk3288.c |   1 +
 board/firefly/firefly-rk3308/roc_cc_rk3308.c  |   1 +
 board/firefly/roc-pc-rk3399/roc-pc-rk3399.c   |   1 +
 board/freescale/b4860qds/b4860qds.c           |   3 +
 board/freescale/b4860qds/ddr.c                |   2 +
 board/freescale/b4860qds/eth_b4860qds.c       |   2 +
 board/freescale/bsc9131rdb/bsc9131rdb.c       |   2 +
 board/freescale/bsc9131rdb/spl_minimal.c      |   1 +
 board/freescale/bsc9132qds/bsc9132qds.c       |   2 +
 board/freescale/bsc9132qds/spl_minimal.c      |   1 +
 board/freescale/c29xpcie/c29xpcie.c           |   2 +
 board/freescale/c29xpcie/cpld.c               |   3 +-
 board/freescale/common/arm_sleep.c            |   1 +
 board/freescale/common/cmd_esbc_validate.c    |   8 +-
 board/freescale/common/diu_ch7301.c           |   1 +
 board/freescale/common/fsl_chain_of_trust.c   |   1 +
 board/freescale/common/fsl_validate.c         |   2 +
 board/freescale/common/ics307_clk.c           |   1 +
 .../common/idt8t49n222a_serdes_clk.c          |   2 +
 board/freescale/common/mc34vr500.c            |   1 +
 board/freescale/common/mpc85xx_sleep.c        |   1 +
 board/freescale/common/ngpixis.c              |   3 +-
 board/freescale/common/ns_access.c            |   2 +
 board/freescale/common/pixis.c                |  10 +-
 board/freescale/common/qixis.c                |   3 +-
 board/freescale/common/sgmii_riser.c          |   1 +
 board/freescale/common/sys_eeprom.c           |   4 +-
 board/freescale/common/vid.c                  |  11 +-
 board/freescale/common/vsc3316_3308.c         |   1 +
 board/freescale/common/zm7300.c               |   1 +
 board/freescale/corenet_ds/corenet_ds.c       |   1 +
 board/freescale/corenet_ds/ddr.c              |   2 +
 board/freescale/corenet_ds/eth_hydra.c        |   1 +
 board/freescale/corenet_ds/eth_p4080.c        |   3 +
 board/freescale/corenet_ds/eth_superhydra.c   |   2 +
 board/freescale/imx8mm_evk/imx8mm_evk.c       |   2 +
 board/freescale/imx8mm_evk/spl.c              |   4 +
 board/freescale/imx8mn_evk/imx8mn_evk.c       |   2 +
 board/freescale/imx8mn_evk/spl.c              |   4 +
 board/freescale/imx8mp_evk/imx8mp_evk.c       |   2 +
 board/freescale/imx8mp_evk/spl.c              |   4 +
 board/freescale/imx8mq_evk/imx8mq_evk.c       |   1 +
 board/freescale/imx8mq_evk/spl.c              |   4 +
 board/freescale/imx8qm_mek/spl.c              |   3 +
 board/freescale/imx8qxp_mek/imx8qxp_mek.c     |   1 +
 board/freescale/imx8qxp_mek/spl.c             |   3 +
 board/freescale/imxrt1020-evk/imxrt1020-evk.c |   2 +
 board/freescale/imxrt1050-evk/imxrt1050-evk.c |   2 +
 board/freescale/ls1012afrdm/eth.c             |   1 +
 board/freescale/ls1012afrdm/ls1012afrdm.c     |   2 +
 board/freescale/ls1012aqds/eth.c              |   1 +
 board/freescale/ls1012aqds/ls1012aqds.c       |   2 +
 board/freescale/ls1012ardb/eth.c              |   1 +
 board/freescale/ls1012ardb/ls1012ardb.c       |   7 +-
 board/freescale/ls1021aiot/ls1021aiot.c       |   2 +
 board/freescale/ls1021aqds/ddr.c              |   3 +
 board/freescale/ls1021aqds/eth.c              |   1 +
 board/freescale/ls1021aqds/ls1021aqds.c       |   1 +
 board/freescale/ls1021atsn/ls1021atsn.c       |   2 +
 board/freescale/ls1021atwr/ls1021atwr.c       |  15 +-
 board/freescale/ls1028a/ls1028a.c             |   2 +
 board/freescale/ls1043aqds/ddr.c              |   1 +
 board/freescale/ls1043aqds/eth.c              |   2 +
 board/freescale/ls1043aqds/ls1043aqds.c       |   2 +
 board/freescale/ls1043ardb/cpld.c             |   2 +-
 board/freescale/ls1043ardb/ddr.c              |   1 +
 board/freescale/ls1043ardb/eth.c              |   1 +
 board/freescale/ls1043ardb/ls1043ardb.c       |   1 +
 board/freescale/ls1046afrwy/eth.c             |   2 +
 board/freescale/ls1046afrwy/ls1046afrwy.c     |   1 +
 board/freescale/ls1046aqds/ddr.c              |   1 +
 board/freescale/ls1046aqds/eth.c              |   2 +
 board/freescale/ls1046aqds/ls1046aqds.c       |   1 +
 board/freescale/ls1046ardb/cpld.c             |   2 +-
 board/freescale/ls1046ardb/ddr.c              |   1 +
 board/freescale/ls1046ardb/eth.c              |   2 +
 board/freescale/ls1046ardb/ls1046ardb.c       |   1 +
 board/freescale/ls1088a/ddr.c                 |   1 +
 board/freescale/ls1088a/eth_ls1088aqds.c      |   2 +
 board/freescale/ls1088a/ls1088a.c             |   3 +
 board/freescale/ls2080a/ddr.c                 |   1 +
 board/freescale/ls2080a/ls2080a.c             |   1 +
 board/freescale/ls2080aqds/ddr.c              |   1 +
 board/freescale/ls2080aqds/eth.c              |   2 +
 board/freescale/ls2080aqds/ls2080aqds.c       |   1 +
 board/freescale/ls2080ardb/ddr.c              |   1 +
 board/freescale/ls2080ardb/ls2080ardb.c       |   1 +
 board/freescale/lx2160a/eth_lx2160aqds.c      |   3 +
 board/freescale/lx2160a/eth_lx2160ardb.c      |   1 +
 board/freescale/lx2160a/lx2160a.c             |   2 +
 board/freescale/m5208evbe/m5208evbe.c         |   1 +
 board/freescale/m52277evb/m52277evb.c         |   1 +
 board/freescale/m5249evb/m5249evb.c           |   1 +
 board/freescale/m5253demo/flash.c             |   2 +
 board/freescale/m5253demo/m5253demo.c         |   2 +
 board/freescale/m5282evb/m5282evb.c           |   1 +
 board/freescale/m53017evb/m53017evb.c         |   1 +
 board/freescale/m5329evb/m5329evb.c           |   1 +
 board/freescale/m5373evb/m5373evb.c           |   1 +
 board/freescale/m54418twr/m54418twr.c         |   1 +
 board/freescale/m54451evb/m54451evb.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       |   2 +
 board/freescale/mpc8313erdb/sdram.c           |   2 +
 board/freescale/mpc8315erdb/mpc8315erdb.c     |   2 +
 board/freescale/mpc8315erdb/sdram.c           |   2 +
 board/freescale/mpc8323erdb/mpc8323erdb.c     |   1 +
 board/freescale/mpc832xemds/mpc832xemds.c     |   1 +
 board/freescale/mpc832xemds/pci.c             |   1 +
 board/freescale/mpc8349emds/mpc8349emds.c     |   3 +
 board/freescale/mpc8349emds/pci.c             |   1 +
 board/freescale/mpc8349itx/mpc8349itx.c       |   4 +
 board/freescale/mpc8349itx/pci.c              |   1 +
 board/freescale/mpc837xemds/mpc837xemds.c     |   3 +
 board/freescale/mpc837xemds/pci.c             |   1 +
 board/freescale/mpc837xerdb/mpc837xerdb.c     |   2 +
 board/freescale/mpc837xerdb/pci.c             |   1 +
 board/freescale/mpc8536ds/mpc8536ds.c         |   3 +
 board/freescale/mpc8541cds/mpc8541cds.c       |   1 +
 board/freescale/mpc8544ds/mpc8544ds.c         |   1 +
 board/freescale/mpc8548cds/mpc8548cds.c       |   2 +
 board/freescale/mpc8555cds/mpc8555cds.c       |   1 +
 board/freescale/mpc8568mds/bcsr.c             |   1 +
 board/freescale/mpc8568mds/mpc8568mds.c       |   5 +-
 board/freescale/mpc8569mds/bcsr.c             |   1 +
 board/freescale/mpc8569mds/mpc8569mds.c       |   3 +
 board/freescale/mpc8572ds/mpc8572ds.c         |   4 +
 board/freescale/mpc8610hpcd/mpc8610hpcd.c     |   3 +
 board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c |   1 +
 board/freescale/mpc8641hpcn/mpc8641hpcn.c     |   3 +
 board/freescale/mx23evk/mx23evk.c             |   1 +
 board/freescale/mx25pdk/mx25pdk.c             |   1 +
 board/freescale/mx28evk/mx28evk.c             |   3 +
 board/freescale/mx31pdk/mx31pdk.c             |   1 +
 board/freescale/mx35pdk/mx35pdk.c             |   2 +
 board/freescale/mx51evk/mx51evk.c             |   1 +
 board/freescale/mx53ard/mx53ard.c             |   1 +
 board/freescale/mx53loco/mx53loco.c           |   1 +
 board/freescale/mx6memcal/mx6memcal.c         |   1 +
 board/freescale/mx6memcal/spl.c               |   1 +
 board/freescale/mx6qarm2/mx6qarm2.c           |   2 +
 board/freescale/mx6sabreauto/mx6sabreauto.c   |   2 +
 board/freescale/mx6sabresd/mx6sabresd.c       |   2 +
 board/freescale/mx6slevk/mx6slevk.c           |   2 +
 .../freescale/mx6sxsabreauto/mx6sxsabreauto.c |   2 +
 board/freescale/mx6sxsabresd/mx6sxsabresd.c   |   2 +
 .../mx6ul_14x14_evk/mx6ul_14x14_evk.c         |   2 +
 board/freescale/mx7dsabresd/mx7dsabresd.c     |   2 +
 board/freescale/mx7ulp_evk/mx7ulp_evk.c       |   1 +
 board/freescale/p1010rdb/p1010rdb.c           |   7 +-
 board/freescale/p1022ds/diu.c                 |   1 +
 board/freescale/p1022ds/p1022ds.c             |   3 +
 board/freescale/p1023rdb/p1023rdb.c           |   2 +
 board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c   |   3 +
 board/freescale/p1_twr/p1_twr.c               |   2 +
 board/freescale/p2041rdb/cpld.c               |   2 +-
 board/freescale/p2041rdb/ddr.c                |   2 +
 board/freescale/p2041rdb/eth.c                |   1 +
 board/freescale/p2041rdb/p2041rdb.c           |   1 +
 board/freescale/qemu-ppce500/qemu-ppce500.c   |   2 +
 board/freescale/t102xqds/ddr.c                |   3 +
 board/freescale/t102xqds/eth_t102xqds.c       |   3 +
 board/freescale/t102xqds/t102xqds.c           |   2 +
 board/freescale/t102xrdb/cpld.c               |   2 +-
 board/freescale/t102xrdb/ddr.c                |   3 +
 board/freescale/t102xrdb/eth_t102xrdb.c       |   2 +
 board/freescale/t102xrdb/t102xrdb.c           |   5 +-
 board/freescale/t1040qds/ddr.c                |   3 +
 board/freescale/t1040qds/eth.c                |   2 +
 board/freescale/t1040qds/t1040qds.c           |   1 +
 board/freescale/t104xrdb/cpld.c               |   2 +-
 board/freescale/t104xrdb/ddr.c                |   3 +
 board/freescale/t104xrdb/eth.c                |   1 +
 board/freescale/t104xrdb/t104xrdb.c           |   2 +
 board/freescale/t208xqds/ddr.c                |   2 +
 board/freescale/t208xqds/eth_t208xqds.c       |   4 +
 board/freescale/t208xqds/t208xqds.c           |   2 +
 board/freescale/t208xrdb/cpld.c               |   2 +-
 board/freescale/t208xrdb/ddr.c                |   2 +
 board/freescale/t208xrdb/eth_t208xrdb.c       |   2 +
 board/freescale/t208xrdb/t208xrdb.c           |   1 +
 board/freescale/t4qds/ddr.c                   |   2 +
 board/freescale/t4qds/eth.c                   |   4 +
 board/freescale/t4qds/t4240emu.c              |   1 +
 board/freescale/t4qds/t4240qds.c              |   7 +-
 board/freescale/t4rdb/cpld.c                  |   2 +-
 board/freescale/t4rdb/ddr.c                   |   2 +
 board/freescale/t4rdb/eth.c                   |   2 +
 board/freescale/t4rdb/t4240rdb.c              |   1 +
 board/gardena/smart-gateway-mt7688/board.c    |   7 +-
 board/gateworks/gw_ventana/common.c           |   3 +
 board/gateworks/gw_ventana/eeprom.c           |   6 +-
 board/gateworks/gw_ventana/gsc.c              |  13 +-
 board/gateworks/gw_ventana/gw_ventana.c       |   5 +
 board/gateworks/gw_ventana/gw_ventana_spl.c   |   2 +
 board/gdsys/a38x/controlcenterdc.c            |   3 +
 board/gdsys/a38x/hre.c                        |   1 +
 board/gdsys/a38x/hydra.c                      |   3 +-
 board/gdsys/a38x/ihs_phys.c                   |   2 +
 board/gdsys/common/cmd_ioloop.c               |  12 +-
 board/gdsys/common/ihs_mdio.c                 |   1 +
 board/gdsys/common/ioep-fpga.c                |   2 +
 board/gdsys/common/mclink.c                   |   1 +
 board/gdsys/common/osd.c                      |  11 +-
 board/gdsys/common/osd_cmd.c                  |  13 +-
 board/gdsys/common/phy.c                      |   1 +
 board/gdsys/mpc8308/gazerbeam.c               |   1 +
 board/gdsys/mpc8308/hrcon.c                   |   3 +
 board/gdsys/mpc8308/mpc8308.c                 |   1 +
 board/gdsys/mpc8308/strider.c                 |   3 +
 board/gdsys/p1022/controlcenterd-id.c         |   3 +
 board/gdsys/p1022/controlcenterd.c            |   5 +-
 board/gdsys/p1022/ddr.c                       |   1 +
 board/gdsys/p1022/diu.c                       |   1 +
 board/ge/bx50v3/bx50v3.c                      |   2 +
 board/google/chromebook_coral/coral.c         |   1 +
 board/google/gru/gru.c                        |   1 +
 board/google/imx8mq_phanbell/spl.c            |   3 +
 board/google/veyron/veyron.c                  |   3 +
 board/grinn/chiliboard/board.c                |   1 +
 board/grinn/liteboard/board.c                 |   1 +
 board/gumstix/duovero/duovero.c               |   3 +
 board/gumstix/pepper/board.c                  |   2 +
 board/highbank/ahci.c                         |   1 +
 board/highbank/highbank.c                     |   3 +
 board/hisilicon/hikey/hikey.c                 |   3 +
 board/hisilicon/hikey960/hikey960.c           |   3 +
 board/hisilicon/poplar/poplar.c               |   3 +
 board/ids/ids8313/ids8313.c                   |   2 +
 board/imgtec/boston/checkboard.c              |   1 +
 board/imgtec/ci20/ci20.c                      |   3 +
 board/imgtec/malta/malta.c                    |   2 +
 board/imgtec/xilfpga/xilfpga.c                |   1 +
 board/intel/cougarcanyon2/cougarcanyon2.c     |   1 +
 board/intel/crownbay/crownbay.c               |   1 +
 board/intel/minnowmax/minnowmax.c             |   2 +
 board/inversepath/usbarmory/usbarmory.c       |   1 +
 board/iomega/iconnect/iconnect.c              |   1 +
 board/isee/igep003x/board.c                   |   1 +
 board/isee/igep00x0/common.c                  |   1 +
 board/isee/igep00x0/igep00x0.c                |   3 +
 board/k+p/kp_imx53/kp_id_rev.c                |   1 +
 board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c     |   3 +
 board/keymile/common/common.c                 |  13 +-
 board/keymile/common/qrio.c                   |   1 +
 board/keymile/km83xx/km83xx.c                 |   2 +
 board/keymile/km83xx/km83xx_i2c.c             |   1 +
 board/keymile/km_arm/fpga_config.c            |   1 +
 board/keymile/kmp204x/ddr.c                   |   2 +
 board/keymile/kmp204x/eth.c                   |   1 +
 board/keymile/kmp204x/kmp204x.c               |   1 +
 board/keymile/kmp204x/pci.c                   |   1 +
 board/kmc/kzm9g/kzm9g.c                       |   2 +
 board/kobol/helios4/helios4.c                 |   2 +
 board/kosagi/novena/novena.c                  |   1 +
 board/kosagi/novena/novena_spl.c              |   1 +
 board/kosagi/novena/video.c                   |   2 +
 board/lego/ev3/legoev3.c                      |   1 +
 board/lg/sniper/sniper.c                      |   1 +
 board/liebherr/display5/display5.c            |   4 +
 board/liebherr/display5/spl.c                 |   4 +
 board/liebherr/mccmon6/spl.c                  |   3 +
 board/liebherr/xea/xea.c                      |   5 +
 board/logicpd/am3517evm/am3517evm.c           |   2 +
 board/logicpd/omap3som/omap3logic.c           |   1 +
 board/logicpd/zoom1/zoom1.c                   |   2 +
 board/maxbcm/maxbcm.c                         |   1 +
 board/mediatek/mt7622/mt7622_rfb.c            |   2 +
 board/mediatek/mt8512/mt8512.c                |   1 +
 board/mediatek/mt8518/mt8518_ap1.c            |   2 +
 board/menlo/m53menlo/m53menlo.c               |   1 +
 board/microchip/mpfs_icicle/mpfs_icicle.c     |   1 +
 board/microchip/pic32mzda/pic32mzda.c         |   1 +
 board/mikrotik/crs305-1g-4s/crs305-1g-4s.c    |   2 +
 board/mpc8308_p1m/mpc8308_p1m.c               |   2 +
 board/mscc/common/spi.c                       |   1 +
 board/mscc/jr2/jr2.c                          |   3 +
 board/mscc/luton/luton.c                      |   1 +
 board/mscc/ocelot/ocelot.c                    |   3 +
 board/mscc/serval/serval.c                    |   1 +
 board/mscc/servalt/servalt.c                  |   1 +
 board/netgear/dgnd3700v2/dgnd3700v2.c         |   2 +
 board/nokia/rx51/rx51.c                       |   1 +
 board/novtech/meerkat96/meerkat96.c           |   1 +
 board/nvidia/cardhu/cardhu.c                  |   2 +
 board/nvidia/dalmore/dalmore.c                |   1 +
 board/nvidia/e2220-1170/e2220-1170.c          |   1 +
 board/nvidia/jetson-tk1/jetson-tk1.c          |   1 +
 board/nvidia/nyan-big/nyan-big.c              |   2 +
 board/nvidia/p2371-0000/p2371-0000.c          |   1 +
 board/nvidia/p2371-2180/p2371-2180.c          |   3 +
 board/nvidia/p2571/p2571.c                    |   1 +
 board/nvidia/p2771-0000/p2771-0000.c          |   2 +
 board/nvidia/p3450-0000/p3450-0000.c          |   1 +
 board/nvidia/venice2/as3722_init.c            |   2 +
 board/olimex/mx23_olinuxino/mx23_olinuxino.c  |   2 +
 board/overo/overo.c                           |   3 +
 board/overo/spl.c                             |   2 +
 board/pandora/pandora.c                       |   2 +
 board/phytec/pcl063/spl.c                     |   1 +
 board/phytec/pcm051/board.c                   |   2 +
 board/phytec/pcm052/pcm052.c                  |   1 +
 board/phytec/pcm058/pcm058.c                  |   2 +
 board/phytec/pfla02/pfla02.c                  |   3 +
 board/phytec/phycore_rk3288/phycore-rk3288.c  |   3 +
 board/phytium/durian/durian.c                 |   4 +
 .../rockpro64_rk3399/rockpro64-rk3399.c       |   1 +
 board/ppcag/bg0900/bg0900.c                   |   3 +
 board/qca/ap121/ap121.c                       |   1 +
 board/qca/ap143/ap143.c                       |   1 +
 board/qca/ap152/ap152.c                       |   1 +
 board/qemu-mips/qemu-mips.c                   |   2 +
 .../dragonboard410c/dragonboard410c.c         |   3 +
 .../dragonboard820c/dragonboard820c.c         |   2 +
 board/raidsonic/ib62x0/ib62x0.c               |   1 +
 board/renesas/MigoR/migo_r.c                  |   2 +
 board/renesas/alt/alt.c                       |   3 +
 board/renesas/alt/alt_spl.c                   |   2 +
 board/renesas/blanche/blanche.c               |   3 +
 board/renesas/condor/condor.c                 |   1 +
 board/renesas/draak/draak.c                   |   2 +
 board/renesas/eagle/eagle.c                   |   1 +
 board/renesas/ebisu/ebisu.c                   |   1 +
 board/renesas/gose/gose.c                     |   3 +
 board/renesas/gose/gose_spl.c                 |   2 +
 board/renesas/grpeach/grpeach.c               |   1 +
 board/renesas/koelsch/koelsch.c               |   3 +
 board/renesas/koelsch/koelsch_spl.c           |   2 +
 board/renesas/lager/lager.c                   |   3 +
 board/renesas/lager/lager_spl.c               |   2 +
 board/renesas/porter/porter.c                 |   3 +
 board/renesas/porter/porter_spl.c             |   2 +
 board/renesas/r2dplus/r2dplus.c               |   1 +
 board/renesas/r7780mp/r7780mp.c               |   1 +
 board/renesas/rcar-common/common.c            |   2 +
 board/renesas/rcar-common/gen3-spl.c          |   4 +
 board/renesas/salvator-x/salvator-x.c         |   3 +
 board/renesas/sh7752evb/sh7752evb.c           |   6 +-
 board/renesas/sh7753evb/sh7753evb.c           |   6 +-
 board/renesas/sh7757lcr/sh7757lcr.c           |   7 +-
 board/renesas/sh7763rdp/sh7763rdp.c           |   1 +
 board/renesas/silk/silk.c                     |   3 +
 board/renesas/silk/silk_spl.c                 |   2 +
 board/renesas/stout/cpld.c                    |   4 +-
 board/renesas/stout/stout.c                   |   3 +
 board/renesas/stout/stout_spl.c               |   2 +
 board/renesas/ulcb/cpld.c                     |   4 +-
 board/renesas/ulcb/ulcb.c                     |   3 +
 board/rockchip/evb_rk3399/evb-rk3399.c        |   2 +
 board/rockchip/evb_rv1108/evb_rv1108.c        |   1 +
 board/rockchip/kylin_rk3036/kylin_rk3036.c    |   1 +
 board/rockchip/tinker_rk3288/tinker-rk3288.c  |   1 +
 board/samsung/arndale/arndale.c               |   1 +
 board/samsung/common/board.c                  |   4 +
 board/samsung/common/exynos5-dt-types.c       |   1 +
 board/samsung/common/exynos5-dt.c             |   1 +
 board/samsung/common/misc.c                   |   3 +-
 board/samsung/goni/goni.c                     |   3 +
 board/samsung/odroid/odroid.c                 |   1 +
 board/samsung/smdkc100/smdkc100.c             |   1 +
 board/samsung/smdkv310/smdkv310.c             |   2 +
 board/samsung/trats/trats.c                   |   2 +
 board/samsung/trats2/trats2.c                 |   2 +
 board/samsung/universal_c210/universal.c      |   2 +
 board/sandisk/sansa_fuze_plus/sfp.c           |   3 +
 board/sbc8349/pci.c                           |   1 +
 board/sbc8349/sbc8349.c                       |   3 +
 board/sbc8548/ddr.c                           |   1 +
 board/sbc8548/sbc8548.c                       |   3 +
 board/sbc8641d/sbc8641d.c                     |  12 +-
 board/schulercontrol/sc_sps_1/sc_sps_1.c      |   2 +
 board/seco/mx6quq7/mx6quq7.c                  |   2 +
 board/seeed/linkit-smart-7688/board.c         |   2 +
 board/siemens/capricorn/board.c               |   9 +-
 board/siemens/capricorn/spl.c                 |   1 +
 board/siemens/common/board.c                  |  10 +-
 board/siemens/common/factoryset.c             |   1 +
 board/siemens/corvus/board.c                  |   1 +
 board/siemens/draco/board.c                   |   7 +-
 board/siemens/pxm2/board.c                    |   2 +
 board/siemens/rut/board.c                     |   2 +
 board/siemens/smartweb/smartweb.c             |   1 +
 board/siemens/taurus/taurus.c                 |   5 +-
 board/sifive/fu540/fu540.c                    |   3 +
 board/silica/pengwyn/board.c                  |   2 +
 board/sks-kinkel/sksimx6/sksimx6.c            |   5 +
 board/socrates/sdram.c                        |   1 +
 board/socrates/socrates.c                     |  30 +-
 board/softing/vining_2000/vining_2000.c       |   3 +
 board/softing/vining_fpga/socfpga.c           |   2 +
 board/solidrun/clearfog/clearfog.c            |   5 +
 board/solidrun/mx6cuboxi/mx6cuboxi.c          |   5 +
 board/spear/spear300/spear300.c               |   1 +
 board/spear/spear310/spear310.c               |   1 +
 board/spear/spear320/spear320.c               |   1 +
 board/spear/spear600/spear600.c               |   1 +
 board/spear/x600/fpga.c                       |   2 +
 board/spear/x600/x600.c                       |   2 +
 board/sr1500/socfpga.c                        |   2 +
 board/st/common/cmd_stboard.c                 |   5 +-
 board/st/stih410-b2260/board.c                |   2 +
 .../stm32f429-discovery/stm32f429-discovery.c |   3 +
 .../stm32f429-evaluation.c                    |   3 +
 .../stm32f469-discovery/stm32f469-discovery.c |   3 +
 board/st/stm32f746-disco/stm32f746-disco.c    |   2 +
 board/st/stm32h743-disco/stm32h743-disco.c    |   1 +
 board/st/stm32h743-eval/stm32h743-eval.c      |   1 +
 board/st/stm32mp1/board.c                     |   2 +
 board/st/stm32mp1/stm32mp1.c                  |   5 +
 board/st/stv0991/stv0991.c                    |   3 +
 board/ste/stemmy/stemmy.c                     |   1 +
 board/sunxi/board.c                           |   3 +
 board/sunxi/dram_sun4i_auto.c                 |   1 +
 board/sunxi/dram_sun5i_auto.c                 |   1 +
 board/synopsys/axs10x/axs10x.c                |   2 +
 board/synopsys/emsdp/emsdp.c                  |  13 +-
 board/synopsys/hsdk/clk-lib.c                 |   1 +
 board/synopsys/hsdk/clk-lib.h                 |   1 +
 board/synopsys/hsdk/env-lib.c                 |   1 +
 board/synopsys/hsdk/hsdk.c                    |  27 +-
 board/synopsys/iot_devkit/iot_devkit.c        |   2 +
 board/synopsys/nsim/nsim.c                    |   1 +
 board/syteco/zmx25/zmx25.c                    |   2 +
 board/tbs/tbs2910/tbs2910.c                   |   1 +
 board/tcl/sl50/board.c                        |   1 +
 board/technexion/pico-imx6/pico-imx6.c        |   4 +
 board/technexion/pico-imx6/spl.c              |   4 +
 board/technexion/pico-imx6ul/pico-imx6ul.c    |   3 +
 board/technexion/pico-imx7d/pico-imx7d.c      |   1 +
 board/technexion/pico-imx7d/spl.c             |   2 +
 board/technexion/tao3530/tao3530.c            |   2 +
 board/technologic/ts4600/ts4600.c             |   2 +
 board/technologic/ts4800/ts4800.c             |   3 +
 board/theadorable/fpga.c                      |   1 +
 board/theadorable/theadorable.c               |   5 +-
 .../puma_rk3399/puma-rk3399.c                 |   2 +
 board/ti/am335x/board.c                       |   4 +
 board/ti/am3517crane/am3517crane.c            |   1 +
 board/ti/am43xx/board.c                       |   2 +
 board/ti/am57xx/board.c                       |   2 +
 board/ti/am65x/evm.c                          |   3 +
 board/ti/beagle/beagle.c                      |   3 +
 board/ti/common/board_detect.c                |   2 +
 board/ti/common/board_detect.h                |   1 +
 board/ti/dra7xx/evm.c                         |   2 +
 board/ti/evm/evm.c                            |   3 +
 board/ti/j721e/evm.c                          |   5 +
 board/ti/ks2_evm/board.c                      |   1 +
 board/ti/ks2_evm/board_k2e.c                  |   2 +
 board/ti/ks2_evm/board_k2g.c                  |   3 +
 board/ti/ks2_evm/board_k2hk.c                 |   2 +
 board/ti/ks2_evm/board_k2l.c                  |   2 +
 board/ti/omap5_uevm/evm.c                     |   3 +
 board/ti/panda/panda.c                        |   3 +
 board/ti/sdp4430/cmd_bat.c                    |   2 +-
 board/ti/sdp4430/sdp.c                        |   2 +
 board/ti/ti814x/evm.c                         |   2 +
 board/ti/ti816x/evm.c                         |   2 +
 board/timll/devkit3250/devkit3250.c           |   1 +
 board/timll/devkit8000/devkit8000.c           |   1 +
 board/toradex/apalis-tk1/apalis-tk1.c         |   4 +
 board/toradex/apalis-tk1/as3722_init.c        |   2 +
 board/toradex/apalis_imx6/apalis_imx6.c       |   4 +
 board/toradex/apalis_imx6/do_fuse.c           |   9 +-
 board/toradex/apalis_imx6/pf0100.c            |   6 +-
 board/toradex/apalis_t30/apalis_t30.c         |   3 +
 .../toradex/colibri-imx6ull/colibri-imx6ull.c |   1 +
 board/toradex/colibri_imx6/colibri_imx6.c     |   3 +
 board/toradex/colibri_imx6/do_fuse.c          |   9 +-
 board/toradex/colibri_imx6/pf0100.c           |   6 +-
 board/toradex/colibri_imx7/colibri_imx7.c     |   2 +
 board/toradex/colibri_pxa270/colibri_pxa270.c |   3 +
 board/toradex/colibri_t20/colibri_t20.c       |   3 +
 board/toradex/colibri_t30/colibri_t30.c       |   2 +
 board/toradex/common/tdx-cfg-block.c          |  10 +-
 board/toradex/common/tdx-common.c             |   1 +
 board/toradex/verdin-imx8mm/spl.c             |   4 +
 board/toradex/verdin-imx8mm/verdin-imx8mm.c   |   1 +
 board/tplink/wdr4300/wdr4300.c                |   3 +
 board/tqc/tqm834x/pci.c                       |   1 +
 board/tqc/tqm834x/tqm834x.c                   |   2 +
 board/tqc/tqma6/tqma6.c                       |   1 +
 board/tqc/tqma6/tqma6_mba6.c                  |   2 +
 board/tqc/tqma6/tqma6_wru4.c                  |   2 +
 board/udoo/neo/neo.c                          |   2 +
 board/udoo/udoo.c                             |   2 +
 board/udoo/udoo_spl.c                         |   3 +
 board/variscite/dart_6ul/dart_6ul.c           |   2 +
 board/variscite/dart_6ul/spl.c                |   1 +
 board/varisys/common/sys_eeprom.c             |   3 +-
 board/varisys/cyrus/cyrus.c                   |   1 +
 board/varisys/cyrus/ddr.c                     |   2 +
 board/varisys/cyrus/eth.c                     |   1 +
 board/ve8313/ve8313.c                         |   1 +
 board/vscom/baltos/board.c                    |   1 +
 board/wandboard/spl.c                         |   3 +
 board/wandboard/wandboard.c                   |   4 +
 board/warp7/warp7.c                           |   1 +
 board/work-microwave/work_92105/work_92105.c  |   1 +
 .../work_92105/work_92105_display.c           |   8 +-
 board/xes/common/board.c                      |   1 +
 board/xes/xpedite517x/ddr.c                   |   1 +
 board/xes/xpedite537x/ddr.c                   |   1 +
 board/xilinx/common/board.c                   |   2 +
 .../microblaze-generic/microblaze-generic.c   |   2 +
 board/xilinx/versal/board.c                   |   3 +
 board/xilinx/zynq/bootimg.c                   |   2 +
 board/xilinx/zynq/cmds.c                      |  18 +-
 board/xilinx/zynqmp/cmds.c                    |  23 +-
 board/xilinx/zynqmp/tap_delays.c              |   1 +
 board/xilinx/zynqmp/xil_io.h                  |   1 +
 board/xilinx/zynqmp/zynqmp.c                  |  10 +-
 board/xilinx/zynqmp_r5/board.c                |   1 +
 board/zyxel/nsa310s/nsa310s.c                 |   1 +
 cmd/ab_select.c                               |   9 +-
 cmd/abootimg.c                                |  32 +-
 cmd/acpi.c                                    |   4 +-
 cmd/adc.c                                     |   8 +-
 cmd/adtimg.c                                  |  26 +-
 cmd/aes.c                                     |   2 +-
 cmd/arm/exception.c                           |  14 +-
 cmd/arm/exception64.c                         |   6 +-
 cmd/armflash.c                                |   3 +-
 cmd/avb.c                                     |  40 ++-
 cmd/axi.c                                     |  23 +-
 cmd/bcb.c                                     |  36 +-
 cmd/bdinfo.c                                  |  30 +-
 cmd/bedbug.c                                  |  25 +-
 cmd/bind.c                                    |   5 +-
 cmd/binop.c                                   |   3 +-
 cmd/blk_common.c                              |   3 +-
 cmd/blkcache.c                                |  17 +-
 cmd/blob.c                                    |   3 +-
 cmd/bmp.c                                     |  13 +-
 cmd/boot.c                                    |   4 +-
 cmd/bootcount.c                               |  16 +-
 cmd/bootefi.c                                 |   4 +-
 cmd/booti.c                                   |   7 +-
 cmd/bootm.c                                   |  23 +-
 cmd/bootmenu.c                                |   4 +-
 cmd/bootstage.c                               |  20 +-
 cmd/bootz.c                                   |   7 +-
 cmd/btrfs.c                                   |   2 +-
 cmd/cache.c                                   |   6 +-
 cmd/cbfs.c                                    |   8 +-
 cmd/clk.c                                     |   8 +-
 cmd/cls.c                                     |   2 +-
 cmd/config.c                                  |   3 +-
 cmd/conitrace.c                               |   5 +-
 cmd/console.c                                 |   3 +-
 cmd/cpu.c                                     |  12 +-
 cmd/cramfs.c                                  |   5 +-
 cmd/cros_ec.c                                 |   9 +-
 cmd/dataflash_mmc_mux.c                       |   3 +-
 cmd/date.c                                    |   3 +-
 cmd/demo.c                                    |  22 +-
 cmd/dfu.c                                     |   3 +-
 cmd/diag.c                                    |   2 +-
 cmd/disk.c                                    |   6 +-
 cmd/dm.c                                      |  22 +-
 cmd/echo.c                                    |   3 +-
 cmd/eeprom.c                                  |   5 +-
 cmd/efi.c                                     |  10 +-
 cmd/efidebug.c                                |  69 ++--
 cmd/elf.c                                     |   8 +-
 cmd/ethsw.c                                   |   6 +-
 cmd/exit.c                                    |   3 +-
 cmd/ext2.c                                    |   7 +-
 cmd/ext4.c                                    |  10 +-
 cmd/fastboot.c                                |   4 +-
 cmd/fat.c                                     |  29 +-
 cmd/fdt.c                                     |   5 +-
 cmd/fitupd.c                                  |   3 +-
 cmd/flash.c                                   |  52 +--
 cmd/fpga.c                                    |  43 +--
 cmd/fpgad.c                                   |   2 +-
 cmd/fs.c                                      |  23 +-
 cmd/fs_uuid.c                                 |   4 +-
 cmd/fuse.c                                    |   3 +-
 cmd/gettime.c                                 |   4 +-
 cmd/gpio.c                                    |   4 +-
 cmd/gpt.c                                     |  23 +-
 cmd/hash.c                                    |   3 +-
 cmd/help.c                                    |   9 +-
 cmd/host.c                                    |  37 ++-
 cmd/i2c.c                                     |  63 ++--
 cmd/ide.c                                     |   4 +-
 cmd/ini.c                                     |   2 +-
 cmd/io.c                                      |   4 +-
 cmd/iotrace.c                                 |   6 +-
 cmd/irq.c                                     |   6 +-
 cmd/itest.c                                   |   3 +-
 cmd/jffs2.c                                   |  10 +-
 cmd/led.c                                     |   2 +-
 cmd/legacy_led.c                              |   2 +-
 cmd/license.c                                 |   3 +-
 cmd/load.c                                    |  13 +-
 cmd/log.c                                     |  17 +-
 cmd/lzmadec.c                                 |   3 +-
 cmd/mac.c                                     |   3 +-
 cmd/md5sum.c                                  |   6 +-
 cmd/mdio.c                                    |   3 +-
 cmd/mem.c                                     |  68 ++--
 cmd/mfsl.c                                    |   6 +-
 cmd/mii.c                                     |   2 +-
 cmd/misc.c                                    |   7 +-
 cmd/mmc.c                                     | 113 ++++---
 cmd/mp.c                                      |   2 +-
 cmd/mtd.c                                     |  17 +-
 cmd/mtdparts.c                                |   8 +-
 cmd/mvebu/bubt.c                              |   4 +-
 cmd/nand.c                                    |  13 +-
 cmd/net.c                                     |  39 ++-
 cmd/nvedit.c                                  |  65 ++--
 cmd/nvedit_efi.c                              |  13 +-
 cmd/nvme.c                                    |   4 +-
 cmd/onenand.c                                 |  33 +-
 cmd/osd.c                                     |  27 +-
 cmd/part.c                                    |  21 +-
 cmd/pcap.c                                    |  20 +-
 cmd/pci.c                                     |   3 +-
 cmd/pinmux.c                                  |  17 +-
 cmd/pmc.c                                     |  12 +-
 cmd/pmic.c                                    |  23 +-
 cmd/pxe.c                                     |  19 +-
 cmd/pxe_utils.c                               |  30 +-
 cmd/pxe_utils.h                               |  10 +-
 cmd/qfw.c                                     |  19 +-
 cmd/read.c                                    |   4 +-
 cmd/reginfo.c                                 |   4 +-
 cmd/regulator.c                               |  35 +-
 cmd/reiser.c                                  |   8 +-
 cmd/remoteproc.c                              |  14 +-
 cmd/riscv/exception.c                         |   6 +-
 cmd/rng.c                                     |   2 +-
 cmd/rockusb.c                                 |   3 +-
 cmd/sata.c                                    |   4 +-
 cmd/sb.c                                      |  13 +-
 cmd/scsi.c                                    |   7 +-
 cmd/setexpr.c                                 |   4 +-
 cmd/sf.c                                      |  18 +-
 cmd/sha1sum.c                                 |   2 +-
 cmd/smccc.c                                   |   3 +-
 cmd/sound.c                                   |  13 +-
 cmd/source.c                                  |  14 +-
 cmd/spi.c                                     |   2 +-
 cmd/spl.c                                     |  17 +-
 cmd/strings.c                                 |   2 +-
 cmd/sysboot.c                                 |  12 +-
 cmd/terminal.c                                |   2 +-
 cmd/test.c                                    |  10 +-
 cmd/thordown.c                                |   3 +-
 cmd/ti/ddr3.c                                 |   6 +-
 cmd/time.c                                    |   3 +-
 cmd/tlv_eeprom.c                              |   4 +-
 cmd/tpm-common.c                              |  10 +-
 cmd/tpm-user-utils.h                          |   9 +-
 cmd/tpm-v1.c                                  |  85 ++---
 cmd/tpm-v2.c                                  |  43 +--
 cmd/tpm_test.c                                |  12 +-
 cmd/trace.c                                   |   8 +-
 cmd/tsi148.c                                  |   3 +-
 cmd/ubi.c                                     |   2 +-
 cmd/ubifs.c                                   |  18 +-
 cmd/ufs.c                                     |   2 +-
 cmd/universe.c                                |   2 +-
 cmd/unlz4.c                                   |   3 +-
 cmd/unzip.c                                   |   8 +-
 cmd/usb.c                                     |   7 +-
 cmd/usb_gadget_sdp.c                          |   3 +-
 cmd/usb_mass_storage.c                        |  10 +-
 cmd/version.c                                 |   3 +-
 cmd/virtio.c                                  |   4 +-
 cmd/w1.c                                      |   2 +-
 cmd/wdt.c                                     |  12 +-
 cmd/wol.c                                     |   2 +-
 cmd/x86/exception.c                           |   6 +-
 cmd/x86/fsp.c                                 |   8 +-
 cmd/x86/hob.c                                 |   3 +-
 cmd/x86/mtrr.c                                |   6 +-
 cmd/ximg.c                                    |   3 +-
 cmd/yaffs2.c                                  |  28 +-
 cmd/zfs.c                                     |  11 +-
 cmd/zip.c                                     |   2 +-
 common/android_ab.c                           |  11 +-
 common/autoboot.c                             |   2 +
 common/bedbug.c                               |   1 +
 common/board_f.c                              |   7 +-
 common/board_info.c                           |   1 +
 common/board_r.c                              |  12 +-
 common/boot_fit.c                             |   1 +
 common/bootm.c                                |  30 +-
 common/bootm_os.c                             |  50 +--
 common/bootstage.c                            |   2 +
 common/bouncebuf.c                            |   2 +
 common/cli.c                                  |   5 +-
 common/cli_hush.c                             |   4 +-
 common/cli_readline.c                         |   1 +
 common/cli_simple.c                           |   1 +
 common/command.c                              |  76 +++--
 common/common_fit.c                           |   1 +
 common/console.c                              |   1 +
 common/cros_ec.c                              |   1 +
 common/dfu.c                                  |   2 +
 common/dlmalloc.c                             |   1 +
 common/edid.c                                 |   1 +
 common/exports.c                              |   1 +
 common/fdt_region.c                           |   1 +
 common/fdt_support.c                          |   2 +
 common/flash.c                                |  24 +-
 common/hash.c                                 |   8 +-
 common/hwconfig.c                             |   1 +
 common/image-cipher.c                         |   2 +-
 common/image-fdt.c                            |   6 +-
 common/image-fit-sig.c                        |   1 +
 common/image-fit.c                            |   2 +
 common/image-sig.c                            |   3 +
 common/image.c                                |  17 +-
 common/init/board_init.c                      |   2 +
 common/iotrace.c                              |   1 +
 common/kgdb.c                                 |   3 +-
 common/kgdb_stubs.c                           |   1 +
 common/lcd.c                                  |   3 +
 common/lcd_console.c                          |   6 +-
 common/log_syslog.c                           |   1 +
 common/main.c                                 |   2 +
 common/malloc_simple.c                        |   1 +
 common/miiphyutil.c                           |   2 +
 common/spl/spl.c                              |   7 +-
 common/spl/spl_atf.c                          |   3 +
 common/spl/spl_ext.c                          |   5 +-
 common/spl/spl_fat.c                          |   1 +
 common/spl/spl_fit.c                          |   2 +
 common/spl/spl_legacy.c                       |   2 +
 common/spl/spl_mmc.c                          |   4 +-
 common/spl/spl_nand.c                         |   3 +
 common/spl/spl_net.c                          |   2 +
 common/spl/spl_nor.c                          |   2 +
 common/spl/spl_onenand.c                      |   2 +
 common/spl/spl_opensbi.c                      |   2 +
 common/spl/spl_ram.c                          |   2 +
 common/spl/spl_sdp.c                          |   1 +
 common/spl/spl_spi.c                          |   2 +
 common/spl/spl_ubi.c                          |   1 +
 common/spl/spl_usb.c                          |   1 +
 common/spl/spl_xip.c                          |   2 +
 common/spl/spl_ymodem.c                       |   2 +
 common/splash_source.c                        |   1 +
 common/stdio.c                                |   1 +
 common/usb.c                                  |   2 +
 common/usb_hub.c                              |   2 +
 common/usb_kbd.c                              |   1 +
 common/usb_storage.c                          |   4 +
 disk/part.c                                   |  19 +-
 disk/part_amiga.c                             |   3 +-
 disk/part_dos.c                               |   6 +-
 disk/part_efi.c                               |  15 +-
 disk/part_iso.c                               |  11 +-
 disk/part_mac.c                               |   4 +-
 doc/README.commands                           |  12 +-
 doc/README.standalone                         |   2 +-
 drivers/adc/adc-uclass.c                      |   1 +
 drivers/adc/meson-saradc.c                    |   2 +
 drivers/adc/rockchip-saradc.c                 |   1 +
 drivers/adc/stm32-adc-core.c                  |   1 +
 drivers/adc/stm32-adc.c                       |   2 +
 drivers/ata/ahci.c                            |   4 +
 drivers/ata/ahci_mvebu.c                      |   1 +
 drivers/ata/ahci_sunxi.c                      |   2 +
 drivers/ata/dwc_ahsata.c                      |   5 +
 drivers/ata/fsl_sata.c                        |   3 +
 drivers/ata/mvsata_ide.c                      |   1 +
 drivers/ata/sata.c                            |   2 +
 drivers/ata/sata_ceva.c                       |   1 +
 drivers/ata/sata_mv.c                         |   5 +
 drivers/ata/sata_sandbox.c                    |   1 +
 drivers/ata/sata_sil.c                        |   2 +
 drivers/ata/sata_sil3114.c                    |  20 +-
 drivers/axi/axi-emul-uclass.c                 |   1 +
 drivers/axi/ihs_axi.c                         |   3 +
 drivers/axi/sandbox_store.c                   |   1 +
 drivers/bios_emulator/atibios.c               |   2 +
 drivers/block/blk-uclass.c                    |   2 +
 drivers/block/blk_legacy.c                    |   2 +
 drivers/block/blkcache.c                      |   3 +-
 drivers/block/ide.c                           |   4 +
 drivers/board/gazerbeam.c                     |   1 +
 drivers/bootcount/bootcount-uclass.c          |   1 +
 drivers/bootcount/bootcount.c                 |   1 +
 drivers/bootcount/bootcount_ram.c             |   1 +
 drivers/bootcount/i2c-eeprom.c                |   1 +
 drivers/bootcount/rtc.c                       |   1 +
 drivers/cache/cache-ncore.c                   |   1 +
 drivers/cache/cache-v5l2.c                    |   1 +
 drivers/clk/altera/clk-agilex.c               |   2 +
 drivers/clk/altera/clk-agilex.h               |   4 +
 drivers/clk/altera/clk-arria10.c              |   1 +
 drivers/clk/aspeed/clk_ast2500.c              |   2 +
 drivers/clk/at91/clk-generated.c              |   1 +
 drivers/clk/at91/clk-system.c                 |   1 +
 drivers/clk/at91/clk-usb.c                    |   1 +
 drivers/clk/at91/pmc.c                        |   1 +
 drivers/clk/clk-cdce9xx.c                     |   1 +
 drivers/clk/clk-divider.c                     |   1 +
 drivers/clk/clk-gate.c                        |   1 +
 drivers/clk/clk-hsdk-cgu.c                    |   4 +
 drivers/clk/clk-mux.c                         |   1 +
 drivers/clk/clk-ti-sci.c                      |   1 +
 drivers/clk/clk-uclass.c                      |   2 +
 drivers/clk/clk.c                             |   1 +
 drivers/clk/clk_bcm6345.c                     |   1 +
 drivers/clk/clk_boston.c                      |   1 +
 drivers/clk/clk_pic32.c                       |   2 +
 drivers/clk/clk_sandbox_ccf.c                 |   1 +
 drivers/clk/clk_stm32f.c                      |   2 +
 drivers/clk/clk_stm32h7.c                     |   2 +
 drivers/clk/clk_stm32mp1.c                    |   3 +
 drivers/clk/clk_versal.c                      |   3 +
 drivers/clk/clk_vexpress_osc.c                |   2 +
 drivers/clk/clk_zynq.c                        |   1 +
 drivers/clk/clk_zynqmp.c                      |   1 +
 drivers/clk/ics8n3qv01.c                      |   1 +
 drivers/clk/imx/clk-composite-8m.c            |   1 +
 drivers/clk/imx/clk-imx6q.c                   |   1 +
 drivers/clk/imx/clk-imx8.c                    |   1 +
 drivers/clk/imx/clk-imx8mm.c                  |   1 +
 drivers/clk/imx/clk-imx8mn.c                  |   1 +
 drivers/clk/imx/clk-imx8mp.c                  |   1 +
 drivers/clk/imx/clk-imx8qm.c                  |   1 +
 drivers/clk/imx/clk-imx8qxp.c                 |   1 +
 drivers/clk/imx/clk-imxrt1050.c               |   1 +
 drivers/clk/imx/clk-pll14xx.c                 |   2 +
 drivers/clk/mediatek/clk-mt7622.c             |   2 +
 drivers/clk/mediatek/clk-mt7623.c             |   2 +
 drivers/clk/mediatek/clk-mt7629.c             |   2 +
 drivers/clk/mediatek/clk-mt8512.c             |   1 +
 drivers/clk/mediatek/clk-mt8516.c             |   1 +
 drivers/clk/mediatek/clk-mt8518.c             |   1 +
 drivers/clk/mediatek/clk-mtk.c                |   2 +
 drivers/clk/mediatek/clk-mtk.h                |   1 +
 drivers/clk/meson/axg.c                       |   2 +
 drivers/clk/meson/clk_meson.h                 |   1 +
 drivers/clk/meson/g12a.c                      |   3 +
 drivers/clk/meson/gxbb.c                      |   2 +
 drivers/clk/mpc83xx_clk.c                     |   6 +-
 drivers/clk/mpc83xx_clk.h                     |   1 +
 drivers/clk/mvebu/armada-37xx-periph.c        |   1 +
 drivers/clk/owl/clk_owl.c                     |   2 +
 drivers/clk/owl/clk_owl.h                     |   3 +
 drivers/clk/renesas/clk-rcar-gen2.c           |   1 +
 drivers/clk/renesas/clk-rcar-gen3.c           |   2 +
 drivers/clk/renesas/r8a7790-cpg-mssr.c        |   1 +
 drivers/clk/renesas/r8a7791-cpg-mssr.c        |   1 +
 drivers/clk/renesas/r8a7792-cpg-mssr.c        |   1 +
 drivers/clk/renesas/r8a7794-cpg-mssr.c        |   1 +
 drivers/clk/renesas/r8a7795-cpg-mssr.c        |   1 +
 drivers/clk/renesas/r8a7796-cpg-mssr.c        |   1 +
 drivers/clk/renesas/r8a77965-cpg-mssr.c       |   1 +
 drivers/clk/renesas/r8a77970-cpg-mssr.c       |   1 +
 drivers/clk/renesas/r8a77980-cpg-mssr.c       |   1 +
 drivers/clk/renesas/r8a77990-cpg-mssr.c       |   1 +
 drivers/clk/renesas/r8a77995-cpg-mssr.c       |   1 +
 drivers/clk/renesas/renesas-cpg-mssr.c        |   2 +
 drivers/clk/renesas/renesas-cpg-mssr.h        |   1 +
 drivers/clk/rockchip/clk_pll.c                |   2 +
 drivers/clk/rockchip/clk_px30.c               |   3 +
 drivers/clk/rockchip/clk_rk3036.c             |   3 +
 drivers/clk/rockchip/clk_rk3128.c             |   2 +
 drivers/clk/rockchip/clk_rk3188.c             |   3 +
 drivers/clk/rockchip/clk_rk322x.c             |   4 +
 drivers/clk/rockchip/clk_rk3288.c             |   4 +
 drivers/clk/rockchip/clk_rk3308.c             |   2 +
 drivers/clk/rockchip/clk_rk3328.c             |   3 +
 drivers/clk/rockchip/clk_rk3368.c             |   3 +
 drivers/clk/rockchip/clk_rk3399.c             |   3 +
 drivers/clk/rockchip/clk_rv1108.c             |   3 +
 drivers/clk/sifive/fu540-prci.c               |   1 +
 drivers/clk/sunxi/clk_a10.c                   |   1 +
 drivers/clk/sunxi/clk_a10s.c                  |   1 +
 drivers/clk/sunxi/clk_a23.c                   |   1 +
 drivers/clk/sunxi/clk_a31.c                   |   1 +
 drivers/clk/sunxi/clk_a64.c                   |   1 +
 drivers/clk/sunxi/clk_a80.c                   |   1 +
 drivers/clk/sunxi/clk_a83t.c                  |   1 +
 drivers/clk/sunxi/clk_h3.c                    |   1 +
 drivers/clk/sunxi/clk_h6.c                    |   1 +
 drivers/clk/sunxi/clk_r40.c                   |   1 +
 drivers/clk/sunxi/clk_sunxi.c                 |   2 +
 drivers/clk/sunxi/clk_v3s.c                   |   1 +
 drivers/clk/tegra/tegra-car-clk.c             |   1 +
 drivers/clk/tegra/tegra186-clk.c              |   1 +
 drivers/clk/uniphier/clk-uniphier-core.c      |   1 +
 drivers/core/acpi.c                           |   1 +
 drivers/core/device.c                         |   2 +
 drivers/core/devres.c                         |   1 +
 drivers/core/fdtaddr.c                        |   1 +
 drivers/core/lists.c                          |   1 +
 drivers/core/of_access.c                      |   2 +
 drivers/core/of_addr.c                        |   2 +
 drivers/core/of_extra.c                       |   1 +
 drivers/core/ofnode.c                         |   1 +
 drivers/core/regmap.c                         |   1 +
 drivers/core/root.c                           |   1 +
 drivers/core/syscon-uclass.c                  |   1 +
 drivers/core/uclass.c                         |   1 +
 drivers/cpu/bmips_cpu.c                       |   2 +
 drivers/cpu/cpu-uclass.c                      |   1 +
 drivers/cpu/imx8_cpu.c                        |   1 +
 drivers/cpu/mpc83xx_cpu.c                     |   2 +
 drivers/cpu/riscv_cpu.c                       |   2 +
 drivers/crypto/ace_sha.c                      |   2 +
 drivers/crypto/fsl/error.c                    |   1 +
 drivers/crypto/fsl/fsl_blob.c                 |   2 +
 drivers/crypto/fsl/fsl_hash.c                 |   2 +
 drivers/crypto/fsl/fsl_rsa.c                  |   1 +
 drivers/crypto/fsl/jobdesc.c                  |   1 +
 drivers/crypto/fsl/jr.c                       |   3 +
 drivers/crypto/rsa_mod_exp/mod_exp_sw.c       |   1 +
 drivers/ddr/altera/sdram_agilex.c             |   1 +
 drivers/ddr/altera/sdram_arria10.c            |   5 +
 drivers/ddr/altera/sdram_gen5.c               |   2 +
 drivers/ddr/altera/sdram_s10.c                |   1 +
 drivers/ddr/altera/sdram_soc64.c              |   3 +
 drivers/ddr/altera/sequencer.c                |   1 +
 drivers/ddr/fsl/arm_ddr_gen3.c                |   2 +
 drivers/ddr/fsl/ctrl_regs.c                   |   2 +
 drivers/ddr/fsl/ddr1_dimm_params.c            |   2 +
 drivers/ddr/fsl/ddr2_dimm_params.c            |   2 +
 drivers/ddr/fsl/ddr3_dimm_params.c            |   1 +
 drivers/ddr/fsl/ddr4_dimm_params.c            |   2 +
 drivers/ddr/fsl/fsl_ddr_gen4.c                |   2 +
 drivers/ddr/fsl/fsl_mmdc.c                    |   1 +
 drivers/ddr/fsl/interactive.c                 |   3 +
 drivers/ddr/fsl/lc_common_dimm_params.c       |   2 +
 drivers/ddr/fsl/main.c                        |   3 +
 drivers/ddr/fsl/mpc85xx_ddr_gen1.c            |   2 +
 drivers/ddr/fsl/mpc85xx_ddr_gen2.c            |   1 +
 drivers/ddr/fsl/mpc85xx_ddr_gen3.c            |   2 +
 drivers/ddr/fsl/mpc86xx_ddr.c                 |   2 +
 drivers/ddr/fsl/options.c                     |   1 +
 drivers/ddr/fsl/util.c                        |   2 +
 drivers/ddr/imx/imx8m/ddr_init.c              |   1 +
 drivers/ddr/imx/imx8m/ddrphy_train.c          |   1 +
 drivers/ddr/imx/imx8m/ddrphy_utils.c          |   1 +
 drivers/ddr/imx/imx8m/helper.c                |   1 +
 drivers/ddr/marvell/a38x/ddr3_debug.c         |   1 +
 drivers/ddr/marvell/a38x/ddr3_training.c      |   2 +
 .../marvell/a38x/ddr3_training_ip_engine.c    |   1 +
 .../ddr/marvell/a38x/ddr3_training_leveling.c |   1 +
 drivers/ddr/marvell/a38x/mv_ddr_plat.c        |   1 +
 drivers/ddr/marvell/axp/ddr3_dfs.c            |   1 +
 drivers/ddr/marvell/axp/ddr3_dqs.c            |   1 +
 drivers/ddr/marvell/axp/ddr3_hw_training.c    |   2 +
 drivers/ddr/marvell/axp/ddr3_init.c           |   2 +
 drivers/ddr/marvell/axp/ddr3_pbs.c            |   1 +
 drivers/ddr/marvell/axp/ddr3_read_leveling.c  |   1 +
 drivers/ddr/marvell/axp/ddr3_write_leveling.c |   2 +
 drivers/ddr/marvell/axp/xor.c                 |   1 +
 drivers/demo/demo-shape.c                     |   1 +
 drivers/demo/demo-uclass.c                    |   1 +
 drivers/dfu/dfu.c                             |   1 +
 drivers/dfu/dfu_mmc.c                         |   4 +-
 drivers/dfu/dfu_nand.c                        |   1 +
 drivers/dfu/dfu_sf.c                          |   1 +
 drivers/dfu/dfu_tftp.c                        |   1 +
 drivers/dfu/dfu_virt.c                        |   1 +
 drivers/dma/apbh_dma.c                        |   1 +
 drivers/dma/bcm6348-iudma.c                   |   4 +
 drivers/dma/dma-uclass.c                      |   2 +
 drivers/dma/keystone_nav.c                    |   1 +
 drivers/dma/lpc32xx_dma.c                     |   3 +
 drivers/dma/sandbox-dma-test.c                |   1 +
 drivers/dma/ti-edma3.c                        |   1 +
 drivers/dma/ti/k3-udma-hwdef.h                |   1 +
 drivers/dma/ti/k3-udma.c                      |   3 +
 drivers/fastboot/fb_command.c                 |   1 +
 drivers/fastboot/fb_getvar.c                  |   5 +-
 drivers/fastboot/fb_mmc.c                     |  23 +-
 drivers/fastboot/fb_nand.c                    |   2 +
 drivers/firmware/firmware-zynqmp.c            |   3 +
 drivers/firmware/psci.c                       |   5 +-
 drivers/firmware/ti_sci.c                     |   2 +
 drivers/firmware/ti_sci.h                     |   1 +
 drivers/fpga/ACEX1K.c                         |   1 +
 drivers/fpga/altera.c                         |   1 +
 drivers/fpga/cyclon2.c                        |   1 +
 drivers/fpga/fpga.c                           |   2 +
 drivers/fpga/ivm_core.c                       |   1 +
 drivers/fpga/lattice.c                        |   2 +
 drivers/fpga/socfpga_arria10.c                |   4 +
 drivers/fpga/stratix10.c                      |   2 +
 drivers/fpga/stratixII.c                      |   7 +-
 drivers/fpga/stratixv.c                       |   2 +
 drivers/fpga/versalpl.c                       |   2 +
 drivers/fpga/virtex2.c                        |   1 +
 drivers/fpga/xilinx.c                         |   1 +
 drivers/fpga/zynqmppl.c                       |   3 +
 drivers/fpga/zynqpl.c                         |   3 +
 drivers/gpio/adi_gpio2.c                      |   1 +
 drivers/gpio/atmel_pio4.c                     |   1 +
 drivers/gpio/bcm6345_gpio.c                   |   1 +
 drivers/gpio/cortina_gpio.c                   |   2 +
 drivers/gpio/dwapb_gpio.c                     |   2 +
 drivers/gpio/gpio-rcar.c                      |   1 +
 drivers/gpio/gpio-rza1.c                      |   1 +
 drivers/gpio/gpio-uclass.c                    |   3 +-
 drivers/gpio/hi6220_gpio.c                    |   1 +
 drivers/gpio/hsdk-creg-gpio.c                 |   2 +
 drivers/gpio/intel_broadwell_gpio.c           |   1 +
 drivers/gpio/intel_gpio.c                     |   1 +
 drivers/gpio/intel_ich6_gpio.c                |   1 +
 drivers/gpio/mscc_sgpio.c                     |   2 +
 drivers/gpio/mt7621_gpio.c                    |   1 +
 drivers/gpio/mvebu_gpio.c                     |   1 +
 drivers/gpio/mxs_gpio.c                       |   2 +
 drivers/gpio/pca953x.c                        |   8 +-
 drivers/gpio/pca953x_gpio.c                   |   1 +
 drivers/gpio/pcf8575_gpio.c                   |   2 +
 drivers/gpio/pic32_gpio.c                     |   1 +
 drivers/gpio/pm8916_gpio.c                    |   1 +
 drivers/gpio/s5p_gpio.c                       |   1 +
 drivers/gpio/sandbox.c                        |   1 +
 drivers/gpio/sh_pfc.c                         |   3 +
 drivers/gpio/sifive-gpio.c                    |   1 +
 drivers/gpio/stm32_gpio.c                     |   2 +
 drivers/gpio/tca642x.c                        |   8 +-
 drivers/gpio/tegra186_gpio_priv.h             |   1 +
 drivers/gpio/tegra_gpio.c                     |   1 +
 drivers/gpio/xilinx_gpio.c                    |   1 +
 drivers/gpio/zynq_gpio.c                      |   1 +
 drivers/hwspinlock/hwspinlock-uclass.c        |   1 +
 drivers/hwspinlock/stm32_hwspinlock.c         |   1 +
 drivers/i2c/ast_i2c.c                         |   2 +
 drivers/i2c/at91_i2c.h                        |   1 +
 drivers/i2c/cros_ec_ldo.c                     |   1 +
 drivers/i2c/davinci_i2c.c                     |   2 +
 drivers/i2c/designware_i2c.c                  |   2 +
 drivers/i2c/designware_i2c.h                  |   1 +
 drivers/i2c/designware_i2c_pci.c              |   1 +
 drivers/i2c/exynos_hs_i2c.c                   |   2 +
 drivers/i2c/fsl_i2c.c                         |   2 +
 drivers/i2c/i2c-cdns.c                        |   3 +
 drivers/i2c/i2c-emul-uclass.c                 |   1 +
 drivers/i2c/i2c-gpio.c                        |   2 +
 drivers/i2c/i2c-uclass.c                      |   2 +
 drivers/i2c/i2c-versatile.c                   |   2 +
 drivers/i2c/i2c_core.c                        |   1 +
 drivers/i2c/ihs_i2c.c                         |   3 +
 drivers/i2c/imx_lpi2c.c                       |   1 +
 drivers/i2c/intel_i2c.c                       |   1 +
 drivers/i2c/kona_i2c.c                        |   2 +
 drivers/i2c/lpc32xx_i2c.c                     |   1 +
 drivers/i2c/meson_i2c.c                       |   3 +
 drivers/i2c/muxes/i2c-arb-gpio-challenge.c    |   2 +
 drivers/i2c/muxes/i2c-mux-gpio.c              |   1 +
 drivers/i2c/muxes/i2c-mux-uclass.c            |   1 +
 drivers/i2c/muxes/pca954x.c                   |   1 +
 drivers/i2c/mv_i2c.c                          |   2 +
 drivers/i2c/mvtwsi.c                          |   2 +
 drivers/i2c/mxc_i2c.c                         |   2 +
 drivers/i2c/omap24xx_i2c.c                    |   2 +
 drivers/i2c/rcar_i2c.c                        |   2 +
 drivers/i2c/rcar_iic.c                        |   2 +
 drivers/i2c/rk_i2c.c                          |   2 +
 drivers/i2c/s3c24x0_i2c.c                     |   1 +
 drivers/i2c/sandbox_i2c.c                     |   1 +
 drivers/i2c/sh_i2c.c                          |   2 +
 drivers/i2c/soft_i2c.c                        |   1 +
 drivers/i2c/stm32f7_i2c.c                     |   3 +
 drivers/i2c/tegra186_bpmp_i2c.c               |   2 +
 drivers/i2c/tegra_i2c.c                       |   2 +
 drivers/input/cros_ec_keyb.c                  |   1 +
 drivers/input/i8042.c                         |   2 +
 drivers/input/input.c                         |   1 +
 drivers/input/key_matrix.c                    |   1 +
 drivers/input/keyboard-uclass.c               |   1 +
 drivers/input/tegra-kbc.c                     |   2 +
 drivers/led/led_bcm6328.c                     |   1 +
 drivers/led/led_bcm6358.c                     |   2 +
 drivers/led/led_bcm6858.c                     |   2 +
 drivers/led/led_gpio.c                        |   1 +
 drivers/mailbox/k3-sec-proxy.c                |   1 +
 drivers/mailbox/mailbox-uclass.c              |   1 +
 drivers/mailbox/sandbox-mbox.c                |   1 +
 drivers/mailbox/stm32-ipcc.c                  |   2 +
 drivers/mailbox/tegra-hsp.c                   |   2 +
 drivers/mailbox/zynqmp-ipi.c                  |   1 +
 drivers/misc/altera_sysid.c                   |   2 +-
 drivers/misc/atsha204a-i2c.c                  |   2 +
 drivers/misc/cros_ec.c                        |   3 +
 drivers/misc/cros_ec_i2c.c                    |   1 +
 drivers/misc/cros_ec_lpc.c                    |   1 +
 drivers/misc/cros_ec_sandbox.c                |   1 +
 drivers/misc/cros_ec_spi.c                    |   1 +
 drivers/misc/ds4510.c                         |   7 +-
 drivers/misc/esm_pmic.c                       |   1 +
 drivers/misc/fs_loader.c                      |   1 +
 drivers/misc/fsl_ifc.c                        |   1 +
 drivers/misc/fsl_iim.c                        |   1 +
 drivers/misc/fsl_portals.c                    |   1 +
 drivers/misc/fsl_sec_mon.c                    |   1 +
 drivers/misc/gdsys_ioep.c                     |   1 +
 drivers/misc/gdsys_ioep.h                     |   1 +
 drivers/misc/gdsys_soc.c                      |   1 +
 drivers/misc/i2c_eeprom.c                     |   1 +
 drivers/misc/i2c_eeprom_emul.c                |   1 +
 drivers/misc/ihs_fpga.c                       |   3 +
 drivers/misc/imx8/scu.c                       |   2 +
 drivers/misc/irq-uclass.c                     |   1 +
 drivers/misc/jz4780_efuse.c                   |   1 +
 drivers/misc/k3_avs.c                         |   1 +
 drivers/misc/k3_esm.c                         |   1 +
 drivers/misc/microchip_flexcom.c              |   1 +
 drivers/misc/mpc83xx_serdes.c                 |   2 +
 drivers/misc/mpc83xx_serdes.h                 |   1 +
 drivers/misc/mxc_ocotp.c                      |   1 +
 drivers/misc/mxs_ocotp.c                      |   1 +
 drivers/misc/p2sb-uclass.c                    |   1 +
 drivers/misc/p2sb_emul.c                      |   1 +
 drivers/misc/qfw.c                            |   1 +
 drivers/misc/rockchip-efuse.c                 |   4 +-
 drivers/misc/stm32_rcc.c                      |   1 +
 drivers/misc/swap_case.c                      |   1 +
 drivers/misc/tegra186_bpmp.c                  |   2 +
 drivers/misc/tegra_car.c                      |   1 +
 drivers/misc/vexpress_config.c                |   1 +
 drivers/mmc/am654_sdhci.c                     |   1 +
 drivers/mmc/arm_pl180_mmci.c                  |   2 +
 drivers/mmc/bcm2835_sdhci.c                   |   1 +
 drivers/mmc/bcm2835_sdhost.c                  |   3 +
 drivers/mmc/davinci_mmc.c                     |   1 +
 drivers/mmc/dw_mmc.c                          |   3 +
 drivers/mmc/fsl_esdhc.c                       |   3 +
 drivers/mmc/fsl_esdhc_imx.c                   |   4 +
 drivers/mmc/ftsdc010_mci.c                    |   2 +
 drivers/mmc/gen_atmel_mci.c                   |   2 +
 drivers/mmc/iproc_sdhci.c                     |   1 +
 drivers/mmc/jz_mmc.c                          |   2 +
 drivers/mmc/kona_sdhci.c                      |   1 +
 drivers/mmc/meson_gx_mmc.c                    |   1 +
 drivers/mmc/mmc-uclass.c                      |   1 +
 drivers/mmc/mmc.c                             |   4 +
 drivers/mmc/mmc_boot.c                        |   1 +
 drivers/mmc/mmc_legacy.c                      |   1 +
 drivers/mmc/mmc_spi.c                         |   2 +
 drivers/mmc/mmc_write.c                       |   1 +
 drivers/mmc/mvebu_mmc.c                       |   1 +
 drivers/mmc/mxsmmc.c                          |   3 +
 drivers/mmc/omap_hsmmc.c                      |   4 +
 drivers/mmc/pxa_mmc_gen.c                     |   1 +
 drivers/mmc/renesas-sdhi.c                    |   3 +
 drivers/mmc/rockchip_dw_mmc.c                 |   2 +
 drivers/mmc/rpmb.c                            |   1 +
 drivers/mmc/s5p_sdhci.c                       |   1 +
 drivers/mmc/sandbox_mmc.c                     |   1 +
 drivers/mmc/sdhci-cadence.c                   |   2 +
 drivers/mmc/sdhci.c                           |   4 +
 drivers/mmc/sh_mmcif.c                        |   3 +
 drivers/mmc/sh_sdhi.c                         |   4 +
 drivers/mmc/socfpga_dw_mmc.c                  |   1 +
 drivers/mmc/sti_sdhci.c                       |   1 +
 drivers/mmc/stm32_sdmmc2.c                    |   5 +
 drivers/mmc/sunxi_mmc.c                       |   2 +
 drivers/mmc/tegra_mmc.c                       |   3 +
 drivers/mmc/tmio-common.c                     |   1 +
 drivers/mmc/tmio-common.h                     |   1 +
 drivers/mmc/xenon_sdhci.c                     |   2 +
 drivers/mmc/zynq_sdhci.c                      |   2 +
 drivers/mtd/altera_qspi.c                     |   2 +
 drivers/mtd/cfi_flash.c                       |   4 +
 drivers/mtd/jedec_flash.c                     |   2 +
 drivers/mtd/mtd_uboot.c                       |   1 +
 drivers/mtd/mtdconcat.c                       |   2 +
 drivers/mtd/mtdcore.c                         |   3 +
 drivers/mtd/mtdpart.c                         |   2 +
 drivers/mtd/mw_eeprom.c                       |   1 +
 drivers/mtd/nand/bbt.c                        |   1 +
 drivers/mtd/nand/core.c                       |   1 +
 drivers/mtd/nand/raw/am335x_spl_bch.c         |   1 +
 drivers/mtd/nand/raw/arasan_nfc.c             |   1 +
 drivers/mtd/nand/raw/atmel_nand.c             |   4 +
 drivers/mtd/nand/raw/brcmnand/bcm63158_nand.c |   1 +
 drivers/mtd/nand/raw/brcmnand/bcm6368_nand.c  |   1 +
 drivers/mtd/nand/raw/brcmnand/bcm68360_nand.c |   1 +
 drivers/mtd/nand/raw/brcmnand/bcm6838_nand.c  |   1 +
 drivers/mtd/nand/raw/brcmnand/bcm6858_nand.c  |   1 +
 drivers/mtd/nand/raw/brcmnand/brcmnand.c      |   2 +
 drivers/mtd/nand/raw/davinci_nand.c           |   1 +
 drivers/mtd/nand/raw/denali.c                 |   6 +
 drivers/mtd/nand/raw/denali_dt.c              |   2 +
 drivers/mtd/nand/raw/denali_spl.c             |   2 +
 drivers/mtd/nand/raw/fsl_ifc_spl.c            |   1 +
 drivers/mtd/nand/raw/fsl_upm.c                |   2 +
 drivers/mtd/nand/raw/kmeter1_nand.c           |   1 +
 drivers/mtd/nand/raw/lpc32xx_nand_mlc.c       |   1 +
 drivers/mtd/nand/raw/lpc32xx_nand_slc.c       |   2 +
 drivers/mtd/nand/raw/mxc_nand.c               |   2 +
 drivers/mtd/nand/raw/mxs_nand.c               |   1 +
 drivers/mtd/nand/raw/mxs_nand_spl.c           |   4 +
 drivers/mtd/nand/raw/nand_base.c              |   4 +
 drivers/mtd/nand/raw/nand_bbt.c               |   2 +
 drivers/mtd/nand/raw/nand_bch.c               |   1 +
 drivers/mtd/nand/raw/nand_util.c              |   2 +
 drivers/mtd/nand/raw/omap_gpmc.c              |   1 +
 drivers/mtd/nand/raw/pxa3xx_nand.c            |   3 +
 drivers/mtd/nand/raw/stm32_fmc2_nand.c        |   3 +
 drivers/mtd/nand/raw/sunxi_nand.c             |   2 +
 drivers/mtd/nand/raw/sunxi_nand_spl.c         |   2 +
 drivers/mtd/nand/raw/tegra_nand.c             |   3 +
 drivers/mtd/nand/raw/zynq_nand.c              |   2 +
 drivers/mtd/nand/spi/core.c                   |   2 +
 drivers/mtd/nand/spi/macronix.c               |   1 +
 drivers/mtd/nand/spi/micron.c                 |   1 +
 drivers/mtd/nand/spi/toshiba.c                |   1 +
 drivers/mtd/nand/spi/winbond.c                |   1 +
 drivers/mtd/onenand/onenand_base.c            |   2 +
 drivers/mtd/onenand/onenand_bbt.c             |   1 +
 drivers/mtd/onenand/onenand_spl.c             |   1 +
 drivers/mtd/pic32_flash.c                     |   2 +
 drivers/mtd/renesas_rpc_hf.c                  |   1 +
 drivers/mtd/spi/sandbox.c                     |   1 +
 drivers/mtd/spi/sf-uclass.c                   |   1 +
 drivers/mtd/spi/sf_dataflash.c                |   3 +
 drivers/mtd/spi/sf_internal.h                 |   1 +
 drivers/mtd/spi/sf_mtd.c                      |   1 +
 drivers/mtd/spi/sf_probe.c                    |   1 +
 drivers/mtd/spi/spi-nor-core.c                |   2 +
 drivers/mtd/spi/spi-nor-tiny.c                |   1 +
 drivers/mtd/st_smi.c                          |   1 +
 drivers/mtd/stm32_flash.c                     |   1 +
 drivers/mtd/ubi/attach.c                      |   2 +
 drivers/mtd/ubi/build.c                       |   1 +
 drivers/mtd/ubi/eba.c                         |   1 +
 drivers/mtd/ubi/fastmap.c                     |   2 +
 drivers/mtd/ubi/io.c                          |   1 +
 drivers/mtd/ubi/misc.c                        |   1 +
 drivers/mtd/ubi/upd.c                         |   1 +
 drivers/mtd/ubi/vmt.c                         |   1 +
 drivers/mtd/ubi/vtbl.c                        |   2 +
 drivers/mtd/ubi/wl.c                          |   1 +
 drivers/mtd/ubispl/ubispl.c                   |   2 +
 drivers/net/ag7xxx.c                          |   5 +
 drivers/net/altera_tse.c                      |   1 +
 drivers/net/altera_tse.h                      |   1 +
 drivers/net/armada100_fec.c                   |   2 +
 drivers/net/at91_emac.c                       |   2 +
 drivers/net/ax88180.c                         |  12 +-
 drivers/net/ax88796.c                         |   1 +
 drivers/net/bcm-sf2-eth-gmac.c                |   4 +
 drivers/net/bcm-sf2-eth.c                     |   2 +
 drivers/net/bcm6348-eth.c                     |   1 +
 drivers/net/bcm6368-eth.c                     |   2 +
 drivers/net/bcmgenet.c                        |   4 +
 drivers/net/calxedaxgmac.c                    |   2 +
 drivers/net/cs8900.c                          |   2 +
 drivers/net/dc2114x.c                         |   2 +
 drivers/net/designware.c                      |   4 +
 drivers/net/designware.h                      |   3 +
 drivers/net/dm9000x.c                         |   1 +
 drivers/net/dnet.c                            |   2 +
 drivers/net/dwc_eth_qos.c                     |   4 +
 drivers/net/e1000.c                           |   9 +-
 drivers/net/e1000.h                           |   4 +-
 drivers/net/e1000_spi.c                       |  22 +-
 drivers/net/eepro100.c                        |  19 +-
 drivers/net/ep93xx_eth.c                      |   3 +
 drivers/net/ethoc.c                           |   1 +
 drivers/net/fec_mxc.c                         |   3 +
 drivers/net/fm/dtsec.c                        |   1 +
 drivers/net/fm/eth.c                          |   3 +
 drivers/net/fm/fdt.c                          |   1 +
 drivers/net/fm/init.c                         |   2 +
 drivers/net/fm/memac.c                        |   1 +
 drivers/net/fm/tgec.c                         |   1 +
 drivers/net/fsl-mc/dpio/qbman_portal.c        |   2 +
 drivers/net/fsl-mc/dpio/qbman_private.h       |   1 +
 drivers/net/fsl-mc/dpio/qbman_sys.h           |   1 +
 drivers/net/fsl-mc/mc.c                       |   6 +-
 drivers/net/fsl-mc/mc_sys.c                   |   1 +
 drivers/net/fsl_enetc.c                       |   5 +
 drivers/net/fsl_enetc.h                       |   1 +
 drivers/net/fsl_mcdmafec.c                    |   1 +
 drivers/net/ftgmac100.c                       |   4 +
 drivers/net/ftgmac100.h                       |   1 +
 drivers/net/ftmac100.c                        |   1 +
 drivers/net/ftmac110.c                        |   2 +
 drivers/net/gmac_rockchip.c                   |   3 +
 drivers/net/higmacv300.c                      |   4 +
 drivers/net/ks8851_mll.c                      |   2 +
 drivers/net/lan91c96.c                        |  11 +-
 drivers/net/ldpaa_eth/ldpaa_eth.c             |   3 +
 drivers/net/lpc32xx_eth.c                     |   2 +
 drivers/net/macb.c                            |   2 +
 drivers/net/mcffec.c                          |   1 +
 drivers/net/mcfmii.c                          |   1 +
 drivers/net/mdio_mux_i2creg.c                 |   1 +
 drivers/net/mpc8xx_fec.c                      |   1 +
 drivers/net/mscc_eswitch/jr2_switch.c         |   2 +
 drivers/net/mscc_eswitch/luton_switch.c       |   1 +
 drivers/net/mscc_eswitch/mscc_mac_table.c     |   1 +
 drivers/net/mscc_eswitch/mscc_miim.c          |   1 +
 drivers/net/mscc_eswitch/mscc_xfer.c          |   3 +
 drivers/net/mscc_eswitch/ocelot_switch.c      |   2 +
 drivers/net/mscc_eswitch/serval_switch.c      |   2 +
 drivers/net/mscc_eswitch/servalt_switch.c     |   1 +
 drivers/net/mt7628-eth.c                      |   4 +
 drivers/net/mtk_eth.c                         |   4 +
 drivers/net/mtk_eth.h                         |   1 +
 drivers/net/mvgbe.c                           |   2 +
 drivers/net/mvmdio.c                          |   1 +
 drivers/net/mvneta.c                          |   5 +
 drivers/net/mvpp2.c                           |   5 +
 drivers/net/natsemi.c                         |   1 +
 drivers/net/ne2000.c                          |   1 +
 drivers/net/ne2000_base.c                     |   1 +
 drivers/net/ne2000_base.h                     |   1 +
 drivers/net/netconsole.c                      |   1 +
 drivers/net/ns8382x.c                         |   2 +
 drivers/net/pch_gbe.c                         |   2 +
 drivers/net/pcnet.c                           |   3 +
 drivers/net/pfe_eth/pfe_cmd.c                 |  18 +-
 drivers/net/pfe_eth/pfe_driver.c              |   2 +
 drivers/net/pfe_eth/pfe_eth.c                 |   2 +
 drivers/net/pfe_eth/pfe_firmware.c            |   3 +
 drivers/net/pfe_eth/pfe_hw.c                  |   2 +
 drivers/net/pfe_eth/pfe_mdio.c                |   2 +
 drivers/net/phy/aquantia.c                    |   4 +
 drivers/net/phy/atheros.c                     |   1 +
 drivers/net/phy/b53.c                         |   9 +-
 drivers/net/phy/broadcom.c                    |   1 +
 drivers/net/phy/cortina.c                     |   2 +
 drivers/net/phy/dp83867.c                     |   2 +
 drivers/net/phy/marvell.c                     |   2 +
 drivers/net/phy/micrel_ksz8xxx.c              |   1 +
 drivers/net/phy/mscc.c                        |   2 +
 drivers/net/phy/mv88e61xx.c                   |   3 +
 drivers/net/phy/mv88e6352.c                   |   9 +-
 drivers/net/phy/ncsi.c                        |   1 +
 drivers/net/phy/phy.c                         |   3 +
 drivers/net/phy/realtek.c                     |   1 +
 drivers/net/phy/teranetics.c                  |   1 +
 drivers/net/phy/xilinx_gmii2rgmii.c           |   1 +
 drivers/net/phy/xilinx_phy.c                  |   1 +
 drivers/net/pic32_eth.c                       |   2 +
 drivers/net/pic32_eth.h                       |   1 +
 drivers/net/pic32_mdio.c                      |   1 +
 drivers/net/ravb.c                            |   4 +
 drivers/net/rtl8139.c                         |   5 +-
 drivers/net/rtl8169.c                         |   3 +
 drivers/net/sandbox-raw.c                     |   1 +
 drivers/net/sandbox.c                         |   1 +
 drivers/net/sh_eth.c                          |   3 +
 drivers/net/smc91111.c                        |  23 +-
 drivers/net/smc91111.h                        |   1 +
 drivers/net/smc911x.c                         |   1 +
 drivers/net/smc911x.h                         |   2 +
 drivers/net/sni_ave.c                         |   4 +
 drivers/net/sun8i_emac.c                      |   4 +
 drivers/net/sunxi_emac.c                      |   2 +
 drivers/net/ti/am65-cpsw-nuss.c               |   2 +
 drivers/net/ti/cpsw.c                         |   2 +
 drivers/net/ti/cpsw_mdio.c                    |   3 +
 drivers/net/ti/davinci_emac.c                 |   3 +
 drivers/net/ti/keystone_net.c                 |   2 +
 drivers/net/tsec.c                            |   2 +
 drivers/net/uli526x.c                         |   1 +
 drivers/net/vsc7385.c                         |   2 +
 drivers/net/vsc9953.c                         |   4 +
 drivers/net/xilinx_axi_emac.c                 |   2 +
 drivers/net/xilinx_emaclite.c                 |   2 +
 drivers/net/zynq_gem.c                        |   3 +
 drivers/nvme/nvme-uclass.c                    |   1 +
 drivers/nvme/nvme.c                           |   2 +
 drivers/pch/pch7.c                            |   1 +
 drivers/pch/pch9.c                            |   1 +
 drivers/pci/fsl_pci_init.c                    |   3 +
 drivers/pci/pci-aardvark.c                    |   2 +
 drivers/pci/pci-emul-uclass.c                 |   1 +
 drivers/pci/pci-rcar-gen2.c                   |   1 +
 drivers/pci/pci-rcar-gen3.c                   |   1 +
 drivers/pci/pci-uclass.c                      |   3 +
 drivers/pci/pci.c                             |   2 +
 drivers/pci/pci_auto.c                        |   1 +
 drivers/pci/pci_auto_common.c                 |   1 +
 drivers/pci/pci_auto_old.c                    |   1 +
 drivers/pci/pci_compat.c                      |   1 +
 drivers/pci/pci_ftpci100.c                    |   2 +
 drivers/pci/pci_gt64120.c                     |   2 +
 drivers/pci/pci_mpc85xx.c                     |   1 +
 drivers/pci/pci_msc01.c                       |   1 +
 drivers/pci/pci_mvebu.c                       |   2 +
 drivers/pci/pci_rom.c                         |   2 +
 drivers/pci/pci_sandbox.c                     |   1 +
 drivers/pci/pci_sh4.c                         |   1 +
 drivers/pci/pci_sh7751.c                      |   2 +
 drivers/pci/pci_sh7780.c                      |   1 +
 drivers/pci/pci_tegra.c                       |   2 +
 drivers/pci/pcie_dw_mvebu.c                   |   2 +
 drivers/pci/pcie_dw_ti.c                      |   3 +
 drivers/pci/pcie_fsl.c                        |   1 +
 drivers/pci/pcie_imx.c                        |   2 +
 drivers/pci/pcie_intel_fpga.c                 |   2 +
 drivers/pci/pcie_layerscape.c                 |   1 +
 drivers/pci/pcie_layerscape_fixup.c           |   2 +
 drivers/pci/pcie_layerscape_fixup_common.c    |   1 +
 drivers/pci/pcie_layerscape_gen4.c            |   1 +
 drivers/pci/pcie_layerscape_gen4.h            |   1 +
 drivers/pci/pcie_layerscape_gen4_fixup.c      |   1 +
 drivers/pci/pcie_mediatek.c                   |   2 +
 drivers/pci/pcie_xilinx.c                     |   1 +
 drivers/pci_endpoint/pcie-cadence.h           |   1 +
 drivers/phy/allwinner/phy-sun4i-usb.c         |   3 +
 drivers/phy/bcm6318-usbh-phy.c                |   3 +
 drivers/phy/bcm6348-usbh-phy.c                |   2 +
 drivers/phy/bcm6358-usbh-phy.c                |   2 +
 drivers/phy/bcm6368-usbh-phy.c                |   3 +
 drivers/phy/keystone-usb-phy.c                |   3 +
 drivers/phy/marvell/comphy_a3700.c            |   2 +
 drivers/phy/marvell/comphy_core.c             |   3 +-
 drivers/phy/marvell/comphy_cp110.c            |   2 +
 drivers/phy/marvell/comphy_mux.c              |   1 +
 drivers/phy/meson-g12a-usb2.c                 |   2 +
 drivers/phy/meson-g12a-usb3-pcie.c            |   1 +
 drivers/phy/meson-gxl-usb2.c                  |   1 +
 drivers/phy/msm8916-usbh-phy.c                |   1 +
 drivers/phy/mt76x8-usb-phy.c                  |   2 +
 drivers/phy/omap-usb2-phy.c                   |   1 +
 drivers/phy/phy-da8xx-usb.c                   |   1 +
 drivers/phy/phy-mtk-tphy.c                    |   2 +
 drivers/phy/phy-rcar-gen2.c                   |   1 +
 drivers/phy/phy-stm32-usbphyc.c               |   2 +
 drivers/phy/phy-ti-am654.c                    |   3 +
 drivers/phy/phy-uclass.c                      |   1 +
 drivers/phy/sti_usb_phy.c                     |   1 +
 drivers/phy/ti-pipe3-phy.c                    |   2 +
 drivers/pinctrl/aspeed/pinctrl_ast2500.c      |   1 +
 drivers/pinctrl/ath79/pinctrl_ar933x.c        |   1 +
 drivers/pinctrl/ath79/pinctrl_qca953x.c       |   1 +
 drivers/pinctrl/broadcom/pinctrl-bcm283x.c    |   1 +
 drivers/pinctrl/intel/pinctrl.c               |   1 +
 drivers/pinctrl/intel/pinctrl_apl.c           |   1 +
 drivers/pinctrl/mediatek/pinctrl-mtk-common.c |   1 +
 drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c |   1 +
 drivers/pinctrl/meson/pinctrl-meson-gx-pmx.c  |   2 +
 drivers/pinctrl/meson/pinctrl-meson.c         |   3 +
 drivers/pinctrl/mscc/mscc-common.c            |   1 +
 drivers/pinctrl/mvebu/pinctrl-armada-37xx.c   |   2 +
 drivers/pinctrl/mvebu/pinctrl-mvebu.c         |   2 +
 drivers/pinctrl/nxp/pinctrl-imx.c             |   1 +
 drivers/pinctrl/nxp/pinctrl-mxs.c             |   1 +
 drivers/pinctrl/pinctrl-at91-pio4.c           |   1 +
 drivers/pinctrl/pinctrl-at91.c                |   2 +
 drivers/pinctrl/pinctrl-sandbox.c             |   2 +
 drivers/pinctrl/pinctrl-sti.c                 |   2 +
 drivers/pinctrl/pinctrl-stmfx.c               |   2 +
 drivers/pinctrl/pinctrl_pic32.c               |   2 +
 drivers/pinctrl/pinctrl_stm32.c               |   3 +
 drivers/pinctrl/renesas/pfc-r7s72100.c        |   1 +
 drivers/pinctrl/renesas/pfc-r8a77990.c        |   1 +
 drivers/pinctrl/renesas/pfc.c                 |   2 +
 drivers/pinctrl/renesas/sh_pfc.h              |   1 +
 drivers/pinctrl/rockchip/pinctrl-px30.c       |   2 +
 drivers/pinctrl/rockchip/pinctrl-rk3036.c     |   1 +
 drivers/pinctrl/rockchip/pinctrl-rk3128.c     |   1 +
 drivers/pinctrl/rockchip/pinctrl-rk3188.c     |   1 +
 drivers/pinctrl/rockchip/pinctrl-rk322x.c     |   2 +
 drivers/pinctrl/rockchip/pinctrl-rk3288.c     |   2 +
 drivers/pinctrl/rockchip/pinctrl-rk3308.c     |   2 +
 drivers/pinctrl/rockchip/pinctrl-rk3328.c     |   2 +
 drivers/pinctrl/rockchip/pinctrl-rk3368.c     |   1 +
 drivers/pinctrl/rockchip/pinctrl-rk3399.c     |   2 +
 .../pinctrl/rockchip/pinctrl-rockchip-core.c  |   3 +
 drivers/pinctrl/rockchip/pinctrl-rockchip.h   |   1 +
 drivers/pinctrl/rockchip/pinctrl-rv1108.c     |   2 +
 .../pinctrl/uniphier/pinctrl-uniphier-core.c  |   2 +
 drivers/pinctrl/uniphier/pinctrl-uniphier.h   |   1 +
 drivers/power/acpi_pmc/pmc_emul.c             |   1 +
 drivers/power/acpi_pmc/sandbox.c              |   1 +
 drivers/power/axp152.c                        |   2 +-
 drivers/power/axp209.c                        |   3 +-
 drivers/power/axp221.c                        |   2 +-
 drivers/power/axp809.c                        |   3 +-
 drivers/power/axp818.c                        |   3 +-
 drivers/power/battery/bat_trats.c             |   2 +
 drivers/power/battery/bat_trats2.c            |   1 +
 drivers/power/domain/bcm6328-power-domain.c   |   1 +
 .../power/domain/imx8-power-domain-legacy.c   |   1 +
 drivers/power/domain/imx8-power-domain.c      |   1 +
 drivers/power/domain/meson-ee-pwrc.c          |   3 +
 drivers/power/domain/meson-gx-pwrc-vpu.c      |   3 +
 drivers/power/domain/mtk-power-domain.c       |   1 +
 drivers/power/domain/power-domain-uclass.c    |   1 +
 drivers/power/domain/sandbox-power-domain.c   |   1 +
 drivers/power/domain/tegra186-power-domain.c  |   2 +
 drivers/power/domain/ti-sci-power-domain.c    |   1 +
 drivers/power/exynos-tmu.c                    |   1 +
 drivers/power/fuel_gauge/fg_max17042.c        |   2 +
 drivers/power/mfd/fg_max77693.c               |   1 +
 drivers/power/mfd/muic_max77693.c             |   1 +
 drivers/power/mfd/pmic_max77693.c             |   1 +
 drivers/power/mt6323.c                        |   3 +-
 drivers/power/pmic/act8846.c                  |   1 +
 drivers/power/pmic/as3722.c                   |   1 +
 drivers/power/pmic/bd71837.c                  |   1 +
 drivers/power/pmic/da9063.c                   |   1 +
 drivers/power/pmic/fan53555.c                 |   1 +
 drivers/power/pmic/i2c_pmic_emul.c            |   1 +
 drivers/power/pmic/lp873x.c                   |   1 +
 drivers/power/pmic/lp87565.c                  |   1 +
 drivers/power/pmic/max77686.c                 |   1 +
 drivers/power/pmic/muic_max8997.c             |   1 +
 drivers/power/pmic/palmas.c                   |   1 +
 drivers/power/pmic/pca9450.c                  |   1 +
 drivers/power/pmic/pfuze100.c                 |   1 +
 drivers/power/pmic/pmic-uclass.c              |   1 +
 drivers/power/pmic/pmic_hi6553.c              |   1 +
 drivers/power/pmic/pmic_max8997.c             |   1 +
 drivers/power/pmic/pmic_tps65910_dm.c         |   1 +
 drivers/power/pmic/rk8xx.c                    |   1 +
 drivers/power/pmic/rn5t567.c                  |   1 +
 drivers/power/pmic/s2mps11.c                  |   1 +
 drivers/power/pmic/s5m8767.c                  |   1 +
 drivers/power/pmic/tps65090.c                 |   1 +
 drivers/power/pmic/tps65941.c                 |   1 +
 drivers/power/power_core.c                    |   5 +-
 drivers/power/power_dialog.c                  |   1 +
 drivers/power/power_i2c.c                     |   1 +
 drivers/power/regulator/as3722_regulator.c    |   1 +
 drivers/power/regulator/bd71837.c             |   2 +
 drivers/power/regulator/da9063.c              |   1 +
 drivers/power/regulator/fan53555.c            |   2 +
 drivers/power/regulator/fixed.c               |   1 +
 drivers/power/regulator/gpio-regulator.c      |   1 +
 drivers/power/regulator/lp87565_regulator.c   |   1 +
 drivers/power/regulator/pbias_regulator.c     |   2 +
 drivers/power/regulator/pfuze100.c            |   1 +
 drivers/power/regulator/pwm_regulator.c       |   1 +
 drivers/power/regulator/regulator-uclass.c    |   2 +
 drivers/power/regulator/regulator_common.c    |   2 +
 drivers/power/regulator/rk8xx.c               |   1 +
 drivers/power/regulator/s2mps11_regulator.c   |   1 +
 drivers/power/regulator/stm32-vrefbuf.c       |   1 +
 drivers/power/regulator/stpmic1.c             |   1 +
 drivers/power/regulator/tps65090_regulator.c  |   2 +
 drivers/power/regulator/tps65910_regulator.c  |   1 +
 drivers/power/regulator/tps65941_regulator.c  |   2 +
 drivers/power/tps6586x.c                      |   2 +
 drivers/power/twl4030.c                       |   4 +-
 drivers/power/twl6030.c                       |   1 +
 drivers/pwm/exynos_pwm.c                      |   1 +
 drivers/pwm/pwm-imx.c                         |   1 +
 drivers/pwm/rk_pwm.c                          |   2 +
 drivers/pwm/sunxi_pwm.c                       |   1 +
 drivers/pwm/tegra_pwm.c                       |   1 +
 drivers/qe/qe.c                               |   2 +-
 drivers/qe/uec.c                              |   2 +
 drivers/qe/uec_phy.c                          |   7 +-
 drivers/ram/imxrt_sdram.c                     |   4 +
 drivers/ram/k3-am654-ddrss.c                  |   1 +
 drivers/ram/k3-am654-ddrss.h                  |   1 +
 drivers/ram/k3-j721e/k3-j721e-ddrss.c         |   1 +
 drivers/ram/mediatek/ddr3-mt7629.c            |   2 +
 drivers/ram/mpc83xx_sdram.c                   |   2 +
 drivers/ram/rockchip/dmc-rk3368.c             |   3 +
 drivers/ram/rockchip/sdram_pctl_px30.c        |   1 +
 drivers/ram/rockchip/sdram_phy_px30.c         |   1 +
 drivers/ram/rockchip/sdram_px30.c             |   3 +
 drivers/ram/rockchip/sdram_rk3128.c           |   1 +
 drivers/ram/rockchip/sdram_rk3188.c           |   3 +
 drivers/ram/rockchip/sdram_rk322x.c           |   2 +
 drivers/ram/rockchip/sdram_rk3288.c           |   3 +
 drivers/ram/rockchip/sdram_rk3328.c           |   3 +
 drivers/ram/rockchip/sdram_rk3399.c           |   3 +
 drivers/ram/stm32_sdram.c                     |   4 +
 drivers/ram/stm32mp1/stm32mp1_ddr.c           |   3 +
 drivers/ram/stm32mp1/stm32mp1_ddr_regs.h      |   1 +
 drivers/ram/stm32mp1/stm32mp1_interactive.c   |  12 +-
 drivers/ram/stm32mp1/stm32mp1_ram.c           |   1 +
 drivers/ram/stm32mp1/stm32mp1_tests.c         |   2 +
 drivers/ram/stm32mp1/stm32mp1_tuning.c        |   3 +
 drivers/remoteproc/k3_system_controller.c     |   1 +
 drivers/remoteproc/rproc-elf-loader.c         |   2 +
 drivers/remoteproc/rproc-uclass.c             |   1 +
 drivers/remoteproc/sandbox_testproc.c         |   1 +
 drivers/remoteproc/stm32_copro.c              |   1 +
 drivers/remoteproc/ti_k3_dsp_rproc.c          |   1 +
 drivers/remoteproc/ti_k3_r5f_rproc.c          |   1 +
 drivers/remoteproc/ti_power_proc.c            |   1 +
 drivers/reset/ast2500-reset.c                 |   1 +
 drivers/reset/reset-bcm6345.c                 |   3 +
 drivers/reset/reset-hisilicon.c               |   2 +
 drivers/reset/reset-hsdk.c                    |   2 +
 drivers/reset/reset-imx7.c                    |   3 +
 drivers/reset/reset-mediatek.c                |   2 +
 drivers/reset/reset-meson.c                   |   2 +
 drivers/reset/reset-mtmips.c                  |   2 +
 drivers/reset/reset-rockchip.c                |   2 +
 drivers/reset/reset-socfpga.c                 |   1 +
 drivers/reset/reset-sunxi.c                   |   2 +
 drivers/reset/reset-ti-sci.c                  |   1 +
 drivers/reset/reset-uclass.c                  |   1 +
 drivers/reset/reset-uniphier.c                |   1 +
 drivers/reset/sandbox-reset-test.c            |   1 +
 drivers/reset/sandbox-reset.c                 |   1 +
 drivers/reset/sti-reset.c                     |   2 +
 drivers/reset/stm32-reset.c                   |   2 +
 drivers/reset/tegra-car-reset.c               |   1 +
 drivers/reset/tegra186-reset.c                |   1 +
 drivers/rng/rockchip_rng.c                    |   1 +
 drivers/rng/sandbox_rng.c                     |   1 +
 drivers/rng/stm32mp1_rng.c                    |   3 +
 drivers/rtc/davinci.c                         |   2 +
 drivers/rtc/ds1302.c                          |   1 +
 drivers/rtc/ds1306.c                          |  27 +-
 drivers/rtc/ds1307.c                          |   1 +
 drivers/rtc/ds1337.c                          |   1 +
 drivers/rtc/ds3231.c                          |   1 +
 drivers/rtc/ds3232.c                          |   1 +
 drivers/rtc/ftrtc010.c                        |   1 +
 drivers/rtc/i2c_rtc_emul.c                    |   1 +
 drivers/rtc/imxdi.c                           |   1 +
 drivers/rtc/m41t11.c                          |  13 +-
 drivers/rtc/m41t60.c                          |   1 +
 drivers/rtc/m41t62.c                          |   1 +
 drivers/rtc/max6900.c                         |   1 +
 drivers/rtc/mvrtc.c                           |   1 +
 drivers/rtc/pcf2127.c                         |   1 +
 drivers/rtc/pcf8563.c                         |   1 +
 drivers/rtc/pl031.c                           |   1 +
 drivers/rtc/pt7c4338.c                        |   1 +
 drivers/rtc/rtc-uclass.c                      |   1 +
 drivers/rtc/rv3029.c                          |   3 +
 drivers/rtc/rv8803.c                          |   2 +
 drivers/rtc/rx8010sj.c                        |   1 +
 drivers/rtc/s35392a.c                         |   1 +
 drivers/rtc/stm32_rtc.c                       |   1 +
 drivers/rtc/x1205.c                           |   1 +
 drivers/scsi/scsi.c                           |   4 +
 drivers/serial/altera_jtag_uart.c             |   1 +
 drivers/serial/altera_uart.c                  |   1 +
 drivers/serial/atmel_usart.c                  |   1 +
 drivers/serial/ns16550.c                      |   1 +
 drivers/serial/serial-uclass.c                |   1 +
 drivers/serial/serial.c                       |   1 +
 drivers/serial/serial_ar933x.c                |   1 +
 drivers/serial/serial_bcm283x_mu.c            |   1 +
 drivers/serial/serial_cortina.c               |   1 +
 drivers/serial/serial_efi.c                   |   1 +
 drivers/serial/serial_lpuart.c                |   2 +
 drivers/serial/serial_meson.c                 |   1 +
 drivers/serial/serial_mtk.c                   |   1 +
 drivers/serial/serial_omap.c                  |   1 +
 drivers/serial/serial_owl.c                   |   1 +
 drivers/serial/serial_pic32.c                 |   1 +
 drivers/serial/serial_sh.c                    |   1 +
 drivers/serial/serial_sifive.c                |   1 +
 drivers/serial/serial_sti_asc.c               |   2 +
 drivers/serial/serial_stm32.c                 |   3 +
 drivers/serial/serial_stm32.h                 |   1 +
 drivers/serial/serial_xuartlite.c             |   1 +
 drivers/serial/serial_zynq.c                  |   2 +
 drivers/smem/msm_smem.c                       |   1 +
 drivers/soc/ti/k3-navss-ringacc.c             |   3 +
 drivers/soc/ti/keystone_serdes.c              |   1 +
 drivers/sound/broadwell_i2s.c                 |   1 +
 drivers/sound/hda_codec.c                     |   3 +
 drivers/sound/ivybridge_sound.c               |   2 +
 drivers/sound/max98088.c                      |   1 +
 drivers/sound/max98088.h                      |   1 +
 drivers/sound/max98090.c                      |   2 +
 drivers/sound/max98095.c                      |   1 +
 drivers/sound/maxim_codec.c                   |   1 +
 drivers/sound/rockchip_i2s.c                  |   2 +
 drivers/sound/rockchip_sound.c                |   1 +
 drivers/sound/rt5677.c                        |   1 +
 drivers/sound/samsung-i2s.c                   |   1 +
 drivers/sound/samsung_sound.c                 |   1 +
 drivers/sound/sandbox.c                       |   1 +
 drivers/sound/sound-uclass.c                  |   2 +
 drivers/sound/sound.c                         |   1 +
 drivers/sound/tegra_ahub.c                    |   1 +
 drivers/sound/tegra_i2s.c                     |   1 +
 drivers/sound/tegra_sound.c                   |   1 +
 drivers/sound/wm8994.c                        |   1 +
 drivers/spi/altera_spi.c                      |   2 +
 drivers/spi/atcspi200_spi.c                   |   1 +
 drivers/spi/atmel-quadspi.c                   |   1 +
 drivers/spi/atmel_spi.h                       |   1 +
 drivers/spi/bcm63xx_hsspi.c                   |   2 +
 drivers/spi/bcm63xx_spi.c                     |   1 +
 drivers/spi/cadence_qspi.c                    |   1 +
 drivers/spi/cadence_qspi_apb.c                |   3 +
 drivers/spi/cf_spi.c                          |   1 +
 drivers/spi/davinci_spi.c                     |   3 +
 drivers/spi/designware_spi.c                  |   2 +
 drivers/spi/exynos_spi.c                      |   2 +
 drivers/spi/fsl_dspi.c                        |   3 +
 drivers/spi/fsl_espi.c                        |   3 +
 drivers/spi/fsl_qspi.c                        |   6 +
 drivers/spi/ich.c                             |   4 +
 drivers/spi/ich.h                             |   1 +
 drivers/spi/kirkwood_spi.c                    |   1 +
 drivers/spi/lpc32xx_ssp.c                     |   1 +
 drivers/spi/meson_spifc.c                     |   2 +
 drivers/spi/mpc8xx_spi.c                      |   1 +
 drivers/spi/mpc8xxx_spi.c                     |   3 +
 drivers/spi/mscc_bb_spi.c                     |   2 +
 drivers/spi/mt7621_spi.c                      |   2 +
 drivers/spi/mvebu_a3700_spi.c                 |   2 +
 drivers/spi/mxc_spi.c                         |   3 +
 drivers/spi/mxs_spi.c                         |   3 +
 drivers/spi/nxp_fspi.c                        |   1 +
 drivers/spi/omap3_spi.c                       |   1 +
 drivers/spi/pic32_spi.c                       |   2 +
 drivers/spi/renesas_rpc_spi.c                 |   2 +
 drivers/spi/rk_spi.c                          |   2 +
 drivers/spi/sandbox_spi.c                     |   1 +
 drivers/spi/sh_qspi.c                         |   1 +
 drivers/spi/sh_spi.c                          |   1 +
 drivers/spi/soft_spi.c                        |   3 +
 drivers/spi/spi-mem-nodm.c                    |   1 +
 drivers/spi/spi-mem.c                         |   1 +
 drivers/spi/spi-sifive.c                      |   1 +
 drivers/spi/spi-sunxi.c                       |   2 +
 drivers/spi/spi-uclass.c                      |   1 +
 drivers/spi/stm32_qspi.c                      |   3 +
 drivers/spi/stm32_spi.c                       |   3 +
 drivers/spi/tegra114_spi.c                    |   3 +
 drivers/spi/tegra20_sflash.c                  |   3 +
 drivers/spi/tegra20_slink.c                   |   3 +
 drivers/spi/tegra210_qspi.c                   |   3 +
 drivers/spi/ti_qspi.c                         |   3 +
 drivers/spi/uniphier_spi.c                    |   3 +
 drivers/spi/xilinx_spi.c                      |   2 +
 drivers/spi/zynq_qspi.c                       |   2 +
 drivers/spi/zynq_spi.c                        |   3 +
 drivers/spi/zynqmp_gqspi.c                    |   3 +
 drivers/sysreset/sysreset-ti-sci.c            |   1 +
 drivers/sysreset/sysreset-uclass.c            |   7 +-
 drivers/sysreset/sysreset_ast.c               |   1 +
 drivers/sysreset/sysreset_gpio.c              |   1 +
 drivers/sysreset/sysreset_mpc83xx.c           |   3 +
 drivers/sysreset/sysreset_socfpga.c           |   1 +
 drivers/sysreset/sysreset_sti.c               |   1 +
 drivers/tee/tee-uclass.c                      |   1 +
 drivers/thermal/imx_scu_thermal.c             |   3 +
 drivers/thermal/imx_thermal.c                 |   2 +
 drivers/timer/altera_timer.c                  |   1 +
 drivers/timer/atmel_pit_timer.c               |   1 +
 drivers/timer/cadence-ttc.c                   |   3 +
 drivers/timer/mpc83xx_timer.c                 |   3 +
 drivers/timer/mtk_timer.c                     |   1 +
 drivers/timer/nomadik-mtu-timer.c             |   1 +
 drivers/timer/omap-timer.c                    |   1 +
 drivers/timer/ostm_timer.c                    |   1 +
 drivers/timer/rockchip_timer.c                |   3 +
 drivers/timer/stm32_timer.c                   |   1 +
 drivers/timer/timer-uclass.c                  |   1 +
 drivers/timer/tsc_timer.c                     |   3 +
 drivers/tpm/cr50_i2c.c                        |   2 +
 drivers/tpm/tpm-uclass.c                      |   2 +
 drivers/tpm/tpm2_ftpm_tee.c                   |   1 +
 drivers/tpm/tpm2_tis_sandbox.c                |   1 +
 drivers/tpm/tpm2_tis_spi.c                    |   2 +
 drivers/tpm/tpm_atmel_twi.c                   |   1 +
 drivers/tpm/tpm_tis_infineon.c                |   2 +
 drivers/tpm/tpm_tis_lpc.c                     |   2 +
 drivers/tpm/tpm_tis_st33zp24_i2c.c            |   2 +
 drivers/tpm/tpm_tis_st33zp24_spi.c            |   2 +
 drivers/ufs/cdns-platform.c                   |   1 +
 drivers/ufs/ti-j721e-ufs.c                    |   1 +
 drivers/ufs/ufs.c                             |   3 +
 drivers/usb/cdns3/cdns3-ti.c                  |   1 +
 drivers/usb/cdns3/core.c                      |   2 +
 drivers/usb/cdns3/drd.h                       |   1 +
 drivers/usb/cdns3/ep0.c                       |   3 +
 drivers/usb/cdns3/gadget.c                    |   2 +
 drivers/usb/cdns3/gadget.h                    |   1 +
 drivers/usb/common/fsl-dt-fixup.c             |   1 +
 drivers/usb/dwc3/core.c                       |   2 +
 drivers/usb/dwc3/core.h                       |   1 +
 drivers/usb/dwc3/dwc3-generic.c               |   2 +
 drivers/usb/dwc3/dwc3-meson-g12a.c            |   2 +
 drivers/usb/dwc3/ep0.c                        |   1 +
 drivers/usb/dwc3/gadget.c                     |   2 +
 drivers/usb/dwc3/samsung_usb_phy.c            |   1 +
 drivers/usb/dwc3/ti_usb_phy.c                 |   2 +
 drivers/usb/emul/sandbox_flash.c              |   1 +
 drivers/usb/emul/sandbox_hub.c                |   1 +
 drivers/usb/emul/sandbox_keyb.c               |   1 +
 drivers/usb/emul/usb-emul-uclass.c            |   1 +
 drivers/usb/eth/asix.c                        |   3 +
 drivers/usb/eth/asix88179.c                   |   2 +
 drivers/usb/eth/lan75xx.c                     |   2 +
 drivers/usb/eth/lan78xx.c                     |   3 +
 drivers/usb/eth/lan7x.c                       |   2 +
 drivers/usb/eth/lan7x.h                       |   8 +
 drivers/usb/eth/mcs7830.c                     |   3 +
 drivers/usb/eth/r8152.c                       |   3 +
 drivers/usb/eth/r8152.h                       |   1 +
 drivers/usb/eth/r8152_fw.c                    |   2 +
 drivers/usb/eth/smsc95xx.c                    |   3 +
 drivers/usb/eth/usb_ether.c                   |   3 +
 drivers/usb/gadget/at91_udc.c                 |   1 +
 drivers/usb/gadget/atmel_usba_udc.c           |   1 +
 drivers/usb/gadget/bcm_udc_otg_phy.c          |   1 +
 drivers/usb/gadget/ci_udc.c                   |   2 +
 drivers/usb/gadget/composite.c                |   2 +
 drivers/usb/gadget/core.c                     |   1 +
 drivers/usb/gadget/designware_udc.c           |   1 +
 drivers/usb/gadget/dwc2_udc_otg.c             |   3 +
 drivers/usb/gadget/dwc2_udc_otg_phy.c         |   1 +
 drivers/usb/gadget/dwc2_udc_otg_regs.h        |   1 +
 drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c    |   2 +
 drivers/usb/gadget/ether.c                    |   2 +
 drivers/usb/gadget/f_dfu.c                    |   1 +
 drivers/usb/gadget/f_fastboot.c               |   2 +
 drivers/usb/gadget/f_mass_storage.c           |   2 +
 drivers/usb/gadget/f_rockusb.c                |   3 +
 drivers/usb/gadget/f_sdp.c                    |   1 +
 drivers/usb/gadget/f_thor.c                   |   3 +
 drivers/usb/gadget/fotg210.c                  |   2 +
 drivers/usb/gadget/g_dnl.c                    |   1 +
 drivers/usb/gadget/pxa25x_udc.c               |   3 +
 drivers/usb/gadget/pxa27x_udc.c               |   1 +
 drivers/usb/gadget/rndis.c                    |   1 +
 drivers/usb/gadget/storage_common.c           |   1 +
 drivers/usb/host/dwc2.c                       |   3 +
 drivers/usb/host/dwc3-sti-glue.c              |   1 +
 drivers/usb/host/ehci-armada100.c             |   1 +
 drivers/usb/host/ehci-atmel.c                 |   1 +
 drivers/usb/host/ehci-exynos.c                |   2 +
 drivers/usb/host/ehci-faraday.c               |   2 +
 drivers/usb/host/ehci-fsl.c                   |   2 +
 drivers/usb/host/ehci-generic.c               |   1 +
 drivers/usb/host/ehci-hcd.c                   |   3 +
 drivers/usb/host/ehci-marvell.c               |   2 +
 drivers/usb/host/ehci-mx5.c                   |   2 +
 drivers/usb/host/ehci-mx6.c                   |   2 +
 drivers/usb/host/ehci-mxc.c                   |   1 +
 drivers/usb/host/ehci-mxs.c                   |   1 +
 drivers/usb/host/ehci-omap.c                  |   2 +
 drivers/usb/host/ehci-pci.c                   |   2 +
 drivers/usb/host/ehci-rmobile.c               |   1 +
 drivers/usb/host/ehci-spear.c                 |   2 +
 drivers/usb/host/ehci-tegra.c                 |   2 +
 drivers/usb/host/ehci-vf.c                    |   2 +
 drivers/usb/host/ehci.h                       |   1 +
 drivers/usb/host/ohci-generic.c               |   1 +
 drivers/usb/host/ohci-hcd.c                   |   2 +
 drivers/usb/host/ohci-lpc32xx.c               |   2 +
 drivers/usb/host/r8a66597-hcd.c               |   2 +
 drivers/usb/host/r8a66597.h                   |   1 +
 drivers/usb/host/sl811-hcd.c                  |   1 +
 drivers/usb/host/usb-sandbox.c                |   1 +
 drivers/usb/host/usb-uclass.c                 |   1 +
 drivers/usb/host/utmi-armada100.c             |   1 +
 drivers/usb/host/xhci-dwc3.c                  |   2 +
 drivers/usb/host/xhci-exynos5.c               |   2 +
 drivers/usb/host/xhci-fsl.c                   |   1 +
 drivers/usb/host/xhci-mem.c                   |   2 +
 drivers/usb/host/xhci-mvebu.c                 |   1 +
 drivers/usb/host/xhci-omap.c                  |   1 +
 drivers/usb/host/xhci-pci.c                   |   2 +
 drivers/usb/host/xhci-rcar.c                  |   2 +
 drivers/usb/host/xhci-ring.c                  |   2 +
 drivers/usb/host/xhci-rockchip.c              |   1 +
 drivers/usb/host/xhci.c                       |   4 +
 drivers/usb/musb-new/am35x.c                  |   2 +
 drivers/usb/musb-new/da8xx.c                  |   2 +
 drivers/usb/musb-new/linux-compat.h           |   1 +
 drivers/usb/musb-new/mt85xx.c                 |   1 +
 drivers/usb/musb-new/musb_core.c              |   3 +
 drivers/usb/musb-new/musb_gadget.c            |   2 +
 drivers/usb/musb-new/musb_gadget_ep0.c        |   1 +
 drivers/usb/musb-new/musb_host.c              |   1 +
 drivers/usb/musb-new/musb_uboot.c             |   1 +
 drivers/usb/musb-new/omap2430.c               |   1 +
 drivers/usb/musb-new/pic32.c                  |   2 +
 drivers/usb/musb-new/sunxi.c                  |   3 +
 drivers/usb/musb-new/ti-musb.c                |   1 +
 drivers/usb/musb/am35x.c                      |   1 +
 drivers/usb/musb/musb_core.c                  |   1 +
 drivers/usb/musb/musb_hcd.c                   |   2 +
 drivers/usb/musb/musb_udc.c                   |   1 +
 drivers/usb/phy/omap_usb_phy.c                |   1 +
 drivers/usb/phy/rockchip_usb2_phy.c           |   3 +
 drivers/usb/phy/twl4030.c                     |   1 +
 drivers/usb/ulpi/omap-ulpi-viewport.c         |   2 +
 drivers/usb/ulpi/ulpi-viewport.c              |   1 +
 drivers/usb/ulpi/ulpi.c                       |   2 +
 drivers/video/am335x-fb.c                     |   2 +
 drivers/video/anx9804.c                       |   1 +
 drivers/video/anx98xx-edp.h                   |   1 +
 drivers/video/ati_radeon_fb.c                 |   1 +
 drivers/video/atmel_hlcdfb.c                  |   3 +
 drivers/video/atmel_lcdfb.c                   |   3 +
 drivers/video/backlight_gpio.c                |   1 +
 drivers/video/bcm2835.c                       |   2 +
 drivers/video/bridge/anx6345.c                |   2 +
 drivers/video/bridge/ps862x.c                 |   2 +
 drivers/video/bridge/ptn3460.c                |   1 +
 drivers/video/bridge/video-bridge-uclass.c    |   2 +
 drivers/video/broadwell_igd.c                 |   3 +
 drivers/video/bus_vcxk.c                      |   1 +
 drivers/video/cfb_console.c                   |   5 +-
 drivers/video/console_truetype.c              |   1 +
 drivers/video/da8xx-fb.c                      |   2 +
 drivers/video/dw_hdmi.c                       |   2 +
 drivers/video/dw_mipi_dsi.c                   |   2 +
 drivers/video/efi.c                           |   1 +
 drivers/video/exynos/exynos_dp.c              |   2 +
 drivers/video/exynos/exynos_dp_lowlevel.c     |   2 +
 drivers/video/exynos/exynos_fb.c              |   1 +
 drivers/video/exynos/exynos_mipi_dsi.c        |   1 +
 drivers/video/exynos/exynos_mipi_dsi_common.c |   2 +
 .../video/exynos/exynos_mipi_dsi_lowlevel.c   |   1 +
 drivers/video/formike.c                       |   2 +
 drivers/video/fsl_dcu_fb.c                    |   1 +
 drivers/video/hitachi_tx18d42vm_lcd.c         |   1 +
 drivers/video/ihs_video_out.c                 |   1 +
 drivers/video/imx/ipu_common.c                |   2 +
 drivers/video/imx/ipu_disp.c                  |   2 +
 drivers/video/imx/mxc_ipuv3_fb.c              |   3 +
 drivers/video/ivybridge_igd.c                 |   2 +
 drivers/video/ld9040.c                        |   1 +
 drivers/video/lg4573.c                        |   7 +-
 drivers/video/logicore_dp_tx.c                |   1 +
 drivers/video/mali_dp.c                       |   1 +
 drivers/video/mb862xx.c                       |   7 +-
 drivers/video/meson/meson_dw_hdmi.c           |   2 +
 drivers/video/meson/meson_dw_hdmi.h           |   1 +
 drivers/video/meson/meson_plane.c             |   1 +
 drivers/video/meson/meson_registers.h         |   1 +
 drivers/video/meson/meson_vclk.c              |   2 +
 drivers/video/meson/meson_venc.c              |   1 +
 drivers/video/meson/meson_vpu.c               |   2 +
 drivers/video/meson/meson_vpu_init.c          |   1 +
 drivers/video/mvebu_lcd.c                     |   3 +
 drivers/video/mx3fb.c                         |   2 +
 drivers/video/mxsfb.c                         |   3 +
 drivers/video/orisetech_otm8009a.c            |   1 +
 drivers/video/pwm_backlight.c                 |   2 +
 drivers/video/pxa_lcd.c                       |   1 +
 drivers/video/raydium-rm68200.c               |   1 +
 drivers/video/rockchip/rk3288_hdmi.c          |   1 +
 drivers/video/rockchip/rk3288_mipi.c          |   1 +
 drivers/video/rockchip/rk3288_vop.c           |   1 +
 drivers/video/rockchip/rk3399_mipi.c          |   1 +
 drivers/video/rockchip/rk3399_vop.c           |   1 +
 drivers/video/rockchip/rk_edp.c               |   2 +
 drivers/video/rockchip/rk_hdmi.c              |   1 +
 drivers/video/rockchip/rk_lvds.c              |   1 +
 drivers/video/rockchip/rk_mipi.c              |   1 +
 drivers/video/rockchip/rk_vop.c               |   2 +
 drivers/video/s6e8ax0.c                       |   1 +
 drivers/video/sandbox_sdl.c                   |   1 +
 drivers/video/scf0403_lcd.c                   |   1 +
 drivers/video/simple_panel.c                  |   1 +
 drivers/video/simplefb.c                      |   1 +
 drivers/video/ssd2828.c                       |   1 +
 drivers/video/stm32/stm32_dsi.c               |   2 +
 drivers/video/stm32/stm32_ltdc.c              |   2 +
 drivers/video/sunxi/lcdc.c                    |   2 +
 drivers/video/sunxi/sunxi_de2.c               |   3 +
 drivers/video/sunxi/sunxi_display.c           |   1 +
 drivers/video/sunxi/sunxi_dw_hdmi.c           |   3 +
 drivers/video/sunxi/sunxi_lcd.c               |   1 +
 drivers/video/tda19988.c                      |   2 +
 drivers/video/tegra.c                         |   3 +
 drivers/video/tegra124/display.c              |   4 +
 drivers/video/tegra124/dp.c                   |   2 +
 drivers/video/tegra124/sor.c                  |   2 +
 drivers/video/vidconsole-uclass.c             |   6 +-
 drivers/video/video-uclass.c                  |   2 +
 drivers/video/video_bmp.c                     |   1 +
 drivers/virtio/virtio-uclass.c                |   2 +
 drivers/virtio/virtio_blk.c                   |   1 +
 drivers/virtio/virtio_mmio.c                  |   2 +
 drivers/virtio/virtio_mmio.h                  |   1 +
 drivers/virtio/virtio_pci_legacy.c            |   2 +
 drivers/virtio/virtio_pci_modern.c            |   3 +
 drivers/virtio/virtio_ring.c                  |   2 +
 drivers/virtio/virtio_rng.c                   |   1 +
 drivers/virtio/virtio_sandbox.c               |   1 +
 drivers/w1-eeprom/w1-eeprom-uclass.c          |   1 +
 drivers/w1/mxc_w1.c                           |   2 +
 drivers/w1/w1-gpio.c                          |   2 +
 drivers/w1/w1-uclass.c                        |   1 +
 drivers/watchdog/ast_wdt.c                    |   1 +
 drivers/watchdog/at91sam9_wdt.c               |   1 +
 drivers/watchdog/bcm6345_wdt.c                |   1 +
 drivers/watchdog/cdns_wdt.c                   |   1 +
 drivers/watchdog/designware_wdt.c             |   1 +
 drivers/watchdog/ftwdt010_wdt.c               |   1 +
 drivers/watchdog/mt7621_wdt.c                 |   1 +
 drivers/watchdog/mtk_wdt.c                    |   1 +
 drivers/watchdog/omap_wdt.c                   |   1 +
 drivers/watchdog/orion_wdt.c                  |   2 +
 drivers/watchdog/sp805_wdt.c                  |   1 +
 drivers/watchdog/stm32mp_wdt.c                |   2 +
 drivers/watchdog/tangier_wdt.c                |   1 +
 drivers/watchdog/wdt-uclass.c                 |   1 +
 drivers/watchdog/xilinx_tb_wdt.c              |   1 +
 env/common.c                                  |   2 +
 env/env.c                                     |   3 +
 env/ext4.c                                    |   5 +-
 env/fat.c                                     |   9 +-
 env/flash.c                                   |   1 +
 env/mmc.c                                     |   2 +-
 env/sf.c                                      |   3 +
 examples/api/demo.c                           |   2 +-
 examples/api/libgenwrap.c                     |   4 +-
 examples/standalone/atmel_df_pow2.c           |   3 +-
 examples/standalone/hello_world.c             |   2 +-
 examples/standalone/smc91111_eeprom.c         |   9 +-
 examples/standalone/smc911x_eeprom.c          |   3 +-
 examples/standalone/stubs.c                   |   2 +
 fs/btrfs/btrfs.c                              |   4 +-
 fs/btrfs/btrfs.h                              |   2 +-
 fs/btrfs/chunk-map.c                          |   1 +
 fs/btrfs/compression.c                        |   1 +
 fs/btrfs/ctree.c                              |   1 +
 fs/btrfs/dev.c                                |   3 +-
 fs/btrfs/super.c                              |   5 +-
 fs/cramfs/cramfs.c                            |   1 +
 fs/ext4/dev.c                                 |   5 +-
 fs/ext4/ext4_common.c                         |   3 +
 fs/ext4/ext4_common.h                         |   1 +
 fs/ext4/ext4_journal.c                        |   2 +
 fs/ext4/ext4_write.c                          |   3 +
 fs/ext4/ext4fs.c                              |   5 +-
 fs/fat/fat.c                                  |   8 +-
 fs/fat/fat_write.c                            |   2 +
 fs/fs.c                                       |  37 ++-
 fs/fs_internal.c                              |   4 +-
 fs/jffs2/jffs2_1pass.c                        |   1 +
 fs/reiserfs/dev.c                             |   4 +-
 fs/sandbox/sandboxfs.c                        |   3 +-
 fs/ubifs/budget.c                             |   1 +
 fs/ubifs/debug.c                              |   1 +
 fs/ubifs/gc.c                                 |   1 +
 fs/ubifs/io.c                                 |   2 +
 fs/ubifs/log.c                                |   1 +
 fs/ubifs/lprops.c                             |   1 +
 fs/ubifs/lpt.c                                |   1 +
 fs/ubifs/lpt_commit.c                         |   2 +
 fs/ubifs/master.c                             |   1 +
 fs/ubifs/orphan.c                             |   1 +
 fs/ubifs/recovery.c                           |   1 +
 fs/ubifs/replay.c                             |   1 +
 fs/ubifs/sb.c                                 |   1 +
 fs/ubifs/scan.c                               |   1 +
 fs/ubifs/super.c                              |   3 +
 fs/ubifs/tnc.c                                |   3 +
 fs/ubifs/tnc_misc.c                           |   1 +
 fs/ubifs/ubifs.c                              |   4 +-
 fs/yaffs2/yaffs_mtdif2.c                      |   1 +
 fs/yaffs2/yportenv.h                          |   1 +
 fs/zfs/dev.c                                  |   4 +-
 fs/zfs/zfs.c                                  |   1 +
 include/_exports.h                            |   2 +-
 include/acpi/acpi_table.h                     |   2 +
 include/android_ab.h                          |   5 +-
 include/asm-generic/gpio.h                    |   1 +
 include/asm-generic/u-boot.h                  |   1 +
 include/atf_common.h                          |   2 +-
 include/avb_verify.h                          |   2 +-
 include/bedbug/type.h                         |   5 +-
 include/bitfield.h                            |   1 +
 include/blk.h                                 |   2 +-
 include/bootm.h                               |  16 +-
 include/bootstage.h                           |  10 +-
 include/btrfs.h                               |   6 +-
 include/command.h                             | 117 ++++---
 include/common.h                              |  14 -
 include/config_fsl_chain_trust.h              |   2 +
 include/configs/B4860QDS.h                    |   2 +
 include/configs/C29XPCIE.h                    |   2 +
 include/configs/M52277EVB.h                   |   2 +
 include/configs/M5253DEMO.h                   |   2 +
 include/configs/M5373EVB.h                    |   2 +
 include/configs/M54418TWR.h                   |   2 +
 include/configs/M54451EVB.h                   |   2 +
 include/configs/M54455EVB.h                   |   2 +
 include/configs/MPC8308RDB.h                  |   2 +
 include/configs/MPC8313ERDB_NAND.h            |   2 +
 include/configs/MPC8313ERDB_NOR.h             |   1 +
 include/configs/MPC8323ERDB.h                 |   2 +
 include/configs/MPC8349ITX.h                  |   1 +
 include/configs/MPC837XERDB.h                 |   2 +
 include/configs/MPC8536DS.h                   |   2 +
 include/configs/MPC8544DS.h                   |   1 +
 include/configs/MPC8548CDS.h                  |   1 +
 include/configs/MPC8560ADS.h                  |   2 +
 include/configs/MPC8572DS.h                   |   2 +
 include/configs/MPC8610HPCD.h                 |   2 +
 include/configs/MPC8641HPCN.h                 |   2 +
 include/configs/P1010RDB.h                    |   2 +
 include/configs/P1022DS.h                     |   2 +
 include/configs/P1023RDB.h                    |   2 +
 include/configs/P2041RDB.h                    |   1 +
 include/configs/T102xQDS.h                    |   2 +
 include/configs/T102xRDB.h                    |   2 +
 include/configs/T1040QDS.h                    |   2 +
 include/configs/T104xRDB.h                    |   2 +
 include/configs/T208xQDS.h                    |   2 +
 include/configs/T208xRDB.h                    |   2 +
 include/configs/T4240QDS.h                    |   2 +
 include/configs/T4240RDB.h                    |   2 +
 include/configs/UCP1020.h                     |   2 +
 include/configs/apalis_imx6.h                 |   2 +
 include/configs/apf27.h                       |   2 +
 include/configs/at91sam9263ek.h               |   3 +
 include/configs/bcmstb.h                      |   1 +
 include/configs/brppt1.h                      |   1 +
 include/configs/brsmarc1.h                    |   1 +
 include/configs/brxre1.h                      |   1 +
 include/configs/cgtqmx6eval.h                 |   2 +
 include/configs/clearfog.h                    |   2 +
 include/configs/colibri-imx8x.h               |   1 +
 include/configs/colibri_imx6.h                |   2 +
 include/configs/controlcenterd.h              |   2 +
 include/configs/corenet_ds.h                  |   2 +
 include/configs/cyrus.h                       |   2 +
 include/configs/dart_6ul.h                    |   1 +
 include/configs/el6x_common.h                 |   2 +
 include/configs/exynos-common.h               |   1 +
 .../configs/gardena-smart-gateway-at91sam.h   |   4 +
 include/configs/helios4.h                     |   1 +
 include/configs/hrcon.h                       |   2 +
 include/configs/ids8313.h                     |   2 +
 include/configs/imx6-engicam.h                |   1 +
 include/configs/imx8mm_evk.h                  |   1 +
 include/configs/imx8mn_evk.h                  |   1 +
 include/configs/imx8mp_evk.h                  |   1 +
 include/configs/imx8mq_evk.h                  |   1 +
 include/configs/imx8qm_mek.h                  |   1 +
 include/configs/imx8qm_rom7720.h              |   2 +
 include/configs/imx8qxp_mek.h                 |   1 +
 include/configs/km/keymile-common.h           |   2 +
 include/configs/km/km-mpc83xx.h               |   1 +
 include/configs/km/km_arm.h                   |   2 +
 include/configs/liteboard.h                   |   1 +
 include/configs/mpc8308_p1m.h                 |   2 +
 include/configs/mv-common.h                   |   2 +
 include/configs/mx6_common.h                  |   2 +
 include/configs/mx6cuboxi.h                   |   2 +
 include/configs/mx6sabre_common.h             |   2 +
 include/configs/mx6sllevk.h                   |   1 +
 include/configs/mx6sxsabresd.h                |   2 +
 include/configs/mx6ul_14x14_evk.h             |   1 +
 include/configs/mx6ullevk.h                   |   1 +
 include/configs/mx7_common.h                  |   1 +
 include/configs/nitrogen6x.h                  |   1 +
 include/configs/p1_p2_rdb_pc.h                |   2 +
 include/configs/p1_twr.h                      |   2 +
 include/configs/pcl063_ull.h                  |   1 +
 include/configs/pcm052.h                      |   1 +
 include/configs/pico-imx6ul.h                 |   1 +
 include/configs/pico-imx7d.h                  |   1 +
 include/configs/s32v234evb.h                  |   1 +
 include/configs/sbc8548.h                     |   2 +
 include/configs/socfpga_arria5_secu1.h        |   1 +
 include/configs/socfpga_common.h              |   2 +
 include/configs/socfpga_soc64_common.h        |   1 +
 include/configs/strider.h                     |   2 +
 include/configs/tqma6.h                       |   2 +
 include/configs/udoo.h                        |   1 +
 include/configs/ve8313.h                      |   2 +
 include/configs/vf610twr.h                    |   1 +
 include/configs/wandboard.h                   |   1 +
 include/configs/wb45n.h                       |   1 +
 include/configs/xpedite517x.h                 |   1 +
 include/configs/xpedite537x.h                 |   1 +
 include/configs/xpedite550x.h                 |   1 +
 include/cpu_func.h                            |   2 +-
 include/dma.h                                 |   1 +
 include/dwc3-sti-glue.h                       |   1 +
 include/dwmmc.h                               |   2 +
 include/efi_loader.h                          |   4 +
 include/elf.h                                 |   4 +-
 include/env_default.h                         |   1 +
 include/environment/ti/boot.h                 |   2 +
 include/exception.h                           |  12 +-
 include/exports.h                             |   2 +
 include/ext4fs.h                              |   6 +-
 include/ext_common.h                          |  18 +-
 include/faraday/ftpci100.h                    |   1 +
 include/faraday/ftsdc010.h                    |   1 +
 include/faraday/ftsdmc021.h                   |   1 +
 include/fat.h                                 |   4 +-
 include/fb_mmc.h                              |   8 +-
 include/flash.h                               |  24 +-
 include/fs.h                                  |  41 ++-
 include/fs_internal.h                         |   2 +-
 include/fsl-mc/fsl_mc.h                       |   1 +
 include/fsl_ddr.h                             |   4 +-
 include/fsl_ifc.h                             |   1 +
 include/fsl_validate.h                        |  14 +-
 include/gzip.h                                |   2 +
 include/hash.h                                |   6 +-
 include/i2c.h                                 |   2 +
 include/image.h                               |  14 +-
 include/initcall.h                            |   5 +
 include/kgdb.h                                |   2 +-
 include/linux/bitops.h                        |   4 +
 include/linux/compat.h                        |   1 +
 include/linux/mtd/rawnand.h                   |   1 +
 include/linux/soc/ti/cppi5.h                  |   1 +
 include/linux/soc/ti/k3-navss-ringacc.h       |   1 +
 include/linux/soc/ti/ti_sci_protocol.h        |   1 +
 include/log.h                                 |   7 +-
 include/mipi_dsi.h                            |   1 +
 include/mmc.h                                 |   1 +
 include/net.h                                 |  15 +-
 include/net/pfe_eth/pfe/cbus/class_csr.h      |   1 +
 include/net/pfe_eth/pfe/cbus/emac.h           |   1 +
 include/net/pfe_eth/pfe/cbus/hif.h            |   1 +
 include/net/pfe_eth/pfe/cbus/tmu_csr.h        |   1 +
 include/net/pfe_eth/pfe/pfe_hw.h              |   1 +
 include/net/pfe_eth/pfe_eth.h                 |   1 +
 include/part.h                                |  40 +--
 include/pch.h                                 |   1 +
 include/power/stpmic1.h                       |   1 +
 include/regmap.h                              |   2 +
 include/reiserfs.h                            |   5 +-
 include/sandboxfs.h                           |   5 +-
 include/scsi.h                                |   1 +
 include/sdhci.h                               |   1 +
 include/search.h                              |   2 +-
 include/spi.h                                 |   1 +
 include/spl.h                                 |   4 +
 include/tee.h                                 |   1 +
 include/tee/optee.h                           |   7 +-
 include/test/suites.h                         |  29 +-
 include/test/ut.h                             |   1 +
 include/tpm-common.h                          |  16 +-
 include/tpm-v1.h                              |   1 +
 include/ubifs_uboot.h                         |   5 +-
 include/virtio.h                              |   2 +
 include/vsc9953.h                             |   1 +
 include/vxworks.h                             |   9 +-
 include/wait_bit.h                            |   4 +-
 include/wdt.h                                 |   1 +
 include/xyzModem.h                            |   2 +
 include/zfs_common.h                          |   2 +-
 include/zynqmppl.h                            |   1 +
 lib/acpi/acpi_table.c                         |   1 +
 lib/aes.c                                     |   1 +
 lib/asm-offsets.c                             |   1 +
 lib/asn1_decoder.c                            |   1 +
 lib/bch.c                                     |   1 +
 lib/binman.c                                  |   1 +
 lib/bzip2/bzlib_blocksort.c                   |   1 +
 lib/circbuf.c                                 |   1 +
 lib/crypto/asymmetric_type.c                  |   2 +
 lib/crypto/pkcs7_parser.c                     |   1 +
 lib/crypto/public_key.c                       |   1 +
 lib/crypto/x509_cert_parser.c                 |   1 +
 lib/dhry/cmd_dhry.c                           |   3 +-
 lib/div64.c                                   |   1 +
 lib/efi/efi_app.c                             |   1 +
 lib/efi_driver/efi_block_device.c             |   2 +
 lib/efi_driver/efi_uclass.c                   |   1 +
 lib/efi_loader/efi_acpi.c                     |   1 +
 lib/efi_loader/efi_bootmgr.c                  |   1 +
 lib/efi_loader/efi_boottime.c                 |   1 +
 lib/efi_loader/efi_device_path.c              |   6 +-
 lib/efi_loader/efi_device_path_to_text.c      |   1 +
 lib/efi_loader/efi_disk.c                     |   6 +-
 lib/efi_loader/efi_file.c                     |   4 +-
 lib/efi_loader/efi_gop.c                      |   1 +
 lib/efi_loader/efi_memory.c                   |   1 +
 lib/efi_loader/efi_net.c                      |   1 +
 lib/efi_loader/efi_rng.c                      |   1 +
 lib/efi_loader/efi_runtime.c                  |   1 +
 lib/efi_loader/efi_smbios.c                   |   1 +
 lib/efi_loader/efi_variable.c                 |   3 +
 lib/efi_selftest/efi_selftest_block_device.c  |   1 +
 lib/efi_selftest/efi_selftest_console.c       |   1 +
 lib/efi_selftest/efi_selftest_snp.c           |   1 +
 lib/fdtdec.c                                  |   2 +
 lib/fdtdec_common.c                           |   1 +
 lib/fdtdec_test.c                             |   5 +-
 lib/gunzip.c                                  |   1 +
 lib/hashtable.c                               |   3 +-
 lib/image-sparse.c                            |   3 +
 lib/libavb/avb_cmdline.c                      |   1 +
 lib/libavb/avb_descriptor.c                   |   1 +
 lib/libavb/avb_slot_verify.c                  |   1 +
 lib/libavb/avb_util.c                         |   1 +
 lib/linux_compat.c                            |   1 +
 lib/list_sort.c                               |   1 +
 lib/lmb.c                                     |   2 +
 lib/lzma/LzmaTools.c                          |   1 +
 lib/membuff.c                                 |   1 +
 lib/net_utils.c                               |   1 +
 lib/of_live.c                                 |   1 +
 lib/optee/optee.c                             |   1 +
 lib/panic.c                                   |   1 +
 lib/physmem.c                                 |   1 +
 lib/qsort.c                                   |   1 +
 lib/rsa/rsa-mod-exp.c                         |   1 +
 lib/rsa/rsa-verify.c                          |   1 +
 lib/slre.c                                    |   1 +
 lib/time.c                                    |   5 +-
 lib/tpm-common.c                              |   1 +
 lib/tpm-v1.c                                  |   1 +
 lib/tpm-v2.c                                  |   1 +
 lib/uuid.c                                    |   5 +-
 lib/vsprintf.c                                |   1 +
 net/arp.c                                     |   4 +
 net/bootp.c                                   |   5 +
 net/dns.c                                     |   1 +
 net/eth-uclass.c                              |   2 +
 net/eth_common.c                              |   1 +
 net/eth_legacy.c                              |   3 +
 net/fastboot.c                                |   1 +
 net/link_local.c                              |   1 +
 net/mdio-mux-uclass.c                         |   1 +
 net/mdio-uclass.c                             |   1 +
 net/net.c                                     |   2 +
 net/nfs.c                                     |   1 +
 net/ping.c                                    |   2 +
 net/rarp.c                                    |   1 +
 net/sntp.c                                    |   1 +
 net/tftp.c                                    |   2 +
 post/cpu/mpc83xx/ecc.c                        |   1 +
 post/drivers/i2c.c                            |   1 +
 post/drivers/memory.c                         |   1 +
 post/lib_powerpc/multi.c                      |   1 +
 post/post.c                                   |   2 +
 test/bloblist.c                               |   3 +-
 test/cmd_ut.c                                 |  14 +-
 test/command_ut.c                             |   5 +-
 test/compression.c                            |   5 +-
 test/dm/axi.c                                 |   1 +
 test/dm/blk.c                                 |   1 +
 test/dm/board.c                               |   1 +
 test/dm/bootcount.c                           |   1 +
 test/dm/bus.c                                 |   1 +
 test/dm/clk.c                                 |   1 +
 test/dm/core.c                                |   1 +
 test/dm/cpu.c                                 |   1 +
 test/dm/devres.c                              |   1 +
 test/dm/eth.c                                 |   1 +
 test/dm/gpio.c                                |   1 +
 test/dm/mdio.c                                |   1 +
 test/dm/mmc.c                                 |   1 +
 test/dm/ofnode.c                              |   1 +
 test/dm/phy.c                                 |   1 +
 test/dm/regmap.c                              |   1 +
 test/dm/regulator.c                           |   1 +
 test/dm/reset.c                               |   1 +
 test/dm/rng.c                                 |   1 +
 test/dm/rtc.c                                 |   1 +
 test/dm/serial.c                              |   1 +
 test/dm/syscon.c                              |   1 +
 test/dm/tee.c                                 |   1 +
 test/dm/test-driver.c                         |   1 +
 test/dm/test-fdt.c                            |   1 +
 test/dm/test-main.c                           |   3 +-
 test/dm/test-uclass.c                         |   1 +
 test/dm/usb.c                                 |   1 +
 test/dm/video.c                               |   1 +
 test/env/cmd_ut_env.c                         |   2 +-
 test/env/hashtable.c                          |   1 +
 test/lib/cmd_ut_lib.c                         |   2 +-
 test/lib/lmb.c                                |   1 +
 test/lib/string.c                             |   1 +
 test/lib/test_aes.c                           |   1 +
 test/log/log_test.c                           |   4 +-
 test/log/test-main.c                          |   3 +-
 test/optee/cmd_ut_optee.c                     |   3 +-
 test/overlay/cmd_ut_overlay.c                 |   4 +-
 test/print_ut.c                               |   4 +-
 test/str_ut.c                                 |   2 +-
 test/time_ut.c                                |   3 +-
 test/unicode_ut.c                             |   3 +-
 tools/imx8image.c                             |   1 +
 tools/proftool.c                              |   2 +-
 3364 files changed, 7838 insertions(+), 1964 deletions(-)
 create mode 100644 arch/mips/mach-mtmips/ddr_calibrate.c

-- 
2.26.2.645.ge9eca65c58-goog

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH v3 01/22] common: Drop uuid.h from common header
  2020-05-10 17:39 [PATCH v3 00/22] common: Further reduce the size of common.h Simon Glass
@ 2020-05-10 17:39 ` Simon Glass
  2020-05-19 17:31   ` Tom Rini
  2020-05-10 17:39 ` [PATCH v3 02/22] flash: Tidy up coding style for flash functions Simon Glass
                   ` (21 subsequent siblings)
  22 siblings, 1 reply; 53+ messages in thread
From: Simon Glass @ 2020-05-10 17:39 UTC (permalink / raw)
  To: u-boot

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v3: None
Changes in v2: None

 cmd/gpt.c                     | 1 +
 cmd/nvedit_efi.c              | 1 +
 cmd/x86/hob.c                 | 1 +
 disk/part_efi.c               | 1 +
 fs/btrfs/btrfs.c              | 1 +
 fs/ext4/ext4fs.c              | 1 +
 include/common.h              | 1 -
 lib/efi_loader/efi_variable.c | 1 +
 lib/uuid.c                    | 1 +
 lib/vsprintf.c                | 1 +
 net/bootp.c                   | 1 +
 11 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/cmd/gpt.c b/cmd/gpt.c
index b8d11c167d..98c788e757 100644
--- a/cmd/gpt.c
+++ b/cmd/gpt.c
@@ -16,6 +16,7 @@
 #include <command.h>
 #include <part_efi.h>
 #include <exports.h>
+#include <uuid.h>
 #include <linux/ctype.h>
 #include <div64.h>
 #include <memalign.h>
diff --git a/cmd/nvedit_efi.c b/cmd/nvedit_efi.c
index 6f69a84fea..75e4e51495 100644
--- a/cmd/nvedit_efi.c
+++ b/cmd/nvedit_efi.c
@@ -14,6 +14,7 @@
 #include <hexdump.h>
 #include <malloc.h>
 #include <mapmem.h>
+#include <uuid.h>
 #include <linux/kernel.h>
 
 /*
diff --git a/cmd/x86/hob.c b/cmd/x86/hob.c
index 3967a7ca5a..29d9e3d5a2 100644
--- a/cmd/x86/hob.c
+++ b/cmd/x86/hob.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <efi.h>
+#include <uuid.h>
 #include <asm/hob.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/disk/part_efi.c b/disk/part_efi.c
index 83876a7bd9..2970ce5bab 100644
--- a/disk/part_efi.c
+++ b/disk/part_efi.c
@@ -9,6 +9,7 @@
  *   when CONFIG_SYS_64BIT_LBA is not defined, lbaint_t is 32 bits; this
  *   limits the maximum size of addressable storage to < 2 Terra Bytes
  */
+#include <uuid.h>
 #include <asm/unaligned.h>
 #include <common.h>
 #include <command.h>
diff --git a/fs/btrfs/btrfs.c b/fs/btrfs/btrfs.c
index cb7e182742..2e3985e385 100644
--- a/fs/btrfs/btrfs.c
+++ b/fs/btrfs/btrfs.c
@@ -8,6 +8,7 @@
 #include "btrfs.h"
 #include <config.h>
 #include <malloc.h>
+#include <uuid.h>
 #include <linux/time.h>
 
 struct btrfs_info btrfs_info;
diff --git a/fs/ext4/ext4fs.c b/fs/ext4/ext4fs.c
index 966b427a97..96ca276839 100644
--- a/fs/ext4/ext4fs.c
+++ b/fs/ext4/ext4fs.c
@@ -26,6 +26,7 @@
 #include "ext4_common.h"
 #include <div64.h>
 #include <malloc.h>
+#include <uuid.h>
 
 int ext4fs_symlinknest;
 struct ext_filesystem ext_fs;
diff --git a/include/common.h b/include/common.h
index 0ef8505fc7..a8242cafc5 100644
--- a/include/common.h
+++ b/include/common.h
@@ -36,7 +36,6 @@
 #include <asm/global_data.h>	/* global data used for startup functions */
 #include <init.h>
 #include <display_options.h>
-#include <uuid.h>
 #include <vsprintf.h>
 #include <net.h>
 #include <bootstage.h>
diff --git a/lib/efi_loader/efi_variable.c b/lib/efi_loader/efi_variable.c
index 60c1201757..b58963fa1d 100644
--- a/lib/efi_loader/efi_variable.c
+++ b/lib/efi_loader/efi_variable.c
@@ -12,6 +12,7 @@
 #include <malloc.h>
 #include <rtc.h>
 #include <search.h>
+#include <uuid.h>
 #include <crypto/pkcs7_parser.h>
 #include <linux/compat.h>
 #include <u-boot/crc.h>
diff --git a/lib/uuid.c b/lib/uuid.c
index c1cb9df6aa..bdb137884c 100644
--- a/lib/uuid.c
+++ b/lib/uuid.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <env.h>
 #include <time.h>
+#include <uuid.h>
 #include <linux/ctype.h>
 #include <errno.h>
 #include <common.h>
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index b4edee29b0..de9ef902b9 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -19,6 +19,7 @@
 #include <div64.h>
 #include <hexdump.h>
 #include <stdarg.h>
+#include <uuid.h>
 #include <vsprintf.h>
 #include <linux/ctype.h>
 #include <linux/err.h>
diff --git a/net/bootp.c b/net/bootp.c
index 505489140e..c73a82e642 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -13,6 +13,7 @@
 #include <env.h>
 #include <efi_loader.h>
 #include <net.h>
+#include <uuid.h>
 #include <net/tftp.h>
 #include "bootp.h"
 #ifdef CONFIG_LED_STATUS
-- 
2.26.2.645.ge9eca65c58-goog

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH v3 02/22] flash: Tidy up coding style for flash functions
  2020-05-10 17:39 [PATCH v3 00/22] common: Further reduce the size of common.h Simon Glass
  2020-05-10 17:39 ` [PATCH v3 01/22] common: Drop uuid.h from common header Simon Glass
@ 2020-05-10 17:39 ` Simon Glass
  2020-05-19 17:32   ` Tom Rini
  2020-05-10 17:39 ` [PATCH v3 03/22] common: Drop flash.h from common header Simon Glass
                   ` (20 subsequent siblings)
  22 siblings, 1 reply; 53+ messages in thread
From: Simon Glass @ 2020-05-10 17:39 UTC (permalink / raw)
  To: u-boot

Some functions use the wrong code style and generate checkpatch errors.
Fix these.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v3: None
Changes in v2:
- Split out code-style changes for flash functions into a new patch

 arch/arm/mach-at91/arm926ejs/eflash.c |  8 ++++----
 board/cobra5272/flash.c               | 16 ++++++++--------
 board/socrates/socrates.c             | 27 ++++++++++++++-------------
 cmd/flash.c                           | 22 ++++++++++++----------
 common/flash.c                        | 10 +++++-----
 include/flash.h                       | 24 ++++++++++++------------
 6 files changed, 55 insertions(+), 52 deletions(-)

diff --git a/arch/arm/mach-at91/arm926ejs/eflash.c b/arch/arm/mach-at91/arm926ejs/eflash.c
index 7b61fa7226..cfd6490d9d 100644
--- a/arch/arm/mach-at91/arm926ejs/eflash.c
+++ b/arch/arm/mach-at91/arm926ejs/eflash.c
@@ -58,7 +58,7 @@
 flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS];
 static u32 pagesize;
 
-unsigned long flash_init (void)
+unsigned long flash_init(void)
 {
 	at91_eefc_t *eefc = (at91_eefc_t *) ATMEL_BASE_EEFC;
 	at91_dbu_t *dbu = (at91_dbu_t *) ATMEL_BASE_DBGU;
@@ -127,7 +127,7 @@ unsigned long flash_init (void)
 	return size;
 }
 
-void flash_print_info (flash_info_t *info)
+void flash_print_info(flash_info_t *info)
 {
 	int i;
 
@@ -202,7 +202,7 @@ static u32 erase_write_page (u32 pagenum)
 		& (AT91_EEFC_FSR_FCMDE | AT91_EEFC_FSR_FLOCKE);
 }
 
-int flash_erase (flash_info_t *info, int s_first, int s_last)
+int flash_erase(flash_info_t *info, int s_first, int s_last)
 {
 	debug("erase first=%d last=%d\n", s_first, s_last);
 	puts("this flash does not need and support erasing!\n");
@@ -215,7 +215,7 @@ int flash_erase (flash_info_t *info, int s_first, int s_last)
  * 1 - write timeout
  */
 
-int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
+int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt)
 {
 	u32 pagenum;
 	u32 *src32, *dst32;
diff --git a/board/cobra5272/flash.c b/board/cobra5272/flash.c
index 1d3c5acddf..e601ed8e72 100644
--- a/board/cobra5272/flash.c
+++ b/board/cobra5272/flash.c
@@ -14,7 +14,7 @@
 
 flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS];
 
-void flash_print_info (flash_info_t * info)
+void flash_print_info(flash_info_t *info)
 {
 	int i;
 
@@ -55,7 +55,7 @@ Done:
 }
 
 
-unsigned long flash_init (void)
+unsigned long flash_init(void)
 {
 	int i, j;
 	ulong size = 0;
@@ -98,9 +98,9 @@ unsigned long flash_init (void)
 		size += flash_info[i].size;
 	}
 
-	flash_protect (FLAG_PROTECT_SET,
-		       CONFIG_SYS_FLASH_BASE,
-		       CONFIG_SYS_FLASH_BASE + 0x3ffff, &flash_info[0]);
+	flash_protect(FLAG_PROTECT_SET,
+		      CONFIG_SYS_FLASH_BASE,
+		      CONFIG_SYS_FLASH_BASE + 0x3ffff, &flash_info[0]);
 
 	return size;
 }
@@ -127,7 +127,7 @@ unsigned long flash_init (void)
 #define TMO   4
 
 
-int flash_erase (flash_info_t * info, int s_first, int s_last)
+int flash_erase(flash_info_t *info, int s_first, int s_last)
 {
 	ulong result;
 	int iflag, cflag, prot, sect;
@@ -244,7 +244,7 @@ int flash_erase (flash_info_t * info, int s_first, int s_last)
 	return rc;
 }
 
-static int write_word (flash_info_t * info, ulong dest, ulong data)
+static int write_word(flash_info_t *info, ulong dest, ulong data)
 {
 	volatile u16 *addr = (volatile u16 *) dest;
 	ulong result;
@@ -311,7 +311,7 @@ static int write_word (flash_info_t * info, ulong dest, ulong data)
 }
 
 
-int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt)
+int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt)
 {
 	ulong wp, data;
 	int rc;
diff --git a/board/socrates/socrates.c b/board/socrates/socrates.c
index b0ddee7906..bd214acc80 100644
--- a/board/socrates/socrates.c
+++ b/board/socrates/socrates.c
@@ -105,25 +105,26 @@ int misc_init_r (void)
 		/*
 		 * Re-do flash protection upon new addresses
 		 */
-		flash_protect (FLAG_PROTECT_CLEAR,
-			       gd->bd->bi_flashstart, 0xffffffff,
-			       &flash_info[CONFIG_SYS_MAX_FLASH_BANKS - 1]);
+		flash_protect(FLAG_PROTECT_CLEAR,
+			      gd->bd->bi_flashstart, 0xffffffff,
+			      &flash_info[CONFIG_SYS_MAX_FLASH_BANKS - 1]);
 
 		/* Monitor protection ON by default */
-		flash_protect (FLAG_PROTECT_SET,
-			       CONFIG_SYS_MONITOR_BASE, CONFIG_SYS_MONITOR_BASE + monitor_flash_len - 1,
-			       &flash_info[CONFIG_SYS_MAX_FLASH_BANKS - 1]);
+		flash_protect(FLAG_PROTECT_SET,
+			      CONFIG_SYS_MONITOR_BASE, CONFIG_SYS_MONITOR_BASE +
+			      monitor_flash_len - 1,
+			      &flash_info[CONFIG_SYS_MAX_FLASH_BANKS - 1]);
 
 		/* Environment protection ON by default */
-		flash_protect (FLAG_PROTECT_SET,
-			       CONFIG_ENV_ADDR,
-			       CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1,
-			       &flash_info[CONFIG_SYS_MAX_FLASH_BANKS - 1]);
+		flash_protect(FLAG_PROTECT_SET,
+			      CONFIG_ENV_ADDR,
+			      CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1,
+			      &flash_info[CONFIG_SYS_MAX_FLASH_BANKS - 1]);
 
 		/* Redundant environment protection ON by default */
-		flash_protect (FLAG_PROTECT_SET,
-			       CONFIG_ENV_ADDR_REDUND,
-			       CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1,
+		flash_protect(FLAG_PROTECT_SET,
+			      CONFIG_ENV_ADDR_REDUND,
+			      CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1,
 			       &flash_info[CONFIG_SYS_MAX_FLASH_BANKS - 1]);
 	}
 
diff --git a/cmd/flash.c b/cmd/flash.c
index cd1758d7e2..230d8408a4 100644
--- a/cmd/flash.c
+++ b/cmd/flash.c
@@ -88,7 +88,7 @@ abbrev_spec (char *str, flash_info_t ** pinfo, int *psf, int *psl)
 /*
  * Take *addr in Flash and adjust it to fall on the end of its sector
  */
-int flash_sect_roundb (ulong *addr)
+int flash_sect_roundb(ulong *addr)
 {
 	flash_info_t *info;
 	ulong bank, sector_end_addr;
@@ -279,7 +279,7 @@ static int do_flinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 		for (bank=0; bank <CONFIG_SYS_MAX_FLASH_BANKS; ++bank) {
 			printf ("\nBank # %ld: ", bank+1);
 
-			flash_print_info (&flash_info[bank]);
+			flash_print_info(&flash_info[bank]);
 		}
 		return 0;
 	}
@@ -291,7 +291,7 @@ static int do_flinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 		return 1;
 	}
 	printf ("\nBank # %ld: ", bank);
-	flash_print_info (&flash_info[bank-1]);
+	flash_print_info(&flash_info[bank - 1]);
 #endif /* CONFIG_MTD_NOR_FLASH */
 	return 0;
 }
@@ -316,7 +316,7 @@ static int do_flerase(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 		for (bank=1; bank<=CONFIG_SYS_MAX_FLASH_BANKS; ++bank) {
 			printf ("Erase Flash Bank # %ld ", bank);
 			info = &flash_info[bank-1];
-			rcode = flash_erase (info, 0, info->sector_count-1);
+			rcode = flash_erase(info, 0, info->sector_count - 1);
 		}
 		return rcode;
 	}
@@ -370,7 +370,7 @@ static int do_flerase(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 		}
 		printf ("Erase Flash Bank # %ld ", bank);
 		info = &flash_info[bank-1];
-		rcode = flash_erase (info, 0, info->sector_count-1);
+		rcode = flash_erase(info, 0, info->sector_count - 1);
 		return rcode;
 	}
 
@@ -390,7 +390,7 @@ static int do_flerase(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 }
 
 #ifdef CONFIG_MTD_NOR_FLASH
-int flash_sect_erase (ulong addr_first, ulong addr_last)
+int flash_sect_erase(ulong addr_first, ulong addr_last)
 {
 	flash_info_t *info;
 	ulong bank;
@@ -415,7 +415,8 @@ int flash_sect_erase (ulong addr_first, ulong addr_last)
 						info->start[0] + info->size - 1:
 						info->start[s_last[bank]+1] - 1,
 					bank+1);
-				rcode = flash_erase (info, s_first[bank], s_last[bank]);
+				rcode = flash_erase(info, s_first[bank],
+						    s_last[bank]);
 			}
 		}
 		if (rcode == 0)
@@ -526,7 +527,8 @@ static int do_protect(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 						p ? "" : "Un", argv[1],
 						bank, addr_first, addr_last);
 
-				rcode = flash_sect_protect (p, addr_first, addr_last);
+				rcode = flash_sect_protect(p, addr_first,
+							   addr_last);
 				return rcode;
 			}
 
@@ -580,13 +582,13 @@ static int do_protect(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	if (addr_first >= addr_last)
 		return CMD_RET_USAGE;
 
-	rcode = flash_sect_protect (p, addr_first, addr_last);
+	rcode = flash_sect_protect(p, addr_first, addr_last);
 #endif /* CONFIG_MTD_NOR_FLASH */
 	return rcode;
 }
 
 #ifdef CONFIG_MTD_NOR_FLASH
-int flash_sect_protect (int p, ulong addr_first, ulong addr_last)
+int flash_sect_protect(int p, ulong addr_first, ulong addr_last)
 {
 	flash_info_t *info;
 	ulong bank;
diff --git a/common/flash.c b/common/flash.c
index 5f155aefd1..9601716c3a 100644
--- a/common/flash.c
+++ b/common/flash.c
@@ -24,7 +24,7 @@ extern flash_info_t  flash_info[]; /* info for FLASH chips */
  * If necessary you have to map the second bank at lower addresses.
  */
 void
-flash_protect (int flag, ulong from, ulong to, flash_info_t *info)
+flash_protect(int flag, ulong from, ulong to, flash_info_t *info)
 {
 	ulong b_end;
 	short s_end;
@@ -84,7 +84,7 @@ flash_protect (int flag, ulong from, ulong to, flash_info_t *info)
  */
 
 flash_info_t *
-addr2info (ulong addr)
+addr2info(ulong addr)
 {
 	flash_info_t *info;
 	int i;
@@ -119,12 +119,12 @@ addr2info (ulong addr)
  *			(only some targets require alignment)
  */
 int
-flash_write (char *src, ulong addr, ulong cnt)
+flash_write(char *src, ulong addr, ulong cnt)
 {
 	int i;
 	ulong         end        = addr + cnt - 1;
-	flash_info_t *info_first = addr2info (addr);
-	flash_info_t *info_last  = addr2info (end );
+	flash_info_t *info_first = addr2info(addr);
+	flash_info_t *info_last  = addr2info(end);
 	flash_info_t *info;
 	__maybe_unused char *src_orig = src;
 	__maybe_unused char *addr_orig = (char *)addr;
diff --git a/include/flash.h b/include/flash.h
index 2655c72087..3bf6b22399 100644
--- a/include/flash.h
+++ b/include/flash.h
@@ -84,20 +84,20 @@ typedef unsigned long flash_sect_t;
 
 /* Prototypes */
 
-extern unsigned long flash_init (void);
-extern void flash_print_info (flash_info_t *);
-extern int flash_erase	(flash_info_t *, int, int);
-extern int flash_sect_erase (ulong addr_first, ulong addr_last);
-extern int flash_sect_protect (int flag, ulong addr_first, ulong addr_last);
-extern int flash_sect_roundb (ulong *addr);
-extern unsigned long flash_sector_size(flash_info_t *info, flash_sect_t sect);
-extern void flash_set_verbose(uint);
+unsigned long flash_init(void);
+void flash_print_info(flash_info_t *info);
+int flash_erase(flash_info_t *info, int s_first, int s_last);
+int flash_sect_erase(ulong addr_first, ulong addr_last);
+int flash_sect_protect(int flag, ulong addr_first, ulong addr_last);
+int flash_sect_roundb(ulong *addr);
+unsigned long flash_sector_size(flash_info_t *info, flash_sect_t sect);
+void flash_set_verbose(uint v);
 
 /* common/flash.c */
-extern void flash_protect (int flag, ulong from, ulong to, flash_info_t *info);
-extern int flash_write (char *, ulong, ulong);
-extern flash_info_t *addr2info (ulong);
-extern int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt);
+void flash_protect(int flag, ulong from, ulong to, flash_info_t *info);
+int flash_write(char *src, ulong addr, ulong cnt);
+flash_info_t *addr2info(ulong addr);
+int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt);
 
 /* drivers/mtd/cfi_mtd.c */
 #ifdef CONFIG_FLASH_CFI_MTD
-- 
2.26.2.645.ge9eca65c58-goog

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH v3 03/22] common: Drop flash.h from common header
  2020-05-10 17:39 [PATCH v3 00/22] common: Further reduce the size of common.h Simon Glass
  2020-05-10 17:39 ` [PATCH v3 01/22] common: Drop uuid.h from common header Simon Glass
  2020-05-10 17:39 ` [PATCH v3 02/22] flash: Tidy up coding style for flash functions Simon Glass
@ 2020-05-10 17:39 ` Simon Glass
  2020-05-19 17:32   ` Tom Rini
  2020-05-10 17:39 ` [PATCH v3 04/22] arm: Don't include common.h in header files Simon Glass
                   ` (19 subsequent siblings)
  22 siblings, 1 reply; 53+ messages in thread
From: Simon Glass @ 2020-05-10 17:39 UTC (permalink / raw)
  To: u-boot

Move this uncommon header out of the common header.

Fix up some style problems in flash.h while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v3: None
Changes in v2: None

 arch/arm/mach-at91/arm926ejs/eflash.c      | 1 +
 board/AndesTech/adp-ae3xx/adp-ae3xx.c      | 1 +
 board/AndesTech/adp-ag101p/adp-ag101p.c    | 1 +
 board/AndesTech/ax25-ae350/ax25-ae350.c    | 1 +
 board/Arcturus/ucp1020/cmd_arc.c           | 1 +
 board/atmel/at91sam9263ek/at91sam9263ek.c  | 1 +
 board/buffalo/lsxl/lsxl.c                  | 1 +
 board/cobra5272/flash.c                    | 2 ++
 board/freescale/common/fsl_validate.c      | 1 +
 board/freescale/m5253demo/flash.c          | 1 +
 board/freescale/mpc8568mds/bcsr.c          | 1 +
 board/freescale/mpc8568mds/mpc8568mds.c    | 1 +
 board/freescale/mpc8569mds/bcsr.c          | 1 +
 board/freescale/mpc8569mds/mpc8569mds.c    | 1 +
 board/gardena/smart-gateway-mt7688/board.c | 1 +
 board/gdsys/mpc8308/hrcon.c                | 1 +
 board/gdsys/mpc8308/strider.c              | 1 +
 board/renesas/sh7752evb/sh7752evb.c        | 1 +
 board/renesas/sh7753evb/sh7753evb.c        | 1 +
 board/renesas/sh7757lcr/sh7757lcr.c        | 1 +
 board/siemens/taurus/taurus.c              | 1 +
 board/socrates/socrates.c                  | 1 +
 board/spear/x600/x600.c                    | 1 +
 cmd/armflash.c                             | 1 +
 cmd/cros_ec.c                              | 1 +
 cmd/flash.c                                | 1 +
 cmd/jffs2.c                                | 1 +
 cmd/mvebu/bubt.c                           | 1 +
 cmd/sf.c                                   | 1 +
 common/board_r.c                           | 1 +
 common/flash.c                             | 1 +
 drivers/dfu/dfu_sf.c                       | 1 +
 drivers/fastboot/fb_command.c              | 1 +
 drivers/fastboot/fb_mmc.c                  | 1 +
 drivers/fastboot/fb_nand.c                 | 1 +
 drivers/misc/cros_ec.c                     | 1 +
 drivers/mtd/cfi_flash.c                    | 1 +
 drivers/mtd/jedec_flash.c                  | 1 +
 drivers/mtd/spi/sf_dataflash.c             | 1 +
 drivers/mtd/spi/sf_mtd.c                   | 1 +
 drivers/mtd/stm32_flash.c                  | 1 +
 env/sf.c                                   | 2 ++
 fs/cramfs/cramfs.c                         | 1 +
 fs/jffs2/jffs2_1pass.c                     | 1 +
 include/common.h                           | 1 -
 45 files changed, 46 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-at91/arm926ejs/eflash.c b/arch/arm/mach-at91/arm926ejs/eflash.c
index cfd6490d9d..c875bfd89b 100644
--- a/arch/arm/mach-at91/arm926ejs/eflash.c
+++ b/arch/arm/mach-at91/arm926ejs/eflash.c
@@ -43,6 +43,7 @@
  * do a read-modify-write for partially programmed pages
  */
 #include <common.h>
+#include <flash.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/at91_common.h>
diff --git a/board/AndesTech/adp-ae3xx/adp-ae3xx.c b/board/AndesTech/adp-ae3xx/adp-ae3xx.c
index a04415deca..8eb40bf295 100644
--- a/board/AndesTech/adp-ae3xx/adp-ae3xx.c
+++ b/board/AndesTech/adp-ae3xx/adp-ae3xx.c
@@ -8,6 +8,7 @@
 #include <init.h>
 #include <asm/mach-types.h>
 #include <common.h>
+#include <flash.h>
 #if defined(CONFIG_FTMAC100) && !defined(CONFIG_DM_ETH)
 #include <netdev.h>
 #endif
diff --git a/board/AndesTech/adp-ag101p/adp-ag101p.c b/board/AndesTech/adp-ag101p/adp-ag101p.c
index faf39b4ba6..d349b19648 100644
--- a/board/AndesTech/adp-ag101p/adp-ag101p.c
+++ b/board/AndesTech/adp-ag101p/adp-ag101p.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <flash.h>
 #include <init.h>
 #if defined(CONFIG_FTMAC100) && !defined(CONFIG_DM_ETH)
 #include <netdev.h>
diff --git a/board/AndesTech/ax25-ae350/ax25-ae350.c b/board/AndesTech/ax25-ae350/ax25-ae350.c
index f164073000..de546dab17 100644
--- a/board/AndesTech/ax25-ae350/ax25-ae350.c
+++ b/board/AndesTech/ax25-ae350/ax25-ae350.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <flash.h>
 #include <init.h>
 #if defined(CONFIG_FTMAC100) && !defined(CONFIG_DM_ETH)
 #include <netdev.h>
diff --git a/board/Arcturus/ucp1020/cmd_arc.c b/board/Arcturus/ucp1020/cmd_arc.c
index b50de63c5e..2b4853f8f9 100644
--- a/board/Arcturus/ucp1020/cmd_arc.c
+++ b/board/Arcturus/ucp1020/cmd_arc.c
@@ -12,6 +12,7 @@
 #include <cpu_func.h>
 #include <div64.h>
 #include <env.h>
+#include <flash.h>
 #include <malloc.h>
 #include <spi_flash.h>
 #include <mmc.h>
diff --git a/board/atmel/at91sam9263ek/at91sam9263ek.c b/board/atmel/at91sam9263ek/at91sam9263ek.c
index b811d931c4..be132bc185 100644
--- a/board/atmel/at91sam9263ek/at91sam9263ek.c
+++ b/board/atmel/at91sam9263ek/at91sam9263ek.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <debug_uart.h>
+#include <flash.h>
 #include <init.h>
 #include <net.h>
 #include <vsprintf.h>
diff --git a/board/buffalo/lsxl/lsxl.c b/board/buffalo/lsxl/lsxl.c
index 95d3a5e1f5..aa641259ac 100644
--- a/board/buffalo/lsxl/lsxl.c
+++ b/board/buffalo/lsxl/lsxl.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <env.h>
 #include <env_internal.h>
+#include <flash.h>
 #include <net.h>
 #include <malloc.h>
 #include <netdev.h>
diff --git a/board/cobra5272/flash.c b/board/cobra5272/flash.c
index e601ed8e72..5860cd0ac0 100644
--- a/board/cobra5272/flash.c
+++ b/board/cobra5272/flash.c
@@ -7,7 +7,9 @@
 #include <common.h>
 #include <console.h>
 #include <cpu_func.h>
+#include <flash.h>
 #include <irq_func.h>
+#include <uuid.h>
 
 #define PHYS_FLASH_1 CONFIG_SYS_FLASH_BASE
 #define FLASH_BANK_SIZE 0x200000
diff --git a/board/freescale/common/fsl_validate.c b/board/freescale/common/fsl_validate.c
index 2bf9d58746..6aa412a937 100644
--- a/board/freescale/common/fsl_validate.c
+++ b/board/freescale/common/fsl_validate.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <flash.h>
 #include <fsl_validate.h>
 #include <fsl_secboot_err.h>
 #include <fsl_sfp.h>
diff --git a/board/freescale/m5253demo/flash.c b/board/freescale/m5253demo/flash.c
index a5223ecee6..87368564af 100644
--- a/board/freescale/m5253demo/flash.c
+++ b/board/freescale/m5253demo/flash.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <flash.h>
 #include <irq_func.h>
 
 #include <asm/immap.h>
diff --git a/board/freescale/mpc8568mds/bcsr.c b/board/freescale/mpc8568mds/bcsr.c
index 28e2a9435c..b1e638af5a 100644
--- a/board/freescale/mpc8568mds/bcsr.c
+++ b/board/freescale/mpc8568mds/bcsr.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <flash.h>
 #include <asm/io.h>
 
 #include "bcsr.h"
diff --git a/board/freescale/mpc8568mds/mpc8568mds.c b/board/freescale/mpc8568mds/mpc8568mds.c
index 5167f81be7..da97495664 100644
--- a/board/freescale/mpc8568mds/mpc8568mds.c
+++ b/board/freescale/mpc8568mds/mpc8568mds.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <flash.h>
 #include <init.h>
 #include <pci.h>
 #include <asm/processor.h>
diff --git a/board/freescale/mpc8569mds/bcsr.c b/board/freescale/mpc8569mds/bcsr.c
index 57cea0af68..9ed00f6e5b 100644
--- a/board/freescale/mpc8569mds/bcsr.c
+++ b/board/freescale/mpc8569mds/bcsr.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <flash.h>
 #include <asm/io.h>
 
 #include "bcsr.h"
diff --git a/board/freescale/mpc8569mds/mpc8569mds.c b/board/freescale/mpc8569mds/mpc8569mds.c
index cf5d8a5244..18e0d87a48 100644
--- a/board/freescale/mpc8569mds/mpc8569mds.c
+++ b/board/freescale/mpc8569mds/mpc8569mds.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <console.h>
+#include <flash.h>
 #include <hwconfig.h>
 #include <init.h>
 #include <pci.h>
diff --git a/board/gardena/smart-gateway-mt7688/board.c b/board/gardena/smart-gateway-mt7688/board.c
index 776afa43a6..89844ee69e 100644
--- a/board/gardena/smart-gateway-mt7688/board.c
+++ b/board/gardena/smart-gateway-mt7688/board.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <env.h>
 #include <env_internal.h>
+#include <flash.h>
 #include <init.h>
 #include <led.h>
 #include <malloc.h>
diff --git a/board/gdsys/mpc8308/hrcon.c b/board/gdsys/mpc8308/hrcon.c
index d1110157a2..8994c8c71b 100644
--- a/board/gdsys/mpc8308/hrcon.c
+++ b/board/gdsys/mpc8308/hrcon.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <flash.h>
 #include <hwconfig.h>
 #include <i2c.h>
 #include <init.h>
diff --git a/board/gdsys/mpc8308/strider.c b/board/gdsys/mpc8308/strider.c
index 9ba9e4278a..a12e08685b 100644
--- a/board/gdsys/mpc8308/strider.c
+++ b/board/gdsys/mpc8308/strider.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <flash.h>
 #include <hwconfig.h>
 #include <i2c.h>
 #include <init.h>
diff --git a/board/renesas/sh7752evb/sh7752evb.c b/board/renesas/sh7752evb/sh7752evb.c
index 203eecf3d6..135aaa5234 100644
--- a/board/renesas/sh7752evb/sh7752evb.c
+++ b/board/renesas/sh7752evb/sh7752evb.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <flash.h>
 #include <init.h>
 #include <malloc.h>
 #include <asm/processor.h>
diff --git a/board/renesas/sh7753evb/sh7753evb.c b/board/renesas/sh7753evb/sh7753evb.c
index 0b118b2f65..fbfc49ee01 100644
--- a/board/renesas/sh7753evb/sh7753evb.c
+++ b/board/renesas/sh7753evb/sh7753evb.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <flash.h>
 #include <init.h>
 #include <malloc.h>
 #include <asm/processor.h>
diff --git a/board/renesas/sh7757lcr/sh7757lcr.c b/board/renesas/sh7757lcr/sh7757lcr.c
index e8d1fdd03f..ed041b14ee 100644
--- a/board/renesas/sh7757lcr/sh7757lcr.c
+++ b/board/renesas/sh7757lcr/sh7757lcr.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <flash.h>
 #include <init.h>
 #include <malloc.h>
 #include <asm/processor.h>
diff --git a/board/siemens/taurus/taurus.c b/board/siemens/taurus/taurus.c
index 0979df563a..9f9cdfa234 100644
--- a/board/siemens/taurus/taurus.c
+++ b/board/siemens/taurus/taurus.c
@@ -15,6 +15,7 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
+#include <flash.h>
 #include <init.h>
 #include <asm/io.h>
 #include <asm/arch/at91sam9260_matrix.h>
diff --git a/board/socrates/socrates.c b/board/socrates/socrates.c
index bd214acc80..84644a85c7 100644
--- a/board/socrates/socrates.c
+++ b/board/socrates/socrates.c
@@ -14,6 +14,7 @@
 #include <clock_legacy.h>
 #include <env.h>
 #include <pci.h>
+#include <uuid.h>
 #include <asm/processor.h>
 #include <asm/immap_85xx.h>
 #include <ioports.h>
diff --git a/board/spear/x600/x600.c b/board/spear/x600/x600.c
index e1232edd14..7cff6eecf2 100644
--- a/board/spear/x600/x600.c
+++ b/board/spear/x600/x600.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <flash.h>
 #include <init.h>
 #include <micrel.h>
 #include <nand.h>
diff --git a/cmd/armflash.c b/cmd/armflash.c
index 6872b0dde3..f82f3dd1a3 100644
--- a/cmd/armflash.c
+++ b/cmd/armflash.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <command.h>
 #include <console.h>
+#include <flash.h>
 #include <asm/io.h>
 
 #define MAX_REGIONS 4
diff --git a/cmd/cros_ec.c b/cmd/cros_ec.c
index 9e2f1b06f3..c6bbed9c4a 100644
--- a/cmd/cros_ec.c
+++ b/cmd/cros_ec.c
@@ -10,6 +10,7 @@
 #include <command.h>
 #include <cros_ec.h>
 #include <dm.h>
+#include <flash.h>
 #include <dm/device-internal.h>
 #include <dm/uclass-internal.h>
 
diff --git a/cmd/flash.c b/cmd/flash.c
index 230d8408a4..df97fe740d 100644
--- a/cmd/flash.c
+++ b/cmd/flash.c
@@ -9,6 +9,7 @@
  */
 #include <common.h>
 #include <command.h>
+#include <uuid.h>
 
 #if defined(CONFIG_CMD_MTDPARTS)
 #include <jffs2/jffs2.h>
diff --git a/cmd/jffs2.c b/cmd/jffs2.c
index da2580d85d..748a73e2af 100644
--- a/cmd/jffs2.c
+++ b/cmd/jffs2.c
@@ -73,6 +73,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <flash.h>
 #include <image.h>
 #include <malloc.h>
 #include <jffs2/jffs2.h>
diff --git a/cmd/mvebu/bubt.c b/cmd/mvebu/bubt.c
index ef53153c46..f0ee54d6d2 100644
--- a/cmd/mvebu/bubt.c
+++ b/cmd/mvebu/bubt.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <flash.h>
 #include <image.h>
 #include <vsprintf.h>
 #include <errno.h>
diff --git a/cmd/sf.c b/cmd/sf.c
index e993b3e5ad..2b9c268ac4 100644
--- a/cmd/sf.c
+++ b/cmd/sf.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <div64.h>
 #include <dm.h>
+#include <flash.h>
 #include <malloc.h>
 #include <mapmem.h>
 #include <spi.h>
diff --git a/common/board_r.c b/common/board_r.c
index d9015cd057..138d65b13b 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -13,6 +13,7 @@
 #include <api.h>
 #include <cpu_func.h>
 #include <exports.h>
+#include <flash.h>
 #include <hang.h>
 #include <image.h>
 #include <irq_func.h>
diff --git a/common/flash.c b/common/flash.c
index 9601716c3a..4a28ac5d34 100644
--- a/common/flash.c
+++ b/common/flash.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <flash.h>
+#include <uuid.h>
 
 #include <mtd/cfi_flash.h>
 
diff --git a/drivers/dfu/dfu_sf.c b/drivers/dfu/dfu_sf.c
index 0fdbfae434..318e43c179 100644
--- a/drivers/dfu/dfu_sf.c
+++ b/drivers/dfu/dfu_sf.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <flash.h>
 #include <malloc.h>
 #include <errno.h>
 #include <div64.h>
diff --git a/drivers/fastboot/fb_command.c b/drivers/fastboot/fb_command.c
index 3c4acfecf6..49f6a61c37 100644
--- a/drivers/fastboot/fb_command.c
+++ b/drivers/fastboot/fb_command.c
@@ -10,6 +10,7 @@
 #include <fastboot-internal.h>
 #include <fb_mmc.h>
 #include <fb_nand.h>
+#include <flash.h>
 #include <part.h>
 #include <stdlib.h>
 
diff --git a/drivers/fastboot/fb_mmc.c b/drivers/fastboot/fb_mmc.c
index d7cf9f4aac..d3249a54f7 100644
--- a/drivers/fastboot/fb_mmc.c
+++ b/drivers/fastboot/fb_mmc.c
@@ -10,6 +10,7 @@
 #include <fastboot.h>
 #include <fastboot-internal.h>
 #include <fb_mmc.h>
+#include <flash.h>
 #include <image-sparse.h>
 #include <part.h>
 #include <mmc.h>
diff --git a/drivers/fastboot/fb_nand.c b/drivers/fastboot/fb_nand.c
index 6756ea769f..b165468145 100644
--- a/drivers/fastboot/fb_nand.c
+++ b/drivers/fastboot/fb_nand.c
@@ -6,6 +6,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <flash.h>
 
 #include <fastboot.h>
 #include <image-sparse.h>
diff --git a/drivers/misc/cros_ec.c b/drivers/misc/cros_ec.c
index fa9984f6bd..c145b67931 100644
--- a/drivers/misc/cros_ec.c
+++ b/drivers/misc/cros_ec.c
@@ -18,6 +18,7 @@
 #include <common.h>
 #include <command.h>
 #include <dm.h>
+#include <flash.h>
 #include <i2c.h>
 #include <cros_ec.h>
 #include <fdtdec.h>
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index 4ce183b6f3..036cf0b4a1 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -22,6 +22,7 @@
 #include <env.h>
 #include <errno.h>
 #include <fdt_support.h>
+#include <flash.h>
 #include <irq_func.h>
 #include <asm/processor.h>
 #include <asm/io.h>
diff --git a/drivers/mtd/jedec_flash.c b/drivers/mtd/jedec_flash.c
index f59b2bc62f..ce921b461a 100644
--- a/drivers/mtd/jedec_flash.c
+++ b/drivers/mtd/jedec_flash.c
@@ -12,6 +12,7 @@
 /*#define DEBUG*/
 
 #include <common.h>
+#include <flash.h>
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <asm/byteorder.h>
diff --git a/drivers/mtd/spi/sf_dataflash.c b/drivers/mtd/spi/sf_dataflash.c
index 55fb4bd31a..b1a38048d3 100644
--- a/drivers/mtd/spi/sf_dataflash.c
+++ b/drivers/mtd/spi/sf_dataflash.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <flash.h>
 #include <spi.h>
 #include <spi_flash.h>
 #include <div64.h>
diff --git a/drivers/mtd/spi/sf_mtd.c b/drivers/mtd/spi/sf_mtd.c
index 68c36002be..987fac2501 100644
--- a/drivers/mtd/spi/sf_mtd.c
+++ b/drivers/mtd/spi/sf_mtd.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <flash.h>
 #include <malloc.h>
 #include <linux/errno.h>
 #include <linux/mtd/mtd.h>
diff --git a/drivers/mtd/stm32_flash.c b/drivers/mtd/stm32_flash.c
index fd0d5506e8..95afa2d6bc 100644
--- a/drivers/mtd/stm32_flash.c
+++ b/drivers/mtd/stm32_flash.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <flash.h>
 #include <asm/io.h>
 #include <asm/arch/stm32.h>
 #include "stm32_flash.h"
diff --git a/env/sf.c b/env/sf.c
index 64c57f2cdf..64fafdc7cf 100644
--- a/env/sf.c
+++ b/env/sf.c
@@ -12,11 +12,13 @@
 #include <dm.h>
 #include <env.h>
 #include <env_internal.h>
+#include <flash.h>
 #include <malloc.h>
 #include <spi.h>
 #include <spi_flash.h>
 #include <search.h>
 #include <errno.h>
+#include <uuid.h>
 #include <dm/device-internal.h>
 #include <u-boot/crc.h>
 
diff --git a/fs/cramfs/cramfs.c b/fs/cramfs/cramfs.c
index 228f599d44..7ef48bbc06 100644
--- a/fs/cramfs/cramfs.c
+++ b/fs/cramfs/cramfs.c
@@ -25,6 +25,7 @@
  */
 
 #include <common.h>
+#include <flash.h>
 #include <malloc.h>
 #include <asm/byteorder.h>
 #include <linux/stat.h>
diff --git a/fs/jffs2/jffs2_1pass.c b/fs/jffs2/jffs2_1pass.c
index 5912cde838..f58ec0e9a0 100644
--- a/fs/jffs2/jffs2_1pass.c
+++ b/fs/jffs2/jffs2_1pass.c
@@ -113,6 +113,7 @@
 
 #include <common.h>
 #include <config.h>
+#include <flash.h>
 #include <malloc.h>
 #include <div64.h>
 #include <linux/compiler.h>
diff --git a/include/common.h b/include/common.h
index a8242cafc5..1705d85e8a 100644
--- a/include/common.h
+++ b/include/common.h
@@ -29,7 +29,6 @@
 #include <stdio.h>
 #include <linux/kernel.h>
 #include <part.h>
-#include <flash.h>
 #include <image.h>
 #include <log.h>
 #include <asm/u-boot.h> /* boot information for Linux kernel */
-- 
2.26.2.645.ge9eca65c58-goog

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH v3 04/22] arm: Don't include common.h in header files
  2020-05-10 17:39 [PATCH v3 00/22] common: Further reduce the size of common.h Simon Glass
                   ` (2 preceding siblings ...)
  2020-05-10 17:39 ` [PATCH v3 03/22] common: Drop flash.h from common header Simon Glass
@ 2020-05-10 17:39 ` Simon Glass
  2020-05-19 17:32   ` Tom Rini
  2020-05-10 17:39 ` [PATCH v3 05/22] common: Drop net.h from common header Simon Glass
                   ` (18 subsequent siblings)
  22 siblings, 1 reply; 53+ messages in thread
From: Simon Glass @ 2020-05-10 17:39 UTC (permalink / raw)
  To: u-boot

It is bad practice to include common.h in other header files since it can
bring in any number of superfluous definitions. It implies that some C
files don't include it and thus may be missing CONFIG options that are set
up by that file. The C files should include these themselves.

Update some header files in arch/arm to drop this.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v3: None
Changes in v2: None

 arch/arm/cpu/armv8/fwcall.c                        |  1 +
 arch/arm/include/asm/arch-am33xx/clk_synthesizer.h |  2 --
 arch/arm/include/asm/arch-am33xx/mux.h             |  1 -
 arch/arm/include/asm/arch-am33xx/mux_am33xx.h      |  1 -
 arch/arm/include/asm/arch-am33xx/mux_am43xx.h      |  1 -
 arch/arm/include/asm/arch-am33xx/mux_ti816x.h      |  1 -
 arch/arm/include/asm/arch-fsl-layerscape/clock.h   |  2 --
 arch/arm/include/asm/arch-lpc32xx/dma.h            |  2 --
 arch/arm/include/asm/arch-lpc32xx/i2c.h            |  1 -
 arch/arm/include/asm/arch-ls102xa/clock.h          |  2 --
 arch/arm/include/asm/arch-mx25/clock.h             |  2 --
 arch/arm/include/asm/arch-mx31/clock.h             |  2 --
 arch/arm/include/asm/arch-mx35/clock.h             |  2 --
 arch/arm/include/asm/arch-mx5/clock.h              |  2 --
 arch/arm/include/asm/arch-mx6/clock.h              |  7 +++++--
 arch/arm/include/asm/arch-mx7/clock.h              |  1 -
 arch/arm/include/asm/arch-mx7ulp/clock.h           |  1 -
 arch/arm/include/asm/arch-mx7ulp/pcc.h             |  1 -
 arch/arm/include/asm/arch-mx7ulp/scg.h             |  2 --
 arch/arm/include/asm/arch-omap4/clock.h            |  1 -
 arch/arm/include/asm/arch-omap5/clock.h            |  1 -
 arch/arm/include/asm/arch-omap5/dra7xx_iodelay.h   |  1 -
 arch/arm/include/asm/arch-rk3308/cru_rk3308.h      |  2 --
 arch/arm/include/asm/arch-rk3308/grf_rk3308.h      |  2 --
 arch/arm/include/asm/arch-rockchip/cru_px30.h      |  2 --
 arch/arm/include/asm/arch-rockchip/cru_rk3036.h    |  2 --
 arch/arm/include/asm/arch-rockchip/cru_rk3128.h    |  2 --
 arch/arm/include/asm/arch-rockchip/cru_rk322x.h    |  2 --
 arch/arm/include/asm/arch-rockchip/cru_rk3328.h    |  2 --
 arch/arm/include/asm/arch-rockchip/cru_rk3368.h    |  3 ---
 arch/arm/include/asm/arch-rockchip/cru_rk3399.h    |  2 --
 arch/arm/include/asm/arch-rockchip/cru_rv1108.h    |  2 --
 arch/arm/include/asm/arch-rockchip/grf_px30.h      |  2 --
 arch/arm/include/asm/arch-rockchip/grf_rk3036.h    |  2 --
 arch/arm/include/asm/arch-rockchip/grf_rk3128.h    |  2 --
 arch/arm/include/asm/arch-rockchip/grf_rk322x.h    |  2 --
 arch/arm/include/asm/arch-rockchip/grf_rk3368.h    |  2 --
 arch/arm/include/asm/arch-rockchip/grf_rv1108.h    |  2 --
 arch/arm/include/asm/arch-rockchip/sdram_rk3036.h  |  2 --
 arch/arm/include/asm/arch-rockchip/sdram_rk322x.h  |  2 --
 arch/arm/include/asm/arch-s32v234/clock.h          |  2 --
 arch/arm/include/asm/arch-sunxi/rsb.h              |  1 -
 arch/arm/include/asm/arch-tegra/ivc.h              |  2 --
 arch/arm/include/asm/arch-tegra/tegra_mmc.h        |  1 -
 arch/arm/include/asm/arch-vf610/clock.h            |  2 --
 arch/arm/include/asm/dma-mapping.h                 |  2 +-
 arch/arm/include/asm/emif.h                        |  1 -
 arch/arm/include/asm/mach-imx/iomux-v3.h           |  2 +-
 arch/arm/include/asm/mach-imx/sys_proto.h          |  6 ++++--
 arch/arm/include/asm/omap_common.h                 | 10 ++++++----
 arch/arm/include/asm/omap_sec_common.h             |  2 --
 arch/arm/include/asm/psci.h                        |  4 ++++
 arch/arm/include/asm/system.h                      |  3 ++-
 arch/arm/mach-imx/ddrmc-vf610.c                    |  1 +
 arch/arm/mach-imx/mx7ulp/soc.c                     |  2 ++
 arch/arm/mach-imx/sata.c                           |  1 +
 arch/arm/mach-omap2/am33xx/ddr.c                   |  1 +
 arch/arm/mach-omap2/omap4/sdram_elpida.c           |  1 +
 arch/arm/mach-omap2/omap5/sdram.c                  |  1 +
 arch/arm/mach-rockchip/rk3036/rk3036.c             |  2 ++
 board/compulab/cm_t54/mux.c                        |  1 +
 board/el/el6x/el6x.c                               |  1 +
 board/embest/mx6boards/mx6boards.c                 |  1 +
 board/gateworks/gw_ventana/common.c                |  1 +
 board/grinn/liteboard/board.c                      |  1 +
 board/overo/spl.c                                  |  2 ++
 board/sks-kinkel/sksimx6/sksimx6.c                 |  1 +
 board/solidrun/mx6cuboxi/mx6cuboxi.c               |  1 +
 board/technexion/pico-imx6/spl.c                   |  1 +
 board/technexion/pico-imx7d/spl.c                  |  1 +
 board/udoo/udoo_spl.c                              |  1 +
 board/wandboard/spl.c                              |  1 +
 board/wandboard/wandboard.c                        |  1 +
 drivers/mtd/nand/raw/denali.c                      |  2 ++
 drivers/mtd/nand/raw/denali_dt.c                   |  2 ++
 drivers/usb/eth/lan7x.h                            |  7 +++++++
 include/linux/compat.h                             |  1 +
 include/linux/mtd/rawnand.h                        |  1 +
 include/net.h                                      |  6 +++++-
 include/spl.h                                      |  2 ++
 80 files changed, 67 insertions(+), 89 deletions(-)

diff --git a/arch/arm/cpu/armv8/fwcall.c b/arch/arm/cpu/armv8/fwcall.c
index cbd35b7f4a..4bffec9560 100644
--- a/arch/arm/cpu/armv8/fwcall.c
+++ b/arch/arm/cpu/armv8/fwcall.c
@@ -10,6 +10,7 @@
 #include <version.h>
 #include <asm/macro.h>
 #include <asm/psci.h>
+#include <asm/ptrace.h>
 #include <asm/system.h>
 
 /*
diff --git a/arch/arm/include/asm/arch-am33xx/clk_synthesizer.h b/arch/arm/include/asm/arch-am33xx/clk_synthesizer.h
index 6579cc0c5d..7bcafba6f0 100644
--- a/arch/arm/include/asm/arch-am33xx/clk_synthesizer.h
+++ b/arch/arm/include/asm/arch-am33xx/clk_synthesizer.h
@@ -10,8 +10,6 @@
 #ifndef __CLK_SYNTHESIZER_H
 #define __CLK_SYNTHESIZER_H
 
-#include <common.h>
-
 #define CLK_SYNTHESIZER_ID_REG		0x0
 #define CLK_SYNTHESIZER_XCSEL		0x05
 #define CLK_SYNTHESIZER_MUX_REG		0x14
diff --git a/arch/arm/include/asm/arch-am33xx/mux.h b/arch/arm/include/asm/arch-am33xx/mux.h
index d8bf87258b..b16b184733 100644
--- a/arch/arm/include/asm/arch-am33xx/mux.h
+++ b/arch/arm/include/asm/arch-am33xx/mux.h
@@ -16,7 +16,6 @@
 #ifndef _MUX_H_
 #define _MUX_H_
 
-#include <common.h>
 #include <asm/io.h>
 
 #ifdef CONFIG_AM33XX
diff --git a/arch/arm/include/asm/arch-am33xx/mux_am33xx.h b/arch/arm/include/asm/arch-am33xx/mux_am33xx.h
index d5cab3e083..26bd4b46ff 100644
--- a/arch/arm/include/asm/arch-am33xx/mux_am33xx.h
+++ b/arch/arm/include/asm/arch-am33xx/mux_am33xx.h
@@ -16,7 +16,6 @@
 #ifndef _MUX_AM33XX_H_
 #define _MUX_AM33XX_H_
 
-#include <common.h>
 #include <asm/io.h>
 
 #define MUX_CFG(value, offset)	\
diff --git a/arch/arm/include/asm/arch-am33xx/mux_am43xx.h b/arch/arm/include/asm/arch-am33xx/mux_am43xx.h
index 256c5e243f..f74ae74ff1 100644
--- a/arch/arm/include/asm/arch-am33xx/mux_am43xx.h
+++ b/arch/arm/include/asm/arch-am33xx/mux_am43xx.h
@@ -8,7 +8,6 @@
 #ifndef _MUX_AM43XX_H_
 #define _MUX_AM43XX_H_
 
-#include <common.h>
 #include <asm/io.h>
 
 #define MUX_CFG(value, offset)	\
diff --git a/arch/arm/include/asm/arch-am33xx/mux_ti816x.h b/arch/arm/include/asm/arch-am33xx/mux_ti816x.h
index e4e5a48ad6..a6a8a988a0 100644
--- a/arch/arm/include/asm/arch-am33xx/mux_ti816x.h
+++ b/arch/arm/include/asm/arch-am33xx/mux_ti816x.h
@@ -17,7 +17,6 @@
 #ifndef _MUX_TI816X_H_
 #define _MUX_TI816X_H_
 
-#include <common.h>
 #include <asm/io.h>
 
 #define MUX_CFG(value, offset)  \
diff --git a/arch/arm/include/asm/arch-fsl-layerscape/clock.h b/arch/arm/include/asm/arch-fsl-layerscape/clock.h
index 95d6156476..d561691437 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/clock.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/clock.h
@@ -8,8 +8,6 @@
 #ifndef __ASM_ARCH_FSL_LAYERSCAPE_CLOCK_H_
 #define __ASM_ARCH_FSL_LAYERSCAPE_CLOCK_H_
 
-#include <common.h>
-
 enum mxc_clock {
 	MXC_ARM_CLK = 0,
 	MXC_BUS_CLK,
diff --git a/arch/arm/include/asm/arch-lpc32xx/dma.h b/arch/arm/include/asm/arch-lpc32xx/dma.h
index 8775491245..d69e3c4664 100644
--- a/arch/arm/include/asm/arch-lpc32xx/dma.h
+++ b/arch/arm/include/asm/arch-lpc32xx/dma.h
@@ -11,8 +11,6 @@
 #ifndef _LPC32XX_DMA_H
 #define _LPC32XX_DMA_H
 
-#include <common.h>
-
 /*
  * DMA linked list structure used with a channel's LLI register;
  * refer to UM10326, "LPC32x0 and LPC32x0/01 User manual" - Rev. 3
diff --git a/arch/arm/include/asm/arch-lpc32xx/i2c.h b/arch/arm/include/asm/arch-lpc32xx/i2c.h
index 5301d4c1b0..f39b14001b 100644
--- a/arch/arm/include/asm/arch-lpc32xx/i2c.h
+++ b/arch/arm/include/asm/arch-lpc32xx/i2c.h
@@ -1,7 +1,6 @@
 #ifndef _LPC32XX_I2C_H
 #define _LPC32XX_I2C_H
 
-#include <common.h>
 #include <asm/types.h>
 
 /* i2c register set */
diff --git a/arch/arm/include/asm/arch-ls102xa/clock.h b/arch/arm/include/asm/arch-ls102xa/clock.h
index e66e57f759..01978c08f5 100644
--- a/arch/arm/include/asm/arch-ls102xa/clock.h
+++ b/arch/arm/include/asm/arch-ls102xa/clock.h
@@ -7,8 +7,6 @@
 #ifndef __ASM_ARCH_LS102XA_CLOCK_H_
 #define __ASM_ARCH_LS102XA_CLOCK_H_
 
-#include <common.h>
-
 enum mxc_clock {
 	MXC_ARM_CLK = 0,
 	MXC_UART_CLK,
diff --git a/arch/arm/include/asm/arch-mx25/clock.h b/arch/arm/include/asm/arch-mx25/clock.h
index 7eec73163b..3045b78d08 100644
--- a/arch/arm/include/asm/arch-mx25/clock.h
+++ b/arch/arm/include/asm/arch-mx25/clock.h
@@ -9,8 +9,6 @@
 #ifndef __ASM_ARCH_CLOCK_H
 #define __ASM_ARCH_CLOCK_H
 
-#include <common.h>
-
 #ifdef CONFIG_MX25_HCLK_FREQ
 #define MXC_HCLK	CONFIG_MX25_HCLK_FREQ
 #else
diff --git a/arch/arm/include/asm/arch-mx31/clock.h b/arch/arm/include/asm/arch-mx31/clock.h
index aafc2d690e..e99e115f79 100644
--- a/arch/arm/include/asm/arch-mx31/clock.h
+++ b/arch/arm/include/asm/arch-mx31/clock.h
@@ -7,8 +7,6 @@
 #ifndef __ASM_ARCH_CLOCK_H
 #define __ASM_ARCH_CLOCK_H
 
-#include <common.h>
-
 #define MXC_HCLK	CONFIG_MX31_HCLK_FREQ
 
 #define MXC_CLK32	CONFIG_MX31_CLK32
diff --git a/arch/arm/include/asm/arch-mx35/clock.h b/arch/arm/include/asm/arch-mx35/clock.h
index 788534083c..cb0b53a69f 100644
--- a/arch/arm/include/asm/arch-mx35/clock.h
+++ b/arch/arm/include/asm/arch-mx35/clock.h
@@ -7,8 +7,6 @@
 #ifndef __ASM_ARCH_CLOCK_H
 #define __ASM_ARCH_CLOCK_H
 
-#include <common.h>
-
 #ifdef CONFIG_MX35_HCLK_FREQ
 #define MXC_HCLK	CONFIG_MX35_HCLK_FREQ
 #else
diff --git a/arch/arm/include/asm/arch-mx5/clock.h b/arch/arm/include/asm/arch-mx5/clock.h
index 6f5ca5888a..63a51042e1 100644
--- a/arch/arm/include/asm/arch-mx5/clock.h
+++ b/arch/arm/include/asm/arch-mx5/clock.h
@@ -7,8 +7,6 @@
 #ifndef __ASM_ARCH_CLOCK_H
 #define __ASM_ARCH_CLOCK_H
 
-#include <common.h>
-
 #ifdef CONFIG_SYS_MX5_HCLK
 #define MXC_HCLK	CONFIG_SYS_MX5_HCLK
 #else
diff --git a/arch/arm/include/asm/arch-mx6/clock.h b/arch/arm/include/asm/arch-mx6/clock.h
index f7760541a4..769917679e 100644
--- a/arch/arm/include/asm/arch-mx6/clock.h
+++ b/arch/arm/include/asm/arch-mx6/clock.h
@@ -7,7 +7,7 @@
 #ifndef __ASM_ARCH_CLOCK_H
 #define __ASM_ARCH_CLOCK_H
 
-#include <common.h>
+#include <linux/types.h>
 
 #ifdef CONFIG_SYS_MX6_HCLK
 #define MXC_HCLK	CONFIG_SYS_MX6_HCLK
@@ -21,6 +21,8 @@
 #define MXC_CLK32	32768
 #endif
 
+struct cmd_tbl_s;
+
 enum mxc_clock {
 	MXC_ARM_CLK = 0,
 	MXC_PER_CLK,
@@ -80,5 +82,6 @@ void enable_thermal_clk(void);
 void mxs_set_lcdclk(u32 base_addr, u32 freq);
 void select_ldb_di_clock_source(enum ldb_di_clock clk);
 void enable_eim_clk(unsigned char enable);
-int do_mx6_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+int do_mx6_showclocks(struct cmd_tbl_s *cmdtp, int flag, int argc,
+		      char *const argv[]);
 #endif /* __ASM_ARCH_CLOCK_H */
diff --git a/arch/arm/include/asm/arch-mx7/clock.h b/arch/arm/include/asm/arch-mx7/clock.h
index 984bd3f141..48c7c3367a 100644
--- a/arch/arm/include/asm/arch-mx7/clock.h
+++ b/arch/arm/include/asm/arch-mx7/clock.h
@@ -9,7 +9,6 @@
 #ifndef _ASM_ARCH_CLOCK_H
 #define _ASM_ARCH_CLOCK_H
 
-#include <common.h>
 #include <asm/arch/crm_regs.h>
 
 #ifdef CONFIG_SYS_MX7_HCLK
diff --git a/arch/arm/include/asm/arch-mx7ulp/clock.h b/arch/arm/include/asm/arch-mx7ulp/clock.h
index eb02a20fdc..92d4463dff 100644
--- a/arch/arm/include/asm/arch-mx7ulp/clock.h
+++ b/arch/arm/include/asm/arch-mx7ulp/clock.h
@@ -6,7 +6,6 @@
 #ifndef _ASM_ARCH_CLOCK_H
 #define _ASM_ARCH_CLOCK_H
 
-#include <common.h>
 #include <asm/arch/pcc.h>
 #include <asm/arch/scg.h>
 
diff --git a/arch/arm/include/asm/arch-mx7ulp/pcc.h b/arch/arm/include/asm/arch-mx7ulp/pcc.h
index dee3cfcdc0..8f0d700628 100644
--- a/arch/arm/include/asm/arch-mx7ulp/pcc.h
+++ b/arch/arm/include/asm/arch-mx7ulp/pcc.h
@@ -6,7 +6,6 @@
 #ifndef _ASM_ARCH_PCC_H
 #define _ASM_ARCH_PCC_H
 
-#include <common.h>
 #include <asm/arch/scg.h>
 
 /* PCC2 */
diff --git a/arch/arm/include/asm/arch-mx7ulp/scg.h b/arch/arm/include/asm/arch-mx7ulp/scg.h
index b79bde338f..3b5b7f6803 100644
--- a/arch/arm/include/asm/arch-mx7ulp/scg.h
+++ b/arch/arm/include/asm/arch-mx7ulp/scg.h
@@ -6,8 +6,6 @@
 #ifndef _ASM_ARCH_SCG_H
 #define _ASM_ARCH_SCG_H
 
-#include <common.h>
-
 #ifdef CONFIG_CLK_DEBUG
 #define clk_debug(fmt, args...)	printf(fmt, ##args)
 #else
diff --git a/arch/arm/include/asm/arch-omap4/clock.h b/arch/arm/include/asm/arch-omap4/clock.h
index 037045ca31..0a626fe647 100644
--- a/arch/arm/include/asm/arch-omap4/clock.h
+++ b/arch/arm/include/asm/arch-omap4/clock.h
@@ -7,7 +7,6 @@
  */
 #ifndef _CLOCKS_OMAP4_H_
 #define _CLOCKS_OMAP4_H_
-#include <common.h>
 #include <asm/omap_common.h>
 
 /*
diff --git a/arch/arm/include/asm/arch-omap5/clock.h b/arch/arm/include/asm/arch-omap5/clock.h
index e261bd43f2..87eb3f335a 100644
--- a/arch/arm/include/asm/arch-omap5/clock.h
+++ b/arch/arm/include/asm/arch-omap5/clock.h
@@ -8,7 +8,6 @@
  */
 #ifndef _CLOCKS_OMAP5_H_
 #define _CLOCKS_OMAP5_H_
-#include <common.h>
 #include <asm/omap_common.h>
 
 /*
diff --git a/arch/arm/include/asm/arch-omap5/dra7xx_iodelay.h b/arch/arm/include/asm/arch-omap5/dra7xx_iodelay.h
index 09edfadc32..ea2f113f98 100644
--- a/arch/arm/include/asm/arch-omap5/dra7xx_iodelay.h
+++ b/arch/arm/include/asm/arch-omap5/dra7xx_iodelay.h
@@ -9,7 +9,6 @@
 #ifndef _DRA7_IODELAY_H_
 #define _DRA7_IODELAY_H_
 
-#include <common.h>
 #include <asm/arch/sys_proto.h>
 
 /* CONFIG_REG_0 */
diff --git a/arch/arm/include/asm/arch-rk3308/cru_rk3308.h b/arch/arm/include/asm/arch-rk3308/cru_rk3308.h
index a14b64cdb3..86c906bb0e 100644
--- a/arch/arm/include/asm/arch-rk3308/cru_rk3308.h
+++ b/arch/arm/include/asm/arch-rk3308/cru_rk3308.h
@@ -5,8 +5,6 @@
 #ifndef _ASM_ARCH_CRU_RK3308_H
 #define _ASM_ARCH_CRU_RK3308_H
 
-#include <common.h>
-
 #define MHz		1000000
 #define OSC_HZ		(24 * MHz)
 
diff --git a/arch/arm/include/asm/arch-rk3308/grf_rk3308.h b/arch/arm/include/asm/arch-rk3308/grf_rk3308.h
index 3e68626d3e..a995bb950d 100644
--- a/arch/arm/include/asm/arch-rk3308/grf_rk3308.h
+++ b/arch/arm/include/asm/arch-rk3308/grf_rk3308.h
@@ -5,8 +5,6 @@
 #ifndef _ASM_ARCH_GRF_rk3308_H
 #define _ASM_ARCH_GRF_rk3308_H
 
-#include <common.h>
-
 struct rk3308_grf {
 	unsigned int gpio0a_iomux;
 	unsigned int reserved0;
diff --git a/arch/arm/include/asm/arch-rockchip/cru_px30.h b/arch/arm/include/asm/arch-rockchip/cru_px30.h
index 798444ae49..732ca37040 100644
--- a/arch/arm/include/asm/arch-rockchip/cru_px30.h
+++ b/arch/arm/include/asm/arch-rockchip/cru_px30.h
@@ -5,8 +5,6 @@
 #ifndef _ASM_ARCH_CRU_PX30_H
 #define _ASM_ARCH_CRU_PX30_H
 
-#include <common.h>
-
 #define MHz		1000000
 #define KHz		1000
 #define OSC_HZ		(24 * MHz)
diff --git a/arch/arm/include/asm/arch-rockchip/cru_rk3036.h b/arch/arm/include/asm/arch-rockchip/cru_rk3036.h
index 4722522954..5db0407baa 100644
--- a/arch/arm/include/asm/arch-rockchip/cru_rk3036.h
+++ b/arch/arm/include/asm/arch-rockchip/cru_rk3036.h
@@ -5,8 +5,6 @@
 #ifndef _ASM_ARCH_CRU_RK3036_H
 #define _ASM_ARCH_CRU_RK3036_H
 
-#include <common.h>
-
 #define OSC_HZ		(24 * 1000 * 1000)
 
 #define APLL_HZ		(600 * 1000000)
diff --git a/arch/arm/include/asm/arch-rockchip/cru_rk3128.h b/arch/arm/include/asm/arch-rockchip/cru_rk3128.h
index b8565605cd..40a5ca7390 100644
--- a/arch/arm/include/asm/arch-rockchip/cru_rk3128.h
+++ b/arch/arm/include/asm/arch-rockchip/cru_rk3128.h
@@ -6,8 +6,6 @@
 #ifndef _ASM_ARCH_CRU_RK3128_H
 #define _ASM_ARCH_CRU_RK3128_H
 
-#include <common.h>
-
 #define MHz		1000000
 #define OSC_HZ		(24 * MHz)
 
diff --git a/arch/arm/include/asm/arch-rockchip/cru_rk322x.h b/arch/arm/include/asm/arch-rockchip/cru_rk322x.h
index c87c830716..ee12fa831f 100644
--- a/arch/arm/include/asm/arch-rockchip/cru_rk322x.h
+++ b/arch/arm/include/asm/arch-rockchip/cru_rk322x.h
@@ -5,8 +5,6 @@
 #ifndef _ASM_ARCH_CRU_RK322X_H
 #define _ASM_ARCH_CRU_RK322X_H
 
-#include <common.h>
-
 #define MHz		1000000
 #define OSC_HZ		(24 * MHz)
 
diff --git a/arch/arm/include/asm/arch-rockchip/cru_rk3328.h b/arch/arm/include/asm/arch-rockchip/cru_rk3328.h
index 4bf69dbe08..226744d67d 100644
--- a/arch/arm/include/asm/arch-rockchip/cru_rk3328.h
+++ b/arch/arm/include/asm/arch-rockchip/cru_rk3328.h
@@ -6,8 +6,6 @@
 #ifndef __ASM_ARCH_CRU_RK3328_H_
 #define __ASM_ARCH_CRU_RK3328_H_
 
-#include <common.h>
-
 struct rk3328_clk_priv {
 	struct rk3328_cru *cru;
 	ulong rate;
diff --git a/arch/arm/include/asm/arch-rockchip/cru_rk3368.h b/arch/arm/include/asm/arch-rockchip/cru_rk3368.h
index 1fe1f01b9e..714cea85b4 100644
--- a/arch/arm/include/asm/arch-rockchip/cru_rk3368.h
+++ b/arch/arm/include/asm/arch-rockchip/cru_rk3368.h
@@ -6,9 +6,6 @@
 #ifndef _ASM_ARCH_CRU_RK3368_H
 #define _ASM_ARCH_CRU_RK3368_H
 
-#include <common.h>
-
-
 /* RK3368 clock numbers */
 enum rk3368_pll_id {
 	APLLB,
diff --git a/arch/arm/include/asm/arch-rockchip/cru_rk3399.h b/arch/arm/include/asm/arch-rockchip/cru_rk3399.h
index 789ca6aa28..d941a129f3 100644
--- a/arch/arm/include/asm/arch-rockchip/cru_rk3399.h
+++ b/arch/arm/include/asm/arch-rockchip/cru_rk3399.h
@@ -6,8 +6,6 @@
 #ifndef __ASM_ARCH_CRU_RK3399_H_
 #define __ASM_ARCH_CRU_RK3399_H_
 
-#include <common.h>
-
 /* Private data for the clock driver - used by rockchip_get_cru() */
 struct rk3399_clk_priv {
 	struct rockchip_cru *cru;
diff --git a/arch/arm/include/asm/arch-rockchip/cru_rv1108.h b/arch/arm/include/asm/arch-rockchip/cru_rv1108.h
index 7697e96a91..1db25afe26 100644
--- a/arch/arm/include/asm/arch-rockchip/cru_rv1108.h
+++ b/arch/arm/include/asm/arch-rockchip/cru_rv1108.h
@@ -6,8 +6,6 @@
 #ifndef _ASM_ARCH_CRU_RV1108_H
 #define _ASM_ARCH_CRU_RV1108_H
 
-#include <common.h>
-
 #define OSC_HZ		(24 * 1000 * 1000)
 
 #define APLL_HZ		(600 * 1000000)
diff --git a/arch/arm/include/asm/arch-rockchip/grf_px30.h b/arch/arm/include/asm/arch-rockchip/grf_px30.h
index 3d2a877032..d51e29b19e 100644
--- a/arch/arm/include/asm/arch-rockchip/grf_px30.h
+++ b/arch/arm/include/asm/arch-rockchip/grf_px30.h
@@ -5,8 +5,6 @@
 #ifndef _ASM_ARCH_GRF_px30_H
 #define _ASM_ARCH_GRF_px30_H
 
-#include <common.h>
-
 struct px30_grf {
 	unsigned int gpio1al_iomux;
 	unsigned int gpio1ah_iomux;
diff --git a/arch/arm/include/asm/arch-rockchip/grf_rk3036.h b/arch/arm/include/asm/arch-rockchip/grf_rk3036.h
index 5f12ebf262..08348d8228 100644
--- a/arch/arm/include/asm/arch-rockchip/grf_rk3036.h
+++ b/arch/arm/include/asm/arch-rockchip/grf_rk3036.h
@@ -5,8 +5,6 @@
 #ifndef _ASM_ARCH_GRF_RK3036_H
 #define _ASM_ARCH_GRF_RK3036_H
 
-#include <common.h>
-
 struct rk3036_grf {
 	unsigned int reserved[0x2a];
 	unsigned int gpio0a_iomux;
diff --git a/arch/arm/include/asm/arch-rockchip/grf_rk3128.h b/arch/arm/include/asm/arch-rockchip/grf_rk3128.h
index 519b36ad2a..fe07d69b42 100644
--- a/arch/arm/include/asm/arch-rockchip/grf_rk3128.h
+++ b/arch/arm/include/asm/arch-rockchip/grf_rk3128.h
@@ -5,8 +5,6 @@
 #ifndef _ASM_ARCH_GRF_RK3128_H
 #define _ASM_ARCH_GRF_RK3128_H
 
-#include <common.h>
-
 struct rk3128_grf {
 	unsigned int reserved[0x2a];
 	unsigned int gpio0a_iomux;
diff --git a/arch/arm/include/asm/arch-rockchip/grf_rk322x.h b/arch/arm/include/asm/arch-rockchip/grf_rk322x.h
index a99d13732d..5f4d9d8224 100644
--- a/arch/arm/include/asm/arch-rockchip/grf_rk322x.h
+++ b/arch/arm/include/asm/arch-rockchip/grf_rk322x.h
@@ -5,8 +5,6 @@
 #ifndef _ASM_ARCH_GRF_RK322X_H
 #define _ASM_ARCH_GRF_RK322X_H
 
-#include <common.h>
-
 struct rk322x_grf {
 	unsigned int gpio0a_iomux;
 	unsigned int gpio0b_iomux;
diff --git a/arch/arm/include/asm/arch-rockchip/grf_rk3368.h b/arch/arm/include/asm/arch-rockchip/grf_rk3368.h
index b70b08fcce..45e882b3c9 100644
--- a/arch/arm/include/asm/arch-rockchip/grf_rk3368.h
+++ b/arch/arm/include/asm/arch-rockchip/grf_rk3368.h
@@ -6,8 +6,6 @@
 #ifndef _ASM_ARCH_GRF_RK3368_H
 #define _ASM_ARCH_GRF_RK3368_H
 
-#include <common.h>
-
 struct rk3368_grf {
 	u32 gpio1a_iomux;
 	u32 gpio1b_iomux;
diff --git a/arch/arm/include/asm/arch-rockchip/grf_rv1108.h b/arch/arm/include/asm/arch-rockchip/grf_rv1108.h
index 9f42fbde8d..92bbe34af6 100644
--- a/arch/arm/include/asm/arch-rockchip/grf_rv1108.h
+++ b/arch/arm/include/asm/arch-rockchip/grf_rv1108.h
@@ -5,8 +5,6 @@
 #ifndef _ASM_ARCH_GRF_RV1108_H
 #define _ASM_ARCH_GRF_RV1108_H
 
-#include <common.h>
-
 struct rv1108_grf {
 	u32 reserved[4];
 	u32 gpio1a_iomux;
diff --git a/arch/arm/include/asm/arch-rockchip/sdram_rk3036.h b/arch/arm/include/asm/arch-rockchip/sdram_rk3036.h
index 5de3220d6f..46298165fb 100644
--- a/arch/arm/include/asm/arch-rockchip/sdram_rk3036.h
+++ b/arch/arm/include/asm/arch-rockchip/sdram_rk3036.h
@@ -5,8 +5,6 @@
 #ifndef _ASM_ARCH_SDRAM_RK3036_H
 #define _ASM_ARCH_SDRAM_RK3036_H
 
-#include <common.h>
-
 struct rk3036_ddr_pctl {
 	u32 scfg;
 	u32 sctl;
diff --git a/arch/arm/include/asm/arch-rockchip/sdram_rk322x.h b/arch/arm/include/asm/arch-rockchip/sdram_rk322x.h
index 336c5d7e8c..99942e6aac 100644
--- a/arch/arm/include/asm/arch-rockchip/sdram_rk322x.h
+++ b/arch/arm/include/asm/arch-rockchip/sdram_rk322x.h
@@ -5,8 +5,6 @@
 #ifndef _ASM_ARCH_SDRAM_RK322X_H
 #define _ASM_ARCH_SDRAM_RK322X_H
 
-#include <common.h>
-
 struct rk322x_sdram_channel {
 	/*
 	 * bit width in address, eg:
diff --git a/arch/arm/include/asm/arch-s32v234/clock.h b/arch/arm/include/asm/arch-s32v234/clock.h
index c60065444c..70846094e8 100644
--- a/arch/arm/include/asm/arch-s32v234/clock.h
+++ b/arch/arm/include/asm/arch-s32v234/clock.h
@@ -6,8 +6,6 @@
 #ifndef __ASM_ARCH_CLOCK_H
 #define __ASM_ARCH_CLOCK_H
 
-#include <common.h>
-
 enum mxc_clock {
 	MXC_ARM_CLK = 0,
 	MXC_BUS_CLK,
diff --git a/arch/arm/include/asm/arch-sunxi/rsb.h b/arch/arm/include/asm/arch-sunxi/rsb.h
index 616b6e2a64..8c64a995f2 100644
--- a/arch/arm/include/asm/arch-sunxi/rsb.h
+++ b/arch/arm/include/asm/arch-sunxi/rsb.h
@@ -11,7 +11,6 @@
 #ifndef __SUNXI_RSB_H
 #define __SUNXI_RSB_H
 
-#include <common.h>
 #include <asm/io.h>
 
 struct sunxi_rsb_reg {
diff --git a/arch/arm/include/asm/arch-tegra/ivc.h b/arch/arm/include/asm/arch-tegra/ivc.h
index 53cb56d271..52c10b8fab 100644
--- a/arch/arm/include/asm/arch-tegra/ivc.h
+++ b/arch/arm/include/asm/arch-tegra/ivc.h
@@ -6,8 +6,6 @@
 #ifndef _ASM_ARCH_TEGRA_IVC_H
 #define _ASM_ARCH_TEGRA_IVC_H
 
-#include <common.h>
-
 /*
  * Tegra IVC is a communication protocol that transfers fixed-size frames
  * bi-directionally and in-order between the local CPU and some remote entity.
diff --git a/arch/arm/include/asm/arch-tegra/tegra_mmc.h b/arch/arm/include/asm/arch-tegra/tegra_mmc.h
index 70dcf4aa66..d6a55764ba 100644
--- a/arch/arm/include/asm/arch-tegra/tegra_mmc.h
+++ b/arch/arm/include/asm/arch-tegra/tegra_mmc.h
@@ -8,7 +8,6 @@
 #ifndef __TEGRA_MMC_H_
 #define __TEGRA_MMC_H_
 
-#include <common.h>
 #include <clk.h>
 #include <reset.h>
 #include <fdtdec.h>
diff --git a/arch/arm/include/asm/arch-vf610/clock.h b/arch/arm/include/asm/arch-vf610/clock.h
index 72184fd608..ec9786ce4f 100644
--- a/arch/arm/include/asm/arch-vf610/clock.h
+++ b/arch/arm/include/asm/arch-vf610/clock.h
@@ -6,8 +6,6 @@
 #ifndef __ASM_ARCH_CLOCK_H
 #define __ASM_ARCH_CLOCK_H
 
-#include <common.h>
-
 enum mxc_clock {
 	MXC_ARM_CLK = 0,
 	MXC_BUS_CLK,
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h
index 8bb3fa2e0e..8af1ea0aa4 100644
--- a/arch/arm/include/asm/dma-mapping.h
+++ b/arch/arm/include/asm/dma-mapping.h
@@ -7,10 +7,10 @@
 #ifndef __ASM_ARM_DMA_MAPPING_H
 #define __ASM_ARM_DMA_MAPPING_H
 
-#include <common.h>
 #include <asm/cache.h>
 #include <cpu_func.h>
 #include <linux/dma-direction.h>
+#include <linux/kernel.h>
 #include <linux/types.h>
 #include <malloc.h>
 
diff --git a/arch/arm/include/asm/emif.h b/arch/arm/include/asm/emif.h
index dc398efd32..35424345bf 100644
--- a/arch/arm/include/asm/emif.h
+++ b/arch/arm/include/asm/emif.h
@@ -13,7 +13,6 @@
 #ifndef _EMIF_H_
 #define _EMIF_H_
 #include <asm/types.h>
-#include <common.h>
 #include <asm/io.h>
 
 /* Base address */
diff --git a/arch/arm/include/asm/mach-imx/iomux-v3.h b/arch/arm/include/asm/mach-imx/iomux-v3.h
index 06dbd8d943..1de7093355 100644
--- a/arch/arm/include/asm/mach-imx/iomux-v3.h
+++ b/arch/arm/include/asm/mach-imx/iomux-v3.h
@@ -10,7 +10,7 @@
 #ifndef __MACH_IOMUX_V3_H__
 #define __MACH_IOMUX_V3_H__
 
-#include <common.h>
+#include <linux/types.h>
 
 /*
  *	build IOMUX_PAD structure
diff --git a/arch/arm/include/asm/mach-imx/sys_proto.h b/arch/arm/include/asm/mach-imx/sys_proto.h
index 2a997f280d..2a1cfcb893 100644
--- a/arch/arm/include/asm/mach-imx/sys_proto.h
+++ b/arch/arm/include/asm/mach-imx/sys_proto.h
@@ -9,9 +9,11 @@
 
 #include <asm/io.h>
 #include <asm/mach-imx/regs-common.h>
-#include <common.h>
+#include <linux/bitops.h>
 #include "../arch-imx/cpu.h"
 
+struct bd_info;
+
 #define soc_rev() (get_cpu_rev() & 0xFF)
 #define is_soc_rev(rev) (soc_rev() == rev)
 
@@ -181,7 +183,7 @@ char nxp_board_rev_string(void);
  * Initializes on-chip ethernet controllers.
  * to override, implement board_eth_init()
  */
-int fecmxc_initialize(bd_t *bis);
+int fecmxc_initialize(struct bd_info *bis);
 u32 get_ahb_clk(void);
 u32 get_periph_clk(void);
 
diff --git a/arch/arm/include/asm/omap_common.h b/arch/arm/include/asm/omap_common.h
index 54b7cd19bb..de8fc99d04 100644
--- a/arch/arm/include/asm/omap_common.h
+++ b/arch/arm/include/asm/omap_common.h
@@ -10,10 +10,12 @@
 
 #ifndef __ASSEMBLY__
 
-#include <common.h>
+#include <linux/types.h>
 
 #define NUM_SYS_CLKS	7
 
+struct bd_info;
+
 struct prcm_regs {
 	/* cm1.ckgen */
 	u32 cm_clksel_core;
@@ -683,9 +685,9 @@ void omap_die_id(unsigned int *die_id);
 void gpi2c_init(void);
 
 /* Common FDT Fixups */
-int ft_hs_disable_rng(void *fdt, bd_t *bd);
-int ft_hs_fixup_dram(void *fdt, bd_t *bd);
-int ft_hs_add_tee(void *fdt, bd_t *bd);
+int ft_hs_disable_rng(void *fdt, struct bd_info *bd);
+int ft_hs_fixup_dram(void *fdt, struct bd_info *bd);
+int ft_hs_add_tee(void *fdt, struct bd_info *bd);
 
 /* ABB */
 #define OMAP_ABB_NOMINAL_OPP		0
diff --git a/arch/arm/include/asm/omap_sec_common.h b/arch/arm/include/asm/omap_sec_common.h
index f10a41f304..30f0a9f5cb 100644
--- a/arch/arm/include/asm/omap_sec_common.h
+++ b/arch/arm/include/asm/omap_sec_common.h
@@ -8,8 +8,6 @@
 #ifndef	_OMAP_SEC_COMMON_H_
 #define	_OMAP_SEC_COMMON_H_
 
-#include <common.h>
-
 /*
  * Invoke secure ROM API on high-security (HS) device variants. It formats
  * the variable argument list into the format expected by the ROM code before
diff --git a/arch/arm/include/asm/psci.h b/arch/arm/include/asm/psci.h
index 3ddcd95a26..ac0ab6253f 100644
--- a/arch/arm/include/asm/psci.h
+++ b/arch/arm/include/asm/psci.h
@@ -18,6 +18,10 @@
 #ifndef __ARM_PSCI_H__
 #define __ARM_PSCI_H__
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 #define ARM_PSCI_VER_1_0		(0x00010000)
 #define ARM_PSCI_VER_0_2		(0x00000002)
 
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
index a3147fde14..1e3f574403 100644
--- a/arch/arm/include/asm/system.h
+++ b/arch/arm/include/asm/system.h
@@ -1,7 +1,6 @@
 #ifndef __ASM_ARM_SYSTEM_H
 #define __ASM_ARM_SYSTEM_H
 
-#include <common.h>
 #include <linux/compiler.h>
 #include <asm/barriers.h>
 
@@ -110,6 +109,8 @@
 
 #ifndef __ASSEMBLY__
 
+struct pt_regs;
+
 u64 get_page_table_size(void);
 #define PGTABLE_SIZE	get_page_table_size()
 
diff --git a/arch/arm/mach-imx/ddrmc-vf610.c b/arch/arm/mach-imx/ddrmc-vf610.c
index 461fba4d3f..f25119a7d6 100644
--- a/arch/arm/mach-imx/ddrmc-vf610.c
+++ b/arch/arm/mach-imx/ddrmc-vf610.c
@@ -6,6 +6,7 @@
  * Copyright 2013 Freescale Semiconductor, Inc.
  */
 
+#include <common.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux-vf610.h>
diff --git a/arch/arm/mach-imx/mx7ulp/soc.c b/arch/arm/mach-imx/mx7ulp/soc.c
index 0d39dab7ea..518d77ae5b 100644
--- a/arch/arm/mach-imx/mx7ulp/soc.c
+++ b/arch/arm/mach-imx/mx7ulp/soc.c
@@ -2,6 +2,8 @@
 /*
  * Copyright (C) 2016 Freescale Semiconductor, Inc.
  */
+
+#include <common.h>
 #include <cpu_func.h>
 #include <init.h>
 #include <asm/io.h>
diff --git a/arch/arm/mach-imx/sata.c b/arch/arm/mach-imx/sata.c
index b9f630952d..c4599aaf68 100644
--- a/arch/arm/mach-imx/sata.c
+++ b/arch/arm/mach-imx/sata.c
@@ -7,6 +7,7 @@
 #include <asm/arch/iomux.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
+#include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
 
 int setup_sata(void)
diff --git a/arch/arm/mach-omap2/am33xx/ddr.c b/arch/arm/mach-omap2/am33xx/ddr.c
index 3fd1d086ff..8cacc1dea6 100644
--- a/arch/arm/mach-omap2/am33xx/ddr.c
+++ b/arch/arm/mach-omap2/am33xx/ddr.c
@@ -5,6 +5,7 @@
  * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
  */
 
+#include <common.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/ddr_defs.h>
 #include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-omap2/omap4/sdram_elpida.c b/arch/arm/mach-omap2/omap4/sdram_elpida.c
index a29a264016..2a18cf0215 100644
--- a/arch/arm/mach-omap2/omap4/sdram_elpida.c
+++ b/arch/arm/mach-omap2/omap4/sdram_elpida.c
@@ -9,6 +9,7 @@
  * Aneesh V <aneesh@ti.com>
  */
 
+#include <common.h>
 #include <asm/emif.h>
 #include <asm/arch/sys_proto.h>
 
diff --git a/arch/arm/mach-omap2/omap5/sdram.c b/arch/arm/mach-omap2/omap5/sdram.c
index 6bf4cf4a75..786da45fac 100644
--- a/arch/arm/mach-omap2/omap5/sdram.c
+++ b/arch/arm/mach-omap2/omap5/sdram.c
@@ -10,6 +10,7 @@
  * Sricharan R <r.sricharan@ti.com>
  */
 
+#include <common.h>
 #include <asm/emif.h>
 #include <asm/arch/sys_proto.h>
 
diff --git a/arch/arm/mach-rockchip/rk3036/rk3036.c b/arch/arm/mach-rockchip/rk3036/rk3036.c
index e9ada6dea3..e0a6e4b025 100644
--- a/arch/arm/mach-rockchip/rk3036/rk3036.c
+++ b/arch/arm/mach-rockchip/rk3036/rk3036.c
@@ -2,6 +2,8 @@
 /*
  * (C) Copyright 2019 Rockchip Electronics Co., Ltd
  */
+
+#include <common.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/grf_rk3036.h>
 #include <asm/arch-rockchip/hardware.h>
diff --git a/board/compulab/cm_t54/mux.c b/board/compulab/cm_t54/mux.c
index 50d58217e4..ea90bc6e34 100644
--- a/board/compulab/cm_t54/mux.c
+++ b/board/compulab/cm_t54/mux.c
@@ -10,6 +10,7 @@
 #ifndef _CM_T54_MUX_DATA_H
 #define _CM_T54_MUX_DATA_H
 
+#include <common.h>
 #include <asm/arch/mux_omap5.h>
 #include <asm/arch/sys_proto.h>
 
diff --git a/board/el/el6x/el6x.c b/board/el/el6x/el6x.c
index 9aa71b9941..03e9364765 100644
--- a/board/el/el6x/el6x.c
+++ b/board/el/el6x/el6x.c
@@ -5,6 +5,7 @@
  * Based on other i.MX6 boards
  */
 
+#include <common.h>
 #include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/embest/mx6boards/mx6boards.c b/board/embest/mx6boards/mx6boards.c
index bf5c020af1..b644f273fe 100644
--- a/board/embest/mx6boards/mx6boards.c
+++ b/board/embest/mx6boards/mx6boards.c
@@ -12,6 +12,7 @@
  * Copyright (C) 2013 Jon Nettleton <jon.nettleton@gmail.com>.
  */
 
+#include <common.h>
 #include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/gateworks/gw_ventana/common.c b/board/gateworks/gw_ventana/common.c
index 1240a9da17..64553c0617 100644
--- a/board/gateworks/gw_ventana/common.c
+++ b/board/gateworks/gw_ventana/common.c
@@ -5,6 +5,7 @@
  * Author: Tim Harvey <tharvey@gateworks.com>
  */
 
+#include <common.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/mx6-pins.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/grinn/liteboard/board.c b/board/grinn/liteboard/board.c
index 5d71b639df..df32e12037 100644
--- a/board/grinn/liteboard/board.c
+++ b/board/grinn/liteboard/board.c
@@ -4,6 +4,7 @@
  * Copyright (C) 2016 Grinn
  */
 
+#include <common.h>
 #include <command.h>
 #include <init.h>
 #include <asm/arch/clock.h>
diff --git a/board/overo/spl.c b/board/overo/spl.c
index d577e00fbc..91d8091d25 100644
--- a/board/overo/spl.c
+++ b/board/overo/spl.c
@@ -11,6 +11,8 @@
  * (C) Copyright 2004-2008
  * Texas Instruments, <www.ti.com>
  */
+
+#include <common.h>
 #include <asm/io.h>
 #include <asm/arch/mem.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/sks-kinkel/sksimx6/sksimx6.c b/board/sks-kinkel/sksimx6/sksimx6.c
index 59a07a9ffd..fa2acf59a7 100644
--- a/board/sks-kinkel/sksimx6/sksimx6.c
+++ b/board/sks-kinkel/sksimx6/sksimx6.c
@@ -3,6 +3,7 @@
  * Copyright (C) 2016 Stefano Babic <sbabic@denx.de>
  */
 
+#include <common.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
diff --git a/board/solidrun/mx6cuboxi/mx6cuboxi.c b/board/solidrun/mx6cuboxi/mx6cuboxi.c
index 6a96f9ecdb..13f77a3db2 100644
--- a/board/solidrun/mx6cuboxi/mx6cuboxi.c
+++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c
@@ -13,6 +13,7 @@
  * Ported to SolidRun microSOM by Rabeeh Khoury <rabeeh@solid-run.com>
  */
 
+#include <common.h>
 #include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/technexion/pico-imx6/spl.c b/board/technexion/pico-imx6/spl.c
index 06ad0a8c32..bafe9ba6b7 100644
--- a/board/technexion/pico-imx6/spl.c
+++ b/board/technexion/pico-imx6/spl.c
@@ -6,6 +6,7 @@
  *	   Fabio Estevam <festevam@gmail.com>
  */
 
+#include <common.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
diff --git a/board/technexion/pico-imx7d/spl.c b/board/technexion/pico-imx7d/spl.c
index 6c432ca5a6..69db77412c 100644
--- a/board/technexion/pico-imx7d/spl.c
+++ b/board/technexion/pico-imx7d/spl.c
@@ -5,6 +5,7 @@
  * Author: Richard Hu <richard.hu@technexion.com>
  */
 
+#include <common.h>
 #include <cpu_func.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/udoo/udoo_spl.c b/board/udoo/udoo_spl.c
index b287fbf410..1a3b136529 100644
--- a/board/udoo/udoo_spl.c
+++ b/board/udoo/udoo_spl.c
@@ -6,6 +6,7 @@
  * Based on board/wandboard/spl.c
  */
 
+#include <common.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
diff --git a/board/wandboard/spl.c b/board/wandboard/spl.c
index dbd9d0286f..250043a26d 100644
--- a/board/wandboard/spl.c
+++ b/board/wandboard/spl.c
@@ -5,6 +5,7 @@
  *         Richard Hu <hakahu@gmail.com>
  */
 
+#include <common.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c
index fb2f3c1fd2..9705a1d8e3 100644
--- a/board/wandboard/wandboard.c
+++ b/board/wandboard/wandboard.c
@@ -6,6 +6,7 @@
  * Author: Fabio Estevam <fabio.estevam@freescale.com>
  */
 
+#include <common.h>
 #include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
diff --git a/drivers/mtd/nand/raw/denali.c b/drivers/mtd/nand/raw/denali.c
index b525b1be54..3a09a8165c 100644
--- a/drivers/mtd/nand/raw/denali.c
+++ b/drivers/mtd/nand/raw/denali.c
@@ -11,6 +11,8 @@
 #include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <linux/bitfield.h>
+#include <linux/delay.h>
+#include <linux/dma-direction.h>
 #include <linux/dma-mapping.h>
 #include <linux/err.h>
 #include <linux/errno.h>
diff --git a/drivers/mtd/nand/raw/denali_dt.c b/drivers/mtd/nand/raw/denali_dt.c
index 41b93e660a..2728e8098f 100644
--- a/drivers/mtd/nand/raw/denali_dt.c
+++ b/drivers/mtd/nand/raw/denali_dt.c
@@ -7,6 +7,8 @@
 #include <clk.h>
 #include <dm.h>
 #include <dm/device_compat.h>
+#include <linux/bug.h>
+#include <linux/delay.h>
 #include <linux/io.h>
 #include <linux/ioport.h>
 #include <linux/printk.h>
diff --git a/drivers/usb/eth/lan7x.h b/drivers/usb/eth/lan7x.h
index 7af610be37..35965e9645 100644
--- a/drivers/usb/eth/lan7x.h
+++ b/drivers/usb/eth/lan7x.h
@@ -4,7 +4,10 @@
  */
 
 #include <console.h>
+#include <time.h>
 #include <watchdog.h>
+#include <linux/delay.h>
+#include <linux/errno.h>
 
 /* USB Vendor Requests */
 #define USB_VENDOR_REQUEST_WRITE_REGISTER	0xA0
@@ -122,6 +125,10 @@ int lan7x_write_reg(struct usb_device *udev, u32 index, u32 data);
 
 int lan7x_read_reg(struct usb_device *udev, u32 index, u32 *data);
 
+/*
+ * FIXME: Code should not be in header files. Nive this to a file common to
+ * the two drivers.
+ */
 static inline int lan7x_wait_for_bit(struct usb_device *udev,
 				     const char *prefix, const u32 reg,
 				     const u32 mask, const bool set,
diff --git a/include/linux/compat.h b/include/linux/compat.h
index 171188a76f..712eeaef4e 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -1,6 +1,7 @@
 #ifndef _LINUX_COMPAT_H_
 #define _LINUX_COMPAT_H_
 
+#include <log.h>
 #include <malloc.h>
 #include <linux/types.h>
 #include <linux/err.h>
diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h
index bd373b9617..66febc6b72 100644
--- a/include/linux/mtd/rawnand.h
+++ b/include/linux/mtd/rawnand.h
@@ -16,6 +16,7 @@
 #include <config.h>
 
 #include <dm/device.h>
+#include <linux/bitops.h>
 #include <linux/compat.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/flashchip.h>
diff --git a/include/net.h b/include/net.h
index 82500eeb30..774ae2de63 100644
--- a/include/net.h
+++ b/include/net.h
@@ -15,9 +15,13 @@
 #include <asm/cache.h>
 #include <asm/byteorder.h>	/* for nton* / ntoh* stuff */
 #include <env.h>
+#include <log.h>
+#include <time.h>
 #include <linux/if_ether.h>
 #include <rand.h>
 
+struct cmd_tbl_s;
+
 #define DEBUG_LL_STATE 0	/* Link local state machine changes */
 #define DEBUG_DEV_PKT 0		/* Packets or info directed to the device */
 #define DEBUG_NET_PKT 0		/* Packets on info on the network at large */
@@ -59,7 +63,7 @@ struct in_addr {
  * @argv: List of arguments
  * @return result (see enum command_ret_t)
  */
-int do_tftpb(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]);
+int do_tftpb(struct cmd_tbl_s *cmdtp, int flag, int argc, char *const argv[]);
 
 /**
  * An incoming packet handler.
diff --git a/include/spl.h b/include/spl.h
index 6bf9fd8beb..661a22e368 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -26,6 +26,8 @@ struct image_header;
 #define MMCSD_MODE_FS		2
 #define MMCSD_MODE_EMMCBOOT	3
 
+struct image_header;
+
 /*
  * u_boot_first_phase() - check if this is the first U-Boot phase
  *
-- 
2.26.2.645.ge9eca65c58-goog

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH v3 05/22] common: Drop net.h from common header
  2020-05-10 17:39 [PATCH v3 00/22] common: Further reduce the size of common.h Simon Glass
                   ` (3 preceding siblings ...)
  2020-05-10 17:39 ` [PATCH v3 04/22] arm: Don't include common.h in header files Simon Glass
@ 2020-05-10 17:39 ` Simon Glass
  2020-05-19 17:32   ` Tom Rini
  2020-05-10 17:39 ` [PATCH v3 06/22] part: Drop disk_partition_t typedef Simon Glass
                   ` (17 subsequent siblings)
  22 siblings, 1 reply; 53+ messages in thread
From: Simon Glass @ 2020-05-10 17:39 UTC (permalink / raw)
  To: u-boot

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v3: None
Changes in v2:
- Adjustments for more boards

 arch/arm/cpu/arm11/cpu.c                          | 1 +
 arch/arm/cpu/arm1136/mx35/generic.c               | 1 +
 arch/arm/cpu/arm926ejs/cache.c                    | 1 +
 arch/arm/cpu/arm926ejs/cpu.c                      | 1 +
 arch/arm/cpu/arm926ejs/lpc32xx/cpu.c              | 1 +
 arch/arm/cpu/arm926ejs/mx25/generic.c             | 1 +
 arch/arm/cpu/arm926ejs/mx27/generic.c             | 1 +
 arch/arm/cpu/arm926ejs/mxs/mxs.c                  | 1 +
 arch/arm/cpu/armv7/cache_v7.c                     | 1 +
 arch/arm/cpu/armv7/iproc-common/hwinit-common.c   | 1 +
 arch/arm/cpu/armv7/kona-common/hwinit-common.c    | 1 +
 arch/arm/cpu/armv7/ls102xa/cpu.c                  | 1 +
 arch/arm/cpu/armv7/ls102xa/fdt.c                  | 1 +
 arch/arm/cpu/armv7/sunxi/psci.c                   | 1 +
 arch/arm/cpu/armv7/vf610/generic.c                | 2 ++
 arch/arm/cpu/armv7/virt-v7.c                      | 1 +
 arch/arm/cpu/armv7m/cache.c                       | 1 +
 arch/arm/cpu/armv8/cache_v8.c                     | 1 +
 arch/arm/cpu/armv8/cpu-dt.c                       | 1 +
 arch/arm/cpu/armv8/cpu.c                          | 1 +
 arch/arm/cpu/armv8/exception_level.c              | 1 +
 arch/arm/cpu/armv8/fsl-layerscape/cpu.c           | 2 ++
 arch/arm/cpu/armv8/fsl-layerscape/fdt.c           | 1 +
 arch/arm/cpu/armv8/fsl-layerscape/mp.c            | 1 +
 arch/arm/cpu/armv8/fsl-layerscape/ppa.c           | 1 +
 arch/arm/cpu/armv8/fsl-layerscape/soc.c           | 1 +
 arch/arm/cpu/armv8/fsl-layerscape/spl.c           | 1 +
 arch/arm/cpu/armv8/fwcall.c                       | 1 +
 arch/arm/cpu/armv8/s32v234/cpu.c                  | 1 +
 arch/arm/cpu/armv8/s32v234/generic.c              | 1 +
 arch/arm/cpu/armv8/sec_firmware.c                 | 1 +
 arch/arm/cpu/pxa/cache.c                          | 1 +
 arch/arm/cpu/pxa/pxa2xx.c                         | 1 +
 arch/arm/include/asm/arch-tegra/cboot.h           | 3 +++
 arch/arm/include/asm/mach-imx/dma.h               | 1 +
 arch/arm/lib/bootm.c                              | 1 +
 arch/arm/lib/cache.c                              | 1 +
 arch/arm/lib/psci-dt.c                            | 1 +
 arch/arm/lib/spl.c                                | 1 +
 arch/arm/mach-bcm283x/mbox.c                      | 1 +
 arch/arm/mach-exynos/lowlevel_init.c              | 1 +
 arch/arm/mach-exynos/soc.c                        | 1 +
 arch/arm/mach-exynos/spl_boot.c                   | 1 +
 arch/arm/mach-imx/cache.c                         | 1 +
 arch/arm/mach-imx/cpu.c                           | 1 +
 arch/arm/mach-imx/imx8/cpu.c                      | 1 +
 arch/arm/mach-imx/mx5/soc.c                       | 1 +
 arch/arm/mach-imx/mx7/psci-mx7.c                  | 1 +
 arch/arm/mach-imx/sip.c                           | 1 +
 arch/arm/mach-k3/common.c                         | 1 +
 arch/arm/mach-k3/security.c                       | 1 +
 arch/arm/mach-k3/sysfw-loader.c                   | 1 +
 arch/arm/mach-keystone/init.c                     | 1 +
 arch/arm/mach-kirkwood/cache.c                    | 1 +
 arch/arm/mach-kirkwood/cpu.c                      | 1 +
 arch/arm/mach-mediatek/mt7622/init.c              | 1 +
 arch/arm/mach-mediatek/mt8512/init.c              | 1 +
 arch/arm/mach-mediatek/mt8516/init.c              | 1 +
 arch/arm/mach-mediatek/mt8518/init.c              | 1 +
 arch/arm/mach-meson/board-axg.c                   | 1 +
 arch/arm/mach-meson/board-common.c                | 2 ++
 arch/arm/mach-meson/board-g12a.c                  | 1 +
 arch/arm/mach-meson/board-gx.c                    | 1 +
 arch/arm/mach-meson/sm.c                          | 1 +
 arch/arm/mach-mvebu/arm64-common.c                | 1 +
 arch/arm/mach-omap2/am33xx/board.c                | 1 +
 arch/arm/mach-omap2/omap3/emac.c                  | 1 +
 arch/arm/mach-orion5x/cpu.c                       | 1 +
 arch/arm/mach-owl/soc.c                           | 1 +
 arch/arm/mach-rmobile/cpu_info.c                  | 1 +
 arch/arm/mach-rmobile/emac.c                      | 1 +
 arch/arm/mach-rockchip/board.c                    | 1 +
 arch/arm/mach-rockchip/bootrom.c                  | 1 +
 arch/arm/mach-s5pc1xx/cache.c                     | 1 +
 arch/arm/mach-socfpga/misc.c                      | 1 +
 arch/arm/mach-stm32mp/cpu.c                       | 1 +
 arch/arm/mach-stm32mp/psci.c                      | 1 +
 arch/arm/mach-sunxi/board.c                       | 1 +
 arch/arm/mach-tegra/board.c                       | 1 +
 arch/arm/mach-tegra/cboot.c                       | 1 +
 arch/arm/mach-tegra/tegra210/clock.c              | 1 +
 arch/arm/mach-u8500/cache.c                       | 1 +
 arch/arm/mach-uniphier/arm32/psci.c               | 1 +
 arch/arm/mach-uniphier/micro-support-card.c       | 3 ++-
 arch/arm/mach-versal/cpu.c                        | 1 +
 arch/arm/mach-zynq/cpu.c                          | 1 +
 arch/arm/mach-zynqmp/cpu.c                        | 1 +
 arch/m68k/cpu/mcf523x/cpu.c                       | 1 +
 arch/m68k/cpu/mcf52x2/cpu.c                       | 1 +
 arch/m68k/cpu/mcf532x/cpu.c                       | 1 +
 arch/m68k/cpu/mcf5445x/cpu.c                      | 1 +
 arch/m68k/cpu/mcf547x_8x/cpu.c                    | 1 +
 arch/microblaze/cpu/cache.c                       | 1 +
 arch/microblaze/lib/bootm.c                       | 1 +
 arch/mips/include/asm/cacheops.h                  | 2 ++
 arch/mips/lib/cache.c                             | 1 +
 arch/nds32/lib/cache.c                            | 1 +
 arch/powerpc/cpu/mpc83xx/cpu.c                    | 1 +
 arch/powerpc/cpu/mpc85xx/cpu_init.c               | 1 +
 arch/powerpc/cpu/mpc8xx/cpu.c                     | 1 +
 arch/powerpc/cpu/mpc8xxx/cpu.c                    | 1 +
 arch/riscv/cpu/ax25/cache.c                       | 1 +
 arch/riscv/cpu/generic/cpu.c                      | 1 +
 arch/sandbox/include/asm/eth.h                    | 2 ++
 arch/sh/cpu/sh4/cache.c                           | 1 +
 arch/sh/cpu/sh4/cpu.c                             | 1 +
 arch/x86/cpu/mtrr.c                               | 1 +
 arch/x86/cpu/quark/dram.c                         | 1 +
 arch/x86/include/asm/mp.h                         | 1 +
 arch/x86/lib/coreboot_table.c                     | 1 +
 board/AndesTech/adp-ae3xx/adp-ae3xx.c             | 1 +
 board/AndesTech/adp-ag101p/adp-ag101p.c           | 1 +
 board/AndesTech/ax25-ae350/ax25-ae350.c           | 1 +
 board/Arcturus/ucp1020/ucp1020.c                  | 1 +
 board/CZ.NIC/turris_mox/turris_mox.c              | 1 +
 board/CZ.NIC/turris_omnia/turris_omnia.c          | 1 +
 board/Marvell/db-88f6720/db-88f6720.c             | 1 +
 board/Marvell/db-88f6820-amc/db-88f6820-amc.c     | 1 +
 board/Marvell/db-88f6820-gp/db-88f6820-gp.c       | 1 +
 board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c       | 1 +
 board/Synology/ds414/cmd_syno.c                   | 1 +
 board/abilis/tb100/tb100.c                        | 1 +
 board/advantech/dms-ba16/dms-ba16.c               | 1 +
 board/amlogic/p200/p200.c                         | 1 +
 board/amlogic/p201/p201.c                         | 1 +
 board/amlogic/p212/p212.c                         | 1 +
 board/amlogic/q200/q200.c                         | 1 +
 board/amlogic/s400/s400.c                         | 1 +
 board/amlogic/sei510/sei510.c                     | 1 +
 board/amlogic/sei610/sei610.c                     | 1 +
 board/amlogic/u200/u200.c                         | 1 +
 board/amlogic/w400/w400.c                         | 1 +
 board/armltd/integrator/integrator.c              | 1 +
 board/armltd/vexpress/vexpress_common.c           | 1 +
 board/armltd/vexpress64/vexpress64.c              | 1 +
 board/atmel/at91rm9200ek/at91rm9200ek.c           | 1 +
 board/atmel/at91sam9n12ek/at91sam9n12ek.c         | 1 +
 board/atmel/common/mac-spi-nor.c                  | 1 +
 board/atmel/common/mac_eeprom.c                   | 1 +
 board/bachmann/ot1200/ot1200.c                    | 1 +
 board/barco/platinum/platinum.c                   | 1 +
 board/barco/titanium/titanium.c                   | 1 +
 board/birdland/bav335x/board.c                    | 1 +
 board/bluegiga/apx4devkit/apx4devkit.c            | 1 +
 board/bosch/shc/board.c                           | 1 +
 board/boundary/nitrogen6x/nitrogen6x.c            | 1 +
 board/broadcom/bcm_ep/board.c                     | 2 ++
 board/broadcom/bcmns2/northstar2.c                | 1 +
 board/cavium/thunderx/atf.c                       | 1 +
 board/cavium/thunderx/thunderx.c                  | 1 +
 board/ccv/xpress/xpress.c                         | 1 +
 board/cirrus/edb93xx/edb93xx.c                    | 1 +
 board/compulab/cl-som-imx7/cl-som-imx7.c          | 1 +
 board/compulab/cm_fx6/cm_fx6.c                    | 1 +
 board/compulab/cm_t335/cm_t335.c                  | 1 +
 board/compulab/cm_t43/cm_t43.c                    | 1 +
 board/compulab/cm_t54/cm_t54.c                    | 1 +
 board/congatec/cgtqmx6eval/cgtqmx6eval.c          | 1 +
 board/creative/xfi3/xfi3.c                        | 1 +
 board/dhelectronics/dh_imx6/dh_imx6.c             | 1 +
 board/dhelectronics/dh_stm32mp1/board.c           | 1 +
 board/el/el6x/el6x.c                              | 1 +
 board/embest/mx6boards/mx6boards.c                | 1 +
 board/esd/meesc/meesc.c                           | 1 +
 board/esd/vme8349/vme8349.c                       | 1 +
 board/freescale/b4860qds/eth_b4860qds.c           | 1 +
 board/freescale/bsc9132qds/bsc9132qds.c           | 1 +
 board/freescale/c29xpcie/c29xpcie.c               | 1 +
 board/freescale/common/ns_access.c                | 1 +
 board/freescale/corenet_ds/eth_hydra.c            | 1 +
 board/freescale/corenet_ds/eth_p4080.c            | 1 +
 board/freescale/corenet_ds/eth_superhydra.c       | 1 +
 board/freescale/ls1012afrdm/ls1012afrdm.c         | 1 +
 board/freescale/ls1012aqds/ls1012aqds.c           | 1 +
 board/freescale/ls1012ardb/ls1012ardb.c           | 1 +
 board/freescale/ls1021aiot/ls1021aiot.c           | 1 +
 board/freescale/ls1021aqds/eth.c                  | 1 +
 board/freescale/ls1021atsn/ls1021atsn.c           | 1 +
 board/freescale/ls1021atwr/ls1021atwr.c           | 1 +
 board/freescale/ls1028a/ls1028a.c                 | 1 +
 board/freescale/ls1043aqds/eth.c                  | 1 +
 board/freescale/ls1043ardb/eth.c                  | 1 +
 board/freescale/ls1046afrwy/eth.c                 | 1 +
 board/freescale/ls1046aqds/eth.c                  | 1 +
 board/freescale/ls1046ardb/eth.c                  | 1 +
 board/freescale/m5253demo/m5253demo.c             | 1 +
 board/freescale/mpc8308rdb/mpc8308rdb.c           | 1 +
 board/freescale/mpc8315erdb/mpc8315erdb.c         | 1 +
 board/freescale/mpc837xemds/mpc837xemds.c         | 1 +
 board/freescale/mpc8536ds/mpc8536ds.c             | 1 +
 board/freescale/mpc8544ds/mpc8544ds.c             | 1 +
 board/freescale/mpc8548cds/mpc8548cds.c           | 1 +
 board/freescale/mpc8572ds/mpc8572ds.c             | 1 +
 board/freescale/mpc8610hpcd/mpc8610hpcd.c         | 1 +
 board/freescale/mpc8641hpcn/mpc8641hpcn.c         | 1 +
 board/freescale/mx28evk/mx28evk.c                 | 1 +
 board/freescale/mx31pdk/mx31pdk.c                 | 1 +
 board/freescale/mx35pdk/mx35pdk.c                 | 1 +
 board/freescale/mx53ard/mx53ard.c                 | 1 +
 board/freescale/mx6qarm2/mx6qarm2.c               | 1 +
 board/freescale/mx6sabreauto/mx6sabreauto.c       | 1 +
 board/freescale/mx6sabresd/mx6sabresd.c           | 1 +
 board/freescale/mx6slevk/mx6slevk.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/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/eth.c                    | 1 +
 board/freescale/qemu-ppce500/qemu-ppce500.c       | 1 +
 board/freescale/t102xqds/eth_t102xqds.c           | 1 +
 board/freescale/t102xrdb/eth_t102xrdb.c           | 1 +
 board/freescale/t1040qds/eth.c                    | 1 +
 board/freescale/t104xrdb/eth.c                    | 1 +
 board/freescale/t208xqds/eth_t208xqds.c           | 1 +
 board/freescale/t208xrdb/eth_t208xrdb.c           | 1 +
 board/freescale/t4qds/eth.c                       | 1 +
 board/freescale/t4rdb/eth.c                       | 1 +
 board/gateworks/gw_ventana/gw_ventana.c           | 1 +
 board/gdsys/a38x/controlcenterdc.c                | 1 +
 board/gdsys/p1022/controlcenterd.c                | 1 +
 board/grinn/chiliboard/board.c                    | 1 +
 board/gumstix/duovero/duovero.c                   | 1 +
 board/gumstix/pepper/board.c                      | 1 +
 board/highbank/highbank.c                         | 1 +
 board/hisilicon/hikey960/hikey960.c               | 1 +
 board/hisilicon/poplar/poplar.c                   | 1 +
 board/imgtec/malta/malta.c                        | 1 +
 board/isee/igep003x/board.c                       | 1 +
 board/isee/igep00x0/igep00x0.c                    | 1 +
 board/k+p/kp_imx53/kp_id_rev.c                    | 1 +
 board/keymile/kmp204x/eth.c                       | 1 +
 board/kmc/kzm9g/kzm9g.c                           | 1 +
 board/kobol/helios4/helios4.c                     | 1 +
 board/liebherr/xea/xea.c                          | 1 +
 board/logicpd/am3517evm/am3517evm.c               | 1 +
 board/logicpd/omap3som/omap3logic.c               | 1 +
 board/logicpd/zoom1/zoom1.c                       | 1 +
 board/mpc8308_p1m/mpc8308_p1m.c                   | 1 +
 board/nvidia/p2371-2180/p2371-2180.c              | 1 +
 board/nvidia/p2771-0000/p2771-0000.c              | 1 +
 board/overo/overo.c                               | 1 +
 board/phytec/pcm051/board.c                       | 1 +
 board/phytec/pcm058/pcm058.c                      | 1 +
 board/phytec/pfla02/pfla02.c                      | 1 +
 board/phytec/phycore_rk3288/phycore-rk3288.c      | 1 +
 board/phytium/durian/durian.c                     | 1 +
 board/ppcag/bg0900/bg0900.c                       | 1 +
 board/qemu-mips/qemu-mips.c                       | 1 +
 board/qualcomm/dragonboard410c/dragonboard410c.c  | 2 ++
 board/qualcomm/dragonboard820c/dragonboard820c.c  | 1 +
 board/renesas/MigoR/migo_r.c                      | 1 +
 board/renesas/blanche/blanche.c                   | 1 +
 board/renesas/r2dplus/r2dplus.c                   | 1 +
 board/renesas/r7780mp/r7780mp.c                   | 1 +
 board/renesas/sh7752evb/sh7752evb.c               | 1 +
 board/renesas/sh7753evb/sh7753evb.c               | 1 +
 board/renesas/sh7757lcr/sh7757lcr.c               | 1 +
 board/rockchip/tinker_rk3288/tinker-rk3288.c      | 1 +
 board/samsung/common/board.c                      | 1 +
 board/samsung/smdkc100/smdkc100.c                 | 1 +
 board/samsung/smdkv310/smdkv310.c                 | 1 +
 board/sandisk/sansa_fuze_plus/sfp.c               | 1 +
 board/sbc8548/sbc8548.c                           | 1 +
 board/schulercontrol/sc_sps_1/sc_sps_1.c          | 1 +
 board/seco/mx6quq7/mx6quq7.c                      | 1 +
 board/siemens/draco/board.c                       | 1 +
 board/siemens/pxm2/board.c                        | 1 +
 board/siemens/rut/board.c                         | 1 +
 board/siemens/smartweb/smartweb.c                 | 1 +
 board/silica/pengwyn/board.c                      | 1 +
 board/sks-kinkel/sksimx6/sksimx6.c                | 1 +
 board/softing/vining_2000/vining_2000.c           | 1 +
 board/softing/vining_fpga/socfpga.c               | 1 +
 board/solidrun/clearfog/clearfog.c                | 1 +
 board/solidrun/mx6cuboxi/mx6cuboxi.c              | 1 +
 board/spear/spear300/spear300.c                   | 1 +
 board/spear/spear310/spear310.c                   | 1 +
 board/spear/spear320/spear320.c                   | 1 +
 board/spear/spear600/spear600.c                   | 1 +
 board/spear/x600/x600.c                           | 1 +
 board/st/stih410-b2260/board.c                    | 1 +
 board/st/stm32mp1/stm32mp1.c                      | 1 +
 board/st/stv0991/stv0991.c                        | 1 +
 board/synopsys/axs10x/axs10x.c                    | 1 +
 board/synopsys/hsdk/hsdk.c                        | 1 +
 board/tcl/sl50/board.c                            | 1 +
 board/technexion/pico-imx6/pico-imx6.c            | 1 +
 board/technexion/pico-imx6ul/pico-imx6ul.c        | 1 +
 board/technexion/pico-imx7d/pico-imx7d.c          | 1 +
 board/technologic/ts4800/ts4800.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/am65x/evm.c                              | 1 +
 board/ti/beagle/beagle.c                          | 1 +
 board/ti/common/board_detect.c                    | 1 +
 board/ti/dra7xx/evm.c                             | 1 +
 board/ti/evm/evm.c                                | 1 +
 board/ti/j721e/evm.c                              | 1 +
 board/ti/omap5_uevm/evm.c                         | 1 +
 board/ti/panda/panda.c                            | 1 +
 board/ti/sdp4430/sdp.c                            | 1 +
 board/ti/ti814x/evm.c                             | 1 +
 board/ti/ti816x/evm.c                             | 1 +
 board/toradex/apalis_imx6/apalis_imx6.c           | 1 +
 board/toradex/colibri_imx6/colibri_imx6.c         | 1 +
 board/toradex/colibri_imx7/colibri_imx7.c         | 1 +
 board/toradex/colibri_pxa270/colibri_pxa270.c     | 1 +
 board/toradex/common/tdx-cfg-block.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/variscite/dart_6ul/dart_6ul.c               | 1 +
 board/varisys/cyrus/eth.c                         | 1 +
 board/vscom/baltos/board.c                        | 1 +
 board/warp7/warp7.c                               | 1 +
 board/xilinx/versal/board.c                       | 1 +
 board/xilinx/zynqmp/zynqmp.c                      | 2 ++
 cmd/bdinfo.c                                      | 2 ++
 cmd/elf.c                                         | 1 +
 cmd/ethsw.c                                       | 1 +
 cmd/fat.c                                         | 1 +
 cmd/load.c                                        | 1 +
 cmd/mem.c                                         | 1 +
 cmd/mvebu/bubt.c                                  | 1 +
 cmd/nand.c                                        | 1 +
 cmd/nvedit.c                                      | 1 +
 cmd/pxe_utils.c                                   | 1 +
 cmd/sf.c                                          | 1 +
 cmd/tlv_eeprom.c                                  | 1 +
 cmd/ximg.c                                        | 1 +
 common/board_f.c                                  | 1 +
 common/board_r.c                                  | 1 +
 common/bootm.c                                    | 2 ++
 common/bouncebuf.c                                | 1 +
 common/fdt_support.c                              | 1 +
 common/hash.c                                     | 1 +
 common/image.c                                    | 1 +
 common/lcd.c                                      | 1 +
 common/log_syslog.c                               | 1 +
 common/main.c                                     | 1 +
 common/spl/spl_atf.c                              | 1 +
 common/spl/spl_fit.c                              | 1 +
 common/usb_storage.c                              | 1 +
 disk/part_efi.c                                   | 1 +
 disk/part_iso.c                                   | 1 +
 drivers/ata/dwc_ahsata.c                          | 1 +
 drivers/ata/sata_mv.c                             | 1 +
 drivers/bootcount/bootcount.c                     | 1 +
 drivers/bootcount/bootcount_ram.c                 | 1 +
 drivers/clk/clk_versal.c                          | 1 +
 drivers/core/device.c                             | 1 +
 drivers/crypto/ace_sha.c                          | 1 +
 drivers/crypto/fsl/fsl_blob.c                     | 1 +
 drivers/crypto/fsl/fsl_hash.c                     | 1 +
 drivers/crypto/fsl/jobdesc.c                      | 1 +
 drivers/crypto/fsl/jr.c                           | 2 ++
 drivers/ddr/altera/sdram_arria10.c                | 1 +
 drivers/ddr/altera/sdram_soc64.c                  | 1 +
 drivers/dma/apbh_dma.c                            | 1 +
 drivers/dma/bcm6348-iudma.c                       | 1 +
 drivers/dma/dma-uclass.c                          | 1 +
 drivers/dma/ti-edma3.c                            | 1 +
 drivers/dma/ti/k3-udma.c                          | 1 +
 drivers/firmware/firmware-zynqmp.c                | 1 +
 drivers/fpga/versalpl.c                           | 1 +
 drivers/fpga/zynqmppl.c                           | 1 +
 drivers/fpga/zynqpl.c                             | 1 +
 drivers/mmc/dw_mmc.c                              | 1 +
 drivers/mmc/fsl_esdhc.c                           | 1 +
 drivers/mmc/fsl_esdhc_imx.c                       | 1 +
 drivers/mmc/omap_hsmmc.c                          | 1 +
 drivers/mmc/sdhci.c                               | 1 +
 drivers/mmc/stm32_sdmmc2.c                        | 1 +
 drivers/mtd/nand/raw/denali.c                     | 3 +++
 drivers/mtd/nand/raw/mxs_nand.c                   | 1 +
 drivers/mtd/nand/raw/mxs_nand_spl.c               | 1 +
 drivers/mtd/nand/raw/nand_util.c                  | 1 +
 drivers/net/ag7xxx.c                              | 2 ++
 drivers/net/bcm-sf2-eth-gmac.c                    | 1 +
 drivers/net/bcmgenet.c                            | 1 +
 drivers/net/calxedaxgmac.c                        | 1 +
 drivers/net/designware.c                          | 2 ++
 drivers/net/designware.h                          | 3 +++
 drivers/net/dwc_eth_qos.c                         | 1 +
 drivers/net/e1000.c                               | 2 ++
 drivers/net/ep93xx_eth.c                          | 1 +
 drivers/net/fec_mxc.c                             | 1 +
 drivers/net/fm/init.c                             | 1 +
 drivers/net/fsl_enetc.c                           | 2 ++
 drivers/net/ftgmac100.c                           | 1 +
 drivers/net/ftmac110.c                            | 1 +
 drivers/net/gmac_rockchip.c                       | 1 +
 drivers/net/higmacv300.c                          | 1 +
 drivers/net/mt7628-eth.c                          | 1 +
 drivers/net/mtk_eth.c                             | 2 ++
 drivers/net/mvneta.c                              | 1 +
 drivers/net/mvpp2.c                               | 1 +
 drivers/net/pcnet.c                               | 1 +
 drivers/net/phy/aquantia.c                        | 1 +
 drivers/net/ravb.c                                | 1 +
 drivers/net/rtl8169.c                             | 1 +
 drivers/net/sh_eth.c                              | 1 +
 drivers/net/smc91111.h                            | 1 +
 drivers/net/smc911x.h                             | 2 ++
 drivers/net/sni_ave.c                             | 1 +
 drivers/net/sun8i_emac.c                          | 1 +
 drivers/net/ti/am65-cpsw-nuss.c                   | 1 +
 drivers/net/ti/davinci_emac.c                     | 1 +
 drivers/net/zynq_gem.c                            | 1 +
 drivers/ram/stm32mp1/stm32mp1_tests.c             | 1 +
 drivers/ram/stm32mp1/stm32mp1_tuning.c            | 1 +
 drivers/remoteproc/rproc-elf-loader.c             | 1 +
 drivers/rng/sandbox_rng.c                         | 1 +
 drivers/soc/ti/k3-navss-ringacc.c                 | 1 +
 drivers/spi/mxs_spi.c                             | 1 +
 drivers/spi/ti_qspi.c                             | 1 +
 drivers/spi/zynqmp_gqspi.c                        | 1 +
 drivers/usb/cdns3/ep0.c                           | 1 +
 drivers/usb/eth/asix.c                            | 1 +
 drivers/usb/eth/lan78xx.c                         | 1 +
 drivers/usb/eth/lan7x.c                           | 1 +
 drivers/usb/eth/mcs7830.c                         | 1 +
 drivers/usb/eth/r8152.c                           | 1 +
 drivers/usb/eth/smsc95xx.c                        | 1 +
 drivers/usb/eth/usb_ether.c                       | 2 ++
 drivers/usb/gadget/ci_udc.c                       | 1 +
 drivers/usb/host/dwc2.c                           | 1 +
 drivers/usb/host/ehci-hcd.c                       | 1 +
 drivers/usb/host/ohci-hcd.c                       | 1 +
 drivers/video/bcm2835.c                           | 1 +
 drivers/video/fsl_dcu_fb.c                        | 1 +
 drivers/video/imx/mxc_ipuv3_fb.c                  | 1 +
 drivers/video/mvebu_lcd.c                         | 1 +
 drivers/video/mxsfb.c                             | 1 +
 drivers/video/tegra.c                             | 1 +
 drivers/video/video-uclass.c                      | 1 +
 env/fat.c                                         | 1 +
 env/sf.c                                          | 1 +
 examples/standalone/smc911x_eeprom.c              | 1 +
 fs/ext4/ext4_common.h                             | 1 +
 fs/fat/fat.c                                      | 1 +
 fs/fat/fat_write.c                                | 1 +
 include/common.h                                  | 1 -
 include/dwmmc.h                                   | 1 +
 include/log.h                                     | 1 +
 include/net.h                                     | 9 ++++++---
 include/scsi.h                                    | 1 +
 lib/efi_loader/efi_device_path.c                  | 1 +
 lib/efi_loader/efi_memory.c                       | 1 +
 lib/efi_loader/efi_net.c                          | 1 +
 lib/efi_selftest/efi_selftest_block_device.c      | 1 +
 lib/efi_selftest/efi_selftest_console.c           | 1 +
 lib/efi_selftest/efi_selftest_snp.c               | 1 +
 lib/fdtdec.c                                      | 1 +
 lib/image-sparse.c                                | 1 +
 lib/linux_compat.c                                | 1 +
 lib/net_utils.c                                   | 1 +
 lib/uuid.c                                        | 1 +
 net/arp.c                                         | 1 +
 net/bootp.c                                       | 1 +
 net/ping.c                                        | 1 +
 test/lib/test_aes.c                               | 1 +
 470 files changed, 499 insertions(+), 5 deletions(-)

diff --git a/arch/arm/cpu/arm11/cpu.c b/arch/arm/cpu/arm11/cpu.c
index 177d1f40b9..ffe35111d5 100644
--- a/arch/arm/cpu/arm11/cpu.c
+++ b/arch/arm/cpu/arm11/cpu.c
@@ -18,6 +18,7 @@
 #include <command.h>
 #include <cpu_func.h>
 #include <irq_func.h>
+#include <asm/cache.h>
 #include <asm/system.h>
 
 static void cache_flush(void);
diff --git a/arch/arm/cpu/arm1136/mx35/generic.c b/arch/arm/cpu/arm1136/mx35/generic.c
index 45bf49b5ac..c78f2cbfc9 100644
--- a/arch/arm/cpu/arm1136/mx35/generic.c
+++ b/arch/arm/cpu/arm1136/mx35/generic.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <clock_legacy.h>
 #include <div64.h>
+#include <net.h>
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <asm/arch/imx-regs.h>
diff --git a/arch/arm/cpu/arm926ejs/cache.c b/arch/arm/cpu/arm926ejs/cache.c
index 7b7eaaf31d..acab9bccc0 100644
--- a/arch/arm/cpu/arm926ejs/cache.c
+++ b/arch/arm/cpu/arm926ejs/cache.c
@@ -4,6 +4,7 @@
  * Ilya Yanok, EmCraft Systems
  */
 #include <cpu_func.h>
+#include <asm/cache.h>
 #include <linux/types.h>
 #include <common.h>
 
diff --git a/arch/arm/cpu/arm926ejs/cpu.c b/arch/arm/cpu/arm926ejs/cpu.c
index 6ab320da7d..93d7a02ed4 100644
--- a/arch/arm/cpu/arm926ejs/cpu.c
+++ b/arch/arm/cpu/arm926ejs/cpu.c
@@ -16,6 +16,7 @@
 #include <command.h>
 #include <cpu_func.h>
 #include <irq_func.h>
+#include <asm/cache.h>
 #include <asm/system.h>
 
 static void cache_flush(void);
diff --git a/arch/arm/cpu/arm926ejs/lpc32xx/cpu.c b/arch/arm/cpu/arm926ejs/lpc32xx/cpu.c
index 4c59a44f7e..2bc3513abf 100644
--- a/arch/arm/cpu/arm926ejs/lpc32xx/cpu.c
+++ b/arch/arm/cpu/arm926ejs/lpc32xx/cpu.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/clk.h>
diff --git a/arch/arm/cpu/arm926ejs/mx25/generic.c b/arch/arm/cpu/arm926ejs/mx25/generic.c
index 09bda0e339..ef8d2d202d 100644
--- a/arch/arm/cpu/arm926ejs/mx25/generic.c
+++ b/arch/arm/cpu/arm926ejs/mx25/generic.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <clock_legacy.h>
 #include <div64.h>
+#include <net.h>
 #include <netdev.h>
 #include <vsprintf.h>
 #include <asm/io.h>
diff --git a/arch/arm/cpu/arm926ejs/mx27/generic.c b/arch/arm/cpu/arm926ejs/mx27/generic.c
index 9bed0e91be..a003ab816a 100644
--- a/arch/arm/cpu/arm926ejs/mx27/generic.c
+++ b/arch/arm/cpu/arm926ejs/mx27/generic.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <div64.h>
+#include <net.h>
 #include <netdev.h>
 #include <vsprintf.h>
 #include <asm/io.h>
diff --git a/arch/arm/cpu/arm926ejs/mxs/mxs.c b/arch/arm/cpu/arm926ejs/mxs/mxs.c
index 16c080a1e1..f65053c4b6 100644
--- a/arch/arm/cpu/arm926ejs/mxs/mxs.c
+++ b/arch/arm/cpu/arm926ejs/mxs/mxs.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <hang.h>
+#include <net.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
diff --git a/arch/arm/cpu/armv7/cache_v7.c b/arch/arm/cpu/armv7/cache_v7.c
index 99eb7db342..146cf52608 100644
--- a/arch/arm/cpu/armv7/cache_v7.c
+++ b/arch/arm/cpu/armv7/cache_v7.c
@@ -5,6 +5,7 @@
  * Aneesh V <aneesh@ti.com>
  */
 #include <cpu_func.h>
+#include <asm/cache.h>
 #include <linux/types.h>
 #include <common.h>
 #include <asm/armv7.h>
diff --git a/arch/arm/cpu/armv7/iproc-common/hwinit-common.c b/arch/arm/cpu/armv7/iproc-common/hwinit-common.c
index a5445338cb..896d2f9569 100644
--- a/arch/arm/cpu/armv7/iproc-common/hwinit-common.c
+++ b/arch/arm/cpu/armv7/iproc-common/hwinit-common.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <asm/cache.h>
 
 #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
 void enable_caches(void)
diff --git a/arch/arm/cpu/armv7/kona-common/hwinit-common.c b/arch/arm/cpu/armv7/kona-common/hwinit-common.c
index 6bf89e07d8..cfc7c9fbc6 100644
--- a/arch/arm/cpu/armv7/kona-common/hwinit-common.c
+++ b/arch/arm/cpu/armv7/kona-common/hwinit-common.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <asm/cache.h>
 #include <linux/sizes.h>
 
 #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
diff --git a/arch/arm/cpu/armv7/ls102xa/cpu.c b/arch/arm/cpu/armv7/ls102xa/cpu.c
index 664c9c1f4d..c544f38641 100644
--- a/arch/arm/cpu/armv7/ls102xa/cpu.c
+++ b/arch/arm/cpu/armv7/ls102xa/cpu.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <net.h>
 #include <vsprintf.h>
 #include <asm/arch/clock.h>
 #include <asm/io.h>
diff --git a/arch/arm/cpu/armv7/ls102xa/fdt.c b/arch/arm/cpu/armv7/ls102xa/fdt.c
index 16ab8676fe..56ca7b0164 100644
--- a/arch/arm/cpu/armv7/ls102xa/fdt.c
+++ b/arch/arm/cpu/armv7/ls102xa/fdt.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <net.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <asm/io.h>
diff --git a/arch/arm/cpu/armv7/sunxi/psci.c b/arch/arm/cpu/armv7/sunxi/psci.c
index 2c5d99e9ac..1ac50f558a 100644
--- a/arch/arm/cpu/armv7/sunxi/psci.c
+++ b/arch/arm/cpu/armv7/sunxi/psci.c
@@ -8,6 +8,7 @@
  */
 #include <config.h>
 #include <common.h>
+#include <asm/cache.h>
 
 #include <asm/arch/cpu.h>
 #include <asm/arch/cpucfg.h>
diff --git a/arch/arm/cpu/armv7/vf610/generic.c b/arch/arm/cpu/armv7/vf610/generic.c
index 6698b821d0..c1ba69893f 100644
--- a/arch/arm/cpu/armv7/vf610/generic.c
+++ b/arch/arm/cpu/armv7/vf610/generic.c
@@ -6,6 +6,8 @@
 #include <common.h>
 #include <clock_legacy.h>
 #include <cpu_func.h>
+#include <net.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
diff --git a/arch/arm/cpu/armv7/virt-v7.c b/arch/arm/cpu/armv7/virt-v7.c
index 26c93393cd..5ffeca13d9 100644
--- a/arch/arm/cpu/armv7/virt-v7.c
+++ b/arch/arm/cpu/armv7/virt-v7.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <asm/armv7.h>
+#include <asm/cache.h>
 #include <asm/gic.h>
 #include <asm/io.h>
 #include <asm/secure.h>
diff --git a/arch/arm/cpu/armv7m/cache.c b/arch/arm/cpu/armv7m/cache.c
index 7353698557..f607b77d41 100644
--- a/arch/arm/cpu/armv7m/cache.c
+++ b/arch/arm/cpu/armv7m/cache.c
@@ -8,6 +8,7 @@
 #include <cpu_func.h>
 #include <errno.h>
 #include <asm/armv7m.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 
 /* Cache maintenance operation registers */
diff --git a/arch/arm/cpu/armv8/cache_v8.c b/arch/arm/cpu/armv8/cache_v8.c
index 6a5518f9de..a64bc1bde2 100644
--- a/arch/arm/cpu/armv8/cache_v8.c
+++ b/arch/arm/cpu/armv8/cache_v8.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <hang.h>
+#include <asm/cache.h>
 #include <asm/system.h>
 #include <asm/armv8/mmu.h>
 
diff --git a/arch/arm/cpu/armv8/cpu-dt.c b/arch/arm/cpu/armv8/cpu-dt.c
index 267abb83e8..97d4473a68 100644
--- a/arch/arm/cpu/armv8/cpu-dt.c
+++ b/arch/arm/cpu/armv8/cpu-dt.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <asm/cache.h>
 #include <asm/psci.h>
 #include <asm/system.h>
 #include <asm/armv8/sec_firmware.h>
diff --git a/arch/arm/cpu/armv8/cpu.c b/arch/arm/cpu/armv8/cpu.c
index 35752037bc..ea40c55dd2 100644
--- a/arch/arm/cpu/armv8/cpu.c
+++ b/arch/arm/cpu/armv8/cpu.c
@@ -14,6 +14,7 @@
 #include <command.h>
 #include <cpu_func.h>
 #include <irq_func.h>
+#include <asm/cache.h>
 #include <asm/system.h>
 #include <asm/secure.h>
 #include <linux/compiler.h>
diff --git a/arch/arm/cpu/armv8/exception_level.c b/arch/arm/cpu/armv8/exception_level.c
index 9c1f4a8ca8..10dd034c7b 100644
--- a/arch/arm/cpu/armv8/exception_level.c
+++ b/arch/arm/cpu/armv8/exception_level.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <bootm.h>
 #include <cpu_func.h>
+#include <asm/cache.h>
 #include <asm/setjmp.h>
 
 /**
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
index b3f5c2f641..19c642a022 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
@@ -10,7 +10,9 @@
 #include <fsl_ddr_sdram.h>
 #include <init.h>
 #include <hang.h>
+#include <net.h>
 #include <vsprintf.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <asm/system.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
index 3bbad827cb..1d94c7e0f8 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <clock_legacy.h>
 #include <efi_loader.h>
+#include <asm/cache.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <phy.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/mp.c b/arch/arm/cpu/armv8/fsl-layerscape/mp.c
index ca07c68863..4e779dde1d 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/mp.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/mp.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/system.h>
 #include <asm/arch/mp.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/ppa.c b/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
index d391f93041..daaaeab26c 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
@@ -6,6 +6,7 @@
 #include <malloc.h>
 #include <config.h>
 #include <errno.h>
+#include <asm/cache.h>
 #include <asm/system.h>
 #include <asm/types.h>
 #include <asm/arch/soc.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/soc.c b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
index 28bb1d7401..664f12e861 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/soc.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
@@ -14,6 +14,7 @@
 #include <linux/sizes.h>
 #include <asm/arch/fsl_serdes.h>
 #include <asm/arch/soc.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/global_data.h>
 #include <asm/arch-fsl-layerscape/config.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/spl.c b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
index accad6e8ae..2c0ce80c0c 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/spl.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
@@ -8,6 +8,7 @@
 #include <cpu_func.h>
 #include <env.h>
 #include <spl.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <fsl_ifc.h>
 #include <i2c.h>
diff --git a/arch/arm/cpu/armv8/fwcall.c b/arch/arm/cpu/armv8/fwcall.c
index 4bffec9560..b29bc30fc2 100644
--- a/arch/arm/cpu/armv8/fwcall.c
+++ b/arch/arm/cpu/armv8/fwcall.c
@@ -8,6 +8,7 @@
 #include <asm-offsets.h>
 #include <config.h>
 #include <version.h>
+#include <asm/cache.h>
 #include <asm/macro.h>
 #include <asm/psci.h>
 #include <asm/ptrace.h>
diff --git a/arch/arm/cpu/armv8/s32v234/cpu.c b/arch/arm/cpu/armv8/s32v234/cpu.c
index b5a9513ead..f910b6ed72 100644
--- a/arch/arm/cpu/armv8/s32v234/cpu.c
+++ b/arch/arm/cpu/armv8/s32v234/cpu.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/system.h>
 #include <asm/armv8/mmu.h>
diff --git a/arch/arm/cpu/armv8/s32v234/generic.c b/arch/arm/cpu/armv8/s32v234/generic.c
index ec4641dcdb..98f526e252 100644
--- a/arch/arm/cpu/armv8/s32v234/generic.c
+++ b/arch/arm/cpu/armv8/s32v234/generic.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <clock_legacy.h>
 #include <cpu_func.h>
+#include <net.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
diff --git a/arch/arm/cpu/armv8/sec_firmware.c b/arch/arm/cpu/armv8/sec_firmware.c
index 95ea57d571..36f40a4015 100644
--- a/arch/arm/cpu/armv8/sec_firmware.c
+++ b/arch/arm/cpu/armv8/sec_firmware.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <errno.h>
+#include <asm/cache.h>
 #include <linux/kernel.h>
 #include <asm/io.h>
 #include <asm/system.h>
diff --git a/arch/arm/cpu/pxa/cache.c b/arch/arm/cpu/pxa/cache.c
index d4dfe7f6d8..a2ec5e28c7 100644
--- a/arch/arm/cpu/pxa/cache.c
+++ b/arch/arm/cpu/pxa/cache.c
@@ -4,6 +4,7 @@
  */
 
 #include <cpu_func.h>
+#include <asm/cache.h>
 #include <linux/types.h>
 #include <common.h>
 
diff --git a/arch/arm/cpu/pxa/pxa2xx.c b/arch/arm/cpu/pxa/pxa2xx.c
index 002ff7988b..ecf85d2f14 100644
--- a/arch/arm/cpu/pxa/pxa2xx.c
+++ b/arch/arm/cpu/pxa/pxa2xx.c
@@ -13,6 +13,7 @@
 #include <cpu_func.h>
 #include <irq_func.h>
 #include <asm/arch/pxa-regs.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/system.h>
 #include <command.h>
diff --git a/arch/arm/include/asm/arch-tegra/cboot.h b/arch/arm/include/asm/arch-tegra/cboot.h
index 021c246175..4e1da98d1f 100644
--- a/arch/arm/include/asm/arch-tegra/cboot.h
+++ b/arch/arm/include/asm/arch-tegra/cboot.h
@@ -6,7 +6,10 @@
 #ifndef _TEGRA_CBOOT_H_
 #define _TEGRA_CBOOT_H_
 
+#include <net.h>
+
 #ifdef CONFIG_ARM64
+
 extern unsigned long cboot_boot_x0;
 
 void cboot_save_boot_params(unsigned long x0, unsigned long x1,
diff --git a/arch/arm/include/asm/mach-imx/dma.h b/arch/arm/include/asm/mach-imx/dma.h
index ca70731b9e..8586f3a04d 100644
--- a/arch/arm/include/asm/mach-imx/dma.h
+++ b/arch/arm/include/asm/mach-imx/dma.h
@@ -12,6 +12,7 @@
 #ifndef __DMA_H__
 #define __DMA_H__
 
+#include <asm/cache.h>
 #include <linux/list.h>
 #include <linux/compiler.h>
 
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index f4b5ca6de0..dc845a997f 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -29,6 +29,7 @@
 #include <linux/compiler.h>
 #include <bootm.h>
 #include <vxworks.h>
+#include <asm/cache.h>
 
 #ifdef CONFIG_ARMV7_NONSEC
 #include <asm/armv7.h>
diff --git a/arch/arm/lib/cache.c b/arch/arm/lib/cache.c
index 224f2aef14..d5c67c11de 100644
--- a/arch/arm/lib/cache.c
+++ b/arch/arm/lib/cache.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <malloc.h>
+#include <asm/cache.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/lib/psci-dt.c b/arch/arm/lib/psci-dt.c
index 246f3c7cb8..0ed29a43f1 100644
--- a/arch/arm/lib/psci-dt.c
+++ b/arch/arm/lib/psci-dt.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <asm/cache.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <linux/sizes.h>
diff --git a/arch/arm/lib/spl.c b/arch/arm/lib/spl.c
index 33cc76ba3d..8a24e34f62 100644
--- a/arch/arm/lib/spl.c
+++ b/arch/arm/lib/spl.c
@@ -11,6 +11,7 @@
 #include <config.h>
 #include <spl.h>
 #include <image.h>
+#include <asm/cache.h>
 #include <linux/compiler.h>
 #include <asm/mach-types.h>
 
diff --git a/arch/arm/mach-bcm283x/mbox.c b/arch/arm/mach-bcm283x/mbox.c
index 1785550642..da0b4feacb 100644
--- a/arch/arm/mach-bcm283x/mbox.c
+++ b/arch/arm/mach-bcm283x/mbox.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/arch/base.h>
 #include <asm/arch/mbox.h>
diff --git a/arch/arm/mach-exynos/lowlevel_init.c b/arch/arm/mach-exynos/lowlevel_init.c
index 1e090fd63c..ecd0105121 100644
--- a/arch/arm/mach-exynos/lowlevel_init.c
+++ b/arch/arm/mach-exynos/lowlevel_init.c
@@ -26,6 +26,7 @@
 #include <common.h>
 #include <config.h>
 #include <debug_uart.h>
+#include <asm/system.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/dmc.h>
 #include <asm/arch/power.h>
diff --git a/arch/arm/mach-exynos/soc.c b/arch/arm/mach-exynos/soc.c
index c4cf59dabb..810fa348ee 100644
--- a/arch/arm/mach-exynos/soc.c
+++ b/arch/arm/mach-exynos/soc.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/system.h>
 
diff --git a/arch/arm/mach-exynos/spl_boot.c b/arch/arm/mach-exynos/spl_boot.c
index 103bb38d45..8b2c5c79c0 100644
--- a/arch/arm/mach-exynos/spl_boot.c
+++ b/arch/arm/mach-exynos/spl_boot.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <config.h>
 
+#include <asm/cache.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/clk.h>
 #include <asm/arch/dmc.h>
diff --git a/arch/arm/mach-imx/cache.c b/arch/arm/mach-imx/cache.c
index 4fd2e43448..4e3b49a3fd 100644
--- a/arch/arm/mach-imx/cache.c
+++ b/arch/arm/mach-imx/cache.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <asm/armv7.h>
+#include <asm/cache.h>
 #include <asm/pl310.h>
 #include <asm/io.h>
 #include <asm/mach-imx/sys_proto.h>
diff --git a/arch/arm/mach-imx/cpu.c b/arch/arm/mach-imx/cpu.c
index e83f6934cd..0a2c43378f 100644
--- a/arch/arm/mach-imx/cpu.c
+++ b/arch/arm/mach-imx/cpu.c
@@ -8,6 +8,7 @@
 
 #include <bootm.h>
 #include <common.h>
+#include <net.h>
 #include <netdev.h>
 #include <linux/errno.h>
 #include <asm/io.h>
diff --git a/arch/arm/mach-imx/imx8/cpu.c b/arch/arm/mach-imx/imx8/cpu.c
index 2110380957..4c965158fc 100644
--- a/arch/arm/mach-imx/imx8/cpu.c
+++ b/arch/arm/mach-imx/imx8/cpu.c
@@ -9,6 +9,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <init.h>
+#include <asm/cache.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
 #include <dm/uclass.h>
diff --git a/arch/arm/mach-imx/mx5/soc.c b/arch/arm/mach-imx/mx5/soc.c
index b3a57bcf4b..c61fcce3eb 100644
--- a/arch/arm/mach-imx/mx5/soc.c
+++ b/arch/arm/mach-imx/mx5/soc.c
@@ -11,6 +11,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/cache.h>
 
 #include <linux/errno.h>
 #include <asm/io.h>
diff --git a/arch/arm/mach-imx/mx7/psci-mx7.c b/arch/arm/mach-imx/mx7/psci-mx7.c
index c8f6ca235b..f32945ea37 100644
--- a/arch/arm/mach-imx/mx7/psci-mx7.c
+++ b/arch/arm/mach-imx/mx7/psci-mx7.c
@@ -5,6 +5,7 @@
  */
 
 #include <cpu_func.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/psci.h>
 #include <asm/secure.h>
diff --git a/arch/arm/mach-imx/sip.c b/arch/arm/mach-imx/sip.c
index fca520c671..a4f0ab4886 100644
--- a/arch/arm/mach-imx/sip.c
+++ b/arch/arm/mach-imx/sip.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/cache.h>
 
 unsigned long call_imx_sip(unsigned long id, unsigned long reg0,
 			   unsigned long reg1, unsigned long reg2,
diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c
index 80dfa5f0fd..33273b8eff 100644
--- a/arch/arm/mach-k3/common.c
+++ b/arch/arm/mach-k3/common.c
@@ -12,6 +12,7 @@
 #include "common.h"
 #include <dm.h>
 #include <remoteproc.h>
+#include <asm/cache.h>
 #include <linux/soc/ti/ti_sci_protocol.h>
 #include <fdt_support.h>
 #include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-k3/security.c b/arch/arm/mach-k3/security.c
index 0d77d98359..dd7c998487 100644
--- a/arch/arm/mach-k3/security.c
+++ b/arch/arm/mach-k3/security.c
@@ -10,6 +10,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <hang.h>
+#include <asm/cache.h>
 #include <linux/soc/ti/ti_sci_protocol.h>
 #include <mach/spl.h>
 #include <spl.h>
diff --git a/arch/arm/mach-k3/sysfw-loader.c b/arch/arm/mach-k3/sysfw-loader.c
index 4f5c848245..6d54b65f08 100644
--- a/arch/arm/mach-k3/sysfw-loader.c
+++ b/arch/arm/mach-k3/sysfw-loader.c
@@ -10,6 +10,7 @@
 #include <spl.h>
 #include <malloc.h>
 #include <remoteproc.h>
+#include <asm/cache.h>
 #include <linux/soc/ti/ti_sci_protocol.h>
 #include <g_dnl.h>
 #include <usb.h>
diff --git a/arch/arm/mach-keystone/init.c b/arch/arm/mach-keystone/init.c
index 375588894d..59fd029e4c 100644
--- a/arch/arm/mach-keystone/init.c
+++ b/arch/arm/mach-keystone/init.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <ns16550.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/arch/msmc.h>
 #include <asm/arch/clock.h>
diff --git a/arch/arm/mach-kirkwood/cache.c b/arch/arm/mach-kirkwood/cache.c
index 6b12ea5e91..009b7deeca 100644
--- a/arch/arm/mach-kirkwood/cache.c
+++ b/arch/arm/mach-kirkwood/cache.c
@@ -5,6 +5,7 @@
  */
 #include <common.h>
 #include <asm/arch/cpu.h>
+#include <asm/cache.h>
 
 #define FEROCEON_EXTRA_FEATURE_L2C_EN (1<<22)
 
diff --git a/arch/arm/mach-kirkwood/cpu.c b/arch/arm/mach-kirkwood/cpu.c
index 5e964af8ea..c56620dc5a 100644
--- a/arch/arm/mach-kirkwood/cpu.c
+++ b/arch/arm/mach-kirkwood/cpu.c
@@ -9,6 +9,7 @@
 #include <command.h>
 #include <cpu_func.h>
 #include <env.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/cache.h>
 #include <asm/io.h>
diff --git a/arch/arm/mach-mediatek/mt7622/init.c b/arch/arm/mach-mediatek/mt7622/init.c
index 1e527c0485..a715378127 100644
--- a/arch/arm/mach-mediatek/mt7622/init.c
+++ b/arch/arm/mach-mediatek/mt7622/init.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <fdtdec.h>
 #include <asm/armv8/mmu.h>
+#include <asm/cache.h>
 
 int print_cpuinfo(void)
 {
diff --git a/arch/arm/mach-mediatek/mt8512/init.c b/arch/arm/mach-mediatek/mt8512/init.c
index a38b5d12d9..4e6b710c11 100644
--- a/arch/arm/mach-mediatek/mt8512/init.c
+++ b/arch/arm/mach-mediatek/mt8512/init.c
@@ -14,6 +14,7 @@
 #include <wdt.h>
 #include <asm/arch/misc.h>
 #include <asm/armv8/mmu.h>
+#include <asm/cache.h>
 #include <asm/sections.h>
 #include <dm/uclass.h>
 #include <dt-bindings/clock/mt8512-clk.h>
diff --git a/arch/arm/mach-mediatek/mt8516/init.c b/arch/arm/mach-mediatek/mt8516/init.c
index 360d94abb0..b038437a17 100644
--- a/arch/arm/mach-mediatek/mt8516/init.c
+++ b/arch/arm/mach-mediatek/mt8516/init.c
@@ -13,6 +13,7 @@
 #include <ram.h>
 #include <asm/arch/misc.h>
 #include <asm/armv8/mmu.h>
+#include <asm/cache.h>
 #include <asm/sections.h>
 #include <dm/uclass.h>
 #include <dt-bindings/clock/mt8516-clk.h>
diff --git a/arch/arm/mach-mediatek/mt8518/init.c b/arch/arm/mach-mediatek/mt8518/init.c
index c2b1b76982..c46cc5fcaf 100644
--- a/arch/arm/mach-mediatek/mt8518/init.c
+++ b/arch/arm/mach-mediatek/mt8518/init.c
@@ -14,6 +14,7 @@
 #include <ram.h>
 #include <asm/arch/misc.h>
 #include <asm/armv8/mmu.h>
+#include <asm/cache.h>
 #include <asm/sections.h>
 #include <dm/uclass.h>
 #include <dt-bindings/clock/mt8518-clk.h>
diff --git a/arch/arm/mach-meson/board-axg.c b/arch/arm/mach-meson/board-axg.c
index 6874458e36..5e0b3f6cb5 100644
--- a/arch/arm/mach-meson/board-axg.c
+++ b/arch/arm/mach-meson/board-axg.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <net.h>
 #include <asm/arch/boot.h>
 #include <asm/arch/eth.h>
 #include <asm/arch/axg.h>
diff --git a/arch/arm/mach-meson/board-common.c b/arch/arm/mach-meson/board-common.c
index bc4c92074c..3a7cffcab3 100644
--- a/arch/arm/mach-meson/board-common.c
+++ b/arch/arm/mach-meson/board-common.c
@@ -6,8 +6,10 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <init.h>
+#include <net.h>
 #include <asm/arch/boot.h>
 #include <env.h>
+#include <asm/cache.h>
 #include <linux/libfdt.h>
 #include <linux/err.h>
 #include <asm/arch/mem.h>
diff --git a/arch/arm/mach-meson/board-g12a.c b/arch/arm/mach-meson/board-g12a.c
index 26d6b90790..fc1729edd3 100644
--- a/arch/arm/mach-meson/board-g12a.c
+++ b/arch/arm/mach-meson/board-g12a.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <net.h>
 #include <asm/arch/boot.h>
 #include <asm/arch/eth.h>
 #include <asm/arch/g12a.h>
diff --git a/arch/arm/mach-meson/board-gx.c b/arch/arm/mach-meson/board-gx.c
index 3da99017a5..5d5a293b08 100644
--- a/arch/arm/mach-meson/board-gx.c
+++ b/arch/arm/mach-meson/board-gx.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <net.h>
 #include <asm/arch/boot.h>
 #include <asm/arch/eth.h>
 #include <asm/arch/gx.h>
diff --git a/arch/arm/mach-meson/sm.c b/arch/arm/mach-meson/sm.c
index fac286b9c8..dacc897533 100644
--- a/arch/arm/mach-meson/sm.c
+++ b/arch/arm/mach-meson/sm.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <asm/arch/sm.h>
+#include <asm/cache.h>
 #include <linux/err.h>
 #include <linux/kernel.h>
 #include <dm.h>
diff --git a/arch/arm/mach-mvebu/arm64-common.c b/arch/arm/mach-mvebu/arm64-common.c
index 34cc0479a8..3a92a55a49 100644
--- a/arch/arm/mach-mvebu/arm64-common.c
+++ b/arch/arm/mach-mvebu/arm64-common.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <init.h>
+#include <asm/cache.h>
 #include <linux/libfdt.h>
 #include <linux/sizes.h>
 #include <pci.h>
diff --git a/arch/arm/mach-omap2/am33xx/board.c b/arch/arm/mach-omap2/am33xx/board.c
index 283f73522d..533601eac4 100644
--- a/arch/arm/mach-omap2/am33xx/board.c
+++ b/arch/arm/mach-omap2/am33xx/board.c
@@ -12,6 +12,7 @@
 #include <debug_uart.h>
 #include <errno.h>
 #include <init.h>
+#include <net.h>
 #include <ns16550.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
diff --git a/arch/arm/mach-omap2/omap3/emac.c b/arch/arm/mach-omap2/omap3/emac.c
index fb0c9188f5..eecc5d334e 100644
--- a/arch/arm/mach-omap2/omap3/emac.c
+++ b/arch/arm/mach-omap2/omap3/emac.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <net.h>
 #include <asm/io.h>
 #include <asm/arch/am35x_def.h>
 
diff --git a/arch/arm/mach-orion5x/cpu.c b/arch/arm/mach-orion5x/cpu.c
index 5a693e20bb..7d57dd257f 100644
--- a/arch/arm/mach-orion5x/cpu.c
+++ b/arch/arm/mach-orion5x/cpu.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/cache.h>
 #include <asm/io.h>
diff --git a/arch/arm/mach-owl/soc.c b/arch/arm/mach-owl/soc.c
index 409cbd319f..8a434bd496 100644
--- a/arch/arm/mach-owl/soc.c
+++ b/arch/arm/mach-owl/soc.c
@@ -6,6 +6,7 @@
  */
 
 #include <cpu_func.h>
+#include <asm/cache.h>
 #include <linux/arm-smccc.h>
 #include <linux/psci.h>
 #include <common.h>
diff --git a/arch/arm/mach-rmobile/cpu_info.c b/arch/arm/mach-rmobile/cpu_info.c
index 2cc701c4f5..9b34cba047 100644
--- a/arch/arm/mach-rmobile/cpu_info.c
+++ b/arch/arm/mach-rmobile/cpu_info.c
@@ -5,6 +5,7 @@
  */
 #include <common.h>
 #include <cpu_func.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <env.h>
 #include <linux/ctype.h>
diff --git a/arch/arm/mach-rmobile/emac.c b/arch/arm/mach-rmobile/emac.c
index f9cd89a131..3211dfee02 100644
--- a/arch/arm/mach-rmobile/emac.c
+++ b/arch/arm/mach-rmobile/emac.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <net.h>
 #include <linux/errno.h>
 #include <netdev.h>
 
diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c
index 14b9e89ea3..9f26b8d16c 100644
--- a/arch/arm/mach-rockchip/board.c
+++ b/arch/arm/mach-rockchip/board.c
@@ -9,6 +9,7 @@
 #include <init.h>
 #include <ram.h>
 #include <syscon.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/boot_mode.h>
 #include <asm/arch-rockchip/clock.h>
diff --git a/arch/arm/mach-rockchip/bootrom.c b/arch/arm/mach-rockchip/bootrom.c
index 1524eca272..b36e559e87 100644
--- a/arch/arm/mach-rockchip/bootrom.c
+++ b/arch/arm/mach-rockchip/bootrom.c
@@ -7,6 +7,7 @@
 #include <hang.h>
 #include <asm/arch-rockchip/bootrom.h>
 #include <asm/arch-rockchip/boot_mode.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/setjmp.h>
 #include <asm/system.h>
diff --git a/arch/arm/mach-s5pc1xx/cache.c b/arch/arm/mach-s5pc1xx/cache.c
index 7816ba1177..b390bdf827 100644
--- a/arch/arm/mach-s5pc1xx/cache.c
+++ b/arch/arm/mach-s5pc1xx/cache.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <asm/cache.h>
 
 #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
 void enable_caches(void)
diff --git a/arch/arm/mach-socfpga/misc.c b/arch/arm/mach-socfpga/misc.c
index 2901b7db68..0158f4f04c 100644
--- a/arch/arm/mach-socfpga/misc.c
+++ b/arch/arm/mach-socfpga/misc.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <hang.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <errno.h>
 #include <fdtdec.h>
diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c
index 74d03fa7dd..603c690a3d 100644
--- a/arch/arm/mach-stm32mp/cpu.c
+++ b/arch/arm/mach-stm32mp/cpu.c
@@ -8,6 +8,7 @@
 #include <debug_uart.h>
 #include <env.h>
 #include <misc.h>
+#include <net.h>
 #include <asm/io.h>
 #include <asm/arch/stm32.h>
 #include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-stm32mp/psci.c b/arch/arm/mach-stm32mp/psci.c
index 3fb038d3e7..19f1acfe23 100644
--- a/arch/arm/mach-stm32mp/psci.c
+++ b/arch/arm/mach-stm32mp/psci.c
@@ -6,6 +6,7 @@
 #include <config.h>
 #include <common.h>
 #include <asm/armv7.h>
+#include <asm/cache.h>
 #include <asm/gic.h>
 #include <asm/io.h>
 #include <asm/psci.h>
diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c
index b487b265af..11b333b563 100644
--- a/arch/arm/mach-sunxi/board.c
+++ b/arch/arm/mach-sunxi/board.c
@@ -15,6 +15,7 @@
 #include <i2c.h>
 #include <serial.h>
 #include <spl.h>
+#include <asm/cache.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
diff --git a/arch/arm/mach-tegra/board.c b/arch/arm/mach-tegra/board.c
index 31c49a7c84..267bfde09d 100644
--- a/arch/arm/mach-tegra/board.c
+++ b/arch/arm/mach-tegra/board.c
@@ -10,6 +10,7 @@
 #include <init.h>
 #include <ns16550.h>
 #include <spl.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #if IS_ENABLED(CONFIG_TEGRA_CLKRST)
 #include <asm/arch/clock.h>
diff --git a/arch/arm/mach-tegra/cboot.c b/arch/arm/mach-tegra/cboot.c
index 390229436e..4416827220 100644
--- a/arch/arm/mach-tegra/cboot.c
+++ b/arch/arm/mach-tegra/cboot.c
@@ -9,6 +9,7 @@
 #include <fdtdec.h>
 #include <hang.h>
 #include <malloc.h>
+#include <net.h>
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/arch/arm/mach-tegra/tegra210/clock.c b/arch/arm/mach-tegra/tegra210/clock.c
index 00c65c281f..492f4d8c11 100644
--- a/arch/arm/mach-tegra/tegra210/clock.c
+++ b/arch/arm/mach-tegra/tegra210/clock.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <errno.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sysctr.h>
diff --git a/arch/arm/mach-u8500/cache.c b/arch/arm/mach-u8500/cache.c
index 3d96d09f31..f9fd4fe7d3 100644
--- a/arch/arm/mach-u8500/cache.c
+++ b/arch/arm/mach-u8500/cache.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <asm/armv7.h>
+#include <asm/cache.h>
 #include <asm/pl310.h>
 
 #define PL310_WAY_MASK	0xff
diff --git a/arch/arm/mach-uniphier/arm32/psci.c b/arch/arm/mach-uniphier/arm32/psci.c
index 9a3793316a..e231e7b60b 100644
--- a/arch/arm/mach-uniphier/arm32/psci.c
+++ b/arch/arm/mach-uniphier/arm32/psci.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <asm/cache.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/io.h>
diff --git a/arch/arm/mach-uniphier/micro-support-card.c b/arch/arm/mach-uniphier/micro-support-card.c
index c71470a204..951e71430f 100644
--- a/arch/arm/mach-uniphier/micro-support-card.c
+++ b/arch/arm/mach-uniphier/micro-support-card.c
@@ -6,8 +6,9 @@
  */
 
 #include <common.h>
-#include <dm/of.h>
 #include <fdt_support.h>
+#include <net.h>
+#include <dm/of.h>
 #include <linux/ctype.h>
 #include <linux/io.h>
 
diff --git a/arch/arm/mach-versal/cpu.c b/arch/arm/mach-versal/cpu.c
index 1b760ba5de..71731f324f 100644
--- a/arch/arm/mach-versal/cpu.c
+++ b/arch/arm/mach-versal/cpu.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <asm/armv8/mmu.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-zynq/cpu.c b/arch/arm/mach-zynq/cpu.c
index aca44dfe67..43c5ca39d4 100644
--- a/arch/arm/mach-zynq/cpu.c
+++ b/arch/arm/mach-zynq/cpu.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <zynqpl.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/arch/clk.h>
 #include <asm/arch/hardware.h>
diff --git a/arch/arm/mach-zynqmp/cpu.c b/arch/arm/mach-zynqmp/cpu.c
index 811684a9f8..d832406434 100644
--- a/arch/arm/mach-zynqmp/cpu.c
+++ b/arch/arm/mach-zynqmp/cpu.c
@@ -9,6 +9,7 @@
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/armv8/mmu.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <zynqmp_firmware.h>
 #include <asm/cache.h>
diff --git a/arch/m68k/cpu/mcf523x/cpu.c b/arch/m68k/cpu/mcf523x/cpu.c
index 429781945b..8c808a6b0c 100644
--- a/arch/m68k/cpu/mcf523x/cpu.c
+++ b/arch/m68k/cpu/mcf523x/cpu.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <net.h>
 #include <vsprintf.h>
 #include <watchdog.h>
 #include <command.h>
diff --git a/arch/m68k/cpu/mcf52x2/cpu.c b/arch/m68k/cpu/mcf52x2/cpu.c
index b48a753f9b..5eee856392 100644
--- a/arch/m68k/cpu/mcf52x2/cpu.c
+++ b/arch/m68k/cpu/mcf52x2/cpu.c
@@ -14,6 +14,7 @@
  */
 
 #include <common.h>
+#include <net.h>
 #include <vsprintf.h>
 #include <watchdog.h>
 #include <command.h>
diff --git a/arch/m68k/cpu/mcf532x/cpu.c b/arch/m68k/cpu/mcf532x/cpu.c
index 6807992de5..32c477a5fd 100644
--- a/arch/m68k/cpu/mcf532x/cpu.c
+++ b/arch/m68k/cpu/mcf532x/cpu.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <net.h>
 #include <vsprintf.h>
 #include <watchdog.h>
 #include <command.h>
diff --git a/arch/m68k/cpu/mcf5445x/cpu.c b/arch/m68k/cpu/mcf5445x/cpu.c
index 2f79380c8b..1602369080 100644
--- a/arch/m68k/cpu/mcf5445x/cpu.c
+++ b/arch/m68k/cpu/mcf5445x/cpu.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <net.h>
 #include <vsprintf.h>
 #include <watchdog.h>
 #include <command.h>
diff --git a/arch/m68k/cpu/mcf547x_8x/cpu.c b/arch/m68k/cpu/mcf547x_8x/cpu.c
index dc5ed1aa79..51281549a3 100644
--- a/arch/m68k/cpu/mcf547x_8x/cpu.c
+++ b/arch/m68k/cpu/mcf547x_8x/cpu.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <net.h>
 #include <vsprintf.h>
 #include <watchdog.h>
 #include <command.h>
diff --git a/arch/microblaze/cpu/cache.c b/arch/microblaze/cpu/cache.c
index 02f66f9087..aa832d6be6 100644
--- a/arch/microblaze/cpu/cache.c
+++ b/arch/microblaze/cpu/cache.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <asm/asm.h>
+#include <asm/cache.h>
 
 int dcache_status(void)
 {
diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c
index 2d6a41be2f..87d2d6ee70 100644
--- a/arch/microblaze/lib/bootm.c
+++ b/arch/microblaze/lib/bootm.c
@@ -14,6 +14,7 @@
 #include <fdt_support.h>
 #include <hang.h>
 #include <image.h>
+#include <asm/cache.h>
 #include <u-boot/zlib.h>
 #include <asm/byteorder.h>
 
diff --git a/arch/mips/include/asm/cacheops.h b/arch/mips/include/asm/cacheops.h
index 98b67ccc8e..641e2ad58d 100644
--- a/arch/mips/include/asm/cacheops.h
+++ b/arch/mips/include/asm/cacheops.h
@@ -8,6 +8,8 @@
 #ifndef	__ASM_CACHEOPS_H
 #define	__ASM_CACHEOPS_H
 
+#include <asm/cache.h>
+
 #ifndef __ASSEMBLY__
 
 static inline void mips_cache(int op, const volatile void *addr)
diff --git a/arch/mips/lib/cache.c b/arch/mips/lib/cache.c
index 1a8c87d094..f05b24bd12 100644
--- a/arch/mips/lib/cache.c
+++ b/arch/mips/lib/cache.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <asm/cache.h>
 #include <asm/cacheops.h>
 #ifdef CONFIG_MIPS_L2_CACHE
 #include <asm/cm.h>
diff --git a/arch/nds32/lib/cache.c b/arch/nds32/lib/cache.c
index e11d300b6d..21917e5da5 100644
--- a/arch/nds32/lib/cache.c
+++ b/arch/nds32/lib/cache.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF))
+#include <asm/cache.h>
 static inline unsigned long CACHE_SET(unsigned char cache)
 {
 	if (cache == ICACHE)
diff --git a/arch/powerpc/cpu/mpc83xx/cpu.c b/arch/powerpc/cpu/mpc83xx/cpu.c
index f4e25f1f59..f0e3ada195 100644
--- a/arch/powerpc/cpu/mpc83xx/cpu.c
+++ b/arch/powerpc/cpu/mpc83xx/cpu.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <irq_func.h>
+#include <net.h>
 #include <time.h>
 #include <vsprintf.h>
 #include <watchdog.h>
diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init.c b/arch/powerpc/cpu/mpc85xx/cpu_init.c
index a9f39dc583..1c2d8edf60 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <env.h>
 #include <init.h>
+#include <net.h>
 #include <watchdog.h>
 #include <asm/processor.h>
 #include <ioports.h>
diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c
index 4a1698d3bc..9d6c08f17a 100644
--- a/arch/powerpc/cpu/mpc8xx/cpu.c
+++ b/arch/powerpc/cpu/mpc8xx/cpu.c
@@ -18,6 +18,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <net.h>
 #include <time.h>
 #include <vsprintf.h>
 #include <watchdog.h>
diff --git a/arch/powerpc/cpu/mpc8xxx/cpu.c b/arch/powerpc/cpu/mpc8xxx/cpu.c
index ed482a9c09..bb81f49ae7 100644
--- a/arch/powerpc/cpu/mpc8xxx/cpu.c
+++ b/arch/powerpc/cpu/mpc8xxx/cpu.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <command.h>
 #include <cpu_func.h>
+#include <net.h>
 #include <tsec.h>
 #include <fm_eth.h>
 #include <netdev.h>
diff --git a/arch/riscv/cpu/ax25/cache.c b/arch/riscv/cpu/ax25/cache.c
index 9df629d23c..35f23c748d 100644
--- a/arch/riscv/cpu/ax25/cache.c
+++ b/arch/riscv/cpu/ax25/cache.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <dm.h>
+#include <asm/cache.h>
 #include <dm/uclass-internal.h>
 #include <cache.h>
 #include <asm/csr.h>
diff --git a/arch/riscv/cpu/generic/cpu.c b/arch/riscv/cpu/generic/cpu.c
index 13a69ef0cc..d78e1a3453 100644
--- a/arch/riscv/cpu/generic/cpu.c
+++ b/arch/riscv/cpu/generic/cpu.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <irq_func.h>
+#include <asm/cache.h>
 
 /*
  * cleanup_before_linux() is called just before we call linux
diff --git a/arch/sandbox/include/asm/eth.h b/arch/sandbox/include/asm/eth.h
index 477fa00fad..b313bf57c6 100644
--- a/arch/sandbox/include/asm/eth.h
+++ b/arch/sandbox/include/asm/eth.h
@@ -9,6 +9,8 @@
 #ifndef __ETH_H
 #define __ETH_H
 
+#include <net.h>
+
 void sandbox_eth_disable_response(int index, bool disable);
 
 void sandbox_eth_skip_timeout(void);
diff --git a/arch/sh/cpu/sh4/cache.c b/arch/sh/cpu/sh4/cache.c
index 2f49ce8681..0f7dfdd3cf 100644
--- a/arch/sh/cpu/sh4/cache.c
+++ b/arch/sh/cpu/sh4/cache.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <command.h>
 #include <cpu_func.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/processor.h>
 #include <asm/system.h>
diff --git a/arch/sh/cpu/sh4/cpu.c b/arch/sh/cpu/sh4/cpu.c
index a8d0590d51..e94e980c0e 100644
--- a/arch/sh/cpu/sh4/cpu.c
+++ b/arch/sh/cpu/sh4/cpu.c
@@ -8,6 +8,7 @@
 #include <command.h>
 #include <irq_func.h>
 #include <cpu_func.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/processor.h>
 
diff --git a/arch/x86/cpu/mtrr.c b/arch/x86/cpu/mtrr.c
index a43cb7fc15..0e4402d68e 100644
--- a/arch/x86/cpu/mtrr.c
+++ b/arch/x86/cpu/mtrr.c
@@ -18,6 +18,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/msr.h>
 #include <asm/mtrr.h>
diff --git a/arch/x86/cpu/quark/dram.c b/arch/x86/cpu/quark/dram.c
index 2bf90dcfc6..30f4755626 100644
--- a/arch/x86/cpu/quark/dram.c
+++ b/arch/x86/cpu/quark/dram.c
@@ -9,6 +9,7 @@
 #include <fdtdec.h>
 #include <init.h>
 #include <malloc.h>
+#include <asm/cache.h>
 #include <asm/mrccache.h>
 #include <asm/mtrr.h>
 #include <asm/post.h>
diff --git a/arch/x86/include/asm/mp.h b/arch/x86/include/asm/mp.h
index fb59e2f67d..9dddf88b5a 100644
--- a/arch/x86/include/asm/mp.h
+++ b/arch/x86/include/asm/mp.h
@@ -9,6 +9,7 @@
 #define _X86_MP_H_
 
 #include <asm/atomic.h>
+#include <asm/cache.h>
 
 typedef int (*mp_callback_t)(struct udevice *cpu, void *arg);
 
diff --git a/arch/x86/lib/coreboot_table.c b/arch/x86/lib/coreboot_table.c
index c996fc588d..331c1b7e5a 100644
--- a/arch/x86/lib/coreboot_table.c
+++ b/arch/x86/lib/coreboot_table.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <malloc.h>
+#include <net.h>
 #include <vbe.h>
 #include <acpi/acpi_s3.h>
 #include <asm/coreboot_tables.h>
diff --git a/board/AndesTech/adp-ae3xx/adp-ae3xx.c b/board/AndesTech/adp-ae3xx/adp-ae3xx.c
index 8eb40bf295..54f7178b36 100644
--- a/board/AndesTech/adp-ae3xx/adp-ae3xx.c
+++ b/board/AndesTech/adp-ae3xx/adp-ae3xx.c
@@ -6,6 +6,7 @@
  */
 
 #include <init.h>
+#include <net.h>
 #include <asm/mach-types.h>
 #include <common.h>
 #include <flash.h>
diff --git a/board/AndesTech/adp-ag101p/adp-ag101p.c b/board/AndesTech/adp-ag101p/adp-ag101p.c
index d349b19648..23cdf4f578 100644
--- a/board/AndesTech/adp-ag101p/adp-ag101p.c
+++ b/board/AndesTech/adp-ag101p/adp-ag101p.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <flash.h>
 #include <init.h>
+#include <net.h>
 #if defined(CONFIG_FTMAC100) && !defined(CONFIG_DM_ETH)
 #include <netdev.h>
 #endif
diff --git a/board/AndesTech/ax25-ae350/ax25-ae350.c b/board/AndesTech/ax25-ae350/ax25-ae350.c
index de546dab17..920d43ecc6 100644
--- a/board/AndesTech/ax25-ae350/ax25-ae350.c
+++ b/board/AndesTech/ax25-ae350/ax25-ae350.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <flash.h>
 #include <init.h>
+#include <net.h>
 #if defined(CONFIG_FTMAC100) && !defined(CONFIG_DM_ETH)
 #include <netdev.h>
 #endif
diff --git a/board/Arcturus/ucp1020/ucp1020.c b/board/Arcturus/ucp1020/ucp1020.c
index b641b72aaa..dfa1fd4f15 100644
--- a/board/Arcturus/ucp1020/ucp1020.c
+++ b/board/Arcturus/ucp1020/ucp1020.c
@@ -13,6 +13,7 @@
 #include <env.h>
 #include <hwconfig.h>
 #include <init.h>
+#include <net.h>
 #include <pci.h>
 #include <i2c.h>
 #include <miiphy.h>
diff --git a/board/CZ.NIC/turris_mox/turris_mox.c b/board/CZ.NIC/turris_mox/turris_mox.c
index 470ea32f9c..e8ec240dd7 100644
--- a/board/CZ.NIC/turris_mox/turris_mox.c
+++ b/board/CZ.NIC/turris_mox/turris_mox.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <net.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <clk.h>
diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c
index e1775d3004..29c1120458 100644
--- a/board/CZ.NIC/turris_omnia/turris_omnia.c
+++ b/board/CZ.NIC/turris_omnia/turris_omnia.c
@@ -12,6 +12,7 @@
 #include <i2c.h>
 #include <init.h>
 #include <miiphy.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
diff --git a/board/Marvell/db-88f6720/db-88f6720.c b/board/Marvell/db-88f6720/db-88f6720.c
index 94306b3d8e..3e975801b8 100644
--- a/board/Marvell/db-88f6720/db-88f6720.c
+++ b/board/Marvell/db-88f6720/db-88f6720.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <miiphy.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
diff --git a/board/Marvell/db-88f6820-amc/db-88f6820-amc.c b/board/Marvell/db-88f6820-amc/db-88f6820-amc.c
index 922576e9d5..372beb3c43 100644
--- a/board/Marvell/db-88f6820-amc/db-88f6820-amc.c
+++ b/board/Marvell/db-88f6820-amc/db-88f6820-amc.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <miiphy.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
diff --git a/board/Marvell/db-88f6820-gp/db-88f6820-gp.c b/board/Marvell/db-88f6820-gp/db-88f6820-gp.c
index 1a0746b9d3..f3df7e666b 100644
--- a/board/Marvell/db-88f6820-gp/db-88f6820-gp.c
+++ b/board/Marvell/db-88f6820-gp/db-88f6820-gp.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <miiphy.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
diff --git a/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c b/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c
index 604e8c1670..e7808f5a5c 100644
--- a/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c
+++ b/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <miiphy.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
diff --git a/board/Synology/ds414/cmd_syno.c b/board/Synology/ds414/cmd_syno.c
index 777948f90f..bd6eefd773 100644
--- a/board/Synology/ds414/cmd_syno.c
+++ b/board/Synology/ds414/cmd_syno.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <div64.h>
 #include <env.h>
+#include <net.h>
 #include <spi.h>
 #include <spi_flash.h>
 #include <linux/mtd/mtd.h>
diff --git a/board/abilis/tb100/tb100.c b/board/abilis/tb100/tb100.c
index e3fbbbaa8a..47eb64dd1f 100644
--- a/board/abilis/tb100/tb100.c
+++ b/board/abilis/tb100/tb100.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/io.h>
 
diff --git a/board/advantech/dms-ba16/dms-ba16.c b/board/advantech/dms-ba16/dms-ba16.c
index 299f2f102d..33e0e4a4ae 100644
--- a/board/advantech/dms-ba16/dms-ba16.c
+++ b/board/advantech/dms-ba16/dms-ba16.c
@@ -6,6 +6,7 @@
  */
 
 #include <init.h>
+#include <net.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
diff --git a/board/amlogic/p200/p200.c b/board/amlogic/p200/p200.c
index 41d331dda2..d7f7ebd962 100644
--- a/board/amlogic/p200/p200.c
+++ b/board/amlogic/p200/p200.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
+#include <net.h>
 #include <asm/io.h>
 #include <asm/arch/gx.h>
 #include <asm/arch/sm.h>
diff --git a/board/amlogic/p201/p201.c b/board/amlogic/p201/p201.c
index e46fcaea6d..cdac64ed92 100644
--- a/board/amlogic/p201/p201.c
+++ b/board/amlogic/p201/p201.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
+#include <net.h>
 #include <asm/io.h>
 #include <asm/arch/gx.h>
 #include <asm/arch/sm.h>
diff --git a/board/amlogic/p212/p212.c b/board/amlogic/p212/p212.c
index 094ab5478d..6ac5aadecf 100644
--- a/board/amlogic/p212/p212.c
+++ b/board/amlogic/p212/p212.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
+#include <net.h>
 #include <asm/io.h>
 #include <asm/arch/gx.h>
 #include <asm/arch/sm.h>
diff --git a/board/amlogic/q200/q200.c b/board/amlogic/q200/q200.c
index f1faa7418e..ae9b888c12 100644
--- a/board/amlogic/q200/q200.c
+++ b/board/amlogic/q200/q200.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
+#include <net.h>
 #include <asm/io.h>
 #include <asm/arch/gx.h>
 #include <asm/arch/mem.h>
diff --git a/board/amlogic/s400/s400.c b/board/amlogic/s400/s400.c
index bdb4eca883..79b867996b 100644
--- a/board/amlogic/s400/s400.c
+++ b/board/amlogic/s400/s400.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <net.h>
 #include <asm/io.h>
 #include <asm/arch/axg.h>
 #include <asm/arch/sm.h>
diff --git a/board/amlogic/sei510/sei510.c b/board/amlogic/sei510/sei510.c
index 5de610d85f..07a6a47ebc 100644
--- a/board/amlogic/sei510/sei510.c
+++ b/board/amlogic/sei510/sei510.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <env_internal.h>
+#include <net.h>
 #include <asm/io.h>
 #include <asm/arch/axg.h>
 #include <asm/arch/sm.h>
diff --git a/board/amlogic/sei610/sei610.c b/board/amlogic/sei610/sei610.c
index b17eb9ef55..5c24276d51 100644
--- a/board/amlogic/sei610/sei610.c
+++ b/board/amlogic/sei610/sei610.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <env_internal.h>
+#include <net.h>
 #include <asm/io.h>
 #include <asm/arch/axg.h>
 #include <asm/arch/sm.h>
diff --git a/board/amlogic/u200/u200.c b/board/amlogic/u200/u200.c
index 69fd29d4fe..4df7ff437e 100644
--- a/board/amlogic/u200/u200.c
+++ b/board/amlogic/u200/u200.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <net.h>
 #include <asm/io.h>
 #include <asm/arch/axg.h>
 #include <asm/arch/sm.h>
diff --git a/board/amlogic/w400/w400.c b/board/amlogic/w400/w400.c
index e60dc3a622..95bbdedbdd 100644
--- a/board/amlogic/w400/w400.c
+++ b/board/amlogic/w400/w400.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <env_internal.h>
+#include <net.h>
 #include <asm/io.h>
 #include <asm/arch/eth.h>
 
diff --git a/board/armltd/integrator/integrator.c b/board/armltd/integrator/integrator.c
index 1a472f50d3..32e4933d20 100644
--- a/board/armltd/integrator/integrator.c
+++ b/board/armltd/integrator/integrator.c
@@ -21,6 +21,7 @@
 #include <dm.h>
 #include <env.h>
 #include <init.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/io.h>
 #include <dm/platform_data/serial_pl01x.h>
diff --git a/board/armltd/vexpress/vexpress_common.c b/board/armltd/vexpress/vexpress_common.c
index 14626c1f55..ebd3322c6f 100644
--- a/board/armltd/vexpress/vexpress_common.c
+++ b/board/armltd/vexpress/vexpress_common.c
@@ -20,6 +20,7 @@
 #include <init.h>
 #include <malloc.h>
 #include <errno.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/io.h>
 #include <asm/mach-types.h>
diff --git a/board/armltd/vexpress64/vexpress64.c b/board/armltd/vexpress64/vexpress64.c
index 5c7a8f55f0..912202d8eb 100644
--- a/board/armltd/vexpress64/vexpress64.c
+++ b/board/armltd/vexpress64/vexpress64.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <malloc.h>
 #include <errno.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/io.h>
 #include <linux/compiler.h>
diff --git a/board/atmel/at91rm9200ek/at91rm9200ek.c b/board/atmel/at91rm9200ek/at91rm9200ek.c
index e75d5b182f..e4a6776f96 100644
--- a/board/atmel/at91rm9200ek/at91rm9200ek.c
+++ b/board/atmel/at91rm9200ek/at91rm9200ek.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/mach-types.h>
 #include <asm/arch/hardware.h>
diff --git a/board/atmel/at91sam9n12ek/at91sam9n12ek.c b/board/atmel/at91sam9n12ek/at91sam9n12ek.c
index 90d32353e9..f16c137565 100644
--- a/board/atmel/at91sam9n12ek/at91sam9n12ek.c
+++ b/board/atmel/at91sam9n12ek/at91sam9n12ek.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <net.h>
 #include <vsprintf.h>
 #include <asm/io.h>
 #include <asm/arch/at91sam9x5_matrix.h>
diff --git a/board/atmel/common/mac-spi-nor.c b/board/atmel/common/mac-spi-nor.c
index 96343678e0..ced27b65e6 100644
--- a/board/atmel/common/mac-spi-nor.c
+++ b/board/atmel/common/mac-spi-nor.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
+#include <net.h>
 #include <linux/mtd/spi-nor.h>
 #include <netdev.h>
 
diff --git a/board/atmel/common/mac_eeprom.c b/board/atmel/common/mac_eeprom.c
index 050aa51ee1..2205dd30f8 100644
--- a/board/atmel/common/mac_eeprom.c
+++ b/board/atmel/common/mac_eeprom.c
@@ -9,6 +9,7 @@
 #include <eeprom.h>
 #include <env.h>
 #include <i2c_eeprom.h>
+#include <net.h>
 #include <netdev.h>
 
 int at91_set_ethaddr(int offset)
diff --git a/board/bachmann/ot1200/ot1200.c b/board/bachmann/ot1200/ot1200.c
index 36f37084b3..dd7863f7ac 100644
--- a/board/bachmann/ot1200/ot1200.c
+++ b/board/bachmann/ot1200/ot1200.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <net.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/barco/platinum/platinum.c b/board/barco/platinum/platinum.c
index c2c7c09553..7984647e3a 100644
--- a/board/barco/platinum/platinum.c
+++ b/board/barco/platinum/platinum.c
@@ -9,6 +9,7 @@
 #include <mmc.h>
 #include <fsl_esdhc_imx.h>
 #include <miiphy.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
diff --git a/board/barco/titanium/titanium.c b/board/barco/titanium/titanium.c
index 6348f123ad..016e0adc06 100644
--- a/board/barco/titanium/titanium.c
+++ b/board/barco/titanium/titanium.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <net.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/birdland/bav335x/board.c b/board/birdland/bav335x/board.c
index 9eb851c397..5900e65466 100644
--- a/board/birdland/bav335x/board.c
+++ b/board/birdland/bav335x/board.c
@@ -11,6 +11,7 @@
 #include <env.h>
 #include <errno.h>
 #include <init.h>
+#include <net.h>
 #include <serial.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
diff --git a/board/bluegiga/apx4devkit/apx4devkit.c b/board/bluegiga/apx4devkit/apx4devkit.c
index 9268aa0daa..2599db7bf7 100644
--- a/board/bluegiga/apx4devkit/apx4devkit.c
+++ b/board/bluegiga/apx4devkit/apx4devkit.c
@@ -14,6 +14,7 @@
  */
 
 #include <common.h>
+#include <net.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/setup.h>
diff --git a/board/bosch/shc/board.c b/board/bosch/shc/board.c
index d34f3ba007..9698d8ee16 100644
--- a/board/bosch/shc/board.c
+++ b/board/bosch/shc/board.c
@@ -17,6 +17,7 @@
 #include <errno.h>
 #include <init.h>
 #include <irq_func.h>
+#include <net.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/hardware.h>
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c
index 5018167fcf..4d40cb8ff5 100644
--- a/board/boundary/nitrogen6x/nitrogen6x.c
+++ b/board/boundary/nitrogen6x/nitrogen6x.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <net.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/broadcom/bcm_ep/board.c b/board/broadcom/bcm_ep/board.c
index e4dbe42649..31cae47028 100644
--- a/board/broadcom/bcm_ep/board.c
+++ b/board/broadcom/bcm_ep/board.c
@@ -6,6 +6,8 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <init.h>
+#include <net.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <config.h>
 #include <netdev.h>
diff --git a/board/broadcom/bcmns2/northstar2.c b/board/broadcom/bcmns2/northstar2.c
index 6cbad9c1f0..91f489aad3 100644
--- a/board/broadcom/bcmns2/northstar2.c
+++ b/board/broadcom/bcmns2/northstar2.c
@@ -5,6 +5,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <init.h>
+#include <asm/cache.h>
 #include <asm/system.h>
 #include <asm/armv8/mmu.h>
 
diff --git a/board/cavium/thunderx/atf.c b/board/cavium/thunderx/atf.c
index 2e7ba69d76..ea2f2bade0 100644
--- a/board/cavium/thunderx/atf.c
+++ b/board/cavium/thunderx/atf.c
@@ -4,6 +4,7 @@
 **/
 
 #include <common.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 
 #include <asm/system.h>
diff --git a/board/cavium/thunderx/thunderx.c b/board/cavium/thunderx/thunderx.c
index 687ade544a..1b1b9d513c 100644
--- a/board/cavium/thunderx/thunderx.c
+++ b/board/cavium/thunderx/thunderx.c
@@ -9,6 +9,7 @@
 #include <init.h>
 #include <malloc.h>
 #include <errno.h>
+#include <net.h>
 #include <linux/compiler.h>
 
 #include <cavium/atf.h>
diff --git a/board/ccv/xpress/xpress.c b/board/ccv/xpress/xpress.c
index 0caeea5885..dc86d43d9a 100644
--- a/board/ccv/xpress/xpress.c
+++ b/board/ccv/xpress/xpress.c
@@ -4,6 +4,7 @@
  */
 
 #include <init.h>
+#include <net.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/cirrus/edb93xx/edb93xx.c b/board/cirrus/edb93xx/edb93xx.c
index dfebb7c1c1..b64ec95e31 100644
--- a/board/cirrus/edb93xx/edb93xx.c
+++ b/board/cirrus/edb93xx/edb93xx.c
@@ -17,6 +17,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <irq_func.h>
+#include <net.h>
 #include <netdev.h>
 #include <status_led.h>
 #include <asm/io.h>
diff --git a/board/compulab/cl-som-imx7/cl-som-imx7.c b/board/compulab/cl-som-imx7/cl-som-imx7.c
index 9277094e44..e97efc1dc3 100644
--- a/board/compulab/cl-som-imx7/cl-som-imx7.c
+++ b/board/compulab/cl-som-imx7/cl-som-imx7.c
@@ -11,6 +11,7 @@
 #include <env.h>
 #include <init.h>
 #include <mmc.h>
+#include <net.h>
 #include <phy.h>
 #include <netdev.h>
 #include <fsl_esdhc_imx.h>
diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c
index 3e185ad82a..f0a821d9a9 100644
--- a/board/compulab/cm_fx6/cm_fx6.c
+++ b/board/compulab/cm_fx6/cm_fx6.c
@@ -16,6 +16,7 @@
 #include <init.h>
 #include <miiphy.h>
 #include <mtd_node.h>
+#include <net.h>
 #include <netdev.h>
 #include <errno.h>
 #include <usb.h>
diff --git a/board/compulab/cm_t335/cm_t335.c b/board/compulab/cm_t335/cm_t335.c
index 561f2f30bb..4497aa5af8 100644
--- a/board/compulab/cm_t335/cm_t335.c
+++ b/board/compulab/cm_t335/cm_t335.c
@@ -11,6 +11,7 @@
 #include <env.h>
 #include <errno.h>
 #include <miiphy.h>
+#include <net.h>
 #include <status_led.h>
 #include <cpsw.h>
 
diff --git a/board/compulab/cm_t43/cm_t43.c b/board/compulab/cm_t43/cm_t43.c
index 2aa453471d..9348d6dcad 100644
--- a/board/compulab/cm_t43/cm_t43.c
+++ b/board/compulab/cm_t43/cm_t43.c
@@ -7,6 +7,7 @@
 #include <i2c.h>
 #include <miiphy.h>
 #include <cpsw.h>
+#include <net.h>
 #include <asm/gpio.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/emif.h>
diff --git a/board/compulab/cm_t54/cm_t54.c b/board/compulab/cm_t54/cm_t54.c
index 811bbb528a..0efbf761da 100644
--- a/board/compulab/cm_t54/cm_t54.c
+++ b/board/compulab/cm_t54/cm_t54.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <env.h>
 #include <fdt_support.h>
+#include <net.h>
 #include <usb.h>
 #include <mmc.h>
 #include <palmas.h>
diff --git a/board/congatec/cgtqmx6eval/cgtqmx6eval.c b/board/congatec/cgtqmx6eval/cgtqmx6eval.c
index 49c731f891..16f655f188 100644
--- a/board/congatec/cgtqmx6eval/cgtqmx6eval.c
+++ b/board/congatec/cgtqmx6eval/cgtqmx6eval.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <net.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/creative/xfi3/xfi3.c b/board/creative/xfi3/xfi3.c
index 228a3943c0..66781ef316 100644
--- a/board/creative/xfi3/xfi3.c
+++ b/board/creative/xfi3/xfi3.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <errno.h>
+#include <net.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch/iomux-mx23.h>
diff --git a/board/dhelectronics/dh_imx6/dh_imx6.c b/board/dhelectronics/dh_imx6/dh_imx6.c
index b6f8b11a10..74b461983c 100644
--- a/board/dhelectronics/dh_imx6/dh_imx6.c
+++ b/board/dhelectronics/dh_imx6/dh_imx6.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <eeprom.h>
 #include <init.h>
+#include <net.h>
 #include <dm/device-internal.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
diff --git a/board/dhelectronics/dh_stm32mp1/board.c b/board/dhelectronics/dh_stm32mp1/board.c
index 322558157e..46f61d60d0 100644
--- a/board/dhelectronics/dh_stm32mp1/board.c
+++ b/board/dhelectronics/dh_stm32mp1/board.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <adc.h>
+#include <net.h>
 #include <asm/arch/stm32.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/gpio.h>
diff --git a/board/el/el6x/el6x.c b/board/el/el6x/el6x.c
index 03e9364765..286c1adabc 100644
--- a/board/el/el6x/el6x.c
+++ b/board/el/el6x/el6x.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <net.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
diff --git a/board/embest/mx6boards/mx6boards.c b/board/embest/mx6boards/mx6boards.c
index b644f273fe..50b6f98c29 100644
--- a/board/embest/mx6boards/mx6boards.c
+++ b/board/embest/mx6boards/mx6boards.c
@@ -14,6 +14,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <net.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/esd/meesc/meesc.c b/board/esd/meesc/meesc.c
index 6c5992733c..fd7d6db9bc 100644
--- a/board/esd/meesc/meesc.c
+++ b/board/esd/meesc/meesc.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <env.h>
 #include <init.h>
+#include <net.h>
 #include <serial.h>
 #include <vsprintf.h>
 #include <asm/io.h>
diff --git a/board/esd/vme8349/vme8349.c b/board/esd/vme8349/vme8349.c
index ff811643a6..f54c89d154 100644
--- a/board/esd/vme8349/vme8349.c
+++ b/board/esd/vme8349/vme8349.c
@@ -16,6 +16,7 @@
 #include <init.h>
 #include <ioports.h>
 #include <mpc83xx.h>
+#include <net.h>
 #include <asm/mpc8349_pci.h>
 #if defined(CONFIG_OF_LIBFDT)
 #include <linux/libfdt.h>
diff --git a/board/freescale/b4860qds/eth_b4860qds.c b/board/freescale/b4860qds/eth_b4860qds.c
index 67fb1b9b2b..95ec0b9a73 100644
--- a/board/freescale/b4860qds/eth_b4860qds.c
+++ b/board/freescale/b4860qds/eth_b4860qds.c
@@ -19,6 +19,7 @@
  */
 
 #include <common.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/fsl_serdes.h>
 #include <fm_eth.h>
diff --git a/board/freescale/bsc9132qds/bsc9132qds.c b/board/freescale/bsc9132qds/bsc9132qds.c
index ab05d84190..89742dfedb 100644
--- a/board/freescale/bsc9132qds/bsc9132qds.c
+++ b/board/freescale/bsc9132qds/bsc9132qds.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <net.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #include <asm/cache.h>
diff --git a/board/freescale/c29xpcie/c29xpcie.c b/board/freescale/c29xpcie/c29xpcie.c
index a9ea986579..17292936b7 100644
--- a/board/freescale/c29xpcie/c29xpcie.c
+++ b/board/freescale/c29xpcie/c29xpcie.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <net.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #include <asm/cache.h>
diff --git a/board/freescale/common/ns_access.c b/board/freescale/common/ns_access.c
index 0e6f2135b4..02845514ed 100644
--- a/board/freescale/common/ns_access.c
+++ b/board/freescale/common/ns_access.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <fsl_csu.h>
 #include <asm/arch/ns_access.h>
diff --git a/board/freescale/corenet_ds/eth_hydra.c b/board/freescale/corenet_ds/eth_hydra.c
index 45c23df27e..a17ca7ac60 100644
--- a/board/freescale/corenet_ds/eth_hydra.c
+++ b/board/freescale/corenet_ds/eth_hydra.c
@@ -48,6 +48,7 @@
  */
 
 #include <common.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/fsl_serdes.h>
 #include <fm_eth.h>
diff --git a/board/freescale/corenet_ds/eth_p4080.c b/board/freescale/corenet_ds/eth_p4080.c
index 0979c5f489..b1989bcbc2 100644
--- a/board/freescale/corenet_ds/eth_p4080.c
+++ b/board/freescale/corenet_ds/eth_p4080.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/mmu.h>
 #include <asm/processor.h>
diff --git a/board/freescale/corenet_ds/eth_superhydra.c b/board/freescale/corenet_ds/eth_superhydra.c
index 1962b7e3c7..5adfecd265 100644
--- a/board/freescale/corenet_ds/eth_superhydra.c
+++ b/board/freescale/corenet_ds/eth_superhydra.c
@@ -48,6 +48,7 @@
  */
 
 #include <common.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/fsl_serdes.h>
 #include <fm_eth.h>
diff --git a/board/freescale/ls1012afrdm/ls1012afrdm.c b/board/freescale/ls1012afrdm/ls1012afrdm.c
index d138c9384e..8260e7f797 100644
--- a/board/freescale/ls1012afrdm/ls1012afrdm.c
+++ b/board/freescale/ls1012afrdm/ls1012afrdm.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <fdt_support.h>
 #include <i2c.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/fsl_serdes.h>
diff --git a/board/freescale/ls1012aqds/ls1012aqds.c b/board/freescale/ls1012aqds/ls1012aqds.c
index 30bf1047d5..e41f7e41bb 100644
--- a/board/freescale/ls1012aqds/ls1012aqds.c
+++ b/board/freescale/ls1012aqds/ls1012aqds.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <fdt_support.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/fsl_serdes.h>
diff --git a/board/freescale/ls1012ardb/ls1012ardb.c b/board/freescale/ls1012ardb/ls1012ardb.c
index ab83ef11a0..8633268ed7 100644
--- a/board/freescale/ls1012ardb/ls1012ardb.c
+++ b/board/freescale/ls1012ardb/ls1012ardb.c
@@ -7,6 +7,7 @@
 #include <fdt_support.h>
 #include <hang.h>
 #include <i2c.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/fsl_serdes.h>
diff --git a/board/freescale/ls1021aiot/ls1021aiot.c b/board/freescale/ls1021aiot/ls1021aiot.c
index b4201e76d1..dca60b7401 100644
--- a/board/freescale/ls1021aiot/ls1021aiot.c
+++ b/board/freescale/ls1021aiot/ls1021aiot.c
@@ -7,6 +7,7 @@
 #include <clock_legacy.h>
 #include <fdt_support.h>
 #include <init.h>
+#include <net.h>
 #include <asm/arch/immap_ls102xa.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/fsl_serdes.h>
diff --git a/board/freescale/ls1021aqds/eth.c b/board/freescale/ls1021aqds/eth.c
index d0a98836e2..2de62cf095 100644
--- a/board/freescale/ls1021aqds/eth.c
+++ b/board/freescale/ls1021aqds/eth.c
@@ -14,6 +14,7 @@
  */
 
 #include <common.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/arch/fsl_serdes.h>
 #include <fsl_mdio.h>
diff --git a/board/freescale/ls1021atsn/ls1021atsn.c b/board/freescale/ls1021atsn/ls1021atsn.c
index 3876910cbb..0f940998bf 100644
--- a/board/freescale/ls1021atsn/ls1021atsn.c
+++ b/board/freescale/ls1021atsn/ls1021atsn.c
@@ -5,6 +5,7 @@
 #include <clock_legacy.h>
 #include <fdt_support.h>
 #include <init.h>
+#include <net.h>
 #include <asm/arch-ls102xa/ls102xa_soc.h>
 #include <asm/arch/ls102xa_devdis.h>
 #include <asm/arch/immap_ls102xa.h>
diff --git a/board/freescale/ls1021atwr/ls1021atwr.c b/board/freescale/ls1021atwr/ls1021atwr.c
index d1ff7b8ba6..acf146de4d 100644
--- a/board/freescale/ls1021atwr/ls1021atwr.c
+++ b/board/freescale/ls1021atwr/ls1021atwr.c
@@ -9,6 +9,7 @@
 #include <fdt_support.h>
 #include <i2c.h>
 #include <init.h>
+#include <net.h>
 #include <asm/io.h>
 #include <asm/arch/immap_ls102xa.h>
 #include <asm/arch/clock.h>
diff --git a/board/freescale/ls1028a/ls1028a.c b/board/freescale/ls1028a/ls1028a.c
index 1e2973f0c8..feeae9b406 100644
--- a/board/freescale/ls1028a/ls1028a.c
+++ b/board/freescale/ls1028a/ls1028a.c
@@ -7,6 +7,7 @@
 #include <malloc.h>
 #include <errno.h>
 #include <fsl_ddr.h>
+#include <net.h>
 #include <asm/io.h>
 #include <hwconfig.h>
 #include <fdt_support.h>
diff --git a/board/freescale/ls1043aqds/eth.c b/board/freescale/ls1043aqds/eth.c
index e1919d2988..b2709be8be 100644
--- a/board/freescale/ls1043aqds/eth.c
+++ b/board/freescale/ls1043aqds/eth.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <net.h>
 #include <asm/io.h>
 #include <netdev.h>
 #include <fdt_support.h>
diff --git a/board/freescale/ls1043ardb/eth.c b/board/freescale/ls1043ardb/eth.c
index a8d0c1109b..4b9f94a0a5 100644
--- a/board/freescale/ls1043ardb/eth.c
+++ b/board/freescale/ls1043ardb/eth.c
@@ -3,6 +3,7 @@
  * Copyright 2015 Freescale Semiconductor, Inc.
  */
 #include <common.h>
+#include <net.h>
 #include <asm/io.h>
 #include <netdev.h>
 #include <fm_eth.h>
diff --git a/board/freescale/ls1046afrwy/eth.c b/board/freescale/ls1046afrwy/eth.c
index d38e4d7ac7..3f7c35b5c9 100644
--- a/board/freescale/ls1046afrwy/eth.c
+++ b/board/freescale/ls1046afrwy/eth.c
@@ -3,6 +3,7 @@
  * Copyright 2019 NXP
  */
 #include <common.h>
+#include <net.h>
 #include <asm/io.h>
 #include <netdev.h>
 #include <fm_eth.h>
diff --git a/board/freescale/ls1046aqds/eth.c b/board/freescale/ls1046aqds/eth.c
index 1d40e8bd17..e2a4470a71 100644
--- a/board/freescale/ls1046aqds/eth.c
+++ b/board/freescale/ls1046aqds/eth.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <net.h>
 #include <asm/io.h>
 #include <netdev.h>
 #include <fdt_support.h>
diff --git a/board/freescale/ls1046ardb/eth.c b/board/freescale/ls1046ardb/eth.c
index 7dbfcac307..6ffd4aec3e 100644
--- a/board/freescale/ls1046ardb/eth.c
+++ b/board/freescale/ls1046ardb/eth.c
@@ -3,6 +3,7 @@
  * Copyright 2016 Freescale Semiconductor, Inc.
  */
 #include <common.h>
+#include <net.h>
 #include <asm/io.h>
 #include <netdev.h>
 #include <fm_eth.h>
diff --git a/board/freescale/m5253demo/m5253demo.c b/board/freescale/m5253demo/m5253demo.c
index 76c18b8504..6a6c65fe5f 100644
--- a/board/freescale/m5253demo/m5253demo.c
+++ b/board/freescale/m5253demo/m5253demo.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <net.h>
 #include <asm/immap.h>
 #include <netdev.h>
 #include <asm/io.h>
diff --git a/board/freescale/mpc8308rdb/mpc8308rdb.c b/board/freescale/mpc8308rdb/mpc8308rdb.c
index ae73246e5b..bd052b903d 100644
--- a/board/freescale/mpc8308rdb/mpc8308rdb.c
+++ b/board/freescale/mpc8308rdb/mpc8308rdb.c
@@ -8,6 +8,7 @@
 #include <hwconfig.h>
 #include <i2c.h>
 #include <init.h>
+#include <net.h>
 #include <spi.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
diff --git a/board/freescale/mpc8315erdb/mpc8315erdb.c b/board/freescale/mpc8315erdb/mpc8315erdb.c
index 93e0fca083..204b40bf47 100644
--- a/board/freescale/mpc8315erdb/mpc8315erdb.c
+++ b/board/freescale/mpc8315erdb/mpc8315erdb.c
@@ -10,6 +10,7 @@
 #include <hwconfig.h>
 #include <i2c.h>
 #include <init.h>
+#include <net.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <pci.h>
diff --git a/board/freescale/mpc837xemds/mpc837xemds.c b/board/freescale/mpc837xemds/mpc837xemds.c
index 1ae2308e9b..90e95399d2 100644
--- a/board/freescale/mpc837xemds/mpc837xemds.c
+++ b/board/freescale/mpc837xemds/mpc837xemds.c
@@ -8,6 +8,7 @@
 #include <hwconfig.h>
 #include <i2c.h>
 #include <init.h>
+#include <net.h>
 #include <asm/io.h>
 #include <asm/fsl_mpc83xx_serdes.h>
 #include <spd_sdram.h>
diff --git a/board/freescale/mpc8536ds/mpc8536ds.c b/board/freescale/mpc8536ds/mpc8536ds.c
index e55ee40026..bfbb8a5fb7 100644
--- a/board/freescale/mpc8536ds/mpc8536ds.c
+++ b/board/freescale/mpc8536ds/mpc8536ds.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <init.h>
+#include <net.h>
 #include <pci.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
diff --git a/board/freescale/mpc8544ds/mpc8544ds.c b/board/freescale/mpc8544ds/mpc8544ds.c
index 2d4aace98d..85d370f628 100644
--- a/board/freescale/mpc8544ds/mpc8544ds.c
+++ b/board/freescale/mpc8544ds/mpc8544ds.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <init.h>
+#include <net.h>
 #include <pci.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
diff --git a/board/freescale/mpc8548cds/mpc8548cds.c b/board/freescale/mpc8548cds/mpc8548cds.c
index a4455d3f61..454da1d7da 100644
--- a/board/freescale/mpc8548cds/mpc8548cds.c
+++ b/board/freescale/mpc8548cds/mpc8548cds.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <net.h>
 #include <pci.h>
 #include <vsprintf.h>
 #include <asm/processor.h>
diff --git a/board/freescale/mpc8572ds/mpc8572ds.c b/board/freescale/mpc8572ds/mpc8572ds.c
index 4111d69b4b..b7e0eeded5 100644
--- a/board/freescale/mpc8572ds/mpc8572ds.c
+++ b/board/freescale/mpc8572ds/mpc8572ds.c
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <env.h>
 #include <init.h>
+#include <net.h>
 #include <pci.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
diff --git a/board/freescale/mpc8610hpcd/mpc8610hpcd.c b/board/freescale/mpc8610hpcd/mpc8610hpcd.c
index 86edd66bca..fc331a995a 100644
--- a/board/freescale/mpc8610hpcd/mpc8610hpcd.c
+++ b/board/freescale/mpc8610hpcd/mpc8610hpcd.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <init.h>
+#include <net.h>
 #include <pci.h>
 #include <asm/processor.h>
 #include <asm/immap_86xx.h>
diff --git a/board/freescale/mpc8641hpcn/mpc8641hpcn.c b/board/freescale/mpc8641hpcn/mpc8641hpcn.c
index d9e538b868..57f91a42f5 100644
--- a/board/freescale/mpc8641hpcn/mpc8641hpcn.c
+++ b/board/freescale/mpc8641hpcn/mpc8641hpcn.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <net.h>
 #include <pci.h>
 #include <asm/processor.h>
 #include <asm/immap_86xx.h>
diff --git a/board/freescale/mx28evk/mx28evk.c b/board/freescale/mx28evk/mx28evk.c
index cfbe89ebfe..e5fa4ae765 100644
--- a/board/freescale/mx28evk/mx28evk.c
+++ b/board/freescale/mx28evk/mx28evk.c
@@ -12,6 +12,7 @@
  */
 
 #include <common.h>
+#include <net.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/freescale/mx31pdk/mx31pdk.c b/board/freescale/mx31pdk/mx31pdk.c
index fb57f26357..06fe51db71 100644
--- a/board/freescale/mx31pdk/mx31pdk.c
+++ b/board/freescale/mx31pdk/mx31pdk.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/freescale/mx35pdk/mx35pdk.c b/board/freescale/mx35pdk/mx35pdk.c
index d0f7f045a5..dda20eed51 100644
--- a/board/freescale/mx35pdk/mx35pdk.c
+++ b/board/freescale/mx35pdk/mx35pdk.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <net.h>
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/freescale/mx53ard/mx53ard.c b/board/freescale/mx53ard/mx53ard.c
index 33d056b47d..fabcb03ac8 100644
--- a/board/freescale/mx53ard/mx53ard.c
+++ b/board/freescale/mx53ard/mx53ard.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <net.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/freescale/mx6qarm2/mx6qarm2.c b/board/freescale/mx6qarm2/mx6qarm2.c
index 3957c09ac0..3866020a6d 100644
--- a/board/freescale/mx6qarm2/mx6qarm2.c
+++ b/board/freescale/mx6qarm2/mx6qarm2.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <net.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/mx6-pins.h>
diff --git a/board/freescale/mx6sabreauto/mx6sabreauto.c b/board/freescale/mx6sabreauto/mx6sabreauto.c
index de19a562eb..33da3914d3 100644
--- a/board/freescale/mx6sabreauto/mx6sabreauto.c
+++ b/board/freescale/mx6sabreauto/mx6sabreauto.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <net.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c
index 07d3b0edb3..d46dcd4b8a 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -6,6 +6,7 @@
  */
 
 #include <init.h>
+#include <net.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
diff --git a/board/freescale/mx6slevk/mx6slevk.c b/board/freescale/mx6slevk/mx6slevk.c
index 43029e4245..38fc30553c 100644
--- a/board/freescale/mx6slevk/mx6slevk.c
+++ b/board/freescale/mx6slevk/mx6slevk.c
@@ -5,6 +5,7 @@
  * Author: Fabio Estevam <fabio.estevam@freescale.com>
  */
 
+#include <net.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/crm_regs.h>
diff --git a/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c b/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c
index 0c7904204f..d01c74d241 100644
--- a/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c
+++ b/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c
@@ -6,6 +6,7 @@
  */
 
 #include <init.h>
+#include <net.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/iomux.h>
diff --git a/board/freescale/mx6sxsabresd/mx6sxsabresd.c b/board/freescale/mx6sxsabresd/mx6sxsabresd.c
index 4f1d6602e5..a2c2782303 100644
--- a/board/freescale/mx6sxsabresd/mx6sxsabresd.c
+++ b/board/freescale/mx6sxsabresd/mx6sxsabresd.c
@@ -6,6 +6,7 @@
  */
 
 #include <init.h>
+#include <net.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/iomux.h>
diff --git a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
index 07941fb156..afc9f6e6eb 100644
--- a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
+++ b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
@@ -4,6 +4,7 @@
  */
 
 #include <init.h>
+#include <net.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/freescale/mx7dsabresd/mx7dsabresd.c b/board/freescale/mx7dsabresd/mx7dsabresd.c
index 41c620795c..6d6763db6a 100644
--- a/board/freescale/mx7dsabresd/mx7dsabresd.c
+++ b/board/freescale/mx7dsabresd/mx7dsabresd.c
@@ -4,6 +4,7 @@
  */
 
 #include <init.h>
+#include <net.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/mx7-pins.h>
diff --git a/board/freescale/p1010rdb/p1010rdb.c b/board/freescale/p1010rdb/p1010rdb.c
index 314646d4ff..782c2b71bc 100644
--- a/board/freescale/p1010rdb/p1010rdb.c
+++ b/board/freescale/p1010rdb/p1010rdb.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <net.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #include <asm/cache.h>
diff --git a/board/freescale/p1022ds/p1022ds.c b/board/freescale/p1022ds/p1022ds.c
index ebf822acb5..33edff9727 100644
--- a/board/freescale/p1022ds/p1022ds.c
+++ b/board/freescale/p1022ds/p1022ds.c
@@ -9,6 +9,7 @@
 #include <command.h>
 #include <env.h>
 #include <init.h>
+#include <net.h>
 #include <pci.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
diff --git a/board/freescale/p1023rdb/p1023rdb.c b/board/freescale/p1023rdb/p1023rdb.c
index eeb13ccc9b..5321e26a9c 100644
--- a/board/freescale/p1023rdb/p1023rdb.c
+++ b/board/freescale/p1023rdb/p1023rdb.c
@@ -10,6 +10,7 @@
 #include <command.h>
 #include <env.h>
 #include <init.h>
+#include <net.h>
 #include <pci.h>
 #include <asm/io.h>
 #include <asm/cache.h>
diff --git a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
index f668d7efb1..5d619dbd2e 100644
--- a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
+++ b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
@@ -10,6 +10,7 @@
 #include <hang.h>
 #include <hwconfig.h>
 #include <init.h>
+#include <net.h>
 #include <pci.h>
 #include <i2c.h>
 #include <asm/processor.h>
diff --git a/board/freescale/p1_twr/p1_twr.c b/board/freescale/p1_twr/p1_twr.c
index 72fe1b4166..6d0e1b1ffa 100644
--- a/board/freescale/p1_twr/p1_twr.c
+++ b/board/freescale/p1_twr/p1_twr.c
@@ -8,6 +8,7 @@
 #include <env.h>
 #include <hwconfig.h>
 #include <init.h>
+#include <net.h>
 #include <pci.h>
 #include <i2c.h>
 #include <asm/processor.h>
diff --git a/board/freescale/p2041rdb/eth.c b/board/freescale/p2041rdb/eth.c
index 854a839b8c..32c68f2a71 100644
--- a/board/freescale/p2041rdb/eth.c
+++ b/board/freescale/p2041rdb/eth.c
@@ -13,6 +13,7 @@
  */
 
 #include <common.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/fsl_serdes.h>
 #include <fm_eth.h>
diff --git a/board/freescale/qemu-ppce500/qemu-ppce500.c b/board/freescale/qemu-ppce500/qemu-ppce500.c
index e804cfe986..fef7b8142c 100644
--- a/board/freescale/qemu-ppce500/qemu-ppce500.c
+++ b/board/freescale/qemu-ppce500/qemu-ppce500.c
@@ -8,6 +8,7 @@
 #include <cpu_func.h>
 #include <env.h>
 #include <init.h>
+#include <net.h>
 #include <pci.h>
 #include <time.h>
 #include <asm/processor.h>
diff --git a/board/freescale/t102xqds/eth_t102xqds.c b/board/freescale/t102xqds/eth_t102xqds.c
index 5b65818eed..1820419511 100644
--- a/board/freescale/t102xqds/eth_t102xqds.c
+++ b/board/freescale/t102xqds/eth_t102xqds.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/mmu.h>
 #include <asm/processor.h>
diff --git a/board/freescale/t102xrdb/eth_t102xrdb.c b/board/freescale/t102xrdb/eth_t102xrdb.c
index 299b859cb6..d40b590108 100644
--- a/board/freescale/t102xrdb/eth_t102xrdb.c
+++ b/board/freescale/t102xrdb/eth_t102xrdb.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/mmu.h>
 #include <asm/processor.h>
diff --git a/board/freescale/t1040qds/eth.c b/board/freescale/t1040qds/eth.c
index 4185cfac12..3f10e420a0 100644
--- a/board/freescale/t1040qds/eth.c
+++ b/board/freescale/t1040qds/eth.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/fsl_serdes.h>
 #include <asm/immap_85xx.h>
diff --git a/board/freescale/t104xrdb/eth.c b/board/freescale/t104xrdb/eth.c
index 107d28da33..9cbc8754dc 100644
--- a/board/freescale/t104xrdb/eth.c
+++ b/board/freescale/t104xrdb/eth.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/fsl_serdes.h>
 #include <asm/immap_85xx.h>
diff --git a/board/freescale/t208xqds/eth_t208xqds.c b/board/freescale/t208xqds/eth_t208xqds.c
index 697c23b038..72991ea591 100644
--- a/board/freescale/t208xqds/eth_t208xqds.c
+++ b/board/freescale/t208xqds/eth_t208xqds.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/mmu.h>
 #include <asm/processor.h>
diff --git a/board/freescale/t208xrdb/eth_t208xrdb.c b/board/freescale/t208xrdb/eth_t208xrdb.c
index 6894947304..669bc1efef 100644
--- a/board/freescale/t208xrdb/eth_t208xrdb.c
+++ b/board/freescale/t208xrdb/eth_t208xrdb.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/mmu.h>
 #include <asm/processor.h>
diff --git a/board/freescale/t4qds/eth.c b/board/freescale/t4qds/eth.c
index b341c82e67..d93d75950c 100644
--- a/board/freescale/t4qds/eth.c
+++ b/board/freescale/t4qds/eth.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/mmu.h>
 #include <asm/processor.h>
diff --git a/board/freescale/t4rdb/eth.c b/board/freescale/t4rdb/eth.c
index 2ef192c452..3321ce1ea1 100644
--- a/board/freescale/t4rdb/eth.c
+++ b/board/freescale/t4rdb/eth.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/mmu.h>
 #include <asm/processor.h>
diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c
index 8a694a71c9..6c81864319 100644
--- a/board/gateworks/gw_ventana/gw_ventana.c
+++ b/board/gateworks/gw_ventana/gw_ventana.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <net.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/iomux.h>
diff --git a/board/gdsys/a38x/controlcenterdc.c b/board/gdsys/a38x/controlcenterdc.c
index 4eb7d76660..7aad683127 100644
--- a/board/gdsys/a38x/controlcenterdc.c
+++ b/board/gdsys/a38x/controlcenterdc.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <init.h>
 #include <miiphy.h>
+#include <net.h>
 #include <tpm-v1.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
diff --git a/board/gdsys/p1022/controlcenterd.c b/board/gdsys/p1022/controlcenterd.c
index 8e868165ed..14e3e25c18 100644
--- a/board/gdsys/p1022/controlcenterd.c
+++ b/board/gdsys/p1022/controlcenterd.c
@@ -25,6 +25,7 @@
 #include <command.h>
 #include <env.h>
 #include <init.h>
+#include <net.h>
 #include <pci.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
diff --git a/board/grinn/chiliboard/board.c b/board/grinn/chiliboard/board.c
index 7f0de5e42b..8cc9278287 100644
--- a/board/grinn/chiliboard/board.c
+++ b/board/grinn/chiliboard/board.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <net.h>
 #include <asm/arch/chilisom.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/hardware.h>
diff --git a/board/gumstix/duovero/duovero.c b/board/gumstix/duovero/duovero.c
index 78fb98ef64..cbb1cd0f8f 100644
--- a/board/gumstix/duovero/duovero.c
+++ b/board/gumstix/duovero/duovero.c
@@ -5,6 +5,7 @@
  * Maintainer: Ash Charles  <ash@gumstix.com>
  */
 #include <common.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/mmc_host_def.h>
diff --git a/board/gumstix/pepper/board.c b/board/gumstix/pepper/board.c
index 65e5e1e60f..2a6a449306 100644
--- a/board/gumstix/pepper/board.c
+++ b/board/gumstix/pepper/board.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <env.h>
 #include <errno.h>
+#include <net.h>
 #include <serial.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
diff --git a/board/highbank/highbank.c b/board/highbank/highbank.c
index 3e0edd48f5..f7f2e2c525 100644
--- a/board/highbank/highbank.c
+++ b/board/highbank/highbank.c
@@ -7,6 +7,7 @@
 #include <ahci.h>
 #include <cpu_func.h>
 #include <env.h>
+#include <net.h>
 #include <netdev.h>
 #include <scsi.h>
 
diff --git a/board/hisilicon/hikey960/hikey960.c b/board/hisilicon/hikey960/hikey960.c
index 84c26e0c14..0ed62c7d84 100644
--- a/board/hisilicon/hikey960/hikey960.c
+++ b/board/hisilicon/hikey960/hikey960.c
@@ -8,6 +8,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <errno.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/arch/hi3660.h>
 #include <asm/armv8/mmu.h>
diff --git a/board/hisilicon/poplar/poplar.c b/board/hisilicon/poplar/poplar.c
index 4937dc374c..70a69f5b8c 100644
--- a/board/hisilicon/poplar/poplar.c
+++ b/board/hisilicon/poplar/poplar.c
@@ -8,6 +8,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <init.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <dm/platform_data/serial_pl01x.h>
 #include <asm/arch/hi3798cv200.h>
diff --git a/board/imgtec/malta/malta.c b/board/imgtec/malta/malta.c
index 77ce75ecf2..80005ec3cc 100644
--- a/board/imgtec/malta/malta.c
+++ b/board/imgtec/malta/malta.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <ide.h>
 #include <init.h>
+#include <net.h>
 #include <netdev.h>
 #include <pci.h>
 #include <pci_gt64120.h>
diff --git a/board/isee/igep003x/board.c b/board/isee/igep003x/board.c
index b0f8d8a314..a28d447825 100644
--- a/board/isee/igep003x/board.c
+++ b/board/isee/igep003x/board.c
@@ -10,6 +10,7 @@
 #include <errno.h>
 #include <init.h>
 #include <malloc.h>
+#include <net.h>
 #include <serial.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
diff --git a/board/isee/igep00x0/igep00x0.c b/board/isee/igep00x0/igep00x0.c
index 1b871fdcc5..0ad601f39b 100644
--- a/board/isee/igep00x0/igep00x0.c
+++ b/board/isee/igep00x0/igep00x0.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <env.h>
 #include <malloc.h>
+#include <net.h>
 #include <status_led.h>
 #include <dm.h>
 #include <ns16550.h>
diff --git a/board/k+p/kp_imx53/kp_id_rev.c b/board/k+p/kp_imx53/kp_id_rev.c
index 9dae54dda5..7103a3e0f2 100644
--- a/board/k+p/kp_imx53/kp_id_rev.c
+++ b/board/k+p/kp_imx53/kp_id_rev.c
@@ -13,6 +13,7 @@
 #include <env.h>
 #include <i2c.h>
 #include "kp_id_rev.h"
+#include <net.h>
 
 static int eeprom_has_been_read;
 static struct id_eeprom eeprom;
diff --git a/board/keymile/kmp204x/eth.c b/board/keymile/kmp204x/eth.c
index 7499d2078b..8635a5448b 100644
--- a/board/keymile/kmp204x/eth.c
+++ b/board/keymile/kmp204x/eth.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <net.h>
 #include <netdev.h>
 #include <fm_eth.h>
 #include <fsl_mdio.h>
diff --git a/board/kmc/kzm9g/kzm9g.c b/board/kmc/kzm9g/kzm9g.c
index 6ef960b06b..c6117b33bc 100644
--- a/board/kmc/kzm9g/kzm9g.c
+++ b/board/kmc/kzm9g/kzm9g.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <net.h>
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/gpio.h>
diff --git a/board/kobol/helios4/helios4.c b/board/kobol/helios4/helios4.c
index 3c3592ecf5..f8134b7042 100644
--- a/board/kobol/helios4/helios4.c
+++ b/board/kobol/helios4/helios4.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <miiphy.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
diff --git a/board/liebherr/xea/xea.c b/board/liebherr/xea/xea.c
index df5d316717..1a9c05275f 100644
--- a/board/liebherr/xea/xea.c
+++ b/board/liebherr/xea/xea.c
@@ -14,6 +14,7 @@
  */
 
 #include <common.h>
+#include <net.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/logicpd/am3517evm/am3517evm.c b/board/logicpd/am3517evm/am3517evm.c
index 18f3c3f9d9..6ed3a9b847 100644
--- a/board/logicpd/am3517evm/am3517evm.c
+++ b/board/logicpd/am3517evm/am3517evm.c
@@ -12,6 +12,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <net.h>
 #include <ns16550.h>
 #include <serial.h>
 #include <asm/io.h>
diff --git a/board/logicpd/omap3som/omap3logic.c b/board/logicpd/omap3som/omap3logic.c
index 21d8a21010..5c178a27e7 100644
--- a/board/logicpd/omap3som/omap3logic.c
+++ b/board/logicpd/omap3som/omap3logic.c
@@ -13,6 +13,7 @@
 #include <common.h>
 #include <dm.h>
 #include <init.h>
+#include <net.h>
 #include <ns16550.h>
 #include <netdev.h>
 #include <flash.h>
diff --git a/board/logicpd/zoom1/zoom1.c b/board/logicpd/zoom1/zoom1.c
index 6bfa41737f..7438d37923 100644
--- a/board/logicpd/zoom1/zoom1.c
+++ b/board/logicpd/zoom1/zoom1.c
@@ -16,6 +16,7 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
+#include <net.h>
 #include <ns16550.h>
 #include <netdev.h>
 #include <twl4030.h>
diff --git a/board/mpc8308_p1m/mpc8308_p1m.c b/board/mpc8308_p1m/mpc8308_p1m.c
index 5b2fd9c23f..caa6187ffe 100644
--- a/board/mpc8308_p1m/mpc8308_p1m.c
+++ b/board/mpc8308_p1m/mpc8308_p1m.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <init.h>
+#include <net.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <pci.h>
diff --git a/board/nvidia/p2371-2180/p2371-2180.c b/board/nvidia/p2371-2180/p2371-2180.c
index 1756bbca98..b92f0974af 100644
--- a/board/nvidia/p2371-2180/p2371-2180.c
+++ b/board/nvidia/p2371-2180/p2371-2180.c
@@ -8,6 +8,7 @@
 #include <env.h>
 #include <fdtdec.h>
 #include <i2c.h>
+#include <net.h>
 #include <linux/libfdt.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/pinmux.h>
diff --git a/board/nvidia/p2771-0000/p2771-0000.c b/board/nvidia/p2771-0000/p2771-0000.c
index 63cdb3a604..e552877fdc 100644
--- a/board/nvidia/p2771-0000/p2771-0000.c
+++ b/board/nvidia/p2771-0000/p2771-0000.c
@@ -7,6 +7,7 @@
 #include <env.h>
 #include <fdtdec.h>
 #include <i2c.h>
+#include <net.h>
 #include <linux/libfdt.h>
 #include <asm/arch-tegra/cboot.h>
 #include "../p2571/max77620_init.h"
diff --git a/board/overo/overo.c b/board/overo/overo.c
index baa7997477..f7da1a95ea 100644
--- a/board/overo/overo.c
+++ b/board/overo/overo.c
@@ -15,6 +15,7 @@
 #include <dm.h>
 #include <env.h>
 #include <malloc.h>
+#include <net.h>
 #include <ns16550.h>
 #include <netdev.h>
 #include <twl4030.h>
diff --git a/board/phytec/pcm051/board.c b/board/phytec/pcm051/board.c
index 43f6c5afcb..e561c82253 100644
--- a/board/phytec/pcm051/board.c
+++ b/board/phytec/pcm051/board.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <env.h>
 #include <errno.h>
+#include <net.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/hardware.h>
diff --git a/board/phytec/pcm058/pcm058.c b/board/phytec/pcm058/pcm058.c
index 820b5fde14..b1bf8d50f8 100644
--- a/board/phytec/pcm058/pcm058.c
+++ b/board/phytec/pcm058/pcm058.c
@@ -11,6 +11,7 @@
  */
 #include <common.h>
 #include <init.h>
+#include <net.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/phytec/pfla02/pfla02.c b/board/phytec/pfla02/pfla02.c
index a3af823ef6..7439aa56ad 100644
--- a/board/phytec/pfla02/pfla02.c
+++ b/board/phytec/pfla02/pfla02.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <init.h>
+#include <net.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/phytec/phycore_rk3288/phycore-rk3288.c b/board/phytec/phycore_rk3288/phycore-rk3288.c
index 039ed0f1bc..236342c8d7 100644
--- a/board/phytec/phycore_rk3288/phycore-rk3288.c
+++ b/board/phytec/phycore_rk3288/phycore-rk3288.c
@@ -6,6 +6,7 @@
 
 #include <eeprom.h>
 #include <init.h>
+#include <net.h>
 #include <asm/io.h>
 #include <common.h>
 #include <dm.h>
diff --git a/board/phytium/durian/durian.c b/board/phytium/durian/durian.c
index 40dd27a7b0..91d13bdea4 100644
--- a/board/phytium/durian/durian.c
+++ b/board/phytium/durian/durian.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <asm/armv8/mmu.h>
+#include <asm/cache.h>
 #include <asm/system.h>
 #include <asm/io.h>
 #include <linux/arm-smccc.h>
diff --git a/board/ppcag/bg0900/bg0900.c b/board/ppcag/bg0900/bg0900.c
index e3e8e74220..00afff3abf 100644
--- a/board/ppcag/bg0900/bg0900.c
+++ b/board/ppcag/bg0900/bg0900.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <net.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/qemu-mips/qemu-mips.c b/board/qemu-mips/qemu-mips.c
index 414a9c001d..b3e0830843 100644
--- a/board/qemu-mips/qemu-mips.c
+++ b/board/qemu-mips/qemu-mips.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <net.h>
 #include <asm/mipsregs.h>
 #include <asm/io.h>
 #include <netdev.h>
diff --git a/board/qualcomm/dragonboard410c/dragonboard410c.c b/board/qualcomm/dragonboard410c/dragonboard410c.c
index 81bd8bd95b..75505d0c18 100644
--- a/board/qualcomm/dragonboard410c/dragonboard410c.c
+++ b/board/qualcomm/dragonboard410c/dragonboard410c.c
@@ -10,7 +10,9 @@
 #include <dm.h>
 #include <env.h>
 #include <init.h>
+#include <net.h>
 #include <usb.h>
+#include <asm/cache.h>
 #include <asm/gpio.h>
 #include <fdt_support.h>
 #include <asm/arch/dram.h>
diff --git a/board/qualcomm/dragonboard820c/dragonboard820c.c b/board/qualcomm/dragonboard820c/dragonboard820c.c
index 6c096b49a1..3134415d80 100644
--- a/board/qualcomm/dragonboard820c/dragonboard820c.c
+++ b/board/qualcomm/dragonboard820c/dragonboard820c.c
@@ -8,6 +8,7 @@
 #include <cpu_func.h>
 #include <asm/arch/sysmap-apq8096.h>
 #include <env.h>
+#include <asm/cache.h>
 #include <linux/arm-smccc.h>
 #include <linux/psci.h>
 #include <common.h>
diff --git a/board/renesas/MigoR/migo_r.c b/board/renesas/MigoR/migo_r.c
index 767c45cc9c..3ffd9ad75d 100644
--- a/board/renesas/MigoR/migo_r.c
+++ b/board/renesas/MigoR/migo_r.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/io.h>
 #include <asm/processor.h>
diff --git a/board/renesas/blanche/blanche.c b/board/renesas/blanche/blanche.c
index c15387366c..892f7e7260 100644
--- a/board/renesas/blanche/blanche.c
+++ b/board/renesas/blanche/blanche.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <net.h>
 #include <asm/arch/mmc.h>
 #include <asm/arch/rcar-mstp.h>
 #include <asm/arch/rmobile.h>
diff --git a/board/renesas/r2dplus/r2dplus.c b/board/renesas/r2dplus/r2dplus.c
index f2da4686c3..e4d0967c14 100644
--- a/board/renesas/r2dplus/r2dplus.c
+++ b/board/renesas/r2dplus/r2dplus.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <ide.h>
 #include <init.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/processor.h>
 #include <asm/io.h>
diff --git a/board/renesas/r7780mp/r7780mp.c b/board/renesas/r7780mp/r7780mp.c
index 8dbeeb6e68..120464ced4 100644
--- a/board/renesas/r7780mp/r7780mp.c
+++ b/board/renesas/r7780mp/r7780mp.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <ide.h>
 #include <init.h>
+#include <net.h>
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <asm/pci.h>
diff --git a/board/renesas/sh7752evb/sh7752evb.c b/board/renesas/sh7752evb/sh7752evb.c
index 135aaa5234..565ce5f5d1 100644
--- a/board/renesas/sh7752evb/sh7752evb.c
+++ b/board/renesas/sh7752evb/sh7752evb.c
@@ -8,6 +8,7 @@
 #include <flash.h>
 #include <init.h>
 #include <malloc.h>
+#include <net.h>
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <asm/mmc.h>
diff --git a/board/renesas/sh7753evb/sh7753evb.c b/board/renesas/sh7753evb/sh7753evb.c
index fbfc49ee01..0a762bc553 100644
--- a/board/renesas/sh7753evb/sh7753evb.c
+++ b/board/renesas/sh7753evb/sh7753evb.c
@@ -8,6 +8,7 @@
 #include <flash.h>
 #include <init.h>
 #include <malloc.h>
+#include <net.h>
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <asm/mmc.h>
diff --git a/board/renesas/sh7757lcr/sh7757lcr.c b/board/renesas/sh7757lcr/sh7757lcr.c
index ed041b14ee..eef5d36fd5 100644
--- a/board/renesas/sh7757lcr/sh7757lcr.c
+++ b/board/renesas/sh7757lcr/sh7757lcr.c
@@ -8,6 +8,7 @@
 #include <flash.h>
 #include <init.h>
 #include <malloc.h>
+#include <net.h>
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <asm/mmc.h>
diff --git a/board/rockchip/tinker_rk3288/tinker-rk3288.c b/board/rockchip/tinker_rk3288/tinker-rk3288.c
index 7af39e10cd..f85209c649 100644
--- a/board/rockchip/tinker_rk3288/tinker-rk3288.c
+++ b/board/rockchip/tinker_rk3288/tinker-rk3288.c
@@ -9,6 +9,7 @@
 #include <env.h>
 #include <i2c_eeprom.h>
 #include <init.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/arch-rockchip/bootrom.h>
 #include <asm/io.h>
diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c
index 390060e51f..948007c4a8 100644
--- a/board/samsung/common/board.c
+++ b/board/samsung/common/board.c
@@ -10,6 +10,7 @@
 #include <fdtdec.h>
 #include <hang.h>
 #include <init.h>
+#include <net.h>
 #include <spi.h>
 #include <tmu.h>
 #include <netdev.h>
diff --git a/board/samsung/smdkc100/smdkc100.c b/board/samsung/smdkc100/smdkc100.c
index a80300b0c0..fc2c2a94dc 100644
--- a/board/samsung/smdkc100/smdkc100.c
+++ b/board/samsung/smdkc100/smdkc100.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <net.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch/sromc.h>
diff --git a/board/samsung/smdkv310/smdkv310.c b/board/samsung/smdkv310/smdkv310.c
index 05369d2227..9b6502386e 100644
--- a/board/samsung/smdkv310/smdkv310.c
+++ b/board/samsung/smdkv310/smdkv310.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <net.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <netdev.h>
diff --git a/board/sandisk/sansa_fuze_plus/sfp.c b/board/sandisk/sansa_fuze_plus/sfp.c
index 663eddac11..c2c9b9c7e7 100644
--- a/board/sandisk/sansa_fuze_plus/sfp.c
+++ b/board/sandisk/sansa_fuze_plus/sfp.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <errno.h>
+#include <net.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch/iomux-mx23.h>
diff --git a/board/sbc8548/sbc8548.c b/board/sbc8548/sbc8548.c
index d246dce36d..c0e14cd5aa 100644
--- a/board/sbc8548/sbc8548.c
+++ b/board/sbc8548/sbc8548.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <net.h>
 #include <pci.h>
 #include <asm/processor.h>
 #include <asm/immap_85xx.h>
diff --git a/board/schulercontrol/sc_sps_1/sc_sps_1.c b/board/schulercontrol/sc_sps_1/sc_sps_1.c
index 41090dda10..422f25c2e9 100644
--- a/board/schulercontrol/sc_sps_1/sc_sps_1.c
+++ b/board/schulercontrol/sc_sps_1/sc_sps_1.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <net.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/seco/mx6quq7/mx6quq7.c b/board/seco/mx6quq7/mx6quq7.c
index fabc348440..b8aa0e7f69 100644
--- a/board/seco/mx6quq7/mx6quq7.c
+++ b/board/seco/mx6quq7/mx6quq7.c
@@ -8,6 +8,7 @@
  */
 
 #include <init.h>
+#include <net.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
diff --git a/board/siemens/draco/board.c b/board/siemens/draco/board.c
index 94bd71ad09..963de15fa8 100644
--- a/board/siemens/draco/board.c
+++ b/board/siemens/draco/board.c
@@ -16,6 +16,7 @@
 #include <env.h>
 #include <errno.h>
 #include <init.h>
+#include <net.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/hardware.h>
diff --git a/board/siemens/pxm2/board.c b/board/siemens/pxm2/board.c
index 58bb5bab1a..792b9137df 100644
--- a/board/siemens/pxm2/board.c
+++ b/board/siemens/pxm2/board.c
@@ -17,6 +17,7 @@
 #include <errno.h>
 #include <init.h>
 #include <malloc.h>
+#include <net.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/hardware.h>
diff --git a/board/siemens/rut/board.c b/board/siemens/rut/board.c
index bd4eaa4f3a..fff2b696ce 100644
--- a/board/siemens/rut/board.c
+++ b/board/siemens/rut/board.c
@@ -15,6 +15,7 @@
 #include <errno.h>
 #include <init.h>
 #include <malloc.h>
+#include <net.h>
 #include <spi.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
diff --git a/board/siemens/smartweb/smartweb.c b/board/siemens/smartweb/smartweb.c
index cb7206a561..40c9c7e21d 100644
--- a/board/siemens/smartweb/smartweb.c
+++ b/board/siemens/smartweb/smartweb.c
@@ -18,6 +18,7 @@
 #include <common.h>
 #include <dm.h>
 #include <init.h>
+#include <net.h>
 #include <asm/io.h>
 #include <asm/arch/at91sam9_sdramc.h>
 #include <asm/arch/at91sam9260_matrix.h>
diff --git a/board/silica/pengwyn/board.c b/board/silica/pengwyn/board.c
index c0496c549a..08eafefb91 100644
--- a/board/silica/pengwyn/board.c
+++ b/board/silica/pengwyn/board.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <net.h>
 #include <serial.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/hardware.h>
diff --git a/board/sks-kinkel/sksimx6/sksimx6.c b/board/sks-kinkel/sksimx6/sksimx6.c
index fa2acf59a7..48e7ff2479 100644
--- a/board/sks-kinkel/sksimx6/sksimx6.c
+++ b/board/sks-kinkel/sksimx6/sksimx6.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <net.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
diff --git a/board/softing/vining_2000/vining_2000.c b/board/softing/vining_2000/vining_2000.c
index c74c06eaee..f523e50ea5 100644
--- a/board/softing/vining_2000/vining_2000.c
+++ b/board/softing/vining_2000/vining_2000.c
@@ -7,6 +7,7 @@
  */
 
 #include <init.h>
+#include <net.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/iomux.h>
diff --git a/board/softing/vining_fpga/socfpga.c b/board/softing/vining_fpga/socfpga.c
index 5a88b6c8ad..537d9d1872 100644
--- a/board/softing/vining_fpga/socfpga.c
+++ b/board/softing/vining_fpga/socfpga.c
@@ -7,6 +7,7 @@
 #include <eeprom.h>
 #include <env.h>
 #include <init.h>
+#include <net.h>
 #include <status_led.h>
 #include <asm/arch/reset_manager.h>
 #include <asm/io.h>
diff --git a/board/solidrun/clearfog/clearfog.c b/board/solidrun/clearfog/clearfog.c
index 443751ba8f..490ca9bc34 100644
--- a/board/solidrun/clearfog/clearfog.c
+++ b/board/solidrun/clearfog/clearfog.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <miiphy.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
diff --git a/board/solidrun/mx6cuboxi/mx6cuboxi.c b/board/solidrun/mx6cuboxi/mx6cuboxi.c
index 13f77a3db2..262f6640d9 100644
--- a/board/solidrun/mx6cuboxi/mx6cuboxi.c
+++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c
@@ -15,6 +15,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <net.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
diff --git a/board/spear/spear300/spear300.c b/board/spear/spear300/spear300.c
index 83fdf027e9..c531eb3fc6 100644
--- a/board/spear/spear300/spear300.c
+++ b/board/spear/spear300/spear300.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <miiphy.h>
+#include <net.h>
 #include <netdev.h>
 #include <nand.h>
 #include <asm/io.h>
diff --git a/board/spear/spear310/spear310.c b/board/spear/spear310/spear310.c
index 1b3478a9fb..6e88547e1c 100644
--- a/board/spear/spear310/spear310.c
+++ b/board/spear/spear310/spear310.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <miiphy.h>
+#include <net.h>
 #include <netdev.h>
 #include <nand.h>
 #include <asm/io.h>
diff --git a/board/spear/spear320/spear320.c b/board/spear/spear320/spear320.c
index 640242e718..d8b1e7de4e 100644
--- a/board/spear/spear320/spear320.c
+++ b/board/spear/spear320/spear320.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <miiphy.h>
+#include <net.h>
 #include <netdev.h>
 #include <nand.h>
 #include <asm/io.h>
diff --git a/board/spear/spear600/spear600.c b/board/spear/spear600/spear600.c
index 91c2691b86..241f123ae1 100644
--- a/board/spear/spear600/spear600.c
+++ b/board/spear/spear600/spear600.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <miiphy.h>
+#include <net.h>
 #include <netdev.h>
 #include <nand.h>
 #include <asm/io.h>
diff --git a/board/spear/x600/x600.c b/board/spear/x600/x600.c
index 7cff6eecf2..e6f8dc9083 100644
--- a/board/spear/x600/x600.c
+++ b/board/spear/x600/x600.c
@@ -11,6 +11,7 @@
 #include <init.h>
 #include <micrel.h>
 #include <nand.h>
+#include <net.h>
 #include <netdev.h>
 #include <phy.h>
 #include <rtc.h>
diff --git a/board/st/stih410-b2260/board.c b/board/st/stih410-b2260/board.c
index 5d9fdf27b2..35bf497156 100644
--- a/board/st/stih410-b2260/board.c
+++ b/board/st/stih410-b2260/board.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <asm/cache.h>
 #include <linux/usb/otg.h>
 #include <dwc3-sti-glue.h>
 #include <dwc3-uboot.h>
diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
index 45068b1cd9..9e331be37c 100644
--- a/board/st/stm32mp1/stm32mp1.c
+++ b/board/st/stm32mp1/stm32mp1.c
@@ -22,6 +22,7 @@
 #include <misc.h>
 #include <mtd.h>
 #include <mtd_node.h>
+#include <net.h>
 #include <netdev.h>
 #include <phy.h>
 #include <remoteproc.h>
diff --git a/board/st/stv0991/stv0991.c b/board/st/stv0991/stv0991.c
index 33b29e647e..f193e83361 100644
--- a/board/st/stv0991/stv0991.c
+++ b/board/st/stv0991/stv0991.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <miiphy.h>
+#include <net.h>
 #include <asm/arch/stv0991_periph.h>
 #include <asm/arch/stv0991_defs.h>
 #include <asm/arch/hardware.h>
diff --git a/board/synopsys/axs10x/axs10x.c b/board/synopsys/axs10x/axs10x.c
index fa982bda5c..4bd88f85a6 100644
--- a/board/synopsys/axs10x/axs10x.c
+++ b/board/synopsys/axs10x/axs10x.c
@@ -9,6 +9,7 @@
 #include <malloc.h>
 #include <asm/arcregs.h>
 #include "axs10x.h"
+#include <asm/cache.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/synopsys/hsdk/hsdk.c b/board/synopsys/hsdk/hsdk.c
index a3e0563ff4..782b2bfef4 100644
--- a/board/synopsys/hsdk/hsdk.c
+++ b/board/synopsys/hsdk/hsdk.c
@@ -10,6 +10,7 @@
 #include <env.h>
 #include <init.h>
 #include <irq_func.h>
+#include <asm/cache.h>
 #include <linux/printk.h>
 #include <linux/kernel.h>
 #include <linux/io.h>
diff --git a/board/tcl/sl50/board.c b/board/tcl/sl50/board.c
index 7537fa213a..afa6290a2a 100644
--- a/board/tcl/sl50/board.c
+++ b/board/tcl/sl50/board.c
@@ -11,6 +11,7 @@
 #include <env.h>
 #include <errno.h>
 #include <init.h>
+#include <net.h>
 #include <serial.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
diff --git a/board/technexion/pico-imx6/pico-imx6.c b/board/technexion/pico-imx6/pico-imx6.c
index f8eeb40555..146bbc26d6 100644
--- a/board/technexion/pico-imx6/pico-imx6.c
+++ b/board/technexion/pico-imx6/pico-imx6.c
@@ -6,6 +6,7 @@
  * Author: Fabio Estevam <festevam@gmail.com>
  */
 
+#include <net.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/iomux.h>
diff --git a/board/technexion/pico-imx6ul/pico-imx6ul.c b/board/technexion/pico-imx6ul/pico-imx6ul.c
index e27a03c212..4294f3ed54 100644
--- a/board/technexion/pico-imx6ul/pico-imx6ul.c
+++ b/board/technexion/pico-imx6ul/pico-imx6ul.c
@@ -5,6 +5,7 @@
  * Author: Richard Hu <richard.hu@technexion.com>
  */
 
+#include <net.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/technexion/pico-imx7d/pico-imx7d.c b/board/technexion/pico-imx7d/pico-imx7d.c
index b7ca2e1315..a6fd49d729 100644
--- a/board/technexion/pico-imx7d/pico-imx7d.c
+++ b/board/technexion/pico-imx7d/pico-imx7d.c
@@ -4,6 +4,7 @@
  */
 
 #include <init.h>
+#include <net.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/technologic/ts4800/ts4800.c b/board/technologic/ts4800/ts4800.c
index ff1a189c7e..f79e7747e2 100644
--- a/board/technologic/ts4800/ts4800.c
+++ b/board/technologic/ts4800/ts4800.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <net.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/theadorable/theadorable.c b/board/theadorable/theadorable.c
index 621e26905b..9af1799fa5 100644
--- a/board/theadorable/theadorable.c
+++ b/board/theadorable/theadorable.c
@@ -7,6 +7,7 @@
 #include <console.h>
 #include <i2c.h>
 #include <init.h>
+#include <net.h>
 #include <pci.h>
 #if !defined(CONFIG_SPL_BUILD)
 #include <bootcount.h>
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index 01b28e8da4..c6de8602d0 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -13,6 +13,7 @@
 #include <errno.h>
 #include <init.h>
 #include <malloc.h>
+#include <net.h>
 #include <spl.h>
 #include <serial.h>
 #include <asm/arch/cpu.h>
diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c
index 21fc5ed1d3..87c7ef6b3f 100644
--- a/board/ti/am43xx/board.c
+++ b/board/ti/am43xx/board.c
@@ -14,6 +14,7 @@
 #include <fdt_support.h>
 #include <i2c.h>
 #include <init.h>
+#include <net.h>
 #include <linux/errno.h>
 #include <spl.h>
 #include <usb.h>
diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c
index 34ca3ec9b0..c80a458c12 100644
--- a/board/ti/am57xx/board.c
+++ b/board/ti/am57xx/board.c
@@ -12,6 +12,7 @@
 #include <fdt_support.h>
 #include <init.h>
 #include <malloc.h>
+#include <net.h>
 #include <palmas.h>
 #include <sata.h>
 #include <serial.h>
diff --git a/board/ti/am65x/evm.c b/board/ti/am65x/evm.c
index a610879424..9d96710f05 100644
--- a/board/ti/am65x/evm.c
+++ b/board/ti/am65x/evm.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <dm.h>
 #include <init.h>
+#include <net.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/hardware.h>
 #include <asm/gpio.h>
diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
index 12e657c9c6..cb3a12ec37 100644
--- a/board/ti/beagle/beagle.c
+++ b/board/ti/beagle/beagle.c
@@ -15,6 +15,7 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
+#include <net.h>
 #include <ns16550.h>
 #include <serial.h>
 #ifdef CONFIG_LED_STATUS
diff --git a/board/ti/common/board_detect.c b/board/ti/common/board_detect.c
index cbd35f2434..3938dea430 100644
--- a/board/ti/common/board_detect.c
+++ b/board/ti/common/board_detect.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <eeprom.h>
+#include <net.h>
 #include <asm/arch/hardware.h>
 #include <asm/omap_common.h>
 #include <dm/uclass.h>
diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c
index 8132cdfbf2..8f59598950 100644
--- a/board/ti/dra7xx/evm.c
+++ b/board/ti/dra7xx/evm.c
@@ -14,6 +14,7 @@
 #include <fdt_support.h>
 #include <init.h>
 #include <spl.h>
+#include <net.h>
 #include <palmas.h>
 #include <sata.h>
 #include <serial.h>
diff --git a/board/ti/evm/evm.c b/board/ti/evm/evm.c
index d26dd5ba84..7161c934cd 100644
--- a/board/ti/evm/evm.c
+++ b/board/ti/evm/evm.c
@@ -13,6 +13,7 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
+#include <net.h>
 #include <ns16550.h>
 #include <netdev.h>
 #include <serial.h>
diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c
index c068bb86b5..7bc03edd53 100644
--- a/board/ti/j721e/evm.c
+++ b/board/ti/j721e/evm.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <net.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/hardware.h>
 #include <asm/gpio.h>
diff --git a/board/ti/omap5_uevm/evm.c b/board/ti/omap5_uevm/evm.c
index ee7efcbfa7..0d19ad018a 100644
--- a/board/ti/omap5_uevm/evm.c
+++ b/board/ti/omap5_uevm/evm.c
@@ -6,6 +6,7 @@
  * Steve Sakoman  <steve@sakoman.com>
  */
 #include <common.h>
+#include <net.h>
 #include <palmas.h>
 #include <asm/arch/omap.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/ti/panda/panda.c b/board/ti/panda/panda.c
index 20199da390..b1e51bc431 100644
--- a/board/ti/panda/panda.c
+++ b/board/ti/panda/panda.c
@@ -5,6 +5,7 @@
  * Steve Sakoman  <steve@sakoman.com>
  */
 #include <common.h>
+#include <net.h>
 #include <asm/mach-types.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/mmc_host_def.h>
diff --git a/board/ti/sdp4430/sdp.c b/board/ti/sdp4430/sdp.c
index e71c53e5ee..97da5ccf0d 100644
--- a/board/ti/sdp4430/sdp.c
+++ b/board/ti/sdp4430/sdp.c
@@ -6,6 +6,7 @@
  * Steve Sakoman  <steve@sakoman.com>
  */
 #include <common.h>
+#include <net.h>
 #include <twl6030.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/mmc_host_def.h>
diff --git a/board/ti/ti814x/evm.c b/board/ti/ti814x/evm.c
index 2b9385d14b..7f82e71228 100644
--- a/board/ti/ti814x/evm.c
+++ b/board/ti/ti814x/evm.c
@@ -11,6 +11,7 @@
 #include <cpsw.h>
 #include <env.h>
 #include <errno.h>
+#include <net.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/hardware.h>
diff --git a/board/ti/ti816x/evm.c b/board/ti/ti816x/evm.c
index 3896ebbfda..e895a216fe 100644
--- a/board/ti/ti816x/evm.c
+++ b/board/ti/ti816x/evm.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <net.h>
 #include <spl.h>
 #include <asm/cache.h>
 #include <asm/io.h>
diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c
index 8c4a359c75..47925568c6 100644
--- a/board/toradex/apalis_imx6/apalis_imx6.c
+++ b/board/toradex/apalis_imx6/apalis_imx6.c
@@ -10,6 +10,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <init.h>
+#include <net.h>
 
 #include <ahci.h>
 #include <asm/arch/clock.h>
diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c
index d11401ecab..197d8c39f5 100644
--- a/board/toradex/colibri_imx6/colibri_imx6.c
+++ b/board/toradex/colibri_imx6/colibri_imx6.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <env.h>
 #include <init.h>
+#include <net.h>
 
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c
index 8727101aa3..8e62b79ef3 100644
--- a/board/toradex/colibri_imx7/colibri_imx7.c
+++ b/board/toradex/colibri_imx7/colibri_imx7.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <init.h>
+#include <net.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/toradex/colibri_pxa270/colibri_pxa270.c b/board/toradex/colibri_pxa270/colibri_pxa270.c
index c4db516b07..93693712a9 100644
--- a/board/toradex/colibri_pxa270/colibri_pxa270.c
+++ b/board/toradex/colibri_pxa270/colibri_pxa270.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <dm.h>
+#include <net.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/pxa.h>
 #include <asm/arch/regs-mmc.h>
diff --git a/board/toradex/common/tdx-cfg-block.c b/board/toradex/common/tdx-cfg-block.c
index 1b6c911418..bd7d8b7f53 100644
--- a/board/toradex/common/tdx-cfg-block.c
+++ b/board/toradex/common/tdx-cfg-block.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include "tdx-cfg-block.h"
+#include <asm/cache.h>
 
 #if defined(CONFIG_TARGET_APALIS_IMX6) || \
 	defined(CONFIG_TARGET_APALIS_IMX8) || \
diff --git a/board/tqc/tqma6/tqma6_mba6.c b/board/tqc/tqma6/tqma6_mba6.c
index a5b7587737..c5598c0e8c 100644
--- a/board/tqc/tqma6/tqma6_mba6.c
+++ b/board/tqc/tqma6/tqma6_mba6.c
@@ -8,6 +8,7 @@
  */
 
 #include <init.h>
+#include <net.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/mx6-pins.h>
diff --git a/board/tqc/tqma6/tqma6_wru4.c b/board/tqc/tqma6/tqma6_wru4.c
index 1320f8ad78..d64eff4ffa 100644
--- a/board/tqc/tqma6/tqma6_wru4.c
+++ b/board/tqc/tqma6/tqma6_wru4.c
@@ -10,6 +10,7 @@
  */
 
 #include <init.h>
+#include <net.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/mx6-pins.h>
diff --git a/board/udoo/neo/neo.c b/board/udoo/neo/neo.c
index 2ba98c7b52..096551b3c7 100644
--- a/board/udoo/neo/neo.c
+++ b/board/udoo/neo/neo.c
@@ -9,6 +9,7 @@
  */
 
 #include <init.h>
+#include <net.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/udoo/udoo.c b/board/udoo/udoo.c
index 2a4e790d88..0370db67e4 100644
--- a/board/udoo/udoo.c
+++ b/board/udoo/udoo.c
@@ -6,6 +6,7 @@
  */
 
 #include <init.h>
+#include <net.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
diff --git a/board/variscite/dart_6ul/dart_6ul.c b/board/variscite/dart_6ul/dart_6ul.c
index 2d0b760c39..0f00506d7a 100644
--- a/board/variscite/dart_6ul/dart_6ul.c
+++ b/board/variscite/dart_6ul/dart_6ul.c
@@ -4,6 +4,7 @@
  * Copyright (C) 2019 Parthiban Nallathambi <parthitce@gmail.com>
  */
 
+#include <net.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/mx6-pins.h>
diff --git a/board/varisys/cyrus/eth.c b/board/varisys/cyrus/eth.c
index 9783abd659..45b21fba32 100644
--- a/board/varisys/cyrus/eth.c
+++ b/board/varisys/cyrus/eth.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <net.h>
 #include <netdev.h>
 #include <asm/fsl_serdes.h>
 #include <fm_eth.h>
diff --git a/board/vscom/baltos/board.c b/board/vscom/baltos/board.c
index c76502c964..197405e555 100644
--- a/board/vscom/baltos/board.c
+++ b/board/vscom/baltos/board.c
@@ -11,6 +11,7 @@
 #include <env.h>
 #include <errno.h>
 #include <init.h>
+#include <net.h>
 #include <serial.h>
 #include <linux/libfdt.h>
 #include <spl.h>
diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c
index 1ebec93916..50630574fd 100644
--- a/board/warp7/warp7.c
+++ b/board/warp7/warp7.c
@@ -5,6 +5,7 @@
  */
 
 #include <init.h>
+#include <net.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/mx7-pins.h>
diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c
index 483e3ce2f7..24cff0c370 100644
--- a/board/xilinx/versal/board.c
+++ b/board/xilinx/versal/board.c
@@ -10,6 +10,7 @@
 #include <init.h>
 #include <malloc.h>
 #include <time.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index a2a0d56331..6aad1352c4 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -9,6 +9,7 @@
 #include <debug_uart.h>
 #include <env.h>
 #include <init.h>
+#include <net.h>
 #include <sata.h>
 #include <ahci.h>
 #include <scsi.h>
@@ -18,6 +19,7 @@
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/psu_init_gpl.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <dm/device.h>
 #include <dm/uclass.h>
diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c
index 9edcf8d74e..ec399c07ae 100644
--- a/cmd/bdinfo.c
+++ b/cmd/bdinfo.c
@@ -10,7 +10,9 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <net.h>
 #include <vsprintf.h>
+#include <asm/cache.h>
 #include <linux/compiler.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/cmd/elf.c b/cmd/elf.c
index 10e8264d3c..0d6d2ce604 100644
--- a/cmd/elf.c
+++ b/cmd/elf.c
@@ -14,6 +14,7 @@
 #include <vxworks.h>
 #ifdef CONFIG_X86
 #include <vbe.h>
+#include <asm/cache.h>
 #include <asm/e820.h>
 #include <linux/linkage.h>
 #endif
diff --git a/cmd/ethsw.c b/cmd/ethsw.c
index 8d271ce1f3..d178a0c10d 100644
--- a/cmd/ethsw.c
+++ b/cmd/ethsw.c
@@ -11,6 +11,7 @@
 #include <errno.h>
 #include <env_flags.h>
 #include <ethsw.h>
+#include <net.h>
 
 static const char *ethsw_name;
 
diff --git a/cmd/fat.c b/cmd/fat.c
index abce2f1e0c..28fca501fa 100644
--- a/cmd/fat.c
+++ b/cmd/fat.c
@@ -11,6 +11,7 @@
 #include <mapmem.h>
 #include <fat.h>
 #include <fs.h>
+#include <asm/cache.h>
 
 int do_fat_size(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
diff --git a/cmd/load.c b/cmd/load.c
index fab30fe894..36db571cea 100644
--- a/cmd/load.c
+++ b/cmd/load.c
@@ -19,6 +19,7 @@
 #include <exports.h>
 #include <serial.h>
 #include <xyzModem.h>
+#include <asm/cache.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/cmd/mem.c b/cmd/mem.c
index 18f0510098..24a9c7731c 100644
--- a/cmd/mem.c
+++ b/cmd/mem.c
@@ -19,6 +19,7 @@
 #include <flash.h>
 #include <hash.h>
 #include <mapmem.h>
+#include <rand.h>
 #include <watchdog.h>
 #include <asm/io.h>
 #include <linux/compiler.h>
diff --git a/cmd/mvebu/bubt.c b/cmd/mvebu/bubt.c
index f0ee54d6d2..c5af669d0d 100644
--- a/cmd/mvebu/bubt.c
+++ b/cmd/mvebu/bubt.c
@@ -10,6 +10,7 @@
 #include <env.h>
 #include <flash.h>
 #include <image.h>
+#include <net.h>
 #include <vsprintf.h>
 #include <errno.h>
 #include <dm.h>
diff --git a/cmd/nand.c b/cmd/nand.c
index 4de6892a01..9c2b5d718e 100644
--- a/cmd/nand.c
+++ b/cmd/nand.c
@@ -21,6 +21,7 @@
 
 #include <common.h>
 #include <image.h>
+#include <asm/cache.h>
 #include <linux/mtd/mtd.h>
 #include <command.h>
 #include <console.h>
diff --git a/cmd/nvedit.c b/cmd/nvedit.c
index 966c134059..a86063df94 100644
--- a/cmd/nvedit.c
+++ b/cmd/nvedit.c
@@ -29,6 +29,7 @@
 #include <console.h>
 #include <env.h>
 #include <env_internal.h>
+#include <net.h>
 #include <search.h>
 #include <errno.h>
 #include <malloc.h>
diff --git a/cmd/pxe_utils.c b/cmd/pxe_utils.c
index c244bfb10d..8fc33670c8 100644
--- a/cmd/pxe_utils.c
+++ b/cmd/pxe_utils.c
@@ -10,6 +10,7 @@
 #include <malloc.h>
 #include <mapmem.h>
 #include <lcd.h>
+#include <net.h>
 #include <linux/string.h>
 #include <linux/ctype.h>
 #include <errno.h>
diff --git a/cmd/sf.c b/cmd/sf.c
index 2b9c268ac4..69e0d46a55 100644
--- a/cmd/sf.c
+++ b/cmd/sf.c
@@ -13,6 +13,7 @@
 #include <mapmem.h>
 #include <spi.h>
 #include <spi_flash.h>
+#include <asm/cache.h>
 #include <jffs2/jffs2.h>
 #include <linux/mtd/mtd.h>
 
diff --git a/cmd/tlv_eeprom.c b/cmd/tlv_eeprom.c
index 211ab2680f..8b768f3108 100644
--- a/cmd/tlv_eeprom.c
+++ b/cmd/tlv_eeprom.c
@@ -15,6 +15,7 @@
 #include <i2c.h>
 #include <i2c_eeprom.h>
 #include <env.h>
+#include <net.h>
 #include <linux/ctype.h>
 #include <u-boot/crc.h>
 
diff --git a/cmd/ximg.c b/cmd/ximg.c
index 770f6a3eed..73c764255f 100644
--- a/cmd/ximg.c
+++ b/cmd/ximg.c
@@ -24,6 +24,7 @@
 #include <bzlib.h>
 #endif
 #include <asm/byteorder.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 
 #ifndef CONFIG_SYS_XIMG_LEN
diff --git a/common/board_f.c b/common/board_f.c
index 5c650f046c..8dd3c41268 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -40,6 +40,7 @@
 #include <trace.h>
 #include <video.h>
 #include <watchdog.h>
+#include <asm/cache.h>
 #ifdef CONFIG_MACH_TYPE
 #include <asm/mach-types.h>
 #endif
diff --git a/common/board_r.c b/common/board_r.c
index 138d65b13b..d8c4cfcc78 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -18,6 +18,7 @@
 #include <image.h>
 #include <irq_func.h>
 #include <net.h>
+#include <asm/cache.h>
 #include <u-boot/crc.h>
 /* TODO: can we just include all these headers whether needed or not? */
 #if defined(CONFIG_CMD_BEDBUG)
diff --git a/common/bootm.c b/common/bootm.c
index db4362a643..96cba01589 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -15,6 +15,8 @@
 #include <lmb.h>
 #include <malloc.h>
 #include <mapmem.h>
+#include <net.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #if defined(CONFIG_CMD_USB)
 #include <usb.h>
diff --git a/common/bouncebuf.c b/common/bouncebuf.c
index 0ace152b98..6bb8b53902 100644
--- a/common/bouncebuf.c
+++ b/common/bouncebuf.c
@@ -10,6 +10,7 @@
 #include <malloc.h>
 #include <errno.h>
 #include <bouncebuf.h>
+#include <asm/cache.h>
 
 static int addr_aligned(struct bounce_buffer *state)
 {
diff --git a/common/fdt_support.c b/common/fdt_support.c
index 02cf5c6241..fad551fdd6 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <env.h>
 #include <mapmem.h>
+#include <net.h>
 #include <stdio_dev.h>
 #include <linux/ctype.h>
 #include <linux/types.h>
diff --git a/common/hash.c b/common/hash.c
index ff4986a619..2cf763575f 100644
--- a/common/hash.c
+++ b/common/hash.c
@@ -16,6 +16,7 @@
 #include <malloc.h>
 #include <mapmem.h>
 #include <hw_sha.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <u-boot/crc.h>
diff --git a/common/image.c b/common/image.c
index d8d14e871c..14e27fbe3c 100644
--- a/common/image.c
+++ b/common/image.c
@@ -11,6 +11,7 @@
 #include <cpu_func.h>
 #include <env.h>
 #include <malloc.h>
+#include <asm/cache.h>
 #include <u-boot/crc.h>
 #include <watchdog.h>
 
diff --git a/common/lcd.c b/common/lcd.c
index f8bc1ceba7..c421090c87 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -12,6 +12,7 @@
 #include <command.h>
 #include <cpu_func.h>
 #include <env_callback.h>
+#include <asm/cache.h>
 #include <linux/types.h>
 #include <stdio_dev.h>
 #include <lcd.h>
diff --git a/common/log_syslog.c b/common/log_syslog.c
index 5e3e20e8a4..698c585fa1 100644
--- a/common/log_syslog.c
+++ b/common/log_syslog.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <net.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/common/main.c b/common/main.c
index 06d7ff56d6..64287f7dee 100644
--- a/common/main.c
+++ b/common/main.c
@@ -13,6 +13,7 @@
 #include <console.h>
 #include <env.h>
 #include <init.h>
+#include <net.h>
 #include <version.h>
 
 static void run_preboot_environment_command(void)
diff --git a/common/spl/spl_atf.c b/common/spl/spl_atf.c
index 702367b2a2..bc2921c552 100644
--- a/common/spl/spl_atf.c
+++ b/common/spl/spl_atf.c
@@ -14,6 +14,7 @@
 #include <cpu_func.h>
 #include <errno.h>
 #include <spl.h>
+#include <asm/cache.h>
 
 static struct bl2_to_bl31_params_mem bl31_params_mem;
 static struct bl31_params *bl2_to_bl31_params;
diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
index c51e4beb1c..3df4c8f32d 100644
--- a/common/spl/spl_fit.c
+++ b/common/spl/spl_fit.c
@@ -12,6 +12,7 @@
 #include <image.h>
 #include <malloc.h>
 #include <spl.h>
+#include <asm/cache.h>
 #include <linux/libfdt.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/common/usb_storage.c b/common/usb_storage.c
index b291ac55d1..76af7cc6bd 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -39,6 +39,7 @@
 #include <mapmem.h>
 #include <memalign.h>
 #include <asm/byteorder.h>
+#include <asm/cache.h>
 #include <asm/processor.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
diff --git a/disk/part_efi.c b/disk/part_efi.c
index 2970ce5bab..de15a37cd5 100644
--- a/disk/part_efi.c
+++ b/disk/part_efi.c
@@ -10,6 +10,7 @@
  *   limits the maximum size of addressable storage to < 2 Terra Bytes
  */
 #include <uuid.h>
+#include <asm/cache.h>
 #include <asm/unaligned.h>
 #include <common.h>
 #include <command.h>
diff --git a/disk/part_iso.c b/disk/part_iso.c
index e733227f59..4f14c9a56e 100644
--- a/disk/part_iso.c
+++ b/disk/part_iso.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <asm/cache.h>
 #include <asm/unaligned.h>
 #include "part_iso.h"
 
diff --git a/drivers/ata/dwc_ahsata.c b/drivers/ata/dwc_ahsata.c
index 2bc1de8b98..d2aa1a64d1 100644
--- a/drivers/ata/dwc_ahsata.c
+++ b/drivers/ata/dwc_ahsata.c
@@ -14,6 +14,7 @@
 #include <malloc.h>
 #include <memalign.h>
 #include <sata.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 6019ac089e..a71a7edf88 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -35,6 +35,7 @@
 #include <ahci.h>
 #include <cpu_func.h>
 #include <dm.h>
+#include <asm/cache.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
 #include <fis.h>
diff --git a/drivers/bootcount/bootcount.c b/drivers/bootcount/bootcount.c
index 655dfaf59c..e8db8542f9 100644
--- a/drivers/bootcount/bootcount.c
+++ b/drivers/bootcount/bootcount.c
@@ -6,6 +6,7 @@
 
 #include <bootcount.h>
 #include <cpu_func.h>
+#include <asm/cache.h>
 #include <linux/compiler.h>
 
 #if !defined(CONFIG_DM_BOOTCOUNT)
diff --git a/drivers/bootcount/bootcount_ram.c b/drivers/bootcount/bootcount_ram.c
index 9c678e25f4..078c84d5ec 100644
--- a/drivers/bootcount/bootcount_ram.c
+++ b/drivers/bootcount/bootcount_ram.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/clk/clk_versal.c b/drivers/clk/clk_versal.c
index 075a08380d..8b202fa0ae 100644
--- a/drivers/clk/clk_versal.c
+++ b/drivers/clk/clk_versal.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <asm/cache.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/bitfield.h>
diff --git a/drivers/core/device.c b/drivers/core/device.c
index 0157bb1fe0..ee0c861807 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -15,6 +15,7 @@
 #include <fdtdec.h>
 #include <fdt_support.h>
 #include <malloc.h>
+#include <asm/cache.h>
 #include <dm/device.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
diff --git a/drivers/crypto/ace_sha.c b/drivers/crypto/ace_sha.c
index 34611056ec..b5321ed820 100644
--- a/drivers/crypto/ace_sha.c
+++ b/drivers/crypto/ace_sha.c
@@ -5,6 +5,7 @@
  */
 #include <common.h>
 #include "ace_sha.h"
+#include <rand.h>
 
 #ifdef CONFIG_SHA_HW_ACCEL
 #include <u-boot/sha256.h>
diff --git a/drivers/crypto/fsl/fsl_blob.c b/drivers/crypto/fsl/fsl_blob.c
index 0531b1b735..c2059b8b0a 100644
--- a/drivers/crypto/fsl/fsl_blob.c
+++ b/drivers/crypto/fsl/fsl_blob.c
@@ -9,6 +9,7 @@
 #include <malloc.h>
 #include <memalign.h>
 #include <fsl_sec.h>
+#include <asm/cache.h>
 #include <linux/errno.h>
 #include "jobdesc.h"
 #include "desc.h"
diff --git a/drivers/crypto/fsl/fsl_hash.c b/drivers/crypto/fsl/fsl_hash.c
index 74e38ca759..e63def8b2d 100644
--- a/drivers/crypto/fsl/fsl_hash.c
+++ b/drivers/crypto/fsl/fsl_hash.c
@@ -13,6 +13,7 @@
 #include "jr.h"
 #include "fsl_hash.h"
 #include <hw_sha.h>
+#include <asm/cache.h>
 #include <linux/errno.h>
 
 #define CRYPTO_MAX_ALG_NAME	80
diff --git a/drivers/crypto/fsl/jobdesc.c b/drivers/crypto/fsl/jobdesc.c
index 637ef29f15..2f35e0c90b 100644
--- a/drivers/crypto/fsl/jobdesc.c
+++ b/drivers/crypto/fsl/jobdesc.c
@@ -13,6 +13,7 @@
 #include "desc_constr.h"
 #include "jobdesc.h"
 #include "rsa_caam.h"
+#include <asm/cache.h>
 
 #if defined(CONFIG_MX6) || defined(CONFIG_MX7)
 /*!
diff --git a/drivers/crypto/fsl/jr.c b/drivers/crypto/fsl/jr.c
index aa84f2cee0..9228149863 100644
--- a/drivers/crypto/fsl/jr.c
+++ b/drivers/crypto/fsl/jr.c
@@ -13,7 +13,9 @@
 #include "jobdesc.h"
 #include "desc_constr.h"
 #include <time.h>
+#include <asm/cache.h>
 #ifdef CONFIG_FSL_CORENET
+#include <asm/cache.h>
 #include <asm/fsl_pamu.h>
 #endif
 
diff --git a/drivers/ddr/altera/sdram_arria10.c b/drivers/ddr/altera/sdram_arria10.c
index 2fd50b7ae5..049f202e03 100644
--- a/drivers/ddr/altera/sdram_arria10.c
+++ b/drivers/ddr/altera/sdram_arria10.c
@@ -10,6 +10,7 @@
 #include <malloc.h>
 #include <wait_bit.h>
 #include <watchdog.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/arch/fpga_manager.h>
 #include <asm/arch/misc.h>
diff --git a/drivers/ddr/altera/sdram_soc64.c b/drivers/ddr/altera/sdram_soc64.c
index 1f7ead0c67..c06fba92f8 100644
--- a/drivers/ddr/altera/sdram_soc64.c
+++ b/drivers/ddr/altera/sdram_soc64.c
@@ -18,6 +18,7 @@
 #include <asm/arch/firewall.h>
 #include <asm/arch/system_manager.h>
 #include <asm/arch/reset_manager.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
 #include <linux/sizes.h>
diff --git a/drivers/dma/apbh_dma.c b/drivers/dma/apbh_dma.c
index 15133128be..242ffde559 100644
--- a/drivers/dma/apbh_dma.c
+++ b/drivers/dma/apbh_dma.c
@@ -10,6 +10,7 @@
  */
 
 #include <cpu_func.h>
+#include <asm/cache.h>
 #include <linux/list.h>
 
 #include <common.h>
diff --git a/drivers/dma/bcm6348-iudma.c b/drivers/dma/bcm6348-iudma.c
index d99460f2fb..70bdb65071 100644
--- a/drivers/dma/bcm6348-iudma.c
+++ b/drivers/dma/bcm6348-iudma.c
@@ -22,6 +22,7 @@
 #include <dma-uclass.h>
 #include <malloc.h>
 #include <memalign.h>
+#include <net.h>
 #include <reset.h>
 #include <asm/io.h>
 
diff --git a/drivers/dma/dma-uclass.c b/drivers/dma/dma-uclass.c
index 9d5a7fc796..d2b0b63ecd 100644
--- a/drivers/dma/dma-uclass.c
+++ b/drivers/dma/dma-uclass.c
@@ -13,6 +13,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <malloc.h>
+#include <asm/cache.h>
 #include <dm/read.h>
 #include <dma-uclass.h>
 #include <dt-structs.h>
diff --git a/drivers/dma/ti-edma3.c b/drivers/dma/ti-edma3.c
index 7e11b13e45..77c4ba9530 100644
--- a/drivers/dma/ti-edma3.c
+++ b/drivers/dma/ti-edma3.c
@@ -8,6 +8,7 @@
  * Author: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
  */
 
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <common.h>
 #include <dm.h>
diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
index a0e536ae5e..5b11f240fe 100644
--- a/drivers/dma/ti/k3-udma.c
+++ b/drivers/dma/ti/k3-udma.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/bitops.h>
 #include <malloc.h>
diff --git a/drivers/firmware/firmware-zynqmp.c b/drivers/firmware/firmware-zynqmp.c
index c37642569d..47746458a0 100644
--- a/drivers/firmware/firmware-zynqmp.c
+++ b/drivers/firmware/firmware-zynqmp.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <zynqmp_firmware.h>
+#include <asm/cache.h>
 
 #if defined(CONFIG_ZYNQMP_IPI)
 #include <mailbox.h>
diff --git a/drivers/fpga/versalpl.c b/drivers/fpga/versalpl.c
index 6c69ab7802..8ab19e0c74 100644
--- a/drivers/fpga/versalpl.c
+++ b/drivers/fpga/versalpl.c
@@ -10,6 +10,7 @@
 #include <memalign.h>
 #include <versalpl.h>
 #include <zynqmp_firmware.h>
+#include <asm/cache.h>
 
 static ulong versal_align_dma_buffer(ulong *buf, u32 len)
 {
diff --git a/drivers/fpga/zynqmppl.c b/drivers/fpga/zynqmppl.c
index 4a826e4a71..a2a5f9cbbe 100644
--- a/drivers/fpga/zynqmppl.c
+++ b/drivers/fpga/zynqmppl.c
@@ -10,6 +10,7 @@
 #include <cpu_func.h>
 #include <zynqmppl.h>
 #include <zynqmp_firmware.h>
+#include <asm/cache.h>
 #include <linux/sizes.h>
 #include <asm/arch/sys_proto.h>
 #include <memalign.h>
diff --git a/drivers/fpga/zynqpl.c b/drivers/fpga/zynqpl.c
index 21624f715b..6370cafb23 100644
--- a/drivers/fpga/zynqpl.c
+++ b/drivers/fpga/zynqpl.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <console.h>
 #include <cpu_func.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <fs.h>
 #include <zynqpl.h>
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
index 1224540811..6290b7fb5b 100644
--- a/drivers/mmc/dw_mmc.c
+++ b/drivers/mmc/dw_mmc.c
@@ -14,6 +14,7 @@
 #include <mmc.h>
 #include <dwmmc.h>
 #include <wait_bit.h>
+#include <asm/cache.h>
 #include <power/regulator.h>
 
 #define PAGE_SIZE 4096
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index 386781da03..a35e791fcc 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -20,6 +20,7 @@
 #include <malloc.h>
 #include <fsl_esdhc.h>
 #include <fdt_support.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <dm.h>
 #include <dm/device_compat.h>
diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c
index 6bca2a9c82..0cdf5a0489 100644
--- a/drivers/mmc/fsl_esdhc_imx.c
+++ b/drivers/mmc/fsl_esdhc_imx.c
@@ -19,6 +19,7 @@
 #include <hwconfig.h>
 #include <mmc.h>
 #include <part.h>
+#include <asm/cache.h>
 #include <dm/device_compat.h>
 #include <linux/err.h>
 #include <power/regulator.h>
diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
index 4d0dc33936..886299a50d 100644
--- a/drivers/mmc/omap_hsmmc.c
+++ b/drivers/mmc/omap_hsmmc.c
@@ -33,6 +33,7 @@
 #if defined(CONFIG_OMAP54XX) || defined(CONFIG_OMAP44XX)
 #include <palmas.h>
 #endif
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/arch/mmc_host_def.h>
 #ifdef CONFIG_OMAP54XX
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index 372dc0a820..4b533a38bd 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -15,6 +15,7 @@
 #include <mmc.h>
 #include <sdhci.h>
 #include <dm.h>
+#include <asm/cache.h>
 #include <linux/dma-mapping.h>
 
 static void sdhci_reset(struct sdhci_host *host, u8 mask)
diff --git a/drivers/mmc/stm32_sdmmc2.c b/drivers/mmc/stm32_sdmmc2.c
index 6f3b2ad653..b76a7edc0b 100644
--- a/drivers/mmc/stm32_sdmmc2.c
+++ b/drivers/mmc/stm32_sdmmc2.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <malloc.h>
+#include <asm/cache.h>
 #include <linux/libfdt.h>
 #include <mmc.h>
 #include <reset.h>
diff --git a/drivers/mtd/nand/raw/denali.c b/drivers/mtd/nand/raw/denali.c
index 3a09a8165c..a58d7ce4ab 100644
--- a/drivers/mtd/nand/raw/denali.c
+++ b/drivers/mtd/nand/raw/denali.c
@@ -5,9 +5,12 @@
  * Copyright (C) 2009-2010, Intel Corporation and its suppliers.
  */
 
+#include <common.h>
 #include <dm.h>
 #include <malloc.h>
 #include <nand.h>
+#include <asm/cache.h>
+#include <asm/dma-mapping.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <linux/bitfield.h>
diff --git a/drivers/mtd/nand/raw/mxs_nand.c b/drivers/mtd/nand/raw/mxs_nand.c
index fe8097c146..522e33a33b 100644
--- a/drivers/mtd/nand/raw/mxs_nand.c
+++ b/drivers/mtd/nand/raw/mxs_nand.c
@@ -15,6 +15,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <dm.h>
+#include <asm/cache.h>
 #include <linux/mtd/rawnand.h>
 #include <linux/sizes.h>
 #include <linux/types.h>
diff --git a/drivers/mtd/nand/raw/mxs_nand_spl.c b/drivers/mtd/nand/raw/mxs_nand_spl.c
index a653dfa5ed..45c9ed4b9c 100644
--- a/drivers/mtd/nand/raw/mxs_nand_spl.c
+++ b/drivers/mtd/nand/raw/mxs_nand_spl.c
@@ -7,6 +7,7 @@
 #include <nand.h>
 #include <malloc.h>
 #include <mxs_nand.h>
+#include <asm/cache.h>
 #include <linux/err.h>
 
 static struct mtd_info *mtd;
diff --git a/drivers/mtd/nand/raw/nand_util.c b/drivers/mtd/nand/raw/nand_util.c
index f3c8f7f2cb..9c4af8a5d6 100644
--- a/drivers/mtd/nand/raw/nand_util.c
+++ b/drivers/mtd/nand/raw/nand_util.c
@@ -24,6 +24,7 @@
 #include <malloc.h>
 #include <memalign.h>
 #include <div64.h>
+#include <asm/cache.h>
 #include <dm/devres.h>
 
 #include <linux/errno.h>
diff --git a/drivers/net/ag7xxx.c b/drivers/net/ag7xxx.c
index e3a7222efb..11c9124e31 100644
--- a/drivers/net/ag7xxx.c
+++ b/drivers/net/ag7xxx.c
@@ -13,6 +13,8 @@
 #include <errno.h>
 #include <miiphy.h>
 #include <malloc.h>
+#include <net.h>
+#include <asm/cache.h>
 #include <linux/compiler.h>
 #include <linux/err.h>
 #include <linux/mii.h>
diff --git a/drivers/net/bcm-sf2-eth-gmac.c b/drivers/net/bcm-sf2-eth-gmac.c
index 6a25f67c30..3794e40b01 100644
--- a/drivers/net/bcm-sf2-eth-gmac.c
+++ b/drivers/net/bcm-sf2-eth-gmac.c
@@ -14,6 +14,7 @@
 #include <cpu_func.h>
 #include <malloc.h>
 #include <net.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <phy.h>
 
diff --git a/drivers/net/bcmgenet.c b/drivers/net/bcmgenet.c
index 8f4848aec6..f3ac064c1d 100644
--- a/drivers/net/bcmgenet.c
+++ b/drivers/net/bcmgenet.c
@@ -16,6 +16,7 @@
  * we only support v5, as used in the Raspberry Pi 4.
  */
 
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <clk.h>
 #include <cpu_func.h>
diff --git a/drivers/net/calxedaxgmac.c b/drivers/net/calxedaxgmac.c
index 1b7c94f654..0dd64e4582 100644
--- a/drivers/net/calxedaxgmac.c
+++ b/drivers/net/calxedaxgmac.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <malloc.h>
+#include <net.h>
 #include <linux/compiler.h>
 #include <linux/err.h>
 #include <asm/io.h>
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index baac277a84..34e0da1a1b 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -15,8 +15,10 @@
 #include <errno.h>
 #include <miiphy.h>
 #include <malloc.h>
+#include <net.h>
 #include <pci.h>
 #include <reset.h>
+#include <asm/cache.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <linux/compiler.h>
diff --git a/drivers/net/designware.h b/drivers/net/designware.h
index 3519a4167a..ffaf5a14d0 100644
--- a/drivers/net/designware.h
+++ b/drivers/net/designware.h
@@ -7,6 +7,9 @@
 #ifndef _DW_ETH_H
 #define _DW_ETH_H
 
+#include <asm/cache.h>
+#include <net.h>
+
 #if CONFIG_IS_ENABLED(DM_GPIO)
 #include <asm-generic/gpio.h>
 #endif
diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c
index 60dfd17a74..d83294cbdc 100644
--- a/drivers/net/dwc_eth_qos.c
+++ b/drivers/net/dwc_eth_qos.c
@@ -39,6 +39,7 @@
 #include <phy.h>
 #include <reset.h>
 #include <wait_bit.h>
+#include <asm/cache.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 
diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c
index 9212920549..7e98449cfa 100644
--- a/drivers/net/e1000.c
+++ b/drivers/net/e1000.c
@@ -35,8 +35,10 @@ tested on both gig copper and gig fiber boards
 #include <errno.h>
 #include <malloc.h>
 #include <memalign.h>
+#include <net.h>
 #include <pci.h>
 #include "e1000.h"
+#include <asm/cache.h>
 
 #define TOUT_LOOP   100000
 
diff --git a/drivers/net/ep93xx_eth.c b/drivers/net/ep93xx_eth.c
index ecb34b2450..8ec7b36f9a 100644
--- a/drivers/net/ep93xx_eth.c
+++ b/drivers/net/ep93xx_eth.c
@@ -18,6 +18,7 @@
 
 #include <command.h>
 #include <common.h>
+#include <net.h>
 #include <asm/arch/ep93xx.h>
 #include <asm/io.h>
 #include <malloc.h>
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 345d37be4e..a20455cc4a 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -16,6 +16,7 @@
 #include <miiphy.h>
 #include <net.h>
 #include <netdev.h>
+#include <asm/cache.h>
 #include <power/regulator.h>
 
 #include <asm/io.h>
diff --git a/drivers/net/fm/init.c b/drivers/net/fm/init.c
index 8669d21afb..f654562f64 100644
--- a/drivers/net/fm/init.c
+++ b/drivers/net/fm/init.c
@@ -4,6 +4,7 @@
  */
 #include <errno.h>
 #include <common.h>
+#include <net.h>
 #include <asm/io.h>
 #include <fdt_support.h>
 #include <fsl_mdio.h>
diff --git a/drivers/net/fsl_enetc.c b/drivers/net/fsl_enetc.c
index bee73153d0..2fa27c7b6e 100644
--- a/drivers/net/fsl_enetc.c
+++ b/drivers/net/fsl_enetc.c
@@ -9,6 +9,8 @@
 #include <errno.h>
 #include <malloc.h>
 #include <memalign.h>
+#include <net.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <pci.h>
 #include <miiphy.h>
diff --git a/drivers/net/ftgmac100.c b/drivers/net/ftgmac100.c
index 40e6b3ba39..3525736674 100644
--- a/drivers/net/ftgmac100.c
+++ b/drivers/net/ftgmac100.c
@@ -18,6 +18,7 @@
 #include <miiphy.h>
 #include <net.h>
 #include <wait_bit.h>
+#include <asm/cache.h>
 #include <dm/device_compat.h>
 #include <linux/io.h>
 #include <linux/iopoll.h>
diff --git a/drivers/net/ftmac110.c b/drivers/net/ftmac110.c
index 84082407d2..10d5fc34cc 100644
--- a/drivers/net/ftmac110.c
+++ b/drivers/net/ftmac110.c
@@ -10,6 +10,7 @@
 #include <command.h>
 #include <malloc.h>
 #include <net.h>
+#include <asm/cache.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <linux/dma-mapping.h>
diff --git a/drivers/net/gmac_rockchip.c b/drivers/net/gmac_rockchip.c
index e152faf083..85f8d3b419 100644
--- a/drivers/net/gmac_rockchip.c
+++ b/drivers/net/gmac_rockchip.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <clk.h>
+#include <net.h>
 #include <phy.h>
 #include <syscon.h>
 #include <asm/io.h>
diff --git a/drivers/net/higmacv300.c b/drivers/net/higmacv300.c
index 0c1dd6834a..d338643e60 100644
--- a/drivers/net/higmacv300.c
+++ b/drivers/net/higmacv300.c
@@ -5,6 +5,7 @@
 
 #include <cpu_func.h>
 #include <malloc.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <common.h>
 #include <console.h>
diff --git a/drivers/net/mt7628-eth.c b/drivers/net/mt7628-eth.c
index 404a046422..217c684702 100644
--- a/drivers/net/mt7628-eth.c
+++ b/drivers/net/mt7628-eth.c
@@ -21,6 +21,7 @@
 #include <net.h>
 #include <reset.h>
 #include <wait_bit.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <linux/bitfield.h>
 #include <linux/err.h>
diff --git a/drivers/net/mtk_eth.c b/drivers/net/mtk_eth.c
index 5ffcc5313d..59c759928e 100644
--- a/drivers/net/mtk_eth.c
+++ b/drivers/net/mtk_eth.c
@@ -11,10 +11,12 @@
 #include <dm.h>
 #include <malloc.h>
 #include <miiphy.h>
+#include <net.h>
 #include <regmap.h>
 #include <reset.h>
 #include <syscon.h>
 #include <wait_bit.h>
+#include <asm/cache.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c
index d737400a20..75831dfe14 100644
--- a/drivers/net/mvneta.c
+++ b/drivers/net/mvneta.c
@@ -19,6 +19,7 @@
 #include <netdev.h>
 #include <config.h>
 #include <malloc.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c
index fcd24868af..29067194cb 100644
--- a/drivers/net/mvpp2.c
+++ b/drivers/net/mvpp2.c
@@ -16,6 +16,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <dm.h>
+#include <asm/cache.h>
 #include <dm/device-internal.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
diff --git a/drivers/net/pcnet.c b/drivers/net/pcnet.c
index f97e7f8c6a..b536ad466d 100644
--- a/drivers/net/pcnet.c
+++ b/drivers/net/pcnet.c
@@ -11,6 +11,7 @@
 #include <malloc.h>
 #include <net.h>
 #include <netdev.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <pci.h>
 
diff --git a/drivers/net/phy/aquantia.c b/drivers/net/phy/aquantia.c
index 8ece926dd3..e30a7fd5d6 100644
--- a/drivers/net/phy/aquantia.c
+++ b/drivers/net/phy/aquantia.c
@@ -8,6 +8,7 @@
 #include <config.h>
 #include <common.h>
 #include <dm.h>
+#include <net.h>
 #include <phy.h>
 #include <u-boot/crc.h>
 #include <malloc.h>
diff --git a/drivers/net/ravb.c b/drivers/net/ravb.c
index fb4a628d63..9139b5b1a1 100644
--- a/drivers/net/ravb.c
+++ b/drivers/net/ravb.c
@@ -15,6 +15,7 @@
 #include <errno.h>
 #include <miiphy.h>
 #include <malloc.h>
+#include <asm/cache.h>
 #include <linux/mii.h>
 #include <wait_bit.h>
 #include <asm/io.h>
diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c
index 5ccdfdd683..27dc233323 100644
--- a/drivers/net/rtl8169.c
+++ b/drivers/net/rtl8169.c
@@ -49,6 +49,7 @@
 #ifndef CONFIG_DM_ETH
 #include <netdev.h>
 #endif
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <pci.h>
 
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c
index f8e5d05722..d75bf54670 100644
--- a/drivers/net/sh_eth.c
+++ b/drivers/net/sh_eth.c
@@ -16,6 +16,7 @@
 #include <net.h>
 #include <netdev.h>
 #include <miiphy.h>
+#include <asm/cache.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 
diff --git a/drivers/net/smc91111.h b/drivers/net/smc91111.h
index 013542770d..4c3acba35a 100644
--- a/drivers/net/smc91111.h
+++ b/drivers/net/smc91111.h
@@ -30,6 +30,7 @@
 
 #include <asm/types.h>
 #include <config.h>
+#include <net.h>
 
 /*
  * This function may be called by the board specific initialisation code
diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h
index ce66900f4c..0a27f3c43e 100644
--- a/drivers/net/smc911x.h
+++ b/drivers/net/smc911x.h
@@ -8,6 +8,8 @@
 #ifndef _SMC911X_H_
 #define _SMC911X_H_
 
+#include <net.h>
+
 /* Below are the register offsets and bit definitions
  * of the Lan911x memory space
  */
diff --git a/drivers/net/sni_ave.c b/drivers/net/sni_ave.c
index 5d66a63a8b..0f665087c6 100644
--- a/drivers/net/sni_ave.c
+++ b/drivers/net/sni_ave.c
@@ -14,6 +14,7 @@
 #include <regmap.h>
 #include <reset.h>
 #include <syscon.h>
+#include <asm/cache.h>
 #include <dm/device_compat.h>
 #include <linux/err.h>
 #include <linux/io.h>
diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c
index 1ae776b446..09ea586e07 100644
--- a/drivers/net/sun8i_emac.c
+++ b/drivers/net/sun8i_emac.c
@@ -11,6 +11,7 @@
 */
 
 #include <cpu_func.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/gpio.h>
diff --git a/drivers/net/ti/am65-cpsw-nuss.c b/drivers/net/ti/am65-cpsw-nuss.c
index 2b77213001..eea15701f7 100644
--- a/drivers/net/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ti/am65-cpsw-nuss.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <malloc.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/processor.h>
 #include <clk.h>
diff --git a/drivers/net/ti/davinci_emac.c b/drivers/net/ti/davinci_emac.c
index 9c6bfca5a9..b5dfa8bd91 100644
--- a/drivers/net/ti/davinci_emac.c
+++ b/drivers/net/ti/davinci_emac.c
@@ -27,6 +27,7 @@
 #include <net.h>
 #include <miiphy.h>
 #include <malloc.h>
+#include <asm/cache.h>
 #include <linux/compiler.h>
 #include <asm/arch/emac_defs.h>
 #include <asm/io.h>
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index a158824fc9..1747f3667e 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -17,6 +17,7 @@
 #include <config.h>
 #include <console.h>
 #include <malloc.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <phy.h>
 #include <miiphy.h>
diff --git a/drivers/ram/stm32mp1/stm32mp1_tests.c b/drivers/ram/stm32mp1/stm32mp1_tests.c
index 12298cf327..3325dfef2b 100644
--- a/drivers/ram/stm32mp1/stm32mp1_tests.c
+++ b/drivers/ram/stm32mp1/stm32mp1_tests.c
@@ -5,6 +5,7 @@
 #include <common.h>
 #include <console.h>
 #include <init.h>
+#include <rand.h>
 #include <watchdog.h>
 #include <asm/io.h>
 #include <linux/log2.h>
diff --git a/drivers/ram/stm32mp1/stm32mp1_tuning.c b/drivers/ram/stm32mp1/stm32mp1_tuning.c
index 3013b7b667..d00f465cd5 100644
--- a/drivers/ram/stm32mp1/stm32mp1_tuning.c
+++ b/drivers/ram/stm32mp1/stm32mp1_tuning.c
@@ -6,6 +6,7 @@
 #include <console.h>
 #include <clk.h>
 #include <ram.h>
+#include <rand.h>
 #include <reset.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
diff --git a/drivers/remoteproc/rproc-elf-loader.c b/drivers/remoteproc/rproc-elf-loader.c
index f2e033aa74..d308100cf4 100644
--- a/drivers/remoteproc/rproc-elf-loader.c
+++ b/drivers/remoteproc/rproc-elf-loader.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <elf.h>
 #include <remoteproc.h>
+#include <asm/cache.h>
 #include <dm/device_compat.h>
 #include <linux/compat.h>
 
diff --git a/drivers/rng/sandbox_rng.c b/drivers/rng/sandbox_rng.c
index cd0b0ac77b..cc5e1f6e25 100644
--- a/drivers/rng/sandbox_rng.c
+++ b/drivers/rng/sandbox_rng.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <rand.h>
 #include <rng.h>
 
 #include <linux/string.h>
diff --git a/drivers/soc/ti/k3-navss-ringacc.c b/drivers/soc/ti/k3-navss-ringacc.c
index c5661c52fa..b24a8f128f 100644
--- a/drivers/soc/ti/k3-navss-ringacc.c
+++ b/drivers/soc/ti/k3-navss-ringacc.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <malloc.h>
 #include <asm/bitops.h>
diff --git a/drivers/spi/mxs_spi.c b/drivers/spi/mxs_spi.c
index 3ca30887fb..ee44973c7f 100644
--- a/drivers/spi/mxs_spi.c
+++ b/drivers/spi/mxs_spi.c
@@ -17,6 +17,7 @@
 #include <malloc.h>
 #include <memalign.h>
 #include <spi.h>
+#include <asm/cache.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c
index e3750b0b17..ef39198b43 100644
--- a/drivers/spi/ti_qspi.c
+++ b/drivers/spi/ti_qspi.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/arch/omap.h>
 #include <malloc.h>
diff --git a/drivers/spi/zynqmp_gqspi.c b/drivers/spi/zynqmp_gqspi.c
index 02b78df843..5d15072d49 100644
--- a/drivers/spi/zynqmp_gqspi.c
+++ b/drivers/spi/zynqmp_gqspi.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <clk.h>
 #include <dm.h>
diff --git a/drivers/usb/cdns3/ep0.c b/drivers/usb/cdns3/ep0.c
index 1957a3b91d..4266bd630c 100644
--- a/drivers/usb/cdns3/ep0.c
+++ b/drivers/usb/cdns3/ep0.c
@@ -11,6 +11,7 @@
  */
 
 #include <cpu_func.h>
+#include <asm/cache.h>
 #include <dm/device_compat.h>
 #include <linux/usb/composite.h>
 #include <linux/iopoll.h>
diff --git a/drivers/usb/eth/asix.c b/drivers/usb/eth/asix.c
index 3a8ec0bf2d..448f5245d1 100644
--- a/drivers/usb/eth/asix.c
+++ b/drivers/usb/eth/asix.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <net.h>
 #include <usb.h>
 #include <malloc.h>
 #include <memalign.h>
diff --git a/drivers/usb/eth/lan78xx.c b/drivers/usb/eth/lan78xx.c
index e8ee6650bc..fe8cc6acc5 100644
--- a/drivers/usb/eth/lan78xx.c
+++ b/drivers/usb/eth/lan78xx.c
@@ -4,6 +4,7 @@
  */
 
 #include <dm.h>
+#include <net.h>
 #include <usb.h>
 #include "usb_ether.h"
 #include "lan7x.h"
diff --git a/drivers/usb/eth/lan7x.c b/drivers/usb/eth/lan7x.c
index 21786e1bdf..afe78d44a3 100644
--- a/drivers/usb/eth/lan7x.c
+++ b/drivers/usb/eth/lan7x.c
@@ -7,6 +7,7 @@
 #include <malloc.h>
 #include <miiphy.h>
 #include <memalign.h>
+#include <net.h>
 #include <usb.h>
 #include <linux/ethtool.h>
 #include <linux/mii.h>
diff --git a/drivers/usb/eth/mcs7830.c b/drivers/usb/eth/mcs7830.c
index 75c45ee0ae..a9e0aabc61 100644
--- a/drivers/usb/eth/mcs7830.c
+++ b/drivers/usb/eth/mcs7830.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <net.h>
 #include <linux/mii.h>
 #include <malloc.h>
 #include <memalign.h>
diff --git a/drivers/usb/eth/r8152.c b/drivers/usb/eth/r8152.c
index e5f73e3d4c..8dae5097b8 100644
--- a/drivers/usb/eth/r8152.c
+++ b/drivers/usb/eth/r8152.c
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <malloc.h>
 #include <memalign.h>
+#include <net.h>
 #include <usb.h>
 #include <linux/mii.h>
 #include <linux/bitops.h>
diff --git a/drivers/usb/eth/smsc95xx.c b/drivers/usb/eth/smsc95xx.c
index 25f69a061b..ab6411f561 100644
--- a/drivers/usb/eth/smsc95xx.c
+++ b/drivers/usb/eth/smsc95xx.c
@@ -11,6 +11,7 @@
 #include <errno.h>
 #include <malloc.h>
 #include <memalign.h>
+#include <net.h>
 #include <usb.h>
 #include <asm/unaligned.h>
 #include <linux/mii.h>
diff --git a/drivers/usb/eth/usb_ether.c b/drivers/usb/eth/usb_ether.c
index 3aca9ac265..d76e2ff5bb 100644
--- a/drivers/usb/eth/usb_ether.c
+++ b/drivers/usb/eth/usb_ether.c
@@ -7,7 +7,9 @@
 #include <dm.h>
 #include <errno.h>
 #include <malloc.h>
+#include <net.h>
 #include <usb.h>
+#include <asm/cache.h>
 #include <dm/device-internal.h>
 
 #include "usb_ether.h"
diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c
index d9cfff3a29..5677eab426 100644
--- a/drivers/usb/gadget/ci_udc.c
+++ b/drivers/usb/gadget/ci_udc.c
@@ -14,6 +14,7 @@
 #include <net.h>
 #include <malloc.h>
 #include <asm/byteorder.h>
+#include <asm/cache.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <asm/unaligned.h>
diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c
index f25ed2dab0..02ca119bc7 100644
--- a/drivers/usb/host/dwc2.c
+++ b/drivers/usb/host/dwc2.c
@@ -16,6 +16,7 @@
 #include <usb.h>
 #include <usbroothubdes.h>
 #include <wait_bit.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
 #include <power/regulator.h>
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index a2a85db1e7..b4e28b998c 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <asm/byteorder.h>
+#include <asm/cache.h>
 #include <asm/unaligned.h>
 #include <usb.h>
 #include <asm/io.h>
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index c94960f2cc..ac1ad29b02 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -32,6 +32,7 @@
 #include <asm/byteorder.h>
 #include <dm.h>
 #include <errno.h>
+#include <asm/cache.h>
 
 #if defined(CONFIG_PCI_OHCI)
 # include <pci.h>
diff --git a/drivers/video/bcm2835.c b/drivers/video/bcm2835.c
index 1d2eda084c..ea5a4529ce 100644
--- a/drivers/video/bcm2835.c
+++ b/drivers/video/bcm2835.c
@@ -8,6 +8,7 @@
 #include <video.h>
 #include <asm/arch/mbox.h>
 #include <asm/arch/msg.h>
+#include <asm/cache.h>
 
 static int bcm2835_video_probe(struct udevice *dev)
 {
diff --git a/drivers/video/fsl_dcu_fb.c b/drivers/video/fsl_dcu_fb.c
index 076e9ea019..e9d05c9394 100644
--- a/drivers/video/fsl_dcu_fb.c
+++ b/drivers/video/fsl_dcu_fb.c
@@ -7,6 +7,7 @@
  */
 
 #include <init.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <common.h>
 #include <dm.h>
diff --git a/drivers/video/imx/mxc_ipuv3_fb.c b/drivers/video/imx/mxc_ipuv3_fb.c
index c64be38e49..db8eb4ade8 100644
--- a/drivers/video/imx/mxc_ipuv3_fb.c
+++ b/drivers/video/imx/mxc_ipuv3_fb.c
@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <asm/cache.h>
 #include <linux/errno.h>
 #include <asm/global_data.h>
 #include <linux/string.h>
diff --git a/drivers/video/mvebu_lcd.c b/drivers/video/mvebu_lcd.c
index 3ff5b28ae2..2907c53378 100644
--- a/drivers/video/mvebu_lcd.c
+++ b/drivers/video/mvebu_lcd.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <video.h>
+#include <asm/cache.h>
 #include <dm/device_compat.h>
 #include <linux/mbus.h>
 #include <asm/io.h>
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index 12d00b4689..edce7912f3 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -8,6 +8,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <env.h>
+#include <asm/cache.h>
 #include <dm/device_compat.h>
 #include <linux/errno.h>
 #include <malloc.h>
diff --git a/drivers/video/tegra.c b/drivers/video/tegra.c
index f4bae9fc36..1fa052e306 100644
--- a/drivers/video/tegra.c
+++ b/drivers/video/tegra.c
@@ -9,6 +9,7 @@
 #include <panel.h>
 #include <pwm.h>
 #include <video.h>
+#include <asm/cache.h>
 #include <asm/system.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index 3d658e61d7..eed61cd731 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -11,6 +11,7 @@
 #include <stdio_dev.h>
 #include <video.h>
 #include <video_console.h>
+#include <asm/cache.h>
 #include <dm/lists.h>
 #include <dm/device-internal.h>
 #include <dm/uclass-internal.h>
diff --git a/env/fat.c b/env/fat.c
index cf2e5e2b26..9772b87a19 100644
--- a/env/fat.c
+++ b/env/fat.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <asm/cache.h>
 
 #include <command.h>
 #include <env.h>
diff --git a/env/sf.c b/env/sf.c
index 64fafdc7cf..23de5a3495 100644
--- a/env/sf.c
+++ b/env/sf.c
@@ -19,6 +19,7 @@
 #include <search.h>
 #include <errno.h>
 #include <uuid.h>
+#include <asm/cache.h>
 #include <dm/device-internal.h>
 #include <u-boot/crc.h>
 
diff --git a/examples/standalone/smc911x_eeprom.c b/examples/standalone/smc911x_eeprom.c
index 270588bcf5..8acfcb9a0b 100644
--- a/examples/standalone/smc911x_eeprom.c
+++ b/examples/standalone/smc911x_eeprom.c
@@ -17,6 +17,7 @@
 #include <common.h>
 #include <console.h>
 #include <exports.h>
+#include <net.h>
 #include <linux/ctype.h>
 #include <linux/types.h>
 #include "../drivers/net/smc911x.h"
diff --git a/fs/ext4/ext4_common.h b/fs/ext4/ext4_common.h
index 4dff1914d9..beaee9c80b 100644
--- a/fs/ext4/ext4_common.h
+++ b/fs/ext4/ext4_common.h
@@ -23,6 +23,7 @@
 #include <ext_common.h>
 #include <ext4fs.h>
 #include <malloc.h>
+#include <asm/cache.h>
 #include <linux/errno.h>
 #if defined(CONFIG_EXT4_WRITE)
 #include "ext4_journal.h"
diff --git a/fs/fat/fat.c b/fs/fat/fat.c
index 68ce658386..f68c8f73c4 100644
--- a/fs/fat/fat.c
+++ b/fs/fat/fat.c
@@ -18,6 +18,7 @@
 #include <part.h>
 #include <malloc.h>
 #include <memalign.h>
+#include <asm/cache.h>
 #include <linux/compiler.h>
 #include <linux/ctype.h>
 
diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c
index 4f96699e36..d2aff09200 100644
--- a/fs/fat/fat_write.c
+++ b/fs/fat/fat_write.c
@@ -12,6 +12,7 @@
 #include <malloc.h>
 #include <asm/byteorder.h>
 #include <part.h>
+#include <asm/cache.h>
 #include <linux/ctype.h>
 #include <div64.h>
 #include <linux/math64.h>
diff --git a/include/common.h b/include/common.h
index 1705d85e8a..a900596c5f 100644
--- a/include/common.h
+++ b/include/common.h
@@ -36,7 +36,6 @@
 #include <init.h>
 #include <display_options.h>
 #include <vsprintf.h>
-#include <net.h>
 #include <bootstage.h>
 #endif	/* __ASSEMBLY__ */
 
diff --git a/include/dwmmc.h b/include/dwmmc.h
index f06720dc0d..58110aa3e7 100644
--- a/include/dwmmc.h
+++ b/include/dwmmc.h
@@ -7,6 +7,7 @@
 #ifndef __DWMMC_HW_H
 #define __DWMMC_HW_H
 
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <mmc.h>
 
diff --git a/include/log.h b/include/log.h
index cf32351134..ffc739b560 100644
--- a/include/log.h
+++ b/include/log.h
@@ -9,6 +9,7 @@
 #ifndef __LOG_H
 #define __LOG_H
 
+#include <stdio.h>
 #include <command.h>
 #include <dm/uclass-id.h>
 #include <linux/list.h>
diff --git a/include/net.h b/include/net.h
index 774ae2de63..3ef212dd00 100644
--- a/include/net.h
+++ b/include/net.h
@@ -12,6 +12,7 @@
 #ifndef __NET_H__
 #define __NET_H__
 
+#include <linux/types.h>
 #include <asm/cache.h>
 #include <asm/byteorder.h>	/* for nton* / ntoh* stuff */
 #include <env.h>
@@ -20,7 +21,9 @@
 #include <linux/if_ether.h>
 #include <rand.h>
 
+struct bd_info;
 struct cmd_tbl_s;
+struct udevice;
 
 #define DEBUG_LL_STATE 0	/* Link local state machine changes */
 #define DEBUG_DEV_PKT 0		/* Packets or info directed to the device */
@@ -188,12 +191,12 @@ struct eth_device {
 	phys_addr_t iobase;
 	int state;
 
-	int (*init)(struct eth_device *, bd_t *);
+	int (*init)(struct eth_device *eth, struct bd_info *bd);
 	int (*send)(struct eth_device *, void *packet, int length);
 	int (*recv)(struct eth_device *);
 	void (*halt)(struct eth_device *);
 	int (*mcast)(struct eth_device *, const u8 *enetaddr, int join);
-	int (*write_hwaddr)(struct eth_device *);
+	int (*write_hwaddr)(struct eth_device *eth);
 	struct eth_device *next;
 	int index;
 	void *priv;
@@ -246,7 +249,7 @@ static __always_inline void eth_halt_state_only(void)
 int eth_write_hwaddr(struct eth_device *dev, const char *base_name,
 		     int eth_number);
 
-int usb_eth_initialize(bd_t *bi);
+int usb_eth_initialize(struct bd_info *bi);
 #endif
 
 int eth_initialize(void);		/* Initialize network subsystem */
diff --git a/include/scsi.h b/include/scsi.h
index 61da958bf6..96cb726676 100644
--- a/include/scsi.h
+++ b/include/scsi.h
@@ -6,6 +6,7 @@
  #ifndef _SCSI_H
  #define _SCSI_H
 
+#include <asm/cache.h>
 #include <linux/dma-direction.h>
 
 struct scsi_cmd {
diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c
index f9349484a6..5b2ff81319 100644
--- a/lib/efi_loader/efi_device_path.c
+++ b/lib/efi_loader/efi_device_path.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <blk.h>
 #include <dm.h>
+#include <net.h>
 #include <usb.h>
 #include <mmc.h>
 #include <nvme.h>
diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c
index 97d90f069a..b8c518614e 100644
--- a/lib/efi_loader/efi_memory.c
+++ b/lib/efi_loader/efi_memory.c
@@ -11,6 +11,7 @@
 #include <malloc.h>
 #include <mapmem.h>
 #include <watchdog.h>
+#include <asm/cache.h>
 #include <linux/list_sort.h>
 #include <linux/sizes.h>
 
diff --git a/lib/efi_loader/efi_net.c b/lib/efi_loader/efi_net.c
index 82d2595847..22f0123eca 100644
--- a/lib/efi_loader/efi_net.c
+++ b/lib/efi_loader/efi_net.c
@@ -18,6 +18,7 @@
 #include <common.h>
 #include <efi_loader.h>
 #include <malloc.h>
+#include <net.h>
 
 static const efi_guid_t efi_net_guid = EFI_SIMPLE_NETWORK_PROTOCOL_GUID;
 static const efi_guid_t efi_pxe_base_code_protocol_guid =
diff --git a/lib/efi_selftest/efi_selftest_block_device.c b/lib/efi_selftest/efi_selftest_block_device.c
index d98a854e6d..5eb297d285 100644
--- a/lib/efi_selftest/efi_selftest_block_device.c
+++ b/lib/efi_selftest/efi_selftest_block_device.c
@@ -15,6 +15,7 @@
 
 #include <efi_selftest.h>
 #include "efi_selftest_disk_image.h"
+#include <asm/cache.h>
 
 /* Block size of compressed disk image */
 #define COMPRESSED_DISK_IMAGE_BLOCK_SIZE 8
diff --git a/lib/efi_selftest/efi_selftest_console.c b/lib/efi_selftest/efi_selftest_console.c
index 42f51b6520..13f3ee6bc1 100644
--- a/lib/efi_selftest/efi_selftest_console.c
+++ b/lib/efi_selftest/efi_selftest_console.c
@@ -6,6 +6,7 @@
  */
 
 #include <efi_selftest.h>
+#include <net.h>
 #include <vsprintf.h>
 
 struct efi_simple_text_output_protocol *con_out;
diff --git a/lib/efi_selftest/efi_selftest_snp.c b/lib/efi_selftest/efi_selftest_snp.c
index 9797ecaf42..79f0467803 100644
--- a/lib/efi_selftest/efi_selftest_snp.c
+++ b/lib/efi_selftest/efi_selftest_snp.c
@@ -15,6 +15,7 @@
  */
 
 #include <efi_selftest.h>
+#include <net.h>
 
 /*
  * MAC address for broadcasts
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 0a3b860782..c8cbc00699 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -10,6 +10,7 @@
 #include <hang.h>
 #include <init.h>
 #include <malloc.h>
+#include <net.h>
 #include <dm/of_extra.h>
 #include <env.h>
 #include <errno.h>
diff --git a/lib/image-sparse.c b/lib/image-sparse.c
index 036062139b..df623adc58 100644
--- a/lib/image-sparse.c
+++ b/lib/image-sparse.c
@@ -41,6 +41,7 @@
 #include <malloc.h>
 #include <part.h>
 #include <sparse_format.h>
+#include <asm/cache.h>
 
 #include <linux/math64.h>
 
diff --git a/lib/linux_compat.c b/lib/linux_compat.c
index 89a6fd6ec9..c83426f59d 100644
--- a/lib/linux_compat.c
+++ b/lib/linux_compat.c
@@ -2,6 +2,7 @@
 #include <common.h>
 #include <malloc.h>
 #include <memalign.h>
+#include <asm/cache.h>
 #include <linux/compat.h>
 
 struct p_current cur = {
diff --git a/lib/net_utils.c b/lib/net_utils.c
index 8af7782970..0a8a557319 100644
--- a/lib/net_utils.c
+++ b/lib/net_utils.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <net.h>
 
 struct in_addr string_to_ip(const char *s)
 {
diff --git a/lib/uuid.c b/lib/uuid.c
index bdb137884c..f94c6abd29 100644
--- a/lib/uuid.c
+++ b/lib/uuid.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <rand.h>
 #include <time.h>
 #include <uuid.h>
 #include <linux/ctype.h>
diff --git a/net/arp.c b/net/arp.c
index b49c3d3ced..4b12b699d0 100644
--- a/net/arp.c
+++ b/net/arp.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <net.h>
 
 #include "arp.h"
 
diff --git a/net/bootp.c b/net/bootp.c
index c73a82e642..2c918d8379 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -13,6 +13,7 @@
 #include <env.h>
 #include <efi_loader.h>
 #include <net.h>
+#include <rand.h>
 #include <uuid.h>
 #include <net/tftp.h>
 #include "bootp.h"
diff --git a/net/ping.c b/net/ping.c
index 633c942e67..024e8eab90 100644
--- a/net/ping.c
+++ b/net/ping.c
@@ -11,6 +11,7 @@
 
 #include "ping.h"
 #include "arp.h"
+#include <net.h>
 
 static ushort ping_seq_number;
 
diff --git a/test/lib/test_aes.c b/test/lib/test_aes.c
index fb8a0b17ba..cbc712f7ed 100644
--- a/test/lib/test_aes.c
+++ b/test/lib/test_aes.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <command.h>
 #include <hexdump.h>
+#include <rand.h>
 #include <uboot_aes.h>
 #include <test/lib.h>
 #include <test/test.h>
-- 
2.26.2.645.ge9eca65c58-goog

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH v3 06/22] part: Drop disk_partition_t typedef
  2020-05-10 17:39 [PATCH v3 00/22] common: Further reduce the size of common.h Simon Glass
                   ` (4 preceding siblings ...)
  2020-05-10 17:39 ` [PATCH v3 05/22] common: Drop net.h from common header Simon Glass
@ 2020-05-10 17:39 ` Simon Glass
  2020-05-19 17:32   ` Tom Rini
  2020-05-10 17:39 ` [PATCH v3 07/22] common: Drop part.h from common header Simon Glass
                   ` (16 subsequent siblings)
  22 siblings, 1 reply; 53+ messages in thread
From: Simon Glass @ 2020-05-10 17:39 UTC (permalink / raw)
  To: u-boot

We should not be using typedefs and these make it harder to use
forward declarations (to reduce header file inclusions). Drop the typedef.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v3: None
Changes in v2: None

 arch/arm/mach-omap2/utils.c      |  2 +-
 arch/x86/cpu/quark/quark.c       |  1 +
 cmd/ab_select.c                  |  2 +-
 cmd/bcb.c                        |  4 ++--
 cmd/disk.c                       |  2 +-
 cmd/fat.c                        |  4 ++--
 cmd/gpt.c                        | 17 +++++++-------
 cmd/part.c                       |  6 ++---
 cmd/read.c                       |  2 +-
 cmd/reiser.c                     |  4 ++--
 cmd/usb_mass_storage.c           |  2 +-
 cmd/zfs.c                        |  4 ++--
 common/android_ab.c              |  6 ++---
 common/spl/spl_ext.c             |  4 ++--
 common/spl/spl_mmc.c             |  2 +-
 disk/part.c                      | 17 +++++++-------
 disk/part_amiga.c                |  2 +-
 disk/part_dos.c                  |  4 ++--
 disk/part_efi.c                  |  8 +++----
 disk/part_iso.c                  |  8 +++----
 disk/part_mac.c                  |  2 +-
 drivers/dfu/dfu_mmc.c            |  2 +-
 drivers/fastboot/fb_getvar.c     |  4 ++--
 drivers/fastboot/fb_mmc.c        | 20 ++++++++--------
 env/ext4.c                       |  4 ++--
 env/fat.c                        |  4 ++--
 env/mmc.c                        |  2 +-
 fs/btrfs/btrfs.c                 |  3 ++-
 fs/btrfs/btrfs.h                 |  2 +-
 fs/btrfs/dev.c                   |  2 +-
 fs/ext4/dev.c                    |  4 ++--
 fs/ext4/ext4fs.c                 |  2 +-
 fs/fat/fat.c                     |  6 ++---
 fs/fs.c                          |  6 ++---
 fs/fs_internal.c                 |  2 +-
 fs/reiserfs/dev.c                |  4 ++--
 fs/sandbox/sandboxfs.c           |  2 +-
 fs/ubifs/ubifs.c                 |  2 +-
 fs/zfs/dev.c                     |  4 ++--
 include/android_ab.h             |  2 +-
 include/avb_verify.h             |  2 +-
 include/btrfs.h                  |  3 ++-
 include/ext4fs.h                 |  4 ++--
 include/fat.h                    |  2 +-
 include/fb_mmc.h                 |  5 ++--
 include/fs_internal.h            |  2 +-
 include/part.h                   | 40 +++++++++++++++++---------------
 include/reiserfs.h               |  2 +-
 include/sandboxfs.h              |  2 +-
 include/ubifs_uboot.h            |  2 +-
 include/zfs_common.h             |  2 +-
 lib/efi_loader/efi_device_path.c |  4 ++--
 lib/efi_loader/efi_disk.c        |  6 ++---
 lib/efi_loader/efi_file.c        |  2 +-
 54 files changed, 133 insertions(+), 125 deletions(-)

diff --git a/arch/arm/mach-omap2/utils.c b/arch/arm/mach-omap2/utils.c
index 0d5ca20e8e..6e519d8c91 100644
--- a/arch/arm/mach-omap2/utils.c
+++ b/arch/arm/mach-omap2/utils.c
@@ -90,7 +90,7 @@ static u32 omap_mmc_get_part_size(const char *part)
 {
 	int res;
 	struct blk_desc *dev_desc;
-	disk_partition_t info;
+	struct disk_partition info;
 	u64 sz = 0;
 
 	dev_desc = blk_get_dev("mmc", CONFIG_FASTBOOT_FLASH_MMC_DEV);
diff --git a/arch/x86/cpu/quark/quark.c b/arch/x86/cpu/quark/quark.c
index d6611eea5d..46c6d00eb4 100644
--- a/arch/x86/cpu/quark/quark.c
+++ b/arch/x86/cpu/quark/quark.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <mmc.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/ioapic.h>
 #include <asm/irq.h>
diff --git a/cmd/ab_select.c b/cmd/ab_select.c
index 7c8f2ee8eb..d0d957d4f9 100644
--- a/cmd/ab_select.c
+++ b/cmd/ab_select.c
@@ -11,7 +11,7 @@ static int do_ab_select(cmd_tbl_t *cmdtp, int flag, int argc,
 {
 	int ret;
 	struct blk_desc *dev_desc;
-	disk_partition_t part_info;
+	struct disk_partition part_info;
 	char slot[2];
 
 	if (argc != 4)
diff --git a/cmd/bcb.c b/cmd/bcb.c
index 9626f2c69e..62f9a44e38 100644
--- a/cmd/bcb.c
+++ b/cmd/bcb.c
@@ -112,7 +112,7 @@ static int do_bcb_load(cmd_tbl_t *cmdtp, int flag, int argc,
 		       char * const argv[])
 {
 	struct blk_desc *desc;
-	disk_partition_t info;
+	struct disk_partition info;
 	u64 cnt;
 	char *endp;
 	int part, ret;
@@ -252,7 +252,7 @@ static int do_bcb_store(cmd_tbl_t *cmdtp, int flag, int argc,
 			char * const argv[])
 {
 	struct blk_desc *desc;
-	disk_partition_t info;
+	struct disk_partition info;
 	u64 cnt;
 	int ret;
 
diff --git a/cmd/disk.c b/cmd/disk.c
index 15973b7d13..9e008a3889 100644
--- a/cmd/disk.c
+++ b/cmd/disk.c
@@ -16,7 +16,7 @@ int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc,
 	int part;
 	ulong addr = CONFIG_SYS_LOAD_ADDR;
 	ulong cnt;
-	disk_partition_t info;
+	struct disk_partition info;
 #if defined(CONFIG_LEGACY_IMAGE_FORMAT)
 	image_header_t *hdr;
 #endif
diff --git a/cmd/fat.c b/cmd/fat.c
index 28fca501fa..854fe274bc 100644
--- a/cmd/fat.c
+++ b/cmd/fat.c
@@ -64,7 +64,7 @@ static int do_fat_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc,
 {
 	int dev, part;
 	struct blk_desc *dev_desc;
-	disk_partition_t info;
+	struct disk_partition info;
 
 	if (argc < 2) {
 		printf("usage: fatinfo <interface> [<dev[:part]>]\n");
@@ -101,7 +101,7 @@ static int do_fat_fswrite(cmd_tbl_t *cmdtp, int flag,
 	unsigned long count;
 	long offset;
 	struct blk_desc *dev_desc = NULL;
-	disk_partition_t info;
+	struct disk_partition info;
 	int dev = 0;
 	int part = 1;
 	void *buf;
diff --git a/cmd/gpt.c b/cmd/gpt.c
index 98c788e757..f2b1ad5489 100644
--- a/cmd/gpt.c
+++ b/cmd/gpt.c
@@ -189,7 +189,8 @@ static void del_gpt_info(void)
 	}
 }
 
-static struct disk_part *allocate_disk_part(disk_partition_t *info, int partnum)
+static struct disk_part *allocate_disk_part(struct disk_partition *info,
+					    int partnum)
 {
 	struct disk_part *newpart;
 	newpart = calloc(1, sizeof(struct disk_part));
@@ -310,7 +311,7 @@ static int get_gpt_info(struct blk_desc *dev_desc)
 {
 	/* start partition numbering at 1, as U-Boot does */
 	int valid_parts = 0, p, ret;
-	disk_partition_t info;
+	struct disk_partition info;
 	struct disk_part *new_disk_part;
 
 	/*
@@ -375,14 +376,14 @@ static int do_get_gpt_info(struct blk_desc *dev_desc)
 static int set_gpt_info(struct blk_desc *dev_desc,
 			const char *str_part,
 			char **str_disk_guid,
-			disk_partition_t **partitions,
+			struct disk_partition **partitions,
 			u8 *parts_count)
 {
 	char *tok, *str, *s;
 	int i;
 	char *val, *p;
 	int p_count;
-	disk_partition_t *parts;
+	struct disk_partition *parts;
 	int errno = 0;
 	uint64_t size_ll, start_ll;
 	lbaint_t offset = 0;
@@ -440,7 +441,7 @@ static int set_gpt_info(struct blk_desc *dev_desc,
 	}
 
 	/* allocate memory for partitions */
-	parts = calloc(sizeof(disk_partition_t), p_count);
+	parts = calloc(sizeof(struct disk_partition), p_count);
 	if (parts == NULL)
 		return -ENOMEM;
 
@@ -557,7 +558,7 @@ static int gpt_default(struct blk_desc *blk_dev_desc, const char *str_part)
 	int ret;
 	char *str_disk_guid;
 	u8 part_count = 0;
-	disk_partition_t *partitions = NULL;
+	struct disk_partition *partitions = NULL;
 
 	/* fill partitions */
 	ret = set_gpt_info(blk_dev_desc, str_part,
@@ -584,7 +585,7 @@ static int gpt_verify(struct blk_desc *blk_dev_desc, const char *str_part)
 {
 	ALLOC_CACHE_ALIGN_BUFFER_PAD(gpt_header, gpt_head, 1,
 				     blk_dev_desc->blksz);
-	disk_partition_t *partitions = NULL;
+	struct disk_partition *partitions = NULL;
 	gpt_entry *gpt_pte = NULL;
 	char *str_disk_guid;
 	u8 part_count = 0;
@@ -640,7 +641,7 @@ static int do_rename_gpt_parts(struct blk_desc *dev_desc, char *subcomm,
 {
 	struct list_head *pos;
 	struct disk_part *curr;
-	disk_partition_t *new_partitions = NULL;
+	struct disk_partition *new_partitions = NULL;
 	char disk_guid[UUID_STR_LEN + 1];
 	char *partitions_list, *str_disk_guid = NULL;
 	u8 part_count = 0;
diff --git a/cmd/part.c b/cmd/part.c
index 5e4e45ca6d..4b2e06e615 100644
--- a/cmd/part.c
+++ b/cmd/part.c
@@ -32,7 +32,7 @@ static int do_part_uuid(int argc, char * const argv[])
 {
 	int part;
 	struct blk_desc *dev_desc;
-	disk_partition_t info;
+	struct disk_partition info;
 
 	if (argc < 2)
 		return CMD_RET_USAGE;
@@ -90,7 +90,7 @@ static int do_part_list(int argc, char * const argv[])
 	if (var != NULL) {
 		int p;
 		char str[512] = { '\0', };
-		disk_partition_t info;
+		struct disk_partition info;
 
 		for (p = 1; p < MAX_SEARCH_PARTITIONS; p++) {
 			char t[5];
@@ -117,7 +117,7 @@ static int do_part_list(int argc, char * const argv[])
 static int do_part_info(int argc, char * const argv[], enum cmd_part_info param)
 {
 	struct blk_desc *desc;
-	disk_partition_t info;
+	struct disk_partition info;
 	char buf[512] = { 0 };
 	char *endp;
 	int part;
diff --git a/cmd/read.c b/cmd/read.c
index 82c2d9ad99..7977e9d847 100644
--- a/cmd/read.c
+++ b/cmd/read.c
@@ -18,7 +18,7 @@ int do_read(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	struct blk_desc *dev_desc = NULL;
 	int dev;
 	int part = 0;
-	disk_partition_t part_info;
+	struct disk_partition part_info;
 	ulong offset = 0u;
 	ulong limit = 0u;
 	void *addr;
diff --git a/cmd/reiser.c b/cmd/reiser.c
index 598fab48b3..28e827796b 100644
--- a/cmd/reiser.c
+++ b/cmd/reiser.c
@@ -35,7 +35,7 @@ int do_reiserls (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	char *filename = "/";
 	int dev, part;
 	struct blk_desc *dev_desc = NULL;
-	disk_partition_t info;
+	struct disk_partition info;
 
 	if (argc < 3)
 		return CMD_RET_USAGE;
@@ -81,7 +81,7 @@ int do_reiserload (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	char *filename = NULL;
 	int dev, part;
 	ulong addr = 0, filelen;
-	disk_partition_t info;
+	struct disk_partition info;
 	struct blk_desc *dev_desc = NULL;
 	unsigned long count;
 	char *addr_str;
diff --git a/cmd/usb_mass_storage.c b/cmd/usb_mass_storage.c
index c5c6899787..52ff637e2f 100644
--- a/cmd/usb_mass_storage.c
+++ b/cmd/usb_mass_storage.c
@@ -55,7 +55,7 @@ static int ums_init(const char *devtype, const char *devnums_part_str)
 {
 	char *s, *t, *devnum_part_str, *name;
 	struct blk_desc *block_dev;
-	disk_partition_t info;
+	struct disk_partition info;
 	int partnum;
 	int ret = -1;
 	struct ums *ums_new;
diff --git a/cmd/zfs.c b/cmd/zfs.c
index 9c237a5758..2b622a8f53 100644
--- a/cmd/zfs.c
+++ b/cmd/zfs.c
@@ -38,7 +38,7 @@ static int do_zfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]
 	int dev;
 	int part;
 	ulong addr = 0;
-	disk_partition_t info;
+	struct disk_partition info;
 	struct blk_desc *dev_desc;
 	unsigned long count;
 	const char *addr_str;
@@ -135,7 +135,7 @@ static int do_zfs_ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	const char *filename = "/";
 	int part;
 	struct blk_desc *dev_desc;
-	disk_partition_t info;
+	struct disk_partition info;
 	struct device_s vdev;
 
 	if (argc < 2)
diff --git a/common/android_ab.c b/common/android_ab.c
index e0fe32d24d..b5b8af1b27 100644
--- a/common/android_ab.c
+++ b/common/android_ab.c
@@ -81,7 +81,7 @@ static int ab_control_default(struct bootloader_control *abc)
  * @return 0 on success and a negative on error
  */
 static int ab_control_create_from_disk(struct blk_desc *dev_desc,
-				       const disk_partition_t *part_info,
+				       const struct disk_partition *part_info,
 				       struct bootloader_control **abc)
 {
 	ulong abc_offset, abc_blocks, ret;
@@ -131,7 +131,7 @@ static int ab_control_create_from_disk(struct blk_desc *dev_desc,
  * @return 0 on success and a negative on error
  */
 static int ab_control_store(struct blk_desc *dev_desc,
-			    const disk_partition_t *part_info,
+			    const struct disk_partition *part_info,
 			    struct bootloader_control *abc)
 {
 	ulong abc_offset, abc_blocks, ret;
@@ -178,7 +178,7 @@ static int ab_compare_slots(const struct slot_metadata *a,
 	return 0;
 }
 
-int ab_select_slot(struct blk_desc *dev_desc, disk_partition_t *part_info)
+int ab_select_slot(struct blk_desc *dev_desc, struct disk_partition *part_info)
 {
 	struct bootloader_control *abc = NULL;
 	u32 crc32_le;
diff --git a/common/spl/spl_ext.c b/common/spl/spl_ext.c
index 2a6252229c..954133ba84 100644
--- a/common/spl/spl_ext.c
+++ b/common/spl/spl_ext.c
@@ -15,7 +15,7 @@ int spl_load_image_ext(struct spl_image_info *spl_image,
 	s32 err;
 	struct image_header *header;
 	loff_t filelen, actlen;
-	disk_partition_t part_info = {};
+	struct disk_partition part_info = {};
 
 	header = spl_get_load_buffer(-sizeof(*header), sizeof(*header));
 
@@ -69,7 +69,7 @@ int spl_load_image_ext_os(struct spl_image_info *spl_image,
 {
 	int err;
 	__maybe_unused loff_t filelen, actlen;
-	disk_partition_t part_info = {};
+	struct disk_partition part_info = {};
 	__maybe_unused char *file;
 
 	if (part_get_info(block_dev, partition, &part_info)) {
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index a68cdec8dc..fcdd3caeac 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -168,7 +168,7 @@ static int mmc_load_image_raw_partition(struct spl_image_info *spl_image,
 					struct mmc *mmc, int partition,
 					unsigned long sector)
 {
-	disk_partition_t info;
+	struct disk_partition info;
 	int err;
 
 #ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE
diff --git a/disk/part.c b/disk/part.c
index 4cc2fc19f7..68cba61c5a 100644
--- a/disk/part.c
+++ b/disk/part.c
@@ -318,7 +318,7 @@ void part_print(struct blk_desc *dev_desc)
 #endif /* CONFIG_HAVE_BLOCK_DEVICE */
 
 int part_get_info(struct blk_desc *dev_desc, int part,
-		       disk_partition_t *info)
+		       struct disk_partition *info)
 {
 #ifdef CONFIG_HAVE_BLOCK_DEVICE
 	struct part_driver *drv;
@@ -351,7 +351,8 @@ int part_get_info(struct blk_desc *dev_desc, int part,
 	return -1;
 }
 
-int part_get_info_whole_disk(struct blk_desc *dev_desc, disk_partition_t *info)
+int part_get_info_whole_disk(struct blk_desc *dev_desc,
+			     struct disk_partition *info)
 {
 	info->start = 0;
 	info->size = dev_desc->lba;
@@ -431,7 +432,7 @@ cleanup:
 #define PART_AUTO -1
 int blk_get_device_part_str(const char *ifname, const char *dev_part_str,
 			     struct blk_desc **dev_desc,
-			     disk_partition_t *info, int allow_whole_dev)
+			     struct disk_partition *info, int allow_whole_dev)
 {
 	int ret = -1;
 	const char *part_str;
@@ -441,7 +442,7 @@ int blk_get_device_part_str(const char *ifname, const char *dev_part_str,
 	char *ep;
 	int p;
 	int part;
-	disk_partition_t tmpinfo;
+	struct disk_partition tmpinfo;
 
 #ifdef CONFIG_SANDBOX
 	/*
@@ -646,7 +647,7 @@ cleanup:
 }
 
 int part_get_info_by_name_type(struct blk_desc *dev_desc, const char *name,
-			       disk_partition_t *info, int part_type)
+			       struct disk_partition *info, int part_type)
 {
 	struct part_driver *part_drv;
 	int ret;
@@ -671,7 +672,7 @@ int part_get_info_by_name_type(struct blk_desc *dev_desc, const char *name,
 }
 
 int part_get_info_by_name(struct blk_desc *dev_desc, const char *name,
-			  disk_partition_t *info)
+			  struct disk_partition *info)
 {
 	return part_get_info_by_name_type(dev_desc, name, info, PART_TYPE_ALL);
 }
@@ -693,7 +694,7 @@ int part_get_info_by_name(struct blk_desc *dev_desc, const char *name,
 static int part_get_info_by_dev_and_name(const char *dev_iface,
 					 const char *dev_part_str,
 					 struct blk_desc **dev_desc,
-					 disk_partition_t *part_info)
+					 struct disk_partition *part_info)
 {
 	char *ep;
 	const char *part_str;
@@ -725,7 +726,7 @@ static int part_get_info_by_dev_and_name(const char *dev_iface,
 int part_get_info_by_dev_and_name_or_num(const char *dev_iface,
 					 const char *dev_part_str,
 					 struct blk_desc **dev_desc,
-					 disk_partition_t *part_info)
+					 struct disk_partition *part_info)
 {
 	/* Split the part_name if passed as "$dev_num#part_name". */
 	if (!part_get_info_by_dev_and_name(dev_iface, dev_part_str,
diff --git a/disk/part_amiga.c b/disk/part_amiga.c
index 5a2bb718b5..5a17d11b9b 100644
--- a/disk/part_amiga.c
+++ b/disk/part_amiga.c
@@ -291,7 +291,7 @@ static struct partition_block *find_partition(struct blk_desc *dev_desc,
  * Get info about a partition
  */
 static int part_get_info_amiga(struct blk_desc *dev_desc, int part,
-				    disk_partition_t *info)
+				    struct disk_partition *info)
 {
     struct partition_block *p = find_partition(dev_desc, part-1);
     struct amiga_part_geometry *g;
diff --git a/disk/part_dos.c b/disk/part_dos.c
index 813379f851..6e2a11090c 100644
--- a/disk/part_dos.c
+++ b/disk/part_dos.c
@@ -213,7 +213,7 @@ static void print_partition_extended(struct blk_desc *dev_desc,
 static int part_get_info_extended(struct blk_desc *dev_desc,
 				  lbaint_t ext_part_sector, lbaint_t relative,
 				  int part_num, int which_part,
-				  disk_partition_t *info, unsigned int disksig)
+				  struct disk_partition *info, uint disksig)
 {
 	ALLOC_CACHE_ALIGN_BUFFER(unsigned char, buffer, dev_desc->blksz);
 	dos_partition_t *pt;
@@ -317,7 +317,7 @@ void part_print_dos(struct blk_desc *dev_desc)
 }
 
 int part_get_info_dos(struct blk_desc *dev_desc, int part,
-		      disk_partition_t *info)
+		      struct disk_partition *info)
 {
 	return part_get_info_extended(dev_desc, 0, 0, 1, part, info, 0);
 }
diff --git a/disk/part_efi.c b/disk/part_efi.c
index de15a37cd5..6b206ddb4f 100644
--- a/disk/part_efi.c
+++ b/disk/part_efi.c
@@ -259,7 +259,7 @@ void part_print_efi(struct blk_desc *dev_desc)
 }
 
 int part_get_info_efi(struct blk_desc *dev_desc, int part,
-		      disk_partition_t *info)
+		      struct disk_partition *info)
 {
 	ALLOC_CACHE_ALIGN_BUFFER_PAD(gpt_header, gpt_head, 1, dev_desc->blksz);
 	gpt_entry *gpt_pte = NULL;
@@ -413,7 +413,7 @@ int write_gpt_table(struct blk_desc *dev_desc,
 
 int gpt_fill_pte(struct blk_desc *dev_desc,
 		 gpt_header *gpt_h, gpt_entry *gpt_e,
-		 disk_partition_t *partitions, int parts)
+		 struct disk_partition *partitions, int parts)
 {
 	lbaint_t offset = (lbaint_t)le64_to_cpu(gpt_h->first_usable_lba);
 	lbaint_t last_usable_lba = (lbaint_t)
@@ -603,7 +603,7 @@ int gpt_fill_header(struct blk_desc *dev_desc, gpt_header *gpt_h,
 }
 
 int gpt_restore(struct blk_desc *dev_desc, char *str_disk_guid,
-		disk_partition_t *partitions, int parts_count)
+		struct disk_partition *partitions, int parts_count)
 {
 	gpt_header *gpt_h;
 	gpt_entry *gpt_e;
@@ -698,7 +698,7 @@ int gpt_verify_headers(struct blk_desc *dev_desc, gpt_header *gpt_head,
 }
 
 int gpt_verify_partitions(struct blk_desc *dev_desc,
-			  disk_partition_t *partitions, int parts,
+			  struct disk_partition *partitions, int parts,
 			  gpt_header *gpt_head, gpt_entry **gpt_pte)
 {
 	char efi_str[PARTNAME_SZ + 1];
diff --git a/disk/part_iso.c b/disk/part_iso.c
index 4f14c9a56e..2ccb7867c9 100644
--- a/disk/part_iso.c
+++ b/disk/part_iso.c
@@ -47,7 +47,7 @@ unsigned long iso_dread(struct blk_desc *block_dev, lbaint_t start,
 
 /* only boot records will be listed as valid partitions */
 int part_get_info_iso_verb(struct blk_desc *dev_desc, int part_num,
-			   disk_partition_t *info, int verb)
+			   struct disk_partition *info, int verb)
 {
 	int i,offset,entry_num;
 	unsigned short *chksumbuf;
@@ -200,14 +200,14 @@ found:
 }
 
 static int part_get_info_iso(struct blk_desc *dev_desc, int part_num,
-				  disk_partition_t *info)
+			     struct disk_partition *info)
 {
 	return part_get_info_iso_verb(dev_desc, part_num, info, 0);
 }
 
 static void part_print_iso(struct blk_desc *dev_desc)
 {
-	disk_partition_t info;
+	struct disk_partition info;
 	int i;
 
 	if (part_get_info_iso_verb(dev_desc, 1, &info, 0) == -1) {
@@ -226,7 +226,7 @@ static void part_print_iso(struct blk_desc *dev_desc)
 
 static int part_test_iso(struct blk_desc *dev_desc)
 {
-	disk_partition_t info;
+	struct disk_partition info;
 
 	return part_get_info_iso_verb(dev_desc, 1, &info, 0);
 }
diff --git a/disk/part_mac.c b/disk/part_mac.c
index 8b2c004027..fbd0ad73e3 100644
--- a/disk/part_mac.c
+++ b/disk/part_mac.c
@@ -214,7 +214,7 @@ static int part_mac_read_pdb(struct blk_desc *dev_desc, int part,
 }
 
 static int part_get_info_mac(struct blk_desc *dev_desc, int part,
-				  disk_partition_t *info)
+				  struct disk_partition *info)
 {
 	ALLOC_CACHE_ALIGN_BUFFER(mac_driver_desc_t, ddesc, 1);
 	ALLOC_CACHE_ALIGN_BUFFER(mac_partition_t, mpart, 1);
diff --git a/drivers/dfu/dfu_mmc.c b/drivers/dfu/dfu_mmc.c
index 0d495a785b..cddca0c45f 100644
--- a/drivers/dfu/dfu_mmc.c
+++ b/drivers/dfu/dfu_mmc.c
@@ -369,7 +369,7 @@ int dfu_fill_entity_mmc(struct dfu_entity *dfu, char *devstr, char *s)
 					simple_strtoul(s, NULL, 0);
 
 	} else if (!strcmp(entity_type, "part")) {
-		disk_partition_t partinfo;
+		struct disk_partition partinfo;
 		struct blk_desc *blk_dev = mmc_get_blk_desc(mmc);
 		int mmcdev = second_arg;
 		int mmcpart = third_arg;
diff --git a/drivers/fastboot/fb_getvar.c b/drivers/fastboot/fb_getvar.c
index 95cb434189..467a8618fe 100644
--- a/drivers/fastboot/fb_getvar.c
+++ b/drivers/fastboot/fb_getvar.c
@@ -103,7 +103,7 @@ static int getvar_get_part_info(const char *part_name, char *response,
 	int r;
 # if CONFIG_IS_ENABLED(FASTBOOT_FLASH_MMC)
 	struct blk_desc *dev_desc;
-	disk_partition_t part_info;
+	struct disk_partition part_info;
 
 	r = fastboot_mmc_get_part_info(part_name, &dev_desc, &part_info,
 				       response);
@@ -219,7 +219,7 @@ static void getvar_partition_type(char *part_name, char *response)
 {
 	int r;
 	struct blk_desc *dev_desc;
-	disk_partition_t part_info;
+	struct disk_partition part_info;
 
 	r = fastboot_mmc_get_part_info(part_name, &dev_desc, &part_info,
 				       response);
diff --git a/drivers/fastboot/fb_mmc.c b/drivers/fastboot/fb_mmc.c
index d3249a54f7..c666eb0f29 100644
--- a/drivers/fastboot/fb_mmc.c
+++ b/drivers/fastboot/fb_mmc.c
@@ -27,7 +27,7 @@ struct fb_mmc_sparse {
 };
 
 static int part_get_info_by_name_or_alias(struct blk_desc *dev_desc,
-		const char *name, disk_partition_t *info)
+		const char *name, struct disk_partition *info)
 {
 	int ret;
 
@@ -98,9 +98,9 @@ static lbaint_t fb_mmc_sparse_reserve(struct sparse_storage *info,
 	return blkcnt;
 }
 
-static void write_raw_image(struct blk_desc *dev_desc, disk_partition_t *info,
-		const char *part_name, void *buffer,
-		u32 download_bytes, char *response)
+static void write_raw_image(struct blk_desc *dev_desc,
+			    struct disk_partition *info, const char *part_name,
+			    void *buffer, u32 download_bytes, char *response)
 {
 	lbaint_t blkcnt;
 	lbaint_t blks;
@@ -211,7 +211,7 @@ static void fb_mmc_boot1_ops(struct blk_desc *dev_desc, void *buffer,
  * @return Boot image header sectors count or 0 on error
  */
 static lbaint_t fb_mmc_get_boot_header(struct blk_desc *dev_desc,
-				       disk_partition_t *info,
+				       struct disk_partition *info,
 				       struct andr_img_hdr *hdr,
 				       char *response)
 {
@@ -271,7 +271,7 @@ static int fb_mmc_update_zimage(struct blk_desc *dev_desc,
 	u32 kernel_sector_start;
 	u32 kernel_sectors;
 	u32 sectors_per_page;
-	disk_partition_t info;
+	struct disk_partition info;
 	int res;
 
 	puts("Flashing zImage\n");
@@ -367,12 +367,12 @@ static int fb_mmc_update_zimage(struct blk_desc *dev_desc,
  *
  * @part_name: Named partition to lookup
  * @dev_desc: Pointer to returned blk_desc pointer
- * @part_info: Pointer to returned disk_partition_t
+ * @part_info: Pointer to returned struct disk_partition
  * @response: Pointer to fastboot response buffer
  */
 int fastboot_mmc_get_part_info(const char *part_name,
 			       struct blk_desc **dev_desc,
-			       disk_partition_t *part_info, char *response)
+			       struct disk_partition *part_info, char *response)
 {
 	int r;
 
@@ -407,7 +407,7 @@ void fastboot_mmc_flash_write(const char *cmd, void *download_buffer,
 			      u32 download_bytes, char *response)
 {
 	struct blk_desc *dev_desc;
-	disk_partition_t info;
+	struct disk_partition info;
 
 	dev_desc = blk_get_dev("mmc", CONFIG_FASTBOOT_FLASH_MMC_DEV);
 	if (!dev_desc || dev_desc->type == DEV_TYPE_UNKNOWN) {
@@ -524,7 +524,7 @@ void fastboot_mmc_erase(const char *cmd, char *response)
 {
 	int ret;
 	struct blk_desc *dev_desc;
-	disk_partition_t info;
+	struct disk_partition info;
 	lbaint_t blks, blks_start, blks_size, grp_size;
 	struct mmc *mmc = find_mmc_device(CONFIG_FASTBOOT_FLASH_MMC_DEV);
 
diff --git a/env/ext4.c b/env/ext4.c
index 911e19c6d3..6b5c4d855a 100644
--- a/env/ext4.c
+++ b/env/ext4.c
@@ -45,7 +45,7 @@ static int env_ext4_save(void)
 {
 	env_t	env_new;
 	struct blk_desc *dev_desc = NULL;
-	disk_partition_t info;
+	struct disk_partition info;
 	int dev, part;
 	int err;
 	const char *ifname = env_ext4_get_intf();
@@ -87,7 +87,7 @@ static int env_ext4_load(void)
 {
 	ALLOC_CACHE_ALIGN_BUFFER(char, buf, CONFIG_ENV_SIZE);
 	struct blk_desc *dev_desc = NULL;
-	disk_partition_t info;
+	struct disk_partition info;
 	int dev, part;
 	int err;
 	loff_t off;
diff --git a/env/fat.c b/env/fat.c
index 9772b87a19..f13b88b5f6 100644
--- a/env/fat.c
+++ b/env/fat.c
@@ -33,7 +33,7 @@ static int env_fat_save(void)
 {
 	env_t __aligned(ARCH_DMA_MINALIGN) env_new;
 	struct blk_desc *dev_desc = NULL;
-	disk_partition_t info;
+	struct disk_partition info;
 	int dev, part;
 	int err;
 	loff_t size;
@@ -79,7 +79,7 @@ static int env_fat_load(void)
 {
 	ALLOC_CACHE_ALIGN_BUFFER(char, buf, CONFIG_ENV_SIZE);
 	struct blk_desc *dev_desc = NULL;
-	disk_partition_t info;
+	struct disk_partition info;
 	int dev, part;
 	int err;
 
diff --git a/env/mmc.c b/env/mmc.c
index 251ad07d7c..a8b661db80 100644
--- a/env/mmc.c
+++ b/env/mmc.c
@@ -27,7 +27,7 @@ DECLARE_GLOBAL_DATA_PTR;
 #if CONFIG_IS_ENABLED(OF_CONTROL)
 static inline int mmc_offset_try_partition(const char *str, s64 *val)
 {
-	disk_partition_t info;
+	struct disk_partition info;
 	struct blk_desc *desc;
 	int len, i, ret;
 
diff --git a/fs/btrfs/btrfs.c b/fs/btrfs/btrfs.c
index 2e3985e385..de16217d0d 100644
--- a/fs/btrfs/btrfs.c
+++ b/fs/btrfs/btrfs.c
@@ -75,7 +75,8 @@ static int readdir_callback(const struct btrfs_root *root,
 	return 0;
 }
 
-int btrfs_probe(struct blk_desc *fs_dev_desc, disk_partition_t *fs_partition)
+int btrfs_probe(struct blk_desc *fs_dev_desc,
+		struct disk_partition *fs_partition)
 {
 	btrfs_blk_desc = fs_dev_desc;
 	btrfs_part_info = fs_partition;
diff --git a/fs/btrfs/btrfs.h b/fs/btrfs/btrfs.h
index 986d078679..25a8cf6a87 100644
--- a/fs/btrfs/btrfs.h
+++ b/fs/btrfs/btrfs.h
@@ -36,7 +36,7 @@ static inline u64 btrfs_name_hash(const char *name, int len)
 
 /* dev.c */
 extern struct blk_desc *btrfs_blk_desc;
-extern disk_partition_t *btrfs_part_info;
+extern struct disk_partition *btrfs_part_info;
 
 int btrfs_devread(u64, int, void *);
 
diff --git a/fs/btrfs/dev.c b/fs/btrfs/dev.c
index ada3800f1e..e686abc5e3 100644
--- a/fs/btrfs/dev.c
+++ b/fs/btrfs/dev.c
@@ -10,7 +10,7 @@
 #include <fs_internal.h>
 
 struct blk_desc *btrfs_blk_desc;
-disk_partition_t *btrfs_part_info;
+struct disk_partition *btrfs_part_info;
 
 int btrfs_devread(u64 address, int byte_len, void *buf)
 {
diff --git a/fs/ext4/dev.c b/fs/ext4/dev.c
index 29076880bc..0d4f756aa5 100644
--- a/fs/ext4/dev.c
+++ b/fs/ext4/dev.c
@@ -33,9 +33,9 @@
 lbaint_t part_offset;
 
 static struct blk_desc *ext4fs_blk_desc;
-static disk_partition_t *part_info;
+static struct disk_partition *part_info;
 
-void ext4fs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info)
+void ext4fs_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info)
 {
 	assert(rbdd->blksz == (1 << rbdd->log2blksz));
 	ext4fs_blk_desc = rbdd;
diff --git a/fs/ext4/ext4fs.c b/fs/ext4/ext4fs.c
index 96ca276839..ad71f5ab6e 100644
--- a/fs/ext4/ext4fs.c
+++ b/fs/ext4/ext4fs.c
@@ -227,7 +227,7 @@ int ext4fs_read(char *buf, loff_t offset, loff_t len, loff_t *actread)
 }
 
 int ext4fs_probe(struct blk_desc *fs_dev_desc,
-		 disk_partition_t *fs_partition)
+		 struct disk_partition *fs_partition)
 {
 	ext4fs_set_blk_dev(fs_dev_desc, fs_partition);
 
diff --git a/fs/fat/fat.c b/fs/fat/fat.c
index f68c8f73c4..425d877c74 100644
--- a/fs/fat/fat.c
+++ b/fs/fat/fat.c
@@ -36,7 +36,7 @@ static void downcase(char *str, size_t len)
 }
 
 static struct blk_desc *cur_dev;
-static disk_partition_t cur_part_info;
+static struct disk_partition cur_part_info;
 
 #define DOS_BOOT_MAGIC_OFFSET	0x1fe
 #define DOS_FS_TYPE_OFFSET	0x36
@@ -57,7 +57,7 @@ static int disk_read(__u32 block, __u32 nr_blocks, void *buf)
 	return ret;
 }
 
-int fat_set_blk_dev(struct blk_desc *dev_desc, disk_partition_t *info)
+int fat_set_blk_dev(struct blk_desc *dev_desc, struct disk_partition *info)
 {
 	ALLOC_CACHE_ALIGN_BUFFER(unsigned char, buffer, dev_desc->blksz);
 
@@ -88,7 +88,7 @@ int fat_set_blk_dev(struct blk_desc *dev_desc, disk_partition_t *info)
 
 int fat_register_device(struct blk_desc *dev_desc, int part_no)
 {
-	disk_partition_t info;
+	struct disk_partition info;
 
 	/* First close any currently found FAT filesystem */
 	cur_dev = NULL;
diff --git a/fs/fs.c b/fs/fs.c
index 0c66d60477..e3de25da5b 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -24,11 +24,11 @@ DECLARE_GLOBAL_DATA_PTR;
 
 static struct blk_desc *fs_dev_desc;
 static int fs_dev_part;
-static disk_partition_t fs_partition;
+static struct disk_partition fs_partition;
 static int fs_type = FS_TYPE_ANY;
 
 static inline int fs_probe_unsupported(struct blk_desc *fs_dev_desc,
-				      disk_partition_t *fs_partition)
+				      struct disk_partition *fs_partition)
 {
 	printf("** Unrecognized filesystem type **\n");
 	return -1;
@@ -135,7 +135,7 @@ struct fstype_info {
 	 */
 	bool null_dev_desc_ok;
 	int (*probe)(struct blk_desc *fs_dev_desc,
-		     disk_partition_t *fs_partition);
+		     struct disk_partition *fs_partition);
 	int (*ls)(const char *dirname);
 	int (*exists)(const char *filename);
 	int (*size)(const char *filename, loff_t *size);
diff --git a/fs/fs_internal.c b/fs/fs_internal.c
index d369c43ca6..1ff804d13b 100644
--- a/fs/fs_internal.c
+++ b/fs/fs_internal.c
@@ -10,7 +10,7 @@
 #include <part.h>
 #include <memalign.h>
 
-int fs_devread(struct blk_desc *blk, disk_partition_t *partition,
+int fs_devread(struct blk_desc *blk, struct disk_partition *partition,
 	       lbaint_t sector, int byte_offset, int byte_len, char *buf)
 {
 	unsigned block_len;
diff --git a/fs/reiserfs/dev.c b/fs/reiserfs/dev.c
index c6b67795df..5d9c26489a 100644
--- a/fs/reiserfs/dev.c
+++ b/fs/reiserfs/dev.c
@@ -12,10 +12,10 @@
 #include "reiserfs_private.h"
 
 static struct blk_desc *reiserfs_blk_desc;
-static disk_partition_t *part_info;
+static struct disk_partition *part_info;
 
 
-void reiserfs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info)
+void reiserfs_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info)
 {
 	reiserfs_blk_desc = rbdd;
 	part_info = info;
diff --git a/fs/sandbox/sandboxfs.c b/fs/sandbox/sandboxfs.c
index af47224b6c..5851fe2434 100644
--- a/fs/sandbox/sandboxfs.c
+++ b/fs/sandbox/sandboxfs.c
@@ -8,7 +8,7 @@
 #include <malloc.h>
 #include <os.h>
 
-int sandbox_fs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info)
+int sandbox_fs_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info)
 {
 	/*
 	 * Only accept a NULL struct blk_desc for the sandbox, which is when
diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
index e097d28444..742c2f47eb 100644
--- a/fs/ubifs/ubifs.c
+++ b/fs/ubifs/ubifs.c
@@ -549,7 +549,7 @@ static unsigned long ubifs_findfile(struct super_block *sb, char *filename)
 	return 0;
 }
 
-int ubifs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info)
+int ubifs_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info)
 {
 	if (rbdd) {
 		debug("UBIFS cannot be used with normal block devices\n");
diff --git a/fs/zfs/dev.c b/fs/zfs/dev.c
index 3cdb9e03ed..251e7d1f74 100644
--- a/fs/zfs/dev.c
+++ b/fs/zfs/dev.c
@@ -14,9 +14,9 @@
 #include <zfs_common.h>
 
 static struct blk_desc *zfs_blk_desc;
-static disk_partition_t *part_info;
+static struct disk_partition *part_info;
 
-void zfs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info)
+void zfs_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info)
 {
 	zfs_blk_desc = rbdd;
 	part_info = info;
diff --git a/include/android_ab.h b/include/android_ab.h
index 810906d22b..3f4e69be9e 100644
--- a/include/android_ab.h
+++ b/include/android_ab.h
@@ -29,6 +29,6 @@
  * @param[in] part_info Place to store the partition information
  * @return The slot number (>= 0) on success, or a negative on error
  */
-int ab_select_slot(struct blk_desc *dev_desc, disk_partition_t *part_info);
+int ab_select_slot(struct blk_desc *dev_desc, struct disk_partition *part_info);
 
 #endif /* __ANDROID_AB_H */
diff --git a/include/avb_verify.h b/include/avb_verify.h
index 18278f829e..a8d7090f79 100644
--- a/include/avb_verify.h
+++ b/include/avb_verify.h
@@ -38,7 +38,7 @@ struct mmc_part {
 	int dev_num;
 	struct mmc *mmc;
 	struct blk_desc *mmc_blk;
-	disk_partition_t info;
+	struct disk_partition info;
 };
 
 enum mmc_io_type {
diff --git a/include/btrfs.h b/include/btrfs.h
index 5be61e3264..f7f82ad7d1 100644
--- a/include/btrfs.h
+++ b/include/btrfs.h
@@ -8,7 +8,8 @@
 #ifndef __U_BOOT_BTRFS_H__
 #define __U_BOOT_BTRFS_H__
 
-int btrfs_probe(struct blk_desc *, disk_partition_t *);
+int btrfs_probe(struct blk_desc *fs_dev_desc,
+		struct disk_partition *fs_partition);
 int btrfs_ls(const char *);
 int btrfs_exists(const char *);
 int btrfs_size(const char *, loff_t *);
diff --git a/include/ext4fs.h b/include/ext4fs.h
index 34585d407d..aafcd84140 100644
--- a/include/ext4fs.h
+++ b/include/ext4fs.h
@@ -152,11 +152,11 @@ int ext4fs_exists(const char *filename);
 int ext4fs_size(const char *filename, loff_t *size);
 void ext4fs_free_node(struct ext2fs_node *node, struct ext2fs_node *currroot);
 int ext4fs_devread(lbaint_t sector, int byte_offset, int byte_len, char *buf);
-void ext4fs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info);
+void ext4fs_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info);
 long int read_allocated_block(struct ext2_inode *inode, int fileblock,
 			      struct ext_block_cache *cache);
 int ext4fs_probe(struct blk_desc *fs_dev_desc,
-		 disk_partition_t *fs_partition);
+		 struct disk_partition *fs_partition);
 int ext4_read_file(const char *filename, void *buf, loff_t offset, loff_t len,
 		   loff_t *actread);
 int ext4_read_superblock(char *buffer);
diff --git a/include/fat.h b/include/fat.h
index bc139f8c88..84573fd3fe 100644
--- a/include/fat.h
+++ b/include/fat.h
@@ -193,7 +193,7 @@ int fat_size(const char *filename, loff_t *size);
 int file_fat_read_at(const char *filename, loff_t pos, void *buffer,
 		     loff_t maxsize, loff_t *actread);
 int file_fat_read(const char *filename, void *buffer, int maxsize);
-int fat_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info);
+int fat_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info);
 int fat_register_device(struct blk_desc *dev_desc, int part_no);
 
 int file_fat_write(const char *filename, void *buf, loff_t offset, loff_t len,
diff --git a/include/fb_mmc.h b/include/fb_mmc.h
index 95db001bee..0c58109e2f 100644
--- a/include/fb_mmc.h
+++ b/include/fb_mmc.h
@@ -11,12 +11,13 @@
  *
  * @part_name: Named partition to lookup
  * @dev_desc: Pointer to returned blk_desc pointer
- * @part_info: Pointer to returned disk_partition_t
+ * @part_info: Pointer to returned struct disk_partition
  * @response: Pointer to fastboot response buffer
  */
 int fastboot_mmc_get_part_info(const char *part_name,
 			       struct blk_desc **dev_desc,
-			       disk_partition_t *part_info, char *response);
+			       struct disk_partition *part_info,
+			       char *response);
 
 /**
  * fastboot_mmc_flash_write() - Write image to eMMC for fastboot
diff --git a/include/fs_internal.h b/include/fs_internal.h
index 96d26032ac..3d4d25da96 100644
--- a/include/fs_internal.h
+++ b/include/fs_internal.h
@@ -10,7 +10,7 @@
 
 #include <part.h>
 
-int fs_devread(struct blk_desc *, disk_partition_t *, lbaint_t, int, int,
+int fs_devread(struct blk_desc *, struct disk_partition *, lbaint_t, int, int,
 	       char *);
 
 #endif /* __U_BOOT_FS_INTERNAL_H__ */
diff --git a/include/part.h b/include/part.h
index 3693527397..55be724d20 100644
--- a/include/part.h
+++ b/include/part.h
@@ -54,7 +54,7 @@ struct block_drvr {
 #define PART_BOOTABLE			((int)BIT(0))
 #define PART_EFI_SYSTEM_PARTITION	((int)BIT(1))
 
-typedef struct disk_partition {
+struct disk_partition {
 	lbaint_t	start;	/* # of first block in partition	*/
 	lbaint_t	size;	/* number of blocks in partition	*/
 	ulong	blksz;		/* block size in bytes			*/
@@ -76,11 +76,11 @@ typedef struct disk_partition {
 #ifdef CONFIG_DOS_PARTITION
 	uchar	sys_ind;	/* partition type 			*/
 #endif
-} disk_partition_t;
+};
 
 struct disk_part {
 	int partnum;
-	disk_partition_t gpt_part_info;
+	struct disk_partition gpt_part_info;
 	struct list_head list;
 };
 
@@ -105,12 +105,14 @@ struct blk_desc *mg_disk_get_dev(int dev);
 int host_get_dev_err(int dev, struct blk_desc **blk_devp);
 
 /* disk/part.c */
-int part_get_info(struct blk_desc *dev_desc, int part, disk_partition_t *info);
+int part_get_info(struct blk_desc *dev_desc, int part,
+		  struct disk_partition *info);
 /**
  * part_get_info_whole_disk() - get partition info for the special case of
  * a partition occupying the entire disk.
  */
-int part_get_info_whole_disk(struct blk_desc *dev_desc, disk_partition_t *info);
+int part_get_info_whole_disk(struct blk_desc *dev_desc,
+			     struct disk_partition *info);
 
 void part_print(struct blk_desc *dev_desc);
 void part_init(struct blk_desc *dev_desc);
@@ -179,7 +181,7 @@ int blk_get_device_by_str(const char *ifname, const char *dev_str,
  */
 int blk_get_device_part_str(const char *ifname, const char *dev_part_str,
 			    struct blk_desc **dev_desc,
-			    disk_partition_t *info, int allow_whole_dev);
+			    struct disk_partition *info, int allow_whole_dev);
 
 /**
  * part_get_info_by_name_type() - Search for a partition by name
@@ -194,7 +196,7 @@ int blk_get_device_part_str(const char *ifname, const char *dev_part_str,
  * otherwise error
  */
 int part_get_info_by_name_type(struct blk_desc *dev_desc, const char *name,
-			       disk_partition_t *info, int part_type);
+			       struct disk_partition *info, int part_type);
 
 /**
  * part_get_info_by_name() - Search for a partition by name
@@ -208,7 +210,7 @@ int part_get_info_by_name_type(struct blk_desc *dev_desc, const char *name,
  * otherwise error
  */
 int part_get_info_by_name(struct blk_desc *dev_desc,
-			      const char *name, disk_partition_t *info);
+			      const char *name, struct disk_partition *info);
 
 /**
  * Get partition info from dev number + part name, or dev number + part number.
@@ -229,7 +231,7 @@ int part_get_info_by_name(struct blk_desc *dev_desc,
 int part_get_info_by_dev_and_name_or_num(const char *dev_iface,
 					 const char *dev_part_str,
 					 struct blk_desc **dev_desc,
-					 disk_partition_t *part_info);
+					 struct disk_partition *part_info);
 
 /**
  * part_set_generic_name() - create generic partition like hda1 or sdb2
@@ -252,9 +254,9 @@ static inline struct blk_desc *blk_get_dev(const char *ifname, int dev)
 static inline struct blk_desc *mg_disk_get_dev(int dev) { return NULL; }
 
 static inline int part_get_info(struct blk_desc *dev_desc, int part,
-				disk_partition_t *info) { return -1; }
+				struct disk_partition *info) { return -1; }
 static inline int part_get_info_whole_disk(struct blk_desc *dev_desc,
-					   disk_partition_t *info)
+					   struct disk_partition *info)
 { return -1; }
 static inline void part_print(struct blk_desc *dev_desc) {}
 static inline void part_init(struct blk_desc *dev_desc) {}
@@ -263,10 +265,10 @@ static inline int blk_get_device_by_str(const char *ifname, const char *dev_str,
 					struct blk_desc **dev_desc)
 { return -1; }
 static inline int blk_get_device_part_str(const char *ifname,
-					   const char *dev_part_str,
-					   struct blk_desc **dev_desc,
-					   disk_partition_t *info,
-					   int allow_whole_dev)
+					  const char *dev_part_str,
+					  struct blk_desc **dev_desc,
+					  struct disk_partition *info,
+					  int allow_whole_dev)
 { *dev_desc = NULL; return -1; }
 #endif
 
@@ -301,7 +303,7 @@ struct part_driver {
 	 * @info:	Returns partition information
 	 */
 	int (*get_info)(struct blk_desc *dev_desc, int part,
-			disk_partition_t *info);
+			struct disk_partition *info);
 
 	/**
 	 * print() - Print partition information
@@ -353,7 +355,7 @@ int write_gpt_table(struct blk_desc *dev_desc,
  */
 int gpt_fill_pte(struct blk_desc *dev_desc,
 		 gpt_header *gpt_h, gpt_entry *gpt_e,
-		 disk_partition_t *partitions, int parts);
+		 struct disk_partition *partitions, int parts);
 
 /**
  * gpt_fill_header(): Fill the GPT header
@@ -379,7 +381,7 @@ int gpt_fill_header(struct blk_desc *dev_desc, gpt_header *gpt_h,
  * @return zero on success
  */
 int gpt_restore(struct blk_desc *dev_desc, char *str_disk_guid,
-		disk_partition_t *partitions, const int parts_count);
+		struct disk_partition *partitions, const int parts_count);
 
 /**
  * is_valid_gpt_buf() - Ensure that the Primary GPT information is valid
@@ -433,7 +435,7 @@ int gpt_verify_headers(struct blk_desc *dev_desc, gpt_header *gpt_head,
  * @return - '0' on success, otherwise error
  */
 int gpt_verify_partitions(struct blk_desc *dev_desc,
-			  disk_partition_t *partitions, int parts,
+			  struct disk_partition *partitions, int parts,
 			  gpt_header *gpt_head, gpt_entry **gpt_pte);
 
 
diff --git a/include/reiserfs.h b/include/reiserfs.h
index de4150024c..a655d5ea9f 100644
--- a/include/reiserfs.h
+++ b/include/reiserfs.h
@@ -62,7 +62,7 @@ typedef enum
 } reiserfs_error_t;
 
 
-void reiserfs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info);
+void reiserfs_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info);
 extern int reiserfs_ls (char *dirname);
 extern int reiserfs_open (char *filename);
 extern int reiserfs_read (char *buf, unsigned len);
diff --git a/include/sandboxfs.h b/include/sandboxfs.h
index 6e6e3c62ff..49724d05c8 100644
--- a/include/sandboxfs.h
+++ b/include/sandboxfs.h
@@ -18,7 +18,7 @@
 #ifndef __SANDBOX_FS__
 #define __SANDBOX_FS__
 
-int sandbox_fs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info);
+int sandbox_fs_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info);
 
 int sandbox_fs_read_at(const char *filename, loff_t pos, void *buffer,
 		       loff_t maxsize, loff_t *actread);
diff --git a/include/ubifs_uboot.h b/include/ubifs_uboot.h
index 015ce12226..16b757286e 100644
--- a/include/ubifs_uboot.h
+++ b/include/ubifs_uboot.h
@@ -20,7 +20,7 @@ void uboot_ubifs_umount(void);
 int ubifs_is_mounted(void);
 int ubifs_load(char *filename, u32 addr, u32 size);
 
-int ubifs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info);
+int ubifs_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info);
 int ubifs_ls(const char *dir_name);
 int ubifs_exists(const char *filename);
 int ubifs_size(const char *filename, loff_t *size);
diff --git a/include/zfs_common.h b/include/zfs_common.h
index bca3dff06e..027ba91b28 100644
--- a/include/zfs_common.h
+++ b/include/zfs_common.h
@@ -98,7 +98,7 @@ int zfs_close(zfs_file_t);
 int zfs_ls(device_t dev, const char *path,
 		   int (*hook) (const char *, const struct zfs_dirhook_info *));
 int zfs_devread(int sector, int byte_offset, int byte_len, char *buf);
-void zfs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info);
+void zfs_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info);
 void zfs_unmount(struct zfs_data *data);
 int lzjb_decompress(void *, void *, uint32_t, uint32_t);
 #endif
diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c
index 5b2ff81319..76ab2d8288 100644
--- a/lib/efi_loader/efi_device_path.c
+++ b/lib/efi_loader/efi_device_path.c
@@ -694,7 +694,7 @@ static unsigned dp_part_size(struct blk_desc *desc, int part)
  */
 static void *dp_part_node(void *buf, struct blk_desc *desc, int part)
 {
-	disk_partition_t info;
+	struct disk_partition info;
 
 	part_get_info(desc, part, &info);
 
@@ -1036,7 +1036,7 @@ efi_status_t efi_dp_from_name(const char *dev, const char *devnr,
 {
 	int is_net;
 	struct blk_desc *desc = NULL;
-	disk_partition_t fs_partition;
+	struct disk_partition fs_partition;
 	int part = 0;
 	char filename[32] = { 0 }; /* dp->str is u16[32] long */
 	char *s;
diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c
index 0582e02158..9176008c0e 100644
--- a/lib/efi_loader/efi_disk.c
+++ b/lib/efi_loader/efi_disk.c
@@ -424,7 +424,7 @@ static efi_status_t efi_disk_add_dev(
 	/* Store first EFI system partition */
 	if (part && !efi_system_partition.if_type) {
 		int r;
-		disk_partition_t info;
+		struct disk_partition info;
 
 		r = part_get_info(desc, part, &info);
 		if (r)
@@ -459,7 +459,7 @@ int efi_disk_create_partitions(efi_handle_t parent, struct blk_desc *desc,
 {
 	int disks = 0;
 	char devname[32] = { 0 }; /* dp->str is u16[32] long */
-	disk_partition_t info;
+	struct disk_partition info;
 	int part;
 	struct efi_device_path *dp = NULL;
 	efi_status_t ret;
@@ -600,7 +600,7 @@ bool efi_disk_is_system_part(efi_handle_t handle)
 {
 	struct efi_handler *handler;
 	struct efi_disk_obj *diskobj;
-	disk_partition_t info;
+	struct disk_partition info;
 	efi_status_t ret;
 	int r;
 
diff --git a/lib/efi_loader/efi_file.c b/lib/efi_loader/efi_file.c
index 140116ddc4..1fe7cf539e 100644
--- a/lib/efi_loader/efi_file.c
+++ b/lib/efi_loader/efi_file.c
@@ -634,7 +634,7 @@ static efi_status_t EFIAPI efi_file_getinfo(struct efi_file_handle *file,
 		utf8_utf16_strcpy(&dst, filename);
 	} else if (!guidcmp(info_type, &efi_file_system_info_guid)) {
 		struct efi_file_system_info *info = buffer;
-		disk_partition_t part;
+		struct disk_partition part;
 		efi_uintn_t required_size;
 		int r;
 
-- 
2.26.2.645.ge9eca65c58-goog

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH v3 07/22] common: Drop part.h from common header
  2020-05-10 17:39 [PATCH v3 00/22] common: Further reduce the size of common.h Simon Glass
                   ` (5 preceding siblings ...)
  2020-05-10 17:39 ` [PATCH v3 06/22] part: Drop disk_partition_t typedef Simon Glass
@ 2020-05-10 17:39 ` Simon Glass
  2020-05-19 17:32   ` Tom Rini
  2020-05-10 17:39 ` [PATCH v3 08/22] bootstage: Use BOOTSTAGE instead of BOOTSTATE Simon Glass
                   ` (15 subsequent siblings)
  22 siblings, 1 reply; 53+ messages in thread
From: Simon Glass @ 2020-05-10 17:39 UTC (permalink / raw)
  To: u-boot

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v3: None
Changes in v2: None

 api/api_storage.c                        | 1 +
 arch/arm/mach-omap2/utils.c              | 1 +
 arch/arm/mach-snapdragon/dram.c          | 1 +
 arch/x86/include/asm/fsp/fsp_api.h       | 2 ++
 arch/x86/include/asm/fsp/fsp_fv.h        | 2 ++
 board/xilinx/zynq/bootimg.c              | 1 +
 cmd/ab_select.c                          | 2 ++
 cmd/bcb.c                                | 1 +
 cmd/fat.c                                | 1 +
 cmd/gpt.c                                | 2 ++
 cmd/mmc.c                                | 2 ++
 cmd/nvme.c                               | 1 +
 cmd/sata.c                               | 1 +
 cmd/scsi.c                               | 1 +
 cmd/unzip.c                              | 1 +
 cmd/usb.c                                | 1 +
 cmd/usb_mass_storage.c                   | 3 ++-
 cmd/virtio.c                             | 1 +
 common/android_ab.c                      | 4 +++-
 common/spl/spl_ext.c                     | 1 +
 common/spl/spl_mmc.c                     | 1 +
 common/usb_storage.c                     | 1 +
 disk/part.c                              | 1 +
 disk/part_amiga.c                        | 1 +
 disk/part_dos.c                          | 2 ++
 disk/part_efi.c                          | 4 +++-
 disk/part_iso.c                          | 2 ++
 disk/part_mac.c                          | 1 +
 drivers/ata/ahci.c                       | 1 +
 drivers/ata/dwc_ahsata.c                 | 2 ++
 drivers/ata/fsl_sata.c                   | 1 +
 drivers/ata/sata.c                       | 2 ++
 drivers/ata/sata_mv.c                    | 1 +
 drivers/ata/sata_sandbox.c               | 1 +
 drivers/ata/sata_sil3114.c               | 2 ++
 drivers/block/blk-uclass.c               | 1 +
 drivers/block/blk_legacy.c               | 2 ++
 drivers/block/blkcache.c                 | 2 +-
 drivers/block/ide.c                      | 2 ++
 drivers/dfu/dfu_mmc.c                    | 1 +
 drivers/fastboot/fb_getvar.c             | 1 +
 drivers/fastboot/fb_nand.c               | 1 +
 drivers/misc/fsl_ifc.c                   | 1 +
 drivers/mmc/mmc.c                        | 1 +
 drivers/mmc/mmc_write.c                  | 1 +
 drivers/mmc/sh_sdhi.c                    | 1 +
 drivers/mtd/nand/raw/fsl_ifc_spl.c       | 1 +
 drivers/net/fm/eth.c                     | 1 +
 drivers/nvme/nvme-uclass.c               | 1 +
 drivers/nvme/nvme.c                      | 1 +
 drivers/scsi/scsi.c                      | 2 ++
 drivers/usb/gadget/ether.c               | 1 +
 drivers/usb/gadget/f_rockusb.c           | 1 +
 drivers/video/atmel_hlcdfb.c             | 1 +
 drivers/video/atmel_lcdfb.c              | 1 +
 drivers/video/imx/mxc_ipuv3_fb.c         | 1 +
 drivers/video/meson/meson_vpu.c          | 1 +
 drivers/video/mvebu_lcd.c                | 1 +
 drivers/video/sunxi/sunxi_de2.c          | 1 +
 drivers/video/tegra.c                    | 1 +
 drivers/video/tegra124/display.c         | 1 +
 drivers/virtio/virtio_blk.c              | 1 +
 env/ext4.c                               | 1 +
 env/fat.c                                | 6 +++---
 fs/btrfs/dev.c                           | 1 +
 fs/btrfs/super.c                         | 4 +++-
 fs/ext4/ext4_common.c                    | 2 ++
 fs/ext4/ext4_journal.c                   | 1 +
 fs/ext4/ext4_write.c                     | 2 ++
 fs/ext4/ext4fs.c                         | 2 ++
 fs/fs.c                                  | 1 +
 fs/fs_internal.c                         | 1 +
 fs/sandbox/sandboxfs.c                   | 1 +
 fs/ubifs/ubifs.c                         | 1 +
 include/android_ab.h                     | 3 ++-
 include/btrfs.h                          | 3 +++
 include/common.h                         | 1 -
 include/efi_loader.h                     | 3 +++
 include/ext4fs.h                         | 2 ++
 include/fat.h                            | 2 ++
 include/fb_mmc.h                         | 3 +++
 include/fs.h                             | 2 ++
 include/fsl_ifc.h                        | 1 +
 include/gzip.h                           | 2 ++
 include/initcall.h                       | 4 ++++
 include/reiserfs.h                       | 3 +++
 include/sandboxfs.h                      | 3 +++
 include/spl.h                            | 1 +
 include/ubifs_uboot.h                    | 3 +++
 lib/efi_driver/efi_block_device.c        | 2 ++
 lib/efi_loader/efi_device_path_to_text.c | 1 +
 lib/efi_loader/efi_file.c                | 1 +
 lib/gunzip.c                             | 1 +
 lib/image-sparse.c                       | 1 +
 test/dm/blk.c                            | 1 +
 test/dm/mmc.c                            | 1 +
 test/dm/usb.c                            | 1 +
 97 files changed, 142 insertions(+), 10 deletions(-)

diff --git a/api/api_storage.c b/api/api_storage.c
index 7ae03ac230..a0dacad1a5 100644
--- a/api/api_storage.c
+++ b/api/api_storage.c
@@ -8,6 +8,7 @@
 #include <config.h>
 #include <common.h>
 #include <api_public.h>
+#include <part.h>
 
 #if defined(CONFIG_CMD_USB) && defined(CONFIG_USB_STORAGE)
 #include <usb.h>
diff --git a/arch/arm/mach-omap2/utils.c b/arch/arm/mach-omap2/utils.c
index 6e519d8c91..6e6791fc65 100644
--- a/arch/arm/mach-omap2/utils.c
+++ b/arch/arm/mach-omap2/utils.c
@@ -5,6 +5,7 @@
  */
 #include <common.h>
 #include <env.h>
+#include <part.h>
 #include <asm/setup.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/omap_common.h>
diff --git a/arch/arm/mach-snapdragon/dram.c b/arch/arm/mach-snapdragon/dram.c
index 79eb19992d..12c26a91c6 100644
--- a/arch/arm/mach-snapdragon/dram.c
+++ b/arch/arm/mach-snapdragon/dram.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <part.h>
 #include <smem.h>
 #include <fdt_support.h>
 #include <asm/arch/dram.h>
diff --git a/arch/x86/include/asm/fsp/fsp_api.h b/arch/x86/include/asm/fsp/fsp_api.h
index e9ac86b2da..4941e2d74f 100644
--- a/arch/x86/include/asm/fsp/fsp_api.h
+++ b/arch/x86/include/asm/fsp/fsp_api.h
@@ -6,6 +6,8 @@
 #ifndef __ASM_FSP_API_H
 #define __ASM_FSP_API_H
 
+#include <linux/linkage.h>
+
 enum fsp_phase {
 	/* Notification code for post PCI enuermation */
 	INIT_PHASE_PCI	= 0x20,
diff --git a/arch/x86/include/asm/fsp/fsp_fv.h b/arch/x86/include/asm/fsp/fsp_fv.h
index 511dfb78b8..7492c87c34 100644
--- a/arch/x86/include/asm/fsp/fsp_fv.h
+++ b/arch/x86/include/asm/fsp/fsp_fv.h
@@ -7,6 +7,8 @@
 #ifndef __FSP_FV___
 #define __FSP_FV___
 
+#include <efi.h>
+
 /* Value of EFI_FV_FILE_ATTRIBUTES */
 #define EFI_FV_FILE_ATTR_ALIGNMENT	0x0000001F
 #define EFI_FV_FILE_ATTR_FIXED		0x00000100
diff --git a/board/xilinx/zynq/bootimg.c b/board/xilinx/zynq/bootimg.c
index 56d69cddac..1ed6b2aa92 100644
--- a/board/xilinx/zynq/bootimg.c
+++ b/board/xilinx/zynq/bootimg.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <part.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
diff --git a/cmd/ab_select.c b/cmd/ab_select.c
index d0d957d4f9..7a4e51571b 100644
--- a/cmd/ab_select.c
+++ b/cmd/ab_select.c
@@ -3,8 +3,10 @@
  * Copyright (C) 2017 The Android Open Source Project
  */
 
+#include <common.h>
 #include <android_ab.h>
 #include <command.h>
+#include <part.h>
 
 static int do_ab_select(cmd_tbl_t *cmdtp, int flag, int argc,
 			char * const argv[])
diff --git a/cmd/bcb.c b/cmd/bcb.c
index 62f9a44e38..b944e62b6a 100644
--- a/cmd/bcb.c
+++ b/cmd/bcb.c
@@ -8,6 +8,7 @@
 #include <android_bootloader_message.h>
 #include <command.h>
 #include <common.h>
+#include <part.h>
 
 enum bcb_cmd {
 	BCB_CMD_LOAD,
diff --git a/cmd/fat.c b/cmd/fat.c
index 854fe274bc..a063a623ce 100644
--- a/cmd/fat.c
+++ b/cmd/fat.c
@@ -11,6 +11,7 @@
 #include <mapmem.h>
 #include <fat.h>
 #include <fs.h>
+#include <part.h>
 #include <asm/cache.h>
 
 int do_fat_size(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
diff --git a/cmd/gpt.c b/cmd/gpt.c
index f2b1ad5489..c2964d8508 100644
--- a/cmd/gpt.c
+++ b/cmd/gpt.c
@@ -11,9 +11,11 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <env.h>
 #include <malloc.h>
 #include <command.h>
+#include <part.h>
 #include <part_efi.h>
 #include <exports.h>
 #include <uuid.h>
diff --git a/cmd/mmc.c b/cmd/mmc.c
index 6142ec8e20..a29650b28e 100644
--- a/cmd/mmc.c
+++ b/cmd/mmc.c
@@ -5,9 +5,11 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <command.h>
 #include <console.h>
 #include <mmc.h>
+#include <part.h>
 #include <sparse_format.h>
 #include <image-sparse.h>
 
diff --git a/cmd/nvme.c b/cmd/nvme.c
index 5da903bd52..9ae91ce9cb 100644
--- a/cmd/nvme.c
+++ b/cmd/nvme.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <command.h>
 #include <dm.h>
 #include <nvme.h>
diff --git a/cmd/sata.c b/cmd/sata.c
index 6bdb516cb5..c507e9dbd8 100644
--- a/cmd/sata.c
+++ b/cmd/sata.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <ahci.h>
+#include <blk.h>
 #include <dm.h>
 #include <command.h>
 #include <part.h>
diff --git a/cmd/scsi.c b/cmd/scsi.c
index 67de1a3bdc..e81194de0f 100644
--- a/cmd/scsi.c
+++ b/cmd/scsi.c
@@ -8,6 +8,7 @@
  * SCSI support.
  */
 #include <common.h>
+#include <blk.h>
 #include <command.h>
 #include <scsi.h>
 
diff --git a/cmd/unzip.c b/cmd/unzip.c
index afd58e7cdb..725624627c 100644
--- a/cmd/unzip.c
+++ b/cmd/unzip.c
@@ -8,6 +8,7 @@
 #include <command.h>
 #include <env.h>
 #include <gzip.h>
+#include <part.h>
 
 static int do_unzip(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
diff --git a/cmd/usb.c b/cmd/usb.c
index dd9ac0bc97..98fa300dfe 100644
--- a/cmd/usb.c
+++ b/cmd/usb.c
@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <command.h>
 #include <console.h>
 #include <dm.h>
diff --git a/cmd/usb_mass_storage.c b/cmd/usb_mass_storage.c
index 52ff637e2f..b603730248 100644
--- a/cmd/usb_mass_storage.c
+++ b/cmd/usb_mass_storage.c
@@ -6,10 +6,11 @@
  * Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved.
  */
 
-#include <errno.h>
 #include <common.h>
+#include <blk.h>
 #include <command.h>
 #include <console.h>
+#include <errno.h>
 #include <g_dnl.h>
 #include <malloc.h>
 #include <part.h>
diff --git a/cmd/virtio.c b/cmd/virtio.c
index b7082bc63a..f38cc56598 100644
--- a/cmd/virtio.c
+++ b/cmd/virtio.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <command.h>
 #include <dm.h>
 #include <virtio_types.h>
diff --git a/common/android_ab.c b/common/android_ab.c
index b5b8af1b27..72025bb552 100644
--- a/common/android_ab.c
+++ b/common/android_ab.c
@@ -5,9 +5,11 @@
 #include <common.h>
 #include <android_ab.h>
 #include <android_bootloader_message.h>
+#include <blk.h>
 #include <malloc.h>
-#include <linux/err.h>
+#include <part.h>
 #include <memalign.h>
+#include <linux/err.h>
 #include <u-boot/crc.h>
 #include <u-boot/crc.h>
 
diff --git a/common/spl/spl_ext.c b/common/spl/spl_ext.c
index 954133ba84..3898041d10 100644
--- a/common/spl/spl_ext.c
+++ b/common/spl/spl_ext.c
@@ -2,6 +2,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <part.h>
 #include <spl.h>
 #include <asm/u-boot.h>
 #include <ext4fs.h>
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index fcdd3caeac..95d5a7271f 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -7,6 +7,7 @@
  */
 #include <common.h>
 #include <dm.h>
+#include <part.h>
 #include <spl.h>
 #include <linux/compiler.h>
 #include <errno.h>
diff --git a/common/usb_storage.c b/common/usb_storage.c
index 76af7cc6bd..aba9ccb7f5 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -33,6 +33,7 @@
 
 
 #include <common.h>
+#include <blk.h>
 #include <command.h>
 #include <dm.h>
 #include <errno.h>
diff --git a/disk/part.c b/disk/part.c
index 68cba61c5a..bb0f6e2046 100644
--- a/disk/part.c
+++ b/disk/part.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <command.h>
 #include <env.h>
 #include <errno.h>
diff --git a/disk/part_amiga.c b/disk/part_amiga.c
index 5a17d11b9b..7eea60b564 100644
--- a/disk/part_amiga.c
+++ b/disk/part_amiga.c
@@ -9,6 +9,7 @@
 #include <env.h>
 #include <ide.h>
 #include "part_amiga.h"
+#include <part.h>
 
 #ifdef CONFIG_HAVE_BLOCK_DEVICE
 
diff --git a/disk/part_dos.c b/disk/part_dos.c
index 6e2a11090c..04f53106f7 100644
--- a/disk/part_dos.c
+++ b/disk/part_dos.c
@@ -14,10 +14,12 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <command.h>
 #include <ide.h>
 #include <memalign.h>
 #include "part_dos.h"
+#include <part.h>
 
 #ifdef CONFIG_HAVE_BLOCK_DEVICE
 
diff --git a/disk/part_efi.c b/disk/part_efi.c
index 6b206ddb4f..72bfb4b609 100644
--- a/disk/part_efi.c
+++ b/disk/part_efi.c
@@ -9,10 +9,12 @@
  *   when CONFIG_SYS_64BIT_LBA is not defined, lbaint_t is 32 bits; this
  *   limits the maximum size of addressable storage to < 2 Terra Bytes
  */
+#include <common.h>
+#include <blk.h>
+#include <part.h>
 #include <uuid.h>
 #include <asm/cache.h>
 #include <asm/unaligned.h>
-#include <common.h>
 #include <command.h>
 #include <fdtdec.h>
 #include <ide.h>
diff --git a/disk/part_iso.c b/disk/part_iso.c
index 2ccb7867c9..822f2c4d9f 100644
--- a/disk/part_iso.c
+++ b/disk/part_iso.c
@@ -5,7 +5,9 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <command.h>
+#include <part.h>
 #include <asm/cache.h>
 #include <asm/unaligned.h>
 #include "part_iso.h"
diff --git a/disk/part_mac.c b/disk/part_mac.c
index fbd0ad73e3..cda497e04a 100644
--- a/disk/part_mac.c
+++ b/disk/part_mac.c
@@ -17,6 +17,7 @@
 #include <memalign.h>
 #include <ide.h>
 #include "part_mac.h"
+#include <part.h>
 
 #ifdef CONFIG_HAVE_BLOCK_DEVICE
 
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 4cd7420c3c..d54acc96ee 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -9,6 +9,7 @@
  * This driver provides a SCSI interface to SATA.
  */
 #include <common.h>
+#include <blk.h>
 #include <cpu_func.h>
 
 #include <command.h>
diff --git a/drivers/ata/dwc_ahsata.c b/drivers/ata/dwc_ahsata.c
index d2aa1a64d1..6a71f17684 100644
--- a/drivers/ata/dwc_ahsata.c
+++ b/drivers/ata/dwc_ahsata.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <ahci.h>
+#include <blk.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <dwc_ahsata.h>
@@ -13,6 +14,7 @@
 #include <libata.h>
 #include <malloc.h>
 #include <memalign.h>
+#include <part.h>
 #include <sata.h>
 #include <asm/cache.h>
 #include <asm/io.h>
diff --git a/drivers/ata/fsl_sata.c b/drivers/ata/fsl_sata.c
index c6680dc1c9..0ef70d0d59 100644
--- a/drivers/ata/fsl_sata.c
+++ b/drivers/ata/fsl_sata.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <command.h>
 #include <console.h>
 #include <cpu_func.h>
diff --git a/drivers/ata/sata.c b/drivers/ata/sata.c
index e384b805b2..6a38d50024 100644
--- a/drivers/ata/sata.c
+++ b/drivers/ata/sata.c
@@ -11,7 +11,9 @@
 
 #include <common.h>
 #include <ahci.h>
+#include <blk.h>
 #include <dm.h>
+#include <part.h>
 #include <sata.h>
 
 #ifndef CONFIG_AHCI
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index a71a7edf88..cebb165a47 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -33,6 +33,7 @@
 
 #include <common.h>
 #include <ahci.h>
+#include <blk.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <asm/cache.h>
diff --git a/drivers/ata/sata_sandbox.c b/drivers/ata/sata_sandbox.c
index a28ac56ccd..e64cc4a5c1 100644
--- a/drivers/ata/sata_sandbox.c
+++ b/drivers/ata/sata_sandbox.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <blk.h>
 
 int init_sata(int dev)
 {
diff --git a/drivers/ata/sata_sil3114.c b/drivers/ata/sata_sil3114.c
index 41635742a8..4a7ffad6bd 100644
--- a/drivers/ata/sata_sil3114.c
+++ b/drivers/ata/sata_sil3114.c
@@ -8,6 +8,8 @@
  */
 
 #include <common.h>
+#include <blk.h>
+#include <part.h>
 #include <pci.h>
 #include <command.h>
 #include <config.h>
diff --git a/drivers/block/blk-uclass.c b/drivers/block/blk-uclass.c
index 7c39aa5f2f..4bda74bd06 100644
--- a/drivers/block/blk-uclass.c
+++ b/drivers/block/blk-uclass.c
@@ -8,6 +8,7 @@
 #include <blk.h>
 #include <dm.h>
 #include <malloc.h>
+#include <part.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
 #include <dm/uclass-internal.h>
diff --git a/drivers/block/blk_legacy.c b/drivers/block/blk_legacy.c
index 0c343f7b64..e3ee778c29 100644
--- a/drivers/block/blk_legacy.c
+++ b/drivers/block/blk_legacy.c
@@ -5,6 +5,8 @@
  */
 
 #include <common.h>
+#include <blk.h>
+#include <part.h>
 #include <linux/err.h>
 
 struct blk_driver *blk_driver_lookup_type(int if_type)
diff --git a/drivers/block/blkcache.c b/drivers/block/blkcache.c
index ea40929e3e..6a8f789ff0 100644
--- a/drivers/block/blkcache.c
+++ b/drivers/block/blkcache.c
@@ -4,8 +4,8 @@
  * Author: Eric Nelson<eric@nelint.com>
  *
  */
-#include <config.h>
 #include <common.h>
+#include <blk.h>
 #include <malloc.h>
 #include <part.h>
 #include <linux/ctype.h>
diff --git a/drivers/block/ide.c b/drivers/block/ide.c
index 67cc4fbc02..868726c50c 100644
--- a/drivers/block/ide.c
+++ b/drivers/block/ide.c
@@ -6,8 +6,10 @@
 
 #include <common.h>
 #include <ata.h>
+#include <blk.h>
 #include <dm.h>
 #include <ide.h>
+#include <part.h>
 #include <watchdog.h>
 #include <asm/io.h>
 
diff --git a/drivers/dfu/dfu_mmc.c b/drivers/dfu/dfu_mmc.c
index cddca0c45f..8cd466f02e 100644
--- a/drivers/dfu/dfu_mmc.c
+++ b/drivers/dfu/dfu_mmc.c
@@ -14,6 +14,7 @@
 #include <ext4fs.h>
 #include <fat.h>
 #include <mmc.h>
+#include <part.h>
 
 static unsigned char *dfu_file_buf;
 static u64 dfu_file_buf_len;
diff --git a/drivers/fastboot/fb_getvar.c b/drivers/fastboot/fb_getvar.c
index 467a8618fe..52da34b1e3 100644
--- a/drivers/fastboot/fb_getvar.c
+++ b/drivers/fastboot/fb_getvar.c
@@ -10,6 +10,7 @@
 #include <fb_mmc.h>
 #include <fb_nand.h>
 #include <fs.h>
+#include <part.h>
 #include <version.h>
 
 static void getvar_version(char *var_parameter, char *response);
diff --git a/drivers/fastboot/fb_nand.c b/drivers/fastboot/fb_nand.c
index b165468145..eb8a36f292 100644
--- a/drivers/fastboot/fb_nand.c
+++ b/drivers/fastboot/fb_nand.c
@@ -6,6 +6,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <blk.h>
 #include <flash.h>
 
 #include <fastboot.h>
diff --git a/drivers/misc/fsl_ifc.c b/drivers/misc/fsl_ifc.c
index 0dbf304487..8fdaacd5e0 100644
--- a/drivers/misc/fsl_ifc.c
+++ b/drivers/misc/fsl_ifc.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <fsl_ifc.h>
+#include <part.h>
 
 #ifdef CONFIG_TFABOOT
 struct ifc_regs ifc_cfg_default_boot[CONFIG_SYS_FSL_IFC_BANK_COUNT] = {
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 523c055967..ca62bb9891 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -8,6 +8,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <blk.h>
 #include <command.h>
 #include <dm.h>
 #include <dm/device-internal.h>
diff --git a/drivers/mmc/mmc_write.c b/drivers/mmc/mmc_write.c
index b52ff9f3bc..6a4453ca02 100644
--- a/drivers/mmc/mmc_write.c
+++ b/drivers/mmc/mmc_write.c
@@ -8,6 +8,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <blk.h>
 #include <dm.h>
 #include <part.h>
 #include <div64.h>
diff --git a/drivers/mmc/sh_sdhi.c b/drivers/mmc/sh_sdhi.c
index 2202158c88..4851198571 100644
--- a/drivers/mmc/sh_sdhi.c
+++ b/drivers/mmc/sh_sdhi.c
@@ -13,6 +13,7 @@
 #include <malloc.h>
 #include <mmc.h>
 #include <dm.h>
+#include <part.h>
 #include <dm/device_compat.h>
 #include <linux/errno.h>
 #include <linux/compat.h>
diff --git a/drivers/mtd/nand/raw/fsl_ifc_spl.c b/drivers/mtd/nand/raw/fsl_ifc_spl.c
index 0983fbced3..b7e37416a4 100644
--- a/drivers/mtd/nand/raw/fsl_ifc_spl.c
+++ b/drivers/mtd/nand/raw/fsl_ifc_spl.c
@@ -10,6 +10,7 @@
 #include <cpu_func.h>
 #include <asm/io.h>
 #include <fsl_ifc.h>
+#include <part.h>
 #include <linux/mtd/rawnand.h>
 #ifdef CONFIG_CHAIN_OF_TRUST
 #include <fsl_validate.h>
diff --git a/drivers/net/fm/eth.c b/drivers/net/fm/eth.c
index 5f1a023352..1d0c9988b1 100644
--- a/drivers/net/fm/eth.c
+++ b/drivers/net/fm/eth.c
@@ -5,6 +5,7 @@
  *	Dave Liu <daveliu@freescale.com>
  */
 #include <common.h>
+#include <part.h>
 #include <asm/io.h>
 #ifdef CONFIG_DM_ETH
 #include <dm.h>
diff --git a/drivers/nvme/nvme-uclass.c b/drivers/nvme/nvme-uclass.c
index 2d88efdb61..277e31e1f3 100644
--- a/drivers/nvme/nvme-uclass.c
+++ b/drivers/nvme/nvme-uclass.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <errno.h>
 #include <dm.h>
 #include <dm/device.h>
diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c
index ef4382da1a..5e75152f42 100644
--- a/drivers/nvme/nvme.c
+++ b/drivers/nvme/nvme.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <errno.h>
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 69de6a53d5..849c42f0cd 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -5,8 +5,10 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <dm.h>
 #include <env.h>
+#include <part.h>
 #include <pci.h>
 #include <scsi.h>
 #include <dm/device-internal.h>
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index 8533abfd93..33f9a44d04 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <console.h>
 #include <env.h>
+#include <part.h>
 #include <linux/errno.h>
 #include <linux/netdevice.h>
 #include <linux/usb/ch9.h>
diff --git a/drivers/usb/gadget/f_rockusb.c b/drivers/usb/gadget/f_rockusb.c
index 1cfeabcd31..da3d63c0f0 100644
--- a/drivers/usb/gadget/f_rockusb.c
+++ b/drivers/usb/gadget/f_rockusb.c
@@ -10,6 +10,7 @@
 #include <errno.h>
 #include <malloc.h>
 #include <memalign.h>
+#include <part.h>
 #include <linux/usb/ch9.h>
 #include <linux/usb/gadget.h>
 #include <linux/usb/composite.h>
diff --git a/drivers/video/atmel_hlcdfb.c b/drivers/video/atmel_hlcdfb.c
index 62acccedf3..0fd74fdec9 100644
--- a/drivers/video/atmel_hlcdfb.c
+++ b/drivers/video/atmel_hlcdfb.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <malloc.h>
+#include <part.h>
 #include <asm/io.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/clk.h>
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index bd2e9c0c9b..8cc2eb1973 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -9,6 +9,7 @@
 #include <atmel_lcd.h>
 #include <dm.h>
 #include <fdtdec.h>
+#include <part.h>
 #include <video.h>
 #include <asm/io.h>
 #include <asm/arch/gpio.h>
diff --git a/drivers/video/imx/mxc_ipuv3_fb.c b/drivers/video/imx/mxc_ipuv3_fb.c
index db8eb4ade8..f8ed0a9fea 100644
--- a/drivers/video/imx/mxc_ipuv3_fb.c
+++ b/drivers/video/imx/mxc_ipuv3_fb.c
@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <part.h>
 #include <asm/cache.h>
 #include <linux/errno.h>
 #include <asm/global_data.h>
diff --git a/drivers/video/meson/meson_vpu.c b/drivers/video/meson/meson_vpu.c
index aa8c0a962f..fbdec3af67 100644
--- a/drivers/video/meson/meson_vpu.c
+++ b/drivers/video/meson/meson_vpu.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <efi_loader.h>
 #include <fdt_support.h>
+#include <part.h>
 #include <linux/sizes.h>
 #include <asm/arch/mem.h>
 #include <dm/device-internal.h>
diff --git a/drivers/video/mvebu_lcd.c b/drivers/video/mvebu_lcd.c
index 2907c53378..d5ed8d0096 100644
--- a/drivers/video/mvebu_lcd.c
+++ b/drivers/video/mvebu_lcd.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <part.h>
 #include <video.h>
 #include <asm/cache.h>
 #include <dm/device_compat.h>
diff --git a/drivers/video/sunxi/sunxi_de2.c b/drivers/video/sunxi/sunxi_de2.c
index 8333ddc44c..ba34f1a107 100644
--- a/drivers/video/sunxi/sunxi_de2.c
+++ b/drivers/video/sunxi/sunxi_de2.c
@@ -12,6 +12,7 @@
 #include <efi_loader.h>
 #include <fdtdec.h>
 #include <fdt_support.h>
+#include <part.h>
 #include <video.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
diff --git a/drivers/video/tegra.c b/drivers/video/tegra.c
index 1fa052e306..82ba5c4e7e 100644
--- a/drivers/video/tegra.c
+++ b/drivers/video/tegra.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <panel.h>
+#include <part.h>
 #include <pwm.h>
 #include <video.h>
 #include <asm/cache.h>
diff --git a/drivers/video/tegra124/display.c b/drivers/video/tegra124/display.c
index f08f117cf8..913beab4d4 100644
--- a/drivers/video/tegra124/display.c
+++ b/drivers/video/tegra124/display.c
@@ -12,6 +12,7 @@
 #include <display.h>
 #include <edid.h>
 #include <lcd.h>
+#include <part.h>
 #include <video.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
diff --git a/drivers/virtio/virtio_blk.c b/drivers/virtio/virtio_blk.c
index e793e34e83..992118c607 100644
--- a/drivers/virtio/virtio_blk.c
+++ b/drivers/virtio/virtio_blk.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <blk.h>
 #include <dm.h>
+#include <part.h>
 #include <virtio_types.h>
 #include <virtio.h>
 #include <virtio_ring.h>
diff --git a/env/ext4.c b/env/ext4.c
index 6b5c4d855a..8e90bb71b7 100644
--- a/env/ext4.c
+++ b/env/ext4.c
@@ -19,6 +19,7 @@
  */
 
 #include <common.h>
+#include <part.h>
 
 #include <command.h>
 #include <env.h>
diff --git a/env/fat.c b/env/fat.c
index f13b88b5f6..35a1955e63 100644
--- a/env/fat.c
+++ b/env/fat.c
@@ -7,18 +7,18 @@
  */
 
 #include <common.h>
-#include <asm/cache.h>
-
 #include <command.h>
 #include <env.h>
 #include <env_internal.h>
-#include <linux/stddef.h>
+#include <part.h>
 #include <malloc.h>
 #include <memalign.h>
 #include <search.h>
 #include <errno.h>
 #include <fat.h>
 #include <mmc.h>
+#include <asm/cache.h>
+#include <linux/stddef.h>
 
 #ifdef CONFIG_SPL_BUILD
 /* TODO(sjg at chromium.org): Figure out why this is needed */
diff --git a/fs/btrfs/dev.c b/fs/btrfs/dev.c
index e686abc5e3..1e5b83235a 100644
--- a/fs/btrfs/dev.c
+++ b/fs/btrfs/dev.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <compiler.h>
 #include <fs_internal.h>
 
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index b693a073fc..f80c148627 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -5,9 +5,11 @@
  * 2017 Marek Behun, CZ.NIC, marek.behun at nic.cz
  */
 
-#include "btrfs.h"
+#include <common.h>
 #include <memalign.h>
+#include <part.h>
 #include <linux/compat.h>
+#include "btrfs.h"
 
 #define BTRFS_SUPER_FLAG_SUPP	(BTRFS_HEADER_FLAG_WRITTEN	\
 				 | BTRFS_HEADER_FLAG_RELOC	\
diff --git a/fs/ext4/ext4_common.c b/fs/ext4/ext4_common.c
index 5bf78b530a..9adef57476 100644
--- a/fs/ext4/ext4_common.c
+++ b/fs/ext4/ext4_common.c
@@ -19,10 +19,12 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <ext_common.h>
 #include <ext4fs.h>
 #include <malloc.h>
 #include <memalign.h>
+#include <part.h>
 #include <stddef.h>
 #include <linux/stat.h>
 #include <linux/time.h>
diff --git a/fs/ext4/ext4_journal.c b/fs/ext4/ext4_journal.c
index 0ceb73d9c9..2a8d397af4 100644
--- a/fs/ext4/ext4_journal.c
+++ b/fs/ext4/ext4_journal.c
@@ -14,6 +14,7 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <ext4fs.h>
 #include <malloc.h>
 #include <ext_common.h>
diff --git a/fs/ext4/ext4_write.c b/fs/ext4/ext4_write.c
index 67aeba1339..ce1fddc9a4 100644
--- a/fs/ext4/ext4_write.c
+++ b/fs/ext4/ext4_write.c
@@ -22,8 +22,10 @@
 
 
 #include <common.h>
+#include <blk.h>
 #include <malloc.h>
 #include <memalign.h>
+#include <part.h>
 #include <linux/stat.h>
 #include <div64.h>
 #include "ext4_common.h"
diff --git a/fs/ext4/ext4fs.c b/fs/ext4/ext4fs.c
index ad71f5ab6e..4c89152ce4 100644
--- a/fs/ext4/ext4fs.c
+++ b/fs/ext4/ext4fs.c
@@ -21,11 +21,13 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <ext_common.h>
 #include <ext4fs.h>
 #include "ext4_common.h"
 #include <div64.h>
 #include <malloc.h>
+#include <part.h>
 #include <uuid.h>
 
 int ext4fs_symlinknest;
diff --git a/fs/fs.c b/fs/fs.c
index e3de25da5b..061917a984 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -7,6 +7,7 @@
 #include <errno.h>
 #include <common.h>
 #include <env.h>
+#include <lmb.h>
 #include <mapmem.h>
 #include <part.h>
 #include <ext4fs.h>
diff --git a/fs/fs_internal.c b/fs/fs_internal.c
index 1ff804d13b..115c010ef8 100644
--- a/fs/fs_internal.c
+++ b/fs/fs_internal.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <compiler.h>
 #include <part.h>
 #include <memalign.h>
diff --git a/fs/sandbox/sandboxfs.c b/fs/sandbox/sandboxfs.c
index 5851fe2434..4ae41d5b4d 100644
--- a/fs/sandbox/sandboxfs.c
+++ b/fs/sandbox/sandboxfs.c
@@ -7,6 +7,7 @@
 #include <fs.h>
 #include <malloc.h>
 #include <os.h>
+#include <sandboxfs.h>
 
 int sandbox_fs_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info)
 {
diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
index 742c2f47eb..bb35512380 100644
--- a/fs/ubifs/ubifs.c
+++ b/fs/ubifs/ubifs.c
@@ -17,6 +17,7 @@
 #include <malloc.h>
 #include <memalign.h>
 #include "ubifs.h"
+#include <part.h>
 #include <dm/devres.h>
 #include <u-boot/zlib.h>
 
diff --git a/include/android_ab.h b/include/android_ab.h
index 3f4e69be9e..0941eb6b9c 100644
--- a/include/android_ab.h
+++ b/include/android_ab.h
@@ -6,7 +6,8 @@
 #ifndef __ANDROID_AB_H
 #define __ANDROID_AB_H
 
-#include <common.h>
+struct blk_desc;
+struct disk_partition;
 
 /* Android standard boot slot names are 'a', 'b', 'c', ... */
 #define BOOT_SLOT_NAME(slot_num) ('a' + (slot_num))
diff --git a/include/btrfs.h b/include/btrfs.h
index f7f82ad7d1..a7605e1589 100644
--- a/include/btrfs.h
+++ b/include/btrfs.h
@@ -8,6 +8,9 @@
 #ifndef __U_BOOT_BTRFS_H__
 #define __U_BOOT_BTRFS_H__
 
+struct blk_desc;
+struct disk_partition;
+
 int btrfs_probe(struct blk_desc *fs_dev_desc,
 		struct disk_partition *fs_partition);
 int btrfs_ls(const char *);
diff --git a/include/common.h b/include/common.h
index a900596c5f..85a211554a 100644
--- a/include/common.h
+++ b/include/common.h
@@ -28,7 +28,6 @@
 #include <stdarg.h>
 #include <stdio.h>
 #include <linux/kernel.h>
-#include <part.h>
 #include <image.h>
 #include <log.h>
 #include <asm/u-boot.h> /* boot information for Linux kernel */
diff --git a/include/efi_loader.h b/include/efi_loader.h
index 0e924ad109..3e0c47b328 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -9,11 +9,14 @@
 #define _EFI_LOADER_H 1
 
 #include <common.h>
+#include <blk.h>
 #include <part_efi.h>
 #include <efi_api.h>
 #include <image.h>
 #include <pe.h>
 
+struct blk_desc;
+
 static inline int guidcmp(const void *g1, const void *g2)
 {
 	return memcmp(g1, g2, sizeof(efi_guid_t));
diff --git a/include/ext4fs.h b/include/ext4fs.h
index aafcd84140..cb5d9cc0a5 100644
--- a/include/ext4fs.h
+++ b/include/ext4fs.h
@@ -28,6 +28,8 @@
 #define __EXT4__
 #include <ext_common.h>
 
+struct disk_partition;
+
 #define EXT4_INDEX_FL		0x00001000 /* Inode uses hash tree index */
 #define EXT4_EXTENTS_FL		0x00080000 /* Inode uses extents */
 #define EXT4_EXT_MAGIC			0xf30a
diff --git a/include/fat.h b/include/fat.h
index 84573fd3fe..02742f92a5 100644
--- a/include/fat.h
+++ b/include/fat.h
@@ -12,6 +12,8 @@
 #include <asm/byteorder.h>
 #include <fs.h>
 
+struct disk_partition;
+
 /* Maximum Long File Name length supported here is 128 UTF-16 code units */
 #define VFAT_MAXLEN_BYTES	256 /* Maximum LFN buffer in bytes */
 #define VFAT_MAXSEQ		9   /* Up to 9 of 13 2-byte UTF-16 entries */
diff --git a/include/fb_mmc.h b/include/fb_mmc.h
index 0c58109e2f..76ed7cd6be 100644
--- a/include/fb_mmc.h
+++ b/include/fb_mmc.h
@@ -6,6 +6,9 @@
 #ifndef _FB_MMC_H_
 #define _FB_MMC_H_
 
+struct blk_desc;
+struct disk_partition;
+
 /**
  * fastboot_mmc_get_part_info() - Lookup eMMC partion by name
  *
diff --git a/include/fs.h b/include/fs.h
index 37e35c2120..9fdb4a3424 100644
--- a/include/fs.h
+++ b/include/fs.h
@@ -14,6 +14,8 @@
 #define FS_TYPE_UBIFS	4
 #define FS_TYPE_BTRFS	5
 
+struct blk_desc;
+
 /**
  * do_fat_fsload - Run the fatload command
  *
diff --git a/include/fsl_ifc.h b/include/fsl_ifc.h
index 3edcc39f4e..fd915335b2 100644
--- a/include/fsl_ifc.h
+++ b/include/fsl_ifc.h
@@ -10,6 +10,7 @@
 #ifdef CONFIG_FSL_IFC
 #include <config.h>
 #include <common.h>
+#include <part.h>
 #ifdef CONFIG_ARM
 #include <asm/arch/soc.h>
 #endif
diff --git a/include/gzip.h b/include/gzip.h
index 2e340673c3..783acbb60d 100644
--- a/include/gzip.h
+++ b/include/gzip.h
@@ -7,6 +7,8 @@
 #ifndef __GZIP_H
 #define __GZIP_H
 
+struct blk_desc;
+
 /**
  * gzip_parse_header() - Parse a header from a gzip file
  *
diff --git a/include/initcall.h b/include/initcall.h
index b5acdd01bd..c871767e20 100644
--- a/include/initcall.h
+++ b/include/initcall.h
@@ -8,6 +8,10 @@
 
 typedef int (*init_fnc_t)(void);
 
+#ifdef CONFIG_EFI_APP
+#include <efi.h>
+#endif
+
 /*
  * To enable debugging. add #define DEBUG at the top of the including file.
  *
diff --git a/include/reiserfs.h b/include/reiserfs.h
index a655d5ea9f..b61bb60067 100644
--- a/include/reiserfs.h
+++ b/include/reiserfs.h
@@ -18,6 +18,9 @@
 #define SECTOR_SIZE		0x200
 #define SECTOR_BITS		9
 
+struct blk_desc;
+struct disk_partition;
+
 /* Error codes */
 typedef enum
 {
diff --git a/include/sandboxfs.h b/include/sandboxfs.h
index 49724d05c8..783dd5c88a 100644
--- a/include/sandboxfs.h
+++ b/include/sandboxfs.h
@@ -18,6 +18,9 @@
 #ifndef __SANDBOX_FS__
 #define __SANDBOX_FS__
 
+struct blk_desc;
+struct disk_partition;
+
 int sandbox_fs_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info);
 
 int sandbox_fs_read_at(const char *filename, loff_t pos, void *buffer,
diff --git a/include/spl.h b/include/spl.h
index 661a22e368..772879b1bd 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -26,6 +26,7 @@ struct image_header;
 #define MMCSD_MODE_FS		2
 #define MMCSD_MODE_EMMCBOOT	3
 
+struct blk_desc;
 struct image_header;
 
 /*
diff --git a/include/ubifs_uboot.h b/include/ubifs_uboot.h
index 16b757286e..b025779d59 100644
--- a/include/ubifs_uboot.h
+++ b/include/ubifs_uboot.h
@@ -14,6 +14,9 @@
 #ifndef __UBIFS_UBOOT_H__
 #define __UBIFS_UBOOT_H__
 
+struct blk_desc;
+struct disk_partition;
+
 int ubifs_init(void);
 int uboot_ubifs_mount(char *vol_name);
 void uboot_ubifs_umount(void);
diff --git a/lib/efi_driver/efi_block_device.c b/lib/efi_driver/efi_block_device.c
index 33e66fcad2..e7d8745ad8 100644
--- a/lib/efi_driver/efi_block_device.c
+++ b/lib/efi_driver/efi_block_device.c
@@ -28,6 +28,8 @@
  * iPXE uses the simple file protocol to load Grub or the Linux Kernel.
  */
 
+#include <common.h>
+#include <blk.h>
 #include <efi_driver.h>
 #include <malloc.h>
 #include <dm/device-internal.h>
diff --git a/lib/efi_loader/efi_device_path_to_text.c b/lib/efi_loader/efi_device_path_to_text.c
index af1adbb71e..49bebb58cc 100644
--- a/lib/efi_loader/efi_device_path_to_text.c
+++ b/lib/efi_loader/efi_device_path_to_text.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <efi_loader.h>
 
 #define MAC_OUTPUT_LEN 22
diff --git a/lib/efi_loader/efi_file.c b/lib/efi_loader/efi_file.c
index 1fe7cf539e..9233767ee2 100644
--- a/lib/efi_loader/efi_file.c
+++ b/lib/efi_loader/efi_file.c
@@ -11,6 +11,7 @@
 #include <malloc.h>
 #include <mapmem.h>
 #include <fs.h>
+#include <part.h>
 
 /* GUID for file system information */
 const efi_guid_t efi_file_system_info_guid = EFI_FILE_SYSTEM_INFO_GUID;
diff --git a/lib/gunzip.c b/lib/gunzip.c
index 9e6ccd692a..bee3b9261f 100644
--- a/lib/gunzip.c
+++ b/lib/gunzip.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <command.h>
 #include <console.h>
 #include <div64.h>
diff --git a/lib/image-sparse.c b/lib/image-sparse.c
index df623adc58..3170c024f7 100644
--- a/lib/image-sparse.c
+++ b/lib/image-sparse.c
@@ -36,6 +36,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <blk.h>
 #include <image-sparse.h>
 #include <div64.h>
 #include <malloc.h>
diff --git a/test/dm/blk.c b/test/dm/blk.c
index 9c71adc69d..94b2855b8e 100644
--- a/test/dm/blk.c
+++ b/test/dm/blk.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <part.h>
 #include <usb.h>
 #include <asm/state.h>
 #include <dm/test.h>
diff --git a/test/dm/mmc.c b/test/dm/mmc.c
index 9ab0db1b66..49402b9c90 100644
--- a/test/dm/mmc.c
+++ b/test/dm/mmc.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <mmc.h>
+#include <part.h>
 #include <dm/test.h>
 #include <test/ut.h>
 
diff --git a/test/dm/usb.c b/test/dm/usb.c
index e396c2a0ea..a25c2c1482 100644
--- a/test/dm/usb.c
+++ b/test/dm/usb.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <console.h>
 #include <dm.h>
+#include <part.h>
 #include <usb.h>
 #include <asm/io.h>
 #include <asm/state.h>
-- 
2.26.2.645.ge9eca65c58-goog

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH v3 08/22] bootstage: Use BOOTSTAGE instead of BOOTSTATE
  2020-05-10 17:39 [PATCH v3 00/22] common: Further reduce the size of common.h Simon Glass
                   ` (6 preceding siblings ...)
  2020-05-10 17:39 ` [PATCH v3 07/22] common: Drop part.h from common header Simon Glass
@ 2020-05-10 17:39 ` Simon Glass
  2020-05-19 17:32   ` Tom Rini
  2020-05-10 17:40 ` [PATCH v3 09/22] common: Drop bootstage.h from common header Simon Glass
                   ` (14 subsequent siblings)
  22 siblings, 1 reply; 53+ messages in thread
From: Simon Glass @ 2020-05-10 17:39 UTC (permalink / raw)
  To: u-boot

Some of the enum members are wrong. Fix them.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v3: None
Changes in v2: None

 arch/x86/lib/fsp2/fsp_meminit.c      |  4 ++--
 arch/x86/lib/fsp2/fsp_silicon_init.c |  4 ++--
 common/board_f.c                     |  4 ++--
 common/board_r.c                     |  4 ++--
 common/spl/spl.c                     |  4 ++--
 include/bootstage.h                  | 10 +++++-----
 6 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/arch/x86/lib/fsp2/fsp_meminit.c b/arch/x86/lib/fsp2/fsp_meminit.c
index bf30c47989..300be8b093 100644
--- a/arch/x86/lib/fsp2/fsp_meminit.c
+++ b/arch/x86/lib/fsp2/fsp_meminit.c
@@ -79,10 +79,10 @@ int fsp_memory_init(bool s3wake, bool use_spi_flash)
 		return log_msg_ret("Could not setup config", ret);
 
 	debug("SDRAM init...");
-	bootstage_start(BOOTSTATE_ID_ACCUM_FSP_M, "fsp-m");
+	bootstage_start(BOOTSTAGE_ID_ACCUM_FSP_M, "fsp-m");
 	func = (fsp_memory_init_func)(hdr->img_base + hdr->fsp_mem_init);
 	ret = func(&upd, &hob);
-	bootstage_accum(BOOTSTATE_ID_ACCUM_FSP_M);
+	bootstage_accum(BOOTSTAGE_ID_ACCUM_FSP_M);
 	if (ret)
 		return log_msg_ret("SDRAM init fail\n", ret);
 
diff --git a/arch/x86/lib/fsp2/fsp_silicon_init.c b/arch/x86/lib/fsp2/fsp_silicon_init.c
index d7ce43e1eb..66a3cb39f1 100644
--- a/arch/x86/lib/fsp2/fsp_silicon_init.c
+++ b/arch/x86/lib/fsp2/fsp_silicon_init.c
@@ -42,10 +42,10 @@ int fsp_silicon_init(bool s3wake, bool use_spi_flash)
 	if (ret)
 		return log_msg_ret("Could not setup config", ret);
 	log_debug("Silicon init...");
-	bootstage_start(BOOTSTATE_ID_ACCUM_FSP_S, "fsp-s");
+	bootstage_start(BOOTSTAGE_ID_ACCUM_FSP_S, "fsp-s");
 	func = (fsp_silicon_init_func)(hdr->img_base + hdr->fsp_silicon_init);
 	ret = func(&upd);
-	bootstage_accum(BOOTSTATE_ID_ACCUM_FSP_S);
+	bootstage_accum(BOOTSTAGE_ID_ACCUM_FSP_S);
 	if (ret)
 		return log_msg_ret("Silicon init fail\n", ret);
 	log_debug("done\n");
diff --git a/common/board_f.c b/common/board_f.c
index 8dd3c41268..797f1370d8 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -823,9 +823,9 @@ static int initf_dm(void)
 #if defined(CONFIG_DM) && CONFIG_VAL(SYS_MALLOC_F_LEN)
 	int ret;
 
-	bootstage_start(BOOTSTATE_ID_ACCUM_DM_F, "dm_f");
+	bootstage_start(BOOTSTAGE_ID_ACCUM_DM_F, "dm_f");
 	ret = dm_init_and_scan(true);
-	bootstage_accum(BOOTSTATE_ID_ACCUM_DM_F);
+	bootstage_accum(BOOTSTAGE_ID_ACCUM_DM_F);
 	if (ret)
 		return ret;
 #endif
diff --git a/common/board_r.c b/common/board_r.c
index d8c4cfcc78..30082d1acb 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -313,9 +313,9 @@ static int initr_dm(void)
 #ifdef CONFIG_TIMER
 	gd->timer = NULL;
 #endif
-	bootstage_start(BOOTSTATE_ID_ACCUM_DM_R, "dm_r");
+	bootstage_start(BOOTSTAGE_ID_ACCUM_DM_R, "dm_r");
 	ret = dm_init_and_scan(false);
-	bootstage_accum(BOOTSTATE_ID_ACCUM_DM_R);
+	bootstage_accum(BOOTSTAGE_ID_ACCUM_DM_R);
 	if (ret)
 		return ret;
 
diff --git a/common/spl/spl.c b/common/spl/spl.c
index b0f0e1557b..472bb0a5e2 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -423,11 +423,11 @@ static int spl_common_init(bool setup_malloc)
 		}
 	}
 	if (CONFIG_IS_ENABLED(DM)) {
-		bootstage_start(BOOTSTATE_ID_ACCUM_DM_SPL,
+		bootstage_start(BOOTSTAGE_ID_ACCUM_DM_SPL,
 				spl_phase() == PHASE_TPL ? "dm tpl" : "dm_spl");
 		/* With CONFIG_SPL_OF_PLATDATA, bring in all devices */
 		ret = dm_init_and_scan(!CONFIG_IS_ENABLED(OF_PLATDATA));
-		bootstage_accum(BOOTSTATE_ID_ACCUM_DM_SPL);
+		bootstage_accum(BOOTSTAGE_ID_ACCUM_DM_SPL);
 		if (ret) {
 			debug("dm_init_and_scan() returned error %d\n", ret);
 			return ret;
diff --git a/include/bootstage.h b/include/bootstage.h
index 82f0307ef1..f507271375 100644
--- a/include/bootstage.h
+++ b/include/bootstage.h
@@ -199,11 +199,11 @@ enum bootstage_id {
 	BOOTSTAGE_ID_ACCUM_DECOMP,
 	BOOTSTAGE_ID_ACCUM_OF_LIVE,
 	BOOTSTAGE_ID_FPGA_INIT,
-	BOOTSTATE_ID_ACCUM_DM_SPL,
-	BOOTSTATE_ID_ACCUM_DM_F,
-	BOOTSTATE_ID_ACCUM_DM_R,
-	BOOTSTATE_ID_ACCUM_FSP_M,
-	BOOTSTATE_ID_ACCUM_FSP_S,
+	BOOTSTAGE_ID_ACCUM_DM_SPL,
+	BOOTSTAGE_ID_ACCUM_DM_F,
+	BOOTSTAGE_ID_ACCUM_DM_R,
+	BOOTSTAGE_ID_ACCUM_FSP_M,
+	BOOTSTAGE_ID_ACCUM_FSP_S,
 	BOOTSTAGE_ID_ACCUM_MMAP_SPI,
 
 	/* a few spare for the user, from here */
-- 
2.26.2.645.ge9eca65c58-goog

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH v3 09/22] common: Drop bootstage.h from common header
  2020-05-10 17:39 [PATCH v3 00/22] common: Further reduce the size of common.h Simon Glass
                   ` (7 preceding siblings ...)
  2020-05-10 17:39 ` [PATCH v3 08/22] bootstage: Use BOOTSTAGE instead of BOOTSTATE Simon Glass
@ 2020-05-10 17:40 ` Simon Glass
  2020-05-19 17:32   ` Tom Rini
  2020-05-10 17:40 ` [PATCH v3 10/22] common: Drop image.h " Simon Glass
                   ` (13 subsequent siblings)
  22 siblings, 1 reply; 53+ messages in thread
From: Simon Glass @ 2020-05-10 17:40 UTC (permalink / raw)
  To: u-boot

Move this fairly uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v3: None
Changes in v2: None

 arch/arc/lib/bootm.c                    | 3 ++-
 arch/arm/cpu/armv8/generic_timer.c      | 1 +
 arch/arm/lib/bootm.c                    | 1 +
 arch/m68k/lib/bootm.c                   | 1 +
 arch/microblaze/lib/bootm.c             | 1 +
 arch/mips/lib/bootm.c                   | 1 +
 arch/nds32/lib/bootm.c                  | 1 +
 arch/powerpc/lib/bootm.c                | 1 +
 arch/riscv/lib/bootm.c                  | 1 +
 arch/sandbox/cpu/cpu.c                  | 1 +
 arch/sandbox/lib/bootm.c                | 1 +
 arch/x86/cpu/apollolake/fsp_s.c         | 1 +
 arch/x86/cpu/apollolake/spl.c           | 1 +
 arch/x86/cpu/coreboot/timestamp.c       | 1 +
 arch/x86/cpu/cpu.c                      | 1 +
 arch/x86/lib/bootm.c                    | 1 +
 arch/x86/lib/fsp2/fsp_init.c            | 1 +
 arch/x86/lib/fsp2/fsp_meminit.c         | 1 +
 arch/x86/lib/fsp2/fsp_silicon_init.c    | 1 +
 arch/xtensa/lib/bootm.c                 | 1 +
 board/Seagate/dockstar/dockstar.c       | 1 +
 board/Seagate/goflexhome/goflexhome.c   | 1 +
 board/armltd/integrator/integrator.c    | 1 +
 board/armltd/vexpress/vexpress_common.c | 1 +
 board/bosch/shc/board.c                 | 1 +
 board/buffalo/lsxl/lsxl.c               | 1 +
 board/gdsys/p1022/controlcenterd-id.c   | 1 +
 board/st/stv0991/stv0991.c              | 1 +
 board/technexion/tao3530/tao3530.c      | 1 +
 board/ti/beagle/beagle.c                | 1 +
 cmd/bootstage.c                         | 1 +
 cmd/disk.c                              | 1 +
 cmd/nand.c                              | 1 +
 cmd/net.c                               | 1 +
 cmd/usb.c                               | 1 +
 common/board_f.c                        | 1 +
 common/board_r.c                        | 1 +
 common/bootm_os.c                       | 1 +
 common/bootstage.c                      | 1 +
 common/cli.c                            | 1 +
 common/image.c                          | 1 +
 common/init/board_init.c                | 1 +
 common/main.c                           | 1 +
 common/spl/spl.c                        | 1 +
 drivers/pci/pci_rom.c                   | 1 +
 drivers/scsi/scsi.c                     | 1 +
 drivers/spi/ich.c                       | 1 +
 drivers/timer/cadence-ttc.c             | 1 +
 drivers/timer/rockchip_timer.c          | 1 +
 drivers/timer/tsc_timer.c               | 1 +
 drivers/video/broadwell_igd.c           | 1 +
 drivers/video/tegra124/display.c        | 1 +
 env/common.c                            | 1 +
 include/common.h                        | 1 -
 lib/time.c                              | 1 +
 net/bootp.c                             | 1 +
 net/eth-uclass.c                        | 1 +
 net/eth_common.c                        | 1 +
 net/eth_legacy.c                        | 1 +
 net/net.c                               | 1 +
 post/post.c                             | 1 +
 61 files changed, 61 insertions(+), 2 deletions(-)

diff --git a/arch/arc/lib/bootm.c b/arch/arc/lib/bootm.c
index d38c18ef8f..1b08ffe285 100644
--- a/arch/arc/lib/bootm.c
+++ b/arch/arc/lib/bootm.c
@@ -3,9 +3,10 @@
  * Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
  */
 
+#include <common.h>
+#include <bootstage.h>
 #include <irq_func.h>
 #include <asm/cache.h>
-#include <common.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/cpu/armv8/generic_timer.c b/arch/arm/cpu/armv8/generic_timer.c
index 46e63294fe..6fe3ede387 100644
--- a/arch/arm/cpu/armv8/generic_timer.c
+++ b/arch/arm/cpu/armv8/generic_timer.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <command.h>
 #include <time.h>
 #include <asm/system.h>
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index dc845a997f..c189bdcf9a 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -12,6 +12,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <command.h>
 #include <cpu_func.h>
 #include <dm.h>
diff --git a/arch/m68k/lib/bootm.c b/arch/m68k/lib/bootm.c
index 19445b3fc7..fb1170d00d 100644
--- a/arch/m68k/lib/bootm.c
+++ b/arch/m68k/lib/bootm.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <command.h>
 #include <env.h>
 #include <image.h>
diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c
index 87d2d6ee70..f7303b790f 100644
--- a/arch/microblaze/lib/bootm.c
+++ b/arch/microblaze/lib/bootm.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <command.h>
 #include <cpu_func.h>
 #include <env.h>
diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c
index f1db6d23b8..6a6764ac2d 100644
--- a/arch/mips/lib/bootm.c
+++ b/arch/mips/lib/bootm.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <env.h>
 #include <image.h>
 #include <fdt_support.h>
diff --git a/arch/nds32/lib/bootm.c b/arch/nds32/lib/bootm.c
index 1003bc87b9..b17368647d 100644
--- a/arch/nds32/lib/bootm.c
+++ b/arch/nds32/lib/bootm.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <command.h>
 #include <env.h>
 #include <hang.h>
diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c
index 390e8c0673..1cef75c4be 100644
--- a/arch/powerpc/lib/bootm.c
+++ b/arch/powerpc/lib/bootm.c
@@ -8,6 +8,7 @@
 
 
 #include <common.h>
+#include <bootstage.h>
 #include <cpu_func.h>
 #include <env.h>
 #include <init.h>
diff --git a/arch/riscv/lib/bootm.c b/arch/riscv/lib/bootm.c
index 0d06095da1..c24aba1dc9 100644
--- a/arch/riscv/lib/bootm.c
+++ b/arch/riscv/lib/bootm.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <command.h>
 #include <dm.h>
 #include <fdt_support.h>
diff --git a/arch/sandbox/cpu/cpu.c b/arch/sandbox/cpu/cpu.c
index 56ee3f5826..842640c50e 100644
--- a/arch/sandbox/cpu/cpu.c
+++ b/arch/sandbox/cpu/cpu.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <errno.h>
diff --git a/arch/sandbox/lib/bootm.c b/arch/sandbox/lib/bootm.c
index 2de03fb8e0..d38c3164c1 100644
--- a/arch/sandbox/lib/bootm.c
+++ b/arch/sandbox/lib/bootm.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <asm/io.h>
 
 #define	LINUX_ARM_ZIMAGE_MAGIC	0x016f2818
diff --git a/arch/x86/cpu/apollolake/fsp_s.c b/arch/x86/cpu/apollolake/fsp_s.c
index 7ef169b147..fd6e73dfc8 100644
--- a/arch/x86/cpu/apollolake/fsp_s.c
+++ b/arch/x86/cpu/apollolake/fsp_s.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <binman.h>
+#include <bootstage.h>
 #include <dm.h>
 #include <irq.h>
 #include <malloc.h>
diff --git a/arch/x86/cpu/apollolake/spl.c b/arch/x86/cpu/apollolake/spl.c
index d32f2a9898..a555e6c0d3 100644
--- a/arch/x86/cpu/apollolake/spl.c
+++ b/arch/x86/cpu/apollolake/spl.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <binman_sym.h>
+#include <bootstage.h>
 #include <dm.h>
 #include <malloc.h>
 #include <spi.h>
diff --git a/arch/x86/cpu/coreboot/timestamp.c b/arch/x86/cpu/coreboot/timestamp.c
index e8ccaf2212..0162597809 100644
--- a/arch/x86/cpu/coreboot/timestamp.c
+++ b/arch/x86/cpu/coreboot/timestamp.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <asm/arch/timestamp.h>
 #include <asm/arch/sysinfo.h>
 #include <linux/compiler.h>
diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c
index 2e5d0ddd9f..e0f23bb509 100644
--- a/arch/x86/cpu/cpu.c
+++ b/arch/x86/cpu/cpu.c
@@ -19,6 +19,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <command.h>
 #include <cpu_func.h>
 #include <dm.h>
diff --git a/arch/x86/lib/bootm.c b/arch/x86/lib/bootm.c
index 07d8f1f279..0837655e12 100644
--- a/arch/x86/lib/bootm.c
+++ b/arch/x86/lib/bootm.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <command.h>
 #include <hang.h>
 #include <dm/device.h>
diff --git a/arch/x86/lib/fsp2/fsp_init.c b/arch/x86/lib/fsp2/fsp_init.c
index c7dc2ea257..008e8aeb36 100644
--- a/arch/x86/lib/fsp2/fsp_init.c
+++ b/arch/x86/lib/fsp2/fsp_init.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <binman.h>
 #include <binman_sym.h>
+#include <bootstage.h>
 #include <cbfs.h>
 #include <dm.h>
 #include <init.h>
diff --git a/arch/x86/lib/fsp2/fsp_meminit.c b/arch/x86/lib/fsp2/fsp_meminit.c
index 300be8b093..117f36a848 100644
--- a/arch/x86/lib/fsp2/fsp_meminit.c
+++ b/arch/x86/lib/fsp2/fsp_meminit.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <binman.h>
+#include <bootstage.h>
 #include <asm/mrccache.h>
 #include <asm/fsp/fsp_infoheader.h>
 #include <asm/fsp2/fsp_api.h>
diff --git a/arch/x86/lib/fsp2/fsp_silicon_init.c b/arch/x86/lib/fsp2/fsp_silicon_init.c
index 66a3cb39f1..28c15a22a2 100644
--- a/arch/x86/lib/fsp2/fsp_silicon_init.c
+++ b/arch/x86/lib/fsp2/fsp_silicon_init.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <binman.h>
+#include <bootstage.h>
 #include <dm.h>
 #include <asm/arch/fsp/fsp_configs.h>
 #include <asm/arch/fsp/fsp_s_upd.h>
diff --git a/arch/xtensa/lib/bootm.c b/arch/xtensa/lib/bootm.c
index 057b229433..458eaf95c0 100644
--- a/arch/xtensa/lib/bootm.c
+++ b/arch/xtensa/lib/bootm.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <command.h>
 #include <cpu_func.h>
 #include <env.h>
diff --git a/board/Seagate/dockstar/dockstar.c b/board/Seagate/dockstar/dockstar.c
index 5a8c6e282b..0ff8a9053e 100644
--- a/board/Seagate/dockstar/dockstar.c
+++ b/board/Seagate/dockstar/dockstar.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <miiphy.h>
 #include <net.h>
 #include <asm/arch/soc.h>
diff --git a/board/Seagate/goflexhome/goflexhome.c b/board/Seagate/goflexhome/goflexhome.c
index 1e4477aa5f..fd2f0df371 100644
--- a/board/Seagate/goflexhome/goflexhome.c
+++ b/board/Seagate/goflexhome/goflexhome.c
@@ -12,6 +12,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <miiphy.h>
 #include <net.h>
 #include <asm/mach-types.h>
diff --git a/board/armltd/integrator/integrator.c b/board/armltd/integrator/integrator.c
index 32e4933d20..ac6462d7ff 100644
--- a/board/armltd/integrator/integrator.c
+++ b/board/armltd/integrator/integrator.c
@@ -17,6 +17,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <env.h>
diff --git a/board/armltd/vexpress/vexpress_common.c b/board/armltd/vexpress/vexpress_common.c
index ebd3322c6f..9dc26b949e 100644
--- a/board/armltd/vexpress/vexpress_common.c
+++ b/board/armltd/vexpress/vexpress_common.c
@@ -16,6 +16,7 @@
  * Philippe Robin, <philippe.robin@arm.com>
  */
 #include <common.h>
+#include <bootstage.h>
 #include <cpu_func.h>
 #include <init.h>
 #include <malloc.h>
diff --git a/board/bosch/shc/board.c b/board/bosch/shc/board.c
index 9698d8ee16..6e0ad4b53f 100644
--- a/board/bosch/shc/board.c
+++ b/board/bosch/shc/board.c
@@ -12,6 +12,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <cpu_func.h>
 #include <env.h>
 #include <errno.h>
diff --git a/board/buffalo/lsxl/lsxl.c b/board/buffalo/lsxl/lsxl.c
index aa641259ac..56a2c29e4c 100644
--- a/board/buffalo/lsxl/lsxl.c
+++ b/board/buffalo/lsxl/lsxl.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <env.h>
 #include <env_internal.h>
 #include <flash.h>
diff --git a/board/gdsys/p1022/controlcenterd-id.c b/board/gdsys/p1022/controlcenterd-id.c
index ad56dd7d01..3da5005f40 100644
--- a/board/gdsys/p1022/controlcenterd-id.c
+++ b/board/gdsys/p1022/controlcenterd-id.c
@@ -11,6 +11,7 @@
 #endif
 
 #include <common.h>
+#include <bootstage.h>
 #include <command.h>
 #include <dm.h>
 #include <env.h>
diff --git a/board/st/stv0991/stv0991.c b/board/st/stv0991/stv0991.c
index f193e83361..fbcb87092b 100644
--- a/board/st/stv0991/stv0991.c
+++ b/board/st/stv0991/stv0991.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <dm.h>
 #include <miiphy.h>
 #include <net.h>
diff --git a/board/technexion/tao3530/tao3530.c b/board/technexion/tao3530/tao3530.c
index 7d7c427392..b604ee951b 100644
--- a/board/technexion/tao3530/tao3530.c
+++ b/board/technexion/tao3530/tao3530.c
@@ -4,6 +4,7 @@
  *      Tapani Utriainen <linuxfae@technexion.com>
  */
 #include <common.h>
+#include <bootstage.h>
 #include <malloc.h>
 #include <netdev.h>
 #include <twl4030.h>
diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
index cb3a12ec37..439b023da8 100644
--- a/board/ti/beagle/beagle.c
+++ b/board/ti/beagle/beagle.c
@@ -13,6 +13,7 @@
  *
  */
 #include <common.h>
+#include <bootstage.h>
 #include <dm.h>
 #include <env.h>
 #include <net.h>
diff --git a/cmd/bootstage.c b/cmd/bootstage.c
index ed0b0ff1fc..f1ea4e9598 100644
--- a/cmd/bootstage.c
+++ b/cmd/bootstage.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 
 static int do_bootstage_report(cmd_tbl_t *cmdtp, int flag, int argc,
 			       char * const argv[])
diff --git a/cmd/disk.c b/cmd/disk.c
index 9e008a3889..da0660148c 100644
--- a/cmd/disk.c
+++ b/cmd/disk.c
@@ -4,6 +4,7 @@
  * Wolfgang Denk, DENX Software Engineering, wd at denx.de.
  */
 #include <common.h>
+#include <bootstage.h>
 #include <command.h>
 #include <cpu_func.h>
 #include <image.h>
diff --git a/cmd/nand.c b/cmd/nand.c
index 9c2b5d718e..c42ab24ec0 100644
--- a/cmd/nand.c
+++ b/cmd/nand.c
@@ -20,6 +20,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <image.h>
 #include <asm/cache.h>
 #include <linux/mtd/mtd.h>
diff --git a/cmd/net.c b/cmd/net.c
index 1b724cc570..282b38ccf9 100644
--- a/cmd/net.c
+++ b/cmd/net.c
@@ -8,6 +8,7 @@
  * Boot support
  */
 #include <common.h>
+#include <bootstage.h>
 #include <command.h>
 #include <env.h>
 #include <image.h>
diff --git a/cmd/usb.c b/cmd/usb.c
index 98fa300dfe..858be726a4 100644
--- a/cmd/usb.c
+++ b/cmd/usb.c
@@ -12,6 +12,7 @@
 
 #include <common.h>
 #include <blk.h>
+#include <bootstage.h>
 #include <command.h>
 #include <console.h>
 #include <dm.h>
diff --git a/common/board_f.c b/common/board_f.c
index 797f1370d8..b2f062e2aa 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <bloblist.h>
+#include <bootstage.h>
 #include <clock_legacy.h>
 #include <console.h>
 #include <cpu.h>
diff --git a/common/board_r.c b/common/board_r.c
index 30082d1acb..a47b60a7a9 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <api.h>
+#include <bootstage.h>
 #include <cpu_func.h>
 #include <exports.h>
 #include <flash.h>
diff --git a/common/bootm_os.c b/common/bootm_os.c
index 1d58462509..44023532e1 100644
--- a/common/bootm_os.c
+++ b/common/bootm_os.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <bootm.h>
+#include <bootstage.h>
 #include <cpu_func.h>
 #include <efi_loader.h>
 #include <env.h>
diff --git a/common/bootstage.c b/common/bootstage.c
index d2ed33663b..817f85a7fe 100644
--- a/common/bootstage.c
+++ b/common/bootstage.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <hang.h>
 #include <malloc.h>
 #include <sort.h>
diff --git a/common/cli.c b/common/cli.c
index 38bba17585..e5e5894b2f 100644
--- a/common/cli.c
+++ b/common/cli.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <cli.h>
 #include <cli_hush.h>
 #include <command.h>
diff --git a/common/image.c b/common/image.c
index 14e27fbe3c..20fa4bd497 100644
--- a/common/image.c
+++ b/common/image.c
@@ -8,6 +8,7 @@
 
 #ifndef USE_HOSTCC
 #include <common.h>
+#include <bootstage.h>
 #include <cpu_func.h>
 #include <env.h>
 #include <malloc.h>
diff --git a/common/init/board_init.c b/common/init/board_init.c
index f7c8a173ff..4c4f0ced53 100644
--- a/common/init/board_init.c
+++ b/common/init/board_init.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/common/main.c b/common/main.c
index 64287f7dee..4b3cd302c3 100644
--- a/common/main.c
+++ b/common/main.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <autoboot.h>
+#include <bootstage.h>
 #include <cli.h>
 #include <command.h>
 #include <console.h>
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 472bb0a5e2..ab62b8b79e 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <bloblist.h>
 #include <binman_sym.h>
+#include <bootstage.h>
 #include <dm.h>
 #include <handoff.h>
 #include <hang.h>
diff --git a/drivers/pci/pci_rom.c b/drivers/pci/pci_rom.c
index 6b17f18bc0..2f3d40c227 100644
--- a/drivers/pci/pci_rom.c
+++ b/drivers/pci/pci_rom.c
@@ -24,6 +24,7 @@
 
 #include <common.h>
 #include <bios_emul.h>
+#include <bootstage.h>
 #include <dm.h>
 #include <errno.h>
 #include <init.h>
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 849c42f0cd..949e364e78 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <blk.h>
+#include <bootstage.h>
 #include <dm.h>
 #include <env.h>
 #include <part.h>
diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c
index a9d7715a55..990a5ffa51 100644
--- a/drivers/spi/ich.c
+++ b/drivers/spi/ich.c
@@ -8,6 +8,7 @@
 #define LOG_CATEGORY	UCLASS_SPI
 
 #include <common.h>
+#include <bootstage.h>
 #include <div64.h>
 #include <dm.h>
 #include <dt-structs.h>
diff --git a/drivers/timer/cadence-ttc.c b/drivers/timer/cadence-ttc.c
index ed48a145f2..4837b0645b 100644
--- a/drivers/timer/cadence-ttc.c
+++ b/drivers/timer/cadence-ttc.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <dm.h>
 #include <errno.h>
 #include <timer.h>
diff --git a/drivers/timer/rockchip_timer.c b/drivers/timer/rockchip_timer.c
index 54956e557a..0cbdc279a5 100644
--- a/drivers/timer/rockchip_timer.c
+++ b/drivers/timer/rockchip_timer.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <dm.h>
 #include <dm/ofnode.h>
 #include <mapmem.h>
diff --git a/drivers/timer/tsc_timer.c b/drivers/timer/tsc_timer.c
index 43cb2d820e..04596ff117 100644
--- a/drivers/timer/tsc_timer.c
+++ b/drivers/timer/tsc_timer.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <dm.h>
 #include <malloc.h>
 #include <time.h>
diff --git a/drivers/video/broadwell_igd.c b/drivers/video/broadwell_igd.c
index c23421d25b..86c4c10b38 100644
--- a/drivers/video/broadwell_igd.c
+++ b/drivers/video/broadwell_igd.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <bios_emul.h>
+#include <bootstage.h>
 #include <dm.h>
 #include <init.h>
 #include <vbe.h>
diff --git a/drivers/video/tegra124/display.c b/drivers/video/tegra124/display.c
index 913beab4d4..a552f38cd0 100644
--- a/drivers/video/tegra124/display.c
+++ b/drivers/video/tegra124/display.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <dm.h>
 #include <edid.h>
 #include <errno.h>
diff --git a/env/common.c b/env/common.c
index 1fd1bd01d3..0256b3e356 100644
--- a/env/common.c
+++ b/env/common.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <command.h>
 #include <env.h>
 #include <env_internal.h>
diff --git a/include/common.h b/include/common.h
index 85a211554a..fd3e2de4cc 100644
--- a/include/common.h
+++ b/include/common.h
@@ -35,7 +35,6 @@
 #include <init.h>
 #include <display_options.h>
 #include <vsprintf.h>
-#include <bootstage.h>
 #endif	/* __ASSEMBLY__ */
 
 /* Pull in stuff for the build system */
diff --git a/lib/time.c b/lib/time.c
index 75de48f900..1395f28715 100644
--- a/lib/time.c
+++ b/lib/time.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <dm.h>
 #include <errno.h>
 #include <time.h>
diff --git a/net/bootp.c b/net/bootp.c
index 2c918d8379..05bfede14a 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <command.h>
 #include <env.h>
 #include <efi_loader.h>
diff --git a/net/eth-uclass.c b/net/eth-uclass.c
index 8bf2eabe90..c4baf1c3a5 100644
--- a/net/eth-uclass.c
+++ b/net/eth-uclass.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <dm.h>
 #include <env.h>
 #include <net.h>
diff --git a/net/eth_common.c b/net/eth_common.c
index ed26b1b693..58f899a024 100644
--- a/net/eth_common.c
+++ b/net/eth_common.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <dm.h>
 #include <env.h>
 #include <miiphy.h>
diff --git a/net/eth_legacy.c b/net/eth_legacy.c
index 5d6b0d7d7f..e0ef4a11a7 100644
--- a/net/eth_legacy.c
+++ b/net/eth_legacy.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <command.h>
 #include <env.h>
 #include <net.h>
diff --git a/net/net.c b/net/net.c
index 087d399a24..035293537b 100644
--- a/net/net.c
+++ b/net/net.c
@@ -88,6 +88,7 @@
 
 
 #include <common.h>
+#include <bootstage.h>
 #include <command.h>
 #include <console.h>
 #include <env.h>
diff --git a/post/post.c b/post/post.c
index 696a60f70a..0f977fe245 100644
--- a/post/post.c
+++ b/post/post.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <env.h>
 #include <malloc.h>
 #include <stdio_dev.h>
-- 
2.26.2.645.ge9eca65c58-goog

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH v3 10/22] common: Drop image.h from common header
  2020-05-10 17:39 [PATCH v3 00/22] common: Further reduce the size of common.h Simon Glass
                   ` (8 preceding siblings ...)
  2020-05-10 17:40 ` [PATCH v3 09/22] common: Drop bootstage.h from common header Simon Glass
@ 2020-05-10 17:40 ` Simon Glass
  2020-05-19 17:32   ` Tom Rini
  2020-05-10 17:40 ` [PATCH v3 11/22] common: Drop init.h " Simon Glass
                   ` (12 subsequent siblings)
  22 siblings, 1 reply; 53+ messages in thread
From: Simon Glass @ 2020-05-10 17:40 UTC (permalink / raw)
  To: u-boot

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v3: None
Changes in v2: None

 arch/arc/lib/bootm.c                             | 2 ++
 arch/arm/cpu/armv8/fsl-layerscape/ls1028_ids.c   | 1 +
 arch/arm/cpu/armv8/fsl-layerscape/mp.c           | 1 +
 arch/arm/cpu/armv8/fsl-layerscape/spl.c          | 1 +
 arch/arm/cpu/armv8/sec_firmware.c                | 2 ++
 arch/arm/lib/bootm.c                             | 1 +
 arch/arm/lib/image.c                             | 1 +
 arch/arm/lib/zimage.c                            | 1 +
 arch/arm/mach-imx/misc.c                         | 1 +
 arch/arm/mach-k3/common.c                        | 1 +
 arch/arm/mach-k3/security.c                      | 1 +
 arch/arm/mach-k3/sysfw-loader.c                  | 1 +
 arch/arm/mach-keystone/mon.c                     | 1 +
 arch/arm/mach-rockchip/misc.c                    | 1 +
 arch/arm/mach-rockchip/rk3399/rk3399.c           | 1 +
 arch/arm/mach-rockchip/spl.c                     | 1 +
 arch/arm/mach-sunxi/spl_spi_sunxi.c              | 1 +
 arch/arm/mach-zynq/spl.c                         | 1 +
 arch/arm/mach-zynqmp/spl.c                       | 1 +
 arch/m68k/lib/bootm.c                            | 1 +
 arch/microblaze/lib/bootm.c                      | 1 +
 arch/mips/lib/bootm.c                            | 1 +
 arch/mips/mach-jz47xx/jz4780/jz4780.c            | 1 +
 arch/nds32/include/asm/u-boot-nds32.h            | 2 ++
 arch/nios2/lib/bootm.c                           | 1 +
 arch/powerpc/include/asm/fsl_i2c.h               | 1 +
 arch/powerpc/lib/bootm.c                         | 1 +
 arch/riscv/lib/image.c                           | 1 +
 arch/sandbox/lib/bootm.c                         | 1 +
 arch/sh/lib/bootm.c                              | 1 +
 arch/x86/cpu/apollolake/spl.c                    | 1 +
 arch/x86/lib/spl.c                               | 1 +
 arch/x86/lib/tpl.c                               | 1 +
 board/AndesTech/ax25-ae350/ax25-ae350.c          | 1 +
 board/Arcturus/ucp1020/ucp1020.c                 | 1 +
 board/advantech/imx8qm_rom7720_a1/spl.c          | 1 +
 board/aristainetos/aristainetos.c                | 1 +
 board/dhelectronics/dh_imx6/dh_imx6.c            | 1 +
 board/emulation/qemu-riscv/qemu-riscv.c          | 1 +
 board/engicam/common/spl.c                       | 1 +
 board/freescale/b4860qds/b4860qds.c              | 1 +
 board/freescale/bsc9131rdb/bsc9131rdb.c          | 1 +
 board/freescale/bsc9132qds/bsc9132qds.c          | 1 +
 board/freescale/c29xpcie/c29xpcie.c              | 1 +
 board/freescale/corenet_ds/corenet_ds.c          | 1 +
 board/freescale/corenet_ds/eth_p4080.c           | 1 +
 board/freescale/imx8mm_evk/spl.c                 | 1 +
 board/freescale/imx8mn_evk/spl.c                 | 1 +
 board/freescale/imx8mp_evk/spl.c                 | 1 +
 board/freescale/imx8mq_evk/spl.c                 | 1 +
 board/freescale/imx8qm_mek/spl.c                 | 1 +
 board/freescale/imx8qxp_mek/spl.c                | 1 +
 board/freescale/ls1046afrwy/eth.c                | 1 +
 board/freescale/ls1046ardb/eth.c                 | 1 +
 board/freescale/lx2160a/eth_lx2160aqds.c         | 2 ++
 board/freescale/lx2160a/eth_lx2160ardb.c         | 1 +
 board/freescale/mpc8572ds/mpc8572ds.c            | 1 +
 board/freescale/mx6sabreauto/mx6sabreauto.c      | 1 +
 board/freescale/mx6sabresd/mx6sabresd.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/eth_t102xqds.c          | 1 +
 board/freescale/t102xqds/t102xqds.c              | 1 +
 board/freescale/t102xrdb/eth_t102xrdb.c          | 1 +
 board/freescale/t102xrdb/t102xrdb.c              | 1 +
 board/freescale/t1040qds/eth.c                   | 1 +
 board/freescale/t1040qds/t1040qds.c              | 1 +
 board/freescale/t104xrdb/t104xrdb.c              | 1 +
 board/freescale/t208xqds/eth_t208xqds.c          | 2 ++
 board/freescale/t208xqds/t208xqds.c              | 1 +
 board/freescale/t208xrdb/eth_t208xrdb.c          | 1 +
 board/freescale/t208xrdb/t208xrdb.c              | 1 +
 board/freescale/t4qds/eth.c                      | 2 ++
 board/freescale/t4qds/t4240emu.c                 | 1 +
 board/freescale/t4qds/t4240qds.c                 | 1 +
 board/freescale/t4rdb/eth.c                      | 1 +
 board/freescale/t4rdb/t4240rdb.c                 | 1 +
 board/gateworks/gw_ventana/gw_ventana.c          | 1 +
 board/gdsys/p1022/controlcenterd.c               | 1 +
 board/ge/bx50v3/bx50v3.c                         | 1 +
 board/highbank/highbank.c                        | 1 +
 board/keymile/kmp204x/kmp204x.c                  | 1 +
 board/liebherr/display5/display5.c               | 1 +
 board/liebherr/display5/spl.c                    | 1 +
 board/liebherr/mccmon6/spl.c                     | 1 +
 board/liebherr/xea/xea.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/renesas/rcar-common/common.c               | 1 +
 board/renesas/rcar-common/gen3-spl.c             | 1 +
 board/renesas/salvator-x/salvator-x.c            | 1 +
 board/renesas/ulcb/ulcb.c                        | 1 +
 board/solidrun/mx6cuboxi/mx6cuboxi.c             | 1 +
 board/st/stm32mp1/stm32mp1.c                     | 1 +
 board/sunxi/board.c                              | 1 +
 board/synopsys/hsdk/hsdk.c                       | 1 +
 board/technexion/pico-imx6/spl.c                 | 1 +
 board/ti/am335x/board.c                          | 1 +
 board/ti/am43xx/board.c                          | 1 +
 board/ti/am57xx/board.c                          | 1 +
 board/ti/am65x/evm.c                             | 2 ++
 board/ti/dra7xx/evm.c                            | 1 +
 board/ti/j721e/evm.c                             | 2 ++
 board/ti/ks2_evm/board.c                         | 1 +
 board/ti/ks2_evm/board_k2e.c                     | 1 +
 board/ti/ks2_evm/board_k2g.c                     | 1 +
 board/ti/ks2_evm/board_k2hk.c                    | 1 +
 board/ti/ks2_evm/board_k2l.c                     | 1 +
 board/toradex/apalis_imx6/apalis_imx6.c          | 1 +
 board/toradex/verdin-imx8mm/spl.c                | 1 +
 board/tqc/tqma6/tqma6.c                          | 1 +
 board/varisys/cyrus/cyrus.c                      | 1 +
 board/wandboard/wandboard.c                      | 1 +
 cmd/abootimg.c                                   | 1 +
 cmd/bootefi.c                                    | 1 +
 cmd/fdt.c                                        | 1 +
 cmd/fpga.c                                       | 1 +
 cmd/md5sum.c                                     | 1 +
 cmd/spl.c                                        | 1 +
 common/bootm_os.c                                | 2 ++
 common/fdt_region.c                              | 1 +
 common/hash.c                                    | 2 +-
 common/image-fdt.c                               | 1 +
 common/image-fit.c                               | 1 +
 common/image-sig.c                               | 2 ++
 common/image.c                                   | 1 +
 common/spl/spl_atf.c                             | 1 +
 common/spl/spl_legacy.c                          | 1 +
 common/spl/spl_nand.c                            | 2 ++
 common/spl/spl_net.c                             | 1 +
 common/spl/spl_nor.c                             | 1 +
 common/spl/spl_onenand.c                         | 1 +
 common/spl/spl_opensbi.c                         | 2 ++
 common/spl/spl_ram.c                             | 1 +
 common/spl/spl_spi.c                             | 1 +
 common/spl/spl_ubi.c                             | 1 +
 common/spl/spl_xip.c                             | 1 +
 common/spl/spl_ymodem.c                          | 1 +
 drivers/fastboot/fb_mmc.c                        | 1 +
 drivers/fpga/socfpga_arria10.c                   | 1 +
 drivers/i2c/muxes/i2c-mux-gpio.c                 | 1 +
 drivers/net/fm/fdt.c                             | 1 +
 drivers/net/fm/init.c                            | 1 +
 drivers/net/fsl-mc/mc.c                          | 1 +
 drivers/net/fsl_enetc.c                          | 1 +
 drivers/net/mvpp2.c                              | 1 +
 drivers/net/pfe_eth/pfe_firmware.c               | 1 +
 drivers/net/ti/keystone_net.c                    | 1 +
 drivers/phy/marvell/comphy_core.c                | 3 ++-
 drivers/pinctrl/meson/pinctrl-meson.c            | 1 +
 drivers/pinctrl/mvebu/pinctrl-armada-37xx.c      | 1 +
 drivers/pinctrl/pinctrl-sti.c                    | 1 +
 drivers/pinctrl/pinctrl_stm32.c                  | 1 +
 drivers/pinctrl/rockchip/pinctrl-rockchip-core.c | 1 +
 drivers/spi/fsl_qspi.c                           | 3 +++
 drivers/thermal/imx_scu_thermal.c                | 1 +
 include/asm-generic/u-boot.h                     | 1 +
 include/common.h                                 | 1 -
 include/tee/optee.h                              | 7 +++++--
 include/vxworks.h                                | 6 ++++--
 lib/lmb.c                                        | 1 +
 net/tftp.c                                       | 1 +
 test/compression.c                               | 1 +
 test/overlay/cmd_ut_overlay.c                    | 1 +
 tools/imx8image.c                                | 1 +
 172 files changed, 193 insertions(+), 7 deletions(-)

diff --git a/arch/arc/lib/bootm.c b/arch/arc/lib/bootm.c
index 1b08ffe285..9fa6aaf3b2 100644
--- a/arch/arc/lib/bootm.c
+++ b/arch/arc/lib/bootm.c
@@ -5,7 +5,9 @@
 
 #include <common.h>
 #include <bootstage.h>
+#include <image.h>
 #include <irq_func.h>
+#include <lmb.h>
 #include <asm/cache.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/ls1028_ids.c b/arch/arm/cpu/armv8/fsl-layerscape/ls1028_ids.c
index 8110412da6..e73689ce26 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/ls1028_ids.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/ls1028_ids.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <asm/arch-fsl-layerscape/immap_lsch3.h>
 #include <asm/arch-fsl-layerscape/fsl_icid.h>
 #include <asm/arch-fsl-layerscape/fsl_portals.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/mp.c b/arch/arm/cpu/armv8/fsl-layerscape/mp.c
index 4e779dde1d..4ef2a30278 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/mp.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/mp.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <image.h>
 #include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/system.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/spl.c b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
index 2c0ce80c0c..c0201341ea 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/spl.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
@@ -7,6 +7,7 @@
 #include <clock_legacy.h>
 #include <cpu_func.h>
 #include <env.h>
+#include <image.h>
 #include <spl.h>
 #include <asm/cache.h>
 #include <asm/io.h>
diff --git a/arch/arm/cpu/armv8/sec_firmware.c b/arch/arm/cpu/armv8/sec_firmware.c
index 36f40a4015..c7445e647e 100644
--- a/arch/arm/cpu/armv8/sec_firmware.c
+++ b/arch/arm/cpu/armv8/sec_firmware.c
@@ -6,6 +6,8 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <errno.h>
+#include <fdt_support.h>
+#include <image.h>
 #include <asm/cache.h>
 #include <linux/kernel.h>
 #include <asm/io.h>
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index c189bdcf9a..68beea2c9d 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -17,6 +17,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <hang.h>
+#include <lmb.h>
 #include <dm/root.h>
 #include <env.h>
 #include <image.h>
diff --git a/arch/arm/lib/image.c b/arch/arm/lib/image.c
index 699bf44e70..9cf4a67406 100644
--- a/arch/arm/lib/image.c
+++ b/arch/arm/lib/image.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <image.h>
 #include <mapmem.h>
 #include <linux/sizes.h>
 
diff --git a/arch/arm/lib/zimage.c b/arch/arm/lib/zimage.c
index 49305299b3..477ea94997 100644
--- a/arch/arm/lib/zimage.c
+++ b/arch/arm/lib/zimage.c
@@ -7,6 +7,7 @@
  * Copyright (C) 2012 Marek Vasut <marek.vasut@gmail.com>
  */
 #include <common.h>
+#include <image.h>
 
 #define	LINUX_ARM_ZIMAGE_MAGIC	0x016f2818
 #define	BAREBOX_IMAGE_MAGIC	0x00786f62
diff --git a/arch/arm/mach-imx/misc.c b/arch/arm/mach-imx/misc.c
index 31e95a9a28..6744fbda46 100644
--- a/arch/arm/mach-imx/misc.c
+++ b/arch/arm/mach-imx/misc.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <lmb.h>
 #include <asm/arch/sys_proto.h>
 #include <linux/errno.h>
 #include <asm/io.h>
diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c
index 33273b8eff..af1020be95 100644
--- a/arch/arm/mach-k3/common.c
+++ b/arch/arm/mach-k3/common.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <image.h>
 #include <spl.h>
 #include "common.h"
 #include <dm.h>
diff --git a/arch/arm/mach-k3/security.c b/arch/arm/mach-k3/security.c
index dd7c998487..256b0526f2 100644
--- a/arch/arm/mach-k3/security.c
+++ b/arch/arm/mach-k3/security.c
@@ -10,6 +10,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <hang.h>
+#include <image.h>
 #include <asm/cache.h>
 #include <linux/soc/ti/ti_sci_protocol.h>
 #include <mach/spl.h>
diff --git a/arch/arm/mach-k3/sysfw-loader.c b/arch/arm/mach-k3/sysfw-loader.c
index 6d54b65f08..472b5085ed 100644
--- a/arch/arm/mach-k3/sysfw-loader.c
+++ b/arch/arm/mach-k3/sysfw-loader.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <image.h>
 #include <spl.h>
 #include <malloc.h>
 #include <remoteproc.h>
diff --git a/arch/arm/mach-keystone/mon.c b/arch/arm/mach-keystone/mon.c
index b7de9ba099..58995d73ac 100644
--- a/arch/arm/mach-keystone/mon.c
+++ b/arch/arm/mach-keystone/mon.c
@@ -6,6 +6,7 @@
  */
 
 #include <hang.h>
+#include <image.h>
 #include <asm/unaligned.h>
 #include <common.h>
 #include <command.h>
diff --git a/arch/arm/mach-rockchip/misc.c b/arch/arm/mach-rockchip/misc.c
index 6dbb9bde48..17066bcf8b 100644
--- a/arch/arm/mach-rockchip/misc.c
+++ b/arch/arm/mach-rockchip/misc.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <env.h>
 #include <dm.h>
+#include <hash.h>
 #include <dm/uclass-internal.h>
 #include <misc.h>
 #include <u-boot/crc.h>
diff --git a/arch/arm/mach-rockchip/rk3399/rk3399.c b/arch/arm/mach-rockchip/rk3399/rk3399.c
index dafa142824..3a51194108 100644
--- a/arch/arm/mach-rockchip/rk3399/rk3399.c
+++ b/arch/arm/mach-rockchip/rk3399/rk3399.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <spl.h>
 #include <spl_gpio.h>
 #include <syscon.h>
diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c
index 0b76af6080..2796e41369 100644
--- a/arch/arm/mach-rockchip/spl.c
+++ b/arch/arm/mach-rockchip/spl.c
@@ -7,6 +7,7 @@
 #include <debug_uart.h>
 #include <dm.h>
 #include <hang.h>
+#include <image.h>
 #include <ram.h>
 #include <spl.h>
 #include <asm/arch-rockchip/bootrom.h>
diff --git a/arch/arm/mach-sunxi/spl_spi_sunxi.c b/arch/arm/mach-sunxi/spl_spi_sunxi.c
index a3997b2590..612942025b 100644
--- a/arch/arm/mach-sunxi/spl_spi_sunxi.c
+++ b/arch/arm/mach-sunxi/spl_spi_sunxi.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <image.h>
 #include <spl.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
diff --git a/arch/arm/mach-zynq/spl.c b/arch/arm/mach-zynq/spl.c
index 02a7dc9854..627c84ceba 100644
--- a/arch/arm/mach-zynq/spl.c
+++ b/arch/arm/mach-zynq/spl.c
@@ -5,6 +5,7 @@
 #include <common.h>
 #include <debug_uart.h>
 #include <hang.h>
+#include <image.h>
 #include <spl.h>
 #include <generated/dt.h>
 
diff --git a/arch/arm/mach-zynqmp/spl.c b/arch/arm/mach-zynqmp/spl.c
index 68df0a79c4..35dbff01bd 100644
--- a/arch/arm/mach-zynqmp/spl.c
+++ b/arch/arm/mach-zynqmp/spl.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <image.h>
 #include <init.h>
 #include <spl.h>
 
diff --git a/arch/m68k/lib/bootm.c b/arch/m68k/lib/bootm.c
index fb1170d00d..c36ee79c92 100644
--- a/arch/m68k/lib/bootm.c
+++ b/arch/m68k/lib/bootm.c
@@ -9,6 +9,7 @@
 #include <command.h>
 #include <env.h>
 #include <image.h>
+#include <lmb.h>
 #include <u-boot/zlib.h>
 #include <bzlib.h>
 #include <watchdog.h>
diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c
index f7303b790f..592ac97f82 100644
--- a/arch/microblaze/lib/bootm.c
+++ b/arch/microblaze/lib/bootm.c
@@ -15,6 +15,7 @@
 #include <fdt_support.h>
 #include <hang.h>
 #include <image.h>
+#include <lmb.h>
 #include <asm/cache.h>
 #include <u-boot/zlib.h>
 #include <asm/byteorder.h>
diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c
index 6a6764ac2d..ce2b076b7d 100644
--- a/arch/mips/lib/bootm.c
+++ b/arch/mips/lib/bootm.c
@@ -9,6 +9,7 @@
 #include <env.h>
 #include <image.h>
 #include <fdt_support.h>
+#include <lmb.h>
 #include <asm/addrspace.h>
 #include <asm/io.h>
 
diff --git a/arch/mips/mach-jz47xx/jz4780/jz4780.c b/arch/mips/mach-jz47xx/jz4780/jz4780.c
index 015840de25..26fcfc842c 100644
--- a/arch/mips/mach-jz47xx/jz4780/jz4780.c
+++ b/arch/mips/mach-jz47xx/jz4780/jz4780.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <hang.h>
+#include <image.h>
 #include <init.h>
 #include <asm/io.h>
 #include <asm/sections.h>
diff --git a/arch/nds32/include/asm/u-boot-nds32.h b/arch/nds32/include/asm/u-boot-nds32.h
index 7d39320c15..f086f34729 100644
--- a/arch/nds32/include/asm/u-boot-nds32.h
+++ b/arch/nds32/include/asm/u-boot-nds32.h
@@ -12,6 +12,8 @@
 #ifndef _U_BOOT_NDS32_H_
 #define _U_BOOT_NDS32_H_	1
 
+#include <linux/types.h>
+
 /* for the following variables, see start.S */
 extern ulong IRQ_STACK_START;	/* top of IRQ stack */
 extern ulong FIQ_STACK_START;	/* top of FIQ stack */
diff --git a/arch/nios2/lib/bootm.c b/arch/nios2/lib/bootm.c
index e1891617c7..bec18fe28f 100644
--- a/arch/nios2/lib/bootm.c
+++ b/arch/nios2/lib/bootm.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <image.h>
 #include <irq_func.h>
 
 #define NIOS_MAGIC 0x534f494e /* enable command line and initrd passing */
diff --git a/arch/powerpc/include/asm/fsl_i2c.h b/arch/powerpc/include/asm/fsl_i2c.h
index fbf32b9a07..73105fa8e4 100644
--- a/arch/powerpc/include/asm/fsl_i2c.h
+++ b/arch/powerpc/include/asm/fsl_i2c.h
@@ -14,6 +14,7 @@
 #define _ASM_FSL_I2C_H_
 
 #include <asm/types.h>
+#include <linux/compiler.h>
 
 typedef struct fsl_i2c_base {
 
diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c
index 1cef75c4be..8aec8c9fd3 100644
--- a/arch/powerpc/lib/bootm.c
+++ b/arch/powerpc/lib/bootm.c
@@ -12,6 +12,7 @@
 #include <cpu_func.h>
 #include <env.h>
 #include <init.h>
+#include <lmb.h>
 #include <watchdog.h>
 #include <command.h>
 #include <image.h>
diff --git a/arch/riscv/lib/image.c b/arch/riscv/lib/image.c
index 7357d3b07d..91b7f1624e 100644
--- a/arch/riscv/lib/image.c
+++ b/arch/riscv/lib/image.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <image.h>
 #include <mapmem.h>
 #include <errno.h>
 #include <linux/sizes.h>
diff --git a/arch/sandbox/lib/bootm.c b/arch/sandbox/lib/bootm.c
index d38c3164c1..d1d460b84a 100644
--- a/arch/sandbox/lib/bootm.c
+++ b/arch/sandbox/lib/bootm.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <bootstage.h>
+#include <image.h>
 #include <asm/io.h>
 
 #define	LINUX_ARM_ZIMAGE_MAGIC	0x016f2818
diff --git a/arch/sh/lib/bootm.c b/arch/sh/lib/bootm.c
index 2896e45f0d..5f14a04ab4 100644
--- a/arch/sh/lib/bootm.c
+++ b/arch/sh/lib/bootm.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <image.h>
 #include <asm/byteorder.h>
 #include <asm/zimage.h>
 
diff --git a/arch/x86/cpu/apollolake/spl.c b/arch/x86/cpu/apollolake/spl.c
index a555e6c0d3..1cf7cebff5 100644
--- a/arch/x86/cpu/apollolake/spl.c
+++ b/arch/x86/cpu/apollolake/spl.c
@@ -7,6 +7,7 @@
 #include <binman_sym.h>
 #include <bootstage.h>
 #include <dm.h>
+#include <image.h>
 #include <malloc.h>
 #include <spi.h>
 #include <spl.h>
diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c
index 212b4d596d..bdae9291e7 100644
--- a/arch/x86/lib/spl.c
+++ b/arch/x86/lib/spl.c
@@ -8,6 +8,7 @@
 #include <debug_uart.h>
 #include <dm.h>
 #include <hang.h>
+#include <image.h>
 #include <irq_func.h>
 #include <malloc.h>
 #include <spl.h>
diff --git a/arch/x86/lib/tpl.c b/arch/x86/lib/tpl.c
index 34804b53cc..f9dcf32d73 100644
--- a/arch/x86/lib/tpl.c
+++ b/arch/x86/lib/tpl.c
@@ -7,6 +7,7 @@
 #include <debug_uart.h>
 #include <dm.h>
 #include <hang.h>
+#include <image.h>
 #include <spl.h>
 #include <asm/cpu.h>
 #include <asm/mtrr.h>
diff --git a/board/AndesTech/ax25-ae350/ax25-ae350.c b/board/AndesTech/ax25-ae350/ax25-ae350.c
index 920d43ecc6..da5bc5b1f1 100644
--- a/board/AndesTech/ax25-ae350/ax25-ae350.c
+++ b/board/AndesTech/ax25-ae350/ax25-ae350.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <flash.h>
+#include <image.h>
 #include <init.h>
 #include <net.h>
 #if defined(CONFIG_FTMAC100) && !defined(CONFIG_DM_ETH)
diff --git a/board/Arcturus/ucp1020/ucp1020.c b/board/Arcturus/ucp1020/ucp1020.c
index dfa1fd4f15..240e804137 100644
--- a/board/Arcturus/ucp1020/ucp1020.c
+++ b/board/Arcturus/ucp1020/ucp1020.c
@@ -12,6 +12,7 @@
 #include <command.h>
 #include <env.h>
 #include <hwconfig.h>
+#include <image.h>
 #include <init.h>
 #include <net.h>
 #include <pci.h>
diff --git a/board/advantech/imx8qm_rom7720_a1/spl.c b/board/advantech/imx8qm_rom7720_a1/spl.c
index 3f31a8f9c3..6863da82d6 100644
--- a/board/advantech/imx8qm_rom7720_a1/spl.c
+++ b/board/advantech/imx8qm_rom7720_a1/spl.c
@@ -4,6 +4,7 @@
  */
 #include <common.h>
 #include <dm.h>
+#include <image.h>
 #include <spl.h>
 #include <fsl_esdhc.h>
 
diff --git a/board/aristainetos/aristainetos.c b/board/aristainetos/aristainetos.c
index 70671039c2..5095cf65d1 100644
--- a/board/aristainetos/aristainetos.c
+++ b/board/aristainetos/aristainetos.c
@@ -9,6 +9,7 @@
  * Author: Fabio Estevam <fabio.estevam@freescale.com>
  */
 
+#include <image.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
diff --git a/board/dhelectronics/dh_imx6/dh_imx6.c b/board/dhelectronics/dh_imx6/dh_imx6.c
index 74b461983c..4df293b7ab 100644
--- a/board/dhelectronics/dh_imx6/dh_imx6.c
+++ b/board/dhelectronics/dh_imx6/dh_imx6.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <eeprom.h>
+#include <image.h>
 #include <init.h>
 #include <net.h>
 #include <dm/device-internal.h>
diff --git a/board/emulation/qemu-riscv/qemu-riscv.c b/board/emulation/qemu-riscv/qemu-riscv.c
index c3f96988b1..b814df780c 100644
--- a/board/emulation/qemu-riscv/qemu-riscv.c
+++ b/board/emulation/qemu-riscv/qemu-riscv.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <env.h>
 #include <fdtdec.h>
+#include <image.h>
 #include <spl.h>
 #include <init.h>
 #include <virtio_types.h>
diff --git a/board/engicam/common/spl.c b/board/engicam/common/spl.c
index a9820a9028..6359fb3223 100644
--- a/board/engicam/common/spl.c
+++ b/board/engicam/common/spl.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <image.h>
 #include <serial.h>
 #include <spl.h>
 
diff --git a/board/freescale/b4860qds/b4860qds.c b/board/freescale/b4860qds/b4860qds.c
index e7f684bfb3..037a8beb64 100644
--- a/board/freescale/b4860qds/b4860qds.c
+++ b/board/freescale/b4860qds/b4860qds.c
@@ -8,6 +8,7 @@
 #include <env.h>
 #include <fdt_support.h>
 #include <i2c.h>
+#include <image.h>
 #include <init.h>
 #include <irq_func.h>
 #include <netdev.h>
diff --git a/board/freescale/bsc9131rdb/bsc9131rdb.c b/board/freescale/bsc9131rdb/bsc9131rdb.c
index 30e7a1f7ed..871d066d68 100644
--- a/board/freescale/bsc9131rdb/bsc9131rdb.c
+++ b/board/freescale/bsc9131rdb/bsc9131rdb.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <image.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #include <asm/cache.h>
diff --git a/board/freescale/bsc9132qds/bsc9132qds.c b/board/freescale/bsc9132qds/bsc9132qds.c
index 89742dfedb..6870674f7a 100644
--- a/board/freescale/bsc9132qds/bsc9132qds.c
+++ b/board/freescale/bsc9132qds/bsc9132qds.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <image.h>
 #include <init.h>
 #include <net.h>
 #include <asm/processor.h>
diff --git a/board/freescale/c29xpcie/c29xpcie.c b/board/freescale/c29xpcie/c29xpcie.c
index 17292936b7..74502c6d18 100644
--- a/board/freescale/c29xpcie/c29xpcie.c
+++ b/board/freescale/c29xpcie/c29xpcie.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <image.h>
 #include <init.h>
 #include <net.h>
 #include <asm/processor.h>
diff --git a/board/freescale/corenet_ds/corenet_ds.c b/board/freescale/corenet_ds/corenet_ds.c
index 66eea32e07..f0c7bed68f 100644
--- a/board/freescale/corenet_ds/corenet_ds.c
+++ b/board/freescale/corenet_ds/corenet_ds.c
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <env.h>
 #include <fdt_support.h>
+#include <image.h>
 #include <init.h>
 #include <netdev.h>
 #include <linux/compiler.h>
diff --git a/board/freescale/corenet_ds/eth_p4080.c b/board/freescale/corenet_ds/eth_p4080.c
index b1989bcbc2..5892bbd62c 100644
--- a/board/freescale/corenet_ds/eth_p4080.c
+++ b/board/freescale/corenet_ds/eth_p4080.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <fdt_support.h>
 #include <net.h>
 #include <netdev.h>
 #include <asm/mmu.h>
diff --git a/board/freescale/imx8mm_evk/spl.c b/board/freescale/imx8mm_evk/spl.c
index 4d34622465..f73ade5549 100644
--- a/board/freescale/imx8mm_evk/spl.c
+++ b/board/freescale/imx8mm_evk/spl.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <hang.h>
+#include <image.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <asm/mach-imx/iomux-v3.h>
diff --git a/board/freescale/imx8mn_evk/spl.c b/board/freescale/imx8mn_evk/spl.c
index 45417b2446..7cb7f6e60b 100644
--- a/board/freescale/imx8mn_evk/spl.c
+++ b/board/freescale/imx8mn_evk/spl.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <hang.h>
+#include <image.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <asm/mach-imx/iomux-v3.h>
diff --git a/board/freescale/imx8mp_evk/spl.c b/board/freescale/imx8mp_evk/spl.c
index c5f640dc7b..79b504d409 100644
--- a/board/freescale/imx8mp_evk/spl.c
+++ b/board/freescale/imx8mp_evk/spl.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <hang.h>
+#include <image.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <errno.h>
diff --git a/board/freescale/imx8mq_evk/spl.c b/board/freescale/imx8mq_evk/spl.c
index 6ba6a52ebb..8b5b240edf 100644
--- a/board/freescale/imx8mq_evk/spl.c
+++ b/board/freescale/imx8mq_evk/spl.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <hang.h>
+#include <image.h>
 #include <asm/io.h>
 #include <errno.h>
 #include <asm/io.h>
diff --git a/board/freescale/imx8qm_mek/spl.c b/board/freescale/imx8qm_mek/spl.c
index cb4006eb2a..c5c07089a2 100644
--- a/board/freescale/imx8qm_mek/spl.c
+++ b/board/freescale/imx8qm_mek/spl.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <image.h>
 #include <spl.h>
 #include <dm/uclass.h>
 #include <dm/device.h>
diff --git a/board/freescale/imx8qxp_mek/spl.c b/board/freescale/imx8qxp_mek/spl.c
index e4e4cbe716..3cbbc9b84c 100644
--- a/board/freescale/imx8qxp_mek/spl.c
+++ b/board/freescale/imx8qxp_mek/spl.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <image.h>
 #include <spl.h>
 #include <dm/uclass.h>
 #include <dm/device.h>
diff --git a/board/freescale/ls1046afrwy/eth.c b/board/freescale/ls1046afrwy/eth.c
index 3f7c35b5c9..09a692be1d 100644
--- a/board/freescale/ls1046afrwy/eth.c
+++ b/board/freescale/ls1046afrwy/eth.c
@@ -3,6 +3,7 @@
  * Copyright 2019 NXP
  */
 #include <common.h>
+#include <fdt_support.h>
 #include <net.h>
 #include <asm/io.h>
 #include <netdev.h>
diff --git a/board/freescale/ls1046ardb/eth.c b/board/freescale/ls1046ardb/eth.c
index 6ffd4aec3e..f3b1dcd306 100644
--- a/board/freescale/ls1046ardb/eth.c
+++ b/board/freescale/ls1046ardb/eth.c
@@ -3,6 +3,7 @@
  * Copyright 2016 Freescale Semiconductor, Inc.
  */
 #include <common.h>
+#include <fdt_support.h>
 #include <net.h>
 #include <asm/io.h>
 #include <netdev.h>
diff --git a/board/freescale/lx2160a/eth_lx2160aqds.c b/board/freescale/lx2160a/eth_lx2160aqds.c
index 0e928ebd86..7ffc85d1a1 100644
--- a/board/freescale/lx2160a/eth_lx2160aqds.c
+++ b/board/freescale/lx2160a/eth_lx2160aqds.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <fdt_support.h>
 #include <hwconfig.h>
 #include <command.h>
 #include <net.h>
@@ -20,6 +21,7 @@
 #include <asm/arch/fsl_serdes.h>
 #include <fsl-mc/fsl_mc.h>
 #include <fsl-mc/ldpaa_wriop.h>
+#include <linux/libfdt.h>
 
 #include "../common/qixis.h"
 
diff --git a/board/freescale/lx2160a/eth_lx2160ardb.c b/board/freescale/lx2160a/eth_lx2160ardb.c
index aeb989a638..21fb559250 100644
--- a/board/freescale/lx2160a/eth_lx2160ardb.c
+++ b/board/freescale/lx2160a/eth_lx2160ardb.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <fdt_support.h>
 #include <net.h>
 #include <netdev.h>
 #include <malloc.h>
diff --git a/board/freescale/mpc8572ds/mpc8572ds.c b/board/freescale/mpc8572ds/mpc8572ds.c
index b7e0eeded5..13cfe159ae 100644
--- a/board/freescale/mpc8572ds/mpc8572ds.c
+++ b/board/freescale/mpc8572ds/mpc8572ds.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <image.h>
 #include <init.h>
 #include <net.h>
 #include <pci.h>
diff --git a/board/freescale/mx6sabreauto/mx6sabreauto.c b/board/freescale/mx6sabreauto/mx6sabreauto.c
index 33da3914d3..829e42f677 100644
--- a/board/freescale/mx6sabreauto/mx6sabreauto.c
+++ b/board/freescale/mx6sabreauto/mx6sabreauto.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <image.h>
 #include <init.h>
 #include <net.h>
 #include <asm/io.h>
diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c
index d46dcd4b8a..8d24af0a99 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -5,6 +5,7 @@
  * Author: Fabio Estevam <fabio.estevam@freescale.com>
  */
 
+#include <image.h>
 #include <init.h>
 #include <net.h>
 #include <asm/arch/clock.h>
diff --git a/board/freescale/p1010rdb/p1010rdb.c b/board/freescale/p1010rdb/p1010rdb.c
index 782c2b71bc..1adc898441 100644
--- a/board/freescale/p1010rdb/p1010rdb.c
+++ b/board/freescale/p1010rdb/p1010rdb.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <image.h>
 #include <init.h>
 #include <net.h>
 #include <asm/processor.h>
diff --git a/board/freescale/p1022ds/p1022ds.c b/board/freescale/p1022ds/p1022ds.c
index 33edff9727..244a053d7a 100644
--- a/board/freescale/p1022ds/p1022ds.c
+++ b/board/freescale/p1022ds/p1022ds.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <image.h>
 #include <init.h>
 #include <net.h>
 #include <pci.h>
diff --git a/board/freescale/p1023rdb/p1023rdb.c b/board/freescale/p1023rdb/p1023rdb.c
index 5321e26a9c..13df3e8637 100644
--- a/board/freescale/p1023rdb/p1023rdb.c
+++ b/board/freescale/p1023rdb/p1023rdb.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <image.h>
 #include <init.h>
 #include <net.h>
 #include <pci.h>
diff --git a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
index 5d619dbd2e..59c57e43a5 100644
--- a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
+++ b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
@@ -9,6 +9,7 @@
 #include <env.h>
 #include <hang.h>
 #include <hwconfig.h>
+#include <image.h>
 #include <init.h>
 #include <net.h>
 #include <pci.h>
diff --git a/board/freescale/p1_twr/p1_twr.c b/board/freescale/p1_twr/p1_twr.c
index 6d0e1b1ffa..8e1522a604 100644
--- a/board/freescale/p1_twr/p1_twr.c
+++ b/board/freescale/p1_twr/p1_twr.c
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <env.h>
 #include <hwconfig.h>
+#include <image.h>
 #include <init.h>
 #include <net.h>
 #include <pci.h>
diff --git a/board/freescale/p2041rdb/p2041rdb.c b/board/freescale/p2041rdb/p2041rdb.c
index 95ed0ef429..076e63a357 100644
--- a/board/freescale/p2041rdb/p2041rdb.c
+++ b/board/freescale/p2041rdb/p2041rdb.c
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <env.h>
 #include <fdt_support.h>
+#include <image.h>
 #include <init.h>
 #include <netdev.h>
 #include <linux/compiler.h>
diff --git a/board/freescale/t102xqds/eth_t102xqds.c b/board/freescale/t102xqds/eth_t102xqds.c
index 1820419511..4a3be4c569 100644
--- a/board/freescale/t102xqds/eth_t102xqds.c
+++ b/board/freescale/t102xqds/eth_t102xqds.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <fdt_support.h>
 #include <net.h>
 #include <netdev.h>
 #include <asm/mmu.h>
diff --git a/board/freescale/t102xqds/t102xqds.c b/board/freescale/t102xqds/t102xqds.c
index 32b4780376..311d9efbfc 100644
--- a/board/freescale/t102xqds/t102xqds.c
+++ b/board/freescale/t102xqds/t102xqds.c
@@ -9,6 +9,7 @@
 #include <env.h>
 #include <fdt_support.h>
 #include <i2c.h>
+#include <image.h>
 #include <init.h>
 #include <netdev.h>
 #include <linux/compiler.h>
diff --git a/board/freescale/t102xrdb/eth_t102xrdb.c b/board/freescale/t102xrdb/eth_t102xrdb.c
index d40b590108..dbf25a237d 100644
--- a/board/freescale/t102xrdb/eth_t102xrdb.c
+++ b/board/freescale/t102xrdb/eth_t102xrdb.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <fdt_support.h>
 #include <net.h>
 #include <netdev.h>
 #include <asm/mmu.h>
diff --git a/board/freescale/t102xrdb/t102xrdb.c b/board/freescale/t102xrdb/t102xrdb.c
index a34490c8bd..983c723a10 100644
--- a/board/freescale/t102xrdb/t102xrdb.c
+++ b/board/freescale/t102xrdb/t102xrdb.c
@@ -9,6 +9,7 @@
 #include <env.h>
 #include <fdt_support.h>
 #include <i2c.h>
+#include <image.h>
 #include <init.h>
 #include <netdev.h>
 #include <linux/compiler.h>
diff --git a/board/freescale/t1040qds/eth.c b/board/freescale/t1040qds/eth.c
index 3f10e420a0..b349b77951 100644
--- a/board/freescale/t1040qds/eth.c
+++ b/board/freescale/t1040qds/eth.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <net.h>
 #include <netdev.h>
 #include <asm/fsl_serdes.h>
diff --git a/board/freescale/t1040qds/t1040qds.c b/board/freescale/t1040qds/t1040qds.c
index 9e253fdec2..c166403ba4 100644
--- a/board/freescale/t1040qds/t1040qds.c
+++ b/board/freescale/t1040qds/t1040qds.c
@@ -9,6 +9,7 @@
 #include <env.h>
 #include <fdt_support.h>
 #include <i2c.h>
+#include <image.h>
 #include <init.h>
 #include <netdev.h>
 #include <linux/compiler.h>
diff --git a/board/freescale/t104xrdb/t104xrdb.c b/board/freescale/t104xrdb/t104xrdb.c
index dc3b59d26f..a156d2ee09 100644
--- a/board/freescale/t104xrdb/t104xrdb.c
+++ b/board/freescale/t104xrdb/t104xrdb.c
@@ -8,6 +8,7 @@
 #include <env.h>
 #include <fdt_support.h>
 #include <hwconfig.h>
+#include <image.h>
 #include <init.h>
 #include <netdev.h>
 #include <linux/compiler.h>
diff --git a/board/freescale/t208xqds/eth_t208xqds.c b/board/freescale/t208xqds/eth_t208xqds.c
index 72991ea591..057fe411e9 100644
--- a/board/freescale/t208xqds/eth_t208xqds.c
+++ b/board/freescale/t208xqds/eth_t208xqds.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <fdt_support.h>
 #include <net.h>
 #include <netdev.h>
 #include <asm/mmu.h>
@@ -28,6 +29,7 @@
 #include "../common/qixis.h"
 #include "../common/fman.h"
 #include "t208xqds_qixis.h"
+#include <linux/libfdt.h>
 
 #define EMI_NONE	0xFFFFFFFF
 #define EMI1_RGMII1	0
diff --git a/board/freescale/t208xqds/t208xqds.c b/board/freescale/t208xqds/t208xqds.c
index 9100401022..9bf6ab1037 100644
--- a/board/freescale/t208xqds/t208xqds.c
+++ b/board/freescale/t208xqds/t208xqds.c
@@ -9,6 +9,7 @@
 #include <env.h>
 #include <fdt_support.h>
 #include <i2c.h>
+#include <image.h>
 #include <init.h>
 #include <netdev.h>
 #include <linux/compiler.h>
diff --git a/board/freescale/t208xrdb/eth_t208xrdb.c b/board/freescale/t208xrdb/eth_t208xrdb.c
index 669bc1efef..db4718128d 100644
--- a/board/freescale/t208xrdb/eth_t208xrdb.c
+++ b/board/freescale/t208xrdb/eth_t208xrdb.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <fdt_support.h>
 #include <net.h>
 #include <netdev.h>
 #include <asm/mmu.h>
diff --git a/board/freescale/t208xrdb/t208xrdb.c b/board/freescale/t208xrdb/t208xrdb.c
index b5c20112d0..24f0d0764c 100644
--- a/board/freescale/t208xrdb/t208xrdb.c
+++ b/board/freescale/t208xrdb/t208xrdb.c
@@ -8,6 +8,7 @@
 #include <env.h>
 #include <fdt_support.h>
 #include <i2c.h>
+#include <image.h>
 #include <init.h>
 #include <netdev.h>
 #include <linux/compiler.h>
diff --git a/board/freescale/t4qds/eth.c b/board/freescale/t4qds/eth.c
index d93d75950c..8a9f631e8d 100644
--- a/board/freescale/t4qds/eth.c
+++ b/board/freescale/t4qds/eth.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <fdt_support.h>
 #include <net.h>
 #include <netdev.h>
 #include <asm/mmu.h>
@@ -26,6 +27,7 @@
 #include <hwconfig.h>
 #include "../common/qixis.h"
 #include "../common/fman.h"
+#include <linux/libfdt.h>
 
 #include "t4240qds_qixis.h"
 
diff --git a/board/freescale/t4qds/t4240emu.c b/board/freescale/t4qds/t4240emu.c
index 104b40a110..8f2032acc7 100644
--- a/board/freescale/t4qds/t4240emu.c
+++ b/board/freescale/t4qds/t4240emu.c
@@ -8,6 +8,7 @@
 #include <env.h>
 #include <fdt_support.h>
 #include <i2c.h>
+#include <image.h>
 #include <init.h>
 #include <netdev.h>
 #include <linux/compiler.h>
diff --git a/board/freescale/t4qds/t4240qds.c b/board/freescale/t4qds/t4240qds.c
index 869c01de92..0b00ec6e29 100644
--- a/board/freescale/t4qds/t4240qds.c
+++ b/board/freescale/t4qds/t4240qds.c
@@ -9,6 +9,7 @@
 #include <env.h>
 #include <fdt_support.h>
 #include <i2c.h>
+#include <image.h>
 #include <init.h>
 #include <irq_func.h>
 #include <netdev.h>
diff --git a/board/freescale/t4rdb/eth.c b/board/freescale/t4rdb/eth.c
index 3321ce1ea1..4c896c8a90 100644
--- a/board/freescale/t4rdb/eth.c
+++ b/board/freescale/t4rdb/eth.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <fdt_support.h>
 #include <net.h>
 #include <netdev.h>
 #include <asm/mmu.h>
diff --git a/board/freescale/t4rdb/t4240rdb.c b/board/freescale/t4rdb/t4240rdb.c
index 8015666ecc..d801f2c7a1 100644
--- a/board/freescale/t4rdb/t4240rdb.c
+++ b/board/freescale/t4rdb/t4240rdb.c
@@ -8,6 +8,7 @@
 #include <env.h>
 #include <fdt_support.h>
 #include <i2c.h>
+#include <image.h>
 #include <init.h>
 #include <netdev.h>
 #include <linux/compiler.h>
diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c
index 6c81864319..1443ef91ef 100644
--- a/board/gateworks/gw_ventana/gw_ventana.c
+++ b/board/gateworks/gw_ventana/gw_ventana.c
@@ -33,6 +33,7 @@
 #include <mtd_node.h>
 #include <netdev.h>
 #include <pci.h>
+#include <linux/libfdt.h>
 #include <power/pmic.h>
 #include <power/ltc3676_pmic.h>
 #include <power/pfuze100_pmic.h>
diff --git a/board/gdsys/p1022/controlcenterd.c b/board/gdsys/p1022/controlcenterd.c
index 14e3e25c18..b39b0b6002 100644
--- a/board/gdsys/p1022/controlcenterd.c
+++ b/board/gdsys/p1022/controlcenterd.c
@@ -24,6 +24,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <image.h>
 #include <init.h>
 #include <net.h>
 #include <pci.h>
diff --git a/board/ge/bx50v3/bx50v3.c b/board/ge/bx50v3/bx50v3.c
index 69cd0a1bc7..6f7f752a8d 100644
--- a/board/ge/bx50v3/bx50v3.c
+++ b/board/ge/bx50v3/bx50v3.c
@@ -5,6 +5,7 @@
  * Copyright 2012 Freescale Semiconductor, Inc.
  */
 
+#include <image.h>
 #include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/highbank/highbank.c b/board/highbank/highbank.c
index f7f2e2c525..ffde1161d0 100644
--- a/board/highbank/highbank.c
+++ b/board/highbank/highbank.c
@@ -7,6 +7,7 @@
 #include <ahci.h>
 #include <cpu_func.h>
 #include <env.h>
+#include <fdt_support.h>
 #include <net.h>
 #include <netdev.h>
 #include <scsi.h>
diff --git a/board/keymile/kmp204x/kmp204x.c b/board/keymile/kmp204x/kmp204x.c
index 0a6cf1fd29..21afbc7f39 100644
--- a/board/keymile/kmp204x/kmp204x.c
+++ b/board/keymile/kmp204x/kmp204x.c
@@ -10,6 +10,7 @@
 #include <command.h>
 #include <env.h>
 #include <fdt_support.h>
+#include <image.h>
 #include <init.h>
 #include <netdev.h>
 #include <linux/compiler.h>
diff --git a/board/liebherr/display5/display5.c b/board/liebherr/display5/display5.c
index 85ca777c1d..a362d25c01 100644
--- a/board/liebherr/display5/display5.c
+++ b/board/liebherr/display5/display5.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <fdt_support.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/liebherr/display5/spl.c b/board/liebherr/display5/spl.c
index 765463e370..0f5eab79b5 100644
--- a/board/liebherr/display5/spl.c
+++ b/board/liebherr/display5/spl.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <env.h>
+#include <image.h>
 #include <serial.h>
 #include <spl.h>
 #include <linux/libfdt.h>
diff --git a/board/liebherr/mccmon6/spl.c b/board/liebherr/mccmon6/spl.c
index 08d2b56d54..8ed8e03295 100644
--- a/board/liebherr/mccmon6/spl.c
+++ b/board/liebherr/mccmon6/spl.c
@@ -5,6 +5,7 @@
  *         Richard Hu <hakahu@gmail.com>
  */
 
+#include <image.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
diff --git a/board/liebherr/xea/xea.c b/board/liebherr/xea/xea.c
index 1a9c05275f..95c9064066 100644
--- a/board/liebherr/xea/xea.c
+++ b/board/liebherr/xea/xea.c
@@ -14,6 +14,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <net.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
diff --git a/board/mscc/jr2/jr2.c b/board/mscc/jr2/jr2.c
index 067907ba52..b240c7649c 100644
--- a/board/mscc/jr2/jr2.c
+++ b/board/mscc/jr2/jr2.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <image.h>
 #include <init.h>
 #include <asm/io.h>
 #include <led.h>
diff --git a/board/mscc/luton/luton.c b/board/mscc/luton/luton.c
index e614058d10..acc26157c7 100644
--- a/board/mscc/luton/luton.c
+++ b/board/mscc/luton/luton.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <image.h>
 #include <init.h>
 #include <asm/io.h>
 #include <led.h>
diff --git a/board/mscc/ocelot/ocelot.c b/board/mscc/ocelot/ocelot.c
index ad227a4169..5fbd8fc6cd 100644
--- a/board/mscc/ocelot/ocelot.c
+++ b/board/mscc/ocelot/ocelot.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <image.h>
 #include <init.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
diff --git a/board/mscc/serval/serval.c b/board/mscc/serval/serval.c
index 6c6dbf2bff..ed1aea55cc 100644
--- a/board/mscc/serval/serval.c
+++ b/board/mscc/serval/serval.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <image.h>
 #include <init.h>
 #include <asm/io.h>
 #include <led.h>
diff --git a/board/mscc/servalt/servalt.c b/board/mscc/servalt/servalt.c
index 71891f6fe3..d0e6016b9a 100644
--- a/board/mscc/servalt/servalt.c
+++ b/board/mscc/servalt/servalt.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <image.h>
 #include <init.h>
 #include <asm/io.h>
 #include <led.h>
diff --git a/board/renesas/rcar-common/common.c b/board/renesas/rcar-common/common.c
index 37f8a46d7e..5a6aa8255b 100644
--- a/board/renesas/rcar-common/common.c
+++ b/board/renesas/rcar-common/common.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <dm/uclass-internal.h>
 #include <asm/arch/rmobile.h>
+#include <linux/libfdt.h>
 
 #ifdef CONFIG_RCAR_GEN3
 
diff --git a/board/renesas/rcar-common/gen3-spl.c b/board/renesas/rcar-common/gen3-spl.c
index d9741c1939..a3e2aebe77 100644
--- a/board/renesas/rcar-common/gen3-spl.c
+++ b/board/renesas/rcar-common/gen3-spl.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <image.h>
 #include <asm/io.h>
 #include <spl.h>
 
diff --git a/board/renesas/salvator-x/salvator-x.c b/board/renesas/salvator-x/salvator-x.c
index 91c3728571..ecf0dde4ef 100644
--- a/board/renesas/salvator-x/salvator-x.c
+++ b/board/renesas/salvator-x/salvator-x.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <image.h>
 #include <malloc.h>
 #include <netdev.h>
 #include <dm.h>
diff --git a/board/renesas/ulcb/ulcb.c b/board/renesas/ulcb/ulcb.c
index b91f940b48..04ca49572f 100644
--- a/board/renesas/ulcb/ulcb.c
+++ b/board/renesas/ulcb/ulcb.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <image.h>
 #include <malloc.h>
 #include <netdev.h>
 #include <dm.h>
diff --git a/board/solidrun/mx6cuboxi/mx6cuboxi.c b/board/solidrun/mx6cuboxi/mx6cuboxi.c
index 262f6640d9..a2d7b1a1c8 100644
--- a/board/solidrun/mx6cuboxi/mx6cuboxi.c
+++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c
@@ -14,6 +14,7 @@
  */
 
 #include <common.h>
+#include <image.h>
 #include <init.h>
 #include <net.h>
 #include <asm/arch/clock.h>
diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
index 9e331be37c..4d9105c45f 100644
--- a/board/st/stm32mp1/stm32mp1.c
+++ b/board/st/stm32mp1/stm32mp1.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <env.h>
 #include <env_internal.h>
+#include <fdt_support.h>
 #include <g_dnl.h>
 #include <generic-phy.h>
 #include <hang.h>
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 6afea6ef42..e210824b4e 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -14,6 +14,7 @@
 #include <dm.h>
 #include <env.h>
 #include <hang.h>
+#include <image.h>
 #include <init.h>
 #include <mmc.h>
 #include <axp_pmic.h>
diff --git a/board/synopsys/hsdk/hsdk.c b/board/synopsys/hsdk/hsdk.c
index 782b2bfef4..5f61fc0d7b 100644
--- a/board/synopsys/hsdk/hsdk.c
+++ b/board/synopsys/hsdk/hsdk.c
@@ -8,6 +8,7 @@
 #include <config.h>
 #include <cpu_func.h>
 #include <env.h>
+#include <image.h>
 #include <init.h>
 #include <irq_func.h>
 #include <asm/cache.h>
diff --git a/board/technexion/pico-imx6/spl.c b/board/technexion/pico-imx6/spl.c
index bafe9ba6b7..983f98beec 100644
--- a/board/technexion/pico-imx6/spl.c
+++ b/board/technexion/pico-imx6/spl.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <image.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index c6de8602d0..56fe171aa7 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <env.h>
 #include <errno.h>
+#include <image.h>
 #include <init.h>
 #include <malloc.h>
 #include <net.h>
diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c
index 87c7ef6b3f..923b224e4c 100644
--- a/board/ti/am43xx/board.c
+++ b/board/ti/am43xx/board.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <eeprom.h>
+#include <image.h>
 #include <dm/uclass.h>
 #include <env.h>
 #include <fdt_support.h>
diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c
index c80a458c12..8720eb87a5 100644
--- a/board/ti/am57xx/board.c
+++ b/board/ti/am57xx/board.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <env.h>
 #include <fdt_support.h>
+#include <image.h>
 #include <init.h>
 #include <malloc.h>
 #include <net.h>
diff --git a/board/ti/am65x/evm.c b/board/ti/am65x/evm.c
index 9d96710f05..346f745bb0 100644
--- a/board/ti/am65x/evm.c
+++ b/board/ti/am65x/evm.c
@@ -9,6 +9,8 @@
 
 #include <common.h>
 #include <dm.h>
+#include <fdt_support.h>
+#include <image.h>
 #include <init.h>
 #include <net.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c
index 8f59598950..acf7ff1691 100644
--- a/board/ti/dra7xx/evm.c
+++ b/board/ti/dra7xx/evm.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <env.h>
 #include <fdt_support.h>
+#include <image.h>
 #include <init.h>
 #include <spl.h>
 #include <net.h>
diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c
index 7bc03edd53..d9af309818 100644
--- a/board/ti/j721e/evm.c
+++ b/board/ti/j721e/evm.c
@@ -8,6 +8,8 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
+#include <image.h>
 #include <init.h>
 #include <net.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/ti/ks2_evm/board.c b/board/ti/ks2_evm/board.c
index 6554c0eb11..8595b20e87 100644
--- a/board/ti/ks2_evm/board.c
+++ b/board/ti/ks2_evm/board.c
@@ -10,6 +10,7 @@
 #include "board.h"
 #include <env.h>
 #include <hang.h>
+#include <image.h>
 #include <init.h>
 #include <spl.h>
 #include <exports.h>
diff --git a/board/ti/ks2_evm/board_k2e.c b/board/ti/ks2_evm/board_k2e.c
index ecd4a42df4..350cc68e49 100644
--- a/board/ti/ks2_evm/board_k2e.c
+++ b/board/ti/ks2_evm/board_k2e.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <image.h>
 #include <asm/arch/ddr3.h>
 #include <asm/arch/hardware.h>
 #include <asm/ti-common/keystone_net.h>
diff --git a/board/ti/ks2_evm/board_k2g.c b/board/ti/ks2_evm/board_k2g.c
index c6a14a0554..21f002e3b1 100644
--- a/board/ti/ks2_evm/board_k2g.c
+++ b/board/ti/ks2_evm/board_k2g.c
@@ -9,6 +9,7 @@
 #include <eeprom.h>
 #include <env.h>
 #include <hang.h>
+#include <image.h>
 #include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/ti-common/keystone_net.h>
diff --git a/board/ti/ks2_evm/board_k2hk.c b/board/ti/ks2_evm/board_k2hk.c
index 4c0acd627f..1eb6cd761e 100644
--- a/board/ti/ks2_evm/board_k2hk.c
+++ b/board/ti/ks2_evm/board_k2hk.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <image.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/hardware.h>
 #include <asm/ti-common/keystone_net.h>
diff --git a/board/ti/ks2_evm/board_k2l.c b/board/ti/ks2_evm/board_k2l.c
index e49d8b3482..5ff11ee0d6 100644
--- a/board/ti/ks2_evm/board_k2l.c
+++ b/board/ti/ks2_evm/board_k2l.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <image.h>
 #include <asm/arch/ddr3.h>
 #include <asm/arch/hardware.h>
 #include <asm/ti-common/keystone_net.h>
diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c
index 47925568c6..dac9503c1b 100644
--- a/board/toradex/apalis_imx6/apalis_imx6.c
+++ b/board/toradex/apalis_imx6/apalis_imx6.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <dm.h>
+#include <image.h>
 #include <init.h>
 #include <net.h>
 
diff --git a/board/toradex/verdin-imx8mm/spl.c b/board/toradex/verdin-imx8mm/spl.c
index dc5bd84f33..c614fc7a3f 100644
--- a/board/toradex/verdin-imx8mm/spl.c
+++ b/board/toradex/verdin-imx8mm/spl.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <image.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/ddr.h>
 #include <asm/arch/imx8mm_pins.h>
diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c
index 675341abdd..d7df4f976a 100644
--- a/board/tqc/tqma6/tqma6.c
+++ b/board/tqc/tqma6/tqma6.c
@@ -14,6 +14,7 @@
 #include <asm/arch/iomux.h>
 #include <asm/arch/sys_proto.h>
 #include <env.h>
+#include <fdt_support.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
diff --git a/board/varisys/cyrus/cyrus.c b/board/varisys/cyrus/cyrus.c
index 13429072c7..a42910f600 100644
--- a/board/varisys/cyrus/cyrus.c
+++ b/board/varisys/cyrus/cyrus.c
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <env.h>
 #include <fdt_support.h>
+#include <image.h>
 #include <init.h>
 #include <netdev.h>
 #include <linux/compiler.h>
diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c
index 9705a1d8e3..5e993d0258 100644
--- a/board/wandboard/wandboard.c
+++ b/board/wandboard/wandboard.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <image.h>
 #include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
diff --git a/cmd/abootimg.c b/cmd/abootimg.c
index 670bcb3aaa..15e727f4a2 100644
--- a/cmd/abootimg.c
+++ b/cmd/abootimg.c
@@ -6,6 +6,7 @@
 
 #include <android_image.h>
 #include <common.h>
+#include <image.h>
 #include <mapmem.h>
 
 #define abootimg_addr() \
diff --git a/cmd/bootefi.c b/cmd/bootefi.c
index 06573b14e9..b0ba7316fb 100644
--- a/cmd/bootefi.c
+++ b/cmd/bootefi.c
@@ -13,6 +13,7 @@
 #include <efi_selftest.h>
 #include <env.h>
 #include <errno.h>
+#include <image.h>
 #include <malloc.h>
 #include <linux/libfdt.h>
 #include <linux/libfdt_env.h>
diff --git a/cmd/fdt.c b/cmd/fdt.c
index 36cc726540..f66ceca2c7 100644
--- a/cmd/fdt.c
+++ b/cmd/fdt.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <image.h>
 #include <linux/ctype.h>
 #include <linux/types.h>
 #include <asm/global_data.h>
diff --git a/cmd/fpga.c b/cmd/fpga.c
index b1c7b5453b..563528ca5e 100644
--- a/cmd/fpga.c
+++ b/cmd/fpga.c
@@ -13,6 +13,7 @@
 #include <fpga.h>
 #include <fs.h>
 #include <gzip.h>
+#include <image.h>
 #include <malloc.h>
 
 static long do_fpga_get_device(char *arg)
diff --git a/cmd/md5sum.c b/cmd/md5sum.c
index 63cbae0364..4e30334951 100644
--- a/cmd/md5sum.c
+++ b/cmd/md5sum.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <image.h>
 #include <mapmem.h>
 #include <u-boot/md5.h>
 #include <asm/io.h>
diff --git a/cmd/spl.c b/cmd/spl.c
index 56051b8a4b..61256f4830 100644
--- a/cmd/spl.c
+++ b/cmd/spl.c
@@ -8,6 +8,7 @@
 #include <command.h>
 #include <cmd_spl.h>
 #include <env.h>
+#include <image.h>
 #include <linux/libfdt.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/common/bootm_os.c b/common/bootm_os.c
index 44023532e1..8599bc8ca3 100644
--- a/common/bootm_os.c
+++ b/common/bootm_os.c
@@ -11,6 +11,8 @@
 #include <efi_loader.h>
 #include <env.h>
 #include <fdt_support.h>
+#include <image.h>
+#include <lmb.h>
 #include <linux/libfdt.h>
 #include <malloc.h>
 #include <mapmem.h>
diff --git a/common/fdt_region.c b/common/fdt_region.c
index bf0a9be730..667659054a 100644
--- a/common/fdt_region.c
+++ b/common/fdt_region.c
@@ -5,6 +5,7 @@
  * Written by Simon Glass <sjg@chromium.org>
  */
 
+#include <fdt_support.h>
 #include <linux/libfdt_env.h>
 #include <fdt_region.h>
 
diff --git a/common/hash.c b/common/hash.c
index 2cf763575f..810854ce0f 100644
--- a/common/hash.c
+++ b/common/hash.c
@@ -23,10 +23,10 @@
 #else
 #include "mkimage.h"
 #include <time.h>
-#include <image.h>
 #endif /* !USE_HOSTCC*/
 
 #include <hash.h>
+#include <image.h>
 #include <u-boot/crc.h>
 #include <u-boot/sha1.h>
 #include <u-boot/sha256.h>
diff --git a/common/image-fdt.c b/common/image-fdt.c
index 3002948b6b..270732278e 100644
--- a/common/image-fdt.c
+++ b/common/image-fdt.c
@@ -14,6 +14,7 @@
 #include <env.h>
 #include <errno.h>
 #include <image.h>
+#include <lmb.h>
 #include <malloc.h>
 #include <linux/libfdt.h>
 #include <mapmem.h>
diff --git a/common/image-fit.c b/common/image-fit.c
index 368b73088a..dc745fef7c 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -11,6 +11,7 @@
 #ifdef USE_HOSTCC
 #include "mkimage.h"
 #include <time.h>
+#include <linux/libfdt.h>
 #include <u-boot/crc.h>
 #else
 #include <linux/compiler.h>
diff --git a/common/image-sig.c b/common/image-sig.c
index 84b2c0439c..5122dc948f 100644
--- a/common/image-sig.c
+++ b/common/image-sig.c
@@ -5,7 +5,9 @@
 
 #ifdef USE_HOSTCC
 #include "mkimage.h"
+#include <fdt_support.h>
 #include <time.h>
+#include <linux/libfdt.h>
 #else
 #include <common.h>
 #include <malloc.h>
diff --git a/common/image.c b/common/image.c
index 20fa4bd497..6a24abf6ff 100644
--- a/common/image.c
+++ b/common/image.c
@@ -11,6 +11,7 @@
 #include <bootstage.h>
 #include <cpu_func.h>
 #include <env.h>
+#include <lmb.h>
 #include <malloc.h>
 #include <asm/cache.h>
 #include <u-boot/crc.h>
diff --git a/common/spl/spl_atf.c b/common/spl/spl_atf.c
index bc2921c552..b83e3bb54a 100644
--- a/common/spl/spl_atf.c
+++ b/common/spl/spl_atf.c
@@ -13,6 +13,7 @@
 #include <atf_common.h>
 #include <cpu_func.h>
 #include <errno.h>
+#include <image.h>
 #include <spl.h>
 #include <asm/cache.h>
 
diff --git a/common/spl/spl_legacy.c b/common/spl/spl_legacy.c
index 29d3ec7073..db5017a4b0 100644
--- a/common/spl/spl_legacy.c
+++ b/common/spl/spl_legacy.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <image.h>
 #include <malloc.h>
 #include <spl.h>
 
diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c
index 5f8a111a2f..e81279aa1b 100644
--- a/common/spl/spl_nand.c
+++ b/common/spl/spl_nand.c
@@ -5,6 +5,8 @@
  */
 #include <common.h>
 #include <config.h>
+#include <fdt_support.h>
+#include <image.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <nand.h>
diff --git a/common/spl/spl_net.c b/common/spl/spl_net.c
index 30c050c0b3..a9b6b07ab3 100644
--- a/common/spl/spl_net.c
+++ b/common/spl/spl_net.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <env.h>
 #include <errno.h>
+#include <image.h>
 #include <spl.h>
 #include <net.h>
 #include <linux/libfdt.h>
diff --git a/common/spl/spl_nor.c b/common/spl/spl_nor.c
index 3f03ffe6a3..d4733ea90a 100644
--- a/common/spl/spl_nor.c
+++ b/common/spl/spl_nor.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <image.h>
 #include <spl.h>
 
 static ulong spl_nor_load_read(struct spl_load_info *load, ulong sector,
diff --git a/common/spl/spl_onenand.c b/common/spl/spl_onenand.c
index ee30f328e6..8ba3d4027a 100644
--- a/common/spl/spl_onenand.c
+++ b/common/spl/spl_onenand.c
@@ -9,6 +9,7 @@
  */
 #include <common.h>
 #include <config.h>
+#include <image.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <onenand_uboot.h>
diff --git a/common/spl/spl_opensbi.c b/common/spl/spl_opensbi.c
index 3519c34299..e88136e6f3 100644
--- a/common/spl/spl_opensbi.c
+++ b/common/spl/spl_opensbi.c
@@ -9,9 +9,11 @@
 #include <cpu_func.h>
 #include <errno.h>
 #include <hang.h>
+#include <image.h>
 #include <spl.h>
 #include <asm/smp.h>
 #include <opensbi.h>
+#include <linux/libfdt.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/common/spl/spl_ram.c b/common/spl/spl_ram.c
index 954e91a004..80572ceec2 100644
--- a/common/spl/spl_ram.c
+++ b/common/spl/spl_ram.c
@@ -11,6 +11,7 @@
  */
 #include <common.h>
 #include <binman_sym.h>
+#include <image.h>
 #include <mapmem.h>
 #include <spl.h>
 #include <linux/libfdt.h>
diff --git a/common/spl/spl_spi.c b/common/spl/spl_spi.c
index 288dbb5fa9..7a374bbfcc 100644
--- a/common/spl/spl_spi.c
+++ b/common/spl/spl_spi.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <image.h>
 #include <spi.h>
 #include <spi_flash.h>
 #include <errno.h>
diff --git a/common/spl/spl_ubi.c b/common/spl/spl_ubi.c
index 0cb5080882..de6a63bd2d 100644
--- a/common/spl/spl_ubi.c
+++ b/common/spl/spl_ubi.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <config.h>
+#include <image.h>
 #include <nand.h>
 #include <onenand_uboot.h>
 #include <ubispl.h>
diff --git a/common/spl/spl_xip.c b/common/spl/spl_xip.c
index 1af4da8725..f857278018 100644
--- a/common/spl/spl_xip.c
+++ b/common/spl/spl_xip.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <image.h>
 #include <spl.h>
 
 static int spl_xip(struct spl_image_info *spl_image,
diff --git a/common/spl/spl_ymodem.c b/common/spl/spl_ymodem.c
index 8500ee8ba5..414e62176b 100644
--- a/common/spl/spl_ymodem.c
+++ b/common/spl/spl_ymodem.c
@@ -10,6 +10,7 @@
  */
 #include <common.h>
 #include <gzip.h>
+#include <image.h>
 #include <spl.h>
 #include <xyzModem.h>
 #include <asm/u-boot.h>
diff --git a/drivers/fastboot/fb_mmc.c b/drivers/fastboot/fb_mmc.c
index c666eb0f29..94fab4e5e0 100644
--- a/drivers/fastboot/fb_mmc.c
+++ b/drivers/fastboot/fb_mmc.c
@@ -12,6 +12,7 @@
 #include <fb_mmc.h>
 #include <flash.h>
 #include <image-sparse.h>
+#include <image.h>
 #include <part.h>
 #include <mmc.h>
 #include <div64.h>
diff --git a/drivers/fpga/socfpga_arria10.c b/drivers/fpga/socfpga_arria10.c
index 2853581b97..6a3ad6a969 100644
--- a/drivers/fpga/socfpga_arria10.c
+++ b/drivers/fpga/socfpga_arria10.c
@@ -2,6 +2,7 @@
 /*
  * Copyright (C) 2017-2019 Intel Corporation <www.intel.com>
  */
+#include <image.h>
 #include <asm/io.h>
 #include <asm/arch/fpga_manager.h>
 #include <asm/arch/reset_manager.h>
diff --git a/drivers/i2c/muxes/i2c-mux-gpio.c b/drivers/i2c/muxes/i2c-mux-gpio.c
index 0575bd8937..83dcb40213 100644
--- a/drivers/i2c/muxes/i2c-mux-gpio.c
+++ b/drivers/i2c/muxes/i2c-mux-gpio.c
@@ -17,6 +17,7 @@
 #include <fdtdec.h>
 #include <i2c.h>
 #include <linux/errno.h>
+#include <linux/libfdt.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/net/fm/fdt.c b/drivers/net/fm/fdt.c
index a6b0d87415..242d27a34e 100644
--- a/drivers/net/fm/fdt.c
+++ b/drivers/net/fm/fdt.c
@@ -4,6 +4,7 @@
  */
 #include <asm/io.h>
 #include <env.h>
+#include <fdt_support.h>
 #include <fsl_qe.h>	/* For struct qe_firmware */
 #include <u-boot/crc.h>
 
diff --git a/drivers/net/fm/init.c b/drivers/net/fm/init.c
index f654562f64..2cc8bbfb10 100644
--- a/drivers/net/fm/init.c
+++ b/drivers/net/fm/init.c
@@ -10,6 +10,7 @@
 #include <fsl_mdio.h>
 #ifdef CONFIG_FSL_LAYERSCAPE
 #include <asm/arch/fsl_serdes.h>
+#include <linux/libfdt.h>
 #else
 #include <asm/fsl_serdes.h>
 #endif
diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
index fee372968a..da0815a46f 100644
--- a/drivers/net/fsl-mc/mc.c
+++ b/drivers/net/fsl-mc/mc.c
@@ -8,6 +8,7 @@
 #include <cpu_func.h>
 #include <env.h>
 #include <errno.h>
+#include <image.h>
 #include <malloc.h>
 #include <linux/bug.h>
 #include <asm/io.h>
diff --git a/drivers/net/fsl_enetc.c b/drivers/net/fsl_enetc.c
index 2fa27c7b6e..2a66c2e5f9 100644
--- a/drivers/net/fsl_enetc.c
+++ b/drivers/net/fsl_enetc.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <fdt_support.h>
 #include <malloc.h>
 #include <memalign.h>
 #include <net.h>
diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c
index 29067194cb..1e0db6c8c7 100644
--- a/drivers/net/mvpp2.c
+++ b/drivers/net/mvpp2.c
@@ -34,6 +34,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
 #include <linux/compat.h>
+#include <linux/libfdt.h>
 #include <linux/mbus.h>
 #include <asm-generic/gpio.h>
 #include <fdt_support.h>
diff --git a/drivers/net/pfe_eth/pfe_firmware.c b/drivers/net/pfe_eth/pfe_firmware.c
index 13112d9c1a..dbb69a0c59 100644
--- a/drivers/net/pfe_eth/pfe_firmware.c
+++ b/drivers/net/pfe_eth/pfe_firmware.c
@@ -10,6 +10,7 @@
  * files.
  */
 
+#include <image.h>
 #include <malloc.h>
 #include <net/pfe_eth/pfe_eth.h>
 #include <net/pfe_eth/pfe_firmware.h>
diff --git a/drivers/net/ti/keystone_net.c b/drivers/net/ti/keystone_net.c
index 4baeeb83f1..ecd6df9e45 100644
--- a/drivers/net/ti/keystone_net.c
+++ b/drivers/net/ti/keystone_net.c
@@ -21,6 +21,7 @@
 #include <asm/ti-common/keystone_net.h>
 #include <asm/ti-common/keystone_serdes.h>
 #include <asm/arch/psc_defs.h>
+#include <linux/libfdt.h>
 
 #include "cpsw_mdio.h"
 
diff --git a/drivers/phy/marvell/comphy_core.c b/drivers/phy/marvell/comphy_core.c
index 244beef18d..27bff27ff7 100644
--- a/drivers/phy/marvell/comphy_core.c
+++ b/drivers/phy/marvell/comphy_core.c
@@ -8,10 +8,11 @@
 #include <common.h>
 #include <dm.h>
 #include <fdtdec.h>
+#include <asm/io.h>
 #include <dm/device_compat.h>
 #include <linux/err.h>
 #include <linux/errno.h>
-#include <asm/io.h>
+#include <linux/libfdt.h>
 
 #include "comphy_core.h"
 
diff --git a/drivers/pinctrl/meson/pinctrl-meson.c b/drivers/pinctrl/meson/pinctrl-meson.c
index 7fbe2810a2..535f491d49 100644
--- a/drivers/pinctrl/meson/pinctrl-meson.c
+++ b/drivers/pinctrl/meson/pinctrl-meson.c
@@ -13,6 +13,7 @@
 #include <fdt_support.h>
 #include <linux/err.h>
 #include <linux/io.h>
+#include <linux/libfdt.h>
 #include <linux/sizes.h>
 #include <asm/gpio.h>
 
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
index 6e0bcae991..b9fb46815b 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
@@ -32,6 +32,7 @@
 #include <asm/gpio.h>
 #include <asm/system.h>
 #include <asm/io.h>
+#include <linux/libfdt.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/pinctrl/pinctrl-sti.c b/drivers/pinctrl/pinctrl-sti.c
index f0cd845fea..14fcad5aad 100644
--- a/drivers/pinctrl/pinctrl-sti.c
+++ b/drivers/pinctrl/pinctrl-sti.c
@@ -14,6 +14,7 @@
 #include <syscon.h>
 #include <asm/io.h>
 #include <dm/pinctrl.h>
+#include <linux/libfdt.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/pinctrl/pinctrl_stm32.c b/drivers/pinctrl/pinctrl_stm32.c
index 9926235b52..32038cea8f 100644
--- a/drivers/pinctrl/pinctrl_stm32.c
+++ b/drivers/pinctrl/pinctrl_stm32.c
@@ -9,6 +9,7 @@
 #include <dm/lists.h>
 #include <dm/pinctrl.h>
 #include <linux/err.h>
+#include <linux/libfdt.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c b/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
index 0fd0416b18..386a13ed87 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
@@ -9,6 +9,7 @@
 #include <regmap.h>
 #include <syscon.h>
 #include <fdtdec.h>
+#include <linux/libfdt.h>
 
 #include "pinctrl-rockchip.h"
 
diff --git a/drivers/spi/fsl_qspi.c b/drivers/spi/fsl_qspi.c
index ee2c8b67dc..caf31ef98c 100644
--- a/drivers/spi/fsl_qspi.c
+++ b/drivers/spi/fsl_qspi.c
@@ -25,6 +25,9 @@
 
 #include <common.h>
 #include <asm/io.h>
+#include <linux/libfdt.h>
+#include <linux/sizes.h>
+#include <linux/iopoll.h>
 #include <dm.h>
 #include <linux/iopoll.h>
 #include <linux/sizes.h>
diff --git a/drivers/thermal/imx_scu_thermal.c b/drivers/thermal/imx_scu_thermal.c
index 7e17377b69..ec908199f8 100644
--- a/drivers/thermal/imx_scu_thermal.c
+++ b/drivers/thermal/imx_scu_thermal.c
@@ -11,6 +11,7 @@
 #include <dm/device-internal.h>
 #include <dm/device.h>
 #include <asm/arch/sci/sci.h>
+#include <linux/libfdt.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/include/asm-generic/u-boot.h b/include/asm-generic/u-boot.h
index cc94d39069..6f749736f1 100644
--- a/include/asm-generic/u-boot.h
+++ b/include/asm-generic/u-boot.h
@@ -23,6 +23,7 @@
 
 #ifndef __ASSEMBLY__
 
+#include <asm/types.h>
 #include <linux/types.h>
 
 typedef struct bd_info {
diff --git a/include/common.h b/include/common.h
index fd3e2de4cc..a87c062880 100644
--- a/include/common.h
+++ b/include/common.h
@@ -28,7 +28,6 @@
 #include <stdarg.h>
 #include <stdio.h>
 #include <linux/kernel.h>
-#include <image.h>
 #include <log.h>
 #include <asm/u-boot.h> /* boot information for Linux kernel */
 #include <asm/global_data.h>	/* global data used for startup functions */
diff --git a/include/tee/optee.h b/include/tee/optee.h
index 121b30a303..affa937da0 100644
--- a/include/tee/optee.h
+++ b/include/tee/optee.h
@@ -10,6 +10,7 @@
 #define _OPTEE_H
 
 #include <linux/errno.h>
+#include <image.h>
 
 #define OPTEE_MAGIC             0x4554504f
 #define OPTEE_VERSION           1
@@ -28,14 +29,16 @@ struct optee_header {
 	uint32_t paged_size;
 };
 
-static inline uint32_t optee_image_get_entry_point(const image_header_t *hdr)
+static inline uint32_t
+optee_image_get_entry_point(const struct image_header *hdr)
 {
 	struct optee_header *optee_hdr = (struct optee_header *)(hdr + 1);
 
 	return optee_hdr->init_load_addr_lo;
 }
 
-static inline uint32_t optee_image_get_load_addr(const image_header_t *hdr)
+static inline uint32_t
+optee_image_get_load_addr(const struct image_header *hdr)
 {
 	return optee_image_get_entry_point(hdr) - sizeof(struct optee_header);
 }
diff --git a/include/vxworks.h b/include/vxworks.h
index d90d862fb7..10c5e116d5 100644
--- a/include/vxworks.h
+++ b/include/vxworks.h
@@ -9,6 +9,8 @@
 
 #include <efi_api.h>
 
+struct bootm_headers;
+
 /* Use Linux compatible standard DTB */
 #define VXWORKS_SYSFLG_STD_DTB	0x1
 
@@ -84,7 +86,7 @@ struct efi_gop_info {
 };
 
 int do_bootvx(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
-void boot_prep_vxworks(bootm_headers_t *images);
-void boot_jump_vxworks(bootm_headers_t *images);
+void boot_prep_vxworks(struct bootm_headers *images);
+void boot_jump_vxworks(struct bootm_headers *images);
 
 #endif
diff --git a/lib/lmb.c b/lib/lmb.c
index 07b9308adf..2f0e495edf 100644
--- a/lib/lmb.c
+++ b/lib/lmb.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <image.h>
 #include <lmb.h>
 #include <malloc.h>
 
diff --git a/net/tftp.c b/net/tftp.c
index be24e63075..3348521c90 100644
--- a/net/tftp.c
+++ b/net/tftp.c
@@ -11,6 +11,7 @@
 #include <efi_loader.h>
 #include <env.h>
 #include <image.h>
+#include <lmb.h>
 #include <mapmem.h>
 #include <net.h>
 #include <net/tftp.h>
diff --git a/test/compression.c b/test/compression.c
index 63f929fa4b..bceb2c273c 100644
--- a/test/compression.c
+++ b/test/compression.c
@@ -7,6 +7,7 @@
 #include <bootm.h>
 #include <command.h>
 #include <gzip.h>
+#include <image.h>
 #include <lz4.h>
 #include <malloc.h>
 #include <mapmem.h>
diff --git a/test/overlay/cmd_ut_overlay.c b/test/overlay/cmd_ut_overlay.c
index d0083fd6be..c8d41a4dca 100644
--- a/test/overlay/cmd_ut_overlay.c
+++ b/test/overlay/cmd_ut_overlay.c
@@ -8,6 +8,7 @@
 #include <command.h>
 #include <errno.h>
 #include <fdt_support.h>
+#include <image.h>
 #include <malloc.h>
 
 #include <linux/sizes.h>
diff --git a/tools/imx8image.c b/tools/imx8image.c
index 1b428c3b2f..133780f5ea 100644
--- a/tools/imx8image.c
+++ b/tools/imx8image.c
@@ -6,6 +6,7 @@
  */
 
 #include "imx8image.h"
+#include <image.h>
 
 static int p_idx;
 static int sector_size;
-- 
2.26.2.645.ge9eca65c58-goog

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH v3 11/22] common: Drop init.h from common header
  2020-05-10 17:39 [PATCH v3 00/22] common: Further reduce the size of common.h Simon Glass
                   ` (9 preceding siblings ...)
  2020-05-10 17:40 ` [PATCH v3 10/22] common: Drop image.h " Simon Glass
@ 2020-05-10 17:40 ` Simon Glass
  2020-05-11  6:44   ` Masahiro Yamada
  2020-05-19 17:32   ` Tom Rini
  2020-05-10 17:40 ` [PATCH v3 12/22] command: Remove the cmd_tbl_t typedef Simon Glass
                   ` (11 subsequent siblings)
  22 siblings, 2 replies; 53+ messages in thread
From: Simon Glass @ 2020-05-10 17:40 UTC (permalink / raw)
  To: u-boot

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v3: None
Changes in v2:
- Adjustments for chromebook_coral, etc.

 arch/arc/lib/cpu.c                                        | 1 +
 arch/arc/lib/init_helpers.c                               | 1 +
 arch/arm/cpu/arm1136/mx31/generic.c                       | 1 +
 arch/arm/cpu/arm1136/mx31/timer.c                         | 1 +
 arch/arm/cpu/arm1136/mx35/generic.c                       | 1 +
 arch/arm/cpu/arm1136/mx35/timer.c                         | 1 +
 arch/arm/cpu/arm920t/ep93xx/timer.c                       | 1 +
 arch/arm/cpu/arm926ejs/armada100/cpu.c                    | 1 +
 arch/arm/cpu/arm926ejs/armada100/dram.c                   | 1 +
 arch/arm/cpu/arm926ejs/armada100/timer.c                  | 1 +
 arch/arm/cpu/arm926ejs/lpc32xx/cpu.c                      | 1 +
 arch/arm/cpu/arm926ejs/lpc32xx/timer.c                    | 1 +
 arch/arm/cpu/arm926ejs/mx25/generic.c                     | 1 +
 arch/arm/cpu/arm926ejs/mx25/timer.c                       | 1 +
 arch/arm/cpu/arm926ejs/mx27/timer.c                       | 1 +
 arch/arm/cpu/arm926ejs/mxs/mxs.c                          | 1 +
 arch/arm/cpu/arm926ejs/mxs/spl_boot.c                     | 1 +
 arch/arm/cpu/arm926ejs/mxs/timer.c                        | 1 +
 arch/arm/cpu/arm926ejs/spear/cpu.c                        | 1 +
 arch/arm/cpu/arm926ejs/spear/spl.c                        | 1 +
 arch/arm/cpu/arm926ejs/spear/timer.c                      | 1 +
 arch/arm/cpu/armv7/arch_timer.c                           | 1 +
 arch/arm/cpu/armv7/iproc-common/timer.c                   | 1 +
 arch/arm/cpu/armv7/ls102xa/cpu.c                          | 1 +
 arch/arm/cpu/armv7/ls102xa/timer.c                        | 1 +
 arch/arm/cpu/armv7/s5p-common/cpu_info.c                  | 1 +
 arch/arm/cpu/armv7/s5p-common/timer.c                     | 1 +
 arch/arm/cpu/armv7/stv0991/timer.c                        | 1 +
 arch/arm/cpu/armv7/sunxi/timer.c                          | 1 +
 arch/arm/cpu/armv7/vf610/generic.c                        | 1 +
 arch/arm/cpu/armv7/vf610/timer.c                          | 1 +
 arch/arm/cpu/armv7m/systick-timer.c                       | 1 +
 arch/arm/cpu/armv8/fsl-layerscape/spl.c                   | 1 +
 arch/arm/cpu/armv8/s32v234/cpu.c                          | 1 +
 arch/arm/cpu/armv8/s32v234/generic.c                      | 1 +
 arch/arm/cpu/pxa/cpuinfo.c                                | 1 +
 arch/arm/cpu/pxa/pxa2xx.c                                 | 1 +
 arch/arm/cpu/pxa/timer.c                                  | 1 +
 arch/arm/lib/spl.c                                        | 1 +
 arch/arm/lib/stack.c                                      | 1 +
 arch/arm/mach-aspeed/ast2500-board.c                      | 1 +
 arch/arm/mach-at91/arm920t/cpu.c                          | 1 +
 arch/arm/mach-at91/arm920t/timer.c                        | 1 +
 arch/arm/mach-at91/arm926ejs/cpu.c                        | 1 +
 arch/arm/mach-at91/arm926ejs/timer.c                      | 1 +
 arch/arm/mach-at91/armv7/cpu.c                            | 1 +
 arch/arm/mach-at91/armv7/timer.c                          | 1 +
 arch/arm/mach-at91/spl_at91.c                             | 1 +
 arch/arm/mach-at91/spl_atmel.c                            | 1 +
 arch/arm/mach-bcm283x/init.c                              | 1 +
 arch/arm/mach-davinci/cpu.c                               | 1 +
 arch/arm/mach-davinci/da850_lowlevel.c                    | 1 +
 arch/arm/mach-davinci/spl.c                               | 1 +
 arch/arm/mach-davinci/timer.c                             | 1 +
 arch/arm/mach-exynos/lowlevel_init.c                      | 1 +
 arch/arm/mach-exynos/spl_boot.c                           | 1 +
 arch/arm/mach-highbank/timer.c                            | 1 +
 arch/arm/mach-imx/cpu.c                                   | 1 +
 arch/arm/mach-imx/imx8m/soc.c                             | 1 +
 arch/arm/mach-imx/imxrt/soc.c                             | 1 +
 arch/arm/mach-imx/mx7/soc.c                               | 1 +
 arch/arm/mach-imx/spl.c                                   | 1 +
 arch/arm/mach-imx/syscounter.c                            | 1 +
 arch/arm/mach-imx/timer.c                                 | 1 +
 arch/arm/mach-k3/am6_init.c                               | 1 +
 arch/arm/mach-k3/common.c                                 | 1 +
 arch/arm/mach-k3/j721e_init.c                             | 1 +
 arch/arm/mach-keystone/init.c                             | 1 +
 arch/arm/mach-keystone/keystone.c                         | 1 +
 arch/arm/mach-kirkwood/cpu.c                              | 1 +
 arch/arm/mach-mediatek/cpu.c                              | 1 +
 arch/arm/mach-mediatek/mt7622/init.c                      | 1 +
 arch/arm/mach-mediatek/mt7629/init.c                      | 1 +
 arch/arm/mach-mediatek/mt8512/init.c                      | 1 +
 arch/arm/mach-mediatek/mt8516/init.c                      | 1 +
 arch/arm/mach-mediatek/mt8518/init.c                      | 1 +
 arch/arm/mach-mediatek/spl.c                              | 1 +
 arch/arm/mach-meson/board-info.c                          | 1 +
 arch/arm/mach-mvebu/armada3700/cpu.c                      | 1 +
 arch/arm/mach-mvebu/cpu.c                                 | 1 +
 arch/arm/mach-mvebu/spl.c                                 | 1 +
 arch/arm/mach-mvebu/timer.c                               | 1 +
 arch/arm/mach-omap2/am33xx/chilisom.c                     | 1 +
 arch/arm/mach-omap2/am33xx/clock.c                        | 1 +
 arch/arm/mach-omap2/am33xx/sys_info.c                     | 1 +
 arch/arm/mach-omap2/clocks-common.c                       | 1 +
 arch/arm/mach-omap2/hwinit-common.c                       | 1 +
 arch/arm/mach-omap2/omap3/board.c                         | 1 +
 arch/arm/mach-omap2/omap3/emif4.c                         | 1 +
 arch/arm/mach-omap2/omap3/sdrc.c                          | 1 +
 arch/arm/mach-omap2/timer.c                               | 1 +
 arch/arm/mach-orion5x/cpu.c                               | 1 +
 arch/arm/mach-orion5x/timer.c                             | 1 +
 arch/arm/mach-owl/soc.c                                   | 1 +
 arch/arm/mach-rmobile/board.c                             | 1 +
 arch/arm/mach-rmobile/cpu_info.c                          | 1 +
 arch/arm/mach-rmobile/timer.c                             | 1 +
 arch/arm/mach-rockchip/cpu-info.c                         | 1 +
 arch/arm/mach-rockchip/px30-board-tpl.c                   | 1 +
 arch/arm/mach-rockchip/px30/px30.c                        | 1 +
 arch/arm/mach-rockchip/rk3036-board-spl.c                 | 1 +
 arch/arm/mach-rockchip/rk3036/rk3036.c                    | 1 +
 arch/arm/mach-rockchip/rk3036/sdram_rk3036.c              | 1 +
 arch/arm/mach-rockchip/rk3128/rk3128.c                    | 1 +
 arch/arm/mach-rockchip/rk3188/rk3188.c                    | 1 +
 arch/arm/mach-rockchip/rk322x/rk322x.c                    | 1 +
 arch/arm/mach-rockchip/rk3308/rk3308.c                    | 1 +
 arch/arm/mach-rockchip/rk3328/rk3328.c                    | 1 +
 arch/arm/mach-rockchip/rk3368/rk3368.c                    | 1 +
 arch/arm/mach-rockchip/rk3399/rk3399.c                    | 1 +
 arch/arm/mach-rockchip/spl.c                              | 1 +
 arch/arm/mach-rockchip/tpl.c                              | 1 +
 arch/arm/mach-socfpga/board.c                             | 1 +
 arch/arm/mach-socfpga/clock_manager.c                     | 1 +
 arch/arm/mach-socfpga/misc.c                              | 1 +
 arch/arm/mach-socfpga/misc_arria10.c                      | 1 +
 arch/arm/mach-socfpga/misc_gen5.c                         | 1 +
 arch/arm/mach-socfpga/misc_s10.c                          | 1 +
 arch/arm/mach-socfpga/spl_a10.c                           | 1 +
 arch/arm/mach-socfpga/spl_agilex.c                        | 1 +
 arch/arm/mach-socfpga/spl_gen5.c                          | 1 +
 arch/arm/mach-socfpga/spl_s10.c                           | 1 +
 arch/arm/mach-socfpga/timer.c                             | 1 +
 arch/arm/mach-socfpga/timer_s10.c                         | 1 +
 arch/arm/mach-stm32/soc.c                                 | 1 +
 arch/arm/mach-stm32mp/cpu.c                               | 1 +
 arch/arm/mach-stm32mp/dram_init.c                         | 1 +
 arch/arm/mach-stm32mp/spl.c                               | 1 +
 arch/arm/mach-sunxi/board.c                               | 1 +
 arch/arm/mach-sunxi/cpu_info.c                            | 1 +
 arch/arm/mach-sunxi/dram_sun50i_h6.c                      | 3 ++-
 arch/arm/mach-sunxi/dram_sun6i.c                          | 1 +
 arch/arm/mach-sunxi/dram_sun8i_a23.c                      | 1 +
 arch/arm/mach-sunxi/dram_sun8i_a33.c                      | 1 +
 arch/arm/mach-sunxi/dram_sun8i_a83t.c                     | 1 +
 arch/arm/mach-sunxi/dram_sun9i.c                          | 1 +
 arch/arm/mach-sunxi/dram_sunxi_dw.c                       | 1 +
 arch/arm/mach-tegra/cboot.c                               | 1 +
 arch/arm/mach-tegra/sys_info.c                            | 1 +
 arch/arm/mach-tegra/tegra114/clock.c                      | 1 +
 arch/arm/mach-tegra/tegra124/clock.c                      | 1 +
 arch/arm/mach-tegra/tegra20/clock.c                       | 1 +
 arch/arm/mach-tegra/tegra210/clock.c                      | 1 +
 arch/arm/mach-tegra/tegra30/clock.c                       | 1 +
 arch/arm/mach-u8500/cpuinfo.c                             | 1 +
 arch/arm/mach-uniphier/arm32/timer.c                      | 1 +
 arch/arm/mach-uniphier/cpu-info.c                         | 1 +
 arch/arm/mach-uniphier/dram/umc-pxs2.c                    | 1 +
 arch/arm/mach-uniphier/dram_init.c                        | 1 +
 arch/arm/mach-versal/clk.c                                | 1 +
 arch/arm/mach-versal/cpu.c                                | 1 +
 arch/arm/mach-zynq/clk.c                                  | 1 +
 arch/arm/mach-zynq/cpu.c                                  | 1 +
 arch/arm/mach-zynq/spl.c                                  | 1 +
 arch/arm/mach-zynq/timer.c                                | 1 +
 arch/arm/mach-zynqmp-r5/cpu.c                             | 1 +
 arch/arm/mach-zynqmp/clk.c                                | 1 +
 arch/arm/mach-zynqmp/cpu.c                                | 1 +
 arch/m68k/cpu/mcf5227x/cpu.c                              | 1 +
 arch/m68k/cpu/mcf5227x/cpu_init.c                         | 1 +
 arch/m68k/cpu/mcf523x/cpu.c                               | 1 +
 arch/m68k/cpu/mcf523x/cpu_init.c                          | 1 +
 arch/m68k/cpu/mcf52x2/cpu.c                               | 1 +
 arch/m68k/cpu/mcf52x2/cpu_init.c                          | 1 +
 arch/m68k/cpu/mcf530x/cpu.c                               | 1 +
 arch/m68k/cpu/mcf530x/cpu_init.c                          | 1 +
 arch/m68k/cpu/mcf532x/cpu.c                               | 1 +
 arch/m68k/cpu/mcf532x/cpu_init.c                          | 1 +
 arch/m68k/cpu/mcf5445x/cpu.c                              | 1 +
 arch/m68k/cpu/mcf5445x/cpu_init.c                         | 1 +
 arch/m68k/cpu/mcf547x_8x/cpu.c                            | 1 +
 arch/m68k/cpu/mcf547x_8x/cpu_init.c                       | 1 +
 arch/m68k/cpu/mcf547x_8x/slicetimer.c                     | 1 +
 arch/m68k/lib/time.c                                      | 1 +
 arch/microblaze/cpu/timer.c                               | 1 +
 arch/mips/cpu/cpu.c                                       | 1 +
 arch/mips/lib/stack.c                                     | 1 +
 arch/mips/mach-ath79/cpu.c                                | 1 +
 arch/mips/mach-bmips/dram.c                               | 1 +
 arch/mips/mach-jz47xx/jz4780/sdram.c                      | 1 +
 arch/mips/mach-jz47xx/jz4780/timer.c                      | 1 +
 arch/mips/mach-mscc/cpu.c                                 | 1 +
 arch/mips/mach-mscc/dram.c                                | 1 +
 arch/mips/mach-mtmips/cpu.c                               | 1 +
 arch/mips/mach-mtmips/spl.c                               | 1 +
 arch/mips/mach-pic32/cpu.c                                | 1 +
 arch/nds32/cpu/n1213/ag101/timer.c                        | 1 +
 arch/nios2/cpu/cpu.c                                      | 1 +
 arch/powerpc/cpu/mpc83xx/pci.c                            | 1 +
 arch/powerpc/cpu/mpc85xx/cmd_errata.c                     | 1 +
 arch/powerpc/cpu/mpc85xx/cpu.c                            | 1 +
 arch/powerpc/cpu/mpc86xx/cpu_init.c                       | 1 +
 arch/powerpc/cpu/mpc8xx/cpu_init.c                        | 1 +
 arch/powerpc/cpu/mpc8xxx/cpu.c                            | 1 +
 arch/powerpc/cpu/mpc8xxx/fsl_lbc.c                        | 1 +
 arch/powerpc/lib/stack.c                                  | 1 +
 arch/powerpc/lib/time.c                                   | 1 +
 arch/riscv/cpu/cpu.c                                      | 1 +
 arch/riscv/lib/spl.c                                      | 1 +
 arch/sandbox/cpu/spl.c                                    | 1 +
 arch/sandbox/cpu/start.c                                  | 1 +
 arch/sh/lib/time.c                                        | 1 +
 arch/sh/lib/time_sh2.c                                    | 1 +
 arch/x86/cpu/apollolake/cpu_spl.c                         | 1 +
 arch/x86/cpu/apollolake/fsp_s.c                           | 1 +
 arch/x86/cpu/braswell/braswell.c                          | 1 +
 arch/x86/cpu/broadwell/cpu.c                              | 1 +
 arch/x86/cpu/broadwell/cpu_from_spl.c                     | 1 +
 arch/x86/cpu/broadwell/cpu_full.c                         | 1 +
 arch/x86/cpu/broadwell/refcode.c                          | 1 +
 arch/x86/cpu/coreboot/coreboot.c                          | 1 +
 arch/x86/cpu/efi/app.c                                    | 1 +
 arch/x86/cpu/intel_common/cpu_from_spl.c                  | 1 +
 arch/x86/cpu/ivybridge/cpu.c                              | 1 +
 arch/x86/cpu/ivybridge/ivybridge.c                        | 1 +
 arch/x86/cpu/ivybridge/sdram_nop.c                        | 1 +
 arch/x86/cpu/qemu/qemu.c                                  | 1 +
 arch/x86/cpu/quark/quark.c                                | 1 +
 arch/x86/cpu/queensbay/tnc.c                              | 1 +
 arch/x86/cpu/slimbootloader/slimbootloader.c              | 1 +
 arch/x86/cpu/tangier/tangier.c                            | 1 +
 arch/x86/cpu/x86_64/cpu.c                                 | 1 +
 arch/x86/lib/fsp/fsp_common.c                             | 1 +
 arch/x86/lib/fsp/fsp_graphics.c                           | 1 +
 arch/x86/lib/fsp1/fsp_common.c                            | 1 +
 arch/x86/lib/fsp1/fsp_dram.c                              | 1 +
 arch/x86/lib/fsp2/fsp_dram.c                              | 1 +
 arch/x86/lib/spl.c                                        | 1 +
 arch/x86/lib/tpl.c                                        | 1 +
 arch/xtensa/cpu/cpu.c                                     | 1 +
 board/BuR/brppt2/board.c                                  | 1 +
 board/LaCie/net2big_v2/net2big_v2.c                       | 1 +
 board/LaCie/netspace_v2/netspace_v2.c                     | 1 +
 board/Marvell/aspenite/aspenite.c                         | 1 +
 board/Marvell/db-88f6281-bp/db-88f6281-bp.c               | 1 +
 board/Marvell/db-88f6720/db-88f6720.c                     | 1 +
 board/Marvell/db-88f6820-amc/db-88f6820-amc.c             | 1 +
 board/Marvell/db-88f6820-gp/db-88f6820-gp.c               | 1 +
 board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c               | 1 +
 board/Marvell/db-xc3-24g4xg/db-xc3-24g4xg.c               | 1 +
 board/Marvell/dreamplug/dreamplug.c                       | 1 +
 board/Marvell/gplugd/gplugd.c                             | 1 +
 board/Marvell/guruplug/guruplug.c                         | 1 +
 board/Marvell/mvebu_armada-37xx/board.c                   | 1 +
 board/Marvell/openrd/openrd.c                             | 1 +
 board/Marvell/sheevaplug/sheevaplug.c                     | 1 +
 board/Seagate/dockstar/dockstar.c                         | 1 +
 board/Seagate/goflexhome/goflexhome.c                     | 1 +
 board/Seagate/nas220/nas220.c                             | 1 +
 board/Synology/ds109/ds109.c                              | 1 +
 board/Synology/ds414/ds414.c                              | 1 +
 board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c     | 1 +
 board/advantech/imx8qm_rom7720_a1/spl.c                   | 1 +
 board/advantech/som-db5800-som-6867/som-db5800-som-6867.c | 1 +
 board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c               | 1 +
 board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c           | 1 +
 board/alliedtelesis/x530/x530.c                           | 1 +
 board/amazon/kc1/kc1.c                                    | 1 +
 board/amlogic/p200/p200.c                                 | 1 +
 board/amlogic/p201/p201.c                                 | 1 +
 board/amlogic/p212/p212.c                                 | 1 +
 board/amlogic/q200/q200.c                                 | 1 +
 board/amlogic/s400/s400.c                                 | 1 +
 board/amlogic/sei510/sei510.c                             | 1 +
 board/amlogic/sei610/sei610.c                             | 1 +
 board/amlogic/u200/u200.c                                 | 1 +
 board/amlogic/w400/w400.c                                 | 1 +
 board/aristainetos/aristainetos.c                         | 1 +
 board/armltd/vexpress64/pcie.c                            | 1 +
 board/armltd/vexpress64/vexpress64.c                      | 1 +
 board/atmel/at91sam9260ek/led.c                           | 1 +
 board/atmel/common/video_display.c                        | 1 +
 board/bachmann/ot1200/ot1200.c                            | 1 +
 board/bachmann/ot1200/ot1200_spl.c                        | 1 +
 board/barco/platinum/spl_picon.c                          | 1 +
 board/barco/platinum/spl_titanium.c                       | 1 +
 board/bluegiga/apx4devkit/apx4devkit.c                    | 1 +
 board/bosch/guardian/board.c                              | 1 +
 board/boundary/nitrogen6x/nitrogen6x.c                    | 1 +
 board/broadcom/bcm963158/bcm963158.c                      | 1 +
 board/broadcom/bcm968360bg/bcm968360bg.c                  | 1 +
 board/broadcom/bcm968580xref/bcm968580xref.c              | 1 +
 board/bticino/mamoj/mamoj.c                               | 1 +
 board/bticino/mamoj/spl.c                                 | 1 +
 board/buffalo/lsxl/lsxl.c                                 | 1 +
 board/ccv/xpress/spl.c                                    | 1 +
 board/cirrus/edb93xx/edb93xx.c                            | 1 +
 board/cloudengines/pogo_e02/pogo_e02.c                    | 1 +
 board/compulab/cm_t35/cm_t35.c                            | 1 +
 board/corscience/tricorder/tricorder.c                    | 1 +
 board/cortina/presidio-asic/presidio.c                    | 1 +
 board/creative/xfi3/xfi3.c                                | 1 +
 board/d-link/dns325/dns325.c                              | 1 +
 board/davinci/da8xxevm/da850evm.c                         | 1 +
 board/davinci/da8xxevm/omapl138_lcdk.c                    | 1 +
 board/dhelectronics/dh_imx6/dh_imx6_spl.c                 | 1 +
 board/ea/mx7ulp_com/mx7ulp_com.c                          | 1 +
 board/elgin/elgin_rv1108/elgin_rv1108.c                   | 1 +
 board/emulation/qemu-arm/qemu-arm.c                       | 1 +
 board/engicam/common/spl.c                                | 1 +
 board/freescale/b4860qds/ddr.c                            | 1 +
 board/freescale/bsc9131rdb/bsc9131rdb.c                   | 1 +
 board/freescale/common/sys_eeprom.c                       | 1 +
 board/freescale/corenet_ds/ddr.c                          | 1 +
 board/freescale/imx8mm_evk/imx8mm_evk.c                   | 1 +
 board/freescale/imx8mm_evk/spl.c                          | 1 +
 board/freescale/imx8mn_evk/imx8mn_evk.c                   | 1 +
 board/freescale/imx8mn_evk/spl.c                          | 1 +
 board/freescale/imx8mp_evk/imx8mp_evk.c                   | 1 +
 board/freescale/imx8mp_evk/spl.c                          | 1 +
 board/freescale/imx8mq_evk/spl.c                          | 1 +
 board/freescale/imx8qm_mek/spl.c                          | 1 +
 board/freescale/imx8qxp_mek/spl.c                         | 1 +
 board/freescale/imxrt1050-evk/imxrt1050-evk.c             | 1 +
 board/freescale/ls1012afrdm/ls1012afrdm.c                 | 1 +
 board/freescale/ls1012aqds/ls1012aqds.c                   | 1 +
 board/freescale/ls1012ardb/ls1012ardb.c                   | 1 +
 board/freescale/ls1021aqds/ddr.c                          | 1 +
 board/freescale/ls1028a/ls1028a.c                         | 1 +
 board/freescale/ls1043aqds/ls1043aqds.c                   | 1 +
 board/freescale/ls1043ardb/ls1043ardb.c                   | 1 +
 board/freescale/ls1046afrwy/ls1046afrwy.c                 | 1 +
 board/freescale/ls1046aqds/ls1046aqds.c                   | 1 +
 board/freescale/ls1046ardb/ls1046ardb.c                   | 1 +
 board/freescale/ls1088a/ls1088a.c                         | 1 +
 board/freescale/ls2080a/ls2080a.c                         | 1 +
 board/freescale/ls2080aqds/ls2080aqds.c                   | 1 +
 board/freescale/ls2080ardb/ls2080ardb.c                   | 1 +
 board/freescale/lx2160a/lx2160a.c                         | 1 +
 board/freescale/m5253demo/flash.c                         | 1 +
 board/freescale/m5282evb/m5282evb.c                       | 1 +
 board/freescale/mpc8313erdb/sdram.c                       | 1 +
 board/freescale/mpc8315erdb/sdram.c                       | 1 +
 board/freescale/mpc8349emds/mpc8349emds.c                 | 1 +
 board/freescale/mpc8349itx/mpc8349itx.c                   | 1 +
 board/freescale/mx23evk/mx23evk.c                         | 1 +
 board/freescale/mx28evk/mx28evk.c                         | 1 +
 board/freescale/mx6memcal/mx6memcal.c                     | 1 +
 board/freescale/mx6memcal/spl.c                           | 1 +
 board/freescale/mx6qarm2/mx6qarm2.c                       | 1 +
 board/freescale/mx6slevk/mx6slevk.c                       | 1 +
 board/freescale/mx7ulp_evk/mx7ulp_evk.c                   | 1 +
 board/freescale/p2041rdb/ddr.c                            | 1 +
 board/freescale/t102xqds/ddr.c                            | 1 +
 board/freescale/t102xrdb/ddr.c                            | 1 +
 board/freescale/t1040qds/ddr.c                            | 1 +
 board/freescale/t104xrdb/ddr.c                            | 1 +
 board/freescale/t208xqds/ddr.c                            | 1 +
 board/freescale/t208xrdb/ddr.c                            | 1 +
 board/freescale/t4qds/ddr.c                               | 1 +
 board/freescale/t4rdb/ddr.c                               | 1 +
 board/gateworks/gw_ventana/gw_ventana.c                   | 1 +
 board/gateworks/gw_ventana/gw_ventana_spl.c               | 1 +
 board/google/gru/gru.c                                    | 1 +
 board/google/veyron/veyron.c                              | 1 +
 board/gumstix/duovero/duovero.c                           | 1 +
 board/gumstix/pepper/board.c                              | 1 +
 board/highbank/highbank.c                                 | 1 +
 board/hisilicon/hikey/hikey.c                             | 1 +
 board/hisilicon/hikey960/hikey960.c                       | 1 +
 board/imgtec/boston/checkboard.c                          | 1 +
 board/imgtec/ci20/ci20.c                                  | 1 +
 board/imgtec/xilfpga/xilfpga.c                            | 1 +
 board/intel/cougarcanyon2/cougarcanyon2.c                 | 1 +
 board/intel/crownbay/crownbay.c                           | 1 +
 board/intel/minnowmax/minnowmax.c                         | 1 +
 board/iomega/iconnect/iconnect.c                          | 1 +
 board/isee/igep00x0/igep00x0.c                            | 1 +
 board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c                 | 1 +
 board/keymile/kmp204x/ddr.c                               | 1 +
 board/kmc/kzm9g/kzm9g.c                                   | 1 +
 board/kobol/helios4/helios4.c                             | 1 +
 board/lego/ev3/legoev3.c                                  | 1 +
 board/lg/sniper/sniper.c                                  | 1 +
 board/liebherr/display5/display5.c                        | 1 +
 board/liebherr/display5/spl.c                             | 1 +
 board/liebherr/mccmon6/spl.c                              | 1 +
 board/liebherr/xea/xea.c                                  | 1 +
 board/logicpd/am3517evm/am3517evm.c                       | 1 +
 board/logicpd/zoom1/zoom1.c                               | 1 +
 board/maxbcm/maxbcm.c                                     | 1 +
 board/mediatek/mt7622/mt7622_rfb.c                        | 1 +
 board/mediatek/mt8518/mt8518_ap1.c                        | 1 +
 board/microchip/mpfs_icicle/mpfs_icicle.c                 | 1 +
 board/microchip/pic32mzda/pic32mzda.c                     | 1 +
 board/mikrotik/crs305-1g-4s/crs305-1g-4s.c                | 1 +
 board/netgear/dgnd3700v2/dgnd3700v2.c                     | 1 +
 board/nokia/rx51/rx51.c                                   | 1 +
 board/novtech/meerkat96/meerkat96.c                       | 1 +
 board/olimex/mx23_olinuxino/mx23_olinuxino.c              | 1 +
 board/overo/overo.c                                       | 1 +
 board/pandora/pandora.c                                   | 1 +
 board/phytec/pcl063/spl.c                                 | 1 +
 board/phytec/pcm051/board.c                               | 1 +
 board/phytium/durian/durian.c                             | 1 +
 board/pine64/rockpro64_rk3399/rockpro64-rk3399.c          | 1 +
 board/ppcag/bg0900/bg0900.c                               | 1 +
 board/qca/ap121/ap121.c                                   | 1 +
 board/qca/ap143/ap143.c                                   | 1 +
 board/qca/ap152/ap152.c                                   | 1 +
 board/qemu-mips/qemu-mips.c                               | 1 +
 board/qualcomm/dragonboard820c/dragonboard820c.c          | 1 +
 board/raidsonic/ib62x0/ib62x0.c                           | 1 +
 board/renesas/MigoR/migo_r.c                              | 1 +
 board/renesas/alt/alt.c                                   | 1 +
 board/renesas/alt/alt_spl.c                               | 1 +
 board/renesas/blanche/blanche.c                           | 1 +
 board/renesas/condor/condor.c                             | 1 +
 board/renesas/draak/draak.c                               | 1 +
 board/renesas/eagle/eagle.c                               | 1 +
 board/renesas/ebisu/ebisu.c                               | 1 +
 board/renesas/gose/gose.c                                 | 1 +
 board/renesas/gose/gose_spl.c                             | 1 +
 board/renesas/grpeach/grpeach.c                           | 1 +
 board/renesas/koelsch/koelsch.c                           | 1 +
 board/renesas/koelsch/koelsch_spl.c                       | 1 +
 board/renesas/lager/lager.c                               | 1 +
 board/renesas/lager/lager_spl.c                           | 1 +
 board/renesas/porter/porter.c                             | 1 +
 board/renesas/porter/porter_spl.c                         | 1 +
 board/renesas/rcar-common/common.c                        | 1 +
 board/renesas/rcar-common/gen3-spl.c                      | 1 +
 board/renesas/salvator-x/salvator-x.c                     | 1 +
 board/renesas/sh7763rdp/sh7763rdp.c                       | 1 +
 board/renesas/silk/silk.c                                 | 1 +
 board/renesas/silk/silk_spl.c                             | 1 +
 board/renesas/stout/stout.c                               | 1 +
 board/renesas/stout/stout_spl.c                           | 1 +
 board/renesas/ulcb/ulcb.c                                 | 1 +
 board/rockchip/evb_rk3399/evb-rk3399.c                    | 1 +
 board/rockchip/evb_rv1108/evb_rv1108.c                    | 1 +
 board/samsung/goni/goni.c                                 | 1 +
 board/sandisk/sansa_fuze_plus/sfp.c                       | 1 +
 board/sbc8349/sbc8349.c                                   | 1 +
 board/schulercontrol/sc_sps_1/sc_sps_1.c                  | 1 +
 board/seeed/linkit-smart-7688/board.c                     | 1 +
 board/siemens/capricorn/board.c                           | 1 +
 board/siemens/capricorn/spl.c                             | 1 +
 board/siemens/common/board.c                              | 1 +
 board/sifive/fu540/fu540.c                                | 1 +
 board/silica/pengwyn/board.c                              | 1 +
 board/sks-kinkel/sksimx6/sksimx6.c                        | 1 +
 board/socrates/socrates.c                                 | 1 +
 board/solidrun/clearfog/clearfog.c                        | 1 +
 board/sr1500/socfpga.c                                    | 1 +
 board/st/stih410-b2260/board.c                            | 1 +
 board/st/stm32f429-discovery/stm32f429-discovery.c        | 1 +
 board/st/stm32f429-evaluation/stm32f429-evaluation.c      | 1 +
 board/st/stm32f469-discovery/stm32f469-discovery.c        | 1 +
 board/st/stv0991/stv0991.c                                | 1 +
 board/ste/stemmy/stemmy.c                                 | 1 +
 board/sunxi/dram_sun4i_auto.c                             | 1 +
 board/sunxi/dram_sun5i_auto.c                             | 1 +
 board/synopsys/axs10x/axs10x.c                            | 1 +
 board/synopsys/emsdp/emsdp.c                              | 1 +
 board/synopsys/iot_devkit/iot_devkit.c                    | 1 +
 board/synopsys/nsim/nsim.c                                | 1 +
 board/tbs/tbs2910/tbs2910.c                               | 1 +
 board/technexion/pico-imx6/pico-imx6.c                    | 1 +
 board/technexion/pico-imx6/spl.c                          | 1 +
 board/technexion/pico-imx6ul/pico-imx6ul.c                | 1 +
 board/technexion/pico-imx7d/spl.c                         | 1 +
 board/technexion/tao3530/tao3530.c                        | 1 +
 board/technologic/ts4600/ts4600.c                         | 1 +
 board/theobroma-systems/puma_rk3399/puma-rk3399.c         | 1 +
 board/ti/am3517crane/am3517crane.c                        | 1 +
 board/ti/beagle/beagle.c                                  | 1 +
 board/ti/evm/evm.c                                        | 1 +
 board/ti/ks2_evm/board_k2e.c                              | 1 +
 board/ti/ks2_evm/board_k2hk.c                             | 1 +
 board/ti/ks2_evm/board_k2l.c                              | 1 +
 board/ti/omap5_uevm/evm.c                                 | 1 +
 board/ti/panda/panda.c                                    | 1 +
 board/ti/sdp4430/sdp.c                                    | 1 +
 board/ti/ti814x/evm.c                                     | 1 +
 board/ti/ti816x/evm.c                                     | 1 +
 board/timll/devkit8000/devkit8000.c                       | 1 +
 board/toradex/apalis-tk1/apalis-tk1.c                     | 1 +
 board/toradex/apalis_t30/apalis_t30.c                     | 1 +
 board/toradex/colibri_pxa270/colibri_pxa270.c             | 1 +
 board/toradex/colibri_t20/colibri_t20.c                   | 1 +
 board/toradex/colibri_t30/colibri_t30.c                   | 1 +
 board/toradex/common/tdx-common.c                         | 1 +
 board/toradex/verdin-imx8mm/spl.c                         | 1 +
 board/toradex/verdin-imx8mm/verdin-imx8mm.c               | 1 +
 board/tplink/wdr4300/wdr4300.c                            | 1 +
 board/udoo/udoo_spl.c                                     | 1 +
 board/variscite/dart_6ul/dart_6ul.c                       | 1 +
 board/variscite/dart_6ul/spl.c                            | 1 +
 board/varisys/cyrus/ddr.c                                 | 1 +
 board/wandboard/spl.c                                     | 1 +
 board/xes/common/board.c                                  | 1 +
 board/xilinx/zynqmp_r5/board.c                            | 1 +
 board/zyxel/nsa310s/nsa310s.c                             | 1 +
 cmd/pci.c                                                 | 1 +
 cmd/tlv_eeprom.c                                          | 1 +
 common/board_info.c                                       | 1 +
 common/init/board_init.c                                  | 1 +
 common/lcd.c                                              | 1 +
 common/spl/spl.c                                          | 1 +
 drivers/clk/clk_stm32mp1.c                                | 1 +
 drivers/cpu/bmips_cpu.c                                   | 1 +
 drivers/ddr/altera/sdram_arria10.c                        | 1 +
 drivers/ddr/altera/sdram_soc64.c                          | 1 +
 drivers/ddr/fsl/main.c                                    | 1 +
 drivers/dma/lpc32xx_dma.c                                 | 1 +
 drivers/fpga/fpga.c                                       | 1 +
 drivers/mtd/cfi_flash.c                                   | 1 +
 drivers/mtd/pic32_flash.c                                 | 1 +
 drivers/pci/fsl_pci_init.c                                | 1 +
 drivers/pci/pci-uclass.c                                  | 1 +
 drivers/pci/pci_ftpci100.c                                | 1 +
 drivers/pci/pci_gt64120.c                                 | 1 +
 drivers/pci/pci_msc01.c                                   | 1 +
 drivers/pci/pcie_layerscape_fixup.c                       | 1 +
 drivers/pci/pcie_layerscape_fixup_common.c                | 1 +
 drivers/ram/imxrt_sdram.c                                 | 1 +
 drivers/ram/rockchip/sdram_px30.c                         | 1 +
 drivers/ram/rockchip/sdram_rk3188.c                       | 1 +
 drivers/ram/rockchip/sdram_rk322x.c                       | 1 +
 drivers/ram/rockchip/sdram_rk3288.c                       | 1 +
 drivers/ram/rockchip/sdram_rk3328.c                       | 1 +
 drivers/ram/rockchip/sdram_rk3399.c                       | 1 +
 drivers/ram/stm32_sdram.c                                 | 1 +
 drivers/timer/cadence-ttc.c                               | 1 +
 drivers/timer/rockchip_timer.c                            | 1 +
 drivers/timer/timer-uclass.c                              | 1 +
 drivers/usb/gadget/f_thor.c                               | 1 +
 drivers/usb/host/ehci-pci.c                               | 1 +
 drivers/usb/host/ohci-lpc32xx.c                           | 1 +
 drivers/usb/host/xhci-pci.c                               | 1 +
 fs/ubifs/io.c                                             | 1 +
 include/common.h                                          | 1 -
 lib/efi/efi_app.c                                         | 1 +
 lib/time.c                                                | 1 +
 535 files changed, 535 insertions(+), 2 deletions(-)

diff --git a/arch/arc/lib/cpu.c b/arch/arc/lib/cpu.c
index 83246550ec..f032f3e2f2 100644
--- a/arch/arc/lib/cpu.c
+++ b/arch/arc/lib/cpu.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <malloc.h>
 #include <vsprintf.h>
 #include <asm/arcregs.h>
diff --git a/arch/arc/lib/init_helpers.c b/arch/arc/lib/init_helpers.c
index c853f25d34..023eae1907 100644
--- a/arch/arc/lib/init_helpers.c
+++ b/arch/arc/lib/init_helpers.c
@@ -3,6 +3,7 @@
  * Copyright (C) 2013-2015 Synopsys, Inc. All rights reserved.
  */
 
+#include <init.h>
 #include <asm/cache.h>
 #include <common.h>
 
diff --git a/arch/arm/cpu/arm1136/mx31/generic.c b/arch/arm/cpu/arm1136/mx31/generic.c
index 3f6af6f5a3..a3d4f14796 100644
--- a/arch/arm/cpu/arm1136/mx31/generic.c
+++ b/arch/arm/cpu/arm1136/mx31/generic.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <div64.h>
+#include <init.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
 #include <asm/io.h>
diff --git a/arch/arm/cpu/arm1136/mx31/timer.c b/arch/arm/cpu/arm1136/mx31/timer.c
index 3d07ee6809..a913860491 100644
--- a/arch/arm/cpu/arm1136/mx31/timer.c
+++ b/arch/arm/cpu/arm1136/mx31/timer.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/io.h>
 
diff --git a/arch/arm/cpu/arm1136/mx35/generic.c b/arch/arm/cpu/arm1136/mx35/generic.c
index c78f2cbfc9..4c45810fbe 100644
--- a/arch/arm/cpu/arm1136/mx35/generic.c
+++ b/arch/arm/cpu/arm1136/mx35/generic.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <clock_legacy.h>
 #include <div64.h>
+#include <init.h>
 #include <net.h>
 #include <asm/io.h>
 #include <linux/errno.h>
diff --git a/arch/arm/cpu/arm1136/mx35/timer.c b/arch/arm/cpu/arm1136/mx35/timer.c
index c1cdf35fb2..cb351ecf76 100644
--- a/arch/arm/cpu/arm1136/mx35/timer.c
+++ b/arch/arm/cpu/arm1136/mx35/timer.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/crm_regs.h>
diff --git a/arch/arm/cpu/arm920t/ep93xx/timer.c b/arch/arm/cpu/arm920t/ep93xx/timer.c
index 4829c996be..0ee6034220 100644
--- a/arch/arm/cpu/arm920t/ep93xx/timer.c
+++ b/arch/arm/cpu/arm920t/ep93xx/timer.c
@@ -12,6 +12,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <time.h>
 #include <linux/types.h>
 #include <asm/arch/ep93xx.h>
diff --git a/arch/arm/cpu/arm926ejs/armada100/cpu.c b/arch/arm/cpu/arm926ejs/armada100/cpu.c
index 0c81de7e36..96726b3144 100644
--- a/arch/arm/cpu/arm926ejs/armada100/cpu.c
+++ b/arch/arm/cpu/arm926ejs/armada100/cpu.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/armada100.h>
 
diff --git a/arch/arm/cpu/arm926ejs/armada100/dram.c b/arch/arm/cpu/arm926ejs/armada100/dram.c
index f4e1f0db09..da0615faf1 100644
--- a/arch/arm/cpu/arm926ejs/armada100/dram.c
+++ b/arch/arm/cpu/arm926ejs/armada100/dram.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/armada100.h>
 
diff --git a/arch/arm/cpu/arm926ejs/armada100/timer.c b/arch/arm/cpu/arm926ejs/armada100/timer.c
index f4962ec45f..b9941fcb2f 100644
--- a/arch/arm/cpu/arm926ejs/armada100/timer.c
+++ b/arch/arm/cpu/arm926ejs/armada100/timer.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <time.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/armada100.h>
diff --git a/arch/arm/cpu/arm926ejs/lpc32xx/cpu.c b/arch/arm/cpu/arm926ejs/lpc32xx/cpu.c
index 2bc3513abf..ee15a9453d 100644
--- a/arch/arm/cpu/arm926ejs/lpc32xx/cpu.c
+++ b/arch/arm/cpu/arm926ejs/lpc32xx/cpu.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <net.h>
 #include <netdev.h>
 #include <asm/arch/cpu.h>
diff --git a/arch/arm/cpu/arm926ejs/lpc32xx/timer.c b/arch/arm/cpu/arm926ejs/lpc32xx/timer.c
index 3a896d10ca..46b7b46659 100644
--- a/arch/arm/cpu/arm926ejs/lpc32xx/timer.c
+++ b/arch/arm/cpu/arm926ejs/lpc32xx/timer.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <time.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/clk.h>
diff --git a/arch/arm/cpu/arm926ejs/mx25/generic.c b/arch/arm/cpu/arm926ejs/mx25/generic.c
index ef8d2d202d..8f6cd4dc19 100644
--- a/arch/arm/cpu/arm926ejs/mx25/generic.c
+++ b/arch/arm/cpu/arm926ejs/mx25/generic.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <clock_legacy.h>
 #include <div64.h>
+#include <init.h>
 #include <net.h>
 #include <netdev.h>
 #include <vsprintf.h>
diff --git a/arch/arm/cpu/arm926ejs/mx25/timer.c b/arch/arm/cpu/arm926ejs/mx25/timer.c
index 04698fe563..7e2698b605 100644
--- a/arch/arm/cpu/arm926ejs/mx25/timer.c
+++ b/arch/arm/cpu/arm926ejs/mx25/timer.c
@@ -20,6 +20,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 
diff --git a/arch/arm/cpu/arm926ejs/mx27/timer.c b/arch/arm/cpu/arm926ejs/mx27/timer.c
index f51f0df8ec..193588ea10 100644
--- a/arch/arm/cpu/arm926ejs/mx27/timer.c
+++ b/arch/arm/cpu/arm926ejs/mx27/timer.c
@@ -17,6 +17,7 @@
 
 #include <common.h>
 #include <div64.h>
+#include <init.h>
 #include <time.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
diff --git a/arch/arm/cpu/arm926ejs/mxs/mxs.c b/arch/arm/cpu/arm926ejs/mxs/mxs.c
index f65053c4b6..72988417ac 100644
--- a/arch/arm/cpu/arm926ejs/mxs/mxs.c
+++ b/arch/arm/cpu/arm926ejs/mxs/mxs.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <hang.h>
+#include <init.h>
 #include <net.h>
 #include <linux/errno.h>
 #include <asm/io.h>
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
index 9168b91f27..83dd8b625e 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <config.h>
+#include <init.h>
 #include <serial.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
diff --git a/arch/arm/cpu/arm926ejs/mxs/timer.c b/arch/arm/cpu/arm926ejs/mxs/timer.c
index 226401dd6e..b6fdc88be7 100644
--- a/arch/arm/cpu/arm926ejs/mxs/timer.c
+++ b/arch/arm/cpu/arm926ejs/mxs/timer.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <time.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
diff --git a/arch/arm/cpu/arm926ejs/spear/cpu.c b/arch/arm/cpu/arm926ejs/spear/cpu.c
index 51c4a730f4..f5192240e4 100644
--- a/arch/arm/cpu/arm926ejs/spear/cpu.c
+++ b/arch/arm/cpu/arm926ejs/spear/cpu.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/spr_misc.h>
diff --git a/arch/arm/cpu/arm926ejs/spear/spl.c b/arch/arm/cpu/arm926ejs/spear/spl.c
index a919a455eb..7b14ba05b4 100644
--- a/arch/arm/cpu/arm926ejs/spear/spl.c
+++ b/arch/arm/cpu/arm926ejs/spear/spl.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <spl.h>
 #include <version.h>
 #include <asm/io.h>
diff --git a/arch/arm/cpu/arm926ejs/spear/timer.c b/arch/arm/cpu/arm926ejs/spear/timer.c
index 28c09e9fd6..9db1c74b36 100644
--- a/arch/arm/cpu/arm926ejs/spear/timer.c
+++ b/arch/arm/cpu/arm926ejs/spear/timer.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <time.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
diff --git a/arch/arm/cpu/armv7/arch_timer.c b/arch/arm/cpu/armv7/arch_timer.c
index 2eb571050a..871629c233 100644
--- a/arch/arm/cpu/armv7/arch_timer.c
+++ b/arch/arm/cpu/armv7/arch_timer.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <time.h>
 #include <asm/io.h>
 #include <div64.h>
diff --git a/arch/arm/cpu/armv7/iproc-common/timer.c b/arch/arm/cpu/armv7/iproc-common/timer.c
index 668b5e11a6..5c109764e9 100644
--- a/arch/arm/cpu/armv7/iproc-common/timer.c
+++ b/arch/arm/cpu/armv7/iproc-common/timer.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <div64.h>
+#include <init.h>
 #include <time.h>
 #include <asm/io.h>
 #include <asm/iproc-common/timer.h>
diff --git a/arch/arm/cpu/armv7/ls102xa/cpu.c b/arch/arm/cpu/armv7/ls102xa/cpu.c
index c544f38641..e9464ee7e4 100644
--- a/arch/arm/cpu/armv7/ls102xa/cpu.c
+++ b/arch/arm/cpu/armv7/ls102xa/cpu.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <net.h>
 #include <vsprintf.h>
 #include <asm/arch/clock.h>
diff --git a/arch/arm/cpu/armv7/ls102xa/timer.c b/arch/arm/cpu/armv7/ls102xa/timer.c
index a5f4e31ac7..46ade4ae86 100644
--- a/arch/arm/cpu/armv7/ls102xa/timer.c
+++ b/arch/arm/cpu/armv7/ls102xa/timer.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <time.h>
 #include <asm/io.h>
 #include <div64.h>
diff --git a/arch/arm/cpu/armv7/s5p-common/cpu_info.c b/arch/arm/cpu/armv7/s5p-common/cpu_info.c
index 5f4076d6b7..7790f087a0 100644
--- a/arch/arm/cpu/armv7/s5p-common/cpu_info.c
+++ b/arch/arm/cpu/armv7/s5p-common/cpu_info.c
@@ -5,6 +5,7 @@
  */
 #include <common.h>
 #include <fdtdec.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/clk.h>
 
diff --git a/arch/arm/cpu/armv7/s5p-common/timer.c b/arch/arm/cpu/armv7/s5p-common/timer.c
index e54cfb06dc..d2b5b4d3fc 100644
--- a/arch/arm/cpu/armv7/s5p-common/timer.c
+++ b/arch/arm/cpu/armv7/s5p-common/timer.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <div64.h>
+#include <init.h>
 #include <time.h>
 #include <asm/io.h>
 #include <asm/arch/pwm.h>
diff --git a/arch/arm/cpu/armv7/stv0991/timer.c b/arch/arm/cpu/armv7/stv0991/timer.c
index 695bdd7a5c..5adccab012 100644
--- a/arch/arm/cpu/armv7/stv0991/timer.c
+++ b/arch/arm/cpu/armv7/stv0991/timer.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <time.h>
 #include <asm/io.h>
 #include <asm/arch-stv0991/hardware.h>
diff --git a/arch/arm/cpu/armv7/sunxi/timer.c b/arch/arm/cpu/armv7/sunxi/timer.c
index 6bda5fbbb6..4f6a66d803 100644
--- a/arch/arm/cpu/armv7/sunxi/timer.c
+++ b/arch/arm/cpu/armv7/sunxi/timer.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <time.h>
 #include <asm/io.h>
 #include <asm/arch/timer.h>
diff --git a/arch/arm/cpu/armv7/vf610/generic.c b/arch/arm/cpu/armv7/vf610/generic.c
index c1ba69893f..da43e34394 100644
--- a/arch/arm/cpu/armv7/vf610/generic.c
+++ b/arch/arm/cpu/armv7/vf610/generic.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <clock_legacy.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <net.h>
 #include <asm/cache.h>
 #include <asm/io.h>
diff --git a/arch/arm/cpu/armv7/vf610/timer.c b/arch/arm/cpu/armv7/vf610/timer.c
index f858de953d..229e9e959e 100644
--- a/arch/arm/cpu/armv7/vf610/timer.c
+++ b/arch/arm/cpu/armv7/vf610/timer.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <time.h>
 #include <asm/io.h>
 #include <div64.h>
diff --git a/arch/arm/cpu/armv7m/systick-timer.c b/arch/arm/cpu/armv7m/systick-timer.c
index 5c310d306d..dbe1b61977 100644
--- a/arch/arm/cpu/armv7m/systick-timer.c
+++ b/arch/arm/cpu/armv7m/systick-timer.c
@@ -22,6 +22,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <time.h>
 #include <asm/io.h>
 
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/spl.c b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
index c0201341ea..ec40df41f6 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/spl.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
@@ -8,6 +8,7 @@
 #include <cpu_func.h>
 #include <env.h>
 #include <image.h>
+#include <init.h>
 #include <spl.h>
 #include <asm/cache.h>
 #include <asm/io.h>
diff --git a/arch/arm/cpu/armv8/s32v234/cpu.c b/arch/arm/cpu/armv8/s32v234/cpu.c
index f910b6ed72..5394a6697e 100644
--- a/arch/arm/cpu/armv8/s32v234/cpu.c
+++ b/arch/arm/cpu/armv8/s32v234/cpu.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/system.h>
diff --git a/arch/arm/cpu/armv8/s32v234/generic.c b/arch/arm/cpu/armv8/s32v234/generic.c
index 98f526e252..bc07dae318 100644
--- a/arch/arm/cpu/armv8/s32v234/generic.c
+++ b/arch/arm/cpu/armv8/s32v234/generic.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <clock_legacy.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <net.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
diff --git a/arch/arm/cpu/pxa/cpuinfo.c b/arch/arm/cpu/pxa/cpuinfo.c
index 5379e13e2b..0d9542f998 100644
--- a/arch/arm/cpu/pxa/cpuinfo.c
+++ b/arch/arm/cpu/pxa/cpuinfo.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <errno.h>
 #include <linux/compiler.h>
diff --git a/arch/arm/cpu/pxa/pxa2xx.c b/arch/arm/cpu/pxa/pxa2xx.c
index ecf85d2f14..ea91d8aaec 100644
--- a/arch/arm/cpu/pxa/pxa2xx.c
+++ b/arch/arm/cpu/pxa/pxa2xx.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <irq_func.h>
 #include <asm/arch/pxa-regs.h>
 #include <asm/cache.h>
diff --git a/arch/arm/cpu/pxa/timer.c b/arch/arm/cpu/pxa/timer.c
index 169fed808b..8e9d610441 100644
--- a/arch/arm/cpu/pxa/timer.c
+++ b/arch/arm/cpu/pxa/timer.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 
 int timer_init(void)
diff --git a/arch/arm/lib/spl.c b/arch/arm/lib/spl.c
index 8a24e34f62..5d5437cbbc 100644
--- a/arch/arm/lib/spl.c
+++ b/arch/arm/lib/spl.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <config.h>
+#include <init.h>
 #include <spl.h>
 #include <image.h>
 #include <asm/cache.h>
diff --git a/arch/arm/lib/stack.c b/arch/arm/lib/stack.c
index c89a219dd2..96a248c0a9 100644
--- a/arch/arm/lib/stack.c
+++ b/arch/arm/lib/stack.c
@@ -11,6 +11,7 @@
  * Marius Groeger <mgroeger@sysgo.de>
  */
 #include <common.h>
+#include <init.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-aspeed/ast2500-board.c b/arch/arm/mach-aspeed/ast2500-board.c
index e7edd544e2..20594e0efb 100644
--- a/arch/arm/mach-aspeed/ast2500-board.c
+++ b/arch/arm/mach-aspeed/ast2500-board.c
@@ -4,6 +4,7 @@
  */
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 #include <ram.h>
 #include <timer.h>
 #include <asm/io.h>
diff --git a/arch/arm/mach-at91/arm920t/cpu.c b/arch/arm/mach-at91/arm920t/cpu.c
index 42d0d2269f..44c079c0fd 100644
--- a/arch/arm/mach-at91/arm920t/cpu.c
+++ b/arch/arm/mach-at91/arm920t/cpu.c
@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/clk.h>
diff --git a/arch/arm/mach-at91/arm920t/timer.c b/arch/arm/mach-at91/arm920t/timer.c
index 3aef9538b4..1e014ad9c9 100644
--- a/arch/arm/mach-at91/arm920t/timer.c
+++ b/arch/arm/mach-at91/arm920t/timer.c
@@ -14,6 +14,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <time.h>
 
 #include <asm/io.h>
diff --git a/arch/arm/mach-at91/arm926ejs/cpu.c b/arch/arm/mach-at91/arm926ejs/cpu.c
index e9b4e06595..761edb6df5 100644
--- a/arch/arm/mach-at91/arm926ejs/cpu.c
+++ b/arch/arm/mach-at91/arm926ejs/cpu.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <vsprintf.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
diff --git a/arch/arm/mach-at91/arm926ejs/timer.c b/arch/arm/mach-at91/arm926ejs/timer.c
index 31ad0bf702..42ef349966 100644
--- a/arch/arm/mach-at91/arm926ejs/timer.c
+++ b/arch/arm/mach-at91/arm926ejs/timer.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <time.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
diff --git a/arch/arm/mach-at91/armv7/cpu.c b/arch/arm/mach-at91/armv7/cpu.c
index 4474a96743..a8f4356ce9 100644
--- a/arch/arm/mach-at91/armv7/cpu.c
+++ b/arch/arm/mach-at91/armv7/cpu.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <vsprintf.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
diff --git a/arch/arm/mach-at91/armv7/timer.c b/arch/arm/mach-at91/armv7/timer.c
index 15c036cc27..a6346c01b2 100644
--- a/arch/arm/mach-at91/armv7/timer.c
+++ b/arch/arm/mach-at91/armv7/timer.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <time.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
diff --git a/arch/arm/mach-at91/spl_at91.c b/arch/arm/mach-at91/spl_at91.c
index 822f877de7..b78cafdd9c 100644
--- a/arch/arm/mach-at91/spl_at91.c
+++ b/arch/arm/mach-at91/spl_at91.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <hang.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/at91_common.h>
 #include <asm/arch/at91sam9_matrix.h>
diff --git a/arch/arm/mach-at91/spl_atmel.c b/arch/arm/mach-at91/spl_atmel.c
index 6ee0e1c24c..f40bc531d4 100644
--- a/arch/arm/mach-at91/spl_atmel.c
+++ b/arch/arm/mach-at91/spl_atmel.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <hang.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/at91_common.h>
 #include <asm/arch/at91_pit.h>
diff --git a/arch/arm/mach-bcm283x/init.c b/arch/arm/mach-bcm283x/init.c
index 9966d6c833..f4d00d892d 100644
--- a/arch/arm/mach-bcm283x/init.c
+++ b/arch/arm/mach-bcm283x/init.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <dm/device.h>
 #include <fdt_support.h>
 
diff --git a/arch/arm/mach-davinci/cpu.c b/arch/arm/mach-davinci/cpu.c
index 9fd6564d04..40dd44af67 100644
--- a/arch/arm/mach-davinci/cpu.c
+++ b/arch/arm/mach-davinci/cpu.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/arch/hardware.h>
 #include <asm/io.h>
 
diff --git a/arch/arm/mach-davinci/da850_lowlevel.c b/arch/arm/mach-davinci/da850_lowlevel.c
index 822e0dc4a1..07bf19b5e4 100644
--- a/arch/arm/mach-davinci/da850_lowlevel.c
+++ b/arch/arm/mach-davinci/da850_lowlevel.c
@@ -6,6 +6,7 @@
  * Heiko Schocher, DENX Software Engineering, hs at denx.de.
  */
 #include <common.h>
+#include <init.h>
 #include <nand.h>
 #include <ns16550.h>
 #include <post.h>
diff --git a/arch/arm/mach-davinci/spl.c b/arch/arm/mach-davinci/spl.c
index d44e840aa0..5fea935d6e 100644
--- a/arch/arm/mach-davinci/spl.c
+++ b/arch/arm/mach-davinci/spl.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <config.h>
 #include <hang.h>
+#include <init.h>
 #include <spl.h>
 #include <asm/u-boot.h>
 #include <asm/utils.h>
diff --git a/arch/arm/mach-davinci/timer.c b/arch/arm/mach-davinci/timer.c
index 9846463c60..ebe985f795 100644
--- a/arch/arm/mach-davinci/timer.c
+++ b/arch/arm/mach-davinci/timer.c
@@ -21,6 +21,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <time.h>
 #include <asm/io.h>
 #include <asm/arch/timer_defs.h>
diff --git a/arch/arm/mach-exynos/lowlevel_init.c b/arch/arm/mach-exynos/lowlevel_init.c
index ecd0105121..97d6ca8fc2 100644
--- a/arch/arm/mach-exynos/lowlevel_init.c
+++ b/arch/arm/mach-exynos/lowlevel_init.c
@@ -27,6 +27,7 @@
 #include <config.h>
 #include <debug_uart.h>
 #include <asm/system.h>
+#include <init.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/dmc.h>
 #include <asm/arch/power.h>
diff --git a/arch/arm/mach-exynos/spl_boot.c b/arch/arm/mach-exynos/spl_boot.c
index 8b2c5c79c0..d9672e79ef 100644
--- a/arch/arm/mach-exynos/spl_boot.c
+++ b/arch/arm/mach-exynos/spl_boot.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <config.h>
+#include <init.h>
 
 #include <asm/cache.h>
 #include <asm/arch/clock.h>
diff --git a/arch/arm/mach-highbank/timer.c b/arch/arm/mach-highbank/timer.c
index cd08ff444d..2423a0e378 100644
--- a/arch/arm/mach-highbank/timer.c
+++ b/arch/arm/mach-highbank/timer.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch-armv7/systimer.h>
 
diff --git a/arch/arm/mach-imx/cpu.c b/arch/arm/mach-imx/cpu.c
index 0a2c43378f..97464391d5 100644
--- a/arch/arm/mach-imx/cpu.c
+++ b/arch/arm/mach-imx/cpu.c
@@ -8,6 +8,7 @@
 
 #include <bootm.h>
 #include <common.h>
+#include <init.h>
 #include <net.h>
 #include <netdev.h>
 #include <linux/errno.h>
diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c
index 89229da3b6..1551717cc0 100644
--- a/arch/arm/mach-imx/imx8m/soc.c
+++ b/arch/arm/mach-imx/imx8m/soc.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
diff --git a/arch/arm/mach-imx/imxrt/soc.c b/arch/arm/mach-imx/imxrt/soc.c
index e1eea23035..8d5fae9a97 100644
--- a/arch/arm/mach-imx/imxrt/soc.c
+++ b/arch/arm/mach-imx/imxrt/soc.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/armv7_mpu.h>
 
diff --git a/arch/arm/mach-imx/mx7/soc.c b/arch/arm/mach-imx/mx7/soc.c
index 4aafeed188..60e688c518 100644
--- a/arch/arm/mach-imx/mx7/soc.c
+++ b/arch/arm/mach-imx/mx7/soc.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c
index fd3fa04600..4af3e6985c 100644
--- a/arch/arm/mach-imx/spl.c
+++ b/arch/arm/mach-imx/spl.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <hang.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-imx/syscounter.c b/arch/arm/mach-imx/syscounter.c
index 5a292c3964..db1c2c1e01 100644
--- a/arch/arm/mach-imx/syscounter.c
+++ b/arch/arm/mach-imx/syscounter.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <time.h>
 #include <asm/io.h>
 #include <div64.h>
diff --git a/arch/arm/mach-imx/timer.c b/arch/arm/mach-imx/timer.c
index 5fe5c51f6a..fa1941aec4 100644
--- a/arch/arm/mach-imx/timer.c
+++ b/arch/arm/mach-imx/timer.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <time.h>
 #include <asm/io.h>
 #include <div64.h>
diff --git a/arch/arm/mach-k3/am6_init.c b/arch/arm/mach-k3/am6_init.c
index b692806352..ddc9f3c4f4 100644
--- a/arch/arm/mach-k3/am6_init.c
+++ b/arch/arm/mach-k3/am6_init.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <spl.h>
 #include <asm/arch/hardware.h>
diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c
index af1020be95..53cad78dd5 100644
--- a/arch/arm/mach-k3/common.c
+++ b/arch/arm/mach-k3/common.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <image.h>
+#include <init.h>
 #include <spl.h>
 #include "common.h"
 #include <dm.h>
diff --git a/arch/arm/mach-k3/j721e_init.c b/arch/arm/mach-k3/j721e_init.c
index 71fc20c30b..7a999f9d9c 100644
--- a/arch/arm/mach-k3/j721e_init.c
+++ b/arch/arm/mach-k3/j721e_init.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <asm/armv7_mpu.h>
diff --git a/arch/arm/mach-keystone/init.c b/arch/arm/mach-keystone/init.c
index 59fd029e4c..d947d40eac 100644
--- a/arch/arm/mach-keystone/init.c
+++ b/arch/arm/mach-keystone/init.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <ns16550.h>
 #include <asm/cache.h>
 #include <asm/io.h>
diff --git a/arch/arm/mach-keystone/keystone.c b/arch/arm/mach-keystone/keystone.c
index 7441052a55..1d79927ac7 100644
--- a/arch/arm/mach-keystone/keystone.c
+++ b/arch/arm/mach-keystone/keystone.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/psc_defs.h>
 #include <asm/arch/hardware.h>
diff --git a/arch/arm/mach-kirkwood/cpu.c b/arch/arm/mach-kirkwood/cpu.c
index c56620dc5a..d328fee8bd 100644
--- a/arch/arm/mach-kirkwood/cpu.c
+++ b/arch/arm/mach-kirkwood/cpu.c
@@ -9,6 +9,7 @@
 #include <command.h>
 #include <cpu_func.h>
 #include <env.h>
+#include <init.h>
 #include <net.h>
 #include <netdev.h>
 #include <asm/cache.h>
diff --git a/arch/arm/mach-mediatek/cpu.c b/arch/arm/mach-mediatek/cpu.c
index 5e5f3f0842..c329e7cc98 100644
--- a/arch/arm/mach-mediatek/cpu.c
+++ b/arch/arm/mach-mediatek/cpu.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <dm.h>
+#include <init.h>
 #include <wdt.h>
 #include <dm/uclass-internal.h>
 
diff --git a/arch/arm/mach-mediatek/mt7622/init.c b/arch/arm/mach-mediatek/mt7622/init.c
index a715378127..7f6ce80f37 100644
--- a/arch/arm/mach-mediatek/mt7622/init.c
+++ b/arch/arm/mach-mediatek/mt7622/init.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <fdtdec.h>
+#include <init.h>
 #include <asm/armv8/mmu.h>
 #include <asm/cache.h>
 
diff --git a/arch/arm/mach-mediatek/mt7629/init.c b/arch/arm/mach-mediatek/mt7629/init.c
index ba91a6eaa6..098892802b 100644
--- a/arch/arm/mach-mediatek/mt7629/init.c
+++ b/arch/arm/mach-mediatek/mt7629/init.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <fdtdec.h>
+#include <init.h>
 #include <ram.h>
 #include <asm/arch/misc.h>
 #include <asm/sections.h>
diff --git a/arch/arm/mach-mediatek/mt8512/init.c b/arch/arm/mach-mediatek/mt8512/init.c
index 4e6b710c11..9680251941 100644
--- a/arch/arm/mach-mediatek/mt8512/init.c
+++ b/arch/arm/mach-mediatek/mt8512/init.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <dm.h>
 #include <fdtdec.h>
+#include <init.h>
 #include <ram.h>
 #include <wdt.h>
 #include <asm/arch/misc.h>
diff --git a/arch/arm/mach-mediatek/mt8516/init.c b/arch/arm/mach-mediatek/mt8516/init.c
index b038437a17..13be391221 100644
--- a/arch/arm/mach-mediatek/mt8516/init.c
+++ b/arch/arm/mach-mediatek/mt8516/init.c
@@ -10,6 +10,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <fdtdec.h>
+#include <init.h>
 #include <ram.h>
 #include <asm/arch/misc.h>
 #include <asm/armv8/mmu.h>
diff --git a/arch/arm/mach-mediatek/mt8518/init.c b/arch/arm/mach-mediatek/mt8518/init.c
index c46cc5fcaf..531a403da1 100644
--- a/arch/arm/mach-mediatek/mt8518/init.c
+++ b/arch/arm/mach-mediatek/mt8518/init.c
@@ -11,6 +11,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <fdtdec.h>
+#include <init.h>
 #include <ram.h>
 #include <asm/arch/misc.h>
 #include <asm/armv8/mmu.h>
diff --git a/arch/arm/mach-mediatek/spl.c b/arch/arm/mach-mediatek/spl.c
index 37f1f219b2..927175c5a3 100644
--- a/arch/arm/mach-mediatek/spl.c
+++ b/arch/arm/mach-mediatek/spl.c
@@ -7,6 +7,7 @@
 #include <clk.h>
 #include <common.h>
 #include <hang.h>
+#include <init.h>
 #include <spl.h>
 
 #include "init.h"
diff --git a/arch/arm/mach-meson/board-info.c b/arch/arm/mach-meson/board-info.c
index 4b88afa9b7..bfae0c36ea 100644
--- a/arch/arm/mach-meson/board-info.c
+++ b/arch/arm/mach-meson/board-info.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <dm.h>
 #include <linux/bitfield.h>
diff --git a/arch/arm/mach-mvebu/armada3700/cpu.c b/arch/arm/mach-mvebu/armada3700/cpu.c
index 17d2d43bab..d6e84f1e20 100644
--- a/arch/arm/mach-mvebu/armada3700/cpu.c
+++ b/arch/arm/mach-mvebu/armada3700/cpu.c
@@ -8,6 +8,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <fdtdec.h>
+#include <init.h>
 #include <linux/libfdt.h>
 #include <asm/io.h>
 #include <asm/system.h>
diff --git a/arch/arm/mach-mvebu/cpu.c b/arch/arm/mach-mvebu/cpu.c
index fb241c7e4d..ab8b02956b 100644
--- a/arch/arm/mach-mvebu/cpu.c
+++ b/arch/arm/mach-mvebu/cpu.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <ahci.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <linux/mbus.h>
 #include <asm/io.h>
 #include <asm/pl310.h>
diff --git a/arch/arm/mach-mvebu/spl.c b/arch/arm/mach-mvebu/spl.c
index 70fef3b573..c6ecd5bee0 100644
--- a/arch/arm/mach-mvebu/spl.c
+++ b/arch/arm/mach-mvebu/spl.c
@@ -8,6 +8,7 @@
 #include <debug_uart.h>
 #include <fdtdec.h>
 #include <hang.h>
+#include <init.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
diff --git a/arch/arm/mach-mvebu/timer.c b/arch/arm/mach-mvebu/timer.c
index 2f6b4d1702..50b78cb07b 100644
--- a/arch/arm/mach-mvebu/timer.c
+++ b/arch/arm/mach-mvebu/timer.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/soc.h>
 
diff --git a/arch/arm/mach-omap2/am33xx/chilisom.c b/arch/arm/mach-omap2/am33xx/chilisom.c
index 3942305108..15b6b35ae7 100644
--- a/arch/arm/mach-omap2/am33xx/chilisom.c
+++ b/arch/arm/mach-omap2/am33xx/chilisom.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/clk_synthesizer.h>
 #include <asm/arch/cpu.h>
diff --git a/arch/arm/mach-omap2/am33xx/clock.c b/arch/arm/mach-omap2/am33xx/clock.c
index 8c61547ee9..862c5e0905 100644
--- a/arch/arm/mach-omap2/am33xx/clock.c
+++ b/arch/arm/mach-omap2/am33xx/clock.c
@@ -9,6 +9,7 @@
  */
 #include <common.h>
 #include <hang.h>
+#include <init.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/hardware.h>
diff --git a/arch/arm/mach-omap2/am33xx/sys_info.c b/arch/arm/mach-omap2/am33xx/sys_info.c
index 17b46619b5..338f6afcae 100644
--- a/arch/arm/mach-omap2/am33xx/sys_info.c
+++ b/arch/arm/mach-omap2/am33xx/sys_info.c
@@ -12,6 +12,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/cpu.h>
diff --git a/arch/arm/mach-omap2/clocks-common.c b/arch/arm/mach-omap2/clocks-common.c
index 9aff83e9df..f968a26d64 100644
--- a/arch/arm/mach-omap2/clocks-common.c
+++ b/arch/arm/mach-omap2/clocks-common.c
@@ -15,6 +15,7 @@
 #include <common.h>
 #include <hang.h>
 #include <i2c.h>
+#include <init.h>
 #include <asm/omap_common.h>
 #include <asm/gpio.h>
 #include <asm/arch/clock.h>
diff --git a/arch/arm/mach-omap2/hwinit-common.c b/arch/arm/mach-omap2/hwinit-common.c
index 772b4c4db5..7a7086776e 100644
--- a/arch/arm/mach-omap2/hwinit-common.c
+++ b/arch/arm/mach-omap2/hwinit-common.c
@@ -13,6 +13,7 @@
 #include <common.h>
 #include <debug_uart.h>
 #include <fdtdec.h>
+#include <init.h>
 #include <spl.h>
 #include <asm/arch/sys_proto.h>
 #include <linux/sizes.h>
diff --git a/arch/arm/mach-omap2/omap3/board.c b/arch/arm/mach-omap2/omap3/board.c
index 60de0d6052..b893fb732e 100644
--- a/arch/arm/mach-omap2/omap3/board.c
+++ b/arch/arm/mach-omap2/omap3/board.c
@@ -17,6 +17,7 @@
  */
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-omap2/omap3/emif4.c b/arch/arm/mach-omap2/omap3/emif4.c
index a8bd428e0c..4cfa132388 100644
--- a/arch/arm/mach-omap2/omap3/emif4.c
+++ b/arch/arm/mach-omap2/omap3/emif4.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/mem.h>
 #include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-omap2/omap3/sdrc.c b/arch/arm/mach-omap2/omap3/sdrc.c
index 861d01d6df..1d65ed6227 100644
--- a/arch/arm/mach-omap2/omap3/sdrc.c
+++ b/arch/arm/mach-omap2/omap3/sdrc.c
@@ -22,6 +22,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/mem.h>
 #include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index dbb68f718d..7752dd1565 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -16,6 +16,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <time.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
diff --git a/arch/arm/mach-orion5x/cpu.c b/arch/arm/mach-orion5x/cpu.c
index 7d57dd257f..d9abcacbb4 100644
--- a/arch/arm/mach-orion5x/cpu.c
+++ b/arch/arm/mach-orion5x/cpu.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <net.h>
 #include <netdev.h>
 #include <asm/cache.h>
diff --git a/arch/arm/mach-orion5x/timer.c b/arch/arm/mach-orion5x/timer.c
index 077eb63e74..a64d572112 100644
--- a/arch/arm/mach-orion5x/timer.c
+++ b/arch/arm/mach-orion5x/timer.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <time.h>
 #include <asm/io.h>
 
diff --git a/arch/arm/mach-owl/soc.c b/arch/arm/mach-owl/soc.c
index 8a434bd496..7d3f6f6285 100644
--- a/arch/arm/mach-owl/soc.c
+++ b/arch/arm/mach-owl/soc.c
@@ -6,6 +6,7 @@
  */
 
 #include <cpu_func.h>
+#include <init.h>
 #include <asm/cache.h>
 #include <linux/arm-smccc.h>
 #include <linux/psci.h>
diff --git a/arch/arm/mach-rmobile/board.c b/arch/arm/mach-rmobile/board.c
index 8a2d3ce621..a10371f74e 100644
--- a/arch/arm/mach-rmobile/board.c
+++ b/arch/arm/mach-rmobile/board.c
@@ -4,6 +4,7 @@
  * (C) Copyright 2012 Renesas Solutions Corp.
  */
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 
 #ifdef CONFIG_ARCH_RMOBILE_BOARD_STRING
diff --git a/arch/arm/mach-rmobile/cpu_info.c b/arch/arm/mach-rmobile/cpu_info.c
index 9b34cba047..fdbbd72e28 100644
--- a/arch/arm/mach-rmobile/cpu_info.c
+++ b/arch/arm/mach-rmobile/cpu_info.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <asm/cache.h>
+#include <init.h>
 #include <asm/io.h>
 #include <env.h>
 #include <linux/ctype.h>
diff --git a/arch/arm/mach-rmobile/timer.c b/arch/arm/mach-rmobile/timer.c
index 9fcab446a5..f88ccfde9f 100644
--- a/arch/arm/mach-rmobile/timer.c
+++ b/arch/arm/mach-rmobile/timer.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <div64.h>
+#include <init.h>
 #include <time.h>
 #include <asm/io.h>
 #include <asm/arch-armv7/globaltimer.h>
diff --git a/arch/arm/mach-rockchip/cpu-info.c b/arch/arm/mach-rockchip/cpu-info.c
index 4b0e99299a..08b7d3519d 100644
--- a/arch/arm/mach-rockchip/cpu-info.c
+++ b/arch/arm/mach-rockchip/cpu-info.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/clock.h>
 #include <asm/arch-rockchip/cru.h>
diff --git a/arch/arm/mach-rockchip/px30-board-tpl.c b/arch/arm/mach-rockchip/px30-board-tpl.c
index 8c8976f61c..085e650620 100644
--- a/arch/arm/mach-rockchip/px30-board-tpl.c
+++ b/arch/arm/mach-rockchip/px30-board-tpl.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <debug_uart.h>
 #include <dm.h>
+#include <init.h>
 #include <ram.h>
 #include <spl.h>
 #include <version.h>
diff --git a/arch/arm/mach-rockchip/px30/px30.c b/arch/arm/mach-rockchip/px30/px30.c
index 5014ee83d7..6fcef63c1b 100644
--- a/arch/arm/mach-rockchip/px30/px30.c
+++ b/arch/arm/mach-rockchip/px30/px30.c
@@ -5,6 +5,7 @@
 #include <common.h>
 #include <clk.h>
 #include <dm.h>
+#include <init.h>
 #include <asm/armv8/mmu.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/grf_px30.h>
diff --git a/arch/arm/mach-rockchip/rk3036-board-spl.c b/arch/arm/mach-rockchip/rk3036-board-spl.c
index fbc89b66c4..6eb89e15b8 100644
--- a/arch/arm/mach-rockchip/rk3036-board-spl.c
+++ b/arch/arm/mach-rockchip/rk3036-board-spl.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <debug_uart.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/bootrom.h>
 #include <asm/arch-rockchip/sdram_rk3036.h>
diff --git a/arch/arm/mach-rockchip/rk3036/rk3036.c b/arch/arm/mach-rockchip/rk3036/rk3036.c
index e0a6e4b025..e9e020ff3f 100644
--- a/arch/arm/mach-rockchip/rk3036/rk3036.c
+++ b/arch/arm/mach-rockchip/rk3036/rk3036.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/grf_rk3036.h>
 #include <asm/arch-rockchip/hardware.h>
diff --git a/arch/arm/mach-rockchip/rk3036/sdram_rk3036.c b/arch/arm/mach-rockchip/rk3036/sdram_rk3036.c
index c39cbb8111..3874716e52 100644
--- a/arch/arm/mach-rockchip/rk3036/sdram_rk3036.c
+++ b/arch/arm/mach-rockchip/rk3036/sdram_rk3036.c
@@ -3,6 +3,7 @@
  * (C) Copyright 2015 Rockchip Electronics Co., Ltd
  */
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/types.h>
 #include <asm/arch-rockchip/cru_rk3036.h>
diff --git a/arch/arm/mach-rockchip/rk3128/rk3128.c b/arch/arm/mach-rockchip/rk3128/rk3128.c
index ee176de80b..740bd2ba07 100644
--- a/arch/arm/mach-rockchip/rk3128/rk3128.c
+++ b/arch/arm/mach-rockchip/rk3128/rk3128.c
@@ -3,6 +3,7 @@
  * Copyright (c) 2017 Rockchip Electronics Co., Ltd
  */
 #include <common.h>
+#include <init.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-rockchip/rk3188/rk3188.c b/arch/arm/mach-rockchip/rk3188/rk3188.c
index e52466fb6f..dca9de28d4 100644
--- a/arch/arm/mach-rockchip/rk3188/rk3188.c
+++ b/arch/arm/mach-rockchip/rk3188/rk3188.c
@@ -5,6 +5,7 @@
 #include <common.h>
 #include <dm.h>
 #include <hang.h>
+#include <init.h>
 #include <syscon.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/bootrom.h>
diff --git a/arch/arm/mach-rockchip/rk322x/rk322x.c b/arch/arm/mach-rockchip/rk322x/rk322x.c
index 562117e6c1..ad4ac62e51 100644
--- a/arch/arm/mach-rockchip/rk322x/rk322x.c
+++ b/arch/arm/mach-rockchip/rk322x/rk322x.c
@@ -2,6 +2,7 @@
 /*
  * (C) Copyright 2019 Rockchip Electronics Co., Ltd
  */
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/bootrom.h>
 #include <asm/arch-rockchip/grf_rk322x.h>
diff --git a/arch/arm/mach-rockchip/rk3308/rk3308.c b/arch/arm/mach-rockchip/rk3308/rk3308.c
index edf5994709..35a5c79728 100644
--- a/arch/arm/mach-rockchip/rk3308/rk3308.c
+++ b/arch/arm/mach-rockchip/rk3308/rk3308.c
@@ -3,6 +3,7 @@
  *Copyright (c) 2018 Rockchip Electronics Co., Ltd
  */
 #include <common.h>
+#include <init.h>
 #include <malloc.h>
 #include <asm/io.h>
 #include <asm/arch/grf_rk3308.h>
diff --git a/arch/arm/mach-rockchip/rk3328/rk3328.c b/arch/arm/mach-rockchip/rk3328/rk3328.c
index 8c81242e5d..7c85b2663c 100644
--- a/arch/arm/mach-rockchip/rk3328/rk3328.c
+++ b/arch/arm/mach-rockchip/rk3328/rk3328.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/arch-rockchip/bootrom.h>
 #include <asm/arch-rockchip/hardware.h>
 #include <asm/arch-rockchip/grf_rk3328.h>
diff --git a/arch/arm/mach-rockchip/rk3368/rk3368.c b/arch/arm/mach-rockchip/rk3368/rk3368.c
index 20ae797794..bcc230c900 100644
--- a/arch/arm/mach-rockchip/rk3368/rk3368.c
+++ b/arch/arm/mach-rockchip/rk3368/rk3368.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <syscon.h>
 #include <asm/armv8/mmu.h>
 #include <asm/io.h>
diff --git a/arch/arm/mach-rockchip/rk3399/rk3399.c b/arch/arm/mach-rockchip/rk3399/rk3399.c
index 3a51194108..aaa7246393 100644
--- a/arch/arm/mach-rockchip/rk3399/rk3399.c
+++ b/arch/arm/mach-rockchip/rk3399/rk3399.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <fdt_support.h>
+#include <init.h>
 #include <spl.h>
 #include <spl_gpio.h>
 #include <syscon.h>
diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c
index 2796e41369..0d74989adb 100644
--- a/arch/arm/mach-rockchip/spl.c
+++ b/arch/arm/mach-rockchip/spl.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <hang.h>
 #include <image.h>
+#include <init.h>
 #include <ram.h>
 #include <spl.h>
 #include <asm/arch-rockchip/bootrom.h>
diff --git a/arch/arm/mach-rockchip/tpl.c b/arch/arm/mach-rockchip/tpl.c
index a2b8d31cbd..2de4e980e4 100644
--- a/arch/arm/mach-rockchip/tpl.c
+++ b/arch/arm/mach-rockchip/tpl.c
@@ -7,6 +7,7 @@
 #include <debug_uart.h>
 #include <dm.h>
 #include <hang.h>
+#include <init.h>
 #include <ram.h>
 #include <spl.h>
 #include <version.h>
diff --git a/arch/arm/mach-socfpga/board.c b/arch/arm/mach-socfpga/board.c
index 7c8c05cc31..340abf9305 100644
--- a/arch/arm/mach-socfpga/board.c
+++ b/arch/arm/mach-socfpga/board.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <init.h>
 #include <asm/arch/reset_manager.h>
 #include <asm/arch/clock_manager.h>
 #include <asm/arch/misc.h>
diff --git a/arch/arm/mach-socfpga/clock_manager.c b/arch/arm/mach-socfpga/clock_manager.c
index dbb10ecb68..0a6025fffa 100644
--- a/arch/arm/mach-socfpga/clock_manager.c
+++ b/arch/arm/mach-socfpga/clock_manager.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <wait_bit.h>
 #include <asm/io.h>
 #include <asm/arch/clock_manager.h>
diff --git a/arch/arm/mach-socfpga/misc.c b/arch/arm/mach-socfpga/misc.c
index 0158f4f04c..557305c703 100644
--- a/arch/arm/mach-socfpga/misc.c
+++ b/arch/arm/mach-socfpga/misc.c
@@ -7,6 +7,7 @@
 #include <cpu_func.h>
 #include <hang.h>
 #include <asm/cache.h>
+#include <init.h>
 #include <asm/io.h>
 #include <errno.h>
 #include <fdtdec.h>
diff --git a/arch/arm/mach-socfpga/misc_arria10.c b/arch/arm/mach-socfpga/misc_arria10.c
index d56349b7f3..bf978053ca 100644
--- a/arch/arm/mach-socfpga/misc_arria10.c
+++ b/arch/arm/mach-socfpga/misc_arria10.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <init.h>
 #include <miiphy.h>
 #include <netdev.h>
 #include <ns16550.h>
diff --git a/arch/arm/mach-socfpga/misc_gen5.c b/arch/arm/mach-socfpga/misc_gen5.c
index 21eb934e56..39acc8cfdb 100644
--- a/arch/arm/mach-socfpga/misc_gen5.c
+++ b/arch/arm/mach-socfpga/misc_gen5.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <asm/io.h>
 #include <env.h>
 #include <errno.h>
diff --git a/arch/arm/mach-socfpga/misc_s10.c b/arch/arm/mach-socfpga/misc_s10.c
index a3f5b4364e..a87dd44181 100644
--- a/arch/arm/mach-socfpga/misc_s10.c
+++ b/arch/arm/mach-socfpga/misc_s10.c
@@ -9,6 +9,7 @@
 #include <env.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <init.h>
 #include <miiphy.h>
 #include <netdev.h>
 #include <asm/io.h>
diff --git a/arch/arm/mach-socfpga/spl_a10.c b/arch/arm/mach-socfpga/spl_a10.c
index d2f52f2f2c..45aea4ab6c 100644
--- a/arch/arm/mach-socfpga/spl_a10.c
+++ b/arch/arm/mach-socfpga/spl_a10.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <hang.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/pl310.h>
 #include <asm/u-boot.h>
diff --git a/arch/arm/mach-socfpga/spl_agilex.c b/arch/arm/mach-socfpga/spl_agilex.c
index aa9f3e646c..0192cccbd1 100644
--- a/arch/arm/mach-socfpga/spl_agilex.c
+++ b/arch/arm/mach-socfpga/spl_agilex.c
@@ -4,6 +4,7 @@
  *
  */
 
+#include <init.h>
 #include <asm/io.h>
 #include <asm/u-boot.h>
 #include <asm/utils.h>
diff --git a/arch/arm/mach-socfpga/spl_gen5.c b/arch/arm/mach-socfpga/spl_gen5.c
index e9967ac450..6c9f45396d 100644
--- a/arch/arm/mach-socfpga/spl_gen5.c
+++ b/arch/arm/mach-socfpga/spl_gen5.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <hang.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/u-boot.h>
 #include <asm/utils.h>
diff --git a/arch/arm/mach-socfpga/spl_s10.c b/arch/arm/mach-socfpga/spl_s10.c
index 08427dd83e..0f8588ba0c 100644
--- a/arch/arm/mach-socfpga/spl_s10.c
+++ b/arch/arm/mach-socfpga/spl_s10.c
@@ -5,6 +5,7 @@
  */
 
 #include <hang.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/u-boot.h>
 #include <asm/utils.h>
diff --git a/arch/arm/mach-socfpga/timer.c b/arch/arm/mach-socfpga/timer.c
index f1c0262ae5..a58f1cf9d3 100644
--- a/arch/arm/mach-socfpga/timer.c
+++ b/arch/arm/mach-socfpga/timer.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/timer.h>
 
diff --git a/arch/arm/mach-socfpga/timer_s10.c b/arch/arm/mach-socfpga/timer_s10.c
index 57237892c3..3ad98bdb25 100644
--- a/arch/arm/mach-socfpga/timer_s10.c
+++ b/arch/arm/mach-socfpga/timer_s10.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/timer.h>
 
diff --git a/arch/arm/mach-stm32/soc.c b/arch/arm/mach-stm32/soc.c
index 41338a1a33..1f12da401c 100644
--- a/arch/arm/mach-stm32/soc.c
+++ b/arch/arm/mach-stm32/soc.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/armv7_mpu.h>
 
diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c
index 603c690a3d..001c246635 100644
--- a/arch/arm/mach-stm32mp/cpu.c
+++ b/arch/arm/mach-stm32mp/cpu.c
@@ -7,6 +7,7 @@
 #include <cpu_func.h>
 #include <debug_uart.h>
 #include <env.h>
+#include <init.h>
 #include <misc.h>
 #include <net.h>
 #include <asm/io.h>
diff --git a/arch/arm/mach-stm32mp/dram_init.c b/arch/arm/mach-stm32mp/dram_init.c
index 7688b3e315..f4cc609d2d 100644
--- a/arch/arm/mach-stm32mp/dram_init.c
+++ b/arch/arm/mach-stm32mp/dram_init.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 #include <ram.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-stm32mp/spl.c b/arch/arm/mach-stm32mp/spl.c
index f85391c6af..fefb255419 100644
--- a/arch/arm/mach-stm32mp/spl.c
+++ b/arch/arm/mach-stm32mp/spl.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <hang.h>
+#include <init.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c
index 11b333b563..32e3664265 100644
--- a/arch/arm/mach-sunxi/board.c
+++ b/arch/arm/mach-sunxi/board.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <mmc.h>
 #include <i2c.h>
 #include <serial.h>
diff --git a/arch/arm/mach-sunxi/cpu_info.c b/arch/arm/mach-sunxi/cpu_info.c
index ae4745bfec..875e5a1a8a 100644
--- a/arch/arm/mach-sunxi/cpu_info.c
+++ b/arch/arm/mach-sunxi/cpu_info.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/clock.h>
diff --git a/arch/arm/mach-sunxi/dram_sun50i_h6.c b/arch/arm/mach-sunxi/dram_sun50i_h6.c
index 9375db76a1..411a612393 100644
--- a/arch/arm/mach-sunxi/dram_sun50i_h6.c
+++ b/arch/arm/mach-sunxi/dram_sun50i_h6.c
@@ -1,11 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * sun50i H6 platform dram controller init
  *
  * (C) Copyright 2017      Icenowy Zheng <icenowy@aosc.io>
  *
- * SPDX-License-Identifier:	GPL-2.0+
  */
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/dram.h>
diff --git a/arch/arm/mach-sunxi/dram_sun6i.c b/arch/arm/mach-sunxi/dram_sun6i.c
index f473230bb5..8e781267c5 100644
--- a/arch/arm/mach-sunxi/dram_sun6i.c
+++ b/arch/arm/mach-sunxi/dram_sun6i.c
@@ -11,6 +11,7 @@
  */
 #include <common.h>
 #include <errno.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/dram.h>
diff --git a/arch/arm/mach-sunxi/dram_sun8i_a23.c b/arch/arm/mach-sunxi/dram_sun8i_a23.c
index 9f00fefb77..221f92869c 100644
--- a/arch/arm/mach-sunxi/dram_sun8i_a23.c
+++ b/arch/arm/mach-sunxi/dram_sun8i_a23.c
@@ -21,6 +21,7 @@
 
 #include <common.h>
 #include <errno.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/dram.h>
diff --git a/arch/arm/mach-sunxi/dram_sun8i_a33.c b/arch/arm/mach-sunxi/dram_sun8i_a33.c
index 5da01922bf..179acc7e6f 100644
--- a/arch/arm/mach-sunxi/dram_sun8i_a33.c
+++ b/arch/arm/mach-sunxi/dram_sun8i_a33.c
@@ -9,6 +9,7 @@
  */
 #include <common.h>
 #include <errno.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/dram.h>
diff --git a/arch/arm/mach-sunxi/dram_sun8i_a83t.c b/arch/arm/mach-sunxi/dram_sun8i_a83t.c
index 2c43b3ceba..2febb23654 100644
--- a/arch/arm/mach-sunxi/dram_sun8i_a83t.c
+++ b/arch/arm/mach-sunxi/dram_sun8i_a83t.c
@@ -9,6 +9,7 @@
  */
 #include <common.h>
 #include <errno.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/dram.h>
diff --git a/arch/arm/mach-sunxi/dram_sun9i.c b/arch/arm/mach-sunxi/dram_sun9i.c
index 77cc60623e..58ce05db6d 100644
--- a/arch/arm/mach-sunxi/dram_sun9i.c
+++ b/arch/arm/mach-sunxi/dram_sun9i.c
@@ -13,6 +13,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <init.h>
 #include <ram.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
diff --git a/arch/arm/mach-sunxi/dram_sunxi_dw.c b/arch/arm/mach-sunxi/dram_sunxi_dw.c
index 85e7a1874e..ea5fe108eb 100644
--- a/arch/arm/mach-sunxi/dram_sunxi_dw.c
+++ b/arch/arm/mach-sunxi/dram_sunxi_dw.c
@@ -9,6 +9,7 @@
  * (C) Copyright 2015      Jens Kuske <jenskuske@gmail.com>
  */
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/dram.h>
diff --git a/arch/arm/mach-tegra/cboot.c b/arch/arm/mach-tegra/cboot.c
index 4416827220..7cfbb6270f 100644
--- a/arch/arm/mach-tegra/cboot.c
+++ b/arch/arm/mach-tegra/cboot.c
@@ -8,6 +8,7 @@
 #include <fdt_support.h>
 #include <fdtdec.h>
 #include <hang.h>
+#include <init.h>
 #include <malloc.h>
 #include <net.h>
 #include <stdlib.h>
diff --git a/arch/arm/mach-tegra/sys_info.c b/arch/arm/mach-tegra/sys_info.c
index 5dc998a52b..5ad586ac17 100644
--- a/arch/arm/mach-tegra/sys_info.c
+++ b/arch/arm/mach-tegra/sys_info.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <linux/ctype.h>
 #if defined(CONFIG_TEGRA124) || defined(CONFIG_TEGRA30)
 #include <asm/arch-tegra/pmc.h>
diff --git a/arch/arm/mach-tegra/tegra114/clock.c b/arch/arm/mach-tegra/tegra114/clock.c
index ad09cc52eb..8d662c23d0 100644
--- a/arch/arm/mach-tegra/tegra114/clock.c
+++ b/arch/arm/mach-tegra/tegra114/clock.c
@@ -7,6 +7,7 @@
 /* Tegra114 Clock control functions */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sysctr.h>
diff --git a/arch/arm/mach-tegra/tegra124/clock.c b/arch/arm/mach-tegra/tegra124/clock.c
index 70916ea3c1..f02f8b0532 100644
--- a/arch/arm/mach-tegra/tegra124/clock.c
+++ b/arch/arm/mach-tegra/tegra124/clock.c
@@ -7,6 +7,7 @@
 /* Tegra124 Clock control functions */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sysctr.h>
diff --git a/arch/arm/mach-tegra/tegra20/clock.c b/arch/arm/mach-tegra/tegra20/clock.c
index 8f1bb4f069..4e607816a7 100644
--- a/arch/arm/mach-tegra/tegra20/clock.c
+++ b/arch/arm/mach-tegra/tegra20/clock.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <errno.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/tegra.h>
diff --git a/arch/arm/mach-tegra/tegra210/clock.c b/arch/arm/mach-tegra/tegra210/clock.c
index 492f4d8c11..ed0ad2ee8b 100644
--- a/arch/arm/mach-tegra/tegra210/clock.c
+++ b/arch/arm/mach-tegra/tegra210/clock.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <errno.h>
+#include <init.h>
 #include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
diff --git a/arch/arm/mach-tegra/tegra30/clock.c b/arch/arm/mach-tegra/tegra30/clock.c
index dd1193be14..ea17d14536 100644
--- a/arch/arm/mach-tegra/tegra30/clock.c
+++ b/arch/arm/mach-tegra/tegra30/clock.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <errno.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/tegra.h>
diff --git a/arch/arm/mach-u8500/cpuinfo.c b/arch/arm/mach-u8500/cpuinfo.c
index 20f5ff3398..ab05b8a51b 100644
--- a/arch/arm/mach-u8500/cpuinfo.c
+++ b/arch/arm/mach-u8500/cpuinfo.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 
 #define U8500_BOOTROM_BASE	0x90000000
diff --git a/arch/arm/mach-uniphier/arm32/timer.c b/arch/arm/mach-uniphier/arm32/timer.c
index 899b539104..b3c907b508 100644
--- a/arch/arm/mach-uniphier/arm32/timer.c
+++ b/arch/arm/mach-uniphier/arm32/timer.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <linux/io.h>
 
 #include "arm-mpcore.h"
diff --git a/arch/arm/mach-uniphier/cpu-info.c b/arch/arm/mach-uniphier/cpu-info.c
index 6a7b203a44..1ede50771e 100644
--- a/arch/arm/mach-uniphier/cpu-info.c
+++ b/arch/arm/mach-uniphier/cpu-info.c
@@ -5,6 +5,7 @@
  *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
  */
 
+#include <init.h>
 #include <stdio.h>
 #include <linux/errno.h>
 #include <linux/io.h>
diff --git a/arch/arm/mach-uniphier/dram/umc-pxs2.c b/arch/arm/mach-uniphier/dram/umc-pxs2.c
index 5392ffa603..b013571f36 100644
--- a/arch/arm/mach-uniphier/dram/umc-pxs2.c
+++ b/arch/arm/mach-uniphier/dram/umc-pxs2.c
@@ -7,6 +7,7 @@
  * Copyright (C) 2015 Socionext Inc.
  */
 
+#include <init.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/io.h>
diff --git a/arch/arm/mach-uniphier/dram_init.c b/arch/arm/mach-uniphier/dram_init.c
index 5f9d90fe6d..1127373b20 100644
--- a/arch/arm/mach-uniphier/dram_init.c
+++ b/arch/arm/mach-uniphier/dram_init.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <linux/errno.h>
 #include <linux/io.h>
 #include <linux/kernel.h>
diff --git a/arch/arm/mach-versal/clk.c b/arch/arm/mach-versal/clk.c
index 9184714e47..b1e34796d0 100644
--- a/arch/arm/mach-versal/clk.c
+++ b/arch/arm/mach-versal/clk.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <time.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-versal/cpu.c b/arch/arm/mach-versal/cpu.c
index 71731f324f..61c0b663fc 100644
--- a/arch/arm/mach-versal/cpu.c
+++ b/arch/arm/mach-versal/cpu.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/armv8/mmu.h>
 #include <asm/cache.h>
 #include <asm/io.h>
diff --git a/arch/arm/mach-zynq/clk.c b/arch/arm/mach-zynq/clk.c
index b578f6538a..1ace117fc8 100644
--- a/arch/arm/mach-zynq/clk.c
+++ b/arch/arm/mach-zynq/clk.c
@@ -6,6 +6,7 @@
 #include <clk.h>
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 #include <malloc.h>
 #include <asm/arch/clk.h>
 
diff --git a/arch/arm/mach-zynq/cpu.c b/arch/arm/mach-zynq/cpu.c
index 43c5ca39d4..77b7cb1307 100644
--- a/arch/arm/mach-zynq/cpu.c
+++ b/arch/arm/mach-zynq/cpu.c
@@ -5,6 +5,7 @@
  */
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <zynqpl.h>
 #include <asm/cache.h>
 #include <asm/io.h>
diff --git a/arch/arm/mach-zynq/spl.c b/arch/arm/mach-zynq/spl.c
index 627c84ceba..05f42e6e8b 100644
--- a/arch/arm/mach-zynq/spl.c
+++ b/arch/arm/mach-zynq/spl.c
@@ -6,6 +6,7 @@
 #include <debug_uart.h>
 #include <hang.h>
 #include <image.h>
+#include <init.h>
 #include <spl.h>
 #include <generated/dt.h>
 
diff --git a/arch/arm/mach-zynq/timer.c b/arch/arm/mach-zynq/timer.c
index d822e20d2b..cc0e24cbfe 100644
--- a/arch/arm/mach-zynq/timer.c
+++ b/arch/arm/mach-zynq/timer.c
@@ -31,6 +31,7 @@
 #include <common.h>
 #include <div64.h>
 #include <dm.h>
+#include <init.h>
 #include <time.h>
 #include <malloc.h>
 #include <asm/io.h>
diff --git a/arch/arm/mach-zynqmp-r5/cpu.c b/arch/arm/mach-zynqmp-r5/cpu.c
index aa5de863eb..b3402d7189 100644
--- a/arch/arm/mach-zynqmp-r5/cpu.c
+++ b/arch/arm/mach-zynqmp-r5/cpu.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <asm/armv7_mpu.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-zynqmp/clk.c b/arch/arm/mach-zynqmp/clk.c
index db2b4a8be2..5067b339c2 100644
--- a/arch/arm/mach-zynqmp/clk.c
+++ b/arch/arm/mach-zynqmp/clk.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <time.h>
 #include <asm/arch/clk.h>
 #include <asm/arch/hardware.h>
diff --git a/arch/arm/mach-zynqmp/cpu.c b/arch/arm/mach-zynqmp/cpu.c
index d832406434..3eb8e8f448 100644
--- a/arch/arm/mach-zynqmp/cpu.c
+++ b/arch/arm/mach-zynqmp/cpu.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <time.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
diff --git a/arch/m68k/cpu/mcf5227x/cpu.c b/arch/m68k/cpu/mcf5227x/cpu.c
index 34534d876b..1590d4a954 100644
--- a/arch/m68k/cpu/mcf5227x/cpu.c
+++ b/arch/m68k/cpu/mcf5227x/cpu.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <vsprintf.h>
 #include <watchdog.h>
 #include <command.h>
diff --git a/arch/m68k/cpu/mcf5227x/cpu_init.c b/arch/m68k/cpu/mcf5227x/cpu_init.c
index 7cde4c6105..4ab13b4d8e 100644
--- a/arch/m68k/cpu/mcf5227x/cpu_init.c
+++ b/arch/m68k/cpu/mcf5227x/cpu_init.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <watchdog.h>
 
 #include <asm/immap.h>
diff --git a/arch/m68k/cpu/mcf523x/cpu.c b/arch/m68k/cpu/mcf523x/cpu.c
index 8c808a6b0c..225bdc2d25 100644
--- a/arch/m68k/cpu/mcf523x/cpu.c
+++ b/arch/m68k/cpu/mcf523x/cpu.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <net.h>
 #include <vsprintf.h>
 #include <watchdog.h>
diff --git a/arch/m68k/cpu/mcf523x/cpu_init.c b/arch/m68k/cpu/mcf523x/cpu_init.c
index 8c6e12d548..87effa71dc 100644
--- a/arch/m68k/cpu/mcf523x/cpu_init.c
+++ b/arch/m68k/cpu/mcf523x/cpu_init.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <watchdog.h>
 #include <asm/immap.h>
 #include <asm/io.h>
diff --git a/arch/m68k/cpu/mcf52x2/cpu.c b/arch/m68k/cpu/mcf52x2/cpu.c
index 5eee856392..1f70d90f0b 100644
--- a/arch/m68k/cpu/mcf52x2/cpu.c
+++ b/arch/m68k/cpu/mcf52x2/cpu.c
@@ -14,6 +14,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <net.h>
 #include <vsprintf.h>
 #include <watchdog.h>
diff --git a/arch/m68k/cpu/mcf52x2/cpu_init.c b/arch/m68k/cpu/mcf52x2/cpu_init.c
index f39fe19baf..9d4a10f028 100644
--- a/arch/m68k/cpu/mcf52x2/cpu_init.c
+++ b/arch/m68k/cpu/mcf52x2/cpu_init.c
@@ -19,6 +19,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <watchdog.h>
 #include <asm/immap.h>
 #include <asm/io.h>
diff --git a/arch/m68k/cpu/mcf530x/cpu.c b/arch/m68k/cpu/mcf530x/cpu.c
index a76deebc68..bef9047b35 100644
--- a/arch/m68k/cpu/mcf530x/cpu.c
+++ b/arch/m68k/cpu/mcf530x/cpu.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <vsprintf.h>
 #include <asm/immap.h>
 #include <asm/io.h>
diff --git a/arch/m68k/cpu/mcf530x/cpu_init.c b/arch/m68k/cpu/mcf530x/cpu_init.c
index 166720aef5..83529408eb 100644
--- a/arch/m68k/cpu/mcf530x/cpu_init.c
+++ b/arch/m68k/cpu/mcf530x/cpu_init.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <watchdog.h>
 #include <asm/immap.h>
 #include <asm/io.h>
diff --git a/arch/m68k/cpu/mcf532x/cpu.c b/arch/m68k/cpu/mcf532x/cpu.c
index 32c477a5fd..52b64a94a7 100644
--- a/arch/m68k/cpu/mcf532x/cpu.c
+++ b/arch/m68k/cpu/mcf532x/cpu.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <net.h>
 #include <vsprintf.h>
 #include <watchdog.h>
diff --git a/arch/m68k/cpu/mcf532x/cpu_init.c b/arch/m68k/cpu/mcf532x/cpu_init.c
index bd130c1b0c..1311f3967c 100644
--- a/arch/m68k/cpu/mcf532x/cpu_init.c
+++ b/arch/m68k/cpu/mcf532x/cpu_init.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <watchdog.h>
 #include <asm/immap.h>
 #include <asm/io.h>
diff --git a/arch/m68k/cpu/mcf5445x/cpu.c b/arch/m68k/cpu/mcf5445x/cpu.c
index 1602369080..cb1514c600 100644
--- a/arch/m68k/cpu/mcf5445x/cpu.c
+++ b/arch/m68k/cpu/mcf5445x/cpu.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <net.h>
 #include <vsprintf.h>
 #include <watchdog.h>
diff --git a/arch/m68k/cpu/mcf5445x/cpu_init.c b/arch/m68k/cpu/mcf5445x/cpu_init.c
index 6ee23f0db2..9deab51d07 100644
--- a/arch/m68k/cpu/mcf5445x/cpu_init.c
+++ b/arch/m68k/cpu/mcf5445x/cpu_init.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <watchdog.h>
 #include <asm/immap.h>
 #include <asm/processor.h>
diff --git a/arch/m68k/cpu/mcf547x_8x/cpu.c b/arch/m68k/cpu/mcf547x_8x/cpu.c
index 51281549a3..2a64c7b6f6 100644
--- a/arch/m68k/cpu/mcf547x_8x/cpu.c
+++ b/arch/m68k/cpu/mcf547x_8x/cpu.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <net.h>
 #include <vsprintf.h>
 #include <watchdog.h>
diff --git a/arch/m68k/cpu/mcf547x_8x/cpu_init.c b/arch/m68k/cpu/mcf547x_8x/cpu_init.c
index 8779384c0a..8e42b63141 100644
--- a/arch/m68k/cpu/mcf547x_8x/cpu_init.c
+++ b/arch/m68k/cpu/mcf547x_8x/cpu_init.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <MCD_dma.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <asm/immap.h>
 #include <asm/io.h>
 
diff --git a/arch/m68k/cpu/mcf547x_8x/slicetimer.c b/arch/m68k/cpu/mcf547x_8x/slicetimer.c
index 885659e342..c4988f9031 100644
--- a/arch/m68k/cpu/mcf547x_8x/slicetimer.c
+++ b/arch/m68k/cpu/mcf547x_8x/slicetimer.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <irq_func.h>
 
 #include <asm/timer.h>
diff --git a/arch/m68k/lib/time.c b/arch/m68k/lib/time.c
index bde1f4c228..eab6e2088e 100644
--- a/arch/m68k/lib/time.c
+++ b/arch/m68k/lib/time.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <irq_func.h>
 #include <time.h>
 
diff --git a/arch/microblaze/cpu/timer.c b/arch/microblaze/cpu/timer.c
index 805eac7fa3..e07fc628d1 100644
--- a/arch/microblaze/cpu/timer.c
+++ b/arch/microblaze/cpu/timer.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <fdtdec.h>
+#include <init.h>
 #include <time.h>
 #include <asm/microblaze_timer.h>
 #include <asm/microblaze_intc.h>
diff --git a/arch/mips/cpu/cpu.c b/arch/mips/cpu/cpu.c
index a403ff729b..682bee6be2 100644
--- a/arch/mips/cpu/cpu.c
+++ b/arch/mips/cpu/cpu.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <init.h>
 #include <linux/compiler.h>
 #include <asm/cache.h>
 #include <asm/mipsregs.h>
diff --git a/arch/mips/lib/stack.c b/arch/mips/lib/stack.c
index 99fd056905..4d1d98c3ad 100644
--- a/arch/mips/lib/stack.c
+++ b/arch/mips/lib/stack.c
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0+
 
 #include <common.h>
+#include <init.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/mips/mach-ath79/cpu.c b/arch/mips/mach-ath79/cpu.c
index 9afc672602..31e87d6206 100644
--- a/arch/mips/mach-ath79/cpu.c
+++ b/arch/mips/mach-ath79/cpu.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
diff --git a/arch/mips/mach-bmips/dram.c b/arch/mips/mach-bmips/dram.c
index 87ced7c5d5..764ce89231 100644
--- a/arch/mips/mach-bmips/dram.c
+++ b/arch/mips/mach-bmips/dram.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <ram.h>
 #include <dm.h>
 
diff --git a/arch/mips/mach-jz47xx/jz4780/sdram.c b/arch/mips/mach-jz47xx/jz4780/sdram.c
index 65afefe53e..3049a63d57 100644
--- a/arch/mips/mach-jz47xx/jz4780/sdram.c
+++ b/arch/mips/mach-jz47xx/jz4780/sdram.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <hang.h>
+#include <init.h>
 #include <asm/io.h>
 #include <mach/jz4780.h>
 #include <mach/jz4780_dram.h>
diff --git a/arch/mips/mach-jz47xx/jz4780/timer.c b/arch/mips/mach-jz47xx/jz4780/timer.c
index b32a2f5643..340e35e6fc 100644
--- a/arch/mips/mach-jz47xx/jz4780/timer.c
+++ b/arch/mips/mach-jz47xx/jz4780/timer.c
@@ -9,6 +9,7 @@
 #include <config.h>
 #include <common.h>
 #include <div64.h>
+#include <init.h>
 #include <irq_func.h>
 #include <time.h>
 #include <asm/io.h>
diff --git a/arch/mips/mach-mscc/cpu.c b/arch/mips/mach-mscc/cpu.c
index 3ee589891b..8273a0f5aa 100644
--- a/arch/mips/mach-mscc/cpu.c
+++ b/arch/mips/mach-mscc/cpu.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 
 #include <asm/io.h>
 #include <asm/types.h>
diff --git a/arch/mips/mach-mscc/dram.c b/arch/mips/mach-mscc/dram.c
index 72c70c9e84..b12bac63c2 100644
--- a/arch/mips/mach-mscc/dram.c
+++ b/arch/mips/mach-mscc/dram.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 
 #include <asm/io.h>
 #include <asm/types.h>
diff --git a/arch/mips/mach-mtmips/cpu.c b/arch/mips/mach-mtmips/cpu.c
index 459a9673eb..9ee5c7fdf6 100644
--- a/arch/mips/mach-mtmips/cpu.c
+++ b/arch/mips/mach-mtmips/cpu.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <malloc.h>
 #include <linux/io.h>
 #include <linux/sizes.h>
diff --git a/arch/mips/mach-mtmips/spl.c b/arch/mips/mach-mtmips/spl.c
index 2a24af70c3..38d9e9160d 100644
--- a/arch/mips/mach-mtmips/spl.c
+++ b/arch/mips/mach-mtmips/spl.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <fdt.h>
+#include <init.h>
 #include <spl.h>
 #include <asm/sections.h>
 #include <linux/sizes.h>
diff --git a/arch/mips/mach-pic32/cpu.c b/arch/mips/mach-pic32/cpu.c
index 8075d93d41..1d8c397144 100644
--- a/arch/mips/mach-pic32/cpu.c
+++ b/arch/mips/mach-pic32/cpu.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <clk.h>
 #include <dm.h>
+#include <init.h>
 #include <malloc.h>
 #include <mach/pic32.h>
 #include <mach/ddr.h>
diff --git a/arch/nds32/cpu/n1213/ag101/timer.c b/arch/nds32/cpu/n1213/ag101/timer.c
index f2e362102e..c59585692d 100644
--- a/arch/nds32/cpu/n1213/ag101/timer.c
+++ b/arch/nds32/cpu/n1213/ag101/timer.c
@@ -9,6 +9,7 @@
  */
 #ifndef CONFIG_TIMER
 #include <common.h>
+#include <init.h>
 #include <irq_func.h>
 #include <time.h>
 #include <asm/io.h>
diff --git a/arch/nios2/cpu/cpu.c b/arch/nios2/cpu/cpu.c
index 37ffa8f4a4..9008db6aa5 100644
--- a/arch/nios2/cpu/cpu.c
+++ b/arch/nios2/cpu/cpu.c
@@ -9,6 +9,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <errno.h>
+#include <init.h>
 #include <irq_func.h>
 #include <asm/cache.h>
 
diff --git a/arch/powerpc/cpu/mpc83xx/pci.c b/arch/powerpc/cpu/mpc83xx/pci.c
index 665ac378c8..a183ed6343 100644
--- a/arch/powerpc/cpu/mpc83xx/pci.c
+++ b/arch/powerpc/cpu/mpc83xx/pci.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <pci.h>
 
 #if defined(CONFIG_OF_LIBFDT)
diff --git a/arch/powerpc/cpu/mpc85xx/cmd_errata.c b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
index e455d8baf5..d3167f6cb9 100644
--- a/arch/powerpc/cpu/mpc85xx/cmd_errata.c
+++ b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <init.h>
 #include <linux/compiler.h>
 #include <fsl_errata.h>
 #include <asm/processor.h>
diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c
index 9f9eed165b..eff0d5d7e2 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu.c
@@ -11,6 +11,7 @@
 #include <config.h>
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <irq_func.h>
 #include <time.h>
 #include <vsprintf.h>
diff --git a/arch/powerpc/cpu/mpc86xx/cpu_init.c b/arch/powerpc/cpu/mpc86xx/cpu_init.c
index 89add62dc1..34752a34af 100644
--- a/arch/powerpc/cpu/mpc86xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc86xx/cpu_init.c
@@ -11,6 +11,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <init.h>
 #include <mpc86xx.h>
 #include <asm/mmu.h>
 #include <asm/fsl_law.h>
diff --git a/arch/powerpc/cpu/mpc8xx/cpu_init.c b/arch/powerpc/cpu/mpc8xx/cpu_init.c
index 8bd6d0fbcf..c8d06b0508 100644
--- a/arch/powerpc/cpu/mpc8xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc8xx/cpu_init.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <watchdog.h>
 
 #include <mpc8xx.h>
diff --git a/arch/powerpc/cpu/mpc8xxx/cpu.c b/arch/powerpc/cpu/mpc8xxx/cpu.c
index bb81f49ae7..da0a80e6fc 100644
--- a/arch/powerpc/cpu/mpc8xxx/cpu.c
+++ b/arch/powerpc/cpu/mpc8xxx/cpu.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <command.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <net.h>
 #include <tsec.h>
 #include <fm_eth.h>
diff --git a/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c b/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c
index afcb75ba17..29489b46e6 100644
--- a/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c
+++ b/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <hang.h>
+#include <init.h>
 #include <asm/fsl_lbc.h>
 
 #ifdef CONFIG_MPC83xx
diff --git a/arch/powerpc/lib/stack.c b/arch/powerpc/lib/stack.c
index 9a956c221d..5840fe6349 100644
--- a/arch/powerpc/lib/stack.c
+++ b/arch/powerpc/lib/stack.c
@@ -11,6 +11,7 @@
  * Marius Groeger <mgroeger@sysgo.de>
  */
 #include <common.h>
+#include <init.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/powerpc/lib/time.c b/arch/powerpc/lib/time.c
index e1494fa129..58931f0e6e 100644
--- a/arch/powerpc/lib/time.c
+++ b/arch/powerpc/lib/time.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <time.h>
 #include <asm/io.h>
 
diff --git a/arch/riscv/cpu/cpu.c b/arch/riscv/cpu/cpu.c
index e457f6acbf..1cebb0322e 100644
--- a/arch/riscv/cpu/cpu.c
+++ b/arch/riscv/cpu/cpu.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <cpu.h>
 #include <dm.h>
+#include <init.h>
 #include <log.h>
 #include <asm/encoding.h>
 #include <dm/uclass-internal.h>
diff --git a/arch/riscv/lib/spl.c b/arch/riscv/lib/spl.c
index 4ca038b148..f3f603b76e 100644
--- a/arch/riscv/lib/spl.c
+++ b/arch/riscv/lib/spl.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <hang.h>
+#include <init.h>
 #include <spl.h>
 #include <asm/smp.h>
 
diff --git a/arch/sandbox/cpu/spl.c b/arch/sandbox/cpu/spl.c
index d5f683bbaa..b92db85c22 100644
--- a/arch/sandbox/cpu/spl.c
+++ b/arch/sandbox/cpu/spl.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <hang.h>
+#include <init.h>
 #include <os.h>
 #include <spl.h>
 #include <asm/spl.h>
diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c
index b6ff5c3d64..c6a2bbe468 100644
--- a/arch/sandbox/cpu/start.c
+++ b/arch/sandbox/cpu/start.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <errno.h>
+#include <init.h>
 #include <os.h>
 #include <cli.h>
 #include <sort.h>
diff --git a/arch/sh/lib/time.c b/arch/sh/lib/time.c
index 51e1cc1181..d09f782f5f 100644
--- a/arch/sh/lib/time.c
+++ b/arch/sh/lib/time.c
@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/processor.h>
 #include <asm/io.h>
 
diff --git a/arch/sh/lib/time_sh2.c b/arch/sh/lib/time_sh2.c
index d82c1d2feb..ef7c6073cc 100644
--- a/arch/sh/lib/time_sh2.c
+++ b/arch/sh/lib/time_sh2.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <time.h>
 #include <asm/io.h>
 #include <asm/processor.h>
diff --git a/arch/x86/cpu/apollolake/cpu_spl.c b/arch/x86/cpu/apollolake/cpu_spl.c
index e2509e391f..707ceb3e64 100644
--- a/arch/x86/cpu/apollolake/cpu_spl.c
+++ b/arch/x86/cpu/apollolake/cpu_spl.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <ec_commands.h>
+#include <init.h>
 #include <log.h>
 #include <spi_flash.h>
 #include <spl.h>
diff --git a/arch/x86/cpu/apollolake/fsp_s.c b/arch/x86/cpu/apollolake/fsp_s.c
index fd6e73dfc8..30b820fdbc 100644
--- a/arch/x86/cpu/apollolake/fsp_s.c
+++ b/arch/x86/cpu/apollolake/fsp_s.c
@@ -8,6 +8,7 @@
 #include <binman.h>
 #include <bootstage.h>
 #include <dm.h>
+#include <init.h>
 #include <irq.h>
 #include <malloc.h>
 #include <acpi/acpi_s3.h>
diff --git a/arch/x86/cpu/braswell/braswell.c b/arch/x86/cpu/braswell/braswell.c
index 7a83b06005..3345049993 100644
--- a/arch/x86/cpu/braswell/braswell.c
+++ b/arch/x86/cpu/braswell/braswell.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/mrccache.h>
 #include <asm/post.h>
 
diff --git a/arch/x86/cpu/broadwell/cpu.c b/arch/x86/cpu/broadwell/cpu.c
index 55a7439f1c..793167937c 100644
--- a/arch/x86/cpu/broadwell/cpu.c
+++ b/arch/x86/cpu/broadwell/cpu.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <cpu.h>
+#include <init.h>
 #include <asm/cpu.h>
 #include <asm/cpu_x86.h>
 #include <asm/cpu_common.h>
diff --git a/arch/x86/cpu/broadwell/cpu_from_spl.c b/arch/x86/cpu/broadwell/cpu_from_spl.c
index 2aa6f245e7..17ff43b58e 100644
--- a/arch/x86/cpu/broadwell/cpu_from_spl.c
+++ b/arch/x86/cpu/broadwell/cpu_from_spl.c
@@ -9,6 +9,7 @@
 #include <cpu_func.h>
 #include <debug_uart.h>
 #include <handoff.h>
+#include <init.h>
 #include <asm/mtrr.h>
 
 int misc_init_r(void)
diff --git a/arch/x86/cpu/broadwell/cpu_full.c b/arch/x86/cpu/broadwell/cpu_full.c
index 895edeb4bc..3d42b1caac 100644
--- a/arch/x86/cpu/broadwell/cpu_full.c
+++ b/arch/x86/cpu/broadwell/cpu_full.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <cpu.h>
+#include <init.h>
 #include <asm/cpu.h>
 #include <asm/cpu_x86.h>
 #include <asm/cpu_common.h>
diff --git a/arch/x86/cpu/broadwell/refcode.c b/arch/x86/cpu/broadwell/refcode.c
index f016489185..b944896e75 100644
--- a/arch/x86/cpu/broadwell/refcode.c
+++ b/arch/x86/cpu/broadwell/refcode.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <errno.h>
+#include <init.h>
 #include <asm/arch/pei_data.h>
 
 #define RMODULE_MAGIC		0xf8fe
diff --git a/arch/x86/cpu/coreboot/coreboot.c b/arch/x86/cpu/coreboot/coreboot.c
index 624caf67a6..d44db1347b 100644
--- a/arch/x86/cpu/coreboot/coreboot.c
+++ b/arch/x86/cpu/coreboot/coreboot.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <fdtdec.h>
+#include <init.h>
 #include <usb.h>
 #include <asm/io.h>
 #include <asm/msr.h>
diff --git a/arch/x86/cpu/efi/app.c b/arch/x86/cpu/efi/app.c
index 13077411dc..10677ecbc2 100644
--- a/arch/x86/cpu/efi/app.c
+++ b/arch/x86/cpu/efi/app.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <fdtdec.h>
+#include <init.h>
 #include <netdev.h>
 
 int arch_cpu_init(void)
diff --git a/arch/x86/cpu/intel_common/cpu_from_spl.c b/arch/x86/cpu/intel_common/cpu_from_spl.c
index b7bb524162..e4157c5734 100644
--- a/arch/x86/cpu/intel_common/cpu_from_spl.c
+++ b/arch/x86/cpu/intel_common/cpu_from_spl.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <handoff.h>
+#include <init.h>
 #include <asm/cpu_common.h>
 #include <asm/intel_regs.h>
 #include <asm/lapic.h>
diff --git a/arch/x86/cpu/ivybridge/cpu.c b/arch/x86/cpu/ivybridge/cpu.c
index 8f30cdbe24..0639b5cf02 100644
--- a/arch/x86/cpu/ivybridge/cpu.c
+++ b/arch/x86/cpu/ivybridge/cpu.c
@@ -15,6 +15,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <init.h>
 #include <pch.h>
 #include <asm/cpu.h>
 #include <asm/cpu_common.h>
diff --git a/arch/x86/cpu/ivybridge/ivybridge.c b/arch/x86/cpu/ivybridge/ivybridge.c
index 8d10fd6c54..eb3f362e4e 100644
--- a/arch/x86/cpu/ivybridge/ivybridge.c
+++ b/arch/x86/cpu/ivybridge/ivybridge.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/post.h>
 #include <asm/processor.h>
 
diff --git a/arch/x86/cpu/ivybridge/sdram_nop.c b/arch/x86/cpu/ivybridge/sdram_nop.c
index c55213ca2d..54e6acf262 100644
--- a/arch/x86/cpu/ivybridge/sdram_nop.c
+++ b/arch/x86/cpu/ivybridge/sdram_nop.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/qemu/qemu.c b/arch/x86/cpu/qemu/qemu.c
index 716351ad7f..044a429c13 100644
--- a/arch/x86/cpu/qemu/qemu.c
+++ b/arch/x86/cpu/qemu/qemu.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <pci.h>
 #include <qfw.h>
 #include <asm/irq.h>
diff --git a/arch/x86/cpu/quark/quark.c b/arch/x86/cpu/quark/quark.c
index 46c6d00eb4..e2e2d9fe33 100644
--- a/arch/x86/cpu/quark/quark.c
+++ b/arch/x86/cpu/quark/quark.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <mmc.h>
 #include <asm/cache.h>
 #include <asm/io.h>
diff --git a/arch/x86/cpu/queensbay/tnc.c b/arch/x86/cpu/queensbay/tnc.c
index 66737e655b..782ed863fe 100644
--- a/arch/x86/cpu/queensbay/tnc.c
+++ b/arch/x86/cpu/queensbay/tnc.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 #include <dm/device-internal.h>
 #include <pci.h>
 #include <asm/io.h>
diff --git a/arch/x86/cpu/slimbootloader/slimbootloader.c b/arch/x86/cpu/slimbootloader/slimbootloader.c
index 21dcfb2142..889fba5473 100644
--- a/arch/x86/cpu/slimbootloader/slimbootloader.c
+++ b/arch/x86/cpu/slimbootloader/slimbootloader.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <asm/arch/slimbootloader.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/tangier/tangier.c b/arch/x86/cpu/tangier/tangier.c
index 43bee1fb70..1e2f6cc8b7 100644
--- a/arch/x86/cpu/tangier/tangier.c
+++ b/arch/x86/cpu/tangier/tangier.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <asm/u-boot-x86.h>
 
 /*
diff --git a/arch/x86/cpu/x86_64/cpu.c b/arch/x86/cpu/x86_64/cpu.c
index 4b64339f25..1b4d3971b0 100644
--- a/arch/x86/cpu/x86_64/cpu.c
+++ b/arch/x86/cpu/x86_64/cpu.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <debug_uart.h>
+#include <init.h>
 
 /*
  * Global declaration of gd.
diff --git a/arch/x86/lib/fsp/fsp_common.c b/arch/x86/lib/fsp/fsp_common.c
index 267527eb34..114d3d9cf8 100644
--- a/arch/x86/lib/fsp/fsp_common.c
+++ b/arch/x86/lib/fsp/fsp_common.c
@@ -7,6 +7,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <errno.h>
+#include <init.h>
 #include <rtc.h>
 #include <acpi/acpi_s3.h>
 #include <asm/cmos_layout.h>
diff --git a/arch/x86/lib/fsp/fsp_graphics.c b/arch/x86/lib/fsp/fsp_graphics.c
index 98b762209f..0e71583a49 100644
--- a/arch/x86/lib/fsp/fsp_graphics.c
+++ b/arch/x86/lib/fsp/fsp_graphics.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 #include <vbe.h>
 #include <video.h>
 #include <asm/fsp/fsp_support.h>
diff --git a/arch/x86/lib/fsp1/fsp_common.c b/arch/x86/lib/fsp1/fsp_common.c
index 0a726807c2..312283ae9d 100644
--- a/arch/x86/lib/fsp1/fsp_common.c
+++ b/arch/x86/lib/fsp1/fsp_common.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <init.h>
 #include <malloc.h>
 #include <rtc.h>
 #include <acpi/acpi_s3.h>
diff --git a/arch/x86/lib/fsp1/fsp_dram.c b/arch/x86/lib/fsp1/fsp_dram.c
index 5ef89744b9..e3f9e30f6a 100644
--- a/arch/x86/lib/fsp1/fsp_dram.c
+++ b/arch/x86/lib/fsp1/fsp_dram.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/fsp/fsp_support.h>
 
 int dram_init(void)
diff --git a/arch/x86/lib/fsp2/fsp_dram.c b/arch/x86/lib/fsp2/fsp_dram.c
index 3869c53c5f..e2e6efd8b0 100644
--- a/arch/x86/lib/fsp2/fsp_dram.c
+++ b/arch/x86/lib/fsp2/fsp_dram.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <handoff.h>
+#include <init.h>
 #include <spl.h>
 #include <acpi/acpi_s3.h>
 #include <asm/arch/cpu.h>
diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c
index bdae9291e7..fb8d40c02d 100644
--- a/arch/x86/lib/spl.c
+++ b/arch/x86/lib/spl.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <hang.h>
 #include <image.h>
+#include <init.h>
 #include <irq_func.h>
 #include <malloc.h>
 #include <spl.h>
diff --git a/arch/x86/lib/tpl.c b/arch/x86/lib/tpl.c
index f9dcf32d73..ac265b6744 100644
--- a/arch/x86/lib/tpl.c
+++ b/arch/x86/lib/tpl.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <hang.h>
 #include <image.h>
+#include <init.h>
 #include <spl.h>
 #include <asm/cpu.h>
 #include <asm/mtrr.h>
diff --git a/arch/xtensa/cpu/cpu.c b/arch/xtensa/cpu/cpu.c
index 6f4b88f88e..85d3464607 100644
--- a/arch/xtensa/cpu/cpu.c
+++ b/arch/xtensa/cpu/cpu.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <init.h>
 #include <vsprintf.h>
 #include <linux/stringify.h>
 #include <asm/global_data.h>
diff --git a/board/BuR/brppt2/board.c b/board/BuR/brppt2/board.c
index c91d2f9494..f156b552a7 100644
--- a/board/BuR/brppt2/board.c
+++ b/board/BuR/brppt2/board.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <hang.h>
+#include <init.h>
 #include <spl.h>
 #include <dm.h>
 #include <miiphy.h>
diff --git a/board/LaCie/net2big_v2/net2big_v2.c b/board/LaCie/net2big_v2/net2big_v2.c
index 50305656e8..8b97e1a533 100644
--- a/board/LaCie/net2big_v2/net2big_v2.c
+++ b/board/LaCie/net2big_v2/net2big_v2.c
@@ -12,6 +12,7 @@
 #include <command.h>
 #include <env.h>
 #include <i2c.h>
+#include <init.h>
 #include <net.h>
 #include <asm/mach-types.h>
 #include <asm/arch/cpu.h>
diff --git a/board/LaCie/netspace_v2/netspace_v2.c b/board/LaCie/netspace_v2/netspace_v2.c
index b7ae58c645..f9bf527739 100644
--- a/board/LaCie/netspace_v2/netspace_v2.c
+++ b/board/LaCie/netspace_v2/netspace_v2.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <init.h>
 #include <net.h>
 #include <asm/mach-types.h>
 #include <asm/arch/cpu.h>
diff --git a/board/Marvell/aspenite/aspenite.c b/board/Marvell/aspenite/aspenite.c
index c4e506ff3b..c1406d7489 100644
--- a/board/Marvell/aspenite/aspenite.c
+++ b/board/Marvell/aspenite/aspenite.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <mvmfp.h>
 #include <asm/mach-types.h>
 #include <asm/arch/cpu.h>
diff --git a/board/Marvell/db-88f6281-bp/db-88f6281-bp.c b/board/Marvell/db-88f6281-bp/db-88f6281-bp.c
index 729516d9e1..a6f1167e39 100644
--- a/board/Marvell/db-88f6281-bp/db-88f6281-bp.c
+++ b/board/Marvell/db-88f6281-bp/db-88f6281-bp.c
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0+
 
 #include <common.h>
+#include <init.h>
 #include <net.h>
 #include <linux/io.h>
 #include <miiphy.h>
diff --git a/board/Marvell/db-88f6720/db-88f6720.c b/board/Marvell/db-88f6720/db-88f6720.c
index 3e975801b8..ba0a944b9a 100644
--- a/board/Marvell/db-88f6720/db-88f6720.c
+++ b/board/Marvell/db-88f6720/db-88f6720.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <miiphy.h>
 #include <net.h>
 #include <netdev.h>
diff --git a/board/Marvell/db-88f6820-amc/db-88f6820-amc.c b/board/Marvell/db-88f6820-amc/db-88f6820-amc.c
index 372beb3c43..f225f467bf 100644
--- a/board/Marvell/db-88f6820-amc/db-88f6820-amc.c
+++ b/board/Marvell/db-88f6820-amc/db-88f6820-amc.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <init.h>
 #include <miiphy.h>
 #include <net.h>
 #include <netdev.h>
diff --git a/board/Marvell/db-88f6820-gp/db-88f6820-gp.c b/board/Marvell/db-88f6820-gp/db-88f6820-gp.c
index f3df7e666b..53a80c949b 100644
--- a/board/Marvell/db-88f6820-gp/db-88f6820-gp.c
+++ b/board/Marvell/db-88f6820-gp/db-88f6820-gp.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <init.h>
 #include <miiphy.h>
 #include <net.h>
 #include <netdev.h>
diff --git a/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c b/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c
index e7808f5a5c..cb65357844 100644
--- a/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c
+++ b/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <miiphy.h>
 #include <net.h>
 #include <netdev.h>
diff --git a/board/Marvell/db-xc3-24g4xg/db-xc3-24g4xg.c b/board/Marvell/db-xc3-24g4xg/db-xc3-24g4xg.c
index cae428ffd0..1153b188e7 100644
--- a/board/Marvell/db-xc3-24g4xg/db-xc3-24g4xg.c
+++ b/board/Marvell/db-xc3-24g4xg/db-xc3-24g4xg.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <init.h>
 #include <asm/gpio.h>
 #include <linux/mbus.h>
 #include <linux/io.h>
diff --git a/board/Marvell/dreamplug/dreamplug.c b/board/Marvell/dreamplug/dreamplug.c
index 887dd1ed74..7d188c3279 100644
--- a/board/Marvell/dreamplug/dreamplug.c
+++ b/board/Marvell/dreamplug/dreamplug.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <miiphy.h>
 #include <net.h>
 #include <asm/arch/cpu.h>
diff --git a/board/Marvell/gplugd/gplugd.c b/board/Marvell/gplugd/gplugd.c
index fc2bc85f00..10236bd07f 100644
--- a/board/Marvell/gplugd/gplugd.c
+++ b/board/Marvell/gplugd/gplugd.c
@@ -12,6 +12,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <mvmfp.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/mfp.h>
diff --git a/board/Marvell/guruplug/guruplug.c b/board/Marvell/guruplug/guruplug.c
index 71bee76bdc..f3981c66d2 100644
--- a/board/Marvell/guruplug/guruplug.c
+++ b/board/Marvell/guruplug/guruplug.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <miiphy.h>
 #include <net.h>
 #include <asm/mach-types.h>
diff --git a/board/Marvell/mvebu_armada-37xx/board.c b/board/Marvell/mvebu_armada-37xx/board.c
index bef4e1767c..29bd6a9a40 100644
--- a/board/Marvell/mvebu_armada-37xx/board.c
+++ b/board/Marvell/mvebu_armada-37xx/board.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <i2c.h>
+#include <init.h>
 #include <phy.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
diff --git a/board/Marvell/openrd/openrd.c b/board/Marvell/openrd/openrd.c
index ae9202895d..d9b5b213fe 100644
--- a/board/Marvell/openrd/openrd.c
+++ b/board/Marvell/openrd/openrd.c
@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <miiphy.h>
 #include <net.h>
 #include <asm/mach-types.h>
diff --git a/board/Marvell/sheevaplug/sheevaplug.c b/board/Marvell/sheevaplug/sheevaplug.c
index 6c6106c23c..6311ed3b2e 100644
--- a/board/Marvell/sheevaplug/sheevaplug.c
+++ b/board/Marvell/sheevaplug/sheevaplug.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <miiphy.h>
 #include <net.h>
 #include <asm/mach-types.h>
diff --git a/board/Seagate/dockstar/dockstar.c b/board/Seagate/dockstar/dockstar.c
index 0ff8a9053e..85dd10e55a 100644
--- a/board/Seagate/dockstar/dockstar.c
+++ b/board/Seagate/dockstar/dockstar.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <bootstage.h>
+#include <init.h>
 #include <miiphy.h>
 #include <net.h>
 #include <asm/arch/soc.h>
diff --git a/board/Seagate/goflexhome/goflexhome.c b/board/Seagate/goflexhome/goflexhome.c
index fd2f0df371..de1ec54466 100644
--- a/board/Seagate/goflexhome/goflexhome.c
+++ b/board/Seagate/goflexhome/goflexhome.c
@@ -13,6 +13,7 @@
 
 #include <common.h>
 #include <bootstage.h>
+#include <init.h>
 #include <miiphy.h>
 #include <net.h>
 #include <asm/mach-types.h>
diff --git a/board/Seagate/nas220/nas220.c b/board/Seagate/nas220/nas220.c
index 99462052f0..3a027d083a 100644
--- a/board/Seagate/nas220/nas220.c
+++ b/board/Seagate/nas220/nas220.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <miiphy.h>
 #include <net.h>
 #include <asm/mach-types.h>
diff --git a/board/Synology/ds109/ds109.c b/board/Synology/ds109/ds109.c
index f2031ef3bb..c4cd95cd80 100644
--- a/board/Synology/ds109/ds109.c
+++ b/board/Synology/ds109/ds109.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <miiphy.h>
 #include <net.h>
 #include <asm/setup.h>
diff --git a/board/Synology/ds414/ds414.c b/board/Synology/ds414/ds414.c
index d23e97c9b9..deb530fe78 100644
--- a/board/Synology/ds414/ds414.c
+++ b/board/Synology/ds414/ds414.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <miiphy.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
diff --git a/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c b/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c
index bb7913025d..772e21b9c5 100644
--- a/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c
+++ b/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <errno.h>
+#include <init.h>
 #include <linux/libfdt.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
diff --git a/board/advantech/imx8qm_rom7720_a1/spl.c b/board/advantech/imx8qm_rom7720_a1/spl.c
index 6863da82d6..21ebd5dddb 100644
--- a/board/advantech/imx8qm_rom7720_a1/spl.c
+++ b/board/advantech/imx8qm_rom7720_a1/spl.c
@@ -5,6 +5,7 @@
 #include <common.h>
 #include <dm.h>
 #include <image.h>
+#include <init.h>
 #include <spl.h>
 #include <fsl_esdhc.h>
 
diff --git a/board/advantech/som-db5800-som-6867/som-db5800-som-6867.c b/board/advantech/som-db5800-som-6867/som-db5800-som-6867.c
index 8f4c587371..8499fc541f 100644
--- a/board/advantech/som-db5800-som-6867/som-db5800-som-6867.c
+++ b/board/advantech/som-db5800-som-6867/som-db5800-som-6867.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/fsp1/fsp_support.h>
 
 /* ALC262 Verb Table - 10EC0262 */
diff --git a/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c b/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c
index 1f3f293bd9..b96cf0b59c 100644
--- a/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c
+++ b/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <net.h>
 #include <linux/io.h>
 #include <miiphy.h>
diff --git a/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c b/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c
index 889ce70d75..5c9124fbb4 100644
--- a/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c
+++ b/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <miiphy.h>
 #include <net.h>
 #include <netdev.h>
diff --git a/board/alliedtelesis/x530/x530.c b/board/alliedtelesis/x530/x530.c
index 04b053dc20..1a6dec04a3 100644
--- a/board/alliedtelesis/x530/x530.c
+++ b/board/alliedtelesis/x530/x530.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <env.h>
 #include <i2c.h>
+#include <init.h>
 #include <wdt.h>
 #include <asm/gpio.h>
 #include <linux/mbus.h>
diff --git a/board/amazon/kc1/kc1.c b/board/amazon/kc1/kc1.c
index 9034c4fbff..fb1828ff44 100644
--- a/board/amazon/kc1/kc1.c
+++ b/board/amazon/kc1/kc1.c
@@ -8,6 +8,7 @@
 #include <config.h>
 #include <common.h>
 #include <env.h>
+#include <init.h>
 #include <linux/ctype.h>
 #include <linux/usb/musb.h>
 #include <asm/omap_musb.h>
diff --git a/board/amlogic/p200/p200.c b/board/amlogic/p200/p200.c
index d7f7ebd962..8f1bf8bfda 100644
--- a/board/amlogic/p200/p200.c
+++ b/board/amlogic/p200/p200.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
+#include <init.h>
 #include <net.h>
 #include <asm/io.h>
 #include <asm/arch/gx.h>
diff --git a/board/amlogic/p201/p201.c b/board/amlogic/p201/p201.c
index cdac64ed92..597bb71cbf 100644
--- a/board/amlogic/p201/p201.c
+++ b/board/amlogic/p201/p201.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
+#include <init.h>
 #include <net.h>
 #include <asm/io.h>
 #include <asm/arch/gx.h>
diff --git a/board/amlogic/p212/p212.c b/board/amlogic/p212/p212.c
index 6ac5aadecf..fbc49e9565 100644
--- a/board/amlogic/p212/p212.c
+++ b/board/amlogic/p212/p212.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
+#include <init.h>
 #include <net.h>
 #include <asm/io.h>
 #include <asm/arch/gx.h>
diff --git a/board/amlogic/q200/q200.c b/board/amlogic/q200/q200.c
index ae9b888c12..62e6fa3d19 100644
--- a/board/amlogic/q200/q200.c
+++ b/board/amlogic/q200/q200.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
+#include <init.h>
 #include <net.h>
 #include <asm/io.h>
 #include <asm/arch/gx.h>
diff --git a/board/amlogic/s400/s400.c b/board/amlogic/s400/s400.c
index 79b867996b..7e2f0cdae3 100644
--- a/board/amlogic/s400/s400.c
+++ b/board/amlogic/s400/s400.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 #include <net.h>
 #include <asm/io.h>
 #include <asm/arch/axg.h>
diff --git a/board/amlogic/sei510/sei510.c b/board/amlogic/sei510/sei510.c
index 07a6a47ebc..70fe3559f6 100644
--- a/board/amlogic/sei510/sei510.c
+++ b/board/amlogic/sei510/sei510.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <env_internal.h>
+#include <init.h>
 #include <net.h>
 #include <asm/io.h>
 #include <asm/arch/axg.h>
diff --git a/board/amlogic/sei610/sei610.c b/board/amlogic/sei610/sei610.c
index 5c24276d51..3c44fba516 100644
--- a/board/amlogic/sei610/sei610.c
+++ b/board/amlogic/sei610/sei610.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <env_internal.h>
+#include <init.h>
 #include <net.h>
 #include <asm/io.h>
 #include <asm/arch/axg.h>
diff --git a/board/amlogic/u200/u200.c b/board/amlogic/u200/u200.c
index 4df7ff437e..373235d77a 100644
--- a/board/amlogic/u200/u200.c
+++ b/board/amlogic/u200/u200.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 #include <net.h>
 #include <asm/io.h>
 #include <asm/arch/axg.h>
diff --git a/board/amlogic/w400/w400.c b/board/amlogic/w400/w400.c
index 95bbdedbdd..47a51710dc 100644
--- a/board/amlogic/w400/w400.c
+++ b/board/amlogic/w400/w400.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <env_internal.h>
+#include <init.h>
 #include <net.h>
 #include <asm/io.h>
 #include <asm/arch/eth.h>
diff --git a/board/aristainetos/aristainetos.c b/board/aristainetos/aristainetos.c
index 5095cf65d1..3a59b51c1c 100644
--- a/board/aristainetos/aristainetos.c
+++ b/board/aristainetos/aristainetos.c
@@ -10,6 +10,7 @@
  */
 
 #include <image.h>
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
diff --git a/board/armltd/vexpress64/pcie.c b/board/armltd/vexpress64/pcie.c
index 21156a4ca9..888434a6f8 100644
--- a/board/armltd/vexpress64/pcie.c
+++ b/board/armltd/vexpress64/pcie.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
 #include <pci_ids.h>
diff --git a/board/armltd/vexpress64/vexpress64.c b/board/armltd/vexpress64/vexpress64.c
index 912202d8eb..fbfa7a18f1 100644
--- a/board/armltd/vexpress64/vexpress64.c
+++ b/board/armltd/vexpress64/vexpress64.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <dm.h>
+#include <init.h>
 #include <malloc.h>
 #include <errno.h>
 #include <net.h>
diff --git a/board/atmel/at91sam9260ek/led.c b/board/atmel/at91sam9260ek/led.c
index 2ea66b9b15..cc6d5d7a05 100644
--- a/board/atmel/at91sam9260ek/led.c
+++ b/board/atmel/at91sam9260ek/led.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/gpio.h>
 #include <status_led.h>
diff --git a/board/atmel/common/video_display.c b/board/atmel/common/video_display.c
index 5cc52139a7..2666b0b3cd 100644
--- a/board/atmel/common/video_display.c
+++ b/board/atmel/common/video_display.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <atmel_lcd.h>
 #include <dm.h>
+#include <init.h>
 #include <nand.h>
 #include <version.h>
 #include <video.h>
diff --git a/board/bachmann/ot1200/ot1200.c b/board/bachmann/ot1200/ot1200.c
index dd7863f7ac..db0da0ca2f 100644
--- a/board/bachmann/ot1200/ot1200.c
+++ b/board/bachmann/ot1200/ot1200.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <net.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
diff --git a/board/bachmann/ot1200/ot1200_spl.c b/board/bachmann/ot1200/ot1200_spl.c
index a3a822f65a..7fbd6f2c5d 100644
--- a/board/bachmann/ot1200/ot1200_spl.c
+++ b/board/bachmann/ot1200/ot1200_spl.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <spl.h>
 #include <asm/arch/mx6-ddr.h>
 
diff --git a/board/barco/platinum/spl_picon.c b/board/barco/platinum/spl_picon.c
index ec6de460c1..253a64d28e 100644
--- a/board/barco/platinum/spl_picon.c
+++ b/board/barco/platinum/spl_picon.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/mx6-ddr.h>
diff --git a/board/barco/platinum/spl_titanium.c b/board/barco/platinum/spl_titanium.c
index 263371a2b2..8c91b752ff 100644
--- a/board/barco/platinum/spl_titanium.c
+++ b/board/barco/platinum/spl_titanium.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/mx6-ddr.h>
diff --git a/board/bluegiga/apx4devkit/apx4devkit.c b/board/bluegiga/apx4devkit/apx4devkit.c
index 2599db7bf7..be8eefb365 100644
--- a/board/bluegiga/apx4devkit/apx4devkit.c
+++ b/board/bluegiga/apx4devkit/apx4devkit.c
@@ -14,6 +14,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <net.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
diff --git a/board/bosch/guardian/board.c b/board/bosch/guardian/board.c
index 03ba9e8c5e..b8dbe8ac53 100644
--- a/board/bosch/guardian/board.c
+++ b/board/bosch/guardian/board.c
@@ -14,6 +14,7 @@
 #include <env_internal.h>
 #include <errno.h>
 #include <i2c.h>
+#include <init.h>
 #include <led.h>
 #include <miiphy.h>
 #include <panel.h>
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c
index 4d40cb8ff5..8e29fd0095 100644
--- a/board/boundary/nitrogen6x/nitrogen6x.c
+++ b/board/boundary/nitrogen6x/nitrogen6x.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <init.h>
 #include <net.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
diff --git a/board/broadcom/bcm963158/bcm963158.c b/board/broadcom/bcm963158/bcm963158.c
index db82cd570d..9feaee3c0f 100644
--- a/board/broadcom/bcm963158/bcm963158.c
+++ b/board/broadcom/bcm963158/bcm963158.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <fdtdec.h>
+#include <init.h>
 #include <linux/io.h>
 
 #ifdef CONFIG_ARM64
diff --git a/board/broadcom/bcm968360bg/bcm968360bg.c b/board/broadcom/bcm968360bg/bcm968360bg.c
index a5fbc1d297..90af6b88bd 100644
--- a/board/broadcom/bcm968360bg/bcm968360bg.c
+++ b/board/broadcom/bcm968360bg/bcm968360bg.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <fdtdec.h>
+#include <init.h>
 #include <linux/io.h>
 
 #ifdef CONFIG_ARM64
diff --git a/board/broadcom/bcm968580xref/bcm968580xref.c b/board/broadcom/bcm968580xref/bcm968580xref.c
index 2e547f5170..1bd723d49e 100644
--- a/board/broadcom/bcm968580xref/bcm968580xref.c
+++ b/board/broadcom/bcm968580xref/bcm968580xref.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <fdtdec.h>
+#include <init.h>
 #include <linux/io.h>
 
 #ifdef CONFIG_ARM64
diff --git a/board/bticino/mamoj/mamoj.c b/board/bticino/mamoj/mamoj.c
index 6ad7e31092..b7d37b7004 100644
--- a/board/bticino/mamoj/mamoj.c
+++ b/board/bticino/mamoj/mamoj.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/arch/sys_proto.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/bticino/mamoj/spl.c b/board/bticino/mamoj/spl.c
index 620e4d1de0..ece37800bf 100644
--- a/board/bticino/mamoj/spl.c
+++ b/board/bticino/mamoj/spl.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <serial.h>
 #include <spl.h>
 
diff --git a/board/buffalo/lsxl/lsxl.c b/board/buffalo/lsxl/lsxl.c
index 56a2c29e4c..6afb6bbdb5 100644
--- a/board/buffalo/lsxl/lsxl.c
+++ b/board/buffalo/lsxl/lsxl.c
@@ -12,6 +12,7 @@
 #include <env.h>
 #include <env_internal.h>
 #include <flash.h>
+#include <init.h>
 #include <net.h>
 #include <malloc.h>
 #include <netdev.h>
diff --git a/board/ccv/xpress/spl.c b/board/ccv/xpress/spl.c
index 90f655ab2e..38bda8d184 100644
--- a/board/ccv/xpress/spl.c
+++ b/board/ccv/xpress/spl.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <asm/arch/mx6-ddr.h>
diff --git a/board/cirrus/edb93xx/edb93xx.c b/board/cirrus/edb93xx/edb93xx.c
index b64ec95e31..0318bf18cf 100644
--- a/board/cirrus/edb93xx/edb93xx.c
+++ b/board/cirrus/edb93xx/edb93xx.c
@@ -16,6 +16,7 @@
 #include <config.h>
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <irq_func.h>
 #include <net.h>
 #include <netdev.h>
diff --git a/board/cloudengines/pogo_e02/pogo_e02.c b/board/cloudengines/pogo_e02/pogo_e02.c
index 835c3279be..433e0de8a3 100644
--- a/board/cloudengines/pogo_e02/pogo_e02.c
+++ b/board/cloudengines/pogo_e02/pogo_e02.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <miiphy.h>
 #include <net.h>
 #include <asm/arch/cpu.h>
diff --git a/board/compulab/cm_t35/cm_t35.c b/board/compulab/cm_t35/cm_t35.c
index b52358baac..b714712f2a 100644
--- a/board/compulab/cm_t35/cm_t35.c
+++ b/board/compulab/cm_t35/cm_t35.c
@@ -13,6 +13,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <init.h>
 #include <status_led.h>
 #include <netdev.h>
 #include <net.h>
diff --git a/board/corscience/tricorder/tricorder.c b/board/corscience/tricorder/tricorder.c
index cec819b36f..30974e8d92 100644
--- a/board/corscience/tricorder/tricorder.c
+++ b/board/corscience/tricorder/tricorder.c
@@ -10,6 +10,7 @@
  * Frederik Kriewitz <frederik@kriewitz.eu>
  */
 #include <common.h>
+#include <init.h>
 #include <malloc.h>
 #include <twl4030.h>
 #include <status_led.h>
diff --git a/board/cortina/presidio-asic/presidio.c b/board/cortina/presidio-asic/presidio.c
index b4fa01f368..427151c8df 100644
--- a/board/cortina/presidio-asic/presidio.c
+++ b/board/cortina/presidio-asic/presidio.c
@@ -4,6 +4,7 @@
  *
  */
 #include <common.h>
+#include <init.h>
 #include <malloc.h>
 #include <errno.h>
 #include <netdev.h>
diff --git a/board/creative/xfi3/xfi3.c b/board/creative/xfi3/xfi3.c
index 66781ef316..4a32893a79 100644
--- a/board/creative/xfi3/xfi3.c
+++ b/board/creative/xfi3/xfi3.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <errno.h>
+#include <init.h>
 #include <net.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
diff --git a/board/d-link/dns325/dns325.c b/board/d-link/dns325/dns325.c
index dfdc683683..a0f3dada42 100644
--- a/board/d-link/dns325/dns325.c
+++ b/board/d-link/dns325/dns325.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <miiphy.h>
 #include <net.h>
 #include <netdev.h>
diff --git a/board/davinci/da8xxevm/da850evm.c b/board/davinci/da8xxevm/da850evm.c
index d9019de6e0..a3b0f8bf09 100644
--- a/board/davinci/da8xxevm/da850evm.c
+++ b/board/davinci/da8xxevm/da850evm.c
@@ -12,6 +12,7 @@
 #include <dm.h>
 #include <env.h>
 #include <i2c.h>
+#include <init.h>
 #include <net.h>
 #include <spi.h>
 #include <spi_flash.h>
diff --git a/board/davinci/da8xxevm/omapl138_lcdk.c b/board/davinci/da8xxevm/omapl138_lcdk.c
index 608a7f28eb..adb56c6c87 100644
--- a/board/davinci/da8xxevm/omapl138_lcdk.c
+++ b/board/davinci/da8xxevm/omapl138_lcdk.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <env.h>
 #include <i2c.h>
+#include <init.h>
 #include <net.h>
 #include <asm/arch/hardware.h>
 #include <asm/ti-common/davinci_nand.h>
diff --git a/board/dhelectronics/dh_imx6/dh_imx6_spl.c b/board/dhelectronics/dh_imx6/dh_imx6_spl.c
index f2c3ac3e28..fd6099c566 100644
--- a/board/dhelectronics/dh_imx6/dh_imx6_spl.c
+++ b/board/dhelectronics/dh_imx6/dh_imx6_spl.c
@@ -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>
diff --git a/board/ea/mx7ulp_com/mx7ulp_com.c b/board/ea/mx7ulp_com/mx7ulp_com.c
index 6fc1631bf7..a9b8a32108 100644
--- a/board/ea/mx7ulp_com/mx7ulp_com.c
+++ b/board/ea/mx7ulp_com/mx7ulp_com.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/mx7ulp-pins.h>
diff --git a/board/elgin/elgin_rv1108/elgin_rv1108.c b/board/elgin/elgin_rv1108/elgin_rv1108.c
index c5a1cc95e4..5d8f62244b 100644
--- a/board/elgin/elgin_rv1108/elgin_rv1108.c
+++ b/board/elgin/elgin_rv1108/elgin_rv1108.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <syscon.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/clock.h>
diff --git a/board/emulation/qemu-arm/qemu-arm.c b/board/emulation/qemu-arm/qemu-arm.c
index 4e18733001..ee5d4b41f2 100644
--- a/board/emulation/qemu-arm/qemu-arm.c
+++ b/board/emulation/qemu-arm/qemu-arm.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <fdtdec.h>
+#include <init.h>
 #include <virtio_types.h>
 #include <virtio.h>
 
diff --git a/board/engicam/common/spl.c b/board/engicam/common/spl.c
index 6359fb3223..62b06783c9 100644
--- a/board/engicam/common/spl.c
+++ b/board/engicam/common/spl.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <image.h>
+#include <init.h>
 #include <serial.h>
 #include <spl.h>
 
diff --git a/board/freescale/b4860qds/ddr.c b/board/freescale/b4860qds/ddr.c
index de9f5f5f8b..c6cd3f4292 100644
--- a/board/freescale/b4860qds/ddr.c
+++ b/board/freescale/b4860qds/ddr.c
@@ -7,6 +7,7 @@
 #include <i2c.h>
 #include <hwconfig.h>
 #include <fsl_ddr.h>
+#include <init.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/freescale/bsc9131rdb/bsc9131rdb.c b/board/freescale/bsc9131rdb/bsc9131rdb.c
index 871d066d68..75c2aec75d 100644
--- a/board/freescale/bsc9131rdb/bsc9131rdb.c
+++ b/board/freescale/bsc9131rdb/bsc9131rdb.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <image.h>
+#include <init.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #include <asm/cache.h>
diff --git a/board/freescale/common/sys_eeprom.c b/board/freescale/common/sys_eeprom.c
index c487e3a515..71af645b03 100644
--- a/board/freescale/common/sys_eeprom.c
+++ b/board/freescale/common/sys_eeprom.c
@@ -10,6 +10,7 @@
 #include <command.h>
 #include <env.h>
 #include <i2c.h>
+#include <init.h>
 #include <linux/ctype.h>
 #include <u-boot/crc.h>
 
diff --git a/board/freescale/corenet_ds/ddr.c b/board/freescale/corenet_ds/ddr.c
index 9c8731ce78..073f3ac704 100644
--- a/board/freescale/corenet_ds/ddr.c
+++ b/board/freescale/corenet_ds/ddr.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <hwconfig.h>
+#include <init.h>
 #include <vsprintf.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
diff --git a/board/freescale/imx8mm_evk/imx8mm_evk.c b/board/freescale/imx8mm_evk/imx8mm_evk.c
index 53ebb949df..1f95f3b0c4 100644
--- a/board/freescale/imx8mm_evk/imx8mm_evk.c
+++ b/board/freescale/imx8mm_evk/imx8mm_evk.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <miiphy.h>
 #include <netdev.h>
 
diff --git a/board/freescale/imx8mm_evk/spl.c b/board/freescale/imx8mm_evk/spl.c
index f73ade5549..3abf6be482 100644
--- a/board/freescale/imx8mm_evk/spl.c
+++ b/board/freescale/imx8mm_evk/spl.c
@@ -7,6 +7,7 @@
 #include <cpu_func.h>
 #include <hang.h>
 #include <image.h>
+#include <init.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <asm/mach-imx/iomux-v3.h>
diff --git a/board/freescale/imx8mn_evk/imx8mn_evk.c b/board/freescale/imx8mn_evk/imx8mn_evk.c
index 4f33c0e7c9..8bd54ea2aa 100644
--- a/board/freescale/imx8mn_evk/imx8mn_evk.c
+++ b/board/freescale/imx8mn_evk/imx8mn_evk.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/imx8mn_evk/spl.c b/board/freescale/imx8mn_evk/spl.c
index 7cb7f6e60b..fae1f0c9c7 100644
--- a/board/freescale/imx8mn_evk/spl.c
+++ b/board/freescale/imx8mn_evk/spl.c
@@ -8,6 +8,7 @@
 #include <cpu_func.h>
 #include <hang.h>
 #include <image.h>
+#include <init.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <asm/mach-imx/iomux-v3.h>
diff --git a/board/freescale/imx8mp_evk/imx8mp_evk.c b/board/freescale/imx8mp_evk/imx8mp_evk.c
index f004af681b..aa5100f5bf 100644
--- a/board/freescale/imx8mp_evk/imx8mp_evk.c
+++ b/board/freescale/imx8mp_evk/imx8mp_evk.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <errno.h>
+#include <init.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm-generic/gpio.h>
 #include <asm/arch/imx8mp_pins.h>
diff --git a/board/freescale/imx8mp_evk/spl.c b/board/freescale/imx8mp_evk/spl.c
index 79b504d409..e84e470ac2 100644
--- a/board/freescale/imx8mp_evk/spl.c
+++ b/board/freescale/imx8mp_evk/spl.c
@@ -8,6 +8,7 @@
 #include <cpu_func.h>
 #include <hang.h>
 #include <image.h>
+#include <init.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <errno.h>
diff --git a/board/freescale/imx8mq_evk/spl.c b/board/freescale/imx8mq_evk/spl.c
index 8b5b240edf..69ca7c37f5 100644
--- a/board/freescale/imx8mq_evk/spl.c
+++ b/board/freescale/imx8mq_evk/spl.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <hang.h>
 #include <image.h>
+#include <init.h>
 #include <asm/io.h>
 #include <errno.h>
 #include <asm/io.h>
diff --git a/board/freescale/imx8qm_mek/spl.c b/board/freescale/imx8qm_mek/spl.c
index c5c07089a2..38a981cf8b 100644
--- a/board/freescale/imx8qm_mek/spl.c
+++ b/board/freescale/imx8qm_mek/spl.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <image.h>
+#include <init.h>
 #include <spl.h>
 #include <dm/uclass.h>
 #include <dm/device.h>
diff --git a/board/freescale/imx8qxp_mek/spl.c b/board/freescale/imx8qxp_mek/spl.c
index 3cbbc9b84c..74c2ea2e6c 100644
--- a/board/freescale/imx8qxp_mek/spl.c
+++ b/board/freescale/imx8qxp_mek/spl.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <image.h>
+#include <init.h>
 #include <spl.h>
 #include <dm/uclass.h>
 #include <dm/device.h>
diff --git a/board/freescale/imxrt1050-evk/imxrt1050-evk.c b/board/freescale/imxrt1050-evk/imxrt1050-evk.c
index bda03b5ea5..b6a0d2567e 100644
--- a/board/freescale/imxrt1050-evk/imxrt1050-evk.c
+++ b/board/freescale/imxrt1050-evk/imxrt1050-evk.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 #include <ram.h>
 #include <spl.h>
 #include <asm/io.h>
diff --git a/board/freescale/ls1012afrdm/ls1012afrdm.c b/board/freescale/ls1012afrdm/ls1012afrdm.c
index 8260e7f797..f63377fdd6 100644
--- a/board/freescale/ls1012afrdm/ls1012afrdm.c
+++ b/board/freescale/ls1012afrdm/ls1012afrdm.c
@@ -7,6 +7,7 @@
 #include <fdt_support.h>
 #include <i2c.h>
 #include <asm/cache.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/fsl_serdes.h>
diff --git a/board/freescale/ls1012aqds/ls1012aqds.c b/board/freescale/ls1012aqds/ls1012aqds.c
index e41f7e41bb..24978314a1 100644
--- a/board/freescale/ls1012aqds/ls1012aqds.c
+++ b/board/freescale/ls1012aqds/ls1012aqds.c
@@ -7,6 +7,7 @@
 #include <i2c.h>
 #include <fdt_support.h>
 #include <asm/cache.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/fsl_serdes.h>
diff --git a/board/freescale/ls1012ardb/ls1012ardb.c b/board/freescale/ls1012ardb/ls1012ardb.c
index 8633268ed7..fc929c441c 100644
--- a/board/freescale/ls1012ardb/ls1012ardb.c
+++ b/board/freescale/ls1012ardb/ls1012ardb.c
@@ -8,6 +8,7 @@
 #include <hang.h>
 #include <i2c.h>
 #include <asm/cache.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/fsl_serdes.h>
diff --git a/board/freescale/ls1021aqds/ddr.c b/board/freescale/ls1021aqds/ddr.c
index d3e2e53321..d854b51155 100644
--- a/board/freescale/ls1021aqds/ddr.c
+++ b/board/freescale/ls1021aqds/ddr.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include "ddr.h"
diff --git a/board/freescale/ls1028a/ls1028a.c b/board/freescale/ls1028a/ls1028a.c
index feeae9b406..fd7815e128 100644
--- a/board/freescale/ls1028a/ls1028a.c
+++ b/board/freescale/ls1028a/ls1028a.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <malloc.h>
 #include <errno.h>
 #include <fsl_ddr.h>
diff --git a/board/freescale/ls1043aqds/ls1043aqds.c b/board/freescale/ls1043aqds/ls1043aqds.c
index 2d4b18cdbc..032207af8a 100644
--- a/board/freescale/ls1043aqds/ls1043aqds.c
+++ b/board/freescale/ls1043aqds/ls1043aqds.c
@@ -8,6 +8,7 @@
 #include <i2c.h>
 #include <fdt_support.h>
 #include <fsl_ddr_sdram.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/fsl_serdes.h>
diff --git a/board/freescale/ls1043ardb/ls1043ardb.c b/board/freescale/ls1043ardb/ls1043ardb.c
index 26a192957b..0b5f26515a 100644
--- a/board/freescale/ls1043ardb/ls1043ardb.c
+++ b/board/freescale/ls1043ardb/ls1043ardb.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/fsl_serdes.h>
diff --git a/board/freescale/ls1046afrwy/ls1046afrwy.c b/board/freescale/ls1046afrwy/ls1046afrwy.c
index 71ace192e2..e815bf84fb 100644
--- a/board/freescale/ls1046afrwy/ls1046afrwy.c
+++ b/board/freescale/ls1046afrwy/ls1046afrwy.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <fdt_support.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/fsl_serdes.h>
diff --git a/board/freescale/ls1046aqds/ls1046aqds.c b/board/freescale/ls1046aqds/ls1046aqds.c
index e6648e9d70..b77b2ed40e 100644
--- a/board/freescale/ls1046aqds/ls1046aqds.c
+++ b/board/freescale/ls1046aqds/ls1046aqds.c
@@ -8,6 +8,7 @@
 #include <i2c.h>
 #include <fdt_support.h>
 #include <fsl_ddr_sdram.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/fsl_serdes.h>
diff --git a/board/freescale/ls1046ardb/ls1046ardb.c b/board/freescale/ls1046ardb/ls1046ardb.c
index 5308cb2e1c..27e213f796 100644
--- a/board/freescale/ls1046ardb/ls1046ardb.c
+++ b/board/freescale/ls1046ardb/ls1046ardb.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <fdt_support.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/fsl_serdes.h>
diff --git a/board/freescale/ls1088a/ls1088a.c b/board/freescale/ls1088a/ls1088a.c
index 225e787c75..1b10aa759b 100644
--- a/board/freescale/ls1088a/ls1088a.c
+++ b/board/freescale/ls1088a/ls1088a.c
@@ -5,6 +5,7 @@
 #include <common.h>
 #include <env.h>
 #include <i2c.h>
+#include <init.h>
 #include <malloc.h>
 #include <errno.h>
 #include <netdev.h>
diff --git a/board/freescale/ls2080a/ls2080a.c b/board/freescale/ls2080a/ls2080a.c
index f144bf6b37..95e99eabd7 100644
--- a/board/freescale/ls2080a/ls2080a.c
+++ b/board/freescale/ls2080a/ls2080a.c
@@ -3,6 +3,7 @@
  * Copyright 2014 Freescale Semiconductor
  */
 #include <common.h>
+#include <init.h>
 #include <malloc.h>
 #include <errno.h>
 #include <net.h>
diff --git a/board/freescale/ls2080aqds/ls2080aqds.c b/board/freescale/ls2080aqds/ls2080aqds.c
index 4034bdee28..5f95f3c301 100644
--- a/board/freescale/ls2080aqds/ls2080aqds.c
+++ b/board/freescale/ls2080aqds/ls2080aqds.c
@@ -4,6 +4,7 @@
  */
 #include <common.h>
 #include <env.h>
+#include <init.h>
 #include <malloc.h>
 #include <errno.h>
 #include <netdev.h>
diff --git a/board/freescale/ls2080ardb/ls2080ardb.c b/board/freescale/ls2080ardb/ls2080ardb.c
index 5e2fc7cc98..b1fa3297a3 100644
--- a/board/freescale/ls2080ardb/ls2080ardb.c
+++ b/board/freescale/ls2080ardb/ls2080ardb.c
@@ -5,6 +5,7 @@
  */
 #include <common.h>
 #include <env.h>
+#include <init.h>
 #include <malloc.h>
 #include <errno.h>
 #include <netdev.h>
diff --git a/board/freescale/lx2160a/lx2160a.c b/board/freescale/lx2160a/lx2160a.c
index 0d94107def..fba068c824 100644
--- a/board/freescale/lx2160a/lx2160a.c
+++ b/board/freescale/lx2160a/lx2160a.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <clock_legacy.h>
 #include <dm.h>
+#include <init.h>
 #include <dm/platform_data/serial_pl01x.h>
 #include <i2c.h>
 #include <malloc.h>
diff --git a/board/freescale/m5253demo/flash.c b/board/freescale/m5253demo/flash.c
index 87368564af..3197421781 100644
--- a/board/freescale/m5253demo/flash.c
+++ b/board/freescale/m5253demo/flash.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <flash.h>
+#include <init.h>
 #include <irq_func.h>
 
 #include <asm/immap.h>
diff --git a/board/freescale/m5282evb/m5282evb.c b/board/freescale/m5282evb/m5282evb.c
index 065e3e71f5..251be667d4 100644
--- a/board/freescale/m5282evb/m5282evb.c
+++ b/board/freescale/m5282evb/m5282evb.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/immap.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/mpc8313erdb/sdram.c b/board/freescale/mpc8313erdb/sdram.c
index c8e30a0947..5874e1a924 100644
--- a/board/freescale/mpc8313erdb/sdram.c
+++ b/board/freescale/mpc8313erdb/sdram.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <mpc83xx.h>
 #include <spd_sdram.h>
 
diff --git a/board/freescale/mpc8315erdb/sdram.c b/board/freescale/mpc8315erdb/sdram.c
index 2f0f29a0e5..13bfc1e5f1 100644
--- a/board/freescale/mpc8315erdb/sdram.c
+++ b/board/freescale/mpc8315erdb/sdram.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <mpc83xx.h>
 #include <spd_sdram.h>
 
diff --git a/board/freescale/mpc8349emds/mpc8349emds.c b/board/freescale/mpc8349emds/mpc8349emds.c
index 0996b87c0f..5451437f37 100644
--- a/board/freescale/mpc8349emds/mpc8349emds.c
+++ b/board/freescale/mpc8349emds/mpc8349emds.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <fdt_support.h>
+#include <init.h>
 #include <ioports.h>
 #include <mpc83xx.h>
 #include <asm/mpc8349_pci.h>
diff --git a/board/freescale/mpc8349itx/mpc8349itx.c b/board/freescale/mpc8349itx/mpc8349itx.c
index a2e284f1a2..5d78fea336 100644
--- a/board/freescale/mpc8349itx/mpc8349itx.c
+++ b/board/freescale/mpc8349itx/mpc8349itx.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <fdt_support.h>
+#include <init.h>
 #include <ioports.h>
 #include <mpc83xx.h>
 #include <i2c.h>
diff --git a/board/freescale/mx23evk/mx23evk.c b/board/freescale/mx23evk/mx23evk.c
index 6f4d34b9ed..6cfff04966 100644
--- a/board/freescale/mx23evk/mx23evk.c
+++ b/board/freescale/mx23evk/mx23evk.c
@@ -12,6 +12,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/gpio.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
diff --git a/board/freescale/mx28evk/mx28evk.c b/board/freescale/mx28evk/mx28evk.c
index e5fa4ae765..4272bacf5e 100644
--- a/board/freescale/mx28evk/mx28evk.c
+++ b/board/freescale/mx28evk/mx28evk.c
@@ -12,6 +12,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <net.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
diff --git a/board/freescale/mx6memcal/mx6memcal.c b/board/freescale/mx6memcal/mx6memcal.c
index d01127eccc..ea7a56369d 100644
--- a/board/freescale/mx6memcal/mx6memcal.c
+++ b/board/freescale/mx6memcal/mx6memcal.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/arch/sys_proto.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/mx6memcal/spl.c b/board/freescale/mx6memcal/spl.c
index be551bc375..c11eee51b6 100644
--- a/board/freescale/mx6memcal/spl.c
+++ b/board/freescale/mx6memcal/spl.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/clock.h>
diff --git a/board/freescale/mx6qarm2/mx6qarm2.c b/board/freescale/mx6qarm2/mx6qarm2.c
index 3866020a6d..5c08ecbb96 100644
--- a/board/freescale/mx6qarm2/mx6qarm2.c
+++ b/board/freescale/mx6qarm2/mx6qarm2.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <net.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/freescale/mx6slevk/mx6slevk.c b/board/freescale/mx6slevk/mx6slevk.c
index 38fc30553c..7dd00bda38 100644
--- a/board/freescale/mx6slevk/mx6slevk.c
+++ b/board/freescale/mx6slevk/mx6slevk.c
@@ -5,6 +5,7 @@
  * Author: Fabio Estevam <fabio.estevam@freescale.com>
  */
 
+#include <init.h>
 #include <net.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/iomux.h>
diff --git a/board/freescale/mx7ulp_evk/mx7ulp_evk.c b/board/freescale/mx7ulp_evk/mx7ulp_evk.c
index c939514a5f..1594285860 100644
--- a/board/freescale/mx7ulp_evk/mx7ulp_evk.c
+++ b/board/freescale/mx7ulp_evk/mx7ulp_evk.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <fdt_support.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/mx7ulp-pins.h>
diff --git a/board/freescale/p2041rdb/ddr.c b/board/freescale/p2041rdb/ddr.c
index 8bcd2fb5a7..a30a0738dc 100644
--- a/board/freescale/p2041rdb/ddr.c
+++ b/board/freescale/p2041rdb/ddr.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <hwconfig.h>
+#include <init.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/freescale/t102xqds/ddr.c b/board/freescale/t102xqds/ddr.c
index 998a2a5d3f..c3a60d6087 100644
--- a/board/freescale/t102xqds/ddr.c
+++ b/board/freescale/t102xqds/ddr.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <hwconfig.h>
+#include <init.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/freescale/t102xrdb/ddr.c b/board/freescale/t102xrdb/ddr.c
index 043f0b5b84..2ab6e62c5a 100644
--- a/board/freescale/t102xrdb/ddr.c
+++ b/board/freescale/t102xrdb/ddr.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <hwconfig.h>
+#include <init.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/freescale/t1040qds/ddr.c b/board/freescale/t1040qds/ddr.c
index 2b1d768f1b..c9639e9170 100644
--- a/board/freescale/t1040qds/ddr.c
+++ b/board/freescale/t1040qds/ddr.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <hwconfig.h>
+#include <init.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/freescale/t104xrdb/ddr.c b/board/freescale/t104xrdb/ddr.c
index 2b1b28da88..ae365652c2 100644
--- a/board/freescale/t104xrdb/ddr.c
+++ b/board/freescale/t104xrdb/ddr.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <hwconfig.h>
+#include <init.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/freescale/t208xqds/ddr.c b/board/freescale/t208xqds/ddr.c
index a2a56540b5..5a97a84948 100644
--- a/board/freescale/t208xqds/ddr.c
+++ b/board/freescale/t208xqds/ddr.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <hwconfig.h>
+#include <init.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/freescale/t208xrdb/ddr.c b/board/freescale/t208xrdb/ddr.c
index 0b16982f06..78316ffe84 100644
--- a/board/freescale/t208xrdb/ddr.c
+++ b/board/freescale/t208xrdb/ddr.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <hwconfig.h>
+#include <init.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/freescale/t4qds/ddr.c b/board/freescale/t4qds/ddr.c
index 08656b4e30..5a6d0eb69b 100644
--- a/board/freescale/t4qds/ddr.c
+++ b/board/freescale/t4qds/ddr.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <hwconfig.h>
+#include <init.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/freescale/t4rdb/ddr.c b/board/freescale/t4rdb/ddr.c
index 787de6d7ad..3b67186cc2 100644
--- a/board/freescale/t4rdb/ddr.c
+++ b/board/freescale/t4rdb/ddr.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <hwconfig.h>
+#include <init.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c
index 1443ef91ef..2ef213ce0f 100644
--- a/board/gateworks/gw_ventana/gw_ventana.c
+++ b/board/gateworks/gw_ventana/gw_ventana.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <net.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
diff --git a/board/gateworks/gw_ventana/gw_ventana_spl.c b/board/gateworks/gw_ventana/gw_ventana_spl.c
index 80fec5f9cf..3ccd65271e 100644
--- a/board/gateworks/gw_ventana/gw_ventana_spl.c
+++ b/board/gateworks/gw_ventana/gw_ventana_spl.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <env.h>
 #include <hang.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/mx6-ddr.h>
diff --git a/board/google/gru/gru.c b/board/google/gru/gru.c
index b6b4f19d84..7dfbc3ac86 100644
--- a/board/google/gru/gru.c
+++ b/board/google/gru/gru.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 
 #ifdef CONFIG_SPL_BUILD
 /* provided to defeat compiler optimisation in board_init_f() */
diff --git a/board/google/veyron/veyron.c b/board/google/veyron/veyron.c
index 6b9c34818b..4a847edd89 100644
--- a/board/google/veyron/veyron.c
+++ b/board/google/veyron/veyron.c
@@ -6,6 +6,7 @@
 #include <clk.h>
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 #include <asm/arch-rockchip/clock.h>
 #include <dt-bindings/clock/rk3288-cru.h>
 #include <linux/err.h>
diff --git a/board/gumstix/duovero/duovero.c b/board/gumstix/duovero/duovero.c
index cbb1cd0f8f..7b6fd5c737 100644
--- a/board/gumstix/duovero/duovero.c
+++ b/board/gumstix/duovero/duovero.c
@@ -5,6 +5,7 @@
  * Maintainer: Ash Charles  <ash@gumstix.com>
  */
 #include <common.h>
+#include <init.h>
 #include <net.h>
 #include <netdev.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/gumstix/pepper/board.c b/board/gumstix/pepper/board.c
index 2a6a449306..ebb5a560c3 100644
--- a/board/gumstix/pepper/board.c
+++ b/board/gumstix/pepper/board.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <env.h>
 #include <errno.h>
+#include <init.h>
 #include <net.h>
 #include <serial.h>
 #include <spl.h>
diff --git a/board/highbank/highbank.c b/board/highbank/highbank.c
index ffde1161d0..063831dfe8 100644
--- a/board/highbank/highbank.c
+++ b/board/highbank/highbank.c
@@ -8,6 +8,7 @@
 #include <cpu_func.h>
 #include <env.h>
 #include <fdt_support.h>
+#include <init.h>
 #include <net.h>
 #include <netdev.h>
 #include <scsi.h>
diff --git a/board/hisilicon/hikey/hikey.c b/board/hisilicon/hikey/hikey.c
index 84400090b3..2a50b8458a 100644
--- a/board/hisilicon/hikey/hikey.c
+++ b/board/hisilicon/hikey/hikey.c
@@ -7,6 +7,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <fdt_support.h>
+#include <init.h>
 #include <dm/platform_data/serial_pl01x.h>
 #include <errno.h>
 #include <malloc.h>
diff --git a/board/hisilicon/hikey960/hikey960.c b/board/hisilicon/hikey960/hikey960.c
index 0ed62c7d84..89a922fb82 100644
--- a/board/hisilicon/hikey960/hikey960.c
+++ b/board/hisilicon/hikey960/hikey960.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <asm/cache.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/hi3660.h>
 #include <asm/armv8/mmu.h>
diff --git a/board/imgtec/boston/checkboard.c b/board/imgtec/boston/checkboard.c
index 46ec1e8d9c..1b8a47d254 100644
--- a/board/imgtec/boston/checkboard.c
+++ b/board/imgtec/boston/checkboard.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 
 #include <asm/io.h>
 #include <asm/mipsregs.h>
diff --git a/board/imgtec/ci20/ci20.c b/board/imgtec/ci20/ci20.c
index 170ea12c93..66c64f8056 100644
--- a/board/imgtec/ci20/ci20.c
+++ b/board/imgtec/ci20/ci20.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <init.h>
 #include <net.h>
 #include <netdev.h>
 #include <asm/io.h>
diff --git a/board/imgtec/xilfpga/xilfpga.c b/board/imgtec/xilfpga/xilfpga.c
index 86645155e6..0b68bbde50 100644
--- a/board/imgtec/xilfpga/xilfpga.c
+++ b/board/imgtec/xilfpga/xilfpga.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/intel/cougarcanyon2/cougarcanyon2.c b/board/intel/cougarcanyon2/cougarcanyon2.c
index 7aadd9e477..ce11eae59d 100644
--- a/board/intel/cougarcanyon2/cougarcanyon2.c
+++ b/board/intel/cougarcanyon2/cougarcanyon2.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <init.h>
 #include <pci.h>
 #include <smsc_sio1007.h>
 #include <asm/ibmpc.h>
diff --git a/board/intel/crownbay/crownbay.c b/board/intel/crownbay/crownbay.c
index 57dce4185d..55095deead 100644
--- a/board/intel/crownbay/crownbay.c
+++ b/board/intel/crownbay/crownbay.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/ibmpc.h>
 #include <asm/pnp_def.h>
 #include <smsc_lpc47m.h>
diff --git a/board/intel/minnowmax/minnowmax.c b/board/intel/minnowmax/minnowmax.c
index e5fc939793..e486f9d7d9 100644
--- a/board/intel/minnowmax/minnowmax.c
+++ b/board/intel/minnowmax/minnowmax.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 #include <asm/gpio.h>
 #include <dm/device-internal.h>
 #include <dm/uclass-internal.h>
diff --git a/board/iomega/iconnect/iconnect.c b/board/iomega/iconnect/iconnect.c
index fc7847bd1d..79c794bfc8 100644
--- a/board/iomega/iconnect/iconnect.c
+++ b/board/iomega/iconnect/iconnect.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <miiphy.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
diff --git a/board/isee/igep00x0/igep00x0.c b/board/isee/igep00x0/igep00x0.c
index 0ad601f39b..887ec6a66b 100644
--- a/board/isee/igep00x0/igep00x0.c
+++ b/board/isee/igep00x0/igep00x0.c
@@ -5,6 +5,7 @@
  */
 #include <common.h>
 #include <env.h>
+#include <init.h>
 #include <malloc.h>
 #include <net.h>
 #include <status_led.h>
diff --git a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c
index 25a5e4b9ba..01c8691f31 100644
--- a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c
+++ b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c
@@ -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>
diff --git a/board/keymile/kmp204x/ddr.c b/board/keymile/kmp204x/ddr.c
index ee2e3d6b9a..bea9451aec 100644
--- a/board/keymile/kmp204x/ddr.c
+++ b/board/keymile/kmp204x/ddr.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <hwconfig.h>
+#include <init.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/kmc/kzm9g/kzm9g.c b/board/kmc/kzm9g/kzm9g.c
index c6117b33bc..7bc66af193 100644
--- a/board/kmc/kzm9g/kzm9g.c
+++ b/board/kmc/kzm9g/kzm9g.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <net.h>
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/kobol/helios4/helios4.c b/board/kobol/helios4/helios4.c
index f8134b7042..97b152664a 100644
--- a/board/kobol/helios4/helios4.c
+++ b/board/kobol/helios4/helios4.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <init.h>
 #include <miiphy.h>
 #include <net.h>
 #include <netdev.h>
diff --git a/board/lego/ev3/legoev3.c b/board/lego/ev3/legoev3.c
index fa099e95f5..51b669a891 100644
--- a/board/lego/ev3/legoev3.c
+++ b/board/lego/ev3/legoev3.c
@@ -14,6 +14,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <init.h>
 #include <spi.h>
 #include <spi_flash.h>
 #include <asm/arch/hardware.h>
diff --git a/board/lg/sniper/sniper.c b/board/lg/sniper/sniper.c
index b4205d6ed4..2825eccc03 100644
--- a/board/lg/sniper/sniper.c
+++ b/board/lg/sniper/sniper.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
+#include <init.h>
 #include <linux/ctype.h>
 #include <linux/usb/musb.h>
 #include <asm/omap_musb.h>
diff --git a/board/liebherr/display5/display5.c b/board/liebherr/display5/display5.c
index a362d25c01..b979ddd296 100644
--- a/board/liebherr/display5/display5.c
+++ b/board/liebherr/display5/display5.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <fdt_support.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/liebherr/display5/spl.c b/board/liebherr/display5/spl.c
index 0f5eab79b5..fc3ebaf145 100644
--- a/board/liebherr/display5/spl.c
+++ b/board/liebherr/display5/spl.c
@@ -8,6 +8,7 @@
 #include <cpu_func.h>
 #include <env.h>
 #include <image.h>
+#include <init.h>
 #include <serial.h>
 #include <spl.h>
 #include <linux/libfdt.h>
diff --git a/board/liebherr/mccmon6/spl.c b/board/liebherr/mccmon6/spl.c
index 8ed8e03295..f40e814f86 100644
--- a/board/liebherr/mccmon6/spl.c
+++ b/board/liebherr/mccmon6/spl.c
@@ -6,6 +6,7 @@
  */
 
 #include <image.h>
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
diff --git a/board/liebherr/xea/xea.c b/board/liebherr/xea/xea.c
index 95c9064066..41fa21292e 100644
--- a/board/liebherr/xea/xea.c
+++ b/board/liebherr/xea/xea.c
@@ -15,6 +15,7 @@
 
 #include <common.h>
 #include <fdt_support.h>
+#include <init.h>
 #include <net.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
diff --git a/board/logicpd/am3517evm/am3517evm.c b/board/logicpd/am3517evm/am3517evm.c
index 6ed3a9b847..b25b02b641 100644
--- a/board/logicpd/am3517evm/am3517evm.c
+++ b/board/logicpd/am3517evm/am3517evm.c
@@ -12,6 +12,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 #include <net.h>
 #include <ns16550.h>
 #include <serial.h>
diff --git a/board/logicpd/zoom1/zoom1.c b/board/logicpd/zoom1/zoom1.c
index 7438d37923..53dc9762f8 100644
--- a/board/logicpd/zoom1/zoom1.c
+++ b/board/logicpd/zoom1/zoom1.c
@@ -16,6 +16,7 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
+#include <init.h>
 #include <net.h>
 #include <ns16550.h>
 #include <netdev.h>
diff --git a/board/maxbcm/maxbcm.c b/board/maxbcm/maxbcm.c
index 395904f8c8..3c6422214f 100644
--- a/board/maxbcm/maxbcm.c
+++ b/board/maxbcm/maxbcm.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <miiphy.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
diff --git a/board/mediatek/mt7622/mt7622_rfb.c b/board/mediatek/mt7622/mt7622_rfb.c
index b9296bede2..912b993240 100644
--- a/board/mediatek/mt7622/mt7622_rfb.c
+++ b/board/mediatek/mt7622/mt7622_rfb.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <config.h>
+#include <init.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/mediatek/mt8518/mt8518_ap1.c b/board/mediatek/mt8518/mt8518_ap1.c
index 2ac7c6cd18..72284a2689 100644
--- a/board/mediatek/mt8518/mt8518_ap1.c
+++ b/board/mediatek/mt8518/mt8518_ap1.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/microchip/mpfs_icicle/mpfs_icicle.c b/board/microchip/mpfs_icicle/mpfs_icicle.c
index 0ef243186d..8381361ec3 100644
--- a/board/microchip/mpfs_icicle/mpfs_icicle.c
+++ b/board/microchip/mpfs_icicle/mpfs_icicle.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 #include <asm/io.h>
 
 #define MPFS_SYSREG_SOFT_RESET	((unsigned int *)0x20002088)
diff --git a/board/microchip/pic32mzda/pic32mzda.c b/board/microchip/pic32mzda/pic32mzda.c
index aa8aab39ce..e7337deea7 100644
--- a/board/microchip/pic32mzda/pic32mzda.c
+++ b/board/microchip/pic32mzda/pic32mzda.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <dm.h>
 #include <clk.h>
+#include <init.h>
 #include <malloc.h>
 #include <dt-bindings/clock/microchip,clock.h>
 #include <mach/pic32.h>
diff --git a/board/mikrotik/crs305-1g-4s/crs305-1g-4s.c b/board/mikrotik/crs305-1g-4s/crs305-1g-4s.c
index d1d1f40092..4b67a4ba2d 100644
--- a/board/mikrotik/crs305-1g-4s/crs305-1g-4s.c
+++ b/board/mikrotik/crs305-1g-4s/crs305-1g-4s.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <init.h>
 #include <asm/gpio.h>
 #include <linux/mbus.h>
 #include <linux/io.h>
diff --git a/board/netgear/dgnd3700v2/dgnd3700v2.c b/board/netgear/dgnd3700v2/dgnd3700v2.c
index 6840a21001..d9c0200f24 100644
--- a/board/netgear/dgnd3700v2/dgnd3700v2.c
+++ b/board/netgear/dgnd3700v2/dgnd3700v2.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 
 #define GPIO_BASE_6362			0x10000080
diff --git a/board/nokia/rx51/rx51.c b/board/nokia/rx51/rx51.c
index 71ca79deab..92b5c20b51 100644
--- a/board/nokia/rx51/rx51.c
+++ b/board/nokia/rx51/rx51.c
@@ -23,6 +23,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <init.h>
 #include <watchdog.h>
 #include <malloc.h>
 #include <twl4030.h>
diff --git a/board/novtech/meerkat96/meerkat96.c b/board/novtech/meerkat96/meerkat96.c
index 5fb4d43997..b13e7ce3b1 100644
--- a/board/novtech/meerkat96/meerkat96.c
+++ b/board/novtech/meerkat96/meerkat96.c
@@ -4,6 +4,7 @@
  * Copyright (C) 2016 NXP Semiconductors
  */
 
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/mx7-pins.h>
diff --git a/board/olimex/mx23_olinuxino/mx23_olinuxino.c b/board/olimex/mx23_olinuxino/mx23_olinuxino.c
index f1d7cb8c93..cfe33d3072 100644
--- a/board/olimex/mx23_olinuxino/mx23_olinuxino.c
+++ b/board/olimex/mx23_olinuxino/mx23_olinuxino.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch/iomux-mx23.h>
diff --git a/board/overo/overo.c b/board/overo/overo.c
index f7da1a95ea..7a54719e87 100644
--- a/board/overo/overo.c
+++ b/board/overo/overo.c
@@ -14,6 +14,7 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
+#include <init.h>
 #include <malloc.h>
 #include <net.h>
 #include <ns16550.h>
diff --git a/board/pandora/pandora.c b/board/pandora/pandora.c
index a9aae7951d..bb310d9e68 100644
--- a/board/pandora/pandora.c
+++ b/board/pandora/pandora.c
@@ -14,6 +14,7 @@
  */
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 #include <ns16550.h>
 #include <twl4030.h>
 #include <asm/io.h>
diff --git a/board/phytec/pcl063/spl.c b/board/phytec/pcl063/spl.c
index b5e080c072..48cb2e267c 100644
--- a/board/phytec/pcl063/spl.c
+++ b/board/phytec/pcl063/spl.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <spl.h>
 #include <asm/arch/clock.h>
 #include <asm/io.h>
diff --git a/board/phytec/pcm051/board.c b/board/phytec/pcm051/board.c
index e561c82253..6f1ada82c4 100644
--- a/board/phytec/pcm051/board.c
+++ b/board/phytec/pcm051/board.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <env.h>
 #include <errno.h>
+#include <init.h>
 #include <net.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
diff --git a/board/phytium/durian/durian.c b/board/phytium/durian/durian.c
index 91d13bdea4..7dceebdeae 100644
--- a/board/phytium/durian/durian.c
+++ b/board/phytium/durian/durian.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <asm/armv8/mmu.h>
 #include <asm/cache.h>
 #include <asm/system.h>
diff --git a/board/pine64/rockpro64_rk3399/rockpro64-rk3399.c b/board/pine64/rockpro64_rk3399/rockpro64-rk3399.c
index 3f60235771..d79084614f 100644
--- a/board/pine64/rockpro64_rk3399/rockpro64-rk3399.c
+++ b/board/pine64/rockpro64_rk3399/rockpro64-rk3399.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 #include <syscon.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/clock.h>
diff --git a/board/ppcag/bg0900/bg0900.c b/board/ppcag/bg0900/bg0900.c
index 00afff3abf..70870797bb 100644
--- a/board/ppcag/bg0900/bg0900.c
+++ b/board/ppcag/bg0900/bg0900.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <net.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
diff --git a/board/qca/ap121/ap121.c b/board/qca/ap121/ap121.c
index 24acdcb2e6..60a2e19143 100644
--- a/board/qca/ap121/ap121.c
+++ b/board/qca/ap121/ap121.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
diff --git a/board/qca/ap143/ap143.c b/board/qca/ap143/ap143.c
index 8ee26ababa..ac65054136 100644
--- a/board/qca/ap143/ap143.c
+++ b/board/qca/ap143/ap143.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
diff --git a/board/qca/ap152/ap152.c b/board/qca/ap152/ap152.c
index 30cd56563b..1064705d26 100644
--- a/board/qca/ap152/ap152.c
+++ b/board/qca/ap152/ap152.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
diff --git a/board/qemu-mips/qemu-mips.c b/board/qemu-mips/qemu-mips.c
index b3e0830843..cf22ed5627 100644
--- a/board/qemu-mips/qemu-mips.c
+++ b/board/qemu-mips/qemu-mips.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <init.h>
 #include <net.h>
 #include <asm/mipsregs.h>
 #include <asm/io.h>
diff --git a/board/qualcomm/dragonboard820c/dragonboard820c.c b/board/qualcomm/dragonboard820c/dragonboard820c.c
index 3134415d80..c1ade5ce43 100644
--- a/board/qualcomm/dragonboard820c/dragonboard820c.c
+++ b/board/qualcomm/dragonboard820c/dragonboard820c.c
@@ -6,6 +6,7 @@
  */
 
 #include <cpu_func.h>
+#include <init.h>
 #include <asm/arch/sysmap-apq8096.h>
 #include <env.h>
 #include <asm/cache.h>
diff --git a/board/raidsonic/ib62x0/ib62x0.c b/board/raidsonic/ib62x0/ib62x0.c
index e8aae4cb81..db1b0adc38 100644
--- a/board/raidsonic/ib62x0/ib62x0.c
+++ b/board/raidsonic/ib62x0/ib62x0.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <miiphy.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
diff --git a/board/renesas/MigoR/migo_r.c b/board/renesas/MigoR/migo_r.c
index 3ffd9ad75d..f8bdb4d48a 100644
--- a/board/renesas/MigoR/migo_r.c
+++ b/board/renesas/MigoR/migo_r.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <net.h>
 #include <netdev.h>
 #include <asm/io.h>
diff --git a/board/renesas/alt/alt.c b/board/renesas/alt/alt.c
index a6d7cb48a2..de487ff4b7 100644
--- a/board/renesas/alt/alt.c
+++ b/board/renesas/alt/alt.c
@@ -9,6 +9,7 @@
 #include <cpu_func.h>
 #include <env.h>
 #include <hang.h>
+#include <init.h>
 #include <malloc.h>
 #include <dm.h>
 #include <dm/platform_data/serial_sh.h>
diff --git a/board/renesas/alt/alt_spl.c b/board/renesas/alt/alt_spl.c
index dbb210584d..a9c289447e 100644
--- a/board/renesas/alt/alt_spl.c
+++ b/board/renesas/alt/alt_spl.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <malloc.h>
 #include <dm/platform_data/serial_sh.h>
 #include <asm/processor.h>
diff --git a/board/renesas/blanche/blanche.c b/board/renesas/blanche/blanche.c
index 892f7e7260..400c166b90 100644
--- a/board/renesas/blanche/blanche.c
+++ b/board/renesas/blanche/blanche.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <net.h>
 #include <asm/arch/mmc.h>
 #include <asm/arch/rcar-mstp.h>
diff --git a/board/renesas/condor/condor.c b/board/renesas/condor/condor.c
index 6505beda81..91afcdd85a 100644
--- a/board/renesas/condor/condor.c
+++ b/board/renesas/condor/condor.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <hang.h>
+#include <init.h>
 #include <asm/processor.h>
 #include <asm/mach-types.h>
 #include <asm/io.h>
diff --git a/board/renesas/draak/draak.c b/board/renesas/draak/draak.c
index 2f9364c484..5f37a19600 100644
--- a/board/renesas/draak/draak.c
+++ b/board/renesas/draak/draak.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <hang.h>
+#include <init.h>
 #include <malloc.h>
 #include <netdev.h>
 #include <dm.h>
diff --git a/board/renesas/eagle/eagle.c b/board/renesas/eagle/eagle.c
index cf06a173e4..6228f22e01 100644
--- a/board/renesas/eagle/eagle.c
+++ b/board/renesas/eagle/eagle.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <hang.h>
+#include <init.h>
 #include <malloc.h>
 #include <netdev.h>
 #include <dm.h>
diff --git a/board/renesas/ebisu/ebisu.c b/board/renesas/ebisu/ebisu.c
index 81d7f8eafa..d164a36361 100644
--- a/board/renesas/ebisu/ebisu.c
+++ b/board/renesas/ebisu/ebisu.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <hang.h>
+#include <init.h>
 #include <malloc.h>
 #include <netdev.h>
 #include <dm.h>
diff --git a/board/renesas/gose/gose.c b/board/renesas/gose/gose.c
index eb6ee6f6a4..aec947ab5a 100644
--- a/board/renesas/gose/gose.c
+++ b/board/renesas/gose/gose.c
@@ -9,6 +9,7 @@
 #include <cpu_func.h>
 #include <env.h>
 #include <hang.h>
+#include <init.h>
 #include <malloc.h>
 #include <dm.h>
 #include <dm/platform_data/serial_sh.h>
diff --git a/board/renesas/gose/gose_spl.c b/board/renesas/gose/gose_spl.c
index 42a6758148..b1b2ceb607 100644
--- a/board/renesas/gose/gose_spl.c
+++ b/board/renesas/gose/gose_spl.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <malloc.h>
 #include <dm/platform_data/serial_sh.h>
 #include <asm/processor.h>
diff --git a/board/renesas/grpeach/grpeach.c b/board/renesas/grpeach/grpeach.c
index ba904609ae..b92e01ca98 100644
--- a/board/renesas/grpeach/grpeach.c
+++ b/board/renesas/grpeach/grpeach.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
 
diff --git a/board/renesas/koelsch/koelsch.c b/board/renesas/koelsch/koelsch.c
index e09d3d0a63..67ac85d580 100644
--- a/board/renesas/koelsch/koelsch.c
+++ b/board/renesas/koelsch/koelsch.c
@@ -10,6 +10,7 @@
 #include <cpu_func.h>
 #include <env.h>
 #include <hang.h>
+#include <init.h>
 #include <malloc.h>
 #include <dm.h>
 #include <dm/platform_data/serial_sh.h>
diff --git a/board/renesas/koelsch/koelsch_spl.c b/board/renesas/koelsch/koelsch_spl.c
index b3530d7ce7..a321678e1b 100644
--- a/board/renesas/koelsch/koelsch_spl.c
+++ b/board/renesas/koelsch/koelsch_spl.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <malloc.h>
 #include <dm/platform_data/serial_sh.h>
 #include <asm/processor.h>
diff --git a/board/renesas/lager/lager.c b/board/renesas/lager/lager.c
index 9ac9515925..1a5877bf15 100644
--- a/board/renesas/lager/lager.c
+++ b/board/renesas/lager/lager.c
@@ -12,6 +12,7 @@
 #include <env.h>
 #include <env_internal.h>
 #include <hang.h>
+#include <init.h>
 #include <malloc.h>
 #include <netdev.h>
 #include <dm.h>
diff --git a/board/renesas/lager/lager_spl.c b/board/renesas/lager/lager_spl.c
index d7db361b12..ceaf164e78 100644
--- a/board/renesas/lager/lager_spl.c
+++ b/board/renesas/lager/lager_spl.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <malloc.h>
 #include <dm/platform_data/serial_sh.h>
 #include <asm/processor.h>
diff --git a/board/renesas/porter/porter.c b/board/renesas/porter/porter.c
index 097710b479..acff2e3b39 100644
--- a/board/renesas/porter/porter.c
+++ b/board/renesas/porter/porter.c
@@ -10,6 +10,7 @@
 #include <cpu_func.h>
 #include <env.h>
 #include <hang.h>
+#include <init.h>
 #include <malloc.h>
 #include <dm.h>
 #include <dm/platform_data/serial_sh.h>
diff --git a/board/renesas/porter/porter_spl.c b/board/renesas/porter/porter_spl.c
index 026220d9e2..5b1f03cf7d 100644
--- a/board/renesas/porter/porter_spl.c
+++ b/board/renesas/porter/porter_spl.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <malloc.h>
 #include <dm/platform_data/serial_sh.h>
 #include <asm/processor.h>
diff --git a/board/renesas/rcar-common/common.c b/board/renesas/rcar-common/common.c
index 5a6aa8255b..b9e8cb4ce7 100644
--- a/board/renesas/rcar-common/common.c
+++ b/board/renesas/rcar-common/common.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 #include <dm/uclass-internal.h>
 #include <asm/arch/rmobile.h>
 #include <linux/libfdt.h>
diff --git a/board/renesas/rcar-common/gen3-spl.c b/board/renesas/rcar-common/gen3-spl.c
index a3e2aebe77..2b21a29de1 100644
--- a/board/renesas/rcar-common/gen3-spl.c
+++ b/board/renesas/rcar-common/gen3-spl.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <image.h>
+#include <init.h>
 #include <asm/io.h>
 #include <spl.h>
 
diff --git a/board/renesas/salvator-x/salvator-x.c b/board/renesas/salvator-x/salvator-x.c
index ecf0dde4ef..ff0409be98 100644
--- a/board/renesas/salvator-x/salvator-x.c
+++ b/board/renesas/salvator-x/salvator-x.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <image.h>
+#include <init.h>
 #include <malloc.h>
 #include <netdev.h>
 #include <dm.h>
diff --git a/board/renesas/sh7763rdp/sh7763rdp.c b/board/renesas/sh7763rdp/sh7763rdp.c
index 9bc2c55986..73a53c1e5a 100644
--- a/board/renesas/sh7763rdp/sh7763rdp.c
+++ b/board/renesas/sh7763rdp/sh7763rdp.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/processor.h>
 
diff --git a/board/renesas/silk/silk.c b/board/renesas/silk/silk.c
index e7cbd75776..db88f0ddb6 100644
--- a/board/renesas/silk/silk.c
+++ b/board/renesas/silk/silk.c
@@ -10,6 +10,7 @@
 #include <cpu_func.h>
 #include <env.h>
 #include <hang.h>
+#include <init.h>
 #include <malloc.h>
 #include <dm.h>
 #include <dm/platform_data/serial_sh.h>
diff --git a/board/renesas/silk/silk_spl.c b/board/renesas/silk/silk_spl.c
index a2c397f935..9859977c77 100644
--- a/board/renesas/silk/silk_spl.c
+++ b/board/renesas/silk/silk_spl.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <malloc.h>
 #include <dm/platform_data/serial_sh.h>
 #include <asm/processor.h>
diff --git a/board/renesas/stout/stout.c b/board/renesas/stout/stout.c
index 0a0ff5ff76..594070a9bf 100644
--- a/board/renesas/stout/stout.c
+++ b/board/renesas/stout/stout.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <init.h>
 #include <malloc.h>
 #include <netdev.h>
 #include <dm.h>
diff --git a/board/renesas/stout/stout_spl.c b/board/renesas/stout/stout_spl.c
index 8d01efce56..a10752de1c 100644
--- a/board/renesas/stout/stout_spl.c
+++ b/board/renesas/stout/stout_spl.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <malloc.h>
 #include <dm/platform_data/serial_sh.h>
 #include <asm/processor.h>
diff --git a/board/renesas/ulcb/ulcb.c b/board/renesas/ulcb/ulcb.c
index 04ca49572f..ebb379a82a 100644
--- a/board/renesas/ulcb/ulcb.c
+++ b/board/renesas/ulcb/ulcb.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <image.h>
+#include <init.h>
 #include <malloc.h>
 #include <netdev.h>
 #include <dm.h>
diff --git a/board/rockchip/evb_rk3399/evb-rk3399.c b/board/rockchip/evb_rk3399/evb-rk3399.c
index b9049abcc7..7909ef5c18 100644
--- a/board/rockchip/evb_rk3399/evb-rk3399.c
+++ b/board/rockchip/evb_rk3399/evb-rk3399.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 #include <asm/arch-rockchip/periph.h>
 #include <power/regulator.h>
 
diff --git a/board/rockchip/evb_rv1108/evb_rv1108.c b/board/rockchip/evb_rv1108/evb_rv1108.c
index 5d622c3737..c57913828d 100644
--- a/board/rockchip/evb_rv1108/evb_rv1108.c
+++ b/board/rockchip/evb_rv1108/evb_rv1108.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <syscon.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/clock.h>
diff --git a/board/samsung/goni/goni.c b/board/samsung/goni/goni.c
index 623e4abc21..a900ad1476 100644
--- a/board/samsung/goni/goni.c
+++ b/board/samsung/goni/goni.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/gpio.h>
 #include <asm/arch/mmc.h>
 #include <dm.h>
diff --git a/board/sandisk/sansa_fuze_plus/sfp.c b/board/sandisk/sansa_fuze_plus/sfp.c
index c2c9b9c7e7..ae965a80a5 100644
--- a/board/sandisk/sansa_fuze_plus/sfp.c
+++ b/board/sandisk/sansa_fuze_plus/sfp.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <errno.h>
+#include <init.h>
 #include <net.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
diff --git a/board/sbc8349/sbc8349.c b/board/sbc8349/sbc8349.c
index 9051392cd0..2c05ebb1bd 100644
--- a/board/sbc8349/sbc8349.c
+++ b/board/sbc8349/sbc8349.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <fdt_support.h>
+#include <init.h>
 #include <ioports.h>
 #include <mpc83xx.h>
 #include <asm/mpc8349_pci.h>
diff --git a/board/schulercontrol/sc_sps_1/sc_sps_1.c b/board/schulercontrol/sc_sps_1/sc_sps_1.c
index 422f25c2e9..d2c5f807ad 100644
--- a/board/schulercontrol/sc_sps_1/sc_sps_1.c
+++ b/board/schulercontrol/sc_sps_1/sc_sps_1.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <net.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
diff --git a/board/seeed/linkit-smart-7688/board.c b/board/seeed/linkit-smart-7688/board.c
index d3d3d50c2c..492530ec4e 100644
--- a/board/seeed/linkit-smart-7688/board.c
+++ b/board/seeed/linkit-smart-7688/board.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 
 #define MT76XX_GPIO1_MODE	0x10000060
diff --git a/board/siemens/capricorn/board.c b/board/siemens/capricorn/board.c
index 00fd4b9658..b4eae7f027 100644
--- a/board/siemens/capricorn/board.c
+++ b/board/siemens/capricorn/board.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <init.h>
 #include <netdev.h>
 #include <env_internal.h>
 #include <fsl_esdhc_imx.h>
diff --git a/board/siemens/capricorn/spl.c b/board/siemens/capricorn/spl.c
index 47fe86ccc0..8435bd3863 100644
--- a/board/siemens/capricorn/spl.c
+++ b/board/siemens/capricorn/spl.c
@@ -6,6 +6,7 @@
  *
  */
 #include <common.h>
+#include <init.h>
 #include <spl.h>
 #include <dm.h>
 #include <dm/uclass.h>
diff --git a/board/siemens/common/board.c b/board/siemens/common/board.c
index 24429d2837..f1bca4b27f 100644
--- a/board/siemens/common/board.c
+++ b/board/siemens/common/board.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <env.h>
 #include <errno.h>
+#include <init.h>
 #include <malloc.h>
 #include <serial.h>
 #include <spl.h>
diff --git a/board/sifive/fu540/fu540.c b/board/sifive/fu540/fu540.c
index 47a2090251..e9d1cf9a4b 100644
--- a/board/sifive/fu540/fu540.c
+++ b/board/sifive/fu540/fu540.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 #include <linux/delay.h>
 #include <linux/io.h>
 
diff --git a/board/silica/pengwyn/board.c b/board/silica/pengwyn/board.c
index 08eafefb91..e3c9d9e755 100644
--- a/board/silica/pengwyn/board.c
+++ b/board/silica/pengwyn/board.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <init.h>
 #include <net.h>
 #include <serial.h>
 #include <asm/arch/cpu.h>
diff --git a/board/sks-kinkel/sksimx6/sksimx6.c b/board/sks-kinkel/sksimx6/sksimx6.c
index 48e7ff2479..e5f6e90e0c 100644
--- a/board/sks-kinkel/sksimx6/sksimx6.c
+++ b/board/sks-kinkel/sksimx6/sksimx6.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <net.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/socrates/socrates.c b/board/socrates/socrates.c
index 84644a85c7..c51f3e4f92 100644
--- a/board/socrates/socrates.c
+++ b/board/socrates/socrates.c
@@ -13,6 +13,7 @@
 #include <common.h>
 #include <clock_legacy.h>
 #include <env.h>
+#include <init.h>
 #include <pci.h>
 #include <uuid.h>
 #include <asm/processor.h>
diff --git a/board/solidrun/clearfog/clearfog.c b/board/solidrun/clearfog/clearfog.c
index 490ca9bc34..b8391a35c0 100644
--- a/board/solidrun/clearfog/clearfog.c
+++ b/board/solidrun/clearfog/clearfog.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <init.h>
 #include <miiphy.h>
 #include <net.h>
 #include <netdev.h>
diff --git a/board/sr1500/socfpga.c b/board/sr1500/socfpga.c
index c9e32e3960..83663c7e4d 100644
--- a/board/sr1500/socfpga.c
+++ b/board/sr1500/socfpga.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/arch/reset_manager.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
diff --git a/board/st/stih410-b2260/board.c b/board/st/stih410-b2260/board.c
index 35bf497156..b1147f2e1a 100644
--- a/board/st/stih410-b2260/board.c
+++ b/board/st/stih410-b2260/board.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <asm/cache.h>
 #include <linux/usb/otg.h>
 #include <dwc3-sti-glue.h>
diff --git a/board/st/stm32f429-discovery/stm32f429-discovery.c b/board/st/stm32f429-discovery/stm32f429-discovery.c
index 500dc5fe3a..5b0744ff6b 100644
--- a/board/st/stm32f429-discovery/stm32f429-discovery.c
+++ b/board/st/stm32f429-discovery/stm32f429-discovery.c
@@ -12,6 +12,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 
 #include <asm/io.h>
 #include <asm/arch/stm32.h>
diff --git a/board/st/stm32f429-evaluation/stm32f429-evaluation.c b/board/st/stm32f429-evaluation/stm32f429-evaluation.c
index 8ab2fa5d59..1570d110bf 100644
--- a/board/st/stm32f429-evaluation/stm32f429-evaluation.c
+++ b/board/st/stm32f429-evaluation/stm32f429-evaluation.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 
 #include <asm/io.h>
 #include <asm/arch/stm32.h>
diff --git a/board/st/stm32f469-discovery/stm32f469-discovery.c b/board/st/stm32f469-discovery/stm32f469-discovery.c
index 70d23d90f4..d9bcb39bea 100644
--- a/board/st/stm32f469-discovery/stm32f469-discovery.c
+++ b/board/st/stm32f469-discovery/stm32f469-discovery.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 
 #include <asm/io.h>
 #include <asm/arch/stm32.h>
diff --git a/board/st/stv0991/stv0991.c b/board/st/stv0991/stv0991.c
index fbcb87092b..d5a9f1386e 100644
--- a/board/st/stv0991/stv0991.c
+++ b/board/st/stv0991/stv0991.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <bootstage.h>
 #include <dm.h>
+#include <init.h>
 #include <miiphy.h>
 #include <net.h>
 #include <asm/arch/stv0991_periph.h>
diff --git a/board/ste/stemmy/stemmy.c b/board/ste/stemmy/stemmy.c
index 8cf6f18755..f7834c08fc 100644
--- a/board/ste/stemmy/stemmy.c
+++ b/board/ste/stemmy/stemmy.c
@@ -3,6 +3,7 @@
  * Copyright (C) 2019 Stephan Gerhold <stephan@gerhold.net>
  */
 #include <common.h>
+#include <init.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/sunxi/dram_sun4i_auto.c b/board/sunxi/dram_sun4i_auto.c
index 7d4409b51e..e8bbee4ee5 100644
--- a/board/sunxi/dram_sun4i_auto.c
+++ b/board/sunxi/dram_sun4i_auto.c
@@ -1,4 +1,5 @@
 #include <common.h>
+#include <init.h>
 #include <asm/arch/dram.h>
 
 static struct dram_para dram_para = {
diff --git a/board/sunxi/dram_sun5i_auto.c b/board/sunxi/dram_sun5i_auto.c
index e3fa243267..a5f4f8b743 100644
--- a/board/sunxi/dram_sun5i_auto.c
+++ b/board/sunxi/dram_sun5i_auto.c
@@ -1,6 +1,7 @@
 /* DRAM parameters for auto dram configuration on sun5i and sun7i */
 
 #include <common.h>
+#include <init.h>
 #include <asm/arch/dram.h>
 
 static struct dram_para dram_para = {
diff --git a/board/synopsys/axs10x/axs10x.c b/board/synopsys/axs10x/axs10x.c
index 4bd88f85a6..b4a1d4c5df 100644
--- a/board/synopsys/axs10x/axs10x.c
+++ b/board/synopsys/axs10x/axs10x.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <dwmmc.h>
+#include <init.h>
 #include <malloc.h>
 #include <asm/arcregs.h>
 #include "axs10x.h"
diff --git a/board/synopsys/emsdp/emsdp.c b/board/synopsys/emsdp/emsdp.c
index c09ed8cff8..d98e606426 100644
--- a/board/synopsys/emsdp/emsdp.c
+++ b/board/synopsys/emsdp/emsdp.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <dwmmc.h>
+#include <init.h>
 #include <malloc.h>
 
 #include <asm/arcregs.h>
diff --git a/board/synopsys/iot_devkit/iot_devkit.c b/board/synopsys/iot_devkit/iot_devkit.c
index 36aa8f6ae5..05b63e415b 100644
--- a/board/synopsys/iot_devkit/iot_devkit.c
+++ b/board/synopsys/iot_devkit/iot_devkit.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <malloc.h>
 #include <dwmmc.h>
 #include <linux/libfdt.h>
diff --git a/board/synopsys/nsim/nsim.c b/board/synopsys/nsim/nsim.c
index f384f707f6..00e5cc3641 100644
--- a/board/synopsys/nsim/nsim.c
+++ b/board/synopsys/nsim/nsim.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <dm/device.h>
 #include <virtio_types.h>
 #include <virtio.h>
diff --git a/board/tbs/tbs2910/tbs2910.c b/board/tbs/tbs2910/tbs2910.c
index b4fd183394..d32517f998 100644
--- a/board/tbs/tbs2910/tbs2910.c
+++ b/board/tbs/tbs2910/tbs2910.c
@@ -3,6 +3,7 @@
  * Copyright (C) 2014 Soeren Moch <smoch@web.de>
  */
 
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
diff --git a/board/technexion/pico-imx6/pico-imx6.c b/board/technexion/pico-imx6/pico-imx6.c
index 146bbc26d6..eac30368f7 100644
--- a/board/technexion/pico-imx6/pico-imx6.c
+++ b/board/technexion/pico-imx6/pico-imx6.c
@@ -6,6 +6,7 @@
  * Author: Fabio Estevam <festevam@gmail.com>
  */
 
+#include <init.h>
 #include <net.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
diff --git a/board/technexion/pico-imx6/spl.c b/board/technexion/pico-imx6/spl.c
index 983f98beec..fe3c584662 100644
--- a/board/technexion/pico-imx6/spl.c
+++ b/board/technexion/pico-imx6/spl.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <image.h>
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
diff --git a/board/technexion/pico-imx6ul/pico-imx6ul.c b/board/technexion/pico-imx6ul/pico-imx6ul.c
index 4294f3ed54..e4ca83a5ff 100644
--- a/board/technexion/pico-imx6ul/pico-imx6ul.c
+++ b/board/technexion/pico-imx6ul/pico-imx6ul.c
@@ -5,6 +5,7 @@
  * Author: Richard Hu <richard.hu@technexion.com>
  */
 
+#include <init.h>
 #include <net.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/iomux.h>
diff --git a/board/technexion/pico-imx7d/spl.c b/board/technexion/pico-imx7d/spl.c
index 69db77412c..a651a00c1a 100644
--- a/board/technexion/pico-imx7d/spl.c
+++ b/board/technexion/pico-imx7d/spl.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/crm_regs.h>
diff --git a/board/technexion/tao3530/tao3530.c b/board/technexion/tao3530/tao3530.c
index b604ee951b..8ce3637731 100644
--- a/board/technexion/tao3530/tao3530.c
+++ b/board/technexion/tao3530/tao3530.c
@@ -5,6 +5,7 @@
  */
 #include <common.h>
 #include <bootstage.h>
+#include <init.h>
 #include <malloc.h>
 #include <netdev.h>
 #include <twl4030.h>
diff --git a/board/technologic/ts4600/ts4600.c b/board/technologic/ts4600/ts4600.c
index f9cc2e8f10..2a63e84ec3 100644
--- a/board/technologic/ts4600/ts4600.c
+++ b/board/technologic/ts4600/ts4600.c
@@ -14,6 +14,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/theobroma-systems/puma_rk3399/puma-rk3399.c b/board/theobroma-systems/puma_rk3399/puma-rk3399.c
index 7ff4766947..7e7effe56e 100644
--- a/board/theobroma-systems/puma_rk3399/puma-rk3399.c
+++ b/board/theobroma-systems/puma_rk3399/puma-rk3399.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
+#include <init.h>
 #include <misc.h>
 #include <spl.h>
 #include <syscon.h>
diff --git a/board/ti/am3517crane/am3517crane.c b/board/ti/am3517crane/am3517crane.c
index 5d4e57ffc5..888aa5b9ca 100644
--- a/board/ti/am3517crane/am3517crane.c
+++ b/board/ti/am3517crane/am3517crane.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/mmc_host_def.h>
 #include <asm/arch/mem.h>
diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
index 439b023da8..9139ad87d4 100644
--- a/board/ti/beagle/beagle.c
+++ b/board/ti/beagle/beagle.c
@@ -16,6 +16,7 @@
 #include <bootstage.h>
 #include <dm.h>
 #include <env.h>
+#include <init.h>
 #include <net.h>
 #include <ns16550.h>
 #include <serial.h>
diff --git a/board/ti/evm/evm.c b/board/ti/evm/evm.c
index 7161c934cd..d6d21bae1f 100644
--- a/board/ti/evm/evm.c
+++ b/board/ti/evm/evm.c
@@ -13,6 +13,7 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
+#include <init.h>
 #include <net.h>
 #include <ns16550.h>
 #include <netdev.h>
diff --git a/board/ti/ks2_evm/board_k2e.c b/board/ti/ks2_evm/board_k2e.c
index 350cc68e49..39abb24e15 100644
--- a/board/ti/ks2_evm/board_k2e.c
+++ b/board/ti/ks2_evm/board_k2e.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <image.h>
+#include <init.h>
 #include <asm/arch/ddr3.h>
 #include <asm/arch/hardware.h>
 #include <asm/ti-common/keystone_net.h>
diff --git a/board/ti/ks2_evm/board_k2hk.c b/board/ti/ks2_evm/board_k2hk.c
index 1eb6cd761e..12c4649c3c 100644
--- a/board/ti/ks2_evm/board_k2hk.c
+++ b/board/ti/ks2_evm/board_k2hk.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <image.h>
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/hardware.h>
 #include <asm/ti-common/keystone_net.h>
diff --git a/board/ti/ks2_evm/board_k2l.c b/board/ti/ks2_evm/board_k2l.c
index 5ff11ee0d6..f759ee3646 100644
--- a/board/ti/ks2_evm/board_k2l.c
+++ b/board/ti/ks2_evm/board_k2l.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <image.h>
+#include <init.h>
 #include <asm/arch/ddr3.h>
 #include <asm/arch/hardware.h>
 #include <asm/ti-common/keystone_net.h>
diff --git a/board/ti/omap5_uevm/evm.c b/board/ti/omap5_uevm/evm.c
index 0d19ad018a..fab48a70ef 100644
--- a/board/ti/omap5_uevm/evm.c
+++ b/board/ti/omap5_uevm/evm.c
@@ -6,6 +6,7 @@
  * Steve Sakoman  <steve@sakoman.com>
  */
 #include <common.h>
+#include <init.h>
 #include <net.h>
 #include <palmas.h>
 #include <asm/arch/omap.h>
diff --git a/board/ti/panda/panda.c b/board/ti/panda/panda.c
index b1e51bc431..c9413af350 100644
--- a/board/ti/panda/panda.c
+++ b/board/ti/panda/panda.c
@@ -5,6 +5,7 @@
  * Steve Sakoman  <steve@sakoman.com>
  */
 #include <common.h>
+#include <init.h>
 #include <net.h>
 #include <asm/mach-types.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/ti/sdp4430/sdp.c b/board/ti/sdp4430/sdp.c
index 97da5ccf0d..a5b3504045 100644
--- a/board/ti/sdp4430/sdp.c
+++ b/board/ti/sdp4430/sdp.c
@@ -6,6 +6,7 @@
  * Steve Sakoman  <steve@sakoman.com>
  */
 #include <common.h>
+#include <init.h>
 #include <net.h>
 #include <twl6030.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/ti/ti814x/evm.c b/board/ti/ti814x/evm.c
index 7f82e71228..8ed80d2f46 100644
--- a/board/ti/ti814x/evm.c
+++ b/board/ti/ti814x/evm.c
@@ -11,6 +11,7 @@
 #include <cpsw.h>
 #include <env.h>
 #include <errno.h>
+#include <init.h>
 #include <net.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
diff --git a/board/ti/ti816x/evm.c b/board/ti/ti816x/evm.c
index e895a216fe..590c15676a 100644
--- a/board/ti/ti816x/evm.c
+++ b/board/ti/ti816x/evm.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <init.h>
 #include <net.h>
 #include <spl.h>
 #include <asm/cache.h>
diff --git a/board/timll/devkit8000/devkit8000.c b/board/timll/devkit8000/devkit8000.c
index b037d725c3..cbb219931d 100644
--- a/board/timll/devkit8000/devkit8000.c
+++ b/board/timll/devkit8000/devkit8000.c
@@ -18,6 +18,7 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
+#include <init.h>
 #include <malloc.h>
 #include <ns16550.h>
 #include <twl4030.h>
diff --git a/board/toradex/apalis-tk1/apalis-tk1.c b/board/toradex/apalis-tk1/apalis-tk1.c
index bc98858ae0..81329a6131 100644
--- a/board/toradex/apalis-tk1/apalis-tk1.c
+++ b/board/toradex/apalis-tk1/apalis-tk1.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 #include <asm/arch-tegra/ap.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
diff --git a/board/toradex/apalis_t30/apalis_t30.c b/board/toradex/apalis_t30/apalis_t30.c
index df9bc8e707..b750d66aae 100644
--- a/board/toradex/apalis_t30/apalis_t30.c
+++ b/board/toradex/apalis_t30/apalis_t30.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/arch/gp_padctrl.h>
 #include <asm/arch/pinmux.h>
 #include <asm/arch-tegra/ap.h>
diff --git a/board/toradex/colibri_pxa270/colibri_pxa270.c b/board/toradex/colibri_pxa270/colibri_pxa270.c
index 93693712a9..d9b09ae461 100644
--- a/board/toradex/colibri_pxa270/colibri_pxa270.c
+++ b/board/toradex/colibri_pxa270/colibri_pxa270.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <dm.h>
+#include <init.h>
 #include <net.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/pxa.h>
diff --git a/board/toradex/colibri_t20/colibri_t20.c b/board/toradex/colibri_t20/colibri_t20.c
index e0b27e92f8..6cecbe5e28 100644
--- a/board/toradex/colibri_t20/colibri_t20.c
+++ b/board/toradex/colibri_t20/colibri_t20.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/funcmux.h>
 #include <asm/arch/pinmux.h>
diff --git a/board/toradex/colibri_t30/colibri_t30.c b/board/toradex/colibri_t30/colibri_t30.c
index b6b00e3860..d21ff544f4 100644
--- a/board/toradex/colibri_t30/colibri_t30.c
+++ b/board/toradex/colibri_t30/colibri_t30.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/arch/gp_padctrl.h>
 #include <asm/arch/pinmux.h>
 #include <asm/arch-tegra/ap.h>
diff --git a/board/toradex/common/tdx-common.c b/board/toradex/common/tdx-common.c
index e9441a7979..e8de923f3e 100644
--- a/board/toradex/common/tdx-common.c
+++ b/board/toradex/common/tdx-common.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <env.h>
 #include <g_dnl.h>
+#include <init.h>
 #include <linux/libfdt.h>
 
 #include "tdx-cfg-block.h"
diff --git a/board/toradex/verdin-imx8mm/spl.c b/board/toradex/verdin-imx8mm/spl.c
index c614fc7a3f..338952ea71 100644
--- a/board/toradex/verdin-imx8mm/spl.c
+++ b/board/toradex/verdin-imx8mm/spl.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <image.h>
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/ddr.h>
 #include <asm/arch/imx8mm_pins.h>
diff --git a/board/toradex/verdin-imx8mm/verdin-imx8mm.c b/board/toradex/verdin-imx8mm/verdin-imx8mm.c
index 35866e096a..ff05c7d552 100644
--- a/board/toradex/verdin-imx8mm/verdin-imx8mm.c
+++ b/board/toradex/verdin-imx8mm/verdin-imx8mm.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/io.h>
diff --git a/board/tplink/wdr4300/wdr4300.c b/board/tplink/wdr4300/wdr4300.c
index 4dacaa4285..7e7339553b 100644
--- a/board/tplink/wdr4300/wdr4300.c
+++ b/board/tplink/wdr4300/wdr4300.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
diff --git a/board/udoo/udoo_spl.c b/board/udoo/udoo_spl.c
index 1a3b136529..09fc23a901 100644
--- a/board/udoo/udoo_spl.c
+++ b/board/udoo/udoo_spl.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
diff --git a/board/variscite/dart_6ul/dart_6ul.c b/board/variscite/dart_6ul/dart_6ul.c
index 0f00506d7a..a4f449d2e2 100644
--- a/board/variscite/dart_6ul/dart_6ul.c
+++ b/board/variscite/dart_6ul/dart_6ul.c
@@ -4,6 +4,7 @@
  * Copyright (C) 2019 Parthiban Nallathambi <parthitce@gmail.com>
  */
 
+#include <init.h>
 #include <net.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
diff --git a/board/variscite/dart_6ul/spl.c b/board/variscite/dart_6ul/spl.c
index 798523d0d0..1b06a66060 100644
--- a/board/variscite/dart_6ul/spl.c
+++ b/board/variscite/dart_6ul/spl.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <spl.h>
 #include <asm/arch/clock.h>
 #include <asm/io.h>
diff --git a/board/varisys/cyrus/ddr.c b/board/varisys/cyrus/ddr.c
index cac00e0467..54d15accbd 100644
--- a/board/varisys/cyrus/ddr.c
+++ b/board/varisys/cyrus/ddr.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <hwconfig.h>
+#include <init.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/wandboard/spl.c b/board/wandboard/spl.c
index 250043a26d..816b9cb6fc 100644
--- a/board/wandboard/spl.c
+++ b/board/wandboard/spl.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
diff --git a/board/xes/common/board.c b/board/xes/common/board.c
index 43575bc302..053b07a0b7 100644
--- a/board/xes/common/board.c
+++ b/board/xes/common/board.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <env.h>
 #include "fsl_8xxx_misc.h"
+#include <init.h>
 
 int checkboard(void)
 {
diff --git a/board/xilinx/zynqmp_r5/board.c b/board/xilinx/zynqmp_r5/board.c
index 1c45ee7196..5c5a2e9386 100644
--- a/board/xilinx/zynqmp_r5/board.c
+++ b/board/xilinx/zynqmp_r5/board.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <fdtdec.h>
+#include <init.h>
 
 int board_init(void)
 {
diff --git a/board/zyxel/nsa310s/nsa310s.c b/board/zyxel/nsa310s/nsa310s.c
index 82a3feee69..3f71e3da44 100644
--- a/board/zyxel/nsa310s/nsa310s.c
+++ b/board/zyxel/nsa310s/nsa310s.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <miiphy.h>
 #include <net.h>
 #include <asm/arch/cpu.h>
diff --git a/cmd/pci.c b/cmd/pci.c
index 0043471fc7..b2174e2a9c 100644
--- a/cmd/pci.c
+++ b/cmd/pci.c
@@ -18,6 +18,7 @@
 #include <command.h>
 #include <console.h>
 #include <dm.h>
+#include <init.h>
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <pci.h>
diff --git a/cmd/tlv_eeprom.c b/cmd/tlv_eeprom.c
index 8b768f3108..b5f293ba7f 100644
--- a/cmd/tlv_eeprom.c
+++ b/cmd/tlv_eeprom.c
@@ -15,6 +15,7 @@
 #include <i2c.h>
 #include <i2c_eeprom.h>
 #include <env.h>
+#include <init.h>
 #include <net.h>
 #include <linux/ctype.h>
 #include <u-boot/crc.h>
diff --git a/common/board_info.c b/common/board_info.c
index a392bece62..a6db087f96 100644
--- a/common/board_info.c
+++ b/common/board_info.c
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0+
 
 #include <common.h>
+#include <init.h>
 #include <linux/libfdt.h>
 #include <linux/compiler.h>
 
diff --git a/common/init/board_init.c b/common/init/board_init.c
index 4c4f0ced53..8c8a5eac05 100644
--- a/common/init/board_init.c
+++ b/common/init/board_init.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <bootstage.h>
+#include <init.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/common/lcd.c b/common/lcd.c
index c421090c87..4acf91e623 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -13,6 +13,7 @@
 #include <cpu_func.h>
 #include <env_callback.h>
 #include <asm/cache.h>
+#include <init.h>
 #include <linux/types.h>
 #include <stdio_dev.h>
 #include <lcd.h>
diff --git a/common/spl/spl.c b/common/spl/spl.c
index ab62b8b79e..c59808b924 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -13,6 +13,7 @@
 #include <dm.h>
 #include <handoff.h>
 #include <hang.h>
+#include <init.h>
 #include <irq_func.h>
 #include <serial.h>
 #include <spl.h>
diff --git a/drivers/clk/clk_stm32mp1.c b/drivers/clk/clk_stm32mp1.c
index 50df8425bf..a70388b750 100644
--- a/drivers/clk/clk_stm32mp1.c
+++ b/drivers/clk/clk_stm32mp1.c
@@ -7,6 +7,7 @@
 #include <clk-uclass.h>
 #include <div64.h>
 #include <dm.h>
+#include <init.h>
 #include <regmap.h>
 #include <spl.h>
 #include <syscon.h>
diff --git a/drivers/cpu/bmips_cpu.c b/drivers/cpu/bmips_cpu.c
index fc047473f5..613c836049 100644
--- a/drivers/cpu/bmips_cpu.c
+++ b/drivers/cpu/bmips_cpu.c
@@ -11,6 +11,7 @@
 #include <cpu.h>
 #include <dm.h>
 #include <errno.h>
+#include <init.h>
 #include <asm/io.h>
 
 #define REV_CHIPID_SHIFT		16
diff --git a/drivers/ddr/altera/sdram_arria10.c b/drivers/ddr/altera/sdram_arria10.c
index 049f202e03..d1dec58295 100644
--- a/drivers/ddr/altera/sdram_arria10.c
+++ b/drivers/ddr/altera/sdram_arria10.c
@@ -7,6 +7,7 @@
 #include <cpu_func.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <init.h>
 #include <malloc.h>
 #include <wait_bit.h>
 #include <watchdog.h>
diff --git a/drivers/ddr/altera/sdram_soc64.c b/drivers/ddr/altera/sdram_soc64.c
index c06fba92f8..1a69b0328a 100644
--- a/drivers/ddr/altera/sdram_soc64.c
+++ b/drivers/ddr/altera/sdram_soc64.c
@@ -11,6 +11,7 @@
 #include <div64.h>
 #include <fdtdec.h>
 #include <hang.h>
+#include <init.h>
 #include <ram.h>
 #include <reset.h>
 #include "sdram_soc64.h"
diff --git a/drivers/ddr/fsl/main.c b/drivers/ddr/fsl/main.c
index 0aa6aedae7..794ff55378 100644
--- a/drivers/ddr/fsl/main.c
+++ b/drivers/ddr/fsl/main.c
@@ -14,6 +14,7 @@
 #include <i2c.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr.h>
+#include <init.h>
 
 /*
  * CONFIG_SYS_FSL_DDR_SDRAM_BASE_PHY is the physical address from the view
diff --git a/drivers/dma/lpc32xx_dma.c b/drivers/dma/lpc32xx_dma.c
index d3ce141eef..1637e329df 100644
--- a/drivers/dma/lpc32xx_dma.c
+++ b/drivers/dma/lpc32xx_dma.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <errno.h>
+#include <init.h>
 #include <asm/arch/dma.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/clk.h>
diff --git a/drivers/fpga/fpga.c b/drivers/fpga/fpga.c
index 0917871d49..f7e5556805 100644
--- a/drivers/fpga/fpga.c
+++ b/drivers/fpga/fpga.c
@@ -6,6 +6,7 @@
 
 /* Generic FPGA support */
 #include <common.h>             /* core U-Boot definitions */
+#include <init.h>
 #include <xilinx.h>             /* xilinx specific definitions */
 #include <altera.h>             /* altera specific definitions */
 #include <lattice.h>
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index 036cf0b4a1..16cdfe3978 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -23,6 +23,7 @@
 #include <errno.h>
 #include <fdt_support.h>
 #include <flash.h>
+#include <init.h>
 #include <irq_func.h>
 #include <asm/processor.h>
 #include <asm/io.h>
diff --git a/drivers/mtd/pic32_flash.c b/drivers/mtd/pic32_flash.c
index 8fff818e42..1766ba4802 100644
--- a/drivers/mtd/pic32_flash.c
+++ b/drivers/mtd/pic32_flash.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <fdt_support.h>
 #include <flash.h>
+#include <init.h>
 #include <irq_func.h>
 #include <mach/pic32.h>
 #include <wait_bit.h>
diff --git a/drivers/pci/fsl_pci_init.c b/drivers/pci/fsl_pci_init.c
index ab5e49941f..c4eeb9b67c 100644
--- a/drivers/pci/fsl_pci_init.c
+++ b/drivers/pci/fsl_pci_init.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <init.h>
 #include <malloc.h>
 #include <asm/fsl_serdes.h>
 
diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c
index 7f46e901fb..93cfc1cade 100644
--- a/drivers/pci/pci-uclass.c
+++ b/drivers/pci/pci-uclass.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <init.h>
 #include <malloc.h>
 #include <pci.h>
 #include <asm/io.h>
diff --git a/drivers/pci/pci_ftpci100.c b/drivers/pci/pci_ftpci100.c
index 736befdc3b..f5eb702723 100644
--- a/drivers/pci/pci_ftpci100.c
+++ b/drivers/pci/pci_ftpci100.c
@@ -7,6 +7,7 @@
  * Macpaul Lin, Andes Technology Corporation <macpaul@andestech.com>
  */
 #include <common.h>
+#include <init.h>
 #include <malloc.h>
 #include <pci.h>
 
diff --git a/drivers/pci/pci_gt64120.c b/drivers/pci/pci_gt64120.c
index 55f4800781..62f213d122 100644
--- a/drivers/pci/pci_gt64120.c
+++ b/drivers/pci/pci_gt64120.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <gt64120.h>
+#include <init.h>
 #include <pci.h>
 #include <pci_gt64120.h>
 
diff --git a/drivers/pci/pci_msc01.c b/drivers/pci/pci_msc01.c
index 504eb65c27..04838200a8 100644
--- a/drivers/pci/pci_msc01.c
+++ b/drivers/pci/pci_msc01.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <msc01.h>
 #include <pci.h>
 #include <pci_msc01.h>
diff --git a/drivers/pci/pcie_layerscape_fixup.c b/drivers/pci/pcie_layerscape_fixup.c
index ec6acbb138..0d6750beb7 100644
--- a/drivers/pci/pcie_layerscape_fixup.c
+++ b/drivers/pci/pcie_layerscape_fixup.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <pci.h>
 #include <asm/arch/fsl_serdes.h>
 #include <asm/io.h>
diff --git a/drivers/pci/pcie_layerscape_fixup_common.c b/drivers/pci/pcie_layerscape_fixup_common.c
index b010a6300c..c11c691b86 100644
--- a/drivers/pci/pcie_layerscape_fixup_common.c
+++ b/drivers/pci/pcie_layerscape_fixup_common.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/soc.h>
 #include "pcie_layerscape_fixup_common.h"
diff --git a/drivers/ram/imxrt_sdram.c b/drivers/ram/imxrt_sdram.c
index ac15e94f00..6e20432f31 100644
--- a/drivers/ram/imxrt_sdram.c
+++ b/drivers/ram/imxrt_sdram.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <clk.h>
 #include <dm.h>
+#include <init.h>
 #include <ram.h>
 #include <asm/io.h>
 #include <linux/err.h>
diff --git a/drivers/ram/rockchip/sdram_px30.c b/drivers/ram/rockchip/sdram_px30.c
index 729255493a..ac7d96540f 100644
--- a/drivers/ram/rockchip/sdram_px30.c
+++ b/drivers/ram/rockchip/sdram_px30.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <debug_uart.h>
 #include <dm.h>
+#include <init.h>
 #include <ram.h>
 #include <syscon.h>
 #include <asm/io.h>
diff --git a/drivers/ram/rockchip/sdram_rk3188.c b/drivers/ram/rockchip/sdram_rk3188.c
index 9b5eb38ecc..4f3ed739fb 100644
--- a/drivers/ram/rockchip/sdram_rk3188.c
+++ b/drivers/ram/rockchip/sdram_rk3188.c
@@ -12,6 +12,7 @@
 #include <dt-structs.h>
 #include <errno.h>
 #include <hang.h>
+#include <init.h>
 #include <ram.h>
 #include <regmap.h>
 #include <syscon.h>
diff --git a/drivers/ram/rockchip/sdram_rk322x.c b/drivers/ram/rockchip/sdram_rk322x.c
index 223f048161..0b11b48697 100644
--- a/drivers/ram/rockchip/sdram_rk322x.c
+++ b/drivers/ram/rockchip/sdram_rk322x.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <dt-structs.h>
 #include <errno.h>
+#include <init.h>
 #include <ram.h>
 #include <regmap.h>
 #include <syscon.h>
diff --git a/drivers/ram/rockchip/sdram_rk3288.c b/drivers/ram/rockchip/sdram_rk3288.c
index 9f6f555147..23fd7956a7 100644
--- a/drivers/ram/rockchip/sdram_rk3288.c
+++ b/drivers/ram/rockchip/sdram_rk3288.c
@@ -12,6 +12,7 @@
 #include <dt-structs.h>
 #include <errno.h>
 #include <hang.h>
+#include <init.h>
 #include <ram.h>
 #include <regmap.h>
 #include <syscon.h>
diff --git a/drivers/ram/rockchip/sdram_rk3328.c b/drivers/ram/rockchip/sdram_rk3328.c
index 8329f4a352..36e0d2e840 100644
--- a/drivers/ram/rockchip/sdram_rk3328.c
+++ b/drivers/ram/rockchip/sdram_rk3328.c
@@ -7,6 +7,7 @@
 #include <debug_uart.h>
 #include <dm.h>
 #include <dt-structs.h>
+#include <init.h>
 #include <ram.h>
 #include <regmap.h>
 #include <syscon.h>
diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c
index d69ef01d08..7b95c954a6 100644
--- a/drivers/ram/rockchip/sdram_rk3399.c
+++ b/drivers/ram/rockchip/sdram_rk3399.c
@@ -9,6 +9,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <dt-structs.h>
+#include <init.h>
 #include <ram.h>
 #include <regmap.h>
 #include <syscon.h>
diff --git a/drivers/ram/stm32_sdram.c b/drivers/ram/stm32_sdram.c
index 2d03333b1b..2e06b526e2 100644
--- a/drivers/ram/stm32_sdram.c
+++ b/drivers/ram/stm32_sdram.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <clk.h>
 #include <dm.h>
+#include <init.h>
 #include <ram.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
diff --git a/drivers/timer/cadence-ttc.c b/drivers/timer/cadence-ttc.c
index 4837b0645b..f4942a5500 100644
--- a/drivers/timer/cadence-ttc.c
+++ b/drivers/timer/cadence-ttc.c
@@ -7,6 +7,7 @@
 #include <bootstage.h>
 #include <dm.h>
 #include <errno.h>
+#include <init.h>
 #include <timer.h>
 #include <asm/io.h>
 #include <linux/err.h>
diff --git a/drivers/timer/rockchip_timer.c b/drivers/timer/rockchip_timer.c
index 0cbdc279a5..7534e0363e 100644
--- a/drivers/timer/rockchip_timer.c
+++ b/drivers/timer/rockchip_timer.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <bootstage.h>
 #include <dm.h>
+#include <init.h>
 #include <dm/ofnode.h>
 #include <mapmem.h>
 #include <asm/arch-rockchip/timer.h>
diff --git a/drivers/timer/timer-uclass.c b/drivers/timer/timer-uclass.c
index b619200f00..14dde950a1 100644
--- a/drivers/timer/timer-uclass.c
+++ b/drivers/timer/timer-uclass.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 #include <dm/lists.h>
 #include <dm/device-internal.h>
 #include <dm/root.h>
diff --git a/drivers/usb/gadget/f_thor.c b/drivers/usb/gadget/f_thor.c
index ee646fdd5c..dea17b9209 100644
--- a/drivers/usb/gadget/f_thor.c
+++ b/drivers/usb/gadget/f_thor.c
@@ -18,6 +18,7 @@
 #include <errno.h>
 #include <common.h>
 #include <console.h>
+#include <init.h>
 #include <malloc.h>
 #include <memalign.h>
 #include <version.h>
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
index 04e7c5e37f..450caf056c 100644
--- a/drivers/usb/host/ehci-pci.c
+++ b/drivers/usb/host/ehci-pci.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <init.h>
 #include <pci.h>
 #include <usb.h>
 #include <asm/io.h>
diff --git a/drivers/usb/host/ohci-lpc32xx.c b/drivers/usb/host/ohci-lpc32xx.c
index 34a4b00dda..8ddced3d10 100644
--- a/drivers/usb/host/ohci-lpc32xx.c
+++ b/drivers/usb/host/ohci-lpc32xx.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <init.h>
 #include <wait_bit.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index c1f60da541..b095612ada 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 #include <pci.h>
 #include <usb.h>
 #include <usb/xhci.h>
diff --git a/fs/ubifs/io.c b/fs/ubifs/io.c
index 8148055f67..1389268b5f 100644
--- a/fs/ubifs/io.c
+++ b/fs/ubifs/io.c
@@ -59,6 +59,7 @@
  */
 
 #ifndef __UBOOT__
+#include <init.h>
 #include <dm/devres.h>
 #include <linux/crc32.h>
 #include <linux/slab.h>
diff --git a/include/common.h b/include/common.h
index a87c062880..d69cda339c 100644
--- a/include/common.h
+++ b/include/common.h
@@ -31,7 +31,6 @@
 #include <log.h>
 #include <asm/u-boot.h> /* boot information for Linux kernel */
 #include <asm/global_data.h>	/* global data used for startup functions */
-#include <init.h>
 #include <display_options.h>
 #include <vsprintf.h>
 #endif	/* __ASSEMBLY__ */
diff --git a/lib/efi/efi_app.c b/lib/efi/efi_app.c
index 7c64077d42..b7e19c3475 100644
--- a/lib/efi/efi_app.c
+++ b/lib/efi/efi_app.c
@@ -13,6 +13,7 @@
 #include <debug_uart.h>
 #include <dm.h>
 #include <errno.h>
+#include <init.h>
 #include <malloc.h>
 #include <linux/err.h>
 #include <linux/types.h>
diff --git a/lib/time.c b/lib/time.c
index 1395f28715..3d6447d7c0 100644
--- a/lib/time.c
+++ b/lib/time.c
@@ -8,6 +8,7 @@
 #include <bootstage.h>
 #include <dm.h>
 #include <errno.h>
+#include <init.h>
 #include <time.h>
 #include <timer.h>
 #include <watchdog.h>
-- 
2.26.2.645.ge9eca65c58-goog

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH v3 12/22] command: Remove the cmd_tbl_t typedef
  2020-05-10 17:39 [PATCH v3 00/22] common: Further reduce the size of common.h Simon Glass
                   ` (10 preceding siblings ...)
  2020-05-10 17:40 ` [PATCH v3 11/22] common: Drop init.h " Simon Glass
@ 2020-05-10 17:40 ` Simon Glass
  2020-05-19 17:33   ` Tom Rini
  2020-05-10 17:40 ` [PATCH v3 13/22] Fix some checkpatch warnings in calls to debug() Simon Glass
                   ` (10 subsequent siblings)
  22 siblings, 1 reply; 53+ messages in thread
From: Simon Glass @ 2020-05-10 17:40 UTC (permalink / raw)
  To: u-boot

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v3:
- Update imxrt1020-evk, etc.

Changes in v2: None

 arch/arc/lib/bootm.c                          |   1 +
 arch/arc/lib/reset.c                          |   2 +-
 arch/arm/cpu/arm1136/mx35/generic.c           |   5 +-
 arch/arm/cpu/arm926ejs/mxs/mxs.c              |   4 +-
 arch/arm/cpu/arm926ejs/spear/cpu.c            |   3 +-
 arch/arm/cpu/arm926ejs/spear/spr_misc.c       |   3 +-
 arch/arm/cpu/armv7/vf610/generic.c            |   5 +-
 .../armv8/fsl-layerscape/fsl_lsch3_serdes.c   |   1 +
 arch/arm/cpu/armv8/fsl-layerscape/mp.c        |   2 +-
 arch/arm/include/asm/arch-mx6/clock.h         |   4 +-
 arch/arm/lib/bootm.c                          |   2 +-
 arch/arm/lib/cmd_boot.c                       |   2 +-
 arch/arm/lib/reset.c                          |   5 +-
 arch/arm/lib/semihosting.c                    |   4 +-
 arch/arm/mach-imx/cmd_bmode.c                 |   6 +-
 arch/arm/mach-imx/cmd_dek.c                   |   3 +-
 arch/arm/mach-imx/cmd_hdmidet.c               |   4 +-
 arch/arm/mach-imx/cmd_nandbcb.c               |   9 +-
 arch/arm/mach-imx/hab.c                       |  21 ++--
 arch/arm/mach-imx/imx8/ahab.c                 |  13 +-
 arch/arm/mach-imx/imx8/snvs_security_sc.c     |  13 +-
 arch/arm/mach-imx/imx8m/clock_imx8mq.c        |   5 +-
 arch/arm/mach-imx/imx_bootaux.c               |   3 +-
 arch/arm/mach-imx/mx5/clock.c                 |   4 +-
 arch/arm/mach-imx/mx6/clock.c                 |   4 +-
 arch/arm/mach-imx/mx7/clock.c                 |   4 +-
 arch/arm/mach-imx/mx7ulp/clock.c              |   4 +-
 arch/arm/mach-keystone/cmd_clock.c            |   7 +-
 arch/arm/mach-keystone/cmd_mon.c              |   8 +-
 arch/arm/mach-keystone/cmd_poweroff.c         |   2 +-
 arch/arm/mach-keystone/ddr3.c                 |   1 +
 arch/arm/mach-keystone/keystone.c             |   1 +
 arch/arm/mach-meson/sm.c                      |  14 ++-
 arch/arm/mach-omap2/omap3/board.c             |   4 +-
 arch/arm/mach-omap2/sec-common.c              |   1 +
 arch/arm/mach-rockchip/boot_mode.c            |   2 +
 arch/arm/mach-rockchip/cpu-info.c             |   1 +
 arch/arm/mach-rockchip/rk3288/rk3288.c        |   5 +-
 arch/arm/mach-socfpga/clock_manager.c         |   4 +-
 arch/arm/mach-socfpga/misc.c                  |   4 +-
 arch/arm/mach-stm32mp/cmd_stm32key.c          |   4 +-
 arch/arm/mach-tegra/cmd_enterrcm.c            |   5 +-
 .../mach-uniphier/boot-device/boot-device.c   |   4 +-
 arch/arm/mach-uniphier/dram/cmd_ddrmphy.c     |   4 +-
 arch/arm/mach-uniphier/dram/cmd_ddrphy.c      |   4 +-
 arch/arm/mach-uniphier/mmc-first-dev.c        |   7 +-
 arch/arm/mach-zynqmp/mp.c                     |   2 +-
 arch/m68k/cpu/mcf5227x/cpu.c                  |   2 +-
 arch/m68k/cpu/mcf523x/cpu.c                   |   2 +-
 arch/m68k/cpu/mcf52x2/cpu.c                   |  14 +--
 arch/m68k/cpu/mcf530x/cpu.c                   |   3 +-
 arch/m68k/cpu/mcf532x/cpu.c                   |   2 +-
 arch/m68k/cpu/mcf5445x/cpu.c                  |   2 +-
 arch/m68k/cpu/mcf547x_8x/cpu.c                |   2 +-
 arch/m68k/lib/bootm.c                         |   3 +-
 arch/microblaze/cpu/interrupts.c              |   2 +-
 arch/microblaze/cpu/spl.c                     |   3 +-
 arch/microblaze/lib/bootm.c                   |   2 +-
 arch/mips/cpu/cpu.c                           |   2 +-
 arch/mips/lib/bootm.c                         |   4 +-
 arch/mips/mach-ath79/ar934x/clk.c             |   4 +-
 arch/nds32/cpu/n1213/ae3xx/cpu.c              |   2 +-
 arch/nds32/cpu/n1213/ag101/cpu.c              |   2 +-
 arch/nds32/lib/boot.c                         |   2 +-
 arch/nios2/cpu/cpu.c                          |   3 +-
 arch/nios2/cpu/interrupts.c                   |   2 +-
 arch/nios2/lib/bootm.c                        |   4 +-
 arch/powerpc/cpu/mpc83xx/cpu.c                |   3 +-
 arch/powerpc/cpu/mpc83xx/ecc.c                |   2 +-
 arch/powerpc/cpu/mpc83xx/interrupts.c         |   4 +-
 arch/powerpc/cpu/mpc83xx/speed.c              |   3 +-
 arch/powerpc/cpu/mpc85xx/cmd_errata.c         |   3 +-
 arch/powerpc/cpu/mpc85xx/cpu.c                |   2 +-
 arch/powerpc/cpu/mpc85xx/interrupts.c         |   2 +-
 arch/powerpc/cpu/mpc85xx/mp.c                 |   2 +-
 arch/powerpc/cpu/mpc86xx/cpu.c                |   2 +-
 arch/powerpc/cpu/mpc86xx/interrupts.c         |   2 +-
 arch/powerpc/cpu/mpc86xx/mp.c                 |   2 +-
 arch/powerpc/cpu/mpc8xx/cpu.c                 |   2 +-
 arch/powerpc/cpu/mpc8xx/immap.c               |  19 +--
 arch/powerpc/lib/bootm.c                      |   4 +-
 arch/powerpc/lib/kgdb.c                       |   2 +-
 arch/riscv/lib/boot.c                         |   2 +-
 arch/riscv/lib/bootm.c                        |   4 +-
 arch/riscv/lib/reset.c                        |   2 +-
 arch/sh/cpu/sh4/cpu.c                         |   2 +-
 arch/sh/lib/bootm.c                           |   4 +-
 arch/sh/lib/zimageboot.c                      |   5 +-
 .../include/asm/arch-braswell/fsp/fsp_vpd.h   |   2 +
 arch/x86/lib/bootm.c                          |   4 +-
 arch/x86/lib/cmd_boot.c                       |   2 +-
 arch/x86/lib/interrupts.c                     |   2 +-
 arch/x86/lib/zimage.c                         |   3 +-
 board/Arcturus/ucp1020/cmd_arc.c              |   4 +-
 board/BuS/eb_cpu5282/eb_cpu5282.c             |   2 +-
 board/LaCie/net2big_v2/net2big_v2.c           |   3 +-
 board/LaCie/netspace_v2/netspace_v2.c         |   2 +-
 board/Synology/ds414/cmd_syno.c               |   9 +-
 .../imx8qm_rom7720_a1/imx8qm_rom7720_a1.c     |   1 +
 board/amlogic/sei510/sei510.c                 |   1 +
 board/amlogic/sei610/sei610.c                 |   1 +
 board/aristainetos/aristainetos.c             |   1 +
 board/bosch/guardian/board.c                  |   1 +
 board/boundary/nitrogen6x/nitrogen6x.c        |   3 +-
 board/buffalo/lsxl/lsxl.c                     |   1 +
 board/cavium/thunderx/atf.c                   |   3 +-
 board/corscience/tricorder/tricorder-eeprom.c |   3 +-
 board/egnite/ethernut5/ethernut5_pwrman.c     |   3 +-
 board/esd/vme8349/caddy.c                     |   3 +-
 board/freescale/c29xpcie/cpld.c               |   2 +-
 board/freescale/common/cmd_esbc_validate.c    |   8 +-
 board/freescale/common/ngpixis.c              |   3 +-
 board/freescale/common/pixis.c                |  10 +-
 board/freescale/common/qixis.c                |   3 +-
 board/freescale/common/sys_eeprom.c           |   2 +-
 board/freescale/common/vid.c                  |   9 +-
 board/freescale/imx8mm_evk/imx8mm_evk.c       |   1 +
 board/freescale/imx8mm_evk/spl.c              |   1 +
 board/freescale/imx8mn_evk/imx8mn_evk.c       |   1 +
 board/freescale/imx8mn_evk/spl.c              |   1 +
 board/freescale/imx8mp_evk/imx8mp_evk.c       |   1 +
 board/freescale/imx8mp_evk/spl.c              |   1 +
 board/freescale/imxrt1020-evk/imxrt1020-evk.c |   1 +
 board/freescale/ls1012ardb/ls1012ardb.c       |   5 +-
 board/freescale/ls1021atwr/ls1021atwr.c       |  13 +-
 board/freescale/ls1043ardb/cpld.c             |   2 +-
 board/freescale/ls1046ardb/cpld.c             |   2 +-
 board/freescale/p1010rdb/p1010rdb.c           |   5 +-
 board/freescale/p2041rdb/cpld.c               |   2 +-
 board/freescale/t102xrdb/cpld.c               |   2 +-
 board/freescale/t102xrdb/t102xrdb.c           |   4 +-
 board/freescale/t104xrdb/cpld.c               |   2 +-
 board/freescale/t208xrdb/cpld.c               |   2 +-
 board/freescale/t4qds/t4240qds.c              |   4 +-
 board/freescale/t4rdb/cpld.c                  |   2 +-
 board/gardena/smart-gateway-mt7688/board.c    |   3 +-
 board/gateworks/gw_ventana/eeprom.c           |   4 +-
 board/gateworks/gw_ventana/gsc.c              |  10 +-
 board/gdsys/a38x/controlcenterdc.c            |   1 +
 board/gdsys/a38x/hydra.c                      |   3 +-
 board/gdsys/common/cmd_ioloop.c               |  10 +-
 board/gdsys/common/osd.c                      |  10 +-
 board/gdsys/common/osd_cmd.c                  |  13 +-
 board/gdsys/mpc8308/gazerbeam.c               |   1 +
 board/gdsys/p1022/controlcenterd.c            |   2 +-
 board/google/chromebook_coral/coral.c         |   1 +
 board/keymile/common/common.c                 |  12 +-
 board/mediatek/mt7622/mt7622_rfb.c            |   1 +
 board/phytium/durian/durian.c                 |   1 +
 board/renesas/sh7752evb/sh7752evb.c           |   3 +-
 board/renesas/sh7753evb/sh7753evb.c           |   3 +-
 board/renesas/sh7757lcr/sh7757lcr.c           |   5 +-
 board/renesas/stout/cpld.c                    |   4 +-
 board/renesas/ulcb/cpld.c                     |   4 +-
 board/rockchip/kylin_rk3036/kylin_rk3036.c    |   1 +
 board/samsung/common/board.c                  |   1 +
 board/samsung/common/misc.c                   |   2 +-
 board/siemens/capricorn/board.c               |   6 +-
 board/siemens/common/board.c                  |   9 +-
 board/siemens/draco/board.c                   |   5 +-
 board/siemens/taurus/taurus.c                 |   4 +-
 board/sifive/fu540/fu540.c                    |   1 +
 board/sks-kinkel/sksimx6/sksimx6.c            |   1 +
 board/solidrun/clearfog/clearfog.c            |   1 +
 board/st/common/cmd_stboard.c                 |   5 +-
 .../stm32f429-discovery/stm32f429-discovery.c |   1 +
 .../stm32f429-evaluation.c                    |   1 +
 .../stm32f469-discovery/stm32f469-discovery.c |   1 +
 board/synopsys/emsdp/emsdp.c                  |  11 +-
 board/synopsys/hsdk/hsdk.c                    |  22 ++--
 board/syteco/zmx25/zmx25.c                    |   1 +
 board/technexion/pico-imx6/pico-imx6.c        |   1 +
 board/theadorable/theadorable.c               |   3 +-
 board/ti/j721e/evm.c                          |   1 +
 board/ti/sdp4430/cmd_bat.c                    |   2 +-
 board/toradex/apalis-tk1/apalis-tk1.c         |   1 +
 board/toradex/apalis_imx6/do_fuse.c           |   9 +-
 board/toradex/apalis_imx6/pf0100.c            |   5 +-
 board/toradex/colibri_imx6/do_fuse.c          |   9 +-
 board/toradex/colibri_imx6/pf0100.c           |   5 +-
 board/toradex/common/tdx-cfg-block.c          |   9 +-
 board/toradex/verdin-imx8mm/spl.c             |   1 +
 board/varisys/common/sys_eeprom.c             |   2 +-
 .../work_92105/work_92105_display.c           |   6 +-
 board/xilinx/common/board.c                   |   1 +
 .../microblaze-generic/microblaze-generic.c   |   1 +
 board/xilinx/versal/board.c                   |   1 +
 board/xilinx/zynq/cmds.c                      |  16 +--
 board/xilinx/zynqmp/cmds.c                    |  23 ++--
 board/xilinx/zynqmp/zynqmp.c                  |   3 +-
 cmd/ab_select.c                               |   5 +-
 cmd/abootimg.c                                |  31 ++---
 cmd/acpi.c                                    |   4 +-
 cmd/adc.c                                     |   8 +-
 cmd/adtimg.c                                  |  26 ++--
 cmd/aes.c                                     |   2 +-
 cmd/arm/exception.c                           |  14 +--
 cmd/arm/exception64.c                         |   6 +-
 cmd/armflash.c                                |   2 +-
 cmd/avb.c                                     |  40 +++---
 cmd/axi.c                                     |  22 ++--
 cmd/bcb.c                                     |  30 ++---
 cmd/bdinfo.c                                  |  28 ++---
 cmd/bedbug.c                                  |  24 ++--
 cmd/bind.c                                    |   5 +-
 cmd/binop.c                                   |   3 +-
 cmd/blk_common.c                              |   3 +-
 cmd/blkcache.c                                |  17 +--
 cmd/blob.c                                    |   3 +-
 cmd/bmp.c                                     |  12 +-
 cmd/boot.c                                    |   4 +-
 cmd/bootcount.c                               |  16 +--
 cmd/bootefi.c                                 |   3 +-
 cmd/booti.c                                   |   6 +-
 cmd/bootm.c                                   |  23 ++--
 cmd/bootmenu.c                                |   2 +-
 cmd/bootstage.c                               |  19 +--
 cmd/bootz.c                                   |   6 +-
 cmd/btrfs.c                                   |   2 +-
 cmd/cache.c                                   |   6 +-
 cmd/cbfs.c                                    |   8 +-
 cmd/clk.c                                     |   8 +-
 cmd/cls.c                                     |   2 +-
 cmd/config.c                                  |   3 +-
 cmd/conitrace.c                               |   4 +-
 cmd/console.c                                 |   3 +-
 cmd/cpu.c                                     |  12 +-
 cmd/cramfs.c                                  |   5 +-
 cmd/cros_ec.c                                 |   7 +-
 cmd/dataflash_mmc_mux.c                       |   3 +-
 cmd/date.c                                    |   3 +-
 cmd/demo.c                                    |  22 ++--
 cmd/dfu.c                                     |   3 +-
 cmd/diag.c                                    |   2 +-
 cmd/disk.c                                    |   2 +-
 cmd/dm.c                                      |  22 ++--
 cmd/echo.c                                    |   3 +-
 cmd/eeprom.c                                  |   4 +-
 cmd/efi.c                                     |   9 +-
 cmd/efidebug.c                                |  68 +++++-----
 cmd/elf.c                                     |   6 +-
 cmd/ethsw.c                                   |   5 +-
 cmd/exit.c                                    |   3 +-
 cmd/ext2.c                                    |   7 +-
 cmd/ext4.c                                    |  10 +-
 cmd/fastboot.c                                |   3 +-
 cmd/fat.c                                     |  23 ++--
 cmd/fdt.c                                     |   4 +-
 cmd/fitupd.c                                  |   3 +-
 cmd/flash.c                                   |   9 +-
 cmd/fpga.c                                    |  41 +++---
 cmd/fpgad.c                                   |   2 +-
 cmd/fs.c                                      |  23 ++--
 cmd/fs_uuid.c                                 |   4 +-
 cmd/fuse.c                                    |   3 +-
 cmd/gettime.c                                 |   4 +-
 cmd/gpio.c                                    |   3 +-
 cmd/gpt.c                                     |   2 +-
 cmd/hash.c                                    |   3 +-
 cmd/help.c                                    |   9 +-
 cmd/host.c                                    |  37 +++---
 cmd/i2c.c                                     |  61 +++++----
 cmd/ide.c                                     |   4 +-
 cmd/ini.c                                     |   2 +-
 cmd/io.c                                      |   4 +-
 cmd/iotrace.c                                 |   6 +-
 cmd/irq.c                                     |   6 +-
 cmd/itest.c                                   |   3 +-
 cmd/jffs2.c                                   |   8 +-
 cmd/led.c                                     |   2 +-
 cmd/legacy_led.c                              |   2 +-
 cmd/license.c                                 |   3 +-
 cmd/load.c                                    |  11 +-
 cmd/log.c                                     |  17 +--
 cmd/lzmadec.c                                 |   3 +-
 cmd/mac.c                                     |   3 +-
 cmd/md5sum.c                                  |   5 +-
 cmd/mdio.c                                    |   3 +-
 cmd/mem.c                                     |  60 +++++----
 cmd/mfsl.c                                    |   6 +-
 cmd/mii.c                                     |   2 +-
 cmd/misc.c                                    |   6 +-
 cmd/mmc.c                                     | 111 +++++++++--------
 cmd/mp.c                                      |   2 +-
 cmd/mtd.c                                     |  17 +--
 cmd/mtdparts.c                                |   7 +-
 cmd/mvebu/bubt.c                              |   2 +-
 cmd/nand.c                                    |  11 +-
 cmd/net.c                                     |  38 +++---
 cmd/nvedit.c                                  |  62 +++++-----
 cmd/nvedit_efi.c                              |  12 +-
 cmd/nvme.c                                    |   3 +-
 cmd/onenand.c                                 |  33 +++--
 cmd/osd.c                                     |  27 ++--
 cmd/part.c                                    |  15 +--
 cmd/pcap.c                                    |  20 +--
 cmd/pci.c                                     |   2 +-
 cmd/pinmux.c                                  |  17 +--
 cmd/pmc.c                                     |  12 +-
 cmd/pmic.c                                    |  23 ++--
 cmd/pxe.c                                     |  19 +--
 cmd/pxe_utils.c                               |  28 +++--
 cmd/pxe_utils.h                               |  10 +-
 cmd/qfw.c                                     |  19 +--
 cmd/read.c                                    |   2 +-
 cmd/reginfo.c                                 |   4 +-
 cmd/regulator.c                               |  35 ++++--
 cmd/reiser.c                                  |   4 +-
 cmd/remoteproc.c                              |  14 +--
 cmd/riscv/exception.c                         |   6 +-
 cmd/rng.c                                     |   2 +-
 cmd/rockusb.c                                 |   3 +-
 cmd/sata.c                                    |   3 +-
 cmd/sb.c                                      |  13 +-
 cmd/scsi.c                                    |   6 +-
 cmd/setexpr.c                                 |   3 +-
 cmd/sf.c                                      |  15 +--
 cmd/sha1sum.c                                 |   2 +-
 cmd/smccc.c                                   |   3 +-
 cmd/sound.c                                   |  13 +-
 cmd/source.c                                  |   3 +-
 cmd/spi.c                                     |   2 +-
 cmd/spl.c                                     |  15 +--
 cmd/strings.c                                 |   2 +-
 cmd/sysboot.c                                 |  12 +-
 cmd/terminal.c                                |   2 +-
 cmd/test.c                                    |   9 +-
 cmd/thordown.c                                |   3 +-
 cmd/ti/ddr3.c                                 |   5 +-
 cmd/time.c                                    |   3 +-
 cmd/tlv_eeprom.c                              |   2 +-
 cmd/tpm-common.c                              |  10 +-
 cmd/tpm-user-utils.h                          |   9 +-
 cmd/tpm-v1.c                                  |  85 ++++++-------
 cmd/tpm-v2.c                                  |  43 +++----
 cmd/tpm_test.c                                |  11 +-
 cmd/trace.c                                   |   8 +-
 cmd/tsi148.c                                  |   2 +-
 cmd/ubi.c                                     |   2 +-
 cmd/ubifs.c                                   |  17 +--
 cmd/ufs.c                                     |   2 +-
 cmd/universe.c                                |   2 +-
 cmd/unlz4.c                                   |   3 +-
 cmd/unzip.c                                   |   7 +-
 cmd/usb.c                                     |   5 +-
 cmd/usb_gadget_sdp.c                          |   3 +-
 cmd/usb_mass_storage.c                        |   4 +-
 cmd/version.c                                 |   3 +-
 cmd/virtio.c                                  |   3 +-
 cmd/w1.c                                      |   2 +-
 cmd/wdt.c                                     |  12 +-
 cmd/wol.c                                     |   2 +-
 cmd/x86/exception.c                           |   6 +-
 cmd/x86/fsp.c                                 |   8 +-
 cmd/x86/hob.c                                 |   2 +-
 cmd/x86/mtrr.c                                |   6 +-
 cmd/ximg.c                                    |   2 +-
 cmd/yaffs2.c                                  |  28 ++---
 cmd/zfs.c                                     |   7 +-
 cmd/zip.c                                     |   2 +-
 common/board_r.c                              |   4 +-
 common/bootm.c                                |  27 ++--
 common/bootm_os.c                             |  46 +++----
 common/cli.c                                  |   4 +-
 common/cli_hush.c                             |   4 +-
 common/cli_readline.c                         |   1 +
 common/command.c                              |  75 +++++------
 common/dfu.c                                  |   1 +
 common/exports.c                              |   1 +
 common/flash.c                                |   8 +-
 common/hash.c                                 |   4 +-
 common/image-fdt.c                            |   4 +-
 common/image.c                                |  13 +-
 common/kgdb.c                                 |   2 +-
 common/lcd_console.c                          |   5 +-
 doc/README.commands                           |  12 +-
 doc/README.standalone                         |   2 +-
 drivers/clk/mpc83xx_clk.c                     |   4 +-
 drivers/ddr/fsl/interactive.c                 |   1 +
 drivers/firmware/psci.c                       |   3 +-
 drivers/gpio/pca953x.c                        |   8 +-
 drivers/gpio/tca642x.c                        |   8 +-
 drivers/misc/altera_sysid.c                   |   2 +-
 drivers/misc/ds4510.c                         |   6 +-
 drivers/misc/rockchip-efuse.c                 |   4 +-
 drivers/net/e1000.c                           |   5 +-
 drivers/net/e1000.h                           |   4 +-
 drivers/net/e1000_spi.c                       |  21 ++--
 drivers/net/fsl-mc/mc.c                       |   3 +-
 drivers/net/pfe_eth/pfe_cmd.c                 |  15 +--
 drivers/net/phy/b53.c                         |   7 +-
 drivers/net/phy/mv88e6352.c                   |   7 +-
 drivers/net/vsc9953.c                         |   1 +
 drivers/power/axp152.c                        |   2 +-
 drivers/power/axp209.c                        |   2 +-
 drivers/power/axp221.c                        |   2 +-
 drivers/power/axp809.c                        |   3 +-
 drivers/power/axp818.c                        |   3 +-
 drivers/power/mt6323.c                        |   2 +-
 drivers/power/power_core.c                    |   4 +-
 drivers/power/twl4030.c                       |   3 +-
 drivers/qe/qe.c                               |   2 +-
 drivers/ram/stm32mp1/stm32mp1_interactive.c   |  11 +-
 drivers/sysreset/sysreset-uclass.c            |   5 +-
 drivers/sysreset/sysreset_mpc83xx.c           |   1 +
 drivers/usb/gadget/f_fastboot.c               |   1 +
 drivers/usb/gadget/f_rockusb.c                |   1 +
 drivers/video/cfb_console.c                   |   4 +-
 drivers/video/lg4573.c                        |   5 +-
 drivers/video/vidconsole-uclass.c             |   5 +-
 examples/api/demo.c                           |   2 +-
 examples/api/libgenwrap.c                     |   3 +-
 examples/standalone/atmel_df_pow2.c           |   2 +-
 examples/standalone/hello_world.c             |   2 +-
 examples/standalone/smc91111_eeprom.c         |   2 +-
 examples/standalone/smc911x_eeprom.c          |   2 +-
 examples/standalone/stubs.c                   |   2 +
 fs/fs.c                                       |  29 ++---
 include/_exports.h                            |   2 +-
 include/bedbug/type.h                         |   5 +-
 include/blk.h                                 |   2 +-
 include/bootm.h                               |  16 +--
 include/command.h                             | 117 ++++++++++--------
 include/cpu_func.h                            |   2 +-
 include/exception.h                           |  12 +-
 include/exports.h                             |   1 +
 include/ext_common.h                          |  18 +--
 include/fs.h                                  |  39 +++---
 include/fsl_ddr.h                             |   4 +-
 include/fsl_validate.h                        |  14 +--
 include/hash.h                                |   6 +-
 include/image.h                               |  14 +--
 include/kgdb.h                                |   2 +-
 include/log.h                                 |   6 +-
 include/net.h                                 |   4 +-
 include/search.h                              |   2 +-
 include/test/suites.h                         |  29 +++--
 include/test/ut.h                             |   1 +
 include/tpm-common.h                          |  16 +--
 include/vxworks.h                             |   3 +-
 lib/dhry/cmd_dhry.c                           |   3 +-
 lib/efi_loader/efi_variable.c                 |   1 +
 lib/fdtdec_test.c                             |   5 +-
 lib/hashtable.c                               |   2 +-
 lib/uuid.c                                    |   3 +-
 net/arp.c                                     |   1 +
 net/fastboot.c                                |   1 +
 test/bloblist.c                               |   3 +-
 test/cmd_ut.c                                 |  14 ++-
 test/command_ut.c                             |   4 +-
 test/compression.c                            |   3 +-
 test/dm/test-main.c                           |   2 +-
 test/env/cmd_ut_env.c                         |   2 +-
 test/lib/cmd_ut_lib.c                         |   2 +-
 test/log/log_test.c                           |   3 +-
 test/log/test-main.c                          |   2 +-
 test/optee/cmd_ut_optee.c                     |   2 +-
 test/overlay/cmd_ut_overlay.c                 |   2 +-
 test/print_ut.c                               |   3 +-
 test/str_ut.c                                 |   2 +-
 test/time_ut.c                                |   2 +-
 test/unicode_ut.c                             |   2 +-
 tools/proftool.c                              |   2 +-
 463 files changed, 1986 insertions(+), 1526 deletions(-)

diff --git a/arch/arc/lib/bootm.c b/arch/arc/lib/bootm.c
index 9fa6aaf3b2..8f611efb56 100644
--- a/arch/arc/lib/bootm.c
+++ b/arch/arc/lib/bootm.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <bootstage.h>
+#include <env.h>
 #include <image.h>
 #include <irq_func.h>
 #include <lmb.h>
diff --git a/arch/arc/lib/reset.c b/arch/arc/lib/reset.c
index 30dd4b5238..fbb56ec83a 100644
--- a/arch/arc/lib/reset.c
+++ b/arch/arc/lib/reset.c
@@ -13,7 +13,7 @@ __weak void reset_cpu(ulong addr)
 	__builtin_arc_brk();
 }
 
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	printf("Resetting the board...\n");
 
diff --git a/arch/arm/cpu/arm1136/mx35/generic.c b/arch/arm/cpu/arm1136/mx35/generic.c
index 4c45810fbe..e6fff5b220 100644
--- a/arch/arm/cpu/arm1136/mx35/generic.c
+++ b/arch/arm/cpu/arm1136/mx35/generic.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <command.h>
 #include <div64.h>
 #include <init.h>
 #include <net.h>
@@ -379,8 +380,8 @@ u32 imx_get_fecclk(void)
 }
 #endif
 
-int do_mx35_showclocks(cmd_tbl_t *cmdtp,
-	int flag, int argc, char * const argv[])
+int do_mx35_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	u32 cpufreq = get_mcu_main_clk();
 	printf("mx35 cpu clock: %dMHz\n", cpufreq / 1000000);
diff --git a/arch/arm/cpu/arm926ejs/mxs/mxs.c b/arch/arm/cpu/arm926ejs/mxs/mxs.c
index 72988417ac..d742c0f151 100644
--- a/arch/arm/cpu/arm926ejs/mxs/mxs.c
+++ b/arch/arm/cpu/arm926ejs/mxs/mxs.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <hang.h>
 #include <init.h>
@@ -187,7 +188,8 @@ int print_cpuinfo(void)
 }
 #endif
 
-int do_mx28_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_mx28_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	printf("CPU:   %3d MHz\n", mxc_get_clock(MXC_ARM_CLK) / 1000000);
 	printf("BUS:   %3d MHz\n", mxc_get_clock(MXC_AHB_CLK) / 1000000);
diff --git a/arch/arm/cpu/arm926ejs/spear/cpu.c b/arch/arm/cpu/arm926ejs/spear/cpu.c
index f5192240e4..2106541074 100644
--- a/arch/arm/cpu/arm926ejs/spear/cpu.c
+++ b/arch/arm/cpu/arm926ejs/spear/cpu.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <init.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
@@ -81,7 +82,7 @@ int print_cpuinfo(void)
 #endif
 
 #if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_NAND_ECC_BCH) && defined(CONFIG_NAND_FSMC)
-static int do_switch_ecc(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_switch_ecc(struct cmd_tbl *cmdtp, int flag, int argc,
 			 char *const argv[])
 {
 	if (argc != 2)
diff --git a/arch/arm/cpu/arm926ejs/spear/spr_misc.c b/arch/arm/cpu/arm926ejs/spear/spr_misc.c
index d5be646555..998423b652 100644
--- a/arch/arm/cpu/arm926ejs/spear/spr_misc.c
+++ b/arch/arm/cpu/arm926ejs/spear/spr_misc.c
@@ -182,7 +182,8 @@ static int write_mac(uchar *mac)
 }
 #endif
 
-int do_chip_config(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_chip_config(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	void (*sram_setfreq) (unsigned int, unsigned int);
 	unsigned int frequency;
diff --git a/arch/arm/cpu/armv7/vf610/generic.c b/arch/arm/cpu/armv7/vf610/generic.c
index da43e34394..fd2ab37a8f 100644
--- a/arch/arm/cpu/armv7/vf610/generic.c
+++ b/arch/arm/cpu/armv7/vf610/generic.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <init.h>
 #include <net.h>
@@ -240,8 +241,8 @@ unsigned int mxc_get_clock(enum mxc_clock clk)
 }
 
 /* Dump some core clocks */
-int do_vf610_showclocks(cmd_tbl_t *cmdtp, int flag, int argc,
-			 char * const argv[])
+int do_vf610_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	printf("\n");
 	printf("cpu clock : %8d MHz\n", mxc_get_clock(MXC_ARM_CLK) / 1000000);
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c
index d143864af1..07a47d51e4 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <asm/arch/fsl_serdes.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/mp.c b/arch/arm/cpu/armv8/fsl-layerscape/mp.c
index 4ef2a30278..31536b8181 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/mp.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/mp.c
@@ -260,7 +260,7 @@ int cpu_status(u32 nr)
 	return 0;
 }
 
-int cpu_release(u32 nr, int argc, char * const argv[])
+int cpu_release(u32 nr, int argc, char *const argv[])
 {
 	u64 boot_addr;
 	u64 *table = (u64 *)get_spin_tbl_addr();
diff --git a/arch/arm/include/asm/arch-mx6/clock.h b/arch/arm/include/asm/arch-mx6/clock.h
index 769917679e..8ae4971578 100644
--- a/arch/arm/include/asm/arch-mx6/clock.h
+++ b/arch/arm/include/asm/arch-mx6/clock.h
@@ -21,7 +21,7 @@
 #define MXC_CLK32	32768
 #endif
 
-struct cmd_tbl_s;
+struct cmd_tbl;
 
 enum mxc_clock {
 	MXC_ARM_CLK = 0,
@@ -82,6 +82,6 @@ void enable_thermal_clk(void);
 void mxs_set_lcdclk(u32 base_addr, u32 freq);
 void select_ldb_di_clock_source(enum ldb_di_clock clk);
 void enable_eim_clk(unsigned char enable);
-int do_mx6_showclocks(struct cmd_tbl_s *cmdtp, int flag, int argc,
+int do_mx6_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
 		      char *const argv[]);
 #endif /* __ASM_ARCH_CLOCK_H */
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 68beea2c9d..0facd0c989 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -422,7 +422,7 @@ static void boot_jump_linux(bootm_headers_t *images, int flag)
  * DIFFERENCE: Instead of calling prep and go at the end
  * they are called if subcommand is equal 0.
  */
-int do_bootm_linux(int flag, int argc, char * const argv[],
+int do_bootm_linux(int flag, int argc, char *const argv[],
 		   bootm_headers_t *images)
 {
 	/* No need for those on ARM */
diff --git a/arch/arm/lib/cmd_boot.c b/arch/arm/lib/cmd_boot.c
index 03dde84252..c905ecc4bd 100644
--- a/arch/arm/lib/cmd_boot.c
+++ b/arch/arm/lib/cmd_boot.c
@@ -32,7 +32,7 @@
  *    instructions, otherwise a fault occurs."
  */
 unsigned long do_go_exec(ulong (*entry)(int, char * const []),
-			 int argc, char * const argv[])
+			 int argc, char *const argv[])
 {
 	ulong addr = (ulong)entry | 1;
 	entry = (void *)addr;
diff --git a/arch/arm/lib/reset.c b/arch/arm/lib/reset.c
index 835a40e59d..65b4be20b8 100644
--- a/arch/arm/lib/reset.c
+++ b/arch/arm/lib/reset.c
@@ -21,6 +21,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <irq_func.h>
 
@@ -28,11 +29,11 @@ __weak void reset_misc(void)
 {
 }
 
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	puts ("resetting ...\n");
 
-	udelay (50000);				/* wait 50 ms */
+	mdelay(50);				/* wait 50 ms */
 
 	disable_interrupts();
 
diff --git a/arch/arm/lib/semihosting.c b/arch/arm/lib/semihosting.c
index 2658026cf4..1b365a970f 100644
--- a/arch/arm/lib/semihosting.c
+++ b/arch/arm/lib/semihosting.c
@@ -13,6 +13,7 @@
  */
 #include <common.h>
 #include <command.h>
+#include <env.h>
 
 #define SYSOPEN		0x01
 #define SYSCLOSE	0x02
@@ -180,7 +181,8 @@ static int smh_load_file(const char * const name, ulong load_addr,
 	return 0;
 }
 
-static int do_smhload(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_smhload(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	if (argc == 3 || argc == 4) {
 		ulong load_addr;
diff --git a/arch/arm/mach-imx/cmd_bmode.c b/arch/arm/mach-imx/cmd_bmode.c
index 2d4d6efe5a..19bfd9f9a0 100644
--- a/arch/arm/mach-imx/cmd_bmode.c
+++ b/arch/arm/mach-imx/cmd_bmode.c
@@ -54,8 +54,8 @@ static int create_usage(char *dest)
 	return size;
 }
 
-static int do_boot_mode(cmd_tbl_t *cmdtp, int flag, int argc,
-		char * const argv[])
+static int do_boot_mode(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	const struct boot_mode *p;
 	int reset_requested = 1;
@@ -87,7 +87,7 @@ void add_board_boot_modes(const struct boot_mode *p)
 	int size;
 	char *dest;
 
-	cmd_tbl_t *entry = ll_entry_get(cmd_tbl_t, bmode, cmd);
+	struct cmd_tbl *entry = ll_entry_get(struct cmd_tbl, bmode, cmd);
 
 	if (entry->usage) {
 		free(entry->usage);
diff --git a/arch/arm/mach-imx/cmd_dek.c b/arch/arm/mach-imx/cmd_dek.c
index 1b111ba26b..5f21d2b1c5 100644
--- a/arch/arm/mach-imx/cmd_dek.c
+++ b/arch/arm/mach-imx/cmd_dek.c
@@ -54,7 +54,8 @@ static int blob_encap_dek(const u8 *src, u8 *dst, u32 len)
  * Returns zero on success, CMD_RET_USAGE in case of misuse and negative
  * on error.
  */
-static int do_dek_blob(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_dek_blob(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	uint32_t src_addr, dst_addr, len;
 	uint8_t *src_ptr, *dst_ptr;
diff --git a/arch/arm/mach-imx/cmd_hdmidet.c b/arch/arm/mach-imx/cmd_hdmidet.c
index 6aa7d82577..e2571adfb0 100644
--- a/arch/arm/mach-imx/cmd_hdmidet.c
+++ b/arch/arm/mach-imx/cmd_hdmidet.c
@@ -3,11 +3,13 @@
  * Copyright (C) 2012 Boundary Devices Inc.
  */
 #include <common.h>
+#include <command.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/mxc_hdmi.h>
 #include <asm/io.h>
 
-static int do_hdmidet(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_hdmidet(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	struct hdmi_regs *hdmi	= (struct hdmi_regs *)HDMI_ARB_BASE_ADDR;
 	return (readb(&hdmi->phy_stat0) & HDMI_DVI_STAT) ? 0 : 1;
diff --git a/arch/arm/mach-imx/cmd_nandbcb.c b/arch/arm/mach-imx/cmd_nandbcb.c
index b3e59b1b00..327b3ed5e8 100644
--- a/arch/arm/mach-imx/cmd_nandbcb.c
+++ b/arch/arm/mach-imx/cmd_nandbcb.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <malloc.h>
 #include <nand.h>
 #include <dm/devres.h>
@@ -437,7 +438,7 @@ err:
 	return ret;
 }
 
-static int do_nandbcb_bcbonly(int argc, char * const argv[])
+static int do_nandbcb_bcbonly(int argc, char *const argv[])
 {
 	struct fcb_block *fcb;
 	struct dbbt_block *dbbt;
@@ -519,7 +520,7 @@ fcb_err:
 	return CMD_RET_SUCCESS;
 }
 
-static int do_nandbcb_update(int argc, char * const argv[])
+static int do_nandbcb_update(int argc, char *const argv[])
 {
 	struct mtd_info *mtd;
 	loff_t addr, offset, size, maxsize;
@@ -557,8 +558,8 @@ static int do_nandbcb_update(int argc, char * const argv[])
 	return ret == 0 ? CMD_RET_SUCCESS : CMD_RET_FAILURE;
 }
 
-static int do_nandbcb(cmd_tbl_t *cmdtp, int flag, int argc,
-		      char * const argv[])
+static int do_nandbcb(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	const char *cmd;
 	int ret = 0;
diff --git a/arch/arm/mach-imx/hab.c b/arch/arm/mach-imx/hab.c
index 30db820b56..d0757d8b66 100644
--- a/arch/arm/mach-imx/hab.c
+++ b/arch/arm/mach-imx/hab.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <config.h>
 #include <fuse.h>
 #include <mapmem.h>
@@ -291,8 +292,8 @@ static int get_hab_status(void)
 	return 0;
 }
 
-static int do_hab_status(cmd_tbl_t *cmdtp, int flag, int argc,
-			 char * const argv[])
+static int do_hab_status(struct cmd_tbl *cmdtp, int flag, int argc,
+			 char *const argv[])
 {
 	if ((argc != 1)) {
 		cmd_usage(cmdtp);
@@ -324,8 +325,8 @@ static ulong get_image_ivt_offset(ulong img_addr)
 	}
 }
 
-static int do_authenticate_image(cmd_tbl_t *cmdtp, int flag, int argc,
-				 char * const argv[])
+static int do_authenticate_image(struct cmd_tbl *cmdtp, int flag, int argc,
+				 char *const argv[])
 {
 	ulong	addr, length, ivt_offset;
 	int	rcode = 0;
@@ -349,8 +350,8 @@ static int do_authenticate_image(cmd_tbl_t *cmdtp, int flag, int argc,
 	return rcode;
 }
 
-static int do_hab_failsafe(cmd_tbl_t *cmdtp, int flag, int argc,
-			   char * const argv[])
+static int do_hab_failsafe(struct cmd_tbl *cmdtp, int flag, int argc,
+			   char *const argv[])
 {
 	hab_rvt_failsafe_t *hab_rvt_failsafe;
 
@@ -365,8 +366,8 @@ static int do_hab_failsafe(cmd_tbl_t *cmdtp, int flag, int argc,
 	return 0;
 }
 
-static int do_hab_version(cmd_tbl_t *cmdtp, int flag, int argc,
-			  char * const argv[])
+static int do_hab_version(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	struct hab_hdr *hdr = (struct hab_hdr *)HAB_RVT_BASE;
 
@@ -380,8 +381,8 @@ static int do_hab_version(cmd_tbl_t *cmdtp, int flag, int argc,
 	return 0;
 }
 
-static int do_authenticate_image_or_failover(cmd_tbl_t *cmdtp, int flag,
-					     int argc, char * const argv[])
+static int do_authenticate_image_or_failover(struct cmd_tbl *cmdtp, int flag,
+					     int argc, char *const argv[])
 {
 	int ret = CMD_RET_FAILURE;
 
diff --git a/arch/arm/mach-imx/imx8/ahab.c b/arch/arm/mach-imx/imx8/ahab.c
index 6d25abe5ce..64394473da 100644
--- a/arch/arm/mach-imx/imx8/ahab.c
+++ b/arch/arm/mach-imx/imx8/ahab.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <errno.h>
 #include <asm/io.h>
 #include <asm/arch/sci/sci.h>
@@ -149,8 +150,8 @@ exit:
 	return ret;
 }
 
-static int do_authenticate(cmd_tbl_t *cmdtp, int flag, int argc,
-			   char * const argv[])
+static int do_authenticate(struct cmd_tbl *cmdtp, int flag, int argc,
+			   char *const argv[])
 {
 	ulong addr;
 
@@ -250,8 +251,8 @@ static void display_ahab_auth_event(u32 event)
 	}
 }
 
-static int do_ahab_status(cmd_tbl_t *cmdtp, int flag, int argc,
-			  char * const argv[])
+static int do_ahab_status(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	int err;
 	u8 idx = 0U;
@@ -297,8 +298,8 @@ static int confirm_close(void)
 	return 0;
 }
 
-static int do_ahab_close(cmd_tbl_t *cmdtp, int flag, int argc,
-			 char * const argv[])
+static int do_ahab_close(struct cmd_tbl *cmdtp, int flag, int argc,
+			 char *const argv[])
 {
 	int err;
 	u16 lc;
diff --git a/arch/arm/mach-imx/imx8/snvs_security_sc.c b/arch/arm/mach-imx/imx8/snvs_security_sc.c
index 73f5651161..564d1bfdfb 100644
--- a/arch/arm/mach-imx/imx8/snvs_security_sc.c
+++ b/arch/arm/mach-imx/imx8/snvs_security_sc.c
@@ -626,7 +626,8 @@ static char snvs_cfg_help_text[] =
 	"ALL values should be in hexadecimal format";
 
 #define NB_REGISTERS 18
-static int do_snvs_cfg(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_snvs_cfg(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	int err = 0;
 	u32 idx = 0;
@@ -677,7 +678,7 @@ static char snvs_dgo_cfg_help_text[] =
 	"\n"
 	"ALL values should be in hexadecimal format";
 
-static int do_snvs_dgo_cfg(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_snvs_dgo_cfg(struct cmd_tbl *cmdtp, int flag, int argc,
 			   char *const argv[])
 {
 	int err = 0;
@@ -713,7 +714,7 @@ static char tamper_pin_cfg_help_text[] =
 	"\n"
 	"ALL values should be in hexadecimal format";
 
-static int do_tamper_pin_cfg(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_tamper_pin_cfg(struct cmd_tbl *cmdtp, int flag, int argc,
 			     char *const argv[])
 {
 	int err = 0;
@@ -748,8 +749,8 @@ static char snvs_clear_status_help_text[] =
 	"Write the status registers with the value provided,"
 	" clearing the status";
 
-static int do_snvs_clear_status(cmd_tbl_t *cmdtp, int flag, int argc,
-				  char *const argv[])
+static int do_snvs_clear_status(struct cmd_tbl *cmdtp, int flag, int argc,
+				char *const argv[])
 {
 	int scierr = 0;
 	u32 idx = 0;
@@ -788,7 +789,7 @@ static char snvs_sec_status_help_text[] =
 	"snvs_sec_status\n"
 	"Display information about the security related to tamper and secvio";
 
-static int do_snvs_sec_status(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_snvs_sec_status(struct cmd_tbl *cmdtp, int flag, int argc,
 			      char *const argv[])
 {
 	int scierr;
diff --git a/arch/arm/mach-imx/imx8m/clock_imx8mq.c b/arch/arm/mach-imx/imx8m/clock_imx8mq.c
index ee18cdee50..52205b044a 100644
--- a/arch/arm/mach-imx/imx8m/clock_imx8mq.c
+++ b/arch/arm/mach-imx/imx8m/clock_imx8mq.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/io.h>
@@ -755,8 +756,8 @@ int clock_init(void)
  * Dump some clockes.
  */
 #ifndef CONFIG_SPL_BUILD
-static int do_imx8m_showclocks(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_imx8m_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
+			       char *const argv[])
 {
 	u32 freq;
 
diff --git a/arch/arm/mach-imx/imx_bootaux.c b/arch/arm/mach-imx/imx_bootaux.c
index ec0da1164f..ca823e6861 100644
--- a/arch/arm/mach-imx/imx_bootaux.c
+++ b/arch/arm/mach-imx/imx_bootaux.c
@@ -92,7 +92,8 @@ int arch_auxiliary_core_check_up(u32 core_id)
  * The TCMUL is mapped to (M4_BOOTROM_BASE_ADDR) at A core side for
  * accessing the M4 TCMUL.
  */
-static int do_bootaux(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_bootaux(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	ulong addr;
 	int ret, up;
diff --git a/arch/arm/mach-imx/mx5/clock.c b/arch/arm/mach-imx/mx5/clock.c
index 2fabdd2eae..09c4c89664 100644
--- a/arch/arm/mach-imx/mx5/clock.c
+++ b/arch/arm/mach-imx/mx5/clock.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <asm/arch/imx-regs.h>
@@ -943,7 +944,8 @@ void mxc_set_sata_internal_clock(void)
 /*
  * Dump some core clockes.
  */
-static int do_mx5_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_mx5_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
+			     char *const argv[])
 {
 	u32 freq;
 
diff --git a/arch/arm/mach-imx/mx6/clock.c b/arch/arm/mach-imx/mx6/clock.c
index 6a9e673ca2..9f3d62fa41 100644
--- a/arch/arm/mach-imx/mx6/clock.c
+++ b/arch/arm/mach-imx/mx6/clock.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <div64.h>
 #include <asm/io.h>
 #include <linux/errno.h>
@@ -1305,7 +1306,8 @@ void disable_ipu_clock(void)
 /*
  * Dump some core clockes.
  */
-int do_mx6_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_mx6_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	u32 freq;
 	freq = decode_pll(PLL_SYS, MXC_HCLK);
diff --git a/arch/arm/mach-imx/mx7/clock.c b/arch/arm/mach-imx/mx7/clock.c
index 75be4f8ad7..f5520374f1 100644
--- a/arch/arm/mach-imx/mx7/clock.c
+++ b/arch/arm/mach-imx/mx7/clock.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <command.h>
 #include <div64.h>
 #include <asm/io.h>
 #include <linux/errno.h>
@@ -1100,7 +1101,8 @@ void epdc_clock_disable(void)
 /*
  * Dump some core clockes.
  */
-int do_mx7_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_mx7_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	u32 freq;
 	freq = decode_pll(PLL_CORE, MXC_HCLK);
diff --git a/arch/arm/mach-imx/mx7ulp/clock.c b/arch/arm/mach-imx/mx7ulp/clock.c
index 3c0bcccd0d..a987ff22df 100644
--- a/arch/arm/mach-imx/mx7ulp/clock.c
+++ b/arch/arm/mach-imx/mx7ulp/clock.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <command.h>
 #include <div64.h>
 #include <asm/io.h>
 #include <errno.h>
@@ -329,7 +330,8 @@ void hab_caam_clock_enable(unsigned char enable)
 /*
  * Dump some core clockes.
  */
-int do_mx7_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_mx7_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	u32 addr = 0;
 	u32 freq;
diff --git a/arch/arm/mach-keystone/cmd_clock.c b/arch/arm/mach-keystone/cmd_clock.c
index 667826b9f6..7165d666e5 100644
--- a/arch/arm/mach-keystone/cmd_clock.c
+++ b/arch/arm/mach-keystone/cmd_clock.c
@@ -19,7 +19,7 @@ struct pll_init_data cmd_pll_data = {
 	.pll_od = 2,
 };
 
-int do_pll_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_pll_cmd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	if (argc != 5)
 		goto pll_cmd_usage;
@@ -63,7 +63,8 @@ U_BOOT_CMD(
 	PLLSET_CMD_LIST " <mult> <div> <OD>\n"
 );
 
-int do_getclk_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_getclk_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
+		  char *const argv[])
 {
 	unsigned int clk;
 	unsigned long freq;
@@ -92,7 +93,7 @@ U_BOOT_CMD(
 	CLOCK_INDEXES_LIST
 );
 
-int do_psc_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_psc_cmd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int	psc_module;
 	int	res;
diff --git a/arch/arm/mach-keystone/cmd_mon.c b/arch/arm/mach-keystone/cmd_mon.c
index 8142039040..049d573473 100644
--- a/arch/arm/mach-keystone/cmd_mon.c
+++ b/arch/arm/mach-keystone/cmd_mon.c
@@ -12,8 +12,8 @@
 #include <mach/mon.h>
 asm(".arch_extension sec\n\t");
 
-static int do_mon_install(cmd_tbl_t *cmdtp, int flag, int argc,
-			  char * const argv[])
+static int do_mon_install(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	u32 addr, dpsc_base = 0x1E80000, freq, load_addr, size;
 	int     rcode = 0;
@@ -65,8 +65,8 @@ static void core_spin(void)
 	}
 }
 
-int do_mon_power(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+int do_mon_power(struct cmd_tbl *cmdtp, int flag, int argc,
+		 char *const argv[])
 {
 	int     rcode = 0, core_id, on;
 	void (*fn)(void);
diff --git a/arch/arm/mach-keystone/cmd_poweroff.c b/arch/arm/mach-keystone/cmd_poweroff.c
index 89b18516cd..f0ad9173b9 100644
--- a/arch/arm/mach-keystone/cmd_poweroff.c
+++ b/arch/arm/mach-keystone/cmd_poweroff.c
@@ -12,7 +12,7 @@
 #include <asm/arch/psc_defs.h>
 #include <asm/arch/hardware.h>
 
-int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	mon_power_off(0);
 
diff --git a/arch/arm/mach-keystone/ddr3.c b/arch/arm/mach-keystone/ddr3.c
index 23ff06466d..9ab6b53adb 100644
--- a/arch/arm/mach-keystone/ddr3.c
+++ b/arch/arm/mach-keystone/ddr3.c
@@ -7,6 +7,7 @@
  */
 
 #include <cpu_func.h>
+#include <env.h>
 #include <asm/io.h>
 #include <common.h>
 #include <asm/arch/msmc.h>
diff --git a/arch/arm/mach-keystone/keystone.c b/arch/arm/mach-keystone/keystone.c
index 1d79927ac7..efaabca5a7 100644
--- a/arch/arm/mach-keystone/keystone.c
+++ b/arch/arm/mach-keystone/keystone.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <init.h>
 #include <asm/io.h>
 #include <asm/arch/psc_defs.h>
diff --git a/arch/arm/mach-meson/sm.c b/arch/arm/mach-meson/sm.c
index dacc897533..725897a0ec 100644
--- a/arch/arm/mach-meson/sm.c
+++ b/arch/arm/mach-meson/sm.c
@@ -6,6 +6,8 @@
  */
 
 #include <common.h>
+#include <command.h>
+#include <env.h>
 #include <asm/arch/sm.h>
 #include <asm/cache.h>
 #include <linux/err.h>
@@ -117,7 +119,7 @@ int meson_sm_get_reboot_reason(void)
 	return FIELD_GET(REBOOT_REASON_MASK, reason);
 }
 
-static int do_sm_serial(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_sm_serial(struct cmd_tbl *cmdtp, int flag, int argc,
 			char *const argv[])
 {
 	ulong address;
@@ -153,8 +155,8 @@ static const char *reboot_reasons[MAX_REBOOT_REASONS] = {
 	[REBOOT_REASON_WATCHDOG_REBOOT] = "watchdog_reboot",
 };
 
-static int do_sm_reboot_reason(cmd_tbl_t *cmdtp, int flag, int argc,
-			char *const argv[])
+static int do_sm_reboot_reason(struct cmd_tbl *cmdtp, int flag, int argc,
+			       char *const argv[])
 {
 	const char *reason_str;
 	char *destarg = NULL;
@@ -181,15 +183,15 @@ static int do_sm_reboot_reason(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_SUCCESS;
 }
 
-static cmd_tbl_t cmd_sm_sub[] = {
+static struct cmd_tbl cmd_sm_sub[] = {
 	U_BOOT_CMD_MKENT(serial, 2, 1, do_sm_serial, "", ""),
 	U_BOOT_CMD_MKENT(reboot_reason, 1, 1, do_sm_reboot_reason, "", ""),
 };
 
-static int do_sm(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_sm(struct cmd_tbl *cmdtp, int flag, int argc,
 		 char *const argv[])
 {
-	cmd_tbl_t *c;
+	struct cmd_tbl *c;
 
 	if (argc < 2)
 		return CMD_RET_USAGE;
diff --git a/arch/arm/mach-omap2/omap3/board.c b/arch/arm/mach-omap2/omap3/board.c
index b893fb732e..f08c8ab43a 100644
--- a/arch/arm/mach-omap2/omap3/board.c
+++ b/arch/arm/mach-omap2/omap3/board.c
@@ -16,6 +16,7 @@
  *
  */
 #include <common.h>
+#include <command.h>
 #include <dm.h>
 #include <init.h>
 #include <spl.h>
@@ -280,7 +281,8 @@ void abort(void)
 /******************************************************************************
  * OMAP3 specific command to switch between NAND HW and SW ecc
  *****************************************************************************/
-static int do_switch_ecc(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+static int do_switch_ecc(struct cmd_tbl *cmdtp, int flag, int argc,
+			 char *const argv[])
 {
 	int hw, strength = 1;
 
diff --git a/arch/arm/mach-omap2/sec-common.c b/arch/arm/mach-omap2/sec-common.c
index 28b929f84f..edfb40f00b 100644
--- a/arch/arm/mach-omap2/sec-common.c
+++ b/arch/arm/mach-omap2/sec-common.c
@@ -13,6 +13,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <hang.h>
 #include <init.h>
diff --git a/arch/arm/mach-rockchip/boot_mode.c b/arch/arm/mach-rockchip/boot_mode.c
index 7598fe4c43..349c0648a6 100644
--- a/arch/arm/mach-rockchip/boot_mode.c
+++ b/arch/arm/mach-rockchip/boot_mode.c
@@ -5,6 +5,8 @@
 
 #include <common.h>
 #include <adc.h>
+#include <command.h>
+#include <env.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/boot_mode.h>
 #include <dm/device.h>
diff --git a/arch/arm/mach-rockchip/cpu-info.c b/arch/arm/mach-rockchip/cpu-info.c
index 08b7d3519d..21ca9dedce 100644
--- a/arch/arm/mach-rockchip/cpu-info.c
+++ b/arch/arm/mach-rockchip/cpu-info.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <init.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/clock.h>
diff --git a/arch/arm/mach-rockchip/rk3288/rk3288.c b/arch/arm/mach-rockchip/rk3288/rk3288.c
index 812f3bd5f3..804abe8a1b 100644
--- a/arch/arm/mach-rockchip/rk3288/rk3288.c
+++ b/arch/arm/mach-rockchip/rk3288/rk3288.c
@@ -3,6 +3,7 @@
  * Copyright (c) 2016 Rockchip Electronics Co., Ltd
  */
 #include <common.h>
+#include <command.h>
 #include <dm.h>
 #include <env.h>
 #include <clk.h>
@@ -114,8 +115,8 @@ int rk_board_late_init(void)
 	return rk3288_board_late_init();
 }
 
-static int do_clock(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_clock(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[])
 {
 	static const struct {
 		char *name;
diff --git a/arch/arm/mach-socfpga/clock_manager.c b/arch/arm/mach-socfpga/clock_manager.c
index 0a6025fffa..a4a97b6a0f 100644
--- a/arch/arm/mach-socfpga/clock_manager.c
+++ b/arch/arm/mach-socfpga/clock_manager.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <init.h>
 #include <wait_bit.h>
 #include <asm/io.h>
@@ -62,7 +63,8 @@ int set_cpu_clk_info(void)
 }
 
 #ifndef CONFIG_SPL_BUILD
-static int do_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
+			 char *const argv[])
 {
 	cm_print_clock_quick_summary();
 	return 0;
diff --git a/arch/arm/mach-socfpga/misc.c b/arch/arm/mach-socfpga/misc.c
index 557305c703..ac2b891fad 100644
--- a/arch/arm/mach-socfpga/misc.c
+++ b/arch/arm/mach-socfpga/misc.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <hang.h>
 #include <asm/cache.h>
@@ -178,7 +179,8 @@ int arch_cpu_init(void)
 }
 
 #ifndef CONFIG_SPL_BUILD
-static int do_bridge(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_bridge(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	unsigned int mask = ~0;
 
diff --git a/arch/arm/mach-stm32mp/cmd_stm32key.c b/arch/arm/mach-stm32mp/cmd_stm32key.c
index f1f26e7c94..f191085a12 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32key.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32key.c
@@ -66,8 +66,8 @@ static int confirm_prog(void)
 	return 0;
 }
 
-static int do_stm32key(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_stm32key(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	u32 addr;
 	const char *op = argc >= 2 ? argv[1] : NULL;
diff --git a/arch/arm/mach-tegra/cmd_enterrcm.c b/arch/arm/mach-tegra/cmd_enterrcm.c
index b2252f3621..110d441d9b 100644
--- a/arch/arm/mach-tegra/cmd_enterrcm.c
+++ b/arch/arm/mach-tegra/cmd_enterrcm.c
@@ -25,13 +25,14 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <irq_func.h>
 #include <asm/arch/tegra.h>
 #include <asm/arch-tegra/pmc.h>
 
-static int do_enterrcm(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_enterrcm(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	puts("Entering RCM...\n");
 	udelay(50000);
diff --git a/arch/arm/mach-uniphier/boot-device/boot-device.c b/arch/arm/mach-uniphier/boot-device/boot-device.c
index 83f8c6a428..777946970b 100644
--- a/arch/arm/mach-uniphier/boot-device/boot-device.c
+++ b/arch/arm/mach-uniphier/boot-device/boot-device.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <spl.h>
 #include <stdio.h>
 #include <linux/io.h>
@@ -205,7 +206,8 @@ int uniphier_boot_from_backend(void)
 
 #ifndef CONFIG_SPL_BUILD
 
-static int do_pinmon(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_pinmon(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	const struct uniphier_boot_device_info *info;
 	u32 pinmon;
diff --git a/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c b/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c
index 9a25bba599..a6c0735198 100644
--- a/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c
+++ b/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <stdio.h>
 #include <linux/io.h>
 #include <linux/printk.h>
@@ -291,7 +292,8 @@ static void reg_dump(const struct uniphier_ddrmphy_param *param)
 	}
 }
 
-static int do_ddrm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_ddrm(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	const struct uniphier_ddrmphy_param *param;
 	char *cmd;
diff --git a/arch/arm/mach-uniphier/dram/cmd_ddrphy.c b/arch/arm/mach-uniphier/dram/cmd_ddrphy.c
index a616a2aafb..476c5b3582 100644
--- a/arch/arm/mach-uniphier/dram/cmd_ddrphy.c
+++ b/arch/arm/mach-uniphier/dram/cmd_ddrphy.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <stdio.h>
 #include <linux/io.h>
 #include <linux/printk.h>
@@ -261,7 +262,8 @@ static void reg_dump(const struct uniphier_ddrphy_param *param)
 	}
 }
 
-static int do_ddr(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_ddr(struct cmd_tbl *cmdtp, int flag, int argc,
+		  char *const argv[])
 {
 	const struct uniphier_ddrphy_param *param;
 	char *cmd;
diff --git a/arch/arm/mach-uniphier/mmc-first-dev.c b/arch/arm/mach-uniphier/mmc-first-dev.c
index e2f4f4eb5c..7f29b6bccd 100644
--- a/arch/arm/mach-uniphier/mmc-first-dev.c
+++ b/arch/arm/mach-uniphier/mmc-first-dev.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <env.h>
 #include <mmc.h>
 #include <linux/errno.h>
@@ -28,7 +29,8 @@ int mmc_get_env_dev(void)
 	return find_first_mmc_device(false);
 }
 
-static int do_mmcsetn(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_mmcsetn(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	int dev;
 
@@ -46,7 +48,8 @@ U_BOOT_CMD(
 	""
 );
 
-static int do_sdsetn(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_sdsetn(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	int dev;
 
diff --git a/arch/arm/mach-zynqmp/mp.c b/arch/arm/mach-zynqmp/mp.c
index fbb551151a..cc07db4831 100644
--- a/arch/arm/mach-zynqmp/mp.c
+++ b/arch/arm/mach-zynqmp/mp.c
@@ -221,7 +221,7 @@ void initialize_tcm(bool mode)
 	}
 }
 
-int cpu_release(u32 nr, int argc, char * const argv[])
+int cpu_release(u32 nr, int argc, char *const argv[])
 {
 	if (nr >= ZYNQMP_CORE_APU0 && nr <= ZYNQMP_CORE_APU3) {
 		u64 boot_addr = simple_strtoull(argv[0], NULL, 16);
diff --git a/arch/m68k/cpu/mcf5227x/cpu.c b/arch/m68k/cpu/mcf5227x/cpu.c
index 1590d4a954..200c53eaf3 100644
--- a/arch/m68k/cpu/mcf5227x/cpu.c
+++ b/arch/m68k/cpu/mcf5227x/cpu.c
@@ -19,7 +19,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	rcm_t *rcm = (rcm_t *) (MMAP_RCM);
 	udelay(1000);
diff --git a/arch/m68k/cpu/mcf523x/cpu.c b/arch/m68k/cpu/mcf523x/cpu.c
index 225bdc2d25..d521a8a2e4 100644
--- a/arch/m68k/cpu/mcf523x/cpu.c
+++ b/arch/m68k/cpu/mcf523x/cpu.c
@@ -21,7 +21,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	ccm_t *ccm = (ccm_t *) MMAP_CCM;
 
diff --git a/arch/m68k/cpu/mcf52x2/cpu.c b/arch/m68k/cpu/mcf52x2/cpu.c
index 1f70d90f0b..8c91e0e193 100644
--- a/arch/m68k/cpu/mcf52x2/cpu.c
+++ b/arch/m68k/cpu/mcf52x2/cpu.c
@@ -27,7 +27,7 @@
 DECLARE_GLOBAL_DATA_PTR;
 
 #ifdef	CONFIG_M5208
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	rcm_t *rcm = (rcm_t *)(MMAP_RCM);
 
@@ -140,7 +140,7 @@ int print_cpuinfo(void)
 }
 #endif /* CONFIG_DISPLAY_CPUINFO */
 
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	/* Call the board specific reset actions first. */
 	if(board_reset) {
@@ -175,7 +175,7 @@ int watchdog_init(void)
 #endif
 
 #ifdef	CONFIG_M5272
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	wdog_t *wdp = (wdog_t *) (MMAP_WDOG);
 
@@ -264,7 +264,7 @@ int watchdog_init(void)
 #endif				/* #ifdef CONFIG_M5272 */
 
 #ifdef	CONFIG_M5275
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	rcm_t *rcm = (rcm_t *)(MMAP_RCM);
 
@@ -354,7 +354,7 @@ int print_cpuinfo(void)
 }
 #endif /* CONFIG_DISPLAY_CPUINFO */
 
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	MCFRESET_RCR = MCFRESET_RCR_SOFTRST;
 	return 0;
@@ -373,7 +373,7 @@ int print_cpuinfo(void)
 }
 #endif /* CONFIG_DISPLAY_CPUINFO */
 
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	/* enable watchdog, set timeout to 0 and wait */
 	mbar_writeByte(MCFSIM_SYPCR, 0xc0);
@@ -405,7 +405,7 @@ int print_cpuinfo(void)
 }
 #endif /* CONFIG_DISPLAY_CPUINFO */
 
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	/* enable watchdog, set timeout to 0 and wait */
 	mbar_writeByte(SIM_SYPCR, 0xc0);
diff --git a/arch/m68k/cpu/mcf530x/cpu.c b/arch/m68k/cpu/mcf530x/cpu.c
index bef9047b35..0659bf6558 100644
--- a/arch/m68k/cpu/mcf530x/cpu.c
+++ b/arch/m68k/cpu/mcf530x/cpu.c
@@ -5,13 +5,14 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <init.h>
 #include <vsprintf.h>
 #include <asm/immap.h>
 #include <asm/io.h>
 
 #ifdef CONFIG_M5307
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	sim_t *sim = (sim_t *)(MMAP_SIM);
 
diff --git a/arch/m68k/cpu/mcf532x/cpu.c b/arch/m68k/cpu/mcf532x/cpu.c
index 52b64a94a7..87b77f42de 100644
--- a/arch/m68k/cpu/mcf532x/cpu.c
+++ b/arch/m68k/cpu/mcf532x/cpu.c
@@ -21,7 +21,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	rcm_t *rcm = (rcm_t *) (MMAP_RCM);
 
diff --git a/arch/m68k/cpu/mcf5445x/cpu.c b/arch/m68k/cpu/mcf5445x/cpu.c
index cb1514c600..2608fdd76f 100644
--- a/arch/m68k/cpu/mcf5445x/cpu.c
+++ b/arch/m68k/cpu/mcf5445x/cpu.c
@@ -21,7 +21,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	rcm_t *rcm = (rcm_t *) (MMAP_RCM);
 	udelay(1000);
diff --git a/arch/m68k/cpu/mcf547x_8x/cpu.c b/arch/m68k/cpu/mcf547x_8x/cpu.c
index 2a64c7b6f6..59cdfe70e4 100644
--- a/arch/m68k/cpu/mcf547x_8x/cpu.c
+++ b/arch/m68k/cpu/mcf547x_8x/cpu.c
@@ -21,7 +21,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	gptmr_t *gptmr = (gptmr_t *) (MMAP_GPTMR);
 
diff --git a/arch/m68k/lib/bootm.c b/arch/m68k/lib/bootm.c
index c36ee79c92..b912d130d6 100644
--- a/arch/m68k/lib/bootm.c
+++ b/arch/m68k/lib/bootm.c
@@ -49,7 +49,8 @@ void arch_lmb_reserve(struct lmb *lmb)
 	lmb_reserve(lmb, sp, (CONFIG_SYS_SDRAM_BASE + gd->ram_size - sp));
 }
 
-int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *images)
+int do_bootm_linux(int flag, int argc, char *const argv[],
+		   bootm_headers_t *images)
 {
 	int ret;
 	bd_t  *kbd;
diff --git a/arch/microblaze/cpu/interrupts.c b/arch/microblaze/cpu/interrupts.c
index 910c596884..a6a52f8527 100644
--- a/arch/microblaze/cpu/interrupts.c
+++ b/arch/microblaze/cpu/interrupts.c
@@ -187,7 +187,7 @@ void interrupt_handler(void)
 }
 
 #if defined(CONFIG_CMD_IRQ)
-int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, const char *argv[])
+int do_irqinfo(struct cmd_tbl *cmdtp, int flag, int argc, const char *argv[])
 {
 	int i;
 	struct irq_action *act = vecs;
diff --git a/arch/microblaze/cpu/spl.c b/arch/microblaze/cpu/spl.c
index 070c12cce9..c633e83853 100644
--- a/arch/microblaze/cpu/spl.c
+++ b/arch/microblaze/cpu/spl.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <image.h>
 #include <spl.h>
 #include <asm/io.h>
@@ -48,7 +49,7 @@ int spl_start_uboot(void)
 	return 1;
 }
 
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	__asm__ __volatile__ ("mts rmsr, r0;" \
 			      "bra r0");
diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c
index 592ac97f82..93f95b1e26 100644
--- a/arch/microblaze/lib/bootm.c
+++ b/arch/microblaze/lib/bootm.c
@@ -108,7 +108,7 @@ static void boot_prep_linux(bootm_headers_t *images)
 	}
 }
 
-int do_bootm_linux(int flag, int argc, char * const argv[],
+int do_bootm_linux(int flag, int argc, char *const argv[],
 		   bootm_headers_t *images)
 {
 	images->cmdline_start = (ulong)env_get("bootargs");
diff --git a/arch/mips/cpu/cpu.c b/arch/mips/cpu/cpu.c
index 682bee6be2..7d5c9fd83a 100644
--- a/arch/mips/cpu/cpu.c
+++ b/arch/mips/cpu/cpu.c
@@ -21,7 +21,7 @@ void __weak _machine_restart(void)
 		/* NOP */;
 }
 
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	_machine_restart();
 
diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c
index ce2b076b7d..cbc4413d5d 100644
--- a/arch/mips/lib/bootm.c
+++ b/arch/mips/lib/bootm.c
@@ -306,8 +306,8 @@ static void boot_jump_linux(bootm_headers_t *images)
 			linux_extra);
 }
 
-int do_bootm_linux(int flag, int argc, char * const argv[],
-			bootm_headers_t *images)
+int do_bootm_linux(int flag, int argc, char *const argv[],
+		   bootm_headers_t *images)
 {
 	/* No need for those on MIPS */
 	if (flag & BOOTM_STATE_OS_BD_T)
diff --git a/arch/mips/mach-ath79/ar934x/clk.c b/arch/mips/mach-ath79/ar934x/clk.c
index 09bdc253ae..5d0d4550db 100644
--- a/arch/mips/mach-ath79/ar934x/clk.c
+++ b/arch/mips/mach-ath79/ar934x/clk.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <command.h>
 #include <hang.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
@@ -319,7 +320,8 @@ ulong get_ddr_freq(ulong dummy)
 	return gd->mem_clk;
 }
 
-int do_ar934x_showclk(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_ar934x_showclk(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	ar934x_update_clock();
 	printf("CPU:       %8ld MHz\n", gd->cpu_clk / 1000000);
diff --git a/arch/nds32/cpu/n1213/ae3xx/cpu.c b/arch/nds32/cpu/n1213/ae3xx/cpu.c
index 0660fffa45..c3efa31f59 100644
--- a/arch/nds32/cpu/n1213/ae3xx/cpu.c
+++ b/arch/nds32/cpu/n1213/ae3xx/cpu.c
@@ -39,7 +39,7 @@ int cleanup_before_linux(void)
 	return 0;
 }
 
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	disable_interrupts();
 	panic("AE3XX wdt not support yet.\n");
diff --git a/arch/nds32/cpu/n1213/ag101/cpu.c b/arch/nds32/cpu/n1213/ag101/cpu.c
index 3ae87a21bb..9d99c83bf3 100644
--- a/arch/nds32/cpu/n1213/ag101/cpu.c
+++ b/arch/nds32/cpu/n1213/ag101/cpu.c
@@ -39,7 +39,7 @@ int cleanup_before_linux(void)
 	return 0;
 }
 
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	disable_interrupts();
 
diff --git a/arch/nds32/lib/boot.c b/arch/nds32/lib/boot.c
index c50e8e5168..da2fd36a16 100644
--- a/arch/nds32/lib/boot.c
+++ b/arch/nds32/lib/boot.c
@@ -9,7 +9,7 @@
 #include <command.h>
 
 unsigned long do_go_exec(ulong (*entry)(int, char * const []),
-			 int argc, char * const argv[])
+			 int argc, char *const argv[])
 {
 	cleanup_before_linux();
 
diff --git a/arch/nios2/cpu/cpu.c b/arch/nios2/cpu/cpu.c
index 9008db6aa5..756535a0b4 100644
--- a/arch/nios2/cpu/cpu.c
+++ b/arch/nios2/cpu/cpu.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu.h>
 #include <cpu_func.h>
 #include <dm.h>
@@ -31,7 +32,7 @@ int checkboard(void)
 }
 #endif
 
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	disable_interrupts();
 	/* indirect call to go beyond 256MB limitation of toolchain */
diff --git a/arch/nios2/cpu/interrupts.c b/arch/nios2/cpu/interrupts.c
index e9d1ff911b..90cabb6757 100644
--- a/arch/nios2/cpu/interrupts.c
+++ b/arch/nios2/cpu/interrupts.c
@@ -118,7 +118,7 @@ int interrupt_init(void)
 
 /*************************************************************************/
 #if defined(CONFIG_CMD_IRQ)
-int do_irqinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_irqinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int i;
 	struct irq_action *act = vecs;
diff --git a/arch/nios2/lib/bootm.c b/arch/nios2/lib/bootm.c
index bec18fe28f..fed412907f 100644
--- a/arch/nios2/lib/bootm.c
+++ b/arch/nios2/lib/bootm.c
@@ -6,12 +6,14 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <env.h>
 #include <image.h>
 #include <irq_func.h>
 
 #define NIOS_MAGIC 0x534f494e /* enable command line and initrd passing */
 
-int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *images)
+int do_bootm_linux(int flag, int argc, char *const argv[],
+		   bootm_headers_t *images)
 {
 	void (*kernel)(int, int, int, char *) = (void *)images->ep;
 	char *commandline = env_get("bootargs");
diff --git a/arch/powerpc/cpu/mpc83xx/cpu.c b/arch/powerpc/cpu/mpc83xx/cpu.c
index f0e3ada195..0307039f37 100644
--- a/arch/powerpc/cpu/mpc83xx/cpu.c
+++ b/arch/powerpc/cpu/mpc83xx/cpu.c
@@ -123,8 +123,7 @@ int checkcpu(void)
 #endif
 
 #ifndef CONFIG_SYSRESET
-int
-do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	ulong msr;
 #ifndef MPC83xx_RESET
diff --git a/arch/powerpc/cpu/mpc83xx/ecc.c b/arch/powerpc/cpu/mpc83xx/ecc.c
index a6eb7cb97c..1343dd3d3a 100644
--- a/arch/powerpc/cpu/mpc83xx/ecc.c
+++ b/arch/powerpc/cpu/mpc83xx/ecc.c
@@ -96,7 +96,7 @@ void ecc_print_status(void)
 	       ddr->capture_attributes & ECC_CAPT_ATTR_VLD);
 }
 
-int do_ecc(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+int do_ecc(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
 #ifdef CONFIG_SYS_FSL_DDR2
diff --git a/arch/powerpc/cpu/mpc83xx/interrupts.c b/arch/powerpc/cpu/mpc83xx/interrupts.c
index e83895deab..8d525dc837 100644
--- a/arch/powerpc/cpu/mpc83xx/interrupts.c
+++ b/arch/powerpc/cpu/mpc83xx/interrupts.c
@@ -71,8 +71,8 @@ void timer_interrupt_cpu (struct pt_regs *regs)
  * irqinfo - print information about PCI devices
  */
 
-void
-do_irqinfo(cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char * const argv[])
+void do_irqinfo(struct cmd_tbl *cmdtp, bd_t *bd, int flag, int argc,
+		char *const argv[])
 {
 }
 
diff --git a/arch/powerpc/cpu/mpc83xx/speed.c b/arch/powerpc/cpu/mpc83xx/speed.c
index e2fc0b1e8a..5c14aa1f32 100644
--- a/arch/powerpc/cpu/mpc83xx/speed.c
+++ b/arch/powerpc/cpu/mpc83xx/speed.c
@@ -523,7 +523,8 @@ int get_serial_clock(void)
 	return get_bus_freq(0);
 }
 
-static int do_clocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_clocks(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	char buf[32];
 
diff --git a/arch/powerpc/cpu/mpc85xx/cmd_errata.c b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
index d3167f6cb9..ff73596ba9 100644
--- a/arch/powerpc/cpu/mpc85xx/cmd_errata.c
+++ b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
@@ -129,7 +129,8 @@ static void check_erratum_a007212(void)
 }
 #endif
 
-static int do_errata(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_errata(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 #ifdef CONFIG_SYS_FSL_ERRATUM_NMG_CPU_A011
 	extern int enable_cpu_a011_workaround;
diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c
index eff0d5d7e2..10c4bb91d7 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu.c
@@ -295,7 +295,7 @@ int checkcpu (void)
 
 /* ------------------------------------------------------------------------- */
 
-int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 /* Everything after the first generation of PQ3 parts has RSTCR */
 #if defined(CONFIG_ARCH_MPC8540) || defined(CONFIG_ARCH_MPC8541) || \
diff --git a/arch/powerpc/cpu/mpc85xx/interrupts.c b/arch/powerpc/cpu/mpc85xx/interrupts.c
index 6f539d2677..43f7919b04 100644
--- a/arch/powerpc/cpu/mpc85xx/interrupts.c
+++ b/arch/powerpc/cpu/mpc85xx/interrupts.c
@@ -102,7 +102,7 @@ void timer_interrupt_cpu(struct pt_regs *regs)
 
 #if defined(CONFIG_CMD_IRQ)
 /* irqinfo - print information about PCI devices,not implemented. */
-int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_irqinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	return 0;
 }
diff --git a/arch/powerpc/cpu/mpc85xx/mp.c b/arch/powerpc/cpu/mpc85xx/mp.c
index 9757bffe02..0f8c8cd667 100644
--- a/arch/powerpc/cpu/mpc85xx/mp.c
+++ b/arch/powerpc/cpu/mpc85xx/mp.c
@@ -140,7 +140,7 @@ static u8 boot_entry_map[4] = {
 	BOOT_ENTRY_R3_LOWER,
 };
 
-int cpu_release(u32 nr, int argc, char * const argv[])
+int cpu_release(u32 nr, int argc, char *const argv[])
 {
 	u32 i, val, *table = (u32 *)&__spin_table + nr * NUM_BOOT_ENTRY;
 	u64 boot_addr;
diff --git a/arch/powerpc/cpu/mpc86xx/cpu.c b/arch/powerpc/cpu/mpc86xx/cpu.c
index 97b93f0213..fe35744b70 100644
--- a/arch/powerpc/cpu/mpc86xx/cpu.c
+++ b/arch/powerpc/cpu/mpc86xx/cpu.c
@@ -107,7 +107,7 @@ checkcpu(void)
 }
 
 
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
 	volatile ccsr_gur_t *gur = &immap->im_gur;
diff --git a/arch/powerpc/cpu/mpc86xx/interrupts.c b/arch/powerpc/cpu/mpc86xx/interrupts.c
index eb8e73e41c..8e4a66d23e 100644
--- a/arch/powerpc/cpu/mpc86xx/interrupts.c
+++ b/arch/powerpc/cpu/mpc86xx/interrupts.c
@@ -100,7 +100,7 @@ void irq_free_handler(int vec)
 /*
  * irqinfo - print information about PCI devices,not implemented.
  */
-int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_irqinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	return 0;
 }
diff --git a/arch/powerpc/cpu/mpc86xx/mp.c b/arch/powerpc/cpu/mpc86xx/mp.c
index 07c4c079df..08d11ad4f2 100644
--- a/arch/powerpc/cpu/mpc86xx/mp.c
+++ b/arch/powerpc/cpu/mpc86xx/mp.c
@@ -67,7 +67,7 @@ int is_core_disabled(int nr) {
 	return 0;
 }
 
-int cpu_release(u32 nr, int argc, char * const argv[])
+int cpu_release(u32 nr, int argc, char *const argv[])
 {
 	/* dummy function so common/cmd_mp.c will build
 	 * should be implemented in the future */
diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c
index 9d6c08f17a..1b7c7fa01b 100644
--- a/arch/powerpc/cpu/mpc8xx/cpu.c
+++ b/arch/powerpc/cpu/mpc8xx/cpu.c
@@ -195,7 +195,7 @@ void upmconfig(uint upm, uint *table, uint size)
 
 /* ------------------------------------------------------------------------- */
 
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	ulong msr, addr;
 
diff --git a/arch/powerpc/cpu/mpc8xx/immap.c b/arch/powerpc/cpu/mpc8xx/immap.c
index 442c01ac6f..e5b62e9f4a 100644
--- a/arch/powerpc/cpu/mpc8xx/immap.c
+++ b/arch/powerpc/cpu/mpc8xx/immap.c
@@ -18,7 +18,8 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-static int do_siuinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_siuinfo(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
 	sysconf8xx_t __iomem *sc = &immap->im_siu_conf;
@@ -35,8 +36,8 @@ static int do_siuinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return 0;
 }
 
-static int do_memcinfo(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_memcinfo(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
 	memctl8xx_t __iomem *memctl = &immap->im_memctl;
@@ -58,7 +59,8 @@ static int do_memcinfo(cmd_tbl_t *cmdtp, int flag, int argc,
 	return 0;
 }
 
-static int do_carinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_carinfo(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
 	car8xx_t __iomem *car = &immap->im_clkrst;
@@ -119,7 +121,8 @@ static void binary(char *label, uint value, int nbits)
 #define PC_NBITS	12
 #define PD_NBITS	13
 
-static int do_iopinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_iopinfo(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
 	iop8xx_t __iomem *iop = &immap->im_ioport;
@@ -172,7 +175,8 @@ static int do_iopinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
  * this needs a clean up for smaller tighter code
  * use *uint and set the address based on cmd + port
  */
-static int do_iopset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_iopset(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	uint rcode = 0;
 	iopin_t iopin;
@@ -328,7 +332,8 @@ static void prbrg(int n, uint val)
 	putc('\n');
 }
 
-static int do_brginfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_brginfo(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
 	cpm8xx_t __iomem *cp = &immap->im_cpm;
diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c
index 8aec8c9fd3..59062ca654 100644
--- a/arch/powerpc/lib/bootm.c
+++ b/arch/powerpc/lib/bootm.c
@@ -232,8 +232,8 @@ static int boot_body_linux(bootm_headers_t *images)
 	return 0;
 }
 
-noinline
-int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *images)
+noinline int do_bootm_linux(int flag, int argc, char *const argv[],
+			    bootm_headers_t *images)
 {
 	int	ret;
 
diff --git a/arch/powerpc/lib/kgdb.c b/arch/powerpc/lib/kgdb.c
index f580c023e5..4a3e26cffc 100644
--- a/arch/powerpc/lib/kgdb.c
+++ b/arch/powerpc/lib/kgdb.c
@@ -252,7 +252,7 @@ kgdb_putregs(struct pt_regs *regs, char *buf, int length)
    the debugger. */
 
 void
-kgdb_breakpoint(int argc, char * const argv[])
+kgdb_breakpoint(int argc, char *const argv[])
 {
 	asm("	.globl breakinst\n\
 	     breakinst: .long 0x7d821008\n\
diff --git a/arch/riscv/lib/boot.c b/arch/riscv/lib/boot.c
index 42b15a13a2..778d011f7c 100644
--- a/arch/riscv/lib/boot.c
+++ b/arch/riscv/lib/boot.c
@@ -8,7 +8,7 @@
 #include <command.h>
 
 unsigned long do_go_exec(ulong (*entry)(int, char * const []),
-			 int argc, char * const argv[])
+			 int argc, char *const argv[])
 {
 	cleanup_before_linux();
 
diff --git a/arch/riscv/lib/bootm.c b/arch/riscv/lib/bootm.c
index c24aba1dc9..98f2c76860 100644
--- a/arch/riscv/lib/bootm.c
+++ b/arch/riscv/lib/bootm.c
@@ -106,7 +106,7 @@ static void boot_jump_linux(bootm_headers_t *images, int flag)
 	}
 }
 
-int do_bootm_linux(int flag, int argc, char * const argv[],
+int do_bootm_linux(int flag, int argc, char *const argv[],
 		   bootm_headers_t *images)
 {
 	/* No need for those on RISC-V */
@@ -128,7 +128,7 @@ int do_bootm_linux(int flag, int argc, char * const argv[],
 	return 0;
 }
 
-int do_bootm_vxworks(int flag, int argc, char * const argv[],
+int do_bootm_vxworks(int flag, int argc, char *const argv[],
 		     bootm_headers_t *images)
 {
 	return do_bootm_linux(flag, argc, argv, images);
diff --git a/arch/riscv/lib/reset.c b/arch/riscv/lib/reset.c
index ce3c1cf872..8779c619cc 100644
--- a/arch/riscv/lib/reset.c
+++ b/arch/riscv/lib/reset.c
@@ -7,7 +7,7 @@
 #include <command.h>
 #include <hang.h>
 
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	printf("resetting ...\n");
 
diff --git a/arch/sh/cpu/sh4/cpu.c b/arch/sh/cpu/sh4/cpu.c
index e94e980c0e..f032d88159 100644
--- a/arch/sh/cpu/sh4/cpu.c
+++ b/arch/sh/cpu/sh4/cpu.c
@@ -29,7 +29,7 @@ int cleanup_before_linux (void)
 	return 0;
 }
 
-int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	disable_interrupts();
 	reset_cpu(0);
diff --git a/arch/sh/lib/bootm.c b/arch/sh/lib/bootm.c
index 5f14a04ab4..dc94f83785 100644
--- a/arch/sh/lib/bootm.c
+++ b/arch/sh/lib/bootm.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <env.h>
 #include <image.h>
 #include <asm/byteorder.h>
 #include <asm/zimage.h>
@@ -50,7 +51,8 @@ static unsigned long sh_check_cmd_arg(char *cmdline, char *key, int base)
 	return val;
 }
 
-int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *images)
+int do_bootm_linux(int flag, int argc, char *const argv[],
+		   bootm_headers_t *images)
 {
 	/* Linux kernel load address */
 	void (*kernel) (void) = (void (*)(void))images->ep;
diff --git a/arch/sh/lib/zimageboot.c b/arch/sh/lib/zimageboot.c
index 602776a474..c38f0933f8 100644
--- a/arch/sh/lib/zimageboot.c
+++ b/arch/sh/lib/zimageboot.c
@@ -10,11 +10,14 @@
  */
 
 #include <common.h>
+#include <command.h>
+#include <env.h>
 #include <irq_func.h>
 #include <asm/io.h>
 #include <asm/zimage.h>
 
-int do_sh_zimageboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_sh_zimageboot(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	ulong (*zboot_entry)(int, char * const []) = NULL;
 	char *s0, *s1;
diff --git a/arch/x86/include/asm/arch-braswell/fsp/fsp_vpd.h b/arch/x86/include/asm/arch-braswell/fsp/fsp_vpd.h
index a3bde3d8e7..f2260ae90e 100644
--- a/arch/x86/include/asm/arch-braswell/fsp/fsp_vpd.h
+++ b/arch/x86/include/asm/arch-braswell/fsp/fsp_vpd.h
@@ -7,6 +7,8 @@
 #ifndef __FSP_VPD_H__
 #define __FSP_VPD_H__
 
+#include <stddef.h>
+
 struct __packed memory_upd {
 	u64 signature;				/* Offset 0x0020 */
 	u8 revision;				/* Offset 0x0028 */
diff --git a/arch/x86/lib/bootm.c b/arch/x86/lib/bootm.c
index 0837655e12..1569d30f8e 100644
--- a/arch/x86/lib/bootm.c
+++ b/arch/x86/lib/bootm.c
@@ -206,8 +206,8 @@ static int boot_jump_linux(bootm_headers_t *images)
 				 images->os.arch == IH_ARCH_X86_64);
 }
 
-int do_bootm_linux(int flag, int argc, char * const argv[],
-		bootm_headers_t *images)
+int do_bootm_linux(int flag, int argc, char *const argv[],
+		   bootm_headers_t *images)
 {
 	/* No need for those on x86 */
 	if (flag & BOOTM_STATE_OS_BD_T || flag & BOOTM_STATE_OS_CMDLINE)
diff --git a/arch/x86/lib/cmd_boot.c b/arch/x86/lib/cmd_boot.c
index 9fce021c79..baaf3d13ad 100644
--- a/arch/x86/lib/cmd_boot.c
+++ b/arch/x86/lib/cmd_boot.c
@@ -22,7 +22,7 @@
 DECLARE_GLOBAL_DATA_PTR;
 
 unsigned long do_go_exec(ulong (*entry)(int, char * const []),
-			 int argc, char * const argv[])
+			 int argc, char *const argv[])
 {
 	unsigned long ret = 0;
 	char **argv_tmp;
diff --git a/arch/x86/lib/interrupts.c b/arch/x86/lib/interrupts.c
index b23b8fd402..40ba7fcfec 100644
--- a/arch/x86/lib/interrupts.c
+++ b/arch/x86/lib/interrupts.c
@@ -127,7 +127,7 @@ void do_irq(int hw_irq)
 #endif
 
 #if defined(CONFIG_CMD_IRQ)
-int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_irqinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 #if !CONFIG_IS_ENABLED(X86_64)
 	int irq;
diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c
index ffc09630b7..64d14e8911 100644
--- a/arch/x86/lib/zimage.c
+++ b/arch/x86/lib/zimage.c
@@ -13,6 +13,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <env.h>
 #include <irq_func.h>
 #include <malloc.h>
@@ -310,7 +311,7 @@ void __setup_pcat_compatibility(void)
 {
 }
 
-int do_zboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_zboot(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	struct boot_params *base_ptr;
 	void *bzImage_addr = NULL;
diff --git a/board/Arcturus/ucp1020/cmd_arc.c b/board/Arcturus/ucp1020/cmd_arc.c
index 2b4853f8f9..3656cf4cbc 100644
--- a/board/Arcturus/ucp1020/cmd_arc.c
+++ b/board/Arcturus/ucp1020/cmd_arc.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <div64.h>
 #include <env.h>
@@ -376,7 +377,8 @@ void get_arc_info(void)
 		do_get_arc_info();
 }
 
-static int do_arc_cmd(cmd_tbl_t * cmdtp, int flag, int argc, char *const argv[])
+static int do_arc_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	const char *cmd;
 	int ret = -1;
diff --git a/board/BuS/eb_cpu5282/eb_cpu5282.c b/board/BuS/eb_cpu5282/eb_cpu5282.c
index a667413bfc..1d05e40c20 100644
--- a/board/BuS/eb_cpu5282/eb_cpu5282.c
+++ b/board/BuS/eb_cpu5282/eb_cpu5282.c
@@ -226,7 +226,7 @@ int drv_video_init(void)
 /*---------------------------------------------------------------------------*/
 
 #ifdef CONFIG_VIDEO
-int do_brightness(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_brightness(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int rcode = 0;
 	ulong side;
diff --git a/board/LaCie/net2big_v2/net2big_v2.c b/board/LaCie/net2big_v2/net2big_v2.c
index 8b97e1a533..dbd8b5755d 100644
--- a/board/LaCie/net2big_v2/net2big_v2.c
+++ b/board/LaCie/net2big_v2/net2big_v2.c
@@ -246,7 +246,8 @@ void reset_phy(void)
 #if defined(CONFIG_KIRKWOOD_GPIO)
 /* Return GPIO push button status */
 static int
-do_read_push_button(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+do_read_push_button(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[])
 {
 	return !kw_gpio_get_value(NET2BIG_V2_GPIO_PUSH_BUTTON);
 }
diff --git a/board/LaCie/netspace_v2/netspace_v2.c b/board/LaCie/netspace_v2/netspace_v2.c
index f9bf527739..011cc563d1 100644
--- a/board/LaCie/netspace_v2/netspace_v2.c
+++ b/board/LaCie/netspace_v2/netspace_v2.c
@@ -110,7 +110,7 @@ void reset_phy(void)
 #if defined(CONFIG_KIRKWOOD_GPIO)
 /* Return GPIO button status */
 static int
-do_read_button(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+do_read_button(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	return kw_gpio_get_value(NETSPACE_V2_GPIO_BUTTON);
 }
diff --git a/board/Synology/ds414/cmd_syno.c b/board/Synology/ds414/cmd_syno.c
index bd6eefd773..a120c3123f 100644
--- a/board/Synology/ds414/cmd_syno.c
+++ b/board/Synology/ds414/cmd_syno.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <div64.h>
 #include <env.h>
 #include <net.h>
@@ -21,7 +22,7 @@
 #define SYNO_CHKSUM_TAG		"CHK="
 
 
-static int do_syno_populate(int argc, char * const argv[])
+static int do_syno_populate(int argc, char *const argv[])
 {
 	unsigned int bus = CONFIG_SF_DEFAULT_BUS;
 	unsigned int cs = CONFIG_SF_DEFAULT_CS;
@@ -152,7 +153,7 @@ static const char * const pwr_mng_bit_func[] = {
 	NULL,
 };
 
-static int do_syno_clk_gate(int argc, char * const argv[])
+static int do_syno_clk_gate(int argc, char *const argv[])
 {
 	u32 pwr_mng_ctrl_reg = reg_read(POWER_MNG_CTRL_REG);
 	const char *func, *state;
@@ -195,8 +196,8 @@ static int do_syno_clk_gate(int argc, char * const argv[])
 	return 0;
 }
 
-static int do_syno(cmd_tbl_t *cmdtp, int flag,
-                   int argc, char * const argv[])
+static int do_syno(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	const char *cmd;
 	int ret = 0;
diff --git a/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c b/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c
index 772e21b9c5..6168dc9220 100644
--- a/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c
+++ b/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <env.h>
 #include <errno.h>
 #include <init.h>
 #include <linux/libfdt.h>
diff --git a/board/amlogic/sei510/sei510.c b/board/amlogic/sei510/sei510.c
index 70fe3559f6..5a5148ea68 100644
--- a/board/amlogic/sei510/sei510.c
+++ b/board/amlogic/sei510/sei510.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <env.h>
 #include <env_internal.h>
 #include <init.h>
 #include <net.h>
diff --git a/board/amlogic/sei610/sei610.c b/board/amlogic/sei610/sei610.c
index 3c44fba516..27dba93582 100644
--- a/board/amlogic/sei610/sei610.c
+++ b/board/amlogic/sei610/sei610.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <env.h>
 #include <env_internal.h>
 #include <init.h>
 #include <net.h>
diff --git a/board/aristainetos/aristainetos.c b/board/aristainetos/aristainetos.c
index 3a59b51c1c..14931120f6 100644
--- a/board/aristainetos/aristainetos.c
+++ b/board/aristainetos/aristainetos.c
@@ -9,6 +9,7 @@
  * Author: Fabio Estevam <fabio.estevam@freescale.com>
  */
 
+#include <command.h>
 #include <image.h>
 #include <init.h>
 #include <asm/arch/clock.h>
diff --git a/board/bosch/guardian/board.c b/board/bosch/guardian/board.c
index b8dbe8ac53..1d8fa78154 100644
--- a/board/bosch/guardian/board.c
+++ b/board/bosch/guardian/board.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <cpsw.h>
 #include <dm.h>
+#include <env.h>
 #include <env_internal.h>
 #include <errno.h>
 #include <i2c.h>
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c
index 8e29fd0095..92a7a2fc6e 100644
--- a/board/boundary/nitrogen6x/nitrogen6x.c
+++ b/board/boundary/nitrogen6x/nitrogen6x.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <env.h>
 #include <init.h>
 #include <net.h>
@@ -988,7 +989,7 @@ static int read_keys(char *buf)
 	return numpressed;
 }
 
-static int do_kbd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_kbd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	char envvalue[ARRAY_SIZE(buttons)+1];
 	int numpressed = read_keys(envvalue);
diff --git a/board/buffalo/lsxl/lsxl.c b/board/buffalo/lsxl/lsxl.c
index 6afb6bbdb5..712ef11666 100644
--- a/board/buffalo/lsxl/lsxl.c
+++ b/board/buffalo/lsxl/lsxl.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <bootstage.h>
+#include <command.h>
 #include <env.h>
 #include <env_internal.h>
 #include <flash.h>
diff --git a/board/cavium/thunderx/atf.c b/board/cavium/thunderx/atf.c
index ea2f2bade0..f01ead4e23 100644
--- a/board/cavium/thunderx/atf.c
+++ b/board/cavium/thunderx/atf.c
@@ -4,6 +4,7 @@
 **/
 
 #include <common.h>
+#include <command.h>
 #include <asm/cache.h>
 #include <asm/io.h>
 
@@ -224,7 +225,7 @@ static void atf_print_part_table(void)
 	}
 }
 
-int do_atf(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_atf(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	ssize_t ret;
 	size_t size, offset;
diff --git a/board/corscience/tricorder/tricorder-eeprom.c b/board/corscience/tricorder/tricorder-eeprom.c
index 23c2ea9186..192af304d9 100644
--- a/board/corscience/tricorder/tricorder-eeprom.c
+++ b/board/corscience/tricorder/tricorder-eeprom.c
@@ -5,6 +5,7 @@
  * Andreas Bie?mann <andreas.biessmann@corscience.de>
  */
 #include <common.h>
+#include <command.h>
 #include <eeprom.h>
 #include <i2c.h>
 #include <u-boot/crc.h>
@@ -186,7 +187,7 @@ int tricorder_eeprom_write(unsigned devaddr, const char *name,
 	return ret;
 }
 
-int do_tricorder_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_tricorder_eeprom(struct cmd_tbl *cmdtp, int flag, int argc, char *argv[])
 {
 	if (argc == 3) {
 		ulong dev_addr = simple_strtoul(argv[2], NULL, 16);
diff --git a/board/egnite/ethernut5/ethernut5_pwrman.c b/board/egnite/ethernut5/ethernut5_pwrman.c
index aa99d29c21..7dbb6e8f2b 100644
--- a/board/egnite/ethernut5/ethernut5_pwrman.c
+++ b/board/egnite/ethernut5/ethernut5_pwrman.c
@@ -32,6 +32,7 @@
  * http://www.ethernut.de/
  */
 #include <common.h>
+#include <command.h>
 #include <asm/arch/at91sam9260.h>
 #include <asm/arch/at91_common.h>
 #include <asm/arch/gpio.h>
@@ -215,7 +216,7 @@ void ethernut5_print_voltage(void)
 /*
  * Process the board specific 'pwrman' command.
  */
-int do_pwrman(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_pwrman(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	u8 val;
 	int i;
diff --git a/board/esd/vme8349/caddy.c b/board/esd/vme8349/caddy.c
index db8d7bfe9b..ba91f4b3c8 100644
--- a/board/esd/vme8349/caddy.c
+++ b/board/esd/vme8349/caddy.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <console.h>
 #include <ioports.h>
 #include <mpc83xx.h>
@@ -36,7 +37,7 @@ void generate_answer(struct caddy_cmd *cmd, uint32_t status, uint32_t *result)
 		caddy_interface->answer_in = ptr;
 }
 
-int do_caddy(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_caddy(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	unsigned long base_addr;
 	uint32_t ptr;
diff --git a/board/freescale/c29xpcie/cpld.c b/board/freescale/c29xpcie/cpld.c
index f57047d1d3..b864a60c44 100644
--- a/board/freescale/c29xpcie/cpld.c
+++ b/board/freescale/c29xpcie/cpld.c
@@ -89,7 +89,7 @@ static void cpld_dump_regs(void)
 #endif
 
 #ifndef CONFIG_SPL_BUILD
-int cpld_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int cpld_cmd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int rc = 0;
 	unsigned char value;
diff --git a/board/freescale/common/cmd_esbc_validate.c b/board/freescale/common/cmd_esbc_validate.c
index 36b620ca23..638aa3c19a 100644
--- a/board/freescale/common/cmd_esbc_validate.c
+++ b/board/freescale/common/cmd_esbc_validate.c
@@ -8,8 +8,8 @@
 #include <env.h>
 #include <fsl_validate.h>
 
-int do_esbc_halt(cmd_tbl_t *cmdtp, int flag, int argc,
-				char * const argv[])
+int do_esbc_halt(struct cmd_tbl *cmdtp, int flag, int argc,
+		 char *const argv[])
 {
 	if (fsl_check_boot_mode_secure() == 0) {
 		printf("Boot Mode is Non-Secure. Not entering spin loop.\n");
@@ -24,8 +24,8 @@ loop:
 }
 
 #ifndef CONFIG_SPL_BUILD
-static int do_esbc_validate(cmd_tbl_t *cmdtp, int flag, int argc,
-				char * const argv[])
+static int do_esbc_validate(struct cmd_tbl *cmdtp, int flag, int argc,
+			    char *const argv[])
 {
 	char *hash_str = NULL;
 	uintptr_t haddr;
diff --git a/board/freescale/common/ngpixis.c b/board/freescale/common/ngpixis.c
index d7254010bf..37a6f775a0 100644
--- a/board/freescale/common/ngpixis.c
+++ b/board/freescale/common/ngpixis.c
@@ -171,7 +171,8 @@ void pixis_sysclk_set(unsigned long sysclk)
 	PIXIS_WRITE(sclk[2], sclk2);
 }
 
-int pixis_reset_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int pixis_reset_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[])
 {
 	unsigned int i;
 	unsigned long sysclk;
diff --git a/board/freescale/common/pixis.c b/board/freescale/common/pixis.c
index e9b7127833..4127fbc139 100644
--- a/board/freescale/common/pixis.c
+++ b/board/freescale/common/pixis.c
@@ -266,8 +266,8 @@ static void set_px_go_with_watchdog(void)
 /* Disable the watchdog
  *
  */
-static int pixis_disable_watchdog_cmd(cmd_tbl_t *cmdtp, int flag, int argc,
-				      char * const argv[])
+static int pixis_disable_watchdog_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
+				      char *const argv[])
 {
 	/* Disable the VELA sequencer and the watchdog */
 	clrbits_8(pixis_base + PIXIS_VCTL, 9);
@@ -285,7 +285,8 @@ U_BOOT_CMD(
 
 /* Enable or disable SGMII mode for a TSEC
  */
-static int pixis_set_sgmii(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int pixis_set_sgmii(struct cmd_tbl *cmdtp, int flag, int argc,
+			   char *const argv[])
 {
 	int which_tsec = -1;
 	unsigned char mask;
@@ -411,7 +412,8 @@ static unsigned long strfractoint(char *strptr)
 	return intval + decval;
 }
 
-static int pixis_reset_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int pixis_reset_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
+			   char *const argv[])
 {
 	unsigned int i;
 	char *p_cf = NULL;
diff --git a/board/freescale/common/qixis.c b/board/freescale/common/qixis.c
index dd1ee90b3c..591203132f 100644
--- a/board/freescale/common/qixis.c
+++ b/board/freescale/common/qixis.c
@@ -233,7 +233,8 @@ void __weak qixis_dump_switch(void)
 	puts("Reverse engineering switch is not implemented for this board\n");
 }
 
-static int qixis_reset_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int qixis_reset_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
+			   char *const argv[])
 {
 	int i;
 
diff --git a/board/freescale/common/sys_eeprom.c b/board/freescale/common/sys_eeprom.c
index 71af645b03..b3421052a5 100644
--- a/board/freescale/common/sys_eeprom.c
+++ b/board/freescale/common/sys_eeprom.c
@@ -383,7 +383,7 @@ static void set_mac_address(unsigned int index, const char *string)
 	update_crc();
 }
 
-int do_mac(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_mac(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	char cmd;
 
diff --git a/board/freescale/common/vid.c b/board/freescale/common/vid.c
index 20852476dd..dfc6a91d1a 100644
--- a/board/freescale/common/vid.c
+++ b/board/freescale/common/vid.c
@@ -925,9 +925,9 @@ exit:
 
 }
 
-static int do_vdd_override(cmd_tbl_t *cmdtp,
+static int do_vdd_override(struct cmd_tbl *cmdtp,
 			   int flag, int argc,
-			   char * const argv[])
+			   char *const argv[])
 {
 	ulong override;
 
@@ -941,9 +941,8 @@ static int do_vdd_override(cmd_tbl_t *cmdtp,
 	return 0;
 }
 
-static int do_vdd_read(cmd_tbl_t *cmdtp,
-			 int flag, int argc,
-			 char * const argv[])
+static int do_vdd_read(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	if (argc < 1)
 		return CMD_RET_USAGE;
diff --git a/board/freescale/imx8mm_evk/imx8mm_evk.c b/board/freescale/imx8mm_evk/imx8mm_evk.c
index 1f95f3b0c4..c43af9bc48 100644
--- a/board/freescale/imx8mm_evk/imx8mm_evk.c
+++ b/board/freescale/imx8mm_evk/imx8mm_evk.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <init.h>
 #include <miiphy.h>
 #include <netdev.h>
diff --git a/board/freescale/imx8mm_evk/spl.c b/board/freescale/imx8mm_evk/spl.c
index 3abf6be482..42b637be5c 100644
--- a/board/freescale/imx8mm_evk/spl.c
+++ b/board/freescale/imx8mm_evk/spl.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <hang.h>
 #include <image.h>
diff --git a/board/freescale/imx8mn_evk/imx8mn_evk.c b/board/freescale/imx8mn_evk/imx8mn_evk.c
index 8bd54ea2aa..ea02bb75f4 100644
--- a/board/freescale/imx8mn_evk/imx8mn_evk.c
+++ b/board/freescale/imx8mn_evk/imx8mn_evk.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <init.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/imx8mn_evk/spl.c b/board/freescale/imx8mn_evk/spl.c
index fae1f0c9c7..486863e367 100644
--- a/board/freescale/imx8mn_evk/spl.c
+++ b/board/freescale/imx8mn_evk/spl.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <hang.h>
 #include <image.h>
diff --git a/board/freescale/imx8mp_evk/imx8mp_evk.c b/board/freescale/imx8mp_evk/imx8mp_evk.c
index aa5100f5bf..97ba15645a 100644
--- a/board/freescale/imx8mp_evk/imx8mp_evk.c
+++ b/board/freescale/imx8mp_evk/imx8mp_evk.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <errno.h>
 #include <init.h>
 #include <asm/mach-imx/iomux-v3.h>
diff --git a/board/freescale/imx8mp_evk/spl.c b/board/freescale/imx8mp_evk/spl.c
index e84e470ac2..e03c2c1118 100644
--- a/board/freescale/imx8mp_evk/spl.c
+++ b/board/freescale/imx8mp_evk/spl.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <hang.h>
 #include <image.h>
diff --git a/board/freescale/imxrt1020-evk/imxrt1020-evk.c b/board/freescale/imxrt1020-evk/imxrt1020-evk.c
index 06ad524d5d..08f6ca9c52 100644
--- a/board/freescale/imxrt1020-evk/imxrt1020-evk.c
+++ b/board/freescale/imxrt1020-evk/imxrt1020-evk.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <init.h>
 #include <ram.h>
 #include <spl.h>
 #include <asm/io.h>
diff --git a/board/freescale/ls1012ardb/ls1012ardb.c b/board/freescale/ls1012ardb/ls1012ardb.c
index fc929c441c..5b814f7abf 100644
--- a/board/freescale/ls1012ardb/ls1012ardb.c
+++ b/board/freescale/ls1012ardb/ls1012ardb.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <fdt_support.h>
 #include <hang.h>
 #include <i2c.h>
@@ -394,8 +395,8 @@ static int convert_flash_bank(int bank)
 	return ret;
 }
 
-static int flash_bank_cmd(cmd_tbl_t *cmdtp, int flag, int argc,
-			  char * const argv[])
+static int flash_bank_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	if (argc != 2)
 		return CMD_RET_USAGE;
diff --git a/board/freescale/ls1021atwr/ls1021atwr.c b/board/freescale/ls1021atwr/ls1021atwr.c
index acf146de4d..c7f7baa8e6 100644
--- a/board/freescale/ls1021atwr/ls1021atwr.c
+++ b/board/freescale/ls1021atwr/ls1021atwr.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <command.h>
 #include <fdt_support.h>
 #include <i2c.h>
 #include <init.h>
@@ -612,8 +613,8 @@ static void convert_flash_bank(char bank)
 	cpld_data->system_rst = CONFIG_RESET;
 }
 
-static int flash_bank_cmd(cmd_tbl_t *cmdtp, int flag, int argc,
-			  char * const argv[])
+static int flash_bank_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	if (argc != 2)
 		return CMD_RET_USAGE;
@@ -633,8 +634,8 @@ U_BOOT_CMD(
 	"bank[0-upper bank/1-lower bank] (e.g. boot_bank 0)"
 );
 
-static int cpld_reset_cmd(cmd_tbl_t *cmdtp, int flag, int argc,
-			  char * const argv[])
+static int cpld_reset_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	struct cpld_data *cpld_data = (void *)(CONFIG_SYS_CPLD_BASE);
 
@@ -692,8 +693,8 @@ static void print_serdes_mux(void)
 		printf("B.\n");
 }
 
-static int serdes_mux_cmd(cmd_tbl_t *cmdtp, int flag, int argc,
-			  char * const argv[])
+static int serdes_mux_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	if (argc != 2)
 		return CMD_RET_USAGE;
diff --git a/board/freescale/ls1043ardb/cpld.c b/board/freescale/ls1043ardb/cpld.c
index 00c70b1e49..5d2e8015a0 100644
--- a/board/freescale/ls1043ardb/cpld.c
+++ b/board/freescale/ls1043ardb/cpld.c
@@ -133,7 +133,7 @@ void cpld_rev_bit(unsigned char *value)
 	*value = rev_val;
 }
 
-int do_cpld(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_cpld(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int rc = 0;
 
diff --git a/board/freescale/ls1046ardb/cpld.c b/board/freescale/ls1046ardb/cpld.c
index a65751986a..548601a5ae 100644
--- a/board/freescale/ls1046ardb/cpld.c
+++ b/board/freescale/ls1046ardb/cpld.c
@@ -129,7 +129,7 @@ void cpld_rev_bit(unsigned char *value)
 	*value = rev_val;
 }
 
-int do_cpld(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_cpld(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int rc = 0;
 
diff --git a/board/freescale/p1010rdb/p1010rdb.c b/board/freescale/p1010rdb/p1010rdb.c
index 1adc898441..66ccc0bd1e 100644
--- a/board/freescale/p1010rdb/p1010rdb.c
+++ b/board/freescale/p1010rdb/p1010rdb.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <image.h>
 #include <init.h>
 #include <net.h>
@@ -708,8 +709,8 @@ int misc_init_r(void)
 }
 
 #ifndef CONFIG_SPL_BUILD
-static int pin_mux_cmd(cmd_tbl_t *cmdtp, int flag, int argc,
-				char * const argv[])
+static int pin_mux_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	if (argc < 2)
 		return CMD_RET_USAGE;
diff --git a/board/freescale/p2041rdb/cpld.c b/board/freescale/p2041rdb/cpld.c
index 3037ef89f1..b042fe3bcb 100644
--- a/board/freescale/p2041rdb/cpld.c
+++ b/board/freescale/p2041rdb/cpld.c
@@ -87,7 +87,7 @@ static void cpld_dump_regs(void)
 }
 #endif
 
-int cpld_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int cpld_cmd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int rc = 0;
 
diff --git a/board/freescale/t102xrdb/cpld.c b/board/freescale/t102xrdb/cpld.c
index 2b640e0450..47c3b1627e 100644
--- a/board/freescale/t102xrdb/cpld.c
+++ b/board/freescale/t102xrdb/cpld.c
@@ -72,7 +72,7 @@ static void cpld_dump_regs(void)
 	putc('\n');
 }
 
-int do_cpld(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_cpld(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int rc = 0;
 
diff --git a/board/freescale/t102xrdb/t102xrdb.c b/board/freescale/t102xrdb/t102xrdb.c
index 983c723a10..754fcb0ad5 100644
--- a/board/freescale/t102xrdb/t102xrdb.c
+++ b/board/freescale/t102xrdb/t102xrdb.c
@@ -368,8 +368,8 @@ static u32 t1023rdb_ctrl(u32 ctrl_type)
 	return 0;
 }
 
-static int switch_cmd(cmd_tbl_t *cmdtp, int flag, int argc,
-		    char * const argv[])
+static int switch_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	if (argc < 2)
 		return CMD_RET_USAGE;
diff --git a/board/freescale/t104xrdb/cpld.c b/board/freescale/t104xrdb/cpld.c
index f9c8ab3752..ac34095f3b 100644
--- a/board/freescale/t104xrdb/cpld.c
+++ b/board/freescale/t104xrdb/cpld.c
@@ -82,7 +82,7 @@ static void cpld_dump_regs(void)
 }
 #endif
 
-int do_cpld(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_cpld(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int rc = 0;
 
diff --git a/board/freescale/t208xrdb/cpld.c b/board/freescale/t208xrdb/cpld.c
index 9a9b9d8e77..b9ba62adff 100644
--- a/board/freescale/t208xrdb/cpld.c
+++ b/board/freescale/t208xrdb/cpld.c
@@ -43,7 +43,7 @@ void cpld_set_defbank(void)
 	CPLD_WRITE(reset_ctl, CPLD_LBMAP_RESET);
 }
 
-int do_cpld(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_cpld(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int rc = 0;
 
diff --git a/board/freescale/t4qds/t4240qds.c b/board/freescale/t4qds/t4240qds.c
index 0b00ec6e29..08ecf9a636 100644
--- a/board/freescale/t4qds/t4240qds.c
+++ b/board/freescale/t4qds/t4240qds.c
@@ -902,9 +902,9 @@ void qixis_dump_switch(void)
 	}
 }
 
-static int do_vdd_adjust(cmd_tbl_t *cmdtp,
+static int do_vdd_adjust(struct cmd_tbl *cmdtp,
 			 int flag, int argc,
-			 char * const argv[])
+			 char *const argv[])
 {
 	ulong override;
 
diff --git a/board/freescale/t4rdb/cpld.c b/board/freescale/t4rdb/cpld.c
index 470b5f9154..d484509bc2 100644
--- a/board/freescale/t4rdb/cpld.c
+++ b/board/freescale/t4rdb/cpld.c
@@ -95,7 +95,7 @@ static void cpld_dump_regs(void)
 #endif
 
 #ifndef CONFIG_SPL_BUILD
-int do_cpld(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_cpld(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int rc = 0;
 
diff --git a/board/gardena/smart-gateway-mt7688/board.c b/board/gardena/smart-gateway-mt7688/board.c
index 89844ee69e..768e7acc35 100644
--- a/board/gardena/smart-gateway-mt7688/board.c
+++ b/board/gardena/smart-gateway-mt7688/board.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <env.h>
 #include <env_internal.h>
 #include <flash.h>
@@ -206,7 +207,7 @@ static void copy_or_generate_uuid(char *fd_ptr, const char *env_var_name)
  * Helper function to provide some sane factory-data values for testing
  * purpose, when these values are not programmed correctly
  */
-int do_fd_write(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_fd_write(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	struct factory_data_values *fd;
 	struct spi_flash *sf;
diff --git a/board/gateworks/gw_ventana/eeprom.c b/board/gateworks/gw_ventana/eeprom.c
index 5e9cf11575..a833657b15 100644
--- a/board/gateworks/gw_ventana/eeprom.c
+++ b/board/gateworks/gw_ventana/eeprom.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <errno.h>
 #include <hexdump.h>
 #include <i2c.h>
@@ -158,7 +159,8 @@ static struct ventana_eeprom_config *get_config(const char *name)
 static u8 econfig_bytes[sizeof(ventana_info.config)];
 static int econfig_init = -1;
 
-static int do_econfig(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_econfig(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	struct ventana_eeprom_config *cfg;
 	struct ventana_board_info *info = &ventana_info;
diff --git a/board/gateworks/gw_ventana/gsc.c b/board/gateworks/gw_ventana/gsc.c
index 068f8cd9e7..6d9565ccfe 100644
--- a/board/gateworks/gw_ventana/gsc.c
+++ b/board/gateworks/gw_ventana/gsc.c
@@ -5,6 +5,7 @@
  * Author: Tim Harvey <tharvey@gateworks.com>
  */
 
+#include <command.h>
 #include <linux/errno.h>
 #include <common.h>
 #include <i2c.h>
@@ -176,8 +177,8 @@ int gsc_boot_wd_disable(void)
 }
 
 #if defined(CONFIG_CMD_GSC) && !defined(CONFIG_SPL_BUILD)
-static int do_gsc_sleep(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_gsc_sleep(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	unsigned char reg;
 	unsigned long secs = 0;
@@ -218,7 +219,8 @@ error:
 	return CMD_RET_FAILURE;
 }
 
-static int do_gsc_wd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_gsc_wd(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	unsigned char reg;
 
@@ -257,7 +259,7 @@ static int do_gsc_wd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return CMD_RET_SUCCESS;
 }
 
-static int do_gsc(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_gsc(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	if (argc < 2)
 		return gsc_info(1);
diff --git a/board/gdsys/a38x/controlcenterdc.c b/board/gdsys/a38x/controlcenterdc.c
index 7aad683127..0d53d69ecc 100644
--- a/board/gdsys/a38x/controlcenterdc.c
+++ b/board/gdsys/a38x/controlcenterdc.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <dm.h>
 #include <init.h>
 #include <miiphy.h>
diff --git a/board/gdsys/a38x/hydra.c b/board/gdsys/a38x/hydra.c
index fa50ad2830..daade6da0a 100644
--- a/board/gdsys/a38x/hydra.c
+++ b/board/gdsys/a38x/hydra.c
@@ -1,4 +1,5 @@
 #include <common.h>
+#include <command.h>
 #include <console.h> /* ctrlc */
 #include <asm/io.h>
 
@@ -89,7 +90,7 @@ void hydra_initialize(void)
 #define REFL_PATTERN (0xdededede)
 #define REFL_PATTERN_INV (~REFL_PATTERN)
 
-int do_hydrate(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_hydrate(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	uint k = 0;
 	void __iomem *pcie2_base = (void __iomem *)(MVEBU_REG_PCIE_BASE +
diff --git a/board/gdsys/common/cmd_ioloop.c b/board/gdsys/common/cmd_ioloop.c
index 05a14ff103..88ab8233d5 100644
--- a/board/gdsys/common/cmd_ioloop.c
+++ b/board/gdsys/common/cmd_ioloop.c
@@ -264,7 +264,7 @@ static void io_reflect(struct udevice *dev)
  * Syntax:
  *	ioreflect {fpga} {reportrate}
  */
-int do_ioreflect(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_ioreflect(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	uint fpga;
 	uint rate = 0;
@@ -321,7 +321,7 @@ int do_ioreflect(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
  * Syntax:
  *	ioreflect {reportrate}
  */
-int do_ioreflect(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_ioreflect(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	struct udevice *fpga;
 	struct regmap *map;
@@ -374,7 +374,7 @@ int do_ioreflect(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
  * Syntax:
  *	ioloop {fpga} {size} {rate}
  */
-int do_ioloop(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_ioloop(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	uint fpga;
 	uint size;
@@ -440,7 +440,7 @@ int do_ioloop(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
  * Syntax:
  *	ioloop {size} {rate}
  */
-int do_ioloop(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_ioloop(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	uint size;
 	uint rate = 0;
@@ -501,7 +501,7 @@ int do_ioloop(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 #endif /* CONFIG_GDSYS_LEGACY_DRIVERS */
 
 #ifndef CONFIG_GDSYS_LEGACY_DRIVERS
-int do_iodev(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_iodev(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	struct udevice *ioep = NULL;
 	struct udevice *board;
diff --git a/board/gdsys/common/osd.c b/board/gdsys/common/osd.c
index 10c4329146..cda0cc6b48 100644
--- a/board/gdsys/common/osd.c
+++ b/board/gdsys/common/osd.c
@@ -7,6 +7,7 @@
 #ifdef CONFIG_GDSYS_LEGACY_DRIVERS
 
 #include <common.h>
+#include <command.h>
 #include <i2c.h>
 #include <malloc.h>
 
@@ -259,7 +260,8 @@ static int osd_write_videomem(unsigned screen, unsigned offset,
 	return charcount;
 }
 
-static int osd_print(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int osd_print(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	unsigned screen;
 
@@ -396,7 +398,7 @@ int osd_probe(unsigned screen)
 	return 0;
 }
 
-int osd_write(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int osd_write(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	unsigned screen;
 
@@ -449,7 +451,7 @@ int osd_write(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return 0;
 }
 
-int osd_size(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int osd_size(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	unsigned screen;
 	unsigned x;
@@ -500,4 +502,4 @@ U_BOOT_CMD(
 	") size_y(max. " __stringify(MAX_Y_CHARS) ")\n"
 );
 
-#endif /* CONFIG_GDSYS_LEGACY_DRIVERS */
\ No newline at end of file
+#endif /* CONFIG_GDSYS_LEGACY_DRIVERS */
diff --git a/board/gdsys/common/osd_cmd.c b/board/gdsys/common/osd_cmd.c
index 53179b9811..fe6249794e 100644
--- a/board/gdsys/common/osd_cmd.c
+++ b/board/gdsys/common/osd_cmd.c
@@ -10,13 +10,14 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <dm.h>
 #include <hexdump.h>
 #include <video_osd.h>
 #include <malloc.h>
 
-static int do_osd_write(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_osd_write(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	struct udevice *dev;
 	uint x, y;
@@ -68,8 +69,8 @@ static int do_osd_write(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_SUCCESS;
 }
 
-static int do_osd_print(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_osd_print(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	struct udevice *dev;
 	uint x, y;
@@ -99,8 +100,8 @@ static int do_osd_print(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_SUCCESS;
 }
 
-static int do_osd_size(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_osd_size(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	struct udevice *dev;
 	uint x, y;
diff --git a/board/gdsys/mpc8308/gazerbeam.c b/board/gdsys/mpc8308/gazerbeam.c
index 8c9636d292..b64a6d992d 100644
--- a/board/gdsys/mpc8308/gazerbeam.c
+++ b/board/gdsys/mpc8308/gazerbeam.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <board.h>
+#include <command.h>
 #include <dm.h>
 #include <env.h>
 #include <fdt_support.h>
diff --git a/board/gdsys/p1022/controlcenterd.c b/board/gdsys/p1022/controlcenterd.c
index b39b0b6002..e960fa71ac 100644
--- a/board/gdsys/p1022/controlcenterd.c
+++ b/board/gdsys/p1022/controlcenterd.c
@@ -223,7 +223,7 @@ void hw_watchdog_reset(void)
 }
 
 #ifdef CONFIG_TRAILBLAZER
-int do_bootd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bootd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	return run_command(env_get("bootcmd"), flag);
 }
diff --git a/board/google/chromebook_coral/coral.c b/board/google/chromebook_coral/coral.c
index 4e34710b97..12d4fe63cb 100644
--- a/board/google/chromebook_coral/coral.c
+++ b/board/google/chromebook_coral/coral.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 
 int arch_misc_init(void)
 {
diff --git a/board/keymile/common/common.c b/board/keymile/common/common.c
index 08f7f8d884..f592eba9e5 100644
--- a/board/keymile/common/common.c
+++ b/board/keymile/common/common.c
@@ -157,8 +157,8 @@ int board_eth_init(bd_t *bis)
  * read out the board id and the hw key from the intventory EEPROM and set
  * this values as environment variables.
  */
-static int do_setboardid(cmd_tbl_t *cmdtp, int flag, int argc,
-				char *const argv[])
+static int do_setboardid(struct cmd_tbl *cmdtp, int flag, int argc,
+			 char *const argv[])
 {
 	unsigned char buf[32];
 	char *p;
@@ -203,8 +203,8 @@ U_BOOT_CMD(km_setboardid, 1, 0, do_setboardid, "setboardid", "read out bid and "
  *				application and in the init scripts (?)
  *	return 0 in case of match, 1 if not match or error
  */
-static int do_checkboardidhwk(cmd_tbl_t *cmdtp, int flag, int argc,
-			char *const argv[])
+static int do_checkboardidhwk(struct cmd_tbl *cmdtp, int flag, int argc,
+			      char *const argv[])
 {
 	unsigned long ivmbid = 0, ivmhwkey = 0;
 	unsigned long envbid = 0, envhwkey = 0;
@@ -344,8 +344,8 @@ U_BOOT_CMD(km_checkbidhwk, 2, 0, do_checkboardidhwk,
  *  if the testpin of the board is asserted, return 1
  *  *	else return 0
  */
-static int do_checktestboot(cmd_tbl_t *cmdtp, int flag, int argc,
-			char *const argv[])
+static int do_checktestboot(struct cmd_tbl *cmdtp, int flag, int argc,
+			    char *const argv[])
 {
 	int testpin = 0;
 	char *s = NULL;
diff --git a/board/mediatek/mt7622/mt7622_rfb.c b/board/mediatek/mt7622/mt7622_rfb.c
index 912b993240..6a5f936635 100644
--- a/board/mediatek/mt7622/mt7622_rfb.c
+++ b/board/mediatek/mt7622/mt7622_rfb.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <config.h>
+#include <env.h>
 #include <init.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/phytium/durian/durian.c b/board/phytium/durian/durian.c
index 7dceebdeae..414360fe47 100644
--- a/board/phytium/durian/durian.c
+++ b/board/phytium/durian/durian.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <init.h>
 #include <asm/armv8/mmu.h>
diff --git a/board/renesas/sh7752evb/sh7752evb.c b/board/renesas/sh7752evb/sh7752evb.c
index 565ce5f5d1..c6e0c12976 100644
--- a/board/renesas/sh7752evb/sh7752evb.c
+++ b/board/renesas/sh7752evb/sh7752evb.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <env.h>
 #include <flash.h>
 #include <init.h>
@@ -245,7 +246,7 @@ int board_late_init(void)
 }
 
 #ifdef CONFIG_DEPRECATED
-int do_write_mac(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_write_mac(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int i, ret;
 	char mac_string[256];
diff --git a/board/renesas/sh7753evb/sh7753evb.c b/board/renesas/sh7753evb/sh7753evb.c
index 0a762bc553..cdeacb8aae 100644
--- a/board/renesas/sh7753evb/sh7753evb.c
+++ b/board/renesas/sh7753evb/sh7753evb.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <env.h>
 #include <flash.h>
 #include <init.h>
@@ -261,7 +262,7 @@ int board_late_init(void)
 }
 
 #ifdef CONFIG_DEPRECATED
-int do_write_mac(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_write_mac(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int i, ret;
 	char mac_string[256];
diff --git a/board/renesas/sh7757lcr/sh7757lcr.c b/board/renesas/sh7757lcr/sh7757lcr.c
index eef5d36fd5..5e76b9e7b4 100644
--- a/board/renesas/sh7757lcr/sh7757lcr.c
+++ b/board/renesas/sh7757lcr/sh7757lcr.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <env.h>
 #include <flash.h>
 #include <init.h>
@@ -344,7 +345,7 @@ int board_late_init(void)
 	return 0;
 }
 
-int do_sh_g200(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_sh_g200(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	struct gctrl_regs *gctrl = GCTRL_BASE;
 	unsigned long graofst;
@@ -363,7 +364,7 @@ U_BOOT_CMD(
 );
 
 #ifdef CONFIG_DEPRECATED
-int do_write_mac(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_write_mac(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int i, ret;
 	char mac_string[256];
diff --git a/board/renesas/stout/cpld.c b/board/renesas/stout/cpld.c
index e6c2051bd4..b56ed1703f 100644
--- a/board/renesas/stout/cpld.c
+++ b/board/renesas/stout/cpld.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
@@ -124,7 +125,8 @@ void cpld_init(void)
 #endif
 }
 
-static int do_cpld(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_cpld(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	u32 addr, val;
 
diff --git a/board/renesas/ulcb/cpld.c b/board/renesas/ulcb/cpld.c
index 528675651d..a20a34a92a 100644
--- a/board/renesas/ulcb/cpld.c
+++ b/board/renesas/ulcb/cpld.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <dm.h>
@@ -82,7 +83,8 @@ static void cpld_write(struct udevice *dev, u8 addr, u32 data)
 	dm_gpio_set_value(&priv->sstbz, 1);
 }
 
-static int do_cpld(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_cpld(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	struct udevice *dev;
 	u32 addr, val;
diff --git a/board/rockchip/kylin_rk3036/kylin_rk3036.c b/board/rockchip/kylin_rk3036/kylin_rk3036.c
index c5e28df258..0ca91cdeb0 100644
--- a/board/rockchip/kylin_rk3036/kylin_rk3036.c
+++ b/board/rockchip/kylin_rk3036/kylin_rk3036.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <env.h>
 #include <init.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/uart.h>
diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c
index 948007c4a8..c54de9fc12 100644
--- a/board/samsung/common/board.c
+++ b/board/samsung/common/board.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <cros_ec.h>
+#include <env.h>
 #include <errno.h>
 #include <fdtdec.h>
 #include <hang.h>
diff --git a/board/samsung/common/misc.c b/board/samsung/common/misc.c
index 9117669f71..146843d348 100644
--- a/board/samsung/common/misc.c
+++ b/board/samsung/common/misc.c
@@ -262,7 +262,7 @@ static int mode_leave_menu(int mode)
 	char *exit_option;
 	char *exit_reset = "reset";
 	char *exit_back = "back";
-	cmd_tbl_t *cmd;
+	struct cmd_tbl *cmd;
 	int cmd_result;
 	int leave;
 
diff --git a/board/siemens/capricorn/board.c b/board/siemens/capricorn/board.c
index b4eae7f027..ef6630f4f0 100644
--- a/board/siemens/capricorn/board.c
+++ b/board/siemens/capricorn/board.c
@@ -6,7 +6,9 @@
  *
  */
 #include <common.h>
+#include <command.h>
 #include <dm.h>
+#include <env.h>
 #include <errno.h>
 #include <init.h>
 #include <netdev.h>
@@ -411,7 +413,7 @@ unsigned char get_button_state(char * const envname, unsigned char def)
  *		0 if button is not held down
  */
 static int
-do_userbutton(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+do_userbutton(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int button = 0;
 
@@ -432,7 +434,7 @@ U_BOOT_CMD(
 #define ERST	IMX_GPIO_NR(0, 3)
 
 static int
-do_eth_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+do_eth_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	gpio_request(ERST, "ERST");
 	gpio_direction_output(ERST, 0);
diff --git a/board/siemens/common/board.c b/board/siemens/common/board.c
index f1bca4b27f..e0bd8590bc 100644
--- a/board/siemens/common/board.c
+++ b/board/siemens/common/board.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <env.h>
 #include <errno.h>
 #include <init.h>
@@ -151,7 +152,7 @@ unsigned char get_button_state(char * const envname, unsigned char def)
  *		0 if button is not held down
  */
 static int
-do_userbutton(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+do_userbutton(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int button = 0;
 	button = get_button_state("button_dfu0", BOARD_DFU_BUTTON_GPIO);
@@ -167,7 +168,7 @@ U_BOOT_CMD(
 #endif
 
 static int
-do_usertestwdt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+do_usertestwdt(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	printf("\n\n\n Go into infinite loop\n\n\n");
 	while (1)
@@ -251,8 +252,8 @@ void set_env_gpios(unsigned char state)
 	} /* loop through defined led in environment */
 }
 
-static int do_board_led(cmd_tbl_t *cmdtp, int flag, int argc,
-			   char *const argv[])
+static int do_board_led(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	if (argc != 2)
 		return CMD_RET_USAGE;
diff --git a/board/siemens/draco/board.c b/board/siemens/draco/board.c
index 963de15fa8..b4893d39ae 100644
--- a/board/siemens/draco/board.c
+++ b/board/siemens/draco/board.c
@@ -13,6 +13,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <env.h>
 #include <errno.h>
 #include <init.h>
@@ -343,8 +344,8 @@ int board_eth_init(bd_t *bis)
 	return n;
 }
 
-static int do_switch_reset(cmd_tbl_t *cmdtp, int flag, int argc,
-			  char *const argv[])
+static int do_switch_reset(struct cmd_tbl *cmdtp, int flag, int argc,
+			   char *const argv[])
 {
 	/* Reset SMSC LAN9303 switch for default configuration */
 	gpio_request(GPIO_LAN9303_NRST, "nRST");
diff --git a/board/siemens/taurus/taurus.c b/board/siemens/taurus/taurus.c
index 9f9cdfa234..927ef59650 100644
--- a/board/siemens/taurus/taurus.c
+++ b/board/siemens/taurus/taurus.c
@@ -386,8 +386,8 @@ static int upgrade_failure_fallback(void)
 	return 0;
 }
 
-static int do_upgrade_available(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_upgrade_available(struct cmd_tbl *cmdtp, int flag, int argc,
+				char *const argv[])
 {
 	unsigned long upgrade_available = 0;
 	unsigned long boot_retry = 0;
diff --git a/board/sifive/fu540/fu540.c b/board/sifive/fu540/fu540.c
index e9d1cf9a4b..d2a1ed0a3e 100644
--- a/board/sifive/fu540/fu540.c
+++ b/board/sifive/fu540/fu540.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <env.h>
 #include <init.h>
 #include <linux/delay.h>
 #include <linux/io.h>
diff --git a/board/sks-kinkel/sksimx6/sksimx6.c b/board/sks-kinkel/sksimx6/sksimx6.c
index e5f6e90e0c..235d87c053 100644
--- a/board/sks-kinkel/sksimx6/sksimx6.c
+++ b/board/sks-kinkel/sksimx6/sksimx6.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <init.h>
 #include <net.h>
 #include <asm/arch/clock.h>
diff --git a/board/solidrun/clearfog/clearfog.c b/board/solidrun/clearfog/clearfog.c
index b8391a35c0..9430097432 100644
--- a/board/solidrun/clearfog/clearfog.c
+++ b/board/solidrun/clearfog/clearfog.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <i2c.h>
 #include <init.h>
 #include <miiphy.h>
diff --git a/board/st/common/cmd_stboard.c b/board/st/common/cmd_stboard.c
index 915164aa0b..e1038619f0 100644
--- a/board/st/common/cmd_stboard.c
+++ b/board/st/common/cmd_stboard.c
@@ -31,6 +31,7 @@
 
 #ifndef CONFIG_SPL_BUILD
 #include <common.h>
+#include <command.h>
 #include <console.h>
 #include <misc.h>
 #include <dm/device.h>
@@ -67,8 +68,8 @@ static void display_stboard(u32 otp)
 	       otp & 0xF);
 }
 
-static int do_stboard(cmd_tbl_t *cmdtp, int flag, int argc,
-		      char * const argv[])
+static int do_stboard(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	int ret;
 	u32 otp, lock;
diff --git a/board/st/stm32f429-discovery/stm32f429-discovery.c b/board/st/stm32f429-discovery/stm32f429-discovery.c
index 5b0744ff6b..d0948b7962 100644
--- a/board/st/stm32f429-discovery/stm32f429-discovery.c
+++ b/board/st/stm32f429-discovery/stm32f429-discovery.c
@@ -12,6 +12,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <env.h>
 #include <init.h>
 
 #include <asm/io.h>
diff --git a/board/st/stm32f429-evaluation/stm32f429-evaluation.c b/board/st/stm32f429-evaluation/stm32f429-evaluation.c
index 1570d110bf..680f69dfd1 100644
--- a/board/st/stm32f429-evaluation/stm32f429-evaluation.c
+++ b/board/st/stm32f429-evaluation/stm32f429-evaluation.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <env.h>
 #include <init.h>
 
 #include <asm/io.h>
diff --git a/board/st/stm32f469-discovery/stm32f469-discovery.c b/board/st/stm32f469-discovery/stm32f469-discovery.c
index d9bcb39bea..4b71d40056 100644
--- a/board/st/stm32f469-discovery/stm32f469-discovery.c
+++ b/board/st/stm32f469-discovery/stm32f469-discovery.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <env.h>
 #include <init.h>
 
 #include <asm/io.h>
diff --git a/board/synopsys/emsdp/emsdp.c b/board/synopsys/emsdp/emsdp.c
index d98e606426..c1746b6110 100644
--- a/board/synopsys/emsdp/emsdp.c
+++ b/board/synopsys/emsdp/emsdp.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <dwmmc.h>
 #include <init.h>
@@ -102,7 +103,8 @@ void reset_cpu(ulong addr)
 		; /* loop forever till reset */
 }
 
-static int do_emsdp_rom(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_emsdp_rom(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	u32 creg_boot = readl(CREG_BOOT);
 
@@ -118,13 +120,14 @@ static int do_emsdp_rom(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]
 	return CMD_RET_SUCCESS;
 }
 
-cmd_tbl_t cmd_emsdp[] = {
+struct cmd_tbl cmd_emsdp[] = {
 	U_BOOT_CMD_MKENT(rom, 2, 0, do_emsdp_rom, "", ""),
 };
 
-static int do_emsdp(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_emsdp(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[])
 {
-	cmd_tbl_t *c;
+	struct cmd_tbl *c;
 
 	c = find_cmd_tbl(argv[1], cmd_emsdp, ARRAY_SIZE(cmd_emsdp));
 
diff --git a/board/synopsys/hsdk/hsdk.c b/board/synopsys/hsdk/hsdk.c
index 5f61fc0d7b..906a8eab87 100644
--- a/board/synopsys/hsdk/hsdk.c
+++ b/board/synopsys/hsdk/hsdk.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <config.h>
 #include <cpu_func.h>
 #include <env.h>
@@ -929,7 +930,8 @@ static int hsdk_go_prepare_and_run(void)
 	return hsdk_go_run(reg);
 }
 
-static int do_hsdk_go(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_hsdk_go(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	int ret;
 
@@ -994,7 +996,8 @@ static void init_mark_done(void)
 	writel(~INIT_MARKER_PENDING, INIT_MARKER_REGISTER);
 }
 
-static int do_hsdk_init(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_hsdk_init(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	int ret;
 
@@ -1022,7 +1025,7 @@ U_BOOT_CMD(
 	"- Init HSDK HW\n"
 );
 
-static int do_hsdk_clock_set(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_hsdk_clock_set(struct cmd_tbl *cmdtp, int flag, int argc,
 			     char *const argv[])
 {
 	int ret = 0;
@@ -1054,7 +1057,7 @@ static int do_hsdk_clock_set(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_SUCCESS;
 }
 
-static int do_hsdk_clock_get(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_hsdk_clock_get(struct cmd_tbl *cmdtp, int flag, int argc,
 			     char *const argv[])
 {
 	ulong rate;
@@ -1082,7 +1085,7 @@ static int do_hsdk_clock_get(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_SUCCESS;
 }
 
-static int do_hsdk_clock_print(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_hsdk_clock_print(struct cmd_tbl *cmdtp, int flag, int argc,
 			       char *const argv[])
 {
 	/* Main clocks */
@@ -1094,7 +1097,7 @@ static int do_hsdk_clock_print(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_SUCCESS;
 }
 
-static int do_hsdk_clock_print_all(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_hsdk_clock_print_all(struct cmd_tbl *cmdtp, int flag, int argc,
 				   char *const argv[])
 {
 	/*
@@ -1155,16 +1158,17 @@ static int do_hsdk_clock_print_all(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_SUCCESS;
 }
 
-cmd_tbl_t cmd_hsdk_clock[] = {
+struct cmd_tbl cmd_hsdk_clock[] = {
 	U_BOOT_CMD_MKENT(set, 3, 0, do_hsdk_clock_set, "", ""),
 	U_BOOT_CMD_MKENT(get, 3, 0, do_hsdk_clock_get, "", ""),
 	U_BOOT_CMD_MKENT(print, 4, 0, do_hsdk_clock_print, "", ""),
 	U_BOOT_CMD_MKENT(print_all, 4, 0, do_hsdk_clock_print_all, "", ""),
 };
 
-static int do_hsdk_clock(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_hsdk_clock(struct cmd_tbl *cmdtp, int flag, int argc,
+			 char *const argv[])
 {
-	cmd_tbl_t *c;
+	struct cmd_tbl *c;
 
 	if (argc < 2)
 		return CMD_RET_USAGE;
diff --git a/board/syteco/zmx25/zmx25.c b/board/syteco/zmx25/zmx25.c
index 715e20dbd0..9ea62bb796 100644
--- a/board/syteco/zmx25/zmx25.c
+++ b/board/syteco/zmx25/zmx25.c
@@ -15,6 +15,7 @@
  */
 #include <common.h>
 #include <cpu_func.h>
+#include <env.h>
 #include <init.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
diff --git a/board/technexion/pico-imx6/pico-imx6.c b/board/technexion/pico-imx6/pico-imx6.c
index eac30368f7..c60ce4b138 100644
--- a/board/technexion/pico-imx6/pico-imx6.c
+++ b/board/technexion/pico-imx6/pico-imx6.c
@@ -6,6 +6,7 @@
  * Author: Fabio Estevam <festevam@gmail.com>
  */
 
+#include <env.h>
 #include <init.h>
 #include <net.h>
 #include <asm/arch/clock.h>
diff --git a/board/theadorable/theadorable.c b/board/theadorable/theadorable.c
index 9af1799fa5..6ee09034ea 100644
--- a/board/theadorable/theadorable.c
+++ b/board/theadorable/theadorable.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <console.h>
 #include <i2c.h>
 #include <init.h>
@@ -309,7 +310,7 @@ int board_late_init(void)
 #endif
 
 #if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_PCI)
-int do_pcie_test(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_pcie_test(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	pci_dev_t bdf;
 	u16 ven_id, dev_id;
diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c
index d9af309818..c4d1cddc1d 100644
--- a/board/ti/j721e/evm.c
+++ b/board/ti/j721e/evm.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <fdt_support.h>
 #include <image.h>
 #include <init.h>
diff --git a/board/ti/sdp4430/cmd_bat.c b/board/ti/sdp4430/cmd_bat.c
index c820435386..6c1e6ca393 100644
--- a/board/ti/sdp4430/cmd_bat.c
+++ b/board/ti/sdp4430/cmd_bat.c
@@ -9,7 +9,7 @@
 #ifdef CONFIG_CMD_BAT
 #include <twl6030.h>
 
-int do_vbat(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_vbat(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	if (argc == 2) {
 		if (strncmp(argv[1], "startcharge", 12) == 0)
diff --git a/board/toradex/apalis-tk1/apalis-tk1.c b/board/toradex/apalis-tk1/apalis-tk1.c
index 81329a6131..3b7fa4b237 100644
--- a/board/toradex/apalis-tk1/apalis-tk1.c
+++ b/board/toradex/apalis-tk1/apalis-tk1.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <env.h>
 #include <init.h>
 #include <asm/arch-tegra/ap.h>
 #include <asm/gpio.h>
diff --git a/board/toradex/apalis_imx6/do_fuse.c b/board/toradex/apalis_imx6/do_fuse.c
index 22d191f52a..6991b1bc13 100644
--- a/board/toradex/apalis_imx6/do_fuse.c
+++ b/board/toradex/apalis_imx6/do_fuse.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #ifndef CONFIG_SPL_BUILD
+#include <command.h>
 #include <console.h>
 #include <fuse.h>
 
@@ -35,8 +36,8 @@ static int mfgr_fuse(void)
 	return CMD_RET_SUCCESS;
 }
 
-int do_mfgr_fuse(cmd_tbl_t *cmdtp, int flag, int argc,
-		char * const argv[])
+int do_mfgr_fuse(struct cmd_tbl *cmdtp, int flag, int argc,
+		 char *const argv[])
 {
 	int ret;
 	puts("Fusing...\n");
@@ -48,8 +49,8 @@ int do_mfgr_fuse(cmd_tbl_t *cmdtp, int flag, int argc,
 	return ret;
 }
 
-int do_updt_fuse(cmd_tbl_t *cmdtp, int flag, int argc,
-		char * const argv[])
+int do_updt_fuse(struct cmd_tbl *cmdtp, int flag, int argc,
+		 char *const argv[])
 {
 	unsigned val;
 	int ret;
diff --git a/board/toradex/apalis_imx6/pf0100.c b/board/toradex/apalis_imx6/pf0100.c
index ebd6418fd4..f8d0494332 100644
--- a/board/toradex/apalis_imx6/pf0100.c
+++ b/board/toradex/apalis_imx6/pf0100.c
@@ -8,6 +8,7 @@
 */
 
 #include <common.h>
+#include <command.h>
 #include <i2c.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
@@ -261,8 +262,8 @@ static int pf0100_prog(void)
 	return CMD_RET_SUCCESS;
 }
 
-static int do_pf0100_prog(cmd_tbl_t *cmdtp, int flag, int argc,
-		char * const argv[])
+static int do_pf0100_prog(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	int ret;
 	puts("Programming PMIC OTP...");
diff --git a/board/toradex/colibri_imx6/do_fuse.c b/board/toradex/colibri_imx6/do_fuse.c
index 22d191f52a..6991b1bc13 100644
--- a/board/toradex/colibri_imx6/do_fuse.c
+++ b/board/toradex/colibri_imx6/do_fuse.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #ifndef CONFIG_SPL_BUILD
+#include <command.h>
 #include <console.h>
 #include <fuse.h>
 
@@ -35,8 +36,8 @@ static int mfgr_fuse(void)
 	return CMD_RET_SUCCESS;
 }
 
-int do_mfgr_fuse(cmd_tbl_t *cmdtp, int flag, int argc,
-		char * const argv[])
+int do_mfgr_fuse(struct cmd_tbl *cmdtp, int flag, int argc,
+		 char *const argv[])
 {
 	int ret;
 	puts("Fusing...\n");
@@ -48,8 +49,8 @@ int do_mfgr_fuse(cmd_tbl_t *cmdtp, int flag, int argc,
 	return ret;
 }
 
-int do_updt_fuse(cmd_tbl_t *cmdtp, int flag, int argc,
-		char * const argv[])
+int do_updt_fuse(struct cmd_tbl *cmdtp, int flag, int argc,
+		 char *const argv[])
 {
 	unsigned val;
 	int ret;
diff --git a/board/toradex/colibri_imx6/pf0100.c b/board/toradex/colibri_imx6/pf0100.c
index e744243297..149e9bd3b9 100644
--- a/board/toradex/colibri_imx6/pf0100.c
+++ b/board/toradex/colibri_imx6/pf0100.c
@@ -8,6 +8,7 @@
 */
 
 #include <common.h>
+#include <command.h>
 #include <i2c.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
@@ -246,8 +247,8 @@ static int pf0100_prog(void)
 	return CMD_RET_SUCCESS;
 }
 
-static int do_pf0100_prog(cmd_tbl_t *cmdtp, int flag, int argc,
-		char * const argv[])
+static int do_pf0100_prog(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	int ret;
 	puts("Programming PMIC OTP...");
diff --git a/board/toradex/common/tdx-cfg-block.c b/board/toradex/common/tdx-cfg-block.c
index bd7d8b7f53..75216ecf6d 100644
--- a/board/toradex/common/tdx-cfg-block.c
+++ b/board/toradex/common/tdx-cfg-block.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include "tdx-cfg-block.h"
+#include <command.h>
 #include <asm/cache.h>
 
 #if defined(CONFIG_TARGET_APALIS_IMX6) || \
@@ -514,8 +515,8 @@ static int get_cfgblock_barcode(char *barcode)
 	return 0;
 }
 
-static int do_cfgblock_create(cmd_tbl_t *cmdtp, int flag, int argc,
-			      char * const argv[])
+static int do_cfgblock_create(struct cmd_tbl *cmdtp, int flag, int argc,
+			      char *const argv[])
 {
 	u8 *config_block;
 	struct toradex_tag *tag;
@@ -643,8 +644,8 @@ out:
 	return ret;
 }
 
-static int do_cfgblock(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_cfgblock(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	int ret;
 
diff --git a/board/toradex/verdin-imx8mm/spl.c b/board/toradex/verdin-imx8mm/spl.c
index 338952ea71..eedca1e218 100644
--- a/board/toradex/verdin-imx8mm/spl.c
+++ b/board/toradex/verdin-imx8mm/spl.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <image.h>
 #include <init.h>
 #include <asm/arch/clock.h>
diff --git a/board/varisys/common/sys_eeprom.c b/board/varisys/common/sys_eeprom.c
index 4c025087db..134c307e5d 100644
--- a/board/varisys/common/sys_eeprom.c
+++ b/board/varisys/common/sys_eeprom.c
@@ -306,7 +306,7 @@ static void set_mac_address(unsigned int index, const char *string)
 	update_crc();
 }
 
-int do_mac(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_mac(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	char cmd;
 
diff --git a/board/work-microwave/work_92105/work_92105_display.c b/board/work-microwave/work_92105/work_92105_display.c
index db04dcabc7..3dd60ec827 100644
--- a/board/work-microwave/work_92105/work_92105_display.c
+++ b/board/work-microwave/work_92105/work_92105_display.c
@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/emc.h>
@@ -266,7 +267,7 @@ void work_92105_display_init(void)
 
 #ifdef CONFIG_CMD_MAX6957
 
-static int do_max6957aax(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_max6957aax(struct cmd_tbl *cmdtp, int flag, int argc,
 			 char *const argv[])
 {
 	int reg, val;
@@ -315,7 +316,8 @@ U_BOOT_CMD(
 #error CONFIG_CMD_HD44760 requires CONFIG_HUSH_PARSER
 #endif
 
-static int do_hd44780(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_hd44780(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	char *cmd;
 
diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c
index 294a59df77..b8cdaaada1 100644
--- a/board/xilinx/common/board.c
+++ b/board/xilinx/common/board.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <asm/sections.h>
 #include <dm/uclass.h>
 #include <i2c.h>
diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c
index 0e33f6af0b..0f81df3acc 100644
--- a/board/xilinx/microblaze-generic/microblaze-generic.c
+++ b/board/xilinx/microblaze-generic/microblaze-generic.c
@@ -12,6 +12,7 @@
 
 #include <common.h>
 #include <config.h>
+#include <env.h>
 #include <init.h>
 #include <dm/lists.h>
 #include <fdtdec.h>
diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c
index 24cff0c370..44cc65e023 100644
--- a/board/xilinx/versal/board.c
+++ b/board/xilinx/versal/board.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <env.h>
 #include <fdtdec.h>
 #include <init.h>
 #include <malloc.h>
diff --git a/board/xilinx/zynq/cmds.c b/board/xilinx/zynq/cmds.c
index 27d44b760d..33589347da 100644
--- a/board/xilinx/zynq/cmds.c
+++ b/board/xilinx/zynq/cmds.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
@@ -408,8 +409,8 @@ static int zynq_verify_image(u32 src_ptr)
 	return 0;
 }
 
-static int do_zynq_rsa(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_zynq_rsa(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	u32 src_ptr;
 	char *endp;
@@ -429,8 +430,8 @@ static int do_zynq_rsa(cmd_tbl_t *cmdtp, int flag, int argc,
 #endif
 
 #ifdef CONFIG_CMD_ZYNQ_AES
-static int zynq_decrypt_image(cmd_tbl_t *cmdtp, int flag, int argc,
-			      char * const argv[])
+static int zynq_decrypt_image(struct cmd_tbl *cmdtp, int flag, int argc,
+			      char *const argv[])
 {
 	char *endp;
 	u32 srcaddr, srclen, dstaddr, dstlen;
@@ -469,7 +470,7 @@ static int zynq_decrypt_image(cmd_tbl_t *cmdtp, int flag, int argc,
 }
 #endif
 
-static cmd_tbl_t zynq_commands[] = {
+static struct cmd_tbl zynq_commands[] = {
 #ifdef CONFIG_CMD_ZYNQ_RSA
 	U_BOOT_CMD_MKENT(rsa, 3, 1, do_zynq_rsa, "", ""),
 #endif
@@ -478,9 +479,10 @@ static cmd_tbl_t zynq_commands[] = {
 #endif
 };
 
-static int do_zynq(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_zynq(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
-	cmd_tbl_t *zynq_cmd;
+	struct cmd_tbl *zynq_cmd;
 	int ret;
 
 	if (!ARRAY_SIZE(zynq_commands)) {
diff --git a/board/xilinx/zynqmp/cmds.c b/board/xilinx/zynqmp/cmds.c
index 893616b6a1..0f1f26986f 100644
--- a/board/xilinx/zynqmp/cmds.c
+++ b/board/xilinx/zynqmp/cmds.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <env.h>
 #include <malloc.h>
@@ -13,8 +14,8 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/io.h>
 
-static int do_zynqmp_verify_secure(cmd_tbl_t *cmdtp, int flag, int argc,
-				   char * const argv[])
+static int do_zynqmp_verify_secure(struct cmd_tbl *cmdtp, int flag, int argc,
+				   char *const argv[])
 {
 	u64 src_addr, addr;
 	u32 len, src_lo, src_hi;
@@ -65,8 +66,8 @@ static int do_zynqmp_verify_secure(cmd_tbl_t *cmdtp, int flag, int argc,
 	return ret;
 }
 
-static int do_zynqmp_mmio_read(cmd_tbl_t *cmdtp, int flag, int argc,
-			       char * const argv[])
+static int do_zynqmp_mmio_read(struct cmd_tbl *cmdtp, int flag, int argc,
+			       char *const argv[])
 {
 	u32 read_val, addr;
 	int ret;
@@ -86,8 +87,8 @@ static int do_zynqmp_mmio_read(cmd_tbl_t *cmdtp, int flag, int argc,
 	return ret;
 }
 
-static int do_zynqmp_mmio_write(cmd_tbl_t *cmdtp, int flag, int argc,
-				char * const argv[])
+static int do_zynqmp_mmio_write(struct cmd_tbl *cmdtp, int flag, int argc,
+				char *const argv[])
 {
 	u32 addr, mask, val;
 	int ret;
@@ -107,8 +108,8 @@ static int do_zynqmp_mmio_write(cmd_tbl_t *cmdtp, int flag, int argc,
 }
 
 #ifdef CONFIG_DEFINE_TCM_OCM_MMAP
-static int do_zynqmp_tcm_init(cmd_tbl_t *cmdtp, int flag, int argc,
-			      char * const argv[])
+static int do_zynqmp_tcm_init(struct cmd_tbl *cmdtp, int flag, int argc,
+			      char *const argv[])
 {
 	u8 mode;
 
@@ -129,7 +130,7 @@ static int do_zynqmp_tcm_init(cmd_tbl_t *cmdtp, int flag, int argc,
 }
 #endif
 
-static cmd_tbl_t cmd_zynqmp_sub[] = {
+static struct cmd_tbl cmd_zynqmp_sub[] = {
 	U_BOOT_CMD_MKENT(secure, 5, 0, do_zynqmp_verify_secure, "", ""),
 	U_BOOT_CMD_MKENT(mmio_read, 3, 0, do_zynqmp_mmio_read, "", ""),
 	U_BOOT_CMD_MKENT(mmio_write, 5, 0, do_zynqmp_mmio_write, "", ""),
@@ -149,10 +150,10 @@ static cmd_tbl_t cmd_zynqmp_sub[] = {
  *
  * Return: return 0 on success and CMD_RET_USAGE incase of misuse and error
  */
-static int do_zynqmp(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_zynqmp(struct cmd_tbl *cmdtp, int flag, int argc,
 		     char *const argv[])
 {
-	cmd_tbl_t *c;
+	struct cmd_tbl *c;
 
 	if (argc < 2)
 		return CMD_RET_USAGE;
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index 6aad1352c4..7a8c745f9b 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <debug_uart.h>
 #include <env.h>
@@ -415,7 +416,7 @@ int board_early_init_r(void)
 }
 
 unsigned long do_go_exec(ulong (*entry)(int, char * const []), int argc,
-			 char * const argv[])
+			 char *const argv[])
 {
 	int ret = 0;
 
diff --git a/cmd/ab_select.c b/cmd/ab_select.c
index 7a4e51571b..6298fcfb60 100644
--- a/cmd/ab_select.c
+++ b/cmd/ab_select.c
@@ -6,10 +6,11 @@
 #include <common.h>
 #include <android_ab.h>
 #include <command.h>
+#include <env.h>
 #include <part.h>
 
-static int do_ab_select(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_ab_select(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	int ret;
 	struct blk_desc *dev_desc;
diff --git a/cmd/abootimg.c b/cmd/abootimg.c
index 15e727f4a2..40e8978f15 100644
--- a/cmd/abootimg.c
+++ b/cmd/abootimg.c
@@ -6,6 +6,7 @@
 
 #include <android_image.h>
 #include <common.h>
+#include <command.h>
 #include <image.h>
 #include <mapmem.h>
 
@@ -15,7 +16,7 @@
 /* Please use abootimg_addr() macro to obtain the boot image address */
 static ulong _abootimg_addr = -1;
 
-static int abootimg_get_ver(int argc, char * const argv[])
+static int abootimg_get_ver(int argc, char *const argv[])
 {
 	const struct andr_img_hdr *hdr;
 	int res = CMD_RET_SUCCESS;
@@ -40,7 +41,7 @@ exit:
 	return res;
 }
 
-static int abootimg_get_recovery_dtbo(int argc, char * const argv[])
+static int abootimg_get_recovery_dtbo(int argc, char *const argv[])
 {
 	ulong addr;
 	u32 size;
@@ -62,7 +63,7 @@ static int abootimg_get_recovery_dtbo(int argc, char * const argv[])
 	return CMD_RET_SUCCESS;
 }
 
-static int abootimg_get_dtb_load_addr(int argc, char * const argv[])
+static int abootimg_get_dtb_load_addr(int argc, char *const argv[])
 {
 	const struct andr_img_hdr *hdr;
 	int res = CMD_RET_SUCCESS;
@@ -93,7 +94,7 @@ exit:
 	return res;
 }
 
-static int abootimg_get_dtb_by_index(int argc, char * const argv[])
+static int abootimg_get_dtb_by_index(int argc, char *const argv[])
 {
 	const char *index_str;
 	u32 num;
@@ -140,7 +141,7 @@ static int abootimg_get_dtb_by_index(int argc, char * const argv[])
 	return CMD_RET_SUCCESS;
 }
 
-static int abootimg_get_dtb(int argc, char * const argv[])
+static int abootimg_get_dtb(int argc, char *const argv[])
 {
 	if (argc < 1)
 		return CMD_RET_USAGE;
@@ -151,8 +152,8 @@ static int abootimg_get_dtb(int argc, char * const argv[])
 	return CMD_RET_USAGE;
 }
 
-static int do_abootimg_addr(cmd_tbl_t *cmdtp, int flag, int argc,
-			    char * const argv[])
+static int do_abootimg_addr(struct cmd_tbl *cmdtp, int flag, int argc,
+			    char *const argv[])
 {
 	char *endp;
 	ulong img_addr;
@@ -170,8 +171,8 @@ static int do_abootimg_addr(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_SUCCESS;
 }
 
-static int do_abootimg_get(cmd_tbl_t *cmdtp, int flag, int argc,
-			   char * const argv[])
+static int do_abootimg_get(struct cmd_tbl *cmdtp, int flag, int argc,
+			   char *const argv[])
 {
 	const char *param;
 
@@ -193,8 +194,8 @@ static int do_abootimg_get(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_USAGE;
 }
 
-static int do_abootimg_dump(cmd_tbl_t *cmdtp, int flag, int argc,
-			    char * const argv[])
+static int do_abootimg_dump(struct cmd_tbl *cmdtp, int flag, int argc,
+			    char *const argv[])
 {
 	if (argc != 2)
 		return CMD_RET_USAGE;
@@ -209,16 +210,16 @@ static int do_abootimg_dump(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_SUCCESS;
 }
 
-static cmd_tbl_t cmd_abootimg_sub[] = {
+static struct cmd_tbl cmd_abootimg_sub[] = {
 	U_BOOT_CMD_MKENT(addr, 2, 1, do_abootimg_addr, "", ""),
 	U_BOOT_CMD_MKENT(dump, 2, 1, do_abootimg_dump, "", ""),
 	U_BOOT_CMD_MKENT(get, 5, 1, do_abootimg_get, "", ""),
 };
 
-static int do_abootimg(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_abootimg(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
-	cmd_tbl_t *cp;
+	struct cmd_tbl *cp;
 
 	cp = find_cmd_tbl(argv[1], cmd_abootimg_sub,
 			  ARRAY_SIZE(cmd_abootimg_sub));
diff --git a/cmd/acpi.c b/cmd/acpi.c
index 203bd93bd5..e9a9161a91 100644
--- a/cmd/acpi.c
+++ b/cmd/acpi.c
@@ -137,7 +137,7 @@ static int list_rsdp(struct acpi_rsdp *rsdp)
 	return 0;
 }
 
-static int do_acpi_list(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_acpi_list(struct cmd_tbl *cmdtp, int flag, int argc,
 			char *const argv[])
 {
 	struct acpi_rsdp *rsdp;
@@ -153,7 +153,7 @@ static int do_acpi_list(cmd_tbl_t *cmdtp, int flag, int argc,
 	return 0;
 }
 
-static int do_acpi_dump(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_acpi_dump(struct cmd_tbl *cmdtp, int flag, int argc,
 			char *const argv[])
 {
 	const char *name;
diff --git a/cmd/adc.c b/cmd/adc.c
index 381961cf51..16f914a030 100644
--- a/cmd/adc.c
+++ b/cmd/adc.c
@@ -8,7 +8,7 @@
 #include <dm.h>
 #include <adc.h>
 
-static int do_adc_list(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_adc_list(struct cmd_tbl *cmdtp, int flag, int argc,
 		       char *const argv[])
 {
 	struct udevice *dev;
@@ -31,7 +31,7 @@ static int do_adc_list(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_SUCCESS;
 }
 
-static int do_adc_info(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_adc_info(struct cmd_tbl *cmdtp, int flag, int argc,
 		       char *const argv[])
 {
 	struct udevice *dev;
@@ -68,7 +68,7 @@ static int do_adc_info(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_SUCCESS;
 }
 
-static int do_adc_single(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_adc_single(struct cmd_tbl *cmdtp, int flag, int argc,
 			 char *const argv[])
 {
 	struct udevice *dev;
@@ -95,7 +95,7 @@ static int do_adc_single(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_SUCCESS;
 }
 
-static int do_adc_scan(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_adc_scan(struct cmd_tbl *cmdtp, int flag, int argc,
 		       char *const argv[])
 {
 	struct adc_channel ch[ADC_MAX_CHANNEL];
diff --git a/cmd/adtimg.c b/cmd/adtimg.c
index 60bb01c349..aa943007f3 100644
--- a/cmd/adtimg.c
+++ b/cmd/adtimg.c
@@ -5,6 +5,7 @@
  * Eugeniu Rosca <rosca.eugeniu@gmail.com>
  */
 
+#include <command.h>
 #include <env.h>
 #include <image-android-dt.h>
 #include <common.h>
@@ -17,8 +18,8 @@
  */
 static ulong working_img;
 
-static int do_adtimg_addr(cmd_tbl_t *cmdtp, int flag, int argc,
-			  char * const argv[])
+static int do_adtimg_addr(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	char *endp;
 	ulong hdr_addr;
@@ -56,8 +57,8 @@ static int adtimg_check_working_img(void)
 	return CMD_RET_SUCCESS;
 }
 
-static int do_adtimg_dump(cmd_tbl_t *cmdtp, int flag, int argc,
-			  char * const argv[])
+static int do_adtimg_dump(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	if (argc != 1)
 		return CMD_RET_USAGE;
@@ -99,7 +100,7 @@ static int adtimg_getopt_u32(char * const opt, char * const name, u32 *optval)
 	return CMD_RET_SUCCESS;
 }
 
-static int adtimg_getopt_index(int argc, char * const argv[], u32 *index,
+static int adtimg_getopt_index(int argc, char *const argv[], u32 *index,
 			       char **avar, char **svar)
 {
 	int ret;
@@ -124,7 +125,7 @@ static int adtimg_getopt_index(int argc, char * const argv[], u32 *index,
 	return CMD_RET_SUCCESS;
 }
 
-static int adtimg_get_dt_by_index(int argc, char * const argv[])
+static int adtimg_get_dt_by_index(int argc, char *const argv[])
 {
 	ulong addr;
 	u32 index, size;
@@ -163,7 +164,7 @@ static int adtimg_get_dt_by_index(int argc, char * const argv[])
 	return CMD_RET_SUCCESS;
 }
 
-static int adtimg_get_dt(int argc, char * const argv[])
+static int adtimg_get_dt(int argc, char *const argv[])
 {
 	if (argc < 2) {
 		printf("Error: No options passed to '%s'\n", argv[0]);
@@ -181,8 +182,8 @@ static int adtimg_get_dt(int argc, char * const argv[])
 	return CMD_RET_FAILURE;
 }
 
-static int do_adtimg_get(cmd_tbl_t *cmdtp, int flag, int argc,
-			 char * const argv[])
+static int do_adtimg_get(struct cmd_tbl *cmdtp, int flag, int argc,
+			 char *const argv[])
 {
 	if (argc < 2) {
 		printf("Error: No arguments passed to '%s'\n", argv[0]);
@@ -203,15 +204,16 @@ static int do_adtimg_get(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_FAILURE;
 }
 
-static cmd_tbl_t cmd_adtimg_sub[] = {
+static struct cmd_tbl cmd_adtimg_sub[] = {
 	U_BOOT_CMD_MKENT(addr, CONFIG_SYS_MAXARGS, 1, do_adtimg_addr, "", ""),
 	U_BOOT_CMD_MKENT(dump, CONFIG_SYS_MAXARGS, 1, do_adtimg_dump, "", ""),
 	U_BOOT_CMD_MKENT(get, CONFIG_SYS_MAXARGS, 1, do_adtimg_get, "", ""),
 };
 
-static int do_adtimg(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_adtimg(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
-	cmd_tbl_t *cp;
+	struct cmd_tbl *cp;
 
 	cp = find_cmd_tbl(argv[1], cmd_adtimg_sub, ARRAY_SIZE(cmd_adtimg_sub));
 
diff --git a/cmd/aes.c b/cmd/aes.c
index 8c5b42fd2c..4c0dad9932 100644
--- a/cmd/aes.c
+++ b/cmd/aes.c
@@ -35,7 +35,7 @@ u32 aes_get_key_len(char *command)
  * Returns zero on success, CMD_RET_USAGE in case of misuse and negative
  * on error.
  */
-static int do_aes(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_aes(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	uint32_t key_addr, iv_addr, src_addr, dst_addr, len;
 	uint8_t *key_ptr, *iv_ptr, *src_ptr, *dst_ptr;
diff --git a/cmd/arm/exception.c b/cmd/arm/exception.c
index 33bc75976f..522f6dff53 100644
--- a/cmd/arm/exception.c
+++ b/cmd/arm/exception.c
@@ -8,8 +8,8 @@
 #include <common.h>
 #include <command.h>
 
-static int do_unaligned(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_unaligned(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	/*
 	 * The LDRD instruction requires the data source to be four byte aligned
@@ -23,15 +23,15 @@ static int do_unaligned(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_FAILURE;
 }
 
-static int do_breakpoint(cmd_tbl_t *cmdtp, int flag, int argc,
-			 char * const argv[])
+static int do_breakpoint(struct cmd_tbl *cmdtp, int flag, int argc,
+			 char *const argv[])
 {
 	asm volatile ("BKPT #123\n");
 	return CMD_RET_FAILURE;
 }
 
-static int do_undefined(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_undefined(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	/*
 	 * 0xe7f...f.	is undefined in ARM mode
@@ -41,7 +41,7 @@ static int do_undefined(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_FAILURE;
 }
 
-static cmd_tbl_t cmd_sub[] = {
+static struct cmd_tbl cmd_sub[] = {
 	U_BOOT_CMD_MKENT(breakpoint, CONFIG_SYS_MAXARGS, 1, do_breakpoint,
 			 "", ""),
 	U_BOOT_CMD_MKENT(unaligned, CONFIG_SYS_MAXARGS, 1, do_unaligned,
diff --git a/cmd/arm/exception64.c b/cmd/arm/exception64.c
index a363818532..d5de50a080 100644
--- a/cmd/arm/exception64.c
+++ b/cmd/arm/exception64.c
@@ -8,8 +8,8 @@
 #include <common.h>
 #include <command.h>
 
-static int do_undefined(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_undefined(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	/*
 	 * 0xe7f...f.	is undefined in ARM mode
@@ -19,7 +19,7 @@ static int do_undefined(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_FAILURE;
 }
 
-static cmd_tbl_t cmd_sub[] = {
+static struct cmd_tbl cmd_sub[] = {
 	U_BOOT_CMD_MKENT(undefined, CONFIG_SYS_MAXARGS, 1, do_undefined,
 			 "", ""),
 };
diff --git a/cmd/armflash.c b/cmd/armflash.c
index f82f3dd1a3..5e7315eb7c 100644
--- a/cmd/armflash.c
+++ b/cmd/armflash.c
@@ -267,7 +267,7 @@ static int exists(const char * const name)
 	return CMD_RET_FAILURE;
 }
 
-static int do_afs(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_afs(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int ret = CMD_RET_SUCCESS;
 
diff --git a/cmd/avb.c b/cmd/avb.c
index a4de5c40a2..398ad3ba97 100644
--- a/cmd/avb.c
+++ b/cmd/avb.c
@@ -15,7 +15,7 @@
 #define AVB_BOOTARGS	"avb_bootargs"
 static struct AvbOps *avb_ops;
 
-int do_avb_init(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_avb_init(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	unsigned long mmc_dev;
 
@@ -36,7 +36,8 @@ int do_avb_init(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return CMD_RET_FAILURE;
 }
 
-int do_avb_read_part(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_avb_read_part(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	const char *part;
 	s64 offset;
@@ -68,7 +69,7 @@ int do_avb_read_part(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return CMD_RET_FAILURE;
 }
 
-int do_avb_read_part_hex(cmd_tbl_t *cmdtp, int flag, int argc,
+int do_avb_read_part_hex(struct cmd_tbl *cmdtp, int flag, int argc,
 			 char *const argv[])
 {
 	const char *part;
@@ -114,7 +115,8 @@ int do_avb_read_part_hex(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_FAILURE;
 }
 
-int do_avb_write_part(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_avb_write_part(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	const char *part;
 	s64 offset;
@@ -145,7 +147,8 @@ int do_avb_write_part(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return CMD_RET_FAILURE;
 }
 
-int do_avb_read_rb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_avb_read_rb(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	size_t index;
 	u64 rb_idx;
@@ -171,7 +174,8 @@ int do_avb_read_rb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return CMD_RET_FAILURE;
 }
 
-int do_avb_write_rb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_avb_write_rb(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[])
 {
 	size_t index;
 	u64 rb_idx;
@@ -196,8 +200,8 @@ int do_avb_write_rb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return CMD_RET_FAILURE;
 }
 
-int do_avb_get_uuid(cmd_tbl_t *cmdtp, int flag,
-		    int argc, char * const argv[])
+int do_avb_get_uuid(struct cmd_tbl *cmdtp, int flag,
+		    int argc, char *const argv[])
 {
 	const char *part;
 	char buffer[UUID_STR_LEN + 1];
@@ -224,7 +228,7 @@ int do_avb_get_uuid(cmd_tbl_t *cmdtp, int flag,
 	return CMD_RET_FAILURE;
 }
 
-int do_avb_verify_part(cmd_tbl_t *cmdtp, int flag,
+int do_avb_verify_part(struct cmd_tbl *cmdtp, int flag,
 		       int argc, char *const argv[])
 {
 	const char * const requested_partitions[] = {"boot", NULL};
@@ -315,8 +319,8 @@ int do_avb_verify_part(cmd_tbl_t *cmdtp, int flag,
 	return res;
 }
 
-int do_avb_is_unlocked(cmd_tbl_t *cmdtp, int flag,
-		       int argc, char * const argv[])
+int do_avb_is_unlocked(struct cmd_tbl *cmdtp, int flag,
+		       int argc, char *const argv[])
 {
 	bool unlock;
 
@@ -341,8 +345,8 @@ int do_avb_is_unlocked(cmd_tbl_t *cmdtp, int flag,
 	return CMD_RET_FAILURE;
 }
 
-int do_avb_read_pvalue(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+int do_avb_read_pvalue(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	const char *name;
 	size_t bytes;
@@ -382,8 +386,8 @@ int do_avb_read_pvalue(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_FAILURE;
 }
 
-int do_avb_write_pvalue(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+int do_avb_write_pvalue(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	const char *name;
 	const char *value;
@@ -411,7 +415,7 @@ int do_avb_write_pvalue(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_FAILURE;
 }
 
-static cmd_tbl_t cmd_avb[] = {
+static struct cmd_tbl cmd_avb[] = {
 	U_BOOT_CMD_MKENT(init, 2, 0, do_avb_init, "", ""),
 	U_BOOT_CMD_MKENT(read_rb, 2, 0, do_avb_read_rb, "", ""),
 	U_BOOT_CMD_MKENT(write_rb, 3, 0, do_avb_write_rb, "", ""),
@@ -427,9 +431,9 @@ static cmd_tbl_t cmd_avb[] = {
 #endif
 };
 
-static int do_avb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_avb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
-	cmd_tbl_t *cp;
+	struct cmd_tbl *cp;
 
 	cp = find_cmd_tbl(argv[1], cmd_avb, ARRAY_SIZE(cmd_avb));
 
diff --git a/cmd/axi.c b/cmd/axi.c
index 588098fddd..18533efc0d 100644
--- a/cmd/axi.c
+++ b/cmd/axi.c
@@ -96,8 +96,8 @@ static int axi_get_cur_bus(struct udevice **busp)
  * Command handlers
  */
 
-static int do_axi_show_bus(cmd_tbl_t *cmdtp, int flag, int argc,
-			   char * const argv[])
+static int do_axi_show_bus(struct cmd_tbl *cmdtp, int flag, int argc,
+			   char *const argv[])
 {
 	struct udevice *dummy;
 
@@ -135,8 +135,8 @@ static int do_axi_show_bus(cmd_tbl_t *cmdtp, int flag, int argc,
 	return 0;
 }
 
-static int do_axi_bus_num(cmd_tbl_t *cmdtp, int flag, int argc,
-			  char * const argv[])
+static int do_axi_bus_num(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	int ret = 0;
 	int bus_no;
@@ -163,7 +163,8 @@ static int do_axi_bus_num(cmd_tbl_t *cmdtp, int flag, int argc,
 	return ret ? CMD_RET_FAILURE : 0;
 }
 
-static int do_axi_md(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_axi_md(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	/* Print that many bytes per line */
 	const uint DISP_LINE_LEN = 16;
@@ -261,7 +262,8 @@ static int do_axi_md(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return 0;
 }
 
-static int do_axi_mw(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_axi_mw(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	u32 writeval;
 	ulong addr, count, size;
@@ -312,17 +314,17 @@ static int do_axi_mw(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return 0;
 }
 
-static cmd_tbl_t cmd_axi_sub[] = {
+static struct cmd_tbl cmd_axi_sub[] = {
 	U_BOOT_CMD_MKENT(bus, 1, 1, do_axi_show_bus, "", ""),
 	U_BOOT_CMD_MKENT(dev, 1, 1, do_axi_bus_num, "", ""),
 	U_BOOT_CMD_MKENT(md, 4, 1, do_axi_md, "", ""),
 	U_BOOT_CMD_MKENT(mw, 5, 1, do_axi_mw, "", ""),
 };
 
-static int do_ihs_axi(cmd_tbl_t *cmdtp, int flag, int argc,
-		      char * const argv[])
+static int do_ihs_axi(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
-	cmd_tbl_t *c;
+	struct cmd_tbl *c;
 
 	if (argc < 2)
 		return CMD_RET_USAGE;
diff --git a/cmd/bcb.c b/cmd/bcb.c
index b944e62b6a..d99a698012 100644
--- a/cmd/bcb.c
+++ b/cmd/bcb.c
@@ -109,8 +109,8 @@ static int bcb_field_get(char *name, char **fieldp, int *sizep)
 	return 0;
 }
 
-static int do_bcb_load(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_bcb_load(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	struct blk_desc *desc;
 	struct disk_partition info;
@@ -162,8 +162,8 @@ err:
 	return CMD_RET_FAILURE;
 }
 
-static int do_bcb_set(cmd_tbl_t *cmdtp, int flag, int argc,
-		      char * const argv[])
+static int do_bcb_set(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	int size, len;
 	char *field, *str, *found;
@@ -189,8 +189,8 @@ static int do_bcb_set(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_SUCCESS;
 }
 
-static int do_bcb_clear(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_bcb_clear(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	int size;
 	char *field;
@@ -208,8 +208,8 @@ static int do_bcb_clear(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_SUCCESS;
 }
 
-static int do_bcb_test(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_bcb_test(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	int size;
 	char *field;
@@ -235,8 +235,8 @@ static int do_bcb_test(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_FAILURE;
 }
 
-static int do_bcb_dump(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_bcb_dump(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	int size;
 	char *field;
@@ -249,8 +249,8 @@ static int do_bcb_dump(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_SUCCESS;
 }
 
-static int do_bcb_store(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_bcb_store(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	struct blk_desc *desc;
 	struct disk_partition info;
@@ -281,7 +281,7 @@ err:
 	return CMD_RET_FAILURE;
 }
 
-static cmd_tbl_t cmd_bcb_sub[] = {
+static struct cmd_tbl cmd_bcb_sub[] = {
 	U_BOOT_CMD_MKENT(load, CONFIG_SYS_MAXARGS, 1, do_bcb_load, "", ""),
 	U_BOOT_CMD_MKENT(set, CONFIG_SYS_MAXARGS, 1, do_bcb_set, "", ""),
 	U_BOOT_CMD_MKENT(clear, CONFIG_SYS_MAXARGS, 1, do_bcb_clear, "", ""),
@@ -290,9 +290,9 @@ static cmd_tbl_t cmd_bcb_sub[] = {
 	U_BOOT_CMD_MKENT(store, CONFIG_SYS_MAXARGS, 1, do_bcb_store, "", ""),
 };
 
-static int do_bcb(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_bcb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
-	cmd_tbl_t *c;
+	struct cmd_tbl *c;
 
 	if (argc < 2)
 		return CMD_RET_USAGE;
diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c
index ec399c07ae..dba552b03f 100644
--- a/cmd/bdinfo.c
+++ b/cmd/bdinfo.c
@@ -177,7 +177,7 @@ void __weak board_detail(void)
 	/* Please define board_detail() for your platform */
 }
 
-int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	bd_t *bd = gd->bd;
 
@@ -222,7 +222,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 
 #elif defined(CONFIG_NIOS2)
 
-int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	bd_t *bd = gd->bd;
 
@@ -243,7 +243,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 
 #elif defined(CONFIG_MICROBLAZE)
 
-int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	bd_t *bd = gd->bd;
 
@@ -269,7 +269,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 
 #elif defined(CONFIG_M68K)
 
-int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	bd_t *bd = gd->bd;
 
@@ -301,7 +301,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 
 #elif defined(CONFIG_MIPS)
 
-int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	print_std_bdinfo(gd->bd);
 	print_num("relocaddr", gd->relocaddr);
@@ -313,8 +313,8 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 
 #elif defined(CONFIG_ARM)
 
-static int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	bd_t *bd = gd->bd;
 
@@ -374,7 +374,7 @@ static int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc,
 
 #elif defined(CONFIG_SH)
 
-int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	bd_t *bd = gd->bd;
 
@@ -389,7 +389,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 
 #elif defined(CONFIG_X86)
 
-int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	bd_t *bd = gd->bd;
 
@@ -411,7 +411,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 
 #elif defined(CONFIG_SANDBOX)
 
-int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	bd_t *bd = gd->bd;
 
@@ -429,7 +429,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 
 #elif defined(CONFIG_NDS32)
 
-int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	bd_t *bd = gd->bd;
 
@@ -445,7 +445,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 
 #elif defined(CONFIG_RISCV)
 
-int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	bd_t *bd = gd->bd;
 
@@ -462,7 +462,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 
 #elif defined(CONFIG_ARC)
 
-int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	bd_t *bd = gd->bd;
 
@@ -476,7 +476,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 
 #elif defined(CONFIG_XTENSA)
 
-int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	print_std_bdinfo(gd->bd);
 	return 0;
diff --git a/cmd/bedbug.c b/cmd/bedbug.c
index d3e31212ea..425ba4af1f 100644
--- a/cmd/bedbug.c
+++ b/cmd/bedbug.c
@@ -56,7 +56,8 @@ int bedbug_init(void)
  * Entry point from the interpreter to the disassembler.  Repeated calls
  * will resume from the last disassembled address.
  * ====================================================================== */
-int do_bedbug_dis (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+int do_bedbug_dis(struct cmd_tbl *cmdtp, int flag, int argc,
+		  char *const argv[])
 {
 	ulong addr;		/* Address to start disassembly from    */
 	ulong len;		/* # of instructions to disassemble     */
@@ -96,7 +97,8 @@ U_BOOT_CMD (ds, 3, 1, do_bedbug_dis,
  * instructions in consecutive memory locations until a '.' (period) is
  * entered on a line by itself.
  * ====================================================================== */
-int do_bedbug_asm (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+int do_bedbug_asm(struct cmd_tbl *cmdtp, int flag, int argc,
+		  char *const argv[])
 {
 	long mem_addr;		/* Address to assemble into     */
 	unsigned long instr;	/* Machine code for text        */
@@ -146,7 +148,8 @@ U_BOOT_CMD (as, 2, 0, do_bedbug_asm,
  * CPU-specific break point set routine.
  * ====================================================================== */
 
-int do_bedbug_break (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+int do_bedbug_break(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[])
 {
 	/* -------------------------------------------------- */
 	if (bug_ctx.do_break)
@@ -242,7 +245,8 @@ void bedbug_main_loop (unsigned long addr, struct pt_regs *regs)
  * stopped flag in the context so that the breakpoint routine will
  * return.
  * ====================================================================== */
-int do_bedbug_continue (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+int do_bedbug_continue(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	/* -------------------------------------------------- */
 
@@ -265,7 +269,8 @@ U_BOOT_CMD (continue, 1, 0, do_bedbug_continue,
  * the address passes control to the CPU-specific set breakpoint routine
  * for the current breakpoint number.
  * ====================================================================== */
-int do_bedbug_step (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+int do_bedbug_step(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	unsigned long addr;	/* Address to stop at */
 
@@ -296,7 +301,8 @@ U_BOOT_CMD (step, 1, 1, do_bedbug_step,
  * the address passes control to the CPU-specific set breakpoint routine
  * for the current breakpoint number.
  * ====================================================================== */
-int do_bedbug_next (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+int do_bedbug_next(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	unsigned long addr;	/* Address to stop at */
 
@@ -325,7 +331,8 @@ U_BOOT_CMD (next, 1, 1, do_bedbug_next,
  * Interpreter command to print the current stack.  This assumes an EABI
  * architecture, so it starts with GPR R1 and works back up the stack.
  * ====================================================================== */
-int do_bedbug_stack (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+int do_bedbug_stack(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[])
 {
 	unsigned long sp;	/* Stack pointer                */
 	unsigned long func;	/* LR from stack                */
@@ -370,7 +377,8 @@ U_BOOT_CMD (where, 1, 1, do_bedbug_stack,
  * Interpreter command to dump the registers.  Calls the CPU-specific
  * show registers routine.
  * ====================================================================== */
-int do_bedbug_rdump (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+int do_bedbug_rdump(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[])
 {
 	/* -------------------------------------------------- */
 
diff --git a/cmd/bind.c b/cmd/bind.c
index 44a5f17f0d..068b1399ab 100644
--- a/cmd/bind.c
+++ b/cmd/bind.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <dm.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
@@ -194,8 +195,8 @@ static int unbind_by_node_path(const char *path)
 	return 0;
 }
 
-static int do_bind_unbind(cmd_tbl_t *cmdtp, int flag, int argc,
-			  char * const argv[])
+static int do_bind_unbind(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	int ret = 0;
 	bool bind;
diff --git a/cmd/binop.c b/cmd/binop.c
index 6d2df5f3dd..c85cb51568 100644
--- a/cmd/binop.c
+++ b/cmd/binop.c
@@ -64,7 +64,8 @@ void write_to_mem(char *varname, u8 *result, ulong len)
 	unmap_sysmem(buf);
 }
 
-static int do_binop(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_binop(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[])
 {
 	ulong len;
 	u8 *result, *src1, *src2;
diff --git a/cmd/blk_common.c b/cmd/blk_common.c
index cc6e161ba0..87f94b5abb 100644
--- a/cmd/blk_common.c
+++ b/cmd/blk_common.c
@@ -10,8 +10,9 @@
 
 #include <common.h>
 #include <blk.h>
+#include <command.h>
 
-int blk_common_cmd(int argc, char * const argv[], enum if_type if_type,
+int blk_common_cmd(int argc, char *const argv[], enum if_type if_type,
 		   int *cur_devnump)
 {
 	const char *if_name = blk_get_if_type_name(if_type);
diff --git a/cmd/blkcache.c b/cmd/blkcache.c
index 2cc65a9ee7..25f252e455 100644
--- a/cmd/blkcache.c
+++ b/cmd/blkcache.c
@@ -4,13 +4,14 @@
  * Author: Eric Nelson<eric@nelint.com>
  *
  */
+#include <command.h>
 #include <config.h>
 #include <common.h>
 #include <malloc.h>
 #include <part.h>
 
-static int blkc_show(cmd_tbl_t *cmdtp, int flag,
-		     int argc, char * const argv[])
+static int blkc_show(struct cmd_tbl *cmdtp, int flag,
+		     int argc, char *const argv[])
 {
 	struct block_cache_stats stats;
 	blkcache_stats(&stats);
@@ -25,8 +26,8 @@ static int blkc_show(cmd_tbl_t *cmdtp, int flag,
 	return 0;
 }
 
-static int blkc_configure(cmd_tbl_t *cmdtp, int flag,
-			  int argc, char * const argv[])
+static int blkc_configure(struct cmd_tbl *cmdtp, int flag,
+			  int argc, char *const argv[])
 {
 	unsigned blocks_per_entry, max_entries;
 	if (argc != 3)
@@ -40,7 +41,7 @@ static int blkc_configure(cmd_tbl_t *cmdtp, int flag,
 	return 0;
 }
 
-static cmd_tbl_t cmd_blkc_sub[] = {
+static struct cmd_tbl cmd_blkc_sub[] = {
 	U_BOOT_CMD_MKENT(show, 0, 0, blkc_show, "", ""),
 	U_BOOT_CMD_MKENT(configure, 3, 0, blkc_configure, "", ""),
 };
@@ -55,10 +56,10 @@ static __maybe_unused void blkc_reloc(void)
 	};
 }
 
-static int do_blkcache(cmd_tbl_t *cmdtp, int flag,
-		       int argc, char * const argv[])
+static int do_blkcache(struct cmd_tbl *cmdtp, int flag,
+		       int argc, char *const argv[])
 {
-	cmd_tbl_t *c;
+	struct cmd_tbl *c;
 
 #ifdef CONFIG_NEEDS_MANUAL_RELOC
 	blkc_reloc();
diff --git a/cmd/blob.c b/cmd/blob.c
index 80478b8802..c80e6977b4 100644
--- a/cmd/blob.c
+++ b/cmd/blob.c
@@ -48,7 +48,8 @@ __weak int blob_encap(u8 *key_mod, u8 *src, u8 *dst, u32 len)
  * Returns zero on success, CMD_RET_USAGE in case of misuse and negative
  * on error.
  */
-static int do_blob(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_blob(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	ulong key_addr, src_addr, dst_addr, len;
 	uint8_t *km_ptr, *src_ptr, *dst_ptr;
diff --git a/cmd/bmp.c b/cmd/bmp.c
index edf4f56426..0ad23231cb 100644
--- a/cmd/bmp.c
+++ b/cmd/bmp.c
@@ -91,7 +91,8 @@ struct bmp_image *gunzip_bmp(unsigned long addr, unsigned long *lenp,
 }
 #endif
 
-static int do_bmp_info(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+static int do_bmp_info(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	ulong addr;
 
@@ -109,7 +110,8 @@ static int do_bmp_info(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[
 	return (bmp_info(addr));
 }
 
-static int do_bmp_display(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+static int do_bmp_display(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	ulong addr;
 	int x = 0, y = 0;
@@ -141,7 +143,7 @@ static int do_bmp_display(cmd_tbl_t * cmdtp, int flag, int argc, char * const ar
 	 return (bmp_display(addr, x, y));
 }
 
-static cmd_tbl_t cmd_bmp_sub[] = {
+static struct cmd_tbl cmd_bmp_sub[] = {
 	U_BOOT_CMD_MKENT(info, 3, 0, do_bmp_info, "", ""),
 	U_BOOT_CMD_MKENT(display, 5, 0, do_bmp_display, "", ""),
 };
@@ -162,9 +164,9 @@ void bmp_reloc(void) {
  * Return:      None
  *
  */
-static int do_bmp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_bmp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
-	cmd_tbl_t *c;
+	struct cmd_tbl *c;
 
 	/* Strip off leading 'bmp' command argument */
 	argc--;
diff --git a/cmd/boot.c b/cmd/boot.c
index 9150fce80b..36aba22b30 100644
--- a/cmd/boot.c
+++ b/cmd/boot.c
@@ -16,12 +16,12 @@
 /* Allow ports to override the default behavior */
 __attribute__((weak))
 unsigned long do_go_exec(ulong (*entry)(int, char * const []), int argc,
-				 char * const argv[])
+				 char *const argv[])
 {
 	return entry (argc, argv);
 }
 
-static int do_go(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_go(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	ulong	addr, rc;
 	int     rcode = 0;
diff --git a/cmd/bootcount.c b/cmd/bootcount.c
index c358418ebe..654bbb805c 100644
--- a/cmd/bootcount.c
+++ b/cmd/bootcount.c
@@ -4,15 +4,15 @@
 #include <command.h>
 #include <bootcount.h>
 
-static int do_bootcount_print(cmd_tbl_t *cmdtp, int flag, int argc,
-			      char * const argv[])
+static int do_bootcount_print(struct cmd_tbl *cmdtp, int flag, int argc,
+			      char *const argv[])
 {
 	printf("%lu\n", bootcount_load());
 	return CMD_RET_SUCCESS;
 }
 
-static int do_bootcount_reset(cmd_tbl_t *cmdtp, int flag, int argc,
-			      char * const argv[])
+static int do_bootcount_reset(struct cmd_tbl *cmdtp, int flag, int argc,
+			      char *const argv[])
 {
 	/*
 	 * note that we're explicitly not resetting the environment
@@ -22,15 +22,15 @@ static int do_bootcount_reset(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_SUCCESS;
 }
 
-static cmd_tbl_t bootcount_sub[] = {
+static struct cmd_tbl bootcount_sub[] = {
 	U_BOOT_CMD_MKENT(print, 1, 1, do_bootcount_print, "", ""),
 	U_BOOT_CMD_MKENT(reset, 1, 1, do_bootcount_reset, "", ""),
 };
 
-static int do_bootcount(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_bootcount(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
-	cmd_tbl_t *cp;
+	struct cmd_tbl *cp;
 
 	if (argc < 2)
 		return CMD_RET_USAGE;
diff --git a/cmd/bootefi.c b/cmd/bootefi.c
index b0ba7316fb..e7cce785d1 100644
--- a/cmd/bootefi.c
+++ b/cmd/bootefi.c
@@ -599,7 +599,8 @@ static int do_efi_selftest(void)
  * @argv:	command line arguments
  * Return:	status code
  */
-static int do_bootefi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_bootefi(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	efi_status_t ret;
 	void *fdt;
diff --git a/cmd/booti.c b/cmd/booti.c
index 4fff8cfcf6..ead2332631 100644
--- a/cmd/booti.c
+++ b/cmd/booti.c
@@ -18,8 +18,8 @@ DECLARE_GLOBAL_DATA_PTR;
 /*
  * Image booting support
  */
-static int booti_start(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[], bootm_headers_t *images)
+static int booti_start(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[], bootm_headers_t *images)
 {
 	int ret;
 	ulong ld;
@@ -98,7 +98,7 @@ static int booti_start(cmd_tbl_t *cmdtp, int flag, int argc,
 	return 0;
 }
 
-int do_booti(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_booti(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int ret;
 
diff --git a/cmd/bootm.c b/cmd/bootm.c
index 931d53f0c7..d5f877cb54 100644
--- a/cmd/bootm.c
+++ b/cmd/bootm.c
@@ -34,12 +34,13 @@ extern flash_info_t flash_info[]; /* info for FLASH chips */
 #endif
 
 #if defined(CONFIG_CMD_IMLS) || defined(CONFIG_CMD_IMLS_NAND)
-static int do_imls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+static int do_imls(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[]);
 #endif
 
 /* we overload the cmd field with our state machine info instead of a
  * function pointer */
-static cmd_tbl_t cmd_bootm_sub[] = {
+static struct cmd_tbl cmd_bootm_sub[] = {
 	U_BOOT_CMD_MKENT(start, 0, 1, (void *)BOOTM_STATE_START, "", ""),
 	U_BOOT_CMD_MKENT(loados, 0, 1, (void *)BOOTM_STATE_LOADOS, "", ""),
 #ifdef CONFIG_SYS_BOOT_RAMDISK_HIGH
@@ -55,12 +56,12 @@ static cmd_tbl_t cmd_bootm_sub[] = {
 	U_BOOT_CMD_MKENT(go, 0, 1, (void *)BOOTM_STATE_OS_GO, "", ""),
 };
 
-static int do_bootm_subcommand(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_bootm_subcommand(struct cmd_tbl *cmdtp, int flag, int argc,
+			       char *const argv[])
 {
 	int ret = 0;
 	long state;
-	cmd_tbl_t *c;
+	struct cmd_tbl *c;
 
 	c = find_cmd_tbl(argv[0], &cmd_bootm_sub[0], ARRAY_SIZE(cmd_bootm_sub));
 	argc--; argv++;
@@ -89,7 +90,7 @@ static int do_bootm_subcommand(cmd_tbl_t *cmdtp, int flag, int argc,
 /* bootm - boot application image from image in memory */
 /*******************************************************************/
 
-int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bootm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 #ifdef CONFIG_NEEDS_MANUAL_RELOC
 	static int relocated = 0;
@@ -136,7 +137,7 @@ int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 		BOOTM_STATE_OS_GO, &images, 1);
 }
 
-int bootm_maybe_autostart(cmd_tbl_t *cmdtp, const char *cmd)
+int bootm_maybe_autostart(struct cmd_tbl *cmdtp, const char *cmd)
 {
 	const char *ep = env_get("autostart");
 
@@ -201,7 +202,7 @@ U_BOOT_CMD(
 /* bootd - boot default image */
 /*******************************************************************/
 #if defined(CONFIG_CMD_BOOTD)
-int do_bootd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bootd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	return run_command(env_get("bootcmd"), flag);
 }
@@ -226,7 +227,8 @@ U_BOOT_CMD(
 /* iminfo - print header info for a requested image */
 /*******************************************************************/
 #if defined(CONFIG_CMD_IMI)
-static int do_iminfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_iminfo(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	int	arg;
 	ulong	addr;
@@ -519,7 +521,8 @@ static int do_imls_nand(void)
 #endif
 
 #if defined(CONFIG_CMD_IMLS) || defined(CONFIG_CMD_IMLS_NAND)
-static int do_imls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_imls(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	int ret_nor = 0, ret_nand = 0;
 
diff --git a/cmd/bootmenu.c b/cmd/bootmenu.c
index f1562883f5..c89fb1f5b8 100644
--- a/cmd/bootmenu.c
+++ b/cmd/bootmenu.c
@@ -482,7 +482,7 @@ int menu_show(int bootdelay)
 }
 #endif
 
-int do_bootmenu(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_bootmenu(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	char *delay_str = NULL;
 	int delay = 10;
diff --git a/cmd/bootstage.c b/cmd/bootstage.c
index f1ea4e9598..0e623f216b 100644
--- a/cmd/bootstage.c
+++ b/cmd/bootstage.c
@@ -5,16 +5,17 @@
 
 #include <common.h>
 #include <bootstage.h>
+#include <command.h>
 
-static int do_bootstage_report(cmd_tbl_t *cmdtp, int flag, int argc,
-			       char * const argv[])
+static int do_bootstage_report(struct cmd_tbl *cmdtp, int flag, int argc,
+			       char *const argv[])
 {
 	bootstage_report();
 
 	return 0;
 }
 
-static int get_base_size(int argc, char * const argv[], ulong *basep,
+static int get_base_size(int argc, char *const argv[], ulong *basep,
 			 ulong *sizep)
 {
 	char *endp;
@@ -35,8 +36,8 @@ static int get_base_size(int argc, char * const argv[], ulong *basep,
 	return 0;
 }
 
-static int do_bootstage_stash(cmd_tbl_t *cmdtp, int flag, int argc,
-			      char * const argv[])
+static int do_bootstage_stash(struct cmd_tbl *cmdtp, int flag, int argc,
+			      char *const argv[])
 {
 	ulong base, size;
 	int ret;
@@ -58,7 +59,7 @@ static int do_bootstage_stash(cmd_tbl_t *cmdtp, int flag, int argc,
 	return 0;
 }
 
-static cmd_tbl_t cmd_bootstage_sub[] = {
+static struct cmd_tbl cmd_bootstage_sub[] = {
 	U_BOOT_CMD_MKENT(report, 2, 1, do_bootstage_report, "", ""),
 	U_BOOT_CMD_MKENT(stash, 4, 0, do_bootstage_stash, "", ""),
 	U_BOOT_CMD_MKENT(unstash, 4, 0, do_bootstage_stash, "", ""),
@@ -67,10 +68,10 @@ static cmd_tbl_t cmd_bootstage_sub[] = {
 /*
  * Process a bootstage sub-command
  */
-static int do_boostage(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_boostage(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
-	cmd_tbl_t *c;
+	struct cmd_tbl *c;
 
 	/* Strip off leading 'bootstage' command argument */
 	argc--;
diff --git a/cmd/bootz.c b/cmd/bootz.c
index f14a5fefbf..ac15856f8d 100644
--- a/cmd/bootz.c
+++ b/cmd/bootz.c
@@ -23,8 +23,8 @@ int __weak bootz_setup(ulong image, ulong *start, ulong *end)
 /*
  * zImage booting support
  */
-static int bootz_start(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[], bootm_headers_t *images)
+static int bootz_start(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[], bootm_headers_t *images)
 {
 	int ret;
 	ulong zi_start, zi_end;
@@ -59,7 +59,7 @@ static int bootz_start(cmd_tbl_t *cmdtp, int flag, int argc,
 	return 0;
 }
 
-int do_bootz(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bootz(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int ret;
 
diff --git a/cmd/btrfs.c b/cmd/btrfs.c
index faa1239cc8..7e3cbe12ce 100644
--- a/cmd/btrfs.c
+++ b/cmd/btrfs.c
@@ -8,7 +8,7 @@
 #include <btrfs.h>
 #include <fs.h>
 
-int do_btrsubvol(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_btrsubvol(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	if (argc != 3)
 		return CMD_RET_USAGE;
diff --git a/cmd/cache.c b/cmd/cache.c
index 7678615dd8..b68d45b98b 100644
--- a/cmd/cache.c
+++ b/cmd/cache.c
@@ -24,7 +24,8 @@ __weak void noncached_set_region(void)
 {
 }
 
-static int do_icache(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_icache(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	switch (argc) {
 	case 2:			/* on / off / flush */
@@ -58,7 +59,8 @@ void __weak flush_dcache_all(void)
 	/* please define arch specific flush_dcache_all */
 }
 
-static int do_dcache(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_dcache(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	switch (argc) {
 	case 2:			/* on / off / flush */
diff --git a/cmd/cbfs.c b/cmd/cbfs.c
index 98e652a4e7..8e91d4bb8c 100644
--- a/cmd/cbfs.c
+++ b/cmd/cbfs.c
@@ -11,7 +11,7 @@
 #include <env.h>
 #include <cbfs.h>
 
-static int do_cbfs_init(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_cbfs_init(struct cmd_tbl *cmdtp, int flag, int argc,
 			char *const argv[])
 {
 	uintptr_t end_of_rom = 0xffffffff;
@@ -45,7 +45,7 @@ U_BOOT_CMD(
 	"      CBFS is in. It defaults to 0xFFFFFFFF\n"
 );
 
-static int do_cbfs_fsload(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_cbfs_fsload(struct cmd_tbl *cmdtp, int flag, int argc,
 			  char *const argv[])
 {
 	const struct cbfs_cachenode *file;
@@ -92,7 +92,7 @@ U_BOOT_CMD(
 	"    - load binary file 'filename' from the cbfs to address 'addr'\n"
 );
 
-static int do_cbfs_ls(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_cbfs_ls(struct cmd_tbl *cmdtp, int flag, int argc,
 		      char *const argv[])
 {
 	const struct cbfs_cachenode *file = file_cbfs_get_first();
@@ -201,7 +201,7 @@ U_BOOT_CMD(
 	"    - list the files in the cbfs\n"
 );
 
-static int do_cbfs_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_cbfs_fsinfo(struct cmd_tbl *cmdtp, int flag, int argc,
 			  char *const argv[])
 {
 	const struct cbfs_header *header = file_cbfs_get_header();
diff --git a/cmd/clk.c b/cmd/clk.c
index 74ad868500..439736d072 100644
--- a/cmd/clk.c
+++ b/cmd/clk.c
@@ -72,7 +72,7 @@ int __weak soc_clk_dump(void)
 }
 #endif
 
-static int do_clk_dump(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_clk_dump(struct cmd_tbl *cmdtp, int flag, int argc,
 		       char *const argv[])
 {
 	int ret;
@@ -86,14 +86,14 @@ static int do_clk_dump(cmd_tbl_t *cmdtp, int flag, int argc,
 	return ret;
 }
 
-static cmd_tbl_t cmd_clk_sub[] = {
+static struct cmd_tbl cmd_clk_sub[] = {
 	U_BOOT_CMD_MKENT(dump, 1, 1, do_clk_dump, "", ""),
 };
 
-static int do_clk(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_clk(struct cmd_tbl *cmdtp, int flag, int argc,
 		  char *const argv[])
 {
-	cmd_tbl_t *c;
+	struct cmd_tbl *c;
 
 	if (argc < 2)
 		return CMD_RET_USAGE;
diff --git a/cmd/cls.c b/cmd/cls.c
index f1ce6e8df1..eab4e6993b 100644
--- a/cmd/cls.c
+++ b/cmd/cls.c
@@ -11,7 +11,7 @@
 #include <lcd.h>
 #include <video.h>
 
-static int do_video_clear(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_video_clear(struct cmd_tbl *cmdtp, int flag, int argc,
 			  char *const argv[])
 {
 #if defined(CONFIG_DM_VIDEO)
diff --git a/cmd/config.c b/cmd/config.c
index d2810d573b..cf30841a35 100644
--- a/cmd/config.c
+++ b/cmd/config.c
@@ -11,7 +11,8 @@
 #include "config_data_gz.h"
 #include "config_data_size.h"
 
-static int do_config(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_config(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	char *dst;
 	unsigned long len = data_size;
diff --git a/cmd/conitrace.c b/cmd/conitrace.c
index 85c5422b7e..e45e87a64c 100644
--- a/cmd/conitrace.c
+++ b/cmd/conitrace.c
@@ -8,8 +8,8 @@
 #include <common.h>
 #include <command.h>
 
-static int do_conitrace(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_conitrace(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	bool first = true;
 
diff --git a/cmd/console.c b/cmd/console.c
index 3f1d98b17b..9a1db83c7c 100644
--- a/cmd/console.c
+++ b/cmd/console.c
@@ -12,7 +12,8 @@
 #include <stdio_dev.h>
 
 extern void _do_coninfo (void);
-static int do_coninfo(cmd_tbl_t *cmd, int flag, int argc, char * const argv[])
+static int do_coninfo(struct cmd_tbl *cmd, int flag, int argc,
+		      char *const argv[])
 {
 	int l;
 	struct list_head *list = stdio_get_list();
diff --git a/cmd/cpu.c b/cmd/cpu.c
index 8c0abc1756..ff553c16c4 100644
--- a/cmd/cpu.c
+++ b/cmd/cpu.c
@@ -64,7 +64,7 @@ static int print_cpu_list(bool detail)
 	return 0;
 }
 
-static int do_cpu_list(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_cpu_list(struct cmd_tbl *cmdtp, int flag, int argc,
 		       char *const argv[])
 {
 	if (print_cpu_list(false))
@@ -73,7 +73,7 @@ static int do_cpu_list(cmd_tbl_t *cmdtp, int flag, int argc,
 	return 0;
 }
 
-static int do_cpu_detail(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_cpu_detail(struct cmd_tbl *cmdtp, int flag, int argc,
 			 char *const argv[])
 {
 	if (print_cpu_list(true))
@@ -82,7 +82,7 @@ static int do_cpu_detail(cmd_tbl_t *cmdtp, int flag, int argc,
 	return 0;
 }
 
-static cmd_tbl_t cmd_cpu_sub[] = {
+static struct cmd_tbl cmd_cpu_sub[] = {
 	U_BOOT_CMD_MKENT(list, 2, 1, do_cpu_list, "", ""),
 	U_BOOT_CMD_MKENT(detail, 4, 0, do_cpu_detail, "", ""),
 };
@@ -90,10 +90,10 @@ static cmd_tbl_t cmd_cpu_sub[] = {
 /*
  * Process a cpu sub-command
  */
-static int do_cpu(cmd_tbl_t *cmdtp, int flag, int argc,
-		  char * const argv[])
+static int do_cpu(struct cmd_tbl *cmdtp, int flag, int argc,
+		  char *const argv[])
 {
-	cmd_tbl_t *c = NULL;
+	struct cmd_tbl *c = NULL;
 
 	/* Strip off leading 'cpu' command argument */
 	argc--;
diff --git a/cmd/cramfs.c b/cmd/cramfs.c
index ad232deae0..1aeb56702c 100644
--- a/cmd/cramfs.c
+++ b/cmd/cramfs.c
@@ -94,7 +94,8 @@ extern int cramfs_info (struct part_info *info);
  * @param argv arguments list
  * @return 0 on success, 1 otherwise
  */
-int do_cramfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_cramfs_load(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	char *filename;
 	int size;
@@ -162,7 +163,7 @@ int do_cramfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
  * @param argv arguments list
  * @return 0 on success, 1 otherwise
  */
-int do_cramfs_ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_cramfs_ls(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	char *filename = "/";
 	int ret;
diff --git a/cmd/cros_ec.c b/cmd/cros_ec.c
index c6bbed9c4a..3c7dd4db9b 100644
--- a/cmd/cros_ec.c
+++ b/cmd/cros_ec.c
@@ -24,7 +24,7 @@ static const char * const ec_current_image_name[] = {"unknown", "RO", "RW"};
  * @param argv List of remaining parameters
  * @return flash region (EC_FLASH_REGION_...) or -1 on error
  */
-static int cros_ec_decode_region(int argc, char * const argv[])
+static int cros_ec_decode_region(int argc, char *const argv[])
 {
 	if (argc > 0) {
 		if (0 == strcmp(*argv, "rw"))
@@ -51,7 +51,7 @@ static int cros_ec_decode_region(int argc, char * const argv[])
  *	(negative EC_RES_...)
  */
 static int do_read_write(struct udevice *dev, int is_write, int argc,
-			 char * const argv[])
+			 char *const argv[])
 {
 	uint32_t offset, size = -1U, region_size;
 	unsigned long addr;
@@ -93,7 +93,8 @@ static int do_read_write(struct udevice *dev, int is_write, int argc,
 	return 0;
 }
 
-static int do_cros_ec(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_cros_ec(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	struct udevice *dev;
 	const char *cmd;
diff --git a/cmd/dataflash_mmc_mux.c b/cmd/dataflash_mmc_mux.c
index 9f271b6f61..73876e9464 100644
--- a/cmd/dataflash_mmc_mux.c
+++ b/cmd/dataflash_mmc_mux.c
@@ -9,7 +9,8 @@
 
 static int mmc_nspi (const char *);
 
-int do_dataflash_mmc_mux (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_dataflash_mmc_mux(struct cmd_tbl *cmdtp, int flag, int argc,
+			 char *const argv[])
 {
 	switch (argc) {
 	case 2:			/* on / off	*/
diff --git a/cmd/date.c b/cmd/date.c
index 7fa950a902..75a032cd27 100644
--- a/cmd/date.c
+++ b/cmd/date.c
@@ -29,7 +29,8 @@ int mk_date (const char *, struct rtc_time *);
 
 static struct rtc_time default_tm = { 0, 0, 0, 1, 1, 2000, 6, 0, 0 };
 
-static int do_date(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_date(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	struct rtc_time tm;
 	int rcode = 0;
diff --git a/cmd/demo.c b/cmd/demo.c
index 52c6e7ec15..9da06f5e4d 100644
--- a/cmd/demo.c
+++ b/cmd/demo.c
@@ -7,14 +7,15 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <dm-demo.h>
 #include <mapmem.h>
 #include <asm/io.h>
 
 struct udevice *demo_dev;
 
-static int do_demo_hello(cmd_tbl_t *cmdtp, int flag, int argc,
-			 char * const argv[])
+static int do_demo_hello(struct cmd_tbl *cmdtp, int flag, int argc,
+			 char *const argv[])
 {
 	int ch = 0;
 
@@ -24,8 +25,8 @@ static int do_demo_hello(cmd_tbl_t *cmdtp, int flag, int argc,
 	return demo_hello(demo_dev, ch);
 }
 
-static int do_demo_status(cmd_tbl_t *cmdtp, int flag, int argc,
-			  char * const argv[])
+static int do_demo_status(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	int status;
 	int ret;
@@ -39,8 +40,8 @@ static int do_demo_status(cmd_tbl_t *cmdtp, int flag, int argc,
 	return 0;
 }
 
-static int do_demo_light(cmd_tbl_t *cmdtp, int flag, int argc,
-			 char * const argv[])
+static int do_demo_light(struct cmd_tbl *cmdtp, int flag, int argc,
+			 char *const argv[])
 {
 	int light;
 	int ret;
@@ -59,7 +60,7 @@ static int do_demo_light(cmd_tbl_t *cmdtp, int flag, int argc,
 	return ret;
 }
 
-int do_demo_list(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_demo_list(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	struct udevice *dev;
 	int i, ret;
@@ -78,16 +79,17 @@ int do_demo_list(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return cmd_process_error(cmdtp, ret);
 }
 
-static cmd_tbl_t demo_commands[] = {
+static struct cmd_tbl demo_commands[] = {
 	U_BOOT_CMD_MKENT(list, 0, 1, do_demo_list, "", ""),
 	U_BOOT_CMD_MKENT(hello, 2, 1, do_demo_hello, "", ""),
 	U_BOOT_CMD_MKENT(light, 2, 1, do_demo_light, "", ""),
 	U_BOOT_CMD_MKENT(status, 1, 1, do_demo_status, "", ""),
 };
 
-static int do_demo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_demo(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
-	cmd_tbl_t *demo_cmd;
+	struct cmd_tbl *demo_cmd;
 	int devnum = 0;
 	int ret;
 
diff --git a/cmd/dfu.c b/cmd/dfu.c
index b30f8a5667..7310595a02 100644
--- a/cmd/dfu.c
+++ b/cmd/dfu.c
@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <watchdog.h>
 #include <dfu.h>
 #include <console.h>
@@ -18,7 +19,7 @@
 #include <usb.h>
 #include <net.h>
 
-static int do_dfu(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_dfu(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 
 	if (argc < 2)
diff --git a/cmd/diag.c b/cmd/diag.c
index 8d21c7dde8..f51536dbfa 100644
--- a/cmd/diag.c
+++ b/cmd/diag.c
@@ -11,7 +11,7 @@
 #include <command.h>
 #include <post.h>
 
-int do_diag (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+int do_diag(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	unsigned int i;
 
diff --git a/cmd/disk.c b/cmd/disk.c
index da0660148c..dbd08a06b2 100644
--- a/cmd/disk.c
+++ b/cmd/disk.c
@@ -10,7 +10,7 @@
 #include <image.h>
 #include <part.h>
 
-int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc,
+int common_diskboot(struct cmd_tbl *cmdtp, const char *intf, int argc,
 		    char *const argv[])
 {
 	__maybe_unused int dev;
diff --git a/cmd/dm.c b/cmd/dm.c
index 7a90685f8b..4e307ac524 100644
--- a/cmd/dm.c
+++ b/cmd/dm.c
@@ -16,39 +16,39 @@
 #include <dm/root.h>
 #include <dm/util.h>
 
-static int do_dm_dump_all(cmd_tbl_t *cmdtp, int flag, int argc,
-			  char * const argv[])
+static int do_dm_dump_all(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	dm_dump_all();
 
 	return 0;
 }
 
-static int do_dm_dump_uclass(cmd_tbl_t *cmdtp, int flag, int argc,
-			     char * const argv[])
+static int do_dm_dump_uclass(struct cmd_tbl *cmdtp, int flag, int argc,
+			     char *const argv[])
 {
 	dm_dump_uclass();
 
 	return 0;
 }
 
-static int do_dm_dump_devres(cmd_tbl_t *cmdtp, int flag, int argc,
-			     char * const argv[])
+static int do_dm_dump_devres(struct cmd_tbl *cmdtp, int flag, int argc,
+			     char *const argv[])
 {
 	dm_dump_devres();
 
 	return 0;
 }
 
-static int do_dm_dump_drivers(cmd_tbl_t *cmdtp, int flag, int argc,
-			      char * const argv[])
+static int do_dm_dump_drivers(struct cmd_tbl *cmdtp, int flag, int argc,
+			      char *const argv[])
 {
 	dm_dump_drivers();
 
 	return 0;
 }
 
-static cmd_tbl_t test_commands[] = {
+static struct cmd_tbl test_commands[] = {
 	U_BOOT_CMD_MKENT(tree, 0, 1, do_dm_dump_all, "", ""),
 	U_BOOT_CMD_MKENT(uclass, 1, 1, do_dm_dump_uclass, "", ""),
 	U_BOOT_CMD_MKENT(devres, 1, 1, do_dm_dump_devres, "", ""),
@@ -65,9 +65,9 @@ static __maybe_unused void dm_reloc(void)
 	}
 }
 
-static int do_dm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_dm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
-	cmd_tbl_t *test_cmd;
+	struct cmd_tbl *test_cmd;
 	int ret;
 
 #ifdef CONFIG_NEEDS_MANUAL_RELOC
diff --git a/cmd/echo.c b/cmd/echo.c
index 5b018d9349..d02a4cfd58 100644
--- a/cmd/echo.c
+++ b/cmd/echo.c
@@ -7,7 +7,8 @@
 #include <common.h>
 #include <command.h>
 
-static int do_echo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_echo(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	int i;
 	int putnl = 1;
diff --git a/cmd/eeprom.c b/cmd/eeprom.c
index 792415ef93..f61a5510e8 100644
--- a/cmd/eeprom.c
+++ b/cmd/eeprom.c
@@ -237,7 +237,7 @@ static int parse_numeric_param(char *str)
  * @returns:	number of arguments parsed or CMD_RET_USAGE if error
  */
 static int parse_i2c_bus_addr(int *i2c_bus, ulong *i2c_addr, int argc,
-			      char * const argv[], int argc_no_bus_addr)
+			      char *const argv[], int argc_no_bus_addr)
 {
 	int argc_no_bus = argc_no_bus_addr + 1;
 	int argc_bus_addr = argc_no_bus_addr + 2;
@@ -355,7 +355,7 @@ static int eeprom_execute_command(enum eeprom_action action, int i2c_bus,
 }
 
 #define NEXT_PARAM(argc, index)	{ (argc)--; (index)++; }
-int do_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_eeprom(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int layout_ver = LAYOUT_VERSION_AUTODETECT;
 	enum eeprom_action action = EEPROM_ACTION_INVALID;
diff --git a/cmd/efi.c b/cmd/efi.c
index ea239a01f0..c7640c862e 100644
--- a/cmd/efi.c
+++ b/cmd/efi.c
@@ -191,7 +191,8 @@ static void efi_print_mem_table(struct efi_entry_memmap *map,
 		printf("*Some areas are merged (use 'all' to see)\n");
 }
 
-static int do_efi_mem(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_efi_mem(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	struct efi_mem_desc *desc;
 	struct efi_entry_memmap *map;
@@ -231,13 +232,13 @@ done:
 	return ret ? CMD_RET_FAILURE : 0;
 }
 
-static cmd_tbl_t efi_commands[] = {
+static struct cmd_tbl efi_commands[] = {
 	U_BOOT_CMD_MKENT(mem, 1, 1, do_efi_mem, "", ""),
 };
 
-static int do_efi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_efi(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
-	cmd_tbl_t *efi_cmd;
+	struct cmd_tbl *efi_cmd;
 	int ret;
 
 	if (argc < 2)
diff --git a/cmd/efidebug.c b/cmd/efidebug.c
index d8a76d78a3..702cebe50f 100644
--- a/cmd/efidebug.c
+++ b/cmd/efidebug.c
@@ -60,8 +60,8 @@ static const char sep[] = "================";
  * Implement efidebug "devices" sub-command.
  * Show all UEFI devices and their information.
  */
-static int do_efi_show_devices(cmd_tbl_t *cmdtp, int flag,
-			       int argc, char * const argv[])
+static int do_efi_show_devices(struct cmd_tbl *cmdtp, int flag,
+			       int argc, char *const argv[])
 {
 	efi_handle_t *handles;
 	efi_uintn_t num, i;
@@ -139,8 +139,8 @@ static int efi_get_driver_handle_info(efi_handle_t handle, u16 **driver_name,
  * Implement efidebug "drivers" sub-command.
  * Show all UEFI drivers and their information.
  */
-static int do_efi_show_drivers(cmd_tbl_t *cmdtp, int flag,
-			       int argc, char * const argv[])
+static int do_efi_show_drivers(struct cmd_tbl *cmdtp, int flag,
+			       int argc, char *const argv[])
 {
 	efi_handle_t *handles;
 	efi_uintn_t num, i;
@@ -311,8 +311,8 @@ static const char *get_guid_text(const void *guid)
  * Show all UEFI handles and their information, currently all protocols
  * added to handle.
  */
-static int do_efi_show_handles(cmd_tbl_t *cmdtp, int flag,
-			       int argc, char * const argv[])
+static int do_efi_show_handles(struct cmd_tbl *cmdtp, int flag,
+			       int argc, char *const argv[])
 {
 	efi_handle_t *handles;
 	efi_guid_t **guid;
@@ -371,8 +371,8 @@ static int do_efi_show_handles(cmd_tbl_t *cmdtp, int flag,
  * Implement efidebug "images" sub-command.
  * Show all UEFI loaded images and their information.
  */
-static int do_efi_show_images(cmd_tbl_t *cmdtp, int flag,
-			      int argc, char * const argv[])
+static int do_efi_show_images(struct cmd_tbl *cmdtp, int flag,
+			      int argc, char *const argv[])
 {
 	efi_print_image_infos(NULL);
 
@@ -453,8 +453,8 @@ static void print_memory_attributes(u64 attributes)
  * Implement efidebug "memmap" sub-command.
  * Show UEFI memory map.
  */
-static int do_efi_show_memmap(cmd_tbl_t *cmdtp, int flag,
-			      int argc, char * const argv[])
+static int do_efi_show_memmap(struct cmd_tbl *cmdtp, int flag,
+			      int argc, char *const argv[])
 {
 	struct efi_mem_desc *memmap = NULL, *map;
 	efi_uintn_t map_size = 0;
@@ -516,8 +516,8 @@ static int do_efi_show_memmap(cmd_tbl_t *cmdtp, int flag,
  * Implement efidebug "tables" sub-command.
  * Show UEFI configuration tables.
  */
-static int do_efi_show_tables(cmd_tbl_t *cmdtp, int flag,
-			      int argc, char * const argv[])
+static int do_efi_show_tables(struct cmd_tbl *cmdtp, int flag,
+			      int argc, char *const argv[])
 {
 	efi_uintn_t i;
 	const char *guid_str;
@@ -546,8 +546,8 @@ static int do_efi_show_tables(cmd_tbl_t *cmdtp, int flag,
  *
  *     efidebug boot add <id> <label> <interface> <devnum>[:<part>] <file> <options>
  */
-static int do_efi_boot_add(cmd_tbl_t *cmdtp, int flag,
-			   int argc, char * const argv[])
+static int do_efi_boot_add(struct cmd_tbl *cmdtp, int flag,
+			   int argc, char *const argv[])
 {
 	int id;
 	char *endp;
@@ -645,8 +645,8 @@ out:
  *
  *     efidebug boot rm <id> ...
  */
-static int do_efi_boot_rm(cmd_tbl_t *cmdtp, int flag,
-			  int argc, char * const argv[])
+static int do_efi_boot_rm(struct cmd_tbl *cmdtp, int flag,
+			  int argc, char *const argv[])
 {
 	efi_guid_t guid;
 	int id, i;
@@ -782,8 +782,8 @@ static int u16_tohex(u16 c)
  *
  *     efidebug boot dump
  */
-static int do_efi_boot_dump(cmd_tbl_t *cmdtp, int flag,
-			    int argc, char * const argv[])
+static int do_efi_boot_dump(struct cmd_tbl *cmdtp, int flag,
+			    int argc, char *const argv[])
 {
 	u16 *var_name16, *p;
 	efi_uintn_t buf_size, size;
@@ -951,8 +951,8 @@ out:
  *
  *     efidebug boot next <id>
  */
-static int do_efi_boot_next(cmd_tbl_t *cmdtp, int flag,
-			    int argc, char * const argv[])
+static int do_efi_boot_next(struct cmd_tbl *cmdtp, int flag,
+			    int argc, char *const argv[])
 {
 	u16 bootnext;
 	efi_uintn_t size;
@@ -1000,8 +1000,8 @@ out:
  *
  *     efidebug boot order [<id> ...]
  */
-static int do_efi_boot_order(cmd_tbl_t *cmdtp, int flag,
-			     int argc, char * const argv[])
+static int do_efi_boot_order(struct cmd_tbl *cmdtp, int flag,
+			     int argc, char *const argv[])
 {
 	u16 *bootorder = NULL;
 	efi_uintn_t size;
@@ -1049,7 +1049,7 @@ out:
 	return r;
 }
 
-static cmd_tbl_t cmd_efidebug_boot_sub[] = {
+static struct cmd_tbl cmd_efidebug_boot_sub[] = {
 	U_BOOT_CMD_MKENT(add, CONFIG_SYS_MAXARGS, 1, do_efi_boot_add, "", ""),
 	U_BOOT_CMD_MKENT(rm, CONFIG_SYS_MAXARGS, 1, do_efi_boot_rm, "", ""),
 	U_BOOT_CMD_MKENT(dump, CONFIG_SYS_MAXARGS, 1, do_efi_boot_dump, "", ""),
@@ -1070,10 +1070,10 @@ static cmd_tbl_t cmd_efidebug_boot_sub[] = {
  *
  * Implement efidebug "boot" sub-command.
  */
-static int do_efi_boot_opt(cmd_tbl_t *cmdtp, int flag,
-			   int argc, char * const argv[])
+static int do_efi_boot_opt(struct cmd_tbl *cmdtp, int flag,
+			   int argc, char *const argv[])
 {
-	cmd_tbl_t *cp;
+	struct cmd_tbl *cp;
 
 	if (argc < 2)
 		return CMD_RET_USAGE;
@@ -1103,7 +1103,7 @@ static int do_efi_boot_opt(cmd_tbl_t *cmdtp, int flag,
  *
  *     efidebug test bootmgr
  */
-static int do_efi_test_bootmgr(cmd_tbl_t *cmdtp, int flag,
+static int do_efi_test_bootmgr(struct cmd_tbl *cmdtp, int flag,
 			       int argc, char * const argv[])
 {
 	efi_handle_t image;
@@ -1125,7 +1125,7 @@ static int do_efi_test_bootmgr(cmd_tbl_t *cmdtp, int flag,
 	return CMD_RET_SUCCESS;
 }
 
-static cmd_tbl_t cmd_efidebug_test_sub[] = {
+static struct cmd_tbl cmd_efidebug_test_sub[] = {
 	U_BOOT_CMD_MKENT(bootmgr, CONFIG_SYS_MAXARGS, 1, do_efi_test_bootmgr,
 			 "", ""),
 };
@@ -1142,10 +1142,10 @@ static cmd_tbl_t cmd_efidebug_test_sub[] = {
  *
  * Implement efidebug "test" sub-command.
  */
-static int do_efi_test(cmd_tbl_t *cmdtp, int flag,
+static int do_efi_test(struct cmd_tbl *cmdtp, int flag,
 		       int argc, char * const argv[])
 {
-	cmd_tbl_t *cp;
+	struct cmd_tbl *cp;
 
 	if (argc < 2)
 		return CMD_RET_USAGE;
@@ -1160,7 +1160,7 @@ static int do_efi_test(cmd_tbl_t *cmdtp, int flag,
 	return cp->cmd(cmdtp, flag, argc, argv);
 }
 
-static cmd_tbl_t cmd_efidebug_sub[] = {
+static struct cmd_tbl cmd_efidebug_sub[] = {
 	U_BOOT_CMD_MKENT(boot, CONFIG_SYS_MAXARGS, 1, do_efi_boot_opt, "", ""),
 	U_BOOT_CMD_MKENT(devices, CONFIG_SYS_MAXARGS, 1, do_efi_show_devices,
 			 "", ""),
@@ -1191,10 +1191,10 @@ static cmd_tbl_t cmd_efidebug_sub[] = {
  * Implement efidebug command which allows us to display and
  * configure UEFI environment.
  */
-static int do_efidebug(cmd_tbl_t *cmdtp, int flag,
-		       int argc, char * const argv[])
+static int do_efidebug(struct cmd_tbl *cmdtp, int flag,
+		       int argc, char *const argv[])
 {
-	cmd_tbl_t *cp;
+	struct cmd_tbl *cp;
 	efi_status_t r;
 
 	if (argc < 2)
diff --git a/cmd/elf.c b/cmd/elf.c
index 0d6d2ce604..4f2969a6d9 100644
--- a/cmd/elf.c
+++ b/cmd/elf.c
@@ -21,7 +21,7 @@
 
 /* Allow ports to override the default behavior */
 static unsigned long do_bootelf_exec(ulong (*entry)(int, char * const[]),
-				     int argc, char * const argv[])
+				     int argc, char *const argv[])
 {
 	unsigned long ret;
 
@@ -35,7 +35,7 @@ static unsigned long do_bootelf_exec(ulong (*entry)(int, char * const[]),
 }
 
 /* Interpreter command to boot an arbitrary ELF image from memory */
-int do_bootelf(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bootelf(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	unsigned long addr; /* Address of the ELF image */
 	unsigned long rc; /* Return value from user code */
@@ -91,7 +91,7 @@ int do_bootelf(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
  * be either an ELF image or a raw binary.  Will attempt to setup the
  * bootline and other parameters correctly.
  */
-int do_bootvx(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bootvx(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	unsigned long addr; /* Address of image */
 	unsigned long bootaddr = 0; /* Address to put the bootline */
diff --git a/cmd/ethsw.c b/cmd/ethsw.c
index d178a0c10d..f8b8a798bf 100644
--- a/cmd/ethsw.c
+++ b/cmd/ethsw.c
@@ -1000,7 +1000,7 @@ static void cmd_keywords_check(struct ethsw_command_def *parsed_cmd,
 }
 
 /* find all the keywords in the command */
-static int keywords_find(int argc, char * const argv[],
+static int keywords_find(int argc, char *const argv[],
 			 struct ethsw_command_def *parsed_cmd)
 {
 	int i;
@@ -1065,7 +1065,8 @@ static void command_def_init(struct ethsw_command_def *parsed_cmd)
 }
 
 /* function to interpret commands starting with "ethsw " */
-static int do_ethsw(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_ethsw(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[])
 {
 	struct ethsw_command_def parsed_cmd;
 	int rc = CMD_RET_SUCCESS;
diff --git a/cmd/exit.c b/cmd/exit.c
index f40d0686e1..7bf241ec73 100644
--- a/cmd/exit.c
+++ b/cmd/exit.c
@@ -7,7 +7,8 @@
 #include <common.h>
 #include <command.h>
 
-static int do_exit(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_exit(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	int r;
 
diff --git a/cmd/ext2.c b/cmd/ext2.c
index dc56ab25ff..57a99516a6 100644
--- a/cmd/ext2.c
+++ b/cmd/ext2.c
@@ -19,9 +19,12 @@
 /*
  * Ext2fs support
  */
+#include <common.h>
+#include <command.h>
 #include <fs.h>
 
-static int do_ext2ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_ext2ls(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	return do_ls(cmdtp, flag, argc, argv, FS_TYPE_EXT);
 }
@@ -29,7 +32,7 @@ static int do_ext2ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 /******************************************************************************
  * Ext2fs boot command intepreter. Derived from diskboot
  */
-int do_ext2load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_ext2load(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	return do_load(cmdtp, flag, argc, argv, FS_TYPE_EXT);
 }
diff --git a/cmd/ext4.c b/cmd/ext4.c
index d2fa7f1db1..4791b69fd9 100644
--- a/cmd/ext4.c
+++ b/cmd/ext4.c
@@ -41,25 +41,23 @@
 #include <usb.h>
 #endif
 
-int do_ext4_size(cmd_tbl_t *cmdtp, int flag, int argc,
-						char *const argv[])
+int do_ext4_size(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	return do_size(cmdtp, flag, argc, argv, FS_TYPE_EXT);
 }
 
-int do_ext4_load(cmd_tbl_t *cmdtp, int flag, int argc,
-						char *const argv[])
+int do_ext4_load(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	return do_load(cmdtp, flag, argc, argv, FS_TYPE_EXT);
 }
 
-int do_ext4_ls(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_ext4_ls(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	return do_ls(cmdtp, flag, argc, argv, FS_TYPE_EXT);
 }
 
 #if defined(CONFIG_CMD_EXT4_WRITE)
-int do_ext4_write(cmd_tbl_t *cmdtp, int flag, int argc,
+int do_ext4_write(struct cmd_tbl *cmdtp, int flag, int argc,
 		  char *const argv[])
 {
 	return do_save(cmdtp, flag, argc, argv, FS_TYPE_EXT);
diff --git a/cmd/fastboot.c b/cmd/fastboot.c
index 1b4215114d..4f35108a36 100644
--- a/cmd/fastboot.c
+++ b/cmd/fastboot.c
@@ -93,7 +93,8 @@ exit:
 #endif
 }
 
-static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_fastboot(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	uintptr_t buf_addr = (uintptr_t)NULL;
 	size_t buf_size = 0;
diff --git a/cmd/fat.c b/cmd/fat.c
index a063a623ce..b438ce16c9 100644
--- a/cmd/fat.c
+++ b/cmd/fat.c
@@ -8,13 +8,14 @@
  * Boot support
  */
 #include <common.h>
+#include <command.h>
 #include <mapmem.h>
 #include <fat.h>
 #include <fs.h>
 #include <part.h>
 #include <asm/cache.h>
 
-int do_fat_size(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_fat_size(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	return do_size(cmdtp, flag, argc, argv, FS_TYPE_FAT);
 }
@@ -27,7 +28,7 @@ U_BOOT_CMD(
 	"      and determine its size."
 );
 
-int do_fat_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_fat_fsload(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	return do_load(cmdtp, flag, argc, argv, FS_TYPE_FAT);
 }
@@ -48,7 +49,8 @@ U_BOOT_CMD(
 	"      be printed and performance will suffer for the load."
 );
 
-static int do_fat_ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_fat_ls(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	return do_ls(cmdtp, flag, argc, argv, FS_TYPE_FAT);
 }
@@ -60,8 +62,8 @@ U_BOOT_CMD(
 	"    - list files from 'dev' on 'interface' in a 'directory'"
 );
 
-static int do_fat_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc,
-			 char * const argv[])
+static int do_fat_fsinfo(struct cmd_tbl *cmdtp, int flag, int argc,
+			 char *const argv[])
 {
 	int dev, part;
 	struct blk_desc *dev_desc;
@@ -93,8 +95,8 @@ U_BOOT_CMD(
 );
 
 #ifdef CONFIG_FAT_WRITE
-static int do_fat_fswrite(cmd_tbl_t *cmdtp, int flag,
-		int argc, char * const argv[])
+static int do_fat_fswrite(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	loff_t size;
 	int ret;
@@ -148,7 +150,8 @@ U_BOOT_CMD(
 	"      to 'dev' on 'interface'"
 );
 
-static int do_fat_rm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_fat_rm(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	return do_rm(cmdtp, flag, argc, argv, FS_TYPE_FAT);
 }
@@ -160,8 +163,8 @@ U_BOOT_CMD(
 	"    - delete a file from 'dev' on 'interface'"
 );
 
-static int do_fat_mkdir(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_fat_mkdir(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	return do_mkdir(cmdtp, flag, argc, argv, FS_TYPE_FAT);
 }
diff --git a/cmd/fdt.c b/cmd/fdt.c
index f66ceca2c7..99b1b5b3fc 100644
--- a/cmd/fdt.c
+++ b/cmd/fdt.c
@@ -88,7 +88,7 @@ static const char * const fdt_member_table[] = {
 	"size_dt_struct",
 };
 
-static int fdt_get_header_value(int argc, char * const argv[])
+static int fdt_get_header_value(int argc, char *const argv[])
 {
 	fdt32_t *fdtp = (fdt32_t *)working_fdt;
 	ulong val;
@@ -112,7 +112,7 @@ static int fdt_get_header_value(int argc, char * const argv[])
 /*
  * Flattened Device Tree command, see the help for parameter definitions.
  */
-static int do_fdt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_fdt(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	if (argc < 2)
 		return CMD_RET_USAGE;
diff --git a/cmd/fitupd.c b/cmd/fitupd.c
index 1e5edd9f9b..f6270d9c15 100644
--- a/cmd/fitupd.c
+++ b/cmd/fitupd.c
@@ -12,7 +12,8 @@
 #error "CONFIG_UPDATE_TFTP required"
 #endif
 
-static int do_fitupd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_fitupd(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	ulong addr = 0UL;
 
diff --git a/cmd/flash.c b/cmd/flash.c
index df97fe740d..452b040dbc 100644
--- a/cmd/flash.c
+++ b/cmd/flash.c
@@ -269,7 +269,8 @@ flash_fill_sect_ranges (ulong addr_first, ulong addr_last,
 }
 #endif /* CONFIG_MTD_NOR_FLASH */
 
-static int do_flinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_flinfo(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 #ifdef CONFIG_MTD_NOR_FLASH
 	ulong bank;
@@ -297,7 +298,8 @@ static int do_flinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return 0;
 }
 
-static int do_flerase(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_flerase(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 #ifdef CONFIG_MTD_NOR_FLASH
 	flash_info_t *info = NULL;
@@ -431,7 +433,8 @@ int flash_sect_erase(ulong addr_first, ulong addr_last)
 }
 #endif /* CONFIG_MTD_NOR_FLASH */
 
-static int do_protect(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_protect(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	int rcode = 0;
 #ifdef CONFIG_MTD_NOR_FLASH
diff --git a/cmd/fpga.c b/cmd/fpga.c
index 563528ca5e..47307bfc89 100644
--- a/cmd/fpga.c
+++ b/cmd/fpga.c
@@ -34,7 +34,8 @@ static long do_fpga_get_device(char *arg)
 }
 
 static int do_fpga_check_params(long *dev, long *fpga_data, size_t *data_size,
-				cmd_tbl_t *cmdtp, int argc, char *const argv[])
+				struct cmd_tbl *cmdtp, int argc,
+				char *const argv[])
 {
 	size_t local_data_size;
 	long local_fpga_data;
@@ -66,7 +67,7 @@ static int do_fpga_check_params(long *dev, long *fpga_data, size_t *data_size,
 }
 
 #if defined(CONFIG_CMD_FPGA_LOAD_SECURE)
-int do_fpga_loads(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_fpga_loads(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	size_t data_size = 0;
 	long fpga_data, dev;
@@ -118,7 +119,7 @@ int do_fpga_loads(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 #endif
 
 #if defined(CONFIG_CMD_FPGA_LOADFS)
-static int do_fpga_loadfs(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_fpga_loadfs(struct cmd_tbl *cmdtp, int flag, int argc,
 			  char *const argv[])
 {
 	size_t data_size = 0;
@@ -141,16 +142,16 @@ static int do_fpga_loadfs(cmd_tbl_t *cmdtp, int flag, int argc,
 }
 #endif
 
-static int do_fpga_info(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_fpga_info(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	long dev = do_fpga_get_device(argv[0]);
 
 	return fpga_info(dev);
 }
 
-static int do_fpga_dump(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_fpga_dump(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	size_t data_size = 0;
 	long fpga_data, dev;
@@ -164,8 +165,8 @@ static int do_fpga_dump(cmd_tbl_t *cmdtp, int flag, int argc,
 	return fpga_dump(dev, (void *)fpga_data, data_size);
 }
 
-static int do_fpga_load(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_fpga_load(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	size_t data_size = 0;
 	long fpga_data, dev;
@@ -179,8 +180,8 @@ static int do_fpga_load(cmd_tbl_t *cmdtp, int flag, int argc,
 	return fpga_load(dev, (void *)fpga_data, data_size, BIT_FULL);
 }
 
-static int do_fpga_loadb(cmd_tbl_t *cmdtp, int flag, int argc,
-			 char * const argv[])
+static int do_fpga_loadb(struct cmd_tbl *cmdtp, int flag, int argc,
+			 char *const argv[])
 {
 	size_t data_size = 0;
 	long fpga_data, dev;
@@ -195,8 +196,8 @@ static int do_fpga_loadb(cmd_tbl_t *cmdtp, int flag, int argc,
 }
 
 #if defined(CONFIG_CMD_FPGA_LOADP)
-static int do_fpga_loadp(cmd_tbl_t *cmdtp, int flag, int argc,
-			 char * const argv[])
+static int do_fpga_loadp(struct cmd_tbl *cmdtp, int flag, int argc,
+			 char *const argv[])
 {
 	size_t data_size = 0;
 	long fpga_data, dev;
@@ -212,8 +213,8 @@ static int do_fpga_loadp(cmd_tbl_t *cmdtp, int flag, int argc,
 #endif
 
 #if defined(CONFIG_CMD_FPGA_LOADBP)
-static int do_fpga_loadbp(cmd_tbl_t *cmdtp, int flag, int argc,
-			  char * const argv[])
+static int do_fpga_loadbp(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	size_t data_size = 0;
 	long fpga_data, dev;
@@ -230,8 +231,8 @@ static int do_fpga_loadbp(cmd_tbl_t *cmdtp, int flag, int argc,
 #endif
 
 #if defined(CONFIG_CMD_FPGA_LOADMK)
-static int do_fpga_loadmk(cmd_tbl_t *cmdtp, int flag, int argc,
-			  char * const argv[])
+static int do_fpga_loadmk(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	size_t data_size = 0;
 	void *fpga_data = NULL;
@@ -363,7 +364,7 @@ static int do_fpga_loadmk(cmd_tbl_t *cmdtp, int flag, int argc,
 }
 #endif
 
-static cmd_tbl_t fpga_commands[] = {
+static struct cmd_tbl fpga_commands[] = {
 	U_BOOT_CMD_MKENT(info, 1, 1, do_fpga_info, "", ""),
 	U_BOOT_CMD_MKENT(dump, 3, 1, do_fpga_dump, "", ""),
 	U_BOOT_CMD_MKENT(load, 3, 1, do_fpga_load, "", ""),
@@ -385,10 +386,10 @@ static cmd_tbl_t fpga_commands[] = {
 #endif
 };
 
-static int do_fpga_wrapper(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_fpga_wrapper(struct cmd_tbl *cmdtp, int flag, int argc,
 			   char *const argv[])
 {
-	cmd_tbl_t *fpga_cmd;
+	struct cmd_tbl *fpga_cmd;
 	int ret;
 
 	if (argc < 2)
diff --git a/cmd/fpgad.c b/cmd/fpgad.c
index 0d55453eaa..fb2fe63e78 100644
--- a/cmd/fpgad.c
+++ b/cmd/fpgad.c
@@ -25,7 +25,7 @@ static uint	dp_last_length = 0x40;
  *	fpgad {fpga} {addr} {len}
  */
 #define DISP_LINE_LEN	16
-int do_fpga_md(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_fpga_md(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	unsigned int k;
 	unsigned int fpga;
diff --git a/cmd/fs.c b/cmd/fs.c
index db74767b7b..3a0c465c15 100644
--- a/cmd/fs.c
+++ b/cmd/fs.c
@@ -9,7 +9,8 @@
 #include <command.h>
 #include <fs.h>
 
-static int do_size_wrapper(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_size_wrapper(struct cmd_tbl *cmdtp, int flag, int argc,
+			   char *const argv[])
 {
 	return do_size(cmdtp, flag, argc, argv, FS_TYPE_ANY);
 }
@@ -22,8 +23,8 @@ U_BOOT_CMD(
 	"      and determine its size."
 );
 
-static int do_load_wrapper(cmd_tbl_t *cmdtp, int flag, int argc,
-				char * const argv[])
+static int do_load_wrapper(struct cmd_tbl *cmdtp, int flag, int argc,
+			   char *const argv[])
 {
 	return do_load(cmdtp, flag, argc, argv, FS_TYPE_ANY);
 }
@@ -40,8 +41,8 @@ U_BOOT_CMD(
 	"      If 'pos' is 0 or omitted, the file is read from the start."
 )
 
-static int do_save_wrapper(cmd_tbl_t *cmdtp, int flag, int argc,
-				char * const argv[])
+static int do_save_wrapper(struct cmd_tbl *cmdtp, int flag, int argc,
+			   char *const argv[])
 {
 	return do_save(cmdtp, flag, argc, argv, FS_TYPE_ANY);
 }
@@ -57,8 +58,8 @@ U_BOOT_CMD(
 	"      If 'pos' is 0 or omitted, the file is written from the start."
 )
 
-static int do_ls_wrapper(cmd_tbl_t *cmdtp, int flag, int argc,
-				char * const argv[])
+static int do_ls_wrapper(struct cmd_tbl *cmdtp, int flag, int argc,
+			 char *const argv[])
 {
 	return do_ls(cmdtp, flag, argc, argv, FS_TYPE_ANY);
 }
@@ -71,8 +72,8 @@ U_BOOT_CMD(
 	"      device type 'interface' instance 'dev'."
 )
 
-static int do_ln_wrapper(cmd_tbl_t *cmdtp, int flag, int argc,
-			 char * const argv[])
+static int do_ln_wrapper(struct cmd_tbl *cmdtp, int flag, int argc,
+			 char *const argv[])
 {
 	return do_ln(cmdtp, flag, argc, argv, FS_TYPE_ANY);
 }
@@ -85,8 +86,8 @@ U_BOOT_CMD(
 	"      device type 'interface' instance 'dev'."
 )
 
-static int do_fstype_wrapper(cmd_tbl_t *cmdtp, int flag, int argc,
-				char * const argv[])
+static int do_fstype_wrapper(struct cmd_tbl *cmdtp, int flag, int argc,
+			     char *const argv[])
 {
 	return do_fs_type(cmdtp, flag, argc, argv);
 }
diff --git a/cmd/fs_uuid.c b/cmd/fs_uuid.c
index 02ae9b7f3c..5dc94aa640 100644
--- a/cmd/fs_uuid.c
+++ b/cmd/fs_uuid.c
@@ -9,8 +9,8 @@
 #include <command.h>
 #include <fs.h>
 
-static int do_fs_uuid_wrapper(cmd_tbl_t *cmdtp, int flag,
-	int argc, char * const argv[])
+static int do_fs_uuid_wrapper(struct cmd_tbl *cmdtp, int flag, int argc,
+			      char *const argv[])
 {
 	return do_fs_uuid(cmdtp, flag, argc, argv, FS_TYPE_ANY);
 }
diff --git a/cmd/fuse.c b/cmd/fuse.c
index 42d74fa883..e001619d17 100644
--- a/cmd/fuse.c
+++ b/cmd/fuse.c
@@ -40,7 +40,8 @@ static int confirm_prog(void)
 	return 0;
 }
 
-static int do_fuse(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_fuse(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	const char *op = argc >= 2 ? argv[1] : NULL;
 	int confirmed = argc >= 3 && !strcmp(argv[2], "-y");
diff --git a/cmd/gettime.c b/cmd/gettime.c
index 863bd87590..2e74e02b49 100644
--- a/cmd/gettime.c
+++ b/cmd/gettime.c
@@ -14,8 +14,8 @@
 #include <common.h>
 #include <command.h>
 
-static int do_gettime(cmd_tbl_t *cmdtp, int flag, int argc,
-		      char * const argv[])
+static int do_gettime(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	unsigned long int val = get_timer(0);
 
diff --git a/cmd/gpio.c b/cmd/gpio.c
index 408a942455..24053e6ad9 100644
--- a/cmd/gpio.c
+++ b/cmd/gpio.c
@@ -117,7 +117,8 @@ static int do_gpio_status(bool all, const char *gpio_name)
 }
 #endif
 
-static int do_gpio(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_gpio(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	unsigned int gpio;
 	enum gpio_cmd sub_cmd;
diff --git a/cmd/gpt.c b/cmd/gpt.c
index c2964d8508..05f5f943a8 100644
--- a/cmd/gpt.c
+++ b/cmd/gpt.c
@@ -794,7 +794,7 @@ static int do_rename_gpt_parts(struct blk_desc *dev_desc, char *subcomm,
  *
  * @return zero on success; otherwise error
  */
-static int do_gpt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_gpt(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int ret = CMD_RET_SUCCESS;
 	int dev = 0;
diff --git a/cmd/hash.c b/cmd/hash.c
index dff943ac9f..e163cd6774 100644
--- a/cmd/hash.c
+++ b/cmd/hash.c
@@ -14,7 +14,8 @@
 #include <hash.h>
 #include <linux/ctype.h>
 
-static int do_hash(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_hash(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	char *s;
 	int flags = HASH_FLAG_ENV;
diff --git a/cmd/help.c b/cmd/help.c
index a1a0b99b6f..8d67d977bf 100644
--- a/cmd/help.c
+++ b/cmd/help.c
@@ -7,11 +7,12 @@
 #include <common.h>
 #include <command.h>
 
-static int do_help(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_help(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 #ifdef CONFIG_CMDLINE
-	cmd_tbl_t *start = ll_entry_start(cmd_tbl_t, cmd);
-	const int len = ll_entry_count(cmd_tbl_t, cmd);
+	struct cmd_tbl *start = ll_entry_start(struct cmd_tbl, cmd);
+	const int len = ll_entry_count(struct cmd_tbl, cmd);
 	return _do_help(start, len, cmdtp, flag, argc, argv);
 #else
 	return 0;
@@ -29,7 +30,7 @@ U_BOOT_CMD(
 
 #ifdef CONFIG_CMDLINE
 /* This does not use the U_BOOT_CMD macro as ? can't be used in symbol names */
-ll_entry_declare(cmd_tbl_t, question_mark, cmd) = {
+ll_entry_declare(struct cmd_tbl, question_mark, cmd) = {
 	"?",	CONFIG_SYS_MAXARGS, cmd_always_repeatable,	do_help,
 	"alias for 'help'",
 #ifdef  CONFIG_SYS_LONGHELP
diff --git a/cmd/host.c b/cmd/host.c
index eefc4f255e..cd9c9677f0 100644
--- a/cmd/host.c
+++ b/cmd/host.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <dm.h>
 #include <fs.h>
 #include <part.h>
@@ -13,32 +14,32 @@
 
 static int host_curr_device = -1;
 
-static int do_host_load(cmd_tbl_t *cmdtp, int flag, int argc,
-			   char * const argv[])
+static int do_host_load(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	return do_load(cmdtp, flag, argc, argv, FS_TYPE_SANDBOX);
 }
 
-static int do_host_ls(cmd_tbl_t *cmdtp, int flag, int argc,
-			   char * const argv[])
+static int do_host_ls(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	return do_ls(cmdtp, flag, argc, argv, FS_TYPE_SANDBOX);
 }
 
-static int do_host_size(cmd_tbl_t *cmdtp, int flag, int argc,
-			   char * const argv[])
+static int do_host_size(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	return do_size(cmdtp, flag, argc, argv, FS_TYPE_SANDBOX);
 }
 
-static int do_host_save(cmd_tbl_t *cmdtp, int flag, int argc,
-			   char * const argv[])
+static int do_host_save(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	return do_save(cmdtp, flag, argc, argv, FS_TYPE_SANDBOX);
 }
 
-static int do_host_bind(cmd_tbl_t *cmdtp, int flag, int argc,
-			   char * const argv[])
+static int do_host_bind(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	if (argc < 2 || argc > 3)
 		return CMD_RET_USAGE;
@@ -53,8 +54,8 @@ static int do_host_bind(cmd_tbl_t *cmdtp, int flag, int argc,
 	return host_dev_bind(dev, file);
 }
 
-static int do_host_info(cmd_tbl_t *cmdtp, int flag, int argc,
-			   char * const argv[])
+static int do_host_info(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	if (argc < 1 || argc > 2)
 		return CMD_RET_USAGE;
@@ -100,8 +101,8 @@ static int do_host_info(cmd_tbl_t *cmdtp, int flag, int argc,
 	return 0;
 }
 
-static int do_host_dev(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_host_dev(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	int dev;
 	char *ep;
@@ -140,7 +141,7 @@ static int do_host_dev(cmd_tbl_t *cmdtp, int flag, int argc,
 	return 0;
 }
 
-static cmd_tbl_t cmd_host_sub[] = {
+static struct cmd_tbl cmd_host_sub[] = {
 	U_BOOT_CMD_MKENT(load, 7, 0, do_host_load, "", ""),
 	U_BOOT_CMD_MKENT(ls, 3, 0, do_host_ls, "", ""),
 	U_BOOT_CMD_MKENT(save, 6, 0, do_host_save, "", ""),
@@ -150,10 +151,10 @@ static cmd_tbl_t cmd_host_sub[] = {
 	U_BOOT_CMD_MKENT(dev, 0, 1, do_host_dev, "", ""),
 };
 
-static int do_host(cmd_tbl_t *cmdtp, int flag, int argc,
-		      char * const argv[])
+static int do_host(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
-	cmd_tbl_t *c;
+	struct cmd_tbl *c;
 
 	/* Skip past 'host' */
 	argc--;
diff --git a/cmd/i2c.c b/cmd/i2c.c
index 43a76299b3..9ebbdd3128 100644
--- a/cmd/i2c.c
+++ b/cmd/i2c.c
@@ -288,7 +288,8 @@ static int i2c_report_err(int ret, enum i2c_err_op op)
  * Syntax:
  *	i2c read {i2c_chip} {devaddr}{.0, .1, .2} {len} {memaddr}
  */
-static int do_i2c_read ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_i2c_read(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	uint	chip;
 	uint	devaddr, length;
@@ -341,7 +342,8 @@ static int do_i2c_read ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv
 	return 0;
 }
 
-static int do_i2c_write(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_i2c_write(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	uint	chip;
 	uint	devaddr, length;
@@ -432,7 +434,7 @@ static int do_i2c_write(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[
 }
 
 #ifdef CONFIG_DM_I2C
-static int do_i2c_flags(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_i2c_flags(struct cmd_tbl *cmdtp, int flag, int argc,
 			char *const argv[])
 {
 	struct udevice *dev;
@@ -462,7 +464,8 @@ static int do_i2c_flags(cmd_tbl_t *cmdtp, int flag, int argc,
 	return 0;
 }
 
-static int do_i2c_olen(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_i2c_olen(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	struct udevice *dev;
 	uint olen;
@@ -507,7 +510,8 @@ static int do_i2c_olen(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
  * Syntax:
  *	i2c md {i2c_chip} {addr}{.0, .1, .2} {len}
  */
-static int do_i2c_md ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_i2c_md(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	uint	chip;
 	uint	addr, length;
@@ -626,7 +630,8 @@ static int do_i2c_md ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]
  * Syntax:
  *	i2c mw {i2c_chip} {addr}{.0, .1, .2} {data} [{count}]
  */
-static int do_i2c_mw ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_i2c_mw(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	uint	chip;
 	ulong	addr;
@@ -712,7 +717,8 @@ static int do_i2c_mw ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]
  * Syntax:
  *	i2c crc32 {i2c_chip} {addr}{.0, .1, .2} {count}
  */
-static int do_i2c_crc (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_i2c_crc(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	uint	chip;
 	ulong	addr;
@@ -796,8 +802,8 @@ static int do_i2c_crc (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]
  *	i2c mm{.b, .w, .l} {i2c_chip} {addr}{.0, .1, .2}
  *	i2c nm{.b, .w, .l} {i2c_chip} {addr}{.0, .1, .2}
  */
-static int
-mod_i2c_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char * const argv[])
+static int mod_i2c_mem(struct cmd_tbl *cmdtp, int incrflag, int flag, int argc,
+		       char *const argv[])
 {
 	uint	chip;
 	ulong	addr;
@@ -945,7 +951,8 @@ mod_i2c_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char * const arg
  *
  * Returns zero (success) if one or more I2C devices was found
  */
-static int do_i2c_probe (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_i2c_probe(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	int j;
 	int addr = -1;
@@ -1020,7 +1027,8 @@ static int do_i2c_probe (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv
  *	{length} - Number of bytes to read
  *	{delay}  - A DECIMAL number and defaults to 1000 uSec
  */
-static int do_i2c_loop(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_i2c_loop(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	uint	chip;
 	int alen;
@@ -1146,7 +1154,8 @@ static void decode_bits (u_char const b, char const *str[], int const do_once)
  * Syntax:
  *	i2c sdram {i2c_chip}
  */
-static int do_sdram (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+static int do_sdram(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[])
 {
 	enum { unknown, EDO, SDRAM, DDR, DDR2, DDR3, DDR4 } type;
 
@@ -1648,7 +1657,7 @@ static int do_sdram (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
  *	i2c edid {i2c_chip}
  */
 #if defined(CONFIG_I2C_EDID)
-int do_edid(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_edid(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	uint chip;
 	struct edid1_info edid;
@@ -1715,8 +1724,8 @@ static void show_bus(struct udevice *bus)
  * Returns zero always.
  */
 #if defined(CONFIG_SYS_I2C) || defined(CONFIG_DM_I2C)
-static int do_i2c_show_bus(cmd_tbl_t *cmdtp, int flag, int argc,
-				char * const argv[])
+static int do_i2c_show_bus(struct cmd_tbl *cmdtp, int flag, int argc,
+			   char *const argv[])
 {
 	if (argc == 1) {
 		/* show all busses */
@@ -1802,8 +1811,8 @@ static int do_i2c_show_bus(cmd_tbl_t *cmdtp, int flag, int argc,
  */
 #if defined(CONFIG_SYS_I2C) || defined(CONFIG_I2C_MULTI_BUS) || \
 		defined(CONFIG_DM_I2C)
-static int do_i2c_bus_num(cmd_tbl_t *cmdtp, int flag, int argc,
-				char * const argv[])
+static int do_i2c_bus_num(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	int		ret = 0;
 	int	bus_no;
@@ -1853,7 +1862,8 @@ static int do_i2c_bus_num(cmd_tbl_t *cmdtp, int flag, int argc,
  * Returns zero on success, CMD_RET_USAGE in case of misuse and negative
  * on error.
  */
-static int do_i2c_bus_speed(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+static int do_i2c_bus_speed(struct cmd_tbl *cmdtp, int flag, int argc,
+			    char *const argv[])
 {
 	int speed, ret=0;
 
@@ -1896,7 +1906,8 @@ static int do_i2c_bus_speed(cmd_tbl_t * cmdtp, int flag, int argc, char * const
  * Returns zero on success, CMD_RET_USAGE in case of misuse and negative
  * on error.
  */
-static int do_i2c_mm(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+static int do_i2c_mm(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	return mod_i2c_mem (cmdtp, 1, flag, argc, argv);
 }
@@ -1911,7 +1922,8 @@ static int do_i2c_mm(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
  * Returns zero on success, CMD_RET_USAGE in case of misuse and negative
  * on error.
  */
-static int do_i2c_nm(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+static int do_i2c_nm(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	return mod_i2c_mem (cmdtp, 0, flag, argc, argv);
 }
@@ -1925,7 +1937,8 @@ static int do_i2c_nm(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
  *
  * Returns zero always.
  */
-static int do_i2c_reset(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+static int do_i2c_reset(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 #if defined(CONFIG_DM_I2C)
 	struct udevice *bus;
@@ -1944,7 +1957,7 @@ static int do_i2c_reset(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv
 	return 0;
 }
 
-static cmd_tbl_t cmd_i2c_sub[] = {
+static struct cmd_tbl cmd_i2c_sub[] = {
 #if defined(CONFIG_SYS_I2C) || defined(CONFIG_DM_I2C)
 	U_BOOT_CMD_MKENT(bus, 1, 1, do_i2c_show_bus, "", ""),
 #endif
@@ -1995,9 +2008,9 @@ static __maybe_unused void i2c_reloc(void)
  * Returns zero on success, CMD_RET_USAGE in case of misuse and negative
  * on error.
  */
-static int do_i2c(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+static int do_i2c(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
-	cmd_tbl_t *c;
+	struct cmd_tbl *c;
 
 #ifdef CONFIG_NEEDS_MANUAL_RELOC
 	i2c_reloc();
diff --git a/cmd/ide.c b/cmd/ide.c
index 2f93ba7904..b78c38e159 100644
--- a/cmd/ide.c
+++ b/cmd/ide.c
@@ -27,7 +27,7 @@
 /* Current I/O Device	*/
 static int curr_device;
 
-int do_ide(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_ide(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	if (argc == 2) {
 		if (strncmp(argv[1], "res", 3) == 0) {
@@ -40,7 +40,7 @@ int do_ide(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 	return blk_common_cmd(argc, argv, IF_TYPE_IDE, &curr_device);
 }
 
-int do_diskboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_diskboot(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	return common_diskboot(cmdtp, "ide", argc, argv);
 }
diff --git a/cmd/ini.c b/cmd/ini.c
index 0c425262d0..c075be623c 100644
--- a/cmd/ini.c
+++ b/cmd/ini.c
@@ -226,7 +226,7 @@ static int ini_handler(void *user, char *section, char *name, char *value)
 	return 1;
 }
 
-static int do_ini(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_ini(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	const char *section;
 	char *file_address;
diff --git a/cmd/io.c b/cmd/io.c
index 7fee9674a2..c7e964153b 100644
--- a/cmd/io.c
+++ b/cmd/io.c
@@ -24,7 +24,7 @@ static ulong base_address;
  * Syntax:
  *	iod{.b, .w, .l} {addr}
  */
-int do_io_iod(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_io_iod(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	ulong addr, length, bytes;
 	u8 buf[DISP_LINE_LEN];
@@ -90,7 +90,7 @@ int do_io_iod(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 	return 0;
 }
 
-int do_io_iow(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_io_iow(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	ulong addr, val;
 	int size;
diff --git a/cmd/iotrace.c b/cmd/iotrace.c
index fa6c68b198..652ebefb89 100644
--- a/cmd/iotrace.c
+++ b/cmd/iotrace.c
@@ -55,7 +55,7 @@ static void do_print_trace(void)
 	}
 }
 
-static int do_set_buffer(int argc, char * const argv[])
+static int do_set_buffer(int argc, char *const argv[])
 {
 	ulong addr = 0, size = 0;
 
@@ -71,7 +71,7 @@ static int do_set_buffer(int argc, char * const argv[])
 	return 0;
 }
 
-static int do_set_region(int argc, char * const argv[])
+static int do_set_region(int argc, char *const argv[])
 {
 	ulong addr = 0, size = 0;
 
@@ -87,7 +87,7 @@ static int do_set_region(int argc, char * const argv[])
 	return 0;
 }
 
-int do_iotrace(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_iotrace(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	const char *cmd = argc < 2 ? NULL : argv[1];
 
diff --git a/cmd/irq.c b/cmd/irq.c
index 52d06b3eed..1d3e28cb3c 100644
--- a/cmd/irq.c
+++ b/cmd/irq.c
@@ -8,8 +8,8 @@
 #include <command.h>
 #include <irq_func.h>
 
-static int do_interrupts(cmd_tbl_t *cmdtp, int flag, int argc,
-			 char * const argv[])
+static int do_interrupts(struct cmd_tbl *cmdtp, int flag, int argc,
+			 char *const argv[])
 {
 
 	if (argc != 2)
@@ -31,7 +31,7 @@ U_BOOT_CMD(
 );
 
 /* Implemented in $(CPU)/interrupts.c */
-int do_irqinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+int do_irqinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
 
 U_BOOT_CMD(
 	irqinfo,    1,    1,     do_irqinfo,
diff --git a/cmd/itest.c b/cmd/itest.c
index e21e1f1b1b..a0cf4bee04 100644
--- a/cmd/itest.c
+++ b/cmd/itest.c
@@ -175,7 +175,8 @@ static int binary_test(char *op, char *arg1, char *arg2, int w)
 }
 
 /* command line interface to the shell test */
-static int do_itest(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_itest(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[])
 {
 	int	value, w;
 
diff --git a/cmd/jffs2.c b/cmd/jffs2.c
index 748a73e2af..bb4790402e 100644
--- a/cmd/jffs2.c
+++ b/cmd/jffs2.c
@@ -472,7 +472,8 @@ static struct part_info* jffs2_part_info(struct mtd_device *dev, unsigned int pa
  * @param argv arguments list
  * @return 0 on success, 1 otherwise
  */
-int do_jffs2_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_jffs2_fsload(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[])
 {
 	char *fsname;
 	char *filename;
@@ -534,7 +535,7 @@ int do_jffs2_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
  * @param argv arguments list
  * @return 0 on success, 1 otherwise
  */
-int do_jffs2_ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_jffs2_ls(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	char *filename = "/";
 	int ret;
@@ -572,7 +573,8 @@ int do_jffs2_ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
  * @param argv arguments list
  * @return 0 on success, 1 otherwise
  */
-int do_jffs2_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_jffs2_fsinfo(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[])
 {
 	struct part_info *part;
 	char *fsname;
diff --git a/cmd/led.c b/cmd/led.c
index 50ffa509ab..9433fa886c 100644
--- a/cmd/led.c
+++ b/cmd/led.c
@@ -71,7 +71,7 @@ static int list_leds(void)
 	return 0;
 }
 
-int do_led(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_led(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	enum led_state_t cmd;
 	const char *led_label;
diff --git a/cmd/legacy_led.c b/cmd/legacy_led.c
index 7d40d8db58..86cd969e40 100644
--- a/cmd/legacy_led.c
+++ b/cmd/legacy_led.c
@@ -85,7 +85,7 @@ void __weak __led_blink(led_id_t mask, int freq)
 {
 }
 
-int do_legacy_led(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_legacy_led(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int i, match = 0;
 	enum led_cmd cmd;
diff --git a/cmd/license.c b/cmd/license.c
index c5b04c331b..15411b5a92 100644
--- a/cmd/license.c
+++ b/cmd/license.c
@@ -12,7 +12,8 @@
 #include "license_data_gz.h"
 #include "license_data_size.h"
 
-static int do_license(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_license(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	char *dst;
 	unsigned long len = data_size;
diff --git a/cmd/load.c b/cmd/load.c
index 36db571cea..85e5540f2c 100644
--- a/cmd/load.c
+++ b/cmd/load.c
@@ -41,8 +41,8 @@ static int do_echo = 1;
 /* -------------------------------------------------------------------- */
 
 #if defined(CONFIG_CMD_LOADS)
-static int do_load_serial(cmd_tbl_t *cmdtp, int flag, int argc,
-			  char * const argv[])
+static int do_load_serial(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	long offset = 0;
 	ulong addr;
@@ -242,7 +242,8 @@ static int read_record(char *buf, ulong len)
 
 #if defined(CONFIG_CMD_SAVES)
 
-int do_save_serial (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_save_serial(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	ulong offset = 0;
 	ulong size   = 0;
@@ -419,8 +420,8 @@ static int  his_pad_count;  /* number of pad chars he needs */
 static char his_pad_char;   /* pad chars he needs */
 static char his_quote;      /* quote chars he'll use */
 
-static int do_load_serial_bin(cmd_tbl_t *cmdtp, int flag, int argc,
-			      char * const argv[])
+static int do_load_serial_bin(struct cmd_tbl *cmdtp, int flag, int argc,
+			      char *const argv[])
 {
 	ulong offset = 0;
 	ulong addr;
diff --git a/cmd/log.c b/cmd/log.c
index 1e3936aeeb..664f7bd7ac 100644
--- a/cmd/log.c
+++ b/cmd/log.c
@@ -11,8 +11,8 @@
 
 static char log_fmt_chars[LOGF_COUNT] = "clFLfm";
 
-static int do_log_level(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_log_level(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	if (argc > 1)
 		gd->default_log_level = simple_strtol(argv[1], NULL, 10);
@@ -22,8 +22,8 @@ static int do_log_level(cmd_tbl_t *cmdtp, int flag, int argc,
 	return 0;
 }
 
-static int do_log_format(cmd_tbl_t *cmdtp, int flag, int argc,
-			 char * const argv[])
+static int do_log_format(struct cmd_tbl *cmdtp, int flag, int argc,
+			 char *const argv[])
 {
 	int i;
 
@@ -58,7 +58,8 @@ static int do_log_format(cmd_tbl_t *cmdtp, int flag, int argc,
 	return 0;
 }
 
-static int do_log_rec(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_log_rec(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	enum log_category_t cat;
 	enum log_level_t level;
@@ -94,7 +95,7 @@ static int do_log_rec(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return 0;
 }
 
-static cmd_tbl_t log_sub[] = {
+static struct cmd_tbl log_sub[] = {
 	U_BOOT_CMD_MKENT(level, CONFIG_SYS_MAXARGS, 1, do_log_level, "", ""),
 #ifdef CONFIG_LOG_TEST
 	U_BOOT_CMD_MKENT(test, 2, 1, do_log_test, "", ""),
@@ -103,9 +104,9 @@ static cmd_tbl_t log_sub[] = {
 	U_BOOT_CMD_MKENT(rec, CONFIG_SYS_MAXARGS, 1, do_log_rec, "", ""),
 };
 
-static int do_log(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_log(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
-	cmd_tbl_t *cp;
+	struct cmd_tbl *cp;
 
 	if (argc < 2)
 		return CMD_RET_USAGE;
diff --git a/cmd/lzmadec.c b/cmd/lzmadec.c
index e3b9cc75ac..3b8db0a853 100644
--- a/cmd/lzmadec.c
+++ b/cmd/lzmadec.c
@@ -17,7 +17,8 @@
 
 #include <lzma/LzmaTools.h>
 
-static int do_lzmadec(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_lzmadec(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	unsigned long src, dst;
 	SizeT src_len = ~0UL, dst_len = ~0UL;
diff --git a/cmd/mac.c b/cmd/mac.c
index 4227d10936..a39e1168a5 100644
--- a/cmd/mac.c
+++ b/cmd/mac.c
@@ -7,7 +7,8 @@
 #include <common.h>
 #include <command.h>
 
-extern int do_mac(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+extern int do_mac(struct cmd_tbl *cmdtp, int flag, int argc,
+		  char *const argv[]);
 
 U_BOOT_CMD(
 	mac, 3, 1,  do_mac,
diff --git a/cmd/md5sum.c b/cmd/md5sum.c
index 4e30334951..5ae3ddf85f 100644
--- a/cmd/md5sum.c
+++ b/cmd/md5sum.c
@@ -73,7 +73,7 @@ static int parse_verify_sum(char *verify_str, u8 *vsum)
 	return 0;
 }
 
-int do_md5sum(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_md5sum(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	ulong addr, len;
 	unsigned int i;
@@ -136,7 +136,8 @@ int do_md5sum(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return 0;
 }
 #else
-static int do_md5sum(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_md5sum(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	unsigned long addr, len;
 	unsigned int i;
diff --git a/cmd/mdio.c b/cmd/mdio.c
index 22c8fbe856..c48bb51237 100644
--- a/cmd/mdio.c
+++ b/cmd/mdio.c
@@ -190,7 +190,8 @@ static int extract_phy_range(char *const argv[], int argc, struct mii_dev **bus,
 }
 
 /* ---------------------------------------------------------------- */
-static int do_mdio(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_mdio(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	char op[2];
 	int addrlo, addrhi, reglo, reghi, devadlo, devadhi;
diff --git a/cmd/mem.c b/cmd/mem.c
index 24a9c7731c..ab67a01446 100644
--- a/cmd/mem.c
+++ b/cmd/mem.c
@@ -26,7 +26,11 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-static int mod_mem(cmd_tbl_t *, int, int, int, char * const []);
+#ifndef CONFIG_SYS_MEMTEST_SCRATCH
+#define CONFIG_SYS_MEMTEST_SCRATCH 0
+#endif
+
+static int mod_mem(struct cmd_tbl *, int, int, int, char * const []);
 
 /* Display values from last command.
  * Memory modify remembered values are different from display memory.
@@ -43,7 +47,8 @@ static	ulong	base_address = 0;
  *	md{.b, .w, .l, .q} {addr} {len}
  */
 #define DISP_LINE_LEN	16
-static int do_mem_md(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_mem_md(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	ulong	addr, length, bytes;
 	const void *buf;
@@ -93,16 +98,20 @@ static int do_mem_md(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return (rc);
 }
 
-static int do_mem_mm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_mem_mm(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	return mod_mem (cmdtp, 1, flag, argc, argv);
 }
-static int do_mem_nm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+
+static int do_mem_nm(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	return mod_mem (cmdtp, 0, flag, argc, argv);
 }
 
-static int do_mem_mw(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_mem_mw(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 #ifdef MEM_SUPPORT_64BIT_DATA
 	u64 writeval;
@@ -163,7 +172,8 @@ static int do_mem_mw(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 }
 
 #ifdef CONFIG_CMD_MX_CYCLIC
-static int do_mem_mdc(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_mem_mdc(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	int i;
 	ulong count;
@@ -190,7 +200,8 @@ static int do_mem_mdc(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return 0;
 }
 
-static int do_mem_mwc(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_mem_mwc(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	int i;
 	ulong count;
@@ -218,7 +229,8 @@ static int do_mem_mwc(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 }
 #endif /* CONFIG_CMD_MX_CYCLIC */
 
-static int do_mem_cmp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_mem_cmp(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	ulong	addr1, addr2, count, ngood, bytes;
 	int	size;
@@ -298,7 +310,8 @@ static int do_mem_cmp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return rcode;
 }
 
-static int do_mem_cp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_mem_cp(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	ulong	addr, dest, count;
 	void	*src, *dst;
@@ -356,8 +369,8 @@ static int do_mem_cp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return 0;
 }
 
-static int do_mem_base(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_mem_base(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	if (argc > 1) {
 		/* Set new base address.
@@ -370,8 +383,8 @@ static int do_mem_base(cmd_tbl_t *cmdtp, int flag, int argc,
 	return 0;
 }
 
-static int do_mem_loop(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_mem_loop(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	ulong	addr, length, i, bytes;
 	int	size;
@@ -468,8 +481,8 @@ static int do_mem_loop(cmd_tbl_t *cmdtp, int flag, int argc,
 }
 
 #ifdef CONFIG_LOOPW
-static int do_mem_loopw(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_mem_loopw(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	ulong	addr, length, i, bytes;
 	int	size;
@@ -915,8 +928,8 @@ static ulong mem_test_quick(vu_long *buf, ulong start_addr, ulong end_addr,
  * configured using CONFIG_SYS_ALT_MEMTEST. The complete test loops until
  * interrupted by ctrl-c or by a failure of one of the sub-tests.
  */
-static int do_mem_mtest(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_mem_mtest(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	ulong start, end;
 	vu_long scratch_space;
@@ -1003,7 +1016,8 @@ static int do_mem_mtest(cmd_tbl_t *cmdtp, int flag, int argc,
  *	nm{.b, .w, .l, .q} {addr}
  */
 static int
-mod_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char * const argv[])
+mod_mem(struct cmd_tbl *cmdtp, int incrflag, int flag, int argc,
+	char *const argv[])
 {
 	ulong	addr;
 #ifdef MEM_SUPPORT_64BIT_DATA
@@ -1107,7 +1121,8 @@ mod_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char * const argv[])
 
 #ifdef CONFIG_CMD_CRC32
 
-static int do_mem_crc(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_mem_crc(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	int flags = 0;
 	int ac;
@@ -1132,7 +1147,8 @@ static int do_mem_crc(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 #endif
 
 #ifdef CONFIG_CMD_RANDOM
-static int do_random(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_random(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	unsigned long addr, len;
 	unsigned long seed; // NOT INITIALIZED ON PURPOSE
@@ -1260,8 +1276,8 @@ U_BOOT_CMD(
 #endif
 
 #ifdef CONFIG_CMD_MEMINFO
-static int do_mem_info(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_mem_info(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	puts("DRAM:  ");
 	print_size(gd->ram_size, "\n");
diff --git a/cmd/mfsl.c b/cmd/mfsl.c
index 583762a345..31f5b36ade 100644
--- a/cmd/mfsl.c
+++ b/cmd/mfsl.c
@@ -14,7 +14,7 @@
 #include <command.h>
 #include <asm/asm.h>
 
-int do_frd (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+int do_frd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	unsigned int fslnum;
 	unsigned int num;
@@ -169,7 +169,7 @@ int do_frd (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
 	return 0;
 }
 
-int do_fwr (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+int do_fwr(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	unsigned int fslnum;
 	unsigned int num;
@@ -324,7 +324,7 @@ int do_fwr (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
 
 }
 
-int do_rspr (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+int do_rspr(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	unsigned int reg = 0;
 	unsigned int val = 0;
diff --git a/cmd/mii.c b/cmd/mii.c
index 23ee1e6cfa..b52a55dc33 100644
--- a/cmd/mii.c
+++ b/cmd/mii.c
@@ -277,7 +277,7 @@ static void extract_range(
 }
 
 /* ---------------------------------------------------------------- */
-static int do_mii(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_mii(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	char		op[2];
 	unsigned char	addrlo, addrhi, reglo, reghi;
diff --git a/cmd/misc.c b/cmd/misc.c
index a1eef72a6c..d33219308b 100644
--- a/cmd/misc.c
+++ b/cmd/misc.c
@@ -11,7 +11,8 @@
 #include <command.h>
 #include <console.h>
 
-static int do_sleep(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_sleep(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[])
 {
 	ulong start = get_timer(0);
 	ulong mdelay = 0;
@@ -58,7 +59,8 @@ U_BOOT_CMD(
 );
 
 #ifdef CONFIG_CMD_TIMER
-static int do_timer(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_timer(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[])
 {
 	static ulong start;
 
diff --git a/cmd/mmc.c b/cmd/mmc.c
index a29650b28e..97e5d91859 100644
--- a/cmd/mmc.c
+++ b/cmd/mmc.c
@@ -142,7 +142,9 @@ static struct mmc *init_mmc_device(int dev, bool force_init)
 
 	return mmc;
 }
-static int do_mmcinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+
+static int do_mmcinfo(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	struct mmc *mmc;
 
@@ -175,8 +177,9 @@ static int confirm_key_prog(void)
 	puts("Authentication key programming aborted\n");
 	return 0;
 }
-static int do_mmcrpmb_key(cmd_tbl_t *cmdtp, int flag,
-			  int argc, char * const argv[])
+
+static int do_mmcrpmb_key(struct cmd_tbl *cmdtp, int flag,
+			  int argc, char *const argv[])
 {
 	void *key_addr;
 	struct mmc *mmc = find_mmc_device(curr_device);
@@ -193,8 +196,9 @@ static int do_mmcrpmb_key(cmd_tbl_t *cmdtp, int flag,
 	}
 	return CMD_RET_SUCCESS;
 }
-static int do_mmcrpmb_read(cmd_tbl_t *cmdtp, int flag,
-			   int argc, char * const argv[])
+
+static int do_mmcrpmb_read(struct cmd_tbl *cmdtp, int flag,
+			   int argc, char *const argv[])
 {
 	u16 blk, cnt;
 	void *addr;
@@ -221,8 +225,9 @@ static int do_mmcrpmb_read(cmd_tbl_t *cmdtp, int flag,
 		return CMD_RET_FAILURE;
 	return CMD_RET_SUCCESS;
 }
-static int do_mmcrpmb_write(cmd_tbl_t *cmdtp, int flag,
-			    int argc, char * const argv[])
+
+static int do_mmcrpmb_write(struct cmd_tbl *cmdtp, int flag,
+			    int argc, char *const argv[])
 {
 	u16 blk, cnt;
 	void *addr;
@@ -247,8 +252,9 @@ static int do_mmcrpmb_write(cmd_tbl_t *cmdtp, int flag,
 		return CMD_RET_FAILURE;
 	return CMD_RET_SUCCESS;
 }
-static int do_mmcrpmb_counter(cmd_tbl_t *cmdtp, int flag,
-			      int argc, char * const argv[])
+
+static int do_mmcrpmb_counter(struct cmd_tbl *cmdtp, int flag,
+			      int argc, char *const argv[])
 {
 	unsigned long counter;
 	struct mmc *mmc = find_mmc_device(curr_device);
@@ -259,17 +265,17 @@ static int do_mmcrpmb_counter(cmd_tbl_t *cmdtp, int flag,
 	return CMD_RET_SUCCESS;
 }
 
-static cmd_tbl_t cmd_rpmb[] = {
+static struct cmd_tbl cmd_rpmb[] = {
 	U_BOOT_CMD_MKENT(key, 2, 0, do_mmcrpmb_key, "", ""),
 	U_BOOT_CMD_MKENT(read, 5, 1, do_mmcrpmb_read, "", ""),
 	U_BOOT_CMD_MKENT(write, 5, 0, do_mmcrpmb_write, "", ""),
 	U_BOOT_CMD_MKENT(counter, 1, 1, do_mmcrpmb_counter, "", ""),
 };
 
-static int do_mmcrpmb(cmd_tbl_t *cmdtp, int flag,
-		      int argc, char * const argv[])
+static int do_mmcrpmb(struct cmd_tbl *cmdtp, int flag,
+		      int argc, char *const argv[])
 {
-	cmd_tbl_t *cp;
+	struct cmd_tbl *cp;
 	struct mmc *mmc;
 	char original_part;
 	int ret;
@@ -316,8 +322,8 @@ static int do_mmcrpmb(cmd_tbl_t *cmdtp, int flag,
 }
 #endif
 
-static int do_mmc_read(cmd_tbl_t *cmdtp, int flag,
-		       int argc, char * const argv[])
+static int do_mmc_read(struct cmd_tbl *cmdtp, int flag,
+		       int argc, char *const argv[])
 {
 	struct mmc *mmc;
 	u32 blk, cnt, n;
@@ -358,8 +364,8 @@ static lbaint_t mmc_sparse_reserve(struct sparse_storage *info,
 	return blkcnt;
 }
 
-static int do_mmc_sparse_write(cmd_tbl_t *cmdtp, int flag,
-			       int argc, char * const argv[])
+static int do_mmc_sparse_write(struct cmd_tbl *cmdtp, int flag,
+			       int argc, char *const argv[])
 {
 	struct sparse_storage sparse;
 	struct blk_desc *dev_desc;
@@ -409,8 +415,8 @@ static int do_mmc_sparse_write(cmd_tbl_t *cmdtp, int flag,
 #endif
 
 #if CONFIG_IS_ENABLED(MMC_WRITE)
-static int do_mmc_write(cmd_tbl_t *cmdtp, int flag,
-			int argc, char * const argv[])
+static int do_mmc_write(struct cmd_tbl *cmdtp, int flag,
+			int argc, char *const argv[])
 {
 	struct mmc *mmc;
 	u32 blk, cnt, n;
@@ -439,8 +445,9 @@ static int do_mmc_write(cmd_tbl_t *cmdtp, int flag,
 
 	return (n == cnt) ? CMD_RET_SUCCESS : CMD_RET_FAILURE;
 }
-static int do_mmc_erase(cmd_tbl_t *cmdtp, int flag,
-			int argc, char * const argv[])
+
+static int do_mmc_erase(struct cmd_tbl *cmdtp, int flag,
+			int argc, char *const argv[])
 {
 	struct mmc *mmc;
 	u32 blk, cnt, n;
@@ -469,8 +476,8 @@ static int do_mmc_erase(cmd_tbl_t *cmdtp, int flag,
 }
 #endif
 
-static int do_mmc_rescan(cmd_tbl_t *cmdtp, int flag,
-			 int argc, char * const argv[])
+static int do_mmc_rescan(struct cmd_tbl *cmdtp, int flag,
+			 int argc, char *const argv[])
 {
 	struct mmc *mmc;
 
@@ -480,8 +487,9 @@ static int do_mmc_rescan(cmd_tbl_t *cmdtp, int flag,
 
 	return CMD_RET_SUCCESS;
 }
-static int do_mmc_part(cmd_tbl_t *cmdtp, int flag,
-		       int argc, char * const argv[])
+
+static int do_mmc_part(struct cmd_tbl *cmdtp, int flag,
+		       int argc, char *const argv[])
 {
 	struct blk_desc *mmc_dev;
 	struct mmc *mmc;
@@ -499,8 +507,9 @@ static int do_mmc_part(cmd_tbl_t *cmdtp, int flag,
 	puts("get mmc type error!\n");
 	return CMD_RET_FAILURE;
 }
-static int do_mmc_dev(cmd_tbl_t *cmdtp, int flag,
-		      int argc, char * const argv[])
+
+static int do_mmc_dev(struct cmd_tbl *cmdtp, int flag,
+		      int argc, char *const argv[])
 {
 	int dev, part = 0, ret;
 	struct mmc *mmc;
@@ -540,8 +549,9 @@ static int do_mmc_dev(cmd_tbl_t *cmdtp, int flag,
 
 	return CMD_RET_SUCCESS;
 }
-static int do_mmc_list(cmd_tbl_t *cmdtp, int flag,
-		       int argc, char * const argv[])
+
+static int do_mmc_list(struct cmd_tbl *cmdtp, int flag,
+		       int argc, char *const argv[])
 {
 	print_mmc_devices('\n');
 	return CMD_RET_SUCCESS;
@@ -549,7 +559,7 @@ static int do_mmc_list(cmd_tbl_t *cmdtp, int flag,
 
 #if CONFIG_IS_ENABLED(MMC_HW_PARTITIONING)
 static int parse_hwpart_user(struct mmc_hwpart_conf *pconf,
-			     int argc, char * const argv[])
+			     int argc, char *const argv[])
 {
 	int i = 0;
 
@@ -583,7 +593,7 @@ static int parse_hwpart_user(struct mmc_hwpart_conf *pconf,
 }
 
 static int parse_hwpart_gp(struct mmc_hwpart_conf *pconf, int pidx,
-			   int argc, char * const argv[])
+			   int argc, char *const argv[])
 {
 	int i;
 
@@ -616,8 +626,8 @@ static int parse_hwpart_gp(struct mmc_hwpart_conf *pconf, int pidx,
 	return i;
 }
 
-static int do_mmc_hwpartition(cmd_tbl_t *cmdtp, int flag,
-			      int argc, char * const argv[])
+static int do_mmc_hwpartition(struct cmd_tbl *cmdtp, int flag,
+			      int argc, char *const argv[])
 {
 	struct mmc *mmc;
 	struct mmc_hwpart_conf pconf = { };
@@ -700,8 +710,8 @@ static int do_mmc_hwpartition(cmd_tbl_t *cmdtp, int flag,
 #endif
 
 #ifdef CONFIG_SUPPORT_EMMC_BOOT
-static int do_mmc_bootbus(cmd_tbl_t *cmdtp, int flag,
-			  int argc, char * const argv[])
+static int do_mmc_bootbus(struct cmd_tbl *cmdtp, int flag,
+			  int argc, char *const argv[])
 {
 	int dev;
 	struct mmc *mmc;
@@ -726,8 +736,9 @@ static int do_mmc_bootbus(cmd_tbl_t *cmdtp, int flag,
 	/* acknowledge to be sent during boot operation */
 	return mmc_set_boot_bus_width(mmc, width, reset, mode);
 }
-static int do_mmc_boot_resize(cmd_tbl_t *cmdtp, int flag,
-			      int argc, char * const argv[])
+
+static int do_mmc_boot_resize(struct cmd_tbl *cmdtp, int flag,
+			      int argc, char *const argv[])
 {
 	int dev;
 	struct mmc *mmc;
@@ -779,8 +790,8 @@ static int mmc_partconf_print(struct mmc *mmc)
 	return CMD_RET_SUCCESS;
 }
 
-static int do_mmc_partconf(cmd_tbl_t *cmdtp, int flag,
-			   int argc, char * const argv[])
+static int do_mmc_partconf(struct cmd_tbl *cmdtp, int flag,
+			   int argc, char *const argv[])
 {
 	int dev;
 	struct mmc *mmc;
@@ -810,8 +821,9 @@ static int do_mmc_partconf(cmd_tbl_t *cmdtp, int flag,
 	/* acknowledge to be sent during boot operation */
 	return mmc_set_part_conf(mmc, ack, part_num, access);
 }
-static int do_mmc_rst_func(cmd_tbl_t *cmdtp, int flag,
-			   int argc, char * const argv[])
+
+static int do_mmc_rst_func(struct cmd_tbl *cmdtp, int flag,
+			   int argc, char *const argv[])
 {
 	int dev;
 	struct mmc *mmc;
@@ -845,8 +857,8 @@ static int do_mmc_rst_func(cmd_tbl_t *cmdtp, int flag,
 	return mmc_set_rst_n_function(mmc, enable);
 }
 #endif
-static int do_mmc_setdsr(cmd_tbl_t *cmdtp, int flag,
-			 int argc, char * const argv[])
+static int do_mmc_setdsr(struct cmd_tbl *cmdtp, int flag,
+			 int argc, char *const argv[])
 {
 	struct mmc *mmc;
 	u32 val;
@@ -874,8 +886,8 @@ static int do_mmc_setdsr(cmd_tbl_t *cmdtp, int flag,
 }
 
 #ifdef CONFIG_CMD_BKOPS_ENABLE
-static int do_mmc_bkops_enable(cmd_tbl_t *cmdtp, int flag,
-				   int argc, char * const argv[])
+static int do_mmc_bkops_enable(struct cmd_tbl *cmdtp, int flag,
+			       int argc, char *const argv[])
 {
 	int dev;
 	struct mmc *mmc;
@@ -898,7 +910,7 @@ static int do_mmc_bkops_enable(cmd_tbl_t *cmdtp, int flag,
 }
 #endif
 
-static int do_mmc_boot_wp(cmd_tbl_t *cmdtp, int flag,
+static int do_mmc_boot_wp(struct cmd_tbl *cmdtp, int flag,
 			  int argc, char * const argv[])
 {
 	int err;
@@ -918,7 +930,7 @@ static int do_mmc_boot_wp(cmd_tbl_t *cmdtp, int flag,
 	return CMD_RET_SUCCESS;
 }
 
-static cmd_tbl_t cmd_mmc[] = {
+static struct cmd_tbl cmd_mmc[] = {
 	U_BOOT_CMD_MKENT(info, 1, 0, do_mmcinfo, "", ""),
 	U_BOOT_CMD_MKENT(read, 4, 1, do_mmc_read, "", ""),
 	U_BOOT_CMD_MKENT(wp, 1, 0, do_mmc_boot_wp, "", ""),
@@ -951,9 +963,10 @@ static cmd_tbl_t cmd_mmc[] = {
 #endif
 };
 
-static int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_mmcops(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
-	cmd_tbl_t *cp;
+	struct cmd_tbl *cp;
 
 	cp = find_cmd_tbl(argv[1], cmd_mmc, ARRAY_SIZE(cmd_mmc));
 
diff --git a/cmd/mp.c b/cmd/mp.c
index 4c8f5fc3fa..c2b5235a37 100644
--- a/cmd/mp.c
+++ b/cmd/mp.c
@@ -26,7 +26,7 @@ static int cpu_status_all(void)
 }
 
 static int
-cpu_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+cpu_cmd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	unsigned long cpuid;
 
diff --git a/cmd/mtd.c b/cmd/mtd.c
index f407c5e445..485a963bdd 100644
--- a/cmd/mtd.c
+++ b/cmd/mtd.c
@@ -195,8 +195,8 @@ static bool mtd_oob_write_is_empty(struct mtd_oob_ops *op)
 	return true;
 }
 
-static int do_mtd_list(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_mtd_list(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	struct mtd_info *mtd;
 	int dev_nb = 0;
@@ -240,7 +240,8 @@ static int mtd_special_write_oob(struct mtd_info *mtd, u64 off,
 	return ret;
 }
 
-static int do_mtd_io(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_mtd_io(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	bool dump, read, raw, woob, write_empty_pages, has_pages = false;
 	u64 start_off, off, len, remaining, default_len;
@@ -382,8 +383,8 @@ out_put_mtd:
 	return ret;
 }
 
-static int do_mtd_erase(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_mtd_erase(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	struct erase_info erase_op = {};
 	struct mtd_info *mtd;
@@ -454,8 +455,8 @@ out_put_mtd:
 	return ret;
 }
 
-static int do_mtd_bad(cmd_tbl_t *cmdtp, int flag, int argc,
-		      char * const argv[])
+static int do_mtd_bad(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	struct mtd_info *mtd;
 	loff_t off;
@@ -485,7 +486,7 @@ out_put_mtd:
 }
 
 #ifdef CONFIG_AUTO_COMPLETE
-static int mtd_name_complete(int argc, char * const argv[], char last_char,
+static int mtd_name_complete(int argc, char *const argv[], char last_char,
 			     int maxv, char *cmdv[])
 {
 	int len = 0, n_found = 0;
diff --git a/cmd/mtdparts.c b/cmd/mtdparts.c
index b40c2afadd..9fca08562b 100644
--- a/cmd/mtdparts.c
+++ b/cmd/mtdparts.c
@@ -1915,7 +1915,8 @@ static struct part_info* mtd_part_info(struct mtd_device *dev, unsigned int part
  * @param argv arguments list
  * @return 0 on success, 1 otherwise
  */
-static int do_chpart(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_chpart(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 /* command line only */
 	struct mtd_device *dev;
@@ -1953,8 +1954,8 @@ static int do_chpart(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
  * @param argv arguments list
  * @return 0 on success, 1 otherwise
  */
-static int do_mtdparts(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_mtdparts(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	if (argc == 2) {
 		if (strcmp(argv[1], "default") == 0) {
diff --git a/cmd/mvebu/bubt.c b/cmd/mvebu/bubt.c
index c5af669d0d..a27b0df8ae 100644
--- a/cmd/mvebu/bubt.c
+++ b/cmd/mvebu/bubt.c
@@ -829,7 +829,7 @@ else
 #endif
 #endif /* DEFAULT_BUBT_DST */
 
-int do_bubt_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bubt_cmd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	struct bubt_dev *src, *dst;
 	size_t image_size;
diff --git a/cmd/nand.c b/cmd/nand.c
index c42ab24ec0..92d039af8f 100644
--- a/cmd/nand.c
+++ b/cmd/nand.c
@@ -189,7 +189,7 @@ static void do_nand_status(struct mtd_info *mtd)
 #ifdef CONFIG_ENV_OFFSET_OOB
 unsigned long nand_env_oob_offset;
 
-int do_nand_env_oob(cmd_tbl_t *cmdtp, int argc, char *const argv[])
+int do_nand_env_oob(struct cmd_tbl *cmdtp, int argc, char *const argv[])
 {
 	int ret;
 	uint32_t oob_buf[ENV_OFFSET_SIZE/sizeof(uint32_t)];
@@ -376,7 +376,8 @@ static void adjust_size_for_badblocks(loff_t *size, loff_t offset, int dev)
 	}
 }
 
-static int do_nand(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_nand(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	int i, ret = 0;
 	ulong addr;
@@ -845,7 +846,7 @@ U_BOOT_CMD(
 	"NAND sub-system", nand_help_text
 );
 
-static int nand_load_image(cmd_tbl_t *cmdtp, struct mtd_info *mtd,
+static int nand_load_image(struct cmd_tbl *cmdtp, struct mtd_info *mtd,
 			   ulong offset, ulong addr, char *cmd)
 {
 	int r;
@@ -933,8 +934,8 @@ static int nand_load_image(cmd_tbl_t *cmdtp, struct mtd_info *mtd,
 	return bootm_maybe_autostart(cmdtp, cmd);
 }
 
-static int do_nandboot(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_nandboot(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	char *boot_device = NULL;
 	int idx;
diff --git a/cmd/net.c b/cmd/net.c
index 282b38ccf9..25390b0474 100644
--- a/cmd/net.c
+++ b/cmd/net.c
@@ -14,10 +14,11 @@
 #include <image.h>
 #include <net.h>
 
-static int netboot_common(enum proto_t, cmd_tbl_t *, int, char * const []);
+static int netboot_common(enum proto_t, struct cmd_tbl *, int, char * const []);
 
 #ifdef CONFIG_CMD_BOOTP
-static int do_bootp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_bootp(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[])
 {
 	return netboot_common(BOOTP, cmdtp, argc, argv);
 }
@@ -30,7 +31,7 @@ U_BOOT_CMD(
 #endif
 
 #ifdef CONFIG_CMD_TFTPBOOT
-int do_tftpb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_tftpb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int ret;
 
@@ -48,7 +49,8 @@ U_BOOT_CMD(
 #endif
 
 #ifdef CONFIG_CMD_TFTPPUT
-static int do_tftpput(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_tftpput(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	return netboot_common(TFTPPUT, cmdtp, argc, argv);
 }
@@ -61,7 +63,8 @@ U_BOOT_CMD(
 #endif
 
 #ifdef CONFIG_CMD_TFTPSRV
-static int do_tftpsrv(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_tftpsrv(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	return netboot_common(TFTPSRV, cmdtp, argc, argv);
 }
@@ -78,7 +81,7 @@ U_BOOT_CMD(
 
 
 #ifdef CONFIG_CMD_RARP
-int do_rarpb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_rarpb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	return netboot_common(RARP, cmdtp, argc, argv);
 }
@@ -91,7 +94,8 @@ U_BOOT_CMD(
 #endif
 
 #if defined(CONFIG_CMD_DHCP)
-static int do_dhcp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_dhcp(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	return netboot_common(DHCP, cmdtp, argc, argv);
 }
@@ -104,7 +108,8 @@ U_BOOT_CMD(
 #endif
 
 #if defined(CONFIG_CMD_NFS)
-static int do_nfs(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_nfs(struct cmd_tbl *cmdtp, int flag, int argc,
+		  char *const argv[])
 {
 	return netboot_common(NFS, cmdtp, argc, argv);
 }
@@ -177,8 +182,8 @@ static void netboot_update_env(void)
 #endif
 }
 
-static int netboot_common(enum proto_t proto, cmd_tbl_t *cmdtp, int argc,
-		char * const argv[])
+static int netboot_common(enum proto_t proto, struct cmd_tbl *cmdtp, int argc,
+			  char *const argv[])
 {
 	char *s;
 	char *end;
@@ -273,7 +278,8 @@ static int netboot_common(enum proto_t proto, cmd_tbl_t *cmdtp, int argc,
 }
 
 #if defined(CONFIG_CMD_PING)
-static int do_ping(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_ping(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	if (argc < 2)
 		return CMD_RET_USAGE;
@@ -321,7 +327,7 @@ static void cdp_update_env(void)
 	}
 }
 
-int do_cdp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_cdp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int r;
 
@@ -344,7 +350,7 @@ U_BOOT_CMD(
 #endif
 
 #if defined(CONFIG_CMD_SNTP)
-int do_sntp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_sntp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	char *toff;
 
@@ -385,7 +391,7 @@ U_BOOT_CMD(
 #endif
 
 #if defined(CONFIG_CMD_DNS)
-int do_dns(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_dns(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	if (argc == 1)
 		return CMD_RET_USAGE;
@@ -431,8 +437,8 @@ U_BOOT_CMD(
 #endif	/* CONFIG_CMD_DNS */
 
 #if defined(CONFIG_CMD_LINK_LOCAL)
-static int do_link_local(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_link_local(struct cmd_tbl *cmdtp, int flag, int argc,
+			 char *const argv[])
 {
 	char tmp[22];
 
diff --git a/cmd/nvedit.c b/cmd/nvedit.c
index a86063df94..f44651c727 100644
--- a/cmd/nvedit.c
+++ b/cmd/nvedit.c
@@ -121,8 +121,8 @@ static int env_print(char *name, int flag)
 	return 0;
 }
 
-static int do_env_print(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_env_print(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	int i;
 	int rcode = 0;
@@ -163,8 +163,8 @@ static int do_env_print(cmd_tbl_t *cmdtp, int flag, int argc,
 }
 
 #ifdef CONFIG_CMD_GREPENV
-static int do_env_grep(cmd_tbl_t *cmdtp, int flag,
-		       int argc, char * const argv[])
+static int do_env_grep(struct cmd_tbl *cmdtp, int flag,
+		       int argc, char *const argv[])
 {
 	char *res = NULL;
 	int len, grep_how, grep_what;
@@ -223,7 +223,7 @@ DONE:
  * Set a new environment variable,
  * or replace or delete an existing one.
  */
-static int _do_env_set(int flag, int argc, char * const argv[], int env_flag)
+static int _do_env_set(int flag, int argc, char *const argv[], int env_flag)
 {
 	int   i, len;
 	char  *name, *value, *s;
@@ -379,7 +379,8 @@ int eth_env_set_enetaddr(const char *name, const uint8_t *enetaddr)
 }
 
 #ifndef CONFIG_SPL_BUILD
-static int do_env_set(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_env_set(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	if (argc < 2)
 		return CMD_RET_USAGE;
@@ -391,7 +392,7 @@ static int do_env_set(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
  * Prompt for environment variable
  */
 #if defined(CONFIG_CMD_ASKENV)
-int do_env_ask(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_env_ask(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	char message[CONFIG_SYS_CBSIZE];
 	int i, len, pos, size;
@@ -509,7 +510,8 @@ static int print_active_callback(struct env_entry *entry)
 /*
  * Print the callbacks available and what they are bound to
  */
-int do_env_callback(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_env_callback(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[])
 {
 	struct env_clbk_tbl *clbkp;
 	int i;
@@ -577,7 +579,7 @@ static int print_active_flags(struct env_entry *entry)
 /*
  * Print the flags available and what variables have flags
  */
-int do_env_flags(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_env_flags(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	/* Print the available variable types */
 	printf("Available variable type flags (position %d):\n",
@@ -619,8 +621,8 @@ int do_env_flags(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
  * Interactively edit an environment variable
  */
 #if defined(CONFIG_CMD_EDITENV)
-static int do_env_edit(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_env_edit(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	char buffer[CONFIG_SYS_CBSIZE];
 	char *init_val;
@@ -764,8 +766,8 @@ ulong env_get_ulong(const char *name, int base, ulong default_val)
 
 #ifndef CONFIG_SPL_BUILD
 #if defined(CONFIG_CMD_SAVEENV) && defined(ENV_IS_IN_DEVICE)
-static int do_env_save(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_env_save(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	return env_save() ? 1 : 0;
 }
@@ -777,8 +779,8 @@ U_BOOT_CMD(
 );
 
 #if defined(CONFIG_CMD_ERASEENV)
-static int do_env_erase(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_env_erase(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	return env_erase() ? 1 : 0;
 }
@@ -808,8 +810,8 @@ int env_match(uchar *s1, int i2)
 }
 
 #ifndef CONFIG_SPL_BUILD
-static int do_env_default(cmd_tbl_t *cmdtp, int flag,
-			  int argc, char * const argv[])
+static int do_env_default(struct cmd_tbl *cmdtp, int flag,
+			  int argc, char *const argv[])
 {
 	int all = 0, env_flag = H_INTERACTIVE;
 
@@ -846,8 +848,8 @@ static int do_env_default(cmd_tbl_t *cmdtp, int flag,
 	return cmd_usage(cmdtp);
 }
 
-static int do_env_delete(cmd_tbl_t *cmdtp, int flag,
-			 int argc, char * const argv[])
+static int do_env_delete(struct cmd_tbl *cmdtp, int flag,
+			 int argc, char *const argv[])
 {
 	int env_flag = H_INTERACTIVE;
 	int ret = 0;
@@ -927,8 +929,8 @@ static int do_env_delete(cmd_tbl_t *cmdtp, int flag,
  *
  *	=> env import -d -t ${backup_addr}
  */
-static int do_env_export(cmd_tbl_t *cmdtp, int flag,
-			 int argc, char * const argv[])
+static int do_env_export(struct cmd_tbl *cmdtp, int flag,
+			 int argc, char *const argv[])
 {
 	char	buf[32];
 	ulong	addr;
@@ -1060,8 +1062,8 @@ sep_err:
  *		the environment at address 'addr'. Without arguments, the whole
  *		environment gets imported.
  */
-static int do_env_import(cmd_tbl_t *cmdtp, int flag,
-			 int argc, char * const argv[])
+static int do_env_import(struct cmd_tbl *cmdtp, int flag,
+			 int argc, char *const argv[])
 {
 	ulong	addr;
 	char	*cmd, *ptr;
@@ -1221,8 +1223,8 @@ static int print_env_info(void)
  * env info [-d] - evaluate whether default environment is used
  * env info [-p] - evaluate whether environment can be persisted
  */
-static int do_env_info(cmd_tbl_t *cmdtp, int flag,
-		       int argc, char * const argv[])
+static int do_env_info(struct cmd_tbl *cmdtp, int flag,
+		       int argc, char *const argv[])
 {
 	int eval_flags = 0;
 	int eval_results = 0;
@@ -1278,8 +1280,8 @@ static int do_env_info(cmd_tbl_t *cmdtp, int flag,
 #endif
 
 #if defined(CONFIG_CMD_ENV_EXISTS)
-static int do_env_exists(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_env_exists(struct cmd_tbl *cmdtp, int flag, int argc,
+			 char *const argv[])
 {
 	struct env_entry e, *ep;
 
@@ -1297,7 +1299,7 @@ static int do_env_exists(cmd_tbl_t *cmdtp, int flag, int argc,
 /*
  * New command line interface: "env" command with subcommands
  */
-static cmd_tbl_t cmd_env_sub[] = {
+static struct cmd_tbl cmd_env_sub[] = {
 #if defined(CONFIG_CMD_ASKENV)
 	U_BOOT_CMD_MKENT(ask, CONFIG_SYS_MAXARGS, 1, do_env_ask, "", ""),
 #endif
@@ -1347,9 +1349,9 @@ void env_reloc(void)
 }
 #endif
 
-static int do_env(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_env(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
-	cmd_tbl_t *cp;
+	struct cmd_tbl *cp;
 
 	if (argc < 2)
 		return CMD_RET_USAGE;
diff --git a/cmd/nvedit_efi.c b/cmd/nvedit_efi.c
index 75e4e51495..29cad38e19 100644
--- a/cmd/nvedit_efi.c
+++ b/cmd/nvedit_efi.c
@@ -138,7 +138,7 @@ out:
  *
  * Show information encoded in named UEFI variables
  */
-static int efi_dump_vars(int argc,  char * const argv[],
+static int efi_dump_vars(int argc,  char *const argv[],
 			 const efi_guid_t *guid, bool verbose)
 {
 	u16 *var_name16, *p;
@@ -172,7 +172,7 @@ static int efi_dump_vars(int argc,  char * const argv[],
 	return CMD_RET_SUCCESS;
 }
 
-static bool match_name(int argc, char * const argv[], u16 *var_name16)
+static bool match_name(int argc, char *const argv[], u16 *var_name16)
 {
 	char *buf, *p;
 	size_t buflen;
@@ -210,7 +210,7 @@ out:
  *
  * Show information encoded in all the UEFI variables
  */
-static int efi_dump_var_all(int argc,  char * const argv[],
+static int efi_dump_var_all(int argc,  char *const argv[],
 			    const efi_guid_t *guid_p, bool verbose)
 {
 	u16 *var_name16, *p;
@@ -275,7 +275,8 @@ static int efi_dump_var_all(int argc,  char * const argv[],
  * If one or more variable names are specified, show information
  * named UEFI variables, otherwise show all the UEFI variables.
  */
-int do_env_print_efi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_env_print_efi(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	efi_guid_t guid;
 	const efi_guid_t *guid_p;
@@ -465,7 +466,8 @@ out:
  * Encode values specified and set given UEFI variable.
  * If no value is specified, delete the variable.
  */
-int do_env_set_efi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_env_set_efi(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	char *var_name, *value, *ep;
 	ulong addr;
diff --git a/cmd/nvme.c b/cmd/nvme.c
index 9ae91ce9cb..e715c570a3 100644
--- a/cmd/nvme.c
+++ b/cmd/nvme.c
@@ -12,7 +12,8 @@
 
 static int nvme_curr_dev;
 
-static int do_nvme(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_nvme(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	int ret;
 
diff --git a/cmd/onenand.c b/cmd/onenand.c
index d97844fa7a..216458bb47 100644
--- a/cmd/onenand.c
+++ b/cmd/onenand.c
@@ -24,7 +24,7 @@ static struct mtd_info *mtd;
 static loff_t next_ofs;
 static loff_t skip_ofs;
 
-static int arg_off_size_onenand(int argc, char * const argv[], ulong *off,
+static int arg_off_size_onenand(int argc, char *const argv[], ulong *off,
 				size_t *size)
 {
 	if (argc >= 1) {
@@ -358,13 +358,15 @@ static int onenand_dump(struct mtd_info *mtd, ulong off, int only_oob)
 	return 0;
 }
 
-static int do_onenand_info(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+static int do_onenand_info(struct cmd_tbl *cmdtp, int flag, int argc,
+			   char *const argv[])
 {
 	printf("%s\n", mtd->name);
 	return 0;
 }
 
-static int do_onenand_bad(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+static int do_onenand_bad(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	ulong ofs;
 
@@ -379,7 +381,8 @@ static int do_onenand_bad(cmd_tbl_t * cmdtp, int flag, int argc, char * const ar
 	return 0;
 }
 
-static int do_onenand_read(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+static int do_onenand_read(struct cmd_tbl *cmdtp, int flag, int argc,
+			   char *const argv[])
 {
 	char *s;
 	int oob = 0;
@@ -408,7 +411,8 @@ static int do_onenand_read(cmd_tbl_t * cmdtp, int flag, int argc, char * const a
 	return ret == 0 ? 0 : 1;
 }
 
-static int do_onenand_write(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+static int do_onenand_write(struct cmd_tbl *cmdtp, int flag, int argc,
+			    char *const argv[])
 {
 	ulong addr, ofs;
 	size_t len;
@@ -434,7 +438,8 @@ static int do_onenand_write(cmd_tbl_t * cmdtp, int flag, int argc, char * const
 	return ret == 0 ? 0 : 1;
 }
 
-static int do_onenand_erase(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+static int do_onenand_erase(struct cmd_tbl *cmdtp, int flag, int argc,
+			    char *const argv[])
 {
 	ulong ofs;
 	int ret = 0;
@@ -470,7 +475,8 @@ static int do_onenand_erase(cmd_tbl_t * cmdtp, int flag, int argc, char * const
 	return ret == 0 ? 0 : 1;
 }
 
-static int do_onenand_test(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+static int do_onenand_test(struct cmd_tbl *cmdtp, int flag, int argc,
+			   char *const argv[])
 {
 	ulong ofs;
 	int ret = 0;
@@ -495,7 +501,8 @@ static int do_onenand_test(cmd_tbl_t * cmdtp, int flag, int argc, char * const a
 	return ret == 0 ? 0 : 1;
 }
 
-static int do_onenand_dump(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+static int do_onenand_dump(struct cmd_tbl *cmdtp, int flag, int argc,
+			   char *const argv[])
 {
 	ulong ofs;
 	int ret = 0;
@@ -515,7 +522,8 @@ static int do_onenand_dump(cmd_tbl_t * cmdtp, int flag, int argc, char * const a
 	return ret == 0 ? 1 : 0;
 }
 
-static int do_onenand_markbad(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+static int do_onenand_markbad(struct cmd_tbl *cmdtp, int flag, int argc,
+			      char *const argv[])
 {
 	int ret = 0;
 	ulong addr;
@@ -545,7 +553,7 @@ static int do_onenand_markbad(cmd_tbl_t * cmdtp, int flag, int argc, char * cons
 	return ret;
 }
 
-static cmd_tbl_t cmd_onenand_sub[] = {
+static struct cmd_tbl cmd_onenand_sub[] = {
 	U_BOOT_CMD_MKENT(info, 1, 0, do_onenand_info, "", ""),
 	U_BOOT_CMD_MKENT(bad, 1, 0, do_onenand_bad, "", ""),
 	U_BOOT_CMD_MKENT(read, 4, 0, do_onenand_read, "", ""),
@@ -563,9 +571,10 @@ void onenand_reloc(void) {
 }
 #endif
 
-static int do_onenand(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+static int do_onenand(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
-	cmd_tbl_t *c;
+	struct cmd_tbl *c;
 
 	if (argc < 2)
 		return CMD_RET_USAGE;
diff --git a/cmd/osd.c b/cmd/osd.c
index 0b1fa49936..bdad5d8e96 100644
--- a/cmd/osd.c
+++ b/cmd/osd.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <dm.h>
 #include <hexdump.h>
 #include <video_osd.h>
@@ -80,8 +81,8 @@ static void show_osd(struct udevice *osd)
 	printf("\n");
 }
 
-static int do_osd_write(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_osd_write(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	uint x, y;
 	uint count;
@@ -131,8 +132,8 @@ static int do_osd_write(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_SUCCESS;
 }
 
-static int do_osd_print(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_osd_print(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	uint x, y;
 	u8 color;
@@ -161,8 +162,8 @@ static int do_osd_print(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_SUCCESS;
 }
 
-static int do_osd_size(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_osd_size(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	uint x, y;
 	int res;
@@ -187,8 +188,8 @@ static int do_osd_size(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_SUCCESS;
 }
 
-static int do_show_osd(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_show_osd(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	struct udevice *osd;
 
@@ -223,8 +224,8 @@ static int do_show_osd(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_SUCCESS;
 }
 
-static int do_osd_num(cmd_tbl_t *cmdtp, int flag, int argc,
-		      char * const argv[])
+static int do_osd_num(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	int osd_no;
 	int res = 0;
@@ -250,7 +251,7 @@ static int do_osd_num(cmd_tbl_t *cmdtp, int flag, int argc,
 	return res ? CMD_RET_FAILURE : CMD_RET_SUCCESS;
 }
 
-static cmd_tbl_t cmd_osd_sub[] = {
+static struct cmd_tbl cmd_osd_sub[] = {
 	U_BOOT_CMD_MKENT(show, 1, 1, do_show_osd, "", ""),
 	U_BOOT_CMD_MKENT(dev, 1, 1, do_osd_num, "", ""),
 	U_BOOT_CMD_MKENT(write, 4, 1, do_osd_write, "", ""),
@@ -258,9 +259,9 @@ static cmd_tbl_t cmd_osd_sub[] = {
 	U_BOOT_CMD_MKENT(size, 2, 1, do_osd_size, "", ""),
 };
 
-static int do_osd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_osd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
-	cmd_tbl_t *c;
+	struct cmd_tbl *c;
 
 	if (argc < 2)
 		return CMD_RET_USAGE;
diff --git a/cmd/part.c b/cmd/part.c
index 4b2e06e615..216f14bf5d 100644
--- a/cmd/part.c
+++ b/cmd/part.c
@@ -28,7 +28,7 @@ enum cmd_part_info {
 	CMD_PART_INFO_NUMBER
 };
 
-static int do_part_uuid(int argc, char * const argv[])
+static int do_part_uuid(int argc, char *const argv[])
 {
 	int part;
 	struct blk_desc *dev_desc;
@@ -51,7 +51,7 @@ static int do_part_uuid(int argc, char * const argv[])
 	return 0;
 }
 
-static int do_part_list(int argc, char * const argv[])
+static int do_part_list(int argc, char *const argv[])
 {
 	int ret;
 	struct blk_desc *desc;
@@ -114,7 +114,7 @@ static int do_part_list(int argc, char * const argv[])
 	return 0;
 }
 
-static int do_part_info(int argc, char * const argv[], enum cmd_part_info param)
+static int do_part_info(int argc, char *const argv[], enum cmd_part_info param)
 {
 	struct blk_desc *desc;
 	struct disk_partition info;
@@ -167,22 +167,23 @@ static int do_part_info(int argc, char * const argv[], enum cmd_part_info param)
 	return 0;
 }
 
-static int do_part_start(int argc, char * const argv[])
+static int do_part_start(int argc, char *const argv[])
 {
 	return do_part_info(argc, argv, CMD_PART_INFO_START);
 }
 
-static int do_part_size(int argc, char * const argv[])
+static int do_part_size(int argc, char *const argv[])
 {
 	return do_part_info(argc, argv, CMD_PART_INFO_SIZE);
 }
 
-static int do_part_number(int argc, char * const argv[])
+static int do_part_number(int argc, char *const argv[])
 {
 	return do_part_info(argc, argv, CMD_PART_INFO_NUMBER);
 }
 
-static int do_part(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_part(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	if (argc < 2)
 		return CMD_RET_USAGE;
diff --git a/cmd/pcap.c b/cmd/pcap.c
index 980603f7bd..d0172f3fff 100644
--- a/cmd/pcap.c
+++ b/cmd/pcap.c
@@ -9,8 +9,8 @@
 #include <net.h>
 #include <net/pcap.h>
 
-static int do_pcap_init(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_pcap_init(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	phys_addr_t addr;
 	unsigned int size;
@@ -24,26 +24,26 @@ static int do_pcap_init(cmd_tbl_t *cmdtp, int flag, int argc,
 	return pcap_init(addr, size) ? CMD_RET_FAILURE : CMD_RET_SUCCESS;
 }
 
-static int do_pcap_start(cmd_tbl_t *cmdtp, int flag, int argc,
-			 char * const argv[])
+static int do_pcap_start(struct cmd_tbl *cmdtp, int flag, int argc,
+			 char *const argv[])
 {
 	return pcap_start_stop(true) ? CMD_RET_FAILURE : CMD_RET_SUCCESS;
 }
 
-static int do_pcap_stop(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_pcap_stop(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	return pcap_start_stop(false) ? CMD_RET_FAILURE : CMD_RET_SUCCESS;
 }
 
-static int do_pcap_status(cmd_tbl_t *cmdtp, int flag, int argc,
-			  char * const argv[])
+static int do_pcap_status(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	return pcap_print_status() ? CMD_RET_FAILURE : CMD_RET_SUCCESS;
 }
 
-static int do_pcap_clear(cmd_tbl_t *cmdtp, int flag, int argc,
-			 char * const argv[])
+static int do_pcap_clear(struct cmd_tbl *cmdtp, int flag, int argc,
+			 char *const argv[])
 {
 	return pcap_clear() ? CMD_RET_FAILURE : CMD_RET_SUCCESS;
 }
diff --git a/cmd/pci.c b/cmd/pci.c
index b2174e2a9c..f91a4eb8ed 100644
--- a/cmd/pci.c
+++ b/cmd/pci.c
@@ -656,7 +656,7 @@ static void pci_show_regions(struct udevice *bus)
  *      pci modify[.b, .w, .l] bus.device.function [addr]
  *      pci write[.b, .w, .l] bus.device.function addr value
  */
-static int do_pci(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_pci(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	ulong addr = 0, value = 0, cmd_size = 0;
 	enum pci_size_t size = PCI_SIZE_32;
diff --git a/cmd/pinmux.c b/cmd/pinmux.c
index de909a163d..9942b15419 100644
--- a/cmd/pinmux.c
+++ b/cmd/pinmux.c
@@ -14,7 +14,8 @@
 
 static struct udevice *currdev;
 
-static int do_dev(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_dev(struct cmd_tbl *cmdtp, int flag, int argc,
+		  char *const argv[])
 {
 	const char *name;
 	int ret;
@@ -75,7 +76,8 @@ static int show_pinmux(struct udevice *dev)
 	return 0;
 }
 
-static int do_status(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_status(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	struct udevice *dev;
 	int ret = CMD_RET_USAGE;
@@ -99,7 +101,8 @@ static int do_status(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return ret;
 }
 
-static int do_list(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_list(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	struct udevice *dev;
 
@@ -118,16 +121,16 @@ static int do_list(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return CMD_RET_SUCCESS;
 }
 
-static cmd_tbl_t pinmux_subcmd[] = {
+static struct cmd_tbl pinmux_subcmd[] = {
 	U_BOOT_CMD_MKENT(dev, 2, 1, do_dev, "", ""),
 	U_BOOT_CMD_MKENT(list, 1, 1, do_list, "", ""),
 	U_BOOT_CMD_MKENT(status, 2, 1, do_status, "", ""),
 };
 
-static int do_pinmux(cmd_tbl_t *cmdtp, int flag, int argc,
-		     char * const argv[])
+static int do_pinmux(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
-	cmd_tbl_t *cmd;
+	struct cmd_tbl *cmd;
 
 	argc--;
 	argv++;
diff --git a/cmd/pmc.c b/cmd/pmc.c
index cafeba9fcc..9a3ba2bffc 100644
--- a/cmd/pmc.c
+++ b/cmd/pmc.c
@@ -30,7 +30,8 @@ static int get_pmc_dev(struct udevice **devp)
 	return 0;
 }
 
-static int do_pmc_init(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_pmc_init(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	struct udevice *dev;
 	int ret;
@@ -42,7 +43,8 @@ static int do_pmc_init(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 	return 0;
 }
 
-static int do_pmc_info(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_pmc_info(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	struct udevice *dev;
 	int ret;
@@ -55,14 +57,14 @@ static int do_pmc_info(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 	return 0;
 }
 
-static cmd_tbl_t cmd_pmc_sub[] = {
+static struct cmd_tbl cmd_pmc_sub[] = {
 	U_BOOT_CMD_MKENT(init, 0, 1, do_pmc_init, "", ""),
 	U_BOOT_CMD_MKENT(info, 0, 1, do_pmc_info, "", ""),
 };
 
-static int do_pmc(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_pmc(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
-	const cmd_tbl_t *cp;
+	const struct cmd_tbl *cp;
 
 	if (argc < 2) /* no subcommand */
 		return cmd_usage(cmdtp);
diff --git a/cmd/pmic.c b/cmd/pmic.c
index 2400bfb601..3bda0534a3 100644
--- a/cmd/pmic.c
+++ b/cmd/pmic.c
@@ -4,6 +4,7 @@
  * Przemyslaw Marczak <p.marczak@samsung.com>
  */
 #include <common.h>
+#include <command.h>
 #include <errno.h>
 #include <dm.h>
 #include <dm/uclass-internal.h>
@@ -21,7 +22,7 @@ static int failure(int ret)
 	return CMD_RET_FAILURE;
 }
 
-static int do_dev(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_dev(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	char *name;
 	int ret = -ENODEV;
@@ -46,7 +47,8 @@ static int do_dev(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return CMD_RET_SUCCESS;
 }
 
-static int do_list(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_list(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	struct udevice *dev;
 	int ret;
@@ -73,7 +75,8 @@ static int do_list(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return CMD_RET_SUCCESS;
 }
 
-static int do_dump(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_dump(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	struct uc_pmic_priv *priv;
 	struct udevice *dev;
@@ -118,7 +121,8 @@ static int do_dump(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return CMD_RET_SUCCESS;
 }
 
-static int do_read(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_read(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	struct uc_pmic_priv *priv;
 	struct udevice *dev;
@@ -157,7 +161,8 @@ static int do_read(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return CMD_RET_SUCCESS;
 }
 
-static int do_write(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_write(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[])
 {
 	struct udevice *dev;
 	uint reg, value;
@@ -191,7 +196,7 @@ static int do_write(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return CMD_RET_SUCCESS;
 }
 
-static cmd_tbl_t subcmd[] = {
+static struct cmd_tbl subcmd[] = {
 	U_BOOT_CMD_MKENT(dev, 2, 1, do_dev, "", ""),
 	U_BOOT_CMD_MKENT(list, 1, 1, do_list, "", ""),
 	U_BOOT_CMD_MKENT(dump, 1, 1, do_dump, "", ""),
@@ -199,10 +204,10 @@ static cmd_tbl_t subcmd[] = {
 	U_BOOT_CMD_MKENT(write, 3, 1, do_write, "", ""),
 };
 
-static int do_pmic(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_pmic(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
-	cmd_tbl_t *cmd;
+	struct cmd_tbl *cmd;
 
 	argc--;
 	argv++;
diff --git a/cmd/pxe.c b/cmd/pxe.c
index bce6728875..6372fc9871 100644
--- a/cmd/pxe.c
+++ b/cmd/pxe.c
@@ -24,7 +24,8 @@ const char *pxe_default_paths[] = {
 	NULL
 };
 
-static int do_get_tftp(cmd_tbl_t *cmdtp, const char *file_path, char *file_addr)
+static int do_get_tftp(struct cmd_tbl *cmdtp, const char *file_path,
+		       char *file_addr)
 {
 	char *tftp_argv[] = {"tftp", NULL, NULL, NULL};
 
@@ -42,7 +43,7 @@ static int do_get_tftp(cmd_tbl_t *cmdtp, const char *file_path, char *file_addr)
  *
  * Returns 1 on success or < 0 on error.
  */
-static int pxe_uuid_path(cmd_tbl_t *cmdtp, unsigned long pxefile_addr_r)
+static int pxe_uuid_path(struct cmd_tbl *cmdtp, unsigned long pxefile_addr_r)
 {
 	char *uuid_str;
 
@@ -60,7 +61,7 @@ static int pxe_uuid_path(cmd_tbl_t *cmdtp, unsigned long pxefile_addr_r)
  *
  * Returns 1 on success or < 0 on error.
  */
-static int pxe_mac_path(cmd_tbl_t *cmdtp, unsigned long pxefile_addr_r)
+static int pxe_mac_path(struct cmd_tbl *cmdtp, unsigned long pxefile_addr_r)
 {
 	char mac_str[21];
 	int err;
@@ -80,7 +81,7 @@ static int pxe_mac_path(cmd_tbl_t *cmdtp, unsigned long pxefile_addr_r)
  *
  * Returns 1 on success or < 0 on error.
  */
-static int pxe_ipaddr_paths(cmd_tbl_t *cmdtp, unsigned long pxefile_addr_r)
+static int pxe_ipaddr_paths(struct cmd_tbl *cmdtp, unsigned long pxefile_addr_r)
 {
 	char ip_addr[9];
 	int mask_pos, err;
@@ -113,7 +114,7 @@ static int pxe_ipaddr_paths(cmd_tbl_t *cmdtp, unsigned long pxefile_addr_r)
  * Returns 0 on success or 1 on error.
  */
 static int
-do_pxe_get(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+do_pxe_get(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	char *pxefile_addr_str;
 	unsigned long pxefile_addr_r;
@@ -166,7 +167,7 @@ do_pxe_get(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
  * Returns 0 on success, 1 on error.
  */
 static int
-do_pxe_boot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+do_pxe_boot(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	unsigned long pxefile_addr_r;
 	struct pxe_menu *cfg;
@@ -206,14 +207,14 @@ do_pxe_boot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return 0;
 }
 
-static cmd_tbl_t cmd_pxe_sub[] = {
+static struct cmd_tbl cmd_pxe_sub[] = {
 	U_BOOT_CMD_MKENT(get, 1, 1, do_pxe_get, "", ""),
 	U_BOOT_CMD_MKENT(boot, 2, 1, do_pxe_boot, "", "")
 };
 
-static int do_pxe(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_pxe(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
-	cmd_tbl_t *cp;
+	struct cmd_tbl *cp;
 
 	if (argc < 2)
 		return CMD_RET_USAGE;
diff --git a/cmd/pxe_utils.c b/cmd/pxe_utils.c
index 8fc33670c8..ba4bb6347e 100644
--- a/cmd/pxe_utils.c
+++ b/cmd/pxe_utils.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <env.h>
 #include <image.h>
 #include <malloc.h>
@@ -100,7 +101,8 @@ static int get_bootfile_path(const char *file_path, char *bootfile_path,
 	return 1;
 }
 
-int (*do_getfile)(cmd_tbl_t *cmdtp, const char *file_path, char *file_addr);
+int (*do_getfile)(struct cmd_tbl *cmdtp, const char *file_path,
+		  char *file_addr);
 
 /*
  * As in pxelinux, paths to files referenced from files we retrieve are
@@ -110,7 +112,7 @@ int (*do_getfile)(cmd_tbl_t *cmdtp, const char *file_path, char *file_addr);
  *
  * Returns 1 for success, or < 0 on error.
  */
-static int get_relfile(cmd_tbl_t *cmdtp, const char *file_path,
+static int get_relfile(struct cmd_tbl *cmdtp, const char *file_path,
 		       unsigned long file_addr)
 {
 	size_t path_len;
@@ -148,7 +150,7 @@ static int get_relfile(cmd_tbl_t *cmdtp, const char *file_path,
  *
  * Returns 1 on success, or < 0 for error.
  */
-int get_pxe_file(cmd_tbl_t *cmdtp, const char *file_path,
+int get_pxe_file(struct cmd_tbl *cmdtp, const char *file_path,
 		 unsigned long file_addr)
 {
 	unsigned long config_file_size;
@@ -189,7 +191,7 @@ int get_pxe_file(cmd_tbl_t *cmdtp, const char *file_path,
  *
  * Returns 1 on success or < 0 on error.
  */
-int get_pxelinux_path(cmd_tbl_t *cmdtp, const char *file,
+int get_pxelinux_path(struct cmd_tbl *cmdtp, const char *file,
 		      unsigned long pxefile_addr_r)
 {
 	size_t base_len = strlen(PXELINUX_DIR);
@@ -213,7 +215,7 @@ int get_pxelinux_path(cmd_tbl_t *cmdtp, const char *file,
  *
  * Returns 1 on success or < 0 on error.
  */
-static int get_relfile_envaddr(cmd_tbl_t *cmdtp, const char *file_path,
+static int get_relfile_envaddr(struct cmd_tbl *cmdtp, const char *file_path,
 			       const char *envaddr_name)
 {
 	unsigned long file_addr;
@@ -343,7 +345,7 @@ static int label_localboot(struct pxe_label *label)
  * If the label specifies an 'append' line, its contents will overwrite that
  * of the 'bootargs' environment variable.
  */
-static int label_boot(cmd_tbl_t *cmdtp, struct pxe_label *label)
+static int label_boot(struct cmd_tbl *cmdtp, struct pxe_label *label)
 {
 	char *bootm_argv[] = { "bootm", NULL, NULL, NULL, NULL };
 	char initrd_str[28];
@@ -822,7 +824,7 @@ static int parse_integer(char **c, int *dst)
 	return 1;
 }
 
-static int parse_pxefile_top(cmd_tbl_t *cmdtp, char *p, unsigned long base,
+static int parse_pxefile_top(struct cmd_tbl *cmdtp, char *p, unsigned long base,
 			     struct pxe_menu *cfg, int nest_level);
 
 /*
@@ -833,7 +835,7 @@ static int parse_pxefile_top(cmd_tbl_t *cmdtp, char *p, unsigned long base,
  * include, nest_level has already been incremented and doesn't need to be
  * incremented here.
  */
-static int handle_include(cmd_tbl_t *cmdtp, char **c, unsigned long base,
+static int handle_include(struct cmd_tbl *cmdtp, char **c, unsigned long base,
 			  struct pxe_menu *cfg, int nest_level)
 {
 	char *include_path;
@@ -873,7 +875,7 @@ static int handle_include(cmd_tbl_t *cmdtp, char **c, unsigned long base,
  * nest_level should be 1 when parsing the top level pxe file, 2 when parsing
  * a file it includes, 3 when parsing a file included by that file, and so on.
  */
-static int parse_menu(cmd_tbl_t *cmdtp, char **c, struct pxe_menu *cfg,
+static int parse_menu(struct cmd_tbl *cmdtp, char **c, struct pxe_menu *cfg,
 		      unsigned long base, int nest_level)
 {
 	struct token t;
@@ -1086,7 +1088,7 @@ static int parse_label(char **c, struct pxe_menu *cfg)
  *
  * Returns 1 on success, < 0 on error.
  */
-static int parse_pxefile_top(cmd_tbl_t *cmdtp, char *p, unsigned long base,
+static int parse_pxefile_top(struct cmd_tbl *cmdtp, char *p, unsigned long base,
 			     struct pxe_menu *cfg, int nest_level)
 {
 	struct token t;
@@ -1194,7 +1196,7 @@ void destroy_pxe_menu(struct pxe_menu *cfg)
  * files it includes). The resulting pxe_menu struct can be free()'d by using
  * the destroy_pxe_menu() function.
  */
-struct pxe_menu *parse_pxefile(cmd_tbl_t *cmdtp, unsigned long menucfg)
+struct pxe_menu *parse_pxefile(struct cmd_tbl *cmdtp, unsigned long menucfg)
 {
 	struct pxe_menu *cfg;
 	char *buf;
@@ -1278,7 +1280,7 @@ static struct menu *pxe_menu_to_menu(struct pxe_menu *cfg)
 /*
  * Try to boot any labels we have yet to attempt to boot.
  */
-static void boot_unattempted_labels(cmd_tbl_t *cmdtp, struct pxe_menu *cfg)
+static void boot_unattempted_labels(struct cmd_tbl *cmdtp, struct pxe_menu *cfg)
 {
 	struct list_head *pos;
 	struct pxe_label *label;
@@ -1303,7 +1305,7 @@ static void boot_unattempted_labels(cmd_tbl_t *cmdtp, struct pxe_menu *cfg)
  * If this function returns, there weren't any labels that successfully
  * booted, or the user interrupted the menu selection via ctrl+c.
  */
-void handle_pxe_menu(cmd_tbl_t *cmdtp, struct pxe_menu *cfg)
+void handle_pxe_menu(struct cmd_tbl *cmdtp, struct pxe_menu *cfg)
 {
 	void *choice;
 	struct menu *m;
diff --git a/cmd/pxe_utils.h b/cmd/pxe_utils.h
index a38ac81a47..77d2588875 100644
--- a/cmd/pxe_utils.h
+++ b/cmd/pxe_utils.h
@@ -74,15 +74,15 @@ struct pxe_menu {
 
 extern bool is_pxe;
 
-extern int (*do_getfile)(cmd_tbl_t *cmdtp, const char *file_path,
+extern int (*do_getfile)(struct cmd_tbl *cmdtp, const char *file_path,
 			 char *file_addr);
 void destroy_pxe_menu(struct pxe_menu *cfg);
-int get_pxe_file(cmd_tbl_t *cmdtp, const char *file_path,
+int get_pxe_file(struct cmd_tbl *cmdtp, const char *file_path,
 		 unsigned long file_addr);
-int get_pxelinux_path(cmd_tbl_t *cmdtp, const char *file,
+int get_pxelinux_path(struct cmd_tbl *cmdtp, const char *file,
 		      unsigned long pxefile_addr_r);
-void handle_pxe_menu(cmd_tbl_t *cmdtp, struct pxe_menu *cfg);
-struct pxe_menu *parse_pxefile(cmd_tbl_t *cmdtp, unsigned long menucfg);
+void handle_pxe_menu(struct cmd_tbl *cmdtp, struct pxe_menu *cfg);
+struct pxe_menu *parse_pxefile(struct cmd_tbl *cmdtp, unsigned long menucfg);
 int format_mac_pxe(char *outbuf, size_t outbuf_len);
 
 #endif /* __PXE_UTILS_H */
diff --git a/cmd/qfw.c b/cmd/qfw.c
index af826627a2..bb571487f0 100644
--- a/cmd/qfw.c
+++ b/cmd/qfw.c
@@ -93,8 +93,8 @@ static int qemu_fwcfg_list_firmware(void)
 	return 0;
 }
 
-static int qemu_fwcfg_do_list(cmd_tbl_t *cmdtp, int flag,
-		int argc, char * const argv[])
+static int qemu_fwcfg_do_list(struct cmd_tbl *cmdtp, int flag,
+			      int argc, char *const argv[])
 {
 	if (qemu_fwcfg_list_firmware() < 0)
 		return CMD_RET_FAILURE;
@@ -102,8 +102,8 @@ static int qemu_fwcfg_do_list(cmd_tbl_t *cmdtp, int flag,
 	return 0;
 }
 
-static int qemu_fwcfg_do_cpus(cmd_tbl_t *cmdtp, int flag,
-		int argc, char * const argv[])
+static int qemu_fwcfg_do_cpus(struct cmd_tbl *cmdtp, int flag,
+			      int argc, char *const argv[])
 {
 	int ret = qemu_fwcfg_online_cpus();
 	if (ret < 0) {
@@ -116,8 +116,8 @@ static int qemu_fwcfg_do_cpus(cmd_tbl_t *cmdtp, int flag,
 	return 0;
 }
 
-static int qemu_fwcfg_do_load(cmd_tbl_t *cmdtp, int flag,
-		int argc, char * const argv[])
+static int qemu_fwcfg_do_load(struct cmd_tbl *cmdtp, int flag,
+			      int argc, char *const argv[])
 {
 	char *env;
 	void *load_addr;
@@ -156,16 +156,17 @@ static int qemu_fwcfg_do_load(cmd_tbl_t *cmdtp, int flag,
 	return qemu_fwcfg_setup_kernel(load_addr, initrd_addr);
 }
 
-static cmd_tbl_t fwcfg_commands[] = {
+static struct cmd_tbl fwcfg_commands[] = {
 	U_BOOT_CMD_MKENT(list, 0, 1, qemu_fwcfg_do_list, "", ""),
 	U_BOOT_CMD_MKENT(cpus, 0, 1, qemu_fwcfg_do_cpus, "", ""),
 	U_BOOT_CMD_MKENT(load, 2, 1, qemu_fwcfg_do_load, "", ""),
 };
 
-static int do_qemu_fw(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_qemu_fw(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	int ret;
-	cmd_tbl_t *fwcfg_cmd;
+	struct cmd_tbl *fwcfg_cmd;
 
 	if (!qemu_fwcfg_present()) {
 		printf("QEMU fw_cfg interface not found\n");
diff --git a/cmd/read.c b/cmd/read.c
index 7977e9d847..34f53f9a29 100644
--- a/cmd/read.c
+++ b/cmd/read.c
@@ -12,7 +12,7 @@
 #include <command.h>
 #include <part.h>
 
-int do_read(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_read(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	char *ep;
 	struct blk_desc *dev_desc = NULL;
diff --git a/cmd/reginfo.c b/cmd/reginfo.c
index de94dd8071..c8a04b1754 100644
--- a/cmd/reginfo.c
+++ b/cmd/reginfo.c
@@ -8,8 +8,8 @@
 #include <command.h>
 #include <asm/ppc.h>
 
-static int do_reginfo(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_reginfo(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	print_reginfo();
 
diff --git a/cmd/regulator.c b/cmd/regulator.c
index ed8d778c82..aa06c9a9fc 100644
--- a/cmd/regulator.c
+++ b/cmd/regulator.c
@@ -4,6 +4,7 @@
  * Przemyslaw Marczak <p.marczak@samsung.com>
  */
 #include <common.h>
+#include <command.h>
 #include <errno.h>
 #include <dm.h>
 #include <dm/uclass-internal.h>
@@ -22,7 +23,7 @@ static int failure(int ret)
 	return CMD_RET_FAILURE;
 }
 
-static int do_dev(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_dev(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	struct dm_regulator_uclass_platdata *uc_pdata;
 	const char *name;
@@ -82,7 +83,8 @@ static int curr_dev_and_platdata(struct udevice **devp,
 	return CMD_RET_SUCCESS;
 }
 
-static int do_list(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_list(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	struct dm_regulator_uclass_platdata *uc_pdata;
 	struct udevice *dev;
@@ -137,7 +139,8 @@ static const char *get_mode_name(struct dm_regulator_mode *mode,
 	return NULL;
 }
 
-static int do_info(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_info(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	struct udevice *dev;
 	struct dm_regulator_uclass_platdata *uc_pdata;
@@ -231,7 +234,8 @@ static void do_status_line(struct udevice *dev)
 	printf("\n");
 }
 
-static int do_status(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_status(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	struct dm_regulator_uclass_platdata *uc_pdata;
 	struct udevice *dev;
@@ -255,7 +259,8 @@ static int do_status(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return CMD_RET_SUCCESS;
 }
 
-static int do_value(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_value(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[])
 {
 	struct udevice *dev;
 	struct dm_regulator_uclass_platdata *uc_pdata;
@@ -304,7 +309,8 @@ static int do_value(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return CMD_RET_SUCCESS;
 }
 
-static int do_current(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_current(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	struct udevice *dev;
 	struct dm_regulator_uclass_platdata *uc_pdata;
@@ -343,7 +349,8 @@ static int do_current(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return CMD_RET_SUCCESS;
 }
 
-static int do_mode(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_mode(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	struct udevice *dev;
 	struct dm_regulator_uclass_platdata *uc_pdata;
@@ -378,7 +385,8 @@ static int do_mode(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return CMD_RET_SUCCESS;
 }
 
-static int do_enable(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_enable(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	struct udevice *dev;
 	struct dm_regulator_uclass_platdata *uc_pdata;
@@ -397,7 +405,8 @@ static int do_enable(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return CMD_RET_SUCCESS;
 }
 
-static int do_disable(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_disable(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	struct udevice *dev;
 	struct dm_regulator_uclass_platdata *uc_pdata;
@@ -416,7 +425,7 @@ static int do_disable(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return CMD_RET_SUCCESS;
 }
 
-static cmd_tbl_t subcmd[] = {
+static struct cmd_tbl subcmd[] = {
 	U_BOOT_CMD_MKENT(dev, 2, 1, do_dev, "", ""),
 	U_BOOT_CMD_MKENT(list, 1, 1, do_list, "", ""),
 	U_BOOT_CMD_MKENT(info, 2, 1, do_info, "", ""),
@@ -428,10 +437,10 @@ static cmd_tbl_t subcmd[] = {
 	U_BOOT_CMD_MKENT(disable, 1, 1, do_disable, "", ""),
 };
 
-static int do_regulator(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_regulator(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
-	cmd_tbl_t *cmd;
+	struct cmd_tbl *cmd;
 
 	argc--;
 	argv++;
diff --git a/cmd/reiser.c b/cmd/reiser.c
index 28e827796b..3db926f806 100644
--- a/cmd/reiser.c
+++ b/cmd/reiser.c
@@ -30,7 +30,7 @@
 #define PRINTF(fmt,args...)
 #endif
 
-int do_reiserls (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reiserls(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	char *filename = "/";
 	int dev, part;
@@ -76,7 +76,7 @@ U_BOOT_CMD(
 /******************************************************************************
  * Reiserfs boot command intepreter. Derived from diskboot
  */
-int do_reiserload (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reiserload(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	char *filename = NULL;
 	int dev, part;
diff --git a/cmd/remoteproc.c b/cmd/remoteproc.c
index da6f3fc8cc..e8b9178e74 100644
--- a/cmd/remoteproc.c
+++ b/cmd/remoteproc.c
@@ -69,7 +69,7 @@ static int print_remoteproc_list(void)
  *
  * Return: 0 if no error, else returns appropriate error value.
  */
-static int do_rproc_init(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_rproc_init(struct cmd_tbl *cmdtp, int flag, int argc,
 			 char *const argv[])
 {
 	int id;
@@ -102,7 +102,7 @@ static int do_rproc_init(cmd_tbl_t *cmdtp, int flag, int argc,
  *
  * Return: 0 if no error, else returns appropriate error value.
  */
-static int do_remoteproc_list(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_remoteproc_list(struct cmd_tbl *cmdtp, int flag, int argc,
 			      char *const argv[])
 {
 	if (print_remoteproc_list())
@@ -120,7 +120,7 @@ static int do_remoteproc_list(cmd_tbl_t *cmdtp, int flag, int argc,
  *
  * Return: 0 if no error, else returns appropriate error value.
  */
-static int do_remoteproc_load(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_remoteproc_load(struct cmd_tbl *cmdtp, int flag, int argc,
 			      char *const argv[])
 {
 	ulong addr, size;
@@ -159,7 +159,7 @@ static int do_remoteproc_load(cmd_tbl_t *cmdtp, int flag, int argc,
  *
  * Return: 0 if no error, else returns appropriate error value.
  */
-static int do_remoteproc_wrapper(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_remoteproc_wrapper(struct cmd_tbl *cmdtp, int flag, int argc,
 				 char *const argv[])
 {
 	int id, ret = CMD_RET_USAGE;
@@ -201,7 +201,7 @@ static int do_remoteproc_wrapper(cmd_tbl_t *cmdtp, int flag, int argc,
 	return ret ? CMD_RET_FAILURE : 0;
 }
 
-static cmd_tbl_t cmd_remoteproc_sub[] = {
+static struct cmd_tbl cmd_remoteproc_sub[] = {
 	U_BOOT_CMD_MKENT(init, 1, 1, do_rproc_init,
 			 "Enumerate and initialize the remote processor(s)",
 			 "id - ID of the remote processor\n"
@@ -242,10 +242,10 @@ static cmd_tbl_t cmd_remoteproc_sub[] = {
  *
  * Return: 0 if no error, else returns appropriate error value.
  */
-static int do_remoteproc(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_remoteproc(struct cmd_tbl *cmdtp, int flag, int argc,
 			 char *const argv[])
 {
-	cmd_tbl_t *c = NULL;
+	struct cmd_tbl *c = NULL;
 
 	/* Strip off leading 'rproc' command argument */
 	argc--;
diff --git a/cmd/riscv/exception.c b/cmd/riscv/exception.c
index 547fb7d132..3c8dbbec0e 100644
--- a/cmd/riscv/exception.c
+++ b/cmd/riscv/exception.c
@@ -8,14 +8,14 @@
 #include <common.h>
 #include <command.h>
 
-static int do_undefined(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_undefined(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	asm volatile (".word 0xffffffff\n");
 	return CMD_RET_FAILURE;
 }
 
-static cmd_tbl_t cmd_sub[] = {
+static struct cmd_tbl cmd_sub[] = {
 	U_BOOT_CMD_MKENT(undefined, CONFIG_SYS_MAXARGS, 1, do_undefined,
 			 "", ""),
 };
diff --git a/cmd/rng.c b/cmd/rng.c
index 76367fed94..9747c11be4 100644
--- a/cmd/rng.c
+++ b/cmd/rng.c
@@ -11,7 +11,7 @@
 #include <malloc.h>
 #include <rng.h>
 
-static int do_rng(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_rng(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	size_t n = 0x40;
 	struct udevice *dev;
diff --git a/cmd/rockusb.c b/cmd/rockusb.c
index 9b70c6a6af..f181ec6111 100644
--- a/cmd/rockusb.c
+++ b/cmd/rockusb.c
@@ -10,7 +10,8 @@
 #include <usb.h>
 #include <asm/arch-rockchip/f_rockusb.h>
 
-static int do_rockusb(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_rockusb(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	int controller_index, dev_index;
 	char *usb_controller;
diff --git a/cmd/sata.c b/cmd/sata.c
index c507e9dbd8..aa396c1bbd 100644
--- a/cmd/sata.c
+++ b/cmd/sata.c
@@ -79,7 +79,8 @@ int sata_probe(int devnum)
 #endif
 }
 
-static int do_sata(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_sata(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	int rc = 0;
 
diff --git a/cmd/sb.c b/cmd/sb.c
index 5701e03797..f7eb921f43 100644
--- a/cmd/sb.c
+++ b/cmd/sb.c
@@ -5,11 +5,12 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <dm.h>
 #include <spl.h>
 #include <asm/state.h>
 
-static int do_sb_handoff(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_sb_handoff(struct cmd_tbl *cmdtp, int flag, int argc,
 			 char *const argv[])
 {
 #if CONFIG_IS_ENABLED(HANDOFF)
@@ -26,8 +27,8 @@ static int do_sb_handoff(cmd_tbl_t *cmdtp, int flag, int argc,
 #endif
 }
 
-static int do_sb_state(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_sb_state(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	struct sandbox_state *state;
 
@@ -37,14 +38,14 @@ static int do_sb_state(cmd_tbl_t *cmdtp, int flag, int argc,
 	return 0;
 }
 
-static cmd_tbl_t cmd_sb_sub[] = {
+static struct cmd_tbl cmd_sb_sub[] = {
 	U_BOOT_CMD_MKENT(handoff, 1, 0, do_sb_handoff, "", ""),
 	U_BOOT_CMD_MKENT(state, 1, 0, do_sb_state, "", ""),
 };
 
-static int do_sb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_sb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
-	cmd_tbl_t *c;
+	struct cmd_tbl *c;
 
 	/* Skip past 'sb' */
 	argc--;
diff --git a/cmd/scsi.c b/cmd/scsi.c
index e81194de0f..5f710d2895 100644
--- a/cmd/scsi.c
+++ b/cmd/scsi.c
@@ -17,7 +17,8 @@ static int scsi_curr_dev; /* current device */
 /*
  * scsi boot command intepreter. Derived from diskboot
  */
-static int do_scsiboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_scsiboot(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	return common_diskboot(cmdtp, "scsi", argc, argv);
 }
@@ -25,7 +26,8 @@ static int do_scsiboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 /*
  * scsi command intepreter
  */
-static int do_scsi(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_scsi(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	int ret;
 
diff --git a/cmd/setexpr.c b/cmd/setexpr.c
index 0182f19938..1d81ecfa6a 100644
--- a/cmd/setexpr.c
+++ b/cmd/setexpr.c
@@ -290,7 +290,8 @@ static int regex_sub(const char *name,
 }
 #endif
 
-static int do_setexpr(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_setexpr(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	ulong a, b;
 	ulong value;
diff --git a/cmd/sf.c b/cmd/sf.c
index 69e0d46a55..367df576b8 100644
--- a/cmd/sf.c
+++ b/cmd/sf.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <div64.h>
 #include <dm.h>
 #include <flash.h>
@@ -81,7 +82,7 @@ static ulong bytes_per_second(unsigned int len, ulong start_ms)
 		return 1024 * len / max(get_timer(start_ms), 1UL);
 }
 
-static int do_spi_flash_probe(int argc, char * const argv[])
+static int do_spi_flash_probe(int argc, char *const argv[])
 {
 	unsigned int bus = CONFIG_SF_DEFAULT_BUS;
 	unsigned int cs = CONFIG_SF_DEFAULT_CS;
@@ -261,7 +262,7 @@ static int spi_flash_update(struct spi_flash *flash, u32 offset,
 	return 0;
 }
 
-static int do_spi_flash_read_write(int argc, char * const argv[])
+static int do_spi_flash_read_write(int argc, char *const argv[])
 {
 	unsigned long addr;
 	void *buf;
@@ -319,7 +320,7 @@ static int do_spi_flash_read_write(int argc, char * const argv[])
 	return ret == 0 ? 0 : 1;
 }
 
-static int do_spi_flash_erase(int argc, char * const argv[])
+static int do_spi_flash_erase(int argc, char *const argv[])
 {
 	int ret;
 	int dev = 0;
@@ -351,7 +352,7 @@ static int do_spi_flash_erase(int argc, char * const argv[])
 	return ret == 0 ? 0 : 1;
 }
 
-static int do_spi_protect(int argc, char * const argv[])
+static int do_spi_protect(int argc, char *const argv[])
 {
 	int ret = 0;
 	loff_t start, len;
@@ -500,7 +501,7 @@ static int spi_flash_test(struct spi_flash *flash, uint8_t *buf, ulong len,
 	return 0;
 }
 
-static int do_spi_flash_test(int argc, char * const argv[])
+static int do_spi_flash_test(int argc, char *const argv[])
 {
 	unsigned long offset;
 	unsigned long len;
@@ -544,8 +545,8 @@ static int do_spi_flash_test(int argc, char * const argv[])
 }
 #endif /* CONFIG_CMD_SF_TEST */
 
-static int do_spi_flash(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_spi_flash(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	const char *cmd;
 	int ret;
diff --git a/cmd/sha1sum.c b/cmd/sha1sum.c
index 3c50fc27ce..bcc665a5a6 100644
--- a/cmd/sha1sum.c
+++ b/cmd/sha1sum.c
@@ -12,7 +12,7 @@
 #include <hash.h>
 #include <u-boot/sha1.h>
 
-int do_sha1sum(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_sha1sum(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int flags = HASH_FLAG_ENV;
 	int ac;
diff --git a/cmd/smccc.c b/cmd/smccc.c
index 8b1475c2fe..0b19f6c68c 100644
--- a/cmd/smccc.c
+++ b/cmd/smccc.c
@@ -10,7 +10,8 @@
 #include <linux/compiler.h>
 #include <linux/psci.h>
 
-static int do_call(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_call(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	struct arm_smccc_res res;
 
diff --git a/cmd/sound.c b/cmd/sound.c
index 638f29df21..7fc19678ea 100644
--- a/cmd/sound.c
+++ b/cmd/sound.c
@@ -13,7 +13,8 @@
 DECLARE_GLOBAL_DATA_PTR;
 
 /* Initilaise sound subsystem */
-static int do_init(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_init(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	struct udevice *dev;
 	int ret;
@@ -30,7 +31,8 @@ static int do_init(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 }
 
 /* play sound from buffer */
-static int do_play(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_play(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	struct udevice *dev;
 	int ret = 0;
@@ -53,15 +55,16 @@ static int do_play(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 	return 0;
 }
 
-static cmd_tbl_t cmd_sound_sub[] = {
+static struct cmd_tbl cmd_sound_sub[] = {
 	U_BOOT_CMD_MKENT(init, 0, 1, do_init, "", ""),
 	U_BOOT_CMD_MKENT(play, 2, 1, do_play, "", ""),
 };
 
 /* process sound command */
-static int do_sound(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_sound(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[])
 {
-	cmd_tbl_t *c;
+	struct cmd_tbl *c;
 
 	if (argc < 1)
 		return CMD_RET_USAGE;
diff --git a/cmd/source.c b/cmd/source.c
index 92f8f77ee6..5b0b79aadb 100644
--- a/cmd/source.c
+++ b/cmd/source.c
@@ -160,7 +160,8 @@ int image_source_script(ulong addr, const char *fit_uname)
 
 /**************************************************/
 #if defined(CONFIG_CMD_SOURCE)
-static int do_source(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_source(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	ulong addr;
 	int rcode;
diff --git a/cmd/spi.c b/cmd/spi.c
index bfa185b6ae..aec912167c 100644
--- a/cmd/spi.c
+++ b/cmd/spi.c
@@ -97,7 +97,7 @@ done:
  * The command prints out the hexadecimal string received via SPI.
  */
 
-int do_spi (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_spi(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	char  *cp = 0;
 	uchar tmp;
diff --git a/cmd/spl.c b/cmd/spl.c
index 61256f4830..b8e0aa4253 100644
--- a/cmd/spl.c
+++ b/cmd/spl.c
@@ -50,7 +50,7 @@ static const char **subcmd_list[] = {
 };
 
 /* Calls bootm with the parameters given */
-static int call_bootm(int argc, char * const argv[], const char *subcommand[])
+static int call_bootm(int argc, char *const argv[], const char *subcommand[])
 {
 	char *bootm_argv[5];
 
@@ -96,14 +96,15 @@ static int call_bootm(int argc, char * const argv[], const char *subcommand[])
 	return 0;
 }
 
-static cmd_tbl_t cmd_spl_export_sub[] = {
+static struct cmd_tbl cmd_spl_export_sub[] = {
 	U_BOOT_CMD_MKENT(fdt, 0, 1, (void *)SPL_EXPORT_FDT, "", ""),
 	U_BOOT_CMD_MKENT(atags, 0, 1, (void *)SPL_EXPORT_ATAGS, "", ""),
 };
 
-static int spl_export(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int spl_export(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
-	const cmd_tbl_t *c;
+	const struct cmd_tbl *c;
 
 	if (argc < 2) /* no subcommand */
 		return cmd_usage(cmdtp);
@@ -142,13 +143,13 @@ static int spl_export(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return 0;
 }
 
-static cmd_tbl_t cmd_spl_sub[] = {
+static struct cmd_tbl cmd_spl_sub[] = {
 	U_BOOT_CMD_MKENT(export, 0, 1, (void *)SPL_EXPORT, "", ""),
 };
 
-static int do_spl(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_spl(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
-	const cmd_tbl_t *c;
+	const struct cmd_tbl *c;
 	int cmd;
 
 	if (argc < 2) /* no subcommand */
diff --git a/cmd/strings.c b/cmd/strings.c
index 41b1665926..85fdc34f08 100644
--- a/cmd/strings.c
+++ b/cmd/strings.c
@@ -12,7 +12,7 @@
 
 static char *start_addr, *last_addr;
 
-int do_strings(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_strings(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	if (argc == 1)
 		return CMD_RET_USAGE;
diff --git a/cmd/sysboot.c b/cmd/sysboot.c
index 793d67d2f5..af6a2f1b7f 100644
--- a/cmd/sysboot.c
+++ b/cmd/sysboot.c
@@ -8,7 +8,8 @@
 
 static char *fs_argv[5];
 
-static int do_get_ext2(cmd_tbl_t *cmdtp, const char *file_path, char *file_addr)
+static int do_get_ext2(struct cmd_tbl *cmdtp, const char *file_path,
+		       char *file_addr)
 {
 #ifdef CONFIG_CMD_EXT2
 	fs_argv[0] = "ext2load";
@@ -21,7 +22,8 @@ static int do_get_ext2(cmd_tbl_t *cmdtp, const char *file_path, char *file_addr)
 	return -ENOENT;
 }
 
-static int do_get_fat(cmd_tbl_t *cmdtp, const char *file_path, char *file_addr)
+static int do_get_fat(struct cmd_tbl *cmdtp, const char *file_path,
+		      char *file_addr)
 {
 #ifdef CONFIG_CMD_FAT
 	fs_argv[0] = "fatload";
@@ -34,7 +36,8 @@ static int do_get_fat(cmd_tbl_t *cmdtp, const char *file_path, char *file_addr)
 	return -ENOENT;
 }
 
-static int do_get_any(cmd_tbl_t *cmdtp, const char *file_path, char *file_addr)
+static int do_get_any(struct cmd_tbl *cmdtp, const char *file_path,
+		      char *file_addr)
 {
 #ifdef CONFIG_CMD_FS_GENERIC
 	fs_argv[0] = "load";
@@ -52,7 +55,8 @@ static int do_get_any(cmd_tbl_t *cmdtp, const char *file_path, char *file_addr)
  *
  * Returns 0 on success, 1 on error.
  */
-static int do_sysboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_sysboot(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	unsigned long pxefile_addr_r;
 	struct pxe_menu *cfg;
diff --git a/cmd/terminal.c b/cmd/terminal.c
index e1ec66ed71..f6e4d2539e 100644
--- a/cmd/terminal.c
+++ b/cmd/terminal.c
@@ -12,7 +12,7 @@
 #include <stdio_dev.h>
 #include <serial.h>
 
-int do_terminal(cmd_tbl_t * cmd, int flag, int argc, char * const argv[])
+int do_terminal(struct cmd_tbl *cmd, int flag, int argc, char *const argv[])
 {
 	int last_tilde = 0;
 	struct stdio_dev *dev = NULL;
diff --git a/cmd/test.c b/cmd/test.c
index 258bfd8806..dd49d0e00a 100644
--- a/cmd/test.c
+++ b/cmd/test.c
@@ -50,7 +50,8 @@ const struct {
 	{0, "-e", OP_FILE_EXISTS, 4},
 };
 
-static int do_test(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_test(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	char * const *ap;
 	int i, op, left, adv, expr, last_expr, last_unop, last_binop;
@@ -190,7 +191,8 @@ U_BOOT_CMD(
 	"[args..]"
 );
 
-static int do_false(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_false(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[])
 {
 	return 1;
 }
@@ -201,7 +203,8 @@ U_BOOT_CMD(
 	NULL
 );
 
-static int do_true(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_true(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	return 0;
 }
diff --git a/cmd/thordown.c b/cmd/thordown.c
index 8dae024e31..ae20dddfdd 100644
--- a/cmd/thordown.c
+++ b/cmd/thordown.c
@@ -7,12 +7,13 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <thor.h>
 #include <dfu.h>
 #include <g_dnl.h>
 #include <usb.h>
 
-int do_thor_down(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_thor_down(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	if (argc < 4)
 		return CMD_RET_USAGE;
diff --git a/cmd/ti/ddr3.c b/cmd/ti/ddr3.c
index a452fe7876..756aa9eb3e 100644
--- a/cmd/ti/ddr3.c
+++ b/cmd/ti/ddr3.c
@@ -6,6 +6,7 @@
  */
 
 #include <cpu_func.h>
+#include <env.h>
 #include <init.h>
 #include <asm/arch/hardware.h>
 #include <asm/cache.h>
@@ -276,8 +277,8 @@ static int is_ecc_enabled(void)
 		(ecc_ctrl & EMIF_ECC_REG_RMW_EN_MASK);
 }
 
-static int do_ddr_test(cmd_tbl_t *cmdtp,
-		       int flag, int argc, char * const argv[])
+static int do_ddr_test(struct cmd_tbl *cmdtp,
+		       int flag, int argc, char *const argv[])
 {
 	u32 start_addr, end_addr, size, ecc_err;
 
diff --git a/cmd/time.c b/cmd/time.c
index 51cde9749f..db8c1892df 100644
--- a/cmd/time.c
+++ b/cmd/time.c
@@ -24,7 +24,8 @@ static void report_time(ulong cycles)
 	printf(" %lu.%03lu seconds\n", seconds, milliseconds);
 }
 
-static int do_time(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_time(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	ulong cycles = 0;
 	int retval = 0;
diff --git a/cmd/tlv_eeprom.c b/cmd/tlv_eeprom.c
index b5f293ba7f..eab0531c96 100644
--- a/cmd/tlv_eeprom.c
+++ b/cmd/tlv_eeprom.c
@@ -425,7 +425,7 @@ void show_tlv_code_list(void)
  *
  *  This function implements the tlv_eeprom command.
  */
-int do_tlv_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_tlv_eeprom(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	char cmd;
 	struct tlvinfo_header *eeprom_hdr = to_header(eeprom);
diff --git a/cmd/tpm-common.c b/cmd/tpm-common.c
index 3014255229..88c9e08e31 100644
--- a/cmd/tpm-common.c
+++ b/cmd/tpm-common.c
@@ -296,7 +296,7 @@ int get_tpm(struct udevice **devp)
 	return 0;
 }
 
-int do_tpm_device(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_tpm_device(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	unsigned long num;
 	int rc;
@@ -314,7 +314,7 @@ int do_tpm_device(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 	return rc;
 }
 
-int do_tpm_info(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_tpm_info(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	struct udevice *dev;
 	char buf[80];
@@ -333,7 +333,7 @@ int do_tpm_info(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 	return 0;
 }
 
-int do_tpm_init(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_tpm_init(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	struct udevice *dev;
 	int rc;
@@ -347,9 +347,9 @@ int do_tpm_init(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return report_return_code(tpm_init(dev));
 }
 
-int do_tpm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_tpm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
-	cmd_tbl_t *tpm_commands, *cmd;
+	struct cmd_tbl *tpm_commands, *cmd;
 	struct tpm_chip_priv *priv;
 	struct udevice *dev;
 	unsigned int size;
diff --git a/cmd/tpm-user-utils.h b/cmd/tpm-user-utils.h
index a851d9c4af..358ddff576 100644
--- a/cmd/tpm-user-utils.h
+++ b/cmd/tpm-user-utils.h
@@ -17,9 +17,10 @@ int type_string_pack(const char *type_str, char * const values[], u8 *data);
 int type_string_write_vars(const char *type_str, u8 *data, char * const vars[]);
 int get_tpm(struct udevice **devp);
 
-int do_tpm_device(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]);
-int do_tpm_init(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]);
-int do_tpm_info(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]);
-int do_tpm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+int do_tpm_device(struct cmd_tbl *cmdtp, int flag, int argc,
+		  char *const argv[]);
+int do_tpm_init(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
+int do_tpm_info(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
+int do_tpm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
 
 #endif /* __TPM_USER_UTILS_H */
diff --git a/cmd/tpm-v1.c b/cmd/tpm-v1.c
index bc34e0654f..0e2168aea6 100644
--- a/cmd/tpm-v1.c
+++ b/cmd/tpm-v1.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <env.h>
 #include <malloc.h>
 #include <asm/unaligned.h>
@@ -11,8 +12,8 @@
 #include <tpm-v1.h>
 #include "tpm-user-utils.h"
 
-static int do_tpm_startup(cmd_tbl_t *cmdtp, int flag, int argc,
-			  char * const argv[])
+static int do_tpm_startup(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	enum tpm_startup_type mode;
 	struct udevice *dev;
@@ -37,8 +38,8 @@ static int do_tpm_startup(cmd_tbl_t *cmdtp, int flag, int argc,
 	return report_return_code(tpm_startup(dev, mode));
 }
 
-static int do_tpm_nv_define_space(cmd_tbl_t *cmdtp, int flag, int argc,
-				  char * const argv[])
+static int do_tpm_nv_define_space(struct cmd_tbl *cmdtp, int flag, int argc,
+				  char *const argv[])
 {
 	u32 index, perm, size;
 	struct udevice *dev;
@@ -57,8 +58,8 @@ static int do_tpm_nv_define_space(cmd_tbl_t *cmdtp, int flag, int argc,
 	return report_return_code(tpm_nv_define_space(dev, index, perm, size));
 }
 
-static int do_tpm_nv_read_value(cmd_tbl_t *cmdtp, int flag, int argc,
-				char * const argv[])
+static int do_tpm_nv_read_value(struct cmd_tbl *cmdtp, int flag, int argc,
+				char *const argv[])
 {
 	u32 index, count, rc;
 	struct udevice *dev;
@@ -83,8 +84,8 @@ static int do_tpm_nv_read_value(cmd_tbl_t *cmdtp, int flag, int argc,
 	return report_return_code(rc);
 }
 
-static int do_tpm_nv_write_value(cmd_tbl_t *cmdtp, int flag, int argc,
-				 char * const argv[])
+static int do_tpm_nv_write_value(struct cmd_tbl *cmdtp, int flag, int argc,
+				 char *const argv[])
 {
 	struct udevice *dev;
 	u32 index, rc;
@@ -110,8 +111,8 @@ static int do_tpm_nv_write_value(cmd_tbl_t *cmdtp, int flag, int argc,
 	return report_return_code(rc);
 }
 
-static int do_tpm_extend(cmd_tbl_t *cmdtp, int flag, int argc,
-			 char * const argv[])
+static int do_tpm_extend(struct cmd_tbl *cmdtp, int flag, int argc,
+			 char *const argv[])
 {
 	u8 in_digest[20], out_digest[20];
 	struct udevice *dev;
@@ -138,8 +139,8 @@ static int do_tpm_extend(cmd_tbl_t *cmdtp, int flag, int argc,
 	return report_return_code(rc);
 }
 
-static int do_tpm_pcr_read(cmd_tbl_t *cmdtp, int flag, int argc,
-			   char * const argv[])
+static int do_tpm_pcr_read(struct cmd_tbl *cmdtp, int flag, int argc,
+			   char *const argv[])
 {
 	u32 index, count, rc;
 	struct udevice *dev;
@@ -164,8 +165,8 @@ static int do_tpm_pcr_read(cmd_tbl_t *cmdtp, int flag, int argc,
 	return report_return_code(rc);
 }
 
-static int do_tpm_tsc_physical_presence(cmd_tbl_t *cmdtp, int flag, int argc,
-					char * const argv[])
+static int do_tpm_tsc_physical_presence(struct cmd_tbl *cmdtp, int flag,
+					int argc, char *const argv[])
 {
 	struct udevice *dev;
 	u16 presence;
@@ -182,8 +183,8 @@ static int do_tpm_tsc_physical_presence(cmd_tbl_t *cmdtp, int flag, int argc,
 	return report_return_code(tpm_tsc_physical_presence(dev, presence));
 }
 
-static int do_tpm_read_pubek(cmd_tbl_t *cmdtp, int flag, int argc,
-			     char * const argv[])
+static int do_tpm_read_pubek(struct cmd_tbl *cmdtp, int flag, int argc,
+			     char *const argv[])
 {
 	struct udevice *dev;
 	u32 count, rc;
@@ -207,8 +208,8 @@ static int do_tpm_read_pubek(cmd_tbl_t *cmdtp, int flag, int argc,
 	return report_return_code(rc);
 }
 
-static int do_tpm_physical_set_deactivated(cmd_tbl_t *cmdtp, int flag, int argc,
-					   char * const argv[])
+static int do_tpm_physical_set_deactivated(struct cmd_tbl *cmdtp, int flag,
+					   int argc, char *const argv[])
 {
 	struct udevice *dev;
 	u8 state;
@@ -225,8 +226,8 @@ static int do_tpm_physical_set_deactivated(cmd_tbl_t *cmdtp, int flag, int argc,
 	return report_return_code(tpm_physical_set_deactivated(dev, state));
 }
 
-static int do_tpm_get_capability(cmd_tbl_t *cmdtp, int flag, int argc,
-				 char * const argv[])
+static int do_tpm_get_capability(struct cmd_tbl *cmdtp, int flag, int argc,
+				 char *const argv[])
 {
 	u32 cap_area, sub_cap, rc;
 	void *cap;
@@ -253,8 +254,8 @@ static int do_tpm_get_capability(cmd_tbl_t *cmdtp, int flag, int argc,
 	return report_return_code(rc);
 }
 
-static int do_tpm_raw_transfer(cmd_tbl_t *cmdtp, int flag, int argc,
-			       char * const argv[])
+static int do_tpm_raw_transfer(struct cmd_tbl *cmdtp, int flag, int argc,
+			       char *const argv[])
 {
 	struct udevice *dev;
 	void *command;
@@ -282,8 +283,8 @@ static int do_tpm_raw_transfer(cmd_tbl_t *cmdtp, int flag, int argc,
 	return report_return_code(rc);
 }
 
-static int do_tpm_nv_define(cmd_tbl_t *cmdtp, int flag, int argc,
-			    char * const argv[])
+static int do_tpm_nv_define(struct cmd_tbl *cmdtp, int flag, int argc,
+			    char *const argv[])
 {
 	u32 index, perm, size;
 	struct udevice *dev;
@@ -306,8 +307,8 @@ static int do_tpm_nv_define(cmd_tbl_t *cmdtp, int flag, int argc,
 	return report_return_code(tpm_nv_define_space(dev, index, perm, size));
 }
 
-static int do_tpm_nv_read(cmd_tbl_t *cmdtp, int flag, int argc,
-			  char * const argv[])
+static int do_tpm_nv_read(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	u32 index, count, err;
 	struct udevice *dev;
@@ -341,8 +342,8 @@ static int do_tpm_nv_read(cmd_tbl_t *cmdtp, int flag, int argc,
 	return report_return_code(err);
 }
 
-static int do_tpm_nv_write(cmd_tbl_t *cmdtp, int flag, int argc,
-			   char * const argv[])
+static int do_tpm_nv_write(struct cmd_tbl *cmdtp, int flag, int argc,
+			   char *const argv[])
 {
 	u32 index, count, err;
 	struct udevice *dev;
@@ -377,8 +378,8 @@ static int do_tpm_nv_write(cmd_tbl_t *cmdtp, int flag, int argc,
 
 #ifdef CONFIG_TPM_AUTH_SESSIONS
 
-static int do_tpm_oiap(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_tpm_oiap(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	u32 auth_handle, err;
 	struct udevice *dev;
@@ -394,8 +395,8 @@ static int do_tpm_oiap(cmd_tbl_t *cmdtp, int flag, int argc,
 }
 
 #ifdef CONFIG_TPM_LOAD_KEY_BY_SHA1
-static int do_tpm_load_key_by_sha1(cmd_tbl_t *cmdtp, int flag, int argc, char *
-				   const argv[])
+static int do_tpm_load_key_by_sha1(struct cmd_tbl *cmdtp, int flag, int argc,
+				   char *const argv[])
 {
 	u32 parent_handle = 0;
 	u32 key_len, key_handle, err;
@@ -437,8 +438,8 @@ static int do_tpm_load_key_by_sha1(cmd_tbl_t *cmdtp, int flag, int argc, char *
 }
 #endif /* CONFIG_TPM_LOAD_KEY_BY_SHA1 */
 
-static int do_tpm_load_key2_oiap(cmd_tbl_t *cmdtp, int flag, int argc,
-				 char * const argv[])
+static int do_tpm_load_key2_oiap(struct cmd_tbl *cmdtp, int flag, int argc,
+				 char *const argv[])
 {
 	u32 parent_handle, key_len, key_handle, err;
 	u8 usage_auth[DIGEST_LENGTH];
@@ -468,8 +469,8 @@ static int do_tpm_load_key2_oiap(cmd_tbl_t *cmdtp, int flag, int argc,
 	return report_return_code(err);
 }
 
-static int do_tpm_get_pub_key_oiap(cmd_tbl_t *cmdtp, int flag, int argc,
-				   char * const argv[])
+static int do_tpm_get_pub_key_oiap(struct cmd_tbl *cmdtp, int flag, int argc,
+				   char *const argv[])
 {
 	u32 key_handle, err;
 	u8 usage_auth[DIGEST_LENGTH];
@@ -504,8 +505,8 @@ TPM_COMMAND_NO_ARG(tpm_end_oiap)
 #endif /* CONFIG_TPM_AUTH_SESSIONS */
 
 #ifdef CONFIG_TPM_FLUSH_RESOURCES
-static int do_tpm_flush(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_tpm_flush(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	struct udevice *dev;
 	int type = 0;
@@ -577,8 +578,8 @@ static int do_tpm_flush(cmd_tbl_t *cmdtp, int flag, int argc,
 #endif /* CONFIG_TPM_FLUSH_RESOURCES */
 
 #ifdef CONFIG_TPM_LIST_RESOURCES
-static int do_tpm_list(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_tpm_list(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	int type = 0;
 	u16 res_count;
@@ -644,7 +645,7 @@ TPM_COMMAND_NO_ARG(tpm_force_clear)
 TPM_COMMAND_NO_ARG(tpm_physical_enable)
 TPM_COMMAND_NO_ARG(tpm_physical_disable)
 
-static cmd_tbl_t tpm1_commands[] = {
+static struct cmd_tbl tpm1_commands[] = {
 	U_BOOT_CMD_MKENT(device, 0, 1, do_tpm_device, "", ""),
 	U_BOOT_CMD_MKENT(info, 0, 1, do_tpm_info, "", ""),
 	U_BOOT_CMD_MKENT(init, 0, 1, do_tpm_init, "", ""),
@@ -710,7 +711,7 @@ static cmd_tbl_t tpm1_commands[] = {
 #endif /* CONFIG_TPM_LIST_RESOURCES */
 };
 
-cmd_tbl_t *get_tpm1_commands(unsigned int *size)
+struct cmd_tbl *get_tpm1_commands(unsigned int *size)
 {
 	*size = ARRAY_SIZE(tpm1_commands);
 
diff --git a/cmd/tpm-v2.c b/cmd/tpm-v2.c
index 0cd39821bf..e6742656f5 100644
--- a/cmd/tpm-v2.c
+++ b/cmd/tpm-v2.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <dm.h>
 #include <log.h>
 #include <mapmem.h>
@@ -12,8 +13,8 @@
 #include <tpm-v2.h>
 #include "tpm-user-utils.h"
 
-static int do_tpm2_startup(cmd_tbl_t *cmdtp, int flag, int argc,
-			   char * const argv[])
+static int do_tpm2_startup(struct cmd_tbl *cmdtp, int flag, int argc,
+			   char *const argv[])
 {
 	enum tpm2_startup_types mode;
 	struct udevice *dev;
@@ -37,8 +38,8 @@ static int do_tpm2_startup(cmd_tbl_t *cmdtp, int flag, int argc,
 	return report_return_code(tpm2_startup(dev, mode));
 }
 
-static int do_tpm2_self_test(cmd_tbl_t *cmdtp, int flag, int argc,
-			     char * const argv[])
+static int do_tpm2_self_test(struct cmd_tbl *cmdtp, int flag, int argc,
+			     char *const argv[])
 {
 	enum tpm2_yes_no full_test;
 	struct udevice *dev;
@@ -62,8 +63,8 @@ static int do_tpm2_self_test(cmd_tbl_t *cmdtp, int flag, int argc,
 	return report_return_code(tpm2_self_test(dev, full_test));
 }
 
-static int do_tpm2_clear(cmd_tbl_t *cmdtp, int flag, int argc,
-			 char * const argv[])
+static int do_tpm2_clear(struct cmd_tbl *cmdtp, int flag, int argc,
+			 char *const argv[])
 {
 	u32 handle = 0;
 	const char *pw = (argc < 3) ? NULL : argv[2];
@@ -91,8 +92,8 @@ static int do_tpm2_clear(cmd_tbl_t *cmdtp, int flag, int argc,
 	return report_return_code(tpm2_clear(dev, handle, pw, pw_sz));
 }
 
-static int do_tpm2_pcr_extend(cmd_tbl_t *cmdtp, int flag, int argc,
-			      char * const argv[])
+static int do_tpm2_pcr_extend(struct cmd_tbl *cmdtp, int flag, int argc,
+			      char *const argv[])
 {
 	struct udevice *dev;
 	struct tpm_chip_priv *priv;
@@ -122,8 +123,8 @@ static int do_tpm2_pcr_extend(cmd_tbl_t *cmdtp, int flag, int argc,
 	return report_return_code(rc);
 }
 
-static int do_tpm_pcr_read(cmd_tbl_t *cmdtp, int flag, int argc,
-			   char * const argv[])
+static int do_tpm_pcr_read(struct cmd_tbl *cmdtp, int flag, int argc,
+			   char *const argv[])
 {
 	struct udevice *dev;
 	struct tpm_chip_priv *priv;
@@ -160,8 +161,8 @@ static int do_tpm_pcr_read(cmd_tbl_t *cmdtp, int flag, int argc,
 	return report_return_code(rc);
 }
 
-static int do_tpm_get_capability(cmd_tbl_t *cmdtp, int flag, int argc,
-				 char * const argv[])
+static int do_tpm_get_capability(struct cmd_tbl *cmdtp, int flag, int argc,
+				 char *const argv[])
 {
 	u32 capability, property, rc;
 	u8 *data;
@@ -203,7 +204,7 @@ unmap_data:
 	return report_return_code(rc);
 }
 
-static int do_tpm_dam_reset(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_tpm_dam_reset(struct cmd_tbl *cmdtp, int flag, int argc,
 			    char *const argv[])
 {
 	const char *pw = (argc < 2) ? NULL : argv[1];
@@ -224,7 +225,7 @@ static int do_tpm_dam_reset(cmd_tbl_t *cmdtp, int flag, int argc,
 	return report_return_code(tpm2_dam_reset(dev, pw, pw_sz));
 }
 
-static int do_tpm_dam_parameters(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_tpm_dam_parameters(struct cmd_tbl *cmdtp, int flag, int argc,
 				 char *const argv[])
 {
 	const char *pw = (argc < 5) ? NULL : argv[4];
@@ -268,7 +269,7 @@ static int do_tpm_dam_parameters(cmd_tbl_t *cmdtp, int flag, int argc,
 						      lockout_recovery));
 }
 
-static int do_tpm_change_auth(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_tpm_change_auth(struct cmd_tbl *cmdtp, int flag, int argc,
 			      char *const argv[])
 {
 	u32 handle;
@@ -304,8 +305,8 @@ static int do_tpm_change_auth(cmd_tbl_t *cmdtp, int flag, int argc,
 						   oldpw, oldpw_sz));
 }
 
-static int do_tpm_pcr_setauthpolicy(cmd_tbl_t *cmdtp, int flag, int argc,
-				    char * const argv[])
+static int do_tpm_pcr_setauthpolicy(struct cmd_tbl *cmdtp, int flag, int argc,
+				    char *const argv[])
 {
 	u32 index = simple_strtoul(argv[1], NULL, 0);
 	char *key = argv[2];
@@ -328,8 +329,8 @@ static int do_tpm_pcr_setauthpolicy(cmd_tbl_t *cmdtp, int flag, int argc,
 							 key));
 }
 
-static int do_tpm_pcr_setauthvalue(cmd_tbl_t *cmdtp, int flag,
-				   int argc, char * const argv[])
+static int do_tpm_pcr_setauthvalue(struct cmd_tbl *cmdtp, int flag,
+				   int argc, char *const argv[])
 {
 	u32 index = simple_strtoul(argv[1], NULL, 0);
 	char *key = argv[2];
@@ -353,7 +354,7 @@ static int do_tpm_pcr_setauthvalue(cmd_tbl_t *cmdtp, int flag,
 							key, key_sz));
 }
 
-static cmd_tbl_t tpm2_commands[] = {
+static struct cmd_tbl tpm2_commands[] = {
 	U_BOOT_CMD_MKENT(device, 0, 1, do_tpm_device, "", ""),
 	U_BOOT_CMD_MKENT(info, 0, 1, do_tpm_info, "", ""),
 	U_BOOT_CMD_MKENT(init, 0, 1, do_tpm_init, "", ""),
@@ -372,7 +373,7 @@ static cmd_tbl_t tpm2_commands[] = {
 			 do_tpm_pcr_setauthvalue, "", ""),
 };
 
-cmd_tbl_t *get_tpm2_commands(unsigned int *size)
+struct cmd_tbl *get_tpm2_commands(unsigned int *size)
 {
 	*size = ARRAY_SIZE(tpm2_commands);
 
diff --git a/cmd/tpm_test.c b/cmd/tpm_test.c
index 2cde517d7a..a6a4636ef6 100644
--- a/cmd/tpm_test.c
+++ b/cmd/tpm_test.c
@@ -483,8 +483,8 @@ static int test_write_limit(struct udevice *dev)
 }
 
 #define VOIDTEST(XFUNC) \
-	int do_test_##XFUNC(cmd_tbl_t *cmd_tbl, int flag, int argc, \
-	char * const argv[]) \
+	int do_test_##XFUNC(struct cmd_tbl *cmd_tbl, int flag, int argc, \
+	char *const argv[]) \
 	{ \
 		struct udevice *dev; \
 		int ret; \
@@ -513,7 +513,7 @@ VOIDTEST(timing)
 VOIDTEST(write_limit)
 VOIDTEST(timer)
 
-static cmd_tbl_t cmd_cros_tpm_sub[] = {
+static struct cmd_tbl cmd_cros_tpm_sub[] = {
 	VOIDENT(early_extend)
 	VOIDENT(early_nvram)
 	VOIDENT(early_nvram2)
@@ -530,9 +530,10 @@ static cmd_tbl_t cmd_cros_tpm_sub[] = {
 	VOIDENT(timer)
 };
 
-static int do_tpmtest(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_tpmtest(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
-	cmd_tbl_t *c;
+	struct cmd_tbl *c;
 	int i;
 
 	printf("argc = %d, argv = ", argc);
diff --git a/cmd/trace.c b/cmd/trace.c
index 392b129536..4ce47c7627 100644
--- a/cmd/trace.c
+++ b/cmd/trace.c
@@ -10,7 +10,7 @@
 #include <trace.h>
 #include <asm/io.h>
 
-static int get_args(int argc, char * const argv[], char **buff,
+static int get_args(int argc, char *const argv[], char **buff,
 		    size_t *buff_ptr, size_t *buff_size)
 {
 	if (argc < 2)
@@ -29,7 +29,7 @@ static int get_args(int argc, char * const argv[], char **buff,
 	return 0;
 }
 
-static int create_func_list(int argc, char * const argv[])
+static int create_func_list(int argc, char *const argv[])
 {
 	size_t buff_size, avail, buff_ptr, needed, used;
 	char *buff;
@@ -52,7 +52,7 @@ static int create_func_list(int argc, char * const argv[])
 	return 0;
 }
 
-static int create_call_list(int argc, char * const argv[])
+static int create_call_list(int argc, char *const argv[])
 {
 	size_t buff_size, avail, buff_ptr, needed, used;
 	char *buff;
@@ -76,7 +76,7 @@ static int create_call_list(int argc, char * const argv[])
 	return 0;
 }
 
-int do_trace(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_trace(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	const char *cmd = argc < 2 ? NULL : argv[1];
 
diff --git a/cmd/tsi148.c b/cmd/tsi148.c
index 369a2b5ab3..25f98acdf7 100644
--- a/cmd/tsi148.c
+++ b/cmd/tsi148.c
@@ -382,7 +382,7 @@ int tsi148_vme_crg_window(unsigned int vmeAddr, int vam)
 /*
  * Tundra Tsi148 configuration
  */
-int do_tsi148(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_tsi148(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	ulong addr1 = 0, addr2 = 0, size = 0, vam = 0, vdw = 0;
 	char cmd = 'x';
diff --git a/cmd/ubi.c b/cmd/ubi.c
index 54d128dbc5..171377cc66 100644
--- a/cmd/ubi.c
+++ b/cmd/ubi.c
@@ -528,7 +528,7 @@ int ubi_part(char *part_name, const char *vid_header_offset)
 	return 0;
 }
 
-static int do_ubi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_ubi(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int64_t size = 0;
 	ulong addr = 0;
diff --git a/cmd/ubifs.c b/cmd/ubifs.c
index e4000b7ad1..e798b833dd 100644
--- a/cmd/ubifs.c
+++ b/cmd/ubifs.c
@@ -38,8 +38,9 @@ int cmd_ubifs_mount(char *vol_name)
 
 	return ret;
 }
-static int do_ubifs_mount(cmd_tbl_t *cmdtp, int flag, int argc,
-				char * const argv[])
+
+static int do_ubifs_mount(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	char *vol_name;
 
@@ -70,8 +71,8 @@ int cmd_ubifs_umount(void)
 	return 0;
 }
 
-static int do_ubifs_umount(cmd_tbl_t *cmdtp, int flag, int argc,
-				char * const argv[])
+static int do_ubifs_umount(struct cmd_tbl *cmdtp, int flag, int argc,
+			   char *const argv[])
 {
 	if (argc != 1)
 		return CMD_RET_USAGE;
@@ -79,8 +80,8 @@ static int do_ubifs_umount(cmd_tbl_t *cmdtp, int flag, int argc,
 	return cmd_ubifs_umount();
 }
 
-static int do_ubifs_ls(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_ubifs_ls(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	char *filename = "/";
 	int ret;
@@ -103,8 +104,8 @@ static int do_ubifs_ls(cmd_tbl_t *cmdtp, int flag, int argc,
 	return ret;
 }
 
-static int do_ubifs_load(cmd_tbl_t *cmdtp, int flag, int argc,
-				char * const argv[])
+static int do_ubifs_load(struct cmd_tbl *cmdtp, int flag, int argc,
+			 char *const argv[])
 {
 	char *filename;
 	char *endp;
diff --git a/cmd/ufs.c b/cmd/ufs.c
index 5b25788656..858cd49b59 100644
--- a/cmd/ufs.c
+++ b/cmd/ufs.c
@@ -9,7 +9,7 @@
 #include <command.h>
 #include <ufs.h>
 
-static int do_ufs(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_ufs(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int dev, ret;
 
diff --git a/cmd/universe.c b/cmd/universe.c
index dc9a8b5617..5ff47dde4f 100644
--- a/cmd/universe.c
+++ b/cmd/universe.c
@@ -298,7 +298,7 @@ int universe_vme_slave_window(unsigned int vmeAddr, unsigned int pciAddr, int si
 /*
  * Tundra Universe configuration
  */
-int do_universe(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_universe(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	ulong addr1 = 0, addr2 = 0, size = 0, vam = 0, pms = 0, vdw = 0;
 	char cmd = 'x';
diff --git a/cmd/unlz4.c b/cmd/unlz4.c
index 5320b378d3..4ae7f34d36 100644
--- a/cmd/unlz4.c
+++ b/cmd/unlz4.c
@@ -9,7 +9,8 @@
 #include <env.h>
 #include <lz4.h>
 
-static int do_unlz4(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_unlz4(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[])
 {
 	unsigned long src, dst;
 	size_t src_len = ~0UL, dst_len = ~0UL;
diff --git a/cmd/unzip.c b/cmd/unzip.c
index 725624627c..9b28328a1d 100644
--- a/cmd/unzip.c
+++ b/cmd/unzip.c
@@ -10,7 +10,8 @@
 #include <gzip.h>
 #include <part.h>
 
-static int do_unzip(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_unzip(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[])
 {
 	unsigned long src, dst;
 	unsigned long src_len = ~0UL, dst_len = ~0UL;
@@ -42,8 +43,8 @@ U_BOOT_CMD(
 	"srcaddr dstaddr [dstsize]"
 );
 
-static int do_gzwrite(cmd_tbl_t *cmdtp, int flag,
-		      int argc, char * const argv[])
+static int do_gzwrite(struct cmd_tbl *cmdtp, int flag,
+		      int argc, char *const argv[])
 {
 	struct blk_desc *bdev;
 	int ret;
diff --git a/cmd/usb.c b/cmd/usb.c
index 858be726a4..b9ec29a845 100644
--- a/cmd/usb.c
+++ b/cmd/usb.c
@@ -556,7 +556,8 @@ static int usb_test(struct usb_device *dev, int port, char* arg)
  * usb boot command intepreter. Derived from diskboot
  */
 #ifdef CONFIG_USB_STORAGE
-static int do_usbboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_usbboot(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	return common_diskboot(cmdtp, "usb", argc, argv);
 }
@@ -625,7 +626,7 @@ static void usb_show_info(struct usb_device *udev)
 /******************************************************************************
  * usb command intepreter
  */
-static int do_usb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_usb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	struct usb_device *udev = NULL;
 	int i;
diff --git a/cmd/usb_gadget_sdp.c b/cmd/usb_gadget_sdp.c
index 2ead06be9f..1af82e1136 100644
--- a/cmd/usb_gadget_sdp.c
+++ b/cmd/usb_gadget_sdp.c
@@ -7,11 +7,12 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <g_dnl.h>
 #include <sdp.h>
 #include <usb.h>
 
-static int do_sdp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_sdp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int ret;
 
diff --git a/cmd/usb_mass_storage.c b/cmd/usb_mass_storage.c
index b603730248..a117ab213a 100644
--- a/cmd/usb_mass_storage.c
+++ b/cmd/usb_mass_storage.c
@@ -135,8 +135,8 @@ cleanup:
 	return ret;
 }
 
-static int do_usb_mass_storage(cmd_tbl_t *cmdtp, int flag,
-			       int argc, char * const argv[])
+static int do_usb_mass_storage(struct cmd_tbl *cmdtp, int flag,
+			       int argc, char *const argv[])
 {
 	const char *usb_controller;
 	const char *devtype;
diff --git a/cmd/version.c b/cmd/version.c
index b2fffe9977..3686b87332 100644
--- a/cmd/version.c
+++ b/cmd/version.c
@@ -14,7 +14,8 @@
 
 const char __weak version_string[] = U_BOOT_VERSION_STRING;
 
-static int do_version(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_version(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	char buf[DISPLAY_OPTIONS_BANNER_LENGTH];
 
diff --git a/cmd/virtio.c b/cmd/virtio.c
index f38cc56598..3dace5344f 100644
--- a/cmd/virtio.c
+++ b/cmd/virtio.c
@@ -13,7 +13,8 @@
 
 static int virtio_curr_dev;
 
-static int do_virtio(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_virtio(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	if (argc == 2 && !strcmp(argv[1], "scan")) {
 		/* make sure all virtio devices are enumerated */
diff --git a/cmd/w1.c b/cmd/w1.c
index 9c95fcf9cd..92be1f2531 100644
--- a/cmd/w1.c
+++ b/cmd/w1.c
@@ -103,7 +103,7 @@ static int w1_read(int argc, char *const argv[])
 	return CMD_RET_SUCCESS;
 }
 
-int do_w1(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_w1(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	if (argc < 2)
 		return CMD_RET_USAGE;
diff --git a/cmd/wdt.c b/cmd/wdt.c
index 647d9899b4..27410981e7 100644
--- a/cmd/wdt.c
+++ b/cmd/wdt.c
@@ -12,7 +12,7 @@
 
 static struct udevice *currdev;
 
-static int do_wdt_list(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_wdt_list(struct cmd_tbl *cmdtp, int flag, int argc,
 		       char *const argv[])
 {
 	struct udevice *dev;
@@ -29,7 +29,7 @@ static int do_wdt_list(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_SUCCESS;
 }
 
-static int do_wdt_dev(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_wdt_dev(struct cmd_tbl *cmdtp, int flag, int argc,
 		      char *const argv[])
 {
 	int ret;
@@ -60,7 +60,7 @@ static int check_currdev(void)
 	return 0;
 }
 
-static int do_wdt_start(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_wdt_start(struct cmd_tbl *cmdtp, int flag, int argc,
 			char *const argv[])
 {
 	int ret;
@@ -90,7 +90,7 @@ static int do_wdt_start(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_SUCCESS;
 }
 
-static int do_wdt_stop(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_wdt_stop(struct cmd_tbl *cmdtp, int flag, int argc,
 		       char *const argv[])
 {
 	int ret;
@@ -111,7 +111,7 @@ static int do_wdt_stop(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_SUCCESS;
 }
 
-static int do_wdt_reset(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_wdt_reset(struct cmd_tbl *cmdtp, int flag, int argc,
 			char *const argv[])
 {
 	int ret;
@@ -132,7 +132,7 @@ static int do_wdt_reset(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_SUCCESS;
 }
 
-static int do_wdt_expire(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_wdt_expire(struct cmd_tbl *cmdtp, int flag, int argc,
 			 char *const argv[])
 {
 	int ret;
diff --git a/cmd/wol.c b/cmd/wol.c
index 8a756f373c..f0d6343227 100644
--- a/cmd/wol.c
+++ b/cmd/wol.c
@@ -14,7 +14,7 @@
 #if defined(CONFIG_CMD_WOL)
 void wol_set_timeout(ulong);
 
-int do_wol(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_wol(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	/* Validate arguments */
 	if (argc < 2)
diff --git a/cmd/x86/exception.c b/cmd/x86/exception.c
index ade1e2ea92..82faaa913e 100644
--- a/cmd/x86/exception.c
+++ b/cmd/x86/exception.c
@@ -8,14 +8,14 @@
 #include <common.h>
 #include <command.h>
 
-static int do_undefined(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+static int do_undefined(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
 	asm volatile (".word 0xffff\n");
 	return CMD_RET_FAILURE;
 }
 
-static cmd_tbl_t cmd_sub[] = {
+static struct cmd_tbl cmd_sub[] = {
 	U_BOOT_CMD_MKENT(undefined, CONFIG_SYS_MAXARGS, 1, do_undefined,
 			 "", ""),
 };
diff --git a/cmd/x86/fsp.c b/cmd/x86/fsp.c
index 6e485fb144..8017eda387 100644
--- a/cmd/x86/fsp.c
+++ b/cmd/x86/fsp.c
@@ -9,7 +9,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-static int do_hdr(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_hdr(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	struct fsp_header *hdr;
 	u32 img_addr;
@@ -80,13 +80,13 @@ static int do_hdr(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return 0;
 }
 
-static cmd_tbl_t fsp_commands[] = {
+static struct cmd_tbl fsp_commands[] = {
 	U_BOOT_CMD_MKENT(hdr, 0, 1, do_hdr, "", ""),
 };
 
-static int do_fsp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_fsp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
-	cmd_tbl_t *fsp_cmd;
+	struct cmd_tbl *fsp_cmd;
 	int ret;
 
 	if (argc < 2)
diff --git a/cmd/x86/hob.c b/cmd/x86/hob.c
index 29d9e3d5a2..6b1f7bda5b 100644
--- a/cmd/x86/hob.c
+++ b/cmd/x86/hob.c
@@ -26,7 +26,7 @@ static char *hob_type[] = {
 	"Capsule",
 };
 
-static int do_hob(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_hob(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	const struct hob_header *hdr;
 	uint type;
diff --git a/cmd/x86/mtrr.c b/cmd/x86/mtrr.c
index d3fd959235..2c40e711a1 100644
--- a/cmd/x86/mtrr.c
+++ b/cmd/x86/mtrr.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <asm/msr.h>
 #include <asm/mtrr.h>
 
@@ -43,7 +44,7 @@ static int do_mtrr_list(void)
 	return 0;
 }
 
-static int do_mtrr_set(uint reg, int argc, char * const argv[])
+static int do_mtrr_set(uint reg, int argc, char *const argv[])
 {
 	const char *typename = argv[0];
 	struct mtrr_state state;
@@ -98,7 +99,8 @@ static int mtrr_set_valid(int reg, bool valid)
 	return 0;
 }
 
-static int do_mtrr(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_mtrr(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	const char *cmd;
 	uint reg;
diff --git a/cmd/ximg.c b/cmd/ximg.c
index 73c764255f..159ba51648 100644
--- a/cmd/ximg.c
+++ b/cmd/ximg.c
@@ -33,7 +33,7 @@
 #endif
 
 static int
-do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+do_imgextract(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	ulong		addr = image_load_addr;
 	ulong		dest = 0;
diff --git a/cmd/yaffs2.c b/cmd/yaffs2.c
index 9244606bda..f29ebcc026 100644
--- a/cmd/yaffs2.c
+++ b/cmd/yaffs2.c
@@ -43,7 +43,7 @@ extern void cmd_yaffs_mv(const char *oldPath, const char *newPath);
 extern int yaffs_dump_dev(const char *path);
 
 /* ytrace - show/set yaffs trace mask */
-int do_ytrace(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_ytrace(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	if (argc > 1)
 		cmd_yaffs_tracemask(1, simple_strtol(argv[1], NULL, 16));
@@ -54,7 +54,7 @@ int do_ytrace(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 }
 
 /* ydevls - lists yaffs mount points. */
-int do_ydevls(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_ydevls(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	cmd_yaffs_dev_ls();
 
@@ -62,7 +62,7 @@ int do_ydevls(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 }
 
 /* ydevconfig mount_pt mtd_dev_num start_block end_block */
-int do_ydevconfig(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_ydevconfig(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	char *mtpoint;
 	int mtd_dev;
@@ -85,7 +85,7 @@ int do_ydevconfig(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 	return 0;
 }
 
-int do_ymount(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_ymount(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	char *mtpoint;
 
@@ -102,7 +102,7 @@ int do_ymount(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 	return 0;
 }
 
-int do_yumount(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_yumount(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	char *mtpoint;
 
@@ -118,7 +118,7 @@ int do_yumount(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 	return 0;
 }
 
-int do_yls(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_yls(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	char *dirname;
 
@@ -134,7 +134,7 @@ int do_yls(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 	return 0;
 }
 
-int do_yrd(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_yrd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	char *filename;
 
@@ -153,7 +153,7 @@ int do_yrd(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 	return 0;
 }
 
-int do_ywr(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_ywr(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	char *filename;
 	ulong value;
@@ -177,7 +177,7 @@ int do_ywr(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 	return 0;
 }
 
-int do_yrdm(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_yrdm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	char *filename;
 	ulong addr;
@@ -195,7 +195,7 @@ int do_yrdm(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 	return 0;
 }
 
-int do_ywrm(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_ywrm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	char *filename;
 	ulong addr;
@@ -215,7 +215,7 @@ int do_ywrm(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 	return 0;
 }
 
-int do_ymkdir(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_ymkdir(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	char *dirname;
 
@@ -230,7 +230,7 @@ int do_ymkdir(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 	return 0;
 }
 
-int do_yrmdir(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_yrmdir(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	char *dirname;
 
@@ -245,7 +245,7 @@ int do_yrmdir(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 	return 0;
 }
 
-int do_yrm(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_yrm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	char *name;
 
@@ -261,7 +261,7 @@ int do_yrm(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 	return 0;
 }
 
-int do_ymv(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_ymv(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	char *oldPath;
 	char *newPath;
diff --git a/cmd/zfs.c b/cmd/zfs.c
index 2b622a8f53..e429ac88d7 100644
--- a/cmd/zfs.c
+++ b/cmd/zfs.c
@@ -32,7 +32,8 @@
 #define DOS_FS_TYPE_OFFSET	0x36
 #define DOS_FS32_TYPE_OFFSET	0x52
 
-static int do_zfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_zfs_load(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	char *filename = NULL;
 	int dev;
@@ -129,8 +130,8 @@ int zfs_print(const char *entry, const struct zfs_dirhook_info *data)
 }
 
 
-
-static int do_zfs_ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_zfs_ls(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	const char *filename = "/";
 	int part;
diff --git a/cmd/zip.c b/cmd/zip.c
index 8ef46e9815..b433f1889f 100644
--- a/cmd/zip.c
+++ b/cmd/zip.c
@@ -8,7 +8,7 @@
 #include <command.h>
 #include <env.h>
 
-static int do_zip(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_zip(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	unsigned long src, dst;
 	unsigned long src_len, dst_len = ~0UL;
diff --git a/common/board_r.c b/common/board_r.c
index a47b60a7a9..4e7edac29d 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -358,8 +358,8 @@ static int initr_announce(void)
 #ifdef CONFIG_NEEDS_MANUAL_RELOC
 static int initr_manual_reloc_cmdtable(void)
 {
-	fixup_cmdtable(ll_entry_start(cmd_tbl_t, cmd),
-		       ll_entry_count(cmd_tbl_t, cmd));
+	fixup_cmdtable(ll_entry_start(struct cmd_tbl, cmd),
+		       ll_entry_count(struct cmd_tbl, cmd));
 	return 0;
 }
 #endif
diff --git a/common/bootm.c b/common/bootm.c
index 96cba01589..c3b3ee371c 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -42,8 +42,8 @@ DECLARE_GLOBAL_DATA_PTR;
 
 bootm_headers_t images;		/* pointers to os/initrd/fdt images */
 
-static const void *boot_get_kernel(cmd_tbl_t *cmdtp, int flag, int argc,
-				   char * const argv[], bootm_headers_t *images,
+static const void *boot_get_kernel(struct cmd_tbl *cmdtp, int flag, int argc,
+				   char *const argv[], bootm_headers_t *images,
 				   ulong *os_data, ulong *os_len);
 
 __weak void board_quiesce_devices(void)
@@ -67,8 +67,8 @@ static void boot_start_lmb(bootm_headers_t *images)
 static inline void boot_start_lmb(bootm_headers_t *images) { }
 #endif
 
-static int bootm_start(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int bootm_start(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	memset((void *)&images, 0, sizeof(images));
 	images.verify = env_get_yesno("verify");
@@ -81,8 +81,8 @@ static int bootm_start(cmd_tbl_t *cmdtp, int flag, int argc,
 	return 0;
 }
 
-static int bootm_find_os(cmd_tbl_t *cmdtp, int flag, int argc,
-			 char * const argv[])
+static int bootm_find_os(struct cmd_tbl *cmdtp, int flag, int argc,
+			 char *const argv[])
 {
 	const void *os_hdr;
 	bool ep_found = false;
@@ -238,7 +238,7 @@ static int bootm_find_os(cmd_tbl_t *cmdtp, int flag, int argc,
  *     0, if all existing images were loaded correctly
  *     1, if an image is found but corrupted, or invalid
  */
-int bootm_find_images(int flag, int argc, char * const argv[])
+int bootm_find_images(int flag, int argc, char *const argv[])
 {
 	int ret;
 
@@ -285,8 +285,8 @@ int bootm_find_images(int flag, int argc, char * const argv[])
 	return 0;
 }
 
-static int bootm_find_other(cmd_tbl_t *cmdtp, int flag, int argc,
-			    char * const argv[])
+static int bootm_find_other(struct cmd_tbl *cmdtp, int flag, int argc,
+			    char *const argv[])
 {
 	if (((images.os.type == IH_TYPE_KERNEL) ||
 	     (images.os.type == IH_TYPE_KERNEL_NOLOAD) ||
@@ -520,8 +520,9 @@ static void fixup_silent_linux(void)
  *	then the intent is to boot an OS, so this function will not return
  *	unless the image type is standalone.
  */
-int do_bootm_states(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
-		    int states, bootm_headers_t *images, int boot_progress)
+int do_bootm_states(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[], int states, bootm_headers_t *images,
+		    int boot_progress)
 {
 	boot_os_fn *boot_fn;
 	ulong iflag = 0;
@@ -704,8 +705,8 @@ static image_header_t *image_get_kernel(ulong img_addr, int verify)
  *     pointer to image header if valid image was found, plus kernel start
  *     address and length, otherwise NULL
  */
-static const void *boot_get_kernel(cmd_tbl_t *cmdtp, int flag, int argc,
-				   char * const argv[], bootm_headers_t *images,
+static const void *boot_get_kernel(struct cmd_tbl *cmdtp, int flag, int argc,
+				   char *const argv[], bootm_headers_t *images,
 				   ulong *os_data, ulong *os_len)
 {
 #if CONFIG_IS_ENABLED(LEGACY_IMAGE_FORMAT)
diff --git a/common/bootm_os.c b/common/bootm_os.c
index 8599bc8ca3..08675ffb61 100644
--- a/common/bootm_os.c
+++ b/common/bootm_os.c
@@ -21,7 +21,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-static int do_bootm_standalone(int flag, int argc, char * const argv[],
+static int do_bootm_standalone(int flag, int argc, char *const argv[],
 			       bootm_headers_t *images)
 {
 	char *s;
@@ -43,7 +43,7 @@ static int do_bootm_standalone(int flag, int argc, char * const argv[],
 /*******************************************************************/
 
 #if defined(CONFIG_BOOTM_NETBSD) || defined(CONFIG_BOOTM_PLAN9)
-static void copy_args(char *dest, int argc, char * const argv[], char delim)
+static void copy_args(char *dest, int argc, char *const argv[], char delim)
 {
 	int i;
 
@@ -57,8 +57,8 @@ static void copy_args(char *dest, int argc, char * const argv[], char delim)
 #endif
 
 #ifdef CONFIG_BOOTM_NETBSD
-static int do_bootm_netbsd(int flag, int argc, char * const argv[],
-			    bootm_headers_t *images)
+static int do_bootm_netbsd(int flag, int argc, char *const argv[],
+			   bootm_headers_t *images)
 {
 	void (*loader)(bd_t *, image_header_t *, char *, char *);
 	image_header_t *os_hdr, *hdr;
@@ -129,8 +129,8 @@ static int do_bootm_netbsd(int flag, int argc, char * const argv[],
 #endif /* CONFIG_BOOTM_NETBSD*/
 
 #ifdef CONFIG_LYNXKDI
-static int do_bootm_lynxkdi(int flag, int argc, char * const argv[],
-			     bootm_headers_t *images)
+static int do_bootm_lynxkdi(int flag, int argc, char *const argv[],
+			    bootm_headers_t *images)
 {
 	image_header_t *hdr = &images->legacy_hdr_os_copy;
 
@@ -151,8 +151,8 @@ static int do_bootm_lynxkdi(int flag, int argc, char * const argv[],
 #endif /* CONFIG_LYNXKDI */
 
 #ifdef CONFIG_BOOTM_RTEMS
-static int do_bootm_rtems(int flag, int argc, char * const argv[],
-			   bootm_headers_t *images)
+static int do_bootm_rtems(int flag, int argc, char *const argv[],
+			  bootm_headers_t *images)
 {
 	void (*entry_point)(bd_t *);
 
@@ -184,8 +184,8 @@ static int do_bootm_rtems(int flag, int argc, char * const argv[],
 #endif /* CONFIG_BOOTM_RTEMS */
 
 #if defined(CONFIG_BOOTM_OSE)
-static int do_bootm_ose(int flag, int argc, char * const argv[],
-			   bootm_headers_t *images)
+static int do_bootm_ose(int flag, int argc, char *const argv[],
+			bootm_headers_t *images)
 {
 	void (*entry_point)(void);
 
@@ -217,8 +217,8 @@ static int do_bootm_ose(int flag, int argc, char * const argv[],
 #endif /* CONFIG_BOOTM_OSE */
 
 #if defined(CONFIG_BOOTM_PLAN9)
-static int do_bootm_plan9(int flag, int argc, char * const argv[],
-			   bootm_headers_t *images)
+static int do_bootm_plan9(int flag, int argc, char *const argv[],
+			  bootm_headers_t *images)
 {
 	void (*entry_point)(void);
 	char *s;
@@ -324,7 +324,7 @@ static void do_bootvx_fdt(bootm_headers_t *images)
 	puts("## vxWorks terminated\n");
 }
 
-static int do_bootm_vxworks_legacy(int flag, int argc, char * const argv[],
+static int do_bootm_vxworks_legacy(int flag, int argc, char *const argv[],
 				   bootm_headers_t *images)
 {
 	if (flag != BOOTM_STATE_OS_GO)
@@ -342,7 +342,7 @@ static int do_bootm_vxworks_legacy(int flag, int argc, char * const argv[],
 	return 1;
 }
 
-int do_bootm_vxworks(int flag, int argc, char * const argv[],
+int do_bootm_vxworks(int flag, int argc, char *const argv[],
 		     bootm_headers_t *images)
 {
 	char *bootargs;
@@ -379,8 +379,8 @@ int do_bootm_vxworks(int flag, int argc, char * const argv[],
 #endif
 
 #if defined(CONFIG_CMD_ELF)
-static int do_bootm_qnxelf(int flag, int argc, char * const argv[],
-			    bootm_headers_t *images)
+static int do_bootm_qnxelf(int flag, int argc, char *const argv[],
+			   bootm_headers_t *images)
 {
 	char *local_args[2];
 	char str[16];
@@ -417,8 +417,8 @@ static int do_bootm_qnxelf(int flag, int argc, char * const argv[],
 #endif
 
 #ifdef CONFIG_INTEGRITY
-static int do_bootm_integrity(int flag, int argc, char * const argv[],
-			   bootm_headers_t *images)
+static int do_bootm_integrity(int flag, int argc, char *const argv[],
+			      bootm_headers_t *images)
 {
 	void (*entry_point)(void);
 
@@ -450,8 +450,8 @@ static int do_bootm_integrity(int flag, int argc, char * const argv[],
 #endif
 
 #ifdef CONFIG_BOOTM_OPENRTOS
-static int do_bootm_openrtos(int flag, int argc, char * const argv[],
-			   bootm_headers_t *images)
+static int do_bootm_openrtos(int flag, int argc, char *const argv[],
+			     bootm_headers_t *images)
 {
 	void (*entry_point)(void);
 
@@ -476,7 +476,7 @@ static int do_bootm_openrtos(int flag, int argc, char * const argv[],
 #endif
 
 #ifdef CONFIG_BOOTM_OPTEE
-static int do_bootm_tee(int flag, int argc, char * const argv[],
+static int do_bootm_tee(int flag, int argc, char *const argv[],
 			bootm_headers_t *images)
 {
 	int ret;
@@ -504,7 +504,7 @@ static int do_bootm_tee(int flag, int argc, char * const argv[],
 #endif
 
 #ifdef CONFIG_BOOTM_EFI
-static int do_bootm_efi(int flag, int argc, char * const argv[],
+static int do_bootm_efi(int flag, int argc, char *const argv[],
 			bootm_headers_t *images)
 {
 	int ret;
@@ -607,7 +607,7 @@ __weak void board_preboot_os(void)
 	/* please define board specific board_preboot_os() */
 }
 
-int boot_selected_os(int argc, char * const argv[], int state,
+int boot_selected_os(int argc, char *const argv[], int state,
 		     bootm_headers_t *images, boot_os_fn *boot_fn)
 {
 	arch_preboot_os();
diff --git a/common/cli.c b/common/cli.c
index e5e5894b2f..6635ab2bcf 100644
--- a/common/cli.c
+++ b/common/cli.c
@@ -129,7 +129,7 @@ int run_command_list(const char *cmd, int len, int flag)
 /****************************************************************************/
 
 #if defined(CONFIG_CMD_RUN)
-int do_run(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_run(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int i;
 
@@ -183,7 +183,7 @@ bool cli_process_fdt(const char **cmdp)
 void cli_secure_boot_cmd(const char *cmd)
 {
 #ifdef CONFIG_CMDLINE
-	cmd_tbl_t *cmdtp;
+	struct cmd_tbl *cmdtp;
 #endif
 	int rc;
 
diff --git a/common/cli_hush.c b/common/cli_hush.c
index a62af07cc5..5b1f119074 100644
--- a/common/cli_hush.c
+++ b/common/cli_hush.c
@@ -3664,8 +3664,8 @@ static char *make_string(char **inp, int *nonnull)
 }
 
 #ifdef __U_BOOT__
-static int do_showvar(cmd_tbl_t *cmdtp, int flag, int argc,
-		      char * const argv[])
+static int do_showvar(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	int i, k;
 	int rcode = 0;
diff --git a/common/cli_readline.c b/common/cli_readline.c
index 6ef7a3e564..1f1e28c6d8 100644
--- a/common/cli_readline.c
+++ b/common/cli_readline.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <bootretry.h>
 #include <cli.h>
+#include <command.h>
 #include <time.h>
 #include <watchdog.h>
 
diff --git a/common/command.c b/common/command.c
index 0d8bf244be..d75908aae2 100644
--- a/common/command.c
+++ b/common/command.c
@@ -19,14 +19,14 @@
  * for long help messages
  */
 
-int _do_help(cmd_tbl_t *cmd_start, int cmd_items, cmd_tbl_t *cmdtp, int flag,
-	     int argc, char * const argv[])
+int _do_help(struct cmd_tbl *cmd_start, int cmd_items, struct cmd_tbl *cmdtp,
+	     int flag, int argc, char *const argv[])
 {
 	int i;
 	int rcode = 0;
 
 	if (argc == 1) {	/* show list of commands */
-		cmd_tbl_t *cmd_array[cmd_items];
+		struct cmd_tbl *cmd_array[cmd_items];
 		int i, j, swaps;
 
 		/* Make array of commands from .uboot_cmd section */
@@ -41,7 +41,7 @@ int _do_help(cmd_tbl_t *cmd_start, int cmd_items, cmd_tbl_t *cmdtp, int flag,
 			for (j = 0; j < i; ++j) {
 				if (strcmp(cmd_array[j]->name,
 					   cmd_array[j + 1]->name) > 0) {
-					cmd_tbl_t *tmp;
+					struct cmd_tbl *tmp;
 					tmp = cmd_array[j];
 					cmd_array[j] = cmd_array[j + 1];
 					cmd_array[j + 1] = tmp;
@@ -83,11 +83,12 @@ int _do_help(cmd_tbl_t *cmd_start, int cmd_items, cmd_tbl_t *cmdtp, int flag,
 }
 
 /* find command table entry for a command */
-cmd_tbl_t *find_cmd_tbl(const char *cmd, cmd_tbl_t *table, int table_len)
+struct cmd_tbl *find_cmd_tbl(const char *cmd, struct cmd_tbl *table,
+			     int table_len)
 {
 #ifdef CONFIG_CMDLINE
-	cmd_tbl_t *cmdtp;
-	cmd_tbl_t *cmdtp_temp = table;	/* Init value */
+	struct cmd_tbl *cmdtp;
+	struct cmd_tbl *cmdtp_temp = table;	/* Init value */
 	const char *p;
 	int len;
 	int n_found = 0;
@@ -117,14 +118,14 @@ cmd_tbl_t *find_cmd_tbl(const char *cmd, cmd_tbl_t *table, int table_len)
 	return NULL;	/* not found or ambiguous command */
 }
 
-cmd_tbl_t *find_cmd(const char *cmd)
+struct cmd_tbl *find_cmd(const char *cmd)
 {
-	cmd_tbl_t *start = ll_entry_start(cmd_tbl_t, cmd);
-	const int len = ll_entry_count(cmd_tbl_t, cmd);
+	struct cmd_tbl *start = ll_entry_start(struct cmd_tbl, cmd);
+	const int len = ll_entry_count(struct cmd_tbl, cmd);
 	return find_cmd_tbl(cmd, start, len);
 }
 
-int cmd_usage(const cmd_tbl_t *cmdtp)
+int cmd_usage(const struct cmd_tbl *cmdtp)
 {
 	printf("%s - %s\n\n", cmdtp->name, cmdtp->usage);
 
@@ -145,7 +146,8 @@ int cmd_usage(const cmd_tbl_t *cmdtp)
 #ifdef CONFIG_AUTO_COMPLETE
 static char env_complete_buf[512];
 
-int var_complete(int argc, char * const argv[], char last_char, int maxv, char *cmdv[])
+int var_complete(int argc, char *const argv[], char last_char, int maxv,
+		 char *cmdv[])
 {
 	int space;
 
@@ -163,7 +165,7 @@ int var_complete(int argc, char * const argv[], char last_char, int maxv, char *
 	return 0;
 }
 
-static int dollar_complete(int argc, char * const argv[], char last_char,
+static int dollar_complete(int argc, char *const argv[], char last_char,
 			   int maxv, char *cmdv[])
 {
 	/* Make sure the last argument starts with a $. */
@@ -177,12 +179,12 @@ static int dollar_complete(int argc, char * const argv[], char last_char,
 
 /*************************************************************************************/
 
-int complete_subcmdv(cmd_tbl_t *cmdtp, int count, int argc,
-		     char * const argv[], char last_char,
+int complete_subcmdv(struct cmd_tbl *cmdtp, int count, int argc,
+		     char *const argv[], char last_char,
 		     int maxv, char *cmdv[])
 {
 #ifdef CONFIG_CMDLINE
-	const cmd_tbl_t *cmdend = cmdtp + count;
+	const struct cmd_tbl *cmdend = cmdtp + count;
 	const char *p;
 	int len, clen;
 	int n_found = 0;
@@ -254,12 +256,12 @@ int complete_subcmdv(cmd_tbl_t *cmdtp, int count, int argc,
 #endif
 }
 
-static int complete_cmdv(int argc, char * const argv[], char last_char,
+static int complete_cmdv(int argc, char *const argv[], char last_char,
 			 int maxv, char *cmdv[])
 {
 #ifdef CONFIG_CMDLINE
-	return complete_subcmdv(ll_entry_start(cmd_tbl_t, cmd),
-				ll_entry_count(cmd_tbl_t, cmd), argc, argv,
+	return complete_subcmdv(ll_entry_start(struct cmd_tbl, cmd),
+				ll_entry_count(struct cmd_tbl, cmd), argc, argv,
 				last_char, maxv, cmdv);
 #else
 	return 0;
@@ -296,7 +298,8 @@ static int make_argv(char *s, int argvsz, char *argv[])
 	return argc;
 }
 
-static void print_argv(const char *banner, const char *leader, const char *sep, int linemax, char * const argv[])
+static void print_argv(const char *banner, const char *leader, const char *sep,
+		       int linemax, char *const argv[])
 {
 	int ll = leader != NULL ? strlen(leader) : 0;
 	int sl = sep != NULL ? strlen(sep) : 0;
@@ -323,7 +326,7 @@ static void print_argv(const char *banner, const char *leader, const char *sep,
 	printf("\n");
 }
 
-static int find_common_prefix(char * const argv[])
+static int find_common_prefix(char *const argv[])
 {
 	int i, len;
 	char *anchor, *s, *t;
@@ -486,7 +489,7 @@ int cmd_get_data_size(char* arg, int default_size)
 #if defined(CONFIG_NEEDS_MANUAL_RELOC)
 DECLARE_GLOBAL_DATA_PTR;
 
-void fixup_cmdtable(cmd_tbl_t *cmdtp, int size)
+void fixup_cmdtable(struct cmd_tbl *cmdtp, int size)
 {
 	int	i;
 
@@ -498,7 +501,7 @@ void fixup_cmdtable(cmd_tbl_t *cmdtp, int size)
 
 		addr = (ulong)(cmdtp->cmd_rep) + gd->reloc_off;
 		cmdtp->cmd_rep =
-			(int (*)(struct cmd_tbl_s *, int, int,
+			(int (*)(struct cmd_tbl *, int, int,
 				 char * const [], int *))addr;
 
 		addr = (ulong)(cmdtp->cmd) + gd->reloc_off;
@@ -506,8 +509,8 @@ void fixup_cmdtable(cmd_tbl_t *cmdtp, int size)
 		printf("Command \"%s\": 0x%08lx => 0x%08lx\n",
 		       cmdtp->name, (ulong)(cmdtp->cmd), addr);
 #endif
-		cmdtp->cmd =
-			(int (*)(struct cmd_tbl_s *, int, int, char * const []))addr;
+		cmdtp->cmd = (int (*)(struct cmd_tbl *, int, int,
+				      char *const []))addr;
 		addr = (ulong)(cmdtp->name) + gd->reloc_off;
 		cmdtp->name = (char *)addr;
 		if (cmdtp->usage) {
@@ -532,24 +535,24 @@ void fixup_cmdtable(cmd_tbl_t *cmdtp, int size)
 }
 #endif
 
-int cmd_always_repeatable(cmd_tbl_t *cmdtp, int flag, int argc,
-			  char * const argv[], int *repeatable)
+int cmd_always_repeatable(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[], int *repeatable)
 {
 	*repeatable = 1;
 
 	return cmdtp->cmd(cmdtp, flag, argc, argv);
 }
 
-int cmd_never_repeatable(cmd_tbl_t *cmdtp, int flag, int argc,
-			 char * const argv[], int *repeatable)
+int cmd_never_repeatable(struct cmd_tbl *cmdtp, int flag, int argc,
+			 char *const argv[], int *repeatable)
 {
 	*repeatable = 0;
 
 	return cmdtp->cmd(cmdtp, flag, argc, argv);
 }
 
-int cmd_discard_repeatable(cmd_tbl_t *cmdtp, int flag, int argc,
-			   char * const argv[])
+int cmd_discard_repeatable(struct cmd_tbl *cmdtp, int flag, int argc,
+			   char *const argv[])
 {
 	int repeatable;
 
@@ -568,8 +571,8 @@ int cmd_discard_repeatable(cmd_tbl_t *cmdtp, int flag, int argc,
  * @param repeatable	Can the command be repeated
  * @return 0 if command succeeded, else non-zero (CMD_RET_...)
  */
-static int cmd_call(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
-		    int *repeatable)
+static int cmd_call(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[], int *repeatable)
 {
 	int result;
 
@@ -579,11 +582,11 @@ static int cmd_call(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
 	return result;
 }
 
-enum command_ret_t cmd_process(int flag, int argc, char * const argv[],
+enum command_ret_t cmd_process(int flag, int argc, char *const argv[],
 			       int *repeatable, ulong *ticks)
 {
 	enum command_ret_t rc = CMD_RET_SUCCESS;
-	cmd_tbl_t *cmdtp;
+	struct cmd_tbl *cmdtp;
 
 #if defined(CONFIG_SYS_XTRACE)
 	char *xtrace;
@@ -638,7 +641,7 @@ enum command_ret_t cmd_process(int flag, int argc, char * const argv[],
 	return rc;
 }
 
-int cmd_process_error(cmd_tbl_t *cmdtp, int err)
+int cmd_process_error(struct cmd_tbl *cmdtp, int err)
 {
 	if (err == CMD_RET_USAGE)
 		return CMD_RET_USAGE;
diff --git a/common/dfu.c b/common/dfu.c
index da6289b218..cd60f9a1e2 100644
--- a/common/dfu.c
+++ b/common/dfu.c
@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <watchdog.h>
 #include <dfu.h>
 #include <console.h>
diff --git a/common/exports.c b/common/exports.c
index 18af38a5f6..6253b55694 100644
--- a/common/exports.c
+++ b/common/exports.c
@@ -1,4 +1,5 @@
 #include <common.h>
+#include <command.h>
 #include <exports.h>
 #include <malloc.h>
 #include <spi.h>
diff --git a/common/flash.c b/common/flash.c
index 4a28ac5d34..cde648d4b8 100644
--- a/common/flash.c
+++ b/common/flash.c
@@ -39,10 +39,10 @@ flash_protect(int flag, ulong from, ulong to, flash_info_t *info)
 	s_end = info->sector_count - 1;	/* index of last sector */
 	b_end = info->start[0] + info->size - 1;	/* bank end address */
 
-	debug ("flash_protect %s: from 0x%08lX to 0x%08lX\n",
-		(flag & FLAG_PROTECT_SET) ? "ON" :
-			(flag & FLAG_PROTECT_CLEAR) ? "OFF" : "???",
-		from, to);
+	debug("%s %s: from 0x%08lX to 0x%08lX\n", __func__,
+	      (flag & FLAG_PROTECT_SET) ? "ON" :
+		      (flag & FLAG_PROTECT_CLEAR) ? "OFF" : "???",
+	      from, to);
 
 	/* There is nothing to do if we have no data about the flash
 	 * or the protect range and flash range don't overlap.
diff --git a/common/hash.c b/common/hash.c
index 810854ce0f..34f00890b4 100644
--- a/common/hash.c
+++ b/common/hash.c
@@ -444,8 +444,8 @@ static void hash_show(struct hash_algo *algo, ulong addr, ulong len, uint8_t *ou
 		printf("%02x", output[i]);
 }
 
-int hash_command(const char *algo_name, int flags, cmd_tbl_t *cmdtp, int flag,
-		 int argc, char * const argv[])
+int hash_command(const char *algo_name, int flags, struct cmd_tbl *cmdtp,
+		 int flag, int argc, char *const argv[])
 {
 	ulong addr, len;
 
diff --git a/common/image-fdt.c b/common/image-fdt.c
index 270732278e..1d2263de5d 100644
--- a/common/image-fdt.c
+++ b/common/image-fdt.c
@@ -264,8 +264,8 @@ error:
  *     1, if fdt image is found but corrupted
  *     of_flat_tree and of_size are set to 0 if no fdt exists
  */
-int boot_get_fdt(int flag, int argc, char * const argv[], uint8_t arch,
-		bootm_headers_t *images, char **of_flat_tree, ulong *of_size)
+int boot_get_fdt(int flag, int argc, char *const argv[], uint8_t arch,
+		 bootm_headers_t *images, char **of_flat_tree, ulong *of_size)
 {
 #if CONFIG_IS_ENABLED(LEGACY_IMAGE_FORMAT)
 	const image_header_t *fdt_hdr;
diff --git a/common/image.c b/common/image.c
index 6a24abf6ff..9e4e23cac4 100644
--- a/common/image.c
+++ b/common/image.c
@@ -47,7 +47,8 @@
 #include <lzma/LzmaTools.h>
 
 #ifdef CONFIG_CMD_BDI
-extern int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+extern int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[]);
 #endif
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -1075,8 +1076,8 @@ int genimg_has_config(bootm_headers_t *images)
  *     1, if ramdisk image is found but corrupted, or invalid
  *     rd_start and rd_end are set to 0 if no ramdisk exists
  */
-int boot_get_ramdisk(int argc, char * const argv[], bootm_headers_t *images,
-		uint8_t arch, ulong *rd_start, ulong *rd_end)
+int boot_get_ramdisk(int argc, char *const argv[], bootm_headers_t *images,
+		     uint8_t arch, ulong *rd_start, ulong *rd_end)
 {
 	ulong rd_addr, rd_load;
 	ulong rd_data, rd_len;
@@ -1371,7 +1372,7 @@ int boot_get_setup(bootm_headers_t *images, uint8_t arch,
 
 #if IMAGE_ENABLE_FIT
 #if defined(CONFIG_FPGA)
-int boot_get_fpga(int argc, char * const argv[], bootm_headers_t *images,
+int boot_get_fpga(int argc, char *const argv[], bootm_headers_t *images,
 		  uint8_t arch, const ulong *ld_start, ulong * const ld_len)
 {
 	ulong tmp_img_addr, img_data, img_len;
@@ -1472,8 +1473,8 @@ static void fit_loadable_process(uint8_t img_type,
 			fit_loadable_handler->handler(img_data, img_len);
 }
 
-int boot_get_loadable(int argc, char * const argv[], bootm_headers_t *images,
-		uint8_t arch, const ulong *ld_start, ulong * const ld_len)
+int boot_get_loadable(int argc, char *const argv[], bootm_headers_t *images,
+		      uint8_t arch, const ulong *ld_start, ulong * const ld_len)
 {
 	/*
 	 * These variables are used to hold the current image location
diff --git a/common/kgdb.c b/common/kgdb.c
index daf53bed7a..312e14960a 100644
--- a/common/kgdb.c
+++ b/common/kgdb.c
@@ -574,7 +574,7 @@ breakpoint(void)
 }
 
 int
-do_kgdb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+do_kgdb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
     printf("Entering KGDB mode via exception handler...\n\n");
     kgdb_breakpoint(argc - 1, argv + 1);
diff --git a/common/lcd_console.c b/common/lcd_console.c
index d34bc2fa83..ad5f307af4 100644
--- a/common/lcd_console.c
+++ b/common/lcd_console.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <lcd.h>
 #include <serial.h>
 #include <video_font.h>		/* Get font data, width and height */
@@ -219,7 +220,7 @@ void lcd_printf(const char *fmt, ...)
 	lcd_puts(buf);
 }
 
-static int do_lcd_setcursor(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_lcd_setcursor(struct cmd_tbl *cmdtp, int flag, int argc,
 			    char *const argv[])
 {
 	unsigned int col, row;
@@ -234,7 +235,7 @@ static int do_lcd_setcursor(cmd_tbl_t *cmdtp, int flag, int argc,
 	return 0;
 }
 
-static int do_lcd_puts(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_lcd_puts(struct cmd_tbl *cmdtp, int flag, int argc,
 		       char *const argv[])
 {
 	if (argc != 2)
diff --git a/doc/README.commands b/doc/README.commands
index 4e9e8098fa..716ad227aa 100644
--- a/doc/README.commands
+++ b/doc/README.commands
@@ -3,7 +3,7 @@ Command definition
 
 Commands are added to U-Boot by creating a new command structure.
 This is done by first including command.h, then using the U_BOOT_CMD() or the
-U_BOOT_CMD_COMPLETE macro to fill in a cmd_tbl_t struct.
+U_BOOT_CMD_COMPLETE macro to fill in a struct cmd_tbl struct.
 
 U_BOOT_CMD(name, maxargs, repeatable, command, "usage", "help")
 U_BOOT_CMD_COMPLETE(name, maxargs, repeatable, command, "usage, "help", comp)
@@ -31,7 +31,7 @@ comp:		Pointer to the completion function. May be NULL.
 Sub-command definition
 ----------------------
 
-Likewise an array of cmd_tbl_t holding sub-commands can be created using either
+Likewise an array of struct cmd_tbl holding sub-commands can be created using either
 of the following macros:
 
 * U_BOOT_CMD_MKENT(name, maxargs, repeatable, command, "usage", "help")
@@ -40,14 +40,14 @@ of the following macros:
 
 This table has to be evaluated in the command function of the main command, e.g.
 
-    static cmd_tbl_t cmd_sub[] = {
+    static struct cmd_tbl cmd_sub[] = {
         U_BOOT_CMD_MKENT(foo, CONFIG_SYS_MAXARGS, 1, do_foo, "", ""),
         U_BOOT_CMD_MKENT(bar, CONFIG_SYS_MAXARGS, 1, do_bar, "", ""),
     };
 
-    static int do_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+    static int do_cmd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
     {
-        cmd_tbl_t *cp;
+        struct cmd_tbl *cp;
 
         if (argc < 2)
                 return CMD_RET_USAGE;
@@ -68,7 +68,7 @@ Command function
 ----------------
 
 The command function pointer has to be of type
-int (*cmd)(struct cmd_tbl_s *cmdtp, int flag, int argc, const char *argv[]);
+int (*cmd)(struct cmd_tbl *cmdtp, int flag, int argc, const char *argv[]);
 
 cmdtp:		Table entry describing the command (see above).
 
diff --git a/doc/README.standalone b/doc/README.standalone
index 28ebde1dec..874ca2f7c6 100644
--- a/doc/README.standalone
+++ b/doc/README.standalone
@@ -40,7 +40,7 @@ Design Notes on Exporting U-Boot Functions to Standalone Applications:
    that returns the ABI version of the running U-Boot. I.e., a
    typical application startup may look like this:
 
-	int my_app (int argc, char * const argv[])
+	int my_app (int argc, char *const argv[])
 	{
 		app_startup (argv);
 		if (get_version () != XF_VERSION)
diff --git a/drivers/clk/mpc83xx_clk.c b/drivers/clk/mpc83xx_clk.c
index 4183db2845..fa519a4430 100644
--- a/drivers/clk/mpc83xx_clk.c
+++ b/drivers/clk/mpc83xx_clk.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <clock_legacy.h>
+#include <command.h>
 #include <dm.h>
 #include <vsprintf.h>
 #include <dm/lists.h>
@@ -390,7 +391,8 @@ U_BOOT_DRIVER(mpc83xx_clk) = {
 	.bind = mpc83xx_clk_bind,
 };
 
-static int do_clocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_clocks(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	int i;
 	char buf[32];
diff --git a/drivers/ddr/fsl/interactive.c b/drivers/ddr/fsl/interactive.c
index 8e171e67fe..8c82d524a3 100644
--- a/drivers/ddr/fsl/interactive.c
+++ b/drivers/ddr/fsl/interactive.c
@@ -13,6 +13,7 @@
 
 #include <common.h>
 #include <cli.h>
+#include <command.h>
 #include <env.h>
 #include <linux/ctype.h>
 #include <asm/types.h>
diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c
index 394f30fa88..572abfa536 100644
--- a/drivers/firmware/psci.c
+++ b/drivers/firmware/psci.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <dm.h>
 #include <irq_func.h>
 #include <dm/lists.h>
@@ -131,7 +132,7 @@ void reset_misc(void)
 #endif /* CONFIG_PSCI_RESET */
 
 #ifdef CONFIG_CMD_POWEROFF
-int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	do_psci_probe();
 
diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c
index fda8054d53..4ab8cee2d1 100644
--- a/drivers/gpio/pca953x.c
+++ b/drivers/gpio/pca953x.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <i2c.h>
 #include <pca953x.h>
 
@@ -192,7 +193,7 @@ static int pca953x_info(uint8_t chip)
 	return 0;
 }
 
-static cmd_tbl_t cmd_pca953x[] = {
+static struct cmd_tbl cmd_pca953x[] = {
 	U_BOOT_CMD_MKENT(device, 3, 0, (void *)PCA953X_CMD_DEVICE, "", ""),
 	U_BOOT_CMD_MKENT(output, 4, 0, (void *)PCA953X_CMD_OUTPUT, "", ""),
 	U_BOOT_CMD_MKENT(input, 3, 0, (void *)PCA953X_CMD_INPUT, "", ""),
@@ -200,13 +201,14 @@ static cmd_tbl_t cmd_pca953x[] = {
 	U_BOOT_CMD_MKENT(info, 2, 0, (void *)PCA953X_CMD_INFO, "", ""),
 };
 
-static int do_pca953x(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_pca953x(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	static uint8_t chip = CONFIG_SYS_I2C_PCA953X_ADDR;
 	int ret = CMD_RET_USAGE, val;
 	ulong ul_arg2 = 0;
 	ulong ul_arg3 = 0;
-	cmd_tbl_t *c;
+	struct cmd_tbl *c;
 
 	c = find_cmd_tbl(argv[1], cmd_pca953x, ARRAY_SIZE(cmd_pca953x));
 
diff --git a/drivers/gpio/tca642x.c b/drivers/gpio/tca642x.c
index 730460a999..463cfe879a 100644
--- a/drivers/gpio/tca642x.c
+++ b/drivers/gpio/tca642x.c
@@ -21,6 +21,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <i2c.h>
 #include <tca642x.h>
 
@@ -212,7 +213,7 @@ static int tca642x_info(uchar chip)
 	return 0;
 }
 
-static cmd_tbl_t cmd_tca642x[] = {
+static struct cmd_tbl cmd_tca642x[] = {
 	U_BOOT_CMD_MKENT(device, 3, 0, (void *)TCA642X_CMD_DEVICE, "", ""),
 	U_BOOT_CMD_MKENT(output, 4, 0, (void *)TCA642X_CMD_OUTPUT, "", ""),
 	U_BOOT_CMD_MKENT(input, 3, 0, (void *)TCA642X_CMD_INPUT, "", ""),
@@ -220,7 +221,8 @@ static cmd_tbl_t cmd_tca642x[] = {
 	U_BOOT_CMD_MKENT(info, 2, 0, (void *)TCA642X_CMD_INFO, "", ""),
 };
 
-static int do_tca642x(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_tca642x(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	static uchar chip = CONFIG_SYS_I2C_TCA642X_ADDR;
 	int ret = CMD_RET_USAGE, val;
@@ -228,7 +230,7 @@ static int do_tca642x(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	uint8_t bank_shift;
 	ulong ul_arg2 = 0;
 	ulong ul_arg3 = 0;
-	cmd_tbl_t *c;
+	struct cmd_tbl *c;
 
 	c = find_cmd_tbl(argv[1], cmd_tca642x, ARRAY_SIZE(cmd_tca642x));
 
diff --git a/drivers/misc/altera_sysid.c b/drivers/misc/altera_sysid.c
index eff33f7343..387c70b070 100644
--- a/drivers/misc/altera_sysid.c
+++ b/drivers/misc/altera_sysid.c
@@ -44,7 +44,7 @@ void display_sysid(void)
 	printf("SYSID: %08x, %s", sysid[0], asc);
 }
 
-int do_sysid(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_sysid(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	display_sysid();
 	return 0;
diff --git a/drivers/misc/ds4510.c b/drivers/misc/ds4510.c
index bf20a833ec..0b37e8a4e4 100644
--- a/drivers/misc/ds4510.c
+++ b/drivers/misc/ds4510.c
@@ -233,7 +233,7 @@ static int ds4510_info(uint8_t chip)
 	return 0;
 }
 
-cmd_tbl_t cmd_ds4510[] = {
+struct cmd_tbl cmd_ds4510[] = {
 	U_BOOT_CMD_MKENT(device, 3, 0, (void *)DS4510_CMD_DEVICE, "", ""),
 	U_BOOT_CMD_MKENT(nv, 3, 0, (void *)DS4510_CMD_NV, "", ""),
 	U_BOOT_CMD_MKENT(output, 4, 0, (void *)DS4510_CMD_OUTPUT, "", ""),
@@ -246,10 +246,10 @@ cmd_tbl_t cmd_ds4510[] = {
 	U_BOOT_CMD_MKENT(sram, 6, 0, (void *)DS4510_CMD_SRAM, "", ""),
 };
 
-int do_ds4510(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_ds4510(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	static uint8_t chip = 0x51;
-	cmd_tbl_t *c;
+	struct cmd_tbl *c;
 	ulong ul_arg2 = 0;
 	ulong ul_arg3 = 0;
 	int tmp;
diff --git a/drivers/misc/rockchip-efuse.c b/drivers/misc/rockchip-efuse.c
index 2520c6a38e..46ce6305fe 100644
--- a/drivers/misc/rockchip-efuse.c
+++ b/drivers/misc/rockchip-efuse.c
@@ -43,8 +43,8 @@ struct rockchip_efuse_platdata {
 };
 
 #if defined(DEBUG)
-static int dump_efuses(cmd_tbl_t *cmdtp, int flag,
-		       int argc, char * const argv[])
+static int dump_efuses(struct cmd_tbl *cmdtp, int flag,
+		       int argc, char *const argv[])
 {
 	/*
 	 * N.B.: This function is tailored towards the RK3399 and assumes that
diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c
index 7e98449cfa..82b1db3fb3 100644
--- a/drivers/net/e1000.c
+++ b/drivers/net/e1000.c
@@ -30,6 +30,7 @@ tested on both gig copper and gig fiber boards
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <errno.h>
@@ -5761,8 +5762,8 @@ struct e1000_hw *e1000_find_card(unsigned int cardnum)
 #endif /* !CONFIG_DM_ETH */
 
 #ifdef CONFIG_CMD_E1000
-static int do_e1000(cmd_tbl_t *cmdtp, int flag,
-		int argc, char * const argv[])
+static int do_e1000(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[])
 {
 	unsigned char *mac = NULL;
 #ifdef CONFIG_DM_ETH
diff --git a/drivers/net/e1000.h b/drivers/net/e1000.h
index 2ae3085515..19ed4777d9 100644
--- a/drivers/net/e1000.h
+++ b/drivers/net/e1000.h
@@ -74,8 +74,8 @@ void e1000_lower_ee_clk(struct e1000_hw *hw, uint32_t *eecd);
 #endif
 
 #ifdef CONFIG_E1000_SPI
-int do_e1000_spi(cmd_tbl_t *cmdtp, struct e1000_hw *hw,
-		int argc, char * const argv[]);
+int do_e1000_spi(struct cmd_tbl *cmdtp, struct e1000_hw *hw,
+		 int argc, char *const argv[]);
 #endif
 
 /* Enumerated types specific to the e1000 hardware */
diff --git a/drivers/net/e1000_spi.c b/drivers/net/e1000_spi.c
index 52b3c79794..dcb561ff79 100644
--- a/drivers/net/e1000_spi.c
+++ b/drivers/net/e1000_spi.c
@@ -1,4 +1,5 @@
 #include <common.h>
+#include <command.h>
 #include <console.h>
 #include "e1000.h"
 #include <malloc.h>
@@ -315,8 +316,8 @@ static int e1000_spi_eeprom_program(struct e1000_hw *hw,
 	return 0;
 }
 
-static int do_e1000_spi_show(cmd_tbl_t *cmdtp, struct e1000_hw *hw,
-		int argc, char * const argv[])
+static int do_e1000_spi_show(struct cmd_tbl *cmdtp, struct e1000_hw *hw,
+			     int argc, char *const argv[])
 {
 	unsigned int length = 0;
 	u16 i, offset = 0;
@@ -384,8 +385,8 @@ static int do_e1000_spi_show(cmd_tbl_t *cmdtp, struct e1000_hw *hw,
 	return 0;
 }
 
-static int do_e1000_spi_dump(cmd_tbl_t *cmdtp, struct e1000_hw *hw,
-		int argc, char * const argv[])
+static int do_e1000_spi_dump(struct cmd_tbl *cmdtp, struct e1000_hw *hw,
+			     int argc, char *const argv[])
 {
 	unsigned int length;
 	u16 offset;
@@ -429,8 +430,8 @@ static int do_e1000_spi_dump(cmd_tbl_t *cmdtp, struct e1000_hw *hw,
 	return 0;
 }
 
-static int do_e1000_spi_program(cmd_tbl_t *cmdtp, struct e1000_hw *hw,
-		int argc, char * const argv[])
+static int do_e1000_spi_program(struct cmd_tbl *cmdtp, struct e1000_hw *hw,
+				int argc, char *const argv[])
 {
 	unsigned int length;
 	const void *source;
@@ -464,8 +465,8 @@ static int do_e1000_spi_program(cmd_tbl_t *cmdtp, struct e1000_hw *hw,
 	return 0;
 }
 
-static int do_e1000_spi_checksum(cmd_tbl_t *cmdtp, struct e1000_hw *hw,
-		int argc, char * const argv[])
+static int do_e1000_spi_checksum(struct cmd_tbl *cmdtp, struct e1000_hw *hw,
+				 int argc, char *const argv[])
 {
 	uint16_t i, length, checksum = 0, checksum_reg;
 	uint16_t *buffer;
@@ -540,8 +541,8 @@ static int do_e1000_spi_checksum(cmd_tbl_t *cmdtp, struct e1000_hw *hw,
 	return 0;
 }
 
-int do_e1000_spi(cmd_tbl_t *cmdtp, struct e1000_hw *hw,
-		int argc, char * const argv[])
+int do_e1000_spi(struct cmd_tbl *cmdtp, struct e1000_hw *hw,
+		 int argc, char *const argv[])
 {
 	if (argc < 1) {
 		cmd_usage(cmdtp);
diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
index da0815a46f..39824094f9 100644
--- a/drivers/net/fsl-mc/mc.c
+++ b/drivers/net/fsl-mc/mc.c
@@ -1745,7 +1745,8 @@ err:
 	return err;
 }
 
-static int do_fsl_mc(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_fsl_mc(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	int err = 0;
 	if (argc < 3)
diff --git a/drivers/net/pfe_eth/pfe_cmd.c b/drivers/net/pfe_eth/pfe_cmd.c
index dd8c68d57d..bae5f8a479 100644
--- a/drivers/net/pfe_eth/pfe_cmd.c
+++ b/drivers/net/pfe_eth/pfe_cmd.c
@@ -9,6 +9,7 @@
  * @brief PFE utility commands
  */
 
+#include <command.h>
 #include <net/pfe_eth/pfe_eth.h>
 
 static inline void pfe_command_help(void)
@@ -16,7 +17,7 @@ static inline void pfe_command_help(void)
 	printf("Usage: pfe [pe | status | expt ] <options>\n");
 }
 
-static void pfe_command_pe(int argc, char * const argv[])
+static void pfe_command_pe(int argc, char *const argv[])
 {
 	if (argc >= 3 && strcmp(argv[2], "pmem") == 0) {
 		if (argc >= 4 && strcmp(argv[3], "read") == 0) {
@@ -271,7 +272,7 @@ static void  bmu(int id, void *base)
 #define PEMBOX_ADDR_TMU		0x290
 #define	PESTATUS_ADDR_UTIL	0x0
 
-static void pfe_pe_status(int argc, char * const argv[])
+static void pfe_pe_status(int argc, char *const argv[])
 {
 	int do_clear = 0;
 	u32 id;
@@ -336,7 +337,7 @@ static void pfe_pe_status(int argc, char * const argv[])
 	}
 }
 
-static void pfe_command_status(int argc, char * const argv[])
+static void pfe_command_status(int argc, char *const argv[])
 {
 	if (argc >= 3 && strcmp(argv[2], "pe") == 0) {
 		pfe_pe_status(argc, argv);
@@ -370,7 +371,7 @@ static const char *register_names[EXPT_REG_COUNT] = {
 		" r12", " r13", " r14", " r15"
 };
 
-static void pfe_command_expt(int argc, char * const argv[])
+static void pfe_command_expt(int argc, char *const argv[])
 {
 	unsigned int id, i, val, addr;
 
@@ -414,7 +415,7 @@ static void send_dummy_pkt_to_hif(void)
 	writel(buf, TMU_PHY_INQ_PKTINFO);
 }
 
-static void pfe_command_stop(int argc, char * const argv[])
+static void pfe_command_stop(int argc, char *const argv[])
 {
 	int pfe_pe_id, hif_stop_loop = 10;
 	u32 rx_status;
@@ -462,8 +463,8 @@ static void pfe_command_stop(int argc, char * const argv[])
 }
 #endif
 
-static int pfe_command(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int pfe_command(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[])
 {
 	if (argc == 1 || strcmp(argv[1], "help") == 0) {
 		pfe_command_help();
diff --git a/drivers/net/phy/b53.c b/drivers/net/phy/b53.c
index 30c4812d82..f039f895c8 100644
--- a/drivers/net/phy/b53.c
+++ b/drivers/net/phy/b53.c
@@ -23,6 +23,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 
 #include <errno.h>
 #include <malloc.h>
@@ -627,7 +628,7 @@ int phy_b53_init(void)
 	return 0;
 }
 
-int do_b53_reg_read(const char *name, int argc, char * const argv[])
+int do_b53_reg_read(const char *name, int argc, char *const argv[])
 {
 	u8 page, offset, width;
 	struct mii_dev *bus;
@@ -681,7 +682,7 @@ int do_b53_reg_read(const char *name, int argc, char * const argv[])
 	return ret;
 }
 
-int do_b53_reg_write(const char *name, int argc, char * const argv[])
+int do_b53_reg_write(const char *name, int argc, char *const argv[])
 {
 	u8 page, offset, width;
 	struct mii_dev *bus;
@@ -727,7 +728,7 @@ int do_b53_reg_write(const char *name, int argc, char * const argv[])
 	return ret;
 }
 
-int do_b53_reg(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_b53_reg(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	const char *cmd, *mdioname;
 	int ret = 0;
diff --git a/drivers/net/phy/mv88e6352.c b/drivers/net/phy/mv88e6352.c
index 6fe08b80c1..a27a9cc03e 100644
--- a/drivers/net/phy/mv88e6352.c
+++ b/drivers/net/phy/mv88e6352.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <miiphy.h>
 #include <linux/errno.h>
 #include <mv88e6352.h>
@@ -230,7 +231,7 @@ int mv88e_sw_reset(const char *devname, u8 phy_addr)
 	return -ETIMEDOUT;
 }
 
-int do_mvsw_reg_read(const char *name, int argc, char * const argv[])
+int do_mvsw_reg_read(const char *name, int argc, char *const argv[])
 {
 	u16 value = 0, phyaddr, reg, port;
 	int ret;
@@ -245,7 +246,7 @@ int do_mvsw_reg_read(const char *name, int argc, char * const argv[])
 	return ret;
 }
 
-int do_mvsw_reg_write(const char *name, int argc, char * const argv[])
+int do_mvsw_reg_write(const char *name, int argc, char *const argv[])
 {
 	u16 value = 0, phyaddr, reg, port;
 	int ret;
@@ -261,7 +262,7 @@ int do_mvsw_reg_write(const char *name, int argc, char * const argv[])
 }
 
 
-int do_mvsw_reg(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_mvsw_reg(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int ret;
 	const char *cmd, *ethname;
diff --git a/drivers/net/vsc9953.c b/drivers/net/vsc9953.c
index f17839c70f..93eb2b158c 100644
--- a/drivers/net/vsc9953.c
+++ b/drivers/net/vsc9953.c
@@ -5,6 +5,7 @@
  *  Driver for the Vitesse VSC9953 L2 Switch
  */
 
+#include <command.h>
 #include <asm/io.h>
 #include <asm/fsl_serdes.h>
 #include <fm_eth.h>
diff --git a/drivers/power/axp152.c b/drivers/power/axp152.c
index 361be6c31c..d6e36125c1 100644
--- a/drivers/power/axp152.c
+++ b/drivers/power/axp152.c
@@ -79,7 +79,7 @@ int axp_init(void)
 	return 0;
 }
 
-int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	pmic_bus_write(AXP152_SHUTDOWN, AXP152_POWEROFF);
 
diff --git a/drivers/power/axp209.c b/drivers/power/axp209.c
index 67b420910c..60f69ec27a 100644
--- a/drivers/power/axp209.c
+++ b/drivers/power/axp209.c
@@ -229,7 +229,7 @@ int axp_init(void)
 	return 0;
 }
 
-int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	pmic_bus_write(AXP209_SHUTDOWN, AXP209_POWEROFF);
 
diff --git a/drivers/power/axp221.c b/drivers/power/axp221.c
index c440047d36..3446fe7365 100644
--- a/drivers/power/axp221.c
+++ b/drivers/power/axp221.c
@@ -264,7 +264,7 @@ int axp_get_sid(unsigned int *sid)
 	return 0;
 }
 
-int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	pmic_bus_write(AXP221_SHUTDOWN, AXP221_SHUTDOWN_POWEROFF);
 
diff --git a/drivers/power/axp809.c b/drivers/power/axp809.c
index 7de92f4f61..6323492b66 100644
--- a/drivers/power/axp809.c
+++ b/drivers/power/axp809.c
@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <errno.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/pmic_bus.h>
@@ -219,7 +220,7 @@ int axp_init(void)
 	return pmic_bus_init();
 }
 
-int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	pmic_bus_write(AXP809_SHUTDOWN, AXP809_SHUTDOWN_POWEROFF);
 
diff --git a/drivers/power/axp818.c b/drivers/power/axp818.c
index 834919ddd4..0531707c8a 100644
--- a/drivers/power/axp818.c
+++ b/drivers/power/axp818.c
@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <errno.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/pmic_bus.h>
@@ -255,7 +256,7 @@ int axp_init(void)
 	return 0;
 }
 
-int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	pmic_bus_write(AXP818_SHUTDOWN, AXP818_SHUTDOWN_POWEROFF);
 
diff --git a/drivers/power/mt6323.c b/drivers/power/mt6323.c
index 566be5f39e..f5b27548d3 100644
--- a/drivers/power/mt6323.c
+++ b/drivers/power/mt6323.c
@@ -17,7 +17,7 @@
 #define RTC_BBPU_KEY		(0x43 << 8)
 #define RTC_WRTGR		0x003c
 
-int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	u32 addr, val;
 
diff --git a/drivers/power/power_core.c b/drivers/power/power_core.c
index 095d8a51be..5a18dedada 100644
--- a/drivers/power/power_core.c
+++ b/drivers/power/power_core.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <malloc.h>
 #include <linux/types.h>
 #include <linux/list.h>
@@ -120,7 +121,8 @@ static void pmic_list_names(void)
 	}
 }
 
-static int do_pmic(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_pmic(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	u32 ret, reg, val;
 	char *cmd, *name;
diff --git a/drivers/power/twl4030.c b/drivers/power/twl4030.c
index 42c9001518..4cc261aced 100644
--- a/drivers/power/twl4030.c
+++ b/drivers/power/twl4030.c
@@ -22,6 +22,7 @@
  *	Syed Mohammed Khasim <khasim@ti.com>
  */
 
+#include <command.h>
 #include <twl4030.h>
 
 /*
@@ -172,7 +173,7 @@ void twl4030_power_mmc_init(int dev_index)
 }
 
 #ifdef CONFIG_CMD_POWEROFF
-int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	twl4030_power_off();
 
diff --git a/drivers/qe/qe.c b/drivers/qe/qe.c
index fbad124b51..61ca4760c8 100644
--- a/drivers/qe/qe.c
+++ b/drivers/qe/qe.c
@@ -781,7 +781,7 @@ struct qe_firmware_info *qe_get_firmware_info(void)
 	return qe_firmware_uploaded ? &qe_firmware_info : NULL;
 }
 
-static int qe_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int qe_cmd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	ulong addr;
 
diff --git a/drivers/ram/stm32mp1/stm32mp1_interactive.c b/drivers/ram/stm32mp1/stm32mp1_interactive.c
index 805c9ddaad..47e176b282 100644
--- a/drivers/ram/stm32mp1/stm32mp1_interactive.c
+++ b/drivers/ram/stm32mp1/stm32mp1_interactive.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <console.h>
 #include <cli.h>
 #include <clk.h>
@@ -150,7 +151,7 @@ static bool stm32mp1_check_step(enum stm32mp1_ddr_interact_step step,
 static void stm32mp1_do_info(struct ddr_info *priv,
 			     struct stm32mp1_ddr_config *config,
 			     enum stm32mp1_ddr_interact_step step,
-			     int argc, char * const argv[])
+			     int argc, char *const argv[])
 {
 	unsigned long value;
 	static char *ddr_name;
@@ -223,7 +224,7 @@ static void stm32mp1_do_info(struct ddr_info *priv,
 }
 
 static bool stm32mp1_do_freq(struct ddr_info *priv,
-			     int argc, char * const argv[])
+			     int argc, char *const argv[])
 {
 	unsigned long ddrphy_clk;
 
@@ -246,7 +247,7 @@ static bool stm32mp1_do_freq(struct ddr_info *priv,
 
 static void stm32mp1_do_param(enum stm32mp1_ddr_interact_step step,
 			      const struct stm32mp1_ddr_config *config,
-			      int argc, char * const argv[])
+			      int argc, char *const argv[])
 {
 	switch (argc) {
 	case 1:
@@ -266,7 +267,7 @@ static void stm32mp1_do_param(enum stm32mp1_ddr_interact_step step,
 }
 
 static void stm32mp1_do_print(struct ddr_info *priv,
-			      int argc, char * const argv[])
+			      int argc, char *const argv[])
 {
 	switch (argc) {
 	case 1:
@@ -281,7 +282,7 @@ static void stm32mp1_do_print(struct ddr_info *priv,
 }
 
 static int stm32mp1_do_step(enum stm32mp1_ddr_interact_step step,
-			    int argc, char * const argv[])
+			    int argc, char *const argv[])
 {
 	int i;
 	unsigned long value;
diff --git a/drivers/sysreset/sysreset-uclass.c b/drivers/sysreset/sysreset-uclass.c
index 51fdb1055e..9e990339a6 100644
--- a/drivers/sysreset/sysreset-uclass.c
+++ b/drivers/sysreset/sysreset-uclass.c
@@ -7,6 +7,7 @@
 #define LOG_CATEGORY UCLASS_SYSRESET
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <hang.h>
 #include <sysreset.h>
@@ -111,7 +112,7 @@ void reset_cpu(ulong addr)
 }
 
 
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	printf("resetting ...\n");
 
@@ -121,7 +122,7 @@ int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 }
 
 #if IS_ENABLED(CONFIG_SYSRESET_CMD_POWEROFF)
-int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int ret;
 
diff --git a/drivers/sysreset/sysreset_mpc83xx.c b/drivers/sysreset/sysreset_mpc83xx.c
index 9092764e0b..39f4671fad 100644
--- a/drivers/sysreset/sysreset_mpc83xx.c
+++ b/drivers/sysreset/sysreset_mpc83xx.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <dm.h>
 #include <sysreset.h>
 #include <wait_bit.h>
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index fc27dbe8de..d1be3f5e13 100644
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -9,6 +9,7 @@
  * Copyright 2014 Linaro, Ltd.
  * Rob Herring <robh@kernel.org>
  */
+#include <command.h>
 #include <config.h>
 #include <common.h>
 #include <env.h>
diff --git a/drivers/usb/gadget/f_rockusb.c b/drivers/usb/gadget/f_rockusb.c
index da3d63c0f0..0c4c83f89d 100644
--- a/drivers/usb/gadget/f_rockusb.c
+++ b/drivers/usb/gadget/f_rockusb.c
@@ -4,6 +4,7 @@
  *
  * Eddie Cai <eddie.cai.linux@gmail.com>
  */
+#include <command.h>
 #include <config.h>
 #include <common.h>
 #include <env.h>
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 5442bac4c6..8918d83723 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -65,6 +65,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <cpu_func.h>
 #include <env.h>
 #include <fdtdec.h>
@@ -1710,7 +1711,8 @@ static void logo_black(void)
 			1);
 }
 
-static int do_clrlogo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_clrlogo(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	if (argc != 1)
 		return cmd_usage(cmdtp);
diff --git a/drivers/video/lg4573.c b/drivers/video/lg4573.c
index 997e854ef8..74a2388924 100644
--- a/drivers/video/lg4573.c
+++ b/drivers/video/lg4573.c
@@ -6,6 +6,7 @@
  */
 #include <common.h>
 #include <backlight.h>
+#include <command.h>
 #include <display.h>
 #include <dm.h>
 #include <dm/read.h>
@@ -208,8 +209,8 @@ static int lg4573_spi_startup(struct spi_slave *slave)
 	return 0;
 }
 
-static int do_lgset(cmd_tbl_t *cmdtp, int flag, int argc,
-		       char * const argv[])
+static int do_lgset(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[])
 {
 	struct spi_slave *slave;
 	struct udevice *dev;
diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c
index 8e0fc7f3ec..dd6786ffae 100644
--- a/drivers/video/vidconsole-uclass.c
+++ b/drivers/video/vidconsole-uclass.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <linux/ctype.h>
 #include <dm.h>
 #include <video.h>
@@ -623,7 +624,7 @@ void vidconsole_position_cursor(struct udevice *dev, unsigned col, unsigned row)
 	priv->ycur = min_t(short, row, vid_priv->ysize - 1);
 }
 
-static int do_video_setcursor(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_video_setcursor(struct cmd_tbl *cmdtp, int flag, int argc,
 			      char *const argv[])
 {
 	unsigned int col, row;
@@ -641,7 +642,7 @@ static int do_video_setcursor(cmd_tbl_t *cmdtp, int flag, int argc,
 	return 0;
 }
 
-static int do_video_puts(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_video_puts(struct cmd_tbl *cmdtp, int flag, int argc,
 			 char *const argv[])
 {
 	struct udevice *dev;
diff --git a/examples/api/demo.c b/examples/api/demo.c
index e7523786b4..d586174ce8 100644
--- a/examples/api/demo.c
+++ b/examples/api/demo.c
@@ -24,7 +24,7 @@ void	test_dump_sig(struct api_signature *);
 
 static char buf[BUF_SZ];
 
-int main(int argc, char * const argv[])
+int main(int argc, char *const argv[])
 {
 	int rv = 0, h, i, j, devs_no;
 	struct api_signature *sig = NULL;
diff --git a/examples/api/libgenwrap.c b/examples/api/libgenwrap.c
index 769dcc7038..51d6273a93 100644
--- a/examples/api/libgenwrap.c
+++ b/examples/api/libgenwrap.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <hang.h>
 #include <linux/types.h>
 #include <api_public.h>
@@ -31,7 +32,7 @@ void __udelay(unsigned long usec)
 	ub_udelay(usec);
 }
 
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	ub_reset();
 	return 0;
diff --git a/examples/standalone/atmel_df_pow2.c b/examples/standalone/atmel_df_pow2.c
index b7bd243730..b71b406126 100644
--- a/examples/standalone/atmel_df_pow2.c
+++ b/examples/standalone/atmel_df_pow2.c
@@ -115,7 +115,7 @@ static char *getline(void)
 	}
 }
 
-int atmel_df_pow2(int argc, char * const argv[])
+int atmel_df_pow2(int argc, char *const argv[])
 {
 	/* Print the ABI version */
 	app_startup(argv);
diff --git a/examples/standalone/hello_world.c b/examples/standalone/hello_world.c
index 1f61bb4777..263cd9ca07 100644
--- a/examples/standalone/hello_world.c
+++ b/examples/standalone/hello_world.c
@@ -7,7 +7,7 @@
 #include <common.h>
 #include <exports.h>
 
-int hello_world (int argc, char * const argv[])
+int hello_world(int argc, char *const argv[])
 {
 	int i;
 
diff --git a/examples/standalone/smc91111_eeprom.c b/examples/standalone/smc91111_eeprom.c
index 5ffefc8f36..a43d14f396 100644
--- a/examples/standalone/smc91111_eeprom.c
+++ b/examples/standalone/smc91111_eeprom.c
@@ -31,7 +31,7 @@ void print_MAC (struct eth_device *dev);
 int read_eeprom_reg (struct eth_device *dev, int reg);
 void print_macaddr (struct eth_device *dev);
 
-int smc91111_eeprom (int argc, char * const argv[])
+int smc91111_eeprom(int argc, char *const argv[])
 {
 	int c, i, j, done, line, reg, value, start, what;
 	char input[50];
diff --git a/examples/standalone/smc911x_eeprom.c b/examples/standalone/smc911x_eeprom.c
index 8acfcb9a0b..9bd9a6efa3 100644
--- a/examples/standalone/smc911x_eeprom.c
+++ b/examples/standalone/smc911x_eeprom.c
@@ -466,7 +466,7 @@ static char *getline(void)
 /**
  *	smc911x_eeprom - our application's main() function
  */
-int smc911x_eeprom(int argc, char * const argv[])
+int smc911x_eeprom(int argc, char *const argv[])
 {
 	/* Avoid initializing on stack as gcc likes to call memset() */
 	struct eth_device dev;
diff --git a/examples/standalone/stubs.c b/examples/standalone/stubs.c
index 0827bde35e..5fb460454f 100644
--- a/examples/standalone/stubs.c
+++ b/examples/standalone/stubs.c
@@ -2,6 +2,8 @@
 #include <exports.h>
 #include <linux/compiler.h>
 
+struct cmd_tbl;
+
 #define FO(x) offsetof(struct jt_funcs, x)
 
 #if defined(CONFIG_X86)
diff --git a/fs/fs.c b/fs/fs.c
index 061917a984..5591c65eaa 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -3,6 +3,7 @@
  * Copyright (c) 2012, NVIDIA CORPORATION.  All rights reserved.
  */
 
+#include <command.h>
 #include <config.h>
 #include <errno.h>
 #include <common.h>
@@ -644,8 +645,8 @@ int fs_ln(const char *fname, const char *target)
 	return ret;
 }
 
-int do_size(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
-		int fstype)
+int do_size(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[],
+	    int fstype)
 {
 	loff_t size;
 
@@ -663,8 +664,8 @@ int do_size(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
 	return 0;
 }
 
-int do_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
-		int fstype)
+int do_load(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[],
+	    int fstype)
 {
 	unsigned long addr;
 	const char *addr_str;
@@ -737,8 +738,8 @@ int do_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
 	return 0;
 }
 
-int do_ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
-	int fstype)
+int do_ls(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[],
+	  int fstype)
 {
 	if (argc < 2)
 		return CMD_RET_USAGE;
@@ -763,8 +764,8 @@ int file_exists(const char *dev_type, const char *dev_part, const char *file,
 	return fs_exists(file);
 }
 
-int do_save(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
-		int fstype)
+int do_save(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[],
+	    int fstype)
 {
 	unsigned long addr;
 	const char *filename;
@@ -805,8 +806,8 @@ int do_save(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
 	return 0;
 }
 
-int do_fs_uuid(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
-		int fstype)
+int do_fs_uuid(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[],
+	       int fstype)
 {
 	int ret;
 	char uuid[37];
@@ -830,7 +831,7 @@ int do_fs_uuid(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
 	return CMD_RET_SUCCESS;
 }
 
-int do_fs_type(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_fs_type(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	struct fstype_info *info;
 
@@ -852,7 +853,7 @@ int do_fs_type(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return CMD_RET_SUCCESS;
 }
 
-int do_rm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
+int do_rm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[],
 	  int fstype)
 {
 	if (argc != 4)
@@ -867,7 +868,7 @@ int do_rm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
 	return 0;
 }
 
-int do_mkdir(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
+int do_mkdir(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[],
 	     int fstype)
 {
 	int ret;
@@ -887,7 +888,7 @@ int do_mkdir(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
 	return 0;
 }
 
-int do_ln(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
+int do_ln(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[],
 	  int fstype)
 {
 	if (argc != 5)
diff --git a/include/_exports.h b/include/_exports.h
index 0dee05f077..1e9ba86108 100644
--- a/include/_exports.h
+++ b/include/_exports.h
@@ -29,7 +29,7 @@
 	EXPORT_FUNC(udelay, void, udelay, unsigned long)
 	EXPORT_FUNC(get_timer, unsigned long, get_timer, unsigned long)
 	EXPORT_FUNC(vprintf, int, vprintf, const char *, va_list)
-	EXPORT_FUNC(do_reset, int, do_reset, cmd_tbl_t *,
+	EXPORT_FUNC(do_reset, int, do_reset, struct cmd_tbl *,
 		    int , int , char * const [])
 	EXPORT_FUNC(env_get, char  *, env_get, const char*)
 	EXPORT_FUNC(env_set, int, env_set, const char *, const char *)
diff --git a/include/bedbug/type.h b/include/bedbug/type.h
index 3754c7f2b2..f7a719caf0 100644
--- a/include/bedbug/type.h
+++ b/include/bedbug/type.h
@@ -1,6 +1,8 @@
 #ifndef _TYPE_BEDBUG_H
 #define _TYPE_BEDBUG_H
 
+struct cmd_tbl;
+
 /* Supporting routines */
 int bedbug_puts (const char *);
 int bedbug_init(void);
@@ -15,7 +17,8 @@ typedef struct {
 	int current_bp;
 	struct pt_regs *regs;
 
-	void (*do_break) (cmd_tbl_t *, int, int, char * const []);
+	void (*do_break)(struct cmd_tbl *cmd, int flags, int argc,
+			 char *const argv[]);
 	void (*break_isr) (struct pt_regs *);
 	int (*find_empty) (void);
 	int (*set) (int, unsigned long);
diff --git a/include/blk.h b/include/blk.h
index 6f541bb2ba..abcd4bedbb 100644
--- a/include/blk.h
+++ b/include/blk.h
@@ -679,7 +679,7 @@ const char *blk_get_if_type_name(enum if_type if_type);
  * @cur_devnump: Current device number for this interface type
  * @return 0 if OK, CMD_RET_ERROR on error
  */
-int blk_common_cmd(int argc, char * const argv[], enum if_type if_type,
+int blk_common_cmd(int argc, char *const argv[], enum if_type if_type,
 		   int *cur_devnump);
 
 #endif
diff --git a/include/bootm.h b/include/bootm.h
index edeeacb0df..1e7f29e134 100644
--- a/include/bootm.h
+++ b/include/bootm.h
@@ -7,9 +7,10 @@
 #ifndef _BOOTM_H
 #define _BOOTM_H
 
-#include <command.h>
 #include <image.h>
 
+struct cmd_tbl;
+
 #define BOOTM_ERR_RESET		(-1)
 #define BOOTM_ERR_OVERLAP		(-2)
 #define BOOTM_ERR_UNIMPLEMENTED	(-3)
@@ -31,13 +32,13 @@
  * @return 1 on error. On success the OS boots so this function does
  * not return.
  */
-typedef int boot_os_fn(int flag, int argc, char * const argv[],
+typedef int boot_os_fn(int flag, int argc, char *const argv[],
 			bootm_headers_t *images);
 
 extern boot_os_fn do_bootm_linux;
 extern boot_os_fn do_bootm_vxworks;
 
-int do_bootelf(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+int do_bootelf(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
 void lynxkdi_boot(image_header_t *hdr);
 
 boot_os_fn *bootm_os_get_boot_func(int os);
@@ -46,16 +47,17 @@ boot_os_fn *bootm_os_get_boot_func(int os);
 int bootm_host_load_images(const void *fit, int cfg_noffset);
 #endif
 
-int boot_selected_os(int argc, char * const argv[], int state,
+int boot_selected_os(int argc, char *const argv[], int state,
 		     bootm_headers_t *images, boot_os_fn *boot_fn);
 
 ulong bootm_disable_interrupts(void);
 
 /* This is a special function used by booti/bootz */
-int bootm_find_images(int flag, int argc, char * const argv[]);
+int bootm_find_images(int flag, int argc, char *const argv[]);
 
-int do_bootm_states(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
-		    int states, bootm_headers_t *images, int boot_progress);
+int do_bootm_states(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[], int states, bootm_headers_t *images,
+		    int boot_progress);
 
 void arch_preboot_os(void);
 
diff --git a/include/command.h b/include/command.h
index d1063774ce..b9b5ec1afa 100644
--- a/include/command.h
+++ b/include/command.h
@@ -27,7 +27,7 @@
  * Monitor Command Table
  */
 
-struct cmd_tbl_s {
+struct cmd_tbl {
 	char		*name;		/* Command Name			*/
 	int		maxargs;	/* maximum number of arguments	*/
 					/*
@@ -38,54 +38,57 @@ struct cmd_tbl_s {
 					 * repeatable property different for
 					 * the main command and sub-commands.
 					 */
-	int		(*cmd_rep)(struct cmd_tbl_s *cmd, int flags, int argc,
-				   char * const argv[], int *repeatable);
+	int		(*cmd_rep)(struct cmd_tbl *cmd, int flags, int argc,
+				   char *const argv[], int *repeatable);
 					/* Implementation function	*/
-	int		(*cmd)(struct cmd_tbl_s *, int, int, char * const []);
+	int		(*cmd)(struct cmd_tbl *cmd, int flags, int argc,
+			       char *const argv[]);
 	char		*usage;		/* Usage message	(short)	*/
 #ifdef	CONFIG_SYS_LONGHELP
 	char		*help;		/* Help  message	(long)	*/
 #endif
 #ifdef CONFIG_AUTO_COMPLETE
 	/* do auto completion on the arguments */
-	int		(*complete)(int argc, char * const argv[], char last_char, int maxv, char *cmdv[]);
+	int		(*complete)(int argc, char *const argv[],
+				    char last_char, int maxv, char *cmdv[]);
 #endif
 };
 
-typedef struct cmd_tbl_s	cmd_tbl_t;
-
-
 #if defined(CONFIG_CMD_RUN)
-extern int do_run(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+extern int do_run(struct cmd_tbl *cmdtp, int flag, int argc,
+		  char *const argv[]);
 #endif
 
 /* common/command.c */
-int _do_help (cmd_tbl_t *cmd_start, int cmd_items, cmd_tbl_t * cmdtp, int
-	      flag, int argc, char * const argv[]);
-cmd_tbl_t *find_cmd(const char *cmd);
-cmd_tbl_t *find_cmd_tbl (const char *cmd, cmd_tbl_t *table, int table_len);
-int complete_subcmdv(cmd_tbl_t *cmdtp, int count, int argc,
-		     char * const argv[], char last_char, int maxv,
+int _do_help(struct cmd_tbl *cmd_start, int cmd_items, struct cmd_tbl *cmdtp,
+	     int flag, int argc, char *const argv[]);
+struct cmd_tbl *find_cmd(const char *cmd);
+struct cmd_tbl *find_cmd_tbl(const char *cmd, struct cmd_tbl *table,
+			     int table_len);
+int complete_subcmdv(struct cmd_tbl *cmdtp, int count, int argc,
+		     char *const argv[], char last_char, int maxv,
 		     char *cmdv[]);
 
-extern int cmd_usage(const cmd_tbl_t *cmdtp);
+extern int cmd_usage(const struct cmd_tbl *cmdtp);
 
 /* Dummy ->cmd and ->cmd_rep wrappers. */
-int cmd_always_repeatable(cmd_tbl_t *cmdtp, int flag, int argc,
-			  char * const argv[], int *repeatable);
-int cmd_never_repeatable(cmd_tbl_t *cmdtp, int flag, int argc,
-			 char * const argv[], int *repeatable);
-int cmd_discard_repeatable(cmd_tbl_t *cmdtp, int flag, int argc,
-			   char * const argv[]);
-
-static inline bool cmd_is_repeatable(cmd_tbl_t *cmdtp)
+int cmd_always_repeatable(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[], int *repeatable);
+int cmd_never_repeatable(struct cmd_tbl *cmdtp, int flag, int argc,
+			 char *const argv[], int *repeatable);
+int cmd_discard_repeatable(struct cmd_tbl *cmdtp, int flag, int argc,
+			   char *const argv[]);
+
+static inline bool cmd_is_repeatable(struct cmd_tbl *cmdtp)
 {
 	return cmdtp->cmd_rep == cmd_always_repeatable;
 }
 
 #ifdef CONFIG_AUTO_COMPLETE
-extern int var_complete(int argc, char * const argv[], char last_char, int maxv, char *cmdv[]);
-extern int cmd_auto_complete(const char *const prompt, char *buf, int *np, int *colp);
+extern int var_complete(int argc, char *const argv[], char last_char, int maxv,
+			char *cmdv[]);
+extern int cmd_auto_complete(const char *const prompt, char *buf, int *np,
+			     int *colp);
 #endif
 
 /**
@@ -97,14 +100,15 @@ extern int cmd_auto_complete(const char *const prompt, char *buf, int *np, int *
  *	   1 (CMD_RET_FAILURE) if an error is found
  *	   -1 (CMD_RET_USAGE) if 'usage' error is found
  */
-int cmd_process_error(cmd_tbl_t *cmdtp, int err);
+int cmd_process_error(struct cmd_tbl *cmdtp, int err);
 
 /*
  * Monitor Command
  *
  * All commands use a common argument format:
  *
- * void function (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+ * void function(struct cmd_tbl *cmdtp, int flag, int argc,
+ *		 char *const argv[]);
  */
 
 #if defined(CONFIG_CMD_MEMORY) || \
@@ -117,36 +121,42 @@ extern int cmd_get_data_size(char* arg, int default_size);
 #endif
 
 #ifdef CONFIG_CMD_BOOTD
-extern int do_bootd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+extern int do_bootd(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[]);
 #endif
 #ifdef CONFIG_CMD_BOOTM
-extern int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
-extern int bootm_maybe_autostart(cmd_tbl_t *cmdtp, const char *cmd);
+extern int do_bootm(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[]);
+extern int bootm_maybe_autostart(struct cmd_tbl *cmdtp, const char *cmd);
 #else
-static inline int bootm_maybe_autostart(cmd_tbl_t *cmdtp, const char *cmd)
+static inline int bootm_maybe_autostart(struct cmd_tbl *cmdtp, const char *cmd)
 {
 	return 0;
 }
 #endif
 
-extern int do_bootz(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+extern int do_bootz(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[]);
 
-extern int do_booti(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+extern int do_booti(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[]);
 
-extern int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc,
+extern int common_diskboot(struct cmd_tbl *cmdtp, const char *intf, int argc,
 			   char *const argv[]);
 
-extern int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
-extern int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+extern int do_reset(struct cmd_tbl *cmdtp, int flag, int argc,
+		    char *const argv[]);
+extern int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc,
+		       char *const argv[]);
 
 extern unsigned long do_go_exec(ulong (*entry)(int, char * const []), int argc,
-				char * const argv[]);
+				char *const argv[]);
 
 #if defined(CONFIG_CMD_NVEDIT_EFI)
-extern int do_env_print_efi(cmd_tbl_t *cmdtp, int flag, int argc,
-			    char * const argv[]);
-extern int do_env_set_efi(cmd_tbl_t *cmdtp, int flag, int argc,
-			  char * const argv[]);
+extern int do_env_print_efi(struct cmd_tbl *cmdtp, int flag, int argc,
+			    char *const argv[]);
+extern int do_env_set_efi(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[]);
 #endif
 
 /*
@@ -177,10 +187,10 @@ enum command_ret_t {
  *			number of ticks the command took to complete.
  * @return 0 if the command succeeded, 1 if it failed
  */
-int cmd_process(int flag, int argc, char * const argv[],
-			       int *repeatable, unsigned long *ticks);
+int cmd_process(int flag, int argc, char *const argv[], int *repeatable,
+		unsigned long *ticks);
 
-void fixup_cmdtable(cmd_tbl_t *cmdtp, int size);
+void fixup_cmdtable(struct cmd_tbl *cmdtp, int size);
 
 /**
  * board_run_command() - Fallback function to execute a command
@@ -254,10 +264,11 @@ int run_command_list(const char *cmd, int len, int flag);
 #endif
 
 #define U_BOOT_SUBCMDS_DO_CMD(_cmdname)					\
-	static int do_##_cmdname(cmd_tbl_t *cmdtp, int flag, int argc,	\
-				 char * const argv[], int *repeatable)	\
+	static int do_##_cmdname(struct cmd_tbl *cmdtp, int flag,	\
+				 int argc, char *const argv[],		\
+				 int *repeatable)			\
 	{								\
-		cmd_tbl_t *subcmd;					\
+		struct cmd_tbl *subcmd;					\
 									\
 		_cmdname##_subcmds_reloc();				\
 									\
@@ -280,7 +291,7 @@ int run_command_list(const char *cmd, int len, int flag);
 
 #ifdef CONFIG_AUTO_COMPLETE
 #define U_BOOT_SUBCMDS_COMPLETE(_cmdname)				\
-	static int complete_##_cmdname(int argc, char * const argv[],	\
+	static int complete_##_cmdname(int argc, char *const argv[],	\
 				       char last_char, int maxv,	\
 				       char *cmdv[])			\
 	{								\
@@ -294,7 +305,7 @@ int run_command_list(const char *cmd, int len, int flag);
 #endif
 
 #define U_BOOT_SUBCMDS(_cmdname, ...)					\
-	static cmd_tbl_t _cmdname##_subcmds[] = { __VA_ARGS__ };	\
+	static struct cmd_tbl _cmdname##_subcmds[] = { __VA_ARGS__ };	\
 	U_BOOT_SUBCMDS_RELOC(_cmdname)					\
 	U_BOOT_SUBCMDS_DO_CMD(_cmdname)					\
 	U_BOOT_SUBCMDS_COMPLETE(_cmdname)
@@ -312,18 +323,18 @@ int run_command_list(const char *cmd, int len, int flag);
 		 _cmd, _usage, _CMD_HELP(_help) _CMD_COMPLETE(_comp) }
 
 #define U_BOOT_CMD_COMPLETE(_name, _maxargs, _rep, _cmd, _usage, _help, _comp) \
-	ll_entry_declare(cmd_tbl_t, _name, cmd) =			\
+	ll_entry_declare(struct cmd_tbl, _name, cmd) =			\
 		U_BOOT_CMD_MKENT_COMPLETE(_name, _maxargs, _rep, _cmd,	\
 						_usage, _help, _comp);
 
 #define U_BOOT_CMDREP_COMPLETE(_name, _maxargs, _cmd_rep, _usage,	\
 			       _help, _comp)				\
-	ll_entry_declare(cmd_tbl_t, _name, cmd) =			\
+	ll_entry_declare(struct cmd_tbl, _name, cmd) =			\
 		U_BOOT_CMDREP_MKENT_COMPLETE(_name, _maxargs, _cmd_rep,	\
 					     _usage, _help, _comp)
 
 #else
-#define U_BOOT_SUBCMD_START(name)	static cmd_tbl_t name[] = {};
+#define U_BOOT_SUBCMD_START(name)	static struct cmd_tbl name[] = {};
 #define U_BOOT_SUBCMD_END
 
 #define _CMD_REMOVE(_name, _cmd)					\
diff --git a/include/cpu_func.h b/include/cpu_func.h
index f701f02bfe..8aa825daa4 100644
--- a/include/cpu_func.h
+++ b/include/cpu_func.h
@@ -18,7 +18,7 @@
 int cpu_status(u32 nr);
 int cpu_reset(u32 nr);
 int cpu_disable(u32 nr);
-int cpu_release(u32 nr, int argc, char * const argv[]);
+int cpu_release(u32 nr, int argc, char *const argv[]);
 
 static inline int cpumask_next(int cpu, unsigned int mask)
 {
diff --git a/include/exception.h b/include/exception.h
index fc02490223..a7f21e73d7 100644
--- a/include/exception.h
+++ b/include/exception.h
@@ -5,10 +5,12 @@
  * Copyright (c) 2018, Heinrich Schuchardt <xypron.glpk@gmx.de>
  */
 
-static int do_exception(cmd_tbl_t *cmdtp, int flag, int argc,
-			char * const argv[])
+#include <command.h>
+
+static int do_exception(struct cmd_tbl *cmdtp, int flag, int argc,
+			char *const argv[])
 {
-	cmd_tbl_t *cp;
+	struct cmd_tbl *cp;
 
 	if (argc != 2)
 		return CMD_RET_USAGE;
@@ -25,12 +27,12 @@ static int do_exception(cmd_tbl_t *cmdtp, int flag, int argc,
 	return CMD_RET_USAGE;
 }
 
-static int exception_complete(int argc, char * const argv[], char last_char,
+static int exception_complete(int argc, char *const argv[], char last_char,
 			      int maxv, char *cmdv[])
 {
 	int len = 0;
 	int i = 0;
-	cmd_tbl_t *cmdtp;
+	struct cmd_tbl *cmdtp;
 
 	switch (argc) {
 	case 1:
diff --git a/include/exports.h b/include/exports.h
index cbd16fc518..85f9a7a708 100644
--- a/include/exports.h
+++ b/include/exports.h
@@ -11,6 +11,7 @@
 
 #include <irq_func.h>
 
+struct cmd_tbl;
 struct spi_slave;
 
 /* Set up the jump table for use by the API */
diff --git a/include/ext_common.h b/include/ext_common.h
index 1c10c50474..bc3324172a 100644
--- a/include/ext_common.h
+++ b/include/ext_common.h
@@ -19,7 +19,9 @@
 
 #ifndef __EXT_COMMON__
 #define __EXT_COMMON__
-#include <command.h>
+
+struct cmd_tbl;
+
 #define SECTOR_SIZE		0x200
 #define LOG2_SECTOR_SIZE	9
 
@@ -210,11 +212,11 @@ struct ext2_data {
 
 extern lbaint_t part_offset;
 
-int do_ext2ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
-int do_ext2load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
-int do_ext4_load(cmd_tbl_t *cmdtp, int flag, int argc,
-					char *const argv[]);
-int do_ext4_ls(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]);
-int do_ext4_write(cmd_tbl_t *cmdtp, int flag, int argc,
-				char *const argv[]);
+int do_ext2ls(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
+int do_ext2load(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
+int do_ext4_load(struct cmd_tbl *cmdtp, int flag, int argc,
+		 char *const argv[]);
+int do_ext4_ls(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
+int do_ext4_write(struct cmd_tbl *cmdtp, int flag, int argc,
+		  char *const argv[]);
 #endif
diff --git a/include/fs.h b/include/fs.h
index 9fdb4a3424..29f737b8c2 100644
--- a/include/fs.h
+++ b/include/fs.h
@@ -7,6 +7,8 @@
 
 #include <common.h>
 
+struct cmd_tbl;
+
 #define FS_TYPE_ANY	0
 #define FS_TYPE_FAT	1
 #define FS_TYPE_EXT	2
@@ -25,7 +27,8 @@ struct blk_desc;
  * @argv: List of arguments
  * @return result (see enum command_ret_t)
  */
-int do_fat_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]);
+int do_fat_fsload(struct cmd_tbl *cmdtp, int flag, int argc,
+		  char *const argv[]);
 
 /**
  * do_ext2load - Run the ext2load command
@@ -36,7 +39,7 @@ int do_fat_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]);
  * @argv: List of arguments
  * @return result (see enum command_ret_t)
  */
-int do_ext2load(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]);
+int do_ext2load(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
 
 /*
  * Tell the fs layer which block device an partition to use for future
@@ -226,34 +229,34 @@ int fs_mkdir(const char *filename);
  * Common implementation for various filesystem commands, optionally limited
  * to a specific filesystem type via the fstype parameter.
  */
-int do_size(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
-		int fstype);
-int do_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
-		int fstype);
-int do_ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
-		int fstype);
+int do_size(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[],
+	    int fstype);
+int do_load(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[],
+	    int fstype);
+int do_ls(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[],
+	  int fstype);
 int file_exists(const char *dev_type, const char *dev_part, const char *file,
 		int fstype);
-int do_save(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
-		int fstype);
-int do_rm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
-		int fstype);
-int do_mkdir(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
-		int fstype);
-int do_ln(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
+int do_save(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[],
+	    int fstype);
+int do_rm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[],
+	  int fstype);
+int do_mkdir(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[],
+	     int fstype);
+int do_ln(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[],
 	  int fstype);
 
 /*
  * Determine the UUID of the specified filesystem and print it. Optionally it is
  * possible to store the UUID directly in env.
  */
-int do_fs_uuid(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
-		int fstype);
+int do_fs_uuid(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[],
+	       int fstype);
 
 /*
  * Determine the type of the specified filesystem and print it. Optionally it is
  * possible to store the type directly in env.
  */
-int do_fs_type(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+int do_fs_type(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
 
 #endif /* _FS_H */
diff --git a/include/fsl_ddr.h b/include/fsl_ddr.h
index 2476f40c56..025d7a1e74 100644
--- a/include/fsl_ddr.h
+++ b/include/fsl_ddr.h
@@ -12,6 +12,8 @@
 
 #include <common_timing_params.h>
 
+struct cmd_tbl;
+
 #ifndef CONFIG_SYS_FSL_DDR_MAIN_NUM_CTRLS
 /* All controllers are for main memory */
 #define CONFIG_SYS_FSL_DDR_MAIN_NUM_CTRLS	CONFIG_SYS_NUM_DDR_CTLRS
@@ -120,7 +122,7 @@ unsigned long long fsl_ddr_interactive(fsl_ddr_info_t *pinfo, int var_is_set);
 void fsl_ddr_get_spd(generic_spd_eeprom_t *ctrl_dimms_spd,
 		     unsigned int ctrl_num, unsigned int dimm_slots_per_ctrl);
 
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
 unsigned int check_fsl_memctl_config_regs(const fsl_ddr_cfg_regs_t *ddr);
 void board_add_ram_info(int use_default);
 
diff --git a/include/fsl_validate.h b/include/fsl_validate.h
index 06951fccf4..252d499e7b 100644
--- a/include/fsl_validate.h
+++ b/include/fsl_validate.h
@@ -8,9 +8,10 @@
 
 #include <fsl_sec.h>
 #include <fsl_sec_mon.h>
-#include <command.h>
 #include <linux/types.h>
 
+struct cmd_tbl;
+
 #define WORD_SIZE 4
 
 /* Minimum and maximum size of RSA signature length in bits */
@@ -261,15 +262,14 @@ struct fsl_secboot_img_priv {
 	uint32_t img_size;	/* ESBC Image Size */
 };
 
-int do_esbc_halt(cmd_tbl_t *cmdtp, int flag, int argc,
-				char * const argv[]);
+int do_esbc_halt(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
 
 int fsl_secboot_validate(uintptr_t haddr, char *arg_hash_str,
 	uintptr_t *img_addr_ptr);
-int fsl_secboot_blob_encap(cmd_tbl_t *cmdtp, int flag, int argc,
-	char * const argv[]);
-int fsl_secboot_blob_decap(cmd_tbl_t *cmdtp, int flag, int argc,
-	char * const argv[]);
+int fsl_secboot_blob_encap(struct cmd_tbl *cmdtp, int flag, int argc,
+			   char *const argv[]);
+int fsl_secboot_blob_decap(struct cmd_tbl *cmdtp, int flag, int argc,
+			   char *const argv[]);
 
 int fsl_check_boot_mode_secure(void);
 int fsl_setenv_chain_of_trust(void);
diff --git a/include/hash.h b/include/hash.h
index f4019a9791..835962e7f6 100644
--- a/include/hash.h
+++ b/include/hash.h
@@ -6,6 +6,8 @@
 #ifndef _HASH_H
 #define _HASH_H
 
+struct cmd_tbl;
+
 /*
  * Maximum digest size for all algorithms we support. Having this value
  * avoids a malloc() or C99 local declaration in common/cmd_hash.c.
@@ -85,8 +87,8 @@ struct hash_algo {
  * @argc:		Number of arguments (arg 0 must be the command text)
  * @argv:		Arguments
  */
-int hash_command(const char *algo_name, int flags, cmd_tbl_t *cmdtp, int flag,
-		 int argc, char * const argv[]);
+int hash_command(const char *algo_name, int flags, struct cmd_tbl *cmdtp,
+		 int flag, int argc, char *const argv[]);
 
 /**
  * hash_block() - Hash a block according to the requested algorithm
diff --git a/include/image.h b/include/image.h
index de55b2fb57..ad81dad444 100644
--- a/include/image.h
+++ b/include/image.h
@@ -590,10 +590,10 @@ ulong genimg_get_kernel_addr(char * const img_addr);
 int genimg_get_format(const void *img_addr);
 int genimg_has_config(bootm_headers_t *images);
 
-int boot_get_fpga(int argc, char * const argv[], bootm_headers_t *images,
-		uint8_t arch, const ulong *ld_start, ulong * const ld_len);
-int boot_get_ramdisk(int argc, char * const argv[], bootm_headers_t *images,
-		uint8_t arch, ulong *rd_start, ulong *rd_end);
+int boot_get_fpga(int argc, char *const argv[], bootm_headers_t *images,
+		  uint8_t arch, const ulong *ld_start, ulong * const ld_len);
+int boot_get_ramdisk(int argc, char *const argv[], bootm_headers_t *images,
+		     uint8_t arch, ulong *rd_start, ulong *rd_end);
 
 /**
  * boot_get_loadable - routine to load a list of binaries to memory
@@ -616,8 +616,8 @@ int boot_get_ramdisk(int argc, char * const argv[], bootm_headers_t *images,
  *     0, if only valid images or no images are found
  *     error code, if an error occurs during fit_image_load
  */
-int boot_get_loadable(int argc, char * const argv[], bootm_headers_t *images,
-		uint8_t arch, const ulong *ld_start, ulong * const ld_len);
+int boot_get_loadable(int argc, char *const argv[], bootm_headers_t *images,
+		      uint8_t arch, const ulong *ld_start, ulong *const ld_len);
 #endif /* !USE_HOSTCC */
 
 int boot_get_setup_fit(bootm_headers_t *images, uint8_t arch,
@@ -726,7 +726,7 @@ int image_source_script(ulong addr, const char *fit_uname);
 int fit_get_node_from_config(bootm_headers_t *images, const char *prop_name,
 			ulong addr);
 
-int boot_get_fdt(int flag, int argc, char * const argv[], uint8_t arch,
+int boot_get_fdt(int flag, int argc, char *const argv[], uint8_t arch,
 		 bootm_headers_t *images,
 		 char **of_flat_tree, ulong *of_size);
 void boot_fdt_add_mem_rsv_regions(struct lmb *lmb, void *fdt_blob);
diff --git a/include/kgdb.h b/include/kgdb.h
index b6ba742ad3..616ce4451f 100644
--- a/include/kgdb.h
+++ b/include/kgdb.h
@@ -55,7 +55,7 @@ extern int kgdb_getregs(struct pt_regs *, char *, int);
 extern void kgdb_putreg(struct pt_regs *, int, char *, int);
 extern void kgdb_putregs(struct pt_regs *, char *, int);
 extern int kgdb_trap(struct pt_regs *);
-extern void kgdb_breakpoint(int argc, char * const argv[]);
+void kgdb_breakpoint(int argc, char *const argv[]);
 
 /* these functions are provided by the platform serial driver */
 extern void kgdb_serial_init(void);
diff --git a/include/log.h b/include/log.h
index ffc739b560..df65398c04 100644
--- a/include/log.h
+++ b/include/log.h
@@ -10,10 +10,12 @@
 #define __LOG_H
 
 #include <stdio.h>
-#include <command.h>
+#include <linker_lists.h>
 #include <dm/uclass-id.h>
 #include <linux/list.h>
 
+struct cmd_tbl;
+
 /** Log levels supported, ranging from most to least important */
 enum log_level_t {
 	LOGL_EMERG = 0,		/* U-Boot is unstable */
@@ -414,7 +416,7 @@ enum log_fmt {
 };
 
 /* Handle the 'log test' command */
-int do_log_test(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]);
+int do_log_test(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
 
 /**
  * log_add_filter() - Add a new filter to a log device
diff --git a/include/net.h b/include/net.h
index 3ef212dd00..00a8ec0c78 100644
--- a/include/net.h
+++ b/include/net.h
@@ -22,7 +22,7 @@
 #include <rand.h>
 
 struct bd_info;
-struct cmd_tbl_s;
+struct cmd_tbl;
 struct udevice;
 
 #define DEBUG_LL_STATE 0	/* Link local state machine changes */
@@ -66,7 +66,7 @@ struct in_addr {
  * @argv: List of arguments
  * @return result (see enum command_ret_t)
  */
-int do_tftpb(struct cmd_tbl_s *cmdtp, int flag, int argc, char *const argv[]);
+int do_tftpb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
 
 /**
  * An incoming packet handler.
diff --git a/include/search.h b/include/search.h
index 8f87dc72ce..bca36d3abc 100644
--- a/include/search.h
+++ b/include/search.h
@@ -84,7 +84,7 @@ int hmatch_r(const char *match, int last_idx, struct env_entry **retval,
 int hdelete_r(const char *key, struct hsearch_data *htab, int flag);
 
 ssize_t hexport_r(struct hsearch_data *htab, const char sep, int flag,
-		  char **resp, size_t size, int argc, char * const argv[]);
+		  char **resp, size_t size, int argc, char *const argv[]);
 
 /*
  * nvars: length of vars array
diff --git a/include/test/suites.h b/include/test/suites.h
index 213e3cee77..f120b3a82a 100644
--- a/include/test/suites.h
+++ b/include/test/suites.h
@@ -7,6 +7,7 @@
 #ifndef __TEST_SUITES_H__
 #define __TEST_SUITES_H__
 
+struct cmd_tbl;
 struct unit_test;
 
 /**
@@ -23,18 +24,22 @@ struct unit_test;
  */
 int cmd_ut_category(const char *name, const char *prefix,
 		    struct unit_test *tests, int n_ents,
-		    int argc, char * const argv[]);
+		    int argc, char *const argv[]);
 
-int do_ut_bloblist(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]);
-int do_ut_compression(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]);
-int do_ut_dm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
-int do_ut_env(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
-int do_ut_lib(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
-int do_ut_log(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
-int do_ut_optee(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
-int do_ut_overlay(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
-int do_ut_str(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]);
-int do_ut_time(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
-int do_ut_unicode(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+int do_ut_bloblist(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[]);
+int do_ut_compression(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[]);
+int do_ut_dm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
+int do_ut_env(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
+int do_ut_lib(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
+int do_ut_log(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[]);
+int do_ut_optee(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
+int do_ut_overlay(struct cmd_tbl *cmdtp, int flag, int argc,
+		  char *const argv[]);
+int do_ut_str(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
+int do_ut_time(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
+int do_ut_unicode(struct cmd_tbl *cmdtp, int flag, int argc,
+		  char *const argv[]);
 
 #endif /* __TEST_SUITES_H__ */
diff --git a/include/test/ut.h b/include/test/ut.h
index b05d719ed0..7ddd6e8872 100644
--- a/include/test/ut.h
+++ b/include/test/ut.h
@@ -8,6 +8,7 @@
 #ifndef __TEST_UT_H
 #define __TEST_UT_H
 
+#include <command.h>
 #include <hexdump.h>
 #include <linux/err.h>
 
diff --git a/include/tpm-common.h b/include/tpm-common.h
index 702cd6e93b..e29b10b176 100644
--- a/include/tpm-common.h
+++ b/include/tpm-common.h
@@ -7,6 +7,8 @@
 #ifndef __TPM_COMMON_H
 #define __TPM_COMMON_H
 
+#include <command.h>
+
 enum tpm_duration {
 	TPM_SHORT = 0,
 	TPM_MEDIUM = 1,
@@ -173,8 +175,8 @@ struct tpm_ops {
 	U_BOOT_CMD_MKENT(cmd, 0, 1, do_tpm_ ## cmd, "", "")
 
 #define TPM_COMMAND_NO_ARG(cmd)				\
-int do_##cmd(cmd_tbl_t *cmdtp, int flag,		\
-	     int argc, char * const argv[])		\
+int do_##cmd(struct cmd_tbl *cmdtp, int flag,		\
+	     int argc, char *const argv[])		\
 {							\
 	struct udevice *dev;				\
 	int rc;						\
@@ -263,20 +265,20 @@ int tpm_init(struct udevice *dev);
 /**
  * Retrieve the array containing all the v1 (resp. v2) commands.
  *
- * @return a cmd_tbl_t array.
+ * @return a struct cmd_tbl array.
  */
 #if defined(CONFIG_TPM_V1)
-cmd_tbl_t *get_tpm1_commands(unsigned int *size);
+struct cmd_tbl *get_tpm1_commands(unsigned int *size);
 #else
-static inline cmd_tbl_t *get_tpm1_commands(unsigned int *size)
+static inline struct cmd_tbl *get_tpm1_commands(unsigned int *size)
 {
 	return NULL;
 }
 #endif
 #if defined(CONFIG_TPM_V2)
-cmd_tbl_t *get_tpm2_commands(unsigned int *size);
+struct cmd_tbl *get_tpm2_commands(unsigned int *size);
 #else
-static inline cmd_tbl_t *get_tpm2_commands(unsigned int *size)
+static inline struct cmd_tbl *get_tpm2_commands(unsigned int *size)
 {
 	return NULL;
 }
diff --git a/include/vxworks.h b/include/vxworks.h
index 10c5e116d5..c2585e61ce 100644
--- a/include/vxworks.h
+++ b/include/vxworks.h
@@ -10,6 +10,7 @@
 #include <efi_api.h>
 
 struct bootm_headers;
+struct cmd_tbl;
 
 /* Use Linux compatible standard DTB */
 #define VXWORKS_SYSFLG_STD_DTB	0x1
@@ -85,7 +86,7 @@ struct efi_gop_info {
 	u32 fb_size;			/* framebuffer size */
 };
 
-int do_bootvx(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+int do_bootvx(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
 void boot_prep_vxworks(struct bootm_headers *images);
 void boot_jump_vxworks(struct bootm_headers *images);
 
diff --git a/lib/dhry/cmd_dhry.c b/lib/dhry/cmd_dhry.c
index 29504833ef..d55ab54df9 100644
--- a/lib/dhry/cmd_dhry.c
+++ b/lib/dhry/cmd_dhry.c
@@ -8,7 +8,8 @@
 #include <div64.h>
 #include "dhry.h"
 
-static int do_dhry(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_dhry(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	ulong start, duration, vax_mips;
 	u64 dhry_per_sec;
diff --git a/lib/efi_loader/efi_variable.c b/lib/efi_loader/efi_variable.c
index b58963fa1d..c357ebe7d0 100644
--- a/lib/efi_loader/efi_variable.c
+++ b/lib/efi_loader/efi_variable.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <efi_loader.h>
+#include <env.h>
 #include <env_internal.h>
 #include <hexdump.h>
 #include <malloc.h>
diff --git a/lib/fdtdec_test.c b/lib/fdtdec_test.c
index e8bfd1fb1e..e0c6e0971c 100644
--- a/lib/fdtdec_test.c
+++ b/lib/fdtdec_test.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <fdtdec.h>
 #include <linux/libfdt.h>
 #include <malloc.h>
@@ -297,8 +298,8 @@ static int check_carveout(void)
 	return 0;
 }
 
-static int do_test_fdtdec(cmd_tbl_t *cmdtp, int flag, int argc,
-			  char * const argv[])
+static int do_test_fdtdec(struct cmd_tbl *cmdtp, int flag, int argc,
+			  char *const argv[])
 {
 	/* basic tests */
 	CHECKOK(run_test("", "", ""));
diff --git a/lib/hashtable.c b/lib/hashtable.c
index f82f2463cf..e3be563565 100644
--- a/lib/hashtable.c
+++ b/lib/hashtable.c
@@ -605,7 +605,7 @@ static int match_entry(struct env_entry *ep, int flag, int argc,
 
 ssize_t hexport_r(struct hsearch_data *htab, const char sep, int flag,
 		 char **resp, size_t size,
-		 int argc, char * const argv[])
+		 int argc, char *const argv[])
 {
 	struct env_entry *list[htab->size];
 	char *res, *p;
diff --git a/lib/uuid.c b/lib/uuid.c
index f94c6abd29..e62d5ca264 100644
--- a/lib/uuid.c
+++ b/lib/uuid.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <env.h>
 #include <rand.h>
 #include <time.h>
@@ -286,7 +287,7 @@ void gen_rand_uuid_str(char *uuid_str, int str_format)
 }
 
 #if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_CMD_UUID)
-int do_uuid(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_uuid(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	char uuid[UUID_STR_LEN + 1];
 	int str_format;
diff --git a/net/arp.c b/net/arp.c
index 4b12b699d0..8fc744d932 100644
--- a/net/arp.c
+++ b/net/arp.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <env.h>
 #include <net.h>
 
 #include "arp.h"
diff --git a/net/fastboot.c b/net/fastboot.c
index 8afc5529cd..0c57fb9947 100644
--- a/net/fastboot.c
+++ b/net/fastboot.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <fastboot.h>
 #include <net.h>
 #include <net/fastboot.h>
diff --git a/test/bloblist.c b/test/bloblist.c
index bdcca0291c..4e537ee1b9 100644
--- a/test/bloblist.c
+++ b/test/bloblist.c
@@ -234,7 +234,8 @@ static int bloblist_test_checksum(struct unit_test_state *uts)
 
 BLOBLIST_TEST(bloblist_test_checksum, 0);
 
-int do_ut_bloblist(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_ut_bloblist(struct cmd_tbl *cmdtp, int flag, int argc,
+		   char *const argv[])
 {
 	struct unit_test *tests = ll_entry_start(struct unit_test,
 						 bloblist_test);
diff --git a/test/cmd_ut.c b/test/cmd_ut.c
index bd20a69c55..cc9543c315 100644
--- a/test/cmd_ut.c
+++ b/test/cmd_ut.c
@@ -9,11 +9,12 @@
 #include <test/suites.h>
 #include <test/test.h>
 
-static int do_ut_all(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+static int do_ut_all(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[]);
 
 int cmd_ut_category(const char *name, const char *prefix,
 		    struct unit_test *tests, int n_ents,
-		    int argc, char * const argv[])
+		    int argc, char *const argv[])
 {
 	struct unit_test_state uts = { .fail_count = 0 };
 	struct unit_test *test;
@@ -43,7 +44,7 @@ int cmd_ut_category(const char *name, const char *prefix,
 	return uts.fail_count ? CMD_RET_FAILURE : 0;
 }
 
-static cmd_tbl_t cmd_ut_sub[] = {
+static struct cmd_tbl cmd_ut_sub[] = {
 	U_BOOT_CMD_MKENT(all, CONFIG_SYS_MAXARGS, 1, do_ut_all, "", ""),
 #if defined(CONFIG_UT_DM)
 	U_BOOT_CMD_MKENT(dm, CONFIG_SYS_MAXARGS, 1, do_ut_dm, "", ""),
@@ -79,7 +80,8 @@ static cmd_tbl_t cmd_ut_sub[] = {
 #endif
 };
 
-static int do_ut_all(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_ut_all(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	int i;
 	int retval;
@@ -95,9 +97,9 @@ static int do_ut_all(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return any_fail;
 }
 
-static int do_ut(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_ut(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
-	cmd_tbl_t *cp;
+	struct cmd_tbl *cp;
 
 	if (argc < 2)
 		return CMD_RET_USAGE;
diff --git a/test/command_ut.c b/test/command_ut.c
index 8e268e5ee5..d6e6777bd4 100644
--- a/test/command_ut.c
+++ b/test/command_ut.c
@@ -7,12 +7,14 @@
 
 #include <common.h>
 #include <command.h>
+#include <env.h>
 
 static const char test_cmd[] = "setenv list 1\n setenv list ${list}2; "
 		"setenv list ${list}3\0"
 		"setenv list ${list}4";
 
-static int do_ut_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_ut_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
+		     char *const argv[])
 {
 	printf("%s: Testing commands\n", __func__);
 	run_command("env default -f -a", 0);
diff --git a/test/compression.c b/test/compression.c
index bceb2c273c..0b57b7bb40 100644
--- a/test/compression.c
+++ b/test/compression.c
@@ -535,7 +535,8 @@ static int compression_test_bootm_none(struct unit_test_state *uts)
 }
 COMPRESSION_TEST(compression_test_bootm_none, 0);
 
-int do_ut_compression(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_ut_compression(struct cmd_tbl *cmdtp, int flag, int argc,
+		      char *const argv[])
 {
 	struct unit_test *tests = ll_entry_start(struct unit_test,
 						 compression_test);
diff --git a/test/dm/test-main.c b/test/dm/test-main.c
index d7dc8d1f91..62a0c692c8 100644
--- a/test/dm/test-main.c
+++ b/test/dm/test-main.c
@@ -200,7 +200,7 @@ static int dm_test_main(const char *test_name)
 	return uts->fail_count ? CMD_RET_FAILURE : 0;
 }
 
-int do_ut_dm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_ut_dm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	const char *test_name = NULL;
 
diff --git a/test/env/cmd_ut_env.c b/test/env/cmd_ut_env.c
index ad67dbe792..a440b1bfb0 100644
--- a/test/env/cmd_ut_env.c
+++ b/test/env/cmd_ut_env.c
@@ -10,7 +10,7 @@
 #include <test/suites.h>
 #include <test/ut.h>
 
-int do_ut_env(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_ut_env(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	struct unit_test *tests = ll_entry_start(struct unit_test, env_test);
 	const int n_ents = ll_entry_count(struct unit_test, env_test);
diff --git a/test/lib/cmd_ut_lib.c b/test/lib/cmd_ut_lib.c
index c73e8d7b05..f5c7bf3d3b 100644
--- a/test/lib/cmd_ut_lib.c
+++ b/test/lib/cmd_ut_lib.c
@@ -11,7 +11,7 @@
 #include <test/suites.h>
 #include <test/ut.h>
 
-int do_ut_lib(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_ut_lib(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	struct unit_test *tests = ll_entry_start(struct unit_test, lib_test);
 	const int n_ents = ll_entry_count(struct unit_test, lib_test);
diff --git a/test/log/log_test.c b/test/log/log_test.c
index febc2c1252..d29b559410 100644
--- a/test/log/log_test.c
+++ b/test/log/log_test.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 
 /* emit some sample log records in different ways, for testing */
 static int log_run(enum uclass_id cat, const char *file)
@@ -200,7 +201,7 @@ static int log_test(int testnum)
 }
 
 #ifdef CONFIG_LOG_TEST
-int do_log_test(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_log_test(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int testnum = 0;
 	int ret;
diff --git a/test/log/test-main.c b/test/log/test-main.c
index 855de47f33..faf920d8e9 100644
--- a/test/log/test-main.c
+++ b/test/log/test-main.c
@@ -10,7 +10,7 @@
 #include <test/log.h>
 #include <test/suites.h>
 
-int do_ut_log(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_ut_log(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[])
 {
 	struct unit_test *tests = ll_entry_start(struct unit_test, log_test);
 	const int n_ents = ll_entry_count(struct unit_test, log_test);
diff --git a/test/optee/cmd_ut_optee.c b/test/optee/cmd_ut_optee.c
index 092710326a..01f829756f 100644
--- a/test/optee/cmd_ut_optee.c
+++ b/test/optee/cmd_ut_optee.c
@@ -91,7 +91,7 @@ static int optee_fdt_protected_memory(struct unit_test_state *uts)
 }
 OPTEE_TEST(optee_fdt_protected_memory, 0);
 
-int do_ut_optee(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_ut_optee(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	struct unit_test *tests = ll_entry_start(struct unit_test,
 						 optee_test);
diff --git a/test/overlay/cmd_ut_overlay.c b/test/overlay/cmd_ut_overlay.c
index c8d41a4dca..da05079596 100644
--- a/test/overlay/cmd_ut_overlay.c
+++ b/test/overlay/cmd_ut_overlay.c
@@ -210,7 +210,7 @@ static int fdt_overlay_stacked(struct unit_test_state *uts)
 }
 OVERLAY_TEST(fdt_overlay_stacked, 0);
 
-int do_ut_overlay(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_ut_overlay(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	struct unit_test *tests = ll_entry_start(struct unit_test,
 						 overlay_test);
diff --git a/test/print_ut.c b/test/print_ut.c
index a3b9974ad2..1cc2a7b8f1 100644
--- a/test/print_ut.c
+++ b/test/print_ut.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #if CONFIG_IS_ENABLED(EFI_LOADER) && !defined(API_BUILD)
+#include <command.h>
 #include <efi_api.h>
 #endif
 #include <display_options.h>
@@ -68,7 +69,7 @@ static void efi_ut_print(void)
 #endif
 }
 
-static int do_ut_print(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_ut_print(struct cmd_tbl *cmdtp, int flag, int argc,
 		       char *const argv[])
 {
 	char big_str[400];
diff --git a/test/str_ut.c b/test/str_ut.c
index 7c8015050a..ef1205dbbd 100644
--- a/test/str_ut.c
+++ b/test/str_ut.c
@@ -105,7 +105,7 @@ static int str_simple_strtoul(struct unit_test_state *uts)
 }
 STR_TEST(str_simple_strtoul, 0);
 
-int do_ut_str(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_ut_str(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	struct unit_test *tests = ll_entry_start(struct unit_test,
 						 str_test);
diff --git a/test/time_ut.c b/test/time_ut.c
index 40a19a50d9..70a866b441 100644
--- a/test/time_ut.c
+++ b/test/time_ut.c
@@ -117,7 +117,7 @@ static int test_udelay(void)
 	return 0;
 }
 
-int do_ut_time(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_ut_time(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	int ret = 0;
 
diff --git a/test/unicode_ut.c b/test/unicode_ut.c
index 4d99c20bc0..9939480ed9 100644
--- a/test/unicode_ut.c
+++ b/test/unicode_ut.c
@@ -581,7 +581,7 @@ static int unicode_test_u16_strncmp(struct unit_test_state *uts)
 }
 UNICODE_TEST(unicode_test_u16_strncmp);
 
-int do_ut_unicode(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_ut_unicode(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
 	struct unit_test *tests = ll_entry_start(struct unit_test, unicode_test);
 	const int n_ents = ll_entry_count(struct unit_test, unicode_test);
diff --git a/tools/proftool.c b/tools/proftool.c
index fecb9d6e99..ea7d07a277 100644
--- a/tools/proftool.c
+++ b/tools/proftool.c
@@ -532,7 +532,7 @@ static int make_ftrace(void)
 	return 0;
 }
 
-static int prof_tool(int argc, char * const argv[],
+static int prof_tool(int argc, char *const argv[],
 		     const char *prof_fname, const char *map_fname,
 		     const char *trace_config_fname)
 {
-- 
2.26.2.645.ge9eca65c58-goog

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH v3 13/22] Fix some checkpatch warnings in calls to debug()
  2020-05-10 17:39 [PATCH v3 00/22] common: Further reduce the size of common.h Simon Glass
                   ` (11 preceding siblings ...)
  2020-05-10 17:40 ` [PATCH v3 12/22] command: Remove the cmd_tbl_t typedef Simon Glass
@ 2020-05-10 17:40 ` Simon Glass
  2020-05-19 17:33   ` Tom Rini
  2020-05-10 17:40 ` [PATCH v3 14/22] common: Drop log.h from common header Simon Glass
                   ` (9 subsequent siblings)
  22 siblings, 1 reply; 53+ messages in thread
From: Simon Glass @ 2020-05-10 17:40 UTC (permalink / raw)
  To: u-boot

Fix up some incorrect code style in calls to functions in the log.h
header, mostly debug().

Signed-off-by: Simon Glass <sjg@chromium.org>

---

Changes in v3: None
Changes in v2:
- Split out code-style changes for log functions into a new patch

 arch/powerpc/lib/bootm.c                | 10 +++++-----
 board/freescale/mpc8568mds/mpc8568mds.c |  2 +-
 board/sbc8641d/sbc8641d.c               |  2 +-
 cmd/flash.c                             | 19 +++++++++----------
 cmd/source.c                            | 10 +++++-----
 common/flash.c                          |  6 +++---
 drivers/rtc/m41t11.c                    | 12 ++++++------
 7 files changed, 30 insertions(+), 31 deletions(-)

diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c
index 59062ca654..a9bcb6614f 100644
--- a/arch/powerpc/lib/bootm.c
+++ b/arch/powerpc/lib/bootm.c
@@ -53,8 +53,8 @@ static void boot_jump_linux(bootm_headers_t *images)
 
 	kernel = (void (*)(bd_t *, ulong, ulong, ulong,
 			   ulong, ulong, ulong))images->ep;
-	debug ("## Transferring control to Linux (at address %08lx) ...\n",
-		(ulong)kernel);
+	debug("## Transferring control to Linux (at address %08lx) ...\n",
+	      (ulong)kernel);
 
 	bootstage_mark(BOOTSTAGE_ID_RUN_OS);
 
@@ -81,7 +81,7 @@ static void boot_jump_linux(bootm_headers_t *images)
 		 *   r8: 0
 		 *   r9: 0
 		 */
-		debug ("   Booting using OF flat tree...\n");
+		debug("   Booting using OF flat tree...\n");
 		WATCHDOG_RESET ();
 		(*kernel) ((bd_t *)of_flat_tree, 0, 0, EPAPR_MAGIC,
 			   env_get_bootm_mapsize(), 0, 0);
@@ -105,7 +105,7 @@ static void boot_jump_linux(bootm_headers_t *images)
 		ulong initrd_end = images->initrd_end;
 		bd_t *kbd = images->kbd;
 
-		debug ("   Booting using board info...\n");
+		debug("   Booting using board info...\n");
 		WATCHDOG_RESET ();
 		(*kernel) (kbd, initrd_start, initrd_end,
 			   cmd_start, cmd_end, 0, 0);
@@ -149,7 +149,7 @@ void arch_lmb_reserve(struct lmb *lmb)
 	 * pointer.
 	 */
 	sp = get_sp();
-	debug ("## Current stack ends at 0x%08lx\n", sp);
+	debug("## Current stack ends at 0x%08lx\n", sp);
 
 	/* adjust sp by 4K to be safe */
 	sp -= 4096;
diff --git a/board/freescale/mpc8568mds/mpc8568mds.c b/board/freescale/mpc8568mds/mpc8568mds.c
index da97495664..3e804c85c4 100644
--- a/board/freescale/mpc8568mds/mpc8568mds.c
+++ b/board/freescale/mpc8568mds/mpc8568mds.c
@@ -303,7 +303,7 @@ void pci_init_board(void)
 	porpllsr = in_be32(&gur->porpllsr);
 	io_sel = (pordevsr & MPC85xx_PORDEVSR_IO_SEL) >> 19;
 
-	debug ("   pci_init_board: devdisr=%x, io_sel=%x\n", devdisr, io_sel);
+	debug("   %s: devdisr=%x, io_sel=%x\n", __func__, devdisr, io_sel);
 
 	pci_speed = 66666000;
 	pci_32 = 1;
diff --git a/board/sbc8641d/sbc8641d.c b/board/sbc8641d/sbc8641d.c
index d053eaeec3..4163fd2ccf 100644
--- a/board/sbc8641d/sbc8641d.c
+++ b/board/sbc8641d/sbc8641d.c
@@ -49,7 +49,7 @@ int dram_init(void)
 	dram_size = fixed_sdram ();
 #endif
 
-	debug ("    DDR: ");
+	debug("    DDR: ");
 	gd->ram_size = dram_size;
 
 	return 0;
diff --git a/cmd/flash.c b/cmd/flash.c
index 452b040dbc..77979e4412 100644
--- a/cmd/flash.c
+++ b/cmd/flash.c
@@ -411,13 +411,12 @@ int flash_sect_erase(ulong addr_first, ulong addr_last)
 		     ++bank, ++info) {
 			if (s_first[bank]>=0) {
 				erased += s_last[bank] - s_first[bank] + 1;
-				debug ("Erase Flash from 0x%08lx to 0x%08lx "
-					"in Bank # %ld ",
-					info->start[s_first[bank]],
-					(s_last[bank] == info->sector_count) ?
-						info->start[0] + info->size - 1:
-						info->start[s_last[bank]+1] - 1,
-					bank+1);
+				debug("Erase Flash from 0x%08lx to 0x%08lx in Bank # %ld ",
+				      info->start[s_first[bank]],
+				      (s_last[bank] == info->sector_count) ?
+				      info->start[0] + info->size - 1 :
+				      info->start[s_last[bank] + 1] - 1,
+				      bank + 1);
 				rcode = flash_erase(info, s_first[bank],
 						    s_last[bank]);
 			}
@@ -612,9 +611,9 @@ int flash_sect_protect(int p, ulong addr_first, ulong addr_last)
 			}
 
 			if (s_first[bank]>=0 && s_first[bank]<=s_last[bank]) {
-				debug ("%sProtecting sectors %d..%d in bank %ld\n",
-					p ? "" : "Un-",
-					s_first[bank], s_last[bank], bank+1);
+				debug("%sProtecting sectors %d..%d in bank %ld\n",
+				      p ? "" : "Un-", s_first[bank],
+				      s_last[bank], bank + 1);
 				protected += s_last[bank] - s_first[bank] + 1;
 				for (i=s_first[bank]; i<=s_last[bank]; ++i) {
 #if defined(CONFIG_SYS_FLASH_PROTECTION)
diff --git a/cmd/source.c b/cmd/source.c
index 5b0b79aadb..cd58924eeb 100644
--- a/cmd/source.c
+++ b/cmd/source.c
@@ -154,7 +154,7 @@ int image_source_script(ulong addr, const char *fit_uname)
 		return 1;
 	}
 
-	debug ("** Script length: %ld\n", len);
+	debug("** Script length: %ld\n", len);
 	return run_command_list((char *)data, len, 0);
 }
 
@@ -170,16 +170,16 @@ static int do_source(struct cmd_tbl *cmdtp, int flag, int argc,
 	/* Find script image */
 	if (argc < 2) {
 		addr = CONFIG_SYS_LOAD_ADDR;
-		debug ("*  source: default load address = 0x%08lx\n", addr);
+		debug("*  source: default load address = 0x%08lx\n", addr);
 #if defined(CONFIG_FIT)
 	} else if (fit_parse_subimage(argv[1], image_load_addr, &addr,
 				      &fit_uname)) {
-		debug ("*  source: subimage '%s' from FIT image at 0x%08lx\n",
-				fit_uname, addr);
+		debug("*  source: subimage '%s' from FIT image at 0x%08lx\n",
+		      fit_uname, addr);
 #endif
 	} else {
 		addr = simple_strtoul(argv[1], NULL, 16);
-		debug ("*  source: cmdline image address = 0x%08lx\n", addr);
+		debug("*  source: cmdline image address = 0x%08lx\n", addr);
 	}
 
 	printf ("## Executing script@%08lx\n", addr);
diff --git a/common/flash.c b/common/flash.c
index cde648d4b8..115062a45c 100644
--- a/common/flash.c
+++ b/common/flash.c
@@ -41,7 +41,7 @@ flash_protect(int flag, ulong from, ulong to, flash_info_t *info)
 
 	debug("%s %s: from 0x%08lX to 0x%08lX\n", __func__,
 	      (flag & FLAG_PROTECT_SET) ? "ON" :
-		      (flag & FLAG_PROTECT_CLEAR) ? "OFF" : "???",
+	      (flag & FLAG_PROTECT_CLEAR) ? "OFF" : "???",
 	      from, to);
 
 	/* There is nothing to do if we have no data about the flash
@@ -67,7 +67,7 @@ flash_protect(int flag, ulong from, ulong to, flash_info_t *info)
 #else
 				info->protect[i] = 0;
 #endif	/* CONFIG_SYS_FLASH_PROTECTION */
-				debug ("protect off %d\n", i);
+				debug("protect off %d\n", i);
 			}
 			else if (flag & FLAG_PROTECT_SET) {
 #if defined(CONFIG_SYS_FLASH_PROTECTION)
@@ -75,7 +75,7 @@ flash_protect(int flag, ulong from, ulong to, flash_info_t *info)
 #else
 				info->protect[i] = 1;
 #endif	/* CONFIG_SYS_FLASH_PROTECTION */
-				debug ("protect on %d\n", i);
+				debug("protect on %d\n", i);
 			}
 		}
 	}
diff --git a/drivers/rtc/m41t11.c b/drivers/rtc/m41t11.c
index 960348bb3e..b09d08d65c 100644
--- a/drivers/rtc/m41t11.c
+++ b/drivers/rtc/m41t11.c
@@ -109,9 +109,9 @@ int rtc_get (struct rtc_time *tmp)
 	tmp->tm_yday = 0;
 	tmp->tm_isdst= 0;
 
-	debug ( "Get DATE: %4d-%02d-%02d (wday=%d)  TIME: %2d:%02d:%02d\n",
-		tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday,
-		tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
+	debug("Get DATE: %4d-%02d-%02d (wday=%d)  TIME: %2d:%02d:%02d\n",
+	      tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday,
+	      tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
 
 	return rel;
 }
@@ -120,9 +120,9 @@ int rtc_set (struct rtc_time *tmp)
 {
 	uchar data[RTC_REG_CNT];
 
-	debug ( "Set DATE: %4d-%02d-%02d (wday=%d)  TIME: %2d:%02d:%02d\n",
-		tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday,
-		tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
+	debug("Set DATE: %4d-%02d-%02d (wday=%d)  TIME: %2d:%02d:%02d\n",
+	      tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday,
+	      tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
 
 	data[RTC_SEC_ADDR]    = bin2bcd(tmp->tm_sec) &  0x7F;/*just in case*/
 	data[RTC_MIN_ADDR]    = bin2bcd(tmp->tm_min);
-- 
2.26.2.645.ge9eca65c58-goog

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH v3 14/22] common: Drop log.h from common header
  2020-05-10 17:39 [PATCH v3 00/22] common: Further reduce the size of common.h Simon Glass
                   ` (12 preceding siblings ...)
  2020-05-10 17:40 ` [PATCH v3 13/22] Fix some checkpatch warnings in calls to debug() Simon Glass
@ 2020-05-10 17:40 ` Simon Glass
  2020-05-19 17:33   ` Tom Rini
  2020-05-10 17:40 ` [PATCH v3 15/22] common: Drop asm/ptrace.h " Simon Glass
                   ` (8 subsequent siblings)
  22 siblings, 1 reply; 53+ messages in thread
From: Simon Glass @ 2020-05-10 17:40 UTC (permalink / raw)
  To: u-boot

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v3: None
Changes in v2: None

 api/api_display.c                             |   1 +
 arch/arc/lib/bootm.c                          |   1 +
 arch/arc/lib/relocate.c                       |   1 +
 arch/arm/cpu/arm926ejs/mxs/clock.c            |   1 +
 arch/arm/cpu/arm926ejs/mxs/spl_boot.c         |   1 +
 arch/arm/cpu/arm926ejs/mxs/spl_lradc_init.c   |   1 +
 arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c     |   1 +
 arch/arm/cpu/arm926ejs/mxs/spl_power_init.c   |   1 +
 arch/arm/cpu/armv7/bcm235xx/clk-core.c        |   1 +
 arch/arm/cpu/armv7/bcm281xx/clk-core.c        |   1 +
 arch/arm/cpu/armv7/exception_level.c          |   1 +
 arch/arm/cpu/armv7/ls102xa/soc.c              |   1 +
 arch/arm/cpu/armv7/virt-dt.c                  |   1 +
 arch/arm/cpu/armv7m/cache.c                   |   1 +
 arch/arm/cpu/armv8/cache_v8.c                 |   1 +
 arch/arm/cpu/armv8/exception_level.c          |   1 +
 arch/arm/cpu/armv8/fsl-layerscape/cpu.c       |   1 +
 arch/arm/cpu/armv8/fsl-layerscape/fdt.c       |   1 +
 .../armv8/fsl-layerscape/fsl_lsch2_serdes.c   |   1 +
 .../armv8/fsl-layerscape/fsl_lsch3_serdes.c   |   1 +
 .../arm/cpu/armv8/fsl-layerscape/ls1028_ids.c |   1 +
 arch/arm/cpu/armv8/fsl-layerscape/ppa.c       |   1 +
 arch/arm/cpu/armv8/fsl-layerscape/soc.c       |   1 +
 arch/arm/cpu/armv8/fsl-layerscape/spl.c       |   1 +
 arch/arm/cpu/armv8/hisilicon/pinmux.c         |   1 +
 arch/arm/cpu/armv8/sec_firmware.c             |   1 +
 arch/arm/include/asm/arch-imx8/sci/sci.h      |   1 +
 arch/arm/lib/bootm.c                          |   1 +
 arch/arm/lib/cache-cp15.c                     |   1 +
 arch/arm/lib/cache.c                          |   1 +
 arch/arm/lib/semihosting.c                    |   1 +
 arch/arm/lib/spl.c                            |   1 +
 arch/arm/mach-aspeed/ast2500-board.c          |   1 +
 arch/arm/mach-aspeed/ast2500/sdram_ast2500.c  |   1 +
 arch/arm/mach-at91/arm926ejs/eflash.c         |   1 +
 arch/arm/mach-at91/spl_at91.c                 |   1 +
 arch/arm/mach-at91/spl_atmel.c                |   1 +
 arch/arm/mach-bcm283x/mbox.c                  |   1 +
 arch/arm/mach-davinci/misc.c                  |   1 +
 arch/arm/mach-exynos/clock.c                  |   1 +
 arch/arm/mach-exynos/pinmux.c                 |   1 +
 arch/arm/mach-exynos/spl_boot.c               |   1 +
 arch/arm/mach-imx/cmd_dek.c                   |   1 +
 arch/arm/mach-imx/cmd_nandbcb.c               |   1 +
 arch/arm/mach-imx/cpu.c                       |   1 +
 arch/arm/mach-imx/ddrmc-vf610-calibration.c   |   1 +
 arch/arm/mach-imx/imx8/ahab.c                 |   1 +
 arch/arm/mach-imx/imx8/cpu.c                  |   1 +
 arch/arm/mach-imx/imx8/fdt.c                  |   1 +
 arch/arm/mach-imx/imx8/image.c                |   1 +
 arch/arm/mach-imx/imx8/iomux.c                |   1 +
 arch/arm/mach-imx/imx8/misc.c                 |   1 +
 arch/arm/mach-imx/imx8/parse-container.c      |   1 +
 arch/arm/mach-imx/imx8m/soc.c                 |   1 +
 arch/arm/mach-imx/imx_bootaux.c               |   1 +
 arch/arm/mach-imx/misc.c                      |   1 +
 arch/arm/mach-imx/mx5/clock.c                 |   1 +
 arch/arm/mach-imx/mx6/clock.c                 |   1 +
 arch/arm/mach-imx/mx6/ddr.c                   |   1 +
 arch/arm/mach-imx/mx7/clock.c                 |   1 +
 arch/arm/mach-imx/mx7ulp/iomux.c              |   1 +
 arch/arm/mach-imx/mx7ulp/pcc.c                |   1 +
 arch/arm/mach-imx/mx7ulp/scg.c                |   1 +
 arch/arm/mach-imx/mx7ulp/soc.c                |   1 +
 arch/arm/mach-imx/spl.c                       |   1 +
 arch/arm/mach-imx/spl_imx_romapi.c            |   1 +
 arch/arm/mach-k3/common.c                     |   1 +
 arch/arm/mach-k3/security.c                   |   1 +
 arch/arm/mach-k3/sysfw-loader.c               |   1 +
 arch/arm/mach-keystone/ddr3_spd.c             |   1 +
 arch/arm/mach-kirkwood/cpu.c                  |   1 +
 arch/arm/mach-kirkwood/mpp.c                  |   1 +
 arch/arm/mach-mediatek/mt7629/init.c          |   1 +
 arch/arm/mach-mediatek/mt8512/init.c          |   1 +
 arch/arm/mach-meson/board-g12a.c              |   1 +
 arch/arm/mach-meson/sm.c                      |   1 +
 arch/arm/mach-mvebu/spl.c                     |   1 +
 arch/arm/mach-omap2/am33xx/clock.c            |   1 +
 arch/arm/mach-omap2/am33xx/ddr.c              |   1 +
 arch/arm/mach-omap2/boot-common.c             |   1 +
 arch/arm/mach-omap2/clocks-common.c           |   1 +
 arch/arm/mach-omap2/emif-common.c             |   1 +
 arch/arm/mach-omap2/fdt-common.c              |   1 +
 arch/arm/mach-omap2/omap-cache.c              |   1 +
 arch/arm/mach-omap2/omap3/am35x_musb.c        |   1 +
 arch/arm/mach-omap2/omap5/dra7xx_iodelay.c    |   1 +
 arch/arm/mach-omap2/omap5/emif.c              |   1 +
 arch/arm/mach-omap2/omap5/fdt.c               |   1 +
 arch/arm/mach-omap2/sec-common.c              |   1 +
 arch/arm/mach-rockchip/board.c                |   1 +
 arch/arm/mach-rockchip/boot_mode.c            |   1 +
 arch/arm/mach-rockchip/misc.c                 |   1 +
 arch/arm/mach-rockchip/px30/syscon_px30.c     |   1 +
 arch/arm/mach-rockchip/rk3188/rk3188.c        |   1 +
 arch/arm/mach-rockchip/rk3188/syscon_rk3188.c |   1 +
 arch/arm/mach-rockchip/rk3288/syscon_rk3288.c |   1 +
 arch/arm/mach-rockchip/rk3368/syscon_rk3368.c |   1 +
 arch/arm/mach-rockchip/rk3399/rk3399.c        |   1 +
 arch/arm/mach-rockchip/rk3399/syscon_rk3399.c |   1 +
 arch/arm/mach-rockchip/sdram.c                |   1 +
 arch/arm/mach-rockchip/spl-boot-order.c       |   1 +
 arch/arm/mach-rockchip/spl.c                  |   1 +
 arch/arm/mach-rockchip/tpl.c                  |   1 +
 arch/arm/mach-snapdragon/dram.c               |   1 +
 arch/arm/mach-socfpga/clock_manager_agilex.c  |   1 +
 arch/arm/mach-socfpga/misc_s10.c              |   1 +
 arch/arm/mach-socfpga/pinmux_arria10.c        |   1 +
 arch/arm/mach-socfpga/spl_agilex.c            |   1 +
 arch/arm/mach-socfpga/spl_gen5.c              |   1 +
 arch/arm/mach-socfpga/spl_s10.c               |   1 +
 arch/arm/mach-stm32mp/bsec.c                  |   1 +
 arch/arm/mach-stm32mp/cpu.c                   |   1 +
 arch/arm/mach-stm32mp/dram_init.c             |   1 +
 arch/arm/mach-stm32mp/fdt.c                   |   1 +
 arch/arm/mach-stm32mp/spl.c                   |   1 +
 arch/arm/mach-sunxi/board.c                   |   1 +
 arch/arm/mach-sunxi/dram_sun50i_h6.c          |   1 +
 arch/arm/mach-sunxi/dram_sun9i.c              |   1 +
 arch/arm/mach-sunxi/dram_sunxi_dw.c           |   1 +
 arch/arm/mach-sunxi/spl_spi_sunxi.c           |   1 +
 arch/arm/mach-tegra/ap.c                      |   1 +
 arch/arm/mach-tegra/board.c                   |   1 +
 arch/arm/mach-tegra/board2.c                  |   1 +
 arch/arm/mach-tegra/cboot.c                   |   1 +
 arch/arm/mach-tegra/clock.c                   |   1 +
 arch/arm/mach-tegra/cpu.c                     |   1 +
 arch/arm/mach-tegra/gpu.c                     |   1 +
 arch/arm/mach-tegra/pinmux-common.c           |   1 +
 arch/arm/mach-tegra/pmc.c                     |   1 +
 arch/arm/mach-tegra/spl.c                     |   1 +
 arch/arm/mach-tegra/tegra114/clock.c          |   1 +
 arch/arm/mach-tegra/tegra114/cpu.c            |   1 +
 arch/arm/mach-tegra/tegra114/funcmux.c        |   1 +
 arch/arm/mach-tegra/tegra124/clock.c          |   1 +
 arch/arm/mach-tegra/tegra124/cpu.c            |   1 +
 arch/arm/mach-tegra/tegra124/funcmux.c        |   1 +
 arch/arm/mach-tegra/tegra124/xusb-padctl.c    |   1 +
 arch/arm/mach-tegra/tegra20/clock.c           |   1 +
 arch/arm/mach-tegra/tegra20/crypto.c          |   1 +
 arch/arm/mach-tegra/tegra20/emc.c             |   1 +
 arch/arm/mach-tegra/tegra20/funcmux.c         |   1 +
 arch/arm/mach-tegra/tegra20/pmu.c             |   1 +
 arch/arm/mach-tegra/tegra210/clock.c          |   1 +
 arch/arm/mach-tegra/tegra210/funcmux.c        |   1 +
 arch/arm/mach-tegra/tegra210/xusb-padctl.c    |   1 +
 arch/arm/mach-tegra/tegra30/clock.c           |   1 +
 arch/arm/mach-tegra/tegra30/cpu.c             |   1 +
 arch/arm/mach-tegra/tegra30/funcmux.c         |   1 +
 arch/arm/mach-tegra/xusb-padctl-common.c      |   1 +
 arch/arm/mach-uniphier/board_init.c           |   1 +
 arch/arm/mach-uniphier/dram/ddrphy-training.c |   1 +
 arch/arm/mach-uniphier/dram/umc-pxs2.c        |   1 +
 arch/arm/mach-uniphier/micro-support-card.c   |   1 +
 arch/arm/mach-uniphier/nand-reset.c           |   1 +
 arch/arm/mach-zynq/spl.c                      |   1 +
 arch/arm/mach-zynqmp/mp.c                     |   1 +
 arch/arm/mach-zynqmp/spl.c                    |   1 +
 arch/m68k/lib/bootm.c                         |   1 +
 arch/microblaze/cpu/interrupts.c              |   1 +
 arch/microblaze/cpu/spl.c                     |   1 +
 arch/microblaze/cpu/timer.c                   |   1 +
 arch/microblaze/lib/bootm.c                   |   1 +
 arch/mips/lib/bootm.c                         |   1 +
 arch/mips/lib/spl.c                           |   1 +
 arch/mips/lib/stack.c                         |   1 +
 arch/mips/lib/traps.c                         |   1 +
 arch/mips/mach-ath79/qca956x/clk.c            |   1 +
 arch/mips/mach-bmips/dram.c                   |   1 +
 arch/mips/mach-mscc/phy.c                     |   1 +
 arch/mips/mach-mtmips/ddr_calibrate.c         | 310 ++++++++++++++++++
 arch/nds32/cpu/n1213/ag101/timer.c            |   1 +
 arch/nds32/lib/bootm.c                        |   1 +
 arch/nios2/lib/bootm.c                        |   1 +
 arch/powerpc/cpu/mpc83xx/law.c                |   1 +
 arch/powerpc/cpu/mpc83xx/spd_sdram.c          |   1 +
 arch/powerpc/cpu/mpc85xx/bsc9132_serdes.c     |   1 +
 arch/powerpc/cpu/mpc85xx/c29x_serdes.c        |   1 +
 arch/powerpc/cpu/mpc85xx/cpu.c                |   1 +
 arch/powerpc/cpu/mpc85xx/fdt.c                |   1 +
 .../powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c |   1 +
 arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c |   1 +
 arch/powerpc/cpu/mpc85xx/interrupts.c         |   1 +
 arch/powerpc/cpu/mpc85xx/liodn.c              |   1 +
 arch/powerpc/cpu/mpc85xx/mp.c                 |   1 +
 arch/powerpc/cpu/mpc85xx/mpc8536_serdes.c     |   1 +
 arch/powerpc/cpu/mpc85xx/mpc8544_serdes.c     |   1 +
 arch/powerpc/cpu/mpc85xx/mpc8548_serdes.c     |   1 +
 arch/powerpc/cpu/mpc85xx/mpc8568_serdes.c     |   1 +
 arch/powerpc/cpu/mpc85xx/mpc8569_serdes.c     |   1 +
 arch/powerpc/cpu/mpc85xx/mpc8572_serdes.c     |   1 +
 arch/powerpc/cpu/mpc85xx/p1010_serdes.c       |   1 +
 arch/powerpc/cpu/mpc85xx/p1021_serdes.c       |   1 +
 arch/powerpc/cpu/mpc85xx/p1022_serdes.c       |   1 +
 arch/powerpc/cpu/mpc85xx/p1023_serdes.c       |   1 +
 arch/powerpc/cpu/mpc85xx/p2020_serdes.c       |   1 +
 arch/powerpc/cpu/mpc86xx/cpu.c                |   1 +
 arch/powerpc/cpu/mpc86xx/interrupts.c         |   1 +
 arch/powerpc/cpu/mpc86xx/mpc8610_serdes.c     |   1 +
 arch/powerpc/cpu/mpc86xx/mpc8641_serdes.c     |   1 +
 arch/powerpc/cpu/mpc8xxx/fsl_pamu.c           |   1 +
 arch/powerpc/cpu/mpc8xxx/pamu_table.c         |   1 +
 arch/powerpc/cpu/mpc8xxx/srio.c               |   1 +
 arch/powerpc/lib/bootm.c                      |   1 +
 arch/powerpc/lib/extable.c                    |   1 +
 arch/powerpc/lib/spl.c                        |   1 +
 arch/riscv/lib/bootm.c                        |   1 +
 arch/riscv/lib/fdt_fixup.c                    |   1 +
 arch/riscv/lib/spl.c                          |   1 +
 arch/sandbox/cpu/cpu.c                        |   1 +
 arch/sandbox/cpu/spl.c                        |   1 +
 arch/sandbox/cpu/state.c                      |   1 +
 arch/sandbox/lib/pci_io.c                     |   1 +
 arch/x86/cpu/acpi_gpe.c                       |   1 +
 arch/x86/cpu/apollolake/fsp_m.c               |   1 +
 arch/x86/cpu/apollolake/fsp_s.c               |   1 +
 arch/x86/cpu/apollolake/hostbridge.c          |   1 +
 arch/x86/cpu/apollolake/lpc.c                 |   1 +
 arch/x86/cpu/apollolake/pmc.c                 |   1 +
 arch/x86/cpu/apollolake/punit.c               |   1 +
 arch/x86/cpu/apollolake/spl.c                 |   1 +
 arch/x86/cpu/baytrail/acpi.c                  |   1 +
 arch/x86/cpu/baytrail/cpu.c                   |   1 +
 arch/x86/cpu/baytrail/fsp_configs.c           |   1 +
 arch/x86/cpu/braswell/fsp_configs.c           |   1 +
 arch/x86/cpu/broadwell/adsp.c                 |   1 +
 arch/x86/cpu/broadwell/cpu.c                  |   1 +
 arch/x86/cpu/broadwell/cpu_from_spl.c         |   1 +
 arch/x86/cpu/broadwell/cpu_full.c             |   1 +
 arch/x86/cpu/broadwell/lpc.c                  |   1 +
 arch/x86/cpu/broadwell/me.c                   |   1 +
 arch/x86/cpu/broadwell/pch.c                  |   1 +
 arch/x86/cpu/broadwell/pinctrl_broadwell.c    |   1 +
 arch/x86/cpu/broadwell/power_state.c          |   1 +
 arch/x86/cpu/broadwell/refcode.c              |   1 +
 arch/x86/cpu/broadwell/sata.c                 |   1 +
 arch/x86/cpu/broadwell/sdram.c                |   1 +
 arch/x86/cpu/cpu.c                            |   1 +
 arch/x86/cpu/efi/payload.c                    |   1 +
 arch/x86/cpu/intel_common/cpu.c               |   1 +
 arch/x86/cpu/intel_common/itss.c              |   1 +
 arch/x86/cpu/intel_common/me_status.c         |   1 +
 arch/x86/cpu/intel_common/microcode.c         |   1 +
 arch/x86/cpu/intel_common/mrc.c               |   1 +
 arch/x86/cpu/intel_common/p2sb.c              |   1 +
 arch/x86/cpu/intel_common/report_platform.c   |   1 +
 arch/x86/cpu/ioapic.c                         |   1 +
 arch/x86/cpu/irq.c                            |   1 +
 arch/x86/cpu/ivybridge/bd82x6x.c              |   1 +
 arch/x86/cpu/ivybridge/cpu.c                  |   1 +
 arch/x86/cpu/ivybridge/early_me.c             |   1 +
 arch/x86/cpu/ivybridge/fsp_configs.c          |   1 +
 arch/x86/cpu/ivybridge/lpc.c                  |   1 +
 arch/x86/cpu/ivybridge/model_206ax.c          |   1 +
 arch/x86/cpu/ivybridge/northbridge.c          |   1 +
 arch/x86/cpu/ivybridge/sata.c                 |   1 +
 arch/x86/cpu/ivybridge/sdram.c                |   1 +
 arch/x86/cpu/lapic.c                          |   1 +
 arch/x86/cpu/mp_init.c                        |   1 +
 arch/x86/cpu/mtrr.c                           |   1 +
 arch/x86/cpu/pci.c                            |   1 +
 arch/x86/cpu/quark/dram.c                     |   1 +
 arch/x86/cpu/quark/mrc_util.h                 |   2 +
 arch/x86/cpu/slimbootloader/serial.c          |   1 +
 arch/x86/cpu/slimbootloader/slimbootloader.c  |   1 +
 arch/x86/cpu/tangier/pinmux.c                 |   1 +
 arch/x86/cpu/tangier/sdram.c                  |   1 +
 arch/x86/cpu/turbo.c                          |   1 +
 arch/x86/lib/acpi.c                           |   1 +
 arch/x86/lib/acpi_table.c                     |   1 +
 arch/x86/lib/bios.c                           |   1 +
 arch/x86/lib/bios_interrupts.c                |   1 +
 arch/x86/lib/bootm.c                          |   1 +
 arch/x86/lib/fsp/fsp_common.c                 |   1 +
 arch/x86/lib/fsp/fsp_dram.c                   |   1 +
 arch/x86/lib/fsp/fsp_graphics.c               |   1 +
 arch/x86/lib/fsp/fsp_support.c                |   1 +
 arch/x86/lib/fsp1/fsp_common.c                |   1 +
 arch/x86/lib/fsp1/fsp_support.c               |   1 +
 arch/x86/lib/fsp2/fsp_dram.c                  |   1 +
 arch/x86/lib/fsp2/fsp_init.c                  |   1 +
 arch/x86/lib/fsp2/fsp_meminit.c               |   1 +
 arch/x86/lib/fsp2/fsp_silicon_init.c          |   1 +
 arch/x86/lib/fsp2/fsp_support.c               |   1 +
 arch/x86/lib/i8259.c                          |   1 +
 arch/x86/lib/interrupts.c                     |   1 +
 arch/x86/lib/mpspec.c                         |   1 +
 arch/x86/lib/mrccache.c                       |   1 +
 arch/x86/lib/physmem.c                        |   1 +
 arch/x86/lib/pinctrl_ich6.c                   |   1 +
 arch/x86/lib/pirq_routing.c                   |   1 +
 arch/x86/lib/relocate.c                       |   1 +
 arch/x86/lib/spl.c                            |   1 +
 arch/x86/lib/tpl.c                            |   1 +
 board/BuR/common/common.c                     |   1 +
 board/CZ.NIC/turris_omnia/turris_omnia.c      |   1 +
 board/Marvell/gplugd/gplugd.c                 |   1 +
 board/advantech/imx8qm_rom7720_a1/spl.c       |   1 +
 board/armadeus/apf27/fpga.c                   |   1 +
 board/armltd/integrator/pci.c                 |   1 +
 board/armltd/vexpress64/pcie.c                |   1 +
 board/avionic-design/common/tamonten-ng.c     |   1 +
 board/broadcom/bcm23550_w1d/bcm23550_w1d.c    |   1 +
 board/broadcom/bcm28155_ap/bcm28155_ap.c      |   1 +
 board/broadcom/bcmstb/bcmstb.c                |   1 +
 board/cloudengines/pogo_e02/pogo_e02.c        |   1 +
 board/compal/paz00/paz00.c                    |   1 +
 board/compulab/cm_t335/spl.c                  |   1 +
 board/d-link/dns325/dns325.c                  |   1 +
 board/dfi/dfi-bt700/dfi-bt700.c               |   1 +
 board/dhelectronics/dh_stm32mp1/board.c       |   1 +
 board/eets/pdu001/board.c                     |   1 +
 board/emulation/qemu-arm/qemu-arm.c           |   1 +
 board/emulation/qemu-riscv/qemu-riscv.c       |   1 +
 board/engicam/common/board.c                  |   1 +
 board/firefly/firefly-rk3288/firefly-rk3288.c |   1 +
 board/firefly/roc-pc-rk3399/roc-pc-rk3399.c   |   1 +
 board/freescale/b4860qds/b4860qds.c           |   1 +
 board/freescale/b4860qds/ddr.c                |   1 +
 board/freescale/b4860qds/eth_b4860qds.c       |   1 +
 board/freescale/common/arm_sleep.c            |   1 +
 board/freescale/common/fsl_chain_of_trust.c   |   1 +
 board/freescale/common/fsl_validate.c         |   1 +
 board/freescale/common/ics307_clk.c           |   1 +
 .../common/idt8t49n222a_serdes_clk.c          |   1 +
 board/freescale/common/mc34vr500.c            |   1 +
 board/freescale/common/mpc85xx_sleep.c        |   1 +
 board/freescale/common/ns_access.c            |   1 +
 board/freescale/common/sgmii_riser.c          |   1 +
 board/freescale/common/vid.c                  |   1 +
 board/freescale/common/vsc3316_3308.c         |   1 +
 board/freescale/common/zm7300.c               |   1 +
 board/freescale/corenet_ds/ddr.c              |   1 +
 board/freescale/corenet_ds/eth_superhydra.c   |   1 +
 board/freescale/imx8mm_evk/spl.c              |   1 +
 board/freescale/imx8mn_evk/spl.c              |   1 +
 board/freescale/imx8mp_evk/spl.c              |   1 +
 board/freescale/imx8mq_evk/spl.c              |   1 +
 board/freescale/imx8qm_mek/spl.c              |   1 +
 board/freescale/imx8qxp_mek/spl.c             |   1 +
 board/freescale/imxrt1020-evk/imxrt1020-evk.c |   1 +
 board/freescale/imxrt1050-evk/imxrt1050-evk.c |   1 +
 board/freescale/ls1021aqds/ddr.c              |   1 +
 board/freescale/ls1021aqds/ls1021aqds.c       |   1 +
 board/freescale/ls1043aqds/ddr.c              |   1 +
 board/freescale/ls1043aqds/eth.c              |   1 +
 board/freescale/ls1043aqds/ls1043aqds.c       |   1 +
 board/freescale/ls1043ardb/ddr.c              |   1 +
 board/freescale/ls1046aqds/ddr.c              |   1 +
 board/freescale/ls1046aqds/eth.c              |   1 +
 board/freescale/ls1046ardb/ddr.c              |   1 +
 board/freescale/ls1088a/ddr.c                 |   1 +
 board/freescale/ls1088a/eth_ls1088aqds.c      |   1 +
 board/freescale/ls1088a/ls1088a.c             |   1 +
 board/freescale/ls2080a/ddr.c                 |   1 +
 board/freescale/ls2080aqds/ddr.c              |   1 +
 board/freescale/ls2080aqds/eth.c              |   1 +
 board/freescale/ls2080ardb/ddr.c              |   1 +
 board/freescale/lx2160a/eth_lx2160aqds.c      |   1 +
 board/freescale/mpc8349itx/mpc8349itx.c       |   1 +
 board/freescale/mpc8536ds/mpc8536ds.c         |   1 +
 board/freescale/mpc8568mds/mpc8568mds.c       |   1 +
 board/freescale/mpc8569mds/mpc8569mds.c       |   1 +
 board/freescale/mpc8572ds/mpc8572ds.c         |   1 +
 board/freescale/mpc8610hpcd/mpc8610hpcd.c     |   1 +
 board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c |   1 +
 board/freescale/mpc8641hpcn/mpc8641hpcn.c     |   1 +
 board/freescale/mx53loco/mx53loco.c           |   1 +
 board/freescale/p1022ds/diu.c                 |   1 +
 board/freescale/p1022ds/p1022ds.c             |   1 +
 board/freescale/p2041rdb/ddr.c                |   1 +
 board/freescale/qemu-ppce500/qemu-ppce500.c   |   1 +
 board/freescale/t102xqds/ddr.c                |   1 +
 board/freescale/t102xqds/eth_t102xqds.c       |   1 +
 board/freescale/t102xqds/t102xqds.c           |   1 +
 board/freescale/t102xrdb/ddr.c                |   1 +
 board/freescale/t1040qds/ddr.c                |   1 +
 board/freescale/t104xrdb/ddr.c                |   1 +
 board/freescale/t104xrdb/t104xrdb.c           |   1 +
 board/freescale/t208xqds/ddr.c                |   1 +
 board/freescale/t208xqds/eth_t208xqds.c       |   1 +
 board/freescale/t208xqds/t208xqds.c           |   1 +
 board/freescale/t208xrdb/ddr.c                |   1 +
 board/freescale/t4qds/ddr.c                   |   1 +
 board/freescale/t4qds/eth.c                   |   1 +
 board/freescale/t4qds/t4240qds.c              |   1 +
 board/freescale/t4rdb/ddr.c                   |   1 +
 board/gardena/smart-gateway-mt7688/board.c    |   1 +
 board/gateworks/gw_ventana/common.c           |   1 +
 board/gateworks/gw_ventana/eeprom.c           |   1 +
 board/gateworks/gw_ventana/gsc.c              |   2 +
 board/gateworks/gw_ventana/gw_ventana.c       |   1 +
 board/gateworks/gw_ventana/gw_ventana_spl.c   |   1 +
 board/gdsys/a38x/hre.c                        |   1 +
 board/gdsys/common/phy.c                      |   1 +
 board/gdsys/p1022/controlcenterd-id.c         |   1 +
 board/gdsys/p1022/ddr.c                       |   1 +
 board/gdsys/p1022/diu.c                       |   1 +
 board/google/imx8mq_phanbell/spl.c            |   2 +
 board/google/veyron/veyron.c                  |   1 +
 board/hisilicon/hikey/hikey.c                 |   1 +
 board/intel/minnowmax/minnowmax.c             |   1 +
 board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c     |   1 +
 board/keymile/km83xx/km83xx.c                 |   1 +
 board/keymile/kmp204x/ddr.c                   |   1 +
 board/kosagi/novena/novena.c                  |   1 +
 board/kosagi/novena/video.c                   |   1 +
 board/liebherr/display5/display5.c            |   1 +
 board/liebherr/display5/spl.c                 |   1 +
 board/liebherr/xea/xea.c                      |   1 +
 board/mediatek/mt8512/mt8512.c                |   1 +
 board/mediatek/mt8518/mt8518_ap1.c            |   1 +
 board/mscc/ocelot/ocelot.c                    |   1 +
 board/nvidia/cardhu/cardhu.c                  |   1 +
 board/nvidia/dalmore/dalmore.c                |   1 +
 board/nvidia/e2220-1170/e2220-1170.c          |   1 +
 board/nvidia/jetson-tk1/jetson-tk1.c          |   1 +
 board/nvidia/nyan-big/nyan-big.c              |   1 +
 board/nvidia/p2371-0000/p2371-0000.c          |   1 +
 board/nvidia/p2371-2180/p2371-2180.c          |   1 +
 board/nvidia/p2571/p2571.c                    |   1 +
 board/nvidia/p2771-0000/p2771-0000.c          |   1 +
 board/nvidia/venice2/as3722_init.c            |   1 +
 board/phytec/pfla02/pfla02.c                  |   1 +
 board/phytec/phycore_rk3288/phycore-rk3288.c  |   1 +
 board/phytium/durian/durian.c                 |   1 +
 board/renesas/rcar-common/gen3-spl.c          |   1 +
 board/rockchip/evb_rk3399/evb-rk3399.c        |   1 +
 board/samsung/arndale/arndale.c               |   1 +
 board/samsung/common/board.c                  |   1 +
 board/samsung/common/exynos5-dt.c             |   1 +
 board/samsung/goni/goni.c                     |   1 +
 board/samsung/odroid/odroid.c                 |   1 +
 board/samsung/smdkv310/smdkv310.c             |   1 +
 board/samsung/trats/trats.c                   |   1 +
 board/samsung/trats2/trats2.c                 |   1 +
 board/samsung/universal_c210/universal.c      |   1 +
 board/sbc8548/sbc8548.c                       |   1 +
 board/sbc8641d/sbc8641d.c                     |   1 +
 board/siemens/capricorn/board.c               |   1 +
 board/siemens/common/factoryset.c             |   1 +
 board/siemens/corvus/board.c                  |   1 +
 board/siemens/pxm2/board.c                    |   1 +
 board/solidrun/mx6cuboxi/mx6cuboxi.c          |   1 +
 board/spear/x600/fpga.c                       |   1 +
 .../stm32f429-discovery/stm32f429-discovery.c |   1 +
 .../stm32f429-evaluation.c                    |   1 +
 .../stm32f469-discovery/stm32f469-discovery.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/sunxi/board.c                           |   1 +
 board/synopsys/hsdk/clk-lib.c                 |   1 +
 board/synopsys/hsdk/env-lib.c                 |   1 +
 board/synopsys/hsdk/hsdk.c                    |   1 +
 board/technologic/ts4800/ts4800.c             |   1 +
 board/theadorable/fpga.c                      |   1 +
 .../puma_rk3399/puma-rk3399.c                 |   1 +
 board/ti/common/board_detect.c                |   1 +
 board/ti/j721e/evm.c                          |   1 +
 board/ti/panda/panda.c                        |   1 +
 board/toradex/apalis-tk1/apalis-tk1.c         |   1 +
 board/toradex/apalis-tk1/as3722_init.c        |   1 +
 board/toradex/apalis_t30/apalis_t30.c         |   1 +
 board/toradex/colibri_t20/colibri_t20.c       |   1 +
 board/toradex/verdin-imx8mm/spl.c             |   1 +
 board/tqc/tqm834x/tqm834x.c                   |   1 +
 board/varisys/cyrus/ddr.c                     |   1 +
 board/wandboard/wandboard.c                   |   1 +
 .../work_92105/work_92105_display.c           |   1 +
 board/xes/xpedite517x/ddr.c                   |   1 +
 board/xes/xpedite537x/ddr.c                   |   1 +
 board/xilinx/common/board.c                   |   1 +
 .../microblaze-generic/microblaze-generic.c   |   1 +
 board/xilinx/versal/board.c                   |   1 +
 board/xilinx/zynq/bootimg.c                   |   1 +
 board/xilinx/zynq/cmds.c                      |   1 +
 board/xilinx/zynqmp/zynqmp.c                  |   1 +
 cmd/axi.c                                     |   1 +
 cmd/bcb.c                                     |   1 +
 cmd/bmp.c                                     |   1 +
 cmd/booti.c                                   |   1 +
 cmd/bootmenu.c                                |   1 +
 cmd/bootz.c                                   |   1 +
 cmd/cros_ec.c                                 |   1 +
 cmd/disk.c                                    |   1 +
 cmd/efi.c                                     |   1 +
 cmd/efidebug.c                                |   1 +
 cmd/elf.c                                     |   1 +
 cmd/flash.c                                   |   1 +
 cmd/fpga.c                                    |   1 +
 cmd/gpio.c                                    |   1 +
 cmd/gpt.c                                     |   1 +
 cmd/i2c.c                                     |   1 +
 cmd/mem.c                                     |   1 +
 cmd/mtdparts.c                                |   1 +
 cmd/nvedit.c                                  |   1 +
 cmd/pxe_utils.c                               |   1 +
 cmd/setexpr.c                                 |   1 +
 cmd/sf.c                                      |   1 +
 cmd/source.c                                  |   1 +
 cmd/spl.c                                     |   1 +
 cmd/test.c                                    |   1 +
 cmd/ti/ddr3.c                                 |   1 +
 cmd/tpm_test.c                                |   1 +
 cmd/tsi148.c                                  |   1 +
 cmd/ubifs.c                                   |   1 +
 common/android_ab.c                           |   1 +
 common/autoboot.c                             |   1 +
 common/board_f.c                              |   1 +
 common/board_r.c                              |   1 +
 common/boot_fit.c                             |   1 +
 common/bootm.c                                |   1 +
 common/bootm_os.c                             |   1 +
 common/bootstage.c                            |   1 +
 common/bouncebuf.c                            |   1 +
 common/cli_simple.c                           |   1 +
 common/command.c                              |   1 +
 common/common_fit.c                           |   1 +
 common/cros_ec.c                              |   1 +
 common/dfu.c                                  |   1 +
 common/dlmalloc.c                             |   1 +
 common/edid.c                                 |   1 +
 common/fdt_support.c                          |   1 +
 common/flash.c                                |   1 +
 common/hash.c                                 |   1 +
 common/hwconfig.c                             |   1 +
 common/image-fdt.c                            |   1 +
 common/image-fit-sig.c                        |   1 +
 common/image-fit.c                            |   1 +
 common/image-sig.c                            |   1 +
 common/image.c                                |   1 +
 common/lcd.c                                  |   1 +
 common/lcd_console.c                          |   1 +
 common/malloc_simple.c                        |   1 +
 common/miiphyutil.c                           |   1 +
 common/spl/spl.c                              |   1 +
 common/spl/spl_atf.c                          |   1 +
 common/spl/spl_fat.c                          |   1 +
 common/spl/spl_fit.c                          |   1 +
 common/spl/spl_legacy.c                       |   1 +
 common/spl/spl_mmc.c                          |   1 +
 common/spl/spl_nand.c                         |   1 +
 common/spl/spl_net.c                          |   1 +
 common/spl/spl_nor.c                          |   1 +
 common/spl/spl_onenand.c                      |   1 +
 common/spl/spl_ram.c                          |   1 +
 common/spl/spl_sdp.c                          |   1 +
 common/spl/spl_spi.c                          |   1 +
 common/spl/spl_usb.c                          |   1 +
 common/spl/spl_xip.c                          |   1 +
 common/spl/spl_ymodem.c                       |   1 +
 common/splash_source.c                        |   1 +
 common/stdio.c                                |   1 +
 common/usb.c                                  |   1 +
 common/usb_hub.c                              |   1 +
 common/usb_kbd.c                              |   1 +
 common/usb_storage.c                          |   1 +
 disk/part.c                                   |   1 +
 disk/part_efi.c                               |   1 +
 disk/part_mac.c                               |   1 +
 drivers/ata/ahci.c                            |   1 +
 drivers/ata/ahci_mvebu.c                      |   1 +
 drivers/ata/ahci_sunxi.c                      |   1 +
 drivers/ata/dwc_ahsata.c                      |   1 +
 drivers/ata/fsl_sata.c                        |   1 +
 drivers/ata/sata_ceva.c                       |   1 +
 drivers/ata/sata_mv.c                         |   1 +
 drivers/ata/sata_sil.c                        |   1 +
 drivers/ata/sata_sil3114.c                    |   1 +
 drivers/axi/axi-emul-uclass.c                 |   1 +
 drivers/axi/ihs_axi.c                         |   1 +
 drivers/axi/sandbox_store.c                   |   1 +
 drivers/bios_emulator/atibios.c               |   1 +
 drivers/block/blk-uclass.c                    |   1 +
 drivers/block/blkcache.c                      |   1 +
 drivers/block/ide.c                           |   1 +
 drivers/board/gazerbeam.c                     |   1 +
 drivers/bootcount/bootcount-uclass.c          |   1 +
 drivers/bootcount/i2c-eeprom.c                |   1 +
 drivers/bootcount/rtc.c                       |   1 +
 drivers/cache/cache-ncore.c                   |   1 +
 drivers/clk/altera/clk-agilex.c               |   1 +
 drivers/clk/aspeed/clk_ast2500.c              |   1 +
 drivers/clk/at91/clk-generated.c              |   1 +
 drivers/clk/at91/clk-usb.c                    |   1 +
 drivers/clk/at91/pmc.c                        |   1 +
 drivers/clk/clk-hsdk-cgu.c                    |   1 +
 drivers/clk/clk-ti-sci.c                      |   1 +
 drivers/clk/clk-uclass.c                      |   1 +
 drivers/clk/clk.c                             |   1 +
 drivers/clk/clk_stm32f.c                      |   1 +
 drivers/clk/clk_stm32h7.c                     |   1 +
 drivers/clk/clk_stm32mp1.c                    |   1 +
 drivers/clk/clk_versal.c                      |   1 +
 drivers/clk/clk_vexpress_osc.c                |   1 +
 drivers/clk/clk_zynq.c                        |   1 +
 drivers/clk/clk_zynqmp.c                      |   1 +
 drivers/clk/ics8n3qv01.c                      |   1 +
 drivers/clk/imx/clk-composite-8m.c            |   1 +
 drivers/clk/imx/clk-imx6q.c                   |   1 +
 drivers/clk/imx/clk-imx8.c                    |   1 +
 drivers/clk/imx/clk-imx8mm.c                  |   1 +
 drivers/clk/imx/clk-imx8mn.c                  |   1 +
 drivers/clk/imx/clk-imx8mp.c                  |   1 +
 drivers/clk/imx/clk-imx8qm.c                  |   1 +
 drivers/clk/imx/clk-imx8qxp.c                 |   1 +
 drivers/clk/imx/clk-imxrt1050.c               |   1 +
 drivers/clk/mediatek/clk-mt7622.c             |   1 +
 drivers/clk/mediatek/clk-mt7623.c             |   1 +
 drivers/clk/mediatek/clk-mt7629.c             |   1 +
 drivers/clk/meson/axg.c                       |   1 +
 drivers/clk/meson/g12a.c                      |   1 +
 drivers/clk/meson/gxbb.c                      |   1 +
 drivers/clk/mpc83xx_clk.c                     |   1 +
 drivers/clk/renesas/clk-rcar-gen2.c           |   1 +
 drivers/clk/renesas/clk-rcar-gen3.c           |   1 +
 drivers/clk/renesas/renesas-cpg-mssr.c        |   1 +
 drivers/clk/rockchip/clk_pll.c                |   1 +
 drivers/clk/rockchip/clk_px30.c               |   1 +
 drivers/clk/rockchip/clk_rk3036.c             |   1 +
 drivers/clk/rockchip/clk_rk3128.c             |   1 +
 drivers/clk/rockchip/clk_rk3188.c             |   1 +
 drivers/clk/rockchip/clk_rk322x.c             |   1 +
 drivers/clk/rockchip/clk_rk3288.c             |   1 +
 drivers/clk/rockchip/clk_rk3308.c             |   1 +
 drivers/clk/rockchip/clk_rk3328.c             |   1 +
 drivers/clk/rockchip/clk_rk3368.c             |   1 +
 drivers/clk/rockchip/clk_rk3399.c             |   1 +
 drivers/clk/rockchip/clk_rv1108.c             |   1 +
 drivers/clk/sunxi/clk_sunxi.c                 |   1 +
 drivers/clk/tegra/tegra-car-clk.c             |   1 +
 drivers/clk/tegra/tegra186-clk.c              |   1 +
 drivers/core/acpi.c                           |   1 +
 drivers/core/device.c                         |   1 +
 drivers/core/devres.c                         |   1 +
 drivers/core/fdtaddr.c                        |   1 +
 drivers/core/lists.c                          |   1 +
 drivers/core/of_access.c                      |   1 +
 drivers/core/of_addr.c                        |   1 +
 drivers/core/of_extra.c                       |   1 +
 drivers/core/ofnode.c                         |   1 +
 drivers/core/regmap.c                         |   1 +
 drivers/core/root.c                           |   1 +
 drivers/core/syscon-uclass.c                  |   1 +
 drivers/core/uclass.c                         |   1 +
 drivers/cpu/cpu-uclass.c                      |   1 +
 drivers/cpu/mpc83xx_cpu.c                     |   1 +
 drivers/cpu/riscv_cpu.c                       |   1 +
 drivers/crypto/ace_sha.c                      |   1 +
 drivers/crypto/fsl/error.c                    |   1 +
 drivers/crypto/fsl/fsl_blob.c                 |   1 +
 drivers/crypto/fsl/fsl_hash.c                 |   1 +
 drivers/crypto/fsl/fsl_rsa.c                  |   1 +
 drivers/crypto/fsl/jr.c                       |   1 +
 drivers/crypto/rsa_mod_exp/mod_exp_sw.c       |   1 +
 drivers/ddr/altera/sdram_agilex.c             |   1 +
 drivers/ddr/altera/sdram_arria10.c            |   1 +
 drivers/ddr/altera/sdram_gen5.c               |   1 +
 drivers/ddr/altera/sdram_s10.c                |   1 +
 drivers/ddr/altera/sdram_soc64.c              |   1 +
 drivers/ddr/altera/sequencer.c                |   1 +
 drivers/ddr/fsl/arm_ddr_gen3.c                |   1 +
 drivers/ddr/fsl/ctrl_regs.c                   |   1 +
 drivers/ddr/fsl/ddr1_dimm_params.c            |   1 +
 drivers/ddr/fsl/ddr2_dimm_params.c            |   1 +
 drivers/ddr/fsl/ddr3_dimm_params.c            |   1 +
 drivers/ddr/fsl/ddr4_dimm_params.c            |   1 +
 drivers/ddr/fsl/fsl_ddr_gen4.c                |   1 +
 drivers/ddr/fsl/interactive.c                 |   1 +
 drivers/ddr/fsl/lc_common_dimm_params.c       |   1 +
 drivers/ddr/fsl/main.c                        |   1 +
 drivers/ddr/fsl/mpc85xx_ddr_gen1.c            |   1 +
 drivers/ddr/fsl/mpc85xx_ddr_gen3.c            |   1 +
 drivers/ddr/fsl/mpc86xx_ddr.c                 |   1 +
 drivers/ddr/fsl/options.c                     |   1 +
 drivers/ddr/fsl/util.c                        |   1 +
 drivers/ddr/imx/imx8m/ddr_init.c              |   1 +
 drivers/ddr/imx/imx8m/ddrphy_train.c          |   1 +
 drivers/ddr/imx/imx8m/ddrphy_utils.c          |   1 +
 drivers/ddr/imx/imx8m/helper.c                |   1 +
 drivers/ddr/marvell/a38x/ddr3_debug.c         |   1 +
 drivers/ddr/marvell/a38x/ddr3_training.c      |   1 +
 drivers/ddr/marvell/axp/ddr3_dqs.c            |   1 +
 drivers/ddr/marvell/axp/ddr3_hw_training.c    |   1 +
 drivers/ddr/marvell/axp/ddr3_init.c           |   1 +
 drivers/ddr/marvell/axp/ddr3_read_leveling.c  |   1 +
 drivers/ddr/marvell/axp/ddr3_write_leveling.c |   1 +
 drivers/ddr/marvell/axp/xor.c                 |   1 +
 drivers/demo/demo-shape.c                     |   1 +
 drivers/demo/demo-uclass.c                    |   1 +
 drivers/dfu/dfu.c                             |   1 +
 drivers/dfu/dfu_mmc.c                         |   1 +
 drivers/dfu/dfu_nand.c                        |   1 +
 drivers/dfu/dfu_tftp.c                        |   1 +
 drivers/dfu/dfu_virt.c                        |   1 +
 drivers/dma/bcm6348-iudma.c                   |   1 +
 drivers/dma/dma-uclass.c                      |   1 +
 drivers/dma/sandbox-dma-test.c                |   1 +
 drivers/dma/ti/k3-udma.c                      |   1 +
 drivers/fastboot/fb_mmc.c                     |   1 +
 drivers/firmware/firmware-zynqmp.c            |   1 +
 drivers/firmware/psci.c                       |   1 +
 drivers/firmware/ti_sci.c                     |   1 +
 drivers/fpga/altera.c                         |   1 +
 drivers/fpga/fpga.c                           |   1 +
 drivers/fpga/ivm_core.c                       |   1 +
 drivers/fpga/lattice.c                        |   1 +
 drivers/fpga/socfpga_arria10.c                |   1 +
 drivers/fpga/stratix10.c                      |   1 +
 drivers/fpga/stratixv.c                       |   1 +
 drivers/fpga/versalpl.c                       |   1 +
 drivers/fpga/xilinx.c                         |   1 +
 drivers/fpga/zynqmppl.c                       |   1 +
 drivers/fpga/zynqpl.c                         |   1 +
 drivers/gpio/cortina_gpio.c                   |   1 +
 drivers/gpio/dwapb_gpio.c                     |   1 +
 drivers/gpio/gpio-uclass.c                    |   3 +-
 drivers/gpio/hsdk-creg-gpio.c                 |   1 +
 drivers/gpio/intel_broadwell_gpio.c           |   1 +
 drivers/gpio/intel_gpio.c                     |   1 +
 drivers/gpio/intel_ich6_gpio.c                |   1 +
 drivers/gpio/mscc_sgpio.c                     |   1 +
 drivers/gpio/mxs_gpio.c                       |   1 +
 drivers/gpio/pcf8575_gpio.c                   |   1 +
 drivers/gpio/pm8916_gpio.c                    |   1 +
 drivers/gpio/s5p_gpio.c                       |   1 +
 drivers/gpio/sandbox.c                        |   1 +
 drivers/gpio/sh_pfc.c                         |   1 +
 drivers/gpio/stm32_gpio.c                     |   1 +
 drivers/gpio/tegra_gpio.c                     |   1 +
 drivers/gpio/xilinx_gpio.c                    |   1 +
 drivers/hwspinlock/hwspinlock-uclass.c        |   1 +
 drivers/i2c/ast_i2c.c                         |   1 +
 drivers/i2c/cros_ec_ldo.c                     |   1 +
 drivers/i2c/davinci_i2c.c                     |   1 +
 drivers/i2c/designware_i2c.c                  |   1 +
 drivers/i2c/designware_i2c_pci.c              |   1 +
 drivers/i2c/exynos_hs_i2c.c                   |   1 +
 drivers/i2c/fsl_i2c.c                         |   1 +
 drivers/i2c/i2c-cdns.c                        |   1 +
 drivers/i2c/i2c-emul-uclass.c                 |   1 +
 drivers/i2c/i2c-gpio.c                        |   1 +
 drivers/i2c/i2c-uclass.c                      |   1 +
 drivers/i2c/i2c_core.c                        |   1 +
 drivers/i2c/ihs_i2c.c                         |   1 +
 drivers/i2c/imx_lpi2c.c                       |   1 +
 drivers/i2c/intel_i2c.c                       |   1 +
 drivers/i2c/kona_i2c.c                        |   1 +
 drivers/i2c/lpc32xx_i2c.c                     |   1 +
 drivers/i2c/meson_i2c.c                       |   1 +
 drivers/i2c/muxes/i2c-arb-gpio-challenge.c    |   1 +
 drivers/i2c/muxes/i2c-mux-uclass.c            |   1 +
 drivers/i2c/muxes/pca954x.c                   |   1 +
 drivers/i2c/mv_i2c.c                          |   1 +
 drivers/i2c/mvtwsi.c                          |   1 +
 drivers/i2c/mxc_i2c.c                         |   1 +
 drivers/i2c/omap24xx_i2c.c                    |   1 +
 drivers/i2c/rk_i2c.c                          |   1 +
 drivers/i2c/s3c24x0_i2c.c                     |   1 +
 drivers/i2c/sandbox_i2c.c                     |   1 +
 drivers/i2c/sh_i2c.c                          |   1 +
 drivers/i2c/stm32f7_i2c.c                     |   1 +
 drivers/i2c/tegra186_bpmp_i2c.c               |   1 +
 drivers/i2c/tegra_i2c.c                       |   1 +
 drivers/input/cros_ec_keyb.c                  |   1 +
 drivers/input/i8042.c                         |   1 +
 drivers/input/input.c                         |   1 +
 drivers/input/key_matrix.c                    |   1 +
 drivers/input/keyboard-uclass.c               |   1 +
 drivers/input/tegra-kbc.c                     |   1 +
 drivers/led/led_bcm6328.c                     |   1 +
 drivers/led/led_bcm6358.c                     |   1 +
 drivers/led/led_bcm6858.c                     |   1 +
 drivers/led/led_gpio.c                        |   1 +
 drivers/mailbox/k3-sec-proxy.c                |   1 +
 drivers/mailbox/mailbox-uclass.c              |   1 +
 drivers/mailbox/sandbox-mbox.c                |   1 +
 drivers/mailbox/stm32-ipcc.c                  |   1 +
 drivers/mailbox/tegra-hsp.c                   |   1 +
 drivers/mailbox/zynqmp-ipi.c                  |   1 +
 drivers/misc/atsha204a-i2c.c                  |   1 +
 drivers/misc/cros_ec.c                        |   1 +
 drivers/misc/cros_ec_i2c.c                    |   1 +
 drivers/misc/cros_ec_lpc.c                    |   1 +
 drivers/misc/cros_ec_sandbox.c                |   1 +
 drivers/misc/cros_ec_spi.c                    |   1 +
 drivers/misc/fs_loader.c                      |   1 +
 drivers/misc/fsl_portals.c                    |   1 +
 drivers/misc/gdsys_ioep.c                     |   1 +
 drivers/misc/gdsys_soc.c                      |   1 +
 drivers/misc/i2c_eeprom_emul.c                |   1 +
 drivers/misc/ihs_fpga.c                       |   1 +
 drivers/misc/imx8/scu.c                       |   1 +
 drivers/misc/irq-uclass.c                     |   1 +
 drivers/misc/microchip_flexcom.c              |   1 +
 drivers/misc/mpc83xx_serdes.c                 |   1 +
 drivers/misc/p2sb-uclass.c                    |   1 +
 drivers/misc/p2sb_emul.c                      |   1 +
 drivers/misc/qfw.c                            |   1 +
 drivers/misc/stm32_rcc.c                      |   1 +
 drivers/misc/swap_case.c                      |   1 +
 drivers/misc/tegra186_bpmp.c                  |   1 +
 drivers/misc/tegra_car.c                      |   1 +
 drivers/mmc/arm_pl180_mmci.c                  |   1 +
 drivers/mmc/bcm2835_sdhci.c                   |   1 +
 drivers/mmc/dw_mmc.c                          |   1 +
 drivers/mmc/fsl_esdhc_imx.c                   |   1 +
 drivers/mmc/ftsdc010_mci.c                    |   1 +
 drivers/mmc/gen_atmel_mci.c                   |   1 +
 drivers/mmc/mmc-uclass.c                      |   1 +
 drivers/mmc/mmc.c                             |   1 +
 drivers/mmc/mmc_boot.c                        |   1 +
 drivers/mmc/mmc_legacy.c                      |   1 +
 drivers/mmc/mmc_spi.c                         |   1 +
 drivers/mmc/mvebu_mmc.c                       |   1 +
 drivers/mmc/mxsmmc.c                          |   1 +
 drivers/mmc/omap_hsmmc.c                      |   1 +
 drivers/mmc/renesas-sdhi.c                    |   1 +
 drivers/mmc/rockchip_dw_mmc.c                 |   1 +
 drivers/mmc/rpmb.c                            |   1 +
 drivers/mmc/s5p_sdhci.c                       |   1 +
 drivers/mmc/sandbox_mmc.c                     |   1 +
 drivers/mmc/sdhci.c                           |   1 +
 drivers/mmc/sh_mmcif.c                        |   1 +
 drivers/mmc/sh_sdhi.c                         |   1 +
 drivers/mmc/socfpga_dw_mmc.c                  |   1 +
 drivers/mmc/sti_sdhci.c                       |   1 +
 drivers/mmc/stm32_sdmmc2.c                    |   1 +
 drivers/mmc/sunxi_mmc.c                       |   1 +
 drivers/mmc/tegra_mmc.c                       |   1 +
 drivers/mmc/zynq_sdhci.c                      |   1 +
 drivers/mtd/altera_qspi.c                     |   1 +
 drivers/mtd/cfi_flash.c                       |   1 +
 drivers/mtd/jedec_flash.c                     |   1 +
 drivers/mtd/mtd_uboot.c                       |   1 +
 drivers/mtd/mtdconcat.c                       |   1 +
 drivers/mtd/mtdcore.c                         |   1 +
 drivers/mtd/mtdpart.c                         |   1 +
 drivers/mtd/nand/raw/atmel_nand.c             |   1 +
 drivers/mtd/nand/raw/davinci_nand.c           |   1 +
 drivers/mtd/nand/raw/denali_spl.c             |   1 +
 drivers/mtd/nand/raw/fsl_upm.c                |   1 +
 drivers/mtd/nand/raw/lpc32xx_nand_slc.c       |   1 +
 drivers/mtd/nand/raw/mxc_nand.c               |   1 +
 drivers/mtd/nand/raw/mxs_nand_spl.c           |   1 +
 drivers/mtd/nand/raw/nand_base.c              |   1 +
 drivers/mtd/nand/raw/nand_bbt.c               |   1 +
 drivers/mtd/nand/raw/nand_bch.c               |   1 +
 drivers/mtd/nand/raw/nand_util.c              |   1 +
 drivers/mtd/nand/raw/omap_gpmc.c              |   1 +
 drivers/mtd/nand/raw/stm32_fmc2_nand.c        |   1 +
 drivers/mtd/nand/raw/tegra_nand.c             |   1 +
 drivers/mtd/nand/raw/zynq_nand.c              |   1 +
 drivers/mtd/onenand/onenand_base.c            |   1 +
 drivers/mtd/onenand/onenand_bbt.c             |   1 +
 drivers/mtd/spi/sandbox.c                     |   1 +
 drivers/mtd/spi/sf-uclass.c                   |   1 +
 drivers/mtd/spi/sf_dataflash.c                |   1 +
 drivers/mtd/spi/sf_probe.c                    |   1 +
 drivers/mtd/spi/spi-nor-core.c                |   1 +
 drivers/mtd/spi/spi-nor-tiny.c                |   1 +
 drivers/mtd/ubi/attach.c                      |   1 +
 drivers/mtd/ubi/build.c                       |   1 +
 drivers/mtd/ubi/eba.c                         |   1 +
 drivers/mtd/ubi/fastmap.c                     |   1 +
 drivers/mtd/ubi/io.c                          |   1 +
 drivers/mtd/ubi/misc.c                        |   1 +
 drivers/mtd/ubi/upd.c                         |   1 +
 drivers/mtd/ubi/vmt.c                         |   1 +
 drivers/mtd/ubi/vtbl.c                        |   1 +
 drivers/mtd/ubi/wl.c                          |   1 +
 drivers/net/ag7xxx.c                          |   1 +
 drivers/net/altera_tse.c                      |   1 +
 drivers/net/armada100_fec.c                   |   1 +
 drivers/net/at91_emac.c                       |   1 +
 drivers/net/ax88180.c                         |   1 +
 drivers/net/bcm-sf2-eth-gmac.c                |   1 +
 drivers/net/bcm-sf2-eth.c                     |   1 +
 drivers/net/bcm6348-eth.c                     |   1 +
 drivers/net/bcm6368-eth.c                     |   1 +
 drivers/net/bcmgenet.c                        |   1 +
 drivers/net/cs8900.c                          |   1 +
 drivers/net/designware.c                      |   1 +
 drivers/net/dnet.c                            |   1 +
 drivers/net/dwc_eth_qos.c                     |   1 +
 drivers/net/e1000.c                           |   1 +
 drivers/net/ep93xx_eth.c                      |   1 +
 drivers/net/ethoc.c                           |   1 +
 drivers/net/fec_mxc.c                         |   1 +
 drivers/net/fm/eth.c                          |   1 +
 drivers/net/fm/memac.c                        |   1 +
 drivers/net/fsl-mc/dpio/qbman_portal.c        |   1 +
 drivers/net/fsl-mc/mc.c                       |   1 +
 drivers/net/ftgmac100.c                       |   2 +
 drivers/net/ftmac110.c                        |   1 +
 drivers/net/gmac_rockchip.c                   |   1 +
 drivers/net/higmacv300.c                      |   1 +
 drivers/net/ks8851_mll.c                      |   1 +
 drivers/net/ldpaa_eth/ldpaa_eth.c             |   1 +
 drivers/net/lpc32xx_eth.c                     |   1 +
 drivers/net/macb.c                            |   1 +
 drivers/net/mdio_mux_i2creg.c                 |   1 +
 drivers/net/mscc_eswitch/mscc_xfer.c          |   1 +
 drivers/net/mscc_eswitch/ocelot_switch.c      |   1 +
 drivers/net/mscc_eswitch/serval_switch.c      |   1 +
 drivers/net/mt7628-eth.c                      |   1 +
 drivers/net/mtk_eth.c                         |   1 +
 drivers/net/mvgbe.c                           |   1 +
 drivers/net/mvneta.c                          |   1 +
 drivers/net/ne2000_base.c                     |   1 +
 drivers/net/netconsole.c                      |   1 +
 drivers/net/ns8382x.c                         |   1 +
 drivers/net/pch_gbe.c                         |   1 +
 drivers/net/pcnet.c                           |   1 +
 drivers/net/pfe_eth/pfe_cmd.c                 |   2 +
 drivers/net/pfe_eth/pfe_driver.c              |   1 +
 drivers/net/pfe_eth/pfe_eth.c                 |   1 +
 drivers/net/pfe_eth/pfe_firmware.c            |   1 +
 drivers/net/pfe_eth/pfe_hw.c                  |   1 +
 drivers/net/pfe_eth/pfe_mdio.c                |   1 +
 drivers/net/phy/aquantia.c                    |   1 +
 drivers/net/phy/cortina.c                     |   1 +
 drivers/net/phy/dp83867.c                     |   1 +
 drivers/net/phy/mscc.c                        |   1 +
 drivers/net/phy/mv88e61xx.c                   |   1 +
 drivers/net/phy/mv88e6352.c                   |   1 +
 drivers/net/phy/ncsi.c                        |   1 +
 drivers/net/phy/phy.c                         |   1 +
 drivers/net/phy/xilinx_gmii2rgmii.c           |   1 +
 drivers/net/phy/xilinx_phy.c                  |   1 +
 drivers/net/pic32_eth.c                       |   1 +
 drivers/net/ravb.c                            |   1 +
 drivers/net/rtl8139.c                         |   3 +-
 drivers/net/rtl8169.c                         |   1 +
 drivers/net/sandbox-raw.c                     |   1 +
 drivers/net/sandbox.c                         |   1 +
 drivers/net/sh_eth.c                          |   1 +
 drivers/net/sni_ave.c                         |   1 +
 drivers/net/sun8i_emac.c                      |   1 +
 drivers/net/sunxi_emac.c                      |   1 +
 drivers/net/ti/cpsw.c                         |   1 +
 drivers/net/ti/cpsw_mdio.c                    |   1 +
 drivers/net/ti/davinci_emac.c                 |   1 +
 drivers/net/vsc7385.c                         |   1 +
 drivers/net/vsc9953.c                         |   2 +
 drivers/net/xilinx_axi_emac.c                 |   1 +
 drivers/net/xilinx_emaclite.c                 |   1 +
 drivers/net/zynq_gem.c                        |   1 +
 drivers/nvme/nvme.c                           |   1 +
 drivers/pch/pch7.c                            |   1 +
 drivers/pch/pch9.c                            |   1 +
 drivers/pci/fsl_pci_init.c                    |   1 +
 drivers/pci/pci-emul-uclass.c                 |   1 +
 drivers/pci/pci-uclass.c                      |   1 +
 drivers/pci/pci.c                             |   1 +
 drivers/pci/pci_auto.c                        |   1 +
 drivers/pci/pci_auto_common.c                 |   1 +
 drivers/pci/pci_auto_old.c                    |   1 +
 drivers/pci/pci_compat.c                      |   1 +
 drivers/pci/pci_ftpci100.c                    |   1 +
 drivers/pci/pci_gt64120.c                     |   1 +
 drivers/pci/pci_mvebu.c                       |   1 +
 drivers/pci/pci_rom.c                         |   1 +
 drivers/pci/pci_sandbox.c                     |   1 +
 drivers/pci/pci_tegra.c                       |   1 +
 drivers/pci/pcie_dw_mvebu.c                   |   1 +
 drivers/pci/pcie_dw_ti.c                      |   1 +
 drivers/pci/pcie_imx.c                        |   1 +
 drivers/pci/pcie_layerscape.c                 |   1 +
 drivers/pci/pcie_layerscape_fixup.c           |   1 +
 drivers/pci/pcie_layerscape_gen4.c            |   1 +
 drivers/pci/pcie_layerscape_gen4_fixup.c      |   1 +
 drivers/pci/pcie_mediatek.c                   |   1 +
 drivers/phy/allwinner/phy-sun4i-usb.c         |   1 +
 drivers/phy/bcm6318-usbh-phy.c                |   1 +
 drivers/phy/bcm6348-usbh-phy.c                |   1 +
 drivers/phy/bcm6358-usbh-phy.c                |   1 +
 drivers/phy/bcm6368-usbh-phy.c                |   1 +
 drivers/phy/keystone-usb-phy.c                |   1 +
 drivers/phy/marvell/comphy_a3700.c            |   1 +
 drivers/phy/marvell/comphy_cp110.c            |   1 +
 drivers/phy/marvell/comphy_mux.c              |   1 +
 drivers/phy/meson-g12a-usb2.c                 |   1 +
 drivers/phy/mt76x8-usb-phy.c                  |   1 +
 drivers/phy/phy-da8xx-usb.c                   |   1 +
 drivers/phy/phy-stm32-usbphyc.c               |   1 +
 drivers/phy/phy-ti-am654.c                    |   1 +
 drivers/phy/phy-uclass.c                      |   1 +
 drivers/phy/sti_usb_phy.c                     |   1 +
 drivers/pinctrl/aspeed/pinctrl_ast2500.c      |   1 +
 drivers/pinctrl/ath79/pinctrl_ar933x.c        |   1 +
 drivers/pinctrl/ath79/pinctrl_qca953x.c       |   1 +
 drivers/pinctrl/broadcom/pinctrl-bcm283x.c    |   1 +
 drivers/pinctrl/intel/pinctrl.c               |   1 +
 drivers/pinctrl/intel/pinctrl_apl.c           |   1 +
 drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c |   1 +
 drivers/pinctrl/meson/pinctrl-meson-gx-pmx.c  |   1 +
 drivers/pinctrl/meson/pinctrl-meson.c         |   1 +
 drivers/pinctrl/mvebu/pinctrl-mvebu.c         |   1 +
 drivers/pinctrl/nxp/pinctrl-mxs.c             |   1 +
 drivers/pinctrl/pinctrl-at91.c                |   1 +
 drivers/pinctrl/pinctrl-sandbox.c             |   1 +
 drivers/pinctrl/pinctrl_pic32.c               |   1 +
 drivers/pinctrl/pinctrl_stm32.c               |   1 +
 drivers/pinctrl/rockchip/pinctrl-px30.c       |   1 +
 drivers/pinctrl/rockchip/pinctrl-rk3188.c     |   1 +
 drivers/pinctrl/rockchip/pinctrl-rk322x.c     |   1 +
 drivers/pinctrl/rockchip/pinctrl-rk3288.c     |   1 +
 drivers/pinctrl/rockchip/pinctrl-rk3308.c     |   1 +
 drivers/pinctrl/rockchip/pinctrl-rk3328.c     |   1 +
 drivers/pinctrl/rockchip/pinctrl-rk3368.c     |   1 +
 drivers/pinctrl/rockchip/pinctrl-rk3399.c     |   1 +
 .../pinctrl/rockchip/pinctrl-rockchip-core.c  |   1 +
 drivers/pinctrl/rockchip/pinctrl-rv1108.c     |   1 +
 drivers/power/acpi_pmc/pmc_emul.c             |   1 +
 drivers/power/acpi_pmc/sandbox.c              |   1 +
 drivers/power/battery/bat_trats.c             |   1 +
 drivers/power/battery/bat_trats2.c            |   1 +
 .../power/domain/imx8-power-domain-legacy.c   |   1 +
 drivers/power/domain/imx8-power-domain.c      |   1 +
 drivers/power/domain/meson-ee-pwrc.c          |   1 +
 drivers/power/domain/meson-gx-pwrc-vpu.c      |   1 +
 drivers/power/domain/power-domain-uclass.c    |   1 +
 drivers/power/domain/sandbox-power-domain.c   |   1 +
 drivers/power/domain/tegra186-power-domain.c  |   1 +
 drivers/power/domain/ti-sci-power-domain.c    |   1 +
 drivers/power/exynos-tmu.c                    |   1 +
 drivers/power/fuel_gauge/fg_max17042.c        |   1 +
 drivers/power/mfd/fg_max77693.c               |   1 +
 drivers/power/mfd/muic_max77693.c             |   1 +
 drivers/power/mfd/pmic_max77693.c             |   1 +
 drivers/power/pmic/act8846.c                  |   1 +
 drivers/power/pmic/as3722.c                   |   1 +
 drivers/power/pmic/bd71837.c                  |   1 +
 drivers/power/pmic/da9063.c                   |   1 +
 drivers/power/pmic/fan53555.c                 |   1 +
 drivers/power/pmic/i2c_pmic_emul.c            |   1 +
 drivers/power/pmic/lp873x.c                   |   1 +
 drivers/power/pmic/lp87565.c                  |   1 +
 drivers/power/pmic/max77686.c                 |   1 +
 drivers/power/pmic/muic_max8997.c             |   1 +
 drivers/power/pmic/palmas.c                   |   1 +
 drivers/power/pmic/pca9450.c                  |   1 +
 drivers/power/pmic/pfuze100.c                 |   1 +
 drivers/power/pmic/pmic-uclass.c              |   1 +
 drivers/power/pmic/pmic_max8997.c             |   1 +
 drivers/power/pmic/pmic_tps65910_dm.c         |   1 +
 drivers/power/pmic/rk8xx.c                    |   1 +
 drivers/power/pmic/rn5t567.c                  |   1 +
 drivers/power/pmic/s2mps11.c                  |   1 +
 drivers/power/pmic/s5m8767.c                  |   1 +
 drivers/power/pmic/tps65090.c                 |   1 +
 drivers/power/pmic/tps65941.c                 |   1 +
 drivers/power/power_core.c                    |   1 +
 drivers/power/power_dialog.c                  |   1 +
 drivers/power/power_i2c.c                     |   1 +
 drivers/power/regulator/as3722_regulator.c    |   1 +
 drivers/power/regulator/bd71837.c             |   1 +
 drivers/power/regulator/fan53555.c            |   1 +
 drivers/power/regulator/fixed.c               |   1 +
 drivers/power/regulator/gpio-regulator.c      |   1 +
 drivers/power/regulator/lp87565_regulator.c   |   1 +
 drivers/power/regulator/pbias_regulator.c     |   1 +
 drivers/power/regulator/pfuze100.c            |   1 +
 drivers/power/regulator/pwm_regulator.c       |   1 +
 drivers/power/regulator/regulator-uclass.c    |   1 +
 drivers/power/regulator/regulator_common.c    |   1 +
 drivers/power/regulator/rk8xx.c               |   1 +
 drivers/power/regulator/tps65090_regulator.c  |   1 +
 drivers/power/regulator/tps65910_regulator.c  |   1 +
 drivers/power/regulator/tps65941_regulator.c  |   1 +
 drivers/power/tps6586x.c                      |   1 +
 drivers/pwm/exynos_pwm.c                      |   1 +
 drivers/pwm/pwm-imx.c                         |   1 +
 drivers/pwm/rk_pwm.c                          |   1 +
 drivers/pwm/sunxi_pwm.c                       |   1 +
 drivers/pwm/tegra_pwm.c                       |   1 +
 drivers/qe/uec.c                              |   1 +
 drivers/ram/imxrt_sdram.c                     |   1 +
 drivers/ram/k3-am654-ddrss.c                  |   1 +
 drivers/ram/k3-j721e/k3-j721e-ddrss.c         |   1 +
 drivers/ram/mpc83xx_sdram.c                   |   1 +
 drivers/ram/rockchip/dmc-rk3368.c             |   1 +
 drivers/ram/rockchip/sdram_px30.c             |   1 +
 drivers/ram/rockchip/sdram_rk3128.c           |   1 +
 drivers/ram/rockchip/sdram_rk3188.c           |   1 +
 drivers/ram/rockchip/sdram_rk3288.c           |   1 +
 drivers/ram/rockchip/sdram_rk3328.c           |   1 +
 drivers/ram/rockchip/sdram_rk3399.c           |   1 +
 drivers/ram/stm32_sdram.c                     |   1 +
 drivers/ram/stm32mp1/stm32mp1_ddr.c           |   1 +
 drivers/ram/stm32mp1/stm32mp1_interactive.c   |   1 +
 drivers/ram/stm32mp1/stm32mp1_ram.c           |   1 +
 drivers/ram/stm32mp1/stm32mp1_tests.c         |   1 +
 drivers/ram/stm32mp1/stm32mp1_tuning.c        |   1 +
 drivers/remoteproc/k3_system_controller.c     |   1 +
 drivers/remoteproc/rproc-elf-loader.c         |   1 +
 drivers/remoteproc/rproc-uclass.c             |   1 +
 drivers/remoteproc/sandbox_testproc.c         |   1 +
 drivers/remoteproc/stm32_copro.c              |   1 +
 drivers/remoteproc/ti_k3_dsp_rproc.c          |   1 +
 drivers/remoteproc/ti_k3_r5f_rproc.c          |   1 +
 drivers/remoteproc/ti_power_proc.c            |   1 +
 drivers/reset/ast2500-reset.c                 |   1 +
 drivers/reset/reset-bcm6345.c                 |   1 +
 drivers/reset/reset-hisilicon.c               |   1 +
 drivers/reset/reset-hsdk.c                    |   1 +
 drivers/reset/reset-imx7.c                    |   1 +
 drivers/reset/reset-mediatek.c                |   1 +
 drivers/reset/reset-meson.c                   |   1 +
 drivers/reset/reset-mtmips.c                  |   1 +
 drivers/reset/reset-rockchip.c                |   1 +
 drivers/reset/reset-socfpga.c                 |   1 +
 drivers/reset/reset-sunxi.c                   |   1 +
 drivers/reset/reset-ti-sci.c                  |   1 +
 drivers/reset/reset-uclass.c                  |   1 +
 drivers/reset/reset-uniphier.c                |   1 +
 drivers/reset/sandbox-reset-test.c            |   1 +
 drivers/reset/sandbox-reset.c                 |   1 +
 drivers/reset/sti-reset.c                     |   1 +
 drivers/reset/stm32-reset.c                   |   1 +
 drivers/reset/tegra-car-reset.c               |   1 +
 drivers/reset/tegra186-reset.c                |   1 +
 drivers/rng/stm32mp1_rng.c                    |   1 +
 drivers/rtc/davinci.c                         |   1 +
 drivers/rtc/ds1307.c                          |   1 +
 drivers/rtc/ds1337.c                          |   1 +
 drivers/rtc/ds3231.c                          |   1 +
 drivers/rtc/ftrtc010.c                        |   1 +
 drivers/rtc/i2c_rtc_emul.c                    |   1 +
 drivers/rtc/m41t11.c                          |   1 +
 drivers/rtc/m41t60.c                          |   1 +
 drivers/rtc/m41t62.c                          |   1 +
 drivers/rtc/pcf2127.c                         |   1 +
 drivers/rtc/pcf8563.c                         |   1 +
 drivers/rtc/pl031.c                           |   1 +
 drivers/rtc/pt7c4338.c                        |   1 +
 drivers/rtc/rtc-uclass.c                      |   1 +
 drivers/rtc/rv3029.c                          |   1 +
 drivers/rtc/rv8803.c                          |   1 +
 drivers/rtc/x1205.c                           |   1 +
 drivers/scsi/scsi.c                           |   1 +
 drivers/serial/ns16550.c                      |   1 +
 drivers/serial/serial_efi.c                   |   1 +
 drivers/serial/serial_lpuart.c                |   1 +
 drivers/serial/serial_mtk.c                   |   1 +
 drivers/serial/serial_omap.c                  |   1 +
 drivers/serial/serial_sifive.c                |   1 +
 drivers/serial/serial_sti_asc.c               |   1 +
 drivers/serial/serial_stm32.c                 |   1 +
 drivers/serial/serial_zynq.c                  |   1 +
 drivers/soc/ti/k3-navss-ringacc.c             |   1 +
 drivers/sound/broadwell_i2s.c                 |   1 +
 drivers/sound/hda_codec.c                     |   1 +
 drivers/sound/ivybridge_sound.c               |   1 +
 drivers/sound/max98088.c                      |   1 +
 drivers/sound/max98090.c                      |   1 +
 drivers/sound/max98095.c                      |   1 +
 drivers/sound/maxim_codec.c                   |   1 +
 drivers/sound/rockchip_i2s.c                  |   1 +
 drivers/sound/rockchip_sound.c                |   1 +
 drivers/sound/rt5677.c                        |   1 +
 drivers/sound/samsung-i2s.c                   |   1 +
 drivers/sound/samsung_sound.c                 |   1 +
 drivers/sound/sandbox.c                       |   1 +
 drivers/sound/sound-uclass.c                  |   1 +
 drivers/sound/sound.c                         |   1 +
 drivers/sound/tegra_ahub.c                    |   1 +
 drivers/sound/tegra_i2s.c                     |   1 +
 drivers/sound/tegra_sound.c                   |   1 +
 drivers/sound/wm8994.c                        |   1 +
 drivers/spi/altera_spi.c                      |   1 +
 drivers/spi/atcspi200_spi.c                   |   1 +
 drivers/spi/bcm63xx_hsspi.c                   |   1 +
 drivers/spi/bcm63xx_spi.c                     |   1 +
 drivers/spi/cadence_qspi.c                    |   1 +
 drivers/spi/cadence_qspi_apb.c                |   1 +
 drivers/spi/cf_spi.c                          |   1 +
 drivers/spi/davinci_spi.c                     |   1 +
 drivers/spi/designware_spi.c                  |   1 +
 drivers/spi/exynos_spi.c                      |   1 +
 drivers/spi/fsl_dspi.c                        |   1 +
 drivers/spi/fsl_espi.c                        |   1 +
 drivers/spi/fsl_qspi.c                        |   1 +
 drivers/spi/ich.c                             |   1 +
 drivers/spi/kirkwood_spi.c                    |   1 +
 drivers/spi/lpc32xx_ssp.c                     |   1 +
 drivers/spi/meson_spifc.c                     |   1 +
 drivers/spi/mpc8xxx_spi.c                     |   1 +
 drivers/spi/mscc_bb_spi.c                     |   1 +
 drivers/spi/mt7621_spi.c                      |   1 +
 drivers/spi/mvebu_a3700_spi.c                 |   1 +
 drivers/spi/mxc_spi.c                         |   1 +
 drivers/spi/mxs_spi.c                         |   1 +
 drivers/spi/pic32_spi.c                       |   1 +
 drivers/spi/rk_spi.c                          |   1 +
 drivers/spi/sandbox_spi.c                     |   1 +
 drivers/spi/soft_spi.c                        |   1 +
 drivers/spi/spi-mem-nodm.c                    |   1 +
 drivers/spi/spi-mem.c                         |   1 +
 drivers/spi/spi-sunxi.c                       |   1 +
 drivers/spi/spi-uclass.c                      |   1 +
 drivers/spi/stm32_qspi.c                      |   1 +
 drivers/spi/stm32_spi.c                       |   1 +
 drivers/spi/tegra114_spi.c                    |   1 +
 drivers/spi/tegra20_sflash.c                  |   1 +
 drivers/spi/tegra20_slink.c                   |   1 +
 drivers/spi/tegra210_qspi.c                   |   1 +
 drivers/spi/ti_qspi.c                         |   1 +
 drivers/spi/uniphier_spi.c                    |   1 +
 drivers/spi/xilinx_spi.c                      |   1 +
 drivers/spi/zynq_qspi.c                       |   1 +
 drivers/spi/zynq_spi.c                        |   1 +
 drivers/spi/zynqmp_gqspi.c                    |   1 +
 drivers/sysreset/sysreset-ti-sci.c            |   1 +
 drivers/sysreset/sysreset-uclass.c            |   1 +
 drivers/sysreset/sysreset_ast.c               |   1 +
 drivers/sysreset/sysreset_gpio.c              |   1 +
 drivers/sysreset/sysreset_mpc83xx.c           |   1 +
 drivers/tee/tee-uclass.c                      |   1 +
 drivers/thermal/imx_scu_thermal.c             |   1 +
 drivers/thermal/imx_thermal.c                 |   1 +
 drivers/timer/mpc83xx_timer.c                 |   1 +
 drivers/timer/rockchip_timer.c                |   1 +
 drivers/timer/tsc_timer.c                     |   1 +
 drivers/tpm/cr50_i2c.c                        |   1 +
 drivers/tpm/tpm-uclass.c                      |   1 +
 drivers/tpm/tpm2_ftpm_tee.c                   |   1 +
 drivers/tpm/tpm_tis_infineon.c                |   1 +
 drivers/tpm/tpm_tis_lpc.c                     |   1 +
 drivers/tpm/tpm_tis_st33zp24_i2c.c            |   1 +
 drivers/tpm/tpm_tis_st33zp24_spi.c            |   1 +
 drivers/ufs/ufs.c                             |   1 +
 drivers/usb/cdns3/core.c                      |   1 +
 drivers/usb/common/fsl-dt-fixup.c             |   1 +
 drivers/usb/dwc3/dwc3-generic.c               |   1 +
 drivers/usb/dwc3/dwc3-meson-g12a.c            |   1 +
 drivers/usb/dwc3/gadget.c                     |   1 +
 drivers/usb/emul/sandbox_flash.c              |   1 +
 drivers/usb/emul/sandbox_hub.c                |   1 +
 drivers/usb/emul/sandbox_keyb.c               |   1 +
 drivers/usb/emul/usb-emul-uclass.c            |   1 +
 drivers/usb/eth/asix.c                        |   1 +
 drivers/usb/eth/asix88179.c                   |   1 +
 drivers/usb/eth/lan75xx.c                     |   1 +
 drivers/usb/eth/lan78xx.c                     |   1 +
 drivers/usb/eth/lan7x.c                       |   1 +
 drivers/usb/eth/mcs7830.c                     |   1 +
 drivers/usb/eth/r8152.c                       |   1 +
 drivers/usb/eth/smsc95xx.c                    |   1 +
 drivers/usb/eth/usb_ether.c                   |   1 +
 drivers/usb/gadget/composite.c                |   1 +
 drivers/usb/gadget/core.c                     |   1 +
 drivers/usb/gadget/dwc2_udc_otg.c             |   1 +
 drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c    |   1 +
 drivers/usb/gadget/ether.c                    |   1 +
 drivers/usb/gadget/f_dfu.c                    |   1 +
 drivers/usb/gadget/f_fastboot.c               |   1 +
 drivers/usb/gadget/f_mass_storage.c           |   1 +
 drivers/usb/gadget/f_rockusb.c                |   1 +
 drivers/usb/gadget/f_sdp.c                    |   1 +
 drivers/usb/gadget/f_thor.c                   |   1 +
 drivers/usb/gadget/fotg210.c                  |   1 +
 drivers/usb/gadget/g_dnl.c                    |   1 +
 drivers/usb/gadget/pxa25x_udc.c               |   1 +
 drivers/usb/gadget/rndis.c                    |   1 +
 drivers/usb/gadget/storage_common.c           |   1 +
 drivers/usb/host/dwc2.c                       |   1 +
 drivers/usb/host/dwc3-sti-glue.c              |   1 +
 drivers/usb/host/ehci-armada100.c             |   1 +
 drivers/usb/host/ehci-atmel.c                 |   1 +
 drivers/usb/host/ehci-exynos.c                |   1 +
 drivers/usb/host/ehci-faraday.c               |   1 +
 drivers/usb/host/ehci-fsl.c                   |   1 +
 drivers/usb/host/ehci-generic.c               |   1 +
 drivers/usb/host/ehci-hcd.c                   |   1 +
 drivers/usb/host/ehci-marvell.c               |   1 +
 drivers/usb/host/ehci-mx5.c                   |   1 +
 drivers/usb/host/ehci-mx6.c                   |   1 +
 drivers/usb/host/ehci-omap.c                  |   1 +
 drivers/usb/host/ehci-pci.c                   |   1 +
 drivers/usb/host/ehci-spear.c                 |   1 +
 drivers/usb/host/ehci-tegra.c                 |   1 +
 drivers/usb/host/ehci-vf.c                    |   1 +
 drivers/usb/host/ohci-generic.c               |   1 +
 drivers/usb/host/ohci-lpc32xx.c               |   1 +
 drivers/usb/host/r8a66597-hcd.c               |   1 +
 drivers/usb/host/usb-sandbox.c                |   1 +
 drivers/usb/host/usb-uclass.c                 |   1 +
 drivers/usb/host/xhci-dwc3.c                  |   1 +
 drivers/usb/host/xhci-exynos5.c               |   1 +
 drivers/usb/host/xhci-fsl.c                   |   1 +
 drivers/usb/host/xhci-mem.c                   |   1 +
 drivers/usb/host/xhci-mvebu.c                 |   1 +
 drivers/usb/host/xhci-omap.c                  |   1 +
 drivers/usb/host/xhci-pci.c                   |   1 +
 drivers/usb/host/xhci-rcar.c                  |   1 +
 drivers/usb/host/xhci-ring.c                  |   1 +
 drivers/usb/host/xhci-rockchip.c              |   1 +
 drivers/usb/host/xhci.c                       |   1 +
 drivers/usb/musb-new/da8xx.c                  |   1 +
 drivers/usb/musb-new/musb_core.c              |   1 +
 drivers/usb/musb-new/musb_gadget.c            |   1 +
 drivers/usb/musb-new/musb_gadget_ep0.c        |   1 +
 drivers/usb/musb-new/omap2430.c               |   1 +
 drivers/usb/musb-new/sunxi.c                  |   1 +
 drivers/usb/musb-new/ti-musb.c                |   1 +
 drivers/usb/musb/musb_hcd.c                   |   1 +
 drivers/usb/phy/rockchip_usb2_phy.c           |   1 +
 drivers/usb/ulpi/omap-ulpi-viewport.c         |   1 +
 drivers/usb/ulpi/ulpi.c                       |   1 +
 drivers/video/am335x-fb.c                     |   1 +
 drivers/video/atmel_hlcdfb.c                  |   1 +
 drivers/video/atmel_lcdfb.c                   |   1 +
 drivers/video/backlight_gpio.c                |   1 +
 drivers/video/bcm2835.c                       |   1 +
 drivers/video/bridge/anx6345.c                |   1 +
 drivers/video/bridge/ps862x.c                 |   1 +
 drivers/video/bridge/ptn3460.c                |   1 +
 drivers/video/bridge/video-bridge-uclass.c    |   1 +
 drivers/video/broadwell_igd.c                 |   1 +
 drivers/video/bus_vcxk.c                      |   1 +
 drivers/video/cfb_console.c                   |   1 +
 drivers/video/console_truetype.c              |   1 +
 drivers/video/da8xx-fb.c                      |   1 +
 drivers/video/dw_hdmi.c                       |   1 +
 drivers/video/efi.c                           |   1 +
 drivers/video/exynos/exynos_dp.c              |   1 +
 drivers/video/exynos/exynos_dp_lowlevel.c     |   1 +
 drivers/video/exynos/exynos_fb.c              |   1 +
 drivers/video/exynos/exynos_mipi_dsi.c        |   1 +
 drivers/video/exynos/exynos_mipi_dsi_common.c |   1 +
 drivers/video/formike.c                       |   1 +
 drivers/video/ihs_video_out.c                 |   1 +
 drivers/video/imx/ipu_common.c                |   1 +
 drivers/video/imx/ipu_disp.c                  |   1 +
 drivers/video/imx/mxc_ipuv3_fb.c              |   1 +
 drivers/video/ivybridge_igd.c                 |   1 +
 drivers/video/lg4573.c                        |   1 +
 drivers/video/meson/meson_dw_hdmi.c           |   1 +
 drivers/video/meson/meson_vclk.c              |   1 +
 drivers/video/meson/meson_venc.c              |   1 +
 drivers/video/meson/meson_vpu.c               |   1 +
 drivers/video/mx3fb.c                         |   1 +
 drivers/video/mxsfb.c                         |   1 +
 drivers/video/pwm_backlight.c                 |   1 +
 drivers/video/pxa_lcd.c                       |   1 +
 drivers/video/rockchip/rk3288_hdmi.c          |   1 +
 drivers/video/rockchip/rk3288_mipi.c          |   1 +
 drivers/video/rockchip/rk3399_mipi.c          |   1 +
 drivers/video/rockchip/rk3399_vop.c           |   1 +
 drivers/video/rockchip/rk_edp.c               |   1 +
 drivers/video/rockchip/rk_hdmi.c              |   1 +
 drivers/video/rockchip/rk_lvds.c              |   1 +
 drivers/video/rockchip/rk_mipi.c              |   1 +
 drivers/video/rockchip/rk_vop.c               |   1 +
 drivers/video/sandbox_sdl.c                   |   1 +
 drivers/video/simple_panel.c                  |   1 +
 drivers/video/simplefb.c                      |   1 +
 drivers/video/stm32/stm32_dsi.c               |   1 +
 drivers/video/stm32/stm32_ltdc.c              |   1 +
 drivers/video/sunxi/lcdc.c                    |   1 +
 drivers/video/sunxi/sunxi_de2.c               |   1 +
 drivers/video/sunxi/sunxi_dw_hdmi.c           |   1 +
 drivers/video/sunxi/sunxi_lcd.c               |   1 +
 drivers/video/tegra.c                         |   1 +
 drivers/video/tegra124/display.c              |   1 +
 drivers/video/tegra124/dp.c                   |   1 +
 drivers/video/tegra124/sor.c                  |   1 +
 drivers/video/vidconsole-uclass.c             |   1 +
 drivers/video/video-uclass.c                  |   1 +
 drivers/video/video_bmp.c                     |   1 +
 drivers/virtio/virtio-uclass.c                |   1 +
 drivers/virtio/virtio_mmio.c                  |   1 +
 drivers/virtio/virtio_pci_legacy.c            |   1 +
 drivers/virtio/virtio_pci_modern.c            |   1 +
 drivers/virtio/virtio_ring.c                  |   1 +
 drivers/virtio/virtio_rng.c                   |   1 +
 drivers/w1-eeprom/w1-eeprom-uclass.c          |   1 +
 drivers/w1/w1-gpio.c                          |   1 +
 drivers/w1/w1-uclass.c                        |   1 +
 drivers/watchdog/ast_wdt.c                    |   1 +
 drivers/watchdog/at91sam9_wdt.c               |   1 +
 drivers/watchdog/bcm6345_wdt.c                |   1 +
 drivers/watchdog/cdns_wdt.c                   |   1 +
 drivers/watchdog/ftwdt010_wdt.c               |   1 +
 drivers/watchdog/omap_wdt.c                   |   1 +
 drivers/watchdog/orion_wdt.c                  |   1 +
 drivers/watchdog/sp805_wdt.c                  |   1 +
 drivers/watchdog/stm32mp_wdt.c                |   1 +
 drivers/watchdog/tangier_wdt.c                |   1 +
 drivers/watchdog/wdt-uclass.c                 |   1 +
 drivers/watchdog/xilinx_tb_wdt.c              |   1 +
 env/common.c                                  |   1 +
 env/env.c                                     |   1 +
 env/flash.c                                   |   1 +
 fs/btrfs/chunk-map.c                          |   1 +
 fs/btrfs/compression.c                        |   1 +
 fs/btrfs/ctree.c                              |   1 +
 fs/btrfs/super.c                              |   1 +
 fs/ext4/dev.c                                 |   1 +
 fs/ext4/ext4_common.c                         |   1 +
 fs/ext4/ext4_journal.c                        |   1 +
 fs/ext4/ext4_write.c                          |   1 +
 fs/fat/fat.c                                  |   1 +
 fs/fat/fat_write.c                            |   1 +
 fs/fs.c                                       |   1 +
 fs/fs_internal.c                              |   1 +
 fs/ubifs/budget.c                             |   1 +
 fs/ubifs/debug.c                              |   1 +
 fs/ubifs/gc.c                                 |   1 +
 fs/ubifs/io.c                                 |   1 +
 fs/ubifs/log.c                                |   1 +
 fs/ubifs/lprops.c                             |   1 +
 fs/ubifs/lpt.c                                |   1 +
 fs/ubifs/lpt_commit.c                         |   1 +
 fs/ubifs/master.c                             |   1 +
 fs/ubifs/orphan.c                             |   1 +
 fs/ubifs/recovery.c                           |   1 +
 fs/ubifs/replay.c                             |   1 +
 fs/ubifs/sb.c                                 |   1 +
 fs/ubifs/scan.c                               |   1 +
 fs/ubifs/super.c                              |   1 +
 fs/ubifs/tnc.c                                |   1 +
 fs/ubifs/tnc_misc.c                           |   1 +
 fs/ubifs/ubifs.c                              |   1 +
 fs/zfs/zfs.c                                  |   1 +
 include/common.h                              |   1 -
 include/efi_loader.h                          |   1 +
 include/i2c.h                                 |   2 +
 include/initcall.h                            |   1 +
 include/spl.h                                 |   1 +
 include/wait_bit.h                            |   4 +-
 include/wdt.h                                 |   1 +
 lib/acpi/acpi_table.c                         |   1 +
 lib/aes.c                                     |   1 +
 lib/asn1_decoder.c                            |   1 +
 lib/bch.c                                     |   1 +
 lib/binman.c                                  |   1 +
 lib/bzip2/bzlib_blocksort.c                   |   1 +
 lib/circbuf.c                                 |   1 +
 lib/crypto/asymmetric_type.c                  |   1 +
 lib/crypto/pkcs7_parser.c                     |   1 +
 lib/crypto/x509_cert_parser.c                 |   1 +
 lib/efi_driver/efi_uclass.c                   |   1 +
 lib/efi_loader/efi_acpi.c                     |   1 +
 lib/efi_loader/efi_bootmgr.c                  |   1 +
 lib/efi_loader/efi_boottime.c                 |   1 +
 lib/efi_loader/efi_device_path.c              |   1 +
 lib/efi_loader/efi_file.c                     |   1 +
 lib/efi_loader/efi_gop.c                      |   1 +
 lib/efi_loader/efi_rng.c                      |   1 +
 lib/efi_loader/efi_runtime.c                  |   1 +
 lib/efi_loader/efi_smbios.c                   |   1 +
 lib/fdtdec.c                                  |   1 +
 lib/fdtdec_common.c                           |   1 +
 lib/hashtable.c                               |   1 +
 lib/image-sparse.c                            |   1 +
 lib/libavb/avb_cmdline.c                      |   1 +
 lib/libavb/avb_descriptor.c                   |   1 +
 lib/libavb/avb_slot_verify.c                  |   1 +
 lib/libavb/avb_util.c                         |   1 +
 lib/list_sort.c                               |   1 +
 lib/lmb.c                                     |   1 +
 lib/lzma/LzmaTools.c                          |   1 +
 lib/membuff.c                                 |   1 +
 lib/of_live.c                                 |   1 +
 lib/optee/optee.c                             |   1 +
 lib/physmem.c                                 |   1 +
 lib/qsort.c                                   |   1 +
 lib/rsa/rsa-mod-exp.c                         |   1 +
 lib/rsa/rsa-verify.c                          |   1 +
 lib/slre.c                                    |   1 +
 lib/tpm-common.c                              |   1 +
 lib/tpm-v1.c                                  |   1 +
 net/arp.c                                     |   1 +
 net/bootp.c                                   |   1 +
 net/dns.c                                     |   1 +
 net/eth-uclass.c                              |   1 +
 net/eth_legacy.c                              |   1 +
 net/link_local.c                              |   1 +
 net/mdio-mux-uclass.c                         |   1 +
 net/mdio-uclass.c                             |   1 +
 net/net.c                                     |   1 +
 net/nfs.c                                     |   1 +
 net/ping.c                                    |   1 +
 net/rarp.c                                    |   1 +
 net/sntp.c                                    |   1 +
 net/tftp.c                                    |   1 +
 post/cpu/mpc83xx/ecc.c                        |   1 +
 post/drivers/i2c.c                            |   1 +
 post/drivers/memory.c                         |   1 +
 post/lib_powerpc/multi.c                      |   1 +
 post/post.c                                   |   1 +
 test/command_ut.c                             |   1 +
 test/compression.c                            |   1 +
 test/dm/axi.c                                 |   1 +
 test/dm/board.c                               |   1 +
 test/dm/bootcount.c                           |   1 +
 test/dm/bus.c                                 |   1 +
 test/dm/clk.c                                 |   1 +
 test/dm/core.c                                |   1 +
 test/dm/cpu.c                                 |   1 +
 test/dm/devres.c                              |   1 +
 test/dm/eth.c                                 |   1 +
 test/dm/gpio.c                                |   1 +
 test/dm/mdio.c                                |   1 +
 test/dm/ofnode.c                              |   1 +
 test/dm/phy.c                                 |   1 +
 test/dm/regmap.c                              |   1 +
 test/dm/regulator.c                           |   1 +
 test/dm/reset.c                               |   1 +
 test/dm/rng.c                                 |   1 +
 test/dm/rtc.c                                 |   1 +
 test/dm/serial.c                              |   1 +
 test/dm/syscon.c                              |   1 +
 test/dm/tee.c                                 |   1 +
 test/dm/test-driver.c                         |   1 +
 test/dm/test-fdt.c                            |   1 +
 test/dm/test-main.c                           |   1 +
 test/dm/test-uclass.c                         |   1 +
 test/dm/video.c                               |   1 +
 test/env/hashtable.c                          |   1 +
 test/lib/lmb.c                                |   1 +
 test/lib/string.c                             |   1 +
 test/log/log_test.c                           |   1 +
 test/log/test-main.c                          |   1 +
 test/optee/cmd_ut_optee.c                     |   1 +
 test/overlay/cmd_ut_overlay.c                 |   1 +
 test/print_ut.c                               |   1 +
 test/unicode_ut.c                             |   1 +
 1532 files changed, 1851 insertions(+), 4 deletions(-)
 create mode 100644 arch/mips/mach-mtmips/ddr_calibrate.c

diff --git a/api/api_display.c b/api/api_display.c
index 8ae358abb1..4f2cdd7330 100644
--- a/api/api_display.c
+++ b/api/api_display.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <api_public.h>
 #include <lcd.h>
+#include <log.h>
 #include <video_font.h> /* Get font width and height */
 
 /* lcd.h needs BMP_LOGO_HEIGHT to calculate CONSOLE_ROWS */
diff --git a/arch/arc/lib/bootm.c b/arch/arc/lib/bootm.c
index 8f611efb56..63d6207c04 100644
--- a/arch/arc/lib/bootm.c
+++ b/arch/arc/lib/bootm.c
@@ -9,6 +9,7 @@
 #include <image.h>
 #include <irq_func.h>
 #include <lmb.h>
+#include <log.h>
 #include <asm/cache.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arc/lib/relocate.c b/arch/arc/lib/relocate.c
index 4ffba84eeb..6882ebec6d 100644
--- a/arch/arc/lib/relocate.c
+++ b/arch/arc/lib/relocate.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <elf.h>
+#include <log.h>
 #include <asm-generic/sections.h>
 
 extern ulong __image_copy_start;
diff --git a/arch/arm/cpu/arm926ejs/mxs/clock.c b/arch/arm/cpu/arm926ejs/mxs/clock.c
index 43d044d917..4e1cf3a1e3 100644
--- a/arch/arm/cpu/arm926ejs/mxs/clock.c
+++ b/arch/arm/cpu/arm926ejs/mxs/clock.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
index 83dd8b625e..565392eab5 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <config.h>
 #include <init.h>
+#include <log.h>
 #include <serial.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_lradc_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_lradc_init.c
index cfd6c4a10f..2cfbd78095 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_lradc_init.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_lradc_init.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <config.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c
index 542543cc28..a94803ee93 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <config.h>
 #include <init.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
index 7c57cab0b1..35ea71a5ba 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <config.h>
 #include <hang.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 
diff --git a/arch/arm/cpu/armv7/bcm235xx/clk-core.c b/arch/arm/cpu/armv7/bcm235xx/clk-core.c
index 72f8eb7222..04366c871f 100644
--- a/arch/arm/cpu/armv7/bcm235xx/clk-core.c
+++ b/arch/arm/cpu/armv7/bcm235xx/clk-core.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <bitfield.h>
diff --git a/arch/arm/cpu/armv7/bcm281xx/clk-core.c b/arch/arm/cpu/armv7/bcm281xx/clk-core.c
index 6a36f948f0..574a8a02d8 100644
--- a/arch/arm/cpu/armv7/bcm281xx/clk-core.c
+++ b/arch/arm/cpu/armv7/bcm281xx/clk-core.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <bitfield.h>
diff --git a/arch/arm/cpu/armv7/exception_level.c b/arch/arm/cpu/armv7/exception_level.c
index 6648aed291..f6d25bb682 100644
--- a/arch/arm/cpu/armv7/exception_level.c
+++ b/arch/arm/cpu/armv7/exception_level.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <bootm.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <asm/armv7.h>
 #include <asm/secure.h>
 #include <asm/setjmp.h>
diff --git a/arch/arm/cpu/armv7/ls102xa/soc.c b/arch/arm/cpu/armv7/ls102xa/soc.c
index a779d33739..8a95ee86a9 100644
--- a/arch/arm/cpu/armv7/ls102xa/soc.c
+++ b/arch/arm/cpu/armv7/ls102xa/soc.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/arch/clock.h>
 #include <asm/io.h>
 #include <asm/arch/fsl_serdes.h>
diff --git a/arch/arm/cpu/armv7/virt-dt.c b/arch/arm/cpu/armv7/virt-dt.c
index 204187c1b4..61c82f6469 100644
--- a/arch/arm/cpu/armv7/virt-dt.c
+++ b/arch/arm/cpu/armv7/virt-dt.c
@@ -17,6 +17,7 @@
 
 #include <common.h>
 #include <errno.h>
+#include <log.h>
 #include <stdio_dev.h>
 #include <linux/ctype.h>
 #include <linux/types.h>
diff --git a/arch/arm/cpu/armv7m/cache.c b/arch/arm/cpu/armv7m/cache.c
index f607b77d41..72fc34db1c 100644
--- a/arch/arm/cpu/armv7m/cache.c
+++ b/arch/arm/cpu/armv7m/cache.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <errno.h>
+#include <log.h>
 #include <asm/armv7m.h>
 #include <asm/cache.h>
 #include <asm/io.h>
diff --git a/arch/arm/cpu/armv8/cache_v8.c b/arch/arm/cpu/armv8/cache_v8.c
index a64bc1bde2..7ebcaa21a1 100644
--- a/arch/arm/cpu/armv8/cache_v8.c
+++ b/arch/arm/cpu/armv8/cache_v8.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <hang.h>
+#include <log.h>
 #include <asm/cache.h>
 #include <asm/system.h>
 #include <asm/armv8/mmu.h>
diff --git a/arch/arm/cpu/armv8/exception_level.c b/arch/arm/cpu/armv8/exception_level.c
index 10dd034c7b..b11936548f 100644
--- a/arch/arm/cpu/armv8/exception_level.c
+++ b/arch/arm/cpu/armv8/exception_level.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <bootm.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <asm/cache.h>
 #include <asm/setjmp.h>
 
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
index 19c642a022..a7f1e3f801 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
@@ -10,6 +10,7 @@
 #include <fsl_ddr_sdram.h>
 #include <init.h>
 #include <hang.h>
+#include <log.h>
 #include <net.h>
 #include <vsprintf.h>
 #include <asm/cache.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
index 1d94c7e0f8..499287e348 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <clock_legacy.h>
 #include <efi_loader.h>
+#include <log.h>
 #include <asm/cache.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_serdes.c b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_serdes.c
index cb64cc2db8..f24ca7f1dc 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_serdes.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_serdes.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <asm/arch/fsl_serdes.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c
index 07a47d51e4..3ac50966e1 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <log.h>
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <asm/arch/fsl_serdes.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/ls1028_ids.c b/arch/arm/cpu/armv8/fsl-layerscape/ls1028_ids.c
index e73689ce26..49df8b3790 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/ls1028_ids.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/ls1028_ids.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <fdt_support.h>
+#include <log.h>
 #include <asm/arch-fsl-layerscape/immap_lsch3.h>
 #include <asm/arch-fsl-layerscape/fsl_icid.h>
 #include <asm/arch-fsl-layerscape/fsl_portals.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/ppa.c b/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
index daaaeab26c..1ddb267093 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
@@ -3,6 +3,7 @@
  * Copyright 2016 NXP Semiconductor, Inc.
  */
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 #include <config.h>
 #include <errno.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/soc.c b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
index 664f12e861..ad7ea05935 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/soc.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
@@ -12,6 +12,7 @@
 #include <fsl_ifc.h>
 #include <init.h>
 #include <linux/sizes.h>
+#include <log.h>
 #include <asm/arch/fsl_serdes.h>
 #include <asm/arch/soc.h>
 #include <asm/cache.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/spl.c b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
index ec40df41f6..77724336d6 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/spl.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
@@ -9,6 +9,7 @@
 #include <env.h>
 #include <image.h>
 #include <init.h>
+#include <log.h>
 #include <spl.h>
 #include <asm/cache.h>
 #include <asm/io.h>
diff --git a/arch/arm/cpu/armv8/hisilicon/pinmux.c b/arch/arm/cpu/armv8/hisilicon/pinmux.c
index c549ddb335..6b6ad02031 100644
--- a/arch/arm/cpu/armv8/hisilicon/pinmux.c
+++ b/arch/arm/cpu/armv8/hisilicon/pinmux.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch/pinmux.h>
diff --git a/arch/arm/cpu/armv8/sec_firmware.c b/arch/arm/cpu/armv8/sec_firmware.c
index c7445e647e..789f9ca566 100644
--- a/arch/arm/cpu/armv8/sec_firmware.c
+++ b/arch/arm/cpu/armv8/sec_firmware.c
@@ -8,6 +8,7 @@
 #include <errno.h>
 #include <fdt_support.h>
 #include <image.h>
+#include <log.h>
 #include <asm/cache.h>
 #include <linux/kernel.h>
 #include <asm/io.h>
diff --git a/arch/arm/include/asm/arch-imx8/sci/sci.h b/arch/arm/include/asm/arch-imx8/sci/sci.h
index 05f736f14f..f91f7cc587 100644
--- a/arch/arm/include/asm/arch-imx8/sci/sci.h
+++ b/arch/arm/include/asm/arch-imx8/sci/sci.h
@@ -6,6 +6,7 @@
 #ifndef _SC_SCI_H
 #define _SC_SCI_H
 
+#include <log.h>
 #include <asm/arch/sci/types.h>
 #include <asm/arch/sci/svc/misc/api.h>
 #include <asm/arch/sci/svc/pad/api.h>
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 0facd0c989..2df98d3e01 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -18,6 +18,7 @@
 #include <dm.h>
 #include <hang.h>
 #include <lmb.h>
+#include <log.h>
 #include <dm/root.h>
 #include <env.h>
 #include <image.h>
diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c
index f803d6fb8c..1da2e92fe2 100644
--- a/arch/arm/lib/cache-cp15.c
+++ b/arch/arm/lib/cache-cp15.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <asm/system.h>
 #include <asm/cache.h>
 #include <linux/compiler.h>
diff --git a/arch/arm/lib/cache.c b/arch/arm/lib/cache.c
index d5c67c11de..ee7d14b2d3 100644
--- a/arch/arm/lib/cache.c
+++ b/arch/arm/lib/cache.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/cache.h>
 
diff --git a/arch/arm/lib/semihosting.c b/arch/arm/lib/semihosting.c
index 1b365a970f..904fddd6c0 100644
--- a/arch/arm/lib/semihosting.c
+++ b/arch/arm/lib/semihosting.c
@@ -14,6 +14,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <log.h>
 
 #define SYSOPEN		0x01
 #define SYSCLOSE	0x02
diff --git a/arch/arm/lib/spl.c b/arch/arm/lib/spl.c
index 5d5437cbbc..af0c9ad6bd 100644
--- a/arch/arm/lib/spl.c
+++ b/arch/arm/lib/spl.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <config.h>
 #include <init.h>
+#include <log.h>
 #include <spl.h>
 #include <image.h>
 #include <asm/cache.h>
diff --git a/arch/arm/mach-aspeed/ast2500-board.c b/arch/arm/mach-aspeed/ast2500-board.c
index 20594e0efb..f74dcbbb62 100644
--- a/arch/arm/mach-aspeed/ast2500-board.c
+++ b/arch/arm/mach-aspeed/ast2500-board.c
@@ -5,6 +5,7 @@
 #include <common.h>
 #include <dm.h>
 #include <init.h>
+#include <log.h>
 #include <ram.h>
 #include <timer.h>
 #include <asm/io.h>
diff --git a/arch/arm/mach-aspeed/ast2500/sdram_ast2500.c b/arch/arm/mach-aspeed/ast2500/sdram_ast2500.c
index 9498cbc92d..a3adaa8a99 100644
--- a/arch/arm/mach-aspeed/ast2500/sdram_ast2500.c
+++ b/arch/arm/mach-aspeed/ast2500/sdram_ast2500.c
@@ -9,6 +9,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <ram.h>
 #include <regmap.h>
 #include <reset.h>
diff --git a/arch/arm/mach-at91/arm926ejs/eflash.c b/arch/arm/mach-at91/arm926ejs/eflash.c
index c875bfd89b..23c24936ed 100644
--- a/arch/arm/mach-at91/arm926ejs/eflash.c
+++ b/arch/arm/mach-at91/arm926ejs/eflash.c
@@ -44,6 +44,7 @@
  */
 #include <common.h>
 #include <flash.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/at91_common.h>
diff --git a/arch/arm/mach-at91/spl_at91.c b/arch/arm/mach-at91/spl_at91.c
index b78cafdd9c..35a3d5185d 100644
--- a/arch/arm/mach-at91/spl_at91.c
+++ b/arch/arm/mach-at91/spl_at91.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <hang.h>
 #include <init.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/at91_common.h>
 #include <asm/arch/at91sam9_matrix.h>
diff --git a/arch/arm/mach-at91/spl_atmel.c b/arch/arm/mach-at91/spl_atmel.c
index f40bc531d4..23588e79f9 100644
--- a/arch/arm/mach-at91/spl_atmel.c
+++ b/arch/arm/mach-at91/spl_atmel.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <hang.h>
 #include <init.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/at91_common.h>
 #include <asm/arch/at91_pit.h>
diff --git a/arch/arm/mach-bcm283x/mbox.c b/arch/arm/mach-bcm283x/mbox.c
index da0b4feacb..da9faafe1d 100644
--- a/arch/arm/mach-bcm283x/mbox.c
+++ b/arch/arm/mach-bcm283x/mbox.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/arch/base.h>
diff --git a/arch/arm/mach-davinci/misc.c b/arch/arm/mach-davinci/misc.c
index 3e5185261c..5bfc47dae4 100644
--- a/arch/arm/mach-davinci/misc.c
+++ b/arch/arm/mach-davinci/misc.c
@@ -12,6 +12,7 @@
 #include <env.h>
 #include <i2c.h>
 #include <init.h>
+#include <log.h>
 #include <net.h>
 #include <asm/arch/hardware.h>
 #include <asm/io.h>
diff --git a/arch/arm/mach-exynos/clock.c b/arch/arm/mach-exynos/clock.c
index 73aa4cdad3..ef48d35aa4 100644
--- a/arch/arm/mach-exynos/clock.c
+++ b/arch/arm/mach-exynos/clock.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/clk.h>
diff --git a/arch/arm/mach-exynos/pinmux.c b/arch/arm/mach-exynos/pinmux.c
index b24f1bb8f4..ad3fbf2da7 100644
--- a/arch/arm/mach-exynos/pinmux.c
+++ b/arch/arm/mach-exynos/pinmux.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <asm/gpio.h>
 #include <asm/arch/pinmux.h>
 #include <asm/arch/sromc.h>
diff --git a/arch/arm/mach-exynos/spl_boot.c b/arch/arm/mach-exynos/spl_boot.c
index d9672e79ef..9c7ca49519 100644
--- a/arch/arm/mach-exynos/spl_boot.c
+++ b/arch/arm/mach-exynos/spl_boot.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <config.h>
 #include <init.h>
+#include <log.h>
 
 #include <asm/cache.h>
 #include <asm/arch/clock.h>
diff --git a/arch/arm/mach-imx/cmd_dek.c b/arch/arm/mach-imx/cmd_dek.c
index 5f21d2b1c5..49dd473af7 100644
--- a/arch/arm/mach-imx/cmd_dek.c
+++ b/arch/arm/mach-imx/cmd_dek.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/byteorder.h>
 #include <linux/compiler.h>
diff --git a/arch/arm/mach-imx/cmd_nandbcb.c b/arch/arm/mach-imx/cmd_nandbcb.c
index 327b3ed5e8..85abbb4a89 100644
--- a/arch/arm/mach-imx/cmd_nandbcb.c
+++ b/arch/arm/mach-imx/cmd_nandbcb.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <log.h>
 #include <malloc.h>
 #include <nand.h>
 #include <dm/devres.h>
diff --git a/arch/arm/mach-imx/cpu.c b/arch/arm/mach-imx/cpu.c
index 97464391d5..824b30b8ae 100644
--- a/arch/arm/mach-imx/cpu.c
+++ b/arch/arm/mach-imx/cpu.c
@@ -9,6 +9,7 @@
 #include <bootm.h>
 #include <common.h>
 #include <init.h>
+#include <log.h>
 #include <net.h>
 #include <netdev.h>
 #include <linux/errno.h>
diff --git a/arch/arm/mach-imx/ddrmc-vf610-calibration.c b/arch/arm/mach-imx/ddrmc-vf610-calibration.c
index f29de74c39..cd7e95e61d 100644
--- a/arch/arm/mach-imx/ddrmc-vf610-calibration.c
+++ b/arch/arm/mach-imx/ddrmc-vf610-calibration.c
@@ -8,6 +8,7 @@
  */
 /* #define DEBUG */
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <linux/bitmap.h>
diff --git a/arch/arm/mach-imx/imx8/ahab.c b/arch/arm/mach-imx/imx8/ahab.c
index 64394473da..22e76d535f 100644
--- a/arch/arm/mach-imx/imx8/ahab.c
+++ b/arch/arm/mach-imx/imx8/ahab.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <errno.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/sci/sci.h>
 #include <asm/mach-imx/sys_proto.h>
diff --git a/arch/arm/mach-imx/imx8/cpu.c b/arch/arm/mach-imx/imx8/cpu.c
index 4c965158fc..47c64f7a8a 100644
--- a/arch/arm/mach-imx/imx8/cpu.c
+++ b/arch/arm/mach-imx/imx8/cpu.c
@@ -9,6 +9,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <init.h>
+#include <log.h>
 #include <asm/cache.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
diff --git a/arch/arm/mach-imx/imx8/fdt.c b/arch/arm/mach-imx/imx8/fdt.c
index 65c8ac1a7e..46c8073e0f 100644
--- a/arch/arm/mach-imx/imx8/fdt.c
+++ b/arch/arm/mach-imx/imx8/fdt.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/arch/sci/sci.h>
 #include <asm/arch/sys_proto.h>
 #include <dm/ofnode.h>
diff --git a/arch/arm/mach-imx/imx8/image.c b/arch/arm/mach-imx/imx8/image.c
index e6b299691d..5abc0d3a39 100644
--- a/arch/arm/mach-imx/imx8/image.c
+++ b/arch/arm/mach-imx/imx8/image.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/io.h>
 #include <mmc.h>
diff --git a/arch/arm/mach-imx/imx8/iomux.c b/arch/arm/mach-imx/imx8/iomux.c
index 0ade85fb8f..b8e6f48a5f 100644
--- a/arch/arm/mach-imx/imx8/iomux.c
+++ b/arch/arm/mach-imx/imx8/iomux.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/sci/sci.h>
diff --git a/arch/arm/mach-imx/imx8/misc.c b/arch/arm/mach-imx/imx8/misc.c
index 76d6571d8b..2cd794d54a 100644
--- a/arch/arm/mach-imx/imx8/misc.c
+++ b/arch/arm/mach-imx/imx8/misc.c
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0+
 #include <common.h>
+#include <log.h>
 #include <asm/arch/sci/sci.h>
 #include <asm/mach-imx/sys_proto.h>
 #include <imx_sip.h>
diff --git a/arch/arm/mach-imx/imx8/parse-container.c b/arch/arm/mach-imx/imx8/parse-container.c
index cc8a51ad55..375098902f 100644
--- a/arch/arm/mach-imx/imx8/parse-container.c
+++ b/arch/arm/mach-imx/imx8/parse-container.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <errno.h>
+#include <log.h>
 #include <spl.h>
 #include <asm/arch/image.h>
 #include <asm/arch/sci/sci.h>
diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c
index 1551717cc0..344fa17d81 100644
--- a/arch/arm/mach-imx/imx8m/soc.c
+++ b/arch/arm/mach-imx/imx8m/soc.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <init.h>
+#include <log.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
diff --git a/arch/arm/mach-imx/imx_bootaux.c b/arch/arm/mach-imx/imx_bootaux.c
index ca823e6861..868633cf8a 100644
--- a/arch/arm/mach-imx/imx_bootaux.c
+++ b/arch/arm/mach-imx/imx_bootaux.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/mach-imx/sys_proto.h>
 #include <command.h>
diff --git a/arch/arm/mach-imx/misc.c b/arch/arm/mach-imx/misc.c
index 6744fbda46..549ef2bd99 100644
--- a/arch/arm/mach-imx/misc.c
+++ b/arch/arm/mach-imx/misc.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <lmb.h>
+#include <log.h>
 #include <asm/arch/sys_proto.h>
 #include <linux/errno.h>
 #include <asm/io.h>
diff --git a/arch/arm/mach-imx/mx5/clock.c b/arch/arm/mach-imx/mx5/clock.c
index 09c4c89664..bbaddd5a33 100644
--- a/arch/arm/mach-imx/mx5/clock.c
+++ b/arch/arm/mach-imx/mx5/clock.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <log.h>
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <asm/arch/imx-regs.h>
diff --git a/arch/arm/mach-imx/mx6/clock.c b/arch/arm/mach-imx/mx6/clock.c
index 9f3d62fa41..fb5e5b6f05 100644
--- a/arch/arm/mach-imx/mx6/clock.c
+++ b/arch/arm/mach-imx/mx6/clock.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <div64.h>
+#include <log.h>
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <asm/arch/imx-regs.h>
diff --git a/arch/arm/mach-imx/mx6/ddr.c b/arch/arm/mach-imx/mx6/ddr.c
index 69fe756b0b..79a90c83aa 100644
--- a/arch/arm/mach-imx/mx6/ddr.c
+++ b/arch/arm/mach-imx/mx6/ddr.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <hang.h>
+#include <log.h>
 #include <linux/types.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/mx6-ddr.h>
diff --git a/arch/arm/mach-imx/mx7/clock.c b/arch/arm/mach-imx/mx7/clock.c
index f5520374f1..aba9461d92 100644
--- a/arch/arm/mach-imx/mx7/clock.c
+++ b/arch/arm/mach-imx/mx7/clock.c
@@ -10,6 +10,7 @@
 #include <clock_legacy.h>
 #include <command.h>
 #include <div64.h>
+#include <log.h>
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <asm/arch/imx-regs.h>
diff --git a/arch/arm/mach-imx/mx7ulp/iomux.c b/arch/arm/mach-imx/mx7ulp/iomux.c
index 8c68655399..05ddeed2a6 100644
--- a/arch/arm/mach-imx/mx7ulp/iomux.c
+++ b/arch/arm/mach-imx/mx7ulp/iomux.c
@@ -3,6 +3,7 @@
  * Copyright (C) 2016 Freescale Semiconductor, Inc.
  */
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
diff --git a/arch/arm/mach-imx/mx7ulp/pcc.c b/arch/arm/mach-imx/mx7ulp/pcc.c
index 234974ba0d..aa7ea86a44 100644
--- a/arch/arm/mach-imx/mx7ulp/pcc.c
+++ b/arch/arm/mach-imx/mx7ulp/pcc.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <div64.h>
+#include <log.h>
 #include <asm/io.h>
 #include <errno.h>
 #include <asm/arch/imx-regs.h>
diff --git a/arch/arm/mach-imx/mx7ulp/scg.c b/arch/arm/mach-imx/mx7ulp/scg.c
index c7bb7a1c66..6e34803067 100644
--- a/arch/arm/mach-imx/mx7ulp/scg.c
+++ b/arch/arm/mach-imx/mx7ulp/scg.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <div64.h>
+#include <log.h>
 #include <asm/io.h>
 #include <errno.h>
 #include <asm/arch/imx-regs.h>
diff --git a/arch/arm/mach-imx/mx7ulp/soc.c b/arch/arm/mach-imx/mx7ulp/soc.c
index 518d77ae5b..0936522283 100644
--- a/arch/arm/mach-imx/mx7ulp/soc.c
+++ b/arch/arm/mach-imx/mx7ulp/soc.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <init.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c
index 4af3e6985c..1a231c67f5 100644
--- a/arch/arm/mach-imx/spl.c
+++ b/arch/arm/mach-imx/spl.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <hang.h>
 #include <init.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-imx/spl_imx_romapi.c b/arch/arm/mach-imx/spl_imx_romapi.c
index 5dc0f7174e..f588a5f521 100644
--- a/arch/arm/mach-imx/spl_imx_romapi.c
+++ b/arch/arm/mach-imx/spl_imx_romapi.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <errno.h>
 #include <image.h>
+#include <log.h>
 #include <linux/libfdt.h>
 #include <spl.h>
 
diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c
index 53cad78dd5..0cd34ac3c7 100644
--- a/arch/arm/mach-k3/common.c
+++ b/arch/arm/mach-k3/common.c
@@ -10,6 +10,7 @@
 #include <cpu_func.h>
 #include <image.h>
 #include <init.h>
+#include <log.h>
 #include <spl.h>
 #include "common.h"
 #include <dm.h>
diff --git a/arch/arm/mach-k3/security.c b/arch/arm/mach-k3/security.c
index 256b0526f2..66f90a5a34 100644
--- a/arch/arm/mach-k3/security.c
+++ b/arch/arm/mach-k3/security.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <hang.h>
 #include <image.h>
+#include <log.h>
 #include <asm/cache.h>
 #include <linux/soc/ti/ti_sci_protocol.h>
 #include <mach/spl.h>
diff --git a/arch/arm/mach-k3/sysfw-loader.c b/arch/arm/mach-k3/sysfw-loader.c
index 472b5085ed..513be09c68 100644
--- a/arch/arm/mach-k3/sysfw-loader.c
+++ b/arch/arm/mach-k3/sysfw-loader.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <image.h>
+#include <log.h>
 #include <spl.h>
 #include <malloc.h>
 #include <remoteproc.h>
diff --git a/arch/arm/mach-keystone/ddr3_spd.c b/arch/arm/mach-keystone/ddr3_spd.c
index 6eee9ad13a..3803449c2b 100644
--- a/arch/arm/mach-keystone/ddr3_spd.c
+++ b/arch/arm/mach-keystone/ddr3_spd.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 
 #include <i2c.h>
 #include <ddr_spd.h>
diff --git a/arch/arm/mach-kirkwood/cpu.c b/arch/arm/mach-kirkwood/cpu.c
index d328fee8bd..fa26903593 100644
--- a/arch/arm/mach-kirkwood/cpu.c
+++ b/arch/arm/mach-kirkwood/cpu.c
@@ -10,6 +10,7 @@
 #include <cpu_func.h>
 #include <env.h>
 #include <init.h>
+#include <log.h>
 #include <net.h>
 #include <netdev.h>
 #include <asm/cache.h>
diff --git a/arch/arm/mach-kirkwood/mpp.c b/arch/arm/mach-kirkwood/mpp.c
index 7222504ed3..4fdad99cad 100644
--- a/arch/arm/mach-kirkwood/mpp.c
+++ b/arch/arm/mach-kirkwood/mpp.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
diff --git a/arch/arm/mach-mediatek/mt7629/init.c b/arch/arm/mach-mediatek/mt7629/init.c
index 098892802b..aa9ff2bdba 100644
--- a/arch/arm/mach-mediatek/mt7629/init.c
+++ b/arch/arm/mach-mediatek/mt7629/init.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <init.h>
+#include <log.h>
 #include <ram.h>
 #include <asm/arch/misc.h>
 #include <asm/sections.h>
diff --git a/arch/arm/mach-mediatek/mt8512/init.c b/arch/arm/mach-mediatek/mt8512/init.c
index 9680251941..aa779f4376 100644
--- a/arch/arm/mach-mediatek/mt8512/init.c
+++ b/arch/arm/mach-mediatek/mt8512/init.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <init.h>
+#include <log.h>
 #include <ram.h>
 #include <wdt.h>
 #include <asm/arch/misc.h>
diff --git a/arch/arm/mach-meson/board-g12a.c b/arch/arm/mach-meson/board-g12a.c
index fc1729edd3..14127ca737 100644
--- a/arch/arm/mach-meson/board-g12a.c
+++ b/arch/arm/mach-meson/board-g12a.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <log.h>
 #include <net.h>
 #include <asm/arch/boot.h>
 #include <asm/arch/eth.h>
diff --git a/arch/arm/mach-meson/sm.c b/arch/arm/mach-meson/sm.c
index 725897a0ec..e6da4de534 100644
--- a/arch/arm/mach-meson/sm.c
+++ b/arch/arm/mach-meson/sm.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <log.h>
 #include <asm/arch/sm.h>
 #include <asm/cache.h>
 #include <linux/err.h>
diff --git a/arch/arm/mach-mvebu/spl.c b/arch/arm/mach-mvebu/spl.c
index c6ecd5bee0..f645befb2c 100644
--- a/arch/arm/mach-mvebu/spl.c
+++ b/arch/arm/mach-mvebu/spl.c
@@ -9,6 +9,7 @@
 #include <fdtdec.h>
 #include <hang.h>
 #include <init.h>
+#include <log.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
diff --git a/arch/arm/mach-omap2/am33xx/clock.c b/arch/arm/mach-omap2/am33xx/clock.c
index 862c5e0905..8819062aaa 100644
--- a/arch/arm/mach-omap2/am33xx/clock.c
+++ b/arch/arm/mach-omap2/am33xx/clock.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <hang.h>
 #include <init.h>
+#include <log.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/hardware.h>
diff --git a/arch/arm/mach-omap2/am33xx/ddr.c b/arch/arm/mach-omap2/am33xx/ddr.c
index 8cacc1dea6..71636276d4 100644
--- a/arch/arm/mach-omap2/am33xx/ddr.c
+++ b/arch/arm/mach-omap2/am33xx/ddr.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/ddr_defs.h>
 #include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-omap2/boot-common.c b/arch/arm/mach-omap2/boot-common.c
index 7538523724..6ec1131e38 100644
--- a/arch/arm/mach-omap2/boot-common.c
+++ b/arch/arm/mach-omap2/boot-common.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <ahci.h>
+#include <log.h>
 #include <spl.h>
 #include <asm/omap_common.h>
 #include <asm/arch/omap.h>
diff --git a/arch/arm/mach-omap2/clocks-common.c b/arch/arm/mach-omap2/clocks-common.c
index f968a26d64..757fa3801a 100644
--- a/arch/arm/mach-omap2/clocks-common.c
+++ b/arch/arm/mach-omap2/clocks-common.c
@@ -16,6 +16,7 @@
 #include <hang.h>
 #include <i2c.h>
 #include <init.h>
+#include <log.h>
 #include <asm/omap_common.h>
 #include <asm/gpio.h>
 #include <asm/arch/clock.h>
diff --git a/arch/arm/mach-omap2/emif-common.c b/arch/arm/mach-omap2/emif-common.c
index 4658f67e84..8bc4fbbb60 100644
--- a/arch/arm/mach-omap2/emif-common.c
+++ b/arch/arm/mach-omap2/emif-common.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <hang.h>
 #include <init.h>
+#include <log.h>
 #include <net.h>
 #include <asm/emif.h>
 #include <asm/arch/clock.h>
diff --git a/arch/arm/mach-omap2/fdt-common.c b/arch/arm/mach-omap2/fdt-common.c
index 3f420186ad..5f344f8283 100644
--- a/arch/arm/mach-omap2/fdt-common.c
+++ b/arch/arm/mach-omap2/fdt-common.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 
diff --git a/arch/arm/mach-omap2/omap-cache.c b/arch/arm/mach-omap2/omap-cache.c
index 1eff9be270..2c9ada060c 100644
--- a/arch/arm/mach-omap2/omap-cache.c
+++ b/arch/arm/mach-omap2/omap-cache.c
@@ -13,6 +13,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <asm/cache.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-omap2/omap3/am35x_musb.c b/arch/arm/mach-omap2/omap3/am35x_musb.c
index 5af6d28e74..026e5d2d13 100644
--- a/arch/arm/mach-omap2/omap3/am35x_musb.c
+++ b/arch/arm/mach-omap2/omap3/am35x_musb.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/am35x_def.h>
 
diff --git a/arch/arm/mach-omap2/omap5/dra7xx_iodelay.c b/arch/arm/mach-omap2/omap5/dra7xx_iodelay.c
index 598074ba21..8569eff31a 100644
--- a/arch/arm/mach-omap2/omap5/dra7xx_iodelay.c
+++ b/arch/arm/mach-omap2/omap5/dra7xx_iodelay.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <hang.h>
+#include <log.h>
 #include <asm/utils.h>
 #include <asm/arch/dra7xx_iodelay.h>
 #include <asm/arch/omap.h>
diff --git a/arch/arm/mach-omap2/omap5/emif.c b/arch/arm/mach-omap2/omap5/emif.c
index f3661a0e74..2de36b6fec 100644
--- a/arch/arm/mach-omap2/omap5/emif.c
+++ b/arch/arm/mach-omap2/omap5/emif.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/emif.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/utils.h>
diff --git a/arch/arm/mach-omap2/omap5/fdt.c b/arch/arm/mach-omap2/omap5/fdt.c
index c4adba31e6..3f8474b8d0 100644
--- a/arch/arm/mach-omap2/omap5/fdt.c
+++ b/arch/arm/mach-omap2/omap5/fdt.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <hang.h>
+#include <log.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <malloc.h>
diff --git a/arch/arm/mach-omap2/sec-common.c b/arch/arm/mach-omap2/sec-common.c
index edfb40f00b..0551bc125e 100644
--- a/arch/arm/mach-omap2/sec-common.c
+++ b/arch/arm/mach-omap2/sec-common.c
@@ -17,6 +17,7 @@
 #include <cpu_func.h>
 #include <hang.h>
 #include <init.h>
+#include <log.h>
 #include <stdarg.h>
 
 #include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c
index 9f26b8d16c..430c0cbf41 100644
--- a/arch/arm/mach-rockchip/board.c
+++ b/arch/arm/mach-rockchip/board.c
@@ -7,6 +7,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <init.h>
+#include <log.h>
 #include <ram.h>
 #include <syscon.h>
 #include <asm/cache.h>
diff --git a/arch/arm/mach-rockchip/boot_mode.c b/arch/arm/mach-rockchip/boot_mode.c
index 349c0648a6..2158934159 100644
--- a/arch/arm/mach-rockchip/boot_mode.c
+++ b/arch/arm/mach-rockchip/boot_mode.c
@@ -7,6 +7,7 @@
 #include <adc.h>
 #include <command.h>
 #include <env.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/boot_mode.h>
 #include <dm/device.h>
diff --git a/arch/arm/mach-rockchip/misc.c b/arch/arm/mach-rockchip/misc.c
index 17066bcf8b..28c7c7214c 100644
--- a/arch/arm/mach-rockchip/misc.c
+++ b/arch/arm/mach-rockchip/misc.c
@@ -13,6 +13,7 @@
 #include <env.h>
 #include <dm.h>
 #include <hash.h>
+#include <log.h>
 #include <dm/uclass-internal.h>
 #include <misc.h>
 #include <u-boot/crc.h>
diff --git a/arch/arm/mach-rockchip/px30/syscon_px30.c b/arch/arm/mach-rockchip/px30/syscon_px30.c
index 0331491b40..4672bdbf00 100644
--- a/arch/arm/mach-rockchip/px30/syscon_px30.c
+++ b/arch/arm/mach-rockchip/px30/syscon_px30.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <syscon.h>
 #include <asm/arch-rockchip/clock.h>
 
diff --git a/arch/arm/mach-rockchip/rk3188/rk3188.c b/arch/arm/mach-rockchip/rk3188/rk3188.c
index dca9de28d4..ef57dfd761 100644
--- a/arch/arm/mach-rockchip/rk3188/rk3188.c
+++ b/arch/arm/mach-rockchip/rk3188/rk3188.c
@@ -6,6 +6,7 @@
 #include <dm.h>
 #include <hang.h>
 #include <init.h>
+#include <log.h>
 #include <syscon.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/bootrom.h>
diff --git a/arch/arm/mach-rockchip/rk3188/syscon_rk3188.c b/arch/arm/mach-rockchip/rk3188/syscon_rk3188.c
index 94f4ec7227..ea7d7b5b1a 100644
--- a/arch/arm/mach-rockchip/rk3188/syscon_rk3188.c
+++ b/arch/arm/mach-rockchip/rk3188/syscon_rk3188.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <syscon.h>
 #include <asm/arch-rockchip/clock.h>
 
diff --git a/arch/arm/mach-rockchip/rk3288/syscon_rk3288.c b/arch/arm/mach-rockchip/rk3288/syscon_rk3288.c
index dff2caa598..e3da0a0194 100644
--- a/arch/arm/mach-rockchip/rk3288/syscon_rk3288.c
+++ b/arch/arm/mach-rockchip/rk3288/syscon_rk3288.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <syscon.h>
 #include <asm/arch-rockchip/clock.h>
 
diff --git a/arch/arm/mach-rockchip/rk3368/syscon_rk3368.c b/arch/arm/mach-rockchip/rk3368/syscon_rk3368.c
index 4ba94f2e80..cba0dda3e8 100644
--- a/arch/arm/mach-rockchip/rk3368/syscon_rk3368.c
+++ b/arch/arm/mach-rockchip/rk3368/syscon_rk3368.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <syscon.h>
 #include <asm/arch-rockchip/clock.h>
 
diff --git a/arch/arm/mach-rockchip/rk3399/rk3399.c b/arch/arm/mach-rockchip/rk3399/rk3399.c
index aaa7246393..f263f7e8b2 100644
--- a/arch/arm/mach-rockchip/rk3399/rk3399.c
+++ b/arch/arm/mach-rockchip/rk3399/rk3399.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <fdt_support.h>
 #include <init.h>
+#include <log.h>
 #include <spl.h>
 #include <spl_gpio.h>
 #include <syscon.h>
diff --git a/arch/arm/mach-rockchip/rk3399/syscon_rk3399.c b/arch/arm/mach-rockchip/rk3399/syscon_rk3399.c
index 259ca44d68..6b02dc8beb 100644
--- a/arch/arm/mach-rockchip/rk3399/syscon_rk3399.c
+++ b/arch/arm/mach-rockchip/rk3399/syscon_rk3399.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <syscon.h>
 #include <asm/arch-rockchip/clock.h>
 
diff --git a/arch/arm/mach-rockchip/sdram.c b/arch/arm/mach-rockchip/sdram.c
index 530644c043..24fe6cc8f0 100644
--- a/arch/arm/mach-rockchip/sdram.c
+++ b/arch/arm/mach-rockchip/sdram.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <init.h>
+#include <log.h>
 #include <ram.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/sdram.h>
diff --git a/arch/arm/mach-rockchip/spl-boot-order.c b/arch/arm/mach-rockchip/spl-boot-order.c
index c147d5821e..c2e4023007 100644
--- a/arch/arm/mach-rockchip/spl-boot-order.c
+++ b/arch/arm/mach-rockchip/spl-boot-order.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <mmc.h>
 #include <spl.h>
 
diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c
index 0d74989adb..f5a0ac473b 100644
--- a/arch/arm/mach-rockchip/spl.c
+++ b/arch/arm/mach-rockchip/spl.c
@@ -9,6 +9,7 @@
 #include <hang.h>
 #include <image.h>
 #include <init.h>
+#include <log.h>
 #include <ram.h>
 #include <spl.h>
 #include <asm/arch-rockchip/bootrom.h>
diff --git a/arch/arm/mach-rockchip/tpl.c b/arch/arm/mach-rockchip/tpl.c
index 2de4e980e4..74f185c87f 100644
--- a/arch/arm/mach-rockchip/tpl.c
+++ b/arch/arm/mach-rockchip/tpl.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <hang.h>
 #include <init.h>
+#include <log.h>
 #include <ram.h>
 #include <spl.h>
 #include <version.h>
diff --git a/arch/arm/mach-snapdragon/dram.c b/arch/arm/mach-snapdragon/dram.c
index 12c26a91c6..2a161be137 100644
--- a/arch/arm/mach-snapdragon/dram.c
+++ b/arch/arm/mach-snapdragon/dram.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <part.h>
 #include <smem.h>
 #include <fdt_support.h>
diff --git a/arch/arm/mach-socfpga/clock_manager_agilex.c b/arch/arm/mach-socfpga/clock_manager_agilex.c
index 4ee2b7b4bb..6188a8c3d2 100644
--- a/arch/arm/mach-socfpga/clock_manager_agilex.c
+++ b/arch/arm/mach-socfpga/clock_manager_agilex.c
@@ -7,6 +7,7 @@
 #include <clk.h>
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/arch/clock_manager.h>
 #include <asm/arch/system_manager.h>
diff --git a/arch/arm/mach-socfpga/misc_s10.c b/arch/arm/mach-socfpga/misc_s10.c
index a87dd44181..ccff78a230 100644
--- a/arch/arm/mach-socfpga/misc_s10.c
+++ b/arch/arm/mach-socfpga/misc_s10.c
@@ -10,6 +10,7 @@
 #include <errno.h>
 #include <fdtdec.h>
 #include <init.h>
+#include <log.h>
 #include <miiphy.h>
 #include <netdev.h>
 #include <asm/io.h>
diff --git a/arch/arm/mach-socfpga/pinmux_arria10.c b/arch/arm/mach-socfpga/pinmux_arria10.c
index 163bf278b1..f378fce7f0 100644
--- a/arch/arm/mach-socfpga/pinmux_arria10.c
+++ b/arch/arm/mach-socfpga/pinmux_arria10.c
@@ -3,6 +3,7 @@
  *  Copyright (C) 2016-2017 Intel Corporation <www.intel.com>
  */
 
+#include <log.h>
 #include <asm/arch/pinmux.h>
 #include <asm/io.h>
 #include <common.h>
diff --git a/arch/arm/mach-socfpga/spl_agilex.c b/arch/arm/mach-socfpga/spl_agilex.c
index 0192cccbd1..bd971ecbd1 100644
--- a/arch/arm/mach-socfpga/spl_agilex.c
+++ b/arch/arm/mach-socfpga/spl_agilex.c
@@ -5,6 +5,7 @@
  */
 
 #include <init.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/u-boot.h>
 #include <asm/utils.h>
diff --git a/arch/arm/mach-socfpga/spl_gen5.c b/arch/arm/mach-socfpga/spl_gen5.c
index 6c9f45396d..91bc9df70a 100644
--- a/arch/arm/mach-socfpga/spl_gen5.c
+++ b/arch/arm/mach-socfpga/spl_gen5.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <hang.h>
 #include <init.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/u-boot.h>
 #include <asm/utils.h>
diff --git a/arch/arm/mach-socfpga/spl_s10.c b/arch/arm/mach-socfpga/spl_s10.c
index 0f8588ba0c..b3c6f6afc4 100644
--- a/arch/arm/mach-socfpga/spl_s10.c
+++ b/arch/arm/mach-socfpga/spl_s10.c
@@ -6,6 +6,7 @@
 
 #include <hang.h>
 #include <init.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/u-boot.h>
 #include <asm/utils.h>
diff --git a/arch/arm/mach-stm32mp/bsec.c b/arch/arm/mach-stm32mp/bsec.c
index 0d5850b4a9..fc39230113 100644
--- a/arch/arm/mach-stm32mp/bsec.c
+++ b/arch/arm/mach-stm32mp/bsec.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <misc.h>
 #include <asm/io.h>
 #include <asm/arch/stm32mp1_smc.h>
diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c
index 001c246635..d03aa12bb8 100644
--- a/arch/arm/mach-stm32mp/cpu.c
+++ b/arch/arm/mach-stm32mp/cpu.c
@@ -8,6 +8,7 @@
 #include <debug_uart.h>
 #include <env.h>
 #include <init.h>
+#include <log.h>
 #include <misc.h>
 #include <net.h>
 #include <asm/io.h>
diff --git a/arch/arm/mach-stm32mp/dram_init.c b/arch/arm/mach-stm32mp/dram_init.c
index f4cc609d2d..3776ffc082 100644
--- a/arch/arm/mach-stm32mp/dram_init.c
+++ b/arch/arm/mach-stm32mp/dram_init.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <init.h>
+#include <log.h>
 #include <ram.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-stm32mp/fdt.c b/arch/arm/mach-stm32mp/fdt.c
index 3ee7d6a833..c046327233 100644
--- a/arch/arm/mach-stm32mp/fdt.c
+++ b/arch/arm/mach-stm32mp/fdt.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <fdt_support.h>
+#include <log.h>
 #include <asm/arch/sys_proto.h>
 #include <dt-bindings/pinctrl/stm32-pinfunc.h>
 #include <linux/io.h>
diff --git a/arch/arm/mach-stm32mp/spl.c b/arch/arm/mach-stm32mp/spl.c
index fefb255419..91c18208d9 100644
--- a/arch/arm/mach-stm32mp/spl.c
+++ b/arch/arm/mach-stm32mp/spl.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <hang.h>
 #include <init.h>
+#include <log.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c
index 32e3664265..f40fccd8f8 100644
--- a/arch/arm/mach-sunxi/board.c
+++ b/arch/arm/mach-sunxi/board.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <init.h>
+#include <log.h>
 #include <mmc.h>
 #include <i2c.h>
 #include <serial.h>
diff --git a/arch/arm/mach-sunxi/dram_sun50i_h6.c b/arch/arm/mach-sunxi/dram_sun50i_h6.c
index 411a612393..045e8679e3 100644
--- a/arch/arm/mach-sunxi/dram_sun50i_h6.c
+++ b/arch/arm/mach-sunxi/dram_sun50i_h6.c
@@ -7,6 +7,7 @@
  */
 #include <common.h>
 #include <init.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/dram.h>
diff --git a/arch/arm/mach-sunxi/dram_sun9i.c b/arch/arm/mach-sunxi/dram_sun9i.c
index 58ce05db6d..14be212e89 100644
--- a/arch/arm/mach-sunxi/dram_sun9i.c
+++ b/arch/arm/mach-sunxi/dram_sun9i.c
@@ -14,6 +14,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <init.h>
+#include <log.h>
 #include <ram.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
diff --git a/arch/arm/mach-sunxi/dram_sunxi_dw.c b/arch/arm/mach-sunxi/dram_sunxi_dw.c
index ea5fe108eb..567cb5b18e 100644
--- a/arch/arm/mach-sunxi/dram_sunxi_dw.c
+++ b/arch/arm/mach-sunxi/dram_sunxi_dw.c
@@ -10,6 +10,7 @@
  */
 #include <common.h>
 #include <init.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/dram.h>
diff --git a/arch/arm/mach-sunxi/spl_spi_sunxi.c b/arch/arm/mach-sunxi/spl_spi_sunxi.c
index 612942025b..c084de7e2c 100644
--- a/arch/arm/mach-sunxi/spl_spi_sunxi.c
+++ b/arch/arm/mach-sunxi/spl_spi_sunxi.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <image.h>
+#include <log.h>
 #include <spl.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
diff --git a/arch/arm/mach-tegra/ap.c b/arch/arm/mach-tegra/ap.c
index 84c20a48ad..532730fe72 100644
--- a/arch/arm/mach-tegra/ap.c
+++ b/arch/arm/mach-tegra/ap.c
@@ -7,6 +7,7 @@
 /* Tegra AP (Application Processor) code */
 
 #include <common.h>
+#include <log.h>
 #include <linux/bug.h>
 #include <asm/io.h>
 #include <asm/arch/gp_padctrl.h>
diff --git a/arch/arm/mach-tegra/board.c b/arch/arm/mach-tegra/board.c
index 267bfde09d..03faacbd57 100644
--- a/arch/arm/mach-tegra/board.c
+++ b/arch/arm/mach-tegra/board.c
@@ -8,6 +8,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <init.h>
+#include <log.h>
 #include <ns16550.h>
 #include <spl.h>
 #include <asm/cache.h>
diff --git a/arch/arm/mach-tegra/board2.c b/arch/arm/mach-tegra/board2.c
index 224efc97c5..48c4f32d6f 100644
--- a/arch/arm/mach-tegra/board2.c
+++ b/arch/arm/mach-tegra/board2.c
@@ -9,6 +9,7 @@
 #include <env.h>
 #include <errno.h>
 #include <init.h>
+#include <log.h>
 #include <ns16550.h>
 #include <usb.h>
 #include <asm/io.h>
diff --git a/arch/arm/mach-tegra/cboot.c b/arch/arm/mach-tegra/cboot.c
index 7cfbb6270f..16c4cf306e 100644
--- a/arch/arm/mach-tegra/cboot.c
+++ b/arch/arm/mach-tegra/cboot.c
@@ -9,6 +9,7 @@
 #include <fdtdec.h>
 #include <hang.h>
 #include <init.h>
+#include <log.h>
 #include <malloc.h>
 #include <net.h>
 #include <stdlib.h>
diff --git a/arch/arm/mach-tegra/clock.c b/arch/arm/mach-tegra/clock.c
index 31b6aa2cfc..c4225b8b5b 100644
--- a/arch/arm/mach-tegra/clock.c
+++ b/arch/arm/mach-tegra/clock.c
@@ -9,6 +9,7 @@
 #include <div64.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <time.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
diff --git a/arch/arm/mach-tegra/cpu.c b/arch/arm/mach-tegra/cpu.c
index 3d140760e6..d12ebb319e 100644
--- a/arch/arm/mach-tegra/cpu.c
+++ b/arch/arm/mach-tegra/cpu.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/gp_padctrl.h>
diff --git a/arch/arm/mach-tegra/gpu.c b/arch/arm/mach-tegra/gpu.c
index e047f67821..13ffade040 100644
--- a/arch/arm/mach-tegra/gpu.c
+++ b/arch/arm/mach-tegra/gpu.c
@@ -6,6 +6,7 @@
 /* Tegra vpr routines */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/tegra.h>
 #include <asm/arch/mc.h>
diff --git a/arch/arm/mach-tegra/pinmux-common.c b/arch/arm/mach-tegra/pinmux-common.c
index 1771991fbb..16b03bfe7b 100644
--- a/arch/arm/mach-tegra/pinmux-common.c
+++ b/arch/arm/mach-tegra/pinmux-common.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/pinmux.h>
 
diff --git a/arch/arm/mach-tegra/pmc.c b/arch/arm/mach-tegra/pmc.c
index 68a211286f..cdc8493efd 100644
--- a/arch/arm/mach-tegra/pmc.c
+++ b/arch/arm/mach-tegra/pmc.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <log.h>
 
 #include <linux/arm-smccc.h>
 
diff --git a/arch/arm/mach-tegra/spl.c b/arch/arm/mach-tegra/spl.c
index 13ddbc3b81..ed897efc5f 100644
--- a/arch/arm/mach-tegra/spl.c
+++ b/arch/arm/mach-tegra/spl.c
@@ -7,6 +7,7 @@
  */
 #include <common.h>
 #include <debug_uart.h>
+#include <log.h>
 #include <spl.h>
 
 #include <asm/io.h>
diff --git a/arch/arm/mach-tegra/tegra114/clock.c b/arch/arm/mach-tegra/tegra114/clock.c
index 8d662c23d0..1c06865e06 100644
--- a/arch/arm/mach-tegra/tegra114/clock.c
+++ b/arch/arm/mach-tegra/tegra114/clock.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sysctr.h>
diff --git a/arch/arm/mach-tegra/tegra114/cpu.c b/arch/arm/mach-tegra/tegra114/cpu.c
index 09b52f559f..92ce3cefae 100644
--- a/arch/arm/mach-tegra/tegra114/cpu.c
+++ b/arch/arm/mach-tegra/tegra114/cpu.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/flow.h>
diff --git a/arch/arm/mach-tegra/tegra114/funcmux.c b/arch/arm/mach-tegra/tegra114/funcmux.c
index 8fe5e9e357..23a27c8688 100644
--- a/arch/arm/mach-tegra/tegra114/funcmux.c
+++ b/arch/arm/mach-tegra/tegra114/funcmux.c
@@ -6,6 +6,7 @@
 /* Tegra114 high-level function multiplexing */
 
 #include <common.h>
+#include <log.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/funcmux.h>
 #include <asm/arch/pinmux.h>
diff --git a/arch/arm/mach-tegra/tegra124/clock.c b/arch/arm/mach-tegra/tegra124/clock.c
index f02f8b0532..4359093892 100644
--- a/arch/arm/mach-tegra/tegra124/clock.c
+++ b/arch/arm/mach-tegra/tegra124/clock.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sysctr.h>
diff --git a/arch/arm/mach-tegra/tegra124/cpu.c b/arch/arm/mach-tegra/tegra124/cpu.c
index abc050c27b..c9226af4c5 100644
--- a/arch/arm/mach-tegra/tegra124/cpu.c
+++ b/arch/arm/mach-tegra/tegra124/cpu.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/ahb.h>
 #include <asm/arch/clock.h>
diff --git a/arch/arm/mach-tegra/tegra124/funcmux.c b/arch/arm/mach-tegra/tegra124/funcmux.c
index a8fcac6038..e7ad85fde2 100644
--- a/arch/arm/mach-tegra/tegra124/funcmux.c
+++ b/arch/arm/mach-tegra/tegra124/funcmux.c
@@ -7,6 +7,7 @@
 /* Tegra124 high-level function multiplexing */
 
 #include <common.h>
+#include <log.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/funcmux.h>
 #include <asm/arch/pinmux.h>
diff --git a/arch/arm/mach-tegra/tegra124/xusb-padctl.c b/arch/arm/mach-tegra/tegra124/xusb-padctl.c
index 09ab8c78cf..9a97c87436 100644
--- a/arch/arm/mach-tegra/tegra124/xusb-padctl.c
+++ b/arch/arm/mach-tegra/tegra124/xusb-padctl.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <errno.h>
+#include <log.h>
 #include <dm/of_access.h>
 #include <dm/ofnode.h>
 
diff --git a/arch/arm/mach-tegra/tegra20/clock.c b/arch/arm/mach-tegra/tegra20/clock.c
index 4e607816a7..8e3ad2baa2 100644
--- a/arch/arm/mach-tegra/tegra20/clock.c
+++ b/arch/arm/mach-tegra/tegra20/clock.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <errno.h>
 #include <init.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/tegra.h>
diff --git a/arch/arm/mach-tegra/tegra20/crypto.c b/arch/arm/mach-tegra/tegra20/crypto.c
index b91191eba3..1efaa5c3ec 100644
--- a/arch/arm/mach-tegra/tegra20/crypto.c
+++ b/arch/arm/mach-tegra/tegra20/crypto.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <linux/errno.h>
 #include "crypto.h"
 #include "uboot_aes.h"
diff --git a/arch/arm/mach-tegra/tegra20/emc.c b/arch/arm/mach-tegra/tegra20/emc.c
index dff9ac0a4d..d55b09b4ac 100644
--- a/arch/arm/mach-tegra/tegra20/emc.c
+++ b/arch/arm/mach-tegra/tegra20/emc.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch-tegra/ap.h>
 #include <asm/arch-tegra/apb_misc.h>
diff --git a/arch/arm/mach-tegra/tegra20/funcmux.c b/arch/arm/mach-tegra/tegra20/funcmux.c
index 2ee0f6ea76..90fe0cba8e 100644
--- a/arch/arm/mach-tegra/tegra20/funcmux.c
+++ b/arch/arm/mach-tegra/tegra20/funcmux.c
@@ -5,6 +5,7 @@
 
 /* Tegra20 high-level function multiplexing */
 #include <common.h>
+#include <log.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/funcmux.h>
 #include <asm/arch/pinmux.h>
diff --git a/arch/arm/mach-tegra/tegra20/pmu.c b/arch/arm/mach-tegra/tegra20/pmu.c
index d63db8afa0..05d0668cdb 100644
--- a/arch/arm/mach-tegra/tegra20/pmu.c
+++ b/arch/arm/mach-tegra/tegra20/pmu.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <log.h>
 #include <tps6586x.h>
 #include <asm/io.h>
 #include <asm/arch/tegra.h>
diff --git a/arch/arm/mach-tegra/tegra210/clock.c b/arch/arm/mach-tegra/tegra210/clock.c
index ed0ad2ee8b..171c98daa2 100644
--- a/arch/arm/mach-tegra/tegra210/clock.c
+++ b/arch/arm/mach-tegra/tegra210/clock.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <errno.h>
 #include <init.h>
+#include <log.h>
 #include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
diff --git a/arch/arm/mach-tegra/tegra210/funcmux.c b/arch/arm/mach-tegra/tegra210/funcmux.c
index 7f00d7b604..30d994a17f 100644
--- a/arch/arm/mach-tegra/tegra210/funcmux.c
+++ b/arch/arm/mach-tegra/tegra210/funcmux.c
@@ -7,6 +7,7 @@
 /* Tegra210 high-level function multiplexing */
 
 #include <common.h>
+#include <log.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/funcmux.h>
 #include <asm/arch/pinmux.h>
diff --git a/arch/arm/mach-tegra/tegra210/xusb-padctl.c b/arch/arm/mach-tegra/tegra210/xusb-padctl.c
index 64dc297ae2..b75cc31c8c 100644
--- a/arch/arm/mach-tegra/tegra210/xusb-padctl.c
+++ b/arch/arm/mach-tegra/tegra210/xusb-padctl.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <errno.h>
+#include <log.h>
 #include <dm/of_access.h>
 #include <dm/ofnode.h>
 
diff --git a/arch/arm/mach-tegra/tegra30/clock.c b/arch/arm/mach-tegra/tegra30/clock.c
index ea17d14536..7a5c54d592 100644
--- a/arch/arm/mach-tegra/tegra30/clock.c
+++ b/arch/arm/mach-tegra/tegra30/clock.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <errno.h>
 #include <init.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/tegra.h>
diff --git a/arch/arm/mach-tegra/tegra30/cpu.c b/arch/arm/mach-tegra/tegra30/cpu.c
index 45a5c091ec..7bd1de1953 100644
--- a/arch/arm/mach-tegra/tegra30/cpu.c
+++ b/arch/arm/mach-tegra/tegra30/cpu.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/flow.h>
diff --git a/arch/arm/mach-tegra/tegra30/funcmux.c b/arch/arm/mach-tegra/tegra30/funcmux.c
index b3de980ad3..c3ee787f33 100644
--- a/arch/arm/mach-tegra/tegra30/funcmux.c
+++ b/arch/arm/mach-tegra/tegra30/funcmux.c
@@ -6,6 +6,7 @@
 /* Tegra30 high-level function multiplexing */
 
 #include <common.h>
+#include <log.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/funcmux.h>
 #include <asm/arch/pinmux.h>
diff --git a/arch/arm/mach-tegra/xusb-padctl-common.c b/arch/arm/mach-tegra/xusb-padctl-common.c
index c3fb30e24d..e56e27c8b6 100644
--- a/arch/arm/mach-tegra/xusb-padctl-common.c
+++ b/arch/arm/mach-tegra/xusb-padctl-common.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <errno.h>
+#include <log.h>
 
 #include "xusb-padctl-common.h"
 
diff --git a/arch/arm/mach-uniphier/board_init.c b/arch/arm/mach-uniphier/board_init.c
index 4f9cd6e722..6bf0811edb 100644
--- a/arch/arm/mach-uniphier/board_init.c
+++ b/arch/arm/mach-uniphier/board_init.c
@@ -5,6 +5,7 @@
  *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
  */
 
+#include <log.h>
 #include <linux/errno.h>
 #include <linux/io.h>
 #include <linux/printk.h>
diff --git a/arch/arm/mach-uniphier/dram/ddrphy-training.c b/arch/arm/mach-uniphier/dram/ddrphy-training.c
index 1decdf1cbf..c26f56367e 100644
--- a/arch/arm/mach-uniphier/dram/ddrphy-training.c
+++ b/arch/arm/mach-uniphier/dram/ddrphy-training.c
@@ -4,6 +4,7 @@
  * Copyright (C) 2015-2016 Socionext Inc.
  */
 
+#include <log.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/arch/arm/mach-uniphier/dram/umc-pxs2.c b/arch/arm/mach-uniphier/dram/umc-pxs2.c
index b013571f36..7de6b7fbde 100644
--- a/arch/arm/mach-uniphier/dram/umc-pxs2.c
+++ b/arch/arm/mach-uniphier/dram/umc-pxs2.c
@@ -8,6 +8,7 @@
  */
 
 #include <init.h>
+#include <log.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/io.h>
diff --git a/arch/arm/mach-uniphier/micro-support-card.c b/arch/arm/mach-uniphier/micro-support-card.c
index 951e71430f..f6e95ee7ba 100644
--- a/arch/arm/mach-uniphier/micro-support-card.c
+++ b/arch/arm/mach-uniphier/micro-support-card.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <fdt_support.h>
+#include <log.h>
 #include <net.h>
 #include <dm/of.h>
 #include <linux/ctype.h>
diff --git a/arch/arm/mach-uniphier/nand-reset.c b/arch/arm/mach-uniphier/nand-reset.c
index 11cadaabd8..dbf54aa910 100644
--- a/arch/arm/mach-uniphier/nand-reset.c
+++ b/arch/arm/mach-uniphier/nand-reset.c
@@ -4,6 +4,7 @@
  *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
  */
 
+#include <log.h>
 #include <linux/errno.h>
 #include <dm.h>
 #include <dm/uclass-internal.h>
diff --git a/arch/arm/mach-zynq/spl.c b/arch/arm/mach-zynq/spl.c
index 05f42e6e8b..239ce3436a 100644
--- a/arch/arm/mach-zynq/spl.c
+++ b/arch/arm/mach-zynq/spl.c
@@ -7,6 +7,7 @@
 #include <hang.h>
 #include <image.h>
 #include <init.h>
+#include <log.h>
 #include <spl.h>
 #include <generated/dt.h>
 
diff --git a/arch/arm/mach-zynqmp/mp.c b/arch/arm/mach-zynqmp/mp.c
index cc07db4831..74ada3b670 100644
--- a/arch/arm/mach-zynqmp/mp.c
+++ b/arch/arm/mach-zynqmp/mp.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/io.h>
diff --git a/arch/arm/mach-zynqmp/spl.c b/arch/arm/mach-zynqmp/spl.c
index 35dbff01bd..fd0c1228c3 100644
--- a/arch/arm/mach-zynqmp/spl.c
+++ b/arch/arm/mach-zynqmp/spl.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <image.h>
 #include <init.h>
+#include <log.h>
 #include <spl.h>
 
 #include <asm/io.h>
diff --git a/arch/m68k/lib/bootm.c b/arch/m68k/lib/bootm.c
index b912d130d6..aa17929b9e 100644
--- a/arch/m68k/lib/bootm.c
+++ b/arch/m68k/lib/bootm.c
@@ -10,6 +10,7 @@
 #include <env.h>
 #include <image.h>
 #include <lmb.h>
+#include <log.h>
 #include <u-boot/zlib.h>
 #include <bzlib.h>
 #include <watchdog.h>
diff --git a/arch/microblaze/cpu/interrupts.c b/arch/microblaze/cpu/interrupts.c
index a6a52f8527..829ae26ad2 100644
--- a/arch/microblaze/cpu/interrupts.c
+++ b/arch/microblaze/cpu/interrupts.c
@@ -11,6 +11,7 @@
 #include <command.h>
 #include <fdtdec.h>
 #include <irq_func.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/microblaze_intc.h>
 #include <asm/asm.h>
diff --git a/arch/microblaze/cpu/spl.c b/arch/microblaze/cpu/spl.c
index c633e83853..86522f8447 100644
--- a/arch/microblaze/cpu/spl.c
+++ b/arch/microblaze/cpu/spl.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <command.h>
 #include <image.h>
+#include <log.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <asm/u-boot.h>
diff --git a/arch/microblaze/cpu/timer.c b/arch/microblaze/cpu/timer.c
index e07fc628d1..cd4aba667e 100644
--- a/arch/microblaze/cpu/timer.c
+++ b/arch/microblaze/cpu/timer.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <fdtdec.h>
 #include <init.h>
+#include <log.h>
 #include <time.h>
 #include <asm/microblaze_timer.h>
 #include <asm/microblaze_intc.h>
diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c
index 93f95b1e26..d2ea1453be 100644
--- a/arch/microblaze/lib/bootm.c
+++ b/arch/microblaze/lib/bootm.c
@@ -16,6 +16,7 @@
 #include <hang.h>
 #include <image.h>
 #include <lmb.h>
+#include <log.h>
 #include <asm/cache.h>
 #include <u-boot/zlib.h>
 #include <asm/byteorder.h>
diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c
index cbc4413d5d..82f986cb81 100644
--- a/arch/mips/lib/bootm.c
+++ b/arch/mips/lib/bootm.c
@@ -10,6 +10,7 @@
 #include <image.h>
 #include <fdt_support.h>
 #include <lmb.h>
+#include <log.h>
 #include <asm/addrspace.h>
 #include <asm/io.h>
 
diff --git a/arch/mips/lib/spl.c b/arch/mips/lib/spl.c
index 7ba3e53f6d..f96fda5b2d 100644
--- a/arch/mips/lib/spl.c
+++ b/arch/mips/lib/spl.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <spl.h>
 
 void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
diff --git a/arch/mips/lib/stack.c b/arch/mips/lib/stack.c
index 4d1d98c3ad..8f523fd6fb 100644
--- a/arch/mips/lib/stack.c
+++ b/arch/mips/lib/stack.c
@@ -2,6 +2,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <log.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/mips/lib/traps.c b/arch/mips/lib/traps.c
index 8fff7541e3..20025b2199 100644
--- a/arch/mips/lib/traps.c
+++ b/arch/mips/lib/traps.c
@@ -14,6 +14,7 @@
 #include <cpu_func.h>
 #include <hang.h>
 #include <init.h>
+#include <log.h>
 #include <asm/mipsregs.h>
 #include <asm/addrspace.h>
 #include <asm/system.h>
diff --git a/arch/mips/mach-ath79/qca956x/clk.c b/arch/mips/mach-ath79/qca956x/clk.c
index d71c94e171..5adf6cd815 100644
--- a/arch/mips/mach-ath79/qca956x/clk.c
+++ b/arch/mips/mach-ath79/qca956x/clk.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <clock_legacy.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
diff --git a/arch/mips/mach-bmips/dram.c b/arch/mips/mach-bmips/dram.c
index 764ce89231..a772a655d9 100644
--- a/arch/mips/mach-bmips/dram.c
+++ b/arch/mips/mach-bmips/dram.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <log.h>
 #include <ram.h>
 #include <dm.h>
 
diff --git a/arch/mips/mach-mscc/phy.c b/arch/mips/mach-mscc/phy.c
index add6280e38..83d3e5bdd2 100644
--- a/arch/mips/mach-mscc/phy.c
+++ b/arch/mips/mach-mscc/phy.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 
 int mscc_phy_rd_wr(u8 read,
diff --git a/arch/mips/mach-mtmips/ddr_calibrate.c b/arch/mips/mach-mtmips/ddr_calibrate.c
new file mode 100644
index 0000000000..bcc4241ba3
--- /dev/null
+++ b/arch/mips/mach-mtmips/ddr_calibrate.c
@@ -0,0 +1,310 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2018 Stefan Roese <sr@denx.de>
+ *
+ * This code is mostly based on the code extracted from this MediaTek
+ * github repository:
+ *
+ * https://github.com/MediaTek-Labs/linkit-smart-uboot.git
+ *
+ * I was not able to find a specific license or other developers
+ * copyrights here, so I can't add them here.
+ *
+ * Most functions in this file are copied from the MediaTek U-Boot
+ * repository. Without any documentation, it was impossible to really
+ * implement this differently. So its mostly a cleaned-up version of
+ * the original code, with only support for the MT7628 / MT7688 SoC.
+ */
+
+#include <common.h>
+#include <cpu_func.h>
+#include <log.h>
+#include <linux/io.h>
+#include <asm/cacheops.h>
+#include <asm/io.h>
+#include "mt76xx.h"
+
+#define NUM_OF_CACHELINE	128
+#define MIN_START		6
+#define MIN_FINE_START		0xf
+#define MAX_START		7
+#define MAX_FINE_START		0x0
+
+#define CPU_FRAC_DIV		1
+
+#if defined(CONFIG_ONBOARD_DDR2_SIZE_256MBIT)
+#define DRAM_BUTTOM 0x02000000
+#endif
+#if defined(CONFIG_ONBOARD_DDR2_SIZE_512MBIT)
+#define DRAM_BUTTOM 0x04000000
+#endif
+#if defined(CONFIG_ONBOARD_DDR2_SIZE_1024MBIT)
+#define DRAM_BUTTOM 0x08000000
+#endif
+#if defined(CONFIG_ONBOARD_DDR2_SIZE_2048MBIT)
+#define DRAM_BUTTOM 0x10000000
+#endif
+
+static inline void cal_memcpy(void *src, void *dst, u32 size)
+{
+	u8 *psrc = (u8 *)src;
+	u8 *pdst = (u8 *)dst;
+	int i;
+
+	for (i = 0; i < size; i++, psrc++, pdst++)
+		*pdst = *psrc;
+}
+
+static inline void cal_memset(void *src, u8 pat, u32 size)
+{
+	u8 *psrc = (u8 *)src;
+	int i;
+
+	for (i = 0; i < size; i++, psrc++)
+		*psrc = pat;
+}
+
+#define pref_op(hint, addr)						\
+	__asm__ __volatile__(						\
+		".set	push\n"						\
+		".set	noreorder\n"					\
+		"pref	%0, %1\n"					\
+		".set	pop\n"						\
+		:							\
+		: "i" (hint), "R" (*(u8 *)(addr)))
+
+static inline void cal_patgen(u32 start_addr, u32 size, u32 bias)
+{
+	u32 *addr = (u32 *)start_addr;
+	int i;
+
+	for (i = 0; i < size; i++)
+		addr[i] = start_addr + i + bias;
+}
+
+static inline int test_loop(int k, int dqs, u32 test_dqs, u32 *coarse_dqs,
+			    u32 offs, u32 pat, u32 val)
+{
+	u32 nc_addr;
+	u32 *c_addr;
+	int i;
+
+	for (nc_addr = 0xa0000000;
+	     nc_addr < (0xa0000000 + DRAM_BUTTOM - NUM_OF_CACHELINE * 32);
+	     nc_addr += (DRAM_BUTTOM >> 6) + offs) {
+		writel(0x00007474, (void *)MT76XX_MEMCTRL_BASE + 0x64);
+		wmb();		/* Make sure store if finished */
+
+		c_addr = (u32 *)(nc_addr & 0xdfffffff);
+		cal_memset(((u8 *)c_addr), 0x1F, NUM_OF_CACHELINE * 32);
+		cal_patgen(nc_addr, NUM_OF_CACHELINE * 8, pat);
+
+		if (dqs > 0)
+			writel(0x00000074 |
+			       (((k == 1) ? coarse_dqs[dqs] : test_dqs) << 12) |
+			       (((k == 0) ? val : test_dqs) << 8),
+			       (void *)MT76XX_MEMCTRL_BASE + 0x64);
+		else
+			writel(0x00007400 |
+			       (((k == 1) ? coarse_dqs[dqs] : test_dqs) << 4) |
+			       (((k == 0) ? val : test_dqs) << 0),
+			       (void *)MT76XX_MEMCTRL_BASE + 0x64);
+		wmb();		/* Make sure store if finished */
+
+		invalidate_dcache_range((u32)c_addr,
+					(u32)c_addr +
+					NUM_OF_CACHELINE * 32);
+		wmb();		/* Make sure store if finished */
+
+		for (i = 0; i < NUM_OF_CACHELINE * 8; i++) {
+			if (i % 8 == 0)
+				pref_op(0, &c_addr[i]);
+		}
+
+		for (i = 0; i < NUM_OF_CACHELINE * 8; i++) {
+			if (c_addr[i] != nc_addr + i + pat)
+				return -1;
+		}
+	}
+
+	return 0;
+}
+
+void ddr_calibrate(void)
+{
+	u32 min_coarse_dqs[2];
+	u32 max_coarse_dqs[2];
+	u32 min_fine_dqs[2];
+	u32 max_fine_dqs[2];
+	u32 coarse_dqs[2];
+	u32 fine_dqs[2];
+	int reg = 0, ddr_cfg2_reg;
+	int flag;
+	int i, k;
+	int dqs = 0;
+	u32 min_coarse_dqs_bnd, min_fine_dqs_bnd, coarse_dqs_dll, fine_dqs_dll;
+	u32 val;
+	u32 fdiv = 0, frac = 0;
+
+	/* Setup clock to run@full speed */
+	val = readl((void *)MT76XX_DYN_CFG0_REG);
+	fdiv = (u32)((val >> 8) & 0x0F);
+	if (CPU_FRAC_DIV < 1 || CPU_FRAC_DIV > 10)
+		frac = val & 0x0f;
+	else
+		frac = CPU_FRAC_DIV;
+
+	while (frac < fdiv) {
+		val = readl((void *)MT76XX_DYN_CFG0_REG);
+		fdiv = (val >> 8) & 0x0f;
+		fdiv--;
+		val &= ~(0x0f << 8);
+		val |= (fdiv << 8);
+		writel(val, (void *)MT76XX_DYN_CFG0_REG);
+		udelay(500);
+		val = readl((void *)MT76XX_DYN_CFG0_REG);
+		fdiv = (val >> 8) & 0x0f;
+	}
+
+	clrbits_le32((void *)MT76XX_MEMCTRL_BASE + 0x10, BIT(4));
+	ddr_cfg2_reg = readl((void *)MT76XX_MEMCTRL_BASE + 0x48);
+	clrbits_le32((void *)MT76XX_MEMCTRL_BASE + 0x48,
+		     (0x3 << 28) | (0x3 << 26));
+
+	min_coarse_dqs[0] = MIN_START;
+	min_coarse_dqs[1] = MIN_START;
+	min_fine_dqs[0] = MIN_FINE_START;
+	min_fine_dqs[1] = MIN_FINE_START;
+	max_coarse_dqs[0] = MAX_START;
+	max_coarse_dqs[1] = MAX_START;
+	max_fine_dqs[0] = MAX_FINE_START;
+	max_fine_dqs[1] = MAX_FINE_START;
+	dqs = 0;
+
+	/* Add by KP, DQS MIN boundary */
+	reg = readl((void *)MT76XX_MEMCTRL_BASE + 0x20);
+	coarse_dqs_dll = (reg & 0xf00) >> 8;
+	fine_dqs_dll = (reg & 0xf0) >> 4;
+	if (coarse_dqs_dll <= 8)
+		min_coarse_dqs_bnd = 8 - coarse_dqs_dll;
+	else
+		min_coarse_dqs_bnd = 0;
+
+	if (fine_dqs_dll <= 8)
+		min_fine_dqs_bnd = 8 - fine_dqs_dll;
+	else
+		min_fine_dqs_bnd = 0;
+	/* DQS MIN boundary */
+
+DQS_CAL:
+
+	for (k = 0; k < 2; k++) {
+		u32 test_dqs;
+
+		if (k == 0)
+			test_dqs = MAX_START;
+		else
+			test_dqs = MAX_FINE_START;
+
+		do {
+			flag = test_loop(k, dqs, test_dqs, max_coarse_dqs,
+					 0x400, 0x3, 0xf);
+			if (flag == -1)
+				break;
+
+			test_dqs++;
+		} while (test_dqs <= 0xf);
+
+		if (k == 0) {
+			max_coarse_dqs[dqs] = test_dqs;
+		} else {
+			test_dqs--;
+
+			if (test_dqs == MAX_FINE_START - 1) {
+				max_coarse_dqs[dqs]--;
+				max_fine_dqs[dqs] = 0xf;
+			} else {
+				max_fine_dqs[dqs] = test_dqs;
+			}
+		}
+	}
+
+	for (k = 0; k < 2; k++) {
+		u32 test_dqs;
+
+		if (k == 0)
+			test_dqs = MIN_START;
+		else
+			test_dqs = MIN_FINE_START;
+
+		do {
+			flag = test_loop(k, dqs, test_dqs, min_coarse_dqs,
+					 0x480, 0x1, 0x0);
+			if (k == 0) {
+				if (flag == -1 ||
+				    test_dqs == min_coarse_dqs_bnd)
+					break;
+
+				test_dqs--;
+
+				if (test_dqs < min_coarse_dqs_bnd)
+					break;
+			} else {
+				if (flag == -1) {
+					test_dqs++;
+					break;
+				} else if (test_dqs == min_fine_dqs_bnd) {
+					break;
+				}
+
+				test_dqs--;
+
+				if (test_dqs < min_fine_dqs_bnd)
+					break;
+			}
+		} while (test_dqs >= 0);
+
+		if (k == 0) {
+			min_coarse_dqs[dqs] = test_dqs;
+		} else {
+			if (test_dqs == MIN_FINE_START + 1) {
+				min_coarse_dqs[dqs]++;
+				min_fine_dqs[dqs] = 0x0;
+			} else {
+				min_fine_dqs[dqs] = test_dqs;
+			}
+		}
+	}
+
+	if (dqs == 0) {
+		dqs = 1;
+		goto DQS_CAL;
+	}
+
+	for (i = 0; i < 2; i++) {
+		u32 temp;
+
+		coarse_dqs[i] = (max_coarse_dqs[i] + min_coarse_dqs[i]) >> 1;
+		temp =
+		    (((max_coarse_dqs[i] + min_coarse_dqs[i]) % 2) * 4) +
+		    ((max_fine_dqs[i] + min_fine_dqs[i]) >> 1);
+		if (temp >= 0x10) {
+			coarse_dqs[i]++;
+			fine_dqs[i] = (temp - 0x10) + 0x8;
+		} else {
+			fine_dqs[i] = temp;
+		}
+	}
+	reg = (coarse_dqs[1] << 12) | (fine_dqs[1] << 8) |
+		(coarse_dqs[0] << 4) | fine_dqs[0];
+
+	clrbits_le32((void *)MT76XX_MEMCTRL_BASE + 0x10, BIT(4));
+	writel(reg, (void *)MT76XX_MEMCTRL_BASE + 0x64);
+	writel(ddr_cfg2_reg, (void *)MT76XX_MEMCTRL_BASE + 0x48);
+	setbits_le32((void *)MT76XX_MEMCTRL_BASE + 0x10, BIT(4));
+
+	for (i = 0; i < 2; i++)
+		debug("[%02X%02X%02X%02X]", min_coarse_dqs[i],
+		      min_fine_dqs[i], max_coarse_dqs[i], max_fine_dqs[i]);
+	debug("\nDDR Calibration DQS reg = %08X\n", reg);
+}
diff --git a/arch/nds32/cpu/n1213/ag101/timer.c b/arch/nds32/cpu/n1213/ag101/timer.c
index c59585692d..8208b6de90 100644
--- a/arch/nds32/cpu/n1213/ag101/timer.c
+++ b/arch/nds32/cpu/n1213/ag101/timer.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <init.h>
 #include <irq_func.h>
+#include <log.h>
 #include <time.h>
 #include <asm/io.h>
 #include <faraday/fttmr010.h>
diff --git a/arch/nds32/lib/bootm.c b/arch/nds32/lib/bootm.c
index b17368647d..ab539f4036 100644
--- a/arch/nds32/lib/bootm.c
+++ b/arch/nds32/lib/bootm.c
@@ -11,6 +11,7 @@
 #include <env.h>
 #include <hang.h>
 #include <image.h>
+#include <log.h>
 #include <u-boot/zlib.h>
 #include <asm/byteorder.h>
 #include <asm/bootm.h>
diff --git a/arch/nios2/lib/bootm.c b/arch/nios2/lib/bootm.c
index fed412907f..2c8f9731c7 100644
--- a/arch/nios2/lib/bootm.c
+++ b/arch/nios2/lib/bootm.c
@@ -9,6 +9,7 @@
 #include <env.h>
 #include <image.h>
 #include <irq_func.h>
+#include <log.h>
 
 #define NIOS_MAGIC 0x534f494e /* enable command line and initrd passing */
 
diff --git a/arch/powerpc/cpu/mpc83xx/law.c b/arch/powerpc/cpu/mpc83xx/law.c
index c49b4f784b..5e02f4094b 100644
--- a/arch/powerpc/cpu/mpc83xx/law.c
+++ b/arch/powerpc/cpu/mpc83xx/law.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/fsl_law.h>
 #include <asm/mmu.h>
 #include <linux/log2.h>
diff --git a/arch/powerpc/cpu/mpc83xx/spd_sdram.c b/arch/powerpc/cpu/mpc83xx/spd_sdram.c
index 22506a5be5..34faff2df5 100644
--- a/arch/powerpc/cpu/mpc83xx/spd_sdram.c
+++ b/arch/powerpc/cpu/mpc83xx/spd_sdram.c
@@ -14,6 +14,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <time.h>
 #include <vsprintf.h>
 #include <asm/processor.h>
diff --git a/arch/powerpc/cpu/mpc85xx/bsc9132_serdes.c b/arch/powerpc/cpu/mpc85xx/bsc9132_serdes.c
index 8604f4a8e8..b972cf3b5e 100644
--- a/arch/powerpc/cpu/mpc85xx/bsc9132_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/bsc9132_serdes.c
@@ -6,6 +6,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
diff --git a/arch/powerpc/cpu/mpc85xx/c29x_serdes.c b/arch/powerpc/cpu/mpc85xx/c29x_serdes.c
index 97eeb489cb..34b58bb7f9 100644
--- a/arch/powerpc/cpu/mpc85xx/c29x_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/c29x_serdes.c
@@ -5,6 +5,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c
index 10c4bb91d7..8de218666b 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu.c
@@ -13,6 +13,7 @@
 #include <cpu_func.h>
 #include <init.h>
 #include <irq_func.h>
+#include <log.h>
 #include <time.h>
 #include <vsprintf.h>
 #include <watchdog.h>
diff --git a/arch/powerpc/cpu/mpc85xx/fdt.c b/arch/powerpc/cpu/mpc85xx/fdt.c
index 65f909fd1e..55f191f202 100644
--- a/arch/powerpc/cpu/mpc85xx/fdt.c
+++ b/arch/powerpc/cpu/mpc85xx/fdt.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <clock_legacy.h>
 #include <env.h>
+#include <log.h>
 #include <time.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
diff --git a/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c b/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c
index d7a633ddf2..796bc15a7c 100644
--- a/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/fsl_serdes.h>
 #include <asm/immap_85xx.h>
 #include <asm/io.h>
diff --git a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c
index ebdcd29c13..e6d4707e3e 100644
--- a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <log.h>
 #include <time.h>
 #ifdef CONFIG_SYS_P4080_ERRATUM_SERDES8
 #include <hwconfig.h>
diff --git a/arch/powerpc/cpu/mpc85xx/interrupts.c b/arch/powerpc/cpu/mpc85xx/interrupts.c
index 43f7919b04..e9da9c0d48 100644
--- a/arch/powerpc/cpu/mpc85xx/interrupts.c
+++ b/arch/powerpc/cpu/mpc85xx/interrupts.c
@@ -12,6 +12,7 @@
 
 #include <common.h>
 #include <irq_func.h>
+#include <log.h>
 #include <time.h>
 #include <watchdog.h>
 #include <command.h>
diff --git a/arch/powerpc/cpu/mpc85xx/liodn.c b/arch/powerpc/cpu/mpc85xx/liodn.c
index e7703b8a49..e552378e78 100644
--- a/arch/powerpc/cpu/mpc85xx/liodn.c
+++ b/arch/powerpc/cpu/mpc85xx/liodn.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 
diff --git a/arch/powerpc/cpu/mpc85xx/mp.c b/arch/powerpc/cpu/mpc85xx/mp.c
index 0f8c8cd667..28e1580a43 100644
--- a/arch/powerpc/cpu/mpc85xx/mp.c
+++ b/arch/powerpc/cpu/mpc85xx/mp.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <env.h>
+#include <log.h>
 #include <asm/processor.h>
 #include <env.h>
 #include <ioports.h>
diff --git a/arch/powerpc/cpu/mpc85xx/mpc8536_serdes.c b/arch/powerpc/cpu/mpc85xx/mpc8536_serdes.c
index c4c4154ac3..111692f15d 100644
--- a/arch/powerpc/cpu/mpc85xx/mpc8536_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/mpc8536_serdes.c
@@ -6,6 +6,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
diff --git a/arch/powerpc/cpu/mpc85xx/mpc8544_serdes.c b/arch/powerpc/cpu/mpc85xx/mpc8544_serdes.c
index bdcf46ed11..f3b5450ad5 100644
--- a/arch/powerpc/cpu/mpc85xx/mpc8544_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/mpc8544_serdes.c
@@ -5,6 +5,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
diff --git a/arch/powerpc/cpu/mpc85xx/mpc8548_serdes.c b/arch/powerpc/cpu/mpc85xx/mpc8548_serdes.c
index 99bab9e8ef..2a5c3e3200 100644
--- a/arch/powerpc/cpu/mpc85xx/mpc8548_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/mpc8548_serdes.c
@@ -5,6 +5,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
diff --git a/arch/powerpc/cpu/mpc85xx/mpc8568_serdes.c b/arch/powerpc/cpu/mpc85xx/mpc8568_serdes.c
index 414c05868f..81b66c3fa6 100644
--- a/arch/powerpc/cpu/mpc85xx/mpc8568_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/mpc8568_serdes.c
@@ -5,6 +5,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
diff --git a/arch/powerpc/cpu/mpc85xx/mpc8569_serdes.c b/arch/powerpc/cpu/mpc85xx/mpc8569_serdes.c
index 637522861e..eb54b8252b 100644
--- a/arch/powerpc/cpu/mpc85xx/mpc8569_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/mpc8569_serdes.c
@@ -5,6 +5,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
diff --git a/arch/powerpc/cpu/mpc85xx/mpc8572_serdes.c b/arch/powerpc/cpu/mpc85xx/mpc8572_serdes.c
index 0e0c63a14f..1b4e614918 100644
--- a/arch/powerpc/cpu/mpc85xx/mpc8572_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/mpc8572_serdes.c
@@ -5,6 +5,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
diff --git a/arch/powerpc/cpu/mpc85xx/p1010_serdes.c b/arch/powerpc/cpu/mpc85xx/p1010_serdes.c
index cc907c5894..8cba4222c4 100644
--- a/arch/powerpc/cpu/mpc85xx/p1010_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/p1010_serdes.c
@@ -6,6 +6,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
diff --git a/arch/powerpc/cpu/mpc85xx/p1021_serdes.c b/arch/powerpc/cpu/mpc85xx/p1021_serdes.c
index 509051047b..1a7c839d61 100644
--- a/arch/powerpc/cpu/mpc85xx/p1021_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/p1021_serdes.c
@@ -5,6 +5,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
diff --git a/arch/powerpc/cpu/mpc85xx/p1022_serdes.c b/arch/powerpc/cpu/mpc85xx/p1022_serdes.c
index 4c51a72630..719cb4f3d4 100644
--- a/arch/powerpc/cpu/mpc85xx/p1022_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/p1022_serdes.c
@@ -6,6 +6,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
diff --git a/arch/powerpc/cpu/mpc85xx/p1023_serdes.c b/arch/powerpc/cpu/mpc85xx/p1023_serdes.c
index 482172d4e0..bf5cac6199 100644
--- a/arch/powerpc/cpu/mpc85xx/p1023_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/p1023_serdes.c
@@ -6,6 +6,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
diff --git a/arch/powerpc/cpu/mpc85xx/p2020_serdes.c b/arch/powerpc/cpu/mpc85xx/p2020_serdes.c
index 1e7ed43957..f36b1b64ed 100644
--- a/arch/powerpc/cpu/mpc85xx/p2020_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/p2020_serdes.c
@@ -5,6 +5,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
diff --git a/arch/powerpc/cpu/mpc86xx/cpu.c b/arch/powerpc/cpu/mpc86xx/cpu.c
index fe35744b70..9f5bce3992 100644
--- a/arch/powerpc/cpu/mpc86xx/cpu.c
+++ b/arch/powerpc/cpu/mpc86xx/cpu.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <time.h>
 #include <vsprintf.h>
 #include <watchdog.h>
diff --git a/arch/powerpc/cpu/mpc86xx/interrupts.c b/arch/powerpc/cpu/mpc86xx/interrupts.c
index 8e4a66d23e..033ca327f0 100644
--- a/arch/powerpc/cpu/mpc86xx/interrupts.c
+++ b/arch/powerpc/cpu/mpc86xx/interrupts.c
@@ -16,6 +16,7 @@
 
 #include <common.h>
 #include <irq_func.h>
+#include <log.h>
 #include <mpc86xx.h>
 #include <command.h>
 #include <time.h>
diff --git a/arch/powerpc/cpu/mpc86xx/mpc8610_serdes.c b/arch/powerpc/cpu/mpc86xx/mpc8610_serdes.c
index 0e0a90eb7b..ecc88ba437 100644
--- a/arch/powerpc/cpu/mpc86xx/mpc8610_serdes.c
+++ b/arch/powerpc/cpu/mpc86xx/mpc8610_serdes.c
@@ -5,6 +5,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/immap_86xx.h>
 #include <asm/fsl_serdes.h>
diff --git a/arch/powerpc/cpu/mpc86xx/mpc8641_serdes.c b/arch/powerpc/cpu/mpc86xx/mpc8641_serdes.c
index d272d4ba29..4df446618c 100644
--- a/arch/powerpc/cpu/mpc86xx/mpc8641_serdes.c
+++ b/arch/powerpc/cpu/mpc86xx/mpc8641_serdes.c
@@ -5,6 +5,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/immap_86xx.h>
 #include <asm/fsl_serdes.h>
diff --git a/arch/powerpc/cpu/mpc8xxx/fsl_pamu.c b/arch/powerpc/cpu/mpc8xxx/fsl_pamu.c
index d81af70f44..3d00de3181 100644
--- a/arch/powerpc/cpu/mpc8xxx/fsl_pamu.c
+++ b/arch/powerpc/cpu/mpc8xxx/fsl_pamu.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <linux/log2.h>
 #include <malloc.h>
 #include <asm/fsl_pamu.h>
diff --git a/arch/powerpc/cpu/mpc8xxx/pamu_table.c b/arch/powerpc/cpu/mpc8xxx/pamu_table.c
index 7b4690abc9..7dd71d2e0c 100644
--- a/arch/powerpc/cpu/mpc8xxx/pamu_table.c
+++ b/arch/powerpc/cpu/mpc8xxx/pamu_table.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/fsl_pamu.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/powerpc/cpu/mpc8xxx/srio.c b/arch/powerpc/cpu/mpc8xxx/srio.c
index a1f9403559..17b11744a4 100644
--- a/arch/powerpc/cpu/mpc8xxx/srio.c
+++ b/arch/powerpc/cpu/mpc8xxx/srio.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <config.h>
+#include <log.h>
 #include <time.h>
 #include <asm/fsl_law.h>
 #include <asm/fsl_serdes.h>
diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c
index a9bcb6614f..cd92db0a92 100644
--- a/arch/powerpc/lib/bootm.c
+++ b/arch/powerpc/lib/bootm.c
@@ -13,6 +13,7 @@
 #include <env.h>
 #include <init.h>
 #include <lmb.h>
+#include <log.h>
 #include <watchdog.h>
 #include <command.h>
 #include <image.h>
diff --git a/arch/powerpc/lib/extable.c b/arch/powerpc/lib/extable.c
index 683fd53b6a..7e9d4f22f3 100644
--- a/arch/powerpc/lib/extable.c
+++ b/arch/powerpc/lib/extable.c
@@ -6,6 +6,7 @@
  * Wolfgang Denk, DENX Software Engineering, wd at denx.de.
  */
 #include <common.h>
+#include <log.h>
 
 /*
  * The exception table consists of pairs of addresses: the first is the
diff --git a/arch/powerpc/lib/spl.c b/arch/powerpc/lib/spl.c
index d90a6e27b9..d4a6057527 100644
--- a/arch/powerpc/lib/spl.c
+++ b/arch/powerpc/lib/spl.c
@@ -4,6 +4,7 @@
  */
 #include <common.h>
 #include <config.h>
+#include <log.h>
 #include <spl.h>
 #include <image.h>
 #include <linux/compiler.h>
diff --git a/arch/riscv/lib/bootm.c b/arch/riscv/lib/bootm.c
index 98f2c76860..c4137ded83 100644
--- a/arch/riscv/lib/bootm.c
+++ b/arch/riscv/lib/bootm.c
@@ -12,6 +12,7 @@
 #include <dm.h>
 #include <fdt_support.h>
 #include <hang.h>
+#include <log.h>
 #include <dm/root.h>
 #include <image.h>
 #include <asm/byteorder.h>
diff --git a/arch/riscv/lib/fdt_fixup.c b/arch/riscv/lib/fdt_fixup.c
index 20e0759f13..6db48ad04a 100644
--- a/arch/riscv/lib/fdt_fixup.c
+++ b/arch/riscv/lib/fdt_fixup.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <fdt_support.h>
+#include <log.h>
 #include <mapmem.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/riscv/lib/spl.c b/arch/riscv/lib/spl.c
index f3f603b76e..c47dcd46ce 100644
--- a/arch/riscv/lib/spl.c
+++ b/arch/riscv/lib/spl.c
@@ -7,6 +7,7 @@
 #include <cpu_func.h>
 #include <hang.h>
 #include <init.h>
+#include <log.h>
 #include <spl.h>
 #include <asm/smp.h>
 
diff --git a/arch/sandbox/cpu/cpu.c b/arch/sandbox/cpu/cpu.c
index 842640c50e..0d9300736d 100644
--- a/arch/sandbox/cpu/cpu.c
+++ b/arch/sandbox/cpu/cpu.c
@@ -8,6 +8,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <linux/libfdt.h>
 #include <os.h>
 #include <asm/io.h>
diff --git a/arch/sandbox/cpu/spl.c b/arch/sandbox/cpu/spl.c
index b92db85c22..7ab8919eb9 100644
--- a/arch/sandbox/cpu/spl.c
+++ b/arch/sandbox/cpu/spl.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <hang.h>
 #include <init.h>
+#include <log.h>
 #include <os.h>
 #include <spl.h>
 #include <asm/spl.h>
diff --git a/arch/sandbox/cpu/state.c b/arch/sandbox/cpu/state.c
index a347cec528..1f794123b3 100644
--- a/arch/sandbox/cpu/state.c
+++ b/arch/sandbox/cpu/state.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <os.h>
 #include <asm/malloc.h>
 #include <asm/state.h>
diff --git a/arch/sandbox/lib/pci_io.c b/arch/sandbox/lib/pci_io.c
index f22e47c7f6..2038141947 100644
--- a/arch/sandbox/lib/pci_io.c
+++ b/arch/sandbox/lib/pci_io.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <command.h>
 #include <dm.h>
+#include <log.h>
 #include <asm/io.h>
 
 int pci_map_physmem(phys_addr_t paddr, unsigned long *lenp,
diff --git a/arch/x86/cpu/acpi_gpe.c b/arch/x86/cpu/acpi_gpe.c
index 55005455c0..8aa2009bd6 100644
--- a/arch/x86/cpu/acpi_gpe.c
+++ b/arch/x86/cpu/acpi_gpe.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <irq.h>
+#include <log.h>
 #include <asm/io.h>
 
 /**
diff --git a/arch/x86/cpu/apollolake/fsp_m.c b/arch/x86/cpu/apollolake/fsp_m.c
index 5308af8ed4..56ce59dc70 100644
--- a/arch/x86/cpu/apollolake/fsp_m.c
+++ b/arch/x86/cpu/apollolake/fsp_m.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <asm/arch/iomap.h>
 #include <asm/arch/fsp/fsp_configs.h>
 #include <asm/arch/fsp/fsp_m_upd.h>
diff --git a/arch/x86/cpu/apollolake/fsp_s.c b/arch/x86/cpu/apollolake/fsp_s.c
index 30b820fdbc..7d62af9cc0 100644
--- a/arch/x86/cpu/apollolake/fsp_s.c
+++ b/arch/x86/cpu/apollolake/fsp_s.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <init.h>
 #include <irq.h>
+#include <log.h>
 #include <malloc.h>
 #include <acpi/acpi_s3.h>
 #include <asm/intel_pinctrl.h>
diff --git a/arch/x86/cpu/apollolake/hostbridge.c b/arch/x86/cpu/apollolake/hostbridge.c
index 793853d5b5..cb46ec6c0b 100644
--- a/arch/x86/cpu/apollolake/hostbridge.c
+++ b/arch/x86/cpu/apollolake/hostbridge.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <dt-structs.h>
+#include <log.h>
 #include <spl.h>
 #include <asm/intel_pinctrl.h>
 #include <asm/intel_regs.h>
diff --git a/arch/x86/cpu/apollolake/lpc.c b/arch/x86/cpu/apollolake/lpc.c
index 45b2144fc6..b81a458f2e 100644
--- a/arch/x86/cpu/apollolake/lpc.c
+++ b/arch/x86/cpu/apollolake/lpc.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <spl.h>
 #include <asm/lpc_common.h>
 #include <asm/pci.h>
diff --git a/arch/x86/cpu/apollolake/pmc.c b/arch/x86/cpu/apollolake/pmc.c
index 4ea7c7447b..c82cbdca6a 100644
--- a/arch/x86/cpu/apollolake/pmc.c
+++ b/arch/x86/cpu/apollolake/pmc.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <dt-structs.h>
 #include <dm.h>
+#include <log.h>
 #include <spl.h>
 #include <acpi/acpi_s3.h>
 #include <asm/io.h>
diff --git a/arch/x86/cpu/apollolake/punit.c b/arch/x86/cpu/apollolake/punit.c
index 1a131fb0b1..600c5ea936 100644
--- a/arch/x86/cpu/apollolake/punit.c
+++ b/arch/x86/cpu/apollolake/punit.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <spl.h>
 #include <asm/cpu.h>
 #include <asm/cpu_common.h>
diff --git a/arch/x86/cpu/apollolake/spl.c b/arch/x86/cpu/apollolake/spl.c
index 1cf7cebff5..5a53831dc6 100644
--- a/arch/x86/cpu/apollolake/spl.c
+++ b/arch/x86/cpu/apollolake/spl.c
@@ -8,6 +8,7 @@
 #include <bootstage.h>
 #include <dm.h>
 #include <image.h>
+#include <log.h>
 #include <malloc.h>
 #include <spi.h>
 #include <spl.h>
diff --git a/arch/x86/cpu/baytrail/acpi.c b/arch/x86/cpu/baytrail/acpi.c
index 5772310979..65f2006a0a 100644
--- a/arch/x86/cpu/baytrail/acpi.c
+++ b/arch/x86/cpu/baytrail/acpi.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <cpu.h>
 #include <dm.h>
+#include <log.h>
 #include <acpi/acpi_s3.h>
 #include <acpi/acpi_table.h>
 #include <asm/io.h>
diff --git a/arch/x86/cpu/baytrail/cpu.c b/arch/x86/cpu/baytrail/cpu.c
index a9cfcedd81..18e48ffa53 100644
--- a/arch/x86/cpu/baytrail/cpu.c
+++ b/arch/x86/cpu/baytrail/cpu.c
@@ -9,6 +9,7 @@
 #include <cpu.h>
 #include <dm.h>
 #include <init.h>
+#include <log.h>
 #include <pci.h>
 #include <asm/cpu.h>
 #include <asm/cpu_x86.h>
diff --git a/arch/x86/cpu/baytrail/fsp_configs.c b/arch/x86/cpu/baytrail/fsp_configs.c
index 1d1948c91a..21816ce5b8 100644
--- a/arch/x86/cpu/baytrail/fsp_configs.c
+++ b/arch/x86/cpu/baytrail/fsp_configs.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <asm/fsp1/fsp_support.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/braswell/fsp_configs.c b/arch/x86/cpu/braswell/fsp_configs.c
index 60101d742d..9e710a940c 100644
--- a/arch/x86/cpu/braswell/fsp_configs.c
+++ b/arch/x86/cpu/braswell/fsp_configs.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <asm/fsp1/fsp_support.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/broadwell/adsp.c b/arch/x86/cpu/broadwell/adsp.c
index 2ac8cea7c3..41f7d5d4d1 100644
--- a/arch/x86/cpu/broadwell/adsp.c
+++ b/arch/x86/cpu/broadwell/adsp.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <pci.h>
 #include <asm/io.h>
 #include <asm/cpu.h>
diff --git a/arch/x86/cpu/broadwell/cpu.c b/arch/x86/cpu/broadwell/cpu.c
index 793167937c..b77301118c 100644
--- a/arch/x86/cpu/broadwell/cpu.c
+++ b/arch/x86/cpu/broadwell/cpu.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <cpu.h>
 #include <init.h>
+#include <log.h>
 #include <asm/cpu.h>
 #include <asm/cpu_x86.h>
 #include <asm/cpu_common.h>
diff --git a/arch/x86/cpu/broadwell/cpu_from_spl.c b/arch/x86/cpu/broadwell/cpu_from_spl.c
index 17ff43b58e..6567d50653 100644
--- a/arch/x86/cpu/broadwell/cpu_from_spl.c
+++ b/arch/x86/cpu/broadwell/cpu_from_spl.c
@@ -10,6 +10,7 @@
 #include <debug_uart.h>
 #include <handoff.h>
 #include <init.h>
+#include <log.h>
 #include <asm/mtrr.h>
 
 int misc_init_r(void)
diff --git a/arch/x86/cpu/broadwell/cpu_full.c b/arch/x86/cpu/broadwell/cpu_full.c
index 3d42b1caac..120879038d 100644
--- a/arch/x86/cpu/broadwell/cpu_full.c
+++ b/arch/x86/cpu/broadwell/cpu_full.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <cpu.h>
 #include <init.h>
+#include <log.h>
 #include <asm/cpu.h>
 #include <asm/cpu_x86.h>
 #include <asm/cpu_common.h>
diff --git a/arch/x86/cpu/broadwell/lpc.c b/arch/x86/cpu/broadwell/lpc.c
index 9dc9b63db6..5669a028cf 100644
--- a/arch/x86/cpu/broadwell/lpc.c
+++ b/arch/x86/cpu/broadwell/lpc.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <pch.h>
 #include <asm/intel_regs.h>
 #include <asm/io.h>
diff --git a/arch/x86/cpu/broadwell/me.c b/arch/x86/cpu/broadwell/me.c
index adc656c07a..7991e1ea07 100644
--- a/arch/x86/cpu/broadwell/me.c
+++ b/arch/x86/cpu/broadwell/me.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <errno.h>
+#include <log.h>
 #include <asm/arch/me.h>
 
 static inline void me_read_dword_ptr(struct udevice *dev, void *ptr, int offset)
diff --git a/arch/x86/cpu/broadwell/pch.c b/arch/x86/cpu/broadwell/pch.c
index a48945adf1..8c71e43a2d 100644
--- a/arch/x86/cpu/broadwell/pch.c
+++ b/arch/x86/cpu/broadwell/pch.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <pch.h>
 #include <asm/cpu.h>
 #include <asm/gpio.h>
diff --git a/arch/x86/cpu/broadwell/pinctrl_broadwell.c b/arch/x86/cpu/broadwell/pinctrl_broadwell.c
index aa83abbf85..0ead13af62 100644
--- a/arch/x86/cpu/broadwell/pinctrl_broadwell.c
+++ b/arch/x86/cpu/broadwell/pinctrl_broadwell.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <pch.h>
 #include <pci.h>
 #include <asm/cpu.h>
diff --git a/arch/x86/cpu/broadwell/power_state.c b/arch/x86/cpu/broadwell/power_state.c
index 09fda487d0..99d6f72cf6 100644
--- a/arch/x86/cpu/broadwell/power_state.c
+++ b/arch/x86/cpu/broadwell/power_state.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <pci.h>
 #include <asm/io.h>
 #include <asm/intel_regs.h>
diff --git a/arch/x86/cpu/broadwell/refcode.c b/arch/x86/cpu/broadwell/refcode.c
index b944896e75..6c04dde992 100644
--- a/arch/x86/cpu/broadwell/refcode.c
+++ b/arch/x86/cpu/broadwell/refcode.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <errno.h>
 #include <init.h>
+#include <log.h>
 #include <asm/arch/pei_data.h>
 
 #define RMODULE_MAGIC		0xf8fe
diff --git a/arch/x86/cpu/broadwell/sata.c b/arch/x86/cpu/broadwell/sata.c
index d89e0a1c9b..9f3c56b204 100644
--- a/arch/x86/cpu/broadwell/sata.c
+++ b/arch/x86/cpu/broadwell/sata.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/intel_regs.h>
diff --git a/arch/x86/cpu/broadwell/sdram.c b/arch/x86/cpu/broadwell/sdram.c
index 15bfc5811c..72f59a0a57 100644
--- a/arch/x86/cpu/broadwell/sdram.c
+++ b/arch/x86/cpu/broadwell/sdram.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <init.h>
+#include <log.h>
 #include <pci.h>
 #include <syscon.h>
 #include <asm/cpu.h>
diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c
index e0f23bb509..a814e7d7a6 100644
--- a/arch/x86/cpu/cpu.c
+++ b/arch/x86/cpu/cpu.c
@@ -25,6 +25,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <init.h>
+#include <log.h>
 #include <malloc.h>
 #include <syscon.h>
 #include <acpi/acpi_s3.h>
diff --git a/arch/x86/cpu/efi/payload.c b/arch/x86/cpu/efi/payload.c
index 66df128787..71619f6f01 100644
--- a/arch/x86/cpu/efi/payload.c
+++ b/arch/x86/cpu/efi/payload.c
@@ -9,6 +9,7 @@
 #include <efi.h>
 #include <errno.h>
 #include <init.h>
+#include <log.h>
 #include <usb.h>
 #include <asm/bootparam.h>
 #include <asm/e820.h>
diff --git a/arch/x86/cpu/intel_common/cpu.c b/arch/x86/cpu/intel_common/cpu.c
index 4d093a5391..509730aea9 100644
--- a/arch/x86/cpu/intel_common/cpu.c
+++ b/arch/x86/cpu/intel_common/cpu.c
@@ -11,6 +11,7 @@
 #include <cpu.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <asm/cpu.h>
 #include <asm/cpu_common.h>
 #include <asm/intel_regs.h>
diff --git a/arch/x86/cpu/intel_common/itss.c b/arch/x86/cpu/intel_common/itss.c
index e4f785ce89..963afa8f5b 100644
--- a/arch/x86/cpu/intel_common/itss.c
+++ b/arch/x86/cpu/intel_common/itss.c
@@ -13,6 +13,7 @@
 #include <dm.h>
 #include <dt-structs.h>
 #include <irq.h>
+#include <log.h>
 #include <malloc.h>
 #include <p2sb.h>
 #include <spl.h>
diff --git a/arch/x86/cpu/intel_common/me_status.c b/arch/x86/cpu/intel_common/me_status.c
index fc9efbf3a9..abc5f6fbc7 100644
--- a/arch/x86/cpu/intel_common/me_status.c
+++ b/arch/x86/cpu/intel_common/me_status.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/arch/me.h>
 
 /* HFS1[3:0] Current Working State Values */
diff --git a/arch/x86/cpu/intel_common/microcode.c b/arch/x86/cpu/intel_common/microcode.c
index c7a539d281..0355d3c1da 100644
--- a/arch/x86/cpu/intel_common/microcode.c
+++ b/arch/x86/cpu/intel_common/microcode.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <linux/libfdt.h>
 #include <asm/cpu.h>
 #include <asm/microcode.h>
diff --git a/arch/x86/cpu/intel_common/mrc.c b/arch/x86/cpu/intel_common/mrc.c
index 755670a847..73bfd12332 100644
--- a/arch/x86/cpu/intel_common/mrc.c
+++ b/arch/x86/cpu/intel_common/mrc.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <init.h>
+#include <log.h>
 #include <syscon.h>
 #include <asm/cpu.h>
 #include <asm/gpio.h>
diff --git a/arch/x86/cpu/intel_common/p2sb.c b/arch/x86/cpu/intel_common/p2sb.c
index 6f3c441618..860eaf91f3 100644
--- a/arch/x86/cpu/intel_common/p2sb.c
+++ b/arch/x86/cpu/intel_common/p2sb.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <dm.h>
 #include <dt-structs.h>
+#include <log.h>
 #include <p2sb.h>
 #include <spl.h>
 #include <asm/pci.h>
diff --git a/arch/x86/cpu/intel_common/report_platform.c b/arch/x86/cpu/intel_common/report_platform.c
index 0f217c1497..a3612817c4 100644
--- a/arch/x86/cpu/intel_common/report_platform.c
+++ b/arch/x86/cpu/intel_common/report_platform.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/cpu.h>
 #include <asm/pci.h>
 #include <asm/report_platform.h>
diff --git a/arch/x86/cpu/ioapic.c b/arch/x86/cpu/ioapic.c
index 01ade76a58..4f99de6ece 100644
--- a/arch/x86/cpu/ioapic.c
+++ b/arch/x86/cpu/ioapic.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/ioapic.h>
 #include <asm/lapic.h>
diff --git a/arch/x86/cpu/irq.c b/arch/x86/cpu/irq.c
index bafa031082..836a0e8b86 100644
--- a/arch/x86/cpu/irq.c
+++ b/arch/x86/cpu/irq.c
@@ -8,6 +8,7 @@
 #include <errno.h>
 #include <fdtdec.h>
 #include <irq.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/io.h>
 #include <asm/irq.h>
diff --git a/arch/x86/cpu/ivybridge/bd82x6x.c b/arch/x86/cpu/ivybridge/bd82x6x.c
index 1cb6cecda9..d276cbe13b 100644
--- a/arch/x86/cpu/ivybridge/bd82x6x.c
+++ b/arch/x86/cpu/ivybridge/bd82x6x.c
@@ -6,6 +6,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <malloc.h>
 #include <pch.h>
 #include <asm/cpu.h>
diff --git a/arch/x86/cpu/ivybridge/cpu.c b/arch/x86/cpu/ivybridge/cpu.c
index 0639b5cf02..cb6eded9c9 100644
--- a/arch/x86/cpu/ivybridge/cpu.c
+++ b/arch/x86/cpu/ivybridge/cpu.c
@@ -16,6 +16,7 @@
 #include <errno.h>
 #include <fdtdec.h>
 #include <init.h>
+#include <log.h>
 #include <pch.h>
 #include <asm/cpu.h>
 #include <asm/cpu_common.h>
diff --git a/arch/x86/cpu/ivybridge/early_me.c b/arch/x86/cpu/ivybridge/early_me.c
index 219d5be399..cae9578516 100644
--- a/arch/x86/cpu/ivybridge/early_me.c
+++ b/arch/x86/cpu/ivybridge/early_me.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <sysreset.h>
 #include <asm/pci.h>
 #include <asm/cpu.h>
diff --git a/arch/x86/cpu/ivybridge/fsp_configs.c b/arch/x86/cpu/ivybridge/fsp_configs.c
index 0e6453c847..41d7d2a2b4 100644
--- a/arch/x86/cpu/ivybridge/fsp_configs.c
+++ b/arch/x86/cpu/ivybridge/fsp_configs.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <asm/fsp1/fsp_support.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/ivybridge/lpc.c b/arch/x86/cpu/ivybridge/lpc.c
index d9ddcdc840..85fd2a965a 100644
--- a/arch/x86/cpu/ivybridge/lpc.c
+++ b/arch/x86/cpu/ivybridge/lpc.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <rtc.h>
 #include <pci.h>
 #include <asm/intel_regs.h>
diff --git a/arch/x86/cpu/ivybridge/model_206ax.c b/arch/x86/cpu/ivybridge/model_206ax.c
index 56ab6bf4ac..5954a24873 100644
--- a/arch/x86/cpu/ivybridge/model_206ax.c
+++ b/arch/x86/cpu/ivybridge/model_206ax.c
@@ -10,6 +10,7 @@
 #include <cpu.h>
 #include <dm.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/cpu.h>
 #include <asm/cpu_common.h>
diff --git a/arch/x86/cpu/ivybridge/northbridge.c b/arch/x86/cpu/ivybridge/northbridge.c
index 0f427afcb8..877b31b9d6 100644
--- a/arch/x86/cpu/ivybridge/northbridge.c
+++ b/arch/x86/cpu/ivybridge/northbridge.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <asm/msr.h>
 #include <asm/cpu.h>
 #include <asm/intel_regs.h>
diff --git a/arch/x86/cpu/ivybridge/sata.c b/arch/x86/cpu/ivybridge/sata.c
index fc6c427430..025b20be31 100644
--- a/arch/x86/cpu/ivybridge/sata.c
+++ b/arch/x86/cpu/ivybridge/sata.c
@@ -8,6 +8,7 @@
 #include <ahci.h>
 #include <dm.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/pch_common.h>
 #include <asm/pci.h>
diff --git a/arch/x86/cpu/ivybridge/sdram.c b/arch/x86/cpu/ivybridge/sdram.c
index cf34f94a91..99bc48021e 100644
--- a/arch/x86/cpu/ivybridge/sdram.c
+++ b/arch/x86/cpu/ivybridge/sdram.c
@@ -13,6 +13,7 @@
 #include <errno.h>
 #include <fdtdec.h>
 #include <init.h>
+#include <log.h>
 #include <malloc.h>
 #include <net.h>
 #include <rtc.h>
diff --git a/arch/x86/cpu/lapic.c b/arch/x86/cpu/lapic.c
index 44ed446784..c0691454f1 100644
--- a/arch/x86/cpu/lapic.c
+++ b/arch/x86/cpu/lapic.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/lapic.h>
 #include <asm/msr.h>
diff --git a/arch/x86/cpu/mp_init.c b/arch/x86/cpu/mp_init.c
index 7b09f90cd5..c3cd080885 100644
--- a/arch/x86/cpu/mp_init.c
+++ b/arch/x86/cpu/mp_init.c
@@ -9,6 +9,7 @@
 #include <cpu.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <qfw.h>
 #include <asm/atomic.h>
diff --git a/arch/x86/cpu/mtrr.c b/arch/x86/cpu/mtrr.c
index 0e4402d68e..7ec0733337 100644
--- a/arch/x86/cpu/mtrr.c
+++ b/arch/x86/cpu/mtrr.c
@@ -18,6 +18,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/msr.h>
diff --git a/arch/x86/cpu/pci.c b/arch/x86/cpu/pci.c
index e1aae158ce..d4f9290ca7 100644
--- a/arch/x86/cpu/pci.c
+++ b/arch/x86/cpu/pci.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <pci.h>
 #include <asm/io.h>
diff --git a/arch/x86/cpu/quark/dram.c b/arch/x86/cpu/quark/dram.c
index 30f4755626..72937139ed 100644
--- a/arch/x86/cpu/quark/dram.c
+++ b/arch/x86/cpu/quark/dram.c
@@ -8,6 +8,7 @@
 #include <errno.h>
 #include <fdtdec.h>
 #include <init.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/cache.h>
 #include <asm/mrccache.h>
diff --git a/arch/x86/cpu/quark/mrc_util.h b/arch/x86/cpu/quark/mrc_util.h
index 4a760a9f59..e6e69c49d0 100644
--- a/arch/x86/cpu/quark/mrc_util.h
+++ b/arch/x86/cpu/quark/mrc_util.h
@@ -10,6 +10,8 @@
 #ifndef _MRC_UTIL_H_
 #define _MRC_UTIL_H_
 
+#include <log.h>
+
 /* Turn on this macro to enable MRC debugging output */
 #undef  MRC_DEBUG
 
diff --git a/arch/x86/cpu/slimbootloader/serial.c b/arch/x86/cpu/slimbootloader/serial.c
index bab54b18df..9813f7977b 100644
--- a/arch/x86/cpu/slimbootloader/serial.c
+++ b/arch/x86/cpu/slimbootloader/serial.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <ns16550.h>
 #include <serial.h>
 #include <asm/arch/slimbootloader.h>
diff --git a/arch/x86/cpu/slimbootloader/slimbootloader.c b/arch/x86/cpu/slimbootloader/slimbootloader.c
index 889fba5473..f61fe814e9 100644
--- a/arch/x86/cpu/slimbootloader/slimbootloader.c
+++ b/arch/x86/cpu/slimbootloader/slimbootloader.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <init.h>
+#include <log.h>
 #include <asm/arch/slimbootloader.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/tangier/pinmux.c b/arch/x86/cpu/tangier/pinmux.c
index fdd653026b..5b0e106011 100644
--- a/arch/x86/cpu/tangier/pinmux.c
+++ b/arch/x86/cpu/tangier/pinmux.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/pinctrl.h>
 #include <dm/read.h>
 #include <regmap.h>
diff --git a/arch/x86/cpu/tangier/sdram.c b/arch/x86/cpu/tangier/sdram.c
index 8c7e1c10c2..df3b9e4ec9 100644
--- a/arch/x86/cpu/tangier/sdram.c
+++ b/arch/x86/cpu/tangier/sdram.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <log.h>
 #include <asm/e820.h>
 #include <asm/global_data.h>
 #include <asm/sfi.h>
diff --git a/arch/x86/cpu/turbo.c b/arch/x86/cpu/turbo.c
index be468d2b2c..f8d85d5a33 100644
--- a/arch/x86/cpu/turbo.c
+++ b/arch/x86/cpu/turbo.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/cpu.h>
 #include <asm/msr.h>
 #include <asm/processor.h>
diff --git a/arch/x86/lib/acpi.c b/arch/x86/lib/acpi.c
index 7431458dcf..155fffabf0 100644
--- a/arch/x86/lib/acpi.c
+++ b/arch/x86/lib/acpi.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <acpi/acpi_table.h>
 #include <asm/io.h>
 #include <asm/tables.h>
diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c
index 13f1409de8..6985ef4ba5 100644
--- a/arch/x86/lib/acpi_table.c
+++ b/arch/x86/lib/acpi_table.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <cpu.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/uclass-internal.h>
 #include <mapmem.h>
 #include <serial.h>
diff --git a/arch/x86/lib/bios.c b/arch/x86/lib/bios.c
index 30c0997fd0..3ab432e262 100644
--- a/arch/x86/lib/bios.c
+++ b/arch/x86/lib/bios.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <bios_emul.h>
 #include <irq_func.h>
+#include <log.h>
 #include <vbe.h>
 #include <linux/linkage.h>
 #include <asm/cache.h>
diff --git a/arch/x86/lib/bios_interrupts.c b/arch/x86/lib/bios_interrupts.c
index fdd966b2c8..d6b4da7e25 100644
--- a/arch/x86/lib/bios_interrupts.c
+++ b/arch/x86/lib/bios_interrupts.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/pci.h>
 #include "bios_emul.h"
 
diff --git a/arch/x86/lib/bootm.c b/arch/x86/lib/bootm.c
index 1569d30f8e..acc15cf2e0 100644
--- a/arch/x86/lib/bootm.c
+++ b/arch/x86/lib/bootm.c
@@ -11,6 +11,7 @@
 #include <bootstage.h>
 #include <command.h>
 #include <hang.h>
+#include <log.h>
 #include <dm/device.h>
 #include <dm/root.h>
 #include <errno.h>
diff --git a/arch/x86/lib/fsp/fsp_common.c b/arch/x86/lib/fsp/fsp_common.c
index 114d3d9cf8..cf32b3e512 100644
--- a/arch/x86/lib/fsp/fsp_common.c
+++ b/arch/x86/lib/fsp/fsp_common.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <init.h>
+#include <log.h>
 #include <rtc.h>
 #include <acpi/acpi_s3.h>
 #include <asm/cmos_layout.h>
diff --git a/arch/x86/lib/fsp/fsp_dram.c b/arch/x86/lib/fsp/fsp_dram.c
index 15e82de2fe..ad5a0f79ad 100644
--- a/arch/x86/lib/fsp/fsp_dram.c
+++ b/arch/x86/lib/fsp/fsp_dram.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <handoff.h>
 #include <init.h>
+#include <log.h>
 #include <asm/fsp/fsp_support.h>
 #include <asm/e820.h>
 #include <asm/mrccache.h>
diff --git a/arch/x86/lib/fsp/fsp_graphics.c b/arch/x86/lib/fsp/fsp_graphics.c
index 0e71583a49..70224c1a48 100644
--- a/arch/x86/lib/fsp/fsp_graphics.c
+++ b/arch/x86/lib/fsp/fsp_graphics.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <init.h>
+#include <log.h>
 #include <vbe.h>
 #include <video.h>
 #include <asm/fsp/fsp_support.h>
diff --git a/arch/x86/lib/fsp/fsp_support.c b/arch/x86/lib/fsp/fsp_support.c
index ee228117d1..fd4d98ef62 100644
--- a/arch/x86/lib/fsp/fsp_support.c
+++ b/arch/x86/lib/fsp/fsp_support.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/fsp/fsp_support.h>
 #include <asm/post.h>
 
diff --git a/arch/x86/lib/fsp1/fsp_common.c b/arch/x86/lib/fsp1/fsp_common.c
index 312283ae9d..43d32b7abe 100644
--- a/arch/x86/lib/fsp1/fsp_common.c
+++ b/arch/x86/lib/fsp1/fsp_common.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <init.h>
+#include <log.h>
 #include <malloc.h>
 #include <rtc.h>
 #include <acpi/acpi_s3.h>
diff --git a/arch/x86/lib/fsp1/fsp_support.c b/arch/x86/lib/fsp1/fsp_support.c
index c7a2c73846..d84c632f14 100644
--- a/arch/x86/lib/fsp1/fsp_support.c
+++ b/arch/x86/lib/fsp1/fsp_support.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/fsp1/fsp_support.h>
 #include <asm/post.h>
 
diff --git a/arch/x86/lib/fsp2/fsp_dram.c b/arch/x86/lib/fsp2/fsp_dram.c
index e2e6efd8b0..1c82b81831 100644
--- a/arch/x86/lib/fsp2/fsp_dram.c
+++ b/arch/x86/lib/fsp2/fsp_dram.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <handoff.h>
 #include <init.h>
+#include <log.h>
 #include <spl.h>
 #include <acpi/acpi_s3.h>
 #include <asm/arch/cpu.h>
diff --git a/arch/x86/lib/fsp2/fsp_init.c b/arch/x86/lib/fsp2/fsp_init.c
index 008e8aeb36..8c577902b2 100644
--- a/arch/x86/lib/fsp2/fsp_init.c
+++ b/arch/x86/lib/fsp2/fsp_init.c
@@ -10,6 +10,7 @@
 #include <cbfs.h>
 #include <dm.h>
 #include <init.h>
+#include <log.h>
 #include <spi.h>
 #include <spl.h>
 #include <spi_flash.h>
diff --git a/arch/x86/lib/fsp2/fsp_meminit.c b/arch/x86/lib/fsp2/fsp_meminit.c
index 117f36a848..1a758147b0 100644
--- a/arch/x86/lib/fsp2/fsp_meminit.c
+++ b/arch/x86/lib/fsp2/fsp_meminit.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <binman.h>
 #include <bootstage.h>
+#include <log.h>
 #include <asm/mrccache.h>
 #include <asm/fsp/fsp_infoheader.h>
 #include <asm/fsp2/fsp_api.h>
diff --git a/arch/x86/lib/fsp2/fsp_silicon_init.c b/arch/x86/lib/fsp2/fsp_silicon_init.c
index 28c15a22a2..45c0c7d90b 100644
--- a/arch/x86/lib/fsp2/fsp_silicon_init.c
+++ b/arch/x86/lib/fsp2/fsp_silicon_init.c
@@ -12,6 +12,7 @@
 #include <binman.h>
 #include <bootstage.h>
 #include <dm.h>
+#include <log.h>
 #include <asm/arch/fsp/fsp_configs.h>
 #include <asm/arch/fsp/fsp_s_upd.h>
 #include <asm/fsp/fsp_infoheader.h>
diff --git a/arch/x86/lib/fsp2/fsp_support.c b/arch/x86/lib/fsp2/fsp_support.c
index 0a04b443f7..3f2ca840dc 100644
--- a/arch/x86/lib/fsp2/fsp_support.c
+++ b/arch/x86/lib/fsp2/fsp_support.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <spi_flash.h>
 #include <asm/fsp/fsp_support.h>
 #include <asm/fsp2/fsp_internal.h>
diff --git a/arch/x86/lib/i8259.c b/arch/x86/lib/i8259.c
index 358cd1e70d..a0e3c09257 100644
--- a/arch/x86/lib/i8259.c
+++ b/arch/x86/lib/i8259.c
@@ -14,6 +14,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/i8259.h>
 #include <asm/ibmpc.h>
diff --git a/arch/x86/lib/interrupts.c b/arch/x86/lib/interrupts.c
index 40ba7fcfec..a81e429110 100644
--- a/arch/x86/lib/interrupts.c
+++ b/arch/x86/lib/interrupts.c
@@ -30,6 +30,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <irq_func.h>
 #include <asm/interrupt.h>
 
diff --git a/arch/x86/lib/mpspec.c b/arch/x86/lib/mpspec.c
index b5ad1135a6..1c49c41b31 100644
--- a/arch/x86/lib/mpspec.c
+++ b/arch/x86/lib/mpspec.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <asm/cpu.h>
 #include <asm/irq.h>
 #include <asm/ioapic.h>
diff --git a/arch/x86/lib/mrccache.c b/arch/x86/lib/mrccache.c
index d1c44f290c..21c71e036e 100644
--- a/arch/x86/lib/mrccache.c
+++ b/arch/x86/lib/mrccache.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <malloc.h>
 #include <net.h>
 #include <spi.h>
diff --git a/arch/x86/lib/physmem.c b/arch/x86/lib/physmem.c
index c3c709ec07..4578046169 100644
--- a/arch/x86/lib/physmem.c
+++ b/arch/x86/lib/physmem.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <physmem.h>
 #include <asm/cpu.h>
 #include <linux/compiler.h>
diff --git a/arch/x86/lib/pinctrl_ich6.c b/arch/x86/lib/pinctrl_ich6.c
index 5868d5b60a..482599478b 100644
--- a/arch/x86/lib/pinctrl_ich6.c
+++ b/arch/x86/lib/pinctrl_ich6.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <pch.h>
 #include <pci.h>
 #include <asm/cpu.h>
diff --git a/arch/x86/lib/pirq_routing.c b/arch/x86/lib/pirq_routing.c
index 17bd2fcb9b..eb6a7d96de 100644
--- a/arch/x86/lib/pirq_routing.c
+++ b/arch/x86/lib/pirq_routing.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <pci.h>
 #include <asm/pci.h>
 #include <asm/pirq_routing.h>
diff --git a/arch/x86/lib/relocate.c b/arch/x86/lib/relocate.c
index 4d09e4de42..ecbd0927e0 100644
--- a/arch/x86/lib/relocate.c
+++ b/arch/x86/lib/relocate.c
@@ -15,6 +15,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <relocate.h>
 #include <asm/u-boot-x86.h>
 #include <asm/sections.h>
diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c
index fb8d40c02d..b6f9a70ba7 100644
--- a/arch/x86/lib/spl.c
+++ b/arch/x86/lib/spl.c
@@ -11,6 +11,7 @@
 #include <image.h>
 #include <init.h>
 #include <irq_func.h>
+#include <log.h>
 #include <malloc.h>
 #include <spl.h>
 #include <syscon.h>
diff --git a/arch/x86/lib/tpl.c b/arch/x86/lib/tpl.c
index ac265b6744..6f7eb43a17 100644
--- a/arch/x86/lib/tpl.c
+++ b/arch/x86/lib/tpl.c
@@ -9,6 +9,7 @@
 #include <hang.h>
 #include <image.h>
 #include <init.h>
+#include <log.h>
 #include <spl.h>
 #include <asm/cpu.h>
 #include <asm/mtrr.h>
diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c
index de8d455c27..7986bc8d4e 100644
--- a/board/BuR/common/common.c
+++ b/board/BuR/common/common.c
@@ -8,6 +8,7 @@
  * Bernecker & Rainer Industrieelektronik GmbH - http://www.br-automation.com
  *
  */
+#include <log.h>
 #include <version.h>
 #include <common.h>
 #include <env.h>
diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c
index 29c1120458..25759e09ec 100644
--- a/board/CZ.NIC/turris_omnia/turris_omnia.c
+++ b/board/CZ.NIC/turris_omnia/turris_omnia.c
@@ -11,6 +11,7 @@
 #include <env.h>
 #include <i2c.h>
 #include <init.h>
+#include <log.h>
 #include <miiphy.h>
 #include <net.h>
 #include <netdev.h>
diff --git a/board/Marvell/gplugd/gplugd.c b/board/Marvell/gplugd/gplugd.c
index 10236bd07f..459b7ba82c 100644
--- a/board/Marvell/gplugd/gplugd.c
+++ b/board/Marvell/gplugd/gplugd.c
@@ -13,6 +13,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <log.h>
 #include <mvmfp.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/mfp.h>
diff --git a/board/advantech/imx8qm_rom7720_a1/spl.c b/board/advantech/imx8qm_rom7720_a1/spl.c
index 21ebd5dddb..54f48b9ba8 100644
--- a/board/advantech/imx8qm_rom7720_a1/spl.c
+++ b/board/advantech/imx8qm_rom7720_a1/spl.c
@@ -6,6 +6,7 @@
 #include <dm.h>
 #include <image.h>
 #include <init.h>
+#include <log.h>
 #include <spl.h>
 #include <fsl_esdhc.h>
 
diff --git a/board/armadeus/apf27/fpga.c b/board/armadeus/apf27/fpga.c
index e9af8ddd01..5d989481df 100644
--- a/board/armadeus/apf27/fpga.c
+++ b/board/armadeus/apf27/fpga.c
@@ -9,6 +9,7 @@
  * Keith Outwater, keith_outwater at mvis.com
  */
 #include <common.h>
+#include <log.h>
 
 #include <asm/arch/imx-regs.h>
 #include <asm/gpio.h>
diff --git a/board/armltd/integrator/pci.c b/board/armltd/integrator/pci.c
index c189d23eec..e3793c1125 100644
--- a/board/armltd/integrator/pci.c
+++ b/board/armltd/integrator/pci.c
@@ -21,6 +21,7 @@
  */
 #include <common.h>
 #include <init.h>
+#include <log.h>
 #include <pci.h>
 #include <asm/io.h>
 #include "integrator-sc.h"
diff --git a/board/armltd/vexpress64/pcie.c b/board/armltd/vexpress64/pcie.c
index 888434a6f8..3285a33a69 100644
--- a/board/armltd/vexpress64/pcie.c
+++ b/board/armltd/vexpress64/pcie.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <log.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
 #include <pci_ids.h>
diff --git a/board/avionic-design/common/tamonten-ng.c b/board/avionic-design/common/tamonten-ng.c
index 10278de3c7..29bde60228 100644
--- a/board/avionic-design/common/tamonten-ng.c
+++ b/board/avionic-design/common/tamonten-ng.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <asm/arch/pinmux.h>
 #include <asm/arch/gp_padctrl.h>
 #include <asm/arch/gpio.h>
diff --git a/board/broadcom/bcm23550_w1d/bcm23550_w1d.c b/board/broadcom/bcm23550_w1d/bcm23550_w1d.c
index d83eb9bd52..cff9a6840c 100644
--- a/board/broadcom/bcm23550_w1d/bcm23550_w1d.c
+++ b/board/broadcom/bcm23550_w1d/bcm23550_w1d.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/mach-types.h>
 #include <env.h>
diff --git a/board/broadcom/bcm28155_ap/bcm28155_ap.c b/board/broadcom/bcm28155_ap/bcm28155_ap.c
index 40ced1a87c..e3bf808d7e 100644
--- a/board/broadcom/bcm28155_ap/bcm28155_ap.c
+++ b/board/broadcom/bcm28155_ap/bcm28155_ap.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/mach-types.h>
 #include <env.h>
diff --git a/board/broadcom/bcmstb/bcmstb.c b/board/broadcom/bcmstb/bcmstb.c
index ee0cf8f9e2..add4285db3 100644
--- a/board/broadcom/bcmstb/bcmstb.c
+++ b/board/broadcom/bcmstb/bcmstb.c
@@ -8,6 +8,7 @@
 
 #include <cpu_func.h>
 #include <init.h>
+#include <log.h>
 #include <time.h>
 #include <linux/types.h>
 #include <common.h>
diff --git a/board/cloudengines/pogo_e02/pogo_e02.c b/board/cloudengines/pogo_e02/pogo_e02.c
index 433e0de8a3..8df039168c 100644
--- a/board/cloudengines/pogo_e02/pogo_e02.c
+++ b/board/cloudengines/pogo_e02/pogo_e02.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <log.h>
 #include <miiphy.h>
 #include <net.h>
 #include <asm/arch/cpu.h>
diff --git a/board/compal/paz00/paz00.c b/board/compal/paz00/paz00.c
index a7a1be3c05..64d0860d21 100644
--- a/board/compal/paz00/paz00.c
+++ b/board/compal/paz00/paz00.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/tegra.h>
 #include <asm/arch/pinmux.h>
diff --git a/board/compulab/cm_t335/spl.c b/board/compulab/cm_t335/spl.c
index 39ca535d11..8662632a7e 100644
--- a/board/compulab/cm_t335/spl.c
+++ b/board/compulab/cm_t335/spl.c
@@ -13,6 +13,7 @@
 #include <cpu_func.h>
 #include <errno.h>
 #include <init.h>
+#include <log.h>
 
 #include <asm/arch/ddr_defs.h>
 #include <asm/arch/clock.h>
diff --git a/board/d-link/dns325/dns325.c b/board/d-link/dns325/dns325.c
index a0f3dada42..0ae2e7d88c 100644
--- a/board/d-link/dns325/dns325.c
+++ b/board/d-link/dns325/dns325.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <log.h>
 #include <miiphy.h>
 #include <net.h>
 #include <netdev.h>
diff --git a/board/dfi/dfi-bt700/dfi-bt700.c b/board/dfi/dfi-bt700/dfi-bt700.c
index f4c4b1d663..68d7cd8154 100644
--- a/board/dfi/dfi-bt700/dfi-bt700.c
+++ b/board/dfi/dfi-bt700/dfi-bt700.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <log.h>
 #include <nuvoton_nct6102d.h>
 #include <asm/gpio.h>
 #include <asm/ibmpc.h>
diff --git a/board/dhelectronics/dh_stm32mp1/board.c b/board/dhelectronics/dh_stm32mp1/board.c
index 46f61d60d0..913032d187 100644
--- a/board/dhelectronics/dh_stm32mp1/board.c
+++ b/board/dhelectronics/dh_stm32mp1/board.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <adc.h>
+#include <log.h>
 #include <net.h>
 #include <asm/arch/stm32.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/eets/pdu001/board.c b/board/eets/pdu001/board.c
index fc4587ed0d..a602b623ad 100644
--- a/board/eets/pdu001/board.c
+++ b/board/eets/pdu001/board.c
@@ -13,6 +13,7 @@
 #include <env.h>
 #include <errno.h>
 #include <init.h>
+#include <log.h>
 #include <spl.h>
 #include <i2c.h>
 #include <watchdog.h>
diff --git a/board/emulation/qemu-arm/qemu-arm.c b/board/emulation/qemu-arm/qemu-arm.c
index ee5d4b41f2..69e8ef46f1 100644
--- a/board/emulation/qemu-arm/qemu-arm.c
+++ b/board/emulation/qemu-arm/qemu-arm.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <init.h>
+#include <log.h>
 #include <virtio_types.h>
 #include <virtio.h>
 
diff --git a/board/emulation/qemu-riscv/qemu-riscv.c b/board/emulation/qemu-riscv/qemu-riscv.c
index b814df780c..dcfd3f20be 100644
--- a/board/emulation/qemu-riscv/qemu-riscv.c
+++ b/board/emulation/qemu-riscv/qemu-riscv.c
@@ -8,6 +8,7 @@
 #include <env.h>
 #include <fdtdec.h>
 #include <image.h>
+#include <log.h>
 #include <spl.h>
 #include <init.h>
 #include <virtio_types.h>
diff --git a/board/engicam/common/board.c b/board/engicam/common/board.c
index 9483516ca0..5a2003d509 100644
--- a/board/engicam/common/board.c
+++ b/board/engicam/common/board.c
@@ -10,6 +10,7 @@
 #include <env.h>
 #include <hang.h>
 #include <init.h>
+#include <log.h>
 #include <mmc.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/firefly/firefly-rk3288/firefly-rk3288.c b/board/firefly/firefly-rk3288/firefly-rk3288.c
index a2b0eb5a99..1965985a0f 100644
--- a/board/firefly/firefly-rk3288/firefly-rk3288.c
+++ b/board/firefly/firefly-rk3288/firefly-rk3288.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <hang.h>
+#include <log.h>
 
 #ifdef CONFIG_SPL_BUILD
 static int setup_led(void)
diff --git a/board/firefly/roc-pc-rk3399/roc-pc-rk3399.c b/board/firefly/roc-pc-rk3399/roc-pc-rk3399.c
index 0fe1914c0f..7c3a803654 100644
--- a/board/firefly/roc-pc-rk3399/roc-pc-rk3399.c
+++ b/board/firefly/roc-pc-rk3399/roc-pc-rk3399.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <asm/arch-rockchip/periph.h>
 #include <power/regulator.h>
 #include <spl_gpio.h>
diff --git a/board/freescale/b4860qds/b4860qds.c b/board/freescale/b4860qds/b4860qds.c
index 037a8beb64..eed379a9eb 100644
--- a/board/freescale/b4860qds/b4860qds.c
+++ b/board/freescale/b4860qds/b4860qds.c
@@ -11,6 +11,7 @@
 #include <image.h>
 #include <init.h>
 #include <irq_func.h>
+#include <log.h>
 #include <netdev.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
diff --git a/board/freescale/b4860qds/ddr.c b/board/freescale/b4860qds/ddr.c
index c6cd3f4292..d3aa349ddf 100644
--- a/board/freescale/b4860qds/ddr.c
+++ b/board/freescale/b4860qds/ddr.c
@@ -8,6 +8,7 @@
 #include <hwconfig.h>
 #include <fsl_ddr.h>
 #include <init.h>
+#include <log.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/freescale/b4860qds/eth_b4860qds.c b/board/freescale/b4860qds/eth_b4860qds.c
index 95ec0b9a73..6d5f3d1fda 100644
--- a/board/freescale/b4860qds/eth_b4860qds.c
+++ b/board/freescale/b4860qds/eth_b4860qds.c
@@ -19,6 +19,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <net.h>
 #include <netdev.h>
 #include <asm/fsl_serdes.h>
diff --git a/board/freescale/common/arm_sleep.c b/board/freescale/common/arm_sleep.c
index d18b4fc24b..bb1ef99792 100644
--- a/board/freescale/common/arm_sleep.c
+++ b/board/freescale/common/arm_sleep.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #ifndef CONFIG_ARMV7_NONSEC
 #error " Deep sleep needs non-secure mode support. "
diff --git a/board/freescale/common/fsl_chain_of_trust.c b/board/freescale/common/fsl_chain_of_trust.c
index a024e7239e..cafb24971b 100644
--- a/board/freescale/common/fsl_chain_of_trust.c
+++ b/board/freescale/common/fsl_chain_of_trust.c
@@ -9,6 +9,7 @@
 #include <fsl_validate.h>
 #include <fsl_secboot_err.h>
 #include <fsl_sfp.h>
+#include <log.h>
 #include <dm/root.h>
 
 #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_FRAMEWORK)
diff --git a/board/freescale/common/fsl_validate.c b/board/freescale/common/fsl_validate.c
index 6aa412a937..564a8b3b54 100644
--- a/board/freescale/common/fsl_validate.c
+++ b/board/freescale/common/fsl_validate.c
@@ -11,6 +11,7 @@
 #include <fsl_sfp.h>
 #include <fsl_sec.h>
 #include <command.h>
+#include <log.h>
 #include <malloc.h>
 #include <u-boot/rsa-mod-exp.h>
 #include <hash.h>
diff --git a/board/freescale/common/ics307_clk.c b/board/freescale/common/ics307_clk.c
index f1e60cf277..2143395781 100644
--- a/board/freescale/common/ics307_clk.c
+++ b/board/freescale/common/ics307_clk.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 
 #include "ics307_clk.h"
diff --git a/board/freescale/common/idt8t49n222a_serdes_clk.c b/board/freescale/common/idt8t49n222a_serdes_clk.c
index 4f8e8b7d42..faa7f87701 100644
--- a/board/freescale/common/idt8t49n222a_serdes_clk.c
+++ b/board/freescale/common/idt8t49n222a_serdes_clk.c
@@ -5,6 +5,7 @@
  */
 
 #include "idt8t49n222a_serdes_clk.h"
+#include <log.h>
 
 #define DEVICE_ID_REG		0x00
 
diff --git a/board/freescale/common/mc34vr500.c b/board/freescale/common/mc34vr500.c
index d4f0f0c652..d6b4c65a3c 100644
--- a/board/freescale/common/mc34vr500.c
+++ b/board/freescale/common/mc34vr500.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <errno.h>
 #include <i2c.h>
+#include <log.h>
 #include <power/pmic.h>
 #include <power/mc34vr500_pmic.h>
 
diff --git a/board/freescale/common/mpc85xx_sleep.c b/board/freescale/common/mpc85xx_sleep.c
index 739a416730..6f6f4d40fc 100644
--- a/board/freescale/common/mpc85xx_sleep.c
+++ b/board/freescale/common/mpc85xx_sleep.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/immap_85xx.h>
 #include "sleep.h"
 #ifdef CONFIG_U_QE
diff --git a/board/freescale/common/ns_access.c b/board/freescale/common/ns_access.c
index 02845514ed..ee8ed616cb 100644
--- a/board/freescale/common/ns_access.c
+++ b/board/freescale/common/ns_access.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/cache.h>
 #include <asm/io.h>
 #include <fsl_csu.h>
diff --git a/board/freescale/common/sgmii_riser.c b/board/freescale/common/sgmii_riser.c
index f3e0fb2cd5..2315793010 100644
--- a/board/freescale/common/sgmii_riser.c
+++ b/board/freescale/common/sgmii_riser.c
@@ -14,6 +14,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <log.h>
 #include <net.h>
 #include <linux/libfdt.h>
 #include <tsec.h>
diff --git a/board/freescale/common/vid.c b/board/freescale/common/vid.c
index dfc6a91d1a..0bad67e62f 100644
--- a/board/freescale/common/vid.c
+++ b/board/freescale/common/vid.c
@@ -8,6 +8,7 @@
 #include <env.h>
 #include <i2c.h>
 #include <irq_func.h>
+#include <log.h>
 #include <asm/io.h>
 #ifdef CONFIG_FSL_LSCH2
 #include <asm/arch/immap_lsch2.h>
diff --git a/board/freescale/common/vsc3316_3308.c b/board/freescale/common/vsc3316_3308.c
index f0d273ca20..8aceb8ef17 100644
--- a/board/freescale/common/vsc3316_3308.c
+++ b/board/freescale/common/vsc3316_3308.c
@@ -5,6 +5,7 @@
  */
 
 #include "vsc3316_3308.h"
+#include <log.h>
 
 #define REVISION_ID_REG		0x7E
 #define INTERFACE_MODE_REG		0x79
diff --git a/board/freescale/common/zm7300.c b/board/freescale/common/zm7300.c
index acd5343b21..03679e723f 100644
--- a/board/freescale/common/zm7300.c
+++ b/board/freescale/common/zm7300.c
@@ -5,6 +5,7 @@
 
 /* Power-One ZM7300 DPM */
 #include "zm7300.h"
+#include <log.h>
 
 #define DPM_WP 0x96
 #define WRP_OPCODE 0x01
diff --git a/board/freescale/corenet_ds/ddr.c b/board/freescale/corenet_ds/ddr.c
index 073f3ac704..19f6e8700d 100644
--- a/board/freescale/corenet_ds/ddr.c
+++ b/board/freescale/corenet_ds/ddr.c
@@ -7,6 +7,7 @@
 #include <i2c.h>
 #include <hwconfig.h>
 #include <init.h>
+#include <log.h>
 #include <vsprintf.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
diff --git a/board/freescale/corenet_ds/eth_superhydra.c b/board/freescale/corenet_ds/eth_superhydra.c
index 5adfecd265..8ca220b840 100644
--- a/board/freescale/corenet_ds/eth_superhydra.c
+++ b/board/freescale/corenet_ds/eth_superhydra.c
@@ -48,6 +48,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <net.h>
 #include <netdev.h>
 #include <asm/fsl_serdes.h>
diff --git a/board/freescale/imx8mm_evk/spl.c b/board/freescale/imx8mm_evk/spl.c
index 42b637be5c..19c8a5aa23 100644
--- a/board/freescale/imx8mm_evk/spl.c
+++ b/board/freescale/imx8mm_evk/spl.c
@@ -9,6 +9,7 @@
 #include <hang.h>
 #include <image.h>
 #include <init.h>
+#include <log.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <asm/mach-imx/iomux-v3.h>
diff --git a/board/freescale/imx8mn_evk/spl.c b/board/freescale/imx8mn_evk/spl.c
index 486863e367..dd38c1015c 100644
--- a/board/freescale/imx8mn_evk/spl.c
+++ b/board/freescale/imx8mn_evk/spl.c
@@ -10,6 +10,7 @@
 #include <hang.h>
 #include <image.h>
 #include <init.h>
+#include <log.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <asm/mach-imx/iomux-v3.h>
diff --git a/board/freescale/imx8mp_evk/spl.c b/board/freescale/imx8mp_evk/spl.c
index e03c2c1118..cd5b32c3f8 100644
--- a/board/freescale/imx8mp_evk/spl.c
+++ b/board/freescale/imx8mp_evk/spl.c
@@ -10,6 +10,7 @@
 #include <hang.h>
 #include <image.h>
 #include <init.h>
+#include <log.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <errno.h>
diff --git a/board/freescale/imx8mq_evk/spl.c b/board/freescale/imx8mq_evk/spl.c
index 69ca7c37f5..99ebad2cc7 100644
--- a/board/freescale/imx8mq_evk/spl.c
+++ b/board/freescale/imx8mq_evk/spl.c
@@ -9,6 +9,7 @@
 #include <hang.h>
 #include <image.h>
 #include <init.h>
+#include <log.h>
 #include <asm/io.h>
 #include <errno.h>
 #include <asm/io.h>
diff --git a/board/freescale/imx8qm_mek/spl.c b/board/freescale/imx8qm_mek/spl.c
index 38a981cf8b..47982cc274 100644
--- a/board/freescale/imx8qm_mek/spl.c
+++ b/board/freescale/imx8qm_mek/spl.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <image.h>
 #include <init.h>
+#include <log.h>
 #include <spl.h>
 #include <dm/uclass.h>
 #include <dm/device.h>
diff --git a/board/freescale/imx8qxp_mek/spl.c b/board/freescale/imx8qxp_mek/spl.c
index 74c2ea2e6c..d7ce529a5f 100644
--- a/board/freescale/imx8qxp_mek/spl.c
+++ b/board/freescale/imx8qxp_mek/spl.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <image.h>
 #include <init.h>
+#include <log.h>
 #include <spl.h>
 #include <dm/uclass.h>
 #include <dm/device.h>
diff --git a/board/freescale/imxrt1020-evk/imxrt1020-evk.c b/board/freescale/imxrt1020-evk/imxrt1020-evk.c
index 08f6ca9c52..0cef6071fe 100644
--- a/board/freescale/imxrt1020-evk/imxrt1020-evk.c
+++ b/board/freescale/imxrt1020-evk/imxrt1020-evk.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <init.h>
+#include <log.h>
 #include <ram.h>
 #include <spl.h>
 #include <asm/io.h>
diff --git a/board/freescale/imxrt1050-evk/imxrt1050-evk.c b/board/freescale/imxrt1050-evk/imxrt1050-evk.c
index b6a0d2567e..edc7fb176b 100644
--- a/board/freescale/imxrt1050-evk/imxrt1050-evk.c
+++ b/board/freescale/imxrt1050-evk/imxrt1050-evk.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <init.h>
+#include <log.h>
 #include <ram.h>
 #include <spl.h>
 #include <asm/io.h>
diff --git a/board/freescale/ls1021aqds/ddr.c b/board/freescale/ls1021aqds/ddr.c
index d854b51155..5c53882cce 100644
--- a/board/freescale/ls1021aqds/ddr.c
+++ b/board/freescale/ls1021aqds/ddr.c
@@ -7,6 +7,7 @@
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
 #include <init.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include "ddr.h"
diff --git a/board/freescale/ls1021aqds/ls1021aqds.c b/board/freescale/ls1021aqds/ls1021aqds.c
index 1ae822e510..c03e96b493 100644
--- a/board/freescale/ls1021aqds/ls1021aqds.c
+++ b/board/freescale/ls1021aqds/ls1021aqds.c
@@ -9,6 +9,7 @@
 #include <fdt_support.h>
 #include <i2c.h>
 #include <init.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/immap_ls102xa.h>
 #include <asm/arch/clock.h>
diff --git a/board/freescale/ls1043aqds/ddr.c b/board/freescale/ls1043aqds/ddr.c
index d29a3ad797..c0fc9aadf0 100644
--- a/board/freescale/ls1043aqds/ddr.c
+++ b/board/freescale/ls1043aqds/ddr.c
@@ -9,6 +9,7 @@
 #ifdef CONFIG_FSL_DEEP_SLEEP
 #include <fsl_sleep.h>
 #endif
+#include <log.h>
 #include <asm/arch/clock.h>
 #include "ddr.h"
 
diff --git a/board/freescale/ls1043aqds/eth.c b/board/freescale/ls1043aqds/eth.c
index b2709be8be..0012572862 100644
--- a/board/freescale/ls1043aqds/eth.c
+++ b/board/freescale/ls1043aqds/eth.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <net.h>
 #include <asm/io.h>
 #include <netdev.h>
diff --git a/board/freescale/ls1043aqds/ls1043aqds.c b/board/freescale/ls1043aqds/ls1043aqds.c
index 032207af8a..6d923cc6e8 100644
--- a/board/freescale/ls1043aqds/ls1043aqds.c
+++ b/board/freescale/ls1043aqds/ls1043aqds.c
@@ -9,6 +9,7 @@
 #include <fdt_support.h>
 #include <fsl_ddr_sdram.h>
 #include <init.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/fsl_serdes.h>
diff --git a/board/freescale/ls1043ardb/ddr.c b/board/freescale/ls1043ardb/ddr.c
index 2677b7928f..f16e036d0e 100644
--- a/board/freescale/ls1043ardb/ddr.c
+++ b/board/freescale/ls1043ardb/ddr.c
@@ -7,6 +7,7 @@
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
 #include "ddr.h"
+#include <log.h>
 #include <vsprintf.h>
 #ifdef CONFIG_FSL_DEEP_SLEEP
 #include <fsl_sleep.h>
diff --git a/board/freescale/ls1046aqds/ddr.c b/board/freescale/ls1046aqds/ddr.c
index 45b1f373a7..f3cfbc4c39 100644
--- a/board/freescale/ls1046aqds/ddr.c
+++ b/board/freescale/ls1046aqds/ddr.c
@@ -9,6 +9,7 @@
 #ifdef CONFIG_FSL_DEEP_SLEEP
 #include <fsl_sleep.h>
 #endif
+#include <log.h>
 #include <asm/arch/clock.h>
 #include "ddr.h"
 
diff --git a/board/freescale/ls1046aqds/eth.c b/board/freescale/ls1046aqds/eth.c
index e2a4470a71..579e2da6d8 100644
--- a/board/freescale/ls1046aqds/eth.c
+++ b/board/freescale/ls1046aqds/eth.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <net.h>
 #include <asm/io.h>
 #include <netdev.h>
diff --git a/board/freescale/ls1046ardb/ddr.c b/board/freescale/ls1046ardb/ddr.c
index 321222d68d..0e07df5211 100644
--- a/board/freescale/ls1046ardb/ddr.c
+++ b/board/freescale/ls1046ardb/ddr.c
@@ -10,6 +10,7 @@
 #ifdef CONFIG_FSL_DEEP_SLEEP
 #include <fsl_sleep.h>
 #endif
+#include <log.h>
 #include <asm/arch/clock.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/ls1088a/ddr.c b/board/freescale/ls1088a/ddr.c
index c21a2ce059..fd9549bfbc 100644
--- a/board/freescale/ls1088a/ddr.c
+++ b/board/freescale/ls1088a/ddr.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
+#include <log.h>
 #include <asm/arch/soc.h>
 #include <asm/arch/clock.h>
 #include "ddr.h"
diff --git a/board/freescale/ls1088a/eth_ls1088aqds.c b/board/freescale/ls1088a/eth_ls1088aqds.c
index 54ef75347f..f42b5022c4 100644
--- a/board/freescale/ls1088a/eth_ls1088aqds.c
+++ b/board/freescale/ls1088a/eth_ls1088aqds.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <log.h>
 #include <net.h>
 #include <netdev.h>
 #include <asm/io.h>
diff --git a/board/freescale/ls1088a/ls1088a.c b/board/freescale/ls1088a/ls1088a.c
index 1b10aa759b..974a43ad88 100644
--- a/board/freescale/ls1088a/ls1088a.c
+++ b/board/freescale/ls1088a/ls1088a.c
@@ -6,6 +6,7 @@
 #include <env.h>
 #include <i2c.h>
 #include <init.h>
+#include <log.h>
 #include <malloc.h>
 #include <errno.h>
 #include <netdev.h>
diff --git a/board/freescale/ls2080a/ddr.c b/board/freescale/ls2080a/ddr.c
index 26eada9b49..229fc9cc30 100644
--- a/board/freescale/ls2080a/ddr.c
+++ b/board/freescale/ls2080a/ddr.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
+#include <log.h>
 #include <asm/arch/soc.h>
 #include <asm/arch/clock.h>
 #include "ddr.h"
diff --git a/board/freescale/ls2080aqds/ddr.c b/board/freescale/ls2080aqds/ddr.c
index fffe78c301..3fb2c4448c 100644
--- a/board/freescale/ls2080aqds/ddr.c
+++ b/board/freescale/ls2080aqds/ddr.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
+#include <log.h>
 #include <asm/arch/soc.h>
 #include <asm/arch/clock.h>
 #include "ddr.h"
diff --git a/board/freescale/ls2080aqds/eth.c b/board/freescale/ls2080aqds/eth.c
index bbb70a859a..df8a7c74a3 100644
--- a/board/freescale/ls2080aqds/eth.c
+++ b/board/freescale/ls2080aqds/eth.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <log.h>
 #include <net.h>
 #include <netdev.h>
 #include <asm/io.h>
diff --git a/board/freescale/ls2080ardb/ddr.c b/board/freescale/ls2080ardb/ddr.c
index 72ce872c75..4571a228c5 100644
--- a/board/freescale/ls2080ardb/ddr.c
+++ b/board/freescale/ls2080ardb/ddr.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
+#include <log.h>
 #include <asm/arch/soc.h>
 #include <asm/arch/clock.h>
 #include "ddr.h"
diff --git a/board/freescale/lx2160a/eth_lx2160aqds.c b/board/freescale/lx2160a/eth_lx2160aqds.c
index 7ffc85d1a1..8240eaae82 100644
--- a/board/freescale/lx2160a/eth_lx2160aqds.c
+++ b/board/freescale/lx2160a/eth_lx2160aqds.c
@@ -9,6 +9,7 @@
 #include <fdt_support.h>
 #include <hwconfig.h>
 #include <command.h>
+#include <log.h>
 #include <net.h>
 #include <netdev.h>
 #include <malloc.h>
diff --git a/board/freescale/mpc8349itx/mpc8349itx.c b/board/freescale/mpc8349itx/mpc8349itx.c
index 5d78fea336..3976f75920 100644
--- a/board/freescale/mpc8349itx/mpc8349itx.c
+++ b/board/freescale/mpc8349itx/mpc8349itx.c
@@ -7,6 +7,7 @@
 #include <fdt_support.h>
 #include <init.h>
 #include <ioports.h>
+#include <log.h>
 #include <mpc83xx.h>
 #include <i2c.h>
 #include <miiphy.h>
diff --git a/board/freescale/mpc8536ds/mpc8536ds.c b/board/freescale/mpc8536ds/mpc8536ds.c
index bfbb8a5fb7..582c5b4f35 100644
--- a/board/freescale/mpc8536ds/mpc8536ds.c
+++ b/board/freescale/mpc8536ds/mpc8536ds.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <init.h>
+#include <log.h>
 #include <net.h>
 #include <pci.h>
 #include <asm/processor.h>
diff --git a/board/freescale/mpc8568mds/mpc8568mds.c b/board/freescale/mpc8568mds/mpc8568mds.c
index 3e804c85c4..4746b1e5b5 100644
--- a/board/freescale/mpc8568mds/mpc8568mds.c
+++ b/board/freescale/mpc8568mds/mpc8568mds.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <flash.h>
 #include <init.h>
+#include <log.h>
 #include <pci.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
diff --git a/board/freescale/mpc8569mds/mpc8569mds.c b/board/freescale/mpc8569mds/mpc8569mds.c
index 18e0d87a48..762b0c176f 100644
--- a/board/freescale/mpc8569mds/mpc8569mds.c
+++ b/board/freescale/mpc8569mds/mpc8569mds.c
@@ -10,6 +10,7 @@
 #include <flash.h>
 #include <hwconfig.h>
 #include <init.h>
+#include <log.h>
 #include <pci.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
diff --git a/board/freescale/mpc8572ds/mpc8572ds.c b/board/freescale/mpc8572ds/mpc8572ds.c
index 13cfe159ae..38c8bfd55d 100644
--- a/board/freescale/mpc8572ds/mpc8572ds.c
+++ b/board/freescale/mpc8572ds/mpc8572ds.c
@@ -8,6 +8,7 @@
 #include <env.h>
 #include <image.h>
 #include <init.h>
+#include <log.h>
 #include <net.h>
 #include <pci.h>
 #include <asm/processor.h>
diff --git a/board/freescale/mpc8610hpcd/mpc8610hpcd.c b/board/freescale/mpc8610hpcd/mpc8610hpcd.c
index fc331a995a..cf02d37b01 100644
--- a/board/freescale/mpc8610hpcd/mpc8610hpcd.c
+++ b/board/freescale/mpc8610hpcd/mpc8610hpcd.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <init.h>
+#include <log.h>
 #include <net.h>
 #include <pci.h>
 #include <asm/processor.h>
diff --git a/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c b/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c
index 42b8cab362..9b96d0d33f 100644
--- a/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c
+++ b/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <clock_legacy.h>
 #include <command.h>
+#include <log.h>
 #include <asm/io.h>
 #include <fsl_diu_fb.h>
 #include "../common/pixis.h"
diff --git a/board/freescale/mpc8641hpcn/mpc8641hpcn.c b/board/freescale/mpc8641hpcn/mpc8641hpcn.c
index 57f91a42f5..3f070353c3 100644
--- a/board/freescale/mpc8641hpcn/mpc8641hpcn.c
+++ b/board/freescale/mpc8641hpcn/mpc8641hpcn.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <log.h>
 #include <net.h>
 #include <pci.h>
 #include <asm/processor.h>
diff --git a/board/freescale/mx53loco/mx53loco.c b/board/freescale/mx53loco/mx53loco.c
index 381c1ca808..ba74592e4e 100644
--- a/board/freescale/mx53loco/mx53loco.c
+++ b/board/freescale/mx53loco/mx53loco.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/freescale/p1022ds/diu.c b/board/freescale/p1022ds/diu.c
index 7f7251009c..918b4b9f6a 100644
--- a/board/freescale/p1022ds/diu.c
+++ b/board/freescale/p1022ds/diu.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <clock_legacy.h>
 #include <command.h>
+#include <log.h>
 #include <linux/ctype.h>
 #include <asm/io.h>
 #include <stdio_dev.h>
diff --git a/board/freescale/p1022ds/p1022ds.c b/board/freescale/p1022ds/p1022ds.c
index 244a053d7a..d10160d17a 100644
--- a/board/freescale/p1022ds/p1022ds.c
+++ b/board/freescale/p1022ds/p1022ds.c
@@ -10,6 +10,7 @@
 #include <env.h>
 #include <image.h>
 #include <init.h>
+#include <log.h>
 #include <net.h>
 #include <pci.h>
 #include <asm/processor.h>
diff --git a/board/freescale/p2041rdb/ddr.c b/board/freescale/p2041rdb/ddr.c
index a30a0738dc..7a06c7af3d 100644
--- a/board/freescale/p2041rdb/ddr.c
+++ b/board/freescale/p2041rdb/ddr.c
@@ -7,6 +7,7 @@
 #include <i2c.h>
 #include <hwconfig.h>
 #include <init.h>
+#include <log.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/freescale/qemu-ppce500/qemu-ppce500.c b/board/freescale/qemu-ppce500/qemu-ppce500.c
index fef7b8142c..61a9226eb3 100644
--- a/board/freescale/qemu-ppce500/qemu-ppce500.c
+++ b/board/freescale/qemu-ppce500/qemu-ppce500.c
@@ -8,6 +8,7 @@
 #include <cpu_func.h>
 #include <env.h>
 #include <init.h>
+#include <log.h>
 #include <net.h>
 #include <pci.h>
 #include <time.h>
diff --git a/board/freescale/t102xqds/ddr.c b/board/freescale/t102xqds/ddr.c
index c3a60d6087..ba589d4cb1 100644
--- a/board/freescale/t102xqds/ddr.c
+++ b/board/freescale/t102xqds/ddr.c
@@ -7,6 +7,7 @@
 #include <i2c.h>
 #include <hwconfig.h>
 #include <init.h>
+#include <log.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/freescale/t102xqds/eth_t102xqds.c b/board/freescale/t102xqds/eth_t102xqds.c
index 4a3be4c569..49ea21a83a 100644
--- a/board/freescale/t102xqds/eth_t102xqds.c
+++ b/board/freescale/t102xqds/eth_t102xqds.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <command.h>
 #include <fdt_support.h>
+#include <log.h>
 #include <net.h>
 #include <netdev.h>
 #include <asm/mmu.h>
diff --git a/board/freescale/t102xqds/t102xqds.c b/board/freescale/t102xqds/t102xqds.c
index 311d9efbfc..84db2fa9bc 100644
--- a/board/freescale/t102xqds/t102xqds.c
+++ b/board/freescale/t102xqds/t102xqds.c
@@ -11,6 +11,7 @@
 #include <i2c.h>
 #include <image.h>
 #include <init.h>
+#include <log.h>
 #include <netdev.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
diff --git a/board/freescale/t102xrdb/ddr.c b/board/freescale/t102xrdb/ddr.c
index 2ab6e62c5a..c389865fc0 100644
--- a/board/freescale/t102xrdb/ddr.c
+++ b/board/freescale/t102xrdb/ddr.c
@@ -7,6 +7,7 @@
 #include <i2c.h>
 #include <hwconfig.h>
 #include <init.h>
+#include <log.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/freescale/t1040qds/ddr.c b/board/freescale/t1040qds/ddr.c
index c9639e9170..f7eef5ca91 100644
--- a/board/freescale/t1040qds/ddr.c
+++ b/board/freescale/t1040qds/ddr.c
@@ -7,6 +7,7 @@
 #include <i2c.h>
 #include <hwconfig.h>
 #include <init.h>
+#include <log.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/freescale/t104xrdb/ddr.c b/board/freescale/t104xrdb/ddr.c
index ae365652c2..c9d8e1fd44 100644
--- a/board/freescale/t104xrdb/ddr.c
+++ b/board/freescale/t104xrdb/ddr.c
@@ -7,6 +7,7 @@
 #include <i2c.h>
 #include <hwconfig.h>
 #include <init.h>
+#include <log.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/freescale/t104xrdb/t104xrdb.c b/board/freescale/t104xrdb/t104xrdb.c
index a156d2ee09..6a4b351068 100644
--- a/board/freescale/t104xrdb/t104xrdb.c
+++ b/board/freescale/t104xrdb/t104xrdb.c
@@ -10,6 +10,7 @@
 #include <hwconfig.h>
 #include <image.h>
 #include <init.h>
+#include <log.h>
 #include <netdev.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
diff --git a/board/freescale/t208xqds/ddr.c b/board/freescale/t208xqds/ddr.c
index 5a97a84948..3317f99c81 100644
--- a/board/freescale/t208xqds/ddr.c
+++ b/board/freescale/t208xqds/ddr.c
@@ -7,6 +7,7 @@
 #include <i2c.h>
 #include <hwconfig.h>
 #include <init.h>
+#include <log.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/freescale/t208xqds/eth_t208xqds.c b/board/freescale/t208xqds/eth_t208xqds.c
index 057fe411e9..938e606641 100644
--- a/board/freescale/t208xqds/eth_t208xqds.c
+++ b/board/freescale/t208xqds/eth_t208xqds.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <command.h>
 #include <fdt_support.h>
+#include <log.h>
 #include <net.h>
 #include <netdev.h>
 #include <asm/mmu.h>
diff --git a/board/freescale/t208xqds/t208xqds.c b/board/freescale/t208xqds/t208xqds.c
index 9bf6ab1037..4979085e19 100644
--- a/board/freescale/t208xqds/t208xqds.c
+++ b/board/freescale/t208xqds/t208xqds.c
@@ -11,6 +11,7 @@
 #include <i2c.h>
 #include <image.h>
 #include <init.h>
+#include <log.h>
 #include <netdev.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
diff --git a/board/freescale/t208xrdb/ddr.c b/board/freescale/t208xrdb/ddr.c
index 78316ffe84..6a09d1cd22 100644
--- a/board/freescale/t208xrdb/ddr.c
+++ b/board/freescale/t208xrdb/ddr.c
@@ -7,6 +7,7 @@
 #include <i2c.h>
 #include <hwconfig.h>
 #include <init.h>
+#include <log.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/freescale/t4qds/ddr.c b/board/freescale/t4qds/ddr.c
index 5a6d0eb69b..4fdd69d424 100644
--- a/board/freescale/t4qds/ddr.c
+++ b/board/freescale/t4qds/ddr.c
@@ -7,6 +7,7 @@
 #include <i2c.h>
 #include <hwconfig.h>
 #include <init.h>
+#include <log.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/freescale/t4qds/eth.c b/board/freescale/t4qds/eth.c
index 8a9f631e8d..810868ff39 100644
--- a/board/freescale/t4qds/eth.c
+++ b/board/freescale/t4qds/eth.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <fdt_support.h>
+#include <log.h>
 #include <net.h>
 #include <netdev.h>
 #include <asm/mmu.h>
diff --git a/board/freescale/t4qds/t4240qds.c b/board/freescale/t4qds/t4240qds.c
index 08ecf9a636..670c487e17 100644
--- a/board/freescale/t4qds/t4240qds.c
+++ b/board/freescale/t4qds/t4240qds.c
@@ -12,6 +12,7 @@
 #include <image.h>
 #include <init.h>
 #include <irq_func.h>
+#include <log.h>
 #include <netdev.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
diff --git a/board/freescale/t4rdb/ddr.c b/board/freescale/t4rdb/ddr.c
index 3b67186cc2..5b7d10c979 100644
--- a/board/freescale/t4rdb/ddr.c
+++ b/board/freescale/t4rdb/ddr.c
@@ -7,6 +7,7 @@
 #include <i2c.h>
 #include <hwconfig.h>
 #include <init.h>
+#include <log.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/gardena/smart-gateway-mt7688/board.c b/board/gardena/smart-gateway-mt7688/board.c
index 768e7acc35..6fd771a2e2 100644
--- a/board/gardena/smart-gateway-mt7688/board.c
+++ b/board/gardena/smart-gateway-mt7688/board.c
@@ -10,6 +10,7 @@
 #include <flash.h>
 #include <init.h>
 #include <led.h>
+#include <log.h>
 #include <malloc.h>
 #include <net.h>
 #include <spi.h>
diff --git a/board/gateworks/gw_ventana/common.c b/board/gateworks/gw_ventana/common.c
index 64553c0617..b7e0691542 100644
--- a/board/gateworks/gw_ventana/common.c
+++ b/board/gateworks/gw_ventana/common.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/mx6-pins.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/gateworks/gw_ventana/eeprom.c b/board/gateworks/gw_ventana/eeprom.c
index a833657b15..ae467161f1 100644
--- a/board/gateworks/gw_ventana/eeprom.c
+++ b/board/gateworks/gw_ventana/eeprom.c
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <hexdump.h>
 #include <i2c.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/bitops.h>
 
diff --git a/board/gateworks/gw_ventana/gsc.c b/board/gateworks/gw_ventana/gsc.c
index 6d9565ccfe..4179f0fb5c 100644
--- a/board/gateworks/gw_ventana/gsc.c
+++ b/board/gateworks/gw_ventana/gsc.c
@@ -5,7 +5,9 @@
  * Author: Tim Harvey <tharvey@gateworks.com>
  */
 
+#include <common.h>
 #include <command.h>
+#include <log.h>
 #include <linux/errno.h>
 #include <common.h>
 #include <i2c.h>
diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c
index 2ef213ce0f..acbd200c3f 100644
--- a/board/gateworks/gw_ventana/gw_ventana.c
+++ b/board/gateworks/gw_ventana/gw_ventana.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <log.h>
 #include <net.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
diff --git a/board/gateworks/gw_ventana/gw_ventana_spl.c b/board/gateworks/gw_ventana/gw_ventana_spl.c
index 3ccd65271e..e0e4bac161 100644
--- a/board/gateworks/gw_ventana/gw_ventana_spl.c
+++ b/board/gateworks/gw_ventana/gw_ventana_spl.c
@@ -8,6 +8,7 @@
 #include <env.h>
 #include <hang.h>
 #include <init.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/mx6-ddr.h>
diff --git a/board/gdsys/a38x/hre.c b/board/gdsys/a38x/hre.c
index 027ad1f57e..699241b3e6 100644
--- a/board/gdsys/a38x/hre.c
+++ b/board/gdsys/a38x/hre.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 #include <fs.h>
 #include <i2c.h>
diff --git a/board/gdsys/common/phy.c b/board/gdsys/common/phy.c
index d40c08d9e9..516f4e8edc 100644
--- a/board/gdsys/common/phy.c
+++ b/board/gdsys/common/phy.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 
 #include <miiphy.h>
 
diff --git a/board/gdsys/p1022/controlcenterd-id.c b/board/gdsys/p1022/controlcenterd-id.c
index 3da5005f40..ccad907271 100644
--- a/board/gdsys/p1022/controlcenterd-id.c
+++ b/board/gdsys/p1022/controlcenterd-id.c
@@ -16,6 +16,7 @@
 #include <dm.h>
 #include <env.h>
 #include <hang.h>
+#include <log.h>
 #include <malloc.h>
 #include <fs.h>
 #include <i2c.h>
diff --git a/board/gdsys/p1022/ddr.c b/board/gdsys/p1022/ddr.c
index 591e08f037..eb06d22471 100644
--- a/board/gdsys/p1022/ddr.c
+++ b/board/gdsys/p1022/ddr.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <log.h>
 
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/gdsys/p1022/diu.c b/board/gdsys/p1022/diu.c
index 7e1e6ce85c..9a5d3c11e1 100644
--- a/board/gdsys/p1022/diu.c
+++ b/board/gdsys/p1022/diu.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <clock_legacy.h>
 #include <command.h>
+#include <log.h>
 #include <linux/ctype.h>
 #include <asm/io.h>
 #include <stdio_dev.h>
diff --git a/board/google/imx8mq_phanbell/spl.c b/board/google/imx8mq_phanbell/spl.c
index b6afdfc913..543d9bb16f 100644
--- a/board/google/imx8mq_phanbell/spl.c
+++ b/board/google/imx8mq_phanbell/spl.c
@@ -8,6 +8,8 @@
 #include <hang.h>
 #include <asm/io.h>
 #include <errno.h>
+#include <init.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/ddr.h>
 #include <asm/arch/imx8mq_pins.h>
diff --git a/board/google/veyron/veyron.c b/board/google/veyron/veyron.c
index 4a847edd89..02bc5ed37b 100644
--- a/board/google/veyron/veyron.c
+++ b/board/google/veyron/veyron.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <init.h>
+#include <log.h>
 #include <asm/arch-rockchip/clock.h>
 #include <dt-bindings/clock/rk3288-cru.h>
 #include <linux/err.h>
diff --git a/board/hisilicon/hikey/hikey.c b/board/hisilicon/hikey/hikey.c
index 2a50b8458a..df0f1104bf 100644
--- a/board/hisilicon/hikey/hikey.c
+++ b/board/hisilicon/hikey/hikey.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <fdt_support.h>
 #include <init.h>
+#include <log.h>
 #include <dm/platform_data/serial_pl01x.h>
 #include <errno.h>
 #include <malloc.h>
diff --git a/board/intel/minnowmax/minnowmax.c b/board/intel/minnowmax/minnowmax.c
index e486f9d7d9..b02e3f0d4e 100644
--- a/board/intel/minnowmax/minnowmax.c
+++ b/board/intel/minnowmax/minnowmax.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <init.h>
+#include <log.h>
 #include <asm/gpio.h>
 #include <dm/device-internal.h>
 #include <dm/uclass-internal.h>
diff --git a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c
index 01c8691f31..c105da5837 100644
--- a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c
+++ b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <log.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/keymile/km83xx/km83xx.c b/board/keymile/km83xx/km83xx.c
index 8f7e7f05d8..3c869b755c 100644
--- a/board/keymile/km83xx/km83xx.c
+++ b/board/keymile/km83xx/km83xx.c
@@ -18,6 +18,7 @@
 #include <fdt_support.h>
 #include <init.h>
 #include <ioports.h>
+#include <log.h>
 #include <mpc83xx.h>
 #include <i2c.h>
 #include <miiphy.h>
diff --git a/board/keymile/kmp204x/ddr.c b/board/keymile/kmp204x/ddr.c
index bea9451aec..d9c9ddf2ba 100644
--- a/board/keymile/kmp204x/ddr.c
+++ b/board/keymile/kmp204x/ddr.c
@@ -10,6 +10,7 @@
 #include <i2c.h>
 #include <hwconfig.h>
 #include <init.h>
+#include <log.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/kosagi/novena/novena.c b/board/kosagi/novena/novena.c
index 4bec2be43f..b1939f8a56 100644
--- a/board/kosagi/novena/novena.c
+++ b/board/kosagi/novena/novena.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <eeprom.h>
 #include <init.h>
+#include <log.h>
 #include <dm/device-internal.h>
 #include <ahci.h>
 #include <env.h>
diff --git a/board/kosagi/novena/video.c b/board/kosagi/novena/video.c
index 7083b6e103..a97e97a565 100644
--- a/board/kosagi/novena/video.c
+++ b/board/kosagi/novena/video.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
diff --git a/board/liebherr/display5/display5.c b/board/liebherr/display5/display5.c
index b979ddd296..728ee83a58 100644
--- a/board/liebherr/display5/display5.c
+++ b/board/liebherr/display5/display5.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <fdt_support.h>
 #include <init.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/liebherr/display5/spl.c b/board/liebherr/display5/spl.c
index fc3ebaf145..bee99667ee 100644
--- a/board/liebherr/display5/spl.c
+++ b/board/liebherr/display5/spl.c
@@ -9,6 +9,7 @@
 #include <env.h>
 #include <image.h>
 #include <init.h>
+#include <log.h>
 #include <serial.h>
 #include <spl.h>
 #include <linux/libfdt.h>
diff --git a/board/liebherr/xea/xea.c b/board/liebherr/xea/xea.c
index 41fa21292e..30665ea992 100644
--- a/board/liebherr/xea/xea.c
+++ b/board/liebherr/xea/xea.c
@@ -16,6 +16,7 @@
 #include <common.h>
 #include <fdt_support.h>
 #include <init.h>
+#include <log.h>
 #include <net.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
diff --git a/board/mediatek/mt8512/mt8512.c b/board/mediatek/mt8512/mt8512.c
index 726111d7d3..4ad62b73a6 100644
--- a/board/mediatek/mt8512/mt8512.c
+++ b/board/mediatek/mt8512/mt8512.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <wdt.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/mediatek/mt8518/mt8518_ap1.c b/board/mediatek/mt8518/mt8518_ap1.c
index 72284a2689..c9acfcb1a5 100644
--- a/board/mediatek/mt8518/mt8518_ap1.c
+++ b/board/mediatek/mt8518/mt8518_ap1.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <init.h>
+#include <log.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/mscc/ocelot/ocelot.c b/board/mscc/ocelot/ocelot.c
index 5fbd8fc6cd..a5345360fe 100644
--- a/board/mscc/ocelot/ocelot.c
+++ b/board/mscc/ocelot/ocelot.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <image.h>
 #include <init.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
diff --git a/board/nvidia/cardhu/cardhu.c b/board/nvidia/cardhu/cardhu.c
index 2ae64b1c33..ee56497a05 100644
--- a/board/nvidia/cardhu/cardhu.c
+++ b/board/nvidia/cardhu/cardhu.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <asm/arch/pinmux.h>
 #include <asm/arch/gp_padctrl.h>
 #include <asm/arch/gpio.h>
diff --git a/board/nvidia/dalmore/dalmore.c b/board/nvidia/dalmore/dalmore.c
index fcee21713f..72511e401e 100644
--- a/board/nvidia/dalmore/dalmore.c
+++ b/board/nvidia/dalmore/dalmore.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <asm/arch/pinmux.h>
 #include <asm/arch/gp_padctrl.h>
 #include "pinmux-config-dalmore.h"
diff --git a/board/nvidia/e2220-1170/e2220-1170.c b/board/nvidia/e2220-1170/e2220-1170.c
index 5aac0404bf..b819b049f4 100644
--- a/board/nvidia/e2220-1170/e2220-1170.c
+++ b/board/nvidia/e2220-1170/e2220-1170.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <log.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/pinmux.h>
 #include "../p2571/max77620_init.h"
diff --git a/board/nvidia/jetson-tk1/jetson-tk1.c b/board/nvidia/jetson-tk1/jetson-tk1.c
index aed08b4232..9eccdc4a83 100644
--- a/board/nvidia/jetson-tk1/jetson-tk1.c
+++ b/board/nvidia/jetson-tk1/jetson-tk1.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <power/as3722.h>
 #include <power/pmic.h>
 
diff --git a/board/nvidia/nyan-big/nyan-big.c b/board/nvidia/nyan-big/nyan-big.c
index 3c7bfead24..6464e86c45 100644
--- a/board/nvidia/nyan-big/nyan-big.c
+++ b/board/nvidia/nyan-big/nyan-big.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch/pinmux.h>
diff --git a/board/nvidia/p2371-0000/p2371-0000.c b/board/nvidia/p2371-0000/p2371-0000.c
index 5aac0404bf..b819b049f4 100644
--- a/board/nvidia/p2371-0000/p2371-0000.c
+++ b/board/nvidia/p2371-0000/p2371-0000.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <log.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/pinmux.h>
 #include "../p2571/max77620_init.h"
diff --git a/board/nvidia/p2371-2180/p2371-2180.c b/board/nvidia/p2371-2180/p2371-2180.c
index b92f0974af..0a988cb7dd 100644
--- a/board/nvidia/p2371-2180/p2371-2180.c
+++ b/board/nvidia/p2371-2180/p2371-2180.c
@@ -8,6 +8,7 @@
 #include <env.h>
 #include <fdtdec.h>
 #include <i2c.h>
+#include <log.h>
 #include <net.h>
 #include <linux/libfdt.h>
 #include <asm/arch/gpio.h>
diff --git a/board/nvidia/p2571/p2571.c b/board/nvidia/p2571/p2571.c
index a9e4d21e7b..a4c4259eea 100644
--- a/board/nvidia/p2571/p2571.c
+++ b/board/nvidia/p2571/p2571.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <log.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/pinmux.h>
 #include <asm/gpio.h>
diff --git a/board/nvidia/p2771-0000/p2771-0000.c b/board/nvidia/p2771-0000/p2771-0000.c
index e552877fdc..3f0e594b9c 100644
--- a/board/nvidia/p2771-0000/p2771-0000.c
+++ b/board/nvidia/p2771-0000/p2771-0000.c
@@ -7,6 +7,7 @@
 #include <env.h>
 #include <fdtdec.h>
 #include <i2c.h>
+#include <log.h>
 #include <net.h>
 #include <linux/libfdt.h>
 #include <asm/arch-tegra/cboot.h>
diff --git a/board/nvidia/venice2/as3722_init.c b/board/nvidia/venice2/as3722_init.c
index 5ebd6a0c09..15fba13e0b 100644
--- a/board/nvidia/venice2/as3722_init.c
+++ b/board/nvidia/venice2/as3722_init.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch-tegra/tegra_i2c.h>
 #include "as3722_init.h"
diff --git a/board/phytec/pfla02/pfla02.c b/board/phytec/pfla02/pfla02.c
index 7439aa56ad..ce3cc6a3eb 100644
--- a/board/phytec/pfla02/pfla02.c
+++ b/board/phytec/pfla02/pfla02.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <init.h>
+#include <log.h>
 #include <net.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
diff --git a/board/phytec/phycore_rk3288/phycore-rk3288.c b/board/phytec/phycore_rk3288/phycore-rk3288.c
index 236342c8d7..ac7c5b0bc5 100644
--- a/board/phytec/phycore_rk3288/phycore-rk3288.c
+++ b/board/phytec/phycore_rk3288/phycore-rk3288.c
@@ -6,6 +6,7 @@
 
 #include <eeprom.h>
 #include <init.h>
+#include <log.h>
 #include <net.h>
 #include <asm/io.h>
 #include <common.h>
diff --git a/board/phytium/durian/durian.c b/board/phytium/durian/durian.c
index 414360fe47..b80688ae86 100644
--- a/board/phytium/durian/durian.c
+++ b/board/phytium/durian/durian.c
@@ -9,6 +9,7 @@
 #include <command.h>
 #include <cpu_func.h>
 #include <init.h>
+#include <log.h>
 #include <asm/armv8/mmu.h>
 #include <asm/cache.h>
 #include <asm/system.h>
diff --git a/board/renesas/rcar-common/gen3-spl.c b/board/renesas/rcar-common/gen3-spl.c
index 2b21a29de1..e006774edf 100644
--- a/board/renesas/rcar-common/gen3-spl.c
+++ b/board/renesas/rcar-common/gen3-spl.c
@@ -9,6 +9,7 @@
 #include <cpu_func.h>
 #include <image.h>
 #include <init.h>
+#include <log.h>
 #include <asm/io.h>
 #include <spl.h>
 
diff --git a/board/rockchip/evb_rk3399/evb-rk3399.c b/board/rockchip/evb_rk3399/evb-rk3399.c
index 7909ef5c18..abb76585cf 100644
--- a/board/rockchip/evb_rk3399/evb-rk3399.c
+++ b/board/rockchip/evb_rk3399/evb-rk3399.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <init.h>
+#include <log.h>
 #include <asm/arch-rockchip/periph.h>
 #include <power/regulator.h>
 
diff --git a/board/samsung/arndale/arndale.c b/board/samsung/arndale/arndale.c
index 9abad3f824..7a8e57b6cc 100644
--- a/board/samsung/arndale/arndale.c
+++ b/board/samsung/arndale/arndale.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <init.h>
+#include <log.h>
 #include <usb.h>
 #include <asm/gpio.h>
 #include <asm/arch/pinmux.h>
diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c
index c54de9fc12..7f7fb070f6 100644
--- a/board/samsung/common/board.c
+++ b/board/samsung/common/board.c
@@ -11,6 +11,7 @@
 #include <fdtdec.h>
 #include <hang.h>
 #include <init.h>
+#include <log.h>
 #include <net.h>
 #include <spi.h>
 #include <tmu.h>
diff --git a/board/samsung/common/exynos5-dt.c b/board/samsung/common/exynos5-dt.c
index eef46b0dc4..69aa2120e1 100644
--- a/board/samsung/common/exynos5-dt.c
+++ b/board/samsung/common/exynos5-dt.c
@@ -8,6 +8,7 @@
 #include <dwc3-uboot.h>
 #include <env.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <asm/io.h>
 #include <errno.h>
 #include <i2c.h>
diff --git a/board/samsung/goni/goni.c b/board/samsung/goni/goni.c
index a900ad1476..9639f9a306 100644
--- a/board/samsung/goni/goni.c
+++ b/board/samsung/goni/goni.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <log.h>
 #include <asm/gpio.h>
 #include <asm/arch/mmc.h>
 #include <dm.h>
diff --git a/board/samsung/odroid/odroid.c b/board/samsung/odroid/odroid.c
index 9aa97f0f2c..7d7e722892 100644
--- a/board/samsung/odroid/odroid.c
+++ b/board/samsung/odroid/odroid.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/arch/pinmux.h>
 #include <asm/arch/power.h>
 #include <asm/arch/clock.h>
diff --git a/board/samsung/smdkv310/smdkv310.c b/board/samsung/smdkv310/smdkv310.c
index 9b6502386e..0a5773676d 100644
--- a/board/samsung/smdkv310/smdkv310.c
+++ b/board/samsung/smdkv310/smdkv310.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <log.h>
 #include <net.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
index ec85f707c1..b01c93639f 100644
--- a/board/samsung/trats/trats.c
+++ b/board/samsung/trats/trats.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <env.h>
 #include <lcd.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <asm/arch/cpu.h>
diff --git a/board/samsung/trats2/trats2.c b/board/samsung/trats2/trats2.c
index 84ff936e4b..ad5dea7307 100644
--- a/board/samsung/trats2/trats2.c
+++ b/board/samsung/trats2/trats2.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <lcd.h>
+#include <log.h>
 #include <asm/gpio.h>
 #include <asm/arch/pinmux.h>
 #include <asm/arch/power.h>
diff --git a/board/samsung/universal_c210/universal.c b/board/samsung/universal_c210/universal.c
index ed9c5b50d9..c56a87b083 100644
--- a/board/samsung/universal_c210/universal.c
+++ b/board/samsung/universal_c210/universal.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <log.h>
 #include <spi.h>
 #include <lcd.h>
 #include <asm/io.h>
diff --git a/board/sbc8548/sbc8548.c b/board/sbc8548/sbc8548.c
index c0e14cd5aa..5883859e46 100644
--- a/board/sbc8548/sbc8548.c
+++ b/board/sbc8548/sbc8548.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <log.h>
 #include <net.h>
 #include <pci.h>
 #include <asm/processor.h>
diff --git a/board/sbc8641d/sbc8641d.c b/board/sbc8641d/sbc8641d.c
index 4163fd2ccf..2346564c7d 100644
--- a/board/sbc8641d/sbc8641d.c
+++ b/board/sbc8641d/sbc8641d.c
@@ -14,6 +14,7 @@
 #include <common.h>
 #include <command.h>
 #include <init.h>
+#include <log.h>
 #include <pci.h>
 #include <asm/processor.h>
 #include <asm/immap_86xx.h>
diff --git a/board/siemens/capricorn/board.c b/board/siemens/capricorn/board.c
index ef6630f4f0..8c61425384 100644
--- a/board/siemens/capricorn/board.c
+++ b/board/siemens/capricorn/board.c
@@ -11,6 +11,7 @@
 #include <env.h>
 #include <errno.h>
 #include <init.h>
+#include <log.h>
 #include <netdev.h>
 #include <env_internal.h>
 #include <fsl_esdhc_imx.h>
diff --git a/board/siemens/common/factoryset.c b/board/siemens/common/factoryset.c
index 0d3701c03c..2e3ae1a54d 100644
--- a/board/siemens/common/factoryset.c
+++ b/board/siemens/common/factoryset.c
@@ -12,6 +12,7 @@
 #include <dm.h>
 #include <env_internal.h>
 #include <i2c.h>
+#include <log.h>
 #include <asm/io.h>
 #if !CONFIG_IS_ENABLED(TARGET_GIEDI) && !CONFIG_IS_ENABLED(TARGET_DENEB)
 #include <asm/arch/cpu.h>
diff --git a/board/siemens/corvus/board.c b/board/siemens/corvus/board.c
index 03768201c3..28a974d978 100644
--- a/board/siemens/corvus/board.c
+++ b/board/siemens/corvus/board.c
@@ -13,6 +13,7 @@
 #include <common.h>
 #include <dm.h>
 #include <init.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/at91sam9g45_matrix.h>
 #include <asm/arch/at91sam9_smc.h>
diff --git a/board/siemens/pxm2/board.c b/board/siemens/pxm2/board.c
index 792b9137df..d86a913e5f 100644
--- a/board/siemens/pxm2/board.c
+++ b/board/siemens/pxm2/board.c
@@ -16,6 +16,7 @@
 #include <env.h>
 #include <errno.h>
 #include <init.h>
+#include <log.h>
 #include <malloc.h>
 #include <net.h>
 #include <spl.h>
diff --git a/board/solidrun/mx6cuboxi/mx6cuboxi.c b/board/solidrun/mx6cuboxi/mx6cuboxi.c
index a2d7b1a1c8..2660735ce7 100644
--- a/board/solidrun/mx6cuboxi/mx6cuboxi.c
+++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c
@@ -16,6 +16,7 @@
 #include <common.h>
 #include <image.h>
 #include <init.h>
+#include <log.h>
 #include <net.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
diff --git a/board/spear/x600/fpga.c b/board/spear/x600/fpga.c
index d124d96b14..6dc3fb38da 100644
--- a/board/spear/x600/fpga.c
+++ b/board/spear/x600/fpga.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <spartan3.h>
 #include <command.h>
 #include <asm/gpio.h>
diff --git a/board/st/stm32f429-discovery/stm32f429-discovery.c b/board/st/stm32f429-discovery/stm32f429-discovery.c
index d0948b7962..ee6a90c9fd 100644
--- a/board/st/stm32f429-discovery/stm32f429-discovery.c
+++ b/board/st/stm32f429-discovery/stm32f429-discovery.c
@@ -14,6 +14,7 @@
 #include <dm.h>
 #include <env.h>
 #include <init.h>
+#include <log.h>
 
 #include <asm/io.h>
 #include <asm/arch/stm32.h>
diff --git a/board/st/stm32f429-evaluation/stm32f429-evaluation.c b/board/st/stm32f429-evaluation/stm32f429-evaluation.c
index 680f69dfd1..92e3d40a1b 100644
--- a/board/st/stm32f429-evaluation/stm32f429-evaluation.c
+++ b/board/st/stm32f429-evaluation/stm32f429-evaluation.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <env.h>
 #include <init.h>
+#include <log.h>
 
 #include <asm/io.h>
 #include <asm/arch/stm32.h>
diff --git a/board/st/stm32f469-discovery/stm32f469-discovery.c b/board/st/stm32f469-discovery/stm32f469-discovery.c
index 4b71d40056..85988acb24 100644
--- a/board/st/stm32f469-discovery/stm32f469-discovery.c
+++ b/board/st/stm32f469-discovery/stm32f469-discovery.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <env.h>
 #include <init.h>
+#include <log.h>
 
 #include <asm/io.h>
 #include <asm/arch/stm32.h>
diff --git a/board/st/stm32f746-disco/stm32f746-disco.c b/board/st/stm32f746-disco/stm32f746-disco.c
index df907426d2..ae5e110989 100644
--- a/board/st/stm32f746-disco/stm32f746-disco.c
+++ b/board/st/stm32f746-disco/stm32f746-disco.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <init.h>
 #include <lcd.h>
+#include <log.h>
 #include <miiphy.h>
 #include <phy_interface.h>
 #include <ram.h>
diff --git a/board/st/stm32h743-disco/stm32h743-disco.c b/board/st/stm32h743-disco/stm32h743-disco.c
index 6aab2e243e..0484c3c250 100644
--- a/board/st/stm32h743-disco/stm32h743-disco.c
+++ b/board/st/stm32h743-disco/stm32h743-disco.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <init.h>
+#include <log.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/st/stm32h743-eval/stm32h743-eval.c b/board/st/stm32h743-eval/stm32h743-eval.c
index 6aab2e243e..0484c3c250 100644
--- a/board/st/stm32h743-eval/stm32h743-eval.c
+++ b/board/st/stm32h743-eval/stm32h743-eval.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <init.h>
+#include <log.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
index 4d9105c45f..2e73eec333 100644
--- a/board/st/stm32mp1/stm32mp1.c
+++ b/board/st/stm32mp1/stm32mp1.c
@@ -18,6 +18,7 @@
 #include <i2c.h>
 #include <init.h>
 #include <led.h>
+#include <log.h>
 #include <malloc.h>
 #include <memalign.h>
 #include <misc.h>
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index e210824b4e..f8d5dba91c 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -16,6 +16,7 @@
 #include <hang.h>
 #include <image.h>
 #include <init.h>
+#include <log.h>
 #include <mmc.h>
 #include <axp_pmic.h>
 #include <generic-phy.h>
diff --git a/board/synopsys/hsdk/clk-lib.c b/board/synopsys/hsdk/clk-lib.c
index 6b6bb70e3c..1c74bfb93a 100644
--- a/board/synopsys/hsdk/clk-lib.c
+++ b/board/synopsys/hsdk/clk-lib.c
@@ -5,6 +5,7 @@
  */
 
 #include <clk.h>
+#include <log.h>
 #include <malloc.h>
 #include <dm/device.h>
 
diff --git a/board/synopsys/hsdk/env-lib.c b/board/synopsys/hsdk/env-lib.c
index f443c21e6d..235f29565f 100644
--- a/board/synopsys/hsdk/env-lib.c
+++ b/board/synopsys/hsdk/env-lib.c
@@ -6,6 +6,7 @@
 
 #include "env-lib.h"
 #include <env.h>
+#include <log.h>
 
 #define MAX_CMD_LEN	25
 
diff --git a/board/synopsys/hsdk/hsdk.c b/board/synopsys/hsdk/hsdk.c
index 906a8eab87..4ec4b67e73 100644
--- a/board/synopsys/hsdk/hsdk.c
+++ b/board/synopsys/hsdk/hsdk.c
@@ -12,6 +12,7 @@
 #include <image.h>
 #include <init.h>
 #include <irq_func.h>
+#include <log.h>
 #include <asm/cache.h>
 #include <linux/printk.h>
 #include <linux/kernel.h>
diff --git a/board/technologic/ts4800/ts4800.c b/board/technologic/ts4800/ts4800.c
index f79e7747e2..99f9293f7f 100644
--- a/board/technologic/ts4800/ts4800.c
+++ b/board/technologic/ts4800/ts4800.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <log.h>
 #include <net.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
diff --git a/board/theadorable/fpga.c b/board/theadorable/fpga.c
index 4f8bf5e778..bc8379cccf 100644
--- a/board/theadorable/fpga.c
+++ b/board/theadorable/fpga.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <altera.h>
 #include <errno.h>
+#include <log.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
diff --git a/board/theobroma-systems/puma_rk3399/puma-rk3399.c b/board/theobroma-systems/puma_rk3399/puma-rk3399.c
index 7e7effe56e..561579d056 100644
--- a/board/theobroma-systems/puma_rk3399/puma-rk3399.c
+++ b/board/theobroma-systems/puma_rk3399/puma-rk3399.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <env.h>
 #include <init.h>
+#include <log.h>
 #include <misc.h>
 #include <spl.h>
 #include <syscon.h>
diff --git a/board/ti/common/board_detect.c b/board/ti/common/board_detect.c
index 3938dea430..429668404a 100644
--- a/board/ti/common/board_detect.c
+++ b/board/ti/common/board_detect.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <eeprom.h>
+#include <log.h>
 #include <net.h>
 #include <asm/arch/hardware.h>
 #include <asm/omap_common.h>
diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c
index c4d1cddc1d..ff939c8ca6 100644
--- a/board/ti/j721e/evm.c
+++ b/board/ti/j721e/evm.c
@@ -12,6 +12,7 @@
 #include <fdt_support.h>
 #include <image.h>
 #include <init.h>
+#include <log.h>
 #include <net.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/hardware.h>
diff --git a/board/ti/panda/panda.c b/board/ti/panda/panda.c
index c9413af350..9ebecfdbf5 100644
--- a/board/ti/panda/panda.c
+++ b/board/ti/panda/panda.c
@@ -6,6 +6,7 @@
  */
 #include <common.h>
 #include <init.h>
+#include <log.h>
 #include <net.h>
 #include <asm/mach-types.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/toradex/apalis-tk1/apalis-tk1.c b/board/toradex/apalis-tk1/apalis-tk1.c
index 3b7fa4b237..3d80381646 100644
--- a/board/toradex/apalis-tk1/apalis-tk1.c
+++ b/board/toradex/apalis-tk1/apalis-tk1.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <env.h>
 #include <init.h>
+#include <log.h>
 #include <asm/arch-tegra/ap.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
diff --git a/board/toradex/apalis-tk1/as3722_init.c b/board/toradex/apalis-tk1/as3722_init.c
index 15f8dce2f1..0b5882c0d8 100644
--- a/board/toradex/apalis-tk1/as3722_init.c
+++ b/board/toradex/apalis-tk1/as3722_init.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch-tegra/tegra_i2c.h>
 #include "as3722_init.h"
diff --git a/board/toradex/apalis_t30/apalis_t30.c b/board/toradex/apalis_t30/apalis_t30.c
index b750d66aae..5e6ba69c0b 100644
--- a/board/toradex/apalis_t30/apalis_t30.c
+++ b/board/toradex/apalis_t30/apalis_t30.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <log.h>
 #include <asm/arch/gp_padctrl.h>
 #include <asm/arch/pinmux.h>
 #include <asm/arch-tegra/ap.h>
diff --git a/board/toradex/colibri_t20/colibri_t20.c b/board/toradex/colibri_t20/colibri_t20.c
index 6cecbe5e28..22517b9c54 100644
--- a/board/toradex/colibri_t20/colibri_t20.c
+++ b/board/toradex/colibri_t20/colibri_t20.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <log.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/funcmux.h>
 #include <asm/arch/pinmux.h>
diff --git a/board/toradex/verdin-imx8mm/spl.c b/board/toradex/verdin-imx8mm/spl.c
index eedca1e218..cc78c5666b 100644
--- a/board/toradex/verdin-imx8mm/spl.c
+++ b/board/toradex/verdin-imx8mm/spl.c
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <image.h>
 #include <init.h>
+#include <log.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/ddr.h>
 #include <asm/arch/imx8mm_pins.h>
diff --git a/board/tqc/tqm834x/tqm834x.c b/board/tqc/tqm834x/tqm834x.c
index 02b3d2dea1..77fe7e243f 100644
--- a/board/tqc/tqm834x/tqm834x.c
+++ b/board/tqc/tqm834x/tqm834x.c
@@ -8,6 +8,7 @@
 #include <fdt_support.h>
 #include <init.h>
 #include <ioports.h>
+#include <log.h>
 #include <mpc83xx.h>
 #include <asm/mpc8349_pci.h>
 #include <i2c.h>
diff --git a/board/varisys/cyrus/ddr.c b/board/varisys/cyrus/ddr.c
index 54d15accbd..7949eb88c0 100644
--- a/board/varisys/cyrus/ddr.c
+++ b/board/varisys/cyrus/ddr.c
@@ -7,6 +7,7 @@
 #include <i2c.h>
 #include <hwconfig.h>
 #include <init.h>
+#include <log.h>
 #include <asm/mmu.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c
index 5e993d0258..c113a0ccc9 100644
--- a/board/wandboard/wandboard.c
+++ b/board/wandboard/wandboard.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <image.h>
 #include <init.h>
+#include <log.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/iomux.h>
diff --git a/board/work-microwave/work_92105/work_92105_display.c b/board/work-microwave/work_92105/work_92105_display.c
index 3dd60ec827..4641185ceb 100644
--- a/board/work-microwave/work_92105/work_92105_display.c
+++ b/board/work-microwave/work_92105/work_92105_display.c
@@ -12,6 +12,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <log.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/emc.h>
diff --git a/board/xes/xpedite517x/ddr.c b/board/xes/xpedite517x/ddr.c
index 604faf2131..a3fd2fc8ca 100644
--- a/board/xes/xpedite517x/ddr.c
+++ b/board/xes/xpedite517x/ddr.c
@@ -8,6 +8,7 @@
 #include <i2c.h>
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
+#include <log.h>
 
 void get_spd(ddr2_spd_eeprom_t *spd, u8 i2c_address)
 {
diff --git a/board/xes/xpedite537x/ddr.c b/board/xes/xpedite537x/ddr.c
index 65e69c8013..f55102a072 100644
--- a/board/xes/xpedite537x/ddr.c
+++ b/board/xes/xpedite537x/ddr.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <log.h>
 
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c
index b8cdaaada1..0469e2e7ac 100644
--- a/board/xilinx/common/board.c
+++ b/board/xilinx/common/board.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <log.h>
 #include <asm/sections.h>
 #include <dm/uclass.h>
 #include <i2c.h>
diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c
index 0f81df3acc..4e569e910d 100644
--- a/board/xilinx/microblaze-generic/microblaze-generic.c
+++ b/board/xilinx/microblaze-generic/microblaze-generic.c
@@ -14,6 +14,7 @@
 #include <config.h>
 #include <env.h>
 #include <init.h>
+#include <log.h>
 #include <dm/lists.h>
 #include <fdtdec.h>
 #include <linux/sizes.h>
diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c
index 44cc65e023..45cf1d2d0c 100644
--- a/board/xilinx/versal/board.c
+++ b/board/xilinx/versal/board.c
@@ -9,6 +9,7 @@
 #include <env.h>
 #include <fdtdec.h>
 #include <init.h>
+#include <log.h>
 #include <malloc.h>
 #include <time.h>
 #include <asm/cache.h>
diff --git a/board/xilinx/zynq/bootimg.c b/board/xilinx/zynq/bootimg.c
index 1ed6b2aa92..481f012c28 100644
--- a/board/xilinx/zynq/bootimg.c
+++ b/board/xilinx/zynq/bootimg.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <part.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
diff --git a/board/xilinx/zynq/cmds.c b/board/xilinx/zynq/cmds.c
index 33589347da..10984662b6 100644
--- a/board/xilinx/zynq/cmds.c
+++ b/board/xilinx/zynq/cmds.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index 7a8c745f9b..e880db1f81 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -10,6 +10,7 @@
 #include <debug_uart.h>
 #include <env.h>
 #include <init.h>
+#include <log.h>
 #include <net.h>
 #include <sata.h>
 #include <ahci.h>
diff --git a/cmd/axi.c b/cmd/axi.c
index 18533efc0d..c9d53c049e 100644
--- a/cmd/axi.c
+++ b/cmd/axi.c
@@ -14,6 +14,7 @@
 #include <command.h>
 #include <console.h>
 #include <dm.h>
+#include <log.h>
 
 /* Currently selected AXI bus device */
 static struct udevice *axi_cur_bus;
diff --git a/cmd/bcb.c b/cmd/bcb.c
index d99a698012..e03218066b 100644
--- a/cmd/bcb.c
+++ b/cmd/bcb.c
@@ -8,6 +8,7 @@
 #include <android_bootloader_message.h>
 #include <command.h>
 #include <common.h>
+#include <log.h>
 #include <part.h>
 
 enum bcb_cmd {
diff --git a/cmd/bmp.c b/cmd/bmp.c
index 0ad23231cb..6040fa5d95 100644
--- a/cmd/bmp.c
+++ b/cmd/bmp.c
@@ -15,6 +15,7 @@
 #include <gzip.h>
 #include <image.h>
 #include <lcd.h>
+#include <log.h>
 #include <malloc.h>
 #include <mapmem.h>
 #include <splash.h>
diff --git a/cmd/booti.c b/cmd/booti.c
index ead2332631..ae37975494 100644
--- a/cmd/booti.c
+++ b/cmd/booti.c
@@ -10,6 +10,7 @@
 #include <image.h>
 #include <irq_func.h>
 #include <lmb.h>
+#include <log.h>
 #include <mapmem.h>
 #include <linux/kernel.h>
 #include <linux/sizes.h>
diff --git a/cmd/bootmenu.c b/cmd/bootmenu.c
index c89fb1f5b8..77e46b8197 100644
--- a/cmd/bootmenu.c
+++ b/cmd/bootmenu.c
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <ansi.h>
 #include <env.h>
+#include <log.h>
 #include <menu.h>
 #include <watchdog.h>
 #include <malloc.h>
diff --git a/cmd/bootz.c b/cmd/bootz.c
index ac15856f8d..bc15fd8ec4 100644
--- a/cmd/bootz.c
+++ b/cmd/bootz.c
@@ -10,6 +10,7 @@
 #include <image.h>
 #include <irq_func.h>
 #include <lmb.h>
+#include <log.h>
 #include <linux/compiler.h>
 
 int __weak bootz_setup(ulong image, ulong *start, ulong *end)
diff --git a/cmd/cros_ec.c b/cmd/cros_ec.c
index 3c7dd4db9b..ce1f59a740 100644
--- a/cmd/cros_ec.c
+++ b/cmd/cros_ec.c
@@ -11,6 +11,7 @@
 #include <cros_ec.h>
 #include <dm.h>
 #include <flash.h>
+#include <log.h>
 #include <dm/device-internal.h>
 #include <dm/uclass-internal.h>
 
diff --git a/cmd/disk.c b/cmd/disk.c
index dbd08a06b2..8060e753eb 100644
--- a/cmd/disk.c
+++ b/cmd/disk.c
@@ -8,6 +8,7 @@
 #include <command.h>
 #include <cpu_func.h>
 #include <image.h>
+#include <log.h>
 #include <part.h>
 
 int common_diskboot(struct cmd_tbl *cmdtp, const char *intf, int argc,
diff --git a/cmd/efi.c b/cmd/efi.c
index c7640c862e..9aeb913ff3 100644
--- a/cmd/efi.c
+++ b/cmd/efi.c
@@ -8,6 +8,7 @@
 #include <command.h>
 #include <efi.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <sort.h>
 
diff --git a/cmd/efidebug.c b/cmd/efidebug.c
index 702cebe50f..6676fe8478 100644
--- a/cmd/efidebug.c
+++ b/cmd/efidebug.c
@@ -11,6 +11,7 @@
 #include <efi_loader.h>
 #include <exports.h>
 #include <hexdump.h>
+#include <log.h>
 #include <malloc.h>
 #include <mapmem.h>
 #include <search.h>
diff --git a/cmd/elf.c b/cmd/elf.c
index 4f2969a6d9..d44b95d903 100644
--- a/cmd/elf.c
+++ b/cmd/elf.c
@@ -10,6 +10,7 @@
 #include <elf.h>
 #include <env.h>
 #include <image.h>
+#include <log.h>
 #include <net.h>
 #include <vxworks.h>
 #ifdef CONFIG_X86
diff --git a/cmd/flash.c b/cmd/flash.c
index 77979e4412..240871e808 100644
--- a/cmd/flash.c
+++ b/cmd/flash.c
@@ -9,6 +9,7 @@
  */
 #include <common.h>
 #include <command.h>
+#include <log.h>
 #include <uuid.h>
 
 #if defined(CONFIG_CMD_MTDPARTS)
diff --git a/cmd/fpga.c b/cmd/fpga.c
index 47307bfc89..8ae1c936fb 100644
--- a/cmd/fpga.c
+++ b/cmd/fpga.c
@@ -14,6 +14,7 @@
 #include <fs.h>
 #include <gzip.h>
 #include <image.h>
+#include <log.h>
 #include <malloc.h>
 
 static long do_fpga_get_device(char *arg)
diff --git a/cmd/gpio.c b/cmd/gpio.c
index 24053e6ad9..4fdb3135fc 100644
--- a/cmd/gpio.c
+++ b/cmd/gpio.c
@@ -10,6 +10,7 @@
 #include <command.h>
 #include <errno.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/gpio.h>
 #include <linux/err.h>
diff --git a/cmd/gpt.c b/cmd/gpt.c
index 05f5f943a8..df759416c8 100644
--- a/cmd/gpt.c
+++ b/cmd/gpt.c
@@ -13,6 +13,7 @@
 #include <common.h>
 #include <blk.h>
 #include <env.h>
+#include <log.h>
 #include <malloc.h>
 #include <command.h>
 #include <part.h>
diff --git a/cmd/i2c.c b/cmd/i2c.c
index 9ebbdd3128..a51f781a46 100644
--- a/cmd/i2c.c
+++ b/cmd/i2c.c
@@ -73,6 +73,7 @@
 #include <edid.h>
 #include <errno.h>
 #include <i2c.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/byteorder.h>
 #include <linux/compiler.h>
diff --git a/cmd/mem.c b/cmd/mem.c
index ab67a01446..7f7957e74a 100644
--- a/cmd/mem.c
+++ b/cmd/mem.c
@@ -18,6 +18,7 @@
 #include <console.h>
 #include <flash.h>
 #include <hash.h>
+#include <log.h>
 #include <mapmem.h>
 #include <rand.h>
 #include <watchdog.h>
diff --git a/cmd/mtdparts.c b/cmd/mtdparts.c
index 9fca08562b..5220142b9a 100644
--- a/cmd/mtdparts.c
+++ b/cmd/mtdparts.c
@@ -73,6 +73,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <log.h>
 #include <malloc.h>
 #include <jffs2/load_kernel.h>
 #include <linux/list.h>
diff --git a/cmd/nvedit.c b/cmd/nvedit.c
index f44651c727..3784abcd59 100644
--- a/cmd/nvedit.c
+++ b/cmd/nvedit.c
@@ -29,6 +29,7 @@
 #include <console.h>
 #include <env.h>
 #include <env_internal.h>
+#include <log.h>
 #include <net.h>
 #include <search.h>
 #include <errno.h>
diff --git a/cmd/pxe_utils.c b/cmd/pxe_utils.c
index ba4bb6347e..8716e782f6 100644
--- a/cmd/pxe_utils.c
+++ b/cmd/pxe_utils.c
@@ -8,6 +8,7 @@
 #include <command.h>
 #include <env.h>
 #include <image.h>
+#include <log.h>
 #include <malloc.h>
 #include <mapmem.h>
 #include <lcd.h>
diff --git a/cmd/setexpr.c b/cmd/setexpr.c
index 1d81ecfa6a..770dc24d2b 100644
--- a/cmd/setexpr.c
+++ b/cmd/setexpr.c
@@ -12,6 +12,7 @@
 #include <config.h>
 #include <command.h>
 #include <env.h>
+#include <log.h>
 #include <mapmem.h>
 
 static ulong get_arg(char *s, int w)
diff --git a/cmd/sf.c b/cmd/sf.c
index 367df576b8..727837d9cd 100644
--- a/cmd/sf.c
+++ b/cmd/sf.c
@@ -10,6 +10,7 @@
 #include <div64.h>
 #include <dm.h>
 #include <flash.h>
+#include <log.h>
 #include <malloc.h>
 #include <mapmem.h>
 #include <spi.h>
diff --git a/cmd/source.c b/cmd/source.c
index cd58924eeb..b6c709a3d2 100644
--- a/cmd/source.c
+++ b/cmd/source.c
@@ -18,6 +18,7 @@
 #include <command.h>
 #include <env.h>
 #include <image.h>
+#include <log.h>
 #include <malloc.h>
 #include <mapmem.h>
 #include <asm/byteorder.h>
diff --git a/cmd/spl.c b/cmd/spl.c
index b8e0aa4253..28b40dd31e 100644
--- a/cmd/spl.c
+++ b/cmd/spl.c
@@ -9,6 +9,7 @@
 #include <cmd_spl.h>
 #include <env.h>
 #include <image.h>
+#include <log.h>
 #include <linux/libfdt.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/cmd/test.c b/cmd/test.c
index dd49d0e00a..fa7c48fb9f 100644
--- a/cmd/test.c
+++ b/cmd/test.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <command.h>
 #include <fs.h>
+#include <log.h>
 
 #define OP_INVALID	0
 #define OP_NOT		1
diff --git a/cmd/ti/ddr3.c b/cmd/ti/ddr3.c
index 756aa9eb3e..623b63b0f9 100644
--- a/cmd/ti/ddr3.c
+++ b/cmd/ti/ddr3.c
@@ -8,6 +8,7 @@
 #include <cpu_func.h>
 #include <env.h>
 #include <init.h>
+#include <log.h>
 #include <asm/arch/hardware.h>
 #include <asm/cache.h>
 #include <asm/emif.h>
diff --git a/cmd/tpm_test.c b/cmd/tpm_test.c
index a6a4636ef6..ebfb25cab0 100644
--- a/cmd/tpm_test.c
+++ b/cmd/tpm_test.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <tpm-v1.h>
 #include "tpm-user-utils.h"
 
diff --git a/cmd/tsi148.c b/cmd/tsi148.c
index 25f98acdf7..2eae14f87f 100644
--- a/cmd/tsi148.c
+++ b/cmd/tsi148.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/io.h>
 #include <pci.h>
diff --git a/cmd/ubifs.c b/cmd/ubifs.c
index e798b833dd..a26b653d61 100644
--- a/cmd/ubifs.c
+++ b/cmd/ubifs.c
@@ -14,6 +14,7 @@
 #include <common.h>
 #include <config.h>
 #include <command.h>
+#include <log.h>
 #include <ubifs_uboot.h>
 
 static int ubifs_initialized;
diff --git a/common/android_ab.c b/common/android_ab.c
index 72025bb552..4943f26d53 100644
--- a/common/android_ab.c
+++ b/common/android_ab.c
@@ -6,6 +6,7 @@
 #include <android_ab.h>
 #include <android_bootloader_message.h>
 #include <blk.h>
+#include <log.h>
 #include <malloc.h>
 #include <part.h>
 #include <memalign.h>
diff --git a/common/autoboot.c b/common/autoboot.c
index 4ea9be6da9..9d7b6b8d53 100644
--- a/common/autoboot.c
+++ b/common/autoboot.c
@@ -13,6 +13,7 @@
 #include <env.h>
 #include <fdtdec.h>
 #include <hash.h>
+#include <log.h>
 #include <malloc.h>
 #include <memalign.h>
 #include <menu.h>
diff --git a/common/board_f.c b/common/board_f.c
index b2f062e2aa..780804d9df 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -26,6 +26,7 @@
 #include <init.h>
 #include <initcall.h>
 #include <lcd.h>
+#include <log.h>
 #include <malloc.h>
 #include <mapmem.h>
 #include <os.h>
diff --git a/common/board_r.c b/common/board_r.c
index 4e7edac29d..d0c19047a3 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -18,6 +18,7 @@
 #include <hang.h>
 #include <image.h>
 #include <irq_func.h>
+#include <log.h>
 #include <net.h>
 #include <asm/cache.h>
 #include <u-boot/crc.h>
diff --git a/common/boot_fit.c b/common/boot_fit.c
index ffa4d740eb..dfc2a3117d 100644
--- a/common/boot_fit.c
+++ b/common/boot_fit.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <errno.h>
 #include <image.h>
+#include <log.h>
 #include <linux/libfdt.h>
 
 static int fdt_offset(const void *fit)
diff --git a/common/bootm.c b/common/bootm.c
index c3b3ee371c..2ed7521520 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -13,6 +13,7 @@
 #include <fdt_support.h>
 #include <irq_func.h>
 #include <lmb.h>
+#include <log.h>
 #include <malloc.h>
 #include <mapmem.h>
 #include <net.h>
diff --git a/common/bootm_os.c b/common/bootm_os.c
index 08675ffb61..55296483f7 100644
--- a/common/bootm_os.c
+++ b/common/bootm_os.c
@@ -13,6 +13,7 @@
 #include <fdt_support.h>
 #include <image.h>
 #include <lmb.h>
+#include <log.h>
 #include <linux/libfdt.h>
 #include <malloc.h>
 #include <mapmem.h>
diff --git a/common/bootstage.c b/common/bootstage.c
index 817f85a7fe..5f87358fd8 100644
--- a/common/bootstage.c
+++ b/common/bootstage.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <bootstage.h>
 #include <hang.h>
+#include <log.h>
 #include <malloc.h>
 #include <sort.h>
 #include <spl.h>
diff --git a/common/bouncebuf.c b/common/bouncebuf.c
index 6bb8b53902..6d98920de6 100644
--- a/common/bouncebuf.c
+++ b/common/bouncebuf.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <malloc.h>
 #include <errno.h>
 #include <bouncebuf.h>
diff --git a/common/cli_simple.c b/common/cli_simple.c
index 358e9b7fe1..7d91316a0f 100644
--- a/common/cli_simple.c
+++ b/common/cli_simple.c
@@ -14,6 +14,7 @@
 #include <command.h>
 #include <console.h>
 #include <env.h>
+#include <log.h>
 #include <linux/ctype.h>
 
 #define DEBUG_PARSER	0	/* set to 1 to debug */
diff --git a/common/command.c b/common/command.c
index d75908aae2..4f49f15bfd 100644
--- a/common/command.c
+++ b/common/command.c
@@ -12,6 +12,7 @@
 #include <command.h>
 #include <console.h>
 #include <env.h>
+#include <log.h>
 #include <linux/ctype.h>
 
 /*
diff --git a/common/common_fit.c b/common/common_fit.c
index 41305d8aa6..a993308100 100644
--- a/common/common_fit.c
+++ b/common/common_fit.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <errno.h>
 #include <image.h>
+#include <log.h>
 #include <linux/libfdt.h>
 
 ulong fdt_getprop_u32(const void *fdt, int node, const char *prop)
diff --git a/common/cros_ec.c b/common/cros_ec.c
index e66471ebd1..249d1f1941 100644
--- a/common/cros_ec.c
+++ b/common/cros_ec.c
@@ -12,6 +12,7 @@
 #include <cros_ec.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 
 struct udevice *board_get_cros_ec_dev(void)
 {
diff --git a/common/dfu.c b/common/dfu.c
index cd60f9a1e2..d23cf67f19 100644
--- a/common/dfu.c
+++ b/common/dfu.c
@@ -12,6 +12,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <log.h>
 #include <watchdog.h>
 #include <dfu.h>
 #include <console.h>
diff --git a/common/dlmalloc.c b/common/dlmalloc.c
index e8f07f14f9..b29a7cfd93 100644
--- a/common/dlmalloc.c
+++ b/common/dlmalloc.c
@@ -1,4 +1,5 @@
 #include <common.h>
+#include <log.h>
 
 #if CONFIG_IS_ENABLED(UNIT_TEST)
 #define DEBUG
diff --git a/common/edid.c b/common/edid.c
index f99f42dc40..553ab8fd01 100644
--- a/common/edid.c
+++ b/common/edid.c
@@ -13,6 +13,7 @@
 #include <edid.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <linux/ctype.h>
 #include <linux/string.h>
 
diff --git a/common/fdt_support.c b/common/fdt_support.c
index fad551fdd6..3778de5368 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <log.h>
 #include <mapmem.h>
 #include <net.h>
 #include <stdio_dev.h>
diff --git a/common/flash.c b/common/flash.c
index 115062a45c..bb82385c1f 100644
--- a/common/flash.c
+++ b/common/flash.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <flash.h>
+#include <log.h>
 #include <uuid.h>
 
 #include <mtd/cfi_flash.h>
diff --git a/common/hash.c b/common/hash.c
index 34f00890b4..8c00659d25 100644
--- a/common/hash.c
+++ b/common/hash.c
@@ -13,6 +13,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <log.h>
 #include <malloc.h>
 #include <mapmem.h>
 #include <hw_sha.h>
diff --git a/common/hwconfig.c b/common/hwconfig.c
index 72f3c4e0fa..daf3eea5f9 100644
--- a/common/hwconfig.c
+++ b/common/hwconfig.c
@@ -14,6 +14,7 @@
 #include <env.h>
 #include <exports.h>
 #include <hwconfig.h>
+#include <log.h>
 #include <linux/types.h>
 #include <linux/string.h>
 #else
diff --git a/common/image-fdt.c b/common/image-fdt.c
index 1d2263de5d..b63e772bd6 100644
--- a/common/image-fdt.c
+++ b/common/image-fdt.c
@@ -15,6 +15,7 @@
 #include <errno.h>
 #include <image.h>
 #include <lmb.h>
+#include <log.h>
 #include <malloc.h>
 #include <linux/libfdt.h>
 #include <mapmem.h>
diff --git a/common/image-fit-sig.c b/common/image-fit-sig.c
index a3a0c61bcb..cc1967109e 100644
--- a/common/image-fit-sig.c
+++ b/common/image-fit-sig.c
@@ -8,6 +8,7 @@
 #include <time.h>
 #else
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 DECLARE_GLOBAL_DATA_PTR;
 #endif /* !USE_HOSTCC*/
diff --git a/common/image-fit.c b/common/image-fit.c
index dc745fef7c..1ece100a21 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -18,6 +18,7 @@
 #include <linux/kconfig.h>
 #include <common.h>
 #include <errno.h>
+#include <log.h>
 #include <mapmem.h>
 #include <asm/io.h>
 #include <malloc.h>
diff --git a/common/image-sig.c b/common/image-sig.c
index 5122dc948f..498969d641 100644
--- a/common/image-sig.c
+++ b/common/image-sig.c
@@ -10,6 +10,7 @@
 #include <linux/libfdt.h>
 #else
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 DECLARE_GLOBAL_DATA_PTR;
 #endif /* !USE_HOSTCC*/
diff --git a/common/image.c b/common/image.c
index 9e4e23cac4..e1ca1a7905 100644
--- a/common/image.c
+++ b/common/image.c
@@ -12,6 +12,7 @@
 #include <cpu_func.h>
 #include <env.h>
 #include <lmb.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/cache.h>
 #include <u-boot/crc.h>
diff --git a/common/lcd.c b/common/lcd.c
index 4acf91e623..02f2db3a99 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -12,6 +12,7 @@
 #include <command.h>
 #include <cpu_func.h>
 #include <env_callback.h>
+#include <log.h>
 #include <asm/cache.h>
 #include <init.h>
 #include <linux/types.h>
diff --git a/common/lcd_console.c b/common/lcd_console.c
index ad5f307af4..1a246c492c 100644
--- a/common/lcd_console.c
+++ b/common/lcd_console.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <command.h>
 #include <lcd.h>
+#include <log.h>
 #include <serial.h>
 #include <video_font.h>		/* Get font data, width and height */
 #if defined(CONFIG_LCD_LOGO)
diff --git a/common/malloc_simple.c b/common/malloc_simple.c
index eabbb70128..34f0b49093 100644
--- a/common/malloc_simple.c
+++ b/common/malloc_simple.c
@@ -8,6 +8,7 @@
 #define LOG_CATEGORY LOGC_ALLOC
 
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 #include <mapmem.h>
 #include <asm/io.h>
diff --git a/common/miiphyutil.c b/common/miiphyutil.c
index 2db067876e..9b86b09832 100644
--- a/common/miiphyutil.c
+++ b/common/miiphyutil.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <miiphy.h>
 #include <phy.h>
 
diff --git a/common/spl/spl.c b/common/spl/spl.c
index c59808b924..22482967d5 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -15,6 +15,7 @@
 #include <hang.h>
 #include <init.h>
 #include <irq_func.h>
+#include <log.h>
 #include <serial.h>
 #include <spl.h>
 #include <asm/u-boot.h>
diff --git a/common/spl/spl_atf.c b/common/spl/spl_atf.c
index b83e3bb54a..b54b4f0d22 100644
--- a/common/spl/spl_atf.c
+++ b/common/spl/spl_atf.c
@@ -14,6 +14,7 @@
 #include <cpu_func.h>
 #include <errno.h>
 #include <image.h>
+#include <log.h>
 #include <spl.h>
 #include <asm/cache.h>
 
diff --git a/common/spl/spl_fat.c b/common/spl/spl_fat.c
index aa371ab52c..c2eb097365 100644
--- a/common/spl/spl_fat.c
+++ b/common/spl/spl_fat.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <log.h>
 #include <spl.h>
 #include <asm/u-boot.h>
 #include <fat.h>
diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
index 3df4c8f32d..f581a22421 100644
--- a/common/spl/spl_fit.c
+++ b/common/spl/spl_fit.c
@@ -10,6 +10,7 @@
 #include <fpga.h>
 #include <gzip.h>
 #include <image.h>
+#include <log.h>
 #include <malloc.h>
 #include <spl.h>
 #include <asm/cache.h>
diff --git a/common/spl/spl_legacy.c b/common/spl/spl_legacy.c
index db5017a4b0..82d0326806 100644
--- a/common/spl/spl_legacy.c
+++ b/common/spl/spl_legacy.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <image.h>
+#include <log.h>
 #include <malloc.h>
 #include <spl.h>
 
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index 95d5a7271f..add2785b4e 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -7,6 +7,7 @@
  */
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <part.h>
 #include <spl.h>
 #include <linux/compiler.h>
diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c
index e81279aa1b..48c97549eb 100644
--- a/common/spl/spl_nand.c
+++ b/common/spl/spl_nand.c
@@ -7,6 +7,7 @@
 #include <config.h>
 #include <fdt_support.h>
 #include <image.h>
+#include <log.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <nand.h>
diff --git a/common/spl/spl_net.c b/common/spl/spl_net.c
index a9b6b07ab3..e140a6306f 100644
--- a/common/spl/spl_net.c
+++ b/common/spl/spl_net.c
@@ -10,6 +10,7 @@
 #include <env.h>
 #include <errno.h>
 #include <image.h>
+#include <log.h>
 #include <spl.h>
 #include <net.h>
 #include <linux/libfdt.h>
diff --git a/common/spl/spl_nor.c b/common/spl/spl_nor.c
index d4733ea90a..5270401db0 100644
--- a/common/spl/spl_nor.c
+++ b/common/spl/spl_nor.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <image.h>
+#include <log.h>
 #include <spl.h>
 
 static ulong spl_nor_load_read(struct spl_load_info *load, ulong sector,
diff --git a/common/spl/spl_onenand.c b/common/spl/spl_onenand.c
index 8ba3d4027a..93cbf47e82 100644
--- a/common/spl/spl_onenand.c
+++ b/common/spl/spl_onenand.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <config.h>
 #include <image.h>
+#include <log.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <onenand_uboot.h>
diff --git a/common/spl/spl_ram.c b/common/spl/spl_ram.c
index 80572ceec2..df1d5b43d8 100644
--- a/common/spl/spl_ram.c
+++ b/common/spl/spl_ram.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <binman_sym.h>
 #include <image.h>
+#include <log.h>
 #include <mapmem.h>
 #include <spl.h>
 #include <linux/libfdt.h>
diff --git a/common/spl/spl_sdp.c b/common/spl/spl_sdp.c
index 806bf1327e..7d1da69c02 100644
--- a/common/spl/spl_sdp.c
+++ b/common/spl/spl_sdp.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <spl.h>
 #include <usb.h>
 #include <g_dnl.h>
diff --git a/common/spl/spl_spi.c b/common/spl/spl_spi.c
index 7a374bbfcc..2744fb5d52 100644
--- a/common/spl/spl_spi.c
+++ b/common/spl/spl_spi.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <image.h>
+#include <log.h>
 #include <spi.h>
 #include <spi_flash.h>
 #include <errno.h>
diff --git a/common/spl/spl_usb.c b/common/spl/spl_usb.c
index e29d579b0d..08837b38fc 100644
--- a/common/spl/spl_usb.c
+++ b/common/spl/spl_usb.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <spl.h>
 #include <asm/u-boot.h>
 #include <errno.h>
diff --git a/common/spl/spl_xip.c b/common/spl/spl_xip.c
index f857278018..8ce0a09ef3 100644
--- a/common/spl/spl_xip.c
+++ b/common/spl/spl_xip.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <image.h>
+#include <log.h>
 #include <spl.h>
 
 static int spl_xip(struct spl_image_info *spl_image,
diff --git a/common/spl/spl_ymodem.c b/common/spl/spl_ymodem.c
index 414e62176b..284512478f 100644
--- a/common/spl/spl_ymodem.c
+++ b/common/spl/spl_ymodem.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <gzip.h>
 #include <image.h>
+#include <log.h>
 #include <spl.h>
 #include <xyzModem.h>
 #include <asm/u-boot.h>
diff --git a/common/splash_source.c b/common/splash_source.c
index 2ff15208a7..f51ca5ddf3 100644
--- a/common/splash_source.c
+++ b/common/splash_source.c
@@ -13,6 +13,7 @@
 #include <fs.h>
 #include <fdt_support.h>
 #include <image.h>
+#include <log.h>
 #include <nand.h>
 #include <sata.h>
 #include <spi.h>
diff --git a/common/stdio.c b/common/stdio.c
index 54ecc9b53d..2119204b98 100644
--- a/common/stdio.c
+++ b/common/stdio.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <stdarg.h>
 #include <malloc.h>
 #include <stdio_dev.h>
diff --git a/common/usb.c b/common/usb.c
index 686f09a77d..7c60460452 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -28,6 +28,7 @@
 #include <common.h>
 #include <command.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <memalign.h>
 #include <asm/processor.h>
diff --git a/common/usb_hub.c b/common/usb_hub.c
index c642b683e7..354aee76b4 100644
--- a/common/usb_hub.c
+++ b/common/usb_hub.c
@@ -26,6 +26,7 @@
 #include <dm.h>
 #include <env.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <memalign.h>
 #include <asm/processor.h>
diff --git a/common/usb_kbd.c b/common/usb_kbd.c
index a6221ef716..b316807844 100644
--- a/common/usb_kbd.c
+++ b/common/usb_kbd.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <env.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <memalign.h>
 #include <stdio_dev.h>
diff --git a/common/usb_storage.c b/common/usb_storage.c
index aba9ccb7f5..743a239084 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -37,6 +37,7 @@
 #include <command.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <mapmem.h>
 #include <memalign.h>
 #include <asm/byteorder.h>
diff --git a/disk/part.c b/disk/part.c
index bb0f6e2046..f6a31025dc 100644
--- a/disk/part.c
+++ b/disk/part.c
@@ -10,6 +10,7 @@
 #include <env.h>
 #include <errno.h>
 #include <ide.h>
+#include <log.h>
 #include <malloc.h>
 #include <part.h>
 #include <ubifs_uboot.h>
diff --git a/disk/part_efi.c b/disk/part_efi.c
index 72bfb4b609..de3491821f 100644
--- a/disk/part_efi.c
+++ b/disk/part_efi.c
@@ -11,6 +11,7 @@
  */
 #include <common.h>
 #include <blk.h>
+#include <log.h>
 #include <part.h>
 #include <uuid.h>
 #include <asm/cache.h>
diff --git a/disk/part_mac.c b/disk/part_mac.c
index cda497e04a..e01ae74566 100644
--- a/disk/part_mac.c
+++ b/disk/part_mac.c
@@ -14,6 +14,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <log.h>
 #include <memalign.h>
 #include <ide.h>
 #include "part_mac.h"
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index d54acc96ee..2bb45606dc 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <blk.h>
 #include <cpu_func.h>
+#include <log.h>
 
 #include <command.h>
 #include <dm.h>
diff --git a/drivers/ata/ahci_mvebu.c b/drivers/ata/ahci_mvebu.c
index 48a9d00d14..8be1826d40 100644
--- a/drivers/ata/ahci_mvebu.c
+++ b/drivers/ata/ahci_mvebu.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <ahci.h>
 #include <dm.h>
+#include <log.h>
 
 /*
  * Dummy implementation that can be overwritten by a board
diff --git a/drivers/ata/ahci_sunxi.c b/drivers/ata/ahci_sunxi.c
index 77b932aa03..989690a33e 100644
--- a/drivers/ata/ahci_sunxi.c
+++ b/drivers/ata/ahci_sunxi.c
@@ -1,6 +1,7 @@
 #include <common.h>
 #include <ahci.h>
 #include <dm.h>
+#include <log.h>
 #include <scsi.h>
 #include <errno.h>
 #include <asm/io.h>
diff --git a/drivers/ata/dwc_ahsata.c b/drivers/ata/dwc_ahsata.c
index 6a71f17684..7334129c0f 100644
--- a/drivers/ata/dwc_ahsata.c
+++ b/drivers/ata/dwc_ahsata.c
@@ -12,6 +12,7 @@
 #include <dwc_ahsata.h>
 #include <fis.h>
 #include <libata.h>
+#include <log.h>
 #include <malloc.h>
 #include <memalign.h>
 #include <part.h>
diff --git a/drivers/ata/fsl_sata.c b/drivers/ata/fsl_sata.c
index 0ef70d0d59..e8f2d36510 100644
--- a/drivers/ata/fsl_sata.c
+++ b/drivers/ata/fsl_sata.c
@@ -10,6 +10,7 @@
 #include <command.h>
 #include <console.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/processor.h>
 #include <asm/fsl_serdes.h>
diff --git a/drivers/ata/sata_ceva.c b/drivers/ata/sata_ceva.c
index 2d496305d0..77508aa5bc 100644
--- a/drivers/ata/sata_ceva.c
+++ b/drivers/ata/sata_ceva.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <ahci.h>
+#include <log.h>
 #include <scsi.h>
 #include <asm/io.h>
 #include <linux/ioport.h>
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index cebb165a47..9fccaea275 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -36,6 +36,7 @@
 #include <blk.h>
 #include <cpu_func.h>
 #include <dm.h>
+#include <log.h>
 #include <asm/cache.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c
index 71ee0c04ef..17db64009c 100644
--- a/drivers/ata/sata_sil.c
+++ b/drivers/ata/sata_sil.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <pci.h>
 #include <command.h>
 #include <asm/byteorder.h>
diff --git a/drivers/ata/sata_sil3114.c b/drivers/ata/sata_sil3114.c
index 4a7ffad6bd..7e802170d8 100644
--- a/drivers/ata/sata_sil3114.c
+++ b/drivers/ata/sata_sil3114.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <blk.h>
+#include <log.h>
 #include <part.h>
 #include <pci.h>
 #include <command.h>
diff --git a/drivers/axi/axi-emul-uclass.c b/drivers/axi/axi-emul-uclass.c
index 06c42006ee..b28351f1ad 100644
--- a/drivers/axi/axi-emul-uclass.c
+++ b/drivers/axi/axi-emul-uclass.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <axi.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/device-internal.h>
 #include <asm/axi.h>
 
diff --git a/drivers/axi/ihs_axi.c b/drivers/axi/ihs_axi.c
index 690aa7796b..d4f6a4d6b4 100644
--- a/drivers/axi/ihs_axi.c
+++ b/drivers/axi/ihs_axi.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <axi.h>
 #include <dm.h>
+#include <log.h>
 #include <regmap.h>
 
 /**
diff --git a/drivers/axi/sandbox_store.c b/drivers/axi/sandbox_store.c
index a6f483ed25..42bcae6af2 100644
--- a/drivers/axi/sandbox_store.c
+++ b/drivers/axi/sandbox_store.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <axi.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 
 /**
diff --git a/drivers/bios_emulator/atibios.c b/drivers/bios_emulator/atibios.c
index fb806b53d4..d1dc35d049 100644
--- a/drivers/bios_emulator/atibios.c
+++ b/drivers/bios_emulator/atibios.c
@@ -48,6 +48,7 @@
 #include <common.h>
 #include <bios_emul.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <vbe.h>
 #include "biosemui.h"
diff --git a/drivers/block/blk-uclass.c b/drivers/block/blk-uclass.c
index 4bda74bd06..b19375cbc8 100644
--- a/drivers/block/blk-uclass.c
+++ b/drivers/block/blk-uclass.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <blk.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <part.h>
 #include <dm/device-internal.h>
diff --git a/drivers/block/blkcache.c b/drivers/block/blkcache.c
index 6a8f789ff0..b6fc72fe98 100644
--- a/drivers/block/blkcache.c
+++ b/drivers/block/blkcache.c
@@ -6,6 +6,7 @@
  */
 #include <common.h>
 #include <blk.h>
+#include <log.h>
 #include <malloc.h>
 #include <part.h>
 #include <linux/ctype.h>
diff --git a/drivers/block/ide.c b/drivers/block/ide.c
index 868726c50c..1b7fd4974c 100644
--- a/drivers/block/ide.c
+++ b/drivers/block/ide.c
@@ -9,6 +9,7 @@
 #include <blk.h>
 #include <dm.h>
 #include <ide.h>
+#include <log.h>
 #include <part.h>
 #include <watchdog.h>
 #include <asm/io.h>
diff --git a/drivers/board/gazerbeam.c b/drivers/board/gazerbeam.c
index 85de4e440c..ed50fc530c 100644
--- a/drivers/board/gazerbeam.c
+++ b/drivers/board/gazerbeam.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <board.h>
 #include <i2c.h>
+#include <log.h>
 #include <asm/gpio.h>
 
 #include "gazerbeam.h"
diff --git a/drivers/bootcount/bootcount-uclass.c b/drivers/bootcount/bootcount-uclass.c
index 0689db7a5b..34ac08d59a 100644
--- a/drivers/bootcount/bootcount-uclass.c
+++ b/drivers/bootcount/bootcount-uclass.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <bootcount.h>
+#include <log.h>
 
 int dm_bootcount_get(struct udevice *dev, u32 *bootcount)
 {
diff --git a/drivers/bootcount/i2c-eeprom.c b/drivers/bootcount/i2c-eeprom.c
index ee760a2742..a3aa0cf559 100644
--- a/drivers/bootcount/i2c-eeprom.c
+++ b/drivers/bootcount/i2c-eeprom.c
@@ -8,6 +8,7 @@
 #include <bootcount.h>
 #include <dm.h>
 #include <i2c_eeprom.h>
+#include <log.h>
 
 static const u8 bootcount_magic = 0xbc;
 
diff --git a/drivers/bootcount/rtc.c b/drivers/bootcount/rtc.c
index db89fa3a35..076a8bb2be 100644
--- a/drivers/bootcount/rtc.c
+++ b/drivers/bootcount/rtc.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <bootcount.h>
 #include <dm.h>
+#include <log.h>
 #include <rtc.h>
 
 static const u8 bootcount_magic = 0xbc;
diff --git a/drivers/cache/cache-ncore.c b/drivers/cache/cache-ncore.c
index 0aab7ee191..3beff780de 100644
--- a/drivers/cache/cache-ncore.c
+++ b/drivers/cache/cache-ncore.c
@@ -8,6 +8,7 @@
 #include <wait_bit.h>
 
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 /* Directory */
 #define DIRUSFER		0x80010
diff --git a/drivers/clk/altera/clk-agilex.c b/drivers/clk/altera/clk-agilex.c
index 5fedec549d..63153fa660 100644
--- a/drivers/clk/altera/clk-agilex.c
+++ b/drivers/clk/altera/clk-agilex.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <clk-uclass.h>
 #include <dm.h>
diff --git a/drivers/clk/aspeed/clk_ast2500.c b/drivers/clk/aspeed/clk_ast2500.c
index f4a441ad68..e5b07c7386 100644
--- a/drivers/clk/aspeed/clk_ast2500.c
+++ b/drivers/clk/aspeed/clk_ast2500.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/scu_ast2500.h>
 #include <dm/lists.h>
diff --git a/drivers/clk/at91/clk-generated.c b/drivers/clk/at91/clk-generated.c
index a80f259a72..c0610940c3 100644
--- a/drivers/clk/at91/clk-generated.c
+++ b/drivers/clk/at91/clk-generated.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <linux/err.h>
 #include <linux/io.h>
diff --git a/drivers/clk/at91/clk-usb.c b/drivers/clk/at91/clk-usb.c
index c3cb2ba014..af9d724369 100644
--- a/drivers/clk/at91/clk-usb.c
+++ b/drivers/clk/at91/clk-usb.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <clk-uclass.h>
+#include <log.h>
 #include <dm/device.h>
 #include <linux/err.h>
 #include <linux/io.h>
diff --git a/drivers/clk/at91/pmc.c b/drivers/clk/at91/pmc.c
index f5808449a6..9d9d77d861 100644
--- a/drivers/clk/at91/pmc.c
+++ b/drivers/clk/at91/pmc.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/lists.h>
 #include <dm/util.h>
 #include "pmc.h"
diff --git a/drivers/clk/clk-hsdk-cgu.c b/drivers/clk/clk-hsdk-cgu.c
index 3035c5fb38..64508926ca 100644
--- a/drivers/clk/clk-hsdk-cgu.c
+++ b/drivers/clk/clk-hsdk-cgu.c
@@ -13,6 +13,7 @@
 #include <clk-uclass.h>
 #include <div64.h>
 #include <dm.h>
+#include <log.h>
 #include <linux/io.h>
 
 /*
diff --git a/drivers/clk/clk-ti-sci.c b/drivers/clk/clk-ti-sci.c
index 82241d9f3f..7a9a645137 100644
--- a/drivers/clk/clk-ti-sci.c
+++ b/drivers/clk/clk-ti-sci.c
@@ -12,6 +12,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <clk-uclass.h>
+#include <log.h>
 #include <malloc.h>
 #include <dm/device_compat.h>
 #include <linux/err.h>
diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c
index 71878474eb..276e4fb336 100644
--- a/drivers/clk/clk-uclass.c
+++ b/drivers/clk/clk-uclass.c
@@ -12,6 +12,7 @@
 #include <dm.h>
 #include <dt-structs.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <dm/devres.h>
 #include <dm/read.h>
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 4c477a488e..0f55ba751c 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <clk-uclass.h>
+#include <log.h>
 #include <dm/device.h>
 #include <dm/uclass.h>
 #include <dm/lists.h>
diff --git a/drivers/clk/clk_stm32f.c b/drivers/clk/clk_stm32f.c
index cbcfe3a89d..6d604cd82c 100644
--- a/drivers/clk/clk_stm32f.c
+++ b/drivers/clk/clk_stm32f.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <log.h>
 #include <stm32_rcc.h>
 
 #include <asm/io.h>
diff --git a/drivers/clk/clk_stm32h7.c b/drivers/clk/clk_stm32h7.c
index 18d06b333d..f147392fa1 100644
--- a/drivers/clk/clk_stm32h7.c
+++ b/drivers/clk/clk_stm32h7.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <log.h>
 #include <regmap.h>
 #include <syscon.h>
 #include <asm/io.h>
diff --git a/drivers/clk/clk_stm32mp1.c b/drivers/clk/clk_stm32mp1.c
index a70388b750..2c598836a1 100644
--- a/drivers/clk/clk_stm32mp1.c
+++ b/drivers/clk/clk_stm32mp1.c
@@ -8,6 +8,7 @@
 #include <div64.h>
 #include <dm.h>
 #include <init.h>
+#include <log.h>
 #include <regmap.h>
 #include <spl.h>
 #include <syscon.h>
diff --git a/drivers/clk/clk_versal.c b/drivers/clk/clk_versal.c
index 8b202fa0ae..0b1d45bdae 100644
--- a/drivers/clk/clk_versal.c
+++ b/drivers/clk/clk_versal.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/cache.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
diff --git a/drivers/clk/clk_vexpress_osc.c b/drivers/clk/clk_vexpress_osc.c
index 82e589e239..ddfc5f6e68 100644
--- a/drivers/clk/clk_vexpress_osc.c
+++ b/drivers/clk/clk_vexpress_osc.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/device_compat.h>
 #include <dm/lists.h>
 #include <errno.h>
diff --git a/drivers/clk/clk_zynq.c b/drivers/clk/clk_zynq.c
index 4ca1cc0d52..a699a3664c 100644
--- a/drivers/clk/clk_zynq.c
+++ b/drivers/clk/clk_zynq.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/device_compat.h>
 #include <dm/lists.h>
 #include <errno.h>
diff --git a/drivers/clk/clk_zynqmp.c b/drivers/clk/clk_zynqmp.c
index e0eb897da8..2313ac0bc0 100644
--- a/drivers/clk/clk_zynqmp.c
+++ b/drivers/clk/clk_zynqmp.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
diff --git a/drivers/clk/ics8n3qv01.c b/drivers/clk/ics8n3qv01.c
index e85ab1f9a0..4f80bf6e52 100644
--- a/drivers/clk/ics8n3qv01.c
+++ b/drivers/clk/ics8n3qv01.c
@@ -13,6 +13,7 @@
 #include <dm.h>
 #include <clk-uclass.h>
 #include <i2c.h>
+#include <log.h>
 
 const long long ICS8N3QV01_FREF = 114285000;
 const long long ICS8N3QV01_FREF_LL = 114285000LL;
diff --git a/drivers/clk/imx/clk-composite-8m.c b/drivers/clk/imx/clk-composite-8m.c
index 3e99c528de..494156751d 100644
--- a/drivers/clk/imx/clk-composite-8m.c
+++ b/drivers/clk/imx/clk-composite-8m.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <malloc.h>
 #include <clk-uclass.h>
diff --git a/drivers/clk/imx/clk-imx6q.c b/drivers/clk/imx/clk-imx6q.c
index bd0d3e4f47..11d194363d 100644
--- a/drivers/clk/imx/clk-imx6q.c
+++ b/drivers/clk/imx/clk-imx6q.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <log.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <dt-bindings/clock/imx6qdl-clock.h>
diff --git a/drivers/clk/imx/clk-imx8.c b/drivers/clk/imx/clk-imx8.c
index 671054d9be..27a652a625 100644
--- a/drivers/clk/imx/clk-imx8.c
+++ b/drivers/clk/imx/clk-imx8.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/arch/sci/sci.h>
 #include <asm/arch/clock.h>
diff --git a/drivers/clk/imx/clk-imx8mm.c b/drivers/clk/imx/clk-imx8mm.c
index fc41a028f6..66c9601b0c 100644
--- a/drivers/clk/imx/clk-imx8mm.c
+++ b/drivers/clk/imx/clk-imx8mm.c
@@ -8,6 +8,7 @@
 #include <clk.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <log.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <dt-bindings/clock/imx8mm-clock.h>
diff --git a/drivers/clk/imx/clk-imx8mn.c b/drivers/clk/imx/clk-imx8mn.c
index eb43971ae6..2d8e373131 100644
--- a/drivers/clk/imx/clk-imx8mn.c
+++ b/drivers/clk/imx/clk-imx8mn.c
@@ -8,6 +8,7 @@
 #include <clk.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <log.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <dt-bindings/clock/imx8mn-clock.h>
diff --git a/drivers/clk/imx/clk-imx8mp.c b/drivers/clk/imx/clk-imx8mp.c
index a2693d2f7a..3d7aebb8e5 100644
--- a/drivers/clk/imx/clk-imx8mp.c
+++ b/drivers/clk/imx/clk-imx8mp.c
@@ -8,6 +8,7 @@
 #include <clk.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <log.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <dt-bindings/clock/imx8mp-clock.h>
diff --git a/drivers/clk/imx/clk-imx8qm.c b/drivers/clk/imx/clk-imx8qm.c
index a6b09d2109..54fb09fda4 100644
--- a/drivers/clk/imx/clk-imx8qm.c
+++ b/drivers/clk/imx/clk-imx8qm.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <log.h>
 #include <asm/arch/sci/sci.h>
 #include <asm/arch/clock.h>
 #include <dt-bindings/clock/imx8qm-clock.h>
diff --git a/drivers/clk/imx/clk-imx8qxp.c b/drivers/clk/imx/clk-imx8qxp.c
index 0db4539a1f..e6b2fb40da 100644
--- a/drivers/clk/imx/clk-imx8qxp.c
+++ b/drivers/clk/imx/clk-imx8qxp.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <log.h>
 #include <asm/arch/sci/sci.h>
 #include <asm/arch/clock.h>
 #include <dt-bindings/clock/imx8qxp-clock.h>
diff --git a/drivers/clk/imx/clk-imxrt1050.c b/drivers/clk/imx/clk-imxrt1050.c
index 8279e784fe..594093ee5f 100644
--- a/drivers/clk/imx/clk-imxrt1050.c
+++ b/drivers/clk/imx/clk-imxrt1050.c
@@ -8,6 +8,7 @@
 #include <clk.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <log.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <dt-bindings/clock/imxrt1050-clock.h>
diff --git a/drivers/clk/mediatek/clk-mt7622.c b/drivers/clk/mediatek/clk-mt7622.c
index a5b61a190b..0a1495a464 100644
--- a/drivers/clk/mediatek/clk-mt7622.c
+++ b/drivers/clk/mediatek/clk-mt7622.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <asm/arch-mediatek/reset.h>
 #include <asm/io.h>
 #include <dt-bindings/clock/mt7622-clk.h>
diff --git a/drivers/clk/mediatek/clk-mt7623.c b/drivers/clk/mediatek/clk-mt7623.c
index dfce32e283..c44969a073 100644
--- a/drivers/clk/mediatek/clk-mt7623.c
+++ b/drivers/clk/mediatek/clk-mt7623.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <asm/arch-mediatek/reset.h>
 #include <asm/io.h>
 #include <dt-bindings/clock/mt7623-clk.h>
diff --git a/drivers/clk/mediatek/clk-mt7629.c b/drivers/clk/mediatek/clk-mt7629.c
index 858be85d15..d683752403 100644
--- a/drivers/clk/mediatek/clk-mt7629.c
+++ b/drivers/clk/mediatek/clk-mt7629.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <asm/arch-mediatek/reset.h>
 #include <asm/io.h>
 #include <dt-bindings/clock/mt7629-clk.h>
diff --git a/drivers/clk/meson/axg.c b/drivers/clk/meson/axg.c
index 4b0028d04b..d84447260a 100644
--- a/drivers/clk/meson/axg.c
+++ b/drivers/clk/meson/axg.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/arch/clock-axg.h>
 #include <asm/io.h>
 #include <clk-uclass.h>
diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c
index 6089f8474e..c9918c17d7 100644
--- a/drivers/clk/meson/g12a.c
+++ b/drivers/clk/meson/g12a.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/arch/clock-g12a.h>
 #include <asm/io.h>
 #include <clk-uclass.h>
diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c
index 5ef4dd794d..0ed1d03506 100644
--- a/drivers/clk/meson/gxbb.c
+++ b/drivers/clk/meson/gxbb.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/arch/clock-gx.h>
 #include <asm/io.h>
 #include <clk-uclass.h>
diff --git a/drivers/clk/mpc83xx_clk.c b/drivers/clk/mpc83xx_clk.c
index fa519a4430..4c77c8da1a 100644
--- a/drivers/clk/mpc83xx_clk.c
+++ b/drivers/clk/mpc83xx_clk.c
@@ -9,6 +9,7 @@
 #include <clock_legacy.h>
 #include <command.h>
 #include <dm.h>
+#include <log.h>
 #include <vsprintf.h>
 #include <dm/lists.h>
 #include <dt-bindings/clk/mpc83xx-clk.h>
diff --git a/drivers/clk/renesas/clk-rcar-gen2.c b/drivers/clk/renesas/clk-rcar-gen2.c
index bfd7620dae..3ed0aa92cb 100644
--- a/drivers/clk/renesas/clk-rcar-gen2.c
+++ b/drivers/clk/renesas/clk-rcar-gen2.c
@@ -14,6 +14,7 @@
 #include <clk-uclass.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <asm/io.h>
 
 #include <dt-bindings/clock/renesas-cpg-mssr.h>
diff --git a/drivers/clk/renesas/clk-rcar-gen3.c b/drivers/clk/renesas/clk-rcar-gen3.c
index a2011dd37c..8e1af1caa1 100644
--- a/drivers/clk/renesas/clk-rcar-gen3.c
+++ b/drivers/clk/renesas/clk-rcar-gen3.c
@@ -14,6 +14,7 @@
 #include <clk-uclass.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <wait_bit.h>
 #include <asm/io.h>
 
diff --git a/drivers/clk/renesas/renesas-cpg-mssr.c b/drivers/clk/renesas/renesas-cpg-mssr.c
index 7698613877..6ad684c10b 100644
--- a/drivers/clk/renesas/renesas-cpg-mssr.c
+++ b/drivers/clk/renesas/renesas-cpg-mssr.c
@@ -13,6 +13,7 @@
 #include <clk-uclass.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <wait_bit.h>
 #include <asm/io.h>
 
diff --git a/drivers/clk/rockchip/clk_pll.c b/drivers/clk/rockchip/clk_pll.c
index c4b45314ec..6dab5097c1 100644
--- a/drivers/clk/rockchip/clk_pll.c
+++ b/drivers/clk/rockchip/clk_pll.c
@@ -7,6 +7,7 @@
 #include <clk-uclass.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/clock.h>
 #include <asm/arch-rockchip/hardware.h>
diff --git a/drivers/clk/rockchip/clk_px30.c b/drivers/clk/rockchip/clk_px30.c
index b88534145e..04d85b4b6d 100644
--- a/drivers/clk/rockchip/clk_px30.c
+++ b/drivers/clk/rockchip/clk_px30.c
@@ -8,6 +8,7 @@
 #include <clk-uclass.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <syscon.h>
 #include <asm/arch-rockchip/clock.h>
diff --git a/drivers/clk/rockchip/clk_rk3036.c b/drivers/clk/rockchip/clk_rk3036.c
index 6e085c4136..2d722405b2 100644
--- a/drivers/clk/rockchip/clk_rk3036.c
+++ b/drivers/clk/rockchip/clk_rk3036.c
@@ -7,6 +7,7 @@
 #include <clk-uclass.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <syscon.h>
 #include <asm/io.h>
diff --git a/drivers/clk/rockchip/clk_rk3128.c b/drivers/clk/rockchip/clk_rk3128.c
index a6f7902941..6d1974844b 100644
--- a/drivers/clk/rockchip/clk_rk3128.c
+++ b/drivers/clk/rockchip/clk_rk3128.c
@@ -7,6 +7,7 @@
 #include <clk-uclass.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <syscon.h>
 #include <asm/io.h>
diff --git a/drivers/clk/rockchip/clk_rk3188.c b/drivers/clk/rockchip/clk_rk3188.c
index 2b82a40d28..6b00e77012 100644
--- a/drivers/clk/rockchip/clk_rk3188.c
+++ b/drivers/clk/rockchip/clk_rk3188.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <dt-structs.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <mapmem.h>
 #include <syscon.h>
diff --git a/drivers/clk/rockchip/clk_rk322x.c b/drivers/clk/rockchip/clk_rk322x.c
index ef33adbf29..dfb9fff2e5 100644
--- a/drivers/clk/rockchip/clk_rk322x.c
+++ b/drivers/clk/rockchip/clk_rk322x.c
@@ -7,6 +7,7 @@
 #include <clk-uclass.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <syscon.h>
 #include <asm/io.h>
diff --git a/drivers/clk/rockchip/clk_rk3288.c b/drivers/clk/rockchip/clk_rk3288.c
index 81cdb8ee9c..762c9d4f10 100644
--- a/drivers/clk/rockchip/clk_rk3288.c
+++ b/drivers/clk/rockchip/clk_rk3288.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <dt-structs.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <mapmem.h>
 #include <syscon.h>
diff --git a/drivers/clk/rockchip/clk_rk3308.c b/drivers/clk/rockchip/clk_rk3308.c
index c0f1285e4c..5889cf862e 100644
--- a/drivers/clk/rockchip/clk_rk3308.c
+++ b/drivers/clk/rockchip/clk_rk3308.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <div64.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <syscon.h>
 #include <asm/io.h>
diff --git a/drivers/clk/rockchip/clk_rk3328.c b/drivers/clk/rockchip/clk_rk3328.c
index 8e867c58df..28613a971d 100644
--- a/drivers/clk/rockchip/clk_rk3328.c
+++ b/drivers/clk/rockchip/clk_rk3328.c
@@ -8,6 +8,7 @@
 #include <clk-uclass.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <syscon.h>
 #include <asm/arch-rockchip/clock.h>
diff --git a/drivers/clk/rockchip/clk_rk3368.c b/drivers/clk/rockchip/clk_rk3368.c
index 2cce1b967d..f0a72f1a72 100644
--- a/drivers/clk/rockchip/clk_rk3368.c
+++ b/drivers/clk/rockchip/clk_rk3368.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <dt-structs.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <mapmem.h>
 #include <syscon.h>
diff --git a/drivers/clk/rockchip/clk_rk3399.c b/drivers/clk/rockchip/clk_rk3399.c
index d822acace1..dd2834f9d6 100644
--- a/drivers/clk/rockchip/clk_rk3399.c
+++ b/drivers/clk/rockchip/clk_rk3399.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <dt-structs.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <mapmem.h>
 #include <syscon.h>
diff --git a/drivers/clk/rockchip/clk_rv1108.c b/drivers/clk/rockchip/clk_rv1108.c
index da9c48b962..def3baa6fd 100644
--- a/drivers/clk/rockchip/clk_rv1108.c
+++ b/drivers/clk/rockchip/clk_rv1108.c
@@ -9,6 +9,7 @@
 #include <clk-uclass.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <syscon.h>
 #include <asm/io.h>
diff --git a/drivers/clk/sunxi/clk_sunxi.c b/drivers/clk/sunxi/clk_sunxi.c
index 6d4aeb5315..77fba5357f 100644
--- a/drivers/clk/sunxi/clk_sunxi.c
+++ b/drivers/clk/sunxi/clk_sunxi.c
@@ -8,6 +8,7 @@
 #include <clk-uclass.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <reset.h>
 #include <asm/io.h>
 #include <asm/arch/ccu.h>
diff --git a/drivers/clk/tegra/tegra-car-clk.c b/drivers/clk/tegra/tegra-car-clk.c
index 6083f14e75..09a7cf470c 100644
--- a/drivers/clk/tegra/tegra-car-clk.c
+++ b/drivers/clk/tegra/tegra-car-clk.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/arch/clock.h>
 #include <asm/arch-tegra/clk_rst.h>
diff --git a/drivers/clk/tegra/tegra186-clk.c b/drivers/clk/tegra/tegra186-clk.c
index 612fb1b972..5a98a3f3f0 100644
--- a/drivers/clk/tegra/tegra186-clk.c
+++ b/drivers/clk/tegra/tegra186-clk.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <log.h>
 #include <misc.h>
 #include <asm/arch-tegra/bpmp_abi.h>
 
diff --git a/drivers/core/acpi.c b/drivers/core/acpi.c
index e09905cf2a..8ae61575dd 100644
--- a/drivers/core/acpi.c
+++ b/drivers/core/acpi.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/acpi.h>
 #include <dm/device-internal.h>
 #include <dm/root.h>
diff --git a/drivers/core/device.c b/drivers/core/device.c
index ee0c861807..a7408d9c76 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <asm/io.h>
 #include <clk.h>
 #include <fdtdec.h>
diff --git a/drivers/core/devres.c b/drivers/core/devres.c
index 457e1309c5..88244698b0 100644
--- a/drivers/core/devres.c
+++ b/drivers/core/devres.c
@@ -10,6 +10,7 @@
 #define LOG_CATEGORY LOGC_DEVRES
 
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 #include <linux/compat.h>
 #include <linux/kernel.h>
diff --git a/drivers/core/fdtaddr.c b/drivers/core/fdtaddr.c
index 33811e62f7..dfcb868f65 100644
--- a/drivers/core/fdtaddr.c
+++ b/drivers/core/fdtaddr.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <dm.h>
 #include <fdt_support.h>
+#include <log.h>
 #include <asm/io.h>
 #include <dm/device-internal.h>
 
diff --git a/drivers/core/lists.c b/drivers/core/lists.c
index c7db14ed56..5beba9181c 100644
--- a/drivers/core/lists.c
+++ b/drivers/core/lists.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <errno.h>
+#include <log.h>
 #include <dm/device.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
diff --git a/drivers/core/of_access.c b/drivers/core/of_access.c
index ea3ee8bd63..710653be0e 100644
--- a/drivers/core/of_access.c
+++ b/drivers/core/of_access.c
@@ -20,6 +20,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 #include <linux/libfdt.h>
 #include <dm/of_access.h>
diff --git a/drivers/core/of_addr.c b/drivers/core/of_addr.c
index 4e256d9926..ed8b73e8b3 100644
--- a/drivers/core/of_addr.c
+++ b/drivers/core/of_addr.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <linux/libfdt.h>
 #include <dm/of_access.h>
 #include <dm/of_addr.h>
diff --git a/drivers/core/of_extra.c b/drivers/core/of_extra.c
index f1f393c359..6420e6ec44 100644
--- a/drivers/core/of_extra.c
+++ b/drivers/core/of_extra.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <linux/libfdt.h>
 #include <dm/of_access.h>
 #include <dm/of_extra.h>
diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c
index e3c42dae5c..c37afa1fe6 100644
--- a/drivers/core/ofnode.c
+++ b/drivers/core/ofnode.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <fdt_support.h>
+#include <log.h>
 #include <malloc.h>
 #include <linux/libfdt.h>
 #include <dm/of_access.h>
diff --git a/drivers/core/regmap.c b/drivers/core/regmap.c
index a974744a61..4a214eff7c 100644
--- a/drivers/core/regmap.c
+++ b/drivers/core/regmap.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <linux/libfdt.h>
 #include <malloc.h>
 #include <mapmem.h>
diff --git a/drivers/core/root.c b/drivers/core/root.c
index 14df16c280..7d257ea887 100644
--- a/drivers/core/root.c
+++ b/drivers/core/root.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <malloc.h>
 #include <linux/libfdt.h>
 #include <dm/device.h>
diff --git a/drivers/core/syscon-uclass.c b/drivers/core/syscon-uclass.c
index 15f0e42a85..b5cd763b6b 100644
--- a/drivers/core/syscon-uclass.c
+++ b/drivers/core/syscon-uclass.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <syscon.h>
 #include <dm.h>
 #include <errno.h>
diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c
index 6849302936..2ab419cfe4 100644
--- a/drivers/core/uclass.c
+++ b/drivers/core/uclass.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <dm/device.h>
 #include <dm/device-internal.h>
diff --git a/drivers/cpu/cpu-uclass.c b/drivers/cpu/cpu-uclass.c
index 457f77b7c8..838710a6f0 100644
--- a/drivers/cpu/cpu-uclass.c
+++ b/drivers/cpu/cpu-uclass.c
@@ -8,6 +8,7 @@
 #include <cpu.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <dm/lists.h>
 #include <dm/root.h>
 
diff --git a/drivers/cpu/mpc83xx_cpu.c b/drivers/cpu/mpc83xx_cpu.c
index 1e58457742..c1a7a555c6 100644
--- a/drivers/cpu/mpc83xx_cpu.c
+++ b/drivers/cpu/mpc83xx_cpu.c
@@ -9,6 +9,7 @@
 #include <clk.h>
 #include <cpu.h>
 #include <dm.h>
+#include <log.h>
 #include <vsprintf.h>
 
 #include "mpc83xx_cpu.h"
diff --git a/drivers/cpu/riscv_cpu.c b/drivers/cpu/riscv_cpu.c
index 28ad0aa30f..1dc7ee9fdc 100644
--- a/drivers/cpu/riscv_cpu.c
+++ b/drivers/cpu/riscv_cpu.c
@@ -7,6 +7,7 @@
 #include <cpu.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
 
diff --git a/drivers/crypto/ace_sha.c b/drivers/crypto/ace_sha.c
index b5321ed820..261d3efe84 100644
--- a/drivers/crypto/ace_sha.c
+++ b/drivers/crypto/ace_sha.c
@@ -5,6 +5,7 @@
  */
 #include <common.h>
 #include "ace_sha.h"
+#include <log.h>
 #include <rand.h>
 
 #ifdef CONFIG_SHA_HW_ACCEL
diff --git a/drivers/crypto/fsl/error.c b/drivers/crypto/fsl/error.c
index 731c748443..c76574919c 100644
--- a/drivers/crypto/fsl/error.c
+++ b/drivers/crypto/fsl/error.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 #include "desc.h"
 #include "jr.h"
diff --git a/drivers/crypto/fsl/fsl_blob.c b/drivers/crypto/fsl/fsl_blob.c
index c2059b8b0a..d6bd861251 100644
--- a/drivers/crypto/fsl/fsl_blob.c
+++ b/drivers/crypto/fsl/fsl_blob.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <malloc.h>
 #include <memalign.h>
 #include <fsl_sec.h>
diff --git a/drivers/crypto/fsl/fsl_hash.c b/drivers/crypto/fsl/fsl_hash.c
index e63def8b2d..953deec9ff 100644
--- a/drivers/crypto/fsl/fsl_hash.c
+++ b/drivers/crypto/fsl/fsl_hash.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <malloc.h>
 #include <memalign.h>
 #include "jobdesc.h"
diff --git a/drivers/crypto/fsl/fsl_rsa.c b/drivers/crypto/fsl/fsl_rsa.c
index 0cb3c6b5f2..ed2a54f6ec 100644
--- a/drivers/crypto/fsl/fsl_rsa.c
+++ b/drivers/crypto/fsl/fsl_rsa.c
@@ -7,6 +7,7 @@
 #include <config.h>
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <asm/types.h>
 #include <malloc.h>
 #include "jobdesc.h"
diff --git a/drivers/crypto/fsl/jr.c b/drivers/crypto/fsl/jr.c
index 9228149863..e2d9216cfc 100644
--- a/drivers/crypto/fsl/jr.c
+++ b/drivers/crypto/fsl/jr.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <malloc.h>
 #include "fsl_sec.h"
 #include "jr.h"
diff --git a/drivers/crypto/rsa_mod_exp/mod_exp_sw.c b/drivers/crypto/rsa_mod_exp/mod_exp_sw.c
index c9b571a461..03b3d61403 100644
--- a/drivers/crypto/rsa_mod_exp/mod_exp_sw.c
+++ b/drivers/crypto/rsa_mod_exp/mod_exp_sw.c
@@ -7,6 +7,7 @@
 #include <config.h>
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <u-boot/rsa-mod-exp.h>
 
 static int mod_exp_sw(struct udevice *dev, const uint8_t *sig, uint32_t sig_len,
diff --git a/drivers/ddr/altera/sdram_agilex.c b/drivers/ddr/altera/sdram_agilex.c
index 626fb724d4..a0f25d1179 100644
--- a/drivers/ddr/altera/sdram_agilex.c
+++ b/drivers/ddr/altera/sdram_agilex.c
@@ -10,6 +10,7 @@
 #include <div64.h>
 #include <fdtdec.h>
 #include <hang.h>
+#include <log.h>
 #include <ram.h>
 #include <reset.h>
 #include "sdram_soc64.h"
diff --git a/drivers/ddr/altera/sdram_arria10.c b/drivers/ddr/altera/sdram_arria10.c
index d1dec58295..7e8c0154e5 100644
--- a/drivers/ddr/altera/sdram_arria10.c
+++ b/drivers/ddr/altera/sdram_arria10.c
@@ -8,6 +8,7 @@
 #include <errno.h>
 #include <fdtdec.h>
 #include <init.h>
+#include <log.h>
 #include <malloc.h>
 #include <wait_bit.h>
 #include <watchdog.h>
diff --git a/drivers/ddr/altera/sdram_gen5.c b/drivers/ddr/altera/sdram_gen5.c
index 314c7aea00..ba588e96af 100644
--- a/drivers/ddr/altera/sdram_gen5.c
+++ b/drivers/ddr/altera/sdram_gen5.c
@@ -7,6 +7,7 @@
 #include <errno.h>
 #include <div64.h>
 #include <init.h>
+#include <log.h>
 #include <ram.h>
 #include <reset.h>
 #include <watchdog.h>
diff --git a/drivers/ddr/altera/sdram_s10.c b/drivers/ddr/altera/sdram_s10.c
index 0b36d6c027..91f76e03c2 100644
--- a/drivers/ddr/altera/sdram_s10.c
+++ b/drivers/ddr/altera/sdram_s10.c
@@ -12,6 +12,7 @@
 #include <fdtdec.h>
 #include <hang.h>
 #include <init.h>
+#include <log.h>
 #include <ram.h>
 #include <reset.h>
 #include "sdram_s10.h"
diff --git a/drivers/ddr/altera/sdram_soc64.c b/drivers/ddr/altera/sdram_soc64.c
index 1a69b0328a..491f689c44 100644
--- a/drivers/ddr/altera/sdram_soc64.c
+++ b/drivers/ddr/altera/sdram_soc64.c
@@ -12,6 +12,7 @@
 #include <fdtdec.h>
 #include <hang.h>
 #include <init.h>
+#include <log.h>
 #include <ram.h>
 #include <reset.h>
 #include "sdram_soc64.h"
diff --git a/drivers/ddr/altera/sequencer.c b/drivers/ddr/altera/sequencer.c
index 35bda9b34c..2dbde49a9c 100644
--- a/drivers/ddr/altera/sequencer.c
+++ b/drivers/ddr/altera/sequencer.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/sdram.h>
 #include <errno.h>
diff --git a/drivers/ddr/fsl/arm_ddr_gen3.c b/drivers/ddr/fsl/arm_ddr_gen3.c
index e9eaa1e0af..abe8c11d14 100644
--- a/drivers/ddr/fsl/arm_ddr_gen3.c
+++ b/drivers/ddr/fsl/arm_ddr_gen3.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <fsl_ddr_sdram.h>
 #include <asm/processor.h>
diff --git a/drivers/ddr/fsl/ctrl_regs.c b/drivers/ddr/fsl/ctrl_regs.c
index 98ccbb70de..ed60b226df 100644
--- a/drivers/ddr/fsl/ctrl_regs.c
+++ b/drivers/ddr/fsl/ctrl_regs.c
@@ -15,6 +15,7 @@
 #include <fsl_errata.h>
 #include <fsl_ddr.h>
 #include <fsl_immap.h>
+#include <log.h>
 #include <asm/io.h>
 #if defined(CONFIG_FSL_LSCH2) || defined(CONFIG_FSL_LSCH3) || \
 	defined(CONFIG_ARM)
diff --git a/drivers/ddr/fsl/ddr1_dimm_params.c b/drivers/ddr/fsl/ddr1_dimm_params.c
index 50fd998425..ef430ae135 100644
--- a/drivers/ddr/fsl/ddr1_dimm_params.c
+++ b/drivers/ddr/fsl/ddr1_dimm_params.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <fsl_ddr_sdram.h>
+#include <log.h>
 
 #include <fsl_ddr.h>
 
diff --git a/drivers/ddr/fsl/ddr2_dimm_params.c b/drivers/ddr/fsl/ddr2_dimm_params.c
index ad91ba63a8..442f72c270 100644
--- a/drivers/ddr/fsl/ddr2_dimm_params.c
+++ b/drivers/ddr/fsl/ddr2_dimm_params.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <fsl_ddr_sdram.h>
+#include <log.h>
 
 #include <fsl_ddr.h>
 /*
diff --git a/drivers/ddr/fsl/ddr3_dimm_params.c b/drivers/ddr/fsl/ddr3_dimm_params.c
index 47b4d7663f..8464438c54 100644
--- a/drivers/ddr/fsl/ddr3_dimm_params.c
+++ b/drivers/ddr/fsl/ddr3_dimm_params.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <fsl_ddr_sdram.h>
+#include <log.h>
 
 #include <fsl_ddr.h>
 
diff --git a/drivers/ddr/fsl/ddr4_dimm_params.c b/drivers/ddr/fsl/ddr4_dimm_params.c
index 2aa53d116f..3d5f27ef58 100644
--- a/drivers/ddr/fsl/ddr4_dimm_params.c
+++ b/drivers/ddr/fsl/ddr4_dimm_params.c
@@ -12,6 +12,7 @@
 
 #include <common.h>
 #include <fsl_ddr_sdram.h>
+#include <log.h>
 
 #include <fsl_ddr.h>
 
diff --git a/drivers/ddr/fsl/fsl_ddr_gen4.c b/drivers/ddr/fsl/fsl_ddr_gen4.c
index 17a4a8282b..2b8475fcd1 100644
--- a/drivers/ddr/fsl/fsl_ddr_gen4.c
+++ b/drivers/ddr/fsl/fsl_ddr_gen4.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <log.h>
 #include <asm/io.h>
 #include <fsl_ddr_sdram.h>
 #include <asm/processor.h>
diff --git a/drivers/ddr/fsl/interactive.c b/drivers/ddr/fsl/interactive.c
index 8c82d524a3..ea8bcbeb51 100644
--- a/drivers/ddr/fsl/interactive.c
+++ b/drivers/ddr/fsl/interactive.c
@@ -15,6 +15,7 @@
 #include <cli.h>
 #include <command.h>
 #include <env.h>
+#include <log.h>
 #include <linux/ctype.h>
 #include <asm/types.h>
 #include <asm/io.h>
diff --git a/drivers/ddr/fsl/lc_common_dimm_params.c b/drivers/ddr/fsl/lc_common_dimm_params.c
index df5bdb6e08..16ff6eeeb9 100644
--- a/drivers/ddr/fsl/lc_common_dimm_params.c
+++ b/drivers/ddr/fsl/lc_common_dimm_params.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <fsl_ddr_sdram.h>
+#include <log.h>
 
 #include <fsl_ddr.h>
 
diff --git a/drivers/ddr/fsl/main.c b/drivers/ddr/fsl/main.c
index 794ff55378..8533b28c25 100644
--- a/drivers/ddr/fsl/main.c
+++ b/drivers/ddr/fsl/main.c
@@ -15,6 +15,7 @@
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr.h>
 #include <init.h>
+#include <log.h>
 
 /*
  * CONFIG_SYS_FSL_DDR_SDRAM_BASE_PHY is the physical address from the view
diff --git a/drivers/ddr/fsl/mpc85xx_ddr_gen1.c b/drivers/ddr/fsl/mpc85xx_ddr_gen1.c
index 1ab15c98f1..4b39b17f72 100644
--- a/drivers/ddr/fsl/mpc85xx_ddr_gen1.c
+++ b/drivers/ddr/fsl/mpc85xx_ddr_gen1.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <fsl_ddr_sdram.h>
 
diff --git a/drivers/ddr/fsl/mpc85xx_ddr_gen3.c b/drivers/ddr/fsl/mpc85xx_ddr_gen3.c
index a9b085db8c..c6e983b5b4 100644
--- a/drivers/ddr/fsl/mpc85xx_ddr_gen3.c
+++ b/drivers/ddr/fsl/mpc85xx_ddr_gen3.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <fsl_ddr_sdram.h>
 #include <asm/processor.h>
diff --git a/drivers/ddr/fsl/mpc86xx_ddr.c b/drivers/ddr/fsl/mpc86xx_ddr.c
index 934b72b08c..737a879e93 100644
--- a/drivers/ddr/fsl/mpc86xx_ddr.c
+++ b/drivers/ddr/fsl/mpc86xx_ddr.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <fsl_ddr_sdram.h>
 
diff --git a/drivers/ddr/fsl/options.c b/drivers/ddr/fsl/options.c
index b9179315f2..c000a45f8e 100644
--- a/drivers/ddr/fsl/options.c
+++ b/drivers/ddr/fsl/options.c
@@ -8,6 +8,7 @@
 #include <env.h>
 #include <hwconfig.h>
 #include <fsl_ddr_sdram.h>
+#include <log.h>
 
 #include <fsl_ddr.h>
 #if defined(CONFIG_FSL_LSCH2) || defined(CONFIG_FSL_LSCH3) || \
diff --git a/drivers/ddr/fsl/util.c b/drivers/ddr/fsl/util.c
index b27079670d..7d6e08d3d1 100644
--- a/drivers/ddr/fsl/util.c
+++ b/drivers/ddr/fsl/util.c
@@ -11,6 +11,7 @@
 
 #include <fsl_ddr.h>
 #include <fsl_immap.h>
+#include <log.h>
 #include <asm/io.h>
 #if defined(CONFIG_FSL_LSCH2) || defined(CONFIG_FSL_LSCH3) || \
 	defined(CONFIG_ARM)
diff --git a/drivers/ddr/imx/imx8m/ddr_init.c b/drivers/ddr/imx/imx8m/ddr_init.c
index af8c1427d2..bbddee6ca8 100644
--- a/drivers/ddr/imx/imx8m/ddr_init.c
+++ b/drivers/ddr/imx/imx8m/ddr_init.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <errno.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/ddr.h>
 #include <asm/arch/clock.h>
diff --git a/drivers/ddr/imx/imx8m/ddrphy_train.c b/drivers/ddr/imx/imx8m/ddrphy_train.c
index 306af82504..f2a997b50a 100644
--- a/drivers/ddr/imx/imx8m/ddrphy_train.c
+++ b/drivers/ddr/imx/imx8m/ddrphy_train.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <linux/kernel.h>
 #include <asm/arch/ddr.h>
 #include <asm/arch/lpddr4_define.h>
diff --git a/drivers/ddr/imx/imx8m/ddrphy_utils.c b/drivers/ddr/imx/imx8m/ddrphy_utils.c
index 9ac7ca923c..d5eef53573 100644
--- a/drivers/ddr/imx/imx8m/ddrphy_utils.c
+++ b/drivers/ddr/imx/imx8m/ddrphy_utils.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <errno.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/ddr.h>
 #include <asm/arch/clock.h>
diff --git a/drivers/ddr/imx/imx8m/helper.c b/drivers/ddr/imx/imx8m/helper.c
index b3e63834ca..5ebf54f5f4 100644
--- a/drivers/ddr/imx/imx8m/helper.c
+++ b/drivers/ddr/imx/imx8m/helper.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <errno.h>
diff --git a/drivers/ddr/marvell/a38x/ddr3_debug.c b/drivers/ddr/marvell/a38x/ddr3_debug.c
index f5fc964d6f..22e0cc4d91 100644
--- a/drivers/ddr/marvell/a38x/ddr3_debug.c
+++ b/drivers/ddr/marvell/a38x/ddr3_debug.c
@@ -6,6 +6,7 @@
 #include "ddr3_init.h"
 #include "mv_ddr_training_db.h"
 #include "mv_ddr_regs.h"
+#include <log.h>
 
 u8 is_reg_dump = 0;
 u8 debug_pbs = DEBUG_LEVEL_ERROR;
diff --git a/drivers/ddr/marvell/a38x/ddr3_training.c b/drivers/ddr/marvell/a38x/ddr3_training.c
index 9718f18c30..8d7ac79b28 100644
--- a/drivers/ddr/marvell/a38x/ddr3_training.c
+++ b/drivers/ddr/marvell/a38x/ddr3_training.c
@@ -7,6 +7,7 @@
 #include "mv_ddr_common.h"
 #include "mv_ddr_training_db.h"
 #include "mv_ddr_regs.h"
+#include <log.h>
 
 #define GET_CS_FROM_MASK(mask)	(cs_mask2_num[mask])
 #define CS_CBE_VALUE(cs_num)	(cs_cbe_reg[cs_num])
diff --git a/drivers/ddr/marvell/axp/ddr3_dqs.c b/drivers/ddr/marvell/axp/ddr3_dqs.c
index 0a64dde884..0db94212b9 100644
--- a/drivers/ddr/marvell/axp/ddr3_dqs.c
+++ b/drivers/ddr/marvell/axp/ddr3_dqs.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <log.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
diff --git a/drivers/ddr/marvell/axp/ddr3_hw_training.c b/drivers/ddr/marvell/axp/ddr3_hw_training.c
index cc3a77c850..9dc911c335 100644
--- a/drivers/ddr/marvell/axp/ddr3_hw_training.c
+++ b/drivers/ddr/marvell/axp/ddr3_hw_training.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <log.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
diff --git a/drivers/ddr/marvell/axp/ddr3_init.c b/drivers/ddr/marvell/axp/ddr3_init.c
index 30ad5d4151..8e6d44708f 100644
--- a/drivers/ddr/marvell/axp/ddr3_init.c
+++ b/drivers/ddr/marvell/axp/ddr3_init.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <log.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
diff --git a/drivers/ddr/marvell/axp/ddr3_read_leveling.c b/drivers/ddr/marvell/axp/ddr3_read_leveling.c
index bf8d67616a..30a5c35488 100644
--- a/drivers/ddr/marvell/axp/ddr3_read_leveling.c
+++ b/drivers/ddr/marvell/axp/ddr3_read_leveling.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <log.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
diff --git a/drivers/ddr/marvell/axp/ddr3_write_leveling.c b/drivers/ddr/marvell/axp/ddr3_write_leveling.c
index cd364edabb..20614894e1 100644
--- a/drivers/ddr/marvell/axp/ddr3_write_leveling.c
+++ b/drivers/ddr/marvell/axp/ddr3_write_leveling.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <log.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
diff --git a/drivers/ddr/marvell/axp/xor.c b/drivers/ddr/marvell/axp/xor.c
index 31e6582655..17bfe6a7bf 100644
--- a/drivers/ddr/marvell/axp/xor.c
+++ b/drivers/ddr/marvell/axp/xor.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <log.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
diff --git a/drivers/demo/demo-shape.c b/drivers/demo/demo-shape.c
index 98b644680c..8686c99845 100644
--- a/drivers/demo/demo-shape.c
+++ b/drivers/demo/demo-shape.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <malloc.h>
 #include <dm-demo.h>
 #include <asm/io.h>
diff --git a/drivers/demo/demo-uclass.c b/drivers/demo/demo-uclass.c
index 3b8439b836..6c36f03254 100644
--- a/drivers/demo/demo-uclass.c
+++ b/drivers/demo/demo-uclass.c
@@ -11,6 +11,7 @@
 #include <dm-demo.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/io.h>
 #include <linux/list.h>
diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c
index df50196dfd..a298c2c439 100644
--- a/drivers/dfu/dfu.c
+++ b/drivers/dfu/dfu.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <env.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <mmc.h>
 #include <fat.h>
diff --git a/drivers/dfu/dfu_mmc.c b/drivers/dfu/dfu_mmc.c
index 8cd466f02e..691d01c7eb 100644
--- a/drivers/dfu/dfu_mmc.c
+++ b/drivers/dfu/dfu_mmc.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 #include <errno.h>
 #include <div64.h>
diff --git a/drivers/dfu/dfu_nand.c b/drivers/dfu/dfu_nand.c
index 58b94348c9..b8d24d203b 100644
--- a/drivers/dfu/dfu_nand.c
+++ b/drivers/dfu/dfu_nand.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 #include <errno.h>
 #include <div64.h>
diff --git a/drivers/dfu/dfu_tftp.c b/drivers/dfu/dfu_tftp.c
index e5b35bfd5f..ffae4bb54f 100644
--- a/drivers/dfu/dfu_tftp.c
+++ b/drivers/dfu/dfu_tftp.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 #include <errno.h>
 #include <dfu.h>
diff --git a/drivers/dfu/dfu_virt.c b/drivers/dfu/dfu_virt.c
index ea8c71f100..62605bcde5 100644
--- a/drivers/dfu/dfu_virt.c
+++ b/drivers/dfu/dfu_virt.c
@@ -5,6 +5,7 @@
 #include <common.h>
 #include <dfu.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 
 int __weak dfu_write_medium_virt(struct dfu_entity *dfu, u64 offset,
diff --git a/drivers/dma/bcm6348-iudma.c b/drivers/dma/bcm6348-iudma.c
index 70bdb65071..cce0c611a8 100644
--- a/drivers/dma/bcm6348-iudma.c
+++ b/drivers/dma/bcm6348-iudma.c
@@ -20,6 +20,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <dma-uclass.h>
+#include <log.h>
 #include <malloc.h>
 #include <memalign.h>
 #include <net.h>
diff --git a/drivers/dma/dma-uclass.c b/drivers/dma/dma-uclass.c
index d2b0b63ecd..8cbb364042 100644
--- a/drivers/dma/dma-uclass.c
+++ b/drivers/dma/dma-uclass.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/cache.h>
 #include <dm/read.h>
diff --git a/drivers/dma/sandbox-dma-test.c b/drivers/dma/sandbox-dma-test.c
index 234a7d2134..838596b24b 100644
--- a/drivers/dma/sandbox-dma-test.c
+++ b/drivers/dma/sandbox-dma-test.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <dm/read.h>
 #include <dma-uclass.h>
diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
index 5b11f240fe..299e707adc 100644
--- a/drivers/dma/ti/k3-udma.c
+++ b/drivers/dma/ti/k3-udma.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/bitops.h>
diff --git a/drivers/fastboot/fb_mmc.c b/drivers/fastboot/fb_mmc.c
index 94fab4e5e0..b2f8932e1c 100644
--- a/drivers/fastboot/fb_mmc.c
+++ b/drivers/fastboot/fb_mmc.c
@@ -13,6 +13,7 @@
 #include <flash.h>
 #include <image-sparse.h>
 #include <image.h>
+#include <log.h>
 #include <part.h>
 #include <mmc.h>
 #include <div64.h>
diff --git a/drivers/firmware/firmware-zynqmp.c b/drivers/firmware/firmware-zynqmp.c
index 47746458a0..41089712b0 100644
--- a/drivers/firmware/firmware-zynqmp.c
+++ b/drivers/firmware/firmware-zynqmp.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <zynqmp_firmware.h>
 #include <asm/cache.h>
 
diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c
index 572abfa536..1dc179ad4d 100644
--- a/drivers/firmware/psci.c
+++ b/drivers/firmware/psci.c
@@ -10,6 +10,7 @@
 #include <command.h>
 #include <dm.h>
 #include <irq_func.h>
+#include <log.h>
 #include <dm/lists.h>
 #include <efi_loader.h>
 #include <linux/libfdt.h>
diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
index c3f95b252f..de9a2eaff5 100644
--- a/drivers/firmware/ti_sci.c
+++ b/drivers/firmware/ti_sci.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <mailbox.h>
 #include <malloc.h>
 #include <dm/device.h>
diff --git a/drivers/fpga/altera.c b/drivers/fpga/altera.c
index 7c8f518509..bb27b3778f 100644
--- a/drivers/fpga/altera.c
+++ b/drivers/fpga/altera.c
@@ -13,6 +13,7 @@
 #include <common.h>
 #include <errno.h>
 #include <ACEX1K.h>
+#include <log.h>
 #include <stratixII.h>
 
 /* Define FPGA_DEBUG to 1 to get debug printf's */
diff --git a/drivers/fpga/fpga.c b/drivers/fpga/fpga.c
index f7e5556805..fe3dfa1233 100644
--- a/drivers/fpga/fpga.c
+++ b/drivers/fpga/fpga.c
@@ -7,6 +7,7 @@
 /* Generic FPGA support */
 #include <common.h>             /* core U-Boot definitions */
 #include <init.h>
+#include <log.h>
 #include <xilinx.h>             /* xilinx specific definitions */
 #include <altera.h>             /* altera specific definitions */
 #include <lattice.h>
diff --git a/drivers/fpga/ivm_core.c b/drivers/fpga/ivm_core.c
index 6c6e5c385a..adc60919f3 100644
--- a/drivers/fpga/ivm_core.c
+++ b/drivers/fpga/ivm_core.c
@@ -30,6 +30,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <linux/string.h>
 #include <malloc.h>
 #include <lattice.h>
diff --git a/drivers/fpga/lattice.c b/drivers/fpga/lattice.c
index 30bec7feef..2cf4a602d7 100644
--- a/drivers/fpga/lattice.c
+++ b/drivers/fpga/lattice.c
@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 #include <fpga.h>
 #include <lattice.h>
diff --git a/drivers/fpga/socfpga_arria10.c b/drivers/fpga/socfpga_arria10.c
index 6a3ad6a969..272f6d5e5f 100644
--- a/drivers/fpga/socfpga_arria10.c
+++ b/drivers/fpga/socfpga_arria10.c
@@ -3,6 +3,7 @@
  * Copyright (C) 2017-2019 Intel Corporation <www.intel.com>
  */
 #include <image.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/fpga_manager.h>
 #include <asm/arch/reset_manager.h>
diff --git a/drivers/fpga/stratix10.c b/drivers/fpga/stratix10.c
index d8e32508d4..802051069e 100644
--- a/drivers/fpga/stratix10.c
+++ b/drivers/fpga/stratix10.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <altera.h>
+#include <log.h>
 #include <asm/arch/mailbox_s10.h>
 
 #define RECONFIG_STATUS_POLL_RESP_TIMEOUT_MS		60000
diff --git a/drivers/fpga/stratixv.c b/drivers/fpga/stratixv.c
index 236a730804..650b1b136e 100644
--- a/drivers/fpga/stratixv.c
+++ b/drivers/fpga/stratixv.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <altera.h>
+#include <log.h>
 #include <spi.h>
 #include <asm/io.h>
 #include <linux/errno.h>
diff --git a/drivers/fpga/versalpl.c b/drivers/fpga/versalpl.c
index 8ab19e0c74..b96519e1a4 100644
--- a/drivers/fpga/versalpl.c
+++ b/drivers/fpga/versalpl.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <asm/arch/sys_proto.h>
 #include <memalign.h>
 #include <versalpl.h>
diff --git a/drivers/fpga/xilinx.c b/drivers/fpga/xilinx.c
index 4b0334b6be..cbebefb55f 100644
--- a/drivers/fpga/xilinx.c
+++ b/drivers/fpga/xilinx.c
@@ -13,6 +13,7 @@
 
 #include <common.h>
 #include <fpga.h>
+#include <log.h>
 #include <virtex2.h>
 #include <spartan2.h>
 #include <spartan3.h>
diff --git a/drivers/fpga/zynqmppl.c b/drivers/fpga/zynqmppl.c
index a2a5f9cbbe..b995bcc008 100644
--- a/drivers/fpga/zynqmppl.c
+++ b/drivers/fpga/zynqmppl.c
@@ -8,6 +8,7 @@
 #include <console.h>
 #include <common.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <zynqmppl.h>
 #include <zynqmp_firmware.h>
 #include <asm/cache.h>
diff --git a/drivers/fpga/zynqpl.c b/drivers/fpga/zynqpl.c
index 6370cafb23..e9bf3a6180 100644
--- a/drivers/fpga/zynqpl.c
+++ b/drivers/fpga/zynqpl.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <console.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <asm/cache.h>
 #include <asm/io.h>
 #include <fs.h>
diff --git a/drivers/gpio/cortina_gpio.c b/drivers/gpio/cortina_gpio.c
index e2374ce1e7..c6266b88cb 100644
--- a/drivers/gpio/cortina_gpio.c
+++ b/drivers/gpio/cortina_gpio.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <linux/compat.h>
diff --git a/drivers/gpio/dwapb_gpio.c b/drivers/gpio/dwapb_gpio.c
index e3439eebb5..7b50a34b3f 100644
--- a/drivers/gpio/dwapb_gpio.c
+++ b/drivers/gpio/dwapb_gpio.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/arch/gpio.h>
 #include <asm/gpio.h>
diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c
index 757ab7106e..aaaeb5940b 100644
--- a/drivers/gpio/gpio-uclass.c
+++ b/drivers/gpio/gpio-uclass.c
@@ -5,7 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
-#include <dm/device_compat.h>
+#include <log.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
 #include <dm/uclass-internal.h>
@@ -14,6 +14,7 @@
 #include <fdtdec.h>
 #include <malloc.h>
 #include <asm/gpio.h>
+#include <dm/device_compat.h>
 #include <linux/bug.h>
 #include <linux/ctype.h>
 
diff --git a/drivers/gpio/hsdk-creg-gpio.c b/drivers/gpio/hsdk-creg-gpio.c
index 800027f18e..8eeb3849c2 100644
--- a/drivers/gpio/hsdk-creg-gpio.c
+++ b/drivers/gpio/hsdk-creg-gpio.c
@@ -9,6 +9,7 @@
  * warranty of any kind, whether express or implied.
  */
 
+#include <log.h>
 #include <asm-generic/gpio.h>
 #include <asm/io.h>
 #include <common.h>
diff --git a/drivers/gpio/intel_broadwell_gpio.c b/drivers/gpio/intel_broadwell_gpio.c
index 37299ecd0d..95f8b2ba6c 100644
--- a/drivers/gpio/intel_broadwell_gpio.c
+++ b/drivers/gpio/intel_broadwell_gpio.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <pch.h>
 #include <pci.h>
 #include <syscon.h>
diff --git a/drivers/gpio/intel_gpio.c b/drivers/gpio/intel_gpio.c
index 67b8b80b9d..711fea1b58 100644
--- a/drivers/gpio/intel_gpio.c
+++ b/drivers/gpio/intel_gpio.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <p2sb.h>
 #include <pch.h>
 #include <pci.h>
diff --git a/drivers/gpio/intel_ich6_gpio.c b/drivers/gpio/intel_ich6_gpio.c
index ad08b3aa79..73d98fde55 100644
--- a/drivers/gpio/intel_ich6_gpio.c
+++ b/drivers/gpio/intel_ich6_gpio.c
@@ -30,6 +30,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <pch.h>
 #include <pci.h>
 #include <asm/cpu.h>
diff --git a/drivers/gpio/mscc_sgpio.c b/drivers/gpio/mscc_sgpio.c
index c65ca81728..1bbd212b4f 100644
--- a/drivers/gpio/mscc_sgpio.c
+++ b/drivers/gpio/mscc_sgpio.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <errno.h>
diff --git a/drivers/gpio/mxs_gpio.c b/drivers/gpio/mxs_gpio.c
index 405e9ac135..3094f1c804 100644
--- a/drivers/gpio/mxs_gpio.c
+++ b/drivers/gpio/mxs_gpio.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 #include <linux/errno.h>
 #include <asm/io.h>
diff --git a/drivers/gpio/pcf8575_gpio.c b/drivers/gpio/pcf8575_gpio.c
index e93f640488..7c790bb64a 100644
--- a/drivers/gpio/pcf8575_gpio.c
+++ b/drivers/gpio/pcf8575_gpio.c
@@ -26,6 +26,7 @@
 #include <common.h>
 #include <dm.h>
 #include <i2c.h>
+#include <log.h>
 #include <asm-generic/gpio.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/gpio/pm8916_gpio.c b/drivers/gpio/pm8916_gpio.c
index 74a773c099..51df5367ea 100644
--- a/drivers/gpio/pm8916_gpio.c
+++ b/drivers/gpio/pm8916_gpio.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <power/pmic.h>
 #include <spmi/spmi.h>
 #include <asm/io.h>
diff --git a/drivers/gpio/s5p_gpio.c b/drivers/gpio/s5p_gpio.c
index e4b5383d0f..258f13395d 100644
--- a/drivers/gpio/s5p_gpio.c
+++ b/drivers/gpio/s5p_gpio.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
diff --git a/drivers/gpio/sandbox.c b/drivers/gpio/sandbox.c
index 9549c74c2b..98b7fa4bb3 100644
--- a/drivers/gpio/sandbox.c
+++ b/drivers/gpio/sandbox.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/gpio.h>
 #include <dm/device_compat.h>
diff --git a/drivers/gpio/sh_pfc.c b/drivers/gpio/sh_pfc.c
index 6320a6280d..0b412c2e0c 100644
--- a/drivers/gpio/sh_pfc.c
+++ b/drivers/gpio/sh_pfc.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/bitops.h>
 #include <asm/io.h>
diff --git a/drivers/gpio/stm32_gpio.c b/drivers/gpio/stm32_gpio.c
index f55f834e7d..240adc488a 100644
--- a/drivers/gpio/stm32_gpio.c
+++ b/drivers/gpio/stm32_gpio.c
@@ -8,6 +8,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/stm32.h>
 #include <asm/gpio.h>
diff --git a/drivers/gpio/tegra_gpio.c b/drivers/gpio/tegra_gpio.c
index a730f5c4fe..912577a571 100644
--- a/drivers/gpio/tegra_gpio.c
+++ b/drivers/gpio/tegra_gpio.c
@@ -12,6 +12,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <errno.h>
 #include <fdtdec.h>
diff --git a/drivers/gpio/xilinx_gpio.c b/drivers/gpio/xilinx_gpio.c
index 2389abee37..014f120d60 100644
--- a/drivers/gpio/xilinx_gpio.c
+++ b/drivers/gpio/xilinx_gpio.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <linux/list.h>
 #include <asm/io.h>
diff --git a/drivers/hwspinlock/hwspinlock-uclass.c b/drivers/hwspinlock/hwspinlock-uclass.c
index 61d226bcbb..9da79455ed 100644
--- a/drivers/hwspinlock/hwspinlock-uclass.c
+++ b/drivers/hwspinlock/hwspinlock-uclass.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <hwspinlock.h>
+#include <log.h>
 #include <dm/device-internal.h>
 #include <dm/device_compat.h>
 #include <linux/compat.h>
diff --git a/drivers/i2c/ast_i2c.c b/drivers/i2c/ast_i2c.c
index c84d75ac92..9e6dc02b61 100644
--- a/drivers/i2c/ast_i2c.c
+++ b/drivers/i2c/ast_i2c.c
@@ -11,6 +11,7 @@
 #include <errno.h>
 #include <fdtdec.h>
 #include <i2c.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/scu_ast2500.h>
 #include <linux/err.h>
diff --git a/drivers/i2c/cros_ec_ldo.c b/drivers/i2c/cros_ec_ldo.c
index 501e602b27..c593540ac1 100644
--- a/drivers/i2c/cros_ec_ldo.c
+++ b/drivers/i2c/cros_ec_ldo.c
@@ -9,6 +9,7 @@
 #include <cros_ec.h>
 #include <errno.h>
 #include <i2c.h>
+#include <log.h>
 #include <power/tps65090.h>
 
 static int cros_ec_ldo_set_bus_speed(struct udevice *dev, unsigned int speed)
diff --git a/drivers/i2c/davinci_i2c.c b/drivers/i2c/davinci_i2c.c
index edc40f706c..f41ea01b10 100644
--- a/drivers/i2c/davinci_i2c.c
+++ b/drivers/i2c/davinci_i2c.c
@@ -14,6 +14,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <dm.h>
+#include <log.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/i2c_defs.h>
 #include <asm/io.h>
diff --git a/drivers/i2c/designware_i2c.c b/drivers/i2c/designware_i2c.c
index 088a6f3efb..4c4b5e17ca 100644
--- a/drivers/i2c/designware_i2c.c
+++ b/drivers/i2c/designware_i2c.c
@@ -8,6 +8,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <i2c.h>
+#include <log.h>
 #include <malloc.h>
 #include <pci.h>
 #include <reset.h>
diff --git a/drivers/i2c/designware_i2c_pci.c b/drivers/i2c/designware_i2c_pci.c
index 50f03e3d90..bd34ec0b47 100644
--- a/drivers/i2c/designware_i2c_pci.c
+++ b/drivers/i2c/designware_i2c_pci.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <spl.h>
 #include <asm/lpss.h>
 #include "designware_i2c.h"
diff --git a/drivers/i2c/exynos_hs_i2c.c b/drivers/i2c/exynos_hs_i2c.c
index 9f201c66d0..59fc9a3c09 100644
--- a/drivers/i2c/exynos_hs_i2c.c
+++ b/drivers/i2c/exynos_hs_i2c.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <dm.h>
 #include <i2c.h>
+#include <log.h>
 #include <asm/arch/clk.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/pinmux.h>
diff --git a/drivers/i2c/fsl_i2c.c b/drivers/i2c/fsl_i2c.c
index 097c54388f..7e3c75b610 100644
--- a/drivers/i2c/fsl_i2c.c
+++ b/drivers/i2c/fsl_i2c.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <command.h>
 #include <i2c.h>		/* Functional interface */
+#include <log.h>
 #include <time.h>
 #include <asm/io.h>
 #include <asm/fsl_i2c.h>	/* HW definitions */
diff --git a/drivers/i2c/i2c-cdns.c b/drivers/i2c/i2c-cdns.c
index ac15da2c67..642df972e5 100644
--- a/drivers/i2c/i2c-cdns.c
+++ b/drivers/i2c/i2c-cdns.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <linux/types.h>
 #include <linux/io.h>
 #include <linux/errno.h>
diff --git a/drivers/i2c/i2c-emul-uclass.c b/drivers/i2c/i2c-emul-uclass.c
index ae5aae03e7..1b70e14054 100644
--- a/drivers/i2c/i2c-emul-uclass.c
+++ b/drivers/i2c/i2c-emul-uclass.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <i2c.h>
+#include <log.h>
 #include <dm/device-internal.h>
 #include <dm/uclass-internal.h>
 
diff --git a/drivers/i2c/i2c-gpio.c b/drivers/i2c/i2c-gpio.c
index 07fdd343f2..900017ad04 100644
--- a/drivers/i2c/i2c-gpio.c
+++ b/drivers/i2c/i2c-gpio.c
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <dm.h>
 #include <i2c.h>
+#include <log.h>
 #include <asm/gpio.h>
 
 #define DEFAULT_UDELAY	5
diff --git a/drivers/i2c/i2c-uclass.c b/drivers/i2c/i2c-uclass.c
index e9ec388576..32aed921b7 100644
--- a/drivers/i2c/i2c-uclass.c
+++ b/drivers/i2c/i2c-uclass.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <i2c.h>
+#include <log.h>
 #include <malloc.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
diff --git a/drivers/i2c/i2c_core.c b/drivers/i2c/i2c_core.c
index 234277a299..da50d86cc8 100644
--- a/drivers/i2c/i2c_core.c
+++ b/drivers/i2c/i2c_core.c
@@ -9,6 +9,7 @@
  */
 #include <common.h>
 #include <i2c.h>
+#include <linker_lists.h>
 
 struct i2c_adapter *i2c_get_adapter(int index)
 {
diff --git a/drivers/i2c/ihs_i2c.c b/drivers/i2c/ihs_i2c.c
index f7b59d36f9..674561b4ad 100644
--- a/drivers/i2c/ihs_i2c.c
+++ b/drivers/i2c/ihs_i2c.c
@@ -12,6 +12,7 @@
 #else
 #include <gdsys_fpga.h>
 #endif
+#include <log.h>
 #include <asm/unaligned.h>
 
 #ifdef CONFIG_DM_I2C
diff --git a/drivers/i2c/imx_lpi2c.c b/drivers/i2c/imx_lpi2c.c
index 62e68046d6..c8e42e05f5 100644
--- a/drivers/i2c/imx_lpi2c.c
+++ b/drivers/i2c/imx_lpi2c.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <errno.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
diff --git a/drivers/i2c/intel_i2c.c b/drivers/i2c/intel_i2c.c
index f5509fef16..3b79cb40cd 100644
--- a/drivers/i2c/intel_i2c.c
+++ b/drivers/i2c/intel_i2c.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <dm.h>
 #include <i2c.h>
+#include <log.h>
 #include <pci.h>
 #include <asm/io.h>
 
diff --git a/drivers/i2c/kona_i2c.c b/drivers/i2c/kona_i2c.c
index 8e31481c0f..61c4045959 100644
--- a/drivers/i2c/kona_i2c.c
+++ b/drivers/i2c/kona_i2c.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <asm/arch/sysmap.h>
diff --git a/drivers/i2c/lpc32xx_i2c.c b/drivers/i2c/lpc32xx_i2c.c
index a95b5cc902..6af2e975cf 100644
--- a/drivers/i2c/lpc32xx_i2c.c
+++ b/drivers/i2c/lpc32xx_i2c.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <i2c.h>
 #include <linux/errno.h>
diff --git a/drivers/i2c/meson_i2c.c b/drivers/i2c/meson_i2c.c
index bcf45160d8..2eb1eba642 100644
--- a/drivers/i2c/meson_i2c.c
+++ b/drivers/i2c/meson_i2c.c
@@ -3,6 +3,7 @@
  * (C) Copyright 2017 - Beniamino Galvani <b.galvani@gmail.com>
  */
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <clk.h>
 #include <dm.h>
diff --git a/drivers/i2c/muxes/i2c-arb-gpio-challenge.c b/drivers/i2c/muxes/i2c-arb-gpio-challenge.c
index 5029c71adc..07600c5022 100644
--- a/drivers/i2c/muxes/i2c-arb-gpio-challenge.c
+++ b/drivers/i2c/muxes/i2c-arb-gpio-challenge.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <i2c.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/gpio.h>
 
diff --git a/drivers/i2c/muxes/i2c-mux-uclass.c b/drivers/i2c/muxes/i2c-mux-uclass.c
index 9a3dd7ec4a..26897554b0 100644
--- a/drivers/i2c/muxes/i2c-mux-uclass.c
+++ b/drivers/i2c/muxes/i2c-mux-uclass.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <i2c.h>
+#include <log.h>
 #include <malloc.h>
 #include <dm/lists.h>
 #include <dm/root.h>
diff --git a/drivers/i2c/muxes/pca954x.c b/drivers/i2c/muxes/pca954x.c
index cc8afc93b5..7360e162ee 100644
--- a/drivers/i2c/muxes/pca954x.c
+++ b/drivers/i2c/muxes/pca954x.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <i2c.h>
+#include <log.h>
 #include <malloc.h>
 
 #include <asm-generic/gpio.h>
diff --git a/drivers/i2c/mv_i2c.c b/drivers/i2c/mv_i2c.c
index 63665f0952..88b62959d3 100644
--- a/drivers/i2c/mv_i2c.c
+++ b/drivers/i2c/mv_i2c.c
@@ -19,6 +19,7 @@
 #include <common.h>
 #include <dm.h>
 #include <i2c.h>
+#include <log.h>
 #include <asm/io.h>
 #include "mv_i2c.h"
 
diff --git a/drivers/i2c/mvtwsi.c b/drivers/i2c/mvtwsi.c
index 382cf4b304..3b654ef661 100644
--- a/drivers/i2c/mvtwsi.c
+++ b/drivers/i2c/mvtwsi.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <log.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c
index a03c465c8f..bd2f568348 100644
--- a/drivers/i2c/mxc_i2c.c
+++ b/drivers/i2c/mxc_i2c.c
@@ -14,6 +14,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <dm/device_compat.h>
diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c
index 6e7d24d727..d5be824de8 100644
--- a/drivers/i2c/omap24xx_i2c.c
+++ b/drivers/i2c/omap24xx_i2c.c
@@ -41,6 +41,7 @@
 #include <common.h>
 #include <dm.h>
 #include <i2c.h>
+#include <log.h>
 
 #include <asm/io.h>
 #include <asm/omap_i2c.h>
diff --git a/drivers/i2c/rk_i2c.c b/drivers/i2c/rk_i2c.c
index 32b2ee8578..703d9a1c7a 100644
--- a/drivers/i2c/rk_i2c.c
+++ b/drivers/i2c/rk_i2c.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <i2c.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/clock.h>
 #include <asm/arch-rockchip/i2c.h>
diff --git a/drivers/i2c/s3c24x0_i2c.c b/drivers/i2c/s3c24x0_i2c.c
index 68bf93b324..5907217981 100644
--- a/drivers/i2c/s3c24x0_i2c.c
+++ b/drivers/i2c/s3c24x0_i2c.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #if (defined CONFIG_EXYNOS4 || defined CONFIG_EXYNOS5)
+#include <log.h>
 #include <asm/arch/clk.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/pinmux.h>
diff --git a/drivers/i2c/sandbox_i2c.c b/drivers/i2c/sandbox_i2c.c
index 1a4521d5b8..f4ae2397a0 100644
--- a/drivers/i2c/sandbox_i2c.c
+++ b/drivers/i2c/sandbox_i2c.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <i2c.h>
+#include <log.h>
 #include <asm/test.h>
 #include <dm/lists.h>
 #include <dm/device-internal.h>
diff --git a/drivers/i2c/sh_i2c.c b/drivers/i2c/sh_i2c.c
index 834f1f2179..5cc5095666 100644
--- a/drivers/i2c/sh_i2c.c
+++ b/drivers/i2c/sh_i2c.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <log.h>
 #include <asm/io.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/i2c/stm32f7_i2c.c b/drivers/i2c/stm32f7_i2c.c
index fc5c1221e1..4adac498d0 100644
--- a/drivers/i2c/stm32f7_i2c.c
+++ b/drivers/i2c/stm32f7_i2c.c
@@ -7,6 +7,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <i2c.h>
+#include <log.h>
 #include <reset.h>
 
 #include <dm/device.h>
diff --git a/drivers/i2c/tegra186_bpmp_i2c.c b/drivers/i2c/tegra186_bpmp_i2c.c
index 793f3f59b5..ac41a7f0f8 100644
--- a/drivers/i2c/tegra186_bpmp_i2c.c
+++ b/drivers/i2c/tegra186_bpmp_i2c.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <i2c.h>
+#include <log.h>
 #include <misc.h>
 #include <asm/arch-tegra/bpmp_abi.h>
 
diff --git a/drivers/i2c/tegra_i2c.c b/drivers/i2c/tegra_i2c.c
index 66a0148254..09c0be9dcd 100644
--- a/drivers/i2c/tegra_i2c.c
+++ b/drivers/i2c/tegra_i2c.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <i2c.h>
+#include <log.h>
 #include <asm/io.h>
 #include <clk.h>
 #include <reset.h>
diff --git a/drivers/input/cros_ec_keyb.c b/drivers/input/cros_ec_keyb.c
index 8c1a25c73f..6f12ec8b0a 100644
--- a/drivers/input/cros_ec_keyb.c
+++ b/drivers/input/cros_ec_keyb.c
@@ -12,6 +12,7 @@
 #include <input.h>
 #include <keyboard.h>
 #include <key_matrix.h>
+#include <log.h>
 #include <stdio_dev.h>
 
 enum {
diff --git a/drivers/input/i8042.c b/drivers/input/i8042.c
index 98015899f2..cfd8dc6415 100644
--- a/drivers/input/i8042.c
+++ b/drivers/input/i8042.c
@@ -13,6 +13,7 @@
 #include <i8042.h>
 #include <input.h>
 #include <keyboard.h>
+#include <log.h>
 #include <asm/io.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/input/input.c b/drivers/input/input.c
index 6ab378b979..da264f4166 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <env.h>
 #include <errno.h>
+#include <log.h>
 #include <stdio_dev.h>
 #include <input.h>
 #ifdef CONFIG_DM_KEYBOARD
diff --git a/drivers/input/key_matrix.c b/drivers/input/key_matrix.c
index 8951e128ec..4631728b8b 100644
--- a/drivers/input/key_matrix.c
+++ b/drivers/input/key_matrix.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <dm.h>
 #include <key_matrix.h>
+#include <log.h>
 #include <malloc.h>
 #include <linux/input.h>
 
diff --git a/drivers/input/keyboard-uclass.c b/drivers/input/keyboard-uclass.c
index db1a515036..f19934e6bb 100644
--- a/drivers/input/keyboard-uclass.c
+++ b/drivers/input/keyboard-uclass.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <keyboard.h>
+#include <log.h>
 
 static int keyboard_start(struct stdio_dev *sdev)
 {
diff --git a/drivers/input/tegra-kbc.c b/drivers/input/tegra-kbc.c
index 70429b94a4..40ebb2497b 100644
--- a/drivers/input/tegra-kbc.c
+++ b/drivers/input/tegra-kbc.c
@@ -10,6 +10,7 @@
 #include <input.h>
 #include <keyboard.h>
 #include <key_matrix.h>
+#include <log.h>
 #include <stdio_dev.h>
 #include <tegra-kbc.h>
 #include <asm/io.h>
diff --git a/drivers/led/led_bcm6328.c b/drivers/led/led_bcm6328.c
index 7be4badbac..52946835de 100644
--- a/drivers/led/led_bcm6328.c
+++ b/drivers/led/led_bcm6328.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <led.h>
+#include <log.h>
 #include <asm/io.h>
 #include <dm/lists.h>
 
diff --git a/drivers/led/led_bcm6358.c b/drivers/led/led_bcm6358.c
index 01b86b756e..56c3d146a5 100644
--- a/drivers/led/led_bcm6358.c
+++ b/drivers/led/led_bcm6358.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <led.h>
+#include <log.h>
 #include <asm/io.h>
 #include <dm/lists.h>
 
diff --git a/drivers/led/led_bcm6858.c b/drivers/led/led_bcm6858.c
index 27a76fcaf0..2be4279c08 100644
--- a/drivers/led/led_bcm6858.c
+++ b/drivers/led/led_bcm6858.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <led.h>
+#include <log.h>
 #include <asm/io.h>
 #include <dm/lists.h>
 
diff --git a/drivers/led/led_gpio.c b/drivers/led/led_gpio.c
index af6b8245c9..ef9b61ee62 100644
--- a/drivers/led/led_gpio.c
+++ b/drivers/led/led_gpio.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <led.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/gpio.h>
 #include <dm/lists.h>
diff --git a/drivers/mailbox/k3-sec-proxy.c b/drivers/mailbox/k3-sec-proxy.c
index a560209f03..3f9afaed32 100644
--- a/drivers/mailbox/k3-sec-proxy.c
+++ b/drivers/mailbox/k3-sec-proxy.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
diff --git a/drivers/mailbox/mailbox-uclass.c b/drivers/mailbox/mailbox-uclass.c
index 291f5c218e..c972d84608 100644
--- a/drivers/mailbox/mailbox-uclass.c
+++ b/drivers/mailbox/mailbox-uclass.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <mailbox.h>
 #include <mailbox-uclass.h>
 #include <malloc.h>
diff --git a/drivers/mailbox/sandbox-mbox.c b/drivers/mailbox/sandbox-mbox.c
index 25e23eb05b..19704dd5da 100644
--- a/drivers/mailbox/sandbox-mbox.c
+++ b/drivers/mailbox/sandbox-mbox.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <mailbox-uclass.h>
 #include <malloc.h>
 #include <asm/io.h>
diff --git a/drivers/mailbox/stm32-ipcc.c b/drivers/mailbox/stm32-ipcc.c
index 13e642ab70..0778eb5225 100644
--- a/drivers/mailbox/stm32-ipcc.c
+++ b/drivers/mailbox/stm32-ipcc.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <clk.h>
 #include <dm.h>
+#include <log.h>
 #include <mailbox-uclass.h>
 #include <malloc.h>
 #include <asm/io.h>
diff --git a/drivers/mailbox/tegra-hsp.c b/drivers/mailbox/tegra-hsp.c
index 60f6a38321..1d2c979847 100644
--- a/drivers/mailbox/tegra-hsp.c
+++ b/drivers/mailbox/tegra-hsp.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/io.h>
 #include <dm.h>
diff --git a/drivers/mailbox/zynqmp-ipi.c b/drivers/mailbox/zynqmp-ipi.c
index 17b46545f5..f206a27a79 100644
--- a/drivers/mailbox/zynqmp-ipi.c
+++ b/drivers/mailbox/zynqmp-ipi.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <dm.h>
 #include <mailbox-uclass.h>
diff --git a/drivers/misc/atsha204a-i2c.c b/drivers/misc/atsha204a-i2c.c
index 116c0661e7..8e0b41e346 100644
--- a/drivers/misc/atsha204a-i2c.c
+++ b/drivers/misc/atsha204a-i2c.c
@@ -15,6 +15,7 @@
 #include <i2c.h>
 #include <errno.h>
 #include <atsha204a-i2c.h>
+#include <log.h>
 #include <u-boot/crc.h>
 
 #define ATSHA204A_TWLO			60
diff --git a/drivers/misc/cros_ec.c b/drivers/misc/cros_ec.c
index c145b67931..818ad56a0d 100644
--- a/drivers/misc/cros_ec.c
+++ b/drivers/misc/cros_ec.c
@@ -22,6 +22,7 @@
 #include <i2c.h>
 #include <cros_ec.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <malloc.h>
 #include <spi.h>
 #include <linux/errno.h>
diff --git a/drivers/misc/cros_ec_i2c.c b/drivers/misc/cros_ec_i2c.c
index cdd55f5aa8..c00f5f764a 100644
--- a/drivers/misc/cros_ec_i2c.c
+++ b/drivers/misc/cros_ec_i2c.c
@@ -16,6 +16,7 @@
 #include <dm.h>
 #include <i2c.h>
 #include <cros_ec.h>
+#include <log.h>
 
 #ifdef DEBUG_TRACE
 #define debug_trace(fmt, b...)	debug(fmt, #b)
diff --git a/drivers/misc/cros_ec_lpc.c b/drivers/misc/cros_ec_lpc.c
index 71d03bfba2..4ad6c8ca66 100644
--- a/drivers/misc/cros_ec_lpc.c
+++ b/drivers/misc/cros_ec_lpc.c
@@ -16,6 +16,7 @@
 #include <dm.h>
 #include <command.h>
 #include <cros_ec.h>
+#include <log.h>
 #include <asm/io.h>
 
 #ifdef DEBUG_TRACE
diff --git a/drivers/misc/cros_ec_sandbox.c b/drivers/misc/cros_ec_sandbox.c
index 9dd6a18b2b..c9fa7abd71 100644
--- a/drivers/misc/cros_ec_sandbox.c
+++ b/drivers/misc/cros_ec_sandbox.c
@@ -11,6 +11,7 @@
 #include <ec_commands.h>
 #include <errno.h>
 #include <hash.h>
+#include <log.h>
 #include <os.h>
 #include <u-boot/sha256.h>
 #include <spi.h>
diff --git a/drivers/misc/cros_ec_spi.c b/drivers/misc/cros_ec_spi.c
index be510704c4..153f971bde 100644
--- a/drivers/misc/cros_ec_spi.c
+++ b/drivers/misc/cros_ec_spi.c
@@ -16,6 +16,7 @@
 #include <cros_ec.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <spi.h>
 
 int cros_ec_spi_packet(struct udevice *udev, int out_bytes, int in_bytes)
diff --git a/drivers/misc/fs_loader.c b/drivers/misc/fs_loader.c
index 88e486e9d5..56406aa1dd 100644
--- a/drivers/misc/fs_loader.c
+++ b/drivers/misc/fs_loader.c
@@ -10,6 +10,7 @@
 #include <blk.h>
 #include <fs.h>
 #include <fs_loader.h>
+#include <log.h>
 #include <linux/string.h>
 #include <mapmem.h>
 #include <malloc.h>
diff --git a/drivers/misc/fsl_portals.c b/drivers/misc/fsl_portals.c
index 45eed22f6e..632430e420 100644
--- a/drivers/misc/fsl_portals.c
+++ b/drivers/misc/fsl_portals.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 
diff --git a/drivers/misc/gdsys_ioep.c b/drivers/misc/gdsys_ioep.c
index 7f17095cc5..69e16a06a0 100644
--- a/drivers/misc/gdsys_ioep.c
+++ b/drivers/misc/gdsys_ioep.c
@@ -13,6 +13,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <misc.h>
 #include <regmap.h>
 
diff --git a/drivers/misc/gdsys_soc.c b/drivers/misc/gdsys_soc.c
index 94a21e08af..b4c721c6fe 100644
--- a/drivers/misc/gdsys_soc.c
+++ b/drivers/misc/gdsys_soc.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/lists.h>
 
 #include "gdsys_soc.h"
diff --git a/drivers/misc/i2c_eeprom_emul.c b/drivers/misc/i2c_eeprom_emul.c
index 16758a0ef9..6be76ad02e 100644
--- a/drivers/misc/i2c_eeprom_emul.c
+++ b/drivers/misc/i2c_eeprom_emul.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <i2c.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/test.h>
 
diff --git a/drivers/misc/ihs_fpga.c b/drivers/misc/ihs_fpga.c
index f9e4b27a27..71c4226a83 100644
--- a/drivers/misc/ihs_fpga.c
+++ b/drivers/misc/ihs_fpga.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <regmap.h>
 #include <asm/gpio.h>
 
diff --git a/drivers/misc/imx8/scu.c b/drivers/misc/imx8/scu.c
index a7654a7817..c988dd402c 100644
--- a/drivers/misc/imx8/scu.c
+++ b/drivers/misc/imx8/scu.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <dm.h>
 #include <dm/lists.h>
diff --git a/drivers/misc/irq-uclass.c b/drivers/misc/irq-uclass.c
index 61aa10e465..16dc0be75c 100644
--- a/drivers/misc/irq-uclass.c
+++ b/drivers/misc/irq-uclass.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <dt-structs.h>
 #include <irq.h>
+#include <log.h>
 #include <dm/device-internal.h>
 
 int irq_route_pmc_gpio_gpe(struct udevice *dev, uint pmc_gpe_num)
diff --git a/drivers/misc/microchip_flexcom.c b/drivers/misc/microchip_flexcom.c
index 4cff160d88..44a8b180a4 100644
--- a/drivers/misc/microchip_flexcom.c
+++ b/drivers/misc/microchip_flexcom.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <misc.h>
 #include <asm/io.h>
 #include <linux/err.h>
diff --git a/drivers/misc/mpc83xx_serdes.c b/drivers/misc/mpc83xx_serdes.c
index d572dda3c1..2d40621c15 100644
--- a/drivers/misc/mpc83xx_serdes.c
+++ b/drivers/misc/mpc83xx_serdes.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <mapmem.h>
 #include <misc.h>
 
diff --git a/drivers/misc/p2sb-uclass.c b/drivers/misc/p2sb-uclass.c
index 9fe0aca342..06b1e8d9ad 100644
--- a/drivers/misc/p2sb-uclass.c
+++ b/drivers/misc/p2sb-uclass.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <mapmem.h>
 #include <p2sb.h>
diff --git a/drivers/misc/p2sb_emul.c b/drivers/misc/p2sb_emul.c
index 02f7a7ea67..a4b6dba516 100644
--- a/drivers/misc/p2sb_emul.c
+++ b/drivers/misc/p2sb_emul.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <axi.h>
 #include <dm.h>
+#include <log.h>
 #include <pci.h>
 #include <asm/test.h>
 #include <p2sb.h>
diff --git a/drivers/misc/qfw.c b/drivers/misc/qfw.c
index 81e26614d3..f6eb6583ed 100644
--- a/drivers/misc/qfw.c
+++ b/drivers/misc/qfw.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <qfw.h>
 #include <asm/io.h>
diff --git a/drivers/misc/stm32_rcc.c b/drivers/misc/stm32_rcc.c
index 980b84453e..b82fe54c60 100644
--- a/drivers/misc/stm32_rcc.c
+++ b/drivers/misc/stm32_rcc.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <misc.h>
 #include <stm32_rcc.h>
 #include <dm/device-internal.h>
diff --git a/drivers/misc/swap_case.c b/drivers/misc/swap_case.c
index 97e2afa676..07c67577d5 100644
--- a/drivers/misc/swap_case.c
+++ b/drivers/misc/swap_case.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <pci.h>
 #include <asm/test.h>
 #include <linux/ctype.h>
diff --git a/drivers/misc/tegra186_bpmp.c b/drivers/misc/tegra186_bpmp.c
index ce2b925173..4077c46a23 100644
--- a/drivers/misc/tegra186_bpmp.c
+++ b/drivers/misc/tegra186_bpmp.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <time.h>
 #include <dm/lists.h>
diff --git a/drivers/misc/tegra_car.c b/drivers/misc/tegra_car.c
index db05c8917f..0ddbb3c619 100644
--- a/drivers/misc/tegra_car.c
+++ b/drivers/misc/tegra_car.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/lists.h>
 #include <dm/root.h>
 
diff --git a/drivers/mmc/arm_pl180_mmci.c b/drivers/mmc/arm_pl180_mmci.c
index d396afc14c..8c95229bf7 100644
--- a/drivers/mmc/arm_pl180_mmci.c
+++ b/drivers/mmc/arm_pl180_mmci.c
@@ -14,6 +14,7 @@
 #include "common.h"
 #include <clk.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <mmc.h>
 #include <dm/device_compat.h>
diff --git a/drivers/mmc/bcm2835_sdhci.c b/drivers/mmc/bcm2835_sdhci.c
index 39c93db275..dc3dffb657 100644
--- a/drivers/mmc/bcm2835_sdhci.c
+++ b/drivers/mmc/bcm2835_sdhci.c
@@ -38,6 +38,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <memalign.h>
 #include <sdhci.h>
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
index 6290b7fb5b..ba93c26255 100644
--- a/drivers/mmc/dw_mmc.c
+++ b/drivers/mmc/dw_mmc.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <memalign.h>
 #include <mmc.h>
diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c
index 0cdf5a0489..27c86320f0 100644
--- a/drivers/mmc/fsl_esdhc_imx.c
+++ b/drivers/mmc/fsl_esdhc_imx.c
@@ -17,6 +17,7 @@
 #include <cpu_func.h>
 #include <errno.h>
 #include <hwconfig.h>
+#include <log.h>
 #include <mmc.h>
 #include <part.h>
 #include <asm/cache.h>
diff --git a/drivers/mmc/ftsdc010_mci.c b/drivers/mmc/ftsdc010_mci.c
index 9c15eb36d6..5b8416813b 100644
--- a/drivers/mmc/ftsdc010_mci.c
+++ b/drivers/mmc/ftsdc010_mci.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <clk.h>
+#include <log.h>
 #include <malloc.h>
 #include <part.h>
 #include <mmc.h>
diff --git a/drivers/mmc/gen_atmel_mci.c b/drivers/mmc/gen_atmel_mci.c
index 93b88d17d4..6ec454c3bb 100644
--- a/drivers/mmc/gen_atmel_mci.c
+++ b/drivers/mmc/gen_atmel_mci.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <clk.h>
 #include <dm.h>
+#include <log.h>
 #include <mmc.h>
 #include <part.h>
 #include <malloc.h>
diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c
index f313bc1734..c5b7872900 100644
--- a/drivers/mmc/mmc-uclass.c
+++ b/drivers/mmc/mmc-uclass.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <mmc.h>
 #include <dm.h>
 #include <dm/device-internal.h>
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index ca62bb9891..df550e25ed 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -11,6 +11,7 @@
 #include <blk.h>
 #include <command.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/device-internal.h>
 #include <errno.h>
 #include <mmc.h>
diff --git a/drivers/mmc/mmc_boot.c b/drivers/mmc/mmc_boot.c
index 64dc147a47..0a74b1fb77 100644
--- a/drivers/mmc/mmc_boot.c
+++ b/drivers/mmc/mmc_boot.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <mmc.h>
 #include "mmc_private.h"
 
diff --git a/drivers/mmc/mmc_legacy.c b/drivers/mmc/mmc_legacy.c
index b0f5cf58a2..2bb12ceeaf 100644
--- a/drivers/mmc/mmc_legacy.c
+++ b/drivers/mmc/mmc_legacy.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 #include <mmc.h>
 #include "mmc_private.h"
diff --git a/drivers/mmc/mmc_spi.c b/drivers/mmc/mmc_spi.c
index c693fb2d17..0b690ecb4b 100644
--- a/drivers/mmc/mmc_spi.c
+++ b/drivers/mmc/mmc_spi.c
@@ -8,6 +8,7 @@
  */
 #include <common.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <part.h>
 #include <mmc.h>
diff --git a/drivers/mmc/mvebu_mmc.c b/drivers/mmc/mvebu_mmc.c
index 958ac17954..8e7745e233 100644
--- a/drivers/mmc/mvebu_mmc.c
+++ b/drivers/mmc/mvebu_mmc.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <part.h>
 #include <mmc.h>
diff --git a/drivers/mmc/mxsmmc.c b/drivers/mmc/mxsmmc.c
index 9414eff42b..17f1ebf5d2 100644
--- a/drivers/mmc/mxsmmc.c
+++ b/drivers/mmc/mxsmmc.c
@@ -21,6 +21,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 #include <mmc.h>
 #include <linux/errno.h>
diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
index 886299a50d..492bf58c39 100644
--- a/drivers/mmc/omap_hsmmc.c
+++ b/drivers/mmc/omap_hsmmc.c
@@ -25,6 +25,7 @@
 #include <config.h>
 #include <common.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <malloc.h>
 #include <memalign.h>
 #include <mmc.h>
diff --git a/drivers/mmc/renesas-sdhi.c b/drivers/mmc/renesas-sdhi.c
index 88a7160b0a..33bb5dcc0a 100644
--- a/drivers/mmc/renesas-sdhi.c
+++ b/drivers/mmc/renesas-sdhi.c
@@ -7,6 +7,7 @@
 #include <bouncebuf.h>
 #include <clk.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <malloc.h>
 #include <mmc.h>
 #include <dm.h>
diff --git a/drivers/mmc/rockchip_dw_mmc.c b/drivers/mmc/rockchip_dw_mmc.c
index a0e1be8794..d1b293aa03 100644
--- a/drivers/mmc/rockchip_dw_mmc.c
+++ b/drivers/mmc/rockchip_dw_mmc.c
@@ -9,6 +9,7 @@
 #include <dt-structs.h>
 #include <dwmmc.h>
 #include <errno.h>
+#include <log.h>
 #include <mapmem.h>
 #include <pwrseq.h>
 #include <syscon.h>
diff --git a/drivers/mmc/rpmb.c b/drivers/mmc/rpmb.c
index ee6dbe30db..ea7e506666 100644
--- a/drivers/mmc/rpmb.c
+++ b/drivers/mmc/rpmb.c
@@ -9,6 +9,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <log.h>
 #include <memalign.h>
 #include <mmc.h>
 #include <sdhci.h>
diff --git a/drivers/mmc/s5p_sdhci.c b/drivers/mmc/s5p_sdhci.c
index b5fe828dd6..24f599e868 100644
--- a/drivers/mmc/s5p_sdhci.c
+++ b/drivers/mmc/s5p_sdhci.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <sdhci.h>
 #include <fdtdec.h>
diff --git a/drivers/mmc/sandbox_mmc.c b/drivers/mmc/sandbox_mmc.c
index 899952d773..e86ea8fe09 100644
--- a/drivers/mmc/sandbox_mmc.c
+++ b/drivers/mmc/sandbox_mmc.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <mmc.h>
 #include <asm/test.h>
 
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index 4b533a38bd..99eb20fe60 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -11,6 +11,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <mmc.h>
 #include <sdhci.h>
diff --git a/drivers/mmc/sh_mmcif.c b/drivers/mmc/sh_mmcif.c
index 29bbb4b3a6..bc94d01fab 100644
--- a/drivers/mmc/sh_mmcif.c
+++ b/drivers/mmc/sh_mmcif.c
@@ -7,6 +7,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <log.h>
 #include <watchdog.h>
 #include <command.h>
 #include <mmc.h>
diff --git a/drivers/mmc/sh_sdhi.c b/drivers/mmc/sh_sdhi.c
index 4851198571..54bd687a25 100644
--- a/drivers/mmc/sh_sdhi.c
+++ b/drivers/mmc/sh_sdhi.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 #include <mmc.h>
 #include <dm.h>
diff --git a/drivers/mmc/socfpga_dw_mmc.c b/drivers/mmc/socfpga_dw_mmc.c
index 786cdc700a..892222d27d 100644
--- a/drivers/mmc/socfpga_dw_mmc.c
+++ b/drivers/mmc/socfpga_dw_mmc.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/arch/clock_manager.h>
 #include <asm/arch/system_manager.h>
 #include <clk.h>
diff --git a/drivers/mmc/sti_sdhci.c b/drivers/mmc/sti_sdhci.c
index d6c75ea601..9bcd8ce5f6 100644
--- a/drivers/mmc/sti_sdhci.c
+++ b/drivers/mmc/sti_sdhci.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <mmc.h>
 #include <reset-uclass.h>
 #include <sdhci.h>
diff --git a/drivers/mmc/stm32_sdmmc2.c b/drivers/mmc/stm32_sdmmc2.c
index b76a7edc0b..a089dfb11d 100644
--- a/drivers/mmc/stm32_sdmmc2.c
+++ b/drivers/mmc/stm32_sdmmc2.c
@@ -9,6 +9,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/cache.h>
 #include <linux/libfdt.h>
diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c
index 9f426661c4..2903d89ef3 100644
--- a/drivers/mmc/sunxi_mmc.c
+++ b/drivers/mmc/sunxi_mmc.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <mmc.h>
 #include <clk.h>
diff --git a/drivers/mmc/tegra_mmc.c b/drivers/mmc/tegra_mmc.c
index 2b041562a6..731a519e40 100644
--- a/drivers/mmc/tegra_mmc.c
+++ b/drivers/mmc/tegra_mmc.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <mmc.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
diff --git a/drivers/mmc/zynq_sdhci.c b/drivers/mmc/zynq_sdhci.c
index 18925d01fa..2f46f17f4a 100644
--- a/drivers/mmc/zynq_sdhci.c
+++ b/drivers/mmc/zynq_sdhci.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include "mmc_private.h"
+#include <log.h>
 #include <dm/device_compat.h>
 #include <linux/err.h>
 #include <linux/libfdt.h>
diff --git a/drivers/mtd/altera_qspi.c b/drivers/mtd/altera_qspi.c
index 1d32febe07..6896351995 100644
--- a/drivers/mtd/altera_qspi.c
+++ b/drivers/mtd/altera_qspi.c
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <fdt_support.h>
 #include <flash.h>
+#include <log.h>
 #include <mtd.h>
 #include <asm/io.h>
 
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index 16cdfe3978..6be40d04e9 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -25,6 +25,7 @@
 #include <flash.h>
 #include <init.h>
 #include <irq_func.h>
+#include <log.h>
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <asm/byteorder.h>
diff --git a/drivers/mtd/jedec_flash.c b/drivers/mtd/jedec_flash.c
index ce921b461a..859c7fd4ec 100644
--- a/drivers/mtd/jedec_flash.c
+++ b/drivers/mtd/jedec_flash.c
@@ -13,6 +13,7 @@
 
 #include <common.h>
 #include <flash.h>
+#include <log.h>
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <asm/byteorder.h>
diff --git a/drivers/mtd/mtd_uboot.c b/drivers/mtd/mtd_uboot.c
index db20a6b0b2..9360d4ed17 100644
--- a/drivers/mtd/mtd_uboot.c
+++ b/drivers/mtd/mtd_uboot.c
@@ -5,6 +5,7 @@
  */
 #include <common.h>
 #include <env.h>
+#include <log.h>
 #include <malloc.h>
 #include <dm/device.h>
 #include <dm/uclass-internal.h>
diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c
index 5621c3fd26..4ac65fd28b 100644
--- a/drivers/mtd/mtdconcat.c
+++ b/drivers/mtd/mtdconcat.c
@@ -10,6 +10,7 @@
  */
 
 #ifndef __UBOOT__
+#include <log.h>
 #include <dm/devres.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index f8d3f4d246..2b7de6c03b 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -9,6 +9,7 @@
  */
 
 #ifndef __UBOOT__
+#include <log.h>
 #include <dm/devres.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index 56acdbf65b..9966cad795 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -9,6 +9,7 @@
  */
 
 #ifndef __UBOOT__
+#include <log.h>
 #include <dm/devres.h>
 #include <linux/module.h>
 #include <linux/types.h>
diff --git a/drivers/mtd/nand/raw/atmel_nand.c b/drivers/mtd/nand/raw/atmel_nand.c
index 996d3dbb71..89e107ffb7 100644
--- a/drivers/mtd/nand/raw/atmel_nand.c
+++ b/drivers/mtd/nand/raw/atmel_nand.c
@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/gpio.h>
 #include <asm/arch/gpio.h>
 #include <dm/device_compat.h>
diff --git a/drivers/mtd/nand/raw/davinci_nand.c b/drivers/mtd/nand/raw/davinci_nand.c
index 724bbee752..4416b8fa1e 100644
--- a/drivers/mtd/nand/raw/davinci_nand.c
+++ b/drivers/mtd/nand/raw/davinci_nand.c
@@ -29,6 +29,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <nand.h>
 #include <dm/uclass.h>
diff --git a/drivers/mtd/nand/raw/denali_spl.c b/drivers/mtd/nand/raw/denali_spl.c
index b8b29812aa..4b815a433e 100644
--- a/drivers/mtd/nand/raw/denali_spl.c
+++ b/drivers/mtd/nand/raw/denali_spl.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/unaligned.h>
 #include <linux/mtd/rawnand.h>
diff --git a/drivers/mtd/nand/raw/fsl_upm.c b/drivers/mtd/nand/raw/fsl_upm.c
index dfbdbca3ae..ec233b2790 100644
--- a/drivers/mtd/nand/raw/fsl_upm.c
+++ b/drivers/mtd/nand/raw/fsl_upm.c
@@ -8,6 +8,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <linux/mtd/mtd.h>
diff --git a/drivers/mtd/nand/raw/lpc32xx_nand_slc.c b/drivers/mtd/nand/raw/lpc32xx_nand_slc.c
index 8615b112a2..bf9f4be6de 100644
--- a/drivers/mtd/nand/raw/lpc32xx_nand_slc.c
+++ b/drivers/mtd/nand/raw/lpc32xx_nand_slc.c
@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <nand.h>
 #include <linux/mtd/nand_ecc.h>
 #include <linux/errno.h>
diff --git a/drivers/mtd/nand/raw/mxc_nand.c b/drivers/mtd/nand/raw/mxc_nand.c
index cf97e0f74f..049bc79e3b 100644
--- a/drivers/mtd/nand/raw/mxc_nand.c
+++ b/drivers/mtd/nand/raw/mxc_nand.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <nand.h>
 #include <linux/err.h>
 #include <asm/io.h>
diff --git a/drivers/mtd/nand/raw/mxs_nand_spl.c b/drivers/mtd/nand/raw/mxs_nand_spl.c
index 45c9ed4b9c..c01b0db3cc 100644
--- a/drivers/mtd/nand/raw/mxs_nand_spl.c
+++ b/drivers/mtd/nand/raw/mxs_nand_spl.c
@@ -4,6 +4,7 @@
  * Author: Tim Harvey <tharvey@gateworks.com>
  */
 #include <common.h>
+#include <log.h>
 #include <nand.h>
 #include <malloc.h>
 #include <mxs_nand.h>
diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c
index 49d5e261b5..ebc2bea069 100644
--- a/drivers/mtd/nand/raw/nand_base.c
+++ b/drivers/mtd/nand/raw/nand_base.c
@@ -32,6 +32,7 @@
 #if CONFIG_IS_ENABLED(OF_CONTROL)
 #include <fdtdec.h>
 #endif
+#include <log.h>
 #include <malloc.h>
 #include <watchdog.h>
 #include <dm/devres.h>
diff --git a/drivers/mtd/nand/raw/nand_bbt.c b/drivers/mtd/nand/raw/nand_bbt.c
index a6e6e0ef6d..531d48ce89 100644
--- a/drivers/mtd/nand/raw/nand_bbt.c
+++ b/drivers/mtd/nand/raw/nand_bbt.c
@@ -58,6 +58,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 #include <dm/devres.h>
 #include <linux/compat.h>
diff --git a/drivers/mtd/nand/raw/nand_bch.c b/drivers/mtd/nand/raw/nand_bch.c
index 11a22e021d..734d1c6204 100644
--- a/drivers/mtd/nand/raw/nand_bch.c
+++ b/drivers/mtd/nand/raw/nand_bch.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <dm/devres.h>
 /*#include <asm/io.h>*/
 #include <linux/types.h>
diff --git a/drivers/mtd/nand/raw/nand_util.c b/drivers/mtd/nand/raw/nand_util.c
index 9c4af8a5d6..5b74ef0dfd 100644
--- a/drivers/mtd/nand/raw/nand_util.c
+++ b/drivers/mtd/nand/raw/nand_util.c
@@ -20,6 +20,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <log.h>
 #include <watchdog.h>
 #include <malloc.h>
 #include <memalign.h>
diff --git a/drivers/mtd/nand/raw/omap_gpmc.c b/drivers/mtd/nand/raw/omap_gpmc.c
index 6a050501b0..97fd5690f5 100644
--- a/drivers/mtd/nand/raw/omap_gpmc.c
+++ b/drivers/mtd/nand/raw/omap_gpmc.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <linux/errno.h>
 #include <asm/arch/mem.h>
diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
index 1c212daa1d..912fe480e8 100644
--- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
+++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <clk.h>
 #include <dm.h>
+#include <log.h>
 #include <nand.h>
 #include <reset.h>
 #include <linux/err.h>
diff --git a/drivers/mtd/nand/raw/tegra_nand.c b/drivers/mtd/nand/raw/tegra_nand.c
index ae699d1da5..3fef204624 100644
--- a/drivers/mtd/nand/raw/tegra_nand.c
+++ b/drivers/mtd/nand/raw/tegra_nand.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <memalign.h>
 #include <nand.h>
diff --git a/drivers/mtd/nand/raw/zynq_nand.c b/drivers/mtd/nand/raw/zynq_nand.c
index 3941297418..0bddaaaac0 100644
--- a/drivers/mtd/nand/raw/zynq_nand.c
+++ b/drivers/mtd/nand/raw/zynq_nand.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/io.h>
 #include <linux/errno.h>
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index 693bb78b87..0580b509f8 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -20,6 +20,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <watchdog.h>
 #include <dm/devres.h>
 #include <linux/compat.h>
diff --git a/drivers/mtd/onenand/onenand_bbt.c b/drivers/mtd/onenand/onenand_bbt.c
index cde342aaec..eca9edff60 100644
--- a/drivers/mtd/onenand/onenand_bbt.c
+++ b/drivers/mtd/onenand/onenand_bbt.c
@@ -15,6 +15,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <linux/compat.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/onenand.h>
diff --git a/drivers/mtd/spi/sandbox.c b/drivers/mtd/spi/sandbox.c
index 084c66e984..8cbe97ee20 100644
--- a/drivers/mtd/spi/sandbox.c
+++ b/drivers/mtd/spi/sandbox.c
@@ -12,6 +12,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <spi.h>
 #include <os.h>
diff --git a/drivers/mtd/spi/sf-uclass.c b/drivers/mtd/spi/sf-uclass.c
index 5ebcca590a..de369aa001 100644
--- a/drivers/mtd/spi/sf-uclass.c
+++ b/drivers/mtd/spi/sf-uclass.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <spi.h>
 #include <spi_flash.h>
diff --git a/drivers/mtd/spi/sf_dataflash.c b/drivers/mtd/spi/sf_dataflash.c
index b1a38048d3..f85799d628 100644
--- a/drivers/mtd/spi/sf_dataflash.c
+++ b/drivers/mtd/spi/sf_dataflash.c
@@ -11,6 +11,7 @@
 #include <errno.h>
 #include <fdtdec.h>
 #include <flash.h>
+#include <log.h>
 #include <spi.h>
 #include <spi_flash.h>
 #include <div64.h>
diff --git a/drivers/mtd/spi/sf_probe.c b/drivers/mtd/spi/sf_probe.c
index 72b6ee702d..c2e51f9c68 100644
--- a/drivers/mtd/spi/sf_probe.c
+++ b/drivers/mtd/spi/sf_probe.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <spi.h>
 #include <spi_flash.h>
diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c
index e840c60f27..a4ec5bffc0 100644
--- a/drivers/mtd/spi/spi-nor-core.c
+++ b/drivers/mtd/spi/spi-nor-core.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <linux/err.h>
diff --git a/drivers/mtd/spi/spi-nor-tiny.c b/drivers/mtd/spi/spi-nor-tiny.c
index ccc0ab07af..55f86d5155 100644
--- a/drivers/mtd/spi/spi-nor-tiny.c
+++ b/drivers/mtd/spi/spi-nor-tiny.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <dm/device_compat.h>
 #include <linux/err.h>
 #include <linux/errno.h>
diff --git a/drivers/mtd/ubi/attach.c b/drivers/mtd/ubi/attach.c
index f02a06fc35..c40ed62959 100644
--- a/drivers/mtd/ubi/attach.c
+++ b/drivers/mtd/ubi/attach.c
@@ -70,6 +70,7 @@
  */
 
 #ifndef __UBOOT__
+#include <log.h>
 #include <dm/devres.h>
 #include <linux/err.h>
 #include <linux/slab.h>
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index 7de65bc7c3..61e38ba1ab 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -17,6 +17,7 @@
  */
 
 #ifndef __UBOOT__
+#include <log.h>
 #include <dm/devres.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c
index 8428278e21..9d4337bcff 100644
--- a/drivers/mtd/ubi/eba.c
+++ b/drivers/mtd/ubi/eba.c
@@ -29,6 +29,7 @@
  */
 
 #ifndef __UBOOT__
+#include <log.h>
 #include <dm/devres.h>
 #include <linux/slab.h>
 #include <linux/crc32.h>
diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c
index a3f5e3e1a9..c19df82747 100644
--- a/drivers/mtd/ubi/fastmap.c
+++ b/drivers/mtd/ubi/fastmap.c
@@ -7,6 +7,7 @@
  */
 
 #ifndef __UBOOT__
+#include <log.h>
 #include <dm/devres.h>
 #include <linux/crc32.h>
 #include <linux/err.h>
diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c
index 8ba22d8142..b8b878b918 100644
--- a/drivers/mtd/ubi/io.c
+++ b/drivers/mtd/ubi/io.c
@@ -74,6 +74,7 @@
  */
 
 #ifndef __UBOOT__
+#include <log.h>
 #include <dm/devres.h>
 #include <linux/crc32.h>
 #include <linux/err.h>
diff --git a/drivers/mtd/ubi/misc.c b/drivers/mtd/ubi/misc.c
index 3f7ee59c94..81275deaeb 100644
--- a/drivers/mtd/ubi/misc.c
+++ b/drivers/mtd/ubi/misc.c
@@ -7,6 +7,7 @@
 
 /* Here we keep miscellaneous functions which are used all over the UBI code */
 
+#include <log.h>
 #include <malloc.h>
 #include <ubi_uboot.h>
 #include "ubi.h"
diff --git a/drivers/mtd/ubi/upd.c b/drivers/mtd/ubi/upd.c
index 0f7951c859..28a362aa14 100644
--- a/drivers/mtd/ubi/upd.c
+++ b/drivers/mtd/ubi/upd.c
@@ -26,6 +26,7 @@
  */
 
 #ifndef __UBOOT__
+#include <log.h>
 #include <malloc.h>
 #include <linux/uaccess.h>
 #else
diff --git a/drivers/mtd/ubi/vmt.c b/drivers/mtd/ubi/vmt.c
index 2114abbe7c..0bfedd0deb 100644
--- a/drivers/mtd/ubi/vmt.c
+++ b/drivers/mtd/ubi/vmt.c
@@ -11,6 +11,7 @@
  */
 
 #ifndef __UBOOT__
+#include <log.h>
 #include <dm/devres.h>
 #include <linux/err.h>
 #include <linux/slab.h>
diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c
index 123c2f344d..636edbb4a3 100644
--- a/drivers/mtd/ubi/vtbl.c
+++ b/drivers/mtd/ubi/vtbl.c
@@ -46,6 +46,7 @@
  */
 
 #ifndef __UBOOT__
+#include <log.h>
 #include <dm/devres.h>
 #include <linux/crc32.h>
 #include <linux/err.h>
diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c
index 4038b7f04e..bae402418f 100644
--- a/drivers/mtd/ubi/wl.c
+++ b/drivers/mtd/ubi/wl.c
@@ -86,6 +86,7 @@
  */
 
 #ifndef __UBOOT__
+#include <log.h>
 #include <dm/devres.h>
 #include <linux/slab.h>
 #include <linux/crc32.h>
diff --git a/drivers/net/ag7xxx.c b/drivers/net/ag7xxx.c
index 11c9124e31..38f3cbac73 100644
--- a/drivers/net/ag7xxx.c
+++ b/drivers/net/ag7xxx.c
@@ -11,6 +11,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <miiphy.h>
 #include <malloc.h>
 #include <net.h>
diff --git a/drivers/net/altera_tse.c b/drivers/net/altera_tse.c
index a511068d9a..93b26da392 100644
--- a/drivers/net/altera_tse.c
+++ b/drivers/net/altera_tse.c
@@ -13,6 +13,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <fdt_support.h>
+#include <log.h>
 #include <memalign.h>
 #include <miiphy.h>
 #include <net.h>
diff --git a/drivers/net/armada100_fec.c b/drivers/net/armada100_fec.c
index da6662c7ee..828f978f73 100644
--- a/drivers/net/armada100_fec.c
+++ b/drivers/net/armada100_fec.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <net.h>
 #include <malloc.h>
 #include <miiphy.h>
diff --git a/drivers/net/at91_emac.c b/drivers/net/at91_emac.c
index 3233478571..fc227edea7 100644
--- a/drivers/net/at91_emac.c
+++ b/drivers/net/at91_emac.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/at91_emac.h>
diff --git a/drivers/net/ax88180.c b/drivers/net/ax88180.c
index 261fde00c1..d13eb11187 100644
--- a/drivers/net/ax88180.c
+++ b/drivers/net/ax88180.c
@@ -39,6 +39,7 @@
  */
 #include <common.h>
 #include <command.h>
+#include <log.h>
 #include <net.h>
 #include <malloc.h>
 #include <linux/mii.h>
diff --git a/drivers/net/bcm-sf2-eth-gmac.c b/drivers/net/bcm-sf2-eth-gmac.c
index 3794e40b01..eaadb2662a 100644
--- a/drivers/net/bcm-sf2-eth-gmac.c
+++ b/drivers/net/bcm-sf2-eth-gmac.c
@@ -12,6 +12,7 @@
 #include <config.h>
 #include <common.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <malloc.h>
 #include <net.h>
 #include <asm/cache.h>
diff --git a/drivers/net/bcm-sf2-eth.c b/drivers/net/bcm-sf2-eth.c
index 11f937032f..c8393c5f50 100644
--- a/drivers/net/bcm-sf2-eth.c
+++ b/drivers/net/bcm-sf2-eth.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 #include <net.h>
 #include <config.h>
diff --git a/drivers/net/bcm6348-eth.c b/drivers/net/bcm6348-eth.c
index fe3532930a..9ddc0f938f 100644
--- a/drivers/net/bcm6348-eth.c
+++ b/drivers/net/bcm6348-eth.c
@@ -10,6 +10,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <dma.h>
+#include <log.h>
 #include <malloc.h>
 #include <miiphy.h>
 #include <net.h>
diff --git a/drivers/net/bcm6368-eth.c b/drivers/net/bcm6368-eth.c
index 1200049007..db573c0831 100644
--- a/drivers/net/bcm6368-eth.c
+++ b/drivers/net/bcm6368-eth.c
@@ -10,6 +10,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <dma.h>
+#include <log.h>
 #include <malloc.h>
 #include <miiphy.h>
 #include <net.h>
diff --git a/drivers/net/bcmgenet.c b/drivers/net/bcmgenet.c
index f3ac064c1d..106aa4ba1c 100644
--- a/drivers/net/bcmgenet.c
+++ b/drivers/net/bcmgenet.c
@@ -16,6 +16,7 @@
  * we only support v5, as used in the Raspberry Pi 4.
  */
 
+#include <log.h>
 #include <asm/cache.h>
 #include <asm/io.h>
 #include <clk.h>
diff --git a/drivers/net/cs8900.c b/drivers/net/cs8900.c
index 9331cdf938..f840e11421 100644
--- a/drivers/net/cs8900.c
+++ b/drivers/net/cs8900.c
@@ -25,6 +25,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <log.h>
 #include <asm/io.h>
 #include <net.h>
 #include <malloc.h>
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index 34e0da1a1b..1eda9c3800 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -13,6 +13,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <miiphy.h>
 #include <malloc.h>
 #include <net.h>
diff --git a/drivers/net/dnet.c b/drivers/net/dnet.c
index 933d1fc2f1..35c2ed9fe0 100644
--- a/drivers/net/dnet.c
+++ b/drivers/net/dnet.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 
 #ifndef CONFIG_DNET_AUTONEG_TIMEOUT
 #define CONFIG_DNET_AUTONEG_TIMEOUT	5000000	/* default value */
diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c
index d83294cbdc..a82e8d8041 100644
--- a/drivers/net/dwc_eth_qos.c
+++ b/drivers/net/dwc_eth_qos.c
@@ -31,6 +31,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <memalign.h>
 #include <miiphy.h>
diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c
index 82b1db3fb3..6c1358568a 100644
--- a/drivers/net/e1000.c
+++ b/drivers/net/e1000.c
@@ -34,6 +34,7 @@ tested on both gig copper and gig fiber boards
 #include <cpu_func.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <memalign.h>
 #include <net.h>
diff --git a/drivers/net/ep93xx_eth.c b/drivers/net/ep93xx_eth.c
index 8ec7b36f9a..5aed164247 100644
--- a/drivers/net/ep93xx_eth.c
+++ b/drivers/net/ep93xx_eth.c
@@ -18,6 +18,7 @@
 
 #include <command.h>
 #include <common.h>
+#include <log.h>
 #include <net.h>
 #include <asm/arch/ep93xx.h>
 #include <asm/io.h>
diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c
index be5d9add61..81d0f3d7f8 100644
--- a/drivers/net/ethoc.c
+++ b/drivers/net/ethoc.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/platform_data/net_ethoc.h>
 #include <linux/io.h>
 #include <malloc.h>
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index a20455cc4a..23d2e0754e 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -11,6 +11,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <env.h>
+#include <log.h>
 #include <malloc.h>
 #include <memalign.h>
 #include <miiphy.h>
diff --git a/drivers/net/fm/eth.c b/drivers/net/fm/eth.c
index 1d0c9988b1..f3ce2ac40c 100644
--- a/drivers/net/fm/eth.c
+++ b/drivers/net/fm/eth.c
@@ -5,6 +5,7 @@
  *	Dave Liu <daveliu@freescale.com>
  */
 #include <common.h>
+#include <log.h>
 #include <part.h>
 #include <asm/io.h>
 #ifdef CONFIG_DM_ETH
diff --git a/drivers/net/fm/memac.c b/drivers/net/fm/memac.c
index 77ea083782..0f0f7b0732 100644
--- a/drivers/net/fm/memac.c
+++ b/drivers/net/fm/memac.c
@@ -8,6 +8,7 @@
 #define MAXFRM_MASK	0x0000ffff
 
 #include <common.h>
+#include <log.h>
 #include <phy.h>
 #include <asm/types.h>
 #include <asm/io.h>
diff --git a/drivers/net/fsl-mc/dpio/qbman_portal.c b/drivers/net/fsl-mc/dpio/qbman_portal.c
index e161b4e077..1f77f84990 100644
--- a/drivers/net/fsl-mc/dpio/qbman_portal.c
+++ b/drivers/net/fsl-mc/dpio/qbman_portal.c
@@ -3,6 +3,7 @@
  * Copyright (C) 2014 Freescale Semiconductor
  */
 
+#include <log.h>
 #include <malloc.h>
 #include <asm/arch/clock.h>
 #include "qbman_portal.h"
diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
index 39824094f9..3b44abcd94 100644
--- a/drivers/net/fsl-mc/mc.c
+++ b/drivers/net/fsl-mc/mc.c
@@ -9,6 +9,7 @@
 #include <env.h>
 #include <errno.h>
 #include <image.h>
+#include <log.h>
 #include <malloc.h>
 #include <linux/bug.h>
 #include <asm/io.h>
diff --git a/drivers/net/ftgmac100.c b/drivers/net/ftgmac100.c
index 3525736674..3322dcf2aa 100644
--- a/drivers/net/ftgmac100.c
+++ b/drivers/net/ftgmac100.c
@@ -11,9 +11,11 @@
  * Copyright (C) 2018, IBM Corporation.
  */
 
+#include <common.h>
 #include <clk.h>
 #include <cpu_func.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <miiphy.h>
 #include <net.h>
diff --git a/drivers/net/ftmac110.c b/drivers/net/ftmac110.c
index 10d5fc34cc..835346cb07 100644
--- a/drivers/net/ftmac110.c
+++ b/drivers/net/ftmac110.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <log.h>
 #include <malloc.h>
 #include <net.h>
 #include <asm/cache.h>
diff --git a/drivers/net/gmac_rockchip.c b/drivers/net/gmac_rockchip.c
index 85f8d3b419..52a637bd54 100644
--- a/drivers/net/gmac_rockchip.c
+++ b/drivers/net/gmac_rockchip.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <clk.h>
+#include <log.h>
 #include <net.h>
 #include <phy.h>
 #include <syscon.h>
diff --git a/drivers/net/higmacv300.c b/drivers/net/higmacv300.c
index d338643e60..ea9f9470c8 100644
--- a/drivers/net/higmacv300.c
+++ b/drivers/net/higmacv300.c
@@ -4,6 +4,7 @@
  */
 
 #include <cpu_func.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/cache.h>
 #include <asm/io.h>
diff --git a/drivers/net/ks8851_mll.c b/drivers/net/ks8851_mll.c
index 718a7dd019..8fcb63d1a6 100644
--- a/drivers/net/ks8851_mll.c
+++ b/drivers/net/ks8851_mll.c
@@ -4,6 +4,7 @@
  * Copyright (c) 2011 Roberto Cerati <roberto.cerati@bticino.it>
  */
 
+#include <log.h>
 #include <asm/io.h>
 #include <common.h>
 #include <command.h>
diff --git a/drivers/net/ldpaa_eth/ldpaa_eth.c b/drivers/net/ldpaa_eth/ldpaa_eth.c
index 48343dce1c..8327fd747b 100644
--- a/drivers/net/ldpaa_eth/ldpaa_eth.c
+++ b/drivers/net/ldpaa_eth/ldpaa_eth.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/types.h>
 #include <malloc.h>
diff --git a/drivers/net/lpc32xx_eth.c b/drivers/net/lpc32xx_eth.c
index ec5184edf8..604f676bff 100644
--- a/drivers/net/lpc32xx_eth.c
+++ b/drivers/net/lpc32xx_eth.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <net.h>
 #include <malloc.h>
 #include <miiphy.h>
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index bd588cab06..ddd1c06059 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -6,6 +6,7 @@
 #include <clk.h>
 #include <cpu_func.h>
 #include <dm.h>
+#include <log.h>
 
 /*
  * The u-boot networking stack is a little weird.  It seems like the
diff --git a/drivers/net/mdio_mux_i2creg.c b/drivers/net/mdio_mux_i2creg.c
index 3e82898f46..cc02b5ffd4 100644
--- a/drivers/net/mdio_mux_i2creg.c
+++ b/drivers/net/mdio_mux_i2creg.c
@@ -6,6 +6,7 @@
 
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <miiphy.h>
 #include <i2c.h>
 
diff --git a/drivers/net/mscc_eswitch/mscc_xfer.c b/drivers/net/mscc_eswitch/mscc_xfer.c
index f412901f1d..447b53782d 100644
--- a/drivers/net/mscc_eswitch/mscc_xfer.c
+++ b/drivers/net/mscc_eswitch/mscc_xfer.c
@@ -3,6 +3,7 @@
  * Copyright (c) 2018 Microsemi Corporation
  */
 
+#include <log.h>
 #include <linux/io.h>
 #include "mscc_xfer.h"
 
diff --git a/drivers/net/mscc_eswitch/ocelot_switch.c b/drivers/net/mscc_eswitch/ocelot_switch.c
index fe48f371c3..cae31e2f6e 100644
--- a/drivers/net/mscc_eswitch/ocelot_switch.c
+++ b/drivers/net/mscc_eswitch/ocelot_switch.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <config.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <dm/of_access.h>
 #include <dm/of_addr.h>
diff --git a/drivers/net/mscc_eswitch/serval_switch.c b/drivers/net/mscc_eswitch/serval_switch.c
index f05fa42ff3..cf8bf9c8b0 100644
--- a/drivers/net/mscc_eswitch/serval_switch.c
+++ b/drivers/net/mscc_eswitch/serval_switch.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <config.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <dm/of_access.h>
 #include <dm/of_addr.h>
diff --git a/drivers/net/mt7628-eth.c b/drivers/net/mt7628-eth.c
index 217c684702..8110af2d82 100644
--- a/drivers/net/mt7628-eth.c
+++ b/drivers/net/mt7628-eth.c
@@ -16,6 +16,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <miiphy.h>
 #include <net.h>
diff --git a/drivers/net/mtk_eth.c b/drivers/net/mtk_eth.c
index 59c759928e..c0cabd9b36 100644
--- a/drivers/net/mtk_eth.c
+++ b/drivers/net/mtk_eth.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <miiphy.h>
 #include <net.h>
diff --git a/drivers/net/mvgbe.c b/drivers/net/mvgbe.c
index 037e59ec6e..1d1a5e8501 100644
--- a/drivers/net/mvgbe.c
+++ b/drivers/net/mvgbe.c
@@ -13,6 +13,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <net.h>
 #include <malloc.h>
 #include <miiphy.h>
diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c
index 75831dfe14..5c8c5e6800 100644
--- a/drivers/net/mvneta.c
+++ b/drivers/net/mvneta.c
@@ -15,6 +15,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <dm.h>
+#include <log.h>
 #include <net.h>
 #include <netdev.h>
 #include <config.h>
diff --git a/drivers/net/ne2000_base.c b/drivers/net/ne2000_base.c
index a240d06ad4..55145da2bb 100644
--- a/drivers/net/ne2000_base.c
+++ b/drivers/net/ne2000_base.c
@@ -75,6 +75,7 @@ Add SNMP
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <log.h>
 #include <net.h>
 #include <malloc.h>
 #include <linux/compiler.h>
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index 73005ff94d..f1d0630d02 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <log.h>
 #include <stdio_dev.h>
 #include <net.h>
 
diff --git a/drivers/net/ns8382x.c b/drivers/net/ns8382x.c
index ea7ece54b6..9ef3baed1d 100644
--- a/drivers/net/ns8382x.c
+++ b/drivers/net/ns8382x.c
@@ -51,6 +51,7 @@
 
 /* Includes */
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 #include <net.h>
 #include <netdev.h>
diff --git a/drivers/net/pch_gbe.c b/drivers/net/pch_gbe.c
index b2823701a4..a592ec07da 100644
--- a/drivers/net/pch_gbe.c
+++ b/drivers/net/pch_gbe.c
@@ -9,6 +9,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/io.h>
 #include <pci.h>
diff --git a/drivers/net/pcnet.c b/drivers/net/pcnet.c
index b536ad466d..39cce05293 100644
--- a/drivers/net/pcnet.c
+++ b/drivers/net/pcnet.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <malloc.h>
 #include <net.h>
 #include <netdev.h>
diff --git a/drivers/net/pfe_eth/pfe_cmd.c b/drivers/net/pfe_eth/pfe_cmd.c
index bae5f8a479..66c8cca4d2 100644
--- a/drivers/net/pfe_eth/pfe_cmd.c
+++ b/drivers/net/pfe_eth/pfe_cmd.c
@@ -9,7 +9,9 @@
  * @brief PFE utility commands
  */
 
+#include <common.h>
 #include <command.h>
+#include <log.h>
 #include <net/pfe_eth/pfe_eth.h>
 
 static inline void pfe_command_help(void)
diff --git a/drivers/net/pfe_eth/pfe_driver.c b/drivers/net/pfe_eth/pfe_driver.c
index f70a235217..e5edfbeaa6 100644
--- a/drivers/net/pfe_eth/pfe_driver.c
+++ b/drivers/net/pfe_eth/pfe_driver.c
@@ -4,6 +4,7 @@
  * Copyright 2017 NXP
  */
 
+#include <log.h>
 #include <malloc.h>
 #include <net/pfe_eth/pfe_eth.h>
 #include <net/pfe_eth/pfe_firmware.h>
diff --git a/drivers/net/pfe_eth/pfe_eth.c b/drivers/net/pfe_eth/pfe_eth.c
index 1b5d11ef32..4aa5ac4be6 100644
--- a/drivers/net/pfe_eth/pfe_eth.c
+++ b/drivers/net/pfe_eth/pfe_eth.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <dm/platform_data/pfe_dm_eth.h>
 #include <net.h>
diff --git a/drivers/net/pfe_eth/pfe_firmware.c b/drivers/net/pfe_eth/pfe_firmware.c
index dbb69a0c59..0ad8c63d71 100644
--- a/drivers/net/pfe_eth/pfe_firmware.c
+++ b/drivers/net/pfe_eth/pfe_firmware.c
@@ -11,6 +11,7 @@
  */
 
 #include <image.h>
+#include <log.h>
 #include <malloc.h>
 #include <net/pfe_eth/pfe_eth.h>
 #include <net/pfe_eth/pfe_firmware.h>
diff --git a/drivers/net/pfe_eth/pfe_hw.c b/drivers/net/pfe_eth/pfe_hw.c
index 7137ac154a..caba8717be 100644
--- a/drivers/net/pfe_eth/pfe_hw.c
+++ b/drivers/net/pfe_eth/pfe_hw.c
@@ -3,6 +3,7 @@
  * Copyright 2015-2016 Freescale Semiconductor, Inc.
  * Copyright 2017 NXP
  */
+#include <log.h>
 #include <net/pfe_eth/pfe_eth.h>
 #include <net/pfe_eth/pfe/pfe_hw.h>
 
diff --git a/drivers/net/pfe_eth/pfe_mdio.c b/drivers/net/pfe_eth/pfe_mdio.c
index b990e7fbe2..2f88f5d8bc 100644
--- a/drivers/net/pfe_eth/pfe_mdio.c
+++ b/drivers/net/pfe_eth/pfe_mdio.c
@@ -5,6 +5,7 @@
  */
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <dm/platform_data/pfe_dm_eth.h>
 #include <net.h>
diff --git a/drivers/net/phy/aquantia.c b/drivers/net/phy/aquantia.c
index e30a7fd5d6..75396dec95 100644
--- a/drivers/net/phy/aquantia.c
+++ b/drivers/net/phy/aquantia.c
@@ -8,6 +8,7 @@
 #include <config.h>
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <net.h>
 #include <phy.h>
 #include <u-boot/crc.h>
diff --git a/drivers/net/phy/cortina.c b/drivers/net/phy/cortina.c
index ec81dab3f6..ecaa2b9f92 100644
--- a/drivers/net/phy/cortina.c
+++ b/drivers/net/phy/cortina.c
@@ -9,6 +9,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 #include <linux/ctype.h>
 #include <linux/string.h>
diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c
index 50804c130e..6fac0d5956 100644
--- a/drivers/net/phy/dp83867.c
+++ b/drivers/net/phy/dp83867.c
@@ -4,6 +4,7 @@
  *
  */
 #include <common.h>
+#include <log.h>
 #include <phy.h>
 #include <dm/devres.h>
 #include <linux/compat.h>
diff --git a/drivers/net/phy/mscc.c b/drivers/net/phy/mscc.c
index 72bbda5469..9fd5ca7c9f 100644
--- a/drivers/net/phy/mscc.c
+++ b/drivers/net/phy/mscc.c
@@ -9,6 +9,7 @@
  *
  */
 
+#include <log.h>
 #include <miiphy.h>
 #include <bitfield.h>
 #include <time.h>
diff --git a/drivers/net/phy/mv88e61xx.c b/drivers/net/phy/mv88e61xx.c
index 5aff7ed397..cbc3650971 100644
--- a/drivers/net/phy/mv88e61xx.c
+++ b/drivers/net/phy/mv88e61xx.c
@@ -30,6 +30,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 
 #include <bitfield.h>
 #include <errno.h>
diff --git a/drivers/net/phy/mv88e6352.c b/drivers/net/phy/mv88e6352.c
index a27a9cc03e..e2261d6a11 100644
--- a/drivers/net/phy/mv88e6352.c
+++ b/drivers/net/phy/mv88e6352.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <log.h>
 #include <miiphy.h>
 #include <linux/errno.h>
 #include <mv88e6352.h>
diff --git a/drivers/net/phy/ncsi.c b/drivers/net/phy/ncsi.c
index adc3ac033e..bf1e832be9 100644
--- a/drivers/net/phy/ncsi.c
+++ b/drivers/net/phy/ncsi.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 #include <phy.h>
 #include <net/ncsi.h>
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 505d3ab659..6c4381ec6c 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <console.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <net.h>
 #include <command.h>
diff --git a/drivers/net/phy/xilinx_gmii2rgmii.c b/drivers/net/phy/xilinx_gmii2rgmii.c
index 8c20da2682..e2feb17048 100644
--- a/drivers/net/phy/xilinx_gmii2rgmii.c
+++ b/drivers/net/phy/xilinx_gmii2rgmii.c
@@ -6,6 +6,7 @@
  */
 
 #include <dm.h>
+#include <log.h>
 #include <phy.h>
 #include <config.h>
 #include <common.h>
diff --git a/drivers/net/phy/xilinx_phy.c b/drivers/net/phy/xilinx_phy.c
index 3aa8891efe..39dbfdb7da 100644
--- a/drivers/net/phy/xilinx_phy.c
+++ b/drivers/net/phy/xilinx_phy.c
@@ -7,6 +7,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <log.h>
 #include <phy.h>
 #include <dm.h>
 
diff --git a/drivers/net/pic32_eth.c b/drivers/net/pic32_eth.c
index e966be038a..d367a1fe37 100644
--- a/drivers/net/pic32_eth.c
+++ b/drivers/net/pic32_eth.c
@@ -7,6 +7,7 @@
 #include <cpu_func.h>
 #include <errno.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <net.h>
 #include <miiphy.h>
diff --git a/drivers/net/ravb.c b/drivers/net/ravb.c
index 9139b5b1a1..fae72a1127 100644
--- a/drivers/net/ravb.c
+++ b/drivers/net/ravb.c
@@ -13,6 +13,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <miiphy.h>
 #include <malloc.h>
 #include <asm/cache.h>
diff --git a/drivers/net/rtl8139.c b/drivers/net/rtl8139.c
index 1f08397291..e87ee26f7f 100644
--- a/drivers/net/rtl8139.c
+++ b/drivers/net/rtl8139.c
@@ -70,12 +70,13 @@
 
 #include <common.h>
 #include <cpu_func.h>
-#include <linux/types.h>
+#include <log.h>
 #include <malloc.h>
 #include <net.h>
 #include <netdev.h>
 #include <asm/io.h>
 #include <pci.h>
+#include <linux/types.h>
 
 #define RTL_TIMEOUT	100000
 
diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c
index 27dc233323..c3413431ec 100644
--- a/drivers/net/rtl8169.c
+++ b/drivers/net/rtl8169.c
@@ -43,6 +43,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <memalign.h>
 #include <net.h>
diff --git a/drivers/net/sandbox-raw.c b/drivers/net/sandbox-raw.c
index 3707ee35eb..4bd94c3103 100644
--- a/drivers/net/sandbox-raw.c
+++ b/drivers/net/sandbox-raw.c
@@ -6,6 +6,7 @@
  * Joe Hershberger <joe.hershberger@ni.com>
  */
 
+#include <log.h>
 #include <asm/eth-raw-os.h>
 #include <common.h>
 #include <dm.h>
diff --git a/drivers/net/sandbox.c b/drivers/net/sandbox.c
index c136392350..4f7e3d4243 100644
--- a/drivers/net/sandbox.c
+++ b/drivers/net/sandbox.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <net.h>
 #include <asm/eth.h>
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c
index d75bf54670..1ad3d0526d 100644
--- a/drivers/net/sh_eth.c
+++ b/drivers/net/sh_eth.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <env.h>
+#include <log.h>
 #include <malloc.h>
 #include <net.h>
 #include <netdev.h>
diff --git a/drivers/net/sni_ave.c b/drivers/net/sni_ave.c
index 0f665087c6..8f651fa4dc 100644
--- a/drivers/net/sni_ave.c
+++ b/drivers/net/sni_ave.c
@@ -8,6 +8,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <fdt_support.h>
+#include <log.h>
 #include <malloc.h>
 #include <miiphy.h>
 #include <net.h>
diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c
index 09ea586e07..c24ab83c1a 100644
--- a/drivers/net/sun8i_emac.c
+++ b/drivers/net/sun8i_emac.c
@@ -11,6 +11,7 @@
 */
 
 #include <cpu_func.h>
+#include <log.h>
 #include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
diff --git a/drivers/net/sunxi_emac.c b/drivers/net/sunxi_emac.c
index a9874e4220..26c75067bf 100644
--- a/drivers/net/sunxi_emac.c
+++ b/drivers/net/sunxi_emac.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <clk.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/device_compat.h>
 #include <linux/err.h>
 #include <malloc.h>
diff --git a/drivers/net/ti/cpsw.c b/drivers/net/ti/cpsw.c
index 04b01a8129..a927ea03e0 100644
--- a/drivers/net/ti/cpsw.c
+++ b/drivers/net/ti/cpsw.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <command.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <net.h>
 #include <miiphy.h>
 #include <malloc.h>
diff --git a/drivers/net/ti/cpsw_mdio.c b/drivers/net/ti/cpsw_mdio.c
index 1fa520be0f..fb93548dee 100644
--- a/drivers/net/ti/cpsw_mdio.c
+++ b/drivers/net/ti/cpsw_mdio.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/io.h>
 #include <miiphy.h>
diff --git a/drivers/net/ti/davinci_emac.c b/drivers/net/ti/davinci_emac.c
index b5dfa8bd91..804797476c 100644
--- a/drivers/net/ti/davinci_emac.c
+++ b/drivers/net/ti/davinci_emac.c
@@ -24,6 +24,7 @@
 #include <common.h>
 #include <command.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <net.h>
 #include <miiphy.h>
 #include <malloc.h>
diff --git a/drivers/net/vsc7385.c b/drivers/net/vsc7385.c
index 072421062b..d020aa915e 100644
--- a/drivers/net/vsc7385.c
+++ b/drivers/net/vsc7385.c
@@ -15,6 +15,7 @@
 #include <config.h>
 #include <common.h>
 #include <console.h>
+#include <log.h>
 #include <asm/io.h>
 #include <linux/errno.h>
 #include "vsc7385.h"
diff --git a/drivers/net/vsc9953.c b/drivers/net/vsc9953.c
index 93eb2b158c..8bad351951 100644
--- a/drivers/net/vsc9953.c
+++ b/drivers/net/vsc9953.c
@@ -5,7 +5,9 @@
  *  Driver for the Vitesse VSC9953 L2 Switch
  */
 
+#include <common.h>
 #include <command.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/fsl_serdes.h>
 #include <fm_eth.h>
diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c
index b0450fff56..09151986f1 100644
--- a/drivers/net/xilinx_axi_emac.c
+++ b/drivers/net/xilinx_axi_emac.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <dm.h>
+#include <log.h>
 #include <net.h>
 #include <malloc.h>
 #include <asm/io.h>
diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
index 4b49290f0e..b15e5514e6 100644
--- a/drivers/net/xilinx_emaclite.c
+++ b/drivers/net/xilinx_emaclite.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <net.h>
 #include <config.h>
 #include <dm.h>
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 1747f3667e..28cef3b1ea 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <dm.h>
+#include <log.h>
 #include <net.h>
 #include <netdev.h>
 #include <config.h>
diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c
index 5e75152f42..0357aba7f1 100644
--- a/drivers/nvme/nvme.c
+++ b/drivers/nvme/nvme.c
@@ -9,6 +9,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <memalign.h>
 #include <pci.h>
diff --git a/drivers/pch/pch7.c b/drivers/pch/pch7.c
index 268edb3f8f..5fb35a19ef 100644
--- a/drivers/pch/pch7.c
+++ b/drivers/pch/pch7.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <pch.h>
 
 #define GPIO_BASE	0x44
diff --git a/drivers/pch/pch9.c b/drivers/pch/pch9.c
index fd61f16328..3bd011518b 100644
--- a/drivers/pch/pch9.c
+++ b/drivers/pch/pch9.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <pch.h>
 
 #define GPIO_BASE	0x48
diff --git a/drivers/pci/fsl_pci_init.c b/drivers/pci/fsl_pci_init.c
index c4eeb9b67c..c3c67fc97b 100644
--- a/drivers/pci/fsl_pci_init.c
+++ b/drivers/pci/fsl_pci_init.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <env.h>
 #include <init.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/fsl_serdes.h>
 
diff --git a/drivers/pci/pci-emul-uclass.c b/drivers/pci/pci-emul-uclass.c
index 9486e1cb96..a52064341e 100644
--- a/drivers/pci/pci-emul-uclass.c
+++ b/drivers/pci/pci-emul-uclass.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <linux/libfdt.h>
 #include <pci.h>
 #include <dm/lists.h>
diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c
index 93cfc1cade..76dfc1a957 100644
--- a/drivers/pci/pci-uclass.c
+++ b/drivers/pci/pci-uclass.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <init.h>
+#include <log.h>
 #include <malloc.h>
 #include <pci.h>
 #include <asm/io.h>
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index e8285bf936..3b67cd24f1 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -16,6 +16,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <log.h>
 
 #include <command.h>
 #include <env.h>
diff --git a/drivers/pci/pci_auto.c b/drivers/pci/pci_auto.c
index 28667bde8d..3f46b7697d 100644
--- a/drivers/pci/pci_auto.c
+++ b/drivers/pci/pci_auto.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <pci.h>
 
 /* the user can define CONFIG_SYS_PCI_CACHE_LINE_SIZE to avoid problems */
diff --git a/drivers/pci/pci_auto_common.c b/drivers/pci/pci_auto_common.c
index 8690316610..c0a53dcc92 100644
--- a/drivers/pci/pci_auto_common.c
+++ b/drivers/pci/pci_auto_common.c
@@ -14,6 +14,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <pci.h>
 
 void pciauto_region_init(struct pci_region *res)
diff --git a/drivers/pci/pci_auto_old.c b/drivers/pci/pci_auto_old.c
index b566705c9d..8b67cfa92b 100644
--- a/drivers/pci/pci_auto_old.c
+++ b/drivers/pci/pci_auto_old.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <errno.h>
+#include <log.h>
 #include <pci.h>
 
 /*
diff --git a/drivers/pci/pci_compat.c b/drivers/pci/pci_compat.c
index 6c15bdfc03..9dddca8efe 100644
--- a/drivers/pci/pci_compat.c
+++ b/drivers/pci/pci_compat.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <pci.h>
 #include <dm/device-internal.h>
diff --git a/drivers/pci/pci_ftpci100.c b/drivers/pci/pci_ftpci100.c
index f5eb702723..32fac878a6 100644
--- a/drivers/pci/pci_ftpci100.c
+++ b/drivers/pci/pci_ftpci100.c
@@ -8,6 +8,7 @@
  */
 #include <common.h>
 #include <init.h>
+#include <log.h>
 #include <malloc.h>
 #include <pci.h>
 
diff --git a/drivers/pci/pci_gt64120.c b/drivers/pci/pci_gt64120.c
index 62f213d122..80f11fedd1 100644
--- a/drivers/pci/pci_gt64120.c
+++ b/drivers/pci/pci_gt64120.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <gt64120.h>
 #include <init.h>
+#include <log.h>
 #include <pci.h>
 #include <pci_gt64120.h>
 
diff --git a/drivers/pci/pci_mvebu.c b/drivers/pci/pci_mvebu.c
index 483a87db7d..8bc04c978d 100644
--- a/drivers/pci/pci_mvebu.c
+++ b/drivers/pci/pci_mvebu.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
diff --git a/drivers/pci/pci_rom.c b/drivers/pci/pci_rom.c
index 2f3d40c227..6a9bc49978 100644
--- a/drivers/pci/pci_rom.c
+++ b/drivers/pci/pci_rom.c
@@ -28,6 +28,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <init.h>
+#include <log.h>
 #include <malloc.h>
 #include <pci.h>
 #include <pci_rom.h>
diff --git a/drivers/pci/pci_sandbox.c b/drivers/pci/pci_sandbox.c
index fa4c476597..8745f286bd 100644
--- a/drivers/pci/pci_sandbox.c
+++ b/drivers/pci/pci_sandbox.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <pci.h>
 
 #define FDT_DEV_INFO_CELLS	4
diff --git a/drivers/pci/pci_tegra.c b/drivers/pci/pci_tegra.c
index 96d308f7bf..3b4b276abe 100644
--- a/drivers/pci/pci_tegra.c
+++ b/drivers/pci/pci_tegra.c
@@ -15,6 +15,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <pci.h>
 #include <pci_tegra.h>
diff --git a/drivers/pci/pcie_dw_mvebu.c b/drivers/pci/pcie_dw_mvebu.c
index 1f216e1c68..b003791100 100644
--- a/drivers/pci/pcie_dw_mvebu.c
+++ b/drivers/pci/pcie_dw_mvebu.c
@@ -12,6 +12,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <pci.h>
 #include <asm/io.h>
 #include <asm-generic/gpio.h>
diff --git a/drivers/pci/pcie_dw_ti.c b/drivers/pci/pcie_dw_ti.c
index f62264cbba..0cca4e6d0d 100644
--- a/drivers/pci/pcie_dw_ti.c
+++ b/drivers/pci/pcie_dw_ti.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <pci.h>
 #include <generic-phy.h>
 #include <power-domain.h>
diff --git a/drivers/pci/pcie_imx.c b/drivers/pci/pcie_imx.c
index f34a157902..dc18d1ca3a 100644
--- a/drivers/pci/pcie_imx.c
+++ b/drivers/pci/pcie_imx.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <log.h>
 #include <malloc.h>
 #include <pci.h>
 #include <asm/arch/clock.h>
diff --git a/drivers/pci/pcie_layerscape.c b/drivers/pci/pcie_layerscape.c
index 8b313e9278..39b6d40802 100644
--- a/drivers/pci/pcie_layerscape.c
+++ b/drivers/pci/pcie_layerscape.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/arch/fsl_serdes.h>
 #include <pci.h>
 #include <asm/io.h>
diff --git a/drivers/pci/pcie_layerscape_fixup.c b/drivers/pci/pcie_layerscape_fixup.c
index 0d6750beb7..25a3c3870c 100644
--- a/drivers/pci/pcie_layerscape_fixup.c
+++ b/drivers/pci/pcie_layerscape_fixup.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <log.h>
 #include <pci.h>
 #include <asm/arch/fsl_serdes.h>
 #include <asm/io.h>
diff --git a/drivers/pci/pcie_layerscape_gen4.c b/drivers/pci/pcie_layerscape_gen4.c
index cec61fa7d6..428bfcab09 100644
--- a/drivers/pci/pcie_layerscape_gen4.c
+++ b/drivers/pci/pcie_layerscape_gen4.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/arch/fsl_serdes.h>
 #include <pci.h>
 #include <asm/io.h>
diff --git a/drivers/pci/pcie_layerscape_gen4_fixup.c b/drivers/pci/pcie_layerscape_gen4_fixup.c
index bfe197e7d8..1975004e59 100644
--- a/drivers/pci/pcie_layerscape_gen4_fixup.c
+++ b/drivers/pci/pcie_layerscape_gen4_fixup.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <pci.h>
 #include <asm/arch/fsl_serdes.h>
 #include <asm/io.h>
diff --git a/drivers/pci/pcie_mediatek.c b/drivers/pci/pcie_mediatek.c
index d8a32d53f6..c7cd2f5b69 100644
--- a/drivers/pci/pcie_mediatek.c
+++ b/drivers/pci/pcie_mediatek.c
@@ -11,6 +11,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <generic-phy.h>
+#include <log.h>
 #include <malloc.h>
 #include <pci.h>
 #include <reset.h>
diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c
index 612c428cf5..9696c84e4b 100644
--- a/drivers/phy/allwinner/phy-sun4i-usb.c
+++ b/drivers/phy/allwinner/phy-sun4i-usb.c
@@ -13,6 +13,7 @@
 #include <common.h>
 #include <clk.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/device.h>
 #include <generic-phy.h>
 #include <phy-sun4i-usb.h>
diff --git a/drivers/phy/bcm6318-usbh-phy.c b/drivers/phy/bcm6318-usbh-phy.c
index 2de343de29..a1ff0b773f 100644
--- a/drivers/phy/bcm6318-usbh-phy.c
+++ b/drivers/phy/bcm6318-usbh-phy.c
@@ -11,6 +11,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <generic-phy.h>
+#include <log.h>
 #include <malloc.h>
 #include <power-domain.h>
 #include <reset.h>
diff --git a/drivers/phy/bcm6348-usbh-phy.c b/drivers/phy/bcm6348-usbh-phy.c
index ed9f02b375..a486152da7 100644
--- a/drivers/phy/bcm6348-usbh-phy.c
+++ b/drivers/phy/bcm6348-usbh-phy.c
@@ -11,6 +11,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <generic-phy.h>
+#include <log.h>
 #include <malloc.h>
 #include <reset.h>
 #include <asm/io.h>
diff --git a/drivers/phy/bcm6358-usbh-phy.c b/drivers/phy/bcm6358-usbh-phy.c
index f0fda0290e..13e0e7b612 100644
--- a/drivers/phy/bcm6358-usbh-phy.c
+++ b/drivers/phy/bcm6358-usbh-phy.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <dm.h>
 #include <generic-phy.h>
+#include <log.h>
 #include <malloc.h>
 #include <reset.h>
 #include <asm/io.h>
diff --git a/drivers/phy/bcm6368-usbh-phy.c b/drivers/phy/bcm6368-usbh-phy.c
index 53d1f45bb9..f24e9ff5ee 100644
--- a/drivers/phy/bcm6368-usbh-phy.c
+++ b/drivers/phy/bcm6368-usbh-phy.c
@@ -11,6 +11,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <generic-phy.h>
+#include <log.h>
 #include <malloc.h>
 #include <power-domain.h>
 #include <reset.h>
diff --git a/drivers/phy/keystone-usb-phy.c b/drivers/phy/keystone-usb-phy.c
index 14ac6bbbb2..3be51a33f8 100644
--- a/drivers/phy/keystone-usb-phy.c
+++ b/drivers/phy/keystone-usb-phy.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/device.h>
 #include <generic-phy.h>
 #include <asm/io.h>
diff --git a/drivers/phy/marvell/comphy_a3700.c b/drivers/phy/marvell/comphy_a3700.c
index 3b2902f362..53b55ce7af 100644
--- a/drivers/phy/marvell/comphy_a3700.c
+++ b/drivers/phy/marvell/comphy_a3700.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
diff --git a/drivers/phy/marvell/comphy_cp110.c b/drivers/phy/marvell/comphy_cp110.c
index 9998c07a47..ddfacf65d6 100644
--- a/drivers/phy/marvell/comphy_cp110.c
+++ b/drivers/phy/marvell/comphy_cp110.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
diff --git a/drivers/phy/marvell/comphy_mux.c b/drivers/phy/marvell/comphy_mux.c
index c67ba99762..98327557a8 100644
--- a/drivers/phy/marvell/comphy_mux.c
+++ b/drivers/phy/marvell/comphy_mux.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 
 #include "comphy_core.h"
diff --git a/drivers/phy/meson-g12a-usb2.c b/drivers/phy/meson-g12a-usb2.c
index c23bc87d0f..6030031184 100644
--- a/drivers/phy/meson-g12a-usb2.c
+++ b/drivers/phy/meson-g12a-usb2.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/io.h>
 #include <bitfield.h>
diff --git a/drivers/phy/mt76x8-usb-phy.c b/drivers/phy/mt76x8-usb-phy.c
index 1e7c5f334b..7fa8c8bf70 100644
--- a/drivers/phy/mt76x8-usb-phy.c
+++ b/drivers/phy/mt76x8-usb-phy.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <dm.h>
 #include <generic-phy.h>
+#include <log.h>
 #include <reset.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
diff --git a/drivers/phy/phy-da8xx-usb.c b/drivers/phy/phy-da8xx-usb.c
index 034b47932d..d025188eae 100644
--- a/drivers/phy/phy-da8xx-usb.c
+++ b/drivers/phy/phy-da8xx-usb.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
 #include <asm/arch/hardware.h>
diff --git a/drivers/phy/phy-stm32-usbphyc.c b/drivers/phy/phy-stm32-usbphyc.c
index 6ba37213cb..b436c2184b 100644
--- a/drivers/phy/phy-stm32-usbphyc.c
+++ b/drivers/phy/phy-stm32-usbphyc.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <generic-phy.h>
+#include <log.h>
 #include <reset.h>
 #include <syscon.h>
 #include <usb.h>
diff --git a/drivers/phy/phy-ti-am654.c b/drivers/phy/phy-ti-am654.c
index 0b2b2410b2..18cf654c78 100644
--- a/drivers/phy/phy-ti-am654.c
+++ b/drivers/phy/phy-ti-am654.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/device.h>
 #include <dm/device_compat.h>
 #include <dm/lists.h>
diff --git a/drivers/phy/phy-uclass.c b/drivers/phy/phy-uclass.c
index 6ab78448af..917000226b 100644
--- a/drivers/phy/phy-uclass.c
+++ b/drivers/phy/phy-uclass.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <dm/devres.h>
 #include <generic-phy.h>
+#include <log.h>
 
 static inline struct phy_ops *phy_dev_ops(struct udevice *dev)
 {
diff --git a/drivers/phy/sti_usb_phy.c b/drivers/phy/sti_usb_phy.c
index ec597da84e..2a20f7601c 100644
--- a/drivers/phy/sti_usb_phy.c
+++ b/drivers/phy/sti_usb_phy.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <bitfield.h>
 #include <dm.h>
diff --git a/drivers/pinctrl/aspeed/pinctrl_ast2500.c b/drivers/pinctrl/aspeed/pinctrl_ast2500.c
index a6e9c0d933..05ef24864f 100644
--- a/drivers/pinctrl/aspeed/pinctrl_ast2500.c
+++ b/drivers/pinctrl/aspeed/pinctrl_ast2500.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/pinctrl.h>
 #include <asm/arch/scu_ast2500.h>
diff --git a/drivers/pinctrl/ath79/pinctrl_ar933x.c b/drivers/pinctrl/ath79/pinctrl_ar933x.c
index 5e154a9f19..a0625d7c83 100644
--- a/drivers/pinctrl/ath79/pinctrl_ar933x.c
+++ b/drivers/pinctrl/ath79/pinctrl_ar933x.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <asm/io.h>
 #include <dm/pinctrl.h>
 #include <mach/ar71xx_regs.h>
diff --git a/drivers/pinctrl/ath79/pinctrl_qca953x.c b/drivers/pinctrl/ath79/pinctrl_qca953x.c
index 3166167d71..c9f9608c92 100644
--- a/drivers/pinctrl/ath79/pinctrl_qca953x.c
+++ b/drivers/pinctrl/ath79/pinctrl_qca953x.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <asm/io.h>
 #include <dm/pinctrl.h>
 #include <mach/ar71xx_regs.h>
diff --git a/drivers/pinctrl/broadcom/pinctrl-bcm283x.c b/drivers/pinctrl/broadcom/pinctrl-bcm283x.c
index eb720f09f8..f44af6cf9a 100644
--- a/drivers/pinctrl/broadcom/pinctrl-bcm283x.c
+++ b/drivers/pinctrl/broadcom/pinctrl-bcm283x.c
@@ -14,6 +14,7 @@
 #include <config.h>
 #include <errno.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/pinctrl.h>
 #include <dm/root.h>
 #include <dm/device-internal.h>
diff --git a/drivers/pinctrl/intel/pinctrl.c b/drivers/pinctrl/intel/pinctrl.c
index e280054f94..ba8206350e 100644
--- a/drivers/pinctrl/intel/pinctrl.c
+++ b/drivers/pinctrl/intel/pinctrl.c
@@ -19,6 +19,7 @@
 #include <common.h>
 #include <dm.h>
 #include <irq.h>
+#include <log.h>
 #include <malloc.h>
 #include <p2sb.h>
 #include <spl.h>
diff --git a/drivers/pinctrl/intel/pinctrl_apl.c b/drivers/pinctrl/intel/pinctrl_apl.c
index bd80435ffa..c14176d4a7 100644
--- a/drivers/pinctrl/intel/pinctrl_apl.c
+++ b/drivers/pinctrl/intel/pinctrl_apl.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <dm.h>
 #include <dt-structs.h>
+#include <log.h>
 #include <p2sb.h>
 #include <asm/intel_pinctrl.h>
 #include <asm-generic/gpio.h>
diff --git a/drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c b/drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c
index b5d74068c5..c6cb941d0a 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c
@@ -4,6 +4,7 @@
  * Copyright (C) 2017 Xingyu Chen <xingyu.chen@amlogic.com>
  */
 
+#include <log.h>
 #include <asm/gpio.h>
 #include <common.h>
 #include <dm.h>
diff --git a/drivers/pinctrl/meson/pinctrl-meson-gx-pmx.c b/drivers/pinctrl/meson/pinctrl-meson-gx-pmx.c
index b37b517fe5..adfc9aedcc 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-gx-pmx.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-gx-pmx.c
@@ -3,6 +3,7 @@
  * (C) Copyright 2016 - Beniamino Galvani <b.galvani@gmail.com>
  */
 
+#include <log.h>
 #include <asm/gpio.h>
 #include <common.h>
 #include <dm.h>
diff --git a/drivers/pinctrl/meson/pinctrl-meson.c b/drivers/pinctrl/meson/pinctrl-meson.c
index 535f491d49..18b8eee883 100644
--- a/drivers/pinctrl/meson/pinctrl-meson.c
+++ b/drivers/pinctrl/meson/pinctrl-meson.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <dm/device-internal.h>
 #include <dm/device_compat.h>
diff --git a/drivers/pinctrl/mvebu/pinctrl-mvebu.c b/drivers/pinctrl/mvebu/pinctrl-mvebu.c
index 0b9c9e1d6a..550de384ed 100644
--- a/drivers/pinctrl/mvebu/pinctrl-mvebu.c
+++ b/drivers/pinctrl/mvebu/pinctrl-mvebu.c
@@ -9,6 +9,7 @@
 #include <fdtdec.h>
 #include <errno.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/pinctrl.h>
 #include <dm/root.h>
 #include <asm/system.h>
diff --git a/drivers/pinctrl/nxp/pinctrl-mxs.c b/drivers/pinctrl/nxp/pinctrl-mxs.c
index 8d61dfe863..a403114f21 100644
--- a/drivers/pinctrl/nxp/pinctrl-mxs.c
+++ b/drivers/pinctrl/nxp/pinctrl-mxs.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <linux/io.h>
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
index 27f274ff02..ff663ab374 100644
--- a/drivers/pinctrl/pinctrl-at91.c
+++ b/drivers/pinctrl/pinctrl-at91.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/pinctrl.h>
 #include <asm/hardware.h>
 #include <linux/io.h>
diff --git a/drivers/pinctrl/pinctrl-sandbox.c b/drivers/pinctrl/pinctrl-sandbox.c
index 3ee75fbbee..dcef38ea5b 100644
--- a/drivers/pinctrl/pinctrl-sandbox.c
+++ b/drivers/pinctrl/pinctrl-sandbox.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/pinctrl.h>
 
 static const char * const sandbox_pins[] = {
diff --git a/drivers/pinctrl/pinctrl_pic32.c b/drivers/pinctrl/pinctrl_pic32.c
index 06f1518c78..ce02d28b90 100644
--- a/drivers/pinctrl/pinctrl_pic32.c
+++ b/drivers/pinctrl/pinctrl_pic32.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <asm/io.h>
 #include <dm/pinctrl.h>
 #include <mach/pic32.h>
diff --git a/drivers/pinctrl/pinctrl_stm32.c b/drivers/pinctrl/pinctrl_stm32.c
index 32038cea8f..14fcacdbed 100644
--- a/drivers/pinctrl/pinctrl_stm32.c
+++ b/drivers/pinctrl/pinctrl_stm32.c
@@ -1,6 +1,7 @@
 #include <common.h>
 #include <dm.h>
 #include <hwspinlock.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/arch/gpio.h>
 #include <asm/gpio.h>
diff --git a/drivers/pinctrl/rockchip/pinctrl-px30.c b/drivers/pinctrl/rockchip/pinctrl-px30.c
index bb56ae9fb3..20ffd249c7 100644
--- a/drivers/pinctrl/rockchip/pinctrl-px30.c
+++ b/drivers/pinctrl/rockchip/pinctrl-px30.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/pinctrl.h>
 #include <regmap.h>
 #include <syscon.h>
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3188.c b/drivers/pinctrl/rockchip/pinctrl-rk3188.c
index 043764fc92..afde809854 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3188.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3188.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/pinctrl.h>
 #include <regmap.h>
 #include <syscon.h>
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk322x.c b/drivers/pinctrl/rockchip/pinctrl-rk322x.c
index c5e4fe30a7..e082eb6a32 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk322x.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk322x.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/pinctrl.h>
 #include <regmap.h>
 #include <syscon.h>
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3288.c b/drivers/pinctrl/rockchip/pinctrl-rk3288.c
index 7ae147f304..2780302585 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3288.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3288.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/pinctrl.h>
 #include <regmap.h>
 
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3308.c b/drivers/pinctrl/rockchip/pinctrl-rk3308.c
index abd57e54a5..0817f7136c 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3308.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3308.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/pinctrl.h>
 #include <regmap.h>
 #include <syscon.h>
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3328.c b/drivers/pinctrl/rockchip/pinctrl-rk3328.c
index 8d37a6f945..990f6811e9 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3328.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3328.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/pinctrl.h>
 #include <regmap.h>
 #include <syscon.h>
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3368.c b/drivers/pinctrl/rockchip/pinctrl-rk3368.c
index 6cb7bb45d9..7a6059959e 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3368.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3368.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/pinctrl.h>
 #include <regmap.h>
 #include <syscon.h>
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3399.c b/drivers/pinctrl/rockchip/pinctrl-rk3399.c
index 75634e9f4d..7647d90eb5 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3399.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3399.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/pinctrl.h>
 #include <regmap.h>
 #include <syscon.h>
diff --git a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c b/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
index 386a13ed87..63aebdb612 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/pinctrl.h>
 #include <regmap.h>
 #include <syscon.h>
diff --git a/drivers/pinctrl/rockchip/pinctrl-rv1108.c b/drivers/pinctrl/rockchip/pinctrl-rv1108.c
index 54610a3e90..653e40b354 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rv1108.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rv1108.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/pinctrl.h>
 #include <regmap.h>
 #include <syscon.h>
diff --git a/drivers/power/acpi_pmc/pmc_emul.c b/drivers/power/acpi_pmc/pmc_emul.c
index dfff335e54..5ed6fcca26 100644
--- a/drivers/power/acpi_pmc/pmc_emul.c
+++ b/drivers/power/acpi_pmc/pmc_emul.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <pci.h>
 #include <asm/test.h>
 #include <power/acpi_pmc.h>
diff --git a/drivers/power/acpi_pmc/sandbox.c b/drivers/power/acpi_pmc/sandbox.c
index 7fbbf97b45..48a6c663bd 100644
--- a/drivers/power/acpi_pmc/sandbox.c
+++ b/drivers/power/acpi_pmc/sandbox.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <asm/io.h>
 #include <power/acpi_pmc.h>
 
diff --git a/drivers/power/battery/bat_trats.c b/drivers/power/battery/bat_trats.c
index 450b1dfa28..f461a37a9f 100644
--- a/drivers/power/battery/bat_trats.c
+++ b/drivers/power/battery/bat_trats.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <console.h>
+#include <log.h>
 #include <power/pmic.h>
 #include <power/battery.h>
 #include <power/max8997_pmic.h>
diff --git a/drivers/power/battery/bat_trats2.c b/drivers/power/battery/bat_trats2.c
index bb21cd7ff8..1172970d1e 100644
--- a/drivers/power/battery/bat_trats2.c
+++ b/drivers/power/battery/bat_trats2.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <power/pmic.h>
 #include <power/battery.h>
 #include <power/max77693_pmic.h>
diff --git a/drivers/power/domain/imx8-power-domain-legacy.c b/drivers/power/domain/imx8-power-domain-legacy.c
index 6f01a60b34..d198eaeddc 100644
--- a/drivers/power/domain/imx8-power-domain-legacy.c
+++ b/drivers/power/domain/imx8-power-domain-legacy.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <power-domain-uclass.h>
 #include <asm/io.h>
diff --git a/drivers/power/domain/imx8-power-domain.c b/drivers/power/domain/imx8-power-domain.c
index 571146e19d..6461ab23d6 100644
--- a/drivers/power/domain/imx8-power-domain.c
+++ b/drivers/power/domain/imx8-power-domain.c
@@ -6,6 +6,7 @@
 #define DEBUG
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <power-domain-uclass.h>
 #include <asm/arch/power-domain.h>
diff --git a/drivers/power/domain/meson-ee-pwrc.c b/drivers/power/domain/meson-ee-pwrc.c
index 7082c80bfa..0fc8cb66d1 100644
--- a/drivers/power/domain/meson-ee-pwrc.c
+++ b/drivers/power/domain/meson-ee-pwrc.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <power-domain-uclass.h>
 #include <regmap.h>
diff --git a/drivers/power/domain/meson-gx-pwrc-vpu.c b/drivers/power/domain/meson-gx-pwrc-vpu.c
index 12cdfcdd1f..6a938bb995 100644
--- a/drivers/power/domain/meson-gx-pwrc-vpu.c
+++ b/drivers/power/domain/meson-gx-pwrc-vpu.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <power-domain-uclass.h>
 #include <regmap.h>
diff --git a/drivers/power/domain/power-domain-uclass.c b/drivers/power/domain/power-domain-uclass.c
index 2b7a1cb8fe..c2c7c3bd50 100644
--- a/drivers/power/domain/power-domain-uclass.c
+++ b/drivers/power/domain/power-domain-uclass.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <power-domain.h>
 #include <power-domain-uclass.h>
diff --git a/drivers/power/domain/sandbox-power-domain.c b/drivers/power/domain/sandbox-power-domain.c
index 3a834a9f1e..4d9a2006e6 100644
--- a/drivers/power/domain/sandbox-power-domain.c
+++ b/drivers/power/domain/sandbox-power-domain.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <power-domain-uclass.h>
 #include <asm/io.h>
diff --git a/drivers/power/domain/tegra186-power-domain.c b/drivers/power/domain/tegra186-power-domain.c
index e87244197f..9cebc7f3f1 100644
--- a/drivers/power/domain/tegra186-power-domain.c
+++ b/drivers/power/domain/tegra186-power-domain.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <misc.h>
 #include <power-domain-uclass.h>
diff --git a/drivers/power/domain/ti-sci-power-domain.c b/drivers/power/domain/ti-sci-power-domain.c
index a5866703ae..7ee121dfb2 100644
--- a/drivers/power/domain/ti-sci-power-domain.c
+++ b/drivers/power/domain/ti-sci-power-domain.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <power-domain-uclass.h>
 #include <dm/device_compat.h>
diff --git a/drivers/power/exynos-tmu.c b/drivers/power/exynos-tmu.c
index 6a662677a7..4fba7b527c 100644
--- a/drivers/power/exynos-tmu.c
+++ b/drivers/power/exynos-tmu.c
@@ -20,6 +20,7 @@
 #include <common.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <tmu.h>
 #include <asm/arch/tmu.h>
 #include <asm/arch/power.h>
diff --git a/drivers/power/fuel_gauge/fg_max17042.c b/drivers/power/fuel_gauge/fg_max17042.c
index 8cfdf654f7..7c7e9a752d 100644
--- a/drivers/power/fuel_gauge/fg_max17042.c
+++ b/drivers/power/fuel_gauge/fg_max17042.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <power/pmic.h>
 #include <power/max17042_fg.h>
 #include <i2c.h>
diff --git a/drivers/power/mfd/fg_max77693.c b/drivers/power/mfd/fg_max77693.c
index 0de9ee712d..983a6d4a2b 100644
--- a/drivers/power/mfd/fg_max77693.c
+++ b/drivers/power/mfd/fg_max77693.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <power/pmic.h>
 #include <power/max77693_fg.h>
 #include <i2c.h>
diff --git a/drivers/power/mfd/muic_max77693.c b/drivers/power/mfd/muic_max77693.c
index 0eb26d29d4..36ee44b9a2 100644
--- a/drivers/power/mfd/muic_max77693.c
+++ b/drivers/power/mfd/muic_max77693.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <power/pmic.h>
 #include <power/power_chrg.h>
 #include <power/max77693_muic.h>
diff --git a/drivers/power/mfd/pmic_max77693.c b/drivers/power/mfd/pmic_max77693.c
index c3bd6c4990..e32a9722a4 100644
--- a/drivers/power/mfd/pmic_max77693.c
+++ b/drivers/power/mfd/pmic_max77693.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <power/pmic.h>
 #include <power/max77693_pmic.h>
 #include <i2c.h>
diff --git a/drivers/power/pmic/act8846.c b/drivers/power/pmic/act8846.c
index 186fa907e1..8f0f5a6d96 100644
--- a/drivers/power/pmic/act8846.c
+++ b/drivers/power/pmic/act8846.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <linux/libfdt.h>
 #include <power/act8846_pmic.h>
 #include <power/pmic.h>
diff --git a/drivers/power/pmic/as3722.c b/drivers/power/pmic/as3722.c
index 54adcbf50f..3aa3cce945 100644
--- a/drivers/power/pmic/as3722.c
+++ b/drivers/power/pmic/as3722.c
@@ -10,6 +10,7 @@
 #include <errno.h>
 #include <fdtdec.h>
 #include <i2c.h>
+#include <log.h>
 #include <dm/lists.h>
 #include <power/as3722.h>
 #include <power/pmic.h>
diff --git a/drivers/power/pmic/bd71837.c b/drivers/power/pmic/bd71837.c
index 2e04298273..31c9139c64 100644
--- a/drivers/power/pmic/bd71837.c
+++ b/drivers/power/pmic/bd71837.c
@@ -7,6 +7,7 @@
 #include <errno.h>
 #include <dm.h>
 #include <i2c.h>
+#include <log.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <power/bd71837.h>
diff --git a/drivers/power/pmic/da9063.c b/drivers/power/pmic/da9063.c
index abda7a5a40..25101d18f7 100644
--- a/drivers/power/pmic/da9063.c
+++ b/drivers/power/pmic/da9063.c
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <dm.h>
 #include <i2c.h>
+#include <log.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <power/da9063_pmic.h>
diff --git a/drivers/power/pmic/fan53555.c b/drivers/power/pmic/fan53555.c
index a5f855ce2a..4d1e686d27 100644
--- a/drivers/power/pmic/fan53555.c
+++ b/drivers/power/pmic/fan53555.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/device-internal.h>
 #include <dm/device_compat.h>
 #include <dm/lists.h>
diff --git a/drivers/power/pmic/i2c_pmic_emul.c b/drivers/power/pmic/i2c_pmic_emul.c
index 86d7b89b1f..404fe008fe 100644
--- a/drivers/power/pmic/i2c_pmic_emul.c
+++ b/drivers/power/pmic/i2c_pmic_emul.c
@@ -8,6 +8,7 @@
 #include <errno.h>
 #include <dm.h>
 #include <i2c.h>
+#include <log.h>
 #include <malloc.h>
 #include <power/pmic.h>
 #include <power/sandbox_pmic.h>
diff --git a/drivers/power/pmic/lp873x.c b/drivers/power/pmic/lp873x.c
index 4ae4043b94..2b1260ec6b 100644
--- a/drivers/power/pmic/lp873x.c
+++ b/drivers/power/pmic/lp873x.c
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <dm.h>
 #include <i2c.h>
+#include <log.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <power/lp873x.h>
diff --git a/drivers/power/pmic/lp87565.c b/drivers/power/pmic/lp87565.c
index 3e5fc608d2..f4a4bd03d7 100644
--- a/drivers/power/pmic/lp87565.c
+++ b/drivers/power/pmic/lp87565.c
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <dm.h>
 #include <i2c.h>
+#include <log.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <power/lp87565.h>
diff --git a/drivers/power/pmic/max77686.c b/drivers/power/pmic/max77686.c
index 8e3a8cf870..9f02c0b6f6 100644
--- a/drivers/power/pmic/max77686.c
+++ b/drivers/power/pmic/max77686.c
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <dm.h>
 #include <i2c.h>
+#include <log.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <power/max77686_pmic.h>
diff --git a/drivers/power/pmic/muic_max8997.c b/drivers/power/pmic/muic_max8997.c
index 241ab35b63..969ce90239 100644
--- a/drivers/power/pmic/muic_max8997.c
+++ b/drivers/power/pmic/muic_max8997.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <power/pmic.h>
 #include <power/power_chrg.h>
 #include <power/max8997_muic.h>
diff --git a/drivers/power/pmic/palmas.c b/drivers/power/pmic/palmas.c
index 36be119b6c..6080cbff0b 100644
--- a/drivers/power/pmic/palmas.c
+++ b/drivers/power/pmic/palmas.c
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <dm.h>
 #include <i2c.h>
+#include <log.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <power/palmas.h>
diff --git a/drivers/power/pmic/pca9450.c b/drivers/power/pmic/pca9450.c
index 77986c47d7..0c9d9a366e 100644
--- a/drivers/power/pmic/pca9450.c
+++ b/drivers/power/pmic/pca9450.c
@@ -8,6 +8,7 @@
 #include <errno.h>
 #include <dm.h>
 #include <i2c.h>
+#include <log.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <power/pca9450.h>
diff --git a/drivers/power/pmic/pfuze100.c b/drivers/power/pmic/pfuze100.c
index db630f3ad0..65c4456977 100644
--- a/drivers/power/pmic/pfuze100.c
+++ b/drivers/power/pmic/pfuze100.c
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <dm.h>
 #include <i2c.h>
+#include <log.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <power/pfuze100_pmic.h>
diff --git a/drivers/power/pmic/pmic-uclass.c b/drivers/power/pmic/pmic-uclass.c
index db68c766f5..7770171917 100644
--- a/drivers/power/pmic/pmic-uclass.c
+++ b/drivers/power/pmic/pmic-uclass.c
@@ -8,6 +8,7 @@
 #include <fdtdec.h>
 #include <errno.h>
 #include <dm.h>
+#include <log.h>
 #include <vsprintf.h>
 #include <dm/lists.h>
 #include <dm/device-internal.h>
diff --git a/drivers/power/pmic/pmic_max8997.c b/drivers/power/pmic/pmic_max8997.c
index 87c438ea04..1d834ff713 100644
--- a/drivers/power/pmic/pmic_max8997.c
+++ b/drivers/power/pmic/pmic_max8997.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <power/pmic.h>
 #include <power/max8997_pmic.h>
 #include <i2c.h>
diff --git a/drivers/power/pmic/pmic_tps65910_dm.c b/drivers/power/pmic/pmic_tps65910_dm.c
index 489af59b41..e03ddc98d7 100644
--- a/drivers/power/pmic/pmic_tps65910_dm.c
+++ b/drivers/power/pmic/pmic_tps65910_dm.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <i2c.h>
+#include <log.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <power/tps65910_pmic.h>
diff --git a/drivers/power/pmic/rk8xx.c b/drivers/power/pmic/rk8xx.c
index 52e6d9d8c0..195884bde9 100644
--- a/drivers/power/pmic/rk8xx.c
+++ b/drivers/power/pmic/rk8xx.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <power/rk8xx_pmic.h>
 #include <power/pmic.h>
 
diff --git a/drivers/power/pmic/rn5t567.c b/drivers/power/pmic/rn5t567.c
index f238396d36..d9a8298ebb 100644
--- a/drivers/power/pmic/rn5t567.c
+++ b/drivers/power/pmic/rn5t567.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <linux/libfdt.h>
 #include <power/rn5t567_pmic.h>
 #include <power/pmic.h>
diff --git a/drivers/power/pmic/s2mps11.c b/drivers/power/pmic/s2mps11.c
index f2aab6c457..1ba1640a8d 100644
--- a/drivers/power/pmic/s2mps11.c
+++ b/drivers/power/pmic/s2mps11.c
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <dm.h>
 #include <i2c.h>
+#include <log.h>
 #include <power/pmic.h>
 #include <power/s2mps11.h>
 
diff --git a/drivers/power/pmic/s5m8767.c b/drivers/power/pmic/s5m8767.c
index b5ddd4930e..db6d0357ee 100644
--- a/drivers/power/pmic/s5m8767.c
+++ b/drivers/power/pmic/s5m8767.c
@@ -8,6 +8,7 @@
 #include <errno.h>
 #include <dm.h>
 #include <i2c.h>
+#include <log.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <power/s5m8767.h>
diff --git a/drivers/power/pmic/tps65090.c b/drivers/power/pmic/tps65090.c
index 5b1d19f3e0..b81df0dff1 100644
--- a/drivers/power/pmic/tps65090.c
+++ b/drivers/power/pmic/tps65090.c
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <fdtdec.h>
 #include <i2c.h>
+#include <log.h>
 #include <power/pmic.h>
 #include <power/tps65090.h>
 
diff --git a/drivers/power/pmic/tps65941.c b/drivers/power/pmic/tps65941.c
index 7b3416ae6e..3dfc1918d5 100644
--- a/drivers/power/pmic/tps65941.c
+++ b/drivers/power/pmic/tps65941.c
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <dm.h>
 #include <i2c.h>
+#include <log.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <power/tps65941.h>
diff --git a/drivers/power/power_core.c b/drivers/power/power_core.c
index 5a18dedada..eeed8e24a9 100644
--- a/drivers/power/power_core.c
+++ b/drivers/power/power_core.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <log.h>
 #include <malloc.h>
 #include <linux/types.h>
 #include <linux/list.h>
diff --git a/drivers/power/power_dialog.c b/drivers/power/power_dialog.c
index 9ecd358100..e286dd108f 100644
--- a/drivers/power/power_dialog.c
+++ b/drivers/power/power_dialog.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <power/pmic.h>
 #include <dialog_pmic.h>
 #include <errno.h>
diff --git a/drivers/power/power_i2c.c b/drivers/power/power_i2c.c
index b30f223a5c..5a0455e119 100644
--- a/drivers/power/power_i2c.c
+++ b/drivers/power/power_i2c.c
@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <linux/types.h>
 #include <power/pmic.h>
 #include <i2c.h>
diff --git a/drivers/power/regulator/as3722_regulator.c b/drivers/power/regulator/as3722_regulator.c
index a0703c9e05..0fee9bf00b 100644
--- a/drivers/power/regulator/as3722_regulator.c
+++ b/drivers/power/regulator/as3722_regulator.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <power/as3722.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
diff --git a/drivers/power/regulator/bd71837.c b/drivers/power/regulator/bd71837.c
index 575429aa2d..850b533b84 100644
--- a/drivers/power/regulator/bd71837.c
+++ b/drivers/power/regulator/bd71837.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <power/bd71837.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
diff --git a/drivers/power/regulator/fan53555.c b/drivers/power/regulator/fan53555.c
index 24a9b67586..fa92fd84f9 100644
--- a/drivers/power/regulator/fan53555.c
+++ b/drivers/power/regulator/fan53555.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <i2c.h>
+#include <log.h>
 #include <asm/gpio.h>
 #include <power/fan53555.h>
 #include <power/pmic.h>
diff --git a/drivers/power/regulator/fixed.c b/drivers/power/regulator/fixed.c
index 763e671d54..f9f9659621 100644
--- a/drivers/power/regulator/fixed.c
+++ b/drivers/power/regulator/fixed.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <errno.h>
 #include <dm.h>
+#include <log.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 
diff --git a/drivers/power/regulator/gpio-regulator.c b/drivers/power/regulator/gpio-regulator.c
index ec1dcb64b3..cf3fbae79d 100644
--- a/drivers/power/regulator/gpio-regulator.c
+++ b/drivers/power/regulator/gpio-regulator.c
@@ -10,6 +10,7 @@
 #include <errno.h>
 #include <dm.h>
 #include <i2c.h>
+#include <log.h>
 #include <asm/gpio.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
diff --git a/drivers/power/regulator/lp87565_regulator.c b/drivers/power/regulator/lp87565_regulator.c
index f438dea8fc..4ea6c346d7 100644
--- a/drivers/power/regulator/lp87565_regulator.c
+++ b/drivers/power/regulator/lp87565_regulator.c
@@ -11,6 +11,7 @@
 #include <errno.h>
 #include <dm.h>
 #include <i2c.h>
+#include <log.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <power/lp87565.h>
diff --git a/drivers/power/regulator/pbias_regulator.c b/drivers/power/regulator/pbias_regulator.c
index 60255eeab0..db8c5a949c 100644
--- a/drivers/power/regulator/pbias_regulator.c
+++ b/drivers/power/regulator/pbias_regulator.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <errno.h>
 #include <dm.h>
+#include <log.h>
 #include <linux/err.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
diff --git a/drivers/power/regulator/pfuze100.c b/drivers/power/regulator/pfuze100.c
index d6d35f3a39..b56843046f 100644
--- a/drivers/power/regulator/pfuze100.c
+++ b/drivers/power/regulator/pfuze100.c
@@ -10,6 +10,7 @@
 #include <errno.h>
 #include <dm.h>
 #include <i2c.h>
+#include <log.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <power/pfuze100_pmic.h>
diff --git a/drivers/power/regulator/pwm_regulator.c b/drivers/power/regulator/pwm_regulator.c
index 4030144dd3..f870622705 100644
--- a/drivers/power/regulator/pwm_regulator.c
+++ b/drivers/power/regulator/pwm_regulator.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <pwm.h>
 #include <dm/device_compat.h>
 #include <power/regulator.h>
diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/regulator/regulator-uclass.c
index c9d26344d7..b959c469ec 100644
--- a/drivers/power/regulator/regulator-uclass.c
+++ b/drivers/power/regulator/regulator-uclass.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <errno.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/uclass-internal.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
diff --git a/drivers/power/regulator/regulator_common.c b/drivers/power/regulator/regulator_common.c
index 33b73b7c2f..637db02434 100644
--- a/drivers/power/regulator/regulator_common.c
+++ b/drivers/power/regulator/regulator_common.c
@@ -6,6 +6,7 @@
 
 #include "regulator_common.h"
 #include <common.h>
+#include <log.h>
 #include <power/regulator.h>
 
 int regulator_common_ofdata_to_platdata(struct udevice *dev,
diff --git a/drivers/power/regulator/rk8xx.c b/drivers/power/regulator/rk8xx.c
index e99331f6c9..a08e2151f9 100644
--- a/drivers/power/regulator/rk8xx.c
+++ b/drivers/power/regulator/rk8xx.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <power/rk8xx_pmic.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
diff --git a/drivers/power/regulator/tps65090_regulator.c b/drivers/power/regulator/tps65090_regulator.c
index 0bcf1a61ea..6dfec89336 100644
--- a/drivers/power/regulator/tps65090_regulator.c
+++ b/drivers/power/regulator/tps65090_regulator.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <power/tps65090.h>
diff --git a/drivers/power/regulator/tps65910_regulator.c b/drivers/power/regulator/tps65910_regulator.c
index 12e66ebd43..171afd34a5 100644
--- a/drivers/power/regulator/tps65910_regulator.c
+++ b/drivers/power/regulator/tps65910_regulator.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <power/tps65910_pmic.h>
diff --git a/drivers/power/regulator/tps65941_regulator.c b/drivers/power/regulator/tps65941_regulator.c
index a00ef58129..3f8be6c8e4 100644
--- a/drivers/power/regulator/tps65941_regulator.c
+++ b/drivers/power/regulator/tps65941_regulator.c
@@ -11,6 +11,7 @@
 #include <errno.h>
 #include <dm.h>
 #include <i2c.h>
+#include <log.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <power/tps65941.h>
diff --git a/drivers/power/tps6586x.c b/drivers/power/tps6586x.c
index 19680e2e76..8c61a41b20 100644
--- a/drivers/power/tps6586x.c
+++ b/drivers/power/tps6586x.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <tps6586x.h>
 #include <asm/io.h>
 #include <i2c.h>
diff --git a/drivers/pwm/exynos_pwm.c b/drivers/pwm/exynos_pwm.c
index 1c829d286b..fed1583796 100644
--- a/drivers/pwm/exynos_pwm.c
+++ b/drivers/pwm/exynos_pwm.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <pwm.h>
 #include <asm/io.h>
 #include <asm/arch/clk.h>
diff --git a/drivers/pwm/pwm-imx.c b/drivers/pwm/pwm-imx.c
index 8d8f3e6f9f..f5b9544cb8 100644
--- a/drivers/pwm/pwm-imx.c
+++ b/drivers/pwm/pwm-imx.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <div64.h>
 #include <dm.h>
+#include <log.h>
 #include <pwm.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/io.h>
diff --git a/drivers/pwm/rk_pwm.c b/drivers/pwm/rk_pwm.c
index 46888e9077..66eb0e72fe 100644
--- a/drivers/pwm/rk_pwm.c
+++ b/drivers/pwm/rk_pwm.c
@@ -8,6 +8,7 @@
 #include <clk.h>
 #include <div64.h>
 #include <dm.h>
+#include <log.h>
 #include <pwm.h>
 #include <regmap.h>
 #include <syscon.h>
diff --git a/drivers/pwm/sunxi_pwm.c b/drivers/pwm/sunxi_pwm.c
index 8a55e4f461..56215dbf6c 100644
--- a/drivers/pwm/sunxi_pwm.c
+++ b/drivers/pwm/sunxi_pwm.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <div64.h>
 #include <dm.h>
+#include <log.h>
 #include <pwm.h>
 #include <regmap.h>
 #include <syscon.h>
diff --git a/drivers/pwm/tegra_pwm.c b/drivers/pwm/tegra_pwm.c
index 02c3650ec6..5e98d0fc2c 100644
--- a/drivers/pwm/tegra_pwm.c
+++ b/drivers/pwm/tegra_pwm.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <pwm.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
diff --git a/drivers/qe/uec.c b/drivers/qe/uec.c
index 69cdf9444a..4ab0e21d21 100644
--- a/drivers/qe/uec.c
+++ b/drivers/qe/uec.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <net.h>
 #include <malloc.h>
 #include <linux/errno.h>
diff --git a/drivers/ram/imxrt_sdram.c b/drivers/ram/imxrt_sdram.c
index 6e20432f31..b9831ec8b1 100644
--- a/drivers/ram/imxrt_sdram.c
+++ b/drivers/ram/imxrt_sdram.c
@@ -8,6 +8,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <init.h>
+#include <log.h>
 #include <ram.h>
 #include <asm/io.h>
 #include <linux/err.h>
diff --git a/drivers/ram/k3-am654-ddrss.c b/drivers/ram/k3-am654-ddrss.c
index 8cf74861a8..8bbd8cfa83 100644
--- a/drivers/ram/k3-am654-ddrss.c
+++ b/drivers/ram/k3-am654-ddrss.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <clk.h>
 #include <dm.h>
+#include <log.h>
 #include <ram.h>
 #include <asm/io.h>
 #include <power-domain.h>
diff --git a/drivers/ram/k3-j721e/k3-j721e-ddrss.c b/drivers/ram/k3-j721e/k3-j721e-ddrss.c
index 352483c4d7..d647a8a209 100644
--- a/drivers/ram/k3-j721e/k3-j721e-ddrss.c
+++ b/drivers/ram/k3-j721e/k3-j721e-ddrss.c
@@ -9,6 +9,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <hang.h>
+#include <log.h>
 #include <ram.h>
 #include <asm/io.h>
 #include <power-domain.h>
diff --git a/drivers/ram/mpc83xx_sdram.c b/drivers/ram/mpc83xx_sdram.c
index 46449d3d12..e97467029f 100644
--- a/drivers/ram/mpc83xx_sdram.c
+++ b/drivers/ram/mpc83xx_sdram.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <init.h>
+#include <log.h>
 #include <ram.h>
 #include <dt-bindings/memory/mpc83xx-sdram.h>
 
diff --git a/drivers/ram/rockchip/dmc-rk3368.c b/drivers/ram/rockchip/dmc-rk3368.c
index 2d82a176db..8dc4738920 100644
--- a/drivers/ram/rockchip/dmc-rk3368.c
+++ b/drivers/ram/rockchip/dmc-rk3368.c
@@ -7,6 +7,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <hang.h>
+#include <log.h>
 #include <dt-bindings/memory/rk3368-dmc.h>
 #include <dt-structs.h>
 #include <ram.h>
diff --git a/drivers/ram/rockchip/sdram_px30.c b/drivers/ram/rockchip/sdram_px30.c
index ac7d96540f..67f494c7f1 100644
--- a/drivers/ram/rockchip/sdram_px30.c
+++ b/drivers/ram/rockchip/sdram_px30.c
@@ -7,6 +7,7 @@
 #include <debug_uart.h>
 #include <dm.h>
 #include <init.h>
+#include <log.h>
 #include <ram.h>
 #include <syscon.h>
 #include <asm/io.h>
diff --git a/drivers/ram/rockchip/sdram_rk3128.c b/drivers/ram/rockchip/sdram_rk3128.c
index 8486653c6f..0162955aae 100644
--- a/drivers/ram/rockchip/sdram_rk3128.c
+++ b/drivers/ram/rockchip/sdram_rk3128.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <ram.h>
 #include <syscon.h>
 #include <asm/arch-rockchip/clock.h>
diff --git a/drivers/ram/rockchip/sdram_rk3188.c b/drivers/ram/rockchip/sdram_rk3188.c
index 4f3ed739fb..cc9bd02c16 100644
--- a/drivers/ram/rockchip/sdram_rk3188.c
+++ b/drivers/ram/rockchip/sdram_rk3188.c
@@ -13,6 +13,7 @@
 #include <errno.h>
 #include <hang.h>
 #include <init.h>
+#include <log.h>
 #include <ram.h>
 #include <regmap.h>
 #include <syscon.h>
diff --git a/drivers/ram/rockchip/sdram_rk3288.c b/drivers/ram/rockchip/sdram_rk3288.c
index 23fd7956a7..2e6186d38d 100644
--- a/drivers/ram/rockchip/sdram_rk3288.c
+++ b/drivers/ram/rockchip/sdram_rk3288.c
@@ -13,6 +13,7 @@
 #include <errno.h>
 #include <hang.h>
 #include <init.h>
+#include <log.h>
 #include <ram.h>
 #include <regmap.h>
 #include <syscon.h>
diff --git a/drivers/ram/rockchip/sdram_rk3328.c b/drivers/ram/rockchip/sdram_rk3328.c
index 36e0d2e840..f01301068e 100644
--- a/drivers/ram/rockchip/sdram_rk3328.c
+++ b/drivers/ram/rockchip/sdram_rk3328.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <dt-structs.h>
 #include <init.h>
+#include <log.h>
 #include <ram.h>
 #include <regmap.h>
 #include <syscon.h>
diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c
index 7b95c954a6..9d2d3cf510 100644
--- a/drivers/ram/rockchip/sdram_rk3399.c
+++ b/drivers/ram/rockchip/sdram_rk3399.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <dt-structs.h>
 #include <init.h>
+#include <log.h>
 #include <ram.h>
 #include <regmap.h>
 #include <syscon.h>
diff --git a/drivers/ram/stm32_sdram.c b/drivers/ram/stm32_sdram.c
index 2e06b526e2..d9b1b24f03 100644
--- a/drivers/ram/stm32_sdram.c
+++ b/drivers/ram/stm32_sdram.c
@@ -8,6 +8,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <init.h>
+#include <log.h>
 #include <ram.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
diff --git a/drivers/ram/stm32mp1/stm32mp1_ddr.c b/drivers/ram/stm32mp1/stm32mp1_ddr.c
index 11b14ae652..f10ecdd2ef 100644
--- a/drivers/ram/stm32mp1/stm32mp1_ddr.c
+++ b/drivers/ram/stm32mp1/stm32mp1_ddr.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <clk.h>
+#include <log.h>
 #include <ram.h>
 #include <reset.h>
 #include <timer.h>
diff --git a/drivers/ram/stm32mp1/stm32mp1_interactive.c b/drivers/ram/stm32mp1/stm32mp1_interactive.c
index 47e176b282..38390c0d55 100644
--- a/drivers/ram/stm32mp1/stm32mp1_interactive.c
+++ b/drivers/ram/stm32mp1/stm32mp1_interactive.c
@@ -8,6 +8,7 @@
 #include <console.h>
 #include <cli.h>
 #include <clk.h>
+#include <log.h>
 #include <malloc.h>
 #include <ram.h>
 #include <reset.h>
diff --git a/drivers/ram/stm32mp1/stm32mp1_ram.c b/drivers/ram/stm32mp1/stm32mp1_ram.c
index 7b1adc5b24..0086b547a5 100644
--- a/drivers/ram/stm32mp1/stm32mp1_ram.c
+++ b/drivers/ram/stm32mp1/stm32mp1_ram.c
@@ -7,6 +7,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <init.h>
+#include <log.h>
 #include <ram.h>
 #include <regmap.h>
 #include <syscon.h>
diff --git a/drivers/ram/stm32mp1/stm32mp1_tests.c b/drivers/ram/stm32mp1/stm32mp1_tests.c
index 3325dfef2b..bacdd74705 100644
--- a/drivers/ram/stm32mp1/stm32mp1_tests.c
+++ b/drivers/ram/stm32mp1/stm32mp1_tests.c
@@ -5,6 +5,7 @@
 #include <common.h>
 #include <console.h>
 #include <init.h>
+#include <log.h>
 #include <rand.h>
 #include <watchdog.h>
 #include <asm/io.h>
diff --git a/drivers/ram/stm32mp1/stm32mp1_tuning.c b/drivers/ram/stm32mp1/stm32mp1_tuning.c
index d00f465cd5..d2c3e89fa6 100644
--- a/drivers/ram/stm32mp1/stm32mp1_tuning.c
+++ b/drivers/ram/stm32mp1/stm32mp1_tuning.c
@@ -5,6 +5,7 @@
 #include <common.h>
 #include <console.h>
 #include <clk.h>
+#include <log.h>
 #include <ram.h>
 #include <rand.h>
 #include <reset.h>
diff --git a/drivers/remoteproc/k3_system_controller.c b/drivers/remoteproc/k3_system_controller.c
index 88430299c9..54209fccb3 100644
--- a/drivers/remoteproc/k3_system_controller.c
+++ b/drivers/remoteproc/k3_system_controller.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <remoteproc.h>
 #include <errno.h>
 #include <mailbox.h>
diff --git a/drivers/remoteproc/rproc-elf-loader.c b/drivers/remoteproc/rproc-elf-loader.c
index d308100cf4..c464ecebb7 100644
--- a/drivers/remoteproc/rproc-elf-loader.c
+++ b/drivers/remoteproc/rproc-elf-loader.c
@@ -6,6 +6,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <elf.h>
+#include <log.h>
 #include <remoteproc.h>
 #include <asm/cache.h>
 #include <dm/device_compat.h>
diff --git a/drivers/remoteproc/rproc-uclass.c b/drivers/remoteproc/rproc-uclass.c
index c8a41a6332..9640a81e53 100644
--- a/drivers/remoteproc/rproc-uclass.c
+++ b/drivers/remoteproc/rproc-uclass.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <malloc.h>
 #include <remoteproc.h>
 #include <asm/io.h>
diff --git a/drivers/remoteproc/sandbox_testproc.c b/drivers/remoteproc/sandbox_testproc.c
index eeee49c4dd..2b58b27947 100644
--- a/drivers/remoteproc/sandbox_testproc.c
+++ b/drivers/remoteproc/sandbox_testproc.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <remoteproc.h>
 #include <asm/io.h>
 
diff --git a/drivers/remoteproc/stm32_copro.c b/drivers/remoteproc/stm32_copro.c
index e9dce0d173..33b574b1bd 100644
--- a/drivers/remoteproc/stm32_copro.c
+++ b/drivers/remoteproc/stm32_copro.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <regmap.h>
 #include <remoteproc.h>
 #include <reset.h>
diff --git a/drivers/remoteproc/ti_k3_dsp_rproc.c b/drivers/remoteproc/ti_k3_dsp_rproc.c
index 1fc8193ad9..3361555c53 100644
--- a/drivers/remoteproc/ti_k3_dsp_rproc.c
+++ b/drivers/remoteproc/ti_k3_dsp_rproc.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <remoteproc.h>
 #include <errno.h>
diff --git a/drivers/remoteproc/ti_k3_r5f_rproc.c b/drivers/remoteproc/ti_k3_r5f_rproc.c
index c01b29d90f..1a7f1f8a00 100644
--- a/drivers/remoteproc/ti_k3_r5f_rproc.c
+++ b/drivers/remoteproc/ti_k3_r5f_rproc.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <remoteproc.h>
 #include <errno.h>
diff --git a/drivers/remoteproc/ti_power_proc.c b/drivers/remoteproc/ti_power_proc.c
index f9660d4511..350450d1fb 100644
--- a/drivers/remoteproc/ti_power_proc.c
+++ b/drivers/remoteproc/ti_power_proc.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <remoteproc.h>
 #include <mach/psc_defs.h>
 
diff --git a/drivers/reset/ast2500-reset.c b/drivers/reset/ast2500-reset.c
index d1d44f3728..beb5cd8fa8 100644
--- a/drivers/reset/ast2500-reset.c
+++ b/drivers/reset/ast2500-reset.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <misc.h>
 #include <reset.h>
 #include <reset-uclass.h>
diff --git a/drivers/reset/reset-bcm6345.c b/drivers/reset/reset-bcm6345.c
index c1f1e7f70b..20ea16d37c 100644
--- a/drivers/reset/reset-bcm6345.c
+++ b/drivers/reset/reset-bcm6345.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <reset-uclass.h>
 #include <asm/io.h>
diff --git a/drivers/reset/reset-hisilicon.c b/drivers/reset/reset-hisilicon.c
index a678b8f745..e7bec9cd7c 100644
--- a/drivers/reset/reset-hisilicon.c
+++ b/drivers/reset/reset-hisilicon.c
@@ -3,6 +3,7 @@
  * Copyright (c) 2019, Linaro Limited
  */
 
+#include <log.h>
 #include <malloc.h>
 #include <asm/io.h>
 #include <common.h>
diff --git a/drivers/reset/reset-hsdk.c b/drivers/reset/reset-hsdk.c
index f9a432a7a2..149eaef0e9 100644
--- a/drivers/reset/reset-hsdk.c
+++ b/drivers/reset/reset-hsdk.c
@@ -6,6 +6,7 @@
  * Author: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
  */
 
+#include <log.h>
 #include <asm/io.h>
 #include <common.h>
 #include <dm.h>
diff --git a/drivers/reset/reset-imx7.c b/drivers/reset/reset-imx7.c
index a61855e9ed..bbbca13925 100644
--- a/drivers/reset/reset-imx7.c
+++ b/drivers/reset/reset-imx7.c
@@ -3,6 +3,7 @@
  * Copyright (c) 2017, Impinj, Inc.
  */
 
+#include <log.h>
 #include <malloc.h>
 #include <asm/io.h>
 #include <common.h>
diff --git a/drivers/reset/reset-mediatek.c b/drivers/reset/reset-mediatek.c
index 6d17f52ac7..9f2e809aa4 100644
--- a/drivers/reset/reset-mediatek.c
+++ b/drivers/reset/reset-mediatek.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <dm/lists.h>
 #include <regmap.h>
diff --git a/drivers/reset/reset-meson.c b/drivers/reset/reset-meson.c
index 70f96355b3..461c0ccb7a 100644
--- a/drivers/reset/reset-meson.c
+++ b/drivers/reset/reset-meson.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <reset-uclass.h>
 #include <regmap.h>
diff --git a/drivers/reset/reset-mtmips.c b/drivers/reset/reset-mtmips.c
index 677de0a6f9..a79a4acd67 100644
--- a/drivers/reset/reset-mtmips.c
+++ b/drivers/reset/reset-mtmips.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <reset-uclass.h>
 #include <linux/io.h>
diff --git a/drivers/reset/reset-rockchip.c b/drivers/reset/reset-rockchip.c
index 100afc8103..7c30919215 100644
--- a/drivers/reset/reset-rockchip.c
+++ b/drivers/reset/reset-rockchip.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <reset-uclass.h>
 #include <linux/io.h>
diff --git a/drivers/reset/reset-socfpga.c b/drivers/reset/reset-socfpga.c
index c0930a624b..830eda9430 100644
--- a/drivers/reset/reset-socfpga.c
+++ b/drivers/reset/reset-socfpga.c
@@ -14,6 +14,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <dm/lists.h>
 #include <dm/of_access.h>
diff --git a/drivers/reset/reset-sunxi.c b/drivers/reset/reset-sunxi.c
index f21bf3b1ae..48c24ed44d 100644
--- a/drivers/reset/reset-sunxi.c
+++ b/drivers/reset/reset-sunxi.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <reset-uclass.h>
 #include <asm/io.h>
diff --git a/drivers/reset/reset-ti-sci.c b/drivers/reset/reset-ti-sci.c
index f5d82b5681..95cd388587 100644
--- a/drivers/reset/reset-ti-sci.c
+++ b/drivers/reset/reset-ti-sci.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <reset-uclass.h>
 #include <dm/device_compat.h>
diff --git a/drivers/reset/reset-uclass.c b/drivers/reset/reset-uclass.c
index 8ec8e462e6..5e38ce5c06 100644
--- a/drivers/reset/reset-uclass.c
+++ b/drivers/reset/reset-uclass.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <malloc.h>
 #include <reset.h>
 #include <reset-uclass.h>
diff --git a/drivers/reset/reset-uniphier.c b/drivers/reset/reset-uniphier.c
index 348f3886d1..06079d2a9c 100644
--- a/drivers/reset/reset-uniphier.c
+++ b/drivers/reset/reset-uniphier.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <reset-uclass.h>
 #include <dm/device_compat.h>
diff --git a/drivers/reset/sandbox-reset-test.c b/drivers/reset/sandbox-reset-test.c
index ae79be0730..9bc4a7e0de 100644
--- a/drivers/reset/sandbox-reset-test.c
+++ b/drivers/reset/sandbox-reset-test.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <reset.h>
 #include <asm/io.h>
diff --git a/drivers/reset/sandbox-reset.c b/drivers/reset/sandbox-reset.c
index bdf53a3de9..7a6f7f676c 100644
--- a/drivers/reset/sandbox-reset.c
+++ b/drivers/reset/sandbox-reset.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <reset-uclass.h>
 #include <asm/io.h>
diff --git a/drivers/reset/sti-reset.c b/drivers/reset/sti-reset.c
index 31b3e48e0e..ab67bc02de 100644
--- a/drivers/reset/sti-reset.c
+++ b/drivers/reset/sti-reset.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <wait_bit.h>
 #include <dm.h>
diff --git a/drivers/reset/stm32-reset.c b/drivers/reset/stm32-reset.c
index 5dda522a4e..47ed140166 100644
--- a/drivers/reset/stm32-reset.c
+++ b/drivers/reset/stm32-reset.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <reset-uclass.h>
 #include <stm32_rcc.h>
diff --git a/drivers/reset/tegra-car-reset.c b/drivers/reset/tegra-car-reset.c
index 23c6facff2..a33d4533a8 100644
--- a/drivers/reset/tegra-car-reset.c
+++ b/drivers/reset/tegra-car-reset.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <reset-uclass.h>
 #include <asm/arch/clock.h>
diff --git a/drivers/reset/tegra186-reset.c b/drivers/reset/tegra186-reset.c
index e85f42b3a3..c60a03f0bf 100644
--- a/drivers/reset/tegra186-reset.c
+++ b/drivers/reset/tegra186-reset.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <misc.h>
 #include <reset-uclass.h>
diff --git a/drivers/rng/stm32mp1_rng.c b/drivers/rng/stm32mp1_rng.c
index e0f0a66c6e..7ee7471875 100644
--- a/drivers/rng/stm32mp1_rng.c
+++ b/drivers/rng/stm32mp1_rng.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <clk.h>
 #include <dm.h>
+#include <log.h>
 #include <reset.h>
 #include <rng.h>
 
diff --git a/drivers/rtc/davinci.c b/drivers/rtc/davinci.c
index b6930bd839..3514e7351e 100644
--- a/drivers/rtc/davinci.c
+++ b/drivers/rtc/davinci.c
@@ -5,6 +5,7 @@
  */
 #include <common.h>
 #include <command.h>
+#include <log.h>
 #include <rtc.h>
 #include <asm/io.h>
 #include <asm/davinci_rtc.h>
diff --git a/drivers/rtc/ds1307.c b/drivers/rtc/ds1307.c
index a33f47525f..17344d4d4f 100644
--- a/drivers/rtc/ds1307.c
+++ b/drivers/rtc/ds1307.c
@@ -16,6 +16,7 @@
 #include <common.h>
 #include <command.h>
 #include <dm.h>
+#include <log.h>
 #include <rtc.h>
 #include <i2c.h>
 
diff --git a/drivers/rtc/ds1337.c b/drivers/rtc/ds1337.c
index af94bcfdf4..4986c96f86 100644
--- a/drivers/rtc/ds1337.c
+++ b/drivers/rtc/ds1337.c
@@ -14,6 +14,7 @@
 #include <common.h>
 #include <command.h>
 #include <dm.h>
+#include <log.h>
 #include <rtc.h>
 #include <i2c.h>
 
diff --git a/drivers/rtc/ds3231.c b/drivers/rtc/ds3231.c
index eb5ce73a76..5b72e86768 100644
--- a/drivers/rtc/ds3231.c
+++ b/drivers/rtc/ds3231.c
@@ -17,6 +17,7 @@
 #include <common.h>
 #include <command.h>
 #include <dm.h>
+#include <log.h>
 #include <rtc.h>
 #include <i2c.h>
 
diff --git a/drivers/rtc/ftrtc010.c b/drivers/rtc/ftrtc010.c
index b68ea223f7..67c2b6e320 100644
--- a/drivers/rtc/ftrtc010.c
+++ b/drivers/rtc/ftrtc010.c
@@ -8,6 +8,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <log.h>
 #include <rtc.h>
 #include <asm/io.h>
 
diff --git a/drivers/rtc/i2c_rtc_emul.c b/drivers/rtc/i2c_rtc_emul.c
index d4b33e59d6..a010af411b 100644
--- a/drivers/rtc/i2c_rtc_emul.c
+++ b/drivers/rtc/i2c_rtc_emul.c
@@ -16,6 +16,7 @@
 #include <common.h>
 #include <dm.h>
 #include <i2c.h>
+#include <log.h>
 #include <os.h>
 #include <rtc.h>
 #include <asm/rtc.h>
diff --git a/drivers/rtc/m41t11.c b/drivers/rtc/m41t11.c
index b09d08d65c..706b7188cf 100644
--- a/drivers/rtc/m41t11.c
+++ b/drivers/rtc/m41t11.c
@@ -13,6 +13,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <log.h>
 #include <rtc.h>
 #include <i2c.h>
 
diff --git a/drivers/rtc/m41t60.c b/drivers/rtc/m41t60.c
index 532d2105e1..692042b935 100644
--- a/drivers/rtc/m41t60.c
+++ b/drivers/rtc/m41t60.c
@@ -18,6 +18,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <log.h>
 #include <rtc.h>
 #include <i2c.h>
 
diff --git a/drivers/rtc/m41t62.c b/drivers/rtc/m41t62.c
index f52e1291a9..94a6b523aa 100644
--- a/drivers/rtc/m41t62.c
+++ b/drivers/rtc/m41t62.c
@@ -19,6 +19,7 @@
 #include <common.h>
 #include <command.h>
 #include <dm.h>
+#include <log.h>
 #include <rtc.h>
 #include <i2c.h>
 
diff --git a/drivers/rtc/pcf2127.c b/drivers/rtc/pcf2127.c
index b34ed63bf0..c423960b34 100644
--- a/drivers/rtc/pcf2127.c
+++ b/drivers/rtc/pcf2127.c
@@ -9,6 +9,7 @@
 #include <command.h>
 #include <dm.h>
 #include <i2c.h>
+#include <log.h>
 #include <rtc.h>
 
 #define PCF2127_REG_CTRL1	0x00
diff --git a/drivers/rtc/pcf8563.c b/drivers/rtc/pcf8563.c
index 84f2b231c2..19faefba7c 100644
--- a/drivers/rtc/pcf8563.c
+++ b/drivers/rtc/pcf8563.c
@@ -13,6 +13,7 @@
 #include <common.h>
 #include <command.h>
 #include <dm.h>
+#include <log.h>
 #include <rtc.h>
 #include <i2c.h>
 
diff --git a/drivers/rtc/pl031.c b/drivers/rtc/pl031.c
index 8bf04f26a3..1b6717232c 100644
--- a/drivers/rtc/pl031.c
+++ b/drivers/rtc/pl031.c
@@ -10,6 +10,7 @@
 #include <command.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <rtc.h>
 #include <asm/io.h>
 #include <asm/types.h>
diff --git a/drivers/rtc/pt7c4338.c b/drivers/rtc/pt7c4338.c
index 5211d07586..c987494b66 100644
--- a/drivers/rtc/pt7c4338.c
+++ b/drivers/rtc/pt7c4338.c
@@ -21,6 +21,7 @@
 #include <common.h>
 #include <command.h>
 #include <dm.h>
+#include <log.h>
 #include <rtc.h>
 #include <i2c.h>
 
diff --git a/drivers/rtc/rtc-uclass.c b/drivers/rtc/rtc-uclass.c
index a0a238aedd..926cca234e 100644
--- a/drivers/rtc/rtc-uclass.c
+++ b/drivers/rtc/rtc-uclass.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <rtc.h>
 
 int dm_rtc_get(struct udevice *dev, struct rtc_time *time)
diff --git a/drivers/rtc/rv3029.c b/drivers/rtc/rv3029.c
index 87c4320d5f..5e1689a91d 100644
--- a/drivers/rtc/rv3029.c
+++ b/drivers/rtc/rv3029.c
@@ -12,6 +12,7 @@
 #include <dm.h>
 #include <eeprom.h>
 #include <i2c.h>
+#include <log.h>
 #include <rtc.h>
 #include <dm/device_compat.h>
 
diff --git a/drivers/rtc/rv8803.c b/drivers/rtc/rv8803.c
index 2ab40f0833..7f56b155fc 100644
--- a/drivers/rtc/rv8803.c
+++ b/drivers/rtc/rv8803.c
@@ -13,6 +13,7 @@
 #include <common.h>
 #include <command.h>
 #include <dm.h>
+#include <log.h>
 #include <rtc.h>
 #include <i2c.h>
 
diff --git a/drivers/rtc/x1205.c b/drivers/rtc/x1205.c
index ed6aaa5237..ce23427b17 100644
--- a/drivers/rtc/x1205.c
+++ b/drivers/rtc/x1205.c
@@ -19,6 +19,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <log.h>
 #include <rtc.h>
 #include <i2c.h>
 
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 949e364e78..0ab1d441f4 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -9,6 +9,7 @@
 #include <bootstage.h>
 #include <dm.h>
 #include <env.h>
+#include <log.h>
 #include <part.h>
 #include <pci.h>
 #include <scsi.h>
diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index 6415d2e1e5..cca798d7e4 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -9,6 +9,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <ns16550.h>
 #include <reset.h>
 #include <serial.h>
diff --git a/drivers/serial/serial_efi.c b/drivers/serial/serial_efi.c
index dd3e511fc9..b152e10258 100644
--- a/drivers/serial/serial_efi.c
+++ b/drivers/serial/serial_efi.c
@@ -11,6 +11,7 @@
 #include <efi_api.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <linux/compiler.h>
 #include <asm/io.h>
 #include <serial.h>
diff --git a/drivers/serial/serial_lpuart.c b/drivers/serial/serial_lpuart.c
index 3b53f5a97b..9d7ed5e88a 100644
--- a/drivers/serial/serial_lpuart.c
+++ b/drivers/serial/serial_lpuart.c
@@ -8,6 +8,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <fsl_lpuart.h>
+#include <log.h>
 #include <watchdog.h>
 #include <asm/io.h>
 #include <serial.h>
diff --git a/drivers/serial/serial_mtk.c b/drivers/serial/serial_mtk.c
index e63f2306f0..778a04d87e 100644
--- a/drivers/serial/serial_mtk.c
+++ b/drivers/serial/serial_mtk.c
@@ -11,6 +11,7 @@
 #include <div64.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <serial.h>
 #include <watchdog.h>
 #include <asm/io.h>
diff --git a/drivers/serial/serial_omap.c b/drivers/serial/serial_omap.c
index 4d4d919358..f7997fc788 100644
--- a/drivers/serial/serial_omap.c
+++ b/drivers/serial/serial_omap.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <dm.h>
 #include <dt-structs.h>
+#include <log.h>
 #include <ns16550.h>
 #include <serial.h>
 #include <clk.h>
diff --git a/drivers/serial/serial_sifive.c b/drivers/serial/serial_sifive.c
index 5a02f0c8fe..fcc47fb348 100644
--- a/drivers/serial/serial_sifive.c
+++ b/drivers/serial/serial_sifive.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <watchdog.h>
 #include <asm/io.h>
 #include <linux/compiler.h>
diff --git a/drivers/serial/serial_sti_asc.c b/drivers/serial/serial_sti_asc.c
index c972f1e9af..27d3ec9dbc 100644
--- a/drivers/serial/serial_sti_asc.c
+++ b/drivers/serial/serial_sti_asc.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <serial.h>
 #include <asm/io.h>
 
diff --git a/drivers/serial/serial_stm32.c b/drivers/serial/serial_stm32.c
index 016082814f..a9f5c3c3ea 100644
--- a/drivers/serial/serial_stm32.c
+++ b/drivers/serial/serial_stm32.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <clk.h>
 #include <dm.h>
+#include <log.h>
 #include <reset.h>
 #include <serial.h>
 #include <watchdog.h>
diff --git a/drivers/serial/serial_zynq.c b/drivers/serial/serial_zynq.c
index 0dd6cec82a..5f2dcd6d6b 100644
--- a/drivers/serial/serial_zynq.c
+++ b/drivers/serial/serial_zynq.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <watchdog.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
diff --git a/drivers/soc/ti/k3-navss-ringacc.c b/drivers/soc/ti/k3-navss-ringacc.c
index b24a8f128f..c3953fdf85 100644
--- a/drivers/soc/ti/k3-navss-ringacc.c
+++ b/drivers/soc/ti/k3-navss-ringacc.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <asm/cache.h>
 #include <asm/io.h>
 #include <malloc.h>
diff --git a/drivers/sound/broadwell_i2s.c b/drivers/sound/broadwell_i2s.c
index 3d577401bd..adb0b2b104 100644
--- a/drivers/sound/broadwell_i2s.c
+++ b/drivers/sound/broadwell_i2s.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <dm.h>
 #include <i2s.h>
+#include <log.h>
 #include <time.h>
 #include <asm/io.h>
 #include "broadwell_i2s.h"
diff --git a/drivers/sound/hda_codec.c b/drivers/sound/hda_codec.c
index 572ef693cc..92e19452f1 100644
--- a/drivers/sound/hda_codec.c
+++ b/drivers/sound/hda_codec.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <dm.h>
 #include <hda_codec.h>
+#include <log.h>
 #include <pci.h>
 #include <sound.h>
 #include <asm/io.h>
diff --git a/drivers/sound/ivybridge_sound.c b/drivers/sound/ivybridge_sound.c
index 101046f9c2..f446a140b2 100644
--- a/drivers/sound/ivybridge_sound.c
+++ b/drivers/sound/ivybridge_sound.c
@@ -15,6 +15,7 @@
 #include <common.h>
 #include <dm.h>
 #include <hda_codec.h>
+#include <log.h>
 #include <pch.h>
 #include <sound.h>
 
diff --git a/drivers/sound/max98088.c b/drivers/sound/max98088.c
index 332254d5aa..5b4c489f4b 100644
--- a/drivers/sound/max98088.c
+++ b/drivers/sound/max98088.c
@@ -14,6 +14,7 @@
 #include <dm.h>
 #include <i2c.h>
 #include <i2s.h>
+#include <log.h>
 #include <sound.h>
 #include <asm/gpio.h>
 #include "maxim_codec.h"
diff --git a/drivers/sound/max98090.c b/drivers/sound/max98090.c
index 5505c35166..29afbbc5c4 100644
--- a/drivers/sound/max98090.c
+++ b/drivers/sound/max98090.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <i2c.h>
 #include <i2s.h>
+#include <log.h>
 #include <sound.h>
 #include <asm/gpio.h>
 #include "maxim_codec.h"
diff --git a/drivers/sound/max98095.c b/drivers/sound/max98095.c
index 9e08e96670..5037f9516f 100644
--- a/drivers/sound/max98095.c
+++ b/drivers/sound/max98095.c
@@ -13,6 +13,7 @@
 #include <div64.h>
 #include <fdtdec.h>
 #include <i2c.h>
+#include <log.h>
 #include <sound.h>
 #include <asm/gpio.h>
 #include "i2s.h"
diff --git a/drivers/sound/maxim_codec.c b/drivers/sound/maxim_codec.c
index 5480dce108..31e67ee672 100644
--- a/drivers/sound/maxim_codec.c
+++ b/drivers/sound/maxim_codec.c
@@ -9,6 +9,7 @@
 #include <div64.h>
 #include <i2c.h>
 #include <i2s.h>
+#include <log.h>
 #include <sound.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
diff --git a/drivers/sound/rockchip_i2s.c b/drivers/sound/rockchip_i2s.c
index e5df8ca0d2..5e8ed6d896 100644
--- a/drivers/sound/rockchip_i2s.c
+++ b/drivers/sound/rockchip_i2s.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <dm.h>
 #include <i2s.h>
+#include <log.h>
 #include <sound.h>
 #include <asm/io.h>
 
diff --git a/drivers/sound/rockchip_sound.c b/drivers/sound/rockchip_sound.c
index a092dbc445..94058e603d 100644
--- a/drivers/sound/rockchip_sound.c
+++ b/drivers/sound/rockchip_sound.c
@@ -11,6 +11,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <i2s.h>
+#include <log.h>
 #include <misc.h>
 #include <sound.h>
 #include <asm/arch-rockchip/periph.h>
diff --git a/drivers/sound/rt5677.c b/drivers/sound/rt5677.c
index 64776055d9..16aa9dfc5b 100644
--- a/drivers/sound/rt5677.c
+++ b/drivers/sound/rt5677.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <i2c.h>
 #include "rt5677.h"
+#include <log.h>
 
 struct rt5677_priv {
 	struct udevice *dev;
diff --git a/drivers/sound/samsung-i2s.c b/drivers/sound/samsung-i2s.c
index 104584073a..aa1d6bb209 100644
--- a/drivers/sound/samsung-i2s.c
+++ b/drivers/sound/samsung-i2s.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <i2s.h>
+#include <log.h>
 #include <sound.h>
 #include <asm/arch/clk.h>
 #include <asm/arch/pinmux.h>
diff --git a/drivers/sound/samsung_sound.c b/drivers/sound/samsung_sound.c
index b6952675bd..473cedf7e9 100644
--- a/drivers/sound/samsung_sound.c
+++ b/drivers/sound/samsung_sound.c
@@ -8,6 +8,7 @@
 #include <audio_codec.h>
 #include <dm.h>
 #include <i2s.h>
+#include <log.h>
 #include <sound.h>
 #include <asm/gpio.h>
 #include <asm/arch/power.h>
diff --git a/drivers/sound/sandbox.c b/drivers/sound/sandbox.c
index 9034a8385a..0686add3c8 100644
--- a/drivers/sound/sandbox.c
+++ b/drivers/sound/sandbox.c
@@ -9,6 +9,7 @@
 #include <audio_codec.h>
 #include <dm.h>
 #include <i2s.h>
+#include <log.h>
 #include <sound.h>
 #include <asm/sdl.h>
 
diff --git a/drivers/sound/sound-uclass.c b/drivers/sound/sound-uclass.c
index d9b3a38f18..9aeeb80968 100644
--- a/drivers/sound/sound-uclass.c
+++ b/drivers/sound/sound-uclass.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <i2s.h>
+#include <log.h>
 #include <malloc.h>
 #include <sound.h>
 
diff --git a/drivers/sound/sound.c b/drivers/sound/sound.c
index dd3f9db4f7..b0eab23391 100644
--- a/drivers/sound/sound.c
+++ b/drivers/sound/sound.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <sound.h>
 
 void sound_create_square_wave(uint sample_rate, unsigned short *data, int size,
diff --git a/drivers/sound/tegra_ahub.c b/drivers/sound/tegra_ahub.c
index c71fce9bb1..26d457255c 100644
--- a/drivers/sound/tegra_ahub.c
+++ b/drivers/sound/tegra_ahub.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <dm.h>
 #include <i2s.h>
+#include <log.h>
 #include <misc.h>
 #include <asm/io.h>
 #include <asm/arch-tegra/tegra_ahub.h>
diff --git a/drivers/sound/tegra_i2s.c b/drivers/sound/tegra_i2s.c
index 8022dbba64..5cf82250da 100644
--- a/drivers/sound/tegra_i2s.c
+++ b/drivers/sound/tegra_i2s.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <dm.h>
 #include <i2s.h>
+#include <log.h>
 #include <misc.h>
 #include <sound.h>
 #include <asm/io.h>
diff --git a/drivers/sound/tegra_sound.c b/drivers/sound/tegra_sound.c
index 7c2ed53f5a..aef6a2eb14 100644
--- a/drivers/sound/tegra_sound.c
+++ b/drivers/sound/tegra_sound.c
@@ -10,6 +10,7 @@
 #include <audio_codec.h>
 #include <dm.h>
 #include <i2s.h>
+#include <log.h>
 #include <misc.h>
 #include <sound.h>
 #include <asm/gpio.h>
diff --git a/drivers/sound/wm8994.c b/drivers/sound/wm8994.c
index b290c4e879..367e144541 100644
--- a/drivers/sound/wm8994.c
+++ b/drivers/sound/wm8994.c
@@ -10,6 +10,7 @@
 #include <fdtdec.h>
 #include <i2c.h>
 #include <i2s.h>
+#include <log.h>
 #include <sound.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
diff --git a/drivers/spi/altera_spi.c b/drivers/spi/altera_spi.c
index e24deb4f71..11d745f53a 100644
--- a/drivers/spi/altera_spi.c
+++ b/drivers/spi/altera_spi.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <fdtdec.h>
 #include <spi.h>
diff --git a/drivers/spi/atcspi200_spi.c b/drivers/spi/atcspi200_spi.c
index e0cc323444..328b16c277 100644
--- a/drivers/spi/atcspi200_spi.c
+++ b/drivers/spi/atcspi200_spi.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <clk.h>
+#include <log.h>
 #include <malloc.h>
 #include <spi.h>
 #include <asm/io.h>
diff --git a/drivers/spi/bcm63xx_hsspi.c b/drivers/spi/bcm63xx_hsspi.c
index f88702df4d..afc7be0f01 100644
--- a/drivers/spi/bcm63xx_hsspi.c
+++ b/drivers/spi/bcm63xx_hsspi.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <clk.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <spi.h>
 #include <reset.h>
diff --git a/drivers/spi/bcm63xx_spi.c b/drivers/spi/bcm63xx_spi.c
index 719f53d08e..acc1a493c4 100644
--- a/drivers/spi/bcm63xx_spi.c
+++ b/drivers/spi/bcm63xx_spi.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <clk.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <spi.h>
 #include <reset.h>
diff --git a/drivers/spi/cadence_qspi.c b/drivers/spi/cadence_qspi.c
index 994a5948f1..1e85749209 100644
--- a/drivers/spi/cadence_qspi.c
+++ b/drivers/spi/cadence_qspi.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <clk.h>
+#include <log.h>
 #include <asm-generic/io.h>
 #include <dm.h>
 #include <fdtdec.h>
diff --git a/drivers/spi/cadence_qspi_apb.c b/drivers/spi/cadence_qspi_apb.c
index 0a5af05614..e0a2003239 100644
--- a/drivers/spi/cadence_qspi_apb.c
+++ b/drivers/spi/cadence_qspi_apb.c
@@ -26,6 +26,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <dma.h>
 #include <linux/errno.h>
diff --git a/drivers/spi/cf_spi.c b/drivers/spi/cf_spi.c
index 923ff6f311..dd9c77281f 100644
--- a/drivers/spi/cf_spi.c
+++ b/drivers/spi/cf_spi.c
@@ -15,6 +15,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/platform_data/spi_coldfire.h>
 #include <spi.h>
 #include <malloc.h>
diff --git a/drivers/spi/davinci_spi.c b/drivers/spi/davinci_spi.c
index 4d2c106440..3efa8dbaf0 100644
--- a/drivers/spi/davinci_spi.c
+++ b/drivers/spi/davinci_spi.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <spi.h>
 #include <malloc.h>
 #include <asm/io.h>
diff --git a/drivers/spi/designware_spi.c b/drivers/spi/designware_spi.c
index 2dc16736a3..09044bd137 100644
--- a/drivers/spi/designware_spi.c
+++ b/drivers/spi/designware_spi.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm-generic/gpio.h>
 #include <clk.h>
 #include <dm.h>
diff --git a/drivers/spi/exynos_spi.c b/drivers/spi/exynos_spi.c
index d682a11013..cded7a8ddc 100644
--- a/drivers/spi/exynos_spi.c
+++ b/drivers/spi/exynos_spi.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <spi.h>
 #include <fdtdec.h>
diff --git a/drivers/spi/fsl_dspi.c b/drivers/spi/fsl_dspi.c
index a68a51945e..c85253dc71 100644
--- a/drivers/spi/fsl_dspi.c
+++ b/drivers/spi/fsl_dspi.c
@@ -13,6 +13,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <common.h>
+#include <log.h>
 #include <spi.h>
 #include <malloc.h>
 #include <asm/io.h>
diff --git a/drivers/spi/fsl_espi.c b/drivers/spi/fsl_espi.c
index 7444ae1a06..67544ff522 100644
--- a/drivers/spi/fsl_espi.c
+++ b/drivers/spi/fsl_espi.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 
 #include <malloc.h>
 #include <spi.h>
diff --git a/drivers/spi/fsl_qspi.c b/drivers/spi/fsl_qspi.c
index caf31ef98c..0ee5074269 100644
--- a/drivers/spi/fsl_qspi.c
+++ b/drivers/spi/fsl_qspi.c
@@ -24,6 +24,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <linux/libfdt.h>
 #include <linux/sizes.h>
diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c
index 990a5ffa51..537c756602 100644
--- a/drivers/spi/ich.c
+++ b/drivers/spi/ich.c
@@ -13,6 +13,7 @@
 #include <dm.h>
 #include <dt-structs.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <pch.h>
 #include <pci.h>
diff --git a/drivers/spi/kirkwood_spi.c b/drivers/spi/kirkwood_spi.c
index c725625146..d364e46333 100644
--- a/drivers/spi/kirkwood_spi.c
+++ b/drivers/spi/kirkwood_spi.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <spi.h>
 #include <asm/io.h>
diff --git a/drivers/spi/lpc32xx_ssp.c b/drivers/spi/lpc32xx_ssp.c
index 4b09366317..595ca7801f 100644
--- a/drivers/spi/lpc32xx_ssp.c
+++ b/drivers/spi/lpc32xx_ssp.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <linux/compat.h>
 #include <asm/io.h>
 #include <malloc.h>
diff --git a/drivers/spi/meson_spifc.c b/drivers/spi/meson_spifc.c
index 3d551694cb..ad15995573 100644
--- a/drivers/spi/meson_spifc.c
+++ b/drivers/spi/meson_spifc.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <spi.h>
 #include <clk.h>
 #include <dm.h>
diff --git a/drivers/spi/mpc8xxx_spi.c b/drivers/spi/mpc8xxx_spi.c
index e48debb045..8aedd5e705 100644
--- a/drivers/spi/mpc8xxx_spi.c
+++ b/drivers/spi/mpc8xxx_spi.c
@@ -8,6 +8,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <spi.h>
 #include <asm/mpc8xxx_spi.h>
diff --git a/drivers/spi/mscc_bb_spi.c b/drivers/spi/mscc_bb_spi.c
index c3c7b80426..37327ec508 100644
--- a/drivers/spi/mscc_bb_spi.c
+++ b/drivers/spi/mscc_bb_spi.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <spi.h>
 #include <dm.h>
diff --git a/drivers/spi/mt7621_spi.c b/drivers/spi/mt7621_spi.c
index 90e85c6b44..df9d9da1a9 100644
--- a/drivers/spi/mt7621_spi.c
+++ b/drivers/spi/mt7621_spi.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <clk.h>
 #include <dm.h>
+#include <log.h>
 #include <spi.h>
 #include <wait_bit.h>
 #include <linux/io.h>
diff --git a/drivers/spi/mvebu_a3700_spi.c b/drivers/spi/mvebu_a3700_spi.c
index 1469771619..73a3f91efc 100644
--- a/drivers/spi/mvebu_a3700_spi.c
+++ b/drivers/spi/mvebu_a3700_spi.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <spi.h>
 #include <clk.h>
diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c
index 4d1317c364..4865fd91f8 100644
--- a/drivers/spi/mxc_spi.c
+++ b/drivers/spi/mxc_spi.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <spi.h>
 #include <dm/device_compat.h>
diff --git a/drivers/spi/mxs_spi.c b/drivers/spi/mxs_spi.c
index ee44973c7f..635955e819 100644
--- a/drivers/spi/mxs_spi.c
+++ b/drivers/spi/mxs_spi.c
@@ -14,6 +14,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <malloc.h>
 #include <memalign.h>
 #include <spi.h>
diff --git a/drivers/spi/pic32_spi.c b/drivers/spi/pic32_spi.c
index 4ec6683de1..88dc1444e1 100644
--- a/drivers/spi/pic32_spi.c
+++ b/drivers/spi/pic32_spi.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <clk.h>
 #include <dm.h>
+#include <log.h>
 #include <linux/compat.h>
 #include <malloc.h>
 #include <spi.h>
diff --git a/drivers/spi/rk_spi.c b/drivers/spi/rk_spi.c
index 95eeb8307a..c5842dc926 100644
--- a/drivers/spi/rk_spi.c
+++ b/drivers/spi/rk_spi.c
@@ -15,6 +15,7 @@
 #include <dm.h>
 #include <dt-structs.h>
 #include <errno.h>
+#include <log.h>
 #include <spi.h>
 #include <time.h>
 #include <linux/errno.h>
diff --git a/drivers/spi/sandbox_spi.c b/drivers/spi/sandbox_spi.c
index 6b610ff823..b0a46c8868 100644
--- a/drivers/spi/sandbox_spi.c
+++ b/drivers/spi/sandbox_spi.c
@@ -12,6 +12,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <spi.h>
 #include <spi_flash.h>
diff --git a/drivers/spi/soft_spi.c b/drivers/spi/soft_spi.c
index b80f810bd1..af0dd7150f 100644
--- a/drivers/spi/soft_spi.c
+++ b/drivers/spi/soft_spi.c
@@ -13,6 +13,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <malloc.h>
 #include <spi.h>
 #include <asm/gpio.h>
diff --git a/drivers/spi/spi-mem-nodm.c b/drivers/spi/spi-mem-nodm.c
index 83dde4806e..765f05fe54 100644
--- a/drivers/spi/spi-mem-nodm.c
+++ b/drivers/spi/spi-mem-nodm.c
@@ -3,6 +3,7 @@
  * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
  */
 
+#include <log.h>
 #include <malloc.h>
 #include <spi.h>
 #include <spi-mem.h>
diff --git a/drivers/spi/spi-mem.c b/drivers/spi/spi-mem.c
index ffbe20c5b1..d344701aeb 100644
--- a/drivers/spi/spi-mem.c
+++ b/drivers/spi/spi-mem.c
@@ -7,6 +7,7 @@
  */
 
 #ifndef __UBOOT__
+#include <log.h>
 #include <dm/devres.h>
 #include <linux/dmaengine.h>
 #include <linux/pm_runtime.h>
diff --git a/drivers/spi/spi-sunxi.c b/drivers/spi/spi-sunxi.c
index c59fee10a8..85b662bb0a 100644
--- a/drivers/spi/spi-sunxi.c
+++ b/drivers/spi/spi-sunxi.c
@@ -21,6 +21,7 @@
 #include <common.h>
 #include <clk.h>
 #include <dm.h>
+#include <log.h>
 #include <spi.h>
 #include <errno.h>
 #include <fdt_support.h>
diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c
index 4a02d95a34..cffd9cf0b0 100644
--- a/drivers/spi/spi-uclass.c
+++ b/drivers/spi/spi-uclass.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <spi.h>
 #include <dm/device-internal.h>
diff --git a/drivers/spi/stm32_qspi.c b/drivers/spi/stm32_qspi.c
index 6857a87dc5..ae62aebc02 100644
--- a/drivers/spi/stm32_qspi.c
+++ b/drivers/spi/stm32_qspi.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <clk.h>
+#include <log.h>
 #include <reset.h>
 #include <spi-mem.h>
 #include <dm/device_compat.h>
diff --git a/drivers/spi/stm32_spi.c b/drivers/spi/stm32_spi.c
index ebf2b98fcd..fdc9f952e7 100644
--- a/drivers/spi/stm32_spi.c
+++ b/drivers/spi/stm32_spi.c
@@ -8,6 +8,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <reset.h>
 #include <spi.h>
diff --git a/drivers/spi/tegra114_spi.c b/drivers/spi/tegra114_spi.c
index bb34b20f54..27409186b0 100644
--- a/drivers/spi/tegra114_spi.c
+++ b/drivers/spi/tegra114_spi.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <time.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
diff --git a/drivers/spi/tegra20_sflash.c b/drivers/spi/tegra20_sflash.c
index 0e68d33be6..3a1ef8c093 100644
--- a/drivers/spi/tegra20_sflash.c
+++ b/drivers/spi/tegra20_sflash.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <time.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
diff --git a/drivers/spi/tegra20_slink.c b/drivers/spi/tegra20_slink.c
index ae2fc3e76d..f09d9603d8 100644
--- a/drivers/spi/tegra20_slink.c
+++ b/drivers/spi/tegra20_slink.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <time.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
diff --git a/drivers/spi/tegra210_qspi.c b/drivers/spi/tegra210_qspi.c
index 6e540e97df..c810dc421b 100644
--- a/drivers/spi/tegra210_qspi.c
+++ b/drivers/spi/tegra210_qspi.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <time.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c
index ef39198b43..f25fc363ac 100644
--- a/drivers/spi/ti_qspi.c
+++ b/drivers/spi/ti_qspi.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/arch/omap.h>
diff --git a/drivers/spi/uniphier_spi.c b/drivers/spi/uniphier_spi.c
index 153fbb2889..57d41b778b 100644
--- a/drivers/spi/uniphier_spi.c
+++ b/drivers/spi/uniphier_spi.c
@@ -7,6 +7,7 @@
 #include <clk.h>
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <time.h>
 #include <dm/device_compat.h>
 #include <linux/bitfield.h>
diff --git a/drivers/spi/xilinx_spi.c b/drivers/spi/xilinx_spi.c
index 2b5f2cf548..4a568cb56d 100644
--- a/drivers/spi/xilinx_spi.c
+++ b/drivers/spi/xilinx_spi.c
@@ -16,6 +16,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <spi.h>
 #include <asm/io.h>
diff --git a/drivers/spi/zynq_qspi.c b/drivers/spi/zynq_qspi.c
index 9ad1927a5d..8451f83b70 100644
--- a/drivers/spi/zynq_qspi.c
+++ b/drivers/spi/zynq_qspi.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <spi.h>
 #include <asm/io.h>
diff --git a/drivers/spi/zynq_spi.c b/drivers/spi/zynq_spi.c
index 0b2b2f4810..b59b876a62 100644
--- a/drivers/spi/zynq_spi.c
+++ b/drivers/spi/zynq_spi.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <spi.h>
 #include <time.h>
diff --git a/drivers/spi/zynqmp_gqspi.c b/drivers/spi/zynqmp_gqspi.c
index 5d15072d49..f12c6f766d 100644
--- a/drivers/spi/zynqmp_gqspi.c
+++ b/drivers/spi/zynqmp_gqspi.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/cache.h>
 #include <asm/io.h>
diff --git a/drivers/sysreset/sysreset-ti-sci.c b/drivers/sysreset/sysreset-ti-sci.c
index e7fcfcd4d1..3877b9bc12 100644
--- a/drivers/sysreset/sysreset-ti-sci.c
+++ b/drivers/sysreset/sysreset-ti-sci.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <sysreset.h>
 #include <dm/device_compat.h>
 #include <linux/err.h>
diff --git a/drivers/sysreset/sysreset-uclass.c b/drivers/sysreset/sysreset-uclass.c
index 9e990339a6..d43c7b7003 100644
--- a/drivers/sysreset/sysreset-uclass.c
+++ b/drivers/sysreset/sysreset-uclass.c
@@ -10,6 +10,7 @@
 #include <command.h>
 #include <cpu_func.h>
 #include <hang.h>
+#include <log.h>
 #include <sysreset.h>
 #include <dm.h>
 #include <errno.h>
diff --git a/drivers/sysreset/sysreset_ast.c b/drivers/sysreset/sysreset_ast.c
index d0336a1ce5..ee941c7770 100644
--- a/drivers/sysreset/sysreset_ast.c
+++ b/drivers/sysreset/sysreset_ast.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <sysreset.h>
 #include <wdt.h>
 #include <asm/io.h>
diff --git a/drivers/sysreset/sysreset_gpio.c b/drivers/sysreset/sysreset_gpio.c
index ed9a49ad08..d7280eeda8 100644
--- a/drivers/sysreset/sysreset_gpio.c
+++ b/drivers/sysreset/sysreset_gpio.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <sysreset.h>
 #include <asm/gpio.h>
 
diff --git a/drivers/sysreset/sysreset_mpc83xx.c b/drivers/sysreset/sysreset_mpc83xx.c
index 39f4671fad..ff08d356bf 100644
--- a/drivers/sysreset/sysreset_mpc83xx.c
+++ b/drivers/sysreset/sysreset_mpc83xx.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <command.h>
 #include <dm.h>
+#include <log.h>
 #include <sysreset.h>
 #include <wait_bit.h>
 
diff --git a/drivers/tee/tee-uclass.c b/drivers/tee/tee-uclass.c
index 1fb3c16a14..112e216883 100644
--- a/drivers/tee/tee-uclass.c
+++ b/drivers/tee/tee-uclass.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <tee.h>
 #include <dm/device-internal.h>
diff --git a/drivers/thermal/imx_scu_thermal.c b/drivers/thermal/imx_scu_thermal.c
index ec908199f8..691cad9d45 100644
--- a/drivers/thermal/imx_scu_thermal.c
+++ b/drivers/thermal/imx_scu_thermal.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <thermal.h>
 #include <dm/device-internal.h>
 #include <dm/device.h>
diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c
index e50b85bd59..da3fca9036 100644
--- a/drivers/thermal/imx_thermal.c
+++ b/drivers/thermal/imx_thermal.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <div64.h>
 #include <fuse.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
diff --git a/drivers/timer/mpc83xx_timer.c b/drivers/timer/mpc83xx_timer.c
index 72cb58b693..3ef56f144e 100644
--- a/drivers/timer/mpc83xx_timer.c
+++ b/drivers/timer/mpc83xx_timer.c
@@ -9,6 +9,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <irq_func.h>
+#include <log.h>
 #include <status_led.h>
 #include <time.h>
 #include <timer.h>
diff --git a/drivers/timer/rockchip_timer.c b/drivers/timer/rockchip_timer.c
index 7534e0363e..7a5a484252 100644
--- a/drivers/timer/rockchip_timer.c
+++ b/drivers/timer/rockchip_timer.c
@@ -7,6 +7,7 @@
 #include <bootstage.h>
 #include <dm.h>
 #include <init.h>
+#include <log.h>
 #include <dm/ofnode.h>
 #include <mapmem.h>
 #include <asm/arch-rockchip/timer.h>
diff --git a/drivers/timer/tsc_timer.c b/drivers/timer/tsc_timer.c
index 04596ff117..890660b44a 100644
--- a/drivers/timer/tsc_timer.c
+++ b/drivers/timer/tsc_timer.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <bootstage.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <time.h>
 #include <timer.h>
diff --git a/drivers/tpm/cr50_i2c.c b/drivers/tpm/cr50_i2c.c
index b67051af26..026adbd737 100644
--- a/drivers/tpm/cr50_i2c.c
+++ b/drivers/tpm/cr50_i2c.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <i2c.h>
 #include <irq.h>
+#include <log.h>
 #include <spl.h>
 #include <tpm-v2.h>
 #include <asm/gpio.h>
diff --git a/drivers/tpm/tpm-uclass.c b/drivers/tpm/tpm-uclass.c
index 71d5807006..19c0502d87 100644
--- a/drivers/tpm/tpm-uclass.c
+++ b/drivers/tpm/tpm-uclass.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <linux/unaligned/be_byteshift.h>
 #include <tpm-v1.h>
 #include <tpm-v2.h>
diff --git a/drivers/tpm/tpm2_ftpm_tee.c b/drivers/tpm/tpm2_ftpm_tee.c
index 4b79d4ada0..3197e0ebcd 100644
--- a/drivers/tpm/tpm2_ftpm_tee.c
+++ b/drivers/tpm/tpm2_ftpm_tee.c
@@ -15,6 +15,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <tpm-v2.h>
 #include <tee.h>
 
diff --git a/drivers/tpm/tpm_tis_infineon.c b/drivers/tpm/tpm_tis_infineon.c
index b5fe43ee50..b007c7ec6f 100644
--- a/drivers/tpm/tpm_tis_infineon.c
+++ b/drivers/tpm/tpm_tis_infineon.c
@@ -23,6 +23,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <i2c.h>
+#include <log.h>
 #include <tpm-v1.h>
 #include <linux/errno.h>
 #include <linux/compiler.h>
diff --git a/drivers/tpm/tpm_tis_lpc.c b/drivers/tpm/tpm_tis_lpc.c
index 30194bce07..da4269a56e 100644
--- a/drivers/tpm/tpm_tis_lpc.c
+++ b/drivers/tpm/tpm_tis_lpc.c
@@ -14,6 +14,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <mapmem.h>
 #include <tpm-v1.h>
 #include <asm/io.h>
diff --git a/drivers/tpm/tpm_tis_st33zp24_i2c.c b/drivers/tpm/tpm_tis_st33zp24_i2c.c
index 0d380375eb..c8f8265813 100644
--- a/drivers/tpm/tpm_tis_st33zp24_i2c.c
+++ b/drivers/tpm/tpm_tis_st33zp24_i2c.c
@@ -16,6 +16,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <i2c.h>
+#include <log.h>
 #include <tpm-v1.h>
 #include <errno.h>
 #include <linux/types.h>
diff --git a/drivers/tpm/tpm_tis_st33zp24_spi.c b/drivers/tpm/tpm_tis_st33zp24_spi.c
index f6087e7633..8e7b297fe2 100644
--- a/drivers/tpm/tpm_tis_st33zp24_spi.c
+++ b/drivers/tpm/tpm_tis_st33zp24_spi.c
@@ -15,6 +15,7 @@
 #include <common.h>
 #include <dm.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <spi.h>
 #include <tpm-v1.h>
 #include <errno.h>
diff --git a/drivers/ufs/ufs.c b/drivers/ufs/ufs.c
index 24e1bc2a19..bbb18e89e0 100644
--- a/drivers/ufs/ufs.c
+++ b/drivers/ufs/ufs.c
@@ -11,6 +11,7 @@
 #include <charset.h>
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <dm/lists.h>
diff --git a/drivers/usb/cdns3/core.c b/drivers/usb/cdns3/core.c
index ce846488a8..82ebd61823 100644
--- a/drivers/usb/cdns3/core.c
+++ b/drivers/usb/cdns3/core.c
@@ -13,6 +13,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/device-internal.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
diff --git a/drivers/usb/common/fsl-dt-fixup.c b/drivers/usb/common/fsl-dt-fixup.c
index 6debfff513..0759ec774a 100644
--- a/drivers/usb/common/fsl-dt-fixup.c
+++ b/drivers/usb/common/fsl-dt-fixup.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <usb.h>
 #include <asm/io.h>
 #include <hwconfig.h>
diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c
index eabd53a36d..8b75d71b0e 100644
--- a/drivers/usb/dwc3/dwc3-generic.c
+++ b/drivers/usb/dwc3/dwc3-generic.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <asm-generic/io.h>
 #include <dm.h>
 #include <dm/device-internal.h>
diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c
index de964d6c10..f66f083453 100644
--- a/drivers/usb/dwc3/dwc3-meson-g12a.c
+++ b/drivers/usb/dwc3/dwc3-meson-g12a.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm-generic/io.h>
 #include <dm.h>
 #include <dm/device-internal.h>
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index e445c705f1..8945abc396 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -15,6 +15,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <malloc.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
diff --git a/drivers/usb/emul/sandbox_flash.c b/drivers/usb/emul/sandbox_flash.c
index 399d1d3c17..9c305f46e9 100644
--- a/drivers/usb/emul/sandbox_flash.c
+++ b/drivers/usb/emul/sandbox_flash.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <os.h>
 #include <scsi.h>
 #include <usb.h>
diff --git a/drivers/usb/emul/sandbox_hub.c b/drivers/usb/emul/sandbox_hub.c
index 7f150340c2..21bf3bda48 100644
--- a/drivers/usb/emul/sandbox_hub.c
+++ b/drivers/usb/emul/sandbox_hub.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <usb.h>
 #include <dm/device-internal.h>
 
diff --git a/drivers/usb/emul/sandbox_keyb.c b/drivers/usb/emul/sandbox_keyb.c
index 32bc9a1698..f562fb7eca 100644
--- a/drivers/usb/emul/sandbox_keyb.c
+++ b/drivers/usb/emul/sandbox_keyb.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <os.h>
 #include <scsi.h>
 #include <usb.h>
diff --git a/drivers/usb/emul/usb-emul-uclass.c b/drivers/usb/emul/usb-emul-uclass.c
index 50da6bda8e..e3419e2fd4 100644
--- a/drivers/usb/emul/usb-emul-uclass.c
+++ b/drivers/usb/emul/usb-emul-uclass.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <usb.h>
 #include <dm/device-internal.h>
 
diff --git a/drivers/usb/eth/asix.c b/drivers/usb/eth/asix.c
index 448f5245d1..5f56f6f2dd 100644
--- a/drivers/usb/eth/asix.c
+++ b/drivers/usb/eth/asix.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <net.h>
 #include <usb.h>
 #include <malloc.h>
diff --git a/drivers/usb/eth/asix88179.c b/drivers/usb/eth/asix88179.c
index 00706bea86..b4a56390b3 100644
--- a/drivers/usb/eth/asix88179.c
+++ b/drivers/usb/eth/asix88179.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <usb.h>
 #include <net.h>
 #include <linux/mii.h>
diff --git a/drivers/usb/eth/lan75xx.c b/drivers/usb/eth/lan75xx.c
index 418139d43a..94c6522a41 100644
--- a/drivers/usb/eth/lan75xx.c
+++ b/drivers/usb/eth/lan75xx.c
@@ -4,6 +4,7 @@
  */
 
 #include <dm.h>
+#include <log.h>
 #include <usb.h>
 #include <linux/mii.h>
 #include "usb_ether.h"
diff --git a/drivers/usb/eth/lan78xx.c b/drivers/usb/eth/lan78xx.c
index fe8cc6acc5..1d1b64ef3e 100644
--- a/drivers/usb/eth/lan78xx.c
+++ b/drivers/usb/eth/lan78xx.c
@@ -4,6 +4,7 @@
  */
 
 #include <dm.h>
+#include <log.h>
 #include <net.h>
 #include <usb.h>
 #include "usb_ether.h"
diff --git a/drivers/usb/eth/lan7x.c b/drivers/usb/eth/lan7x.c
index afe78d44a3..0a283619ae 100644
--- a/drivers/usb/eth/lan7x.c
+++ b/drivers/usb/eth/lan7x.c
@@ -4,6 +4,7 @@
  */
 
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <miiphy.h>
 #include <memalign.h>
diff --git a/drivers/usb/eth/mcs7830.c b/drivers/usb/eth/mcs7830.c
index a9e0aabc61..b8fe65237d 100644
--- a/drivers/usb/eth/mcs7830.c
+++ b/drivers/usb/eth/mcs7830.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <net.h>
 #include <linux/mii.h>
 #include <malloc.h>
diff --git a/drivers/usb/eth/r8152.c b/drivers/usb/eth/r8152.c
index 8dae5097b8..1454d98d8f 100644
--- a/drivers/usb/eth/r8152.c
+++ b/drivers/usb/eth/r8152.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <memalign.h>
 #include <net.h>
diff --git a/drivers/usb/eth/smsc95xx.c b/drivers/usb/eth/smsc95xx.c
index ab6411f561..82fea742b0 100644
--- a/drivers/usb/eth/smsc95xx.c
+++ b/drivers/usb/eth/smsc95xx.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <memalign.h>
 #include <net.h>
diff --git a/drivers/usb/eth/usb_ether.c b/drivers/usb/eth/usb_ether.c
index d76e2ff5bb..e368ecda0d 100644
--- a/drivers/usb/eth/usb_ether.c
+++ b/drivers/usb/eth/usb_ether.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <net.h>
 #include <usb.h>
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index b2b279358e..74b8e0c5dd 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -7,6 +7,7 @@
  */
 #undef DEBUG
 
+#include <log.h>
 #include <dm/devres.h>
 #include <linux/bitops.h>
 #include <linux/usb/composite.h>
diff --git a/drivers/usb/gadget/core.c b/drivers/usb/gadget/core.c
index 7e1e51db96..3781d25fd6 100644
--- a/drivers/usb/gadget/core.c
+++ b/drivers/usb/gadget/core.c
@@ -15,6 +15,7 @@
  *	Bruce Balden <balden@lineo.com>
  */
 
+#include <log.h>
 #include <malloc.h>
 #include <serial.h>
 #include <usbdevice.h>
diff --git a/drivers/usb/gadget/dwc2_udc_otg.c b/drivers/usb/gadget/dwc2_udc_otg.c
index 9f21af2923..ec9fc4d3a0 100644
--- a/drivers/usb/gadget/dwc2_udc_otg.c
+++ b/drivers/usb/gadget/dwc2_udc_otg.c
@@ -21,6 +21,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <generic-phy.h>
+#include <log.h>
 #include <malloc.h>
 #include <reset.h>
 #include <dm/device_compat.h>
diff --git a/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c b/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c
index d4fbb75cc9..e3147c98a1 100644
--- a/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c
+++ b/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c
@@ -19,6 +19,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <log.h>
 
 static u8 clear_feature_num;
 int clear_feature_flag;
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index 33f9a44d04..6f04523f15 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <console.h>
 #include <env.h>
+#include <log.h>
 #include <part.h>
 #include <linux/errno.h>
 #include <linux/netdevice.h>
diff --git a/drivers/usb/gadget/f_dfu.c b/drivers/usb/gadget/f_dfu.c
index a4a57ba5f5..4bedc7d3a1 100644
--- a/drivers/usb/gadget/f_dfu.c
+++ b/drivers/usb/gadget/f_dfu.c
@@ -17,6 +17,7 @@
 #include <env.h>
 #include <errno.h>
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 
 #include <linux/usb/ch9.h>
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index d1be3f5e13..384c0f6f6e 100644
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -15,6 +15,7 @@
 #include <env.h>
 #include <errno.h>
 #include <fastboot.h>
+#include <log.h>
 #include <malloc.h>
 #include <linux/usb/ch9.h>
 #include <linux/usb/gadget.h>
diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c
index 5250fc8b26..1a181bd6c6 100644
--- a/drivers/usb/gadget/f_mass_storage.c
+++ b/drivers/usb/gadget/f_mass_storage.c
@@ -241,6 +241,7 @@
 
 #include <config.h>
 #include <hexdump.h>
+#include <log.h>
 #include <malloc.h>
 #include <common.h>
 #include <console.h>
diff --git a/drivers/usb/gadget/f_rockusb.c b/drivers/usb/gadget/f_rockusb.c
index 0c4c83f89d..9ae02ae78c 100644
--- a/drivers/usb/gadget/f_rockusb.c
+++ b/drivers/usb/gadget/f_rockusb.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <env.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <memalign.h>
 #include <part.h>
diff --git a/drivers/usb/gadget/f_sdp.c b/drivers/usb/gadget/f_sdp.c
index 50836db4a0..53053a17b0 100644
--- a/drivers/usb/gadget/f_sdp.c
+++ b/drivers/usb/gadget/f_sdp.c
@@ -20,6 +20,7 @@
 #include <common.h>
 #include <console.h>
 #include <env.h>
+#include <log.h>
 #include <malloc.h>
 
 #include <linux/usb/ch9.h>
diff --git a/drivers/usb/gadget/f_thor.c b/drivers/usb/gadget/f_thor.c
index dea17b9209..900eb96377 100644
--- a/drivers/usb/gadget/f_thor.c
+++ b/drivers/usb/gadget/f_thor.c
@@ -19,6 +19,7 @@
 #include <common.h>
 #include <console.h>
 #include <init.h>
+#include <log.h>
 #include <malloc.h>
 #include <memalign.h>
 #include <version.h>
diff --git a/drivers/usb/gadget/fotg210.c b/drivers/usb/gadget/fotg210.c
index 0866ef6531..4211eea3a4 100644
--- a/drivers/usb/gadget/fotg210.c
+++ b/drivers/usb/gadget/fotg210.c
@@ -10,6 +10,7 @@
 #include <command.h>
 #include <config.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <net.h>
 #include <malloc.h>
 #include <asm/io.h>
diff --git a/drivers/usb/gadget/g_dnl.c b/drivers/usb/gadget/g_dnl.c
index e9e1600a1a..c71c1a6743 100644
--- a/drivers/usb/gadget/g_dnl.c
+++ b/drivers/usb/gadget/g_dnl.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 
 #include <mmc.h>
diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c
index 6e1e57f9fd..bce5aeb364 100644
--- a/drivers/usb/gadget/pxa25x_udc.c
+++ b/drivers/usb/gadget/pxa25x_udc.c
@@ -18,6 +18,7 @@
 
 #include <common.h>
 #include <errno.h>
+#include <log.h>
 #include <asm/byteorder.h>
 #include <asm/system.h>
 #include <asm/mach-types.h>
diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c
index eec639f8c0..13c327ea38 100644
--- a/drivers/usb/gadget/rndis.c
+++ b/drivers/usb/gadget/rndis.c
@@ -19,6 +19,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <net.h>
 #include <malloc.h>
 #include <linux/types.h>
diff --git a/drivers/usb/gadget/storage_common.c b/drivers/usb/gadget/storage_common.c
index f40779b13a..5674e8fe49 100644
--- a/drivers/usb/gadget/storage_common.c
+++ b/drivers/usb/gadget/storage_common.c
@@ -268,6 +268,7 @@ struct interrupt_data {
 struct device_attribute { int i; };
 #define ETOOSMALL	525
 
+#include <log.h>
 #include <usb_mass_storage.h>
 #include <dm/device_compat.h>
 
diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c
index 02ca119bc7..0d694f3d39 100644
--- a/drivers/usb/host/dwc2.c
+++ b/drivers/usb/host/dwc2.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <generic-phy.h>
+#include <log.h>
 #include <malloc.h>
 #include <memalign.h>
 #include <phys2bus.h>
diff --git a/drivers/usb/host/dwc3-sti-glue.c b/drivers/usb/host/dwc3-sti-glue.c
index 99d4e29414..a72ab20168 100644
--- a/drivers/usb/host/dwc3-sti-glue.c
+++ b/drivers/usb/host/dwc3-sti-glue.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <dm.h>
 #include <errno.h>
diff --git a/drivers/usb/host/ehci-armada100.c b/drivers/usb/host/ehci-armada100.c
index 85a8adf806..2ce9f27b86 100644
--- a/drivers/usb/host/ehci-armada100.c
+++ b/drivers/usb/host/ehci-armada100.c
@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <usb.h>
 #include "ehci.h"
diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c
index 67eec0e0bb..f9083d9a64 100644
--- a/drivers/usb/host/ehci-atmel.c
+++ b/drivers/usb/host/ehci-atmel.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <clk.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <usb.h>
 #include <asm/io.h>
diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c
index fabc662eb6..9093e029ea 100644
--- a/drivers/usb/host/ehci-exynos.c
+++ b/drivers/usb/host/ehci-exynos.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <dm.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <linux/libfdt.h>
 #include <malloc.h>
 #include <usb.h>
diff --git a/drivers/usb/host/ehci-faraday.c b/drivers/usb/host/ehci-faraday.c
index a01da4da76..f46bdb441d 100644
--- a/drivers/usb/host/ehci-faraday.c
+++ b/drivers/usb/host/ehci-faraday.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <usb.h>
 #include <usb/fusbh200.h>
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index ced295ef0f..75d24ae015 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <log.h>
 #include <pci.h>
 #include <usb.h>
 #include <asm/io.h>
diff --git a/drivers/usb/host/ehci-generic.c b/drivers/usb/host/ehci-generic.c
index 0643681846..304a3437d5 100644
--- a/drivers/usb/host/ehci-generic.c
+++ b/drivers/usb/host/ehci-generic.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <clk.h>
+#include <log.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <dm/ofnode.h>
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index b4e28b998c..1e03c83fe6 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -10,6 +10,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <asm/byteorder.h>
 #include <asm/cache.h>
 #include <asm/unaligned.h>
diff --git a/drivers/usb/host/ehci-marvell.c b/drivers/usb/host/ehci-marvell.c
index 8efe6b63b9..2c9382fa99 100644
--- a/drivers/usb/host/ehci-marvell.c
+++ b/drivers/usb/host/ehci-marvell.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <usb.h>
 #include "ehci.h"
diff --git a/drivers/usb/host/ehci-mx5.c b/drivers/usb/host/ehci-mx5.c
index 0b32728c57..82f99e924e 100644
--- a/drivers/usb/host/ehci-mx5.c
+++ b/drivers/usb/host/ehci-mx5.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <usb.h>
 #include <errno.h>
 #include <linux/compiler.h>
diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c
index f2ceb51310..4fb78380ac 100644
--- a/drivers/usb/host/ehci-mx6.c
+++ b/drivers/usb/host/ehci-mx6.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <usb.h>
 #include <errno.h>
 #include <wait_bit.h>
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index ab459c8cc9..a5061f7726 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <usb.h>
 #include <usb/ulpi.h>
 #include <errno.h>
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
index 450caf056c..7dd5c33c13 100644
--- a/drivers/usb/host/ehci-pci.c
+++ b/drivers/usb/host/ehci-pci.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <init.h>
+#include <log.h>
 #include <pci.h>
 #include <usb.h>
 #include <asm/io.h>
diff --git a/drivers/usb/host/ehci-spear.c b/drivers/usb/host/ehci-spear.c
index f93ffa8d9f..8f5bfd5ed8 100644
--- a/drivers/usb/host/ehci-spear.c
+++ b/drivers/usb/host/ehci-spear.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <usb.h>
 #include "ehci.h"
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index 702f3b5670..55fe6fec9a 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <asm-generic/gpio.h>
diff --git a/drivers/usb/host/ehci-vf.c b/drivers/usb/host/ehci-vf.c
index a16cf135e3..ba6eecada1 100644
--- a/drivers/usb/host/ehci-vf.c
+++ b/drivers/usb/host/ehci-vf.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <usb.h>
 #include <errno.h>
 #include <linux/compiler.h>
diff --git a/drivers/usb/host/ohci-generic.c b/drivers/usb/host/ohci-generic.c
index 04d5fdb2a8..631711a9e8 100644
--- a/drivers/usb/host/ohci-generic.c
+++ b/drivers/usb/host/ohci-generic.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <clk.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <dm/ofnode.h>
diff --git a/drivers/usb/host/ohci-lpc32xx.c b/drivers/usb/host/ohci-lpc32xx.c
index 8ddced3d10..afb9e29f78 100644
--- a/drivers/usb/host/ohci-lpc32xx.c
+++ b/drivers/usb/host/ohci-lpc32xx.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <init.h>
+#include <log.h>
 #include <wait_bit.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c
index 8fc9d211db..d790839fda 100644
--- a/drivers/usb/host/r8a66597-hcd.c
+++ b/drivers/usb/host/r8a66597-hcd.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <console.h>
 #include <dm.h>
+#include <log.h>
 #include <usb.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
diff --git a/drivers/usb/host/usb-sandbox.c b/drivers/usb/host/usb-sandbox.c
index 28ee4b093b..beb62ebc0c 100644
--- a/drivers/usb/host/usb-sandbox.c
+++ b/drivers/usb/host/usb-sandbox.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <usb.h>
 #include <dm/root.h>
 
diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c
index 5e423012df..cb79dfbbd5 100644
--- a/drivers/usb/host/usb-uclass.c
+++ b/drivers/usb/host/usb-uclass.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <memalign.h>
 #include <usb.h>
 #include <dm/device-internal.h>
diff --git a/drivers/usb/host/xhci-dwc3.c b/drivers/usb/host/xhci-dwc3.c
index 563db1a426..37b59c80fd 100644
--- a/drivers/usb/host/xhci-dwc3.c
+++ b/drivers/usb/host/xhci-dwc3.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <dm.h>
 #include <generic-phy.h>
+#include <log.h>
 #include <usb.h>
 #include <dwc3-uboot.h>
 
diff --git a/drivers/usb/host/xhci-exynos5.c b/drivers/usb/host/xhci-exynos5.c
index 25c30c24f0..76aa431243 100644
--- a/drivers/usb/host/xhci-exynos5.c
+++ b/drivers/usb/host/xhci-exynos5.c
@@ -15,6 +15,7 @@
 #include <common.h>
 #include <dm.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <linux/libfdt.h>
 #include <malloc.h>
 #include <usb.h>
diff --git a/drivers/usb/host/xhci-fsl.c b/drivers/usb/host/xhci-fsl.c
index 9e0c1b76e4..d8fb2c5345 100644
--- a/drivers/usb/host/xhci-fsl.c
+++ b/drivers/usb/host/xhci-fsl.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <usb.h>
 #include <linux/errno.h>
 #include <linux/compat.h>
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index 93450ee3b7..c282cf0be3 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -16,6 +16,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <dm.h>
+#include <log.h>
 #include <asm/byteorder.h>
 #include <usb.h>
 #include <malloc.h>
diff --git a/drivers/usb/host/xhci-mvebu.c b/drivers/usb/host/xhci-mvebu.c
index 2b871046ae..5fb74848c2 100644
--- a/drivers/usb/host/xhci-mvebu.c
+++ b/drivers/usb/host/xhci-mvebu.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <usb.h>
 #include <power/regulator.h>
 #include <asm/gpio.h>
diff --git a/drivers/usb/host/xhci-omap.c b/drivers/usb/host/xhci-omap.c
index 25b195f7d1..501129d769 100644
--- a/drivers/usb/host/xhci-omap.c
+++ b/drivers/usb/host/xhci-omap.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <usb.h>
 #include <linux/errno.h>
 #include <asm/omap_common.h>
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index b095612ada..9fb6d2f763 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <init.h>
+#include <log.h>
 #include <pci.h>
 #include <usb.h>
 #include <usb/xhci.h>
diff --git a/drivers/usb/host/xhci-rcar.c b/drivers/usb/host/xhci-rcar.c
index d86584b847..b3675bb1db 100644
--- a/drivers/usb/host/xhci-rcar.c
+++ b/drivers/usb/host/xhci-rcar.c
@@ -9,6 +9,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <malloc.h>
 #include <usb.h>
 #include <wait_bit.h>
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 3cd6c8a0dc..b6b7c29b3c 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -15,6 +15,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <asm/byteorder.h>
 #include <usb.h>
 #include <asm/unaligned.h>
diff --git a/drivers/usb/host/xhci-rockchip.c b/drivers/usb/host/xhci-rockchip.c
index b67722fe45..1c2bf04df3 100644
--- a/drivers/usb/host/xhci-rockchip.c
+++ b/drivers/usb/host/xhci-rockchip.c
@@ -5,6 +5,7 @@
  */
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <usb.h>
 #include <watchdog.h>
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index c370eb6394..c95831cdd8 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -22,6 +22,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <dm.h>
+#include <log.h>
 #include <asm/byteorder.h>
 #include <usb.h>
 #include <malloc.h>
diff --git a/drivers/usb/musb-new/da8xx.c b/drivers/usb/musb-new/da8xx.c
index 2ddcf33b5f..1f6e51ed98 100644
--- a/drivers/usb/musb-new/da8xx.c
+++ b/drivers/usb/musb-new/da8xx.c
@@ -15,6 +15,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/device-internal.h>
 #include <dm/device_compat.h>
 #include <dm/lists.h>
diff --git a/drivers/usb/musb-new/musb_core.c b/drivers/usb/musb-new/musb_core.c
index f678aa4826..63ce8a5655 100644
--- a/drivers/usb/musb-new/musb_core.c
+++ b/drivers/usb/musb-new/musb_core.c
@@ -65,6 +65,7 @@
  */
 
 #ifndef __UBOOT__
+#include <log.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <linux/module.h>
diff --git a/drivers/usb/musb-new/musb_gadget.c b/drivers/usb/musb-new/musb_gadget.c
index 35d2123ddd..435dca6001 100644
--- a/drivers/usb/musb-new/musb_gadget.c
+++ b/drivers/usb/musb-new/musb_gadget.c
@@ -9,6 +9,7 @@
  */
 
 #ifndef __UBOOT__
+#include <log.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <linux/kernel.h>
diff --git a/drivers/usb/musb-new/musb_gadget_ep0.c b/drivers/usb/musb-new/musb_gadget_ep0.c
index 79e8222e3b..93f43ba471 100644
--- a/drivers/usb/musb-new/musb_gadget_ep0.c
+++ b/drivers/usb/musb-new/musb_gadget_ep0.c
@@ -9,6 +9,7 @@
  */
 
 #ifndef __UBOOT__
+#include <log.h>
 #include <dm/device_compat.h>
 #include <linux/kernel.h>
 #include <linux/list.h>
diff --git a/drivers/usb/musb-new/omap2430.c b/drivers/usb/musb-new/omap2430.c
index 0d34dcfc5d..da63cc2c22 100644
--- a/drivers/usb/musb-new/omap2430.c
+++ b/drivers/usb/musb-new/omap2430.c
@@ -10,6 +10,7 @@
  */
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <serial.h>
 #include <dm/device-internal.h>
 #include <dm/device_compat.h>
diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c
index 98bf736978..1c32f3fc06 100644
--- a/drivers/usb/musb-new/sunxi.c
+++ b/drivers/usb/musb-new/sunxi.c
@@ -19,6 +19,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <generic-phy.h>
+#include <log.h>
 #include <malloc.h>
 #include <phy-sun4i-usb.h>
 #include <reset.h>
diff --git a/drivers/usb/musb-new/ti-musb.c b/drivers/usb/musb-new/ti-musb.c
index 608facefa3..f4f26d86b3 100644
--- a/drivers/usb/musb-new/ti-musb.c
+++ b/drivers/usb/musb-new/ti-musb.c
@@ -9,6 +9,7 @@
 #include <command.h>
 #include <console.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <linux/usb/otg.h>
 #include <dm/device-internal.h>
diff --git a/drivers/usb/musb/musb_hcd.c b/drivers/usb/musb/musb_hcd.c
index adcd319b6d..632a9882b3 100644
--- a/drivers/usb/musb/musb_hcd.c
+++ b/drivers/usb/musb/musb_hcd.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <usb.h>
 #include "musb_hcd.h"
 
diff --git a/drivers/usb/phy/rockchip_usb2_phy.c b/drivers/usb/phy/rockchip_usb2_phy.c
index ec998901ab..24ea8d8c31 100644
--- a/drivers/usb/phy/rockchip_usb2_phy.c
+++ b/drivers/usb/phy/rockchip_usb2_phy.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <hang.h>
+#include <log.h>
 #include <asm/io.h>
 
 #include "../gadget/dwc2_udc_otg_priv.h"
diff --git a/drivers/usb/ulpi/omap-ulpi-viewport.c b/drivers/usb/ulpi/omap-ulpi-viewport.c
index 67cdebc0fc..26299e04d5 100644
--- a/drivers/usb/ulpi/omap-ulpi-viewport.c
+++ b/drivers/usb/ulpi/omap-ulpi-viewport.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <usb/ulpi.h>
 
diff --git a/drivers/usb/ulpi/ulpi.c b/drivers/usb/ulpi/ulpi.c
index e0fb43f89b..e8499bfdee 100644
--- a/drivers/usb/ulpi/ulpi.c
+++ b/drivers/usb/ulpi/ulpi.c
@@ -21,6 +21,7 @@
 
 #include <common.h>
 #include <exports.h>
+#include <log.h>
 #include <usb/ulpi.h>
 
 #define ULPI_ID_REGS_COUNT	4
diff --git a/drivers/video/am335x-fb.c b/drivers/video/am335x-fb.c
index eb5add2a20..3e76d4e5ea 100644
--- a/drivers/video/am335x-fb.c
+++ b/drivers/video/am335x-fb.c
@@ -13,6 +13,7 @@
  */
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/omap.h>
diff --git a/drivers/video/atmel_hlcdfb.c b/drivers/video/atmel_hlcdfb.c
index 0fd74fdec9..4ea9dcb59d 100644
--- a/drivers/video/atmel_hlcdfb.c
+++ b/drivers/video/atmel_hlcdfb.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <malloc.h>
 #include <part.h>
 #include <asm/io.h>
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index 8cc2eb1973..f66ce2cd63 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -9,6 +9,7 @@
 #include <atmel_lcd.h>
 #include <dm.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <part.h>
 #include <video.h>
 #include <asm/io.h>
diff --git a/drivers/video/backlight_gpio.c b/drivers/video/backlight_gpio.c
index fb1525b478..67fed7f224 100644
--- a/drivers/video/backlight_gpio.c
+++ b/drivers/video/backlight_gpio.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <backlight.h>
+#include <log.h>
 #include <asm/gpio.h>
 
 struct gpio_backlight_priv {
diff --git a/drivers/video/bcm2835.c b/drivers/video/bcm2835.c
index ea5a4529ce..0888cb0019 100644
--- a/drivers/video/bcm2835.c
+++ b/drivers/video/bcm2835.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <video.h>
 #include <asm/arch/mbox.h>
 #include <asm/arch/msg.h>
diff --git a/drivers/video/bridge/anx6345.c b/drivers/video/bridge/anx6345.c
index 3e3f0e2ce6..6a30a5e6a6 100644
--- a/drivers/video/bridge/anx6345.c
+++ b/drivers/video/bridge/anx6345.c
@@ -8,6 +8,7 @@
 #include <errno.h>
 #include <i2c.h>
 #include <edid.h>
+#include <log.h>
 #include <video_bridge.h>
 #include "../anx98xx-edp.h"
 
diff --git a/drivers/video/bridge/ps862x.c b/drivers/video/bridge/ps862x.c
index 3c5bf7b659..52e7d697ec 100644
--- a/drivers/video/bridge/ps862x.c
+++ b/drivers/video/bridge/ps862x.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <i2c.h>
+#include <log.h>
 #include <video_bridge.h>
 #include <power/regulator.h>
 
diff --git a/drivers/video/bridge/ptn3460.c b/drivers/video/bridge/ptn3460.c
index 59f0649646..4760f04108 100644
--- a/drivers/video/bridge/ptn3460.c
+++ b/drivers/video/bridge/ptn3460.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <video_bridge.h>
 
 static int ptn3460_attach(struct udevice *dev)
diff --git a/drivers/video/bridge/video-bridge-uclass.c b/drivers/video/bridge/video-bridge-uclass.c
index 5fecb4cfd5..bd6635ecf5 100644
--- a/drivers/video/bridge/video-bridge-uclass.c
+++ b/drivers/video/bridge/video-bridge-uclass.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <edid.h>
+#include <log.h>
 #include <video_bridge.h>
 
 int video_bridge_set_backlight(struct udevice *dev, int percent)
diff --git a/drivers/video/broadwell_igd.c b/drivers/video/broadwell_igd.c
index 86c4c10b38..fafde7df4b 100644
--- a/drivers/video/broadwell_igd.c
+++ b/drivers/video/broadwell_igd.c
@@ -10,6 +10,7 @@
 #include <bootstage.h>
 #include <dm.h>
 #include <init.h>
+#include <log.h>
 #include <vbe.h>
 #include <video.h>
 #include <asm/cpu.h>
diff --git a/drivers/video/bus_vcxk.c b/drivers/video/bus_vcxk.c
index e87c66d515..2a72d23eb8 100644
--- a/drivers/video/bus_vcxk.c
+++ b/drivers/video/bus_vcxk.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <bmp_layout.h>
+#include <log.h>
 #include <asm/io.h>
 
 vu_char  *vcxk_bws      = ((vu_char *) (CONFIG_SYS_VCXK_BASE));
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 8918d83723..6495e22b1a 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -70,6 +70,7 @@
 #include <env.h>
 #include <fdtdec.h>
 #include <gzip.h>
+#include <log.h>
 #include <version.h>
 #include <malloc.h>
 #include <video.h>
diff --git a/drivers/video/console_truetype.c b/drivers/video/console_truetype.c
index 6d7661db89..5f7f03904b 100644
--- a/drivers/video/console_truetype.c
+++ b/drivers/video/console_truetype.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <video.h>
 #include <video_console.h>
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
index 5fb68865ef..c21da6ea06 100644
--- a/drivers/video/da8xx-fb.c
+++ b/drivers/video/da8xx-fb.c
@@ -13,6 +13,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 #include <memalign.h>
 #include <video_fb.h>
diff --git a/drivers/video/dw_hdmi.c b/drivers/video/dw_hdmi.c
index bf74d6adf2..daf0024c64 100644
--- a/drivers/video/dw_hdmi.c
+++ b/drivers/video/dw_hdmi.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <asm/io.h>
 #include <i2c.h>
 #include <media_bus_format.h>
diff --git a/drivers/video/efi.c b/drivers/video/efi.c
index 653cb47265..47441a35a6 100644
--- a/drivers/video/efi.c
+++ b/drivers/video/efi.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <efi_api.h>
+#include <log.h>
 #include <vbe.h>
 #include <video.h>
 
diff --git a/drivers/video/exynos/exynos_dp.c b/drivers/video/exynos/exynos_dp.c
index 2781f6f55b..c20d3c1346 100644
--- a/drivers/video/exynos/exynos_dp.c
+++ b/drivers/video/exynos/exynos_dp.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <display.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <linux/libfdt.h>
 #include <malloc.h>
 #include <video_bridge.h>
diff --git a/drivers/video/exynos/exynos_dp_lowlevel.c b/drivers/video/exynos/exynos_dp_lowlevel.c
index 802703750f..b835b5c383 100644
--- a/drivers/video/exynos/exynos_dp_lowlevel.c
+++ b/drivers/video/exynos/exynos_dp_lowlevel.c
@@ -7,6 +7,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <log.h>
 #include <linux/err.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/dp_info.h>
diff --git a/drivers/video/exynos/exynos_fb.c b/drivers/video/exynos/exynos_fb.c
index 8a8c846262..d5b13a6723 100644
--- a/drivers/video/exynos/exynos_fb.c
+++ b/drivers/video/exynos/exynos_fb.c
@@ -12,6 +12,7 @@
 #include <div64.h>
 #include <dm.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <linux/libfdt.h>
 #include <panel.h>
 #include <video.h>
diff --git a/drivers/video/exynos/exynos_mipi_dsi.c b/drivers/video/exynos/exynos_mipi_dsi.c
index ad5ef93e01..042aa9a5b9 100644
--- a/drivers/video/exynos/exynos_mipi_dsi.c
+++ b/drivers/video/exynos/exynos_mipi_dsi.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 #include <fdtdec.h>
 #include <dm/devres.h>
diff --git a/drivers/video/exynos/exynos_mipi_dsi_common.c b/drivers/video/exynos/exynos_mipi_dsi_common.c
index adf3d968b6..48edb9c55f 100644
--- a/drivers/video/exynos/exynos_mipi_dsi_common.c
+++ b/drivers/video/exynos/exynos_mipi_dsi_common.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <lcd.h>
+#include <log.h>
 #include <linux/err.h>
 #include <asm/arch/dsim.h>
 #include <asm/arch/mipi_dsim.h>
diff --git a/drivers/video/formike.c b/drivers/video/formike.c
index 7bc4bc6041..1e2febd796 100644
--- a/drivers/video/formike.c
+++ b/drivers/video/formike.c
@@ -7,6 +7,7 @@
  */
 #include <common.h>
 #include <errno.h>
+#include <log.h>
 #include <spi.h>
 
 #define TAG_READ	0x80
diff --git a/drivers/video/ihs_video_out.c b/drivers/video/ihs_video_out.c
index 0af7c2bf44..f02fd13d28 100644
--- a/drivers/video/ihs_video_out.c
+++ b/drivers/video/ihs_video_out.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <display.h>
 #include <dm.h>
+#include <log.h>
 #include <regmap.h>
 #include <video_osd.h>
 #include <asm/gpio.h>
diff --git a/drivers/video/imx/ipu_common.c b/drivers/video/imx/ipu_common.c
index cbe1984e4f..0f24de9bf8 100644
--- a/drivers/video/imx/ipu_common.c
+++ b/drivers/video/imx/ipu_common.c
@@ -12,6 +12,7 @@
 
 /* #define DEBUG */
 #include <common.h>
+#include <log.h>
 #include <linux/types.h>
 #include <linux/err.h>
 #include <asm/io.h>
diff --git a/drivers/video/imx/ipu_disp.c b/drivers/video/imx/ipu_disp.c
index 5c7722962d..2274976c6c 100644
--- a/drivers/video/imx/ipu_disp.c
+++ b/drivers/video/imx/ipu_disp.c
@@ -13,6 +13,7 @@
 /* #define DEBUG */
 
 #include <common.h>
+#include <log.h>
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <asm/io.h>
diff --git a/drivers/video/imx/mxc_ipuv3_fb.c b/drivers/video/imx/mxc_ipuv3_fb.c
index f8ed0a9fea..4044473f99 100644
--- a/drivers/video/imx/mxc_ipuv3_fb.c
+++ b/drivers/video/imx/mxc_ipuv3_fb.c
@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <part.h>
 #include <asm/cache.h>
 #include <linux/errno.h>
diff --git a/drivers/video/ivybridge_igd.c b/drivers/video/ivybridge_igd.c
index 6b986e9358..1881423091 100644
--- a/drivers/video/ivybridge_igd.c
+++ b/drivers/video/ivybridge_igd.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <pci_rom.h>
 #include <vbe.h>
 #include <asm/intel_regs.h>
diff --git a/drivers/video/lg4573.c b/drivers/video/lg4573.c
index 74a2388924..8b458e28dc 100644
--- a/drivers/video/lg4573.c
+++ b/drivers/video/lg4573.c
@@ -9,6 +9,7 @@
 #include <command.h>
 #include <display.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/read.h>
 #include <dm/uclass-internal.h>
 #include <errno.h>
diff --git a/drivers/video/meson/meson_dw_hdmi.c b/drivers/video/meson/meson_dw_hdmi.c
index ae2e6288f3..288b906544 100644
--- a/drivers/video/meson/meson_dw_hdmi.c
+++ b/drivers/video/meson/meson_dw_hdmi.c
@@ -8,6 +8,7 @@
 #include <display.h>
 #include <dm.h>
 #include <edid.h>
+#include <log.h>
 #include <asm/io.h>
 #include <dw_hdmi.h>
 #include <dm/device-internal.h>
diff --git a/drivers/video/meson/meson_vclk.c b/drivers/video/meson/meson_vclk.c
index 01bfa4bcb8..3b5b73b7c3 100644
--- a/drivers/video/meson/meson_vclk.c
+++ b/drivers/video/meson/meson_vclk.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <edid.h>
 #include "meson_vpu.h"
+#include <log.h>
 #include <linux/iopoll.h>
 #include <linux/math64.h>
 
diff --git a/drivers/video/meson/meson_venc.c b/drivers/video/meson/meson_venc.c
index 89e859b02a..e7366dd2fd 100644
--- a/drivers/video/meson/meson_venc.c
+++ b/drivers/video/meson/meson_venc.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <edid.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <asm/io.h>
 #include "meson_vpu.h"
 
diff --git a/drivers/video/meson/meson_vpu.c b/drivers/video/meson/meson_vpu.c
index fbdec3af67..d2b5e48fb9 100644
--- a/drivers/video/meson/meson_vpu.c
+++ b/drivers/video/meson/meson_vpu.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <efi_loader.h>
 #include <fdt_support.h>
+#include <log.h>
 #include <part.h>
 #include <linux/sizes.h>
 #include <asm/arch/mem.h>
diff --git a/drivers/video/mx3fb.c b/drivers/video/mx3fb.c
index a984443ef9..4b8712fb69 100644
--- a/drivers/video/mx3fb.c
+++ b/drivers/video/mx3fb.c
@@ -7,6 +7,7 @@
  */
 #include <common.h>
 #include <env.h>
+#include <log.h>
 #include <malloc.h>
 #include <video_fb.h>
 
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index edce7912f3..0235731c5c 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -8,6 +8,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <env.h>
+#include <log.h>
 #include <asm/cache.h>
 #include <dm/device_compat.h>
 #include <linux/errno.h>
diff --git a/drivers/video/pwm_backlight.c b/drivers/video/pwm_backlight.c
index 742579aba7..149fbaef06 100644
--- a/drivers/video/pwm_backlight.c
+++ b/drivers/video/pwm_backlight.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <dm.h>
 #include <backlight.h>
+#include <log.h>
 #include <malloc.h>
 #include <pwm.h>
 #include <asm/gpio.h>
diff --git a/drivers/video/pxa_lcd.c b/drivers/video/pxa_lcd.c
index 92d6e3d467..67f5266164 100644
--- a/drivers/video/pxa_lcd.c
+++ b/drivers/video/pxa_lcd.c
@@ -11,6 +11,7 @@
 /************************************************************************/
 
 #include <common.h>
+#include <log.h>
 #include <asm/arch/pxa-regs.h>
 #include <asm/io.h>
 #include <lcd.h>
diff --git a/drivers/video/rockchip/rk3288_hdmi.c b/drivers/video/rockchip/rk3288_hdmi.c
index 51eb41540b..f835f4d517 100644
--- a/drivers/video/rockchip/rk3288_hdmi.c
+++ b/drivers/video/rockchip/rk3288_hdmi.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <dw_hdmi.h>
 #include <edid.h>
+#include <log.h>
 #include <malloc.h>
 #include <regmap.h>
 #include <syscon.h>
diff --git a/drivers/video/rockchip/rk3288_mipi.c b/drivers/video/rockchip/rk3288_mipi.c
index 71d3faf169..b232ff0b76 100644
--- a/drivers/video/rockchip/rk3288_mipi.c
+++ b/drivers/video/rockchip/rk3288_mipi.c
@@ -8,6 +8,7 @@
 #include <clk.h>
 #include <display.h>
 #include <dm.h>
+#include <log.h>
 #include <panel.h>
 #include <regmap.h>
 #include "rk_mipi.h"
diff --git a/drivers/video/rockchip/rk3399_mipi.c b/drivers/video/rockchip/rk3399_mipi.c
index cfaa37797e..113708d97e 100644
--- a/drivers/video/rockchip/rk3399_mipi.c
+++ b/drivers/video/rockchip/rk3399_mipi.c
@@ -8,6 +8,7 @@
 #include <clk.h>
 #include <display.h>
 #include <dm.h>
+#include <log.h>
 #include <panel.h>
 #include <regmap.h>
 #include "rk_mipi.h"
diff --git a/drivers/video/rockchip/rk3399_vop.c b/drivers/video/rockchip/rk3399_vop.c
index 1d5b3931a6..d5a7aa8ac1 100644
--- a/drivers/video/rockchip/rk3399_vop.c
+++ b/drivers/video/rockchip/rk3399_vop.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <display.h>
 #include <dm.h>
+#include <log.h>
 #include <regmap.h>
 #include <video.h>
 #include <asm/arch-rockchip/hardware.h>
diff --git a/drivers/video/rockchip/rk_edp.c b/drivers/video/rockchip/rk_edp.c
index 99b16cd95e..49ed5aaae6 100644
--- a/drivers/video/rockchip/rk_edp.c
+++ b/drivers/video/rockchip/rk_edp.c
@@ -9,6 +9,7 @@
 #include <display.h>
 #include <dm.h>
 #include <edid.h>
+#include <log.h>
 #include <malloc.h>
 #include <panel.h>
 #include <regmap.h>
diff --git a/drivers/video/rockchip/rk_hdmi.c b/drivers/video/rockchip/rk_hdmi.c
index 5b44a7e8c9..f27cdf8ed4 100644
--- a/drivers/video/rockchip/rk_hdmi.c
+++ b/drivers/video/rockchip/rk_hdmi.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <dw_hdmi.h>
 #include <edid.h>
+#include <log.h>
 #include <regmap.h>
 #include <syscon.h>
 #include <asm/gpio.h>
diff --git a/drivers/video/rockchip/rk_lvds.c b/drivers/video/rockchip/rk_lvds.c
index c92c2e3c6c..04f795a213 100644
--- a/drivers/video/rockchip/rk_lvds.c
+++ b/drivers/video/rockchip/rk_lvds.c
@@ -7,6 +7,7 @@
 #include <display.h>
 #include <dm.h>
 #include <edid.h>
+#include <log.h>
 #include <panel.h>
 #include <regmap.h>
 #include <syscon.h>
diff --git a/drivers/video/rockchip/rk_mipi.c b/drivers/video/rockchip/rk_mipi.c
index f1c21bb8d7..f811913ce5 100644
--- a/drivers/video/rockchip/rk_mipi.c
+++ b/drivers/video/rockchip/rk_mipi.c
@@ -8,6 +8,7 @@
 #include <clk.h>
 #include <display.h>
 #include <dm.h>
+#include <log.h>
 #include <panel.h>
 #include <regmap.h>
 #include "rk_mipi.h"
diff --git a/drivers/video/rockchip/rk_vop.c b/drivers/video/rockchip/rk_vop.c
index e1bd656bee..45385b175b 100644
--- a/drivers/video/rockchip/rk_vop.c
+++ b/drivers/video/rockchip/rk_vop.c
@@ -9,6 +9,7 @@
 #include <display.h>
 #include <dm.h>
 #include <edid.h>
+#include <log.h>
 #include <regmap.h>
 #include <syscon.h>
 #include <video.h>
diff --git a/drivers/video/sandbox_sdl.c b/drivers/video/sandbox_sdl.c
index 1196e6c671..20248e6607 100644
--- a/drivers/video/sandbox_sdl.c
+++ b/drivers/video/sandbox_sdl.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <video.h>
 #include <asm/sdl.h>
 #include <asm/state.h>
diff --git a/drivers/video/simple_panel.c b/drivers/video/simple_panel.c
index 5722811117..6c624c3769 100644
--- a/drivers/video/simple_panel.c
+++ b/drivers/video/simple_panel.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <backlight.h>
 #include <dm.h>
+#include <log.h>
 #include <panel.h>
 #include <asm/gpio.h>
 #include <power/regulator.h>
diff --git a/drivers/video/simplefb.c b/drivers/video/simplefb.c
index 1679d20002..0c5b40c30b 100644
--- a/drivers/video/simplefb.c
+++ b/drivers/video/simplefb.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <fdt_support.h>
+#include <log.h>
 #include <video.h>
 
 static int simple_video_probe(struct udevice *dev)
diff --git a/drivers/video/stm32/stm32_dsi.c b/drivers/video/stm32/stm32_dsi.c
index ded03b109c..fa4efdb298 100644
--- a/drivers/video/stm32/stm32_dsi.c
+++ b/drivers/video/stm32/stm32_dsi.c
@@ -12,6 +12,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <dsi_host.h>
+#include <log.h>
 #include <mipi_dsi.h>
 #include <panel.h>
 #include <reset.h>
diff --git a/drivers/video/stm32/stm32_ltdc.c b/drivers/video/stm32/stm32_ltdc.c
index be7e9bff01..ff48fd7af9 100644
--- a/drivers/video/stm32/stm32_ltdc.c
+++ b/drivers/video/stm32/stm32_ltdc.c
@@ -9,6 +9,7 @@
 #include <clk.h>
 #include <display.h>
 #include <dm.h>
+#include <log.h>
 #include <panel.h>
 #include <reset.h>
 #include <video.h>
diff --git a/drivers/video/sunxi/lcdc.c b/drivers/video/sunxi/lcdc.c
index 4cf3a0eb75..e8da302303 100644
--- a/drivers/video/sunxi/lcdc.c
+++ b/drivers/video/sunxi/lcdc.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 
 #include <asm/arch/clock.h>
 #include <asm/arch/lcdc.h>
diff --git a/drivers/video/sunxi/sunxi_de2.c b/drivers/video/sunxi/sunxi_de2.c
index ba34f1a107..0d20e82ba3 100644
--- a/drivers/video/sunxi/sunxi_de2.c
+++ b/drivers/video/sunxi/sunxi_de2.c
@@ -12,6 +12,7 @@
 #include <efi_loader.h>
 #include <fdtdec.h>
 #include <fdt_support.h>
+#include <log.h>
 #include <part.h>
 #include <video.h>
 #include <asm/global_data.h>
diff --git a/drivers/video/sunxi/sunxi_dw_hdmi.c b/drivers/video/sunxi/sunxi_dw_hdmi.c
index c87c919a52..546b863b64 100644
--- a/drivers/video/sunxi/sunxi_dw_hdmi.c
+++ b/drivers/video/sunxi/sunxi_dw_hdmi.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <dw_hdmi.h>
 #include <edid.h>
+#include <log.h>
 #include <time.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
diff --git a/drivers/video/sunxi/sunxi_lcd.c b/drivers/video/sunxi/sunxi_lcd.c
index 619f5892f5..49bf083a8d 100644
--- a/drivers/video/sunxi/sunxi_lcd.c
+++ b/drivers/video/sunxi/sunxi_lcd.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <display.h>
+#include <log.h>
 #include <video_bridge.h>
 #include <backlight.h>
 #include <dm.h>
diff --git a/drivers/video/tegra.c b/drivers/video/tegra.c
index 82ba5c4e7e..1208d91286 100644
--- a/drivers/video/tegra.c
+++ b/drivers/video/tegra.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <panel.h>
 #include <part.h>
 #include <pwm.h>
diff --git a/drivers/video/tegra124/display.c b/drivers/video/tegra124/display.c
index a552f38cd0..0aa9541101 100644
--- a/drivers/video/tegra124/display.c
+++ b/drivers/video/tegra124/display.c
@@ -13,6 +13,7 @@
 #include <display.h>
 #include <edid.h>
 #include <lcd.h>
+#include <log.h>
 #include <part.h>
 #include <video.h>
 #include <asm/gpio.h>
diff --git a/drivers/video/tegra124/dp.c b/drivers/video/tegra124/dp.c
index 73e0651fb9..e90210b695 100644
--- a/drivers/video/tegra124/dp.c
+++ b/drivers/video/tegra124/dp.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <div64.h>
 #include <errno.h>
+#include <log.h>
 #include <video_bridge.h>
 #include <asm/io.h>
 #include <asm/arch-tegra/dc.h>
diff --git a/drivers/video/tegra124/sor.c b/drivers/video/tegra124/sor.c
index 8dc3df61aa..0d35a3eb62 100644
--- a/drivers/video/tegra124/sor.c
+++ b/drivers/video/tegra124/sor.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <panel.h>
 #include <syscon.h>
diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c
index dd6786ffae..d30e6db6f6 100644
--- a/drivers/video/vidconsole-uclass.c
+++ b/drivers/video/vidconsole-uclass.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <log.h>
 #include <linux/ctype.h>
 #include <dm.h>
 #include <video.h>
diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index eed61cd731..bf396d1091 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <mapmem.h>
 #include <stdio_dev.h>
diff --git a/drivers/video/video_bmp.c b/drivers/video/video_bmp.c
index 8768228029..eb9636541d 100644
--- a/drivers/video/video_bmp.c
+++ b/drivers/video/video_bmp.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <bmp_layout.h>
 #include <dm.h>
+#include <log.h>
 #include <mapmem.h>
 #include <splash.h>
 #include <video.h>
diff --git a/drivers/virtio/virtio-uclass.c b/drivers/virtio/virtio-uclass.c
index 23f281cd6e..d4ecd16ec8 100644
--- a/drivers/virtio/virtio-uclass.c
+++ b/drivers/virtio/virtio-uclass.c
@@ -17,6 +17,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <virtio_types.h>
 #include <virtio.h>
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index 60ece133ab..184c5f0a59 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <virtio_types.h>
 #include <virtio.h>
 #include <virtio_ring.h>
diff --git a/drivers/virtio/virtio_pci_legacy.c b/drivers/virtio/virtio_pci_legacy.c
index d9be2601bb..79e62cfb62 100644
--- a/drivers/virtio/virtio_pci_legacy.c
+++ b/drivers/virtio/virtio_pci_legacy.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <virtio_types.h>
 #include <virtio.h>
 #include <virtio_ring.h>
diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c
index 4673f4ab55..32ce4ea5ae 100644
--- a/drivers/virtio/virtio_pci_modern.c
+++ b/drivers/virtio/virtio_pci_modern.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <virtio_types.h>
 #include <virtio.h>
 #include <virtio_ring.h>
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 45c48a927a..7130b8432a 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <virtio_types.h>
 #include <virtio.h>
diff --git a/drivers/virtio/virtio_rng.c b/drivers/virtio/virtio_rng.c
index 4edffa6f31..fc3e19cfae 100644
--- a/drivers/virtio/virtio_rng.c
+++ b/drivers/virtio/virtio_rng.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <rng.h>
 #include <virtio_types.h>
 #include <virtio.h>
diff --git a/drivers/w1-eeprom/w1-eeprom-uclass.c b/drivers/w1-eeprom/w1-eeprom-uclass.c
index 7b0579344c..d515b4c536 100644
--- a/drivers/w1-eeprom/w1-eeprom-uclass.c
+++ b/drivers/w1-eeprom/w1-eeprom-uclass.c
@@ -12,6 +12,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <w1.h>
 #include <w1-eeprom.h>
 
diff --git a/drivers/w1/w1-gpio.c b/drivers/w1/w1-gpio.c
index 5e5d6b3f6c..90821cf73b 100644
--- a/drivers/w1/w1-gpio.c
+++ b/drivers/w1/w1-gpio.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <w1.h>
 
 #include <asm/gpio.h>
diff --git a/drivers/w1/w1-uclass.c b/drivers/w1/w1-uclass.c
index 042b3b5ce0..9478c93e9b 100644
--- a/drivers/w1/w1-uclass.c
+++ b/drivers/w1/w1-uclass.c
@@ -12,6 +12,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <w1.h>
 #include <w1-eeprom.h>
 
diff --git a/drivers/watchdog/ast_wdt.c b/drivers/watchdog/ast_wdt.c
index fe2f6be5a7..7e11465a57 100644
--- a/drivers/watchdog/ast_wdt.c
+++ b/drivers/watchdog/ast_wdt.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <wdt.h>
 #include <asm/io.h>
 #include <asm/arch/wdt.h>
diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c
index 48433cc158..18756e34df 100644
--- a/drivers/watchdog/at91sam9_wdt.c
+++ b/drivers/watchdog/at91sam9_wdt.c
@@ -14,6 +14,7 @@
  * write to this register. Inform Linux to it too
  */
 
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/at91_wdt.h>
 #include <common.h>
diff --git a/drivers/watchdog/bcm6345_wdt.c b/drivers/watchdog/bcm6345_wdt.c
index 9f14e7d777..ee77f49a94 100644
--- a/drivers/watchdog/bcm6345_wdt.c
+++ b/drivers/watchdog/bcm6345_wdt.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <wdt.h>
 #include <clk.h>
 #include <asm/io.h>
diff --git a/drivers/watchdog/cdns_wdt.c b/drivers/watchdog/cdns_wdt.c
index 5bf02605a8..2abd5524f6 100644
--- a/drivers/watchdog/cdns_wdt.c
+++ b/drivers/watchdog/cdns_wdt.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <wdt.h>
 #include <clk.h>
 #include <div64.h>
diff --git a/drivers/watchdog/ftwdt010_wdt.c b/drivers/watchdog/ftwdt010_wdt.c
index 076d801f5d..6aed41642d 100644
--- a/drivers/watchdog/ftwdt010_wdt.c
+++ b/drivers/watchdog/ftwdt010_wdt.c
@@ -14,6 +14,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <watchdog.h>
 #include <asm/io.h>
 #include <faraday/ftwdt010_wdt.h>
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
index 5199d914ed..ed8b2199c2 100644
--- a/drivers/watchdog/omap_wdt.c
+++ b/drivers/watchdog/omap_wdt.c
@@ -37,6 +37,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <watchdog.h>
 #include <asm/arch/hardware.h>
 #include <asm/io.h>
diff --git a/drivers/watchdog/orion_wdt.c b/drivers/watchdog/orion_wdt.c
index 885821d562..581e1f1693 100644
--- a/drivers/watchdog/orion_wdt.c
+++ b/drivers/watchdog/orion_wdt.c
@@ -15,6 +15,7 @@
 #include <common.h>
 #include <dm.h>
 #include <clk.h>
+#include <log.h>
 #include <wdt.h>
 #include <linux/kernel.h>
 #include <asm/io.h>
diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c
index 65fd2384f1..23fef2147f 100644
--- a/drivers/watchdog/sp805_wdt.c
+++ b/drivers/watchdog/sp805_wdt.c
@@ -5,6 +5,7 @@
  * Copyright 2019 NXP
  */
 
+#include <log.h>
 #include <asm/io.h>
 #include <common.h>
 #include <clk.h>
diff --git a/drivers/watchdog/stm32mp_wdt.c b/drivers/watchdog/stm32mp_wdt.c
index 8093d0a9f4..2d509a0522 100644
--- a/drivers/watchdog/stm32mp_wdt.c
+++ b/drivers/watchdog/stm32mp_wdt.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <clk.h>
 #include <dm.h>
+#include <log.h>
 #include <syscon.h>
 #include <wdt.h>
 #include <asm/io.h>
diff --git a/drivers/watchdog/tangier_wdt.c b/drivers/watchdog/tangier_wdt.c
index ba265cf223..358a9b90fd 100644
--- a/drivers/watchdog/tangier_wdt.c
+++ b/drivers/watchdog/tangier_wdt.c
@@ -4,6 +4,7 @@
  */
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <wdt.h>
 #include <div64.h>
 #include <asm/scu.h>
diff --git a/drivers/watchdog/wdt-uclass.c b/drivers/watchdog/wdt-uclass.c
index 4cdb7bd64c..e632f077f3 100644
--- a/drivers/watchdog/wdt-uclass.c
+++ b/drivers/watchdog/wdt-uclass.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <hang.h>
+#include <log.h>
 #include <time.h>
 #include <wdt.h>
 #include <dm/device-internal.h>
diff --git a/drivers/watchdog/xilinx_tb_wdt.c b/drivers/watchdog/xilinx_tb_wdt.c
index 5580764da7..ea4311c8ce 100644
--- a/drivers/watchdog/xilinx_tb_wdt.c
+++ b/drivers/watchdog/xilinx_tb_wdt.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <wdt.h>
 #include <linux/err.h>
 #include <linux/io.h>
diff --git a/env/common.c b/env/common.c
index 0256b3e356..088b2aebb4 100644
--- a/env/common.c
+++ b/env/common.c
@@ -12,6 +12,7 @@
 #include <command.h>
 #include <env.h>
 #include <env_internal.h>
+#include <log.h>
 #include <sort.h>
 #include <linux/stddef.h>
 #include <search.h>
diff --git a/env/env.c b/env/env.c
index 9237bb9c74..393f1490de 100644
--- a/env/env.c
+++ b/env/env.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <env.h>
 #include <env_internal.h>
+#include <log.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/env/flash.c b/env/flash.c
index e05f7ef74b..3198147c38 100644
--- a/env/flash.c
+++ b/env/flash.c
@@ -14,6 +14,7 @@
 #include <env.h>
 #include <env_internal.h>
 #include <flash.h>
+#include <log.h>
 #include <linux/stddef.h>
 #include <malloc.h>
 #include <search.h>
diff --git a/fs/btrfs/chunk-map.c b/fs/btrfs/chunk-map.c
index 0c9a659f8f..2e5be65067 100644
--- a/fs/btrfs/chunk-map.c
+++ b/fs/btrfs/chunk-map.c
@@ -6,6 +6,7 @@
  */
 
 #include "btrfs.h"
+#include <log.h>
 #include <malloc.h>
 
 struct chunk_map_item {
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index b1884fc15e..59e4a94cb2 100644
--- a/fs/btrfs/compression.c
+++ b/fs/btrfs/compression.c
@@ -6,6 +6,7 @@
  */
 
 #include "btrfs.h"
+#include <log.h>
 #include <malloc.h>
 #include <linux/lzo.h>
 #include <linux/zstd.h>
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index 7fae383f15..28f98d43ad 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -6,6 +6,7 @@
  */
 
 #include "btrfs.h"
+#include <log.h>
 #include <malloc.h>
 #include <memalign.h>
 
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index f80c148627..913a4d402e 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <memalign.h>
 #include <part.h>
 #include <linux/compat.h>
diff --git a/fs/ext4/dev.c b/fs/ext4/dev.c
index 0d4f756aa5..168443de1f 100644
--- a/fs/ext4/dev.c
+++ b/fs/ext4/dev.c
@@ -29,6 +29,7 @@
 #include <ext4fs.h>
 #include <ext_common.h>
 #include "ext4_common.h"
+#include <log.h>
 
 lbaint_t part_offset;
 
diff --git a/fs/ext4/ext4_common.c b/fs/ext4/ext4_common.c
index 9adef57476..c52cc400e1 100644
--- a/fs/ext4/ext4_common.c
+++ b/fs/ext4/ext4_common.c
@@ -22,6 +22,7 @@
 #include <blk.h>
 #include <ext_common.h>
 #include <ext4fs.h>
+#include <log.h>
 #include <malloc.h>
 #include <memalign.h>
 #include <part.h>
diff --git a/fs/ext4/ext4_journal.c b/fs/ext4/ext4_journal.c
index 2a8d397af4..1a340b4764 100644
--- a/fs/ext4/ext4_journal.c
+++ b/fs/ext4/ext4_journal.c
@@ -16,6 +16,7 @@
 #include <common.h>
 #include <blk.h>
 #include <ext4fs.h>
+#include <log.h>
 #include <malloc.h>
 #include <ext_common.h>
 #include "ext4_common.h"
diff --git a/fs/ext4/ext4_write.c b/fs/ext4/ext4_write.c
index ce1fddc9a4..f22af45d1b 100644
--- a/fs/ext4/ext4_write.c
+++ b/fs/ext4/ext4_write.c
@@ -23,6 +23,7 @@
 
 #include <common.h>
 #include <blk.h>
+#include <log.h>
 #include <malloc.h>
 #include <memalign.h>
 #include <part.h>
diff --git a/fs/fat/fat.c b/fs/fat/fat.c
index 425d877c74..7fd29470c1 100644
--- a/fs/fat/fat.c
+++ b/fs/fat/fat.c
@@ -14,6 +14,7 @@
 #include <exports.h>
 #include <fat.h>
 #include <fs.h>
+#include <log.h>
 #include <asm/byteorder.h>
 #include <part.h>
 #include <malloc.h>
diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c
index d2aff09200..59cc0bae94 100644
--- a/fs/fat/fat_write.c
+++ b/fs/fat/fat_write.c
@@ -9,6 +9,7 @@
 #include <command.h>
 #include <config.h>
 #include <fat.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/byteorder.h>
 #include <part.h>
diff --git a/fs/fs.c b/fs/fs.c
index 5591c65eaa..ad4caaeb1e 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <env.h>
 #include <lmb.h>
+#include <log.h>
 #include <mapmem.h>
 #include <part.h>
 #include <ext4fs.h>
diff --git a/fs/fs_internal.c b/fs/fs_internal.c
index 115c010ef8..8b19811a63 100644
--- a/fs/fs_internal.c
+++ b/fs/fs_internal.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <blk.h>
 #include <compiler.h>
+#include <log.h>
 #include <part.h>
 #include <memalign.h>
 
diff --git a/fs/ubifs/budget.c b/fs/ubifs/budget.c
index 9eb5d3fed1..514f15f58c 100644
--- a/fs/ubifs/budget.c
+++ b/fs/ubifs/budget.c
@@ -20,6 +20,7 @@
 
 #include "ubifs.h"
 #ifndef __UBOOT__
+#include <log.h>
 #include <linux/writeback.h>
 #else
 #include <linux/err.h>
diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c
index 6835f86fec..2ff8f1a5f9 100644
--- a/fs/ubifs/debug.c
+++ b/fs/ubifs/debug.c
@@ -16,6 +16,7 @@
  */
 
 #include <hexdump.h>
+#include <log.h>
 #include <dm/devres.h>
 
 #ifndef __UBOOT__
diff --git a/fs/ubifs/gc.c b/fs/ubifs/gc.c
index f923d07652..6a4ada62c8 100644
--- a/fs/ubifs/gc.c
+++ b/fs/ubifs/gc.c
@@ -41,6 +41,7 @@
  * good, and GC takes extra care when moving them.
  */
 #ifndef __UBOOT__
+#include <log.h>
 #include <dm/devres.h>
 #include <linux/slab.h>
 #include <linux/pagemap.h>
diff --git a/fs/ubifs/io.c b/fs/ubifs/io.c
index 1389268b5f..eb14b89544 100644
--- a/fs/ubifs/io.c
+++ b/fs/ubifs/io.c
@@ -60,6 +60,7 @@
 
 #ifndef __UBOOT__
 #include <init.h>
+#include <log.h>
 #include <dm/devres.h>
 #include <linux/crc32.h>
 #include <linux/slab.h>
diff --git a/fs/ubifs/log.c b/fs/ubifs/log.c
index 5cbb8aa1b2..77ff52575e 100644
--- a/fs/ubifs/log.c
+++ b/fs/ubifs/log.c
@@ -16,6 +16,7 @@
  */
 
 #ifdef __UBOOT__
+#include <log.h>
 #include <dm/devres.h>
 #include <linux/err.h>
 #endif
diff --git a/fs/ubifs/lprops.c b/fs/ubifs/lprops.c
index a7c45dd5ec..a9e22abe6b 100644
--- a/fs/ubifs/lprops.c
+++ b/fs/ubifs/lprops.c
@@ -17,6 +17,7 @@
  */
 
 #ifdef __UBOOT__
+#include <log.h>
 #include <malloc.h>
 #include <linux/err.h>
 #endif
diff --git a/fs/ubifs/lpt.c b/fs/ubifs/lpt.c
index ebfb1d4dd7..62748b0210 100644
--- a/fs/ubifs/lpt.c
+++ b/fs/ubifs/lpt.c
@@ -33,6 +33,7 @@
 
 #include "ubifs.h"
 #ifndef __UBOOT__
+#include <log.h>
 #include <dm/devres.h>
 #include <linux/crc16.h>
 #include <linux/math64.h>
diff --git a/fs/ubifs/lpt_commit.c b/fs/ubifs/lpt_commit.c
index aa5956c52e..32938a8ffe 100644
--- a/fs/ubifs/lpt_commit.c
+++ b/fs/ubifs/lpt_commit.c
@@ -14,6 +14,7 @@
  */
 
 #ifndef __UBOOT__
+#include <log.h>
 #include <dm/devres.h>
 #include <linux/crc16.h>
 #include <linux/slab.h>
diff --git a/fs/ubifs/master.c b/fs/ubifs/master.c
index 2740aaee8b..055c654ae8 100644
--- a/fs/ubifs/master.c
+++ b/fs/ubifs/master.c
@@ -12,6 +12,7 @@
 
 #include "ubifs.h"
 #ifdef __UBOOT__
+#include <log.h>
 #include <dm/devres.h>
 #include <linux/compat.h>
 #include <linux/err.h>
diff --git a/fs/ubifs/orphan.c b/fs/ubifs/orphan.c
index a67b3eec93..6aa2890ff0 100644
--- a/fs/ubifs/orphan.c
+++ b/fs/ubifs/orphan.c
@@ -7,6 +7,7 @@
  * Author: Adrian Hunter
  */
 
+#include <log.h>
 #include <dm/devres.h>
 #include <linux/err.h>
 #include "ubifs.h"
diff --git a/fs/ubifs/recovery.c b/fs/ubifs/recovery.c
index 3388efe2b7..6b6884fb20 100644
--- a/fs/ubifs/recovery.c
+++ b/fs/ubifs/recovery.c
@@ -36,6 +36,7 @@
  */
 
 #ifndef __UBOOT__
+#include <log.h>
 #include <dm/devres.h>
 #include <linux/crc32.h>
 #include <linux/slab.h>
diff --git a/fs/ubifs/replay.c b/fs/ubifs/replay.c
index 3a9fa4130e..aa7f281ef6 100644
--- a/fs/ubifs/replay.c
+++ b/fs/ubifs/replay.c
@@ -21,6 +21,7 @@
  */
 
 #ifdef __UBOOT__
+#include <log.h>
 #include <dm/devres.h>
 #include <linux/compat.h>
 #include <linux/err.h>
diff --git a/fs/ubifs/sb.c b/fs/ubifs/sb.c
index 599e1a35fb..1d49285c7d 100644
--- a/fs/ubifs/sb.c
+++ b/fs/ubifs/sb.c
@@ -16,6 +16,7 @@
 
 #include "ubifs.h"
 #ifndef __UBOOT__
+#include <log.h>
 #include <dm/devres.h>
 #include <linux/slab.h>
 #include <linux/random.h>
diff --git a/fs/ubifs/scan.c b/fs/ubifs/scan.c
index 876a6ee661..7a6e46df5d 100644
--- a/fs/ubifs/scan.c
+++ b/fs/ubifs/scan.c
@@ -17,6 +17,7 @@
 
 #ifdef __UBOOT__
 #include <hexdump.h>
+#include <log.h>
 #include <dm/devres.h>
 #include <linux/err.h>
 #endif
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index b38513660b..93f268b4cc 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -15,6 +15,7 @@
  */
 
 #ifndef __UBOOT__
+#include <log.h>
 #include <dm/devres.h>
 #include <linux/init.h>
 #include <linux/slab.h>
diff --git a/fs/ubifs/tnc.c b/fs/ubifs/tnc.c
index fc6fdaff8d..0dc7886ac4 100644
--- a/fs/ubifs/tnc.c
+++ b/fs/ubifs/tnc.c
@@ -19,6 +19,7 @@
  */
 
 #ifndef __UBOOT__
+#include <log.h>
 #include <dm/devres.h>
 #include <linux/crc32.h>
 #include <linux/slab.h>
diff --git a/fs/ubifs/tnc_misc.c b/fs/ubifs/tnc_misc.c
index dfa9e91903..e4cd785b9f 100644
--- a/fs/ubifs/tnc_misc.c
+++ b/fs/ubifs/tnc_misc.c
@@ -16,6 +16,7 @@
  */
 
 #ifdef __UBOOT__
+#include <log.h>
 #include <dm/devres.h>
 #include <linux/err.h>
 #endif
diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
index bb35512380..70beb848e1 100644
--- a/fs/ubifs/ubifs.c
+++ b/fs/ubifs/ubifs.c
@@ -14,6 +14,7 @@
 #include <common.h>
 #include <env.h>
 #include <gzip.h>
+#include <log.h>
 #include <malloc.h>
 #include <memalign.h>
 #include "ubifs.h"
diff --git a/fs/zfs/zfs.c b/fs/zfs/zfs.c
index 4331c16064..1fec96cd5c 100644
--- a/fs/zfs/zfs.c
+++ b/fs/zfs/zfs.c
@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 #include <linux/stat.h>
 #include <linux/time.h>
diff --git a/include/common.h b/include/common.h
index d69cda339c..b698e35fec 100644
--- a/include/common.h
+++ b/include/common.h
@@ -28,7 +28,6 @@
 #include <stdarg.h>
 #include <stdio.h>
 #include <linux/kernel.h>
-#include <log.h>
 #include <asm/u-boot.h> /* boot information for Linux kernel */
 #include <asm/global_data.h>	/* global data used for startup functions */
 #include <display_options.h>
diff --git a/include/efi_loader.h b/include/efi_loader.h
index 3e0c47b328..cdcbffae0b 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <blk.h>
+#include <log.h>
 #include <part_efi.h>
 #include <efi_api.h>
 #include <image.h>
diff --git a/include/i2c.h b/include/i2c.h
index 059200115a..1d792db454 100644
--- a/include/i2c.h
+++ b/include/i2c.h
@@ -16,6 +16,8 @@
 #ifndef _I2C_H_
 #define _I2C_H_
 
+#include <linker_lists.h>
+
 /*
  * For now there are essentially two parts to this file - driver model
  * here at the top, and the older code below (with CONFIG_SYS_I2C being
diff --git a/include/initcall.h b/include/initcall.h
index c871767e20..41b74dc52d 100644
--- a/include/initcall.h
+++ b/include/initcall.h
@@ -8,6 +8,7 @@
 
 typedef int (*init_fnc_t)(void);
 
+#include <log.h>
 #ifdef CONFIG_EFI_APP
 #include <efi.h>
 #endif
diff --git a/include/spl.h b/include/spl.h
index 772879b1bd..892c49cd99 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -7,6 +7,7 @@
 #define	_SPL_H_
 
 #include <binman_sym.h>
+#include <linker_lists.h>
 
 /* Platform-specific defines */
 #include <linux/compiler.h>
diff --git a/include/wait_bit.h b/include/wait_bit.h
index 79da0811fe..dc2ffeb2c2 100644
--- a/include/wait_bit.h
+++ b/include/wait_bit.h
@@ -8,9 +8,11 @@
 #ifndef __WAIT_BIT_H
 #define __WAIT_BIT_H
 
-#include <common.h>
 #include <console.h>
+#include <log.h>
+#include <time.h>
 #include <watchdog.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 
diff --git a/include/wdt.h b/include/wdt.h
index aea5abc768..d2ccfbc62e 100644
--- a/include/wdt.h
+++ b/include/wdt.h
@@ -7,6 +7,7 @@
 #define _WDT_H_
 
 #include <dm.h>
+#include <log.h>
 #include <dm/read.h>
 
 /*
diff --git a/lib/acpi/acpi_table.c b/lib/acpi/acpi_table.c
index 1c253af3bf..431776666e 100644
--- a/lib/acpi/acpi_table.c
+++ b/lib/acpi/acpi_table.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <cpu.h>
+#include <log.h>
 #include <mapmem.h>
 #include <tables_csum.h>
 #include <version.h>
diff --git a/lib/aes.c b/lib/aes.c
index ce53c9f1f3..c998aecb3c 100644
--- a/lib/aes.c
+++ b/lib/aes.c
@@ -23,6 +23,7 @@
 
 #ifndef USE_HOSTCC
 #include <common.h>
+#include <log.h>
 #else
 #include <string.h>
 #endif
diff --git a/lib/asn1_decoder.c b/lib/asn1_decoder.c
index db222625dd..bcb0390eb4 100644
--- a/lib/asn1_decoder.c
+++ b/lib/asn1_decoder.c
@@ -6,6 +6,7 @@
  */
 
 #ifdef __UBOOT__
+#include <log.h>
 #include <linux/compat.h>
 #else
 #include <linux/export.h>
diff --git a/lib/bch.c b/lib/bch.c
index 8945d8d4cf..de66b1acba 100644
--- a/lib/bch.c
+++ b/lib/bch.c
@@ -55,6 +55,7 @@
 
 #ifndef USE_HOSTCC
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 #include <ubi_uboot.h>
 #include <dm/devres.h>
diff --git a/lib/binman.c b/lib/binman.c
index 6cf6dcfdad..fd7de24bd2 100644
--- a/lib/binman.c
+++ b/lib/binman.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <binman.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 
 struct binman_info {
diff --git a/lib/bzip2/bzlib_blocksort.c b/lib/bzip2/bzlib_blocksort.c
index 2785521502..36cf843659 100644
--- a/lib/bzip2/bzlib_blocksort.c
+++ b/lib/bzip2/bzlib_blocksort.c
@@ -60,6 +60,7 @@
 --*/
 
 #include "bzlib_private.h"
+#include <log.h>
 
 /*---------------------------------------------*/
 /*--- Fallback O(N log(N)^2) sorting        ---*/
diff --git a/lib/circbuf.c b/lib/circbuf.c
index 071e4fb8a6..fa79c148da 100644
--- a/lib/circbuf.c
+++ b/lib/circbuf.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 
 #include <circbuf.h>
diff --git a/lib/crypto/asymmetric_type.c b/lib/crypto/asymmetric_type.c
index 7aa55092ac..aac9a1471a 100644
--- a/lib/crypto/asymmetric_type.c
+++ b/lib/crypto/asymmetric_type.c
@@ -7,6 +7,7 @@
  * Written by David Howells (dhowells at redhat.com)
  */
 #ifndef __UBOOT__
+#include <log.h>
 #include <dm/devres.h>
 #include <keys/asymmetric-subtype.h>
 #include <keys/asymmetric-parser.h>
diff --git a/lib/crypto/pkcs7_parser.c b/lib/crypto/pkcs7_parser.c
index 0ee207b6b1..0b85fe8286 100644
--- a/lib/crypto/pkcs7_parser.c
+++ b/lib/crypto/pkcs7_parser.c
@@ -7,6 +7,7 @@
 
 #define pr_fmt(fmt) "PKCS7: "fmt
 #ifdef __UBOOT__
+#include <log.h>
 #include <dm/devres.h>
 #include <linux/bitops.h>
 #include <linux/compat.h>
diff --git a/lib/crypto/x509_cert_parser.c b/lib/crypto/x509_cert_parser.c
index 18f5407a07..5f984b9dfd 100644
--- a/lib/crypto/x509_cert_parser.c
+++ b/lib/crypto/x509_cert_parser.c
@@ -6,6 +6,7 @@
  */
 
 #define pr_fmt(fmt) "X.509: "fmt
+#include <log.h>
 #include <dm/devres.h>
 #include <linux/kernel.h>
 #ifndef __UBOOT__
diff --git a/lib/efi_driver/efi_uclass.c b/lib/efi_driver/efi_uclass.c
index f8badadf66..04e4e45734 100644
--- a/lib/efi_driver/efi_uclass.c
+++ b/lib/efi_driver/efi_uclass.c
@@ -18,6 +18,7 @@
  */
 
 #include <efi_driver.h>
+#include <log.h>
 #include <malloc.h>
 
 /**
diff --git a/lib/efi_loader/efi_acpi.c b/lib/efi_loader/efi_acpi.c
index 9ae9c25c51..585b2d2b63 100644
--- a/lib/efi_loader/efi_acpi.c
+++ b/lib/efi_loader/efi_acpi.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <efi_loader.h>
+#include <log.h>
 #include <acpi/acpi_table.h>
 
 static const efi_guid_t acpi_guid = EFI_ACPI_TABLE_GUID;
diff --git a/lib/efi_loader/efi_bootmgr.c b/lib/efi_loader/efi_bootmgr.c
index 2ea21448f0..b112f5d81e 100644
--- a/lib/efi_loader/efi_bootmgr.c
+++ b/lib/efi_loader/efi_bootmgr.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <charset.h>
+#include <log.h>
 #include <malloc.h>
 #include <efi_loader.h>
 #include <asm/unaligned.h>
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index a3f11eaf62..db34938196 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -9,6 +9,7 @@
 #include <div64.h>
 #include <efi_loader.h>
 #include <irq_func.h>
+#include <log.h>
 #include <malloc.h>
 #include <time.h>
 #include <linux/libfdt_env.h>
diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c
index 76ab2d8288..2b537c1e2e 100644
--- a/lib/efi_loader/efi_device_path.c
+++ b/lib/efi_loader/efi_device_path.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <blk.h>
 #include <dm.h>
+#include <log.h>
 #include <net.h>
 #include <usb.h>
 #include <mmc.h>
diff --git a/lib/efi_loader/efi_file.c b/lib/efi_loader/efi_file.c
index 9233767ee2..19afa69f53 100644
--- a/lib/efi_loader/efi_file.c
+++ b/lib/efi_loader/efi_file.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <charset.h>
 #include <efi_loader.h>
+#include <log.h>
 #include <malloc.h>
 #include <mapmem.h>
 #include <fs.h>
diff --git a/lib/efi_loader/efi_gop.c b/lib/efi_loader/efi_gop.c
index 1511e3bdb4..53f6d970f7 100644
--- a/lib/efi_loader/efi_gop.c
+++ b/lib/efi_loader/efi_gop.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <efi_loader.h>
 #include <lcd.h>
+#include <log.h>
 #include <malloc.h>
 #include <video.h>
 
diff --git a/lib/efi_loader/efi_rng.c b/lib/efi_loader/efi_rng.c
index a1d0ec842c..caef4085b0 100644
--- a/lib/efi_loader/efi_rng.c
+++ b/lib/efi_loader/efi_rng.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <efi_loader.h>
 #include <efi_rng.h>
+#include <log.h>
 #include <rng.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c
index 6a25acbbcd..f7c93d50d1 100644
--- a/lib/efi_loader/efi_runtime.c
+++ b/lib/efi_loader/efi_runtime.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <elf.h>
 #include <efi_loader.h>
+#include <log.h>
 #include <malloc.h>
 #include <rtc.h>
 #include <u-boot/crc.h>
diff --git a/lib/efi_loader/efi_smbios.c b/lib/efi_loader/efi_smbios.c
index a81488495e..719d3e8880 100644
--- a/lib/efi_loader/efi_smbios.c
+++ b/lib/efi_loader/efi_smbios.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <efi_loader.h>
+#include <log.h>
 #include <mapmem.h>
 #include <smbios.h>
 
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index c8cbc00699..9c4d5713e1 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <hang.h>
 #include <init.h>
+#include <log.h>
 #include <malloc.h>
 #include <net.h>
 #include <dm/of_extra.h>
diff --git a/lib/fdtdec_common.c b/lib/fdtdec_common.c
index 5775992ef3..ddaca0087e 100644
--- a/lib/fdtdec_common.c
+++ b/lib/fdtdec_common.c
@@ -9,6 +9,7 @@
 
 #ifndef USE_HOSTCC
 #include <common.h>
+#include <log.h>
 #include <linux/libfdt.h>
 #include <fdtdec.h>
 #else
diff --git a/lib/hashtable.c b/lib/hashtable.c
index e3be563565..b96dbe19be 100644
--- a/lib/hashtable.c
+++ b/lib/hashtable.c
@@ -13,6 +13,7 @@
  */
 
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <sort.h>
 
diff --git a/lib/image-sparse.c b/lib/image-sparse.c
index 3170c024f7..187ac28cd3 100644
--- a/lib/image-sparse.c
+++ b/lib/image-sparse.c
@@ -39,6 +39,7 @@
 #include <blk.h>
 #include <image-sparse.h>
 #include <div64.h>
+#include <log.h>
 #include <malloc.h>
 #include <part.h>
 #include <sparse_format.h>
diff --git a/lib/libavb/avb_cmdline.c b/lib/libavb/avb_cmdline.c
index dd859d3467..cb54e658c4 100644
--- a/lib/libavb/avb_cmdline.c
+++ b/lib/libavb/avb_cmdline.c
@@ -7,6 +7,7 @@
 #include "avb_sha.h"
 #include "avb_util.h"
 #include "avb_version.h"
+#include <log.h>
 #include <malloc.h>
 
 #define NUM_GUIDS 3
diff --git a/lib/libavb/avb_descriptor.c b/lib/libavb/avb_descriptor.c
index 86b8d1b994..56a3a91fc2 100644
--- a/lib/libavb/avb_descriptor.c
+++ b/lib/libavb/avb_descriptor.c
@@ -6,6 +6,7 @@
 #include "avb_descriptor.h"
 #include "avb_util.h"
 #include "avb_vbmeta_image.h"
+#include <log.h>
 #include <malloc.h>
 
 bool avb_descriptor_validate_and_byteswap(const AvbDescriptor* src,
diff --git a/lib/libavb/avb_slot_verify.c b/lib/libavb/avb_slot_verify.c
index 58baf522fc..ae8e1dffa4 100644
--- a/lib/libavb/avb_slot_verify.c
+++ b/lib/libavb/avb_slot_verify.c
@@ -14,6 +14,7 @@
 #include "avb_util.h"
 #include "avb_vbmeta_image.h"
 #include "avb_version.h"
+#include <log.h>
 #include <malloc.h>
 
 /* Maximum number of partitions that can be loaded with avb_slot_verify(). */
diff --git a/lib/libavb/avb_util.c b/lib/libavb/avb_util.c
index 94773b77e7..8719ede15a 100644
--- a/lib/libavb/avb_util.c
+++ b/lib/libavb/avb_util.c
@@ -4,6 +4,7 @@
  */
 
 #include "avb_util.h"
+#include <log.h>
 #include <malloc.h>
 
 #include <stdarg.h>
diff --git a/lib/list_sort.c b/lib/list_sort.c
index beb7273fd3..58e1e1614a 100644
--- a/lib/list_sort.c
+++ b/lib/list_sort.c
@@ -1,4 +1,5 @@
 #ifndef __UBOOT__
+#include <log.h>
 #include <dm/devres.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
diff --git a/lib/lmb.c b/lib/lmb.c
index 2f0e495edf..008bcc7930 100644
--- a/lib/lmb.c
+++ b/lib/lmb.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <image.h>
 #include <lmb.h>
+#include <log.h>
 #include <malloc.h>
 
 #define LMB_ALLOC_ANYWHERE	0
diff --git a/lib/lzma/LzmaTools.c b/lib/lzma/LzmaTools.c
index 2537cb8f8c..521258e623 100644
--- a/lib/lzma/LzmaTools.c
+++ b/lib/lzma/LzmaTools.c
@@ -19,6 +19,7 @@
 
 #include <config.h>
 #include <common.h>
+#include <log.h>
 #include <watchdog.h>
 
 #ifdef CONFIG_LZMA
diff --git a/lib/membuff.c b/lib/membuff.c
index 45dae2d576..36dc43a523 100644
--- a/lib/membuff.c
+++ b/lib/membuff.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include "membuff.h"
 
diff --git a/lib/of_live.c b/lib/of_live.c
index c49e95e38c..05a45ed34a 100644
--- a/lib/of_live.c
+++ b/lib/of_live.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <linux/libfdt.h>
 #include <of_live.h>
 #include <malloc.h>
diff --git a/lib/optee/optee.c b/lib/optee/optee.c
index d4355c6d03..e59b5766e7 100644
--- a/lib/optee/optee.c
+++ b/lib/optee/optee.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <image.h>
+#include <log.h>
 #include <malloc.h>
 #include <linux/libfdt.h>
 #include <tee/optee.h>
diff --git a/lib/physmem.c b/lib/physmem.c
index 84b191dae3..fc90ce4d7c 100644
--- a/lib/physmem.c
+++ b/lib/physmem.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <mapmem.h>
 #include <physmem.h>
 #include <linux/compiler.h>
diff --git a/lib/qsort.c b/lib/qsort.c
index f63d4ef726..2f18588dfc 100644
--- a/lib/qsort.c
+++ b/lib/qsort.c
@@ -15,6 +15,7 @@
  * calculation, as well as to reduce the generated code size with
  * bcc and gcc. */
 
+#include <log.h>
 #include <linux/types.h>
 #include <common.h>
 #include <exports.h>
diff --git a/lib/rsa/rsa-mod-exp.c b/lib/rsa/rsa-mod-exp.c
index 62b2557cc2..a437cbe26f 100644
--- a/lib/rsa/rsa-mod-exp.c
+++ b/lib/rsa/rsa-mod-exp.c
@@ -6,6 +6,7 @@
 #ifndef USE_HOSTCC
 #include <common.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <asm/types.h>
 #include <asm/byteorder.h>
 #include <linux/errno.h>
diff --git a/lib/rsa/rsa-verify.c b/lib/rsa/rsa-verify.c
index 80e817314b..9d8d24781b 100644
--- a/lib/rsa/rsa-verify.c
+++ b/lib/rsa/rsa-verify.c
@@ -6,6 +6,7 @@
 #ifndef USE_HOSTCC
 #include <common.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/types.h>
 #include <asm/byteorder.h>
diff --git a/lib/slre.c b/lib/slre.c
index 969c46a859..e82a9e7635 100644
--- a/lib/slre.c
+++ b/lib/slre.c
@@ -20,6 +20,7 @@
 #include <stdlib.h>
 #include <string.h>
 #else
+#include <log.h>
 #include <common.h>
 #include <linux/ctype.h>
 #endif /* SLRE_TEST */
diff --git a/lib/tpm-common.c b/lib/tpm-common.c
index 86b4f413c2..e4af87f76a 100644
--- a/lib/tpm-common.c
+++ b/lib/tpm-common.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <asm/unaligned.h>
 #include <tpm-common.h>
 #include "tpm-utils.h"
diff --git a/lib/tpm-v1.c b/lib/tpm-v1.c
index b4498e6afc..a846fe00dd 100644
--- a/lib/tpm-v1.c
+++ b/lib/tpm-v1.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <asm/unaligned.h>
 #include <u-boot/sha1.h>
 #include <tpm-common.h>
diff --git a/net/arp.c b/net/arp.c
index 8fc744d932..b72b1fd737 100644
--- a/net/arp.c
+++ b/net/arp.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <log.h>
 #include <net.h>
 
 #include "arp.h"
diff --git a/net/bootp.c b/net/bootp.c
index 05bfede14a..d1e8cb8815 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -13,6 +13,7 @@
 #include <command.h>
 #include <env.h>
 #include <efi_loader.h>
+#include <log.h>
 #include <net.h>
 #include <rand.h>
 #include <uuid.h>
diff --git a/net/dns.c b/net/dns.c
index 67d761d7c0..e35c4dca7c 100644
--- a/net/dns.c
+++ b/net/dns.c
@@ -25,6 +25,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <log.h>
 #include <net.h>
 #include <asm/unaligned.h>
 
diff --git a/net/eth-uclass.c b/net/eth-uclass.c
index c4baf1c3a5..ddafea24f0 100644
--- a/net/eth-uclass.c
+++ b/net/eth-uclass.c
@@ -9,6 +9,7 @@
 #include <bootstage.h>
 #include <dm.h>
 #include <env.h>
+#include <log.h>
 #include <net.h>
 #include <dm/device-internal.h>
 #include <dm/uclass-internal.h>
diff --git a/net/eth_legacy.c b/net/eth_legacy.c
index e0ef4a11a7..9d40f86ab6 100644
--- a/net/eth_legacy.c
+++ b/net/eth_legacy.c
@@ -9,6 +9,7 @@
 #include <bootstage.h>
 #include <command.h>
 #include <env.h>
+#include <log.h>
 #include <net.h>
 #include <phy.h>
 #include <linux/errno.h>
diff --git a/net/link_local.c b/net/link_local.c
index 1986b9b9d3..8aec3c7996 100644
--- a/net/link_local.c
+++ b/net/link_local.c
@@ -13,6 +13,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <log.h>
 #include <net.h>
 #include <rand.h>
 #include "arp.h"
diff --git a/net/mdio-mux-uclass.c b/net/mdio-mux-uclass.c
index e425207d6e..6674eb6bee 100644
--- a/net/mdio-mux-uclass.c
+++ b/net/mdio-mux-uclass.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <miiphy.h>
 #include <dm/device-internal.h>
 #include <dm/uclass-internal.h>
diff --git a/net/mdio-uclass.c b/net/mdio-uclass.c
index 8e7872155a..66ee2e1976 100644
--- a/net/mdio-uclass.c
+++ b/net/mdio-uclass.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <miiphy.h>
 #include <dm/device-internal.h>
diff --git a/net/net.c b/net/net.c
index 035293537b..37932919d0 100644
--- a/net/net.c
+++ b/net/net.c
@@ -95,6 +95,7 @@
 #include <env_internal.h>
 #include <errno.h>
 #include <image.h>
+#include <log.h>
 #include <net.h>
 #include <net/fastboot.h>
 #include <net/tftp.h>
diff --git a/net/nfs.c b/net/nfs.c
index 72e1018a3b..70d0e08bde 100644
--- a/net/nfs.c
+++ b/net/nfs.c
@@ -30,6 +30,7 @@
 #include <command.h>
 #include <flash.h>
 #include <image.h>
+#include <log.h>
 #include <net.h>
 #include <malloc.h>
 #include <mapmem.h>
diff --git a/net/ping.c b/net/ping.c
index 024e8eab90..0e33660f6c 100644
--- a/net/ping.c
+++ b/net/ping.c
@@ -11,6 +11,7 @@
 
 #include "ping.h"
 #include "arp.h"
+#include <log.h>
 #include <net.h>
 
 static ushort ping_seq_number;
diff --git a/net/rarp.c b/net/rarp.c
index c1d9fcaf25..a676a4253b 100644
--- a/net/rarp.c
+++ b/net/rarp.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <log.h>
 #include <net.h>
 #include <net/tftp.h>
 #include "nfs.h"
diff --git a/net/sntp.c b/net/sntp.c
index 9c8ee34a4e..39d7664a22 100644
--- a/net/sntp.c
+++ b/net/sntp.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <command.h>
 #include <dm.h>
+#include <log.h>
 #include <net.h>
 #include <rtc.h>
 
diff --git a/net/tftp.c b/net/tftp.c
index 3348521c90..180140e495 100644
--- a/net/tftp.c
+++ b/net/tftp.c
@@ -12,6 +12,7 @@
 #include <env.h>
 #include <image.h>
 #include <lmb.h>
+#include <log.h>
 #include <mapmem.h>
 #include <net.h>
 #include <net/tftp.h>
diff --git a/post/cpu/mpc83xx/ecc.c b/post/cpu/mpc83xx/ecc.c
index 16210c65ab..cc971a8909 100644
--- a/post/cpu/mpc83xx/ecc.c
+++ b/post/cpu/mpc83xx/ecc.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <irq_func.h>
+#include <log.h>
 #include <mpc83xx.h>
 #include <watchdog.h>
 #include <asm/io.h>
diff --git a/post/drivers/i2c.c b/post/drivers/i2c.c
index 8b7967cd9d..3b378921fa 100644
--- a/post/drivers/i2c.c
+++ b/post/drivers/i2c.c
@@ -22,6 +22,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <post.h>
 #include <i2c.h>
 
diff --git a/post/drivers/memory.c b/post/drivers/memory.c
index 571394dc63..9cc48b1ccc 100644
--- a/post/drivers/memory.c
+++ b/post/drivers/memory.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 
 /* Memory test
  *
diff --git a/post/lib_powerpc/multi.c b/post/lib_powerpc/multi.c
index 7807eb17ac..f082e4c546 100644
--- a/post/lib_powerpc/multi.c
+++ b/post/lib_powerpc/multi.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <irq_func.h>
+#include <log.h>
 
 /*
  * CPU test
diff --git a/post/post.c b/post/post.c
index 0f977fe245..6687e0b75c 100644
--- a/post/post.c
+++ b/post/post.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <bootstage.h>
 #include <env.h>
+#include <log.h>
 #include <malloc.h>
 #include <stdio_dev.h>
 #include <time.h>
diff --git a/test/command_ut.c b/test/command_ut.c
index d6e6777bd4..9837d10eb5 100644
--- a/test/command_ut.c
+++ b/test/command_ut.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <log.h>
 
 static const char test_cmd[] = "setenv list 1\n setenv list ${list}2; "
 		"setenv list ${list}3\0"
diff --git a/test/compression.c b/test/compression.c
index 0b57b7bb40..ad719ddb4d 100644
--- a/test/compression.c
+++ b/test/compression.c
@@ -8,6 +8,7 @@
 #include <command.h>
 #include <gzip.h>
 #include <image.h>
+#include <log.h>
 #include <lz4.h>
 #include <malloc.h>
 #include <mapmem.h>
diff --git a/test/dm/axi.c b/test/dm/axi.c
index e234ab82e6..289f07a08a 100644
--- a/test/dm/axi.c
+++ b/test/dm/axi.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <axi.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/test.h>
 #include <test/ut.h>
 #include <asm/axi.h>
diff --git a/test/dm/board.c b/test/dm/board.c
index 0f267a1926..5472c65fad 100644
--- a/test/dm/board.c
+++ b/test/dm/board.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/test.h>
 #include <board.h>
 #include <test/ut.h>
diff --git a/test/dm/bootcount.c b/test/dm/bootcount.c
index 0817b7d3ec..be0c278907 100644
--- a/test/dm/bootcount.c
+++ b/test/dm/bootcount.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <bootcount.h>
+#include <log.h>
 #include <asm/test.h>
 #include <dm/test.h>
 #include <test/ut.h>
diff --git a/test/dm/bus.c b/test/dm/bus.c
index 1ad45adb60..73eb3aede3 100644
--- a/test/dm/bus.c
+++ b/test/dm/bus.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #ifdef CONFIG_SANDBOX
+#include <log.h>
 #include <os.h>
 #endif
 #include <dm.h>
diff --git a/test/dm/clk.c b/test/dm/clk.c
index 003b78934f..48fc3dd714 100644
--- a/test/dm/clk.c
+++ b/test/dm/clk.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <clk.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/clk.h>
 #include <dm/test.h>
diff --git a/test/dm/core.c b/test/dm/core.c
index f74c430843..6a930ae31a 100644
--- a/test/dm/core.c
+++ b/test/dm/core.c
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <dm.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <malloc.h>
 #include <dm/device-internal.h>
 #include <dm/root.h>
diff --git a/test/dm/cpu.c b/test/dm/cpu.c
index e6dc576ea3..86d957fe8a 100644
--- a/test/dm/cpu.c
+++ b/test/dm/cpu.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/test.h>
 #include <dm/uclass-internal.h>
 #include <cpu.h>
diff --git a/test/dm/devres.c b/test/dm/devres.c
index cbd0972c9b..b5de0cb191 100644
--- a/test/dm/devres.c
+++ b/test/dm/devres.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <errno.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <dm/device-internal.h>
 #include <dm/devres.h>
diff --git a/test/dm/eth.c b/test/dm/eth.c
index ad5354b4bf..99c1672b99 100644
--- a/test/dm/eth.c
+++ b/test/dm/eth.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <env.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <malloc.h>
 #include <net.h>
 #include <dm/test.h>
diff --git a/test/dm/gpio.c b/test/dm/gpio.c
index f5c7aaf3bc..f1e14b601f 100644
--- a/test/dm/gpio.c
+++ b/test/dm/gpio.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <fdtdec.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <dm/root.h>
 #include <dm/test.h>
diff --git a/test/dm/mdio.c b/test/dm/mdio.c
index dc229aed6d..ba1b54f27e 100644
--- a/test/dm/mdio.c
+++ b/test/dm/mdio.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/test.h>
 #include <misc.h>
 #include <test/ut.h>
diff --git a/test/dm/ofnode.c b/test/dm/ofnode.c
index 07d5c7d7a6..1114f34cbf 100644
--- a/test/dm/ofnode.c
+++ b/test/dm/ofnode.c
@@ -2,6 +2,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/of_extra.h>
 #include <dm/test.h>
 #include <test/ut.h>
diff --git a/test/dm/phy.c b/test/dm/phy.c
index 92455d94af..99f0119557 100644
--- a/test/dm/phy.c
+++ b/test/dm/phy.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <generic-phy.h>
+#include <log.h>
 #include <dm/test.h>
 #include <test/ut.h>
 
diff --git a/test/dm/regmap.c b/test/dm/regmap.c
index b21f66732b..809494d585 100644
--- a/test/dm/regmap.c
+++ b/test/dm/regmap.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <mapmem.h>
 #include <regmap.h>
 #include <syscon.h>
diff --git a/test/dm/regulator.c b/test/dm/regulator.c
index b967902493..ca916eeebb 100644
--- a/test/dm/regulator.c
+++ b/test/dm/regulator.c
@@ -10,6 +10,7 @@
 #include <errno.h>
 #include <dm.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <malloc.h>
 #include <dm/device-internal.h>
 #include <dm/root.h>
diff --git a/test/dm/reset.c b/test/dm/reset.c
index 8370820428..871d6400a0 100644
--- a/test/dm/reset.c
+++ b/test/dm/reset.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <reset.h>
 #include <dm/test.h>
diff --git a/test/dm/rng.c b/test/dm/rng.c
index ce20e2d7c2..583ce9eddf 100644
--- a/test/dm/rng.c
+++ b/test/dm/rng.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <rng.h>
 #include <dm/test.h>
 #include <test/ut.h>
diff --git a/test/dm/rtc.c b/test/dm/rtc.c
index 7188742764..88f86581cc 100644
--- a/test/dm/rtc.c
+++ b/test/dm/rtc.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <i2c.h>
+#include <log.h>
 #include <rtc.h>
 #include <asm/io.h>
 #include <asm/test.h>
diff --git a/test/dm/serial.c b/test/dm/serial.c
index c6be6ab7ab..6237693cb8 100644
--- a/test/dm/serial.c
+++ b/test/dm/serial.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <serial.h>
 #include <dm.h>
 #include <dm/test.h>
diff --git a/test/dm/syscon.c b/test/dm/syscon.c
index f1021f374b..06a1c69ac5 100644
--- a/test/dm/syscon.c
+++ b/test/dm/syscon.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <syscon.h>
 #include <regmap.h>
 #include <asm/test.h>
diff --git a/test/dm/tee.c b/test/dm/tee.c
index d40f13d291..632e9960b0 100644
--- a/test/dm/tee.c
+++ b/test/dm/tee.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <dm/test.h>
 #include <sandboxtee.h>
diff --git a/test/dm/test-driver.c b/test/dm/test-driver.c
index abb5b7115a..ba85fa313e 100644
--- a/test/dm/test-driver.c
+++ b/test/dm/test-driver.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <dm/test.h>
 #include <test/ut.h>
diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c
index 1128c420a3..4fcae03dc5 100644
--- a/test/dm/test-fdt.c
+++ b/test/dm/test-fdt.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/io.h>
 #include <dm/test.h>
diff --git a/test/dm/test-main.c b/test/dm/test-main.c
index 62a0c692c8..53e5ca321f 100644
--- a/test/dm/test-main.c
+++ b/test/dm/test-main.c
@@ -8,6 +8,7 @@
 #include <console.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/state.h>
 #include <dm/test.h>
diff --git a/test/dm/test-uclass.c b/test/dm/test-uclass.c
index 25271c6ba0..b6d629a285 100644
--- a/test/dm/test-uclass.c
+++ b/test/dm/test-uclass.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 #include <dm.h>
 #include <errno.h>
diff --git a/test/dm/video.c b/test/dm/video.c
index f72979fac4..0664e3f22b 100644
--- a/test/dm/video.c
+++ b/test/dm/video.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <bzlib.h>
 #include <dm.h>
+#include <log.h>
 #include <malloc.h>
 #include <mapmem.h>
 #include <os.h>
diff --git a/test/env/hashtable.c b/test/env/hashtable.c
index 5242c4cc3e..339cc19ba1 100644
--- a/test/env/hashtable.c
+++ b/test/env/hashtable.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <log.h>
 #include <search.h>
 #include <stdio.h>
 #include <test/env.h>
diff --git a/test/lib/lmb.c b/test/lib/lmb.c
index 1336b54b11..a0fe0f6b33 100644
--- a/test/lib/lmb.c
+++ b/test/lib/lmb.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <lmb.h>
+#include <log.h>
 #include <malloc.h>
 #include <dm/test.h>
 #include <test/ut.h>
diff --git a/test/lib/string.c b/test/lib/string.c
index 8e246ab4ed..64234bef36 100644
--- a/test/lib/string.c
+++ b/test/lib/string.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <log.h>
 #include <test/lib.h>
 #include <test/test.h>
 #include <test/ut.h>
diff --git a/test/log/log_test.c b/test/log/log_test.c
index d29b559410..4245372d65 100644
--- a/test/log/log_test.c
+++ b/test/log/log_test.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <log.h>
 
 /* emit some sample log records in different ways, for testing */
 static int log_run(enum uclass_id cat, const char *file)
diff --git a/test/log/test-main.c b/test/log/test-main.c
index faf920d8e9..c534add493 100644
--- a/test/log/test-main.c
+++ b/test/log/test-main.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <console.h>
+#include <log.h>
 #include <test/log.h>
 #include <test/suites.h>
 
diff --git a/test/optee/cmd_ut_optee.c b/test/optee/cmd_ut_optee.c
index 01f829756f..9fa4c91e0d 100644
--- a/test/optee/cmd_ut_optee.c
+++ b/test/optee/cmd_ut_optee.c
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <errno.h>
 #include <fdt_support.h>
+#include <log.h>
 #include <malloc.h>
 #include <tee/optee.h>
 
diff --git a/test/overlay/cmd_ut_overlay.c b/test/overlay/cmd_ut_overlay.c
index da05079596..c001fb183f 100644
--- a/test/overlay/cmd_ut_overlay.c
+++ b/test/overlay/cmd_ut_overlay.c
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <fdt_support.h>
 #include <image.h>
+#include <log.h>
 #include <malloc.h>
 
 #include <linux/sizes.h>
diff --git a/test/print_ut.c b/test/print_ut.c
index 1cc2a7b8f1..a456a449ef 100644
--- a/test/print_ut.c
+++ b/test/print_ut.c
@@ -11,6 +11,7 @@
 #include <efi_api.h>
 #endif
 #include <display_options.h>
+#include <log.h>
 #include <version.h>
 
 #define FAKE_BUILD_TAG	"jenkins-u-boot-denx_uboot_dm-master-build-aarch64" \
diff --git a/test/unicode_ut.c b/test/unicode_ut.c
index 9939480ed9..f083a682e8 100644
--- a/test/unicode_ut.c
+++ b/test/unicode_ut.c
@@ -9,6 +9,7 @@
 #include <charset.h>
 #include <command.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <test/test.h>
 #include <test/suites.h>
-- 
2.26.2.645.ge9eca65c58-goog

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH v3 15/22] common: Drop asm/ptrace.h from common header
  2020-05-10 17:39 [PATCH v3 00/22] common: Further reduce the size of common.h Simon Glass
                   ` (13 preceding siblings ...)
  2020-05-10 17:40 ` [PATCH v3 14/22] common: Drop log.h from common header Simon Glass
@ 2020-05-10 17:40 ` Simon Glass
  2020-05-19 17:33   ` Tom Rini
  2020-05-10 17:40 ` [PATCH v3 16/22] common: Drop asm_offsets.h " Simon Glass
                   ` (7 subsequent siblings)
  22 siblings, 1 reply; 53+ messages in thread
From: Simon Glass @ 2020-05-10 17:40 UTC (permalink / raw)
  To: u-boot

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v3: None
Changes in v2: None

 arch/arm/cpu/arm1136/mx35/timer.c       | 1 +
 arch/arm/cpu/arm926ejs/mx25/timer.c     | 1 +
 arch/arm/cpu/arm926ejs/mx27/timer.c     | 1 +
 arch/arm/cpu/arm926ejs/spear/spl.c      | 1 +
 arch/arm/cpu/arm926ejs/spear/timer.c    | 1 +
 arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 1 +
 arch/arm/cpu/armv8/sec_firmware.c       | 1 +
 arch/arm/lib/interrupts.c               | 1 +
 arch/arm/lib/interrupts_64.c            | 1 +
 arch/arm/mach-imx/sip.c                 | 1 +
 arch/arm/mach-meson/board-common.c      | 1 +
 arch/arm/mach-meson/sm.c                | 1 +
 arch/arm/mach-mvebu/arm64-common.c      | 1 +
 arch/arm/mach-mvebu/armada8k/dram.c     | 1 +
 arch/m68k/lib/interrupts.c              | 1 +
 arch/m68k/lib/traps.c                   | 1 +
 arch/mips/lib/traps.c                   | 1 +
 arch/powerpc/cpu/mpc83xx/interrupts.c   | 1 +
 arch/powerpc/cpu/mpc83xx/traps.c        | 1 +
 arch/powerpc/cpu/mpc85xx/interrupts.c   | 1 +
 arch/powerpc/cpu/mpc85xx/traps.c        | 1 +
 arch/powerpc/cpu/mpc86xx/interrupts.c   | 1 +
 arch/powerpc/cpu/mpc86xx/traps.c        | 1 +
 arch/powerpc/cpu/mpc8xx/interrupts.c    | 1 +
 arch/powerpc/cpu/mpc8xx/traps.c         | 1 +
 arch/powerpc/lib/interrupts.c           | 1 +
 arch/powerpc/lib/kgdb.c                 | 1 +
 arch/x86/cpu/i386/interrupt.c           | 1 +
 arch/xtensa/cpu/exceptions.c            | 1 +
 board/cavium/thunderx/atf.c             | 1 +
 board/xilinx/zynqmp/zynqmp.c            | 1 +
 cmd/bedbug.c                            | 1 +
 common/bedbug.c                         | 1 +
 common/kgdb.c                           | 1 +
 common/kgdb_stubs.c                     | 1 +
 drivers/clk/clk_versal.c                | 1 +
 drivers/firmware/firmware-zynqmp.c      | 1 +
 drivers/timer/mpc83xx_timer.c           | 1 +
 include/common.h                        | 1 -
 39 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/arch/arm/cpu/arm1136/mx35/timer.c b/arch/arm/cpu/arm1136/mx35/timer.c
index cb351ecf76..f2541c398d 100644
--- a/arch/arm/cpu/arm1136/mx35/timer.c
+++ b/arch/arm/cpu/arm1136/mx35/timer.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/crm_regs.h>
+#include <asm/ptrace.h>
 
 /* General purpose timers bitfields */
 #define GPTCR_SWR       (1<<15)	/* Software reset */
diff --git a/arch/arm/cpu/arm926ejs/mx25/timer.c b/arch/arm/cpu/arm926ejs/mx25/timer.c
index 7e2698b605..4b726d5c73 100644
--- a/arch/arm/cpu/arm926ejs/mx25/timer.c
+++ b/arch/arm/cpu/arm926ejs/mx25/timer.c
@@ -23,6 +23,7 @@
 #include <init.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
+#include <asm/ptrace.h>
 
 /* nothing really to do with interrupts, just starts up a counter. */
 /* The 32KHz 32-bit timer overruns in 134217 seconds */
diff --git a/arch/arm/cpu/arm926ejs/mx27/timer.c b/arch/arm/cpu/arm926ejs/mx27/timer.c
index 193588ea10..d6e1e09f93 100644
--- a/arch/arm/cpu/arm926ejs/mx27/timer.c
+++ b/arch/arm/cpu/arm926ejs/mx27/timer.c
@@ -21,6 +21,7 @@
 #include <time.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
+#include <asm/ptrace.h>
 
 /* General purpose timers bitfields */
 #define GPTCR_SWR		(1 << 15)	/* Software reset	*/
diff --git a/arch/arm/cpu/arm926ejs/spear/spl.c b/arch/arm/cpu/arm926ejs/spear/spl.c
index 7b14ba05b4..08b98a2d06 100644
--- a/arch/arm/cpu/arm926ejs/spear/spl.c
+++ b/arch/arm/cpu/arm926ejs/spear/spl.c
@@ -11,6 +11,7 @@
 #include <spl.h>
 #include <version.h>
 #include <asm/io.h>
+#include <asm/ptrace.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/spr_defs.h>
 #include <asm/arch/spr_misc.h>
diff --git a/arch/arm/cpu/arm926ejs/spear/timer.c b/arch/arm/cpu/arm926ejs/spear/timer.c
index 9db1c74b36..6803c349e8 100644
--- a/arch/arm/cpu/arm926ejs/spear/timer.c
+++ b/arch/arm/cpu/arm926ejs/spear/timer.c
@@ -11,6 +11,7 @@
 #include <asm/arch/hardware.h>
 #include <asm/arch/spr_gpt.h>
 #include <asm/arch/spr_misc.h>
+#include <asm/ptrace.h>
 
 #define GPT_RESOLUTION	(CONFIG_SPEAR_HZ_CLOCK / CONFIG_SPEAR_HZ)
 #define READ_TIMER()	(readl(&gpt_regs_p->count) & GPT_FREE_RUNNING)
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
index a7f1e3f801..3e8359a3cd 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
@@ -15,6 +15,7 @@
 #include <vsprintf.h>
 #include <asm/cache.h>
 #include <asm/io.h>
+#include <asm/ptrace.h>
 #include <linux/errno.h>
 #include <asm/system.h>
 #include <fm_eth.h>
diff --git a/arch/arm/cpu/armv8/sec_firmware.c b/arch/arm/cpu/armv8/sec_firmware.c
index 789f9ca566..bfc0fac3ef 100644
--- a/arch/arm/cpu/armv8/sec_firmware.c
+++ b/arch/arm/cpu/armv8/sec_firmware.c
@@ -10,6 +10,7 @@
 #include <image.h>
 #include <log.h>
 #include <asm/cache.h>
+#include <asm/ptrace.h>
 #include <linux/kernel.h>
 #include <asm/io.h>
 #include <asm/system.h>
diff --git a/arch/arm/lib/interrupts.c b/arch/arm/lib/interrupts.c
index 36299d6e54..703be5a320 100644
--- a/arch/arm/lib/interrupts.c
+++ b/arch/arm/lib/interrupts.c
@@ -23,6 +23,7 @@
 #include <efi_loader.h>
 #include <irq_func.h>
 #include <asm/proc-armv/ptrace.h>
+#include <asm/ptrace.h>
 #include <asm/u-boot-arm.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/lib/interrupts_64.c b/arch/arm/lib/interrupts_64.c
index a2df7cf193..5299489013 100644
--- a/arch/arm/lib/interrupts_64.c
+++ b/arch/arm/lib/interrupts_64.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <asm/ptrace.h>
 #include <irq_func.h>
 #include <linux/compiler.h>
 #include <efi_loader.h>
diff --git a/arch/arm/mach-imx/sip.c b/arch/arm/mach-imx/sip.c
index a4f0ab4886..6cb8179ee8 100644
--- a/arch/arm/mach-imx/sip.c
+++ b/arch/arm/mach-imx/sip.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/cache.h>
+#include <asm/ptrace.h>
 
 unsigned long call_imx_sip(unsigned long id, unsigned long reg0,
 			   unsigned long reg1, unsigned long reg2,
diff --git a/arch/arm/mach-meson/board-common.c b/arch/arm/mach-meson/board-common.c
index 3a7cffcab3..9d8668b2de 100644
--- a/arch/arm/mach-meson/board-common.c
+++ b/arch/arm/mach-meson/board-common.c
@@ -10,6 +10,7 @@
 #include <asm/arch/boot.h>
 #include <env.h>
 #include <asm/cache.h>
+#include <asm/ptrace.h>
 #include <linux/libfdt.h>
 #include <linux/err.h>
 #include <asm/arch/mem.h>
diff --git a/arch/arm/mach-meson/sm.c b/arch/arm/mach-meson/sm.c
index e6da4de534..dd660769e2 100644
--- a/arch/arm/mach-meson/sm.c
+++ b/arch/arm/mach-meson/sm.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <asm/arch/sm.h>
 #include <asm/cache.h>
+#include <asm/ptrace.h>
 #include <linux/err.h>
 #include <linux/kernel.h>
 #include <dm.h>
diff --git a/arch/arm/mach-mvebu/arm64-common.c b/arch/arm/mach-mvebu/arm64-common.c
index 3a92a55a49..c8c065e93c 100644
--- a/arch/arm/mach-mvebu/arm64-common.c
+++ b/arch/arm/mach-mvebu/arm64-common.c
@@ -8,6 +8,7 @@
 #include <fdtdec.h>
 #include <init.h>
 #include <asm/cache.h>
+#include <asm/ptrace.h>
 #include <linux/libfdt.h>
 #include <linux/sizes.h>
 #include <pci.h>
diff --git a/arch/arm/mach-mvebu/armada8k/dram.c b/arch/arm/mach-mvebu/armada8k/dram.c
index 265a8b0ae8..3da9fa589d 100644
--- a/arch/arm/mach-mvebu/armada8k/dram.c
+++ b/arch/arm/mach-mvebu/armada8k/dram.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <asm/ptrace.h>
 #include <asm/system.h>
 #include <linux/sizes.h>
 
diff --git a/arch/m68k/lib/interrupts.c b/arch/m68k/lib/interrupts.c
index ddc91993a1..1caef61d20 100644
--- a/arch/m68k/lib/interrupts.c
+++ b/arch/m68k/lib/interrupts.c
@@ -12,6 +12,7 @@
 #include <watchdog.h>
 #include <asm/processor.h>
 #include <asm/immap.h>
+#include <asm/ptrace.h>
 
 #define	NR_IRQS		(CONFIG_SYS_NUM_IRQS)
 
diff --git a/arch/m68k/lib/traps.c b/arch/m68k/lib/traps.c
index 2ccd55add0..c49141f376 100644
--- a/arch/m68k/lib/traps.c
+++ b/arch/m68k/lib/traps.c
@@ -12,6 +12,7 @@
 #include <watchdog.h>
 #include <command.h>
 #include <asm/processor.h>
+#include <asm/ptrace.h>
 
 
 extern void _exc_handler(void);
diff --git a/arch/mips/lib/traps.c b/arch/mips/lib/traps.c
index 20025b2199..b1ae02fcab 100644
--- a/arch/mips/lib/traps.c
+++ b/arch/mips/lib/traps.c
@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <asm/ptrace.h>
 #include <cpu_func.h>
 #include <hang.h>
 #include <init.h>
diff --git a/arch/powerpc/cpu/mpc83xx/interrupts.c b/arch/powerpc/cpu/mpc83xx/interrupts.c
index 8d525dc837..d04f31df50 100644
--- a/arch/powerpc/cpu/mpc83xx/interrupts.c
+++ b/arch/powerpc/cpu/mpc83xx/interrupts.c
@@ -11,6 +11,7 @@
 #include <irq_func.h>
 #include <mpc83xx.h>
 #include <asm/processor.h>
+#include <asm/ptrace.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/powerpc/cpu/mpc83xx/traps.c b/arch/powerpc/cpu/mpc83xx/traps.c
index 1c6c38b15f..c3cc119d65 100644
--- a/arch/powerpc/cpu/mpc83xx/traps.c
+++ b/arch/powerpc/cpu/mpc83xx/traps.c
@@ -12,6 +12,7 @@
  */
 
 #include <common.h>
+#include <asm/ptrace.h>
 #include <command.h>
 #include <kgdb.h>
 #include <asm/processor.h>
diff --git a/arch/powerpc/cpu/mpc85xx/interrupts.c b/arch/powerpc/cpu/mpc85xx/interrupts.c
index e9da9c0d48..4ad762683f 100644
--- a/arch/powerpc/cpu/mpc85xx/interrupts.c
+++ b/arch/powerpc/cpu/mpc85xx/interrupts.c
@@ -21,6 +21,7 @@
 #ifdef CONFIG_POST
 #include <post.h>
 #endif
+#include <asm/ptrace.h>
 
 void interrupt_init_cpu(unsigned *decrementer_count)
 {
diff --git a/arch/powerpc/cpu/mpc85xx/traps.c b/arch/powerpc/cpu/mpc85xx/traps.c
index bc2fc93e11..f37a45e269 100644
--- a/arch/powerpc/cpu/mpc85xx/traps.c
+++ b/arch/powerpc/cpu/mpc85xx/traps.c
@@ -20,6 +20,7 @@
  */
 
 #include <common.h>
+#include <asm/ptrace.h>
 #include <command.h>
 #include <init.h>
 #include <irq_func.h>
diff --git a/arch/powerpc/cpu/mpc86xx/interrupts.c b/arch/powerpc/cpu/mpc86xx/interrupts.c
index 033ca327f0..5a916600ed 100644
--- a/arch/powerpc/cpu/mpc86xx/interrupts.c
+++ b/arch/powerpc/cpu/mpc86xx/interrupts.c
@@ -24,6 +24,7 @@
 #ifdef CONFIG_POST
 #include <post.h>
 #endif
+#include <asm/ptrace.h>
 
 void interrupt_init_cpu(unsigned *decrementer_count)
 {
diff --git a/arch/powerpc/cpu/mpc86xx/traps.c b/arch/powerpc/cpu/mpc86xx/traps.c
index 79bab91367..c0161e3379 100644
--- a/arch/powerpc/cpu/mpc86xx/traps.c
+++ b/arch/powerpc/cpu/mpc86xx/traps.c
@@ -14,6 +14,7 @@
  */
 
 #include <common.h>
+#include <asm/ptrace.h>
 #include <command.h>
 #include <init.h>
 #include <kgdb.h>
diff --git a/arch/powerpc/cpu/mpc8xx/interrupts.c b/arch/powerpc/cpu/mpc8xx/interrupts.c
index 3efe8956ec..eef1951f2f 100644
--- a/arch/powerpc/cpu/mpc8xx/interrupts.c
+++ b/arch/powerpc/cpu/mpc8xx/interrupts.c
@@ -12,6 +12,7 @@
 #include <asm/cpm_8xx.h>
 #include <asm/processor.h>
 #include <asm/io.h>
+#include <asm/ptrace.h>
 
 /************************************************************************/
 
diff --git a/arch/powerpc/cpu/mpc8xx/traps.c b/arch/powerpc/cpu/mpc8xx/traps.c
index 899bcd8618..56794b08a1 100644
--- a/arch/powerpc/cpu/mpc8xx/traps.c
+++ b/arch/powerpc/cpu/mpc8xx/traps.c
@@ -16,6 +16,7 @@
  */
 
 #include <common.h>
+#include <asm/ptrace.h>
 #include <command.h>
 #include <asm/processor.h>
 
diff --git a/arch/powerpc/lib/interrupts.c b/arch/powerpc/lib/interrupts.c
index 64ee0cc210..73f270002c 100644
--- a/arch/powerpc/lib/interrupts.c
+++ b/arch/powerpc/lib/interrupts.c
@@ -14,6 +14,7 @@
 #ifdef CONFIG_LED_STATUS
 #include <status_led.h>
 #endif
+#include <asm/ptrace.h>
 
 #ifndef CONFIG_MPC83XX_TIMER
 #ifndef CONFIG_SYS_WATCHDOG_FREQ
diff --git a/arch/powerpc/lib/kgdb.c b/arch/powerpc/lib/kgdb.c
index 4a3e26cffc..8727d18884 100644
--- a/arch/powerpc/lib/kgdb.c
+++ b/arch/powerpc/lib/kgdb.c
@@ -1,6 +1,7 @@
 #include <common.h>
 #include <command.h>
 #include <kgdb.h>
+#include <asm/ptrace.h>
 #include <asm/signal.h>
 #include <asm/processor.h>
 
diff --git a/arch/x86/cpu/i386/interrupt.c b/arch/x86/cpu/i386/interrupt.c
index e67a116ac1..c0c4bc95fd 100644
--- a/arch/x86/cpu/i386/interrupt.c
+++ b/arch/x86/cpu/i386/interrupt.c
@@ -23,6 +23,7 @@
 #include <asm/io.h>
 #include <asm/lapic.h>
 #include <asm/processor-flags.h>
+#include <asm/ptrace.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/xtensa/cpu/exceptions.c b/arch/xtensa/cpu/exceptions.c
index 3b8f4a36d3..cf9af4326a 100644
--- a/arch/xtensa/cpu/exceptions.c
+++ b/arch/xtensa/cpu/exceptions.c
@@ -13,6 +13,7 @@
 #include <common.h>
 #include <command.h>
 #include <irq_func.h>
+#include <asm/ptrace.h>
 #include <asm/string.h>
 #include <asm/regs.h>
 
diff --git a/board/cavium/thunderx/atf.c b/board/cavium/thunderx/atf.c
index f01ead4e23..64aa198765 100644
--- a/board/cavium/thunderx/atf.c
+++ b/board/cavium/thunderx/atf.c
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <asm/cache.h>
 #include <asm/io.h>
+#include <asm/ptrace.h>
 
 #include <asm/system.h>
 #include <cavium/thunderx_svc.h>
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index e880db1f81..fd6652ac3d 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -23,6 +23,7 @@
 #include <asm/arch/psu_init_gpl.h>
 #include <asm/cache.h>
 #include <asm/io.h>
+#include <asm/ptrace.h>
 #include <dm/device.h>
 #include <dm/uclass.h>
 #include <usb.h>
diff --git a/cmd/bedbug.c b/cmd/bedbug.c
index 425ba4af1f..81ce256480 100644
--- a/cmd/bedbug.c
+++ b/cmd/bedbug.c
@@ -6,6 +6,7 @@
 #include <cli.h>
 #include <command.h>
 #include <console.h>
+#include <asm/ptrace.h>
 #include <linux/ctype.h>
 #include <net.h>
 #include <bedbug/type.h>
diff --git a/common/bedbug.c b/common/bedbug.c
index 42ecf61eff..18a35ca23e 100644
--- a/common/bedbug.c
+++ b/common/bedbug.c
@@ -1,6 +1,7 @@
 /* $Id$ */
 
 #include <common.h>
+#include <asm/ptrace.h>
 
 #include <linux/ctype.h>
 #include <bedbug/bedbug.h>
diff --git a/common/kgdb.c b/common/kgdb.c
index 312e14960a..4493a15919 100644
--- a/common/kgdb.c
+++ b/common/kgdb.c
@@ -88,6 +88,7 @@
  ****************************************************************************/
 
 #include <common.h>
+#include <asm/ptrace.h>
 
 #include <kgdb.h>
 #include <command.h>
diff --git a/common/kgdb_stubs.c b/common/kgdb_stubs.c
index c061126bed..66aed7cea1 100644
--- a/common/kgdb_stubs.c
+++ b/common/kgdb_stubs.c
@@ -11,6 +11,7 @@
 #include <cpu_func.h>
 #include <kgdb.h>
 #include <serial.h>
+#include <asm/ptrace.h>
 
 int (*debugger_exception_handler)(struct pt_regs *);
 
diff --git a/drivers/clk/clk_versal.c b/drivers/clk/clk_versal.c
index 0b1d45bdae..2fb3171d71 100644
--- a/drivers/clk/clk_versal.c
+++ b/drivers/clk/clk_versal.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <log.h>
 #include <asm/cache.h>
+#include <asm/ptrace.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
 #include <linux/bitfield.h>
diff --git a/drivers/firmware/firmware-zynqmp.c b/drivers/firmware/firmware-zynqmp.c
index 41089712b0..2bdf7771f6 100644
--- a/drivers/firmware/firmware-zynqmp.c
+++ b/drivers/firmware/firmware-zynqmp.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <zynqmp_firmware.h>
 #include <asm/cache.h>
+#include <asm/ptrace.h>
 
 #if defined(CONFIG_ZYNQMP_IPI)
 #include <mailbox.h>
diff --git a/drivers/timer/mpc83xx_timer.c b/drivers/timer/mpc83xx_timer.c
index 3ef56f144e..186fe2b45a 100644
--- a/drivers/timer/mpc83xx_timer.c
+++ b/drivers/timer/mpc83xx_timer.c
@@ -14,6 +14,7 @@
 #include <time.h>
 #include <timer.h>
 #include <watchdog.h>
+#include <asm/ptrace.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/include/common.h b/include/common.h
index b698e35fec..395d1d3901 100644
--- a/include/common.h
+++ b/include/common.h
@@ -24,7 +24,6 @@
 #include <linux/printk.h>
 #include <linux/string.h>
 #include <linux/stringify.h>
-#include <asm/ptrace.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <linux/kernel.h>
-- 
2.26.2.645.ge9eca65c58-goog

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH v3 16/22] common: Drop asm_offsets.h from common header
  2020-05-10 17:39 [PATCH v3 00/22] common: Further reduce the size of common.h Simon Glass
                   ` (14 preceding siblings ...)
  2020-05-10 17:40 ` [PATCH v3 15/22] common: Drop asm/ptrace.h " Simon Glass
@ 2020-05-10 17:40 ` Simon Glass
  2020-05-19 17:33   ` Tom Rini
  2020-05-10 17:40 ` [PATCH v3 17/22] common: Drop linux/bug.h " Simon Glass
                   ` (6 subsequent siblings)
  22 siblings, 1 reply; 53+ messages in thread
From: Simon Glass @ 2020-05-10 17:40 UTC (permalink / raw)
  To: u-boot

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v3: None
Changes in v2: None

 arch/powerpc/cpu/mpc83xx/cpu_init.c       | 1 +
 arch/powerpc/cpu/mpc83xx/spl_minimal.c    | 1 +
 arch/powerpc/cpu/mpc85xx/commproc.c       | 1 +
 arch/powerpc/cpu/mpc85xx/cpu_init_early.c | 1 +
 arch/powerpc/cpu/mpc86xx/cpu_init.c       | 1 +
 include/common.h                          | 1 -
 lib/asm-offsets.c                         | 1 +
 7 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/cpu/mpc83xx/cpu_init.c b/arch/powerpc/cpu/mpc83xx/cpu_init.c
index af8facad53..4defe98477 100644
--- a/arch/powerpc/cpu/mpc83xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc83xx/cpu_init.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <asm-offsets.h>
 #include <mpc83xx.h>
 #include <ioports.h>
 #include <asm/io.h>
diff --git a/arch/powerpc/cpu/mpc83xx/spl_minimal.c b/arch/powerpc/cpu/mpc83xx/spl_minimal.c
index 34c8187259..2c61f2b81d 100644
--- a/arch/powerpc/cpu/mpc83xx/spl_minimal.c
+++ b/arch/powerpc/cpu/mpc83xx/spl_minimal.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <asm-offsets.h>
 #include <clock_legacy.h>
 #include <mpc83xx.h>
 #include <time.h>
diff --git a/arch/powerpc/cpu/mpc85xx/commproc.c b/arch/powerpc/cpu/mpc85xx/commproc.c
index 37e706238b..95215a0b82 100644
--- a/arch/powerpc/cpu/mpc85xx/commproc.c
+++ b/arch/powerpc/cpu/mpc85xx/commproc.c
@@ -22,6 +22,7 @@
  * currently no deallocator for this memory.
  */
 #include <common.h>
+#include <asm-offsets.h>
 #include <asm/cpm_85xx.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
index 40cb24dd54..c519e8bd4b 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <asm-offsets.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #include <asm/fsl_law.h>
diff --git a/arch/powerpc/cpu/mpc86xx/cpu_init.c b/arch/powerpc/cpu/mpc86xx/cpu_init.c
index 34752a34af..a17091d2ff 100644
--- a/arch/powerpc/cpu/mpc86xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc86xx/cpu_init.c
@@ -9,6 +9,7 @@
  * cpu_init.c - low level cpu init
  */
 
+#include <asm-offsets.h>
 #include <config.h>
 #include <common.h>
 #include <init.h>
diff --git a/include/common.h b/include/common.h
index 395d1d3901..976046e620 100644
--- a/include/common.h
+++ b/include/common.h
@@ -16,7 +16,6 @@
 #include <config.h>
 #include <errno.h>
 #include <time.h>
-#include <asm-offsets.h>
 #include <linux/bitops.h>
 #include <linux/bug.h>
 #include <linux/delay.h>
diff --git a/lib/asm-offsets.c b/lib/asm-offsets.c
index 26175132f3..b17651ed63 100644
--- a/lib/asm-offsets.c
+++ b/lib/asm-offsets.c
@@ -12,6 +12,7 @@
  */
 
 #include <common.h>
+#include <asm-offsets.h>
 
 #include <linux/kbuild.h>
 
-- 
2.26.2.645.ge9eca65c58-goog

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH v3 17/22] common: Drop linux/bug.h from common header
  2020-05-10 17:39 [PATCH v3 00/22] common: Further reduce the size of common.h Simon Glass
                   ` (15 preceding siblings ...)
  2020-05-10 17:40 ` [PATCH v3 16/22] common: Drop asm_offsets.h " Simon Glass
@ 2020-05-10 17:40 ` Simon Glass
  2020-05-19 17:33   ` Tom Rini
  2020-05-10 17:40 ` [PATCH v3 18/22] common: Drop linux/stringify.h " Simon Glass
                   ` (5 subsequent siblings)
  22 siblings, 1 reply; 53+ messages in thread
From: Simon Glass @ 2020-05-10 17:40 UTC (permalink / raw)
  To: u-boot

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v3:
- Update stm32mp15_optee, etc.

Changes in v2: None

 arch/arm/mach-bcm283x/include/mach/timer.h       | 1 +
 arch/arm/mach-imx/cmd_nandbcb.c                  | 1 +
 arch/arm/mach-tegra/ivc.c                        | 1 +
 arch/arm/mach-uniphier/boot-device/boot-device.c | 1 +
 arch/mips/lib/cache.c                            | 1 +
 board/armltd/integrator/pci.c                    | 1 +
 board/sifive/fu540/fu540.c                       | 1 +
 cmd/jffs2.c                                      | 1 +
 common/iotrace.c                                 | 1 +
 drivers/clk/clk-divider.c                        | 1 +
 drivers/clk/clk-hsdk-cgu.c                       | 1 +
 drivers/clk/clk-uclass.c                         | 1 +
 drivers/clk/clk_pic32.c                          | 1 +
 drivers/clk/uniphier/clk-uniphier-core.c         | 1 +
 drivers/core/of_access.c                         | 1 +
 drivers/core/of_addr.c                           | 1 +
 drivers/ddr/fsl/ddr4_dimm_params.c               | 1 +
 drivers/gpio/adi_gpio2.c                         | 1 +
 drivers/gpio/sh_pfc.c                            | 1 +
 drivers/mmc/bcm2835_sdhost.c                     | 1 +
 drivers/mmc/sdhci-cadence.c                      | 1 +
 drivers/mtd/mtdconcat.c                          | 1 +
 drivers/mtd/mtdcore.c                            | 1 +
 drivers/mtd/mtdpart.c                            | 1 +
 drivers/mtd/nand/raw/atmel_nand.c                | 1 +
 drivers/mtd/nand/raw/brcmnand/brcmnand.c         | 1 +
 drivers/mtd/nand/raw/lpc32xx_nand_slc.c          | 1 +
 drivers/mtd/nand/raw/nand_base.c                 | 1 +
 drivers/mtd/nand/raw/nand_bbt.c                  | 1 +
 drivers/mtd/nand/raw/pxa3xx_nand.c               | 1 +
 drivers/mtd/nand/raw/tegra_nand.c                | 1 +
 drivers/mtd/nand/spi/core.c                      | 1 +
 drivers/mtd/nand/spi/macronix.c                  | 1 +
 drivers/mtd/nand/spi/toshiba.c                   | 1 +
 drivers/mtd/ubi/attach.c                         | 1 +
 drivers/mtd/ubi/fastmap.c                        | 1 +
 drivers/mtd/ubi/vtbl.c                           | 1 +
 drivers/mtd/ubispl/ubispl.c                      | 1 +
 drivers/net/ep93xx_eth.c                         | 1 +
 drivers/net/fsl-mc/dpio/qbman_portal.c           | 1 +
 drivers/net/fsl-mc/dpio/qbman_private.h          | 1 +
 drivers/net/fsl-mc/dpio/qbman_sys.h              | 1 +
 drivers/net/fsl_enetc.c                          | 1 +
 drivers/net/ldpaa_eth/ldpaa_eth.c                | 1 +
 drivers/net/mvneta.c                             | 1 +
 drivers/net/mvpp2.c                              | 1 +
 drivers/pinctrl/pinctrl-sti.c                    | 1 +
 drivers/pinctrl/renesas/pfc.c                    | 1 +
 drivers/pinctrl/renesas/sh_pfc.h                 | 1 +
 drivers/pinctrl/uniphier/pinctrl-uniphier-core.c | 1 +
 drivers/pinctrl/uniphier/pinctrl-uniphier.h      | 1 +
 drivers/smem/msm_smem.c                          | 1 +
 drivers/spi/renesas_rpc_spi.c                    | 1 +
 drivers/usb/cdns3/core.c                         | 1 +
 drivers/usb/dwc3/core.c                          | 1 +
 drivers/usb/dwc3/ep0.c                           | 1 +
 drivers/usb/gadget/at91_udc.c                    | 1 +
 drivers/usb/gadget/composite.c                   | 1 +
 drivers/usb/gadget/dwc2_udc_otg.c                | 1 +
 drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c       | 1 +
 drivers/usb/gadget/f_mass_storage.c              | 1 +
 drivers/usb/gadget/pxa25x_udc.c                  | 1 +
 drivers/usb/host/xhci-mem.c                      | 1 +
 drivers/usb/host/xhci-ring.c                     | 1 +
 drivers/usb/host/xhci.c                          | 1 +
 drivers/usb/musb-new/am35x.c                     | 1 +
 drivers/usb/musb-new/musb_core.c                 | 1 +
 drivers/usb/musb-new/musb_gadget.c               | 1 +
 drivers/usb/musb-new/musb_host.c                 | 1 +
 drivers/video/atmel_hlcdfb.c                     | 1 +
 drivers/virtio/virtio-uclass.c                   | 1 +
 drivers/virtio/virtio_mmio.c                     | 1 +
 drivers/virtio/virtio_pci_legacy.c               | 1 +
 drivers/virtio/virtio_pci_modern.c               | 1 +
 drivers/virtio/virtio_ring.c                     | 1 +
 drivers/virtio/virtio_sandbox.c                  | 1 +
 env/env.c                                        | 1 +
 fs/ubifs/tnc.c                                   | 1 +
 fs/yaffs2/yaffs_mtdif2.c                         | 1 +
 fs/yaffs2/yportenv.h                             | 1 +
 include/common.h                                 | 1 -
 include/linux/soc/ti/cppi5.h                     | 1 +
 include/virtio.h                                 | 1 +
 lib/crypto/asymmetric_type.c                     | 1 +
 lib/crypto/public_key.c                          | 1 +
 net/eth_legacy.c                                 | 1 +
 86 files changed, 85 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-bcm283x/include/mach/timer.h b/arch/arm/mach-bcm283x/include/mach/timer.h
index 01c0ebad64..5567dbd7f3 100644
--- a/arch/arm/mach-bcm283x/include/mach/timer.h
+++ b/arch/arm/mach-bcm283x/include/mach/timer.h
@@ -8,6 +8,7 @@
 
 #ifndef __ASSEMBLY__
 #include <asm/arch/base.h>
+#include <linux/bug.h>
 #endif
 
 #define BCM2835_TIMER_PHYSADDR ({ BUG_ON(!rpi_bcm283x_base); \
diff --git a/arch/arm/mach-imx/cmd_nandbcb.c b/arch/arm/mach-imx/cmd_nandbcb.c
index 85abbb4a89..2630bfff8e 100644
--- a/arch/arm/mach-imx/cmd_nandbcb.c
+++ b/arch/arm/mach-imx/cmd_nandbcb.c
@@ -15,6 +15,7 @@
 #include <malloc.h>
 #include <nand.h>
 #include <dm/devres.h>
+#include <linux/bug.h>
 
 #include <asm/io.h>
 #include <jffs2/jffs2.h>
diff --git a/arch/arm/mach-tegra/ivc.c b/arch/arm/mach-tegra/ivc.c
index a448f2df30..e7c6d78744 100644
--- a/arch/arm/mach-tegra/ivc.c
+++ b/arch/arm/mach-tegra/ivc.c
@@ -7,6 +7,7 @@
 #include <cpu_func.h>
 #include <asm/io.h>
 #include <asm/arch-tegra/ivc.h>
+#include <linux/bug.h>
 
 #define TEGRA_IVC_ALIGN 64
 
diff --git a/arch/arm/mach-uniphier/boot-device/boot-device.c b/arch/arm/mach-uniphier/boot-device/boot-device.c
index 777946970b..43b28f8b86 100644
--- a/arch/arm/mach-uniphier/boot-device/boot-device.c
+++ b/arch/arm/mach-uniphier/boot-device/boot-device.c
@@ -8,6 +8,7 @@
 #include <command.h>
 #include <spl.h>
 #include <stdio.h>
+#include <linux/bug.h>
 #include <linux/io.h>
 #include <linux/log2.h>
 
diff --git a/arch/mips/lib/cache.c b/arch/mips/lib/cache.c
index f05b24bd12..24f115ebc9 100644
--- a/arch/mips/lib/cache.c
+++ b/arch/mips/lib/cache.c
@@ -14,6 +14,7 @@
 #include <asm/io.h>
 #include <asm/mipsregs.h>
 #include <asm/system.h>
+#include <linux/bug.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/armltd/integrator/pci.c b/board/armltd/integrator/pci.c
index e3793c1125..3ef5993213 100644
--- a/board/armltd/integrator/pci.c
+++ b/board/armltd/integrator/pci.c
@@ -24,6 +24,7 @@
 #include <log.h>
 #include <pci.h>
 #include <asm/io.h>
+#include <linux/bug.h>
 #include "integrator-sc.h"
 #include "pci_v3.h"
 
diff --git a/board/sifive/fu540/fu540.c b/board/sifive/fu540/fu540.c
index d2a1ed0a3e..df57b6ecc2 100644
--- a/board/sifive/fu540/fu540.c
+++ b/board/sifive/fu540/fu540.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <env.h>
 #include <init.h>
+#include <linux/bug.h>
 #include <linux/delay.h>
 #include <linux/io.h>
 
diff --git a/cmd/jffs2.c b/cmd/jffs2.c
index bb4790402e..9540988e33 100644
--- a/cmd/jffs2.c
+++ b/cmd/jffs2.c
@@ -77,6 +77,7 @@
 #include <image.h>
 #include <malloc.h>
 #include <jffs2/jffs2.h>
+#include <linux/bug.h>
 #include <linux/list.h>
 #include <linux/ctype.h>
 #include <cramfs/cramfs_fs.h>
diff --git a/common/iotrace.c b/common/iotrace.c
index 295ee07b72..7225ee4404 100644
--- a/common/iotrace.c
+++ b/common/iotrace.c
@@ -9,6 +9,7 @@
 #include <mapmem.h>
 #include <time.h>
 #include <asm/io.h>
+#include <linux/bug.h>
 #include <u-boot/crc.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c
index d79ae367b8..2a68719eb6 100644
--- a/drivers/clk/clk-divider.c
+++ b/drivers/clk/clk-divider.c
@@ -18,6 +18,7 @@
 #include <dm/uclass.h>
 #include <dm/lists.h>
 #include <dm/device-internal.h>
+#include <linux/bug.h>
 #include <linux/clk-provider.h>
 #include <linux/err.h>
 #include <linux/log2.h>
diff --git a/drivers/clk/clk-hsdk-cgu.c b/drivers/clk/clk-hsdk-cgu.c
index 64508926ca..38e85430b9 100644
--- a/drivers/clk/clk-hsdk-cgu.c
+++ b/drivers/clk/clk-hsdk-cgu.c
@@ -14,6 +14,7 @@
 #include <div64.h>
 #include <dm.h>
 #include <log.h>
+#include <linux/bug.h>
 #include <linux/io.h>
 
 /*
diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c
index 276e4fb336..9ffc2243cb 100644
--- a/drivers/clk/clk-uclass.c
+++ b/drivers/clk/clk-uclass.c
@@ -16,6 +16,7 @@
 #include <malloc.h>
 #include <dm/devres.h>
 #include <dm/read.h>
+#include <linux/bug.h>
 #include <linux/clk-provider.h>
 #include <linux/err.h>
 
diff --git a/drivers/clk/clk_pic32.c b/drivers/clk/clk_pic32.c
index 79469c454f..7ddff2feaf 100644
--- a/drivers/clk/clk_pic32.c
+++ b/drivers/clk/clk_pic32.c
@@ -12,6 +12,7 @@
 #include <wait_bit.h>
 #include <dm/lists.h>
 #include <asm/io.h>
+#include <linux/bug.h>
 #include <mach/pic32.h>
 #include <dt-bindings/clock/microchip,clock.h>
 
diff --git a/drivers/clk/uniphier/clk-uniphier-core.c b/drivers/clk/uniphier/clk-uniphier-core.c
index 9f24050992..c9ec523080 100644
--- a/drivers/clk/uniphier/clk-uniphier-core.c
+++ b/drivers/clk/uniphier/clk-uniphier-core.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
+#include <linux/bug.h>
 #include <linux/io.h>
 #include <linux/sizes.h>
 
diff --git a/drivers/core/of_access.c b/drivers/core/of_access.c
index 710653be0e..922e78f99b 100644
--- a/drivers/core/of_access.c
+++ b/drivers/core/of_access.c
@@ -22,6 +22,7 @@
 #include <common.h>
 #include <log.h>
 #include <malloc.h>
+#include <linux/bug.h>
 #include <linux/libfdt.h>
 #include <dm/of_access.h>
 #include <linux/ctype.h>
diff --git a/drivers/core/of_addr.c b/drivers/core/of_addr.c
index ed8b73e8b3..ca34d84922 100644
--- a/drivers/core/of_addr.c
+++ b/drivers/core/of_addr.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <linux/bug.h>
 #include <linux/libfdt.h>
 #include <dm/of_access.h>
 #include <dm/of_addr.h>
diff --git a/drivers/ddr/fsl/ddr4_dimm_params.c b/drivers/ddr/fsl/ddr4_dimm_params.c
index 3d5f27ef58..e2bdc12ef2 100644
--- a/drivers/ddr/fsl/ddr4_dimm_params.c
+++ b/drivers/ddr/fsl/ddr4_dimm_params.c
@@ -13,6 +13,7 @@
 #include <common.h>
 #include <fsl_ddr_sdram.h>
 #include <log.h>
+#include <linux/bug.h>
 
 #include <fsl_ddr.h>
 
diff --git a/drivers/gpio/adi_gpio2.c b/drivers/gpio/adi_gpio2.c
index 9d293b6994..d0849c85c3 100644
--- a/drivers/gpio/adi_gpio2.c
+++ b/drivers/gpio/adi_gpio2.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <malloc.h>
+#include <linux/bug.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
 
diff --git a/drivers/gpio/sh_pfc.c b/drivers/gpio/sh_pfc.c
index 0b412c2e0c..00b806e6a6 100644
--- a/drivers/gpio/sh_pfc.c
+++ b/drivers/gpio/sh_pfc.c
@@ -15,6 +15,7 @@
 #include <asm/bitops.h>
 #include <asm/io.h>
 #include <sh_pfc.h>
+#include <linux/bug.h>
 
 static struct pinmux_info *gpioc;
 
diff --git a/drivers/mmc/bcm2835_sdhost.c b/drivers/mmc/bcm2835_sdhost.c
index 8cebf99c58..d44799b4af 100644
--- a/drivers/mmc/bcm2835_sdhost.c
+++ b/drivers/mmc/bcm2835_sdhost.c
@@ -37,6 +37,7 @@
 #include <asm/arch/mbox.h>
 #include <asm/unaligned.h>
 #include <dm/device_compat.h>
+#include <linux/bug.h>
 #include <linux/compat.h>
 #include <linux/io.h>
 #include <linux/iopoll.h>
diff --git a/drivers/mmc/sdhci-cadence.c b/drivers/mmc/sdhci-cadence.c
index 2d38c2270e..86408d57f3 100644
--- a/drivers/mmc/sdhci-cadence.c
+++ b/drivers/mmc/sdhci-cadence.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <dm/device_compat.h>
 #include <linux/bitfield.h>
+#include <linux/bug.h>
 #include <linux/io.h>
 #include <linux/iopoll.h>
 #include <linux/sizes.h>
diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c
index 4ac65fd28b..684bc94998 100644
--- a/drivers/mtd/mtdconcat.c
+++ b/drivers/mtd/mtdconcat.c
@@ -21,6 +21,7 @@
 #include <asm/div64.h>
 #else
 #include <div64.h>
+#include <linux/bug.h>
 #include <linux/compat.h>
 #endif
 
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index 2b7de6c03b..97e88b7178 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -28,6 +28,7 @@
 #include <linux/gfp.h>
 #include <linux/slab.h>
 #else
+#include <linux/bug.h>
 #include <linux/err.h>
 #include <ubi_uboot.h>
 #endif
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index 9966cad795..d1f6029b2b 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -21,6 +21,7 @@
 
 #include <common.h>
 #include <malloc.h>
+#include <linux/bug.h>
 #include <linux/errno.h>
 #include <linux/compat.h>
 #include <ubi_uboot.h>
diff --git a/drivers/mtd/nand/raw/atmel_nand.c b/drivers/mtd/nand/raw/atmel_nand.c
index 89e107ffb7..2b39e4195a 100644
--- a/drivers/mtd/nand/raw/atmel_nand.c
+++ b/drivers/mtd/nand/raw/atmel_nand.c
@@ -16,6 +16,7 @@
 #include <asm/arch/gpio.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
+#include <linux/bug.h>
 
 #include <malloc.h>
 #include <nand.h>
diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
index 7bdebf5869..5d77d53a09 100644
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
@@ -19,6 +19,7 @@
 #include <clk.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
+#include <linux/bug.h>
 #include <linux/err.h>
 #include <linux/ioport.h>
 #include <linux/completion.h>
diff --git a/drivers/mtd/nand/raw/lpc32xx_nand_slc.c b/drivers/mtd/nand/raw/lpc32xx_nand_slc.c
index bf9f4be6de..9cca3c55cc 100644
--- a/drivers/mtd/nand/raw/lpc32xx_nand_slc.c
+++ b/drivers/mtd/nand/raw/lpc32xx_nand_slc.c
@@ -13,6 +13,7 @@
 #include <common.h>
 #include <log.h>
 #include <nand.h>
+#include <linux/bug.h>
 #include <linux/mtd/nand_ecc.h>
 #include <linux/errno.h>
 #include <asm/io.h>
diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c
index ebc2bea069..c9e54eae39 100644
--- a/drivers/mtd/nand/raw/nand_base.c
+++ b/drivers/mtd/nand/raw/nand_base.c
@@ -36,6 +36,7 @@
 #include <malloc.h>
 #include <watchdog.h>
 #include <dm/devres.h>
+#include <linux/bug.h>
 #include <linux/err.h>
 #include <linux/compat.h>
 #include <linux/mtd/mtd.h>
diff --git a/drivers/mtd/nand/raw/nand_bbt.c b/drivers/mtd/nand/raw/nand_bbt.c
index 531d48ce89..911472e91e 100644
--- a/drivers/mtd/nand/raw/nand_bbt.c
+++ b/drivers/mtd/nand/raw/nand_bbt.c
@@ -61,6 +61,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <dm/devres.h>
+#include <linux/bug.h>
 #include <linux/compat.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/bbm.h>
diff --git a/drivers/mtd/nand/raw/pxa3xx_nand.c b/drivers/mtd/nand/raw/pxa3xx_nand.c
index 7e3346dfcc..fc5b6275f2 100644
--- a/drivers/mtd/nand/raw/pxa3xx_nand.c
+++ b/drivers/mtd/nand/raw/pxa3xx_nand.c
@@ -12,6 +12,7 @@
 #include <nand.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
+#include <linux/bug.h>
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <asm/io.h>
diff --git a/drivers/mtd/nand/raw/tegra_nand.c b/drivers/mtd/nand/raw/tegra_nand.c
index 3fef204624..b3bdd201c3 100644
--- a/drivers/mtd/nand/raw/tegra_nand.c
+++ b/drivers/mtd/nand/raw/tegra_nand.c
@@ -15,6 +15,7 @@
 #include <asm/arch/funcmux.h>
 #include <asm/arch-tegra/clk_rst.h>
 #include <dm/device_compat.h>
+#include <linux/bug.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
 #include <fdtdec.h>
diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c
index 397dfa4178..f76b1239a4 100644
--- a/drivers/mtd/nand/spi/core.c
+++ b/drivers/mtd/nand/spi/core.c
@@ -26,6 +26,7 @@
 #include <spi-mem.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
+#include <linux/bug.h>
 #include <linux/mtd/spinand.h>
 #endif
 
diff --git a/drivers/mtd/nand/spi/macronix.c b/drivers/mtd/nand/spi/macronix.c
index 67d092be2c..215f09acc3 100644
--- a/drivers/mtd/nand/spi/macronix.c
+++ b/drivers/mtd/nand/spi/macronix.c
@@ -10,6 +10,7 @@
 #include <linux/device.h>
 #include <linux/kernel.h>
 #endif
+#include <linux/bug.h>
 #include <linux/mtd/spinand.h>
 
 #define SPINAND_MFR_MACRONIX		0xC2
diff --git a/drivers/mtd/nand/spi/toshiba.c b/drivers/mtd/nand/spi/toshiba.c
index 77c25398fc..c4beefa617 100644
--- a/drivers/mtd/nand/spi/toshiba.c
+++ b/drivers/mtd/nand/spi/toshiba.c
@@ -11,6 +11,7 @@
 #include <linux/device.h>
 #include <linux/kernel.h>
 #endif
+#include <linux/bug.h>
 #include <linux/mtd/spinand.h>
 
 #define SPINAND_MFR_TOSHIBA		0x98
diff --git a/drivers/mtd/ubi/attach.c b/drivers/mtd/ubi/attach.c
index c40ed62959..e488caa554 100644
--- a/drivers/mtd/ubi/attach.c
+++ b/drivers/mtd/ubi/attach.c
@@ -79,6 +79,7 @@
 #include <u-boot/crc.h>
 #else
 #include <div64.h>
+#include <linux/bug.h>
 #include <linux/err.h>
 #endif
 
diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c
index c19df82747..b54b56375b 100644
--- a/drivers/mtd/ubi/fastmap.c
+++ b/drivers/mtd/ubi/fastmap.c
@@ -16,6 +16,7 @@
 #include <div64.h>
 #include <malloc.h>
 #include <ubi_uboot.h>
+#include <linux/bug.h>
 #endif
 
 #include <linux/compat.h>
diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c
index 636edbb4a3..a2b5352cb2 100644
--- a/drivers/mtd/ubi/vtbl.c
+++ b/drivers/mtd/ubi/vtbl.c
@@ -55,6 +55,7 @@
 #include <u-boot/crc.h>
 #else
 #include <ubi_uboot.h>
+#include <linux/bug.h>
 #endif
 
 #include <linux/err.h>
diff --git a/drivers/mtd/ubispl/ubispl.c b/drivers/mtd/ubispl/ubispl.c
index 00102fcf74..ee2df11522 100644
--- a/drivers/mtd/ubispl/ubispl.c
+++ b/drivers/mtd/ubispl/ubispl.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <errno.h>
+#include <linux/bug.h>
 #include <u-boot/crc.h>
 #include <ubispl.h>
 
diff --git a/drivers/net/ep93xx_eth.c b/drivers/net/ep93xx_eth.c
index 5aed164247..894ffc9d2b 100644
--- a/drivers/net/ep93xx_eth.c
+++ b/drivers/net/ep93xx_eth.c
@@ -24,6 +24,7 @@
 #include <asm/io.h>
 #include <malloc.h>
 #include <miiphy.h>
+#include <linux/bug.h>
 #include <linux/types.h>
 #include "ep93xx_eth.h"
 
diff --git a/drivers/net/fsl-mc/dpio/qbman_portal.c b/drivers/net/fsl-mc/dpio/qbman_portal.c
index 1f77f84990..44ce00041e 100644
--- a/drivers/net/fsl-mc/dpio/qbman_portal.c
+++ b/drivers/net/fsl-mc/dpio/qbman_portal.c
@@ -6,6 +6,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <asm/arch/clock.h>
+#include <linux/bug.h>
 #include "qbman_portal.h"
 
 /* QBMan portal management command codes */
diff --git a/drivers/net/fsl-mc/dpio/qbman_private.h b/drivers/net/fsl-mc/dpio/qbman_private.h
index ded11a643e..53f1300eaf 100644
--- a/drivers/net/fsl-mc/dpio/qbman_private.h
+++ b/drivers/net/fsl-mc/dpio/qbman_private.h
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <errno.h>
 #include <asm/io.h>
+#include <linux/bug.h>
 #include <linux/types.h>
 #include <asm/atomic.h>
 #include <malloc.h>
diff --git a/drivers/net/fsl-mc/dpio/qbman_sys.h b/drivers/net/fsl-mc/dpio/qbman_sys.h
index cdced68110..8be38e11a8 100644
--- a/drivers/net/fsl-mc/dpio/qbman_sys.h
+++ b/drivers/net/fsl-mc/dpio/qbman_sys.h
@@ -20,6 +20,7 @@
 
 /* Trace the 3 different classes of read/write access to QBMan. #undef as
  * required. */
+#include <linux/bug.h>
 #undef QBMAN_CCSR_TRACE
 #undef QBMAN_CINH_TRACE
 #undef QBMAN_CENA_TRACE
diff --git a/drivers/net/fsl_enetc.c b/drivers/net/fsl_enetc.c
index 2a66c2e5f9..b47b27210c 100644
--- a/drivers/net/fsl_enetc.c
+++ b/drivers/net/fsl_enetc.c
@@ -15,6 +15,7 @@
 #include <asm/io.h>
 #include <pci.h>
 #include <miiphy.h>
+#include <linux/bug.h>
 
 #include "fsl_enetc.h"
 
diff --git a/drivers/net/ldpaa_eth/ldpaa_eth.c b/drivers/net/ldpaa_eth/ldpaa_eth.c
index 8327fd747b..66bfafe217 100644
--- a/drivers/net/ldpaa_eth/ldpaa_eth.c
+++ b/drivers/net/ldpaa_eth/ldpaa_eth.c
@@ -14,6 +14,7 @@
 #include <hwconfig.h>
 #include <phy.h>
 #include <miiphy.h>
+#include <linux/bug.h>
 #include <linux/compat.h>
 #include <fsl-mc/fsl_dpmac.h>
 
diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c
index 5c8c5e6800..f593aa6508 100644
--- a/drivers/net/mvneta.c
+++ b/drivers/net/mvneta.c
@@ -24,6 +24,7 @@
 #include <asm/io.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
+#include <linux/bug.h>
 #include <linux/errno.h>
 #include <phy.h>
 #include <miiphy.h>
diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c
index 1e0db6c8c7..83914286e8 100644
--- a/drivers/net/mvpp2.c
+++ b/drivers/net/mvpp2.c
@@ -26,6 +26,7 @@
 #include <config.h>
 #include <malloc.h>
 #include <asm/io.h>
+#include <linux/bug.h>
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <phy.h>
diff --git a/drivers/pinctrl/pinctrl-sti.c b/drivers/pinctrl/pinctrl-sti.c
index 14fcad5aad..8e942a8280 100644
--- a/drivers/pinctrl/pinctrl-sti.c
+++ b/drivers/pinctrl/pinctrl-sti.c
@@ -14,6 +14,7 @@
 #include <syscon.h>
 #include <asm/io.h>
 #include <dm/pinctrl.h>
+#include <linux/bug.h>
 #include <linux/libfdt.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/pinctrl/renesas/pfc.c b/drivers/pinctrl/renesas/pfc.c
index ab64f4f0c8..efbff49f9b 100644
--- a/drivers/pinctrl/renesas/pfc.c
+++ b/drivers/pinctrl/renesas/pfc.c
@@ -17,6 +17,7 @@
 #include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <dm/pinctrl.h>
+#include <linux/bug.h>
 #include <linux/io.h>
 #include <linux/sizes.h>
 
diff --git a/drivers/pinctrl/renesas/sh_pfc.h b/drivers/pinctrl/renesas/sh_pfc.h
index 1cfb881e58..db3d513358 100644
--- a/drivers/pinctrl/renesas/sh_pfc.h
+++ b/drivers/pinctrl/renesas/sh_pfc.h
@@ -672,4 +672,5 @@ extern const struct sh_pfc_soc_info r8a77995_pinmux_info;
  */
 #define RCAR_GP_PIN(bank, pin)		(((bank) * 32) + (pin))
 
+#include <linux/bug.h>
 #endif /* __SH_PFC_H */
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
index abeba965c4..25231c10f9 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <dm/device_compat.h>
+#include <linux/bug.h>
 #include <linux/io.h>
 #include <linux/err.h>
 #include <linux/kernel.h>
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier.h b/drivers/pinctrl/uniphier/pinctrl-uniphier.h
index 8f83ecae7d..5951835d6e 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier.h
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier.h
@@ -8,6 +8,7 @@
 #define __PINCTRL_UNIPHIER_H__
 
 #include <linux/bitops.h>
+#include <linux/bug.h>
 #include <linux/build_bug.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
diff --git a/drivers/smem/msm_smem.c b/drivers/smem/msm_smem.c
index 5557fd29ce..2557269bc5 100644
--- a/drivers/smem/msm_smem.c
+++ b/drivers/smem/msm_smem.c
@@ -13,6 +13,7 @@
 #include <dm/of_access.h>
 #include <dm/of_addr.h>
 #include <asm/io.h>
+#include <linux/bug.h>
 #include <linux/err.h>
 #include <linux/ioport.h>
 #include <linux/io.h>
diff --git a/drivers/spi/renesas_rpc_spi.c b/drivers/spi/renesas_rpc_spi.c
index bb2e7748fe..61ae92d603 100644
--- a/drivers/spi/renesas_rpc_spi.c
+++ b/drivers/spi/renesas_rpc_spi.c
@@ -12,6 +12,7 @@
 #include <dm/of_access.h>
 #include <dt-structs.h>
 #include <errno.h>
+#include <linux/bug.h>
 #include <linux/errno.h>
 #include <spi.h>
 #include <wait_bit.h>
diff --git a/drivers/usb/cdns3/core.c b/drivers/usb/cdns3/core.c
index 82ebd61823..ea86a25060 100644
--- a/drivers/usb/cdns3/core.c
+++ b/drivers/usb/cdns3/core.c
@@ -18,6 +18,7 @@
 #include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <dm/lists.h>
+#include <linux/bug.h>
 #include <linux/kernel.h>
 #include <linux/io.h>
 #include <usb.h>
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index a8982bdc09..f31a24b064 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -19,6 +19,7 @@
 #include <dwc3-uboot.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
+#include <linux/bug.h>
 #include <linux/dma-mapping.h>
 #include <linux/err.h>
 #include <linux/ioport.h>
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c
index 4af58941d8..385bed3e34 100644
--- a/drivers/usb/dwc3/ep0.c
+++ b/drivers/usb/dwc3/ep0.c
@@ -15,6 +15,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <dm/device_compat.h>
+#include <linux/bug.h>
 #include <linux/kernel.h>
 #include <linux/list.h>
 
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index 13dec517f6..1feed417d6 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -15,6 +15,7 @@
 
 #include <common.h>
 #include <dm/devres.h>
+#include <linux/bug.h>
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <asm/io.h>
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index 74b8e0c5dd..91ed7fcec5 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <dm/devres.h>
 #include <linux/bitops.h>
+#include <linux/bug.h>
 #include <linux/usb/composite.h>
 
 #define USB_BUFSIZ	4096
diff --git a/drivers/usb/gadget/dwc2_udc_otg.c b/drivers/usb/gadget/dwc2_udc_otg.c
index ec9fc4d3a0..32bf92752d 100644
--- a/drivers/usb/gadget/dwc2_udc_otg.c
+++ b/drivers/usb/gadget/dwc2_udc_otg.c
@@ -26,6 +26,7 @@
 #include <reset.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
+#include <linux/bug.h>
 
 #include <linux/errno.h>
 #include <linux/list.h>
diff --git a/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c b/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c
index e3147c98a1..1c0505eb28 100644
--- a/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c
+++ b/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c
@@ -20,6 +20,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <log.h>
+#include <linux/bug.h>
 
 static u8 clear_feature_num;
 int clear_feature_flag;
diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c
index 1a181bd6c6..439a31c255 100644
--- a/drivers/usb/gadget/f_mass_storage.c
+++ b/drivers/usb/gadget/f_mass_storage.c
@@ -247,6 +247,7 @@
 #include <console.h>
 #include <g_dnl.h>
 #include <dm/devres.h>
+#include <linux/bug.h>
 
 #include <linux/err.h>
 #include <linux/usb/ch9.h>
diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c
index bce5aeb364..ebf1f4eb55 100644
--- a/drivers/usb/gadget/pxa25x_udc.c
+++ b/drivers/usb/gadget/pxa25x_udc.c
@@ -24,6 +24,7 @@
 #include <asm/mach-types.h>
 #include <asm/unaligned.h>
 #include <dm/devres.h>
+#include <linux/bug.h>
 #include <linux/compat.h>
 #include <malloc.h>
 #include <asm/io.h>
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index c282cf0be3..2d968aafb0 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -21,6 +21,7 @@
 #include <usb.h>
 #include <malloc.h>
 #include <asm/cache.h>
+#include <linux/bug.h>
 #include <linux/errno.h>
 
 #include <usb/xhci.h>
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index b6b7c29b3c..86aeaab412 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -19,6 +19,7 @@
 #include <asm/byteorder.h>
 #include <usb.h>
 #include <asm/unaligned.h>
+#include <linux/bug.h>
 #include <linux/errno.h>
 
 #include <usb/xhci.h>
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index c95831cdd8..ec57f725d3 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -29,6 +29,7 @@
 #include <watchdog.h>
 #include <asm/cache.h>
 #include <asm/unaligned.h>
+#include <linux/bug.h>
 #include <linux/errno.h>
 #include <usb/xhci.h>
 
diff --git a/drivers/usb/musb-new/am35x.c b/drivers/usb/musb-new/am35x.c
index 6e5be90fe5..69d6104044 100644
--- a/drivers/usb/musb-new/am35x.c
+++ b/drivers/usb/musb-new/am35x.c
@@ -26,6 +26,7 @@
 #else
 #include <common.h>
 #include <asm/omap_musb.h>
+#include <linux/bug.h>
 #include "linux-compat.h"
 #endif
 
diff --git a/drivers/usb/musb-new/musb_core.c b/drivers/usb/musb-new/musb_core.c
index 63ce8a5655..8e0e57cae8 100644
--- a/drivers/usb/musb-new/musb_core.c
+++ b/drivers/usb/musb-new/musb_core.c
@@ -81,6 +81,7 @@
 #else
 #include <common.h>
 #include <usb.h>
+#include <linux/bug.h>
 #include <linux/errno.h>
 #include <linux/usb/ch9.h>
 #include <linux/usb/gadget.h>
diff --git a/drivers/usb/musb-new/musb_gadget.c b/drivers/usb/musb-new/musb_gadget.c
index 435dca6001..8ba98d8c0e 100644
--- a/drivers/usb/musb-new/musb_gadget.c
+++ b/drivers/usb/musb-new/musb_gadget.c
@@ -23,6 +23,7 @@
 #include <linux/slab.h>
 #else
 #include <common.h>
+#include <linux/bug.h>
 #include <linux/usb/ch9.h>
 #include "linux-compat.h"
 #endif
diff --git a/drivers/usb/musb-new/musb_host.c b/drivers/usb/musb-new/musb_host.c
index b98f0ed40e..5fa013659c 100644
--- a/drivers/usb/musb-new/musb_host.c
+++ b/drivers/usb/musb-new/musb_host.c
@@ -23,6 +23,7 @@
 #else
 #include <common.h>
 #include <usb.h>
+#include <linux/bug.h>
 #include "linux-compat.h"
 #include "usb-compat.h"
 #endif
diff --git a/drivers/video/atmel_hlcdfb.c b/drivers/video/atmel_hlcdfb.c
index 4ea9dcb59d..35a56a8eab 100644
--- a/drivers/video/atmel_hlcdfb.c
+++ b/drivers/video/atmel_hlcdfb.c
@@ -20,6 +20,7 @@
 #include <video.h>
 #include <wait_bit.h>
 #include <atmel_hlcdc.h>
+#include <linux/bug.h>
 
 #if defined(CONFIG_LCD_LOGO)
 #include <bmp_logo.h>
diff --git a/drivers/virtio/virtio-uclass.c b/drivers/virtio/virtio-uclass.c
index d4ecd16ec8..2636cbedfe 100644
--- a/drivers/virtio/virtio-uclass.c
+++ b/drivers/virtio/virtio-uclass.c
@@ -22,6 +22,7 @@
 #include <virtio_types.h>
 #include <virtio.h>
 #include <dm/lists.h>
+#include <linux/bug.h>
 
 static const char *const virtio_drv_name[VIRTIO_ID_MAX_NUM] = {
 	[VIRTIO_ID_NET]		= VIRTIO_NET_DRV_NAME,
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index 184c5f0a59..b951ea3257 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -13,6 +13,7 @@
 #include <virtio_types.h>
 #include <virtio.h>
 #include <virtio_ring.h>
+#include <linux/bug.h>
 #include <linux/compat.h>
 #include <linux/err.h>
 #include <linux/io.h>
diff --git a/drivers/virtio/virtio_pci_legacy.c b/drivers/virtio/virtio_pci_legacy.c
index 79e62cfb62..fa7f2429f1 100644
--- a/drivers/virtio/virtio_pci_legacy.c
+++ b/drivers/virtio/virtio_pci_legacy.c
@@ -13,6 +13,7 @@
 #include <virtio.h>
 #include <virtio_ring.h>
 #include <dm/device.h>
+#include <linux/bug.h>
 #include <linux/compat.h>
 #include <linux/err.h>
 #include <linux/io.h>
diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c
index 32ce4ea5ae..64430f3b19 100644
--- a/drivers/virtio/virtio_pci_modern.c
+++ b/drivers/virtio/virtio_pci_modern.c
@@ -13,6 +13,7 @@
 #include <virtio.h>
 #include <virtio_ring.h>
 #include <dm/device.h>
+#include <linux/bug.h>
 #include <linux/compat.h>
 #include <linux/err.h>
 #include <linux/io.h>
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 7130b8432a..7f1cbc5932 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -13,6 +13,7 @@
 #include <virtio_types.h>
 #include <virtio.h>
 #include <virtio_ring.h>
+#include <linux/bug.h>
 #include <linux/compat.h>
 
 int virtqueue_add(struct virtqueue *vq, struct virtio_sg *sgs[],
diff --git a/drivers/virtio/virtio_sandbox.c b/drivers/virtio/virtio_sandbox.c
index 61f6a96008..2a2abb9d49 100644
--- a/drivers/virtio/virtio_sandbox.c
+++ b/drivers/virtio/virtio_sandbox.c
@@ -10,6 +10,7 @@
 #include <virtio_types.h>
 #include <virtio.h>
 #include <virtio_ring.h>
+#include <linux/bug.h>
 #include <linux/compat.h>
 #include <linux/err.h>
 #include <linux/io.h>
diff --git a/env/env.c b/env/env.c
index 393f1490de..2084538f28 100644
--- a/env/env.c
+++ b/env/env.c
@@ -8,6 +8,7 @@
 #include <env.h>
 #include <env_internal.h>
 #include <log.h>
+#include <linux/bug.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/fs/ubifs/tnc.c b/fs/ubifs/tnc.c
index 0dc7886ac4..41c7d5666f 100644
--- a/fs/ubifs/tnc.c
+++ b/fs/ubifs/tnc.c
@@ -25,6 +25,7 @@
 #include <linux/slab.h>
 #include <u-boot/crc.h>
 #else
+#include <linux/bug.h>
 #include <linux/compat.h>
 #include <linux/err.h>
 #include <linux/stat.h>
diff --git a/fs/yaffs2/yaffs_mtdif2.c b/fs/yaffs2/yaffs_mtdif2.c
index 0d9d5cc4b1..81a4d964f3 100644
--- a/fs/yaffs2/yaffs_mtdif2.c
+++ b/fs/yaffs2/yaffs_mtdif2.c
@@ -15,6 +15,7 @@
 
 /* XXX U-BOOT XXX */
 #include <common.h>
+#include <linux/bug.h>
 #include <linux/errno.h>
 
 #include "yportenv.h"
diff --git a/fs/yaffs2/yportenv.h b/fs/yaffs2/yportenv.h
index 251eba0792..081391a1d0 100644
--- a/fs/yaffs2/yportenv.h
+++ b/fs/yaffs2/yportenv.h
@@ -17,6 +17,7 @@
 #ifndef __YPORTENV_H__
 #define __YPORTENV_H__
 
+#include <linux/bug.h>
 #include <linux/types.h>
 
 /* Definition of types */
diff --git a/include/common.h b/include/common.h
index 976046e620..711d409d47 100644
--- a/include/common.h
+++ b/include/common.h
@@ -17,7 +17,6 @@
 #include <errno.h>
 #include <time.h>
 #include <linux/bitops.h>
-#include <linux/bug.h>
 #include <linux/delay.h>
 #include <linux/types.h>
 #include <linux/printk.h>
diff --git a/include/linux/soc/ti/cppi5.h b/include/linux/soc/ti/cppi5.h
index 34038b31f7..cfdf7ea29f 100644
--- a/include/linux/soc/ti/cppi5.h
+++ b/include/linux/soc/ti/cppi5.h
@@ -10,6 +10,7 @@
 
 #include <hexdump.h>
 #include <linux/bitops.h>
+#include <linux/bug.h>
 
 /**
  * Descriptor header, present in all types of descriptors
diff --git a/include/virtio.h b/include/virtio.h
index 561dcc34ba..46f9efb732 100644
--- a/include/virtio.h
+++ b/include/virtio.h
@@ -20,6 +20,7 @@
 #ifndef __VIRTIO_H__
 #define __VIRTIO_H__
 
+#include <linux/bug.h>
 #define VIRTIO_ID_NET		1 /* virtio net */
 #define VIRTIO_ID_BLOCK		2 /* virtio block */
 #define VIRTIO_ID_RNG		4 /* virtio rng */
diff --git a/lib/crypto/asymmetric_type.c b/lib/crypto/asymmetric_type.c
index aac9a1471a..1d0532d0f2 100644
--- a/lib/crypto/asymmetric_type.c
+++ b/lib/crypto/asymmetric_type.c
@@ -14,6 +14,7 @@
 #endif
 #include <crypto/public_key.h>
 #ifdef __UBOOT__
+#include <linux/bug.h>
 #include <linux/compat.h>
 #include <linux/ctype.h>
 #include <linux/err.h>
diff --git a/lib/crypto/public_key.c b/lib/crypto/public_key.c
index 8b4821767a..e12ebbb3d0 100644
--- a/lib/crypto/public_key.c
+++ b/lib/crypto/public_key.c
@@ -10,6 +10,7 @@
 #define pr_fmt(fmt) "PKEY: "fmt
 #ifdef __UBOOT__
 #include <dm/devres.h>
+#include <linux/bug.h>
 #include <linux/compat.h>
 #include <linux/err.h>
 #else
diff --git a/net/eth_legacy.c b/net/eth_legacy.c
index 9d40f86ab6..35f8d398a6 100644
--- a/net/eth_legacy.c
+++ b/net/eth_legacy.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <net.h>
 #include <phy.h>
+#include <linux/bug.h>
 #include <linux/errno.h>
 #include <net/pcap.h>
 #include "eth_internal.h"
-- 
2.26.2.645.ge9eca65c58-goog

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH v3 18/22] common: Drop linux/stringify.h from common header
  2020-05-10 17:39 [PATCH v3 00/22] common: Further reduce the size of common.h Simon Glass
                   ` (16 preceding siblings ...)
  2020-05-10 17:40 ` [PATCH v3 17/22] common: Drop linux/bug.h " Simon Glass
@ 2020-05-10 17:40 ` Simon Glass
  2020-05-19 17:33   ` Tom Rini
  2020-05-10 17:40 ` [PATCH v3 19/22] Fix some checkpatch warnings in calls to udelay() Simon Glass
                   ` (4 subsequent siblings)
  22 siblings, 1 reply; 53+ messages in thread
From: Simon Glass @ 2020-05-10 17:40 UTC (permalink / raw)
  To: u-boot

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v3: None
Changes in v2: None

 arch/arm/cpu/armv7/bcm235xx/clk-core.h     | 1 +
 arch/arm/cpu/armv7/bcm281xx/clk-core.h     | 1 +
 board/Arcturus/ucp1020/cmd_arc.c           | 1 +
 board/gardena/smart-gateway-mt7688/board.c | 1 +
 board/gdsys/common/osd.c                   | 1 +
 cmd/fastboot.c                             | 1 +
 drivers/clk/rockchip/clk_rk3036.c          | 1 +
 drivers/clk/rockchip/clk_rk3188.c          | 1 +
 drivers/clk/rockchip/clk_rk322x.c          | 1 +
 drivers/clk/rockchip/clk_rk3288.c          | 1 +
 drivers/clk/rockchip/clk_rk3368.c          | 1 +
 drivers/clk/rockchip/clk_rv1108.c          | 1 +
 fs/ubifs/super.c                           | 1 +
 include/common.h                           | 1 -
 include/config_fsl_chain_trust.h           | 2 ++
 include/configs/B4860QDS.h                 | 2 ++
 include/configs/C29XPCIE.h                 | 2 ++
 include/configs/M52277EVB.h                | 2 ++
 include/configs/M5253DEMO.h                | 2 ++
 include/configs/M5373EVB.h                 | 2 ++
 include/configs/M54418TWR.h                | 2 ++
 include/configs/M54451EVB.h                | 2 ++
 include/configs/M54455EVB.h                | 2 ++
 include/configs/MPC8308RDB.h               | 2 ++
 include/configs/MPC8313ERDB_NAND.h         | 2 ++
 include/configs/MPC8313ERDB_NOR.h          | 1 +
 include/configs/MPC8323ERDB.h              | 2 ++
 include/configs/MPC8349ITX.h               | 1 +
 include/configs/MPC837XERDB.h              | 2 ++
 include/configs/MPC8536DS.h                | 2 ++
 include/configs/MPC8544DS.h                | 1 +
 include/configs/MPC8548CDS.h               | 1 +
 include/configs/MPC8572DS.h                | 2 ++
 include/configs/MPC8610HPCD.h              | 2 ++
 include/configs/MPC8641HPCN.h              | 2 ++
 include/configs/P1010RDB.h                 | 2 ++
 include/configs/P1022DS.h                  | 2 ++
 include/configs/P1023RDB.h                 | 2 ++
 include/configs/P2041RDB.h                 | 1 +
 include/configs/T102xQDS.h                 | 2 ++
 include/configs/T102xRDB.h                 | 2 ++
 include/configs/T1040QDS.h                 | 2 ++
 include/configs/T104xRDB.h                 | 2 ++
 include/configs/T208xQDS.h                 | 2 ++
 include/configs/T208xRDB.h                 | 2 ++
 include/configs/T4240QDS.h                 | 2 ++
 include/configs/T4240RDB.h                 | 2 ++
 include/configs/UCP1020.h                  | 2 ++
 include/configs/apalis_imx6.h              | 2 ++
 include/configs/apf27.h                    | 2 ++
 include/configs/at91sam9263ek.h            | 3 +++
 include/configs/bcmstb.h                   | 1 +
 include/configs/brppt1.h                   | 1 +
 include/configs/brsmarc1.h                 | 1 +
 include/configs/brxre1.h                   | 1 +
 include/configs/cgtqmx6eval.h              | 2 ++
 include/configs/clearfog.h                 | 2 ++
 include/configs/colibri-imx8x.h            | 1 +
 include/configs/colibri_imx6.h             | 2 ++
 include/configs/controlcenterd.h           | 2 ++
 include/configs/corenet_ds.h               | 2 ++
 include/configs/cyrus.h                    | 2 ++
 include/configs/dart_6ul.h                 | 1 +
 include/configs/el6x_common.h              | 2 ++
 include/configs/exynos-common.h            | 1 +
 include/configs/helios4.h                  | 1 +
 include/configs/hrcon.h                    | 2 ++
 include/configs/ids8313.h                  | 2 ++
 include/configs/imx6-engicam.h             | 1 +
 include/configs/imx8mm_evk.h               | 1 +
 include/configs/imx8mn_evk.h               | 1 +
 include/configs/imx8mp_evk.h               | 1 +
 include/configs/imx8mq_evk.h               | 1 +
 include/configs/imx8qm_mek.h               | 1 +
 include/configs/imx8qm_rom7720.h           | 2 ++
 include/configs/imx8qxp_mek.h              | 1 +
 include/configs/km/keymile-common.h        | 2 ++
 include/configs/km/km-mpc83xx.h            | 1 +
 include/configs/km/km_arm.h                | 1 +
 include/configs/liteboard.h                | 1 +
 include/configs/mpc8308_p1m.h              | 2 ++
 include/configs/mv-common.h                | 2 ++
 include/configs/mx6_common.h               | 2 ++
 include/configs/mx6cuboxi.h                | 2 ++
 include/configs/mx6sabre_common.h          | 2 ++
 include/configs/mx6sllevk.h                | 1 +
 include/configs/mx6sxsabresd.h             | 2 ++
 include/configs/mx6ul_14x14_evk.h          | 1 +
 include/configs/mx6ullevk.h                | 1 +
 include/configs/mx7_common.h               | 1 +
 include/configs/nitrogen6x.h               | 1 +
 include/configs/p1_p2_rdb_pc.h             | 2 ++
 include/configs/p1_twr.h                   | 2 ++
 include/configs/pcl063_ull.h               | 1 +
 include/configs/pcm052.h                   | 1 +
 include/configs/pico-imx6ul.h              | 1 +
 include/configs/pico-imx7d.h               | 1 +
 include/configs/s32v234evb.h               | 1 +
 include/configs/sbc8548.h                  | 2 ++
 include/configs/socfpga_arria5_secu1.h     | 1 +
 include/configs/socfpga_common.h           | 2 ++
 include/configs/socfpga_soc64_common.h     | 1 +
 include/configs/strider.h                  | 2 ++
 include/configs/tqma6.h                    | 2 ++
 include/configs/udoo.h                     | 1 +
 include/configs/ve8313.h                   | 2 ++
 include/configs/vf610twr.h                 | 1 +
 include/configs/wandboard.h                | 1 +
 include/configs/wb45n.h                    | 1 +
 include/configs/xpedite517x.h              | 1 +
 include/configs/xpedite537x.h              | 1 +
 include/configs/xpedite550x.h              | 1 +
 include/env_default.h                      | 1 +
 include/environment/ti/boot.h              | 2 ++
 114 files changed, 171 insertions(+), 1 deletion(-)

diff --git a/arch/arm/cpu/armv7/bcm235xx/clk-core.h b/arch/arm/cpu/armv7/bcm235xx/clk-core.h
index ac475b6dc3..ace384dea7 100644
--- a/arch/arm/cpu/armv7/bcm235xx/clk-core.h
+++ b/arch/arm/cpu/armv7/bcm235xx/clk-core.h
@@ -4,6 +4,7 @@
  */
 
 #include <linux/stddef.h>
+#include <linux/stringify.h>
 
 #ifdef CONFIG_CLK_DEBUG
 #undef writel
diff --git a/arch/arm/cpu/armv7/bcm281xx/clk-core.h b/arch/arm/cpu/armv7/bcm281xx/clk-core.h
index a736ae9e62..f0fbff081d 100644
--- a/arch/arm/cpu/armv7/bcm281xx/clk-core.h
+++ b/arch/arm/cpu/armv7/bcm281xx/clk-core.h
@@ -4,6 +4,7 @@
  */
 
 #include <linux/stddef.h>
+#include <linux/stringify.h>
 
 #ifdef CONFIG_CLK_DEBUG
 #undef writel
diff --git a/board/Arcturus/ucp1020/cmd_arc.c b/board/Arcturus/ucp1020/cmd_arc.c
index 3656cf4cbc..4b30b66e20 100644
--- a/board/Arcturus/ucp1020/cmd_arc.c
+++ b/board/Arcturus/ucp1020/cmd_arc.c
@@ -19,6 +19,7 @@
 #include <mmc.h>
 #include <version.h>
 #include <asm/io.h>
+#include <linux/stringify.h>
 
 static ulong fwenv_addr[MAX_FWENV_ADDR];
 const char mystrerr[] = "ERROR: Failed to save factory info";
diff --git a/board/gardena/smart-gateway-mt7688/board.c b/board/gardena/smart-gateway-mt7688/board.c
index 6fd771a2e2..a75bb1f77b 100644
--- a/board/gardena/smart-gateway-mt7688/board.c
+++ b/board/gardena/smart-gateway-mt7688/board.c
@@ -15,6 +15,7 @@
 #include <net.h>
 #include <spi.h>
 #include <spi_flash.h>
+#include <linux/stringify.h>
 #include <u-boot/crc.h>
 #include <uuid.h>
 #include <linux/ctype.h>
diff --git a/board/gdsys/common/osd.c b/board/gdsys/common/osd.c
index cda0cc6b48..679f8f3019 100644
--- a/board/gdsys/common/osd.c
+++ b/board/gdsys/common/osd.c
@@ -10,6 +10,7 @@
 #include <command.h>
 #include <i2c.h>
 #include <malloc.h>
+#include <linux/stringify.h>
 
 #include "ch7301.h"
 #include "dp501.h"
diff --git a/cmd/fastboot.c b/cmd/fastboot.c
index 4f35108a36..ad5c064911 100644
--- a/cmd/fastboot.c
+++ b/cmd/fastboot.c
@@ -14,6 +14,7 @@
 #include <net.h>
 #include <usb.h>
 #include <watchdog.h>
+#include <linux/stringify.h>
 
 static int do_fastboot_udp(int argc, char *const argv[],
 			   uintptr_t buf_addr, size_t buf_size)
diff --git a/drivers/clk/rockchip/clk_rk3036.c b/drivers/clk/rockchip/clk_rk3036.c
index 2d722405b2..276965245d 100644
--- a/drivers/clk/rockchip/clk_rk3036.c
+++ b/drivers/clk/rockchip/clk_rk3036.c
@@ -17,6 +17,7 @@
 #include <dm/lists.h>
 #include <dt-bindings/clock/rk3036-cru.h>
 #include <linux/log2.h>
+#include <linux/stringify.h>
 
 enum {
 	VCO_MAX_HZ	= 2400U * 1000000,
diff --git a/drivers/clk/rockchip/clk_rk3188.c b/drivers/clk/rockchip/clk_rk3188.c
index 6b00e77012..d4df8175f2 100644
--- a/drivers/clk/rockchip/clk_rk3188.c
+++ b/drivers/clk/rockchip/clk_rk3188.c
@@ -24,6 +24,7 @@
 #include <dm/uclass-internal.h>
 #include <linux/err.h>
 #include <linux/log2.h>
+#include <linux/stringify.h>
 
 enum rk3188_clk_type {
 	RK3188_CRU,
diff --git a/drivers/clk/rockchip/clk_rk322x.c b/drivers/clk/rockchip/clk_rk322x.c
index dfb9fff2e5..68c1fbdc42 100644
--- a/drivers/clk/rockchip/clk_rk322x.c
+++ b/drivers/clk/rockchip/clk_rk322x.c
@@ -17,6 +17,7 @@
 #include <dm/lists.h>
 #include <dt-bindings/clock/rk3228-cru.h>
 #include <linux/log2.h>
+#include <linux/stringify.h>
 
 enum {
 	VCO_MAX_HZ	= 3200U * 1000000,
diff --git a/drivers/clk/rockchip/clk_rk3288.c b/drivers/clk/rockchip/clk_rk3288.c
index 762c9d4f10..b4514bc850 100644
--- a/drivers/clk/rockchip/clk_rk3288.c
+++ b/drivers/clk/rockchip/clk_rk3288.c
@@ -25,6 +25,7 @@
 #include <dm/uclass-internal.h>
 #include <linux/err.h>
 #include <linux/log2.h>
+#include <linux/stringify.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/clk/rockchip/clk_rk3368.c b/drivers/clk/rockchip/clk_rk3368.c
index f0a72f1a72..34466b8e26 100644
--- a/drivers/clk/rockchip/clk_rk3368.c
+++ b/drivers/clk/rockchip/clk_rk3368.c
@@ -21,6 +21,7 @@
 #include <asm/io.h>
 #include <dm/lists.h>
 #include <dt-bindings/clock/rk3368-cru.h>
+#include <linux/stringify.h>
 
 #if CONFIG_IS_ENABLED(OF_PLATDATA)
 struct rk3368_clk_plat {
diff --git a/drivers/clk/rockchip/clk_rv1108.c b/drivers/clk/rockchip/clk_rv1108.c
index def3baa6fd..c1d2724f20 100644
--- a/drivers/clk/rockchip/clk_rv1108.c
+++ b/drivers/clk/rockchip/clk_rv1108.c
@@ -18,6 +18,7 @@
 #include <asm/arch-rockchip/hardware.h>
 #include <dm/lists.h>
 #include <dt-bindings/clock/rv1108-cru.h>
+#include <linux/stringify.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 93f268b4cc..2f6b25d338 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -38,6 +38,7 @@
 #include <linux/err.h>
 #include "ubifs.h"
 #include <ubi_uboot.h>
+#include <linux/stringify.h>
 #include <mtd/ubi-user.h>
 
 struct dentry;
diff --git a/include/common.h b/include/common.h
index 711d409d47..552cb298a2 100644
--- a/include/common.h
+++ b/include/common.h
@@ -21,7 +21,6 @@
 #include <linux/types.h>
 #include <linux/printk.h>
 #include <linux/string.h>
-#include <linux/stringify.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <linux/kernel.h>
diff --git a/include/config_fsl_chain_trust.h b/include/config_fsl_chain_trust.h
index 4f522dbecc..3922241be0 100644
--- a/include/config_fsl_chain_trust.h
+++ b/include/config_fsl_chain_trust.h
@@ -6,6 +6,8 @@
 #ifndef __CONFIG_FSL_CHAIN_TRUST_H
 #define __CONFIG_FSL_CHAIN_TRUST_H
 
+#include <linux/stringify.h>
+
 #ifdef CONFIG_CHAIN_OF_TRUST
 
 #ifndef CONFIG_EXTRA_ENV
diff --git a/include/configs/B4860QDS.h b/include/configs/B4860QDS.h
index 67639458b4..a515bf9530 100644
--- a/include/configs/B4860QDS.h
+++ b/include/configs/B4860QDS.h
@@ -6,6 +6,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/stringify.h>
+
 /*
  * B4860 QDS board configuration file
  */
diff --git a/include/configs/C29XPCIE.h b/include/configs/C29XPCIE.h
index 62ad50bad5..9a8cba6b7c 100644
--- a/include/configs/C29XPCIE.h
+++ b/include/configs/C29XPCIE.h
@@ -10,6 +10,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/stringify.h>
+
 #ifdef CONFIG_SPIFLASH
 #define CONFIG_RAMBOOT_SPIFLASH
 #define CONFIG_RESET_VECTOR_ADDRESS	0x110bfffc
diff --git a/include/configs/M52277EVB.h b/include/configs/M52277EVB.h
index f110cac274..8261f4811c 100644
--- a/include/configs/M52277EVB.h
+++ b/include/configs/M52277EVB.h
@@ -13,6 +13,8 @@
 #ifndef _M52277EVB_H
 #define _M52277EVB_H
 
+#include <linux/stringify.h>
+
 /*
  * High Level Configuration Options
  * (easy to change)
diff --git a/include/configs/M5253DEMO.h b/include/configs/M5253DEMO.h
index e79a7e98dc..69e3fbae78 100644
--- a/include/configs/M5253DEMO.h
+++ b/include/configs/M5253DEMO.h
@@ -6,6 +6,8 @@
 #ifndef _M5253DEMO_H
 #define _M5253DEMO_H
 
+#include <linux/stringify.h>
+
 #define CONFIG_MCFTMR
 
 #define CONFIG_MCFUART
diff --git a/include/configs/M5373EVB.h b/include/configs/M5373EVB.h
index 6297aea143..f94cc02905 100644
--- a/include/configs/M5373EVB.h
+++ b/include/configs/M5373EVB.h
@@ -13,6 +13,8 @@
 #ifndef _M5373EVB_H
 #define _M5373EVB_H
 
+#include <linux/stringify.h>
+
 /*
  * High Level Configuration Options
  * (easy to change)
diff --git a/include/configs/M54418TWR.h b/include/configs/M54418TWR.h
index cdf169f6a7..2866bfd85f 100644
--- a/include/configs/M54418TWR.h
+++ b/include/configs/M54418TWR.h
@@ -13,6 +13,8 @@
 #ifndef _M54418TWR_H
 #define _M54418TWR_H
 
+#include <linux/stringify.h>
+
 /*
  * High Level Configuration Options
  * (easy to change)
diff --git a/include/configs/M54451EVB.h b/include/configs/M54451EVB.h
index 8d0b1db73e..ec4284216f 100644
--- a/include/configs/M54451EVB.h
+++ b/include/configs/M54451EVB.h
@@ -13,6 +13,8 @@
 #ifndef _M54451EVB_H
 #define _M54451EVB_H
 
+#include <linux/stringify.h>
+
 /*
  * High Level Configuration Options
  * (easy to change)
diff --git a/include/configs/M54455EVB.h b/include/configs/M54455EVB.h
index 6e43522fda..291adeaf0d 100644
--- a/include/configs/M54455EVB.h
+++ b/include/configs/M54455EVB.h
@@ -13,6 +13,8 @@
 #ifndef _M54455EVB_H
 #define _M54455EVB_H
 
+#include <linux/stringify.h>
+
 /*
  * High Level Configuration Options
  * (easy to change)
diff --git a/include/configs/MPC8308RDB.h b/include/configs/MPC8308RDB.h
index f55e9a0995..788a325b64 100644
--- a/include/configs/MPC8308RDB.h
+++ b/include/configs/MPC8308RDB.h
@@ -8,6 +8,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/stringify.h>
+
 /*
  * High Level Configuration Options
  */
diff --git a/include/configs/MPC8313ERDB_NAND.h b/include/configs/MPC8313ERDB_NAND.h
index 6829853343..d8485f6fbd 100644
--- a/include/configs/MPC8313ERDB_NAND.h
+++ b/include/configs/MPC8313ERDB_NAND.h
@@ -9,6 +9,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/stringify.h>
+
 /*
  * High Level Configuration Options
  */
diff --git a/include/configs/MPC8313ERDB_NOR.h b/include/configs/MPC8313ERDB_NOR.h
index 382c39ccb4..029d2f1ec3 100644
--- a/include/configs/MPC8313ERDB_NOR.h
+++ b/include/configs/MPC8313ERDB_NOR.h
@@ -18,6 +18,7 @@
 #define CONFIG_SYS_MONITOR_BASE	CONFIG_SYS_TEXT_BASE	/* start of monitor */
 #endif
 
+#include <linux/stringify.h>
 #define CONFIG_PCI_INDIRECT_BRIDGE
 
 /*
diff --git a/include/configs/MPC8323ERDB.h b/include/configs/MPC8323ERDB.h
index 289cd9a860..ff18d10872 100644
--- a/include/configs/MPC8323ERDB.h
+++ b/include/configs/MPC8323ERDB.h
@@ -9,6 +9,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/stringify.h>
+
 /*
  * High Level Configuration Options
  */
diff --git a/include/configs/MPC8349ITX.h b/include/configs/MPC8349ITX.h
index 90046fd1ee..dd517639ea 100644
--- a/include/configs/MPC8349ITX.h
+++ b/include/configs/MPC8349ITX.h
@@ -52,6 +52,7 @@
 #define CONFIG_SYS_USB_HOST	/* use the EHCI USB controller */
 #endif
 
+#include <linux/stringify.h>
 #define CONFIG_RTC_DS1337
 #define CONFIG_SYS_I2C
 
diff --git a/include/configs/MPC837XERDB.h b/include/configs/MPC837XERDB.h
index 21bd9f09c1..8c2297a910 100644
--- a/include/configs/MPC837XERDB.h
+++ b/include/configs/MPC837XERDB.h
@@ -8,6 +8,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/stringify.h>
+
 /*
  * High Level Configuration Options
  */
diff --git a/include/configs/MPC8536DS.h b/include/configs/MPC8536DS.h
index fb115e2345..340574a985 100644
--- a/include/configs/MPC8536DS.h
+++ b/include/configs/MPC8536DS.h
@@ -10,6 +10,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/stringify.h>
+
 #include "../board/freescale/common/ics307_clk.h"
 
 #ifdef CONFIG_SDCARD
diff --git a/include/configs/MPC8544DS.h b/include/configs/MPC8544DS.h
index 2092e3da15..c9f193fc46 100644
--- a/include/configs/MPC8544DS.h
+++ b/include/configs/MPC8544DS.h
@@ -22,6 +22,7 @@
 #define CONFIG_INTERRUPTS		/* enable pci, srio, ddr interrupts */
 
 #ifndef __ASSEMBLY__
+#include <linux/stringify.h>
 extern unsigned long get_board_sys_clk(unsigned long dummy);
 #endif
 #define CONFIG_SYS_CLK_FREQ	get_board_sys_clk(0) /* sysclk for MPC85xx */
diff --git a/include/configs/MPC8548CDS.h b/include/configs/MPC8548CDS.h
index 6e44a072db..de2bfd8f2f 100644
--- a/include/configs/MPC8548CDS.h
+++ b/include/configs/MPC8548CDS.h
@@ -27,6 +27,7 @@
 #define CONFIG_FSL_VIA
 
 #ifndef __ASSEMBLY__
+#include <linux/stringify.h>
 extern unsigned long get_clock_freq(void);
 #endif
 #define CONFIG_SYS_CLK_FREQ	get_clock_freq() /* sysclk for MPC85xx */
diff --git a/include/configs/MPC8572DS.h b/include/configs/MPC8572DS.h
index 65da3d7009..3243f39df4 100644
--- a/include/configs/MPC8572DS.h
+++ b/include/configs/MPC8572DS.h
@@ -10,6 +10,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/stringify.h>
+
 #include "../board/freescale/common/ics307_clk.h"
 
 #ifndef CONFIG_RESET_VECTOR_ADDRESS
diff --git a/include/configs/MPC8610HPCD.h b/include/configs/MPC8610HPCD.h
index f3d603c634..eb85141702 100644
--- a/include/configs/MPC8610HPCD.h
+++ b/include/configs/MPC8610HPCD.h
@@ -10,6 +10,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/stringify.h>
+
 /* High Level Configuration Options */
 #define CONFIG_LINUX_RESET_VEC	0x100	/* Reset vector used by Linux */
 
diff --git a/include/configs/MPC8641HPCN.h b/include/configs/MPC8641HPCN.h
index e97d780cea..edbeeefdd4 100644
--- a/include/configs/MPC8641HPCN.h
+++ b/include/configs/MPC8641HPCN.h
@@ -15,6 +15,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/stringify.h>
+
 /* High Level Configuration Options */
 #define CONFIG_LINUX_RESET_VEC	0x100	/* Reset vector used by Linux */
 #define CONFIG_ADDR_MAP		1	/* Use addr map */
diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h
index f578e0bd87..8f709a6cac 100644
--- a/include/configs/P1010RDB.h
+++ b/include/configs/P1010RDB.h
@@ -11,6 +11,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/stringify.h>
+
 #include <asm/config_mpc85xx.h>
 #define CONFIG_NAND_FSL_IFC
 
diff --git a/include/configs/P1022DS.h b/include/configs/P1022DS.h
index e99d509a36..2b761078bc 100644
--- a/include/configs/P1022DS.h
+++ b/include/configs/P1022DS.h
@@ -8,6 +8,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/stringify.h>
+
 #include "../board/freescale/common/ics307_clk.h"
 
 #ifdef CONFIG_SDCARD
diff --git a/include/configs/P1023RDB.h b/include/configs/P1023RDB.h
index 2f3831e259..6bf3cd5950 100644
--- a/include/configs/P1023RDB.h
+++ b/include/configs/P1023RDB.h
@@ -9,6 +9,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/stringify.h>
+
 #ifndef CONFIG_SYS_MONITOR_BASE
 #define CONFIG_SYS_MONITOR_BASE	CONFIG_SYS_TEXT_BASE	/* start of monitor */
 #endif
diff --git a/include/configs/P2041RDB.h b/include/configs/P2041RDB.h
index 09427776e2..59404cbaf9 100644
--- a/include/configs/P2041RDB.h
+++ b/include/configs/P2041RDB.h
@@ -56,6 +56,7 @@
 
 #ifndef __ASSEMBLY__
 unsigned long get_board_sys_clk(unsigned long dummy);
+#include <linux/stringify.h>
 #endif
 #define CONFIG_SYS_CLK_FREQ	get_board_sys_clk(0)
 
diff --git a/include/configs/T102xQDS.h b/include/configs/T102xQDS.h
index 5f358c13ea..53ae961837 100644
--- a/include/configs/T102xQDS.h
+++ b/include/configs/T102xQDS.h
@@ -11,6 +11,8 @@
 #ifndef __T1024QDS_H
 #define __T1024QDS_H
 
+#include <linux/stringify.h>
+
 /* High Level Configuration Options */
 #define CONFIG_SYS_BOOK3E_HV		/* Category E.HV supported */
 #define CONFIG_ENABLE_36BIT_PHYS
diff --git a/include/configs/T102xRDB.h b/include/configs/T102xRDB.h
index c96d6e5f35..f5d9657444 100644
--- a/include/configs/T102xRDB.h
+++ b/include/configs/T102xRDB.h
@@ -11,6 +11,8 @@
 #ifndef __T1024RDB_H
 #define __T1024RDB_H
 
+#include <linux/stringify.h>
+
 /* High Level Configuration Options */
 #define CONFIG_SYS_BOOK3E_HV		/* Category E.HV supported */
 #define CONFIG_ENABLE_36BIT_PHYS
diff --git a/include/configs/T1040QDS.h b/include/configs/T1040QDS.h
index ca6ae776fa..7ad018b6d7 100644
--- a/include/configs/T1040QDS.h
+++ b/include/configs/T1040QDS.h
@@ -24,6 +24,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/stringify.h>
+
 /*
  * T1040 QDS board configuration file
  */
diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h
index aa7bf7d119..4237dfcd6c 100644
--- a/include/configs/T104xRDB.h
+++ b/include/configs/T104xRDB.h
@@ -7,6 +7,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/stringify.h>
+
 /*
  * T104x RDB board configuration file
  */
diff --git a/include/configs/T208xQDS.h b/include/configs/T208xQDS.h
index aed2e87a1a..c54f7f53e5 100644
--- a/include/configs/T208xQDS.h
+++ b/include/configs/T208xQDS.h
@@ -11,6 +11,8 @@
 #ifndef __T208xQDS_H
 #define __T208xQDS_H
 
+#include <linux/stringify.h>
+
 #define CONFIG_ICS307_REFCLK_HZ 25000000  /* ICS307 ref clk freq */
 #if defined(CONFIG_ARCH_T2080)
 #define CONFIG_FSL_SATA_V2
diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h
index 619b287258..70eafc3e28 100644
--- a/include/configs/T208xRDB.h
+++ b/include/configs/T208xRDB.h
@@ -11,6 +11,8 @@
 #ifndef __T2080RDB_H
 #define __T2080RDB_H
 
+#include <linux/stringify.h>
+
 #define CONFIG_ICS307_REFCLK_HZ 25000000  /* ICS307 ref clk freq */
 #define CONFIG_FSL_SATA_V2
 
diff --git a/include/configs/T4240QDS.h b/include/configs/T4240QDS.h
index 5f91a52bbe..d92af7202b 100644
--- a/include/configs/T4240QDS.h
+++ b/include/configs/T4240QDS.h
@@ -9,6 +9,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/stringify.h>
+
 #define CONFIG_FSL_SATA_V2
 #define CONFIG_PCIE4
 
diff --git a/include/configs/T4240RDB.h b/include/configs/T4240RDB.h
index f051998b0f..fcfd3b0b4b 100644
--- a/include/configs/T4240RDB.h
+++ b/include/configs/T4240RDB.h
@@ -10,6 +10,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/stringify.h>
+
 #define CONFIG_FSL_SATA_V2
 #define CONFIG_PCIE4
 
diff --git a/include/configs/UCP1020.h b/include/configs/UCP1020.h
index 5086077afb..cfc9567332 100644
--- a/include/configs/UCP1020.h
+++ b/include/configs/UCP1020.h
@@ -13,6 +13,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/stringify.h>
+
 /*** Arcturus FirmWare Environment */
 
 #define MAX_SERIAL_SIZE 15
diff --git a/include/configs/apalis_imx6.h b/include/configs/apalis_imx6.h
index 034eb07eaa..6f03058a78 100644
--- a/include/configs/apalis_imx6.h
+++ b/include/configs/apalis_imx6.h
@@ -8,6 +8,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/stringify.h>
+
 #include "mx6_common.h"
 
 #undef CONFIG_DISPLAY_BOARDINFO
diff --git a/include/configs/apf27.h b/include/configs/apf27.h
index c26cf89f5f..cecd485e20 100644
--- a/include/configs/apf27.h
+++ b/include/configs/apf27.h
@@ -9,6 +9,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/stringify.h>
+
 #define CONFIG_ENV_VERSION	10
 #define CONFIG_BOARD_NAME apf27
 
diff --git a/include/configs/at91sam9263ek.h b/include/configs/at91sam9263ek.h
index 85bfacb7ac..51ecf4173b 100644
--- a/include/configs/at91sam9263ek.h
+++ b/include/configs/at91sam9263ek.h
@@ -10,6 +10,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/stringify.h>
+
 /*
  * SoC must be defined first, before hardware.h is included.
  * In this case SoC is defined in boards.cfg.
@@ -178,6 +180,7 @@
 		 AT91_WDT_MR_WDD(0xfff))
 
 #endif
+#include <linux/stringify.h>
 #endif
 
 /* NAND flash */
diff --git a/include/configs/bcmstb.h b/include/configs/bcmstb.h
index ba5eb7a4a8..e58a9510de 100644
--- a/include/configs/bcmstb.h
+++ b/include/configs/bcmstb.h
@@ -15,6 +15,7 @@
 
 #ifndef __ASSEMBLY__
 
+#include <linux/stringify.h>
 #include <linux/types.h>
 
 struct bcmstb_boot_parameters {
diff --git a/include/configs/brppt1.h b/include/configs/brppt1.h
index 3019b97d92..68931c1358 100644
--- a/include/configs/brppt1.h
+++ b/include/configs/brppt1.h
@@ -13,6 +13,7 @@
 
 #include <configs/bur_cfg_common.h>
 #include <configs/bur_am335x_common.h>
+#include <linux/stringify.h>
 /* ------------------------------------------------------------------------- */
 /* memory */
 #define CONFIG_SYS_MALLOC_LEN		(5 * 1024 * 1024)
diff --git a/include/configs/brsmarc1.h b/include/configs/brsmarc1.h
index 4bff349a03..5aa68d1d46 100644
--- a/include/configs/brsmarc1.h
+++ b/include/configs/brsmarc1.h
@@ -14,6 +14,7 @@
 
 #include <configs/bur_cfg_common.h>
 #include <configs/bur_am335x_common.h>
+#include <linux/stringify.h>
 /* ------------------------------------------------------------------------- */
 #define CONFIG_BOARD_TYPES
 
diff --git a/include/configs/brxre1.h b/include/configs/brxre1.h
index 006663373b..9db011358e 100644
--- a/include/configs/brxre1.h
+++ b/include/configs/brxre1.h
@@ -13,6 +13,7 @@
 
 #include <configs/bur_cfg_common.h>
 #include <configs/bur_am335x_common.h>
+#include <linux/stringify.h>
 /* ------------------------------------------------------------------------- */
 #if !defined(CONFIG_AM335X_LCD)
 #define CONFIG_AM335X_LCD
diff --git a/include/configs/cgtqmx6eval.h b/include/configs/cgtqmx6eval.h
index bd4456aa02..fccc9b18c0 100644
--- a/include/configs/cgtqmx6eval.h
+++ b/include/configs/cgtqmx6eval.h
@@ -12,6 +12,8 @@
 #ifndef __CONFIG_CGTQMX6EVAL_H
 #define __CONFIG_CGTQMX6EVAL_H
 
+#include <linux/stringify.h>
+
 #include "mx6_common.h"
 
 #define CONFIG_MACH_TYPE	4122
diff --git a/include/configs/clearfog.h b/include/configs/clearfog.h
index 53ff830e81..459e0d9d5e 100644
--- a/include/configs/clearfog.h
+++ b/include/configs/clearfog.h
@@ -6,6 +6,8 @@
 #ifndef _CONFIG_CLEARFOG_H
 #define _CONFIG_CLEARFOG_H
 
+#include <linux/stringify.h>
+
 /*
  * High Level Configuration Options (easy to change)
  */
diff --git a/include/configs/colibri-imx8x.h b/include/configs/colibri-imx8x.h
index 03bb1701f9..da9226e2fb 100644
--- a/include/configs/colibri-imx8x.h
+++ b/include/configs/colibri-imx8x.h
@@ -8,6 +8,7 @@
 
 #include <asm/arch/imx-regs.h>
 #include <linux/sizes.h>
+#include <linux/stringify.h>
 
 #define CONFIG_REMAKE_ELF
 
diff --git a/include/configs/colibri_imx6.h b/include/configs/colibri_imx6.h
index 2d649e6e21..3d248ef4ef 100644
--- a/include/configs/colibri_imx6.h
+++ b/include/configs/colibri_imx6.h
@@ -8,6 +8,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/stringify.h>
+
 #include "mx6_common.h"
 
 #undef CONFIG_DISPLAY_BOARDINFO
diff --git a/include/configs/controlcenterd.h b/include/configs/controlcenterd.h
index 5fbe773201..34d268e061 100644
--- a/include/configs/controlcenterd.h
+++ b/include/configs/controlcenterd.h
@@ -26,6 +26,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/stringify.h>
+
 #ifdef CONFIG_SDCARD
 #define CONFIG_RAMBOOT_SDCARD
 #endif
diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h
index 091f3c07d1..a49f9056c5 100644
--- a/include/configs/corenet_ds.h
+++ b/include/configs/corenet_ds.h
@@ -10,6 +10,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/stringify.h>
+
 #include "../board/freescale/common/ics307_clk.h"
 
 #ifdef CONFIG_RAMBOOT_PBL
diff --git a/include/configs/cyrus.h b/include/configs/cyrus.h
index 9ab92e699d..052e6018a3 100644
--- a/include/configs/cyrus.h
+++ b/include/configs/cyrus.h
@@ -6,6 +6,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/stringify.h>
+
 #if !defined(CONFIG_ARCH_P5020) && !defined(CONFIG_ARCH_P5040)
 #error Must call Cyrus CONFIG with a specific CPU enabled.
 #endif
diff --git a/include/configs/dart_6ul.h b/include/configs/dart_6ul.h
index 15d6884ca5..d933f79e34 100644
--- a/include/configs/dart_6ul.h
+++ b/include/configs/dart_6ul.h
@@ -7,6 +7,7 @@
 #define __DART_6UL_H
 
 #include <linux/sizes.h>
+#include <linux/stringify.h>
 #include "mx6_common.h"
 
 /* SPL options */
diff --git a/include/configs/el6x_common.h b/include/configs/el6x_common.h
index fe63bcaaa6..f7b96e4825 100644
--- a/include/configs/el6x_common.h
+++ b/include/configs/el6x_common.h
@@ -8,6 +8,8 @@
 #ifndef __EL6Q_COMMON_CONFIG_H
 #define __EL6Q_COMMON_CONFIG_H
 
+#include <linux/stringify.h>
+
 #define CONFIG_BOARD_NAME		EL6Q
 
 #include "mx6_common.h"
diff --git a/include/configs/exynos-common.h b/include/configs/exynos-common.h
index 5ae2b427ca..bb34a9e83b 100644
--- a/include/configs/exynos-common.h
+++ b/include/configs/exynos-common.h
@@ -14,6 +14,7 @@
 
 #include <asm/arch/cpu.h>		/* get chip and board defs */
 #include <linux/sizes.h>
+#include <linux/stringify.h>
 
 #define CONFIG_SKIP_LOWLEVEL_INIT
 
diff --git a/include/configs/helios4.h b/include/configs/helios4.h
index f0ca8e2f16..671c3d291d 100644
--- a/include/configs/helios4.h
+++ b/include/configs/helios4.h
@@ -7,6 +7,7 @@
 #define _CONFIG_HELIOS4_H
 
 #include <linux/sizes.h>
+#include <linux/stringify.h>
 
 /*
  * High Level Configuration Options (easy to change)
diff --git a/include/configs/hrcon.h b/include/configs/hrcon.h
index bf1feb8708..76c4ee9777 100644
--- a/include/configs/hrcon.h
+++ b/include/configs/hrcon.h
@@ -8,6 +8,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/stringify.h>
+
 /*
  * High Level Configuration Options
  */
diff --git a/include/configs/ids8313.h b/include/configs/ids8313.h
index 3274ff6437..bcd8aee7c3 100644
--- a/include/configs/ids8313.h
+++ b/include/configs/ids8313.h
@@ -11,6 +11,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/stringify.h>
+
 /*
  * High Level Configuration Options
  */
diff --git a/include/configs/imx6-engicam.h b/include/configs/imx6-engicam.h
index 69b7f3378e..72ae89c5f6 100644
--- a/include/configs/imx6-engicam.h
+++ b/include/configs/imx6-engicam.h
@@ -10,6 +10,7 @@
 #define __IMX6_ENGICAM_CONFIG_H
 
 #include <linux/sizes.h>
+#include <linux/stringify.h>
 #include "mx6_common.h"
 
 /* Size of malloc() pool */
diff --git a/include/configs/imx8mm_evk.h b/include/configs/imx8mm_evk.h
index 5982522eca..901a1bed6d 100644
--- a/include/configs/imx8mm_evk.h
+++ b/include/configs/imx8mm_evk.h
@@ -7,6 +7,7 @@
 #define __IMX8MM_EVK_H
 
 #include <linux/sizes.h>
+#include <linux/stringify.h>
 #include <asm/arch/imx-regs.h>
 
 #ifdef CONFIG_SECURE_BOOT
diff --git a/include/configs/imx8mn_evk.h b/include/configs/imx8mn_evk.h
index 395ddf5816..a07440c73b 100644
--- a/include/configs/imx8mn_evk.h
+++ b/include/configs/imx8mn_evk.h
@@ -7,6 +7,7 @@
 #define __IMX8MN_EVK_H
 
 #include <linux/sizes.h>
+#include <linux/stringify.h>
 #include <asm/arch/imx-regs.h>
 
 #ifdef CONFIG_SECURE_BOOT
diff --git a/include/configs/imx8mp_evk.h b/include/configs/imx8mp_evk.h
index 80e5738961..b346154fb3 100644
--- a/include/configs/imx8mp_evk.h
+++ b/include/configs/imx8mp_evk.h
@@ -7,6 +7,7 @@
 #define __IMX8MP_EVK_H
 
 #include <linux/sizes.h>
+#include <linux/stringify.h>
 #include <asm/arch/imx-regs.h>
 
 #ifdef CONFIG_SECURE_BOOT
diff --git a/include/configs/imx8mq_evk.h b/include/configs/imx8mq_evk.h
index 724d572c22..632c4eaf77 100644
--- a/include/configs/imx8mq_evk.h
+++ b/include/configs/imx8mq_evk.h
@@ -7,6 +7,7 @@
 #define __IMX8M_EVK_H
 
 #include <linux/sizes.h>
+#include <linux/stringify.h>
 #include <asm/arch/imx-regs.h>
 
 #define CONFIG_SPL_MAX_SIZE		(124 * 1024)
diff --git a/include/configs/imx8qm_mek.h b/include/configs/imx8qm_mek.h
index 97170dc949..5669064375 100644
--- a/include/configs/imx8qm_mek.h
+++ b/include/configs/imx8qm_mek.h
@@ -7,6 +7,7 @@
 #define __IMX8QM_MEK_H
 
 #include <linux/sizes.h>
+#include <linux/stringify.h>
 #include <asm/arch/imx-regs.h>
 
 #ifdef CONFIG_SPL_BUILD
diff --git a/include/configs/imx8qm_rom7720.h b/include/configs/imx8qm_rom7720.h
index b59641e37f..eebb8dc011 100644
--- a/include/configs/imx8qm_rom7720.h
+++ b/include/configs/imx8qm_rom7720.h
@@ -7,6 +7,7 @@
 #define __IMX8QM_ROM7720_H
 
 #include <linux/sizes.h>
+#include <linux/stringify.h>
 #include <asm/arch/imx-regs.h>
 #define CONFIG_REMAKE_ELF
 
@@ -173,4 +174,5 @@
 #define CONFIG_FEC_XCV_TYPE		RGMII
 #define FEC_QUIRK_ENET_MAC
 
+#include <linux/stringify.h>
 #endif /* __IMX8QM_ROM7720_H */
diff --git a/include/configs/imx8qxp_mek.h b/include/configs/imx8qxp_mek.h
index 0aaca3325b..3066074270 100644
--- a/include/configs/imx8qxp_mek.h
+++ b/include/configs/imx8qxp_mek.h
@@ -7,6 +7,7 @@
 #define __IMX8QXP_MEK_H
 
 #include <linux/sizes.h>
+#include <linux/stringify.h>
 #include <asm/arch/imx-regs.h>
 
 #ifdef CONFIG_SPL_BUILD
diff --git a/include/configs/km/keymile-common.h b/include/configs/km/keymile-common.h
index e690d8f39d..e9e3981060 100644
--- a/include/configs/km/keymile-common.h
+++ b/include/configs/km/keymile-common.h
@@ -7,6 +7,8 @@
 #ifndef __CONFIG_KEYMILE_H
 #define __CONFIG_KEYMILE_H
 
+#include <linux/stringify.h>
+
 /*
  * Miscellaneous configurable options
  */
diff --git a/include/configs/km/km-mpc83xx.h b/include/configs/km/km-mpc83xx.h
index dfb78c50f4..451baf8b80 100644
--- a/include/configs/km/km-mpc83xx.h
+++ b/include/configs/km/km-mpc83xx.h
@@ -1,6 +1,7 @@
 /*
  * Internal Definitions
  */
+#include <linux/stringify.h>
 #define BOOTFLASH_START	0xF0000000
 
 /*
diff --git a/include/configs/km/km_arm.h b/include/configs/km/km_arm.h
index fa9d7b5dfa..4e833faa87 100644
--- a/include/configs/km/km_arm.h
+++ b/include/configs/km/km_arm.h
@@ -104,6 +104,7 @@
 
 #ifndef __ASSEMBLY__
 #include <asm/arch/gpio.h>
+#include <linux/stringify.h>
 extern void __set_direction(unsigned pin, int high);
 void set_sda(int state);
 void set_scl(int state);
diff --git a/include/configs/liteboard.h b/include/configs/liteboard.h
index fa7d5896f5..f9a125fcb0 100644
--- a/include/configs/liteboard.h
+++ b/include/configs/liteboard.h
@@ -10,6 +10,7 @@
 
 #include <asm/arch/imx-regs.h>
 #include <linux/sizes.h>
+#include <linux/stringify.h>
 #include "mx6_common.h"
 
 /* SPL options */
diff --git a/include/configs/mpc8308_p1m.h b/include/configs/mpc8308_p1m.h
index 97578cdb82..d6b21f11c3 100644
--- a/include/configs/mpc8308_p1m.h
+++ b/include/configs/mpc8308_p1m.h
@@ -8,6 +8,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/stringify.h>
+
 /*
  * High Level Configuration Options
  */
diff --git a/include/configs/mv-common.h b/include/configs/mv-common.h
index e3a00ed1cf..d61c90a431 100644
--- a/include/configs/mv-common.h
+++ b/include/configs/mv-common.h
@@ -16,6 +16,8 @@
 #ifndef _MV_COMMON_H
 #define _MV_COMMON_H
 
+#include <linux/stringify.h>
+
 /*
  * High Level Configuration Options (easy to change)
  */
diff --git a/include/configs/mx6_common.h b/include/configs/mx6_common.h
index 07b1e06f4f..0715509ec8 100644
--- a/include/configs/mx6_common.h
+++ b/include/configs/mx6_common.h
@@ -6,6 +6,8 @@
 #ifndef __MX6_COMMON_H
 #define __MX6_COMMON_H
 
+#include <linux/stringify.h>
+
 #if (defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL))
 #define CONFIG_SC_TIMER_CLK 8000000 /* 8Mhz */
 #define COUNTER_FREQUENCY CONFIG_SC_TIMER_CLK
diff --git a/include/configs/mx6cuboxi.h b/include/configs/mx6cuboxi.h
index e10e7688e9..2ccf44e573 100644
--- a/include/configs/mx6cuboxi.h
+++ b/include/configs/mx6cuboxi.h
@@ -7,6 +7,8 @@
 #ifndef __MX6CUBOXI_CONFIG_H
 #define __MX6CUBOXI_CONFIG_H
 
+#include <linux/stringify.h>
+
 #include "mx6_common.h"
 
 #include "imx6_spl.h"
diff --git a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h
index cb0253c306..6cea26a58d 100644
--- a/include/configs/mx6sabre_common.h
+++ b/include/configs/mx6sabre_common.h
@@ -8,6 +8,8 @@
 #ifndef __MX6QSABRE_COMMON_CONFIG_H
 #define __MX6QSABRE_COMMON_CONFIG_H
 
+#include <linux/stringify.h>
+
 #include "mx6_common.h"
 
 #define CONFIG_IMX_THERMAL
diff --git a/include/configs/mx6sllevk.h b/include/configs/mx6sllevk.h
index 03c0c88e50..61c637d26c 100644
--- a/include/configs/mx6sllevk.h
+++ b/include/configs/mx6sllevk.h
@@ -135,4 +135,5 @@
 #define CONFIG_MXC_USB_PORTSC		(PORT_PTS_UTMI | PORT_PTS_PTW)
 #endif
 
+#include <linux/stringify.h>
 #endif				/* __CONFIG_H */
diff --git a/include/configs/mx6sxsabresd.h b/include/configs/mx6sxsabresd.h
index 8633756dd0..3eea9de986 100644
--- a/include/configs/mx6sxsabresd.h
+++ b/include/configs/mx6sxsabresd.h
@@ -8,6 +8,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/stringify.h>
+
 #include "mx6_common.h"
 
 #ifdef CONFIG_SPL
diff --git a/include/configs/mx6ul_14x14_evk.h b/include/configs/mx6ul_14x14_evk.h
index 7927779cc8..8466abf3d5 100644
--- a/include/configs/mx6ul_14x14_evk.h
+++ b/include/configs/mx6ul_14x14_evk.h
@@ -9,6 +9,7 @@
 
 #include <asm/arch/imx-regs.h>
 #include <linux/sizes.h>
+#include <linux/stringify.h>
 #include "mx6_common.h"
 #include <asm/mach-imx/gpio.h>
 
diff --git a/include/configs/mx6ullevk.h b/include/configs/mx6ullevk.h
index 7e3a5c7cf3..9cedb96a6b 100644
--- a/include/configs/mx6ullevk.h
+++ b/include/configs/mx6ullevk.h
@@ -10,6 +10,7 @@
 
 #include <asm/arch/imx-regs.h>
 #include <linux/sizes.h>
+#include <linux/stringify.h>
 #include "mx6_common.h"
 #include <asm/mach-imx/gpio.h>
 
diff --git a/include/configs/mx7_common.h b/include/configs/mx7_common.h
index b6ded774cc..cc07e858d5 100644
--- a/include/configs/mx7_common.h
+++ b/include/configs/mx7_common.h
@@ -9,6 +9,7 @@
 #define __MX7_COMMON_H
 
 #include <linux/sizes.h>
+#include <linux/stringify.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/mach-imx/gpio.h>
 
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h
index a5ca5f9c4b..f3081f4f33 100644
--- a/include/configs/nitrogen6x.h
+++ b/include/configs/nitrogen6x.h
@@ -113,6 +113,7 @@
 	DISTRO_BOOT_DEV_DHCP(func)
 
 #include <config_distro_bootcmd.h>
+#include <linux/stringify.h>
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"console=ttymxc1\0" \
diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h
index af278ded9a..219e5d216b 100644
--- a/include/configs/p1_p2_rdb_pc.h
+++ b/include/configs/p1_p2_rdb_pc.h
@@ -10,6 +10,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/stringify.h>
+
 #if defined(CONFIG_TARGET_P1020MBG)
 #define CONFIG_BOARDNAME "P1020MBG-PC"
 #define CONFIG_VSC7385_ENET
diff --git a/include/configs/p1_twr.h b/include/configs/p1_twr.h
index e99b41cc88..d731f9c8fa 100644
--- a/include/configs/p1_twr.h
+++ b/include/configs/p1_twr.h
@@ -9,6 +9,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/stringify.h>
+
 #if defined(CONFIG_TWR_P1025)
 #define CONFIG_BOARDNAME "TWR-P1025"
 #define CONFIG_SYS_LBC_LBCR	0x00080000	/* Conversion of LBC addr */
diff --git a/include/configs/pcl063_ull.h b/include/configs/pcl063_ull.h
index 6aa77f1f5e..4ae955d9ca 100644
--- a/include/configs/pcl063_ull.h
+++ b/include/configs/pcl063_ull.h
@@ -10,6 +10,7 @@
 #define __PCL063_ULL_H
 
 #include <linux/sizes.h>
+#include <linux/stringify.h>
 #include "mx6_common.h"
 
 /* SPL options */
diff --git a/include/configs/pcm052.h b/include/configs/pcm052.h
index 0bfaaf784a..ba7aad8b05 100644
--- a/include/configs/pcm052.h
+++ b/include/configs/pcm052.h
@@ -10,6 +10,7 @@
 
 #include <asm/arch/imx-regs.h>
 #include <linux/sizes.h>
+#include <linux/stringify.h>
 
 #define CONFIG_SKIP_LOWLEVEL_INIT
 
diff --git a/include/configs/pico-imx6ul.h b/include/configs/pico-imx6ul.h
index b0e2f6ce33..8bfada75f7 100644
--- a/include/configs/pico-imx6ul.h
+++ b/include/configs/pico-imx6ul.h
@@ -111,6 +111,7 @@
 	func(DHCP, dhcp, na)
 
 #include <config_distro_bootcmd.h>
+#include <linux/stringify.h>
 
 #define CONFIG_SYS_LOAD_ADDR		CONFIG_LOADADDR
 #define CONFIG_SYS_HZ			1000
diff --git a/include/configs/pico-imx7d.h b/include/configs/pico-imx7d.h
index 9a987f4150..3ca3ec6112 100644
--- a/include/configs/pico-imx7d.h
+++ b/include/configs/pico-imx7d.h
@@ -108,6 +108,7 @@
 	func(DHCP, dhcp, na)
 
 #include <config_distro_bootcmd.h>
+#include <linux/stringify.h>
 
 #define CONFIG_SYS_LOAD_ADDR		CONFIG_LOADADDR
 #define CONFIG_SYS_HZ			1000
diff --git a/include/configs/s32v234evb.h b/include/configs/s32v234evb.h
index 5b1504d2df..ba0e506fa0 100644
--- a/include/configs/s32v234evb.h
+++ b/include/configs/s32v234evb.h
@@ -144,6 +144,7 @@
 	"run distro_bootcmd"
 
 #include <config_distro_bootcmd.h>
+#include <linux/stringify.h>
 
 /* Miscellaneous configurable options */
 #define CONFIG_SYS_PROMPT		"=> "
diff --git a/include/configs/sbc8548.h b/include/configs/sbc8548.h
index f5462549a5..55c4bff28a 100644
--- a/include/configs/sbc8548.h
+++ b/include/configs/sbc8548.h
@@ -12,6 +12,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/stringify.h>
+
 /*
  * Top level Makefile configuration choices
  */
diff --git a/include/configs/socfpga_arria5_secu1.h b/include/configs/socfpga_arria5_secu1.h
index b059100ccd..ad4c3c0786 100644
--- a/include/configs/socfpga_arria5_secu1.h
+++ b/include/configs/socfpga_arria5_secu1.h
@@ -7,6 +7,7 @@
 #define __CONFIG_SOCFPGA_SECU1_H__
 
 #include <asm/arch/base_addr_ac5.h>
+#include <linux/stringify.h>
 
 /* Call misc_init_r */
 #define CONFIG_MISC_INIT_R
diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
index 0579a00d40..07c9745eba 100644
--- a/include/configs/socfpga_common.h
+++ b/include/configs/socfpga_common.h
@@ -5,6 +5,8 @@
 #ifndef __CONFIG_SOCFPGA_COMMON_H__
 #define __CONFIG_SOCFPGA_COMMON_H__
 
+#include <linux/stringify.h>
+
 /*
  * High level configuration
  */
diff --git a/include/configs/socfpga_soc64_common.h b/include/configs/socfpga_soc64_common.h
index 61f7b254b5..7237ec95e3 100644
--- a/include/configs/socfpga_soc64_common.h
+++ b/include/configs/socfpga_soc64_common.h
@@ -9,6 +9,7 @@
 
 #include <asm/arch/base_addr_s10.h>
 #include <asm/arch/handoff_s10.h>
+#include <linux/stringify.h>
 
 /*
  * U-Boot general configurations
diff --git a/include/configs/strider.h b/include/configs/strider.h
index d5f710be59..4ad3401c04 100644
--- a/include/configs/strider.h
+++ b/include/configs/strider.h
@@ -8,6 +8,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/stringify.h>
+
 /*
  * High Level Configuration Options
  */
diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h
index 895cd0324e..13ab1cc4bf 100644
--- a/include/configs/tqma6.h
+++ b/include/configs/tqma6.h
@@ -9,6 +9,8 @@
 #define __CONFIG_H
 
 #include <linux/kconfig.h>
+#include <linux/stringify.h>
+
 /* SPL */
 /* #if defined(CONFIG_SPL_BUILD) */
 /* common IMX6 SPL configuration */
diff --git a/include/configs/udoo.h b/include/configs/udoo.h
index 163cbbb54e..54f472d595 100644
--- a/include/configs/udoo.h
+++ b/include/configs/udoo.h
@@ -70,6 +70,7 @@
 	func(DHCP, dhcp, na)
 
 #include <config_distro_bootcmd.h>
+#include <linux/stringify.h>
 
 /* Physical Memory Map */
 #define PHYS_SDRAM			MMDC0_ARB_BASE_ADDR
diff --git a/include/configs/ve8313.h b/include/configs/ve8313.h
index bdacd81885..81b171ea16 100644
--- a/include/configs/ve8313.h
+++ b/include/configs/ve8313.h
@@ -12,6 +12,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/stringify.h>
+
 /*
  * High Level Configuration Options
  */
diff --git a/include/configs/vf610twr.h b/include/configs/vf610twr.h
index 739219e8f8..0ef2de33cc 100644
--- a/include/configs/vf610twr.h
+++ b/include/configs/vf610twr.h
@@ -9,6 +9,7 @@
 #define __CONFIG_H
 
 #include <asm/arch/imx-regs.h>
+#include <linux/stringify.h>
 
 #define CONFIG_SYS_FSL_CLK
 
diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h
index 9d2bd7b278..2b0576e1e6 100644
--- a/include/configs/wandboard.h
+++ b/include/configs/wandboard.h
@@ -107,6 +107,7 @@
 	func(DHCP, dhcp, na)
 
 #include <config_distro_bootcmd.h>
+#include <linux/stringify.h>
 
 /* Physical Memory Map */
 #define PHYS_SDRAM			MMDC0_ARB_BASE_ADDR
diff --git a/include/configs/wb45n.h b/include/configs/wb45n.h
index fea07056b0..aecf2737f8 100644
--- a/include/configs/wb45n.h
+++ b/include/configs/wb45n.h
@@ -7,6 +7,7 @@
 #define __CONFIG_H__
 
 #include <asm/hardware.h>
+#include <linux/stringify.h>
 
 /* ARM asynchronous clock */
 #define CONFIG_SYS_AT91_SLOW_CLOCK  32768
diff --git a/include/configs/xpedite517x.h b/include/configs/xpedite517x.h
index 6c9991fa03..d3bb92964e 100644
--- a/include/configs/xpedite517x.h
+++ b/include/configs/xpedite517x.h
@@ -51,6 +51,7 @@
 #define CONFIG_SYS_SCRATCH_VA	0xe0000000
 
 #ifndef __ASSEMBLY__
+#include <linux/stringify.h>
 extern unsigned long get_board_sys_clk(unsigned long dummy);
 #endif
 
diff --git a/include/configs/xpedite537x.h b/include/configs/xpedite537x.h
index 6d847cb793..7262c86908 100644
--- a/include/configs/xpedite537x.h
+++ b/include/configs/xpedite537x.h
@@ -47,6 +47,7 @@
 #define CONFIG_VERY_BIG_RAM
 
 #ifndef __ASSEMBLY__
+#include <linux/stringify.h>
 extern unsigned long get_board_sys_clk(unsigned long dummy);
 extern unsigned long get_board_ddr_clk(unsigned long dummy);
 #endif
diff --git a/include/configs/xpedite550x.h b/include/configs/xpedite550x.h
index 106269bae0..b9c9ac4ba8 100644
--- a/include/configs/xpedite550x.h
+++ b/include/configs/xpedite550x.h
@@ -46,6 +46,7 @@
 #define CONFIG_VERY_BIG_RAM
 
 #ifndef __ASSEMBLY__
+#include <linux/stringify.h>
 extern unsigned long get_board_sys_clk(unsigned long dummy);
 extern unsigned long get_board_ddr_clk(unsigned long dummy);
 #endif
diff --git a/include/env_default.h b/include/env_default.h
index 56a8bae39a..a657927e06 100644
--- a/include/env_default.h
+++ b/include/env_default.h
@@ -8,6 +8,7 @@
  */
 
 #include <env_callback.h>
+#include <linux/stringify.h>
 
 #ifdef DEFAULT_ENV_INSTANCE_EMBEDDED
 env_t embedded_environment __UBOOT_ENV_SECTION__(environment) = {
diff --git a/include/environment/ti/boot.h b/include/environment/ti/boot.h
index 11a57af0a4..a9d8f28d46 100644
--- a/include/environment/ti/boot.h
+++ b/include/environment/ti/boot.h
@@ -9,6 +9,8 @@
 #ifndef __TI_BOOT_H
 #define __TI_BOOT_H
 
+#include <linux/stringify.h>
+
 #ifndef CONSOLEDEV
 #define CONSOLEDEV "ttyS2"
 #endif
-- 
2.26.2.645.ge9eca65c58-goog

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH v3 19/22] Fix some checkpatch warnings in calls to udelay()
  2020-05-10 17:39 [PATCH v3 00/22] common: Further reduce the size of common.h Simon Glass
                   ` (17 preceding siblings ...)
  2020-05-10 17:40 ` [PATCH v3 18/22] common: Drop linux/stringify.h " Simon Glass
@ 2020-05-10 17:40 ` Simon Glass
  2020-05-19 17:33   ` Tom Rini
  2020-05-10 17:40 ` [PATCH v3 20/22] common: Drop linux/delay.h from common header Simon Glass
                   ` (3 subsequent siblings)
  22 siblings, 1 reply; 53+ messages in thread
From: Simon Glass @ 2020-05-10 17:40 UTC (permalink / raw)
  To: u-boot

Fix up some incorrect code style in calls to functions in the linux/time.h
header, mostly udelay().

Signed-off-by: Simon Glass <sjg@chromium.org>

---

Changes in v3: None
Changes in v2:
- Split out code-style changes for time functions into a new patch

 arch/arm/cpu/sa1100/timer.c           |  2 +-
 board/sbc8641d/sbc8641d.c             |  8 ++++----
 cmd/mem.c                             |  4 ++--
 drivers/ata/sata_sil3114.c            | 16 ++++++++--------
 drivers/fpga/stratixII.c              |  6 +++---
 drivers/net/ax88180.c                 | 10 +++++-----
 drivers/net/eepro100.c                | 18 +++++++++---------
 drivers/net/lan91c96.c                | 10 +++++-----
 drivers/net/smc91111.c                | 22 +++++++++++-----------
 drivers/qe/uec_phy.c                  |  6 +++---
 drivers/rtc/ds1306.c                  | 26 +++++++++++++-------------
 drivers/video/mb862xx.c               |  6 +++---
 examples/standalone/smc91111_eeprom.c |  6 +++---
 lib/time.c                            |  2 +-
 14 files changed, 71 insertions(+), 71 deletions(-)

diff --git a/arch/arm/cpu/sa1100/timer.c b/arch/arm/cpu/sa1100/timer.c
index 8e20c96bcd..f2cbee5dca 100644
--- a/arch/arm/cpu/sa1100/timer.c
+++ b/arch/arm/cpu/sa1100/timer.c
@@ -23,7 +23,7 @@ ulong get_timer (ulong base)
 	return get_timer_masked ();
 }
 
-void __udelay (unsigned long usec)
+void __udelay(unsigned long usec)
 {
 	ulong tmo;
 	ulong endtime;
diff --git a/board/sbc8641d/sbc8641d.c b/board/sbc8641d/sbc8641d.c
index 2346564c7d..91867d4f3d 100644
--- a/board/sbc8641d/sbc8641d.c
+++ b/board/sbc8641d/sbc8641d.c
@@ -123,12 +123,12 @@ long int fixed_sdram (void)
 
 	asm ("sync;isync");
 
-	udelay (500);
+	udelay(500);
 
 	ddr->sdram_cfg = CONFIG_SYS_DDR_CFG_1B;
 	asm ("sync; isync");
 
-	udelay (500);
+	udelay(500);
 	ddr = &immap->im_ddr2;
 
 	ddr->cs0_bnds = CONFIG_SYS_DDR2_CS0_BNDS;
@@ -154,12 +154,12 @@ long int fixed_sdram (void)
 
 	asm ("sync;isync");
 
-	udelay (500);
+	udelay(500);
 
 	ddr->sdram_cfg = CONFIG_SYS_DDR2_CFG_1B;
 	asm ("sync; isync");
 
-	udelay (500);
+	udelay(500);
 #endif
 	return CONFIG_SYS_SDRAM_SIZE * 1024 * 1024;
 }
diff --git a/cmd/mem.c b/cmd/mem.c
index 7f7957e74a..423e6c1056 100644
--- a/cmd/mem.c
+++ b/cmd/mem.c
@@ -189,7 +189,7 @@ static int do_mem_mdc(struct cmd_tbl *cmdtp, int flag, int argc,
 
 		/* delay for <count> ms... */
 		for (i=0; i<count; i++)
-			udelay (1000);
+			udelay(1000);
 
 		/* check for ctrl-c to abort... */
 		if (ctrlc()) {
@@ -217,7 +217,7 @@ static int do_mem_mwc(struct cmd_tbl *cmdtp, int flag, int argc,
 
 		/* delay for <count> ms... */
 		for (i=0; i<count; i++)
-			udelay (1000);
+			udelay(1000);
 
 		/* check for ctrl-c to abort... */
 		if (ctrlc()) {
diff --git a/drivers/ata/sata_sil3114.c b/drivers/ata/sata_sil3114.c
index 7e802170d8..7348566dd0 100644
--- a/drivers/ata/sata_sil3114.c
+++ b/drivers/ata/sata_sil3114.c
@@ -64,9 +64,9 @@ static int sata_bus_softreset (int num)
 
 	port[num].ctl_reg = 0x08;	/*Default value of control reg */
 	writeb (port[num].ctl_reg, port[num].ioaddr.ctl_addr);
-	udelay (10);
+	udelay(10);
 	writeb (port[num].ctl_reg | ATA_SRST, port[num].ioaddr.ctl_addr);
-	udelay (10);
+	udelay(10);
 	writeb (port[num].ctl_reg, port[num].ioaddr.ctl_addr);
 
 	/* spec mandates ">= 2ms" before checking status.
@@ -121,7 +121,7 @@ static void sata_identify (int num, int dev)
 	cmd = ATA_CMD_ID_ATA;	/*Device Identify Command */
 	writeb (cmd, port[num].ioaddr.command_addr);
 	readb (port[num].ioaddr.altstatus_addr);
-	udelay (10);
+	udelay(10);
 
 	status = sata_busy_wait (&port[num].ioaddr, ATA_BUSY, 1000, 0);
 	if (status & ATA_ERR) {
@@ -194,7 +194,7 @@ static void set_Feature_cmd (int num, int dev)
 	writeb (ATA_DEVICE_OBS, port[num].ioaddr.device_addr);
 	writeb (ATA_CMD_SET_FEATURES, port[num].ioaddr.command_addr);
 
-	udelay (50);
+	udelay(50);
 	msleep (150);
 
 	status = sata_busy_wait (&port[num].ioaddr, ATA_BUSY, 5000, 0);
@@ -392,7 +392,7 @@ static u8 wait_for_irq (int num, unsigned int max)
 		if (readl (port) & VND_TF_CNST_INTST) {
 			break;
 		}
-		udelay (1000);
+		udelay(1000);
 		max--;
 	} while ((max > 0));
 
@@ -408,7 +408,7 @@ static u8 sata_busy_wait (struct sata_ioports *ioaddr, int bits,
 		if (!((status = sata_chk_status (ioaddr, usealtstatus)) & bits)) {
 			break;
 		}
-		udelay (1000);
+		udelay(1000);
 		max--;
 	} while ((status & bits) && (max > 0));
 
@@ -429,7 +429,7 @@ static void msleep (int count)
 	int i;
 
 	for (i = 0; i < count; i++)
-		udelay (1000);
+		udelay(1000);
 }
 
 /* Read up to 255 sectors
@@ -616,7 +616,7 @@ ulong sata_write (int device, ulong block, lbaint_t blkcnt, const void *buff)
 
 		output_data (&port[num].ioaddr, buffer, ATA_SECTOR_WORDS);
 		readb (port[num].ioaddr.altstatus_addr);
-		udelay (50);
+		udelay(50);
 
 		++n;
 		++blknr;
diff --git a/drivers/fpga/stratixII.c b/drivers/fpga/stratixII.c
index 12d8dd19bf..4edbfe4ba8 100644
--- a/drivers/fpga/stratixII.c
+++ b/drivers/fpga/stratixII.c
@@ -116,9 +116,9 @@ int StratixII_ps_fpp_load (Altera_desc * desc, void *buf, size_t bsize,
 
 	/* 2. Strat burn cycle by deasserting config for t_CFG and waiting t_CF2CK after reaserted */
 	fns->config (0, 1, cookie);
-	udelay (5);		/* nCONFIG low pulse width 2usec */
+	udelay(5);		/* nCONFIG low pulse width 2usec */
 	fns->config (1, 1, cookie);
-	udelay (100);		/* nCONFIG high to first rising edge on DCLK */
+	udelay(100);		/* nCONFIG high to first rising edge on DCLK */
 
 	/* 3. Start the Data cycle with clk deasserted */
 	bytecount = 0;
@@ -168,7 +168,7 @@ int StratixII_ps_fpp_load (Altera_desc * desc, void *buf, size_t bsize,
 
 	/* 4. Set one last clock and check conf done signal */
 	fns->clk (1, 1, cookie);
-	udelay (100);
+	udelay(100);
 	if (!fns->done (cookie)) {
 		printf (" error!.\n");
 		fns->abort (cookie);
diff --git a/drivers/net/ax88180.c b/drivers/net/ax88180.c
index d13eb11187..2715653cd4 100644
--- a/drivers/net/ax88180.c
+++ b/drivers/net/ax88180.c
@@ -118,7 +118,7 @@ static int ax88180_phy_reset (struct eth_device *dev)
 
 	/* Wait for the reset to complete, or time out (500 ms) */
 	while (ax88180_mdio_read (dev, MII_BMCR) & BMCR_RESET) {
-		udelay (1000);
+		udelay(1000);
 		if (--delay_cnt == 0) {
 			printf ("Failed to reset PHY!\n");
 			return -1;
@@ -177,7 +177,7 @@ static int ax88180_poll_tx_complete (struct eth_device *dev)
 		if ((tmpval & txbs_txdp) == 0)
 			break;
 
-		udelay (100);
+		udelay(100);
 	}
 
 	if (TimeOutCnt)
@@ -342,7 +342,7 @@ static void ax88180_media_config (struct eth_device *dev)
 		if (bmsr_val & BMSR_LSTATUS) {
 			break;
 		}
-		udelay (100);
+		udelay(100);
 	}
 
 	bmsr_val = ax88180_mdio_read (dev, MII_BMSR);
@@ -364,7 +364,7 @@ static void ax88180_media_config (struct eth_device *dev)
 				if (bmsr_val & BMSR_ANEGCOMPLETE) {
 					break;
 				}
-				udelay (100);
+				udelay(100);
 			}
 		} else
 			debug ("ax88180: Auto-negotiation is disabled.\n");
@@ -680,7 +680,7 @@ static void ax88180_read_mac_addr (struct eth_device *dev)
 		tmp_regval = INW (dev, PROMCTRL);
 		if ((tmp_regval & RELOAD_EEPROM) == 0)
 			break;
-		udelay (1000);
+		udelay(1000);
 	}
 
 	/* Get MAC addresses */
diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c
index 2fe0ba6e20..36a9d4d91c 100644
--- a/drivers/net/eepro100.c
+++ b/drivers/net/eepro100.c
@@ -462,7 +462,7 @@ int eepro100_initialize (bd_t * bis)
 		 */
 		pci_write_config_byte (devno, PCI_LATENCY_TIMER, 0x20);
 
-		udelay (10 * 1000);
+		udelay(10 * 1000);
 
 		read_hw_addr (dev, bis);
 	}
@@ -480,10 +480,10 @@ static int eepro100_init (struct eth_device *dev, bd_t * bis)
 	/* Reset the ethernet controller
 	 */
 	OUTL (dev, I82559_SELECTIVE_RESET, SCBPort);
-	udelay (20);
+	udelay(20);
 
 	OUTL (dev, I82559_RESET, SCBPort);
-	udelay (20);
+	udelay(20);
 
 	if (!wait_for_eepro100 (dev)) {
 		printf ("Error: Can not reset ethernet controller.\n");
@@ -721,10 +721,10 @@ static void eepro100_halt (struct eth_device *dev)
 	/* Reset the ethernet controller
 	 */
 	OUTL (dev, I82559_SELECTIVE_RESET, SCBPort);
-	udelay (20);
+	udelay(20);
 
 	OUTL (dev, I82559_RESET, SCBPort);
-	udelay (20);
+	udelay(20);
 
 	if (!wait_for_eepro100 (dev)) {
 		printf ("Error: Can not reset ethernet controller.\n");
@@ -760,19 +760,19 @@ static int read_eeprom (struct eth_device *dev, int location, int addr_len)
 		short dataval = (read_cmd & (1 << i)) ? EE_DATA_WRITE : 0;
 
 		OUTW (dev, EE_ENB | dataval, SCBeeprom);
-		udelay (1);
+		udelay(1);
 		OUTW (dev, EE_ENB | dataval | EE_SHIFT_CLK, SCBeeprom);
-		udelay (1);
+		udelay(1);
 	}
 	OUTW (dev, EE_ENB, SCBeeprom);
 
 	for (i = 15; i >= 0; i--) {
 		OUTW (dev, EE_ENB | EE_SHIFT_CLK, SCBeeprom);
-		udelay (1);
+		udelay(1);
 		retval = (retval << 1) |
 				((INW (dev, SCBeeprom) & EE_DATA_READ) ? 1 : 0);
 		OUTW (dev, EE_ENB, SCBeeprom);
-		udelay (1);
+		udelay(1);
 	}
 
 	/* Terminate the EEPROM access. */
diff --git a/drivers/net/lan91c96.c b/drivers/net/lan91c96.c
index c08bd21f95..1989b66a48 100644
--- a/drivers/net/lan91c96.c
+++ b/drivers/net/lan91c96.c
@@ -211,7 +211,7 @@ static void smc_reset(struct eth_device *dev)
 	SMC_SELECT_BANK(dev, 0);
 	SMC_outw(dev, LAN91C96_RCR_SOFT_RST, LAN91C96_RCR);
 
-	udelay (10);
+	udelay(10);
 
 	/* Disable transmit and receive functionality */
 	SMC_outw(dev, 0, LAN91C96_RCR);
@@ -438,7 +438,7 @@ static int smc_send_packet(struct eth_device *dev, void *packet,
 
 		/* wait for MMU getting ready (low) */
 		while (SMC_inw(dev, LAN91C96_MMU) & LAN91C96_MMUCR_NO_BUSY)
-			udelay (10);
+			udelay(10);
 
 		PRINTK2("MMU ready\n");
 
@@ -455,7 +455,7 @@ static int smc_send_packet(struct eth_device *dev, void *packet,
 
 		/* wait for MMU getting ready (low) */
 		while (SMC_inw(dev, LAN91C96_MMU) & LAN91C96_MMUCR_NO_BUSY)
-			udelay (10);
+			udelay(10);
 
 		PRINTK2 ("MMU ready\n");
 	}
@@ -600,13 +600,13 @@ static int smc_rcv(struct eth_device *dev)
 	}
 
 	while (SMC_inw(dev, LAN91C96_MMU) & LAN91C96_MMUCR_NO_BUSY)
-		udelay (1);		/* Wait until not busy */
+		udelay(1);		/* Wait until not busy */
 
 	/*  error or good, tell the card to get rid of this packet */
 	SMC_outw(dev, LAN91C96_MMUCR_RELEASE_RX, LAN91C96_MMU);
 
 	while (SMC_inw(dev, LAN91C96_MMU) & LAN91C96_MMUCR_NO_BUSY)
-		udelay (1);		/* Wait until not busy */
+		udelay(1);		/* Wait until not busy */
 
 	if (!is_error) {
 		/* Pass the packet up to the protocol layers. */
diff --git a/drivers/net/smc91111.c b/drivers/net/smc91111.c
index 5754c3106c..52bbf05a1e 100644
--- a/drivers/net/smc91111.c
+++ b/drivers/net/smc91111.c
@@ -266,7 +266,7 @@ static inline void smc_wait_mmu_release_complete (struct eth_device *dev)
 
 	/* assume bank 2 selected */
 	while (SMC_inw (dev, MMU_CMD_REG) & MC_BUSY) {
-		udelay (1);	/* Wait until not busy */
+		udelay(1);	/* Wait until not busy */
 		if (++count > 200)
 			break;
 	}
@@ -318,7 +318,7 @@ static void smc_reset (struct eth_device *dev)
 	SMC_SELECT_BANK (dev, 0);
 
 	/* this should pause enough for the chip to be happy */
-	udelay (10);
+	udelay(10);
 
 	/* Disable transmit and receive functionality */
 	SMC_outw (dev, RCR_CLEAR, RCR_REG);
@@ -333,7 +333,7 @@ static void smc_reset (struct eth_device *dev)
 	smc_wait_mmu_release_complete (dev);
 	SMC_outw (dev, MC_RESET, MMU_CMD_REG);
 	while (SMC_inw (dev, MMU_CMD_REG) & MC_BUSY)
-		udelay (1);	/* Wait until not busy */
+		udelay(1);	/* Wait until not busy */
 
 	/* Note:  It doesn't seem that waiting for the MMU busy is needed here,
 	   but this is a place where future chipsets _COULD_ break.  Be wary
@@ -564,7 +564,7 @@ again:
 
 		/* wait for MMU getting ready (low) */
 		while (SMC_inw (dev, MMU_CMD_REG) & MC_BUSY) {
-			udelay (10);
+			udelay(10);
 		}
 
 		PRINTK2 ("MMU ready\n");
@@ -583,7 +583,7 @@ again:
 
 		/* wait for MMU getting ready (low) */
 		while (SMC_inw (dev, MMU_CMD_REG) & MC_BUSY) {
-			udelay (10);
+			udelay(10);
 		}
 
 		PRINTK2 ("MMU ready\n");
@@ -957,19 +957,19 @@ static word smc_read_phy_register (struct eth_device *dev, byte phyreg)
 	for (i = 0; i < sizeof bits; ++i) {
 		/* Clock Low - output data */
 		SMC_outw (dev, mii_reg | bits[i], MII_REG);
-		udelay (SMC_PHY_CLOCK_DELAY);
+		udelay(SMC_PHY_CLOCK_DELAY);
 
 
 		/* Clock Hi - input data */
 		SMC_outw (dev, mii_reg | bits[i] | MII_MCLK, MII_REG);
-		udelay (SMC_PHY_CLOCK_DELAY);
+		udelay(SMC_PHY_CLOCK_DELAY);
 		bits[i] |= SMC_inw (dev, MII_REG) & MII_MDI;
 	}
 
 	/* Return to idle state */
 	/* Set clock to low, data to low, and output tristated */
 	SMC_outw (dev, mii_reg, MII_REG);
-	udelay (SMC_PHY_CLOCK_DELAY);
+	udelay(SMC_PHY_CLOCK_DELAY);
 
 	/* Restore original bank select */
 	SMC_SELECT_BANK (dev, oldBank);
@@ -1078,19 +1078,19 @@ static void smc_write_phy_register (struct eth_device *dev, byte phyreg,
 	for (i = 0; i < sizeof bits; ++i) {
 		/* Clock Low - output data */
 		SMC_outw (dev, mii_reg | bits[i], MII_REG);
-		udelay (SMC_PHY_CLOCK_DELAY);
+		udelay(SMC_PHY_CLOCK_DELAY);
 
 
 		/* Clock Hi - input data */
 		SMC_outw (dev, mii_reg | bits[i] | MII_MCLK, MII_REG);
-		udelay (SMC_PHY_CLOCK_DELAY);
+		udelay(SMC_PHY_CLOCK_DELAY);
 		bits[i] |= SMC_inw (dev, MII_REG) & MII_MDI;
 	}
 
 	/* Return to idle state */
 	/* Set clock to low, data to low, and output tristated */
 	SMC_outw (dev, mii_reg, MII_REG);
-	udelay (SMC_PHY_CLOCK_DELAY);
+	udelay(SMC_PHY_CLOCK_DELAY);
 
 	/* Restore original bank select */
 	SMC_SELECT_BANK (dev, oldBank);
diff --git a/drivers/qe/uec_phy.c b/drivers/qe/uec_phy.c
index 9425379794..1dae261509 100644
--- a/drivers/qe/uec_phy.c
+++ b/drivers/qe/uec_phy.c
@@ -875,7 +875,7 @@ void marvell_phy_interface_mode(struct eth_device *dev, phy_interface_t type,
 			uec_phy_write(mii_info, 0x04, 0x01e1);
 			uec_phy_write(mii_info, 0x00, 0x9140);
 			uec_phy_write(mii_info, 0x00, 0x1000);
-			udelay (100000);
+			mdelay(100);
 			uec_phy_write(mii_info, 0x00, 0x2900);
 			uec_phy_write(mii_info, 0x14, 0x0cd2);
 			uec_phy_write(mii_info, 0x00, 0xa100);
@@ -884,13 +884,13 @@ void marvell_phy_interface_mode(struct eth_device *dev, phy_interface_t type,
 			uec_phy_write(mii_info, 0x04, 0x05e1);
 			uec_phy_write(mii_info, 0x00, 0xa100);
 			uec_phy_write(mii_info, 0x00, 0x2100);
-			udelay (1000000);
+			mdelay(1000);
 		} else if (speed == SPEED_10) {
 			uec_phy_write(mii_info, 0x14, 0x8e40);
 			uec_phy_write(mii_info, 0x1b, 0x800b);
 			uec_phy_write(mii_info, 0x14, 0x0c82);
 			uec_phy_write(mii_info, 0x00, 0x8100);
-			udelay (1000000);
+			mdelay(1000);
 		}
 	}
 
diff --git a/drivers/rtc/ds1306.c b/drivers/rtc/ds1306.c
index 02d617e09c..1bd1151e1b 100644
--- a/drivers/rtc/ds1306.c
+++ b/drivers/rtc/ds1306.c
@@ -71,7 +71,7 @@ int rtc_get (struct rtc_time *tmp)
 
 	/* Now we can enable the DS1306 RTC */
 	immap->im_cpm.cp_pbdat |= PB_SPI_CE;
-	udelay (10);
+	udelay(10);
 
 	/* Shift out the address (0) of the time in the Clock Chip */
 	soft_spi_send (0);
@@ -105,7 +105,7 @@ int rtc_get (struct rtc_time *tmp)
 
 	/* Now we can disable the DS1306 RTC */
 	immap->im_cpm.cp_pbdat &= ~PB_SPI_CE;	/* Disable DS1306 Chip */
-	udelay (10);
+	udelay(10);
 
 	rtc_calc_weekday(tmp);	/* Determine the day of week */
 
@@ -127,7 +127,7 @@ int rtc_set (struct rtc_time *tmp)
 
 	/* Now we can enable the DS1306 RTC */
 	immap->im_cpm.cp_pbdat |= PB_SPI_CE;	/* Enable DS1306 Chip */
-	udelay (10);
+	udelay(10);
 
 	/* First disable write protect in the clock chip control register */
 	soft_spi_send (0x8F);	/* send address of the control register */
@@ -135,11 +135,11 @@ int rtc_set (struct rtc_time *tmp)
 
 	/* Now disable the DS1306 to terminate the write */
 	immap->im_cpm.cp_pbdat &= ~PB_SPI_CE;
-	udelay (10);
+	udelay(10);
 
 	/* Now enable the DS1306 to initiate a new write */
 	immap->im_cpm.cp_pbdat |= PB_SPI_CE;
-	udelay (10);
+	udelay(10);
 
 	/* Next, send the address of the clock time write registers */
 	soft_spi_send (0x80);	/* send address of the first time register */
@@ -156,11 +156,11 @@ int rtc_set (struct rtc_time *tmp)
 
 	/* Now we can disable the Clock chip to terminate the burst write */
 	immap->im_cpm.cp_pbdat &= ~PB_SPI_CE;	/* Disable DS1306 Chip */
-	udelay (10);
+	udelay(10);
 
 	/* Now we can enable the Clock chip to initiate a new write */
 	immap->im_cpm.cp_pbdat |= PB_SPI_CE;	/* Enable DS1306 Chip */
-	udelay (10);
+	udelay(10);
 
 	/* First we Enable write protect in the clock chip control register */
 	soft_spi_send (0x8F);	/* send address of the control register */
@@ -168,7 +168,7 @@ int rtc_set (struct rtc_time *tmp)
 
 	/* Now disable the DS1306 */
 	immap->im_cpm.cp_pbdat &= ~PB_SPI_CE;	/*  Disable DS1306 Chip */
-	udelay (10);
+	udelay(10);
 
 	/* Set standard MPC8xx clock to the same time so Linux will
 	 * see the time even if it doesn't have a DS1306 clock driver.
@@ -204,7 +204,7 @@ static void init_spi (void)
 	immap->im_cpm.cp_pbdir |= (PB_SPIMOSI | PB_SPI_CE | PB_SPISCK);
 
 	immap->im_cpm.cp_pbdir &= ~PB_SPIMISO;	/* Make MISO pin an input */
-	udelay (10);
+	udelay(10);
 }
 
 /* ------------------------------------------------------------------------- */
@@ -227,10 +227,10 @@ static void soft_spi_send (unsigned char n)
 			immap->im_cpm.cp_pbdat |= PB_SPIMOSI;	/* Set MOSI to 1 */
 		else
 			immap->im_cpm.cp_pbdat &= ~PB_SPIMOSI;	/* Set MOSI to 0 */
-		udelay (10);
+		udelay(10);
 
 		immap->im_cpm.cp_pbdat &= ~PB_SPISCK;	/* Lower SCK */
-		udelay (10);
+		udelay(10);
 
 		bitpos >>= 1;	/* Shift for next bit position */
 	}
@@ -253,11 +253,11 @@ static unsigned char soft_spi_read (void)
 	/* Read 8 bits here */
 	for (i = 0; i < 8; i++) {	/* Do 8 bits in loop */
 		immap->im_cpm.cp_pbdat |= PB_SPISCK;	/* Raise SCK */
-		udelay (10);
+		udelay(10);
 		if (immap->im_cpm.cp_pbdat & PB_SPIMISO)	/* Get a bit of data */
 			spi_byte |= bitpos;	/* Set data accordingly */
 		immap->im_cpm.cp_pbdat &= ~PB_SPISCK;	/* Lower SCK */
-		udelay (10);
+		udelay(10);
 		bitpos >>= 1;	/* Shift for next bit position */
 	}
 
diff --git a/drivers/video/mb862xx.c b/drivers/video/mb862xx.c
index 301c1f0df1..a3a7a8dd98 100644
--- a/drivers/video/mb862xx.c
+++ b/drivers/video/mb862xx.c
@@ -79,7 +79,7 @@ static void gdc_sw_reset (void)
 	GraphicDevice *dev = &mb862xx;
 
 	HOST_WR_REG (GC_SRST, 0x1);
-	udelay (500);
+	udelay(500);
 	video_hw_init ();
 }
 
@@ -222,9 +222,9 @@ unsigned int pci_video_init (void)
 
 	/* Setup clocks and memory mode for Coral-P(A) */
 	HOST_WR_REG(GC_CCF, CONFIG_SYS_MB862xx_CCF);
-	udelay (200);
+	udelay(200);
 	HOST_WR_REG(GC_MMR, CONFIG_SYS_MB862xx_MMR);
-	udelay (100);
+	udelay(100);
 	return dev->frameAdrs;
 }
 
diff --git a/examples/standalone/smc91111_eeprom.c b/examples/standalone/smc91111_eeprom.c
index a43d14f396..631b1b04d6 100644
--- a/examples/standalone/smc91111_eeprom.c
+++ b/examples/standalone/smc91111_eeprom.c
@@ -237,7 +237,7 @@ void copy_from_eeprom (struct eth_device *dev)
 		CTL_RELOAD, CTL_REG);
 	i = 100;
 	while ((SMC_inw (dev, CTL_REG) & CTL_RELOAD) && --i)
-		udelay (100);
+		udelay(100);
 	if (i == 0) {
 		printf ("Timeout Refreshing EEPROM registers\n");
 	} else {
@@ -318,7 +318,7 @@ int read_eeprom_reg (struct eth_device *dev, int reg)
 		CTL_RELOAD, CTL_REG);
 	timeout = 100;
 	while ((SMC_inw (dev, CTL_REG) & CTL_RELOAD) && --timeout)
-		udelay (100);
+		udelay(100);
 	if (timeout == 0) {
 		printf ("Timeout Reading EEPROM register %02x\n", reg);
 		return 0;
@@ -341,7 +341,7 @@ int write_eeprom_reg (struct eth_device *dev, int value, int reg)
 		CTL_STORE, CTL_REG);
 	timeout = 100;
 	while ((SMC_inw (dev, CTL_REG) & CTL_STORE) && --timeout)
-		udelay (100);
+		udelay(100);
 	if (timeout == 0) {
 		printf ("Timeout Writing EEPROM register %02x\n", reg);
 		return 0;
diff --git a/lib/time.c b/lib/time.c
index 3d6447d7c0..551698e36d 100644
--- a/lib/time.c
+++ b/lib/time.c
@@ -183,7 +183,7 @@ void udelay(unsigned long usec)
 	do {
 		WATCHDOG_RESET();
 		kv = usec > CONFIG_WD_PERIOD ? CONFIG_WD_PERIOD : usec;
-		__udelay (kv);
+		__udelay(kv);
 		usec -= kv;
 	} while(usec);
 }
-- 
2.26.2.645.ge9eca65c58-goog

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH v3 20/22] common: Drop linux/delay.h from common header
  2020-05-10 17:39 [PATCH v3 00/22] common: Further reduce the size of common.h Simon Glass
                   ` (18 preceding siblings ...)
  2020-05-10 17:40 ` [PATCH v3 19/22] Fix some checkpatch warnings in calls to udelay() Simon Glass
@ 2020-05-10 17:40 ` Simon Glass
  2020-05-19 17:34   ` Tom Rini
  2020-05-10 17:40 ` [PATCH v3 21/22] Use __ASSEMBLY__ as the assembly macros Simon Glass
                   ` (2 subsequent siblings)
  22 siblings, 1 reply; 53+ messages in thread
From: Simon Glass @ 2020-05-10 17:40 UTC (permalink / raw)
  To: u-boot

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v3:
- Update vocore2, etc.

Changes in v2: None

 api/api.c                                             | 1 +
 arch/arm/cpu/arm920t/ep93xx/timer.c                   | 1 +
 arch/arm/cpu/arm920t/imx/timer.c                      | 3 ++-
 arch/arm/cpu/arm926ejs/armada100/timer.c              | 1 +
 arch/arm/cpu/arm926ejs/lpc32xx/dram.c                 | 1 +
 arch/arm/cpu/arm926ejs/lpc32xx/timer.c                | 1 +
 arch/arm/cpu/arm926ejs/mx27/timer.c                   | 1 +
 arch/arm/cpu/arm926ejs/mxs/mxs.c                      | 1 +
 arch/arm/cpu/arm926ejs/mxs/timer.c                    | 1 +
 arch/arm/cpu/arm926ejs/spear/reset.c                  | 1 +
 arch/arm/cpu/arm926ejs/spear/timer.c                  | 1 +
 arch/arm/cpu/armv7/bcm235xx/clk-core.c                | 1 +
 arch/arm/cpu/armv7/bcm235xx/clk-eth.c                 | 1 +
 arch/arm/cpu/armv7/bcm281xx/clk-core.c                | 1 +
 arch/arm/cpu/armv7/bcm281xx/clk-eth.c                 | 1 +
 arch/arm/cpu/armv7/iproc-common/timer.c               | 1 +
 arch/arm/cpu/armv7/ls102xa/cpu.c                      | 1 +
 arch/arm/cpu/armv7/ls102xa/timer.c                    | 1 +
 arch/arm/cpu/armv7/s5p-common/timer.c                 | 1 +
 arch/arm/cpu/armv7/stv0991/reset.c                    | 1 +
 arch/arm/cpu/armv7/stv0991/timer.c                    | 1 +
 arch/arm/cpu/armv7/sunxi/timer.c                      | 1 +
 arch/arm/cpu/armv7/vf610/timer.c                      | 1 +
 arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_serdes.c  | 1 +
 arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c  | 1 +
 arch/arm/cpu/armv8/fsl-layerscape/mp.c                | 1 +
 arch/arm/cpu/pxa/usb.c                                | 1 +
 arch/arm/cpu/sa1100/timer.c                           | 1 +
 arch/arm/lib/reset.c                                  | 1 +
 arch/arm/mach-at91/arm920t/timer.c                    | 1 +
 arch/arm/mach-at91/armv7/clock.c                      | 1 +
 arch/arm/mach-at91/mpddrc.c                           | 1 +
 arch/arm/mach-at91/phy.c                              | 1 +
 arch/arm/mach-davinci/timer.c                         | 1 +
 arch/arm/mach-exynos/include/mach/dp_info.h           | 1 +
 arch/arm/mach-imx/ddrmc-vf610.c                       | 1 +
 arch/arm/mach-imx/i2c-mxv7.c                          | 1 +
 arch/arm/mach-imx/imx8m/clock_imx8mm.c                | 1 +
 arch/arm/mach-imx/imx8m/clock_imx8mq.c                | 1 +
 arch/arm/mach-imx/misc.c                              | 1 +
 arch/arm/mach-imx/mx6/ddr.c                           | 1 +
 arch/arm/mach-imx/mx6/litesom.c                       | 1 +
 arch/arm/mach-imx/mx6/soc.c                           | 1 +
 arch/arm/mach-imx/mx7/soc.c                           | 1 +
 arch/arm/mach-imx/mx7ulp/scg.c                        | 1 +
 arch/arm/mach-imx/syscounter.c                        | 1 +
 arch/arm/mach-keystone/ddr3.c                         | 1 +
 arch/arm/mach-keystone/psc.c                          | 1 +
 arch/arm/mach-mvebu/cpu.c                             | 1 +
 arch/arm/mach-mvebu/efuse.c                           | 1 +
 arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c            | 1 +
 arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c | 1 +
 arch/arm/mach-mvebu/serdes/a38x/seq_exec.c            | 1 +
 arch/arm/mach-mvebu/serdes/axp/high_speed_env_lib.c   | 1 +
 arch/arm/mach-omap2/am33xx/board.c                    | 1 +
 arch/arm/mach-omap2/am33xx/clock_ti814x.c             | 1 +
 arch/arm/mach-omap2/am33xx/ddr.c                      | 1 +
 arch/arm/mach-omap2/am33xx/ti816x_emif4.c             | 1 +
 arch/arm/mach-omap2/emif-common.c                     | 1 +
 arch/arm/mach-omap2/omap5/hwinit.c                    | 1 +
 arch/arm/mach-omap2/pipe3-phy.c                       | 1 +
 arch/arm/mach-omap2/timer.c                           | 1 +
 arch/arm/mach-orion5x/timer.c                         | 1 +
 arch/arm/mach-rmobile/timer.c                         | 1 +
 arch/arm/mach-rockchip/rk3036/sdram_rk3036.c          | 1 +
 arch/arm/mach-rockchip/rk3368/rk3368.c                | 1 +
 arch/arm/mach-socfpga/clock_manager_arria10.c         | 1 +
 arch/arm/mach-socfpga/freeze_controller.c             | 1 +
 arch/arm/mach-socfpga/scan_manager.c                  | 1 +
 arch/arm/mach-sunxi/clock_sun6i.c                     | 1 +
 arch/arm/mach-sunxi/clock_sun8i_a83t.c                | 1 +
 arch/arm/mach-sunxi/dram_sun4i.c                      | 1 +
 arch/arm/mach-sunxi/dram_sun50i_h6.c                  | 1 +
 arch/arm/mach-sunxi/dram_sun6i.c                      | 1 +
 arch/arm/mach-sunxi/dram_sun8i_a23.c                  | 1 +
 arch/arm/mach-sunxi/dram_sun8i_a33.c                  | 1 +
 arch/arm/mach-sunxi/dram_sun8i_a83t.c                 | 1 +
 arch/arm/mach-sunxi/dram_sunxi_dw.c                   | 1 +
 arch/arm/mach-sunxi/spl_spi_sunxi.c                   | 1 +
 arch/arm/mach-tegra/clock.c                           | 1 +
 arch/arm/mach-tegra/cmd_enterrcm.c                    | 1 +
 arch/arm/mach-tegra/cpu.c                             | 1 +
 arch/arm/mach-tegra/powergate.c                       | 1 +
 arch/arm/mach-tegra/tegra114/clock.c                  | 1 +
 arch/arm/mach-tegra/tegra114/cpu.c                    | 1 +
 arch/arm/mach-tegra/tegra124/clock.c                  | 1 +
 arch/arm/mach-tegra/tegra124/cpu.c                    | 1 +
 arch/arm/mach-tegra/tegra124/xusb-padctl.c            | 1 +
 arch/arm/mach-tegra/tegra20/clock.c                   | 1 +
 arch/arm/mach-tegra/tegra20/cpu.c                     | 1 +
 arch/arm/mach-tegra/tegra210/clock.c                  | 1 +
 arch/arm/mach-tegra/tegra210/xusb-padctl.c            | 1 +
 arch/arm/mach-tegra/tegra30/clock.c                   | 1 +
 arch/arm/mach-tegra/tegra30/cpu.c                     | 1 +
 arch/arm/mach-uniphier/clk/clk-ld11.c                 | 1 +
 arch/arm/mach-uniphier/clk/dpll-ld4.c                 | 1 +
 arch/arm/mach-uniphier/clk/dpll-pro4.c                | 1 +
 arch/arm/mach-uniphier/micro-support-card.c           | 1 +
 arch/arm/mach-zynqmp/mp.c                             | 1 +
 arch/arm/mach-zynqmp/psu_spl_init.c                   | 1 +
 arch/arm/mach-zynqmp/spl.c                            | 1 +
 arch/m68k/cpu/mcf5227x/cpu.c                          | 1 +
 arch/m68k/cpu/mcf52x2/cpu.c                           | 1 +
 arch/m68k/cpu/mcf52x2/speed.c                         | 1 +
 arch/m68k/cpu/mcf532x/cpu.c                           | 1 +
 arch/m68k/cpu/mcf5445x/cpu.c                          | 1 +
 arch/m68k/cpu/mcf5445x/pci.c                          | 1 +
 arch/m68k/cpu/mcf547x_8x/pci.c                        | 1 +
 arch/m68k/cpu/mcf547x_8x/slicetimer.c                 | 1 +
 arch/m68k/lib/time.c                                  | 1 +
 arch/microblaze/cpu/timer.c                           | 1 +
 arch/mips/mach-ath79/ar934x/clk.c                     | 1 +
 arch/mips/mach-ath79/ar934x/ddr.c                     | 1 +
 arch/mips/mach-ath79/qca953x/ddr.c                    | 1 +
 arch/mips/mach-ath79/qca956x/ddr.c                    | 1 +
 arch/mips/mach-ath79/reset.c                          | 1 +
 arch/mips/mach-jz47xx/jz4780/pll.c                    | 1 +
 arch/mips/mach-jz47xx/jz4780/sdram.c                  | 1 +
 arch/mips/mach-jz47xx/jz4780/timer.c                  | 1 +
 arch/mips/mach-mtmips/ddr_calibrate.c                 | 1 +
 arch/mips/mach-mtmips/ddr_init.c                      | 1 +
 arch/mips/mach-mtmips/mt7628/ddr.c                    | 1 +
 arch/nds32/cpu/n1213/ag101/timer.c                    | 1 +
 arch/powerpc/cpu/mpc83xx/cpu.c                        | 1 +
 arch/powerpc/cpu/mpc83xx/cpu_init.c                   | 1 +
 arch/powerpc/cpu/mpc83xx/pci.c                        | 1 +
 arch/powerpc/cpu/mpc83xx/pcie.c                       | 1 +
 arch/powerpc/cpu/mpc83xx/serdes.c                     | 1 +
 arch/powerpc/cpu/mpc83xx/spd_sdram.c                  | 1 +
 arch/powerpc/cpu/mpc85xx/cpu.c                        | 1 +
 arch/powerpc/cpu/mpc85xx/cpu_init.c                   | 1 +
 arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c        | 1 +
 arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c         | 1 +
 arch/powerpc/cpu/mpc85xx/mp.c                         | 1 +
 arch/powerpc/cpu/mpc85xx/p1021_serdes.c               | 1 +
 arch/powerpc/cpu/mpc85xx/spl_minimal.c                | 1 +
 arch/powerpc/cpu/mpc8xxx/srio.c                       | 1 +
 arch/powerpc/lib/time.c                               | 1 +
 arch/sandbox/cpu/cpu.c                                | 1 +
 arch/sh/lib/time_sh2.c                                | 1 +
 arch/x86/cpu/apollolake/punit.c                       | 1 +
 arch/x86/cpu/broadwell/cpu_full.c                     | 1 +
 arch/x86/cpu/broadwell/iobp.c                         | 1 +
 arch/x86/cpu/broadwell/me.c                           | 1 +
 arch/x86/cpu/broadwell/pch.c                          | 1 +
 arch/x86/cpu/broadwell/sata.c                         | 1 +
 arch/x86/cpu/ivybridge/bd82x6x.c                      | 1 +
 arch/x86/cpu/ivybridge/early_me.c                     | 1 +
 arch/x86/cpu/ivybridge/northbridge.c                  | 1 +
 arch/x86/cpu/mp_init.c                                | 1 +
 arch/x86/cpu/quark/quark.c                            | 1 +
 arch/x86/lib/pmu.c                                    | 1 +
 arch/x86/lib/scu.c                                    | 1 +
 arch/xtensa/lib/time.c                                | 1 +
 board/BuR/common/br_resetc.c                          | 1 +
 board/BuR/common/common.c                             | 1 +
 board/CZ.NIC/turris_mox/mox_sp.c                      | 1 +
 board/CZ.NIC/turris_mox/turris_mox.c                  | 1 +
 board/CarMediaLab/flea3/flea3.c                       | 1 +
 board/Marvell/gplugd/gplugd.c                         | 1 +
 board/Marvell/mvebu_armada-37xx/board.c               | 1 +
 board/Marvell/mvebu_armada-8k/board.c                 | 1 +
 board/Synology/ds109/ds109.c                          | 1 +
 board/advantech/dms-ba16/dms-ba16.c                   | 1 +
 board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c | 1 +
 board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c           | 1 +
 board/armadeus/apf27/fpga.c                           | 1 +
 board/armltd/integrator/pci.c                         | 1 +
 board/armltd/integrator/timer.c                       | 3 ++-
 board/armltd/vexpress64/pcie.c                        | 1 +
 board/astro/mcf5373l/mcf5373l.c                       | 1 +
 board/barco/platinum/platinum_picon.c                 | 1 +
 board/barco/platinum/platinum_titanium.c              | 1 +
 board/barco/titanium/titanium.c                       | 1 +
 board/beckhoff/mx53cx9020/mx53cx9020.c                | 1 +
 board/bluewater/gurnard/gurnard.c                     | 1 +
 board/bluewater/snapper9260/snapper9260.c             | 1 +
 board/bosch/shc/board.c                               | 1 +
 board/boundary/nitrogen6x/nitrogen6x.c                | 1 +
 board/bticino/mamoj/spl.c                             | 1 +
 board/buffalo/lsxl/lsxl.c                             | 1 +
 board/ccv/xpress/xpress.c                             | 1 +
 board/cobra5272/flash.c                               | 3 ++-
 board/compulab/cl-som-imx7/cl-som-imx7.c              | 1 +
 board/compulab/cm_fx6/cm_fx6.c                        | 1 +
 board/compulab/cm_fx6/spl.c                           | 1 +
 board/compulab/cm_t335/cm_t335.c                      | 1 +
 board/compulab/cm_t35/cm_t35.c                        | 1 +
 board/compulab/cm_t43/cm_t43.c                        | 1 +
 board/compulab/cm_t54/cm_t54.c                        | 1 +
 board/compulab/common/common.c                        | 1 +
 board/compulab/common/omap3_smc911x.c                 | 1 +
 board/congatec/cgtqmx6eval/cgtqmx6eval.c              | 1 +
 board/creative/xfi3/xfi3.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/dhelectronics/dh_imx6/dh_imx6_spl.c             | 1 +
 board/dhelectronics/dh_stm32mp1/board.c               | 1 +
 board/egnite/ethernut5/ethernut5_pwrman.c             | 1 +
 board/el/el6x/el6x.c                                  | 1 +
 board/embest/mx6boards/mx6boards.c                    | 1 +
 board/engicam/common/spl.c                            | 1 +
 board/esd/vme8349/pci.c                               | 1 +
 board/freescale/b4860qds/b4860qds.c                   | 1 +
 board/freescale/bsc9131rdb/spl_minimal.c              | 1 +
 board/freescale/bsc9132qds/spl_minimal.c              | 1 +
 board/freescale/c29xpcie/cpld.c                       | 1 +
 board/freescale/common/diu_ch7301.c                   | 1 +
 board/freescale/common/idt8t49n222a_serdes_clk.c      | 1 +
 board/freescale/common/sys_eeprom.c                   | 1 +
 board/freescale/common/vid.c                          | 1 +
 board/freescale/corenet_ds/eth_p4080.c                | 1 +
 board/freescale/imx8mq_evk/spl.c                      | 1 +
 board/freescale/imx8qxp_mek/imx8qxp_mek.c             | 1 +
 board/freescale/ls1012afrdm/eth.c                     | 1 +
 board/freescale/ls1012aqds/eth.c                      | 1 +
 board/freescale/ls1012ardb/eth.c                      | 1 +
 board/freescale/ls1021aiot/ls1021aiot.c               | 1 +
 board/freescale/ls1021aqds/ddr.c                      | 1 +
 board/freescale/ls1021atsn/ls1021atsn.c               | 1 +
 board/freescale/ls1021atwr/ls1021atwr.c               | 1 +
 board/freescale/ls1088a/eth_ls1088aqds.c              | 1 +
 board/freescale/ls1088a/ls1088a.c                     | 1 +
 board/freescale/ls2080aqds/eth.c                      | 1 +
 board/freescale/m5208evbe/m5208evbe.c                 | 1 +
 board/freescale/m52277evb/m52277evb.c                 | 1 +
 board/freescale/m5249evb/m5249evb.c                   | 1 +
 board/freescale/m5253demo/m5253demo.c                 | 1 +
 board/freescale/m53017evb/m53017evb.c                 | 1 +
 board/freescale/m5329evb/m5329evb.c                   | 1 +
 board/freescale/m5373evb/m5373evb.c                   | 1 +
 board/freescale/m54418twr/m54418twr.c                 | 1 +
 board/freescale/m54451evb/m54451evb.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/mpc8313erdb/sdram.c                   | 1 +
 board/freescale/mpc8315erdb/mpc8315erdb.c             | 1 +
 board/freescale/mpc8315erdb/sdram.c                   | 1 +
 board/freescale/mpc8323erdb/mpc8323erdb.c             | 1 +
 board/freescale/mpc832xemds/mpc832xemds.c             | 1 +
 board/freescale/mpc832xemds/pci.c                     | 1 +
 board/freescale/mpc8349emds/mpc8349emds.c             | 1 +
 board/freescale/mpc8349emds/pci.c                     | 1 +
 board/freescale/mpc8349itx/mpc8349itx.c               | 1 +
 board/freescale/mpc8349itx/pci.c                      | 1 +
 board/freescale/mpc837xemds/mpc837xemds.c             | 1 +
 board/freescale/mpc837xemds/pci.c                     | 1 +
 board/freescale/mpc837xerdb/mpc837xerdb.c             | 1 +
 board/freescale/mpc837xerdb/pci.c                     | 1 +
 board/freescale/mpc8536ds/mpc8536ds.c                 | 1 +
 board/freescale/mpc8541cds/mpc8541cds.c               | 1 +
 board/freescale/mpc8548cds/mpc8548cds.c               | 1 +
 board/freescale/mpc8555cds/mpc8555cds.c               | 1 +
 board/freescale/mpc8568mds/mpc8568mds.c               | 1 +
 board/freescale/mpc8569mds/mpc8569mds.c               | 1 +
 board/freescale/mpc8572ds/mpc8572ds.c                 | 1 +
 board/freescale/mpc8610hpcd/mpc8610hpcd.c             | 1 +
 board/freescale/mpc8641hpcn/mpc8641hpcn.c             | 1 +
 board/freescale/mx25pdk/mx25pdk.c                     | 1 +
 board/freescale/mx28evk/mx28evk.c                     | 1 +
 board/freescale/mx35pdk/mx35pdk.c                     | 1 +
 board/freescale/mx51evk/mx51evk.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/mx7dsabresd/mx7dsabresd.c             | 1 +
 board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c           | 1 +
 board/freescale/t102xqds/ddr.c                        | 1 +
 board/freescale/t102xrdb/ddr.c                        | 1 +
 board/freescale/t1040qds/ddr.c                        | 1 +
 board/freescale/t104xrdb/ddr.c                        | 1 +
 board/freescale/t4qds/t4240qds.c                      | 1 +
 board/gardena/smart-gateway-mt7688/board.c            | 1 +
 board/gateworks/gw_ventana/common.c                   | 1 +
 board/gateworks/gw_ventana/eeprom.c                   | 1 +
 board/gateworks/gw_ventana/gsc.c                      | 1 +
 board/gateworks/gw_ventana/gw_ventana.c               | 1 +
 board/gdsys/a38x/controlcenterdc.c                    | 1 +
 board/gdsys/a38x/ihs_phys.c                           | 1 +
 board/gdsys/common/cmd_ioloop.c                       | 1 +
 board/gdsys/common/ihs_mdio.c                         | 1 +
 board/gdsys/common/mclink.c                           | 1 +
 board/gdsys/mpc8308/hrcon.c                           | 1 +
 board/gdsys/mpc8308/mpc8308.c                         | 1 +
 board/gdsys/mpc8308/strider.c                         | 1 +
 board/gdsys/p1022/controlcenterd-id.c                 | 1 +
 board/gdsys/p1022/controlcenterd.c                    | 1 +
 board/ge/bx50v3/bx50v3.c                              | 1 +
 board/google/imx8mq_phanbell/spl.c                    | 1 +
 board/google/veyron/veyron.c                          | 1 +
 board/gumstix/duovero/duovero.c                       | 1 +
 board/highbank/ahci.c                                 | 1 +
 board/hisilicon/hikey/hikey.c                         | 1 +
 board/hisilicon/hikey960/hikey960.c                   | 1 +
 board/hisilicon/poplar/poplar.c                       | 1 +
 board/ids/ids8313/ids8313.c                           | 1 +
 board/imgtec/ci20/ci20.c                              | 1 +
 board/imgtec/malta/malta.c                            | 1 +
 board/inversepath/usbarmory/usbarmory.c               | 1 +
 board/isee/igep00x0/common.c                          | 1 +
 board/isee/igep00x0/igep00x0.c                        | 1 +
 board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c             | 1 +
 board/keymile/common/common.c                         | 1 +
 board/keymile/km83xx/km83xx.c                         | 1 +
 board/keymile/km83xx/km83xx_i2c.c                     | 1 +
 board/keymile/km_arm/fpga_config.c                    | 1 +
 board/keymile/kmp204x/pci.c                           | 1 +
 board/kosagi/novena/novena_spl.c                      | 1 +
 board/kosagi/novena/video.c                           | 1 +
 board/liebherr/display5/display5.c                    | 1 +
 board/liebherr/display5/spl.c                         | 1 +
 board/liebherr/mccmon6/spl.c                          | 1 +
 board/liebherr/xea/xea.c                              | 1 +
 board/mpc8308_p1m/mpc8308_p1m.c                       | 1 +
 board/mscc/jr2/jr2.c                                  | 1 +
 board/nvidia/cardhu/cardhu.c                          | 1 +
 board/nvidia/nyan-big/nyan-big.c                      | 1 +
 board/nvidia/venice2/as3722_init.c                    | 1 +
 board/olimex/mx23_olinuxino/mx23_olinuxino.c          | 1 +
 board/overo/overo.c                                   | 1 +
 board/pandora/pandora.c                               | 1 +
 board/phytec/pcm058/pcm058.c                          | 1 +
 board/phytec/pfla02/pfla02.c                          | 1 +
 board/ppcag/bg0900/bg0900.c                           | 1 +
 board/qualcomm/dragonboard410c/dragonboard410c.c      | 1 +
 board/renesas/alt/alt.c                               | 1 +
 board/renesas/gose/gose.c                             | 1 +
 board/renesas/koelsch/koelsch.c                       | 1 +
 board/renesas/lager/lager.c                           | 1 +
 board/renesas/porter/porter.c                         | 1 +
 board/renesas/sh7752evb/sh7752evb.c                   | 1 +
 board/renesas/sh7753evb/sh7753evb.c                   | 1 +
 board/renesas/silk/silk.c                             | 1 +
 board/renesas/stout/stout.c                           | 1 +
 board/samsung/common/board.c                          | 1 +
 board/samsung/common/exynos5-dt-types.c               | 1 +
 board/samsung/common/misc.c                           | 1 +
 board/samsung/goni/goni.c                             | 1 +
 board/samsung/trats/trats.c                           | 1 +
 board/samsung/trats2/trats2.c                         | 1 +
 board/samsung/universal_c210/universal.c              | 1 +
 board/sandisk/sansa_fuze_plus/sfp.c                   | 1 +
 board/sbc8349/pci.c                                   | 1 +
 board/sbc8349/sbc8349.c                               | 1 +
 board/sbc8548/ddr.c                                   | 1 +
 board/sbc8548/sbc8548.c                               | 1 +
 board/sbc8641d/sbc8641d.c                             | 1 +
 board/seco/mx6quq7/mx6quq7.c                          | 1 +
 board/siemens/capricorn/board.c                       | 1 +
 board/siemens/draco/board.c                           | 1 +
 board/siemens/rut/board.c                             | 1 +
 board/sks-kinkel/sksimx6/sksimx6.c                    | 1 +
 board/socrates/sdram.c                                | 1 +
 board/socrates/socrates.c                             | 1 +
 board/softing/vining_2000/vining_2000.c               | 1 +
 board/softing/vining_fpga/socfpga.c                   | 1 +
 board/solidrun/clearfog/clearfog.c                    | 1 +
 board/solidrun/mx6cuboxi/mx6cuboxi.c                  | 1 +
 board/spear/x600/fpga.c                               | 1 +
 board/sr1500/socfpga.c                                | 1 +
 board/st/stm32f746-disco/stm32f746-disco.c            | 1 +
 board/st/stm32mp1/board.c                             | 1 +
 board/st/stm32mp1/stm32mp1.c                          | 1 +
 board/sunxi/board.c                                   | 1 +
 board/synopsys/hsdk/hsdk.c                            | 1 +
 board/syteco/zmx25/zmx25.c                            | 1 +
 board/technexion/pico-imx6/pico-imx6.c                | 1 +
 board/technexion/pico-imx6/spl.c                      | 1 +
 board/technexion/pico-imx6ul/pico-imx6ul.c            | 1 +
 board/technologic/ts4600/ts4600.c                     | 1 +
 board/technologic/ts4800/ts4800.c                     | 1 +
 board/theadorable/theadorable.c                       | 1 +
 board/ti/am335x/board.c                               | 1 +
 board/ti/evm/evm.c                                    | 1 +
 board/ti/ks2_evm/board_k2g.c                          | 1 +
 board/ti/omap5_uevm/evm.c                             | 1 +
 board/timll/devkit3250/devkit3250.c                   | 1 +
 board/toradex/apalis-tk1/apalis-tk1.c                 | 1 +
 board/toradex/apalis-tk1/as3722_init.c                | 1 +
 board/toradex/apalis_imx6/apalis_imx6.c               | 1 +
 board/toradex/apalis_imx6/pf0100.c                    | 1 +
 board/toradex/apalis_t30/apalis_t30.c                 | 1 +
 board/toradex/colibri-imx6ull/colibri-imx6ull.c       | 1 +
 board/toradex/colibri_imx6/colibri_imx6.c             | 1 +
 board/toradex/colibri_imx6/pf0100.c                   | 1 +
 board/toradex/colibri_imx7/colibri_imx7.c             | 1 +
 board/toradex/colibri_pxa270/colibri_pxa270.c         | 1 +
 board/toradex/colibri_t20/colibri_t20.c               | 1 +
 board/toradex/colibri_t30/colibri_t30.c               | 1 +
 board/tplink/wdr4300/wdr4300.c                        | 1 +
 board/tqc/tqm834x/pci.c                               | 1 +
 board/tqc/tqm834x/tqm834x.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/udoo/udoo_spl.c                                 | 1 +
 board/varisys/common/sys_eeprom.c                     | 1 +
 board/ve8313/ve8313.c                                 | 1 +
 board/wandboard/spl.c                                 | 1 +
 board/wandboard/wandboard.c                           | 1 +
 board/work-microwave/work_92105/work_92105.c          | 1 +
 board/work-microwave/work_92105/work_92105_display.c  | 1 +
 board/xilinx/zynqmp/tap_delays.c                      | 1 +
 board/xilinx/zynqmp/xil_io.h                          | 1 +
 board/xilinx/zynqmp/zynqmp.c                          | 2 ++
 cmd/bootmenu.c                                        | 1 +
 cmd/conitrace.c                                       | 1 +
 cmd/eeprom.c                                          | 1 +
 cmd/i2c.c                                             | 1 +
 cmd/load.c                                            | 1 +
 cmd/mem.c                                             | 1 +
 cmd/misc.c                                            | 1 +
 cmd/usb_mass_storage.c                                | 1 +
 common/autoboot.c                                     | 1 +
 common/console.c                                      | 1 +
 common/miiphyutil.c                                   | 1 +
 common/usb.c                                          | 1 +
 common/usb_hub.c                                      | 1 +
 common/usb_storage.c                                  | 1 +
 drivers/adc/adc-uclass.c                              | 1 +
 drivers/adc/meson-saradc.c                            | 1 +
 drivers/adc/stm32-adc.c                               | 1 +
 drivers/ata/ahci.c                                    | 1 +
 drivers/ata/ahci_sunxi.c                              | 1 +
 drivers/ata/dwc_ahsata.c                              | 1 +
 drivers/ata/fsl_sata.c                                | 1 +
 drivers/ata/mvsata_ide.c                              | 1 +
 drivers/ata/sata_mv.c                                 | 1 +
 drivers/ata/sata_sil.c                                | 1 +
 drivers/ata/sata_sil3114.c                            | 1 +
 drivers/axi/ihs_axi.c                                 | 1 +
 drivers/bios_emulator/atibios.c                       | 1 +
 drivers/block/ide.c                                   | 1 +
 drivers/clk/aspeed/clk_ast2500.c                      | 1 +
 drivers/clk/clk-hsdk-cgu.c                            | 1 +
 drivers/clk/imx/clk-pll14xx.c                         | 1 +
 drivers/clk/mediatek/clk-mtk.c                        | 1 +
 drivers/clk/meson/g12a.c                              | 1 +
 drivers/clk/owl/clk_owl.c                             | 1 +
 drivers/clk/rockchip/clk_pll.c                        | 1 +
 drivers/clk/rockchip/clk_px30.c                       | 1 +
 drivers/clk/rockchip/clk_rk3036.c                     | 1 +
 drivers/clk/rockchip/clk_rk3128.c                     | 1 +
 drivers/clk/rockchip/clk_rk3188.c                     | 1 +
 drivers/clk/rockchip/clk_rk322x.c                     | 1 +
 drivers/clk/rockchip/clk_rk3288.c                     | 1 +
 drivers/clk/rockchip/clk_rk3328.c                     | 1 +
 drivers/clk/rockchip/clk_rk3368.c                     | 1 +
 drivers/clk/rockchip/clk_rk3399.c                     | 1 +
 drivers/clk/rockchip/clk_rv1108.c                     | 1 +
 drivers/clk/sifive/fu540-prci.c                       | 1 +
 drivers/ddr/altera/sdram_arria10.c                    | 1 +
 drivers/ddr/fsl/arm_ddr_gen3.c                        | 1 +
 drivers/ddr/fsl/fsl_ddr_gen4.c                        | 1 +
 drivers/ddr/fsl/fsl_mmdc.c                            | 1 +
 drivers/ddr/fsl/mpc85xx_ddr_gen1.c                    | 1 +
 drivers/ddr/fsl/mpc85xx_ddr_gen2.c                    | 1 +
 drivers/ddr/fsl/mpc85xx_ddr_gen3.c                    | 1 +
 drivers/ddr/fsl/mpc86xx_ddr.c                         | 1 +
 drivers/ddr/fsl/util.c                                | 1 +
 drivers/ddr/marvell/a38x/ddr3_training.c              | 1 +
 drivers/ddr/marvell/a38x/ddr3_training_ip_engine.c    | 1 +
 drivers/ddr/marvell/a38x/ddr3_training_leveling.c     | 1 +
 drivers/ddr/marvell/a38x/mv_ddr_plat.c                | 1 +
 drivers/ddr/marvell/axp/ddr3_dfs.c                    | 1 +
 drivers/ddr/marvell/axp/ddr3_hw_training.c            | 1 +
 drivers/ddr/marvell/axp/ddr3_init.c                   | 1 +
 drivers/ddr/marvell/axp/ddr3_pbs.c                    | 1 +
 drivers/ddr/marvell/axp/ddr3_write_leveling.c         | 1 +
 drivers/dma/bcm6348-iudma.c                           | 1 +
 drivers/dma/keystone_nav.c                            | 1 +
 drivers/dma/lpc32xx_dma.c                             | 1 +
 drivers/firmware/psci.c                               | 1 +
 drivers/fpga/ACEX1K.c                                 | 1 +
 drivers/fpga/cyclon2.c                                | 1 +
 drivers/fpga/lattice.c                                | 1 +
 drivers/fpga/socfpga_arria10.c                        | 1 +
 drivers/fpga/stratix10.c                              | 1 +
 drivers/fpga/stratixII.c                              | 1 +
 drivers/fpga/stratixv.c                               | 1 +
 drivers/fpga/virtex2.c                                | 1 +
 drivers/fpga/zynqpl.c                                 | 1 +
 drivers/i2c/ast_i2c.c                                 | 1 +
 drivers/i2c/davinci_i2c.c                             | 1 +
 drivers/i2c/designware_i2c.c                          | 1 +
 drivers/i2c/exynos_hs_i2c.c                           | 1 +
 drivers/i2c/fsl_i2c.c                                 | 1 +
 drivers/i2c/i2c-cdns.c                                | 1 +
 drivers/i2c/i2c-gpio.c                                | 1 +
 drivers/i2c/i2c-uclass.c                              | 1 +
 drivers/i2c/i2c-versatile.c                           | 1 +
 drivers/i2c/ihs_i2c.c                                 | 1 +
 drivers/i2c/kona_i2c.c                                | 1 +
 drivers/i2c/meson_i2c.c                               | 1 +
 drivers/i2c/muxes/i2c-arb-gpio-challenge.c            | 1 +
 drivers/i2c/mv_i2c.c                                  | 1 +
 drivers/i2c/mvtwsi.c                                  | 1 +
 drivers/i2c/mxc_i2c.c                                 | 1 +
 drivers/i2c/omap24xx_i2c.c                            | 1 +
 drivers/i2c/rcar_i2c.c                                | 1 +
 drivers/i2c/rcar_iic.c                                | 1 +
 drivers/i2c/rk_i2c.c                                  | 1 +
 drivers/i2c/sh_i2c.c                                  | 1 +
 drivers/i2c/soft_i2c.c                                | 1 +
 drivers/i2c/stm32f7_i2c.c                             | 1 +
 drivers/i2c/tegra_i2c.c                               | 1 +
 drivers/input/i8042.c                                 | 1 +
 drivers/input/tegra-kbc.c                             | 1 +
 drivers/led/led_bcm6358.c                             | 1 +
 drivers/misc/atsha204a-i2c.c                          | 1 +
 drivers/misc/cros_ec.c                                | 1 +
 drivers/misc/ds4510.c                                 | 1 +
 drivers/misc/fsl_iim.c                                | 1 +
 drivers/misc/fsl_sec_mon.c                            | 1 +
 drivers/misc/i2c_eeprom.c                             | 1 +
 drivers/misc/ihs_fpga.c                               | 1 +
 drivers/misc/mpc83xx_serdes.c                         | 1 +
 drivers/misc/mxc_ocotp.c                              | 1 +
 drivers/misc/mxs_ocotp.c                              | 1 +
 drivers/mmc/arm_pl180_mmci.c                          | 1 +
 drivers/mmc/bcm2835_sdhost.c                          | 1 +
 drivers/mmc/davinci_mmc.c                             | 1 +
 drivers/mmc/dw_mmc.c                                  | 1 +
 drivers/mmc/fsl_esdhc.c                               | 1 +
 drivers/mmc/fsl_esdhc_imx.c                           | 1 +
 drivers/mmc/gen_atmel_mci.c                           | 1 +
 drivers/mmc/iproc_sdhci.c                             | 1 +
 drivers/mmc/jz_mmc.c                                  | 1 +
 drivers/mmc/kona_sdhci.c                              | 1 +
 drivers/mmc/meson_gx_mmc.c                            | 1 +
 drivers/mmc/mmc.c                                     | 1 +
 drivers/mmc/mxsmmc.c                                  | 1 +
 drivers/mmc/omap_hsmmc.c                              | 1 +
 drivers/mmc/pxa_mmc_gen.c                             | 1 +
 drivers/mmc/renesas-sdhi.c                            | 1 +
 drivers/mmc/rockchip_dw_mmc.c                         | 1 +
 drivers/mmc/sdhci.c                                   | 1 +
 drivers/mmc/sh_mmcif.c                                | 1 +
 drivers/mmc/sh_sdhi.c                                 | 1 +
 drivers/mmc/stm32_sdmmc2.c                            | 1 +
 drivers/mmc/sunxi_mmc.c                               | 1 +
 drivers/mmc/tegra_mmc.c                               | 1 +
 drivers/mmc/tmio-common.c                             | 1 +
 drivers/mmc/xenon_sdhci.c                             | 1 +
 drivers/mmc/zynq_sdhci.c                              | 1 +
 drivers/mtd/cfi_flash.c                               | 1 +
 drivers/mtd/mw_eeprom.c                               | 1 +
 drivers/mtd/nand/raw/am335x_spl_bch.c                 | 1 +
 drivers/mtd/nand/raw/arasan_nfc.c                     | 1 +
 drivers/mtd/nand/raw/atmel_nand.c                     | 1 +
 drivers/mtd/nand/raw/denali_spl.c                     | 1 +
 drivers/mtd/nand/raw/fsl_upm.c                        | 1 +
 drivers/mtd/nand/raw/kmeter1_nand.c                   | 1 +
 drivers/mtd/nand/raw/lpc32xx_nand_mlc.c               | 1 +
 drivers/mtd/nand/raw/mxc_nand.c                       | 1 +
 drivers/mtd/nand/raw/mxs_nand_spl.c                   | 1 +
 drivers/mtd/nand/raw/nand_base.c                      | 1 +
 drivers/mtd/nand/raw/pxa3xx_nand.c                    | 1 +
 drivers/mtd/nand/raw/stm32_fmc2_nand.c                | 1 +
 drivers/mtd/nand/raw/sunxi_nand.c                     | 1 +
 drivers/mtd/nand/raw/sunxi_nand_spl.c                 | 1 +
 drivers/mtd/nand/raw/tegra_nand.c                     | 1 +
 drivers/mtd/nand/raw/zynq_nand.c                      | 1 +
 drivers/mtd/spi/sf_dataflash.c                        | 1 +
 drivers/mtd/st_smi.c                                  | 1 +
 drivers/net/ag7xxx.c                                  | 1 +
 drivers/net/armada100_fec.c                           | 1 +
 drivers/net/at91_emac.c                               | 1 +
 drivers/net/ax88180.c                                 | 1 +
 drivers/net/ax88796.c                                 | 1 +
 drivers/net/bcm-sf2-eth-gmac.c                        | 1 +
 drivers/net/bcm-sf2-eth.c                             | 1 +
 drivers/net/bcm6368-eth.c                             | 1 +
 drivers/net/bcmgenet.c                                | 1 +
 drivers/net/calxedaxgmac.c                            | 1 +
 drivers/net/cs8900.c                                  | 1 +
 drivers/net/dc2114x.c                                 | 1 +
 drivers/net/designware.c                              | 1 +
 drivers/net/dm9000x.c                                 | 1 +
 drivers/net/dnet.c                                    | 1 +
 drivers/net/dwc_eth_qos.c                             | 1 +
 drivers/net/e1000.c                                   | 1 +
 drivers/net/e1000_spi.c                               | 1 +
 drivers/net/eepro100.c                                | 1 +
 drivers/net/fec_mxc.c                                 | 1 +
 drivers/net/fm/dtsec.c                                | 1 +
 drivers/net/fm/eth.c                                  | 1 +
 drivers/net/fm/tgec.c                                 | 1 +
 drivers/net/fsl-mc/mc.c                               | 1 +
 drivers/net/fsl-mc/mc_sys.c                           | 1 +
 drivers/net/fsl_enetc.c                               | 1 +
 drivers/net/fsl_mcdmafec.c                            | 1 +
 drivers/net/ftmac100.c                                | 1 +
 drivers/net/higmacv300.c                              | 1 +
 drivers/net/ks8851_mll.c                              | 1 +
 drivers/net/lan91c96.c                                | 1 +
 drivers/net/ldpaa_eth/ldpaa_eth.c                     | 1 +
 drivers/net/lpc32xx_eth.c                             | 1 +
 drivers/net/macb.c                                    | 1 +
 drivers/net/mcffec.c                                  | 1 +
 drivers/net/mcfmii.c                                  | 1 +
 drivers/net/mpc8xx_fec.c                              | 1 +
 drivers/net/mscc_eswitch/jr2_switch.c                 | 1 +
 drivers/net/mscc_eswitch/mscc_xfer.c                  | 1 +
 drivers/net/mt7628-eth.c                              | 1 +
 drivers/net/mtk_eth.c                                 | 1 +
 drivers/net/mvgbe.c                                   | 1 +
 drivers/net/mvneta.c                                  | 1 +
 drivers/net/mvpp2.c                                   | 1 +
 drivers/net/natsemi.c                                 | 1 +
 drivers/net/ne2000.c                                  | 1 +
 drivers/net/ne2000_base.h                             | 1 +
 drivers/net/ns8382x.c                                 | 1 +
 drivers/net/pch_gbe.c                                 | 1 +
 drivers/net/pcnet.c                                   | 1 +
 drivers/net/pfe_eth/pfe_cmd.c                         | 1 +
 drivers/net/pfe_eth/pfe_driver.c                      | 1 +
 drivers/net/pfe_eth/pfe_eth.c                         | 1 +
 drivers/net/pfe_eth/pfe_mdio.c                        | 1 +
 drivers/net/phy/aquantia.c                            | 1 +
 drivers/net/phy/b53.c                                 | 1 +
 drivers/net/phy/broadcom.c                            | 1 +
 drivers/net/phy/cortina.c                             | 1 +
 drivers/net/phy/marvell.c                             | 1 +
 drivers/net/phy/mv88e61xx.c                           | 1 +
 drivers/net/phy/mv88e6352.c                           | 1 +
 drivers/net/phy/phy.c                                 | 1 +
 drivers/net/phy/realtek.c                             | 1 +
 drivers/net/phy/teranetics.c                          | 1 +
 drivers/net/pic32_eth.c                               | 1 +
 drivers/net/pic32_mdio.c                              | 1 +
 drivers/net/ravb.c                                    | 1 +
 drivers/net/rtl8139.c                                 | 1 +
 drivers/net/rtl8169.c                                 | 1 +
 drivers/net/sh_eth.c                                  | 1 +
 drivers/net/smc91111.c                                | 1 +
 drivers/net/smc911x.c                                 | 1 +
 drivers/net/sni_ave.c                                 | 1 +
 drivers/net/sun8i_emac.c                              | 1 +
 drivers/net/sunxi_emac.c                              | 1 +
 drivers/net/ti/cpsw_mdio.c                            | 1 +
 drivers/net/ti/davinci_emac.c                         | 1 +
 drivers/net/ti/keystone_net.c                         | 1 +
 drivers/net/tsec.c                                    | 1 +
 drivers/net/uli526x.c                                 | 1 +
 drivers/net/vsc7385.c                                 | 1 +
 drivers/net/vsc9953.c                                 | 1 +
 drivers/net/xilinx_axi_emac.c                         | 1 +
 drivers/net/xilinx_emaclite.c                         | 1 +
 drivers/pci/fsl_pci_init.c                            | 1 +
 drivers/pci/pci-aardvark.c                            | 1 +
 drivers/pci/pci-uclass.c                              | 1 +
 drivers/pci/pci.c                                     | 1 +
 drivers/pci/pci_sh4.c                                 | 1 +
 drivers/pci/pci_sh7751.c                              | 1 +
 drivers/pci/pci_sh7780.c                              | 1 +
 drivers/pci/pci_tegra.c                               | 1 +
 drivers/pci/pcie_dw_mvebu.c                           | 1 +
 drivers/pci/pcie_dw_ti.c                              | 1 +
 drivers/pci/pcie_fsl.c                                | 1 +
 drivers/pci/pcie_imx.c                                | 1 +
 drivers/pci/pcie_intel_fpga.c                         | 1 +
 drivers/phy/allwinner/phy-sun4i-usb.c                 | 1 +
 drivers/phy/bcm6318-usbh-phy.c                        | 1 +
 drivers/phy/bcm6368-usbh-phy.c                        | 1 +
 drivers/phy/keystone-usb-phy.c                        | 1 +
 drivers/phy/marvell/comphy_a3700.c                    | 1 +
 drivers/phy/marvell/comphy_cp110.c                    | 1 +
 drivers/phy/meson-g12a-usb2.c                         | 1 +
 drivers/phy/meson-g12a-usb3-pcie.c                    | 1 +
 drivers/phy/meson-gxl-usb2.c                          | 1 +
 drivers/phy/mt76x8-usb-phy.c                          | 1 +
 drivers/phy/phy-mtk-tphy.c                            | 1 +
 drivers/phy/phy-rcar-gen2.c                           | 1 +
 drivers/phy/phy-stm32-usbphyc.c                       | 1 +
 drivers/phy/phy-ti-am654.c                            | 1 +
 drivers/phy/ti-pipe3-phy.c                            | 1 +
 drivers/pinctrl/pinctrl-stmfx.c                       | 1 +
 drivers/power/axp209.c                                | 1 +
 drivers/power/battery/bat_trats.c                     | 1 +
 drivers/power/domain/meson-ee-pwrc.c                  | 1 +
 drivers/power/domain/meson-gx-pwrc-vpu.c              | 1 +
 drivers/power/fuel_gauge/fg_max17042.c                | 1 +
 drivers/power/mt6323.c                                | 1 +
 drivers/power/pmic/pmic_hi6553.c                      | 1 +
 drivers/power/regulator/pbias_regulator.c             | 1 +
 drivers/power/regulator/regulator-uclass.c            | 1 +
 drivers/power/regulator/regulator_common.c            | 1 +
 drivers/power/regulator/s2mps11_regulator.c           | 1 +
 drivers/power/regulator/stpmic1.c                     | 1 +
 drivers/power/regulator/tps65090_regulator.c          | 1 +
 drivers/power/regulator/tps65941_regulator.c          | 1 +
 drivers/power/tps6586x.c                              | 1 +
 drivers/power/twl4030.c                               | 1 +
 drivers/power/twl6030.c                               | 1 +
 drivers/qe/uec.c                                      | 1 +
 drivers/qe/uec_phy.c                                  | 1 +
 drivers/ram/imxrt_sdram.c                             | 1 +
 drivers/ram/mediatek/ddr3-mt7629.c                    | 1 +
 drivers/ram/rockchip/dmc-rk3368.c                     | 1 +
 drivers/ram/rockchip/sdram_pctl_px30.c                | 1 +
 drivers/ram/rockchip/sdram_phy_px30.c                 | 1 +
 drivers/ram/rockchip/sdram_px30.c                     | 1 +
 drivers/ram/rockchip/sdram_rk3188.c                   | 1 +
 drivers/ram/rockchip/sdram_rk322x.c                   | 1 +
 drivers/ram/rockchip/sdram_rk3288.c                   | 1 +
 drivers/ram/rockchip/sdram_rk3328.c                   | 1 +
 drivers/ram/rockchip/sdram_rk3399.c                   | 1 +
 drivers/ram/stm32_sdram.c                             | 1 +
 drivers/ram/stm32mp1/stm32mp1_ddr.c                   | 1 +
 drivers/ram/stm32mp1/stm32mp1_tuning.c                | 1 +
 drivers/reset/reset-bcm6345.c                         | 1 +
 drivers/reset/reset-imx7.c                            | 1 +
 drivers/rng/stm32mp1_rng.c                            | 1 +
 drivers/rtc/davinci.c                                 | 1 +
 drivers/rtc/ds1302.c                                  | 1 +
 drivers/rtc/ds1306.c                                  | 1 +
 drivers/rtc/imxdi.c                                   | 1 +
 drivers/rtc/max6900.c                                 | 1 +
 drivers/rtc/mvrtc.c                                   | 1 +
 drivers/rtc/rv3029.c                                  | 1 +
 drivers/rtc/s35392a.c                                 | 1 +
 drivers/serial/atmel_usart.c                          | 1 +
 drivers/serial/serial-uclass.c                        | 1 +
 drivers/serial/serial.c                               | 1 +
 drivers/serial/serial_sh.c                            | 1 +
 drivers/serial/serial_stm32.c                         | 1 +
 drivers/sound/hda_codec.c                             | 1 +
 drivers/sound/max98090.c                              | 1 +
 drivers/sound/sound-uclass.c                          | 1 +
 drivers/spi/cadence_qspi_apb.c                        | 1 +
 drivers/spi/davinci_spi.c                             | 1 +
 drivers/spi/exynos_spi.c                              | 1 +
 drivers/spi/fsl_dspi.c                                | 1 +
 drivers/spi/fsl_espi.c                                | 1 +
 drivers/spi/fsl_qspi.c                                | 1 +
 drivers/spi/ich.c                                     | 1 +
 drivers/spi/mpc8xx_spi.c                              | 1 +
 drivers/spi/mpc8xxx_spi.c                             | 1 +
 drivers/spi/mxc_spi.c                                 | 1 +
 drivers/spi/rk_spi.c                                  | 1 +
 drivers/spi/sh_spi.c                                  | 1 +
 drivers/spi/soft_spi.c                                | 1 +
 drivers/spi/stm32_qspi.c                              | 1 +
 drivers/spi/stm32_spi.c                               | 1 +
 drivers/spi/tegra114_spi.c                            | 1 +
 drivers/spi/tegra20_sflash.c                          | 1 +
 drivers/spi/tegra20_slink.c                           | 1 +
 drivers/spi/tegra210_qspi.c                           | 1 +
 drivers/spi/uniphier_spi.c                            | 1 +
 drivers/spi/zynq_spi.c                                | 1 +
 drivers/sysreset/sysreset-uclass.c                    | 1 +
 drivers/sysreset/sysreset_mpc83xx.c                   | 1 +
 drivers/thermal/imx_scu_thermal.c                     | 1 +
 drivers/thermal/imx_thermal.c                         | 1 +
 drivers/timer/tsc_timer.c                             | 1 +
 drivers/tpm/cr50_i2c.c                                | 1 +
 drivers/tpm/tpm-uclass.c                              | 1 +
 drivers/tpm/tpm2_tis_spi.c                            | 1 +
 drivers/tpm/tpm_atmel_twi.c                           | 1 +
 drivers/tpm/tpm_tis_infineon.c                        | 1 +
 drivers/tpm/tpm_tis_lpc.c                             | 1 +
 drivers/tpm/tpm_tis_st33zp24_i2c.c                    | 1 +
 drivers/tpm/tpm_tis_st33zp24_spi.c                    | 1 +
 drivers/ufs/ufs.c                                     | 1 +
 drivers/usb/cdns3/ep0.c                               | 1 +
 drivers/usb/cdns3/gadget.c                            | 1 +
 drivers/usb/dwc3/core.c                               | 1 +
 drivers/usb/dwc3/dwc3-meson-g12a.c                    | 1 +
 drivers/usb/dwc3/gadget.c                             | 1 +
 drivers/usb/dwc3/samsung_usb_phy.c                    | 1 +
 drivers/usb/dwc3/ti_usb_phy.c                         | 1 +
 drivers/usb/eth/asix.c                                | 1 +
 drivers/usb/eth/asix88179.c                           | 1 +
 drivers/usb/eth/mcs7830.c                             | 1 +
 drivers/usb/eth/r8152.c                               | 1 +
 drivers/usb/eth/r8152_fw.c                            | 1 +
 drivers/usb/eth/smsc95xx.c                            | 1 +
 drivers/usb/gadget/bcm_udc_otg_phy.c                  | 1 +
 drivers/usb/gadget/ci_udc.c                           | 1 +
 drivers/usb/gadget/designware_udc.c                   | 1 +
 drivers/usb/gadget/dwc2_udc_otg.c                     | 1 +
 drivers/usb/gadget/dwc2_udc_otg_phy.c                 | 1 +
 drivers/usb/gadget/f_thor.c                           | 1 +
 drivers/usb/gadget/fotg210.c                          | 1 +
 drivers/usb/gadget/pxa25x_udc.c                       | 1 +
 drivers/usb/gadget/pxa27x_udc.c                       | 1 +
 drivers/usb/host/dwc2.c                               | 1 +
 drivers/usb/host/ehci-exynos.c                        | 1 +
 drivers/usb/host/ehci-faraday.c                       | 1 +
 drivers/usb/host/ehci-fsl.c                           | 1 +
 drivers/usb/host/ehci-hcd.c                           | 1 +
 drivers/usb/host/ehci-marvell.c                       | 1 +
 drivers/usb/host/ehci-mx5.c                           | 1 +
 drivers/usb/host/ehci-mx6.c                           | 1 +
 drivers/usb/host/ehci-mxc.c                           | 1 +
 drivers/usb/host/ehci-mxs.c                           | 1 +
 drivers/usb/host/ehci-omap.c                          | 1 +
 drivers/usb/host/ehci-rmobile.c                       | 1 +
 drivers/usb/host/ehci-spear.c                         | 1 +
 drivers/usb/host/ehci-tegra.c                         | 1 +
 drivers/usb/host/ehci-vf.c                            | 1 +
 drivers/usb/host/ohci-hcd.c                           | 1 +
 drivers/usb/host/r8a66597-hcd.c                       | 1 +
 drivers/usb/host/sl811-hcd.c                          | 1 +
 drivers/usb/host/utmi-armada100.c                     | 1 +
 drivers/usb/host/xhci-dwc3.c                          | 1 +
 drivers/usb/host/xhci-exynos5.c                       | 1 +
 drivers/usb/host/xhci.c                               | 1 +
 drivers/usb/musb-new/am35x.c                          | 1 +
 drivers/usb/musb-new/da8xx.c                          | 1 +
 drivers/usb/musb-new/linux-compat.h                   | 1 +
 drivers/usb/musb-new/mt85xx.c                         | 1 +
 drivers/usb/musb-new/musb_uboot.c                     | 1 +
 drivers/usb/musb-new/pic32.c                          | 1 +
 drivers/usb/musb-new/sunxi.c                          | 1 +
 drivers/usb/musb/am35x.c                              | 1 +
 drivers/usb/musb/musb_hcd.c                           | 1 +
 drivers/usb/musb/musb_udc.c                           | 1 +
 drivers/usb/phy/omap_usb_phy.c                        | 1 +
 drivers/usb/phy/rockchip_usb2_phy.c                   | 1 +
 drivers/usb/phy/twl4030.c                             | 1 +
 drivers/usb/ulpi/omap-ulpi-viewport.c                 | 1 +
 drivers/usb/ulpi/ulpi-viewport.c                      | 1 +
 drivers/usb/ulpi/ulpi.c                               | 1 +
 drivers/video/am335x-fb.c                             | 1 +
 drivers/video/anx9804.c                               | 1 +
 drivers/video/ati_radeon_fb.c                         | 1 +
 drivers/video/atmel_lcdfb.c                           | 1 +
 drivers/video/bridge/anx6345.c                        | 1 +
 drivers/video/bridge/ps862x.c                         | 1 +
 drivers/video/bridge/video-bridge-uclass.c            | 1 +
 drivers/video/broadwell_igd.c                         | 1 +
 drivers/video/da8xx-fb.c                              | 1 +
 drivers/video/dw_hdmi.c                               | 1 +
 drivers/video/dw_mipi_dsi.c                           | 1 +
 drivers/video/exynos/exynos_dp.c                      | 1 +
 drivers/video/exynos/exynos_dp_lowlevel.c             | 1 +
 drivers/video/exynos/exynos_mipi_dsi_common.c         | 1 +
 drivers/video/exynos/exynos_mipi_dsi_lowlevel.c       | 1 +
 drivers/video/formike.c                               | 1 +
 drivers/video/hitachi_tx18d42vm_lcd.c                 | 1 +
 drivers/video/imx/ipu_common.c                        | 1 +
 drivers/video/imx/ipu_disp.c                          | 1 +
 drivers/video/ivybridge_igd.c                         | 1 +
 drivers/video/ld9040.c                                | 1 +
 drivers/video/lg4573.c                                | 1 +
 drivers/video/logicore_dp_tx.c                        | 1 +
 drivers/video/mali_dp.c                               | 1 +
 drivers/video/mb862xx.c                               | 1 +
 drivers/video/mvebu_lcd.c                             | 1 +
 drivers/video/mx3fb.c                                 | 1 +
 drivers/video/mxsfb.c                                 | 1 +
 drivers/video/orisetech_otm8009a.c                    | 1 +
 drivers/video/pwm_backlight.c                         | 1 +
 drivers/video/raydium-rm68200.c                       | 1 +
 drivers/video/rockchip/rk3288_vop.c                   | 1 +
 drivers/video/rockchip/rk_edp.c                       | 1 +
 drivers/video/s6e8ax0.c                               | 1 +
 drivers/video/scf0403_lcd.c                           | 1 +
 drivers/video/ssd2828.c                               | 1 +
 drivers/video/sunxi/lcdc.c                            | 1 +
 drivers/video/sunxi/sunxi_display.c                   | 1 +
 drivers/video/sunxi/sunxi_dw_hdmi.c                   | 1 +
 drivers/video/tda19988.c                              | 1 +
 drivers/video/tegra124/display.c                      | 1 +
 drivers/video/tegra124/dp.c                           | 1 +
 drivers/video/tegra124/sor.c                          | 1 +
 drivers/virtio/virtio_pci_modern.c                    | 1 +
 drivers/w1/mxc_w1.c                                   | 1 +
 drivers/w1/w1-gpio.c                                  | 1 +
 examples/api/libgenwrap.c                             | 1 +
 examples/standalone/atmel_df_pow2.c                   | 1 +
 examples/standalone/smc91111_eeprom.c                 | 1 +
 include/common.h                                      | 1 -
 include/configs/MPC8560ADS.h                          | 2 ++
 include/configs/km/km_arm.h                           | 1 +
 include/exports.h                                     | 1 +
 include/regmap.h                                      | 2 ++
 include/xyzModem.h                                    | 2 ++
 lib/panic.c                                           | 1 +
 lib/time.c                                            | 1 +
 net/arp.c                                             | 1 +
 net/bootp.c                                           | 1 +
 test/time_ut.c                                        | 1 +
 889 files changed, 895 insertions(+), 4 deletions(-)

diff --git a/api/api.c b/api/api.c
index 4fc451a83d..c7f5db776a 100644
--- a/api/api.c
+++ b/api/api.c
@@ -11,6 +11,7 @@
 #include <env.h>
 #include <malloc.h>
 #include <env_internal.h>
+#include <linux/delay.h>
 #include <linux/types.h>
 #include <api_public.h>
 #include <u-boot/crc.h>
diff --git a/arch/arm/cpu/arm920t/ep93xx/timer.c b/arch/arm/cpu/arm920t/ep93xx/timer.c
index 0ee6034220..892bb06db1 100644
--- a/arch/arm/cpu/arm920t/ep93xx/timer.c
+++ b/arch/arm/cpu/arm920t/ep93xx/timer.c
@@ -14,6 +14,7 @@
 #include <common.h>
 #include <init.h>
 #include <time.h>
+#include <linux/delay.h>
 #include <linux/types.h>
 #include <asm/arch/ep93xx.h>
 #include <asm/io.h>
diff --git a/arch/arm/cpu/arm920t/imx/timer.c b/arch/arm/cpu/arm920t/imx/timer.c
index 21129a7901..e9d5577921 100644
--- a/arch/arm/cpu/arm920t/imx/timer.c
+++ b/arch/arm/cpu/arm920t/imx/timer.c
@@ -18,6 +18,7 @@
 #if defined (CONFIG_IMX)
 
 #include <asm/arch/imx-regs.h>
+#include <linux/delay.h>
 
 int timer_init (void)
 {
@@ -48,7 +49,7 @@ ulong get_timer (ulong base)
 	return get_timer_masked() - base;
 }
 
-void __udelay (unsigned long usec)
+void __udelay(unsigned long usec)
 {
 	ulong endtime = get_timer_masked() + usec;
 	signed long diff;
diff --git a/arch/arm/cpu/arm926ejs/armada100/timer.c b/arch/arm/cpu/arm926ejs/armada100/timer.c
index b9941fcb2f..0f1e68c835 100644
--- a/arch/arm/cpu/arm926ejs/armada100/timer.c
+++ b/arch/arm/cpu/arm926ejs/armada100/timer.c
@@ -12,6 +12,7 @@
 #include <time.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/armada100.h>
+#include <linux/delay.h>
 
 /*
  * Timer registers
diff --git a/arch/arm/cpu/arm926ejs/lpc32xx/dram.c b/arch/arm/cpu/arm926ejs/lpc32xx/dram.c
index 4f975694fd..1602237923 100644
--- a/arch/arm/cpu/arm926ejs/lpc32xx/dram.c
+++ b/arch/arm/cpu/arm926ejs/lpc32xx/dram.c
@@ -17,6 +17,7 @@
 #include <asm/arch/wdt.h>
 #include <asm/arch/emc.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 static struct clk_pm_regs *clk = (struct clk_pm_regs *)CLK_PM_BASE;
 static struct emc_regs *emc = (struct emc_regs *)EMC_BASE;
diff --git a/arch/arm/cpu/arm926ejs/lpc32xx/timer.c b/arch/arm/cpu/arm926ejs/lpc32xx/timer.c
index 46b7b46659..90183e3014 100644
--- a/arch/arm/cpu/arm926ejs/lpc32xx/timer.c
+++ b/arch/arm/cpu/arm926ejs/lpc32xx/timer.c
@@ -10,6 +10,7 @@
 #include <asm/arch/clk.h>
 #include <asm/arch/timer.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 static struct timer_regs  *timer0 = (struct timer_regs *)TIMER0_BASE;
 static struct timer_regs  *timer1 = (struct timer_regs *)TIMER1_BASE;
diff --git a/arch/arm/cpu/arm926ejs/mx27/timer.c b/arch/arm/cpu/arm926ejs/mx27/timer.c
index d6e1e09f93..408e88aa12 100644
--- a/arch/arm/cpu/arm926ejs/mx27/timer.c
+++ b/arch/arm/cpu/arm926ejs/mx27/timer.c
@@ -22,6 +22,7 @@
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/ptrace.h>
+#include <linux/delay.h>
 
 /* General purpose timers bitfields */
 #define GPTCR_SWR		(1 << 15)	/* Software reset	*/
diff --git a/arch/arm/cpu/arm926ejs/mxs/mxs.c b/arch/arm/cpu/arm926ejs/mxs/mxs.c
index d742c0f151..12ebc1c802 100644
--- a/arch/arm/cpu/arm926ejs/mxs/mxs.c
+++ b/arch/arm/cpu/arm926ejs/mxs/mxs.c
@@ -15,6 +15,7 @@
 #include <hang.h>
 #include <init.h>
 #include <net.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
diff --git a/arch/arm/cpu/arm926ejs/mxs/timer.c b/arch/arm/cpu/arm926ejs/mxs/timer.c
index b6fdc88be7..5ab4ed0c5a 100644
--- a/arch/arm/cpu/arm926ejs/mxs/timer.c
+++ b/arch/arm/cpu/arm926ejs/mxs/timer.c
@@ -15,6 +15,7 @@
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
+#include <linux/delay.h>
 
 /* Maximum fixed count */
 #if defined(CONFIG_MX23)
diff --git a/arch/arm/cpu/arm926ejs/spear/reset.c b/arch/arm/cpu/arm926ejs/spear/reset.c
index 3b884cd0d3..a316540d52 100644
--- a/arch/arm/cpu/arm926ejs/spear/reset.c
+++ b/arch/arm/cpu/arm926ejs/spear/reset.c
@@ -9,6 +9,7 @@
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/spr_syscntl.h>
+#include <linux/delay.h>
 
 void reset_cpu(ulong ignored)
 {
diff --git a/arch/arm/cpu/arm926ejs/spear/timer.c b/arch/arm/cpu/arm926ejs/spear/timer.c
index 6803c349e8..dd0f15c0ce 100644
--- a/arch/arm/cpu/arm926ejs/spear/timer.c
+++ b/arch/arm/cpu/arm926ejs/spear/timer.c
@@ -12,6 +12,7 @@
 #include <asm/arch/spr_gpt.h>
 #include <asm/arch/spr_misc.h>
 #include <asm/ptrace.h>
+#include <linux/delay.h>
 
 #define GPT_RESOLUTION	(CONFIG_SPEAR_HZ_CLOCK / CONFIG_SPEAR_HZ)
 #define READ_TIMER()	(readl(&gpt_regs_p->count) & GPT_FREE_RUNNING)
diff --git a/arch/arm/cpu/armv7/bcm235xx/clk-core.c b/arch/arm/cpu/armv7/bcm235xx/clk-core.c
index 04366c871f..d7edefee23 100644
--- a/arch/arm/cpu/armv7/bcm235xx/clk-core.c
+++ b/arch/arm/cpu/armv7/bcm235xx/clk-core.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <log.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <bitfield.h>
 #include <asm/arch/sysmap.h>
diff --git a/arch/arm/cpu/armv7/bcm235xx/clk-eth.c b/arch/arm/cpu/armv7/bcm235xx/clk-eth.c
index 618af709fa..209ceca9a0 100644
--- a/arch/arm/cpu/armv7/bcm235xx/clk-eth.c
+++ b/arch/arm/cpu/armv7/bcm235xx/clk-eth.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/arch/sysmap.h>
 #include <asm/kona-common/clk.h>
diff --git a/arch/arm/cpu/armv7/bcm281xx/clk-core.c b/arch/arm/cpu/armv7/bcm281xx/clk-core.c
index 574a8a02d8..26b673a540 100644
--- a/arch/arm/cpu/armv7/bcm281xx/clk-core.c
+++ b/arch/arm/cpu/armv7/bcm281xx/clk-core.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <log.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <bitfield.h>
 #include <asm/arch/sysmap.h>
diff --git a/arch/arm/cpu/armv7/bcm281xx/clk-eth.c b/arch/arm/cpu/armv7/bcm281xx/clk-eth.c
index 618af709fa..209ceca9a0 100644
--- a/arch/arm/cpu/armv7/bcm281xx/clk-eth.c
+++ b/arch/arm/cpu/armv7/bcm281xx/clk-eth.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/arch/sysmap.h>
 #include <asm/kona-common/clk.h>
diff --git a/arch/arm/cpu/armv7/iproc-common/timer.c b/arch/arm/cpu/armv7/iproc-common/timer.c
index 5c109764e9..a4255a44c0 100644
--- a/arch/arm/cpu/armv7/iproc-common/timer.c
+++ b/arch/arm/cpu/armv7/iproc-common/timer.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/iproc-common/timer.h>
 #include <asm/iproc-common/sysmap.h>
+#include <linux/delay.h>
 
 static inline uint64_t timer_global_read(void)
 {
diff --git a/arch/arm/cpu/armv7/ls102xa/cpu.c b/arch/arm/cpu/armv7/ls102xa/cpu.c
index e9464ee7e4..91e988217a 100644
--- a/arch/arm/cpu/armv7/ls102xa/cpu.c
+++ b/arch/arm/cpu/armv7/ls102xa/cpu.c
@@ -18,6 +18,7 @@
 #include <fsl_esdhc.h>
 #include <config.h>
 #include <fsl_wdog.h>
+#include <linux/delay.h>
 
 #include "fsl_epu.h"
 
diff --git a/arch/arm/cpu/armv7/ls102xa/timer.c b/arch/arm/cpu/armv7/ls102xa/timer.c
index 46ade4ae86..2a32b30999 100644
--- a/arch/arm/cpu/armv7/ls102xa/timer.c
+++ b/arch/arm/cpu/armv7/ls102xa/timer.c
@@ -10,6 +10,7 @@
 #include <div64.h>
 #include <asm/arch/immap_ls102xa.h>
 #include <asm/arch/clock.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/cpu/armv7/s5p-common/timer.c b/arch/arm/cpu/armv7/s5p-common/timer.c
index d2b5b4d3fc..3064fd25d4 100644
--- a/arch/arm/cpu/armv7/s5p-common/timer.c
+++ b/arch/arm/cpu/armv7/s5p-common/timer.c
@@ -13,6 +13,7 @@
 #include <asm/io.h>
 #include <asm/arch/pwm.h>
 #include <asm/arch/clk.h>
+#include <linux/delay.h>
 
 /* Use the old PWM interface for now */
 #undef CONFIG_DM_PWM
diff --git a/arch/arm/cpu/armv7/stv0991/reset.c b/arch/arm/cpu/armv7/stv0991/reset.c
index 008e271dcc..fb67de10f4 100644
--- a/arch/arm/cpu/armv7/stv0991/reset.c
+++ b/arch/arm/cpu/armv7/stv0991/reset.c
@@ -8,6 +8,7 @@
 #include <cpu_func.h>
 #include <asm/io.h>
 #include <asm/arch/stv0991_wdru.h>
+#include <linux/delay.h>
 void reset_cpu(ulong ignored)
 {
 	puts("System is going to reboot ...\n");
diff --git a/arch/arm/cpu/armv7/stv0991/timer.c b/arch/arm/cpu/armv7/stv0991/timer.c
index 5adccab012..919529aa1b 100644
--- a/arch/arm/cpu/armv7/stv0991/timer.c
+++ b/arch/arm/cpu/armv7/stv0991/timer.c
@@ -11,6 +11,7 @@
 #include <asm/arch-stv0991/hardware.h>
 #include <asm/arch-stv0991/stv0991_cgu.h>
 #include <asm/arch-stv0991/stv0991_gpt.h>
+#include <linux/delay.h>
 
 static struct stv0991_cgu_regs *const stv0991_cgu_regs = \
 				(struct stv0991_cgu_regs *) (CGU_BASE_ADDR);
diff --git a/arch/arm/cpu/armv7/sunxi/timer.c b/arch/arm/cpu/armv7/sunxi/timer.c
index 4f6a66d803..65b64b5ac7 100644
--- a/arch/arm/cpu/armv7/sunxi/timer.c
+++ b/arch/arm/cpu/armv7/sunxi/timer.c
@@ -10,6 +10,7 @@
 #include <time.h>
 #include <asm/io.h>
 #include <asm/arch/timer.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/cpu/armv7/vf610/timer.c b/arch/arm/cpu/armv7/vf610/timer.c
index 229e9e959e..fa8f8fae10 100644
--- a/arch/arm/cpu/armv7/vf610/timer.c
+++ b/arch/arm/cpu/armv7/vf610/timer.c
@@ -10,6 +10,7 @@
 #include <div64.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
+#include <linux/delay.h>
 
 static struct pit_reg *cur_pit = (struct pit_reg *)PIT_BASE_ADDR;
 
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_serdes.c b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_serdes.c
index f24ca7f1dc..41c89b8904 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_serdes.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_serdes.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <log.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/arch/fsl_serdes.h>
 #include <asm/arch/soc.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c
index 3ac50966e1..3f1da43614 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c
@@ -8,6 +8,7 @@
 #include <env.h>
 #include <log.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/arch/fsl_serdes.h>
 #include <asm/arch/soc.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/mp.c b/arch/arm/cpu/armv8/fsl-layerscape/mp.c
index 31536b8181..1ea887b331 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/mp.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/mp.c
@@ -11,6 +11,7 @@
 #include <asm/system.h>
 #include <asm/arch/mp.h>
 #include <asm/arch/soc.h>
+#include <linux/delay.h>
 #include "cpu.h"
 #include <asm/arch-fsl-layerscape/soc.h>
 
diff --git a/arch/arm/cpu/pxa/usb.c b/arch/arm/cpu/pxa/usb.c
index 80a5977415..13e010d91e 100644
--- a/arch/arm/cpu/pxa/usb.c
+++ b/arch/arm/cpu/pxa/usb.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <linux/delay.h>
 
 #if defined(CONFIG_USB_OHCI_NEW) && defined(CONFIG_SYS_USB_OHCI_CPU_INIT)
 # if defined(CONFIG_CPU_MONAHANS) || defined(CONFIG_CPU_PXA27X)
diff --git a/arch/arm/cpu/sa1100/timer.c b/arch/arm/cpu/sa1100/timer.c
index f2cbee5dca..a5cdaf5a66 100644
--- a/arch/arm/cpu/sa1100/timer.c
+++ b/arch/arm/cpu/sa1100/timer.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <SA-1100.h>
 #include <time.h>
+#include <linux/delay.h>
 
 static ulong get_timer_masked (void)
 {
diff --git a/arch/arm/lib/reset.c b/arch/arm/lib/reset.c
index 65b4be20b8..4f1a768bfe 100644
--- a/arch/arm/lib/reset.c
+++ b/arch/arm/lib/reset.c
@@ -24,6 +24,7 @@
 #include <command.h>
 #include <cpu_func.h>
 #include <irq_func.h>
+#include <linux/delay.h>
 
 __weak void reset_misc(void)
 {
diff --git a/arch/arm/mach-at91/arm920t/timer.c b/arch/arm/mach-at91/arm920t/timer.c
index 1e014ad9c9..dca2d2c70c 100644
--- a/arch/arm/mach-at91/arm920t/timer.c
+++ b/arch/arm/mach-at91/arm920t/timer.c
@@ -16,6 +16,7 @@
 #include <common.h>
 #include <init.h>
 #include <time.h>
+#include <linux/delay.h>
 
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
diff --git a/arch/arm/mach-at91/armv7/clock.c b/arch/arm/mach-at91/armv7/clock.c
index 3640fce882..3926896958 100644
--- a/arch/arm/mach-at91/armv7/clock.c
+++ b/arch/arm/mach-at91/armv7/clock.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
diff --git a/arch/arm/mach-at91/mpddrc.c b/arch/arm/mach-at91/mpddrc.c
index 3df0ea7c79..5422c05456 100644
--- a/arch/arm/mach-at91/mpddrc.c
+++ b/arch/arm/mach-at91/mpddrc.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <asm/arch/atmel_mpddrc.h>
 #include <asm/arch/at91_common.h>
+#include <linux/delay.h>
 
 #define SAMA5D3_MPDDRC_VERSION		0x140
 
diff --git a/arch/arm/mach-at91/phy.c b/arch/arm/mach-at91/phy.c
index a10c0cae74..6101eee358 100644
--- a/arch/arm/mach-at91/phy.c
+++ b/arch/arm/mach-at91/phy.c
@@ -14,6 +14,7 @@
 #include <common.h>
 #include <asm/hardware.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/sizes.h>
 #include <asm/arch/at91_rstc.h>
 #include <watchdog.h>
diff --git a/arch/arm/mach-davinci/timer.c b/arch/arm/mach-davinci/timer.c
index ebe985f795..a6681821f6 100644
--- a/arch/arm/mach-davinci/timer.c
+++ b/arch/arm/mach-davinci/timer.c
@@ -26,6 +26,7 @@
 #include <asm/io.h>
 #include <asm/arch/timer_defs.h>
 #include <div64.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-exynos/include/mach/dp_info.h b/arch/arm/mach-exynos/include/mach/dp_info.h
index d3a516fbc6..3226eb95f0 100644
--- a/arch/arm/mach-exynos/include/mach/dp_info.h
+++ b/arch/arm/mach-exynos/include/mach/dp_info.h
@@ -197,4 +197,5 @@ unsigned int exynos_init_dp(void)
 }
 #endif
 
+#include <linux/delay.h>
 #endif /* _DP_INFO_H */
diff --git a/arch/arm/mach-imx/ddrmc-vf610.c b/arch/arm/mach-imx/ddrmc-vf610.c
index f25119a7d6..7895ee66f8 100644
--- a/arch/arm/mach-imx/ddrmc-vf610.c
+++ b/arch/arm/mach-imx/ddrmc-vf610.c
@@ -11,6 +11,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux-vf610.h>
 #include <asm/arch/ddrmc-vf610.h>
+#include <linux/delay.h>
 #include "ddrmc-vf610-calibration.h"
 
 void ddrmc_setup_iomux(const iomux_v3_cfg_t *pads, int pads_count)
diff --git a/arch/arm/mach-imx/i2c-mxv7.c b/arch/arm/mach-imx/i2c-mxv7.c
index 814d834b16..e6c74bf77e 100644
--- a/arch/arm/mach-imx/i2c-mxv7.c
+++ b/arch/arm/mach-imx/i2c-mxv7.c
@@ -6,6 +6,7 @@
 #include <malloc.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/mxc_i2c.h>
diff --git a/arch/arm/mach-imx/imx8m/clock_imx8mm.c b/arch/arm/mach-imx/imx8m/clock_imx8mm.c
index 91c827f6c0..8ea7f016c2 100644
--- a/arch/arm/mach-imx/imx8m/clock_imx8mm.c
+++ b/arch/arm/mach-imx/imx8m/clock_imx8mm.c
@@ -12,6 +12,7 @@
 #include <asm/io.h>
 #include <div64.h>
 #include <errno.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-imx/imx8m/clock_imx8mq.c b/arch/arm/mach-imx/imx8m/clock_imx8mq.c
index 52205b044a..759ec6d114 100644
--- a/arch/arm/mach-imx/imx8m/clock_imx8mq.c
+++ b/arch/arm/mach-imx/imx8m/clock_imx8mq.c
@@ -12,6 +12,7 @@
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
 #include <errno.h>
+#include <linux/delay.h>
 #include <linux/iopoll.h>
 
 static struct anamix_pll *ana_pll = (struct anamix_pll *)ANATOP_BASE_ADDR;
diff --git a/arch/arm/mach-imx/misc.c b/arch/arm/mach-imx/misc.c
index 549ef2bd99..818f38e17d 100644
--- a/arch/arm/mach-imx/misc.c
+++ b/arch/arm/mach-imx/misc.c
@@ -7,6 +7,7 @@
 #include <lmb.h>
 #include <log.h>
 #include <asm/arch/sys_proto.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <asm/mach-imx/regs-common.h>
diff --git a/arch/arm/mach-imx/mx6/ddr.c b/arch/arm/mach-imx/mx6/ddr.c
index 79a90c83aa..16df71083d 100644
--- a/arch/arm/mach-imx/mx6/ddr.c
+++ b/arch/arm/mach-imx/mx6/ddr.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <hang.h>
 #include <log.h>
+#include <linux/delay.h>
 #include <linux/types.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/mx6-ddr.h>
diff --git a/arch/arm/mach-imx/mx6/litesom.c b/arch/arm/mach-imx/mx6/litesom.c
index b0a6bd589c..596773f054 100644
--- a/arch/arm/mach-imx/mx6/litesom.c
+++ b/arch/arm/mach-imx/mx6/litesom.c
@@ -18,6 +18,7 @@
 #include <asm/io.h>
 #include <common.h>
 #include <fsl_esdhc_imx.h>
+#include <linux/delay.h>
 #include <linux/sizes.h>
 #include <mmc.h>
 
diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c
index b8aaf3ef01..19ca382649 100644
--- a/arch/arm/mach-imx/mx6/soc.c
+++ b/arch/arm/mach-imx/mx6/soc.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
diff --git a/arch/arm/mach-imx/mx7/soc.c b/arch/arm/mach-imx/mx7/soc.c
index 60e688c518..798fe74a3d 100644
--- a/arch/arm/mach-imx/mx7/soc.c
+++ b/arch/arm/mach-imx/mx7/soc.c
@@ -19,6 +19,7 @@
 #include <imx_thermal.h>
 #include <fsl_sec.h>
 #include <asm/setup.h>
+#include <linux/delay.h>
 
 #define IOMUXC_GPR1		0x4
 #define BM_IOMUXC_GPR1_IRQ	0x1000
diff --git a/arch/arm/mach-imx/mx7ulp/scg.c b/arch/arm/mach-imx/mx7ulp/scg.c
index 6e34803067..4c066557c1 100644
--- a/arch/arm/mach-imx/mx7ulp/scg.c
+++ b/arch/arm/mach-imx/mx7ulp/scg.c
@@ -11,6 +11,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/pcc.h>
 #include <asm/arch/sys_proto.h>
+#include <linux/delay.h>
 
 scg_p scg1_regs = (scg_p)SCG1_RBASE;
 
diff --git a/arch/arm/mach-imx/syscounter.c b/arch/arm/mach-imx/syscounter.c
index db1c2c1e01..7da43c32e0 100644
--- a/arch/arm/mach-imx/syscounter.c
+++ b/arch/arm/mach-imx/syscounter.c
@@ -13,6 +13,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/mach-imx/syscounter.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-keystone/ddr3.c b/arch/arm/mach-keystone/ddr3.c
index 9ab6b53adb..7dea600d50 100644
--- a/arch/arm/mach-keystone/ddr3.c
+++ b/arch/arm/mach-keystone/ddr3.c
@@ -13,6 +13,7 @@
 #include <asm/arch/msmc.h>
 #include <asm/arch/ddr3.h>
 #include <asm/arch/psc_defs.h>
+#include <linux/delay.h>
 
 #include <asm/ti-common/ti-edma3.h>
 
diff --git a/arch/arm/mach-keystone/psc.c b/arch/arm/mach-keystone/psc.c
index f87bcb3bea..145aff8ac6 100644
--- a/arch/arm/mach-keystone/psc.c
+++ b/arch/arm/mach-keystone/psc.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <asm/processor.h>
diff --git a/arch/arm/mach-mvebu/cpu.c b/arch/arm/mach-mvebu/cpu.c
index ab8b02956b..c56b0aeb79 100644
--- a/arch/arm/mach-mvebu/cpu.c
+++ b/arch/arm/mach-mvebu/cpu.c
@@ -7,6 +7,7 @@
 #include <ahci.h>
 #include <cpu_func.h>
 #include <init.h>
+#include <linux/delay.h>
 #include <linux/mbus.h>
 #include <asm/io.h>
 #include <asm/pl310.h>
diff --git a/arch/arm/mach-mvebu/efuse.c b/arch/arm/mach-mvebu/efuse.c
index 16ccfec933..304be95703 100644
--- a/arch/arm/mach-mvebu/efuse.c
+++ b/arch/arm/mach-mvebu/efuse.c
@@ -10,6 +10,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/efuse.h>
 #include <asm/arch/soc.h>
+#include <linux/delay.h>
 #include <linux/mbus.h>
 
 #if defined(CONFIG_MVEBU_EFUSE_FAKE)
diff --git a/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c b/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c
index a1cef9fdd6..af50cbc4f4 100644
--- a/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c
+++ b/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c
@@ -8,6 +8,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <linux/delay.h>
 
 #include "ctrl_pex.h"
 #include "sys_env_lib.h"
diff --git a/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c b/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c
index 66409a50c0..67a00cf1cf 100644
--- a/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c
+++ b/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c
@@ -8,6 +8,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <linux/delay.h>
 
 #include "high_speed_env_spec.h"
 #include "sys_env_lib.h"
diff --git a/arch/arm/mach-mvebu/serdes/a38x/seq_exec.c b/arch/arm/mach-mvebu/serdes/a38x/seq_exec.c
index d9edfaa1df..2a51b7113c 100644
--- a/arch/arm/mach-mvebu/serdes/a38x/seq_exec.c
+++ b/arch/arm/mach-mvebu/serdes/a38x/seq_exec.c
@@ -8,6 +8,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <linux/delay.h>
 
 #include "seq_exec.h"
 #include "high_speed_env_spec.h"
diff --git a/arch/arm/mach-mvebu/serdes/axp/high_speed_env_lib.c b/arch/arm/mach-mvebu/serdes/axp/high_speed_env_lib.c
index c8c9298864..ea3b4c7d5b 100644
--- a/arch/arm/mach-mvebu/serdes/axp/high_speed_env_lib.c
+++ b/arch/arm/mach-mvebu/serdes/axp/high_speed_env_lib.c
@@ -9,6 +9,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <linux/delay.h>
 
 #include "high_speed_env_spec.h"
 #include "board_env_spec.h"
diff --git a/arch/arm/mach-omap2/am33xx/board.c b/arch/arm/mach-omap2/am33xx/board.c
index 533601eac4..ce58bf811f 100644
--- a/arch/arm/mach-omap2/am33xx/board.c
+++ b/arch/arm/mach-omap2/am33xx/board.c
@@ -32,6 +32,7 @@
 #include <i2c.h>
 #include <miiphy.h>
 #include <cpsw.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/compiler.h>
 #include <linux/usb/ch9.h>
diff --git a/arch/arm/mach-omap2/am33xx/clock_ti814x.c b/arch/arm/mach-omap2/am33xx/clock_ti814x.c
index aef090b4f8..27abaff48f 100644
--- a/arch/arm/mach-omap2/am33xx/clock_ti814x.c
+++ b/arch/arm/mach-omap2/am33xx/clock_ti814x.c
@@ -12,6 +12,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/hardware.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 /* PRCM */
 #define PRCM_MOD_EN		0x2
diff --git a/arch/arm/mach-omap2/am33xx/ddr.c b/arch/arm/mach-omap2/am33xx/ddr.c
index 71636276d4..f8434ecf57 100644
--- a/arch/arm/mach-omap2/am33xx/ddr.c
+++ b/arch/arm/mach-omap2/am33xx/ddr.c
@@ -12,6 +12,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/io.h>
 #include <asm/emif.h>
+#include <linux/delay.h>
 
 /**
  * Base address for EMIF instances
diff --git a/arch/arm/mach-omap2/am33xx/ti816x_emif4.c b/arch/arm/mach-omap2/am33xx/ti816x_emif4.c
index 9f59489958..707ea807ac 100644
--- a/arch/arm/mach-omap2/am33xx/ti816x_emif4.c
+++ b/arch/arm/mach-omap2/am33xx/ti816x_emif4.c
@@ -15,6 +15,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/io.h>
 #include <asm/emif.h>
+#include <linux/delay.h>
 
 /*********************************************************************
  * Init DDR3 on TI816X EVM
diff --git a/arch/arm/mach-omap2/emif-common.c b/arch/arm/mach-omap2/emif-common.c
index 8bc4fbbb60..312f868fbc 100644
--- a/arch/arm/mach-omap2/emif-common.c
+++ b/arch/arm/mach-omap2/emif-common.c
@@ -21,6 +21,7 @@
 #include <asm/utils.h>
 #include <linux/compiler.h>
 #include <asm/ti-common/ti-edma3.h>
+#include <linux/delay.h>
 
 static int emif1_enabled = -1, emif2_enabled = -1;
 
diff --git a/arch/arm/mach-omap2/omap5/hwinit.c b/arch/arm/mach-omap2/omap5/hwinit.c
index 3b1733099f..47ac8656bf 100644
--- a/arch/arm/mach-omap2/omap5/hwinit.c
+++ b/arch/arm/mach-omap2/omap5/hwinit.c
@@ -18,6 +18,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/clock.h>
+#include <linux/delay.h>
 #include <linux/sizes.h>
 #include <asm/utils.h>
 #include <asm/arch/gpio.h>
diff --git a/arch/arm/mach-omap2/pipe3-phy.c b/arch/arm/mach-omap2/pipe3-phy.c
index 8808e353a9..94332b7ede 100644
--- a/arch/arm/mach-omap2/pipe3-phy.c
+++ b/arch/arm/mach-omap2/pipe3-phy.c
@@ -11,6 +11,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include "pipe3-phy.h"
 
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 7752dd1565..bcfba16a08 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -21,6 +21,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/clock.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-orion5x/timer.c b/arch/arm/mach-orion5x/timer.c
index a64d572112..4926bb7779 100644
--- a/arch/arm/mach-orion5x/timer.c
+++ b/arch/arm/mach-orion5x/timer.c
@@ -11,6 +11,7 @@
 #include <init.h>
 #include <time.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 #define UBOOT_CNTR	0	/* counter to use for uboot timer */
 
diff --git a/arch/arm/mach-rmobile/timer.c b/arch/arm/mach-rmobile/timer.c
index f88ccfde9f..ba06535e4c 100644
--- a/arch/arm/mach-rmobile/timer.c
+++ b/arch/arm/mach-rmobile/timer.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <asm/arch-armv7/globaltimer.h>
 #include <asm/arch/rmobile.h>
+#include <linux/delay.h>
 
 static struct globaltimer *global_timer = \
 		(struct globaltimer *)GLOBAL_TIMER_BASE_ADDR;
diff --git a/arch/arm/mach-rockchip/rk3036/sdram_rk3036.c b/arch/arm/mach-rockchip/rk3036/sdram_rk3036.c
index 3874716e52..6ae254e99a 100644
--- a/arch/arm/mach-rockchip/rk3036/sdram_rk3036.c
+++ b/arch/arm/mach-rockchip/rk3036/sdram_rk3036.c
@@ -11,6 +11,7 @@
 #include <asm/arch-rockchip/hardware.h>
 #include <asm/arch-rockchip/sdram_rk3036.h>
 #include <asm/arch-rockchip/uart.h>
+#include <linux/delay.h>
 
 /*
  * we can not fit the code to access the device tree in SPL
diff --git a/arch/arm/mach-rockchip/rk3368/rk3368.c b/arch/arm/mach-rockchip/rk3368/rk3368.c
index bcc230c900..c865afa5f2 100644
--- a/arch/arm/mach-rockchip/rk3368/rk3368.c
+++ b/arch/arm/mach-rockchip/rk3368/rk3368.c
@@ -14,6 +14,7 @@
 #include <asm/arch-rockchip/cru_rk3368.h>
 #include <asm/arch-rockchip/grf_rk3368.h>
 #include <asm/arch-rockchip/hardware.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-socfpga/clock_manager_arria10.c b/arch/arm/mach-socfpga/clock_manager_arria10.c
index d7c8eaf47d..58d5d3fd8a 100644
--- a/arch/arm/mach-socfpga/clock_manager_arria10.c
+++ b/arch/arm/mach-socfpga/clock_manager_arria10.c
@@ -11,6 +11,7 @@
 #include <clk.h>
 #include <dm/device-internal.h>
 #include <asm/arch/clock_manager.h>
+#include <linux/delay.h>
 
 #ifdef CONFIG_SPL_BUILD
 
diff --git a/arch/arm/mach-socfpga/freeze_controller.c b/arch/arm/mach-socfpga/freeze_controller.c
index d48aeec374..561d3408cd 100644
--- a/arch/arm/mach-socfpga/freeze_controller.c
+++ b/arch/arm/mach-socfpga/freeze_controller.c
@@ -8,6 +8,7 @@
 #include <asm/io.h>
 #include <asm/arch/clock_manager.h>
 #include <asm/arch/freeze_controller.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 
 static const struct socfpga_freeze_controller *freeze_controller_base =
diff --git a/arch/arm/mach-socfpga/scan_manager.c b/arch/arm/mach-socfpga/scan_manager.c
index f7ee28915e..36d6880141 100644
--- a/arch/arm/mach-socfpga/scan_manager.c
+++ b/arch/arm/mach-socfpga/scan_manager.c
@@ -9,6 +9,7 @@
 #include <asm/arch/freeze_controller.h>
 #include <asm/arch/scan_manager.h>
 #include <asm/arch/system_manager.h>
+#include <linux/delay.h>
 
 /*
  * Maximum polling loop to wait for IO scan chain engine becomes idle
diff --git a/arch/arm/mach-sunxi/clock_sun6i.c b/arch/arm/mach-sunxi/clock_sun6i.c
index 6ca38f73d9..b46083e9db 100644
--- a/arch/arm/mach-sunxi/clock_sun6i.c
+++ b/arch/arm/mach-sunxi/clock_sun6i.c
@@ -14,6 +14,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/prcm.h>
 #include <asm/arch/sys_proto.h>
+#include <linux/delay.h>
 
 #ifdef CONFIG_SPL_BUILD
 void clock_init_safe(void)
diff --git a/arch/arm/mach-sunxi/clock_sun8i_a83t.c b/arch/arm/mach-sunxi/clock_sun8i_a83t.c
index a55a6162d4..31e4281529 100644
--- a/arch/arm/mach-sunxi/clock_sun8i_a83t.c
+++ b/arch/arm/mach-sunxi/clock_sun8i_a83t.c
@@ -14,6 +14,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/prcm.h>
 #include <asm/arch/sys_proto.h>
+#include <linux/delay.h>
 
 #ifdef CONFIG_SPL_BUILD
 void clock_init_safe(void)
diff --git a/arch/arm/mach-sunxi/dram_sun4i.c b/arch/arm/mach-sunxi/dram_sun4i.c
index 72de807a47..76d698214d 100644
--- a/arch/arm/mach-sunxi/dram_sun4i.c
+++ b/arch/arm/mach-sunxi/dram_sun4i.c
@@ -27,6 +27,7 @@
 #include <asm/arch/dram.h>
 #include <asm/arch/timer.h>
 #include <asm/arch/sys_proto.h>
+#include <linux/delay.h>
 
 #define CPU_CFG_CHIP_VER(n) ((n) << 6)
 #define CPU_CFG_CHIP_VER_MASK CPU_CFG_CHIP_VER(0x3)
diff --git a/arch/arm/mach-sunxi/dram_sun50i_h6.c b/arch/arm/mach-sunxi/dram_sun50i_h6.c
index 045e8679e3..9e34da4747 100644
--- a/arch/arm/mach-sunxi/dram_sun50i_h6.c
+++ b/arch/arm/mach-sunxi/dram_sun50i_h6.c
@@ -13,6 +13,7 @@
 #include <asm/arch/dram.h>
 #include <asm/arch/cpu.h>
 #include <linux/bitops.h>
+#include <linux/delay.h>
 #include <linux/kconfig.h>
 
 /*
diff --git a/arch/arm/mach-sunxi/dram_sun6i.c b/arch/arm/mach-sunxi/dram_sun6i.c
index 8e781267c5..0590110d4a 100644
--- a/arch/arm/mach-sunxi/dram_sun6i.c
+++ b/arch/arm/mach-sunxi/dram_sun6i.c
@@ -16,6 +16,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/dram.h>
 #include <asm/arch/prcm.h>
+#include <linux/delay.h>
 
 #define DRAM_CLK (CONFIG_DRAM_CLK * 1000000)
 
diff --git a/arch/arm/mach-sunxi/dram_sun8i_a23.c b/arch/arm/mach-sunxi/dram_sun8i_a23.c
index 221f92869c..3ed97b59a3 100644
--- a/arch/arm/mach-sunxi/dram_sun8i_a23.c
+++ b/arch/arm/mach-sunxi/dram_sun8i_a23.c
@@ -26,6 +26,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/dram.h>
 #include <asm/arch/prcm.h>
+#include <linux/delay.h>
 
 static const struct dram_para dram_para = {
 	.clock = CONFIG_DRAM_CLK,
diff --git a/arch/arm/mach-sunxi/dram_sun8i_a33.c b/arch/arm/mach-sunxi/dram_sun8i_a33.c
index 179acc7e6f..d99a38b10a 100644
--- a/arch/arm/mach-sunxi/dram_sun8i_a33.c
+++ b/arch/arm/mach-sunxi/dram_sun8i_a33.c
@@ -14,6 +14,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/dram.h>
 #include <asm/arch/prcm.h>
+#include <linux/delay.h>
 
 /* PLL runs at 2x dram-clk, controller runs at PLL / 4 (dram-clk / 2) */
 #define DRAM_CLK_MUL 2
diff --git a/arch/arm/mach-sunxi/dram_sun8i_a83t.c b/arch/arm/mach-sunxi/dram_sun8i_a83t.c
index 2febb23654..a3f833dd34 100644
--- a/arch/arm/mach-sunxi/dram_sun8i_a83t.c
+++ b/arch/arm/mach-sunxi/dram_sun8i_a83t.c
@@ -14,6 +14,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/dram.h>
 #include <asm/arch/prcm.h>
+#include <linux/delay.h>
 
 #define DRAM_CLK_MUL 2
 #define DRAM_CLK_DIV 1
diff --git a/arch/arm/mach-sunxi/dram_sunxi_dw.c b/arch/arm/mach-sunxi/dram_sunxi_dw.c
index 567cb5b18e..5d84798ca4 100644
--- a/arch/arm/mach-sunxi/dram_sunxi_dw.c
+++ b/arch/arm/mach-sunxi/dram_sunxi_dw.c
@@ -15,6 +15,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/dram.h>
 #include <asm/arch/cpu.h>
+#include <linux/delay.h>
 #include <linux/kconfig.h>
 
 static void mctl_phy_init(u32 val)
diff --git a/arch/arm/mach-sunxi/spl_spi_sunxi.c b/arch/arm/mach-sunxi/spl_spi_sunxi.c
index c084de7e2c..d369df93d4 100644
--- a/arch/arm/mach-sunxi/spl_spi_sunxi.c
+++ b/arch/arm/mach-sunxi/spl_spi_sunxi.c
@@ -9,6 +9,7 @@
 #include <spl.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 
 #ifdef CONFIG_SPL_OS_BOOT
diff --git a/arch/arm/mach-tegra/clock.c b/arch/arm/mach-tegra/clock.c
index c4225b8b5b..18c19dbf60 100644
--- a/arch/arm/mach-tegra/clock.c
+++ b/arch/arm/mach-tegra/clock.c
@@ -18,6 +18,7 @@
 #include <asm/arch-tegra/clk_rst.h>
 #include <asm/arch-tegra/pmc.h>
 #include <asm/arch-tegra/timer.h>
+#include <linux/delay.h>
 
 /*
  * This is our record of the current clock rate of each clock. We don't
diff --git a/arch/arm/mach-tegra/cmd_enterrcm.c b/arch/arm/mach-tegra/cmd_enterrcm.c
index 110d441d9b..25df31a3b8 100644
--- a/arch/arm/mach-tegra/cmd_enterrcm.c
+++ b/arch/arm/mach-tegra/cmd_enterrcm.c
@@ -30,6 +30,7 @@
 #include <irq_func.h>
 #include <asm/arch/tegra.h>
 #include <asm/arch-tegra/pmc.h>
+#include <linux/delay.h>
 
 static int do_enterrcm(struct cmd_tbl *cmdtp, int flag, int argc,
 		       char *const argv[])
diff --git a/arch/arm/mach-tegra/cpu.c b/arch/arm/mach-tegra/cpu.c
index d12ebb319e..65b15b79fe 100644
--- a/arch/arm/mach-tegra/cpu.c
+++ b/arch/arm/mach-tegra/cpu.c
@@ -13,6 +13,7 @@
 #include <asm/arch-tegra/clk_rst.h>
 #include <asm/arch-tegra/pmc.h>
 #include <asm/arch-tegra/scu.h>
+#include <linux/delay.h>
 #include "cpu.h"
 
 int get_num_cpus(void)
diff --git a/arch/arm/mach-tegra/powergate.c b/arch/arm/mach-tegra/powergate.c
index 761c9ef19e..631bc04e95 100644
--- a/arch/arm/mach-tegra/powergate.c
+++ b/arch/arm/mach-tegra/powergate.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <errno.h>
+#include <linux/delay.h>
 
 #include <asm/io.h>
 #include <asm/types.h>
diff --git a/arch/arm/mach-tegra/tegra114/clock.c b/arch/arm/mach-tegra/tegra114/clock.c
index 1c06865e06..167589d1bb 100644
--- a/arch/arm/mach-tegra/tegra114/clock.c
+++ b/arch/arm/mach-tegra/tegra114/clock.c
@@ -17,6 +17,7 @@
 #include <asm/arch-tegra/timer.h>
 #include <div64.h>
 #include <fdtdec.h>
+#include <linux/delay.h>
 
 /*
  * Clock types that we can use as a source. The Tegra114 has muxes for the
diff --git a/arch/arm/mach-tegra/tegra114/cpu.c b/arch/arm/mach-tegra/tegra114/cpu.c
index 92ce3cefae..62c1053630 100644
--- a/arch/arm/mach-tegra/tegra114/cpu.c
+++ b/arch/arm/mach-tegra/tegra114/cpu.c
@@ -13,6 +13,7 @@
 #include <asm/arch/tegra.h>
 #include <asm/arch-tegra/clk_rst.h>
 #include <asm/arch-tegra/pmc.h>
+#include <linux/delay.h>
 #include "../cpu.h"
 
 /* Tegra114-specific CPU init code */
diff --git a/arch/arm/mach-tegra/tegra124/clock.c b/arch/arm/mach-tegra/tegra124/clock.c
index 4359093892..79e67f5194 100644
--- a/arch/arm/mach-tegra/tegra124/clock.c
+++ b/arch/arm/mach-tegra/tegra124/clock.c
@@ -17,6 +17,7 @@
 #include <asm/arch-tegra/timer.h>
 #include <div64.h>
 #include <fdtdec.h>
+#include <linux/delay.h>
 
 /*
  * Clock types that we can use as a source. The Tegra124 has muxes for the
diff --git a/arch/arm/mach-tegra/tegra124/cpu.c b/arch/arm/mach-tegra/tegra124/cpu.c
index c9226af4c5..d5f2683b26 100644
--- a/arch/arm/mach-tegra/tegra124/cpu.c
+++ b/arch/arm/mach-tegra/tegra124/cpu.c
@@ -15,6 +15,7 @@
 #include <asm/arch-tegra/clk_rst.h>
 #include <asm/arch-tegra/pmc.h>
 #include <asm/arch-tegra/ap.h>
+#include <linux/delay.h>
 #include "../cpu.h"
 
 /* Tegra124-specific CPU init code */
diff --git a/arch/arm/mach-tegra/tegra124/xusb-padctl.c b/arch/arm/mach-tegra/tegra124/xusb-padctl.c
index 9a97c87436..38afc3cbe6 100644
--- a/arch/arm/mach-tegra/tegra124/xusb-padctl.c
+++ b/arch/arm/mach-tegra/tegra124/xusb-padctl.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <dm/of_access.h>
 #include <dm/ofnode.h>
+#include <linux/delay.h>
 
 #include "../xusb-padctl-common.h"
 
diff --git a/arch/arm/mach-tegra/tegra20/clock.c b/arch/arm/mach-tegra/tegra20/clock.c
index 8e3ad2baa2..24e8a13b1f 100644
--- a/arch/arm/mach-tegra/tegra20/clock.c
+++ b/arch/arm/mach-tegra/tegra20/clock.c
@@ -18,6 +18,7 @@
 #include <asm/arch-tegra/timer.h>
 #include <div64.h>
 #include <fdtdec.h>
+#include <linux/delay.h>
 
 /*
  * Clock types that we can use as a source. The Tegra20 has muxes for the
diff --git a/arch/arm/mach-tegra/tegra20/cpu.c b/arch/arm/mach-tegra/tegra20/cpu.c
index 2d14ac9d95..e5b60598f7 100644
--- a/arch/arm/mach-tegra/tegra20/cpu.c
+++ b/arch/arm/mach-tegra/tegra20/cpu.c
@@ -7,6 +7,7 @@
 #include <asm/io.h>
 #include <asm/arch/tegra.h>
 #include <asm/arch-tegra/pmc.h>
+#include <linux/delay.h>
 #include "../cpu.h"
 
 static void enable_cpu_power_rail(void)
diff --git a/arch/arm/mach-tegra/tegra210/clock.c b/arch/arm/mach-tegra/tegra210/clock.c
index 171c98daa2..4fe6df4812 100644
--- a/arch/arm/mach-tegra/tegra210/clock.c
+++ b/arch/arm/mach-tegra/tegra210/clock.c
@@ -19,6 +19,7 @@
 #include <asm/arch-tegra/timer.h>
 #include <div64.h>
 #include <fdtdec.h>
+#include <linux/delay.h>
 
 /*
  * Clock types that we can use as a source. The Tegra210 has muxes for the
diff --git a/arch/arm/mach-tegra/tegra210/xusb-padctl.c b/arch/arm/mach-tegra/tegra210/xusb-padctl.c
index b75cc31c8c..d160ce4c99 100644
--- a/arch/arm/mach-tegra/tegra210/xusb-padctl.c
+++ b/arch/arm/mach-tegra/tegra210/xusb-padctl.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <dm/of_access.h>
 #include <dm/ofnode.h>
+#include <linux/delay.h>
 
 #include "../xusb-padctl-common.h"
 
diff --git a/arch/arm/mach-tegra/tegra30/clock.c b/arch/arm/mach-tegra/tegra30/clock.c
index 7a5c54d592..b0641c6a41 100644
--- a/arch/arm/mach-tegra/tegra30/clock.c
+++ b/arch/arm/mach-tegra/tegra30/clock.c
@@ -17,6 +17,7 @@
 #include <asm/arch-tegra/timer.h>
 #include <div64.h>
 #include <fdtdec.h>
+#include <linux/delay.h>
 
 /*
  * Clock types that we can use as a source. The Tegra30 has muxes for the
diff --git a/arch/arm/mach-tegra/tegra30/cpu.c b/arch/arm/mach-tegra/tegra30/cpu.c
index 7bd1de1953..651edd27ee 100644
--- a/arch/arm/mach-tegra/tegra30/cpu.c
+++ b/arch/arm/mach-tegra/tegra30/cpu.c
@@ -12,6 +12,7 @@
 #include <asm/arch-tegra/clk_rst.h>
 #include <asm/arch-tegra/pmc.h>
 #include <asm/arch-tegra/tegra_i2c.h>
+#include <linux/delay.h>
 #include "../cpu.h"
 
 /* Tegra30-specific CPU init code */
diff --git a/arch/arm/mach-uniphier/clk/clk-ld11.c b/arch/arm/mach-uniphier/clk/clk-ld11.c
index 0917b33c25..94b9d904dc 100644
--- a/arch/arm/mach-uniphier/clk/clk-ld11.c
+++ b/arch/arm/mach-uniphier/clk/clk-ld11.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <spl.h>
 #include <linux/bitops.h>
+#include <linux/delay.h>
 #include <linux/io.h>
 
 #include "../init.h"
diff --git a/arch/arm/mach-uniphier/clk/dpll-ld4.c b/arch/arm/mach-uniphier/clk/dpll-ld4.c
index 72fe8db8dd..fd77aa7e11 100644
--- a/arch/arm/mach-uniphier/clk/dpll-ld4.c
+++ b/arch/arm/mach-uniphier/clk/dpll-ld4.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/io.h>
 
diff --git a/arch/arm/mach-uniphier/clk/dpll-pro4.c b/arch/arm/mach-uniphier/clk/dpll-pro4.c
index 6259495484..c86881dabd 100644
--- a/arch/arm/mach-uniphier/clk/dpll-pro4.c
+++ b/arch/arm/mach-uniphier/clk/dpll-pro4.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/io.h>
 
diff --git a/arch/arm/mach-uniphier/micro-support-card.c b/arch/arm/mach-uniphier/micro-support-card.c
index f6e95ee7ba..18435dc361 100644
--- a/arch/arm/mach-uniphier/micro-support-card.c
+++ b/arch/arm/mach-uniphier/micro-support-card.c
@@ -11,6 +11,7 @@
 #include <net.h>
 #include <dm/of.h>
 #include <linux/ctype.h>
+#include <linux/delay.h>
 #include <linux/io.h>
 
 #include "micro-support-card.h"
diff --git a/arch/arm/mach-zynqmp/mp.c b/arch/arm/mach-zynqmp/mp.c
index 74ada3b670..656678a155 100644
--- a/arch/arm/mach-zynqmp/mp.c
+++ b/arch/arm/mach-zynqmp/mp.c
@@ -10,6 +10,7 @@
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 #define LOCK		0
 #define SPLIT		1
diff --git a/arch/arm/mach-zynqmp/psu_spl_init.c b/arch/arm/mach-zynqmp/psu_spl_init.c
index b6abdfd608..5c5c7d136e 100644
--- a/arch/arm/mach-zynqmp/psu_spl_init.c
+++ b/arch/arm/mach-zynqmp/psu_spl_init.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/arch/psu_init_gpl.h>
+#include <linux/delay.h>
 
 #define PSU_MASK_POLL_TIME 1100000
 
diff --git a/arch/arm/mach-zynqmp/spl.c b/arch/arm/mach-zynqmp/spl.c
index fd0c1228c3..9dd61e25f6 100644
--- a/arch/arm/mach-zynqmp/spl.c
+++ b/arch/arm/mach-zynqmp/spl.c
@@ -10,6 +10,7 @@
 #include <init.h>
 #include <log.h>
 #include <spl.h>
+#include <linux/delay.h>
 
 #include <asm/io.h>
 #include <asm/spl.h>
diff --git a/arch/m68k/cpu/mcf5227x/cpu.c b/arch/m68k/cpu/mcf5227x/cpu.c
index 200c53eaf3..5ea6158c80 100644
--- a/arch/m68k/cpu/mcf5227x/cpu.c
+++ b/arch/m68k/cpu/mcf5227x/cpu.c
@@ -13,6 +13,7 @@
 #include <vsprintf.h>
 #include <watchdog.h>
 #include <command.h>
+#include <linux/delay.h>
 
 #include <asm/immap.h>
 #include <asm/io.h>
diff --git a/arch/m68k/cpu/mcf52x2/cpu.c b/arch/m68k/cpu/mcf52x2/cpu.c
index 8c91e0e193..d3d4e30ad5 100644
--- a/arch/m68k/cpu/mcf52x2/cpu.c
+++ b/arch/m68k/cpu/mcf52x2/cpu.c
@@ -22,6 +22,7 @@
 #include <asm/immap.h>
 #include <asm/io.h>
 #include <netdev.h>
+#include <linux/delay.h>
 #include "cpu.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/m68k/cpu/mcf52x2/speed.c b/arch/m68k/cpu/mcf52x2/speed.c
index 02ef5d87aa..751c83a4fc 100644
--- a/arch/m68k/cpu/mcf52x2/speed.c
+++ b/arch/m68k/cpu/mcf52x2/speed.c
@@ -12,6 +12,7 @@
 #include <asm/processor.h>
 #include <asm/immap.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/m68k/cpu/mcf532x/cpu.c b/arch/m68k/cpu/mcf532x/cpu.c
index 87b77f42de..72bfdf056b 100644
--- a/arch/m68k/cpu/mcf532x/cpu.c
+++ b/arch/m68k/cpu/mcf532x/cpu.c
@@ -15,6 +15,7 @@
 #include <watchdog.h>
 #include <command.h>
 #include <netdev.h>
+#include <linux/delay.h>
 
 #include <asm/immap.h>
 #include <asm/io.h>
diff --git a/arch/m68k/cpu/mcf5445x/cpu.c b/arch/m68k/cpu/mcf5445x/cpu.c
index 2608fdd76f..886f29d1b6 100644
--- a/arch/m68k/cpu/mcf5445x/cpu.c
+++ b/arch/m68k/cpu/mcf5445x/cpu.c
@@ -15,6 +15,7 @@
 #include <watchdog.h>
 #include <command.h>
 #include <netdev.h>
+#include <linux/delay.h>
 
 #include <asm/immap.h>
 #include <asm/io.h>
diff --git a/arch/m68k/cpu/mcf5445x/pci.c b/arch/m68k/cpu/mcf5445x/pci.c
index 09bd745569..af02c4934c 100644
--- a/arch/m68k/cpu/mcf5445x/pci.c
+++ b/arch/m68k/cpu/mcf5445x/pci.c
@@ -11,6 +11,7 @@
 #include <pci.h>
 #include <asm/io.h>
 #include <asm/immap.h>
+#include <linux/delay.h>
 
 #if defined(CONFIG_PCI)
 /* System RAM mapped over PCI */
diff --git a/arch/m68k/cpu/mcf547x_8x/pci.c b/arch/m68k/cpu/mcf547x_8x/pci.c
index ac42cca2ef..74ba68124f 100644
--- a/arch/m68k/cpu/mcf547x_8x/pci.c
+++ b/arch/m68k/cpu/mcf547x_8x/pci.c
@@ -11,6 +11,7 @@
 #include <pci.h>
 #include <asm/io.h>
 #include <asm/immap.h>
+#include <linux/delay.h>
 
 #if defined(CONFIG_PCI)
 /* System RAM mapped over PCI */
diff --git a/arch/m68k/cpu/mcf547x_8x/slicetimer.c b/arch/m68k/cpu/mcf547x_8x/slicetimer.c
index c4988f9031..33b4cff4ec 100644
--- a/arch/m68k/cpu/mcf547x_8x/slicetimer.c
+++ b/arch/m68k/cpu/mcf547x_8x/slicetimer.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <init.h>
 #include <irq_func.h>
+#include <linux/delay.h>
 
 #include <asm/timer.h>
 #include <asm/immap.h>
diff --git a/arch/m68k/lib/time.c b/arch/m68k/lib/time.c
index eab6e2088e..a3eb6db54b 100644
--- a/arch/m68k/lib/time.c
+++ b/arch/m68k/lib/time.c
@@ -10,6 +10,7 @@
 #include <init.h>
 #include <irq_func.h>
 #include <time.h>
+#include <linux/delay.h>
 
 #include <asm/timer.h>
 #include <asm/immap.h>
diff --git a/arch/microblaze/cpu/timer.c b/arch/microblaze/cpu/timer.c
index cd4aba667e..1b4617311c 100644
--- a/arch/microblaze/cpu/timer.c
+++ b/arch/microblaze/cpu/timer.c
@@ -12,6 +12,7 @@
 #include <time.h>
 #include <asm/microblaze_timer.h>
 #include <asm/microblaze_intc.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/mips/mach-ath79/ar934x/clk.c b/arch/mips/mach-ath79/ar934x/clk.c
index 5d0d4550db..bb972b3a60 100644
--- a/arch/mips/mach-ath79/ar934x/clk.c
+++ b/arch/mips/mach-ath79/ar934x/clk.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
+#include <linux/delay.h>
 #include <mach/ar71xx_regs.h>
 #include <mach/ath79.h>
 #include <wait_bit.h>
diff --git a/arch/mips/mach-ath79/ar934x/ddr.c b/arch/mips/mach-ath79/ar934x/ddr.c
index 289973ec95..9c5a6b68ec 100644
--- a/arch/mips/mach-ath79/ar934x/ddr.c
+++ b/arch/mips/mach-ath79/ar934x/ddr.c
@@ -9,6 +9,7 @@
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
+#include <linux/delay.h>
 #include <mach/ar71xx_regs.h>
 #include <mach/ath79.h>
 
diff --git a/arch/mips/mach-ath79/qca953x/ddr.c b/arch/mips/mach-ath79/qca953x/ddr.c
index 268da7336b..3a009bb532 100644
--- a/arch/mips/mach-ath79/qca953x/ddr.c
+++ b/arch/mips/mach-ath79/qca953x/ddr.c
@@ -8,6 +8,7 @@
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
+#include <linux/delay.h>
 #include <mach/ar71xx_regs.h>
 #include <mach/ath79.h>
 
diff --git a/arch/mips/mach-ath79/qca956x/ddr.c b/arch/mips/mach-ath79/qca956x/ddr.c
index fb2230430c..e61a368141 100644
--- a/arch/mips/mach-ath79/qca956x/ddr.c
+++ b/arch/mips/mach-ath79/qca956x/ddr.c
@@ -9,6 +9,7 @@
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
+#include <linux/delay.h>
 #include <mach/ar71xx_regs.h>
 #include <mach/ath79.h>
 
diff --git a/arch/mips/mach-ath79/reset.c b/arch/mips/mach-ath79/reset.c
index 0ab3ab6383..62330a6575 100644
--- a/arch/mips/mach-ath79/reset.c
+++ b/arch/mips/mach-ath79/reset.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
diff --git a/arch/mips/mach-jz47xx/jz4780/pll.c b/arch/mips/mach-jz47xx/jz4780/pll.c
index 9a46198f36..43827d1967 100644
--- a/arch/mips/mach-jz47xx/jz4780/pll.c
+++ b/arch/mips/mach-jz47xx/jz4780/pll.c
@@ -9,6 +9,7 @@
 #include <config.h>
 #include <common.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <mach/jz4780.h>
 
 #define CPM_CPCCR		0x00
diff --git a/arch/mips/mach-jz47xx/jz4780/sdram.c b/arch/mips/mach-jz47xx/jz4780/sdram.c
index 3049a63d57..efbb82f62b 100644
--- a/arch/mips/mach-jz47xx/jz4780/sdram.c
+++ b/arch/mips/mach-jz47xx/jz4780/sdram.c
@@ -13,6 +13,7 @@
 #include <hang.h>
 #include <init.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <mach/jz4780.h>
 #include <mach/jz4780_dram.h>
 
diff --git a/arch/mips/mach-jz47xx/jz4780/timer.c b/arch/mips/mach-jz47xx/jz4780/timer.c
index 340e35e6fc..70db74d3a0 100644
--- a/arch/mips/mach-jz47xx/jz4780/timer.c
+++ b/arch/mips/mach-jz47xx/jz4780/timer.c
@@ -14,6 +14,7 @@
 #include <time.h>
 #include <asm/io.h>
 #include <asm/mipsregs.h>
+#include <linux/delay.h>
 #include <mach/jz4780.h>
 
 #define TCU_TSR		0x1C	/* Timer Stop Register */
diff --git a/arch/mips/mach-mtmips/ddr_calibrate.c b/arch/mips/mach-mtmips/ddr_calibrate.c
index bcc4241ba3..dfc42ba92f 100644
--- a/arch/mips/mach-mtmips/ddr_calibrate.c
+++ b/arch/mips/mach-mtmips/ddr_calibrate.c
@@ -19,6 +19,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <log.h>
+#include <linux/delay.h>
 #include <linux/io.h>
 #include <asm/cacheops.h>
 #include <asm/io.h>
diff --git a/arch/mips/mach-mtmips/ddr_init.c b/arch/mips/mach-mtmips/ddr_init.c
index cd355cc840..6c6d0933f2 100644
--- a/arch/mips/mach-mtmips/ddr_init.c
+++ b/arch/mips/mach-mtmips/ddr_init.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <linux/bitops.h>
+#include <linux/delay.h>
 #include <linux/io.h>
 #include <linux/sizes.h>
 #include <mach/ddr.h>
diff --git a/arch/mips/mach-mtmips/mt7628/ddr.c b/arch/mips/mach-mtmips/mt7628/ddr.c
index 06c0ca6854..3df85cd144 100644
--- a/arch/mips/mach-mtmips/mt7628/ddr.c
+++ b/arch/mips/mach-mtmips/mt7628/ddr.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <asm/addrspace.h>
 #include <linux/bitops.h>
+#include <linux/delay.h>
 #include <linux/sizes.h>
 #include <linux/io.h>
 #include <mach/ddr.h>
diff --git a/arch/nds32/cpu/n1213/ag101/timer.c b/arch/nds32/cpu/n1213/ag101/timer.c
index 8208b6de90..394fc10ec3 100644
--- a/arch/nds32/cpu/n1213/ag101/timer.c
+++ b/arch/nds32/cpu/n1213/ag101/timer.c
@@ -15,6 +15,7 @@
 #include <time.h>
 #include <asm/io.h>
 #include <faraday/fttmr010.h>
+#include <linux/delay.h>
 
 static ulong timestamp;
 static ulong lastdec;
diff --git a/arch/powerpc/cpu/mpc83xx/cpu.c b/arch/powerpc/cpu/mpc83xx/cpu.c
index 0307039f37..cefbcf6e81 100644
--- a/arch/powerpc/cpu/mpc83xx/cpu.c
+++ b/arch/powerpc/cpu/mpc83xx/cpu.c
@@ -19,6 +19,7 @@
 #include <command.h>
 #include <mpc83xx.h>
 #include <asm/processor.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <tsec.h>
 #include <netdev.h>
diff --git a/arch/powerpc/cpu/mpc83xx/cpu_init.c b/arch/powerpc/cpu/mpc83xx/cpu_init.c
index 4defe98477..438b14b162 100644
--- a/arch/powerpc/cpu/mpc83xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc83xx/cpu_init.c
@@ -12,6 +12,7 @@
 #ifdef CONFIG_USB_EHCI_FSL
 #include <usb/ehci-ci.h>
 #endif
+#include <linux/delay.h>
 
 #include "lblaw/lblaw.h"
 #include "elbc/elbc.h"
diff --git a/arch/powerpc/cpu/mpc83xx/pci.c b/arch/powerpc/cpu/mpc83xx/pci.c
index a183ed6343..74f824d2bc 100644
--- a/arch/powerpc/cpu/mpc83xx/pci.c
+++ b/arch/powerpc/cpu/mpc83xx/pci.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <init.h>
 #include <pci.h>
+#include <linux/delay.h>
 
 #if defined(CONFIG_OF_LIBFDT)
 #include <linux/libfdt.h>
diff --git a/arch/powerpc/cpu/mpc83xx/pcie.c b/arch/powerpc/cpu/mpc83xx/pcie.c
index b500ddd3f3..785d4805a4 100644
--- a/arch/powerpc/cpu/mpc83xx/pcie.c
+++ b/arch/powerpc/cpu/mpc83xx/pcie.c
@@ -11,6 +11,7 @@
 #include <pci.h>
 #include <mpc83xx.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/powerpc/cpu/mpc83xx/serdes.c b/arch/powerpc/cpu/mpc83xx/serdes.c
index 8242f95265..bb963ee5e2 100644
--- a/arch/powerpc/cpu/mpc83xx/serdes.c
+++ b/arch/powerpc/cpu/mpc83xx/serdes.c
@@ -14,6 +14,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/fsl_mpc83xx_serdes.h>
+#include <linux/delay.h>
 
 /* SerDes registers */
 #define FSL_SRDSCR0_OFFS		0x0
diff --git a/arch/powerpc/cpu/mpc83xx/spd_sdram.c b/arch/powerpc/cpu/mpc83xx/spd_sdram.c
index 34faff2df5..c28e4425ee 100644
--- a/arch/powerpc/cpu/mpc83xx/spd_sdram.c
+++ b/arch/powerpc/cpu/mpc83xx/spd_sdram.c
@@ -23,6 +23,7 @@
 #include <spd.h>
 #include <asm/mmu.h>
 #include <spd_sdram.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c
index 8de218666b..9bd573dbd6 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu.c
@@ -29,6 +29,7 @@
 #include <asm/processor.h>
 #include <fsl_ddr_sdram.h>
 #include <asm/ppc.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init.c b/arch/powerpc/cpu/mpc85xx/cpu_init.c
index 1c2d8edf60..4bca2671d5 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c
@@ -33,6 +33,7 @@
 #include <fsl_usb.h>
 #include <hwconfig.h>
 #include <linux/compiler.h>
+#include <linux/delay.h>
 #include "mp.h"
 #ifdef CONFIG_CHAIN_OF_TRUST
 #include <fsl_validate.h>
diff --git a/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c b/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c
index 796bc15a7c..ee5015ec8f 100644
--- a/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/processor.h>
 #include <asm/fsl_law.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <fsl_errata.h>
 #include "fsl_corenet2_serdes.h"
diff --git a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c
index e6d4707e3e..f5126e2c8a 100644
--- a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c
@@ -15,6 +15,7 @@
 #include <asm/io.h>
 #include <asm/processor.h>
 #include <asm/fsl_law.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include "fsl_corenet_serdes.h"
 
diff --git a/arch/powerpc/cpu/mpc85xx/mp.c b/arch/powerpc/cpu/mpc85xx/mp.c
index 28e1580a43..8822cf29fe 100644
--- a/arch/powerpc/cpu/mpc85xx/mp.c
+++ b/arch/powerpc/cpu/mpc85xx/mp.c
@@ -15,6 +15,7 @@
 #include <asm/mmu.h>
 #include <asm/fsl_law.h>
 #include <fsl_ddr_sdram.h>
+#include <linux/delay.h>
 #include "mp.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/powerpc/cpu/mpc85xx/p1021_serdes.c b/arch/powerpc/cpu/mpc85xx/p1021_serdes.c
index 1a7c839d61..6b8e447e94 100644
--- a/arch/powerpc/cpu/mpc85xx/p1021_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/p1021_serdes.c
@@ -9,6 +9,7 @@
 #include <asm/io.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
+#include <linux/delay.h>
 
 typedef struct serdes_85xx {
 	u32	srdscr0;	/* 0x00 - SRDS Control Register 0 */
diff --git a/arch/powerpc/cpu/mpc85xx/spl_minimal.c b/arch/powerpc/cpu/mpc85xx/spl_minimal.c
index 972049b8e9..21b35db08d 100644
--- a/arch/powerpc/cpu/mpc85xx/spl_minimal.c
+++ b/arch/powerpc/cpu/mpc85xx/spl_minimal.c
@@ -8,6 +8,7 @@
 #include <asm/global_data.h>
 #include <fsl_ifc.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/powerpc/cpu/mpc8xxx/srio.c b/arch/powerpc/cpu/mpc8xxx/srio.c
index 17b11744a4..c73cf9319c 100644
--- a/arch/powerpc/cpu/mpc8xxx/srio.c
+++ b/arch/powerpc/cpu/mpc8xxx/srio.c
@@ -10,6 +10,7 @@
 #include <asm/fsl_law.h>
 #include <asm/fsl_serdes.h>
 #include <asm/fsl_srio.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 
 #ifdef CONFIG_SRIO_PCIE_BOOT_MASTER
diff --git a/arch/powerpc/lib/time.c b/arch/powerpc/lib/time.c
index 58931f0e6e..8d6babfb83 100644
--- a/arch/powerpc/lib/time.c
+++ b/arch/powerpc/lib/time.c
@@ -8,6 +8,7 @@
 #include <init.h>
 #include <time.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 /* ------------------------------------------------------------------------- */
 
diff --git a/arch/sandbox/cpu/cpu.c b/arch/sandbox/cpu/cpu.c
index 0d9300736d..fb857e53d5 100644
--- a/arch/sandbox/cpu/cpu.c
+++ b/arch/sandbox/cpu/cpu.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <log.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <os.h>
 #include <asm/io.h>
diff --git a/arch/sh/lib/time_sh2.c b/arch/sh/lib/time_sh2.c
index ef7c6073cc..5484c543c6 100644
--- a/arch/sh/lib/time_sh2.c
+++ b/arch/sh/lib/time_sh2.c
@@ -12,6 +12,7 @@
 #include <time.h>
 #include <asm/io.h>
 #include <asm/processor.h>
+#include <linux/delay.h>
 
 #define CMT_CMCSR_INIT	0x0001	/* PCLK/32 */
 #define CMT_CMCSR_CALIB 0x0000
diff --git a/arch/x86/cpu/apollolake/punit.c b/arch/x86/cpu/apollolake/punit.c
index 600c5ea936..e76f2805d7 100644
--- a/arch/x86/cpu/apollolake/punit.c
+++ b/arch/x86/cpu/apollolake/punit.c
@@ -13,6 +13,7 @@
 #include <asm/io.h>
 #include <asm/pci.h>
 #include <asm/arch/systemagent.h>
+#include <linux/delay.h>
 
 /*
  * Punit Initialisation code. This all isn't documented, but
diff --git a/arch/x86/cpu/broadwell/cpu_full.c b/arch/x86/cpu/broadwell/cpu_full.c
index 120879038d..64a1cd414f 100644
--- a/arch/x86/cpu/broadwell/cpu_full.c
+++ b/arch/x86/cpu/broadwell/cpu_full.c
@@ -20,6 +20,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/pch.h>
 #include <asm/arch/rcb.h>
+#include <linux/delay.h>
 
 struct cpu_broadwell_priv {
 	bool ht_disabled;
diff --git a/arch/x86/cpu/broadwell/iobp.c b/arch/x86/cpu/broadwell/iobp.c
index 8a3ca6cde7..cb5595c930 100644
--- a/arch/x86/cpu/broadwell/iobp.c
+++ b/arch/x86/cpu/broadwell/iobp.c
@@ -10,6 +10,7 @@
 #include <asm/intel_regs.h>
 #include <asm/io.h>
 #include <asm/arch/pch.h>
+#include <linux/delay.h>
 
 #define IOBP_RETRY 1000
 
diff --git a/arch/x86/cpu/broadwell/me.c b/arch/x86/cpu/broadwell/me.c
index 7991e1ea07..ae16ce2649 100644
--- a/arch/x86/cpu/broadwell/me.c
+++ b/arch/x86/cpu/broadwell/me.c
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <log.h>
 #include <asm/arch/me.h>
+#include <linux/delay.h>
 
 static inline void me_read_dword_ptr(struct udevice *dev, void *ptr, int offset)
 {
diff --git a/arch/x86/cpu/broadwell/pch.c b/arch/x86/cpu/broadwell/pch.c
index 8c71e43a2d..9bcf211af9 100644
--- a/arch/x86/cpu/broadwell/pch.c
+++ b/arch/x86/cpu/broadwell/pch.c
@@ -24,6 +24,7 @@
 #include <asm/arch/serialio.h>
 #include <asm/arch/spi.h>
 #include <dm/uclass-internal.h>
+#include <linux/delay.h>
 
 #define BIOS_CTRL	0xdc
 
diff --git a/arch/x86/cpu/broadwell/sata.c b/arch/x86/cpu/broadwell/sata.c
index 9f3c56b204..641da515c8 100644
--- a/arch/x86/cpu/broadwell/sata.c
+++ b/arch/x86/cpu/broadwell/sata.c
@@ -15,6 +15,7 @@
 #include <asm/pch_common.h>
 #include <asm/pch_common.h>
 #include <asm/arch/pch.h>
+#include <linux/delay.h>
 
 struct sata_platdata {
 	int port_map;
diff --git a/arch/x86/cpu/ivybridge/bd82x6x.c b/arch/x86/cpu/ivybridge/bd82x6x.c
index d276cbe13b..d72c0d637a 100644
--- a/arch/x86/cpu/ivybridge/bd82x6x.c
+++ b/arch/x86/cpu/ivybridge/bd82x6x.c
@@ -18,6 +18,7 @@
 #include <asm/arch/model_206ax.h>
 #include <asm/arch/pch.h>
 #include <asm/arch/sandybridge.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/ivybridge/early_me.c b/arch/x86/cpu/ivybridge/early_me.c
index cae9578516..bee1671baf 100644
--- a/arch/x86/cpu/ivybridge/early_me.c
+++ b/arch/x86/cpu/ivybridge/early_me.c
@@ -16,6 +16,7 @@
 #include <asm/arch/me.h>
 #include <asm/arch/pch.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 static const char *const me_ack_values[] = {
 	[ME_HFS_ACK_NO_DID]	= "No DID Ack received",
diff --git a/arch/x86/cpu/ivybridge/northbridge.c b/arch/x86/cpu/ivybridge/northbridge.c
index 877b31b9d6..b713fcb1cf 100644
--- a/arch/x86/cpu/ivybridge/northbridge.c
+++ b/arch/x86/cpu/ivybridge/northbridge.c
@@ -18,6 +18,7 @@
 #include <asm/arch/pch.h>
 #include <asm/arch/model_206ax.h>
 #include <asm/arch/sandybridge.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/mp_init.c b/arch/x86/cpu/mp_init.c
index c3cd080885..7fde4ff7e1 100644
--- a/arch/x86/cpu/mp_init.c
+++ b/arch/x86/cpu/mp_init.c
@@ -26,6 +26,7 @@
 #include <dm/uclass-internal.h>
 #include <dm/lists.h>
 #include <dm/root.h>
+#include <linux/delay.h>
 #include <linux/linkage.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/quark/quark.c b/arch/x86/cpu/quark/quark.c
index e2e2d9fe33..ddad02e375 100644
--- a/arch/x86/cpu/quark/quark.c
+++ b/arch/x86/cpu/quark/quark.c
@@ -18,6 +18,7 @@
 #include <asm/arch/device.h>
 #include <asm/arch/msg_port.h>
 #include <asm/arch/quark.h>
+#include <linux/delay.h>
 
 static void quark_setup_mtrr(void)
 {
diff --git a/arch/x86/lib/pmu.c b/arch/x86/lib/pmu.c
index 08fbe99039..3cd7b1f536 100644
--- a/arch/x86/lib/pmu.c
+++ b/arch/x86/lib/pmu.c
@@ -8,6 +8,7 @@
 #include <syscon.h>
 #include <asm/cpu.h>
 #include <asm/pmu.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/io.h>
 
diff --git a/arch/x86/lib/scu.c b/arch/x86/lib/scu.c
index a6f8297e72..41e6739236 100644
--- a/arch/x86/lib/scu.c
+++ b/arch/x86/lib/scu.c
@@ -15,6 +15,7 @@
 #include <syscon.h>
 #include <asm/cpu.h>
 #include <asm/scu.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/io.h>
 #include <linux/kernel.h>
diff --git a/arch/xtensa/lib/time.c b/arch/xtensa/lib/time.c
index 62bbe37b80..3a02c38493 100644
--- a/arch/xtensa/lib/time.c
+++ b/arch/xtensa/lib/time.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <time.h>
 #include <asm/global_data.h>
+#include <linux/delay.h>
 #include <linux/stringify.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/BuR/common/br_resetc.c b/board/BuR/common/br_resetc.c
index 70ad8322ef..5006687fbf 100644
--- a/board/BuR/common/br_resetc.c
+++ b/board/BuR/common/br_resetc.c
@@ -10,6 +10,7 @@
 #include <errno.h>
 #include <i2c.h>
 #include <dm/uclass.h>
+#include <linux/delay.h>
 #include "br_resetc.h"
 
 /* I2C Address of controller */
diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c
index 7986bc8d4e..3bc1d064ca 100644
--- a/board/BuR/common/common.c
+++ b/board/BuR/common/common.c
@@ -15,6 +15,7 @@
 #include <fdtdec.h>
 #include <i2c.h>
 #include <lcd.h>
+#include <linux/delay.h>
 #include "bur_common.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/CZ.NIC/turris_mox/mox_sp.c b/board/CZ.NIC/turris_mox/mox_sp.c
index 3c23471e65..8139345ff2 100644
--- a/board/CZ.NIC/turris_mox/mox_sp.c
+++ b/board/CZ.NIC/turris_mox/mox_sp.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <asm/arch/soc.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 #define RWTM_BASE		(MVEBU_REGISTER(0xb0000))
 #define RWTM_CMD_PARAM(i)	(size_t)(RWTM_BASE + (i) * 4)
diff --git a/board/CZ.NIC/turris_mox/turris_mox.c b/board/CZ.NIC/turris_mox/turris_mox.c
index e8ec240dd7..f3c3996e32 100644
--- a/board/CZ.NIC/turris_mox/turris_mox.c
+++ b/board/CZ.NIC/turris_mox/turris_mox.c
@@ -14,6 +14,7 @@
 #include <env.h>
 #include <fdt_support.h>
 #include <init.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <linux/string.h>
 #include <miiphy.h>
diff --git a/board/CarMediaLab/flea3/flea3.c b/board/CarMediaLab/flea3/flea3.c
index fb66c9ecc7..61d965f5f6 100644
--- a/board/CarMediaLab/flea3/flea3.c
+++ b/board/CarMediaLab/flea3/flea3.c
@@ -11,6 +11,7 @@
 #include <init.h>
 #include <asm/io.h>
 #include <env.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/crm_regs.h>
diff --git a/board/Marvell/gplugd/gplugd.c b/board/Marvell/gplugd/gplugd.c
index 459b7ba82c..1e2f22735e 100644
--- a/board/Marvell/gplugd/gplugd.c
+++ b/board/Marvell/gplugd/gplugd.c
@@ -21,6 +21,7 @@
 #include <asm/gpio.h>
 #include <miiphy.h>
 #include <asm/mach-types.h>
+#include <linux/delay.h>
 
 #ifdef CONFIG_ARMADA100_FEC
 #include <net.h>
diff --git a/board/Marvell/mvebu_armada-37xx/board.c b/board/Marvell/mvebu_armada-37xx/board.c
index 29bd6a9a40..9bea1986d4 100644
--- a/board/Marvell/mvebu_armada-37xx/board.c
+++ b/board/Marvell/mvebu_armada-37xx/board.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/Marvell/mvebu_armada-8k/board.c b/board/Marvell/mvebu_armada-8k/board.c
index 499e89367f..60b0024630 100644
--- a/board/Marvell/mvebu_armada-8k/board.c
+++ b/board/Marvell/mvebu_armada-8k/board.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/Synology/ds109/ds109.c b/board/Synology/ds109/ds109.c
index c4cd95cd80..aa2987d924 100644
--- a/board/Synology/ds109/ds109.c
+++ b/board/Synology/ds109/ds109.c
@@ -13,6 +13,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
 #include <asm/arch/mpp.h>
+#include <linux/delay.h>
 #include "ds109.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/advantech/dms-ba16/dms-ba16.c b/board/advantech/dms-ba16/dms-ba16.c
index 33e0e4a4ae..28e505e6c5 100644
--- a/board/advantech/dms-ba16/dms-ba16.c
+++ b/board/advantech/dms-ba16/dms-ba16.c
@@ -11,6 +11,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/mx6-pins.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/mxc_i2c.h>
diff --git a/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c b/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c
index 6168dc9220..ea057d27cf 100644
--- a/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c
+++ b/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c
@@ -9,6 +9,7 @@
 #include <env.h>
 #include <errno.h>
 #include <init.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
diff --git a/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c b/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c
index b96cf0b59c..982cb157b7 100644
--- a/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c
+++ b/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <init.h>
 #include <net.h>
+#include <linux/delay.h>
 #include <linux/io.h>
 #include <miiphy.h>
 #include <netdev.h>
diff --git a/board/armadeus/apf27/fpga.c b/board/armadeus/apf27/fpga.c
index 5d989481df..9e2f39f981 100644
--- a/board/armadeus/apf27/fpga.c
+++ b/board/armadeus/apf27/fpga.c
@@ -10,6 +10,7 @@
  */
 #include <common.h>
 #include <log.h>
+#include <linux/delay.h>
 
 #include <asm/arch/imx-regs.h>
 #include <asm/gpio.h>
diff --git a/board/armltd/integrator/pci.c b/board/armltd/integrator/pci.c
index 3ef5993213..28efc33f1f 100644
--- a/board/armltd/integrator/pci.c
+++ b/board/armltd/integrator/pci.c
@@ -25,6 +25,7 @@
 #include <pci.h>
 #include <asm/io.h>
 #include <linux/bug.h>
+#include <linux/delay.h>
 #include "integrator-sc.h"
 #include "pci_v3.h"
 
diff --git a/board/armltd/integrator/timer.c b/board/armltd/integrator/timer.c
index d701669be0..d220b877d6 100644
--- a/board/armltd/integrator/timer.c
+++ b/board/armltd/integrator/timer.c
@@ -19,6 +19,7 @@
 #include <common.h>
 #include <div64.h>
 #include <time.h>
+#include <linux/delay.h>
 
 #ifdef CONFIG_ARCH_CINTEGRATOR
 #define DIV_CLOCK_INIT	1
@@ -124,7 +125,7 @@ ulong get_timer (ulong base_ticks)
 }
 
 /* delay usec useconds */
-void __udelay (unsigned long usec)
+void __udelay(unsigned long usec)
 {
 	ulong tmo, tmp;
 
diff --git a/board/armltd/vexpress64/pcie.c b/board/armltd/vexpress64/pcie.c
index 3285a33a69..02de58b360 100644
--- a/board/armltd/vexpress64/pcie.c
+++ b/board/armltd/vexpress64/pcie.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <linux/bitops.h>
 #include <pci_ids.h>
+#include <linux/delay.h>
 #include "pcie.h"
 
 /* XpressRICH3 support */
diff --git a/board/astro/mcf5373l/mcf5373l.c b/board/astro/mcf5373l/mcf5373l.c
index 9adf58eb8a..e7c2b90930 100644
--- a/board/astro/mcf5373l/mcf5373l.c
+++ b/board/astro/mcf5373l/mcf5373l.c
@@ -13,6 +13,7 @@
 #include <asm/m5329.h>
 #include <asm/immap_5329.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 /* needed for astro bus: */
 #include <asm/uart.h>
diff --git a/board/barco/platinum/platinum_picon.c b/board/barco/platinum/platinum_picon.c
index 7d99b1694d..3fc29f9e08 100644
--- a/board/barco/platinum/platinum_picon.c
+++ b/board/barco/platinum/platinum_picon.c
@@ -14,6 +14,7 @@
 #include <asm/mach-imx/mxc_i2c.h>
 #include <i2c.h>
 #include <miiphy.h>
+#include <linux/delay.h>
 
 #include "platinum.h"
 
diff --git a/board/barco/platinum/platinum_titanium.c b/board/barco/platinum/platinum_titanium.c
index 5758c147ed..9f7c93b4d5 100644
--- a/board/barco/platinum/platinum_titanium.c
+++ b/board/barco/platinum/platinum_titanium.c
@@ -12,6 +12,7 @@
 #include <asm/mach-imx/mxc_i2c.h>
 #include <miiphy.h>
 #include <micrel.h>
+#include <linux/delay.h>
 
 #include "platinum.h"
 
diff --git a/board/barco/titanium/titanium.c b/board/barco/titanium/titanium.c
index 016e0adc06..91c70a8473 100644
--- a/board/barco/titanium/titanium.c
+++ b/board/barco/titanium/titanium.c
@@ -22,6 +22,7 @@
 #include <micrel.h>
 #include <miiphy.h>
 #include <netdev.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/beckhoff/mx53cx9020/mx53cx9020.c b/board/beckhoff/mx53cx9020/mx53cx9020.c
index 398e4ed720..617b545232 100644
--- a/board/beckhoff/mx53cx9020/mx53cx9020.c
+++ b/board/beckhoff/mx53cx9020/mx53cx9020.c
@@ -16,6 +16,7 @@
 #include <asm/mach-imx/mx5_video.h>
 #include <ACEX1K.h>
 #include <asm/gpio.h>
+#include <linux/delay.h>
 
 enum LED_GPIOS {
 	GPIO_SD1_CD = IMX_GPIO_NR(1, 1),
diff --git a/board/bluewater/gurnard/gurnard.c b/board/bluewater/gurnard/gurnard.c
index 4ae70e1aa5..2bbb203548 100644
--- a/board/bluewater/gurnard/gurnard.c
+++ b/board/bluewater/gurnard/gurnard.c
@@ -33,6 +33,7 @@
 #include <asm/arch/clk.h>
 #include <asm/arch/gpio.h>
 #include <dm/uclass-internal.h>
+#include <linux/delay.h>
 
 #ifdef CONFIG_GURNARD_SPLASH
 #include "splash_logo.h"
diff --git a/board/bluewater/snapper9260/snapper9260.c b/board/bluewater/snapper9260/snapper9260.c
index 47ce307880..8e2b7e000f 100644
--- a/board/bluewater/snapper9260/snapper9260.c
+++ b/board/bluewater/snapper9260/snapper9260.c
@@ -23,6 +23,7 @@
 #include <netdev.h>
 #include <i2c.h>
 #include <pca953x.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/bosch/shc/board.c b/board/bosch/shc/board.c
index 6e0ad4b53f..6a102d3853 100644
--- a/board/bosch/shc/board.c
+++ b/board/bosch/shc/board.c
@@ -35,6 +35,7 @@
 #include <i2c.h>
 #include <miiphy.h>
 #include <cpsw.h>
+#include <linux/delay.h>
 #include <power/tps65217.h>
 #include <env_internal.h>
 #include <watchdog.h>
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c
index 92a7a2fc6e..d49725daa8 100644
--- a/board/boundary/nitrogen6x/nitrogen6x.c
+++ b/board/boundary/nitrogen6x/nitrogen6x.c
@@ -16,6 +16,7 @@
 #include <asm/arch/sys_proto.h>
 #include <malloc.h>
 #include <asm/arch/mx6-pins.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
diff --git a/board/bticino/mamoj/spl.c b/board/bticino/mamoj/spl.c
index ece37800bf..a9bb2a55e5 100644
--- a/board/bticino/mamoj/spl.c
+++ b/board/bticino/mamoj/spl.c
@@ -9,6 +9,7 @@
 #include <init.h>
 #include <serial.h>
 #include <spl.h>
+#include <linux/delay.h>
 
 #include <asm/io.h>
 #include <linux/sizes.h>
diff --git a/board/buffalo/lsxl/lsxl.c b/board/buffalo/lsxl/lsxl.c
index 712ef11666..64daa456b3 100644
--- a/board/buffalo/lsxl/lsxl.c
+++ b/board/buffalo/lsxl/lsxl.c
@@ -24,6 +24,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/mpp.h>
 #include <asm/arch/gpio.h>
+#include <linux/delay.h>
 
 #include "lsxl.h"
 
diff --git a/board/ccv/xpress/xpress.c b/board/ccv/xpress/xpress.c
index dc86d43d9a..e41f0639ea 100644
--- a/board/ccv/xpress/xpress.c
+++ b/board/ccv/xpress/xpress.c
@@ -25,6 +25,7 @@
 #include <mmc.h>
 #include <netdev.h>
 #include <usb.h>
+#include <linux/delay.h>
 #include <usb/ehci-ci.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/cobra5272/flash.c b/board/cobra5272/flash.c
index 5860cd0ac0..4337f4879d 100644
--- a/board/cobra5272/flash.c
+++ b/board/cobra5272/flash.c
@@ -10,6 +10,7 @@
 #include <flash.h>
 #include <irq_func.h>
 #include <uuid.h>
+#include <linux/delay.h>
 
 #define PHYS_FLASH_1 CONFIG_SYS_FLASH_BASE
 #define FLASH_BANK_SIZE 0x200000
@@ -235,7 +236,7 @@ int flash_erase(flash_info_t *info, int s_first, int s_last)
 
       outahere:
 	/* allow flash to settle - wait 10 ms */
-	udelay (10000);
+	mdelay(10);
 
 	if (iflag)
 		enable_interrupts();
diff --git a/board/compulab/cl-som-imx7/cl-som-imx7.c b/board/compulab/cl-som-imx7/cl-som-imx7.c
index e97efc1dc3..8b3bd5e5f6 100644
--- a/board/compulab/cl-som-imx7/cl-som-imx7.c
+++ b/board/compulab/cl-som-imx7/cl-som-imx7.c
@@ -15,6 +15,7 @@
 #include <phy.h>
 #include <netdev.h>
 #include <fsl_esdhc_imx.h>
+#include <linux/delay.h>
 #include <power/pmic.h>
 #include <power/pfuze3000_pmic.h>
 #include <asm/mach-imx/mxc_i2c.h>
diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c
index f0a821d9a9..4d71bedfb9 100644
--- a/board/compulab/cm_fx6/cm_fx6.c
+++ b/board/compulab/cm_fx6/cm_fx6.c
@@ -35,6 +35,7 @@
 #include <dm/platform_data/serial_mxc.h>
 #include <dm/device-internal.h>
 #include <jffs2/load_kernel.h>
+#include <linux/delay.h>
 #include "common.h"
 #include "../common/eeprom.h"
 #include "../common/common.h"
diff --git a/board/compulab/cm_fx6/spl.c b/board/compulab/cm_fx6/spl.c
index 592d741095..7d8243563a 100644
--- a/board/compulab/cm_fx6/spl.c
+++ b/board/compulab/cm_fx6/spl.c
@@ -20,6 +20,7 @@
 #include <asm/arch/crm_regs.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <fsl_esdhc_imx.h>
+#include <linux/delay.h>
 #include "common.h"
 
 enum ddr_config {
diff --git a/board/compulab/cm_t335/cm_t335.c b/board/compulab/cm_t335/cm_t335.c
index 4497aa5af8..75b56f7eee 100644
--- a/board/compulab/cm_t335/cm_t335.c
+++ b/board/compulab/cm_t335/cm_t335.c
@@ -14,6 +14,7 @@
 #include <net.h>
 #include <status_led.h>
 #include <cpsw.h>
+#include <linux/delay.h>
 
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/hardware_am33xx.h>
diff --git a/board/compulab/cm_t35/cm_t35.c b/board/compulab/cm_t35/cm_t35.c
index b714712f2a..4b67df4f1a 100644
--- a/board/compulab/cm_t35/cm_t35.c
+++ b/board/compulab/cm_t35/cm_t35.c
@@ -23,6 +23,7 @@
 #include <splash.h>
 #include <twl4030.h>
 #include <linux/compiler.h>
+#include <linux/delay.h>
 
 #include <asm/io.h>
 #include <linux/errno.h>
diff --git a/board/compulab/cm_t43/cm_t43.c b/board/compulab/cm_t43/cm_t43.c
index 9348d6dcad..f26e42b263 100644
--- a/board/compulab/cm_t43/cm_t43.c
+++ b/board/compulab/cm_t43/cm_t43.c
@@ -11,6 +11,7 @@
 #include <asm/gpio.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/emif.h>
+#include <linux/delay.h>
 #include <power/pmic.h>
 #include <power/tps65218.h>
 #include "board.h"
diff --git a/board/compulab/cm_t54/cm_t54.c b/board/compulab/cm_t54/cm_t54.c
index 0efbf761da..413f3c9c8f 100644
--- a/board/compulab/cm_t54/cm_t54.c
+++ b/board/compulab/cm_t54/cm_t54.c
@@ -15,6 +15,7 @@
 #include <mmc.h>
 #include <palmas.h>
 #include <spl.h>
+#include <linux/delay.h>
 
 #include <asm/gpio.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/compulab/common/common.c b/board/compulab/common/common.c
index 2f92c6564d..528c97df19 100644
--- a/board/compulab/common/common.c
+++ b/board/compulab/common/common.c
@@ -10,6 +10,7 @@
 #include <asm/bootm.h>
 #include <asm/gpio.h>
 #include <asm/setup.h>
+#include <linux/delay.h>
 
 #include "common.h"
 #include "eeprom.h"
diff --git a/board/compulab/common/omap3_smc911x.c b/board/compulab/common/omap3_smc911x.c
index 4b869ec3af..f0d365272c 100644
--- a/board/compulab/common/omap3_smc911x.c
+++ b/board/compulab/common/omap3_smc911x.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <netdev.h>
+#include <linux/delay.h>
 
 #include <asm/io.h>
 #include <linux/errno.h>
diff --git a/board/congatec/cgtqmx6eval/cgtqmx6eval.c b/board/congatec/cgtqmx6eval/cgtqmx6eval.c
index 16f655f188..044cefd979 100644
--- a/board/congatec/cgtqmx6eval/cgtqmx6eval.c
+++ b/board/congatec/cgtqmx6eval/cgtqmx6eval.c
@@ -27,6 +27,7 @@
 #include <fsl_esdhc_imx.h>
 #include <i2c.h>
 #include <input.h>
+#include <linux/delay.h>
 #include <power/pmic.h>
 #include <power/pfuze100_pmic.h>
 #include <linux/fb.h>
diff --git a/board/creative/xfi3/xfi3.c b/board/creative/xfi3/xfi3.c
index 4a32893a79..adc908143d 100644
--- a/board/creative/xfi3/xfi3.c
+++ b/board/creative/xfi3/xfi3.c
@@ -19,6 +19,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/cssi/MCR3000/MCR3000.c b/board/cssi/MCR3000/MCR3000.c
index 138d0c61f1..570e846a21 100644
--- a/board/cssi/MCR3000/MCR3000.c
+++ b/board/cssi/MCR3000/MCR3000.c
@@ -17,6 +17,7 @@
 #include <asm/io.h>
 #include <dm/uclass.h>
 #include <wdt.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/dfi/dfi-bt700/dfi-bt700.c b/board/dfi/dfi-bt700/dfi-bt700.c
index 68d7cd8154..87506a77a1 100644
--- a/board/dfi/dfi-bt700/dfi-bt700.c
+++ b/board/dfi/dfi-bt700/dfi-bt700.c
@@ -10,6 +10,7 @@
 #include <asm/gpio.h>
 #include <asm/ibmpc.h>
 #include <asm/pnp_def.h>
+#include <linux/delay.h>
 
 int board_early_init_f(void)
 {
diff --git a/board/dhelectronics/dh_imx6/dh_imx6.c b/board/dhelectronics/dh_imx6/dh_imx6.c
index 4df293b7ab..8f50433f17 100644
--- a/board/dhelectronics/dh_imx6/dh_imx6.c
+++ b/board/dhelectronics/dh_imx6/dh_imx6.c
@@ -32,6 +32,7 @@
 #include <i2c_eeprom.h>
 #include <mmc.h>
 #include <usb.h>
+#include <linux/delay.h>
 #include <usb/ehci-ci.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/dhelectronics/dh_imx6/dh_imx6_spl.c b/board/dhelectronics/dh_imx6/dh_imx6_spl.c
index fd6099c566..ed4dea45ea 100644
--- a/board/dhelectronics/dh_imx6/dh_imx6_spl.c
+++ b/board/dhelectronics/dh_imx6/dh_imx6_spl.c
@@ -25,6 +25,7 @@
 #include <i2c.h>
 #include <mmc.h>
 #include <spl.h>
+#include <linux/delay.h>
 
 #define ENET_PAD_CTRL							\
 	(PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm |	\
diff --git a/board/dhelectronics/dh_stm32mp1/board.c b/board/dhelectronics/dh_stm32mp1/board.c
index 913032d187..376fc7032e 100644
--- a/board/dhelectronics/dh_stm32mp1/board.c
+++ b/board/dhelectronics/dh_stm32mp1/board.c
@@ -32,6 +32,7 @@
 #include <mtd_node.h>
 #include <netdev.h>
 #include <phy.h>
+#include <linux/delay.h>
 #include <power/regulator.h>
 #include <remoteproc.h>
 #include <reset.h>
diff --git a/board/egnite/ethernut5/ethernut5_pwrman.c b/board/egnite/ethernut5/ethernut5_pwrman.c
index 7dbb6e8f2b..81f1abf2fa 100644
--- a/board/egnite/ethernut5/ethernut5_pwrman.c
+++ b/board/egnite/ethernut5/ethernut5_pwrman.c
@@ -38,6 +38,7 @@
 #include <asm/arch/gpio.h>
 #include <asm/io.h>
 #include <i2c.h>
+#include <linux/delay.h>
 
 #include "ethernut5_pwrman.h"
 
diff --git a/board/el/el6x/el6x.c b/board/el/el6x/el6x.c
index 286c1adabc..d3e2981fa8 100644
--- a/board/el/el6x/el6x.c
+++ b/board/el/el6x/el6x.c
@@ -13,6 +13,7 @@
 #include <asm/arch/iomux.h>
 #include <asm/arch/mx6-pins.h>
 #include <env.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/mxc_i2c.h>
diff --git a/board/embest/mx6boards/mx6boards.c b/board/embest/mx6boards/mx6boards.c
index 50b6f98c29..e0834f03c7 100644
--- a/board/embest/mx6boards/mx6boards.c
+++ b/board/embest/mx6boards/mx6boards.c
@@ -20,6 +20,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/mx6-pins.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
diff --git a/board/engicam/common/spl.c b/board/engicam/common/spl.c
index 62b06783c9..6a0612481a 100644
--- a/board/engicam/common/spl.c
+++ b/board/engicam/common/spl.c
@@ -10,6 +10,7 @@
 #include <init.h>
 #include <serial.h>
 #include <spl.h>
+#include <linux/delay.h>
 
 #include <asm/io.h>
 #include <asm/gpio.h>
diff --git a/board/esd/vme8349/pci.c b/board/esd/vme8349/pci.c
index 349e7b567c..bf51d39b67 100644
--- a/board/esd/vme8349/pci.c
+++ b/board/esd/vme8349/pci.c
@@ -18,6 +18,7 @@
 #include <pci.h>
 #include <i2c.h>
 #include <asm/fsl_i2c.h>
+#include <linux/delay.h>
 #include "vme8349pin.h"
 
 static struct pci_region pci1_regions[] = {
diff --git a/board/freescale/b4860qds/b4860qds.c b/board/freescale/b4860qds/b4860qds.c
index eed379a9eb..e10f948ae5 100644
--- a/board/freescale/b4860qds/b4860qds.c
+++ b/board/freescale/b4860qds/b4860qds.c
@@ -16,6 +16,7 @@
 #include <linux/compiler.h>
 #include <asm/mmu.h>
 #include <asm/processor.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/cache.h>
 #include <asm/immap_85xx.h>
diff --git a/board/freescale/bsc9131rdb/spl_minimal.c b/board/freescale/bsc9131rdb/spl_minimal.c
index 79df0f3cbd..4ae9ba06c8 100644
--- a/board/freescale/bsc9131rdb/spl_minimal.c
+++ b/board/freescale/bsc9131rdb/spl_minimal.c
@@ -12,6 +12,7 @@
 #include <asm/fsl_law.h>
 #include <fsl_ddr_sdram.h>
 #include <asm/global_data.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/bsc9132qds/spl_minimal.c b/board/freescale/bsc9132qds/spl_minimal.c
index dc72b2e2f2..dd56ad6b2b 100644
--- a/board/freescale/bsc9132qds/spl_minimal.c
+++ b/board/freescale/bsc9132qds/spl_minimal.c
@@ -12,6 +12,7 @@
 #include <asm/fsl_law.h>
 #include <fsl_ddr_sdram.h>
 #include <asm/global_data.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/c29xpcie/cpld.c b/board/freescale/c29xpcie/cpld.c
index b864a60c44..826af428ce 100644
--- a/board/freescale/c29xpcie/cpld.c
+++ b/board/freescale/c29xpcie/cpld.c
@@ -17,6 +17,7 @@
 #include <common.h>
 #include <command.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 #include "cpld.h"
 /**
diff --git a/board/freescale/common/diu_ch7301.c b/board/freescale/common/diu_ch7301.c
index 7f11123e6f..02a271895b 100644
--- a/board/freescale/common/diu_ch7301.c
+++ b/board/freescale/common/diu_ch7301.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <stdio_dev.h>
 #include <i2c.h>
+#include <linux/delay.h>
 
 #define I2C_DVI_INPUT_DATA_FORMAT_REG		0x1F
 #define I2C_DVI_PLL_CHARGE_CNTL_REG		0x33
diff --git a/board/freescale/common/idt8t49n222a_serdes_clk.c b/board/freescale/common/idt8t49n222a_serdes_clk.c
index faa7f87701..bb3cdac841 100644
--- a/board/freescale/common/idt8t49n222a_serdes_clk.c
+++ b/board/freescale/common/idt8t49n222a_serdes_clk.c
@@ -6,6 +6,7 @@
 
 #include "idt8t49n222a_serdes_clk.h"
 #include <log.h>
+#include <linux/delay.h>
 
 #define DEVICE_ID_REG		0x00
 
diff --git a/board/freescale/common/sys_eeprom.c b/board/freescale/common/sys_eeprom.c
index b3421052a5..728245d81c 100644
--- a/board/freescale/common/sys_eeprom.c
+++ b/board/freescale/common/sys_eeprom.c
@@ -12,6 +12,7 @@
 #include <i2c.h>
 #include <init.h>
 #include <linux/ctype.h>
+#include <linux/delay.h>
 #include <u-boot/crc.h>
 
 #ifdef CONFIG_SYS_I2C_EEPROM_CCID
diff --git a/board/freescale/common/vid.c b/board/freescale/common/vid.c
index 0bad67e62f..ed0d9b471c 100644
--- a/board/freescale/common/vid.c
+++ b/board/freescale/common/vid.c
@@ -17,6 +17,7 @@
 #else
 #include <asm/immap_85xx.h>
 #endif
+#include <linux/delay.h>
 #include "vid.h"
 
 int __weak i2c_multiplexer_select_vid_channel(u8 channel)
diff --git a/board/freescale/corenet_ds/eth_p4080.c b/board/freescale/corenet_ds/eth_p4080.c
index 5892bbd62c..801a6f44f0 100644
--- a/board/freescale/corenet_ds/eth_p4080.c
+++ b/board/freescale/corenet_ds/eth_p4080.c
@@ -22,6 +22,7 @@
 #include <fsl_mdio.h>
 #include <miiphy.h>
 #include <phy.h>
+#include <linux/delay.h>
 
 #include "../common/ngpixis.h"
 #include "../common/fman.h"
diff --git a/board/freescale/imx8mq_evk/spl.c b/board/freescale/imx8mq_evk/spl.c
index 99ebad2cc7..2c6ae48da7 100644
--- a/board/freescale/imx8mq_evk/spl.c
+++ b/board/freescale/imx8mq_evk/spl.c
@@ -22,6 +22,7 @@
 #include <asm/mach-imx/mxc_i2c.h>
 #include <fsl_esdhc_imx.h>
 #include <mmc.h>
+#include <linux/delay.h>
 #include <power/pmic.h>
 #include <power/pfuze100_pmic.h>
 #include <spl.h>
diff --git a/board/freescale/imx8qxp_mek/imx8qxp_mek.c b/board/freescale/imx8qxp_mek/imx8qxp_mek.c
index 93f0cd827c..a416a1c8f5 100644
--- a/board/freescale/imx8qxp_mek/imx8qxp_mek.c
+++ b/board/freescale/imx8qxp_mek/imx8qxp_mek.c
@@ -8,6 +8,7 @@
 #include <env.h>
 #include <errno.h>
 #include <init.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <fsl_esdhc_imx.h>
 #include <fdt_support.h>
diff --git a/board/freescale/ls1012afrdm/eth.c b/board/freescale/ls1012afrdm/eth.c
index bd1df092f9..eaea1c46e4 100644
--- a/board/freescale/ls1012afrdm/eth.c
+++ b/board/freescale/ls1012afrdm/eth.c
@@ -18,6 +18,7 @@
 #include <asm/arch-fsl-layerscape/config.h>
 #include <asm/arch-fsl-layerscape/immap_lsch2.h>
 #include <asm/arch/fsl_serdes.h>
+#include <linux/delay.h>
 #include <net/pfe_eth/pfe_eth.h>
 #include <dm/platform_data/pfe_dm_eth.h>
 
diff --git a/board/freescale/ls1012aqds/eth.c b/board/freescale/ls1012aqds/eth.c
index b9018444aa..b4ef60738e 100644
--- a/board/freescale/ls1012aqds/eth.c
+++ b/board/freescale/ls1012aqds/eth.c
@@ -17,6 +17,7 @@
 #include <asm/arch-fsl-layerscape/config.h>
 #include <asm/arch-fsl-layerscape/immap_lsch2.h>
 #include <asm/arch/fsl_serdes.h>
+#include <linux/delay.h>
 #include "../common/qixis.h"
 #include <net/pfe_eth/pfe_eth.h>
 #include <dm/platform_data/pfe_dm_eth.h>
diff --git a/board/freescale/ls1012ardb/eth.c b/board/freescale/ls1012ardb/eth.c
index 5edcfcf1ce..63d40de2a3 100644
--- a/board/freescale/ls1012ardb/eth.c
+++ b/board/freescale/ls1012ardb/eth.c
@@ -18,6 +18,7 @@
 #include <asm/arch-fsl-layerscape/config.h>
 #include <asm/arch-fsl-layerscape/immap_lsch2.h>
 #include <asm/arch/fsl_serdes.h>
+#include <linux/delay.h>
 #include <net/pfe_eth/pfe_eth.h>
 #include <dm/platform_data/pfe_dm_eth.h>
 #include <i2c.h>
diff --git a/board/freescale/ls1021aiot/ls1021aiot.c b/board/freescale/ls1021aiot/ls1021aiot.c
index dca60b7401..fe97b82983 100644
--- a/board/freescale/ls1021aiot/ls1021aiot.c
+++ b/board/freescale/ls1021aiot/ls1021aiot.c
@@ -12,6 +12,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/fsl_serdes.h>
 #include <asm/arch/ls102xa_stream_id.h>
+#include <linux/delay.h>
 
 #include <asm/arch/ls102xa_devdis.h>
 #include <asm/arch/ls102xa_soc.h>
diff --git a/board/freescale/ls1021aqds/ddr.c b/board/freescale/ls1021aqds/ddr.c
index 5c53882cce..f84bce95a8 100644
--- a/board/freescale/ls1021aqds/ddr.c
+++ b/board/freescale/ls1021aqds/ddr.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
+#include <linux/delay.h>
 #include "ddr.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/ls1021atsn/ls1021atsn.c b/board/freescale/ls1021atsn/ls1021atsn.c
index 0f940998bf..b05037d023 100644
--- a/board/freescale/ls1021atsn/ls1021atsn.c
+++ b/board/freescale/ls1021atsn/ls1021atsn.c
@@ -11,6 +11,7 @@
 #include <asm/arch/immap_ls102xa.h>
 #include <asm/arch/ls102xa_soc.h>
 #include <asm/arch/fsl_serdes.h>
+#include <linux/delay.h>
 #include "../common/sleep.h"
 #include <fsl_validate.h>
 #include <fsl_immap.h>
diff --git a/board/freescale/ls1021atwr/ls1021atwr.c b/board/freescale/ls1021atwr/ls1021atwr.c
index c7f7baa8e6..6208a38f16 100644
--- a/board/freescale/ls1021atwr/ls1021atwr.c
+++ b/board/freescale/ls1021atwr/ls1021atwr.c
@@ -28,6 +28,7 @@
 #include <fsl_sec.h>
 #include <fsl_devdis.h>
 #include <spl.h>
+#include <linux/delay.h>
 #include "../common/sleep.h"
 #ifdef CONFIG_U_QE
 #include <fsl_qe.h>
diff --git a/board/freescale/ls1088a/eth_ls1088aqds.c b/board/freescale/ls1088a/eth_ls1088aqds.c
index f42b5022c4..8371c1c9c2 100644
--- a/board/freescale/ls1088a/eth_ls1088aqds.c
+++ b/board/freescale/ls1088a/eth_ls1088aqds.c
@@ -20,6 +20,7 @@
 #include <miiphy.h>
 #include <fsl-mc/fsl_mc.h>
 #include <fsl-mc/ldpaa_wriop.h>
+#include <linux/delay.h>
 
 #include "../common/qixis.h"
 
diff --git a/board/freescale/ls1088a/ls1088a.c b/board/freescale/ls1088a/ls1088a.c
index 974a43ad88..3f758cef2f 100644
--- a/board/freescale/ls1088a/ls1088a.c
+++ b/board/freescale/ls1088a/ls1088a.c
@@ -15,6 +15,7 @@
 #include <fsl_sec.h>
 #include <asm/io.h>
 #include <fdt_support.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <fsl-mc/fsl_mc.h>
 #include <env_internal.h>
diff --git a/board/freescale/ls2080aqds/eth.c b/board/freescale/ls2080aqds/eth.c
index df8a7c74a3..81b5b9eaf7 100644
--- a/board/freescale/ls2080aqds/eth.c
+++ b/board/freescale/ls2080aqds/eth.c
@@ -18,6 +18,7 @@
 #include <miiphy.h>
 #include <fsl-mc/fsl_mc.h>
 #include <fsl-mc/ldpaa_wriop.h>
+#include <linux/delay.h>
 
 #include "../common/qixis.h"
 
diff --git a/board/freescale/m5208evbe/m5208evbe.c b/board/freescale/m5208evbe/m5208evbe.c
index e448a64abc..a950030eb3 100644
--- a/board/freescale/m5208evbe/m5208evbe.c
+++ b/board/freescale/m5208evbe/m5208evbe.c
@@ -12,6 +12,7 @@
 #include <init.h>
 #include <asm/immap.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/m52277evb/m52277evb.c b/board/freescale/m52277evb/m52277evb.c
index a4b795fc39..144e490479 100644
--- a/board/freescale/m52277evb/m52277evb.c
+++ b/board/freescale/m52277evb/m52277evb.c
@@ -11,6 +11,7 @@
 #include <init.h>
 #include <asm/immap.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/m5249evb/m5249evb.c b/board/freescale/m5249evb/m5249evb.c
index da3adc5954..a89d510058 100644
--- a/board/freescale/m5249evb/m5249evb.c
+++ b/board/freescale/m5249evb/m5249evb.c
@@ -9,6 +9,7 @@
 #include <init.h>
 #include <malloc.h>
 #include <asm/immap.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/m5253demo/m5253demo.c b/board/freescale/m5253demo/m5253demo.c
index 6a6c65fe5f..50eb18ba94 100644
--- a/board/freescale/m5253demo/m5253demo.c
+++ b/board/freescale/m5253demo/m5253demo.c
@@ -13,6 +13,7 @@
 #include <asm/immap.h>
 #include <netdev.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/m53017evb/m53017evb.c b/board/freescale/m53017evb/m53017evb.c
index 8bdb4ad127..f13b6931ea 100644
--- a/board/freescale/m53017evb/m53017evb.c
+++ b/board/freescale/m53017evb/m53017evb.c
@@ -12,6 +12,7 @@
 #include <init.h>
 #include <asm/immap.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/m5329evb/m5329evb.c b/board/freescale/m5329evb/m5329evb.c
index d93800b364..531894f651 100644
--- a/board/freescale/m5329evb/m5329evb.c
+++ b/board/freescale/m5329evb/m5329evb.c
@@ -12,6 +12,7 @@
 #include <init.h>
 #include <asm/immap.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/m5373evb/m5373evb.c b/board/freescale/m5373evb/m5373evb.c
index 1d52ce047f..29ff55f159 100644
--- a/board/freescale/m5373evb/m5373evb.c
+++ b/board/freescale/m5373evb/m5373evb.c
@@ -12,6 +12,7 @@
 #include <init.h>
 #include <asm/immap.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/m54418twr/m54418twr.c b/board/freescale/m54418twr/m54418twr.c
index 8c90cfe537..a418fba140 100644
--- a/board/freescale/m54418twr/m54418twr.c
+++ b/board/freescale/m54418twr/m54418twr.c
@@ -11,6 +11,7 @@
 #include <asm/immap.h>
 #include <mmc.h>
 #include <fsl_esdhc_imx.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/m54451evb/m54451evb.c b/board/freescale/m54451evb/m54451evb.c
index 82a2b9093b..1298bd324e 100644
--- a/board/freescale/m54451evb/m54451evb.c
+++ b/board/freescale/m54451evb/m54451evb.c
@@ -12,6 +12,7 @@
 #include <spi.h>
 #include <asm/immap.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/m54455evb/m54455evb.c b/board/freescale/m54455evb/m54455evb.c
index 146cd918c4..286300645b 100644
--- a/board/freescale/m54455evb/m54455evb.c
+++ b/board/freescale/m54455evb/m54455evb.c
@@ -12,6 +12,7 @@
 #include <pci.h>
 #include <asm/immap.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/m547xevb/m547xevb.c b/board/freescale/m547xevb/m547xevb.c
index e8d86113d6..908a500f4b 100644
--- a/board/freescale/m547xevb/m547xevb.c
+++ b/board/freescale/m547xevb/m547xevb.c
@@ -13,6 +13,7 @@
 #include <pci.h>
 #include <asm/immap.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/m548xevb/m548xevb.c b/board/freescale/m548xevb/m548xevb.c
index 40e01c6f24..796b808e6f 100644
--- a/board/freescale/m548xevb/m548xevb.c
+++ b/board/freescale/m548xevb/m548xevb.c
@@ -13,6 +13,7 @@
 #include <pci.h>
 #include <asm/immap.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/mpc8308rdb/mpc8308rdb.c b/board/freescale/mpc8308rdb/mpc8308rdb.c
index bd052b903d..259d6aa1c2 100644
--- a/board/freescale/mpc8308rdb/mpc8308rdb.c
+++ b/board/freescale/mpc8308rdb/mpc8308rdb.c
@@ -10,6 +10,7 @@
 #include <init.h>
 #include <net.h>
 #include <spi.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <pci.h>
diff --git a/board/freescale/mpc8313erdb/sdram.c b/board/freescale/mpc8313erdb/sdram.c
index 5874e1a924..99f6bcd5a9 100644
--- a/board/freescale/mpc8313erdb/sdram.c
+++ b/board/freescale/mpc8313erdb/sdram.c
@@ -11,6 +11,7 @@
 #include <init.h>
 #include <mpc83xx.h>
 #include <spd_sdram.h>
+#include <linux/delay.h>
 
 #include <asm/bitops.h>
 #include <asm/io.h>
diff --git a/board/freescale/mpc8315erdb/mpc8315erdb.c b/board/freescale/mpc8315erdb/mpc8315erdb.c
index 204b40bf47..aa2e7fe206 100644
--- a/board/freescale/mpc8315erdb/mpc8315erdb.c
+++ b/board/freescale/mpc8315erdb/mpc8315erdb.c
@@ -11,6 +11,7 @@
 #include <i2c.h>
 #include <init.h>
 #include <net.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <pci.h>
diff --git a/board/freescale/mpc8315erdb/sdram.c b/board/freescale/mpc8315erdb/sdram.c
index 13bfc1e5f1..8a828207f9 100644
--- a/board/freescale/mpc8315erdb/sdram.c
+++ b/board/freescale/mpc8315erdb/sdram.c
@@ -11,6 +11,7 @@
 #include <init.h>
 #include <mpc83xx.h>
 #include <spd_sdram.h>
+#include <linux/delay.h>
 
 #include <asm/bitops.h>
 #include <asm/io.h>
diff --git a/board/freescale/mpc8323erdb/mpc8323erdb.c b/board/freescale/mpc8323erdb/mpc8323erdb.c
index e513d0bfd5..1dc1c98ad6 100644
--- a/board/freescale/mpc8323erdb/mpc8323erdb.c
+++ b/board/freescale/mpc8323erdb/mpc8323erdb.c
@@ -19,6 +19,7 @@
 #include <i2c.h>
 #include <miiphy.h>
 #include <command.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <u-boot/crc.h>
 #if defined(CONFIG_PCI)
diff --git a/board/freescale/mpc832xemds/mpc832xemds.c b/board/freescale/mpc832xemds/mpc832xemds.c
index d4922fe1e1..afcd45769c 100644
--- a/board/freescale/mpc832xemds/mpc832xemds.c
+++ b/board/freescale/mpc832xemds/mpc832xemds.c
@@ -23,6 +23,7 @@
 #if defined(CONFIG_PQ_MDS_PIB)
 #include "../common/pq-mds-pib.h"
 #endif
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/mpc832xemds/pci.c b/board/freescale/mpc832xemds/pci.c
index 45c7294832..944108f631 100644
--- a/board/freescale/mpc832xemds/pci.c
+++ b/board/freescale/mpc832xemds/pci.c
@@ -14,6 +14,7 @@
 #include <pci.h>
 #include <i2c.h>
 #include <asm/fsl_i2c.h>
+#include <linux/delay.h>
 #include "../common/pq-mds-pib.h"
 
 static struct pci_region pci1_regions[] = {
diff --git a/board/freescale/mpc8349emds/mpc8349emds.c b/board/freescale/mpc8349emds/mpc8349emds.c
index 5451437f37..688bffae79 100644
--- a/board/freescale/mpc8349emds/mpc8349emds.c
+++ b/board/freescale/mpc8349emds/mpc8349emds.c
@@ -18,6 +18,7 @@
 #else
 #include <spd_sdram.h>
 #endif
+#include <linux/delay.h>
 
 #if defined(CONFIG_OF_LIBFDT)
 #include <linux/libfdt.h>
diff --git a/board/freescale/mpc8349emds/pci.c b/board/freescale/mpc8349emds/pci.c
index 7615a1dfaa..3ddbe71775 100644
--- a/board/freescale/mpc8349emds/pci.c
+++ b/board/freescale/mpc8349emds/pci.c
@@ -11,6 +11,7 @@
 #include <pci.h>
 #include <i2c.h>
 #include <asm/fsl_i2c.h>
+#include <linux/delay.h>
 
 static struct pci_region pci1_regions[] = {
 	{
diff --git a/board/freescale/mpc8349itx/mpc8349itx.c b/board/freescale/mpc8349itx/mpc8349itx.c
index 3976f75920..074f3d2928 100644
--- a/board/freescale/mpc8349itx/mpc8349itx.c
+++ b/board/freescale/mpc8349itx/mpc8349itx.c
@@ -21,6 +21,7 @@
 #if defined(CONFIG_OF_LIBFDT)
 #include <linux/libfdt.h>
 #endif
+#include <linux/delay.h>
 
 #include "../../../arch/powerpc/cpu/mpc83xx/hrcw/hrcw.h"
 #include "../../../arch/powerpc/cpu/mpc83xx/elbc/elbc.h"
diff --git a/board/freescale/mpc8349itx/pci.c b/board/freescale/mpc8349itx/pci.c
index 550a2afcb7..a09b658688 100644
--- a/board/freescale/mpc8349itx/pci.c
+++ b/board/freescale/mpc8349itx/pci.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <linux/delay.h>
 
 #include <asm/mmu.h>
 #include <asm/io.h>
diff --git a/board/freescale/mpc837xemds/mpc837xemds.c b/board/freescale/mpc837xemds/mpc837xemds.c
index 90e95399d2..d53c861807 100644
--- a/board/freescale/mpc837xemds/mpc837xemds.c
+++ b/board/freescale/mpc837xemds/mpc837xemds.c
@@ -13,6 +13,7 @@
 #include <asm/fsl_mpc83xx_serdes.h>
 #include <spd_sdram.h>
 #include <tsec.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <fsl_esdhc.h>
diff --git a/board/freescale/mpc837xemds/pci.c b/board/freescale/mpc837xemds/pci.c
index c72e49fbe1..30e8b2585e 100644
--- a/board/freescale/mpc837xemds/pci.c
+++ b/board/freescale/mpc837xemds/pci.c
@@ -14,6 +14,7 @@
 #include <fdt_support.h>
 #include <asm/fsl_i2c.h>
 #include <asm/fsl_mpc83xx_serdes.h>
+#include <linux/delay.h>
 
 static struct pci_region pci_regions[] = {
 	{
diff --git a/board/freescale/mpc837xerdb/mpc837xerdb.c b/board/freescale/mpc837xerdb/mpc837xerdb.c
index 45038acf32..3fd2c5e849 100644
--- a/board/freescale/mpc837xerdb/mpc837xerdb.c
+++ b/board/freescale/mpc837xerdb/mpc837xerdb.c
@@ -16,6 +16,7 @@
 #include <spd_sdram.h>
 #include <vsc7385.h>
 #include <fsl_esdhc.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/mpc837xerdb/pci.c b/board/freescale/mpc837xerdb/pci.c
index 07471e0ae5..dccf8c5551 100644
--- a/board/freescale/mpc837xerdb/pci.c
+++ b/board/freescale/mpc837xerdb/pci.c
@@ -8,6 +8,7 @@
 #include <mpc83xx.h>
 #include <pci.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 static struct pci_region pci_regions[] = {
 	{
diff --git a/board/freescale/mpc8536ds/mpc8536ds.c b/board/freescale/mpc8536ds/mpc8536ds.c
index 582c5b4f35..5907a7b428 100644
--- a/board/freescale/mpc8536ds/mpc8536ds.c
+++ b/board/freescale/mpc8536ds/mpc8536ds.c
@@ -19,6 +19,7 @@
 #include <asm/fsl_serdes.h>
 #include <spd.h>
 #include <miiphy.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <spd_sdram.h>
 #include <fdt_support.h>
diff --git a/board/freescale/mpc8541cds/mpc8541cds.c b/board/freescale/mpc8541cds/mpc8541cds.c
index cb130b4a86..d470fd1cf6 100644
--- a/board/freescale/mpc8541cds/mpc8541cds.c
+++ b/board/freescale/mpc8541cds/mpc8541cds.c
@@ -15,6 +15,7 @@
 #include <fsl_ddr_sdram.h>
 #include <ioports.h>
 #include <spd_sdram.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 
diff --git a/board/freescale/mpc8548cds/mpc8548cds.c b/board/freescale/mpc8548cds/mpc8548cds.c
index 454da1d7da..e11ed2e3be 100644
--- a/board/freescale/mpc8548cds/mpc8548cds.c
+++ b/board/freescale/mpc8548cds/mpc8548cds.c
@@ -17,6 +17,7 @@
 #include <fsl_ddr_sdram.h>
 #include <asm/fsl_serdes.h>
 #include <miiphy.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <tsec.h>
diff --git a/board/freescale/mpc8555cds/mpc8555cds.c b/board/freescale/mpc8555cds/mpc8555cds.c
index 47193dd20e..8e27e73c25 100644
--- a/board/freescale/mpc8555cds/mpc8555cds.c
+++ b/board/freescale/mpc8555cds/mpc8555cds.c
@@ -13,6 +13,7 @@
 #include <fsl_ddr_sdram.h>
 #include <ioports.h>
 #include <spd_sdram.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 
diff --git a/board/freescale/mpc8568mds/mpc8568mds.c b/board/freescale/mpc8568mds/mpc8568mds.c
index 4746b1e5b5..2871636165 100644
--- a/board/freescale/mpc8568mds/mpc8568mds.c
+++ b/board/freescale/mpc8568mds/mpc8568mds.c
@@ -19,6 +19,7 @@
 #include <spd_sdram.h>
 #include <i2c.h>
 #include <ioports.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 
diff --git a/board/freescale/mpc8569mds/mpc8569mds.c b/board/freescale/mpc8569mds/mpc8569mds.c
index 762b0c176f..90b9c72bab 100644
--- a/board/freescale/mpc8569mds/mpc8569mds.c
+++ b/board/freescale/mpc8569mds/mpc8569mds.c
@@ -23,6 +23,7 @@
 #include <spd_sdram.h>
 #include <i2c.h>
 #include <ioports.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <fsl_esdhc.h>
diff --git a/board/freescale/mpc8572ds/mpc8572ds.c b/board/freescale/mpc8572ds/mpc8572ds.c
index 38c8bfd55d..b43032cee8 100644
--- a/board/freescale/mpc8572ds/mpc8572ds.c
+++ b/board/freescale/mpc8572ds/mpc8572ds.c
@@ -20,6 +20,7 @@
 #include <asm/io.h>
 #include <asm/fsl_serdes.h>
 #include <miiphy.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <tsec.h>
diff --git a/board/freescale/mpc8610hpcd/mpc8610hpcd.c b/board/freescale/mpc8610hpcd/mpc8610hpcd.c
index cf02d37b01..c060fd9a3f 100644
--- a/board/freescale/mpc8610hpcd/mpc8610hpcd.c
+++ b/board/freescale/mpc8610hpcd/mpc8610hpcd.c
@@ -16,6 +16,7 @@
 #include <asm/fsl_serdes.h>
 #include <i2c.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <spd_sdram.h>
diff --git a/board/freescale/mpc8641hpcn/mpc8641hpcn.c b/board/freescale/mpc8641hpcn/mpc8641hpcn.c
index 3f070353c3..cd505dfc0a 100644
--- a/board/freescale/mpc8641hpcn/mpc8641hpcn.c
+++ b/board/freescale/mpc8641hpcn/mpc8641hpcn.c
@@ -14,6 +14,7 @@
 #include <fsl_ddr_sdram.h>
 #include <asm/fsl_serdes.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <netdev.h>
diff --git a/board/freescale/mx25pdk/mx25pdk.c b/board/freescale/mx25pdk/mx25pdk.c
index 6898e9c4d6..ec56acb307 100644
--- a/board/freescale/mx25pdk/mx25pdk.c
+++ b/board/freescale/mx25pdk/mx25pdk.c
@@ -15,6 +15,7 @@
 #include <mmc.h>
 #include <fsl_esdhc_imx.h>
 #include <i2c.h>
+#include <linux/delay.h>
 #include <power/pmic.h>
 #include <fsl_pmic.h>
 #include <mc34704.h>
diff --git a/board/freescale/mx28evk/mx28evk.c b/board/freescale/mx28evk/mx28evk.c
index 4272bacf5e..e50b7db210 100644
--- a/board/freescale/mx28evk/mx28evk.c
+++ b/board/freescale/mx28evk/mx28evk.c
@@ -20,6 +20,7 @@
 #include <asm/arch/iomux-mx28.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
+#include <linux/delay.h>
 #include <linux/mii.h>
 #include <miiphy.h>
 #include <netdev.h>
diff --git a/board/freescale/mx35pdk/mx35pdk.c b/board/freescale/mx35pdk/mx35pdk.c
index dda20eed51..63fea37d5d 100644
--- a/board/freescale/mx35pdk/mx35pdk.c
+++ b/board/freescale/mx35pdk/mx35pdk.c
@@ -9,6 +9,7 @@
 #include <init.h>
 #include <net.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/crm_regs.h>
diff --git a/board/freescale/mx51evk/mx51evk.c b/board/freescale/mx51evk/mx51evk.c
index 3314badf9e..46037acc0e 100644
--- a/board/freescale/mx51evk/mx51evk.c
+++ b/board/freescale/mx51evk/mx51evk.c
@@ -9,6 +9,7 @@
 #include <asm/gpio.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux-mx51.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/crm_regs.h>
diff --git a/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c b/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c
index d01c74d241..522b840275 100644
--- a/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c
+++ b/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c
@@ -17,6 +17,7 @@
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/sizes.h>
 #include <common.h>
 #include <fsl_esdhc_imx.h>
diff --git a/board/freescale/mx6sxsabresd/mx6sxsabresd.c b/board/freescale/mx6sxsabresd/mx6sxsabresd.c
index a2c2782303..b092ea8053 100644
--- a/board/freescale/mx6sxsabresd/mx6sxsabresd.c
+++ b/board/freescale/mx6sxsabresd/mx6sxsabresd.c
@@ -18,6 +18,7 @@
 #include <asm/io.h>
 #include <asm/mach-imx/mxc_i2c.h>
 #include <env.h>
+#include <linux/delay.h>
 #include <linux/sizes.h>
 #include <common.h>
 #include <fsl_esdhc_imx.h>
diff --git a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
index afc9f6e6eb..b03c9c97a7 100644
--- a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
+++ b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
@@ -22,6 +22,7 @@
 #include <fsl_esdhc_imx.h>
 #include <i2c.h>
 #include <miiphy.h>
+#include <linux/delay.h>
 #include <linux/sizes.h>
 #include <mmc.h>
 #include <netdev.h>
diff --git a/board/freescale/mx7dsabresd/mx7dsabresd.c b/board/freescale/mx7dsabresd/mx7dsabresd.c
index 6d6763db6a..f12e9d4cfe 100644
--- a/board/freescale/mx7dsabresd/mx7dsabresd.c
+++ b/board/freescale/mx7dsabresd/mx7dsabresd.c
@@ -12,6 +12,7 @@
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/sizes.h>
 #include <common.h>
 #include <fsl_esdhc_imx.h>
diff --git a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
index 59c57e43a5..1353debc0e 100644
--- a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
+++ b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
@@ -25,6 +25,7 @@
 #include <asm/fsl_lbc.h>
 #include <asm/mp.h>
 #include <miiphy.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <fsl_mdio.h>
diff --git a/board/freescale/t102xqds/ddr.c b/board/freescale/t102xqds/ddr.c
index ba589d4cb1..c27cecd5aa 100644
--- a/board/freescale/t102xqds/ddr.c
+++ b/board/freescale/t102xqds/ddr.c
@@ -13,6 +13,7 @@
 #include <fsl_ddr_dimm_params.h>
 #include <asm/fsl_law.h>
 #include <asm/mpc85xx_gpio.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/t102xrdb/ddr.c b/board/freescale/t102xrdb/ddr.c
index c389865fc0..3640a47957 100644
--- a/board/freescale/t102xrdb/ddr.c
+++ b/board/freescale/t102xrdb/ddr.c
@@ -13,6 +13,7 @@
 #include <fsl_ddr_dimm_params.h>
 #include <asm/fsl_law.h>
 #include <asm/mpc85xx_gpio.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/freescale/t1040qds/ddr.c b/board/freescale/t1040qds/ddr.c
index f7eef5ca91..0a817d0ee8 100644
--- a/board/freescale/t1040qds/ddr.c
+++ b/board/freescale/t1040qds/ddr.c
@@ -13,6 +13,7 @@
 #include <fsl_ddr_dimm_params.h>
 #include <asm/fsl_law.h>
 #include <asm/mpc85xx_gpio.h>
+#include <linux/delay.h>
 #include "ddr.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/t104xrdb/ddr.c b/board/freescale/t104xrdb/ddr.c
index c9d8e1fd44..e313bf99cf 100644
--- a/board/freescale/t104xrdb/ddr.c
+++ b/board/freescale/t104xrdb/ddr.c
@@ -13,6 +13,7 @@
 #include <fsl_ddr_dimm_params.h>
 #include <asm/fsl_law.h>
 #include <asm/mpc85xx_gpio.h>
+#include <linux/delay.h>
 #include "ddr.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/t4qds/t4240qds.c b/board/freescale/t4qds/t4240qds.c
index 670c487e17..8d1a66f223 100644
--- a/board/freescale/t4qds/t4240qds.c
+++ b/board/freescale/t4qds/t4240qds.c
@@ -23,6 +23,7 @@
 #include <asm/fsl_serdes.h>
 #include <asm/fsl_liodn.h>
 #include <fm_eth.h>
+#include <linux/delay.h>
 
 #include "../common/qixis.h"
 #include "../common/vsc3316_3308.h"
diff --git a/board/gardena/smart-gateway-mt7688/board.c b/board/gardena/smart-gateway-mt7688/board.c
index a75bb1f77b..8a3a6e3482 100644
--- a/board/gardena/smart-gateway-mt7688/board.c
+++ b/board/gardena/smart-gateway-mt7688/board.c
@@ -15,6 +15,7 @@
 #include <net.h>
 #include <spi.h>
 #include <spi_flash.h>
+#include <linux/delay.h>
 #include <linux/stringify.h>
 #include <u-boot/crc.h>
 #include <uuid.h>
diff --git a/board/gateworks/gw_ventana/common.c b/board/gateworks/gw_ventana/common.c
index b7e0691542..1a35249724 100644
--- a/board/gateworks/gw_ventana/common.c
+++ b/board/gateworks/gw_ventana/common.c
@@ -15,6 +15,7 @@
 #include <env.h>
 #include <fsl_esdhc_imx.h>
 #include <hwconfig.h>
+#include <linux/delay.h>
 #include <power/pmic.h>
 #include <power/ltc3676_pmic.h>
 #include <power/pfuze100_pmic.h>
diff --git a/board/gateworks/gw_ventana/eeprom.c b/board/gateworks/gw_ventana/eeprom.c
index ae467161f1..a5a151d85b 100644
--- a/board/gateworks/gw_ventana/eeprom.c
+++ b/board/gateworks/gw_ventana/eeprom.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <asm/bitops.h>
+#include <linux/delay.h>
 
 #include "gsc.h"
 #include "ventana_eeprom.h"
diff --git a/board/gateworks/gw_ventana/gsc.c b/board/gateworks/gw_ventana/gsc.c
index 4179f0fb5c..bcb6bca346 100644
--- a/board/gateworks/gw_ventana/gsc.c
+++ b/board/gateworks/gw_ventana/gsc.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <command.h>
 #include <log.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <common.h>
 #include <i2c.h>
diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c
index acbd200c3f..649e622944 100644
--- a/board/gateworks/gw_ventana/gw_ventana.c
+++ b/board/gateworks/gw_ventana/gw_ventana.c
@@ -35,6 +35,7 @@
 #include <mtd_node.h>
 #include <netdev.h>
 #include <pci.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <power/pmic.h>
 #include <power/ltc3676_pmic.h>
diff --git a/board/gdsys/a38x/controlcenterdc.c b/board/gdsys/a38x/controlcenterdc.c
index 0d53d69ecc..a2287f9deb 100644
--- a/board/gdsys/a38x/controlcenterdc.c
+++ b/board/gdsys/a38x/controlcenterdc.c
@@ -14,6 +14,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm-generic/gpio.h>
+#include <linux/delay.h>
 
 #include "../drivers/ddr/marvell/a38x/ddr3_init.h"
 #include "../arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.h"
diff --git a/board/gdsys/a38x/ihs_phys.c b/board/gdsys/a38x/ihs_phys.c
index 494de18f86..2ef3b3ab27 100644
--- a/board/gdsys/a38x/ihs_phys.c
+++ b/board/gdsys/a38x/ihs_phys.c
@@ -2,6 +2,7 @@
 #include <dm.h>
 #include <miiphy.h>
 #include <asm-generic/gpio.h>
+#include <linux/delay.h>
 
 #include "ihs_phys.h"
 #include "dt_helpers.h"
diff --git a/board/gdsys/common/cmd_ioloop.c b/board/gdsys/common/cmd_ioloop.c
index 88ab8233d5..3b4494c59f 100644
--- a/board/gdsys/common/cmd_ioloop.c
+++ b/board/gdsys/common/cmd_ioloop.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <command.h>
 #include <console.h>
+#include <linux/delay.h>
 
 #include <gdsys_fpga.h>
 
diff --git a/board/gdsys/common/ihs_mdio.c b/board/gdsys/common/ihs_mdio.c
index f160a57cc2..5f1215e9e8 100644
--- a/board/gdsys/common/ihs_mdio.c
+++ b/board/gdsys/common/ihs_mdio.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <linux/delay.h>
 
 #include <miiphy.h>
 #ifdef CONFIG_GDSYS_LEGACY_DRIVERS
diff --git a/board/gdsys/common/mclink.c b/board/gdsys/common/mclink.c
index c43d24b26d..6147fbfc87 100644
--- a/board/gdsys/common/mclink.c
+++ b/board/gdsys/common/mclink.c
@@ -11,6 +11,7 @@
 #include <errno.h>
 
 #include <gdsys_fpga.h>
+#include <linux/delay.h>
 
 enum {
 	MCINT_SLAVE_LINK_CHANGED_EV = 1 << 7,
diff --git a/board/gdsys/mpc8308/hrcon.c b/board/gdsys/mpc8308/hrcon.c
index 8994c8c71b..90946cc34e 100644
--- a/board/gdsys/mpc8308/hrcon.c
+++ b/board/gdsys/mpc8308/hrcon.c
@@ -11,6 +11,7 @@
 #include <i2c.h>
 #include <init.h>
 #include <spi.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <pci.h>
diff --git a/board/gdsys/mpc8308/mpc8308.c b/board/gdsys/mpc8308/mpc8308.c
index d4108457d9..0f90f8ad32 100644
--- a/board/gdsys/mpc8308/mpc8308.c
+++ b/board/gdsys/mpc8308/mpc8308.c
@@ -10,6 +10,7 @@
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <asm/global_data.h>
+#include <linux/delay.h>
 
 #include "mpc8308.h"
 #include <gdsys_fpga.h>
diff --git a/board/gdsys/mpc8308/strider.c b/board/gdsys/mpc8308/strider.c
index a12e08685b..9b82c949b3 100644
--- a/board/gdsys/mpc8308/strider.c
+++ b/board/gdsys/mpc8308/strider.c
@@ -11,6 +11,7 @@
 #include <i2c.h>
 #include <init.h>
 #include <spi.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <pci.h>
diff --git a/board/gdsys/p1022/controlcenterd-id.c b/board/gdsys/p1022/controlcenterd-id.c
index ccad907271..1b5aa9042f 100644
--- a/board/gdsys/p1022/controlcenterd-id.c
+++ b/board/gdsys/p1022/controlcenterd-id.c
@@ -22,6 +22,7 @@
 #include <i2c.h>
 #include <mmc.h>
 #include <tpm-v1.h>
+#include <linux/delay.h>
 #include <u-boot/crc.h>
 #include <u-boot/sha1.h>
 #include <asm/byteorder.h>
diff --git a/board/gdsys/p1022/controlcenterd.c b/board/gdsys/p1022/controlcenterd.c
index e960fa71ac..73ce985d1a 100644
--- a/board/gdsys/p1022/controlcenterd.c
+++ b/board/gdsys/p1022/controlcenterd.c
@@ -36,6 +36,7 @@
 #include <fsl_ddr_sdram.h>
 #include <asm/fsl_serdes.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <fsl_mdio.h>
diff --git a/board/ge/bx50v3/bx50v3.c b/board/ge/bx50v3/bx50v3.c
index 6f7f752a8d..edccfd03b3 100644
--- a/board/ge/bx50v3/bx50v3.c
+++ b/board/ge/bx50v3/bx50v3.c
@@ -12,6 +12,7 @@
 #include <asm/arch/iomux.h>
 #include <asm/arch/mx6-pins.h>
 #include <env.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/libfdt.h>
 #include <asm/gpio.h>
diff --git a/board/google/imx8mq_phanbell/spl.c b/board/google/imx8mq_phanbell/spl.c
index 543d9bb16f..6f39599316 100644
--- a/board/google/imx8mq_phanbell/spl.c
+++ b/board/google/imx8mq_phanbell/spl.c
@@ -19,6 +19,7 @@
 #include <asm/mach-imx/gpio.h>
 #include <asm/mach-imx/mxc_i2c.h>
 #include <asm/sections.h>
+#include <linux/delay.h>
 #include <fsl_esdhc_imx.h>
 #include <mmc.h>
 #include <spl.h>
diff --git a/board/google/veyron/veyron.c b/board/google/veyron/veyron.c
index 02bc5ed37b..6d84a326a3 100644
--- a/board/google/veyron/veyron.c
+++ b/board/google/veyron/veyron.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <asm/arch-rockchip/clock.h>
 #include <dt-bindings/clock/rk3288-cru.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #include <power/regulator.h>
 
diff --git a/board/gumstix/duovero/duovero.c b/board/gumstix/duovero/duovero.c
index 7b6fd5c737..0df03a5a61 100644
--- a/board/gumstix/duovero/duovero.c
+++ b/board/gumstix/duovero/duovero.c
@@ -16,6 +16,7 @@
 #include <asm/arch/gpio.h>
 #include <asm/gpio.h>
 #include <asm/mach-types.h>
+#include <linux/delay.h>
 
 #include "duovero_mux_data.h"
 
diff --git a/board/highbank/ahci.c b/board/highbank/ahci.c
index 49cd117e3c..9c057278ac 100644
--- a/board/highbank/ahci.c
+++ b/board/highbank/ahci.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <ahci.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 #define CPHY_MAP(dev, addr) ((((dev) & 0x1f) << 7) | (((addr) >> 9) & 0x7f))
 #define CPHY_ADDR(base, dev, addr) ((base) | (((addr) & 0x1ff) << 2))
diff --git a/board/hisilicon/hikey/hikey.c b/board/hisilicon/hikey/hikey.c
index df0f1104bf..6eea939b91 100644
--- a/board/hisilicon/hikey/hikey.c
+++ b/board/hisilicon/hikey/hikey.c
@@ -15,6 +15,7 @@
 #include <netdev.h>
 #include <asm/io.h>
 #include <usb.h>
+#include <linux/delay.h>
 #include <power/hi6553_pmic.h>
 #include <asm-generic/gpio.h>
 #include <asm/arch/dwmmc.h>
diff --git a/board/hisilicon/hikey960/hikey960.c b/board/hisilicon/hikey960/hikey960.c
index 89a922fb82..db485db10a 100644
--- a/board/hisilicon/hikey960/hikey960.c
+++ b/board/hisilicon/hikey960/hikey960.c
@@ -15,6 +15,7 @@
 #include <asm/armv8/mmu.h>
 #include <asm/psci.h>
 #include <linux/arm-smccc.h>
+#include <linux/delay.h>
 #include <linux/psci.h>
 
 #define PMIC_REG_TO_BUS_ADDR(x) (x << 2)
diff --git a/board/hisilicon/poplar/poplar.c b/board/hisilicon/poplar/poplar.c
index 70a69f5b8c..8e2dd5fa50 100644
--- a/board/hisilicon/poplar/poplar.c
+++ b/board/hisilicon/poplar/poplar.c
@@ -13,6 +13,7 @@
 #include <dm/platform_data/serial_pl01x.h>
 #include <asm/arch/hi3798cv200.h>
 #include <asm/armv8/mmu.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/ids/ids8313/ids8313.c b/board/ids/ids8313/ids8313.c
index 6e74e939c3..2065a5a7db 100644
--- a/board/ids/ids8313/ids8313.c
+++ b/board/ids/ids8313/ids8313.c
@@ -16,6 +16,7 @@
 #include <init.h>
 #include <mpc83xx.h>
 #include <spi.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/imgtec/ci20/ci20.c b/board/imgtec/ci20/ci20.c
index 66c64f8056..e87ea0a7ad 100644
--- a/board/imgtec/ci20/ci20.c
+++ b/board/imgtec/ci20/ci20.c
@@ -13,6 +13,7 @@
 #include <netdev.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
+#include <linux/delay.h>
 #include <mach/jz4780.h>
 #include <mach/jz4780_dram.h>
 #include <mach/jz4780_gpio.h>
diff --git a/board/imgtec/malta/malta.c b/board/imgtec/malta/malta.c
index 80005ec3cc..88a1a63bf4 100644
--- a/board/imgtec/malta/malta.c
+++ b/board/imgtec/malta/malta.c
@@ -13,6 +13,7 @@
 #include <pci_gt64120.h>
 #include <pci_msc01.h>
 #include <rtc.h>
+#include <linux/delay.h>
 
 #include <asm/addrspace.h>
 #include <asm/io.h>
diff --git a/board/inversepath/usbarmory/usbarmory.c b/board/inversepath/usbarmory/usbarmory.c
index 4fa34e1b51..02a514809f 100644
--- a/board/inversepath/usbarmory/usbarmory.c
+++ b/board/inversepath/usbarmory/usbarmory.c
@@ -17,6 +17,7 @@
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/iomux-mx53.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <i2c.h>
 #include <mmc.h>
diff --git a/board/isee/igep00x0/common.c b/board/isee/igep00x0/common.c
index f5d62ffc2e..2c269773a8 100644
--- a/board/isee/igep00x0/common.c
+++ b/board/isee/igep00x0/common.c
@@ -7,6 +7,7 @@
 #include <asm/arch/mux.h>
 #include <asm/arch/sys_proto.h>
 #include <jffs2/load_kernel.h>
+#include <linux/delay.h>
 #include <linux/mtd/rawnand.h>
 #include "igep00x0.h"
 
diff --git a/board/isee/igep00x0/igep00x0.c b/board/isee/igep00x0/igep00x0.c
index 887ec6a66b..af0bce6426 100644
--- a/board/isee/igep00x0/igep00x0.c
+++ b/board/isee/igep00x0/igep00x0.c
@@ -20,6 +20,7 @@
 #include <asm/arch/mmc_host_def.h>
 #include <asm/arch/mux.h>
 #include <asm/arch/sys_proto.h>
+#include <linux/delay.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/rawnand.h>
 #include <linux/mtd/onenand.h>
diff --git a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c
index c105da5837..75fb6acfb3 100644
--- a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c
+++ b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c
@@ -16,6 +16,7 @@
 #include <asm/io.h>
 #include <errno.h>
 #include <spl.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/keymile/common/common.c b/board/keymile/common/common.c
index f592eba9e5..9c9e1598f8 100644
--- a/board/keymile/common/common.c
+++ b/board/keymile/common/common.c
@@ -17,6 +17,7 @@
 #include <netdev.h>
 #include <asm/io.h>
 #include <linux/ctype.h>
+#include <linux/delay.h>
 
 #if defined(CONFIG_POST)
 #include "post.h"
diff --git a/board/keymile/km83xx/km83xx.c b/board/keymile/km83xx/km83xx.c
index 3c869b755c..29514d8363 100644
--- a/board/keymile/km83xx/km83xx.c
+++ b/board/keymile/km83xx/km83xx.c
@@ -26,6 +26,7 @@
 #include <asm/mmu.h>
 #include <asm/processor.h>
 #include <pci.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <post.h>
 
diff --git a/board/keymile/km83xx/km83xx_i2c.c b/board/keymile/km83xx/km83xx_i2c.c
index 113ca70a1a..62100b1949 100644
--- a/board/keymile/km83xx/km83xx_i2c.c
+++ b/board/keymile/km83xx/km83xx_i2c.c
@@ -8,6 +8,7 @@
 #include <i2c.h>
 #include <asm/io.h>
 #include <linux/ctype.h>
+#include <linux/delay.h>
 #include "../common/common.h"
 
 static void i2c_write_start_seq(void)
diff --git a/board/keymile/km_arm/fpga_config.c b/board/keymile/km_arm/fpga_config.c
index 8bb0470bc3..abb5b7d60d 100644
--- a/board/keymile/km_arm/fpga_config.c
+++ b/board/keymile/km_arm/fpga_config.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 
 /* GPIO Pin from kirkwood connected to PROGRAM_B pin of the xilinx FPGA */
diff --git a/board/keymile/kmp204x/pci.c b/board/keymile/kmp204x/pci.c
index 15bbc810a1..87bf16886a 100644
--- a/board/keymile/kmp204x/pci.c
+++ b/board/keymile/kmp204x/pci.c
@@ -11,6 +11,7 @@
 #include <init.h>
 #include <pci.h>
 #include <asm/fsl_pci.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <asm/fsl_serdes.h>
diff --git a/board/kosagi/novena/novena_spl.c b/board/kosagi/novena/novena_spl.c
index bc52b91b2f..9926285675 100644
--- a/board/kosagi/novena/novena_spl.c
+++ b/board/kosagi/novena/novena_spl.c
@@ -23,6 +23,7 @@
 #include <mmc.h>
 #include <fsl_esdhc_imx.h>
 #include <spl.h>
+#include <linux/delay.h>
 
 #include <asm/arch/mx6-ddr.h>
 
diff --git a/board/kosagi/novena/video.c b/board/kosagi/novena/video.c
index a97e97a565..a96a877f5f 100644
--- a/board/kosagi/novena/video.c
+++ b/board/kosagi/novena/video.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
diff --git a/board/liebherr/display5/display5.c b/board/liebherr/display5/display5.c
index 728ee83a58..ec55fdf0aa 100644
--- a/board/liebherr/display5/display5.c
+++ b/board/liebherr/display5/display5.c
@@ -25,6 +25,7 @@
 #include <miiphy.h>
 #include <netdev.h>
 #include <i2c.h>
+#include <linux/delay.h>
 
 #include <dm.h>
 #include <dm/platform_data/serial_mxc.h>
diff --git a/board/liebherr/display5/spl.c b/board/liebherr/display5/spl.c
index bee99667ee..ac4f23f4d6 100644
--- a/board/liebherr/display5/spl.c
+++ b/board/liebherr/display5/spl.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <serial.h>
 #include <spl.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
diff --git a/board/liebherr/mccmon6/spl.c b/board/liebherr/mccmon6/spl.c
index f40e814f86..b234f06220 100644
--- a/board/liebherr/mccmon6/spl.c
+++ b/board/liebherr/mccmon6/spl.c
@@ -22,6 +22,7 @@
 #include <asm/arch/sys_proto.h>
 #include <serial.h>
 #include <spl.h>
+#include <linux/delay.h>
 
 #include <asm/arch/mx6-ddr.h>
 /*
diff --git a/board/liebherr/xea/xea.c b/board/liebherr/xea/xea.c
index 30665ea992..8159f3a2d9 100644
--- a/board/liebherr/xea/xea.c
+++ b/board/liebherr/xea/xea.c
@@ -24,6 +24,7 @@
 #include <asm/arch/iomux-mx28.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
+#include <linux/delay.h>
 #include <linux/mii.h>
 #include <miiphy.h>
 #include <netdev.h>
diff --git a/board/mpc8308_p1m/mpc8308_p1m.c b/board/mpc8308_p1m/mpc8308_p1m.c
index caa6187ffe..601442055d 100644
--- a/board/mpc8308_p1m/mpc8308_p1m.c
+++ b/board/mpc8308_p1m/mpc8308_p1m.c
@@ -8,6 +8,7 @@
 #include <i2c.h>
 #include <init.h>
 #include <net.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <pci.h>
diff --git a/board/mscc/jr2/jr2.c b/board/mscc/jr2/jr2.c
index b240c7649c..f806576b90 100644
--- a/board/mscc/jr2/jr2.c
+++ b/board/mscc/jr2/jr2.c
@@ -9,6 +9,7 @@
 #include <asm/io.h>
 #include <led.h>
 #include <miiphy.h>
+#include <linux/delay.h>
 
 enum {
 	BOARD_TYPE_PCB110 = 0xAABBCE00,
diff --git a/board/nvidia/cardhu/cardhu.c b/board/nvidia/cardhu/cardhu.c
index ee56497a05..6848e34004 100644
--- a/board/nvidia/cardhu/cardhu.c
+++ b/board/nvidia/cardhu/cardhu.c
@@ -11,6 +11,7 @@
 #include <asm/arch/gp_padctrl.h>
 #include <asm/arch/gpio.h>
 #include <asm/gpio.h>
+#include <linux/delay.h>
 #include "pinmux-config-cardhu.h"
 #include <i2c.h>
 
diff --git a/board/nvidia/nyan-big/nyan-big.c b/board/nvidia/nyan-big/nyan-big.c
index 6464e86c45..71c71ed6ec 100644
--- a/board/nvidia/nyan-big/nyan-big.c
+++ b/board/nvidia/nyan-big/nyan-big.c
@@ -15,6 +15,7 @@
 #include <asm/arch/mc.h>
 #include <asm/arch-tegra/clk_rst.h>
 #include <asm/arch-tegra/pmc.h>
+#include <linux/delay.h>
 #include <power/as3722.h>
 #include <power/pmic.h>
 #include "pinmux-config-nyan-big.h"
diff --git a/board/nvidia/venice2/as3722_init.c b/board/nvidia/venice2/as3722_init.c
index 15fba13e0b..ba676547d3 100644
--- a/board/nvidia/venice2/as3722_init.c
+++ b/board/nvidia/venice2/as3722_init.c
@@ -8,6 +8,7 @@
 #include <log.h>
 #include <asm/io.h>
 #include <asm/arch-tegra/tegra_i2c.h>
+#include <linux/delay.h>
 #include "as3722_init.h"
 
 /* AS3722-PMIC-specific early init code - get CPU rails up, etc */
diff --git a/board/olimex/mx23_olinuxino/mx23_olinuxino.c b/board/olimex/mx23_olinuxino/mx23_olinuxino.c
index cfe33d3072..808d221036 100644
--- a/board/olimex/mx23_olinuxino/mx23_olinuxino.c
+++ b/board/olimex/mx23_olinuxino/mx23_olinuxino.c
@@ -16,6 +16,7 @@
 #ifdef CONFIG_LED_STATUS
 #include <status_led.h>
 #endif
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/overo/overo.c b/board/overo/overo.c
index 7a54719e87..5450f5d11c 100644
--- a/board/overo/overo.c
+++ b/board/overo/overo.c
@@ -20,6 +20,7 @@
 #include <ns16550.h>
 #include <netdev.h>
 #include <twl4030.h>
+#include <linux/delay.h>
 #include <linux/mtd/rawnand.h>
 #include <asm/io.h>
 #include <asm/arch/mmc_host_def.h>
diff --git a/board/pandora/pandora.c b/board/pandora/pandora.c
index bb310d9e68..a93848666f 100644
--- a/board/pandora/pandora.c
+++ b/board/pandora/pandora.c
@@ -24,6 +24,7 @@
 #include <asm/arch/gpio.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/mach-types.h>
+#include <linux/delay.h>
 #include "pandora.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/phytec/pcm058/pcm058.c b/board/phytec/pcm058/pcm058.c
index b1bf8d50f8..096425c5df 100644
--- a/board/phytec/pcm058/pcm058.c
+++ b/board/phytec/pcm058/pcm058.c
@@ -23,6 +23,7 @@
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/mach-imx/mxc_i2c.h>
 #include <asm/mach-imx/spi.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
 #include <mmc.h>
diff --git a/board/phytec/pfla02/pfla02.c b/board/phytec/pfla02/pfla02.c
index ce3cc6a3eb..fed8f52e3e 100644
--- a/board/phytec/pfla02/pfla02.c
+++ b/board/phytec/pfla02/pfla02.c
@@ -20,6 +20,7 @@
 #include <asm/mach-imx/mxc_i2c.h>
 #include <asm/mach-imx/spi.h>
 #include <env.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
 #include <mmc.h>
diff --git a/board/ppcag/bg0900/bg0900.c b/board/ppcag/bg0900/bg0900.c
index 70870797bb..9150748654 100644
--- a/board/ppcag/bg0900/bg0900.c
+++ b/board/ppcag/bg0900/bg0900.c
@@ -14,6 +14,7 @@
 #include <asm/arch/iomux-mx28.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
+#include <linux/delay.h>
 #include <linux/mii.h>
 #include <miiphy.h>
 #include <netdev.h>
diff --git a/board/qualcomm/dragonboard410c/dragonboard410c.c b/board/qualcomm/dragonboard410c/dragonboard410c.c
index 75505d0c18..672bd465a5 100644
--- a/board/qualcomm/dragonboard410c/dragonboard410c.c
+++ b/board/qualcomm/dragonboard410c/dragonboard410c.c
@@ -17,6 +17,7 @@
 #include <fdt_support.h>
 #include <asm/arch/dram.h>
 #include <asm/arch/misc.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/renesas/alt/alt.c b/board/renesas/alt/alt.c
index de487ff4b7..600a355a6b 100644
--- a/board/renesas/alt/alt.c
+++ b/board/renesas/alt/alt.c
@@ -17,6 +17,7 @@
 #include <asm/processor.h>
 #include <asm/mach-types.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/gpio.h>
diff --git a/board/renesas/gose/gose.c b/board/renesas/gose/gose.c
index aec947ab5a..686ad28f65 100644
--- a/board/renesas/gose/gose.c
+++ b/board/renesas/gose/gose.c
@@ -17,6 +17,7 @@
 #include <asm/processor.h>
 #include <asm/mach-types.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/gpio.h>
diff --git a/board/renesas/koelsch/koelsch.c b/board/renesas/koelsch/koelsch.c
index 67ac85d580..0f21f8d743 100644
--- a/board/renesas/koelsch/koelsch.c
+++ b/board/renesas/koelsch/koelsch.c
@@ -18,6 +18,7 @@
 #include <asm/processor.h>
 #include <asm/mach-types.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/gpio.h>
diff --git a/board/renesas/lager/lager.c b/board/renesas/lager/lager.c
index 1a5877bf15..8a94f21811 100644
--- a/board/renesas/lager/lager.c
+++ b/board/renesas/lager/lager.c
@@ -20,6 +20,7 @@
 #include <asm/processor.h>
 #include <asm/mach-types.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/gpio.h>
diff --git a/board/renesas/porter/porter.c b/board/renesas/porter/porter.c
index acff2e3b39..f311a72391 100644
--- a/board/renesas/porter/porter.c
+++ b/board/renesas/porter/porter.c
@@ -18,6 +18,7 @@
 #include <asm/processor.h>
 #include <asm/mach-types.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/gpio.h>
diff --git a/board/renesas/sh7752evb/sh7752evb.c b/board/renesas/sh7752evb/sh7752evb.c
index c6e0c12976..a005029b61 100644
--- a/board/renesas/sh7752evb/sh7752evb.c
+++ b/board/renesas/sh7752evb/sh7752evb.c
@@ -15,6 +15,7 @@
 #include <asm/mmc.h>
 #include <spi.h>
 #include <spi_flash.h>
+#include <linux/delay.h>
 
 int checkboard(void)
 {
diff --git a/board/renesas/sh7753evb/sh7753evb.c b/board/renesas/sh7753evb/sh7753evb.c
index cdeacb8aae..3b4a3ce26a 100644
--- a/board/renesas/sh7753evb/sh7753evb.c
+++ b/board/renesas/sh7753evb/sh7753evb.c
@@ -15,6 +15,7 @@
 #include <asm/mmc.h>
 #include <spi.h>
 #include <spi_flash.h>
+#include <linux/delay.h>
 
 int checkboard(void)
 {
diff --git a/board/renesas/silk/silk.c b/board/renesas/silk/silk.c
index db88f0ddb6..fe753a79da 100644
--- a/board/renesas/silk/silk.c
+++ b/board/renesas/silk/silk.c
@@ -18,6 +18,7 @@
 #include <asm/processor.h>
 #include <asm/mach-types.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/gpio.h>
diff --git a/board/renesas/stout/stout.c b/board/renesas/stout/stout.c
index 594070a9bf..b32e11a199 100644
--- a/board/renesas/stout/stout.c
+++ b/board/renesas/stout/stout.c
@@ -19,6 +19,7 @@
 #include <asm/processor.h>
 #include <asm/mach-types.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/gpio.h>
diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c
index 7f7fb070f6..029a0cc6cd 100644
--- a/board/samsung/common/board.c
+++ b/board/samsung/common/board.c
@@ -32,6 +32,7 @@
 #include <stdio_dev.h>
 #include <usb.h>
 #include <dwc3-uboot.h>
+#include <linux/delay.h>
 #include <samsung/misc.h>
 #include <dm/pinctrl.h>
 #include <dm.h>
diff --git a/board/samsung/common/exynos5-dt-types.c b/board/samsung/common/exynos5-dt-types.c
index 1413dc8978..f1ecb7d2c3 100644
--- a/board/samsung/common/exynos5-dt-types.c
+++ b/board/samsung/common/exynos5-dt-types.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <linux/delay.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <power/s2mps11.h>
diff --git a/board/samsung/common/misc.c b/board/samsung/common/misc.c
index 146843d348..837463ba78 100644
--- a/board/samsung/common/misc.c
+++ b/board/samsung/common/misc.c
@@ -9,6 +9,7 @@
 #include <env.h>
 #include <lcd.h>
 #include <libtizen.h>
+#include <linux/delay.h>
 #include <samsung/misc.h>
 #include <errno.h>
 #include <version.h>
diff --git a/board/samsung/goni/goni.c b/board/samsung/goni/goni.c
index 9639f9a306..40a94d547f 100644
--- a/board/samsung/goni/goni.c
+++ b/board/samsung/goni/goni.c
@@ -11,6 +11,7 @@
 #include <asm/gpio.h>
 #include <asm/arch/mmc.h>
 #include <dm.h>
+#include <linux/delay.h>
 #include <power/pmic.h>
 #include <usb/dwc2_udc.h>
 #include <asm/arch/cpu.h>
diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
index b01c93639f..2e80dbbc84 100644
--- a/board/samsung/trats/trats.c
+++ b/board/samsung/trats/trats.c
@@ -18,6 +18,7 @@
 #include <asm/arch/mipi_dsim.h>
 #include <asm/arch/watchdog.h>
 #include <asm/arch/power.h>
+#include <linux/delay.h>
 #include <power/pmic.h>
 #include <usb/dwc2_udc.h>
 #include <power/max8997_pmic.h>
diff --git a/board/samsung/trats2/trats2.c b/board/samsung/trats2/trats2.c
index ad5dea7307..69e0ef192d 100644
--- a/board/samsung/trats2/trats2.c
+++ b/board/samsung/trats2/trats2.c
@@ -12,6 +12,7 @@
 #include <asm/arch/pinmux.h>
 #include <asm/arch/power.h>
 #include <asm/arch/mipi_dsim.h>
+#include <linux/delay.h>
 #include <power/pmic.h>
 #include <power/max77686_pmic.h>
 #include <power/battery.h>
diff --git a/board/samsung/universal_c210/universal.c b/board/samsung/universal_c210/universal.c
index c56a87b083..f50da6be72 100644
--- a/board/samsung/universal_c210/universal.c
+++ b/board/samsung/universal_c210/universal.c
@@ -16,6 +16,7 @@
 #include <asm/arch/pinmux.h>
 #include <asm/arch/watchdog.h>
 #include <ld9040.h>
+#include <linux/delay.h>
 #include <power/pmic.h>
 #include <usb.h>
 #include <usb/dwc2_udc.h>
diff --git a/board/sandisk/sansa_fuze_plus/sfp.c b/board/sandisk/sansa_fuze_plus/sfp.c
index ae965a80a5..04f8678704 100644
--- a/board/sandisk/sansa_fuze_plus/sfp.c
+++ b/board/sandisk/sansa_fuze_plus/sfp.c
@@ -19,6 +19,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/sbc8349/pci.c b/board/sbc8349/pci.c
index b6435f34f2..26c4f24e4f 100644
--- a/board/sbc8349/pci.c
+++ b/board/sbc8349/pci.c
@@ -15,6 +15,7 @@
 #include <pci.h>
 #include <i2c.h>
 #include <asm/fsl_i2c.h>
+#include <linux/delay.h>
 
 static struct pci_region pci1_regions[] = {
 	{
diff --git a/board/sbc8349/sbc8349.c b/board/sbc8349/sbc8349.c
index 2c05ebb1bd..c84146a608 100644
--- a/board/sbc8349/sbc8349.c
+++ b/board/sbc8349/sbc8349.c
@@ -19,6 +19,7 @@
 #if defined(CONFIG_OF_LIBFDT)
 #include <linux/libfdt.h>
 #endif
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/sbc8548/ddr.c b/board/sbc8548/ddr.c
index f7af1e3ded..61bc77c418 100644
--- a/board/sbc8548/ddr.c
+++ b/board/sbc8548/ddr.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <linux/delay.h>
 
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
diff --git a/board/sbc8548/sbc8548.c b/board/sbc8548/sbc8548.c
index 5883859e46..24782c7e6d 100644
--- a/board/sbc8548/sbc8548.c
+++ b/board/sbc8548/sbc8548.c
@@ -23,6 +23,7 @@
 #include <netdev.h>
 #include <tsec.h>
 #include <miiphy.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 
diff --git a/board/sbc8641d/sbc8641d.c b/board/sbc8641d/sbc8641d.c
index 91867d4f3d..3375cd621c 100644
--- a/board/sbc8641d/sbc8641d.c
+++ b/board/sbc8641d/sbc8641d.c
@@ -21,6 +21,7 @@
 #include <asm/fsl_pci.h>
 #include <fsl_ddr_sdram.h>
 #include <asm/fsl_serdes.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 
diff --git a/board/seco/mx6quq7/mx6quq7.c b/board/seco/mx6quq7/mx6quq7.c
index b8aa0e7f69..4fa0daba46 100644
--- a/board/seco/mx6quq7/mx6quq7.c
+++ b/board/seco/mx6quq7/mx6quq7.c
@@ -13,6 +13,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/mx6-pins.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
diff --git a/board/siemens/capricorn/board.c b/board/siemens/capricorn/board.c
index 8c61425384..c46e4ff736 100644
--- a/board/siemens/capricorn/board.c
+++ b/board/siemens/capricorn/board.c
@@ -27,6 +27,7 @@
 #ifndef CONFIG_SPL
 #include <asm/arch-imx8/clock.h>
 #endif
+#include <linux/delay.h>
 #include "../common/factoryset.h"
 
 #define GPIO_PAD_CTRL \
diff --git a/board/siemens/draco/board.c b/board/siemens/draco/board.c
index b4893d39ae..5ac73c0ef4 100644
--- a/board/siemens/draco/board.c
+++ b/board/siemens/draco/board.c
@@ -35,6 +35,7 @@
 #include <miiphy.h>
 #include <cpsw.h>
 #include <watchdog.h>
+#include <linux/delay.h>
 #include "board.h"
 #include "../common/factoryset.h"
 #include <nand.h>
diff --git a/board/siemens/rut/board.c b/board/siemens/rut/board.c
index fff2b696ce..3b109e9818 100644
--- a/board/siemens/rut/board.c
+++ b/board/siemens/rut/board.c
@@ -34,6 +34,7 @@
 #include <cpsw.h>
 #include <video.h>
 #include <watchdog.h>
+#include <linux/delay.h>
 #include "board.h"
 #include "../common/factoryset.h"
 #include "../../../drivers/video/da8xx-fb.h"
diff --git a/board/sks-kinkel/sksimx6/sksimx6.c b/board/sks-kinkel/sksimx6/sksimx6.c
index 235d87c053..772c17979b 100644
--- a/board/sks-kinkel/sksimx6/sksimx6.c
+++ b/board/sks-kinkel/sksimx6/sksimx6.c
@@ -11,6 +11,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/mx6-pins.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
diff --git a/board/socrates/sdram.c b/board/socrates/sdram.c
index 8eb4f8fc95..d358a209a4 100644
--- a/board/socrates/sdram.c
+++ b/board/socrates/sdram.c
@@ -12,6 +12,7 @@
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #include <spd_sdram.h>
+#include <linux/delay.h>
 
 
 #if !defined(CONFIG_SPD_EEPROM)
diff --git a/board/socrates/socrates.c b/board/socrates/socrates.c
index c51f3e4f92..58c5f7527b 100644
--- a/board/socrates/socrates.c
+++ b/board/socrates/socrates.c
@@ -20,6 +20,7 @@
 #include <asm/immap_85xx.h>
 #include <ioports.h>
 #include <flash.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <asm/io.h>
diff --git a/board/softing/vining_2000/vining_2000.c b/board/softing/vining_2000/vining_2000.c
index f523e50ea5..19fb85f34c 100644
--- a/board/softing/vining_2000/vining_2000.c
+++ b/board/softing/vining_2000/vining_2000.c
@@ -19,6 +19,7 @@
 #include <asm/io.h>
 #include <asm/mach-imx/mxc_i2c.h>
 #include <env.h>
+#include <linux/delay.h>
 #include <linux/sizes.h>
 #include <common.h>
 #include <fsl_esdhc_imx.h>
diff --git a/board/softing/vining_fpga/socfpga.c b/board/softing/vining_fpga/socfpga.c
index 537d9d1872..7e311b7a1c 100644
--- a/board/softing/vining_fpga/socfpga.c
+++ b/board/softing/vining_fpga/socfpga.c
@@ -13,6 +13,7 @@
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <i2c.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/solidrun/clearfog/clearfog.c b/board/solidrun/clearfog/clearfog.c
index 9430097432..df23c0d8b3 100644
--- a/board/solidrun/clearfog/clearfog.c
+++ b/board/solidrun/clearfog/clearfog.c
@@ -13,6 +13,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <linux/delay.h>
 #include "../common/tlv_data.h"
 
 #include "../drivers/ddr/marvell/a38x/ddr3_init.h"
diff --git a/board/solidrun/mx6cuboxi/mx6cuboxi.c b/board/solidrun/mx6cuboxi/mx6cuboxi.c
index 2660735ce7..94707bccb2 100644
--- a/board/solidrun/mx6cuboxi/mx6cuboxi.c
+++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c
@@ -24,6 +24,7 @@
 #include <asm/arch/mx6-pins.h>
 #include <asm/arch/mxc_hdmi.h>
 #include <env.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
diff --git a/board/spear/x600/fpga.c b/board/spear/x600/fpga.c
index 6dc3fb38da..5140694b9e 100644
--- a/board/spear/x600/fpga.c
+++ b/board/spear/x600/fpga.c
@@ -12,6 +12,7 @@
 #include <asm/arch/hardware.h>
 #include <asm/arch/spr_misc.h>
 #include <asm/arch/spr_ssp.h>
+#include <linux/delay.h>
 
 /*
  * FPGA program pin configuration on X600:
diff --git a/board/sr1500/socfpga.c b/board/sr1500/socfpga.c
index 83663c7e4d..d9125a76bf 100644
--- a/board/sr1500/socfpga.c
+++ b/board/sr1500/socfpga.c
@@ -8,6 +8,7 @@
 #include <asm/arch/reset_manager.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 int board_early_init_f(void)
 {
diff --git a/board/st/stm32f746-disco/stm32f746-disco.c b/board/st/stm32f746-disco/stm32f746-disco.c
index ae5e110989..0f728fd9f9 100644
--- a/board/st/stm32f746-disco/stm32f746-disco.c
+++ b/board/st/stm32f746-disco/stm32f746-disco.c
@@ -23,6 +23,7 @@
 #include <asm/arch/gpio.h>
 #include <asm/arch/syscfg.h>
 #include <asm/gpio.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/st/stm32mp1/board.c b/board/st/stm32mp1/board.c
index 4e35d36c76..b0d165028c 100644
--- a/board/st/stm32mp1/board.c
+++ b/board/st/stm32mp1/board.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <asm/io.h>
 #include <asm/arch/ddr.h>
+#include <linux/delay.h>
 #include <power/pmic.h>
 #include <power/stpmic1.h>
 
diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
index 2e73eec333..dc6abd1933 100644
--- a/board/st/stm32mp1/stm32mp1.c
+++ b/board/st/stm32mp1/stm32mp1.c
@@ -37,6 +37,7 @@
 #include <asm/arch/stm32.h>
 #include <asm/arch/sys_proto.h>
 #include <jffs2/load_kernel.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #include <power/regulator.h>
 #include <usb/dwc2_udc.h>
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index f8d5dba91c..f32e8f582f 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -28,6 +28,7 @@
 #include <asm/arch/gpio.h>
 #include <asm/arch/mmc.h>
 #include <asm/arch/spl.h>
+#include <linux/delay.h>
 #include <u-boot/crc.h>
 #ifndef CONFIG_ARM64
 #include <asm/armv7.h>
diff --git a/board/synopsys/hsdk/hsdk.c b/board/synopsys/hsdk/hsdk.c
index 4ec4b67e73..fa6f841146 100644
--- a/board/synopsys/hsdk/hsdk.c
+++ b/board/synopsys/hsdk/hsdk.c
@@ -14,6 +14,7 @@
 #include <irq_func.h>
 #include <log.h>
 #include <asm/cache.h>
+#include <linux/delay.h>
 #include <linux/printk.h>
 #include <linux/kernel.h>
 #include <linux/io.h>
diff --git a/board/syteco/zmx25/zmx25.c b/board/syteco/zmx25/zmx25.c
index 9ea62bb796..d5393d7059 100644
--- a/board/syteco/zmx25/zmx25.c
+++ b/board/syteco/zmx25/zmx25.c
@@ -21,6 +21,7 @@
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux-mx25.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/technexion/pico-imx6/pico-imx6.c b/board/technexion/pico-imx6/pico-imx6.c
index c60ce4b138..b5a02eb832 100644
--- a/board/technexion/pico-imx6/pico-imx6.c
+++ b/board/technexion/pico-imx6/pico-imx6.c
@@ -20,6 +20,7 @@
 #include <asm/mach-imx/video.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/sizes.h>
 #include <common.h>
 #include <miiphy.h>
diff --git a/board/technexion/pico-imx6/spl.c b/board/technexion/pico-imx6/spl.c
index fe3c584662..f9ae09607f 100644
--- a/board/technexion/pico-imx6/spl.c
+++ b/board/technexion/pico-imx6/spl.c
@@ -13,6 +13,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/mx6-pins.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
diff --git a/board/technexion/pico-imx6ul/pico-imx6ul.c b/board/technexion/pico-imx6ul/pico-imx6ul.c
index e4ca83a5ff..1d24096df5 100644
--- a/board/technexion/pico-imx6ul/pico-imx6ul.c
+++ b/board/technexion/pico-imx6ul/pico-imx6ul.c
@@ -19,6 +19,7 @@
 #include <common.h>
 #include <miiphy.h>
 #include <netdev.h>
+#include <linux/delay.h>
 #include <linux/sizes.h>
 #include <usb.h>
 #include <power/pmic.h>
diff --git a/board/technologic/ts4600/ts4600.c b/board/technologic/ts4600/ts4600.c
index 2a63e84ec3..54508cd864 100644
--- a/board/technologic/ts4600/ts4600.c
+++ b/board/technologic/ts4600/ts4600.c
@@ -21,6 +21,7 @@
 #include <asm/arch/iomux-mx28.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
+#include <linux/delay.h>
 #include <linux/mii.h>
 #include <miiphy.h>
 #include <netdev.h>
diff --git a/board/technologic/ts4800/ts4800.c b/board/technologic/ts4800/ts4800.c
index 99f9293f7f..28918de547 100644
--- a/board/technologic/ts4800/ts4800.c
+++ b/board/technologic/ts4800/ts4800.c
@@ -15,6 +15,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux-mx51.h>
 #include <env.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/crm_regs.h>
diff --git a/board/theadorable/theadorable.c b/board/theadorable/theadorable.c
index 6ee09034ea..53ef9916a2 100644
--- a/board/theadorable/theadorable.c
+++ b/board/theadorable/theadorable.c
@@ -17,6 +17,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <linux/delay.h>
 #include <linux/mbus.h>
 #ifdef CONFIG_NET
 #include <netdev.h>
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index 56fe171aa7..474495a005 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -36,6 +36,7 @@
 #include <i2c.h>
 #include <miiphy.h>
 #include <cpsw.h>
+#include <linux/delay.h>
 #include <power/tps65217.h>
 #include <power/tps65910.h>
 #include <env_internal.h>
diff --git a/board/ti/evm/evm.c b/board/ti/evm/evm.c
index d6d21bae1f..aba74fce77 100644
--- a/board/ti/evm/evm.c
+++ b/board/ti/evm/evm.c
@@ -28,6 +28,7 @@
 #include <twl4030.h>
 #include <asm/mach-types.h>
 #include <asm/omap_musb.h>
+#include <linux/delay.h>
 #include <linux/mtd/rawnand.h>
 #include <linux/usb/ch9.h>
 #include <linux/usb/gadget.h>
diff --git a/board/ti/ks2_evm/board_k2g.c b/board/ti/ks2_evm/board_k2g.c
index 21f002e3b1..450ccc4e07 100644
--- a/board/ti/ks2_evm/board_k2g.c
+++ b/board/ti/ks2_evm/board_k2g.c
@@ -18,6 +18,7 @@
 #include <fdtdec.h>
 #include <i2c.h>
 #include <remoteproc.h>
+#include <linux/delay.h>
 #include "mux-k2g.h"
 #include "../common/board_detect.h"
 
diff --git a/board/ti/omap5_uevm/evm.c b/board/ti/omap5_uevm/evm.c
index fab48a70ef..e35f319b46 100644
--- a/board/ti/omap5_uevm/evm.c
+++ b/board/ti/omap5_uevm/evm.c
@@ -14,6 +14,7 @@
 #include <asm/arch/mmc_host_def.h>
 #include <tca642x.h>
 #include <usb.h>
+#include <linux/delay.h>
 #include <linux/usb/gadget.h>
 #include <dwc3-uboot.h>
 #include <dwc3-omap-uboot.h>
diff --git a/board/timll/devkit3250/devkit3250.c b/board/timll/devkit3250/devkit3250.c
index b455844c89..f4eaf15970 100644
--- a/board/timll/devkit3250/devkit3250.c
+++ b/board/timll/devkit3250/devkit3250.c
@@ -13,6 +13,7 @@
 #include <asm/arch/emc.h>
 #include <asm/arch/wdt.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/toradex/apalis-tk1/apalis-tk1.c b/board/toradex/apalis-tk1/apalis-tk1.c
index 3d80381646..d77b4c4ab9 100644
--- a/board/toradex/apalis-tk1/apalis-tk1.c
+++ b/board/toradex/apalis-tk1/apalis-tk1.c
@@ -15,6 +15,7 @@
 #include <asm/arch/pinmux.h>
 #include <env_internal.h>
 #include <pci_tegra.h>
+#include <linux/delay.h>
 #include <power/as3722.h>
 #include <power/pmic.h>
 
diff --git a/board/toradex/apalis-tk1/as3722_init.c b/board/toradex/apalis-tk1/as3722_init.c
index 0b5882c0d8..68169f5548 100644
--- a/board/toradex/apalis-tk1/as3722_init.c
+++ b/board/toradex/apalis-tk1/as3722_init.c
@@ -7,6 +7,7 @@
 #include <log.h>
 #include <asm/io.h>
 #include <asm/arch-tegra/tegra_i2c.h>
+#include <linux/delay.h>
 #include "as3722_init.h"
 
 /* AS3722-PMIC-specific early init code - get CPU rails up, etc */
diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c
index dac9503c1b..f7b79c576e 100644
--- a/board/toradex/apalis_imx6/apalis_imx6.c
+++ b/board/toradex/apalis_imx6/apalis_imx6.c
@@ -12,6 +12,7 @@
 #include <image.h>
 #include <init.h>
 #include <net.h>
+#include <linux/delay.h>
 
 #include <ahci.h>
 #include <asm/arch/clock.h>
diff --git a/board/toradex/apalis_imx6/pf0100.c b/board/toradex/apalis_imx6/pf0100.c
index f8d0494332..c89052ff5d 100644
--- a/board/toradex/apalis_imx6/pf0100.c
+++ b/board/toradex/apalis_imx6/pf0100.c
@@ -15,6 +15,7 @@
 #include <asm/arch/mx6-pins.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
+#include <linux/delay.h>
 
 #include "pf0100_otp.inc"
 #include "pf0100.h"
diff --git a/board/toradex/apalis_t30/apalis_t30.c b/board/toradex/apalis_t30/apalis_t30.c
index 5e6ba69c0b..3e8b8b1fe3 100644
--- a/board/toradex/apalis_t30/apalis_t30.c
+++ b/board/toradex/apalis_t30/apalis_t30.c
@@ -16,6 +16,7 @@
 #include <dm.h>
 #include <i2c.h>
 #include <pci_tegra.h>
+#include <linux/delay.h>
 #include "../common/tdx-common.h"
 
 #include "pinmux-config-apalis_t30.h"
diff --git a/board/toradex/colibri-imx6ull/colibri-imx6ull.c b/board/toradex/colibri-imx6ull/colibri-imx6ull.c
index 7dfe8aec88..c67d02f7c2 100644
--- a/board/toradex/colibri-imx6ull/colibri-imx6ull.c
+++ b/board/toradex/colibri-imx6ull/colibri-imx6ull.c
@@ -4,6 +4,7 @@
  */
 #include <common.h>
 #include <init.h>
+#include <linux/delay.h>
 
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c
index 197d8c39f5..bdb4ac6b11 100644
--- a/board/toradex/colibri_imx6/colibri_imx6.c
+++ b/board/toradex/colibri_imx6/colibri_imx6.c
@@ -12,6 +12,7 @@
 #include <env.h>
 #include <init.h>
 #include <net.h>
+#include <linux/delay.h>
 
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
diff --git a/board/toradex/colibri_imx6/pf0100.c b/board/toradex/colibri_imx6/pf0100.c
index 149e9bd3b9..8f08d8c733 100644
--- a/board/toradex/colibri_imx6/pf0100.c
+++ b/board/toradex/colibri_imx6/pf0100.c
@@ -15,6 +15,7 @@
 #include <asm/arch/mx6-pins.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
+#include <linux/delay.h>
 
 #include "pf0100_otp.inc"
 #include "pf0100.h"
diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c
index 8e62b79ef3..8df925dacf 100644
--- a/board/toradex/colibri_imx7/colibri_imx7.c
+++ b/board/toradex/colibri_imx7/colibri_imx7.c
@@ -21,6 +21,7 @@
 #include <fdt_support.h>
 #include <fsl_esdhc_imx.h>
 #include <jffs2/load_kernel.h>
+#include <linux/delay.h>
 #include <linux/sizes.h>
 #include <mmc.h>
 #include <miiphy.h>
diff --git a/board/toradex/colibri_pxa270/colibri_pxa270.c b/board/toradex/colibri_pxa270/colibri_pxa270.c
index d9b09ae461..18b3d3f542 100644
--- a/board/toradex/colibri_pxa270/colibri_pxa270.c
+++ b/board/toradex/colibri_pxa270/colibri_pxa270.c
@@ -22,6 +22,7 @@
 #include <serial.h>
 #include <usb.h>
 #include <asm/mach-types.h>
+#include <linux/delay.h>
 #include "../common/tdx-common.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/toradex/colibri_t20/colibri_t20.c b/board/toradex/colibri_t20/colibri_t20.c
index 22517b9c54..cb0aed872f 100644
--- a/board/toradex/colibri_t20/colibri_t20.c
+++ b/board/toradex/colibri_t20/colibri_t20.c
@@ -16,6 +16,7 @@
 #include <asm/io.h>
 #include <i2c.h>
 #include <nand.h>
+#include <linux/delay.h>
 #include "../common/tdx-common.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/toradex/colibri_t30/colibri_t30.c b/board/toradex/colibri_t30/colibri_t30.c
index d21ff544f4..0bbe81e44d 100644
--- a/board/toradex/colibri_t30/colibri_t30.c
+++ b/board/toradex/colibri_t30/colibri_t30.c
@@ -13,6 +13,7 @@
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <i2c.h>
+#include <linux/delay.h>
 #include "pinmux-config-colibri_t30.h"
 #include "../common/tdx-common.h"
 
diff --git a/board/tplink/wdr4300/wdr4300.c b/board/tplink/wdr4300/wdr4300.c
index 7e7339553b..287132e4fc 100644
--- a/board/tplink/wdr4300/wdr4300.c
+++ b/board/tplink/wdr4300/wdr4300.c
@@ -8,6 +8,7 @@
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
+#include <linux/delay.h>
 #include <mach/ath79.h>
 #include <mach/ar71xx_regs.h>
 #include <mach/ddr.h>
diff --git a/board/tqc/tqm834x/pci.c b/board/tqc/tqm834x/pci.c
index 0834207766..92bda60765 100644
--- a/board/tqc/tqm834x/pci.c
+++ b/board/tqc/tqm834x/pci.c
@@ -13,6 +13,7 @@
 #include <pci.h>
 #include <i2c.h>
 #include <asm/fsl_i2c.h>
+#include <linux/delay.h>
 
 static struct pci_region pci1_regions[] = {
 	{
diff --git a/board/tqc/tqm834x/tqm834x.c b/board/tqc/tqm834x/tqm834x.c
index 77fe7e243f..165a5433e7 100644
--- a/board/tqc/tqm834x/tqm834x.c
+++ b/board/tqc/tqm834x/tqm834x.c
@@ -16,6 +16,7 @@
 #include <asm/mmu.h>
 #include <pci.h>
 #include <flash.h>
+#include <linux/delay.h>
 #include <mtd/cfi_flash.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/tqc/tqma6/tqma6_mba6.c b/board/tqc/tqma6/tqma6_mba6.c
index c5598c0e8c..84d0e386a3 100644
--- a/board/tqc/tqma6/tqma6_mba6.c
+++ b/board/tqc/tqma6/tqma6_mba6.c
@@ -15,6 +15,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/sys_proto.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/mxc_i2c.h>
diff --git a/board/tqc/tqma6/tqma6_wru4.c b/board/tqc/tqma6/tqma6_wru4.c
index d64eff4ffa..0488cbaaa8 100644
--- a/board/tqc/tqma6/tqma6_wru4.c
+++ b/board/tqc/tqma6/tqma6_wru4.c
@@ -17,6 +17,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/sys_proto.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/boot_mode.h>
diff --git a/board/udoo/neo/neo.c b/board/udoo/neo/neo.c
index 096551b3c7..5e49180c76 100644
--- a/board/udoo/neo/neo.c
+++ b/board/udoo/neo/neo.c
@@ -25,6 +25,7 @@
 #include <asm/mach-imx/mxc_i2c.h>
 #include <asm/arch/sys_proto.h>
 #include <spl.h>
+#include <linux/delay.h>
 #include <linux/sizes.h>
 #include <common.h>
 #include <i2c.h>
diff --git a/board/udoo/udoo.c b/board/udoo/udoo.c
index 0370db67e4..4c85d99c13 100644
--- a/board/udoo/udoo.c
+++ b/board/udoo/udoo.c
@@ -13,6 +13,7 @@
 #include <env.h>
 #include <malloc.h>
 #include <asm/arch/mx6-pins.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
diff --git a/board/udoo/udoo_spl.c b/board/udoo/udoo_spl.c
index 09fc23a901..d9afbbb741 100644
--- a/board/udoo/udoo_spl.c
+++ b/board/udoo/udoo_spl.c
@@ -12,6 +12,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/mx6-pins.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
diff --git a/board/varisys/common/sys_eeprom.c b/board/varisys/common/sys_eeprom.c
index 134c307e5d..251d9fd73e 100644
--- a/board/varisys/common/sys_eeprom.c
+++ b/board/varisys/common/sys_eeprom.c
@@ -15,6 +15,7 @@
 #include <env.h>
 #include <i2c.h>
 #include <linux/ctype.h>
+#include <linux/delay.h>
 #include <u-boot/crc.h>
 
 #include "eeprom.h"
diff --git a/board/ve8313/ve8313.c b/board/ve8313/ve8313.c
index d1c9535f46..ceb3d75552 100644
--- a/board/ve8313/ve8313.c
+++ b/board/ve8313/ve8313.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <fdt_support.h>
 #include <init.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <pci.h>
 #include <mpc83xx.h>
diff --git a/board/wandboard/spl.c b/board/wandboard/spl.c
index 816b9cb6fc..04c351fff9 100644
--- a/board/wandboard/spl.c
+++ b/board/wandboard/spl.c
@@ -11,6 +11,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/mx6-pins.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c
index c113a0ccc9..e0e01b1a4a 100644
--- a/board/wandboard/wandboard.c
+++ b/board/wandboard/wandboard.c
@@ -25,6 +25,7 @@
 #include <asm/mach-imx/sata.h>
 #include <asm/io.h>
 #include <env.h>
+#include <linux/delay.h>
 #include <linux/sizes.h>
 #include <common.h>
 #include <miiphy.h>
diff --git a/board/work-microwave/work_92105/work_92105.c b/board/work-microwave/work_92105/work_92105.c
index 5cc2566e2a..2e0def5b64 100644
--- a/board/work-microwave/work_92105/work_92105.c
+++ b/board/work-microwave/work_92105/work_92105.c
@@ -16,6 +16,7 @@
 #include <asm/arch/wdt.h>
 #include <asm/gpio.h>
 #include <spl.h>
+#include <linux/delay.h>
 #include "work_92105_display.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/work-microwave/work_92105/work_92105_display.c b/board/work-microwave/work_92105/work_92105_display.c
index 4641185ceb..fecbbbdb58 100644
--- a/board/work-microwave/work_92105/work_92105_display.c
+++ b/board/work-microwave/work_92105/work_92105_display.c
@@ -22,6 +22,7 @@
 #include <i2c.h>
 #include <version.h>
 #include <vsprintf.h>
+#include <linux/delay.h>
 
 /*
  * GPO 15 in port 3 is gpio 3*32+15 = 111
diff --git a/board/xilinx/zynqmp/tap_delays.c b/board/xilinx/zynqmp/tap_delays.c
index c3ae357bbd..5fde0aed7d 100644
--- a/board/xilinx/zynqmp/tap_delays.c
+++ b/board/xilinx/zynqmp/tap_delays.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <asm/arch/sys_proto.h>
+#include <linux/delay.h>
 
 #define SD_DLL_CTRL			0xFF180358
 #define SD_ITAP_DLY			0xFF180314
diff --git a/board/xilinx/zynqmp/xil_io.h b/board/xilinx/zynqmp/xil_io.h
index 1c1bf32ada..e6caa7c850 100644
--- a/board/xilinx/zynqmp/xil_io.h
+++ b/board/xilinx/zynqmp/xil_io.h
@@ -6,6 +6,7 @@
 /* FIXME remove this when vivado is fixed */
 #include <asm/io.h>
 #include <common.h>
+#include <linux/delay.h>
 
 #define xil_printf(...)
 
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index fd6652ac3d..35ffac9735 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -31,6 +31,8 @@
 #include <zynqmppl.h>
 #include <zynqmp_firmware.h>
 #include <g_dnl.h>
+#include <linux/delay.h>
+#include <linux/sizes.h>
 #include "../common/board.h"
 
 #include "pm_cfg_obj.h"
diff --git a/cmd/bootmenu.c b/cmd/bootmenu.c
index 77e46b8197..8e004d4c20 100644
--- a/cmd/bootmenu.c
+++ b/cmd/bootmenu.c
@@ -11,6 +11,7 @@
 #include <menu.h>
 #include <watchdog.h>
 #include <malloc.h>
+#include <linux/delay.h>
 #include <linux/string.h>
 
 /* maximum bootmenu entries */
diff --git a/cmd/conitrace.c b/cmd/conitrace.c
index e45e87a64c..88850db541 100644
--- a/cmd/conitrace.c
+++ b/cmd/conitrace.c
@@ -7,6 +7,7 @@
  */
 #include <common.h>
 #include <command.h>
+#include <linux/delay.h>
 
 static int do_conitrace(struct cmd_tbl *cmdtp, int flag, int argc,
 			char *const argv[])
diff --git a/cmd/eeprom.c b/cmd/eeprom.c
index f61a5510e8..7fa62bba8f 100644
--- a/cmd/eeprom.c
+++ b/cmd/eeprom.c
@@ -25,6 +25,7 @@
 #include <eeprom.h>
 #include <i2c.h>
 #include <eeprom_layout.h>
+#include <linux/delay.h>
 
 #ifndef	CONFIG_SYS_I2C_SPEED
 #define	CONFIG_SYS_I2C_SPEED	50000
diff --git a/cmd/i2c.c b/cmd/i2c.c
index a51f781a46..cc01119b21 100644
--- a/cmd/i2c.c
+++ b/cmd/i2c.c
@@ -77,6 +77,7 @@
 #include <malloc.h>
 #include <asm/byteorder.h>
 #include <linux/compiler.h>
+#include <linux/delay.h>
 #include <u-boot/crc.h>
 
 /* Display values from last command.
diff --git a/cmd/load.c b/cmd/load.c
index 85e5540f2c..63a9414543 100644
--- a/cmd/load.c
+++ b/cmd/load.c
@@ -20,6 +20,7 @@
 #include <serial.h>
 #include <xyzModem.h>
 #include <asm/cache.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/cmd/mem.c b/cmd/mem.c
index 423e6c1056..4d88254188 100644
--- a/cmd/mem.c
+++ b/cmd/mem.c
@@ -24,6 +24,7 @@
 #include <watchdog.h>
 #include <asm/io.h>
 #include <linux/compiler.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/cmd/misc.c b/cmd/misc.c
index d33219308b..20ab943494 100644
--- a/cmd/misc.c
+++ b/cmd/misc.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <command.h>
 #include <console.h>
+#include <linux/delay.h>
 
 static int do_sleep(struct cmd_tbl *cmdtp, int flag, int argc,
 		    char *const argv[])
diff --git a/cmd/usb_mass_storage.c b/cmd/usb_mass_storage.c
index a117ab213a..d565635c6c 100644
--- a/cmd/usb_mass_storage.c
+++ b/cmd/usb_mass_storage.c
@@ -17,6 +17,7 @@
 #include <usb.h>
 #include <usb_mass_storage.h>
 #include <watchdog.h>
+#include <linux/delay.h>
 
 static int ums_read_sector(struct ums *ums_dev,
 			   ulong start, lbaint_t blkcnt, void *buf)
diff --git a/common/autoboot.c b/common/autoboot.c
index 9d7b6b8d53..6d78716a26 100644
--- a/common/autoboot.c
+++ b/common/autoboot.c
@@ -19,6 +19,7 @@
 #include <menu.h>
 #include <post.h>
 #include <time.h>
+#include <linux/delay.h>
 #include <u-boot/sha256.h>
 #include <bootcount.h>
 
diff --git a/common/console.c b/common/console.c
index e398530a13..1deca3cb78 100644
--- a/common/console.c
+++ b/common/console.c
@@ -19,6 +19,7 @@
 #include <exports.h>
 #include <env_internal.h>
 #include <watchdog.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/common/miiphyutil.c b/common/miiphyutil.c
index 9b86b09832..7d4d15ed91 100644
--- a/common/miiphyutil.c
+++ b/common/miiphyutil.c
@@ -14,6 +14,7 @@
 #include <log.h>
 #include <miiphy.h>
 #include <phy.h>
+#include <linux/delay.h>
 
 #include <asm/types.h>
 #include <linux/list.h>
diff --git a/common/usb.c b/common/usb.c
index 7c60460452..aad13fd9c5 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -38,6 +38,7 @@
 #include <asm/unaligned.h>
 #include <errno.h>
 #include <usb.h>
+#include <linux/delay.h>
 
 #define USB_BUFSIZ	512
 
diff --git a/common/usb_hub.c b/common/usb_hub.c
index 354aee76b4..e578f0be28 100644
--- a/common/usb_hub.c
+++ b/common/usb_hub.c
@@ -32,6 +32,7 @@
 #include <asm/processor.h>
 #include <asm/unaligned.h>
 #include <linux/ctype.h>
+#include <linux/delay.h>
 #include <linux/list.h>
 #include <asm/byteorder.h>
 #ifdef CONFIG_SANDBOX
diff --git a/common/usb_storage.c b/common/usb_storage.c
index 743a239084..ff25441995 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -45,6 +45,7 @@
 #include <asm/processor.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
+#include <linux/delay.h>
 
 #include <part.h>
 #include <usb.h>
diff --git a/drivers/adc/adc-uclass.c b/drivers/adc/adc-uclass.c
index 0a492eba54..d435667258 100644
--- a/drivers/adc/adc-uclass.c
+++ b/drivers/adc/adc-uclass.c
@@ -12,6 +12,7 @@
 #include <dm/device-internal.h>
 #include <dm/uclass-internal.h>
 #include <adc.h>
+#include <linux/delay.h>
 #include <power/regulator.h>
 
 #define ADC_UCLASS_PLATDATA_SIZE	sizeof(struct adc_uclass_platdata)
diff --git a/drivers/adc/meson-saradc.c b/drivers/adc/meson-saradc.c
index f7c919d3b0..1e1515f6e3 100644
--- a/drivers/adc/meson-saradc.c
+++ b/drivers/adc/meson-saradc.c
@@ -14,6 +14,7 @@
 #include <regmap.h>
 #include <errno.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/math64.h>
 #include <linux/bitfield.h>
 
diff --git a/drivers/adc/stm32-adc.c b/drivers/adc/stm32-adc.c
index ca1ac3e757..140ddcee3c 100644
--- a/drivers/adc/stm32-adc.c
+++ b/drivers/adc/stm32-adc.c
@@ -10,6 +10,7 @@
 #include <adc.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 #include <linux/iopoll.h>
 #include "stm32-adc-core.h"
 
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 2bb45606dc..dda3586d7c 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -12,6 +12,7 @@
 #include <blk.h>
 #include <cpu_func.h>
 #include <log.h>
+#include <linux/delay.h>
 
 #include <command.h>
 #include <dm.h>
diff --git a/drivers/ata/ahci_sunxi.c b/drivers/ata/ahci_sunxi.c
index 989690a33e..58e345d998 100644
--- a/drivers/ata/ahci_sunxi.c
+++ b/drivers/ata/ahci_sunxi.c
@@ -6,6 +6,7 @@
 #include <errno.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
+#include <linux/delay.h>
 
 #define AHCI_PHYCS0R 0x00c0
 #define AHCI_PHYCS1R 0x00c4
diff --git a/drivers/ata/dwc_ahsata.c b/drivers/ata/dwc_ahsata.c
index 7334129c0f..562e982e32 100644
--- a/drivers/ata/dwc_ahsata.c
+++ b/drivers/ata/dwc_ahsata.c
@@ -24,6 +24,7 @@
 #include <asm/mach-imx/sata.h>
 #include <linux/bitops.h>
 #include <linux/ctype.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include "dwc_ahsata_priv.h"
 
diff --git a/drivers/ata/fsl_sata.c b/drivers/ata/fsl_sata.c
index e8f2d36510..8c6726a621 100644
--- a/drivers/ata/fsl_sata.c
+++ b/drivers/ata/fsl_sata.c
@@ -18,6 +18,7 @@
 #include <libata.h>
 #include <fis.h>
 #include <sata.h>
+#include <linux/delay.h>
 #include "fsl_sata.h"
 
 #if CONFIG_IS_ENABLED(BLK)
diff --git a/drivers/ata/mvsata_ide.c b/drivers/ata/mvsata_ide.c
index 38181235af..2d395dd6d8 100644
--- a/drivers/ata/mvsata_ide.c
+++ b/drivers/ata/mvsata_ide.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 #if defined(CONFIG_ORION5X)
 #include <asm/arch/orion5x.h>
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 9fccaea275..b29cb4e435 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -44,6 +44,7 @@
 #include <libata.h>
 #include <malloc.h>
 #include <sata.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <linux/mbus.h>
diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c
index 17db64009c..6896fa8771 100644
--- a/drivers/ata/sata_sil.c
+++ b/drivers/ata/sata_sil.c
@@ -17,6 +17,7 @@
 #include <sata.h>
 #include <libata.h>
 #include <sata.h>
+#include <linux/delay.h>
 
 #if CONFIG_IS_ENABLED(BLK)
 #include <dm.h>
diff --git a/drivers/ata/sata_sil3114.c b/drivers/ata/sata_sil3114.c
index 7348566dd0..4d3a680f17 100644
--- a/drivers/ata/sata_sil3114.c
+++ b/drivers/ata/sata_sil3114.c
@@ -19,6 +19,7 @@
 #include <ide.h>
 #include <sata.h>
 #include <libata.h>
+#include <linux/delay.h>
 #include "sata_sil3114.h"
 
 /* Convert sectorsize to wordsize */
diff --git a/drivers/axi/ihs_axi.c b/drivers/axi/ihs_axi.c
index d4f6a4d6b4..a4aee8b58a 100644
--- a/drivers/axi/ihs_axi.c
+++ b/drivers/axi/ihs_axi.c
@@ -12,6 +12,7 @@
 #include <dm.h>
 #include <log.h>
 #include <regmap.h>
+#include <linux/delay.h>
 
 /**
  * struct ihs_axi_regs - Structure for the register map of a IHS AXI device
diff --git a/drivers/bios_emulator/atibios.c b/drivers/bios_emulator/atibios.c
index d1dc35d049..9c7f14e98f 100644
--- a/drivers/bios_emulator/atibios.c
+++ b/drivers/bios_emulator/atibios.c
@@ -51,6 +51,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <vbe.h>
+#include <linux/delay.h>
 #include "biosemui.h"
 
 /* Length of the BIOS image */
diff --git a/drivers/block/ide.c b/drivers/block/ide.c
index 1b7fd4974c..a766b5cf03 100644
--- a/drivers/block/ide.c
+++ b/drivers/block/ide.c
@@ -13,6 +13,7 @@
 #include <part.h>
 #include <watchdog.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 #ifdef __PPC__
 # define EIEIO		__asm__ volatile ("eieio")
diff --git a/drivers/clk/aspeed/clk_ast2500.c b/drivers/clk/aspeed/clk_ast2500.c
index e5b07c7386..ccfeded30c 100644
--- a/drivers/clk/aspeed/clk_ast2500.c
+++ b/drivers/clk/aspeed/clk_ast2500.c
@@ -11,6 +11,7 @@
 #include <asm/arch/scu_ast2500.h>
 #include <dm/lists.h>
 #include <dt-bindings/clock/ast2500-scu.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 
 /*
diff --git a/drivers/clk/clk-hsdk-cgu.c b/drivers/clk/clk-hsdk-cgu.c
index 38e85430b9..6d0099423e 100644
--- a/drivers/clk/clk-hsdk-cgu.c
+++ b/drivers/clk/clk-hsdk-cgu.c
@@ -15,6 +15,7 @@
 #include <dm.h>
 #include <log.h>
 #include <linux/bug.h>
+#include <linux/delay.h>
 #include <linux/io.h>
 
 /*
diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/clk-pll14xx.c
index 1673eb26b2..c526fc1cce 100644
--- a/drivers/clk/imx/clk-pll14xx.c
+++ b/drivers/clk/imx/clk-pll14xx.c
@@ -12,6 +12,7 @@
 #include <dm/device.h>
 #include <dm/devres.h>
 #include <linux/clk-provider.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/iopoll.h>
 #include <clk.h>
diff --git a/drivers/clk/mediatek/clk-mtk.c b/drivers/clk/mediatek/clk-mtk.c
index c52537cedf..671d4b35c7 100644
--- a/drivers/clk/mediatek/clk-mtk.c
+++ b/drivers/clk/mediatek/clk-mtk.c
@@ -11,6 +11,7 @@
 #include <div64.h>
 #include <dm.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 #include "clk-mtk.h"
 
diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c
index c9918c17d7..c540bb0a16 100644
--- a/drivers/clk/meson/g12a.c
+++ b/drivers/clk/meson/g12a.c
@@ -15,6 +15,7 @@
 #include <syscon.h>
 #include <div64.h>
 #include <dt-bindings/clock/g12a-clkc.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/kernel.h>
 #include "clk_meson.h"
diff --git a/drivers/clk/owl/clk_owl.c b/drivers/clk/owl/clk_owl.c
index 5607b2b7b5..11b8da1558 100644
--- a/drivers/clk/owl/clk_owl.c
+++ b/drivers/clk/owl/clk_owl.c
@@ -17,6 +17,7 @@
 #include <asm/arch-owl/regs_s700.h>
 #include <dt-bindings/clock/actions,s700-cmu.h>
 #endif
+#include <linux/delay.h>
 
 void owl_clk_init(struct owl_clk_priv *priv)
 {
diff --git a/drivers/clk/rockchip/clk_pll.c b/drivers/clk/rockchip/clk_pll.c
index 6dab5097c1..83d45c75ee 100644
--- a/drivers/clk/rockchip/clk_pll.c
+++ b/drivers/clk/rockchip/clk_pll.c
@@ -12,6 +12,7 @@
 #include <asm/arch-rockchip/clock.h>
 #include <asm/arch-rockchip/hardware.h>
 #include <div64.h>
+#include <linux/delay.h>
 
 static struct rockchip_pll_rate_table rockchip_auto_table;
 
diff --git a/drivers/clk/rockchip/clk_px30.c b/drivers/clk/rockchip/clk_px30.c
index 04d85b4b6d..b5b46e3950 100644
--- a/drivers/clk/rockchip/clk_px30.c
+++ b/drivers/clk/rockchip/clk_px30.c
@@ -17,6 +17,7 @@
 #include <asm/io.h>
 #include <dm/lists.h>
 #include <dt-bindings/clock/px30-cru.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/clk/rockchip/clk_rk3036.c b/drivers/clk/rockchip/clk_rk3036.c
index 276965245d..274572f70c 100644
--- a/drivers/clk/rockchip/clk_rk3036.c
+++ b/drivers/clk/rockchip/clk_rk3036.c
@@ -16,6 +16,7 @@
 #include <asm/arch-rockchip/hardware.h>
 #include <dm/lists.h>
 #include <dt-bindings/clock/rk3036-cru.h>
+#include <linux/delay.h>
 #include <linux/log2.h>
 #include <linux/stringify.h>
 
diff --git a/drivers/clk/rockchip/clk_rk3128.c b/drivers/clk/rockchip/clk_rk3128.c
index 6d1974844b..61f823e254 100644
--- a/drivers/clk/rockchip/clk_rk3128.c
+++ b/drivers/clk/rockchip/clk_rk3128.c
@@ -17,6 +17,7 @@
 #include <bitfield.h>
 #include <dm/lists.h>
 #include <dt-bindings/clock/rk3128-cru.h>
+#include <linux/delay.h>
 #include <linux/log2.h>
 
 enum {
diff --git a/drivers/clk/rockchip/clk_rk3188.c b/drivers/clk/rockchip/clk_rk3188.c
index d4df8175f2..11e3bd33cb 100644
--- a/drivers/clk/rockchip/clk_rk3188.c
+++ b/drivers/clk/rockchip/clk_rk3188.c
@@ -22,6 +22,7 @@
 #include <dm/device-internal.h>
 #include <dm/lists.h>
 #include <dm/uclass-internal.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/log2.h>
 #include <linux/stringify.h>
diff --git a/drivers/clk/rockchip/clk_rk322x.c b/drivers/clk/rockchip/clk_rk322x.c
index 68c1fbdc42..912e1f6e92 100644
--- a/drivers/clk/rockchip/clk_rk322x.c
+++ b/drivers/clk/rockchip/clk_rk322x.c
@@ -16,6 +16,7 @@
 #include <asm/arch-rockchip/hardware.h>
 #include <dm/lists.h>
 #include <dt-bindings/clock/rk3228-cru.h>
+#include <linux/delay.h>
 #include <linux/log2.h>
 #include <linux/stringify.h>
 
diff --git a/drivers/clk/rockchip/clk_rk3288.c b/drivers/clk/rockchip/clk_rk3288.c
index b4514bc850..3b199bbb86 100644
--- a/drivers/clk/rockchip/clk_rk3288.c
+++ b/drivers/clk/rockchip/clk_rk3288.c
@@ -23,6 +23,7 @@
 #include <dm/device-internal.h>
 #include <dm/lists.h>
 #include <dm/uclass-internal.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/log2.h>
 #include <linux/stringify.h>
diff --git a/drivers/clk/rockchip/clk_rk3328.c b/drivers/clk/rockchip/clk_rk3328.c
index 28613a971d..6d692ec8b7 100644
--- a/drivers/clk/rockchip/clk_rk3328.c
+++ b/drivers/clk/rockchip/clk_rk3328.c
@@ -18,6 +18,7 @@
 #include <asm/io.h>
 #include <dm/lists.h>
 #include <dt-bindings/clock/rk3328-cru.h>
+#include <linux/delay.h>
 
 struct pll_div {
 	u32 refdiv;
diff --git a/drivers/clk/rockchip/clk_rk3368.c b/drivers/clk/rockchip/clk_rk3368.c
index 34466b8e26..d1804c6e16 100644
--- a/drivers/clk/rockchip/clk_rk3368.c
+++ b/drivers/clk/rockchip/clk_rk3368.c
@@ -21,6 +21,7 @@
 #include <asm/io.h>
 #include <dm/lists.h>
 #include <dt-bindings/clock/rk3368-cru.h>
+#include <linux/delay.h>
 #include <linux/stringify.h>
 
 #if CONFIG_IS_ENABLED(OF_PLATDATA)
diff --git a/drivers/clk/rockchip/clk_rk3399.c b/drivers/clk/rockchip/clk_rk3399.c
index dd2834f9d6..2c58814b70 100644
--- a/drivers/clk/rockchip/clk_rk3399.c
+++ b/drivers/clk/rockchip/clk_rk3399.c
@@ -20,6 +20,7 @@
 #include <asm/arch-rockchip/hardware.h>
 #include <dm/lists.h>
 #include <dt-bindings/clock/rk3399-cru.h>
+#include <linux/delay.h>
 
 #if CONFIG_IS_ENABLED(OF_PLATDATA)
 struct rk3399_clk_plat {
diff --git a/drivers/clk/rockchip/clk_rv1108.c b/drivers/clk/rockchip/clk_rv1108.c
index c1d2724f20..aa1d98ca2a 100644
--- a/drivers/clk/rockchip/clk_rv1108.c
+++ b/drivers/clk/rockchip/clk_rv1108.c
@@ -18,6 +18,7 @@
 #include <asm/arch-rockchip/hardware.h>
 #include <dm/lists.h>
 #include <dt-bindings/clock/rv1108-cru.h>
+#include <linux/delay.h>
 #include <linux/stringify.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/clk/sifive/fu540-prci.c b/drivers/clk/sifive/fu540-prci.c
index 8847178001..67e21b6746 100644
--- a/drivers/clk/sifive/fu540-prci.c
+++ b/drivers/clk/sifive/fu540-prci.c
@@ -35,6 +35,7 @@
 #include <div64.h>
 #include <dm.h>
 #include <errno.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 
 #include <linux/math64.h>
diff --git a/drivers/ddr/altera/sdram_arria10.c b/drivers/ddr/altera/sdram_arria10.c
index 7e8c0154e5..19d5724a60 100644
--- a/drivers/ddr/altera/sdram_arria10.c
+++ b/drivers/ddr/altera/sdram_arria10.c
@@ -18,6 +18,7 @@
 #include <asm/arch/misc.h>
 #include <asm/arch/reset_manager.h>
 #include <asm/arch/sdram.h>
+#include <linux/delay.h>
 #include <linux/kernel.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/ddr/fsl/arm_ddr_gen3.c b/drivers/ddr/fsl/arm_ddr_gen3.c
index abe8c11d14..629ba6784e 100644
--- a/drivers/ddr/fsl/arm_ddr_gen3.c
+++ b/drivers/ddr/fsl/arm_ddr_gen3.c
@@ -13,6 +13,7 @@
 #include <fsl_immap.h>
 #include <fsl_ddr.h>
 #include <asm/arch/clock.h>
+#include <linux/delay.h>
 
 #if (CONFIG_CHIP_SELECTS_PER_CTRL > 4)
 #error Invalid setting for CONFIG_CHIP_SELECTS_PER_CTRL
diff --git a/drivers/ddr/fsl/fsl_ddr_gen4.c b/drivers/ddr/fsl/fsl_ddr_gen4.c
index 2b8475fcd1..eab5b82b23 100644
--- a/drivers/ddr/fsl/fsl_ddr_gen4.c
+++ b/drivers/ddr/fsl/fsl_ddr_gen4.c
@@ -16,6 +16,7 @@
 	defined(CONFIG_ARM)
 #include <asm/arch/clock.h>
 #endif
+#include <linux/delay.h>
 
 #define CTLR_INTLV_MASK	0x20000000
 
diff --git a/drivers/ddr/fsl/fsl_mmdc.c b/drivers/ddr/fsl/fsl_mmdc.c
index 08285120ca..cbd625b7ee 100644
--- a/drivers/ddr/fsl/fsl_mmdc.c
+++ b/drivers/ddr/fsl/fsl_mmdc.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <fsl_mmdc.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 static void set_wait_for_bits_clear(void *ptr, u32 value, u32 bits)
 {
diff --git a/drivers/ddr/fsl/mpc85xx_ddr_gen1.c b/drivers/ddr/fsl/mpc85xx_ddr_gen1.c
index 4b39b17f72..572f3703d5 100644
--- a/drivers/ddr/fsl/mpc85xx_ddr_gen1.c
+++ b/drivers/ddr/fsl/mpc85xx_ddr_gen1.c
@@ -7,6 +7,7 @@
 #include <log.h>
 #include <asm/io.h>
 #include <fsl_ddr_sdram.h>
+#include <linux/delay.h>
 
 #if (CONFIG_CHIP_SELECTS_PER_CTRL > 4)
 #error Invalid setting for CONFIG_CHIP_SELECTS_PER_CTRL
diff --git a/drivers/ddr/fsl/mpc85xx_ddr_gen2.c b/drivers/ddr/fsl/mpc85xx_ddr_gen2.c
index 54c10a860a..d7b8064e5f 100644
--- a/drivers/ddr/fsl/mpc85xx_ddr_gen2.c
+++ b/drivers/ddr/fsl/mpc85xx_ddr_gen2.c
@@ -7,6 +7,7 @@
 #include <asm/io.h>
 #include <asm/processor.h>
 #include <fsl_ddr_sdram.h>
+#include <linux/delay.h>
 
 #if (CONFIG_CHIP_SELECTS_PER_CTRL > 4)
 #error Invalid setting for CONFIG_CHIP_SELECTS_PER_CTRL
diff --git a/drivers/ddr/fsl/mpc85xx_ddr_gen3.c b/drivers/ddr/fsl/mpc85xx_ddr_gen3.c
index c6e983b5b4..ab8d2deaf9 100644
--- a/drivers/ddr/fsl/mpc85xx_ddr_gen3.c
+++ b/drivers/ddr/fsl/mpc85xx_ddr_gen3.c
@@ -8,6 +8,7 @@
 #include <asm/io.h>
 #include <fsl_ddr_sdram.h>
 #include <asm/processor.h>
+#include <linux/delay.h>
 
 #if (CONFIG_CHIP_SELECTS_PER_CTRL > 4)
 #error Invalid setting for CONFIG_CHIP_SELECTS_PER_CTRL
diff --git a/drivers/ddr/fsl/mpc86xx_ddr.c b/drivers/ddr/fsl/mpc86xx_ddr.c
index 737a879e93..43ed1ba432 100644
--- a/drivers/ddr/fsl/mpc86xx_ddr.c
+++ b/drivers/ddr/fsl/mpc86xx_ddr.c
@@ -7,6 +7,7 @@
 #include <log.h>
 #include <asm/io.h>
 #include <fsl_ddr_sdram.h>
+#include <linux/delay.h>
 
 #if (CONFIG_CHIP_SELECTS_PER_CTRL > 4)
 #error Invalid setting for CONFIG_CHIP_SELECTS_PER_CTRL
diff --git a/drivers/ddr/fsl/util.c b/drivers/ddr/fsl/util.c
index 7d6e08d3d1..ac4f8d2732 100644
--- a/drivers/ddr/fsl/util.c
+++ b/drivers/ddr/fsl/util.c
@@ -8,6 +8,7 @@
 #include <asm/fsl_law.h>
 #endif
 #include <div64.h>
+#include <linux/delay.h>
 
 #include <fsl_ddr.h>
 #include <fsl_immap.h>
diff --git a/drivers/ddr/marvell/a38x/ddr3_training.c b/drivers/ddr/marvell/a38x/ddr3_training.c
index 8d7ac79b28..34cc170910 100644
--- a/drivers/ddr/marvell/a38x/ddr3_training.c
+++ b/drivers/ddr/marvell/a38x/ddr3_training.c
@@ -8,6 +8,7 @@
 #include "mv_ddr_training_db.h"
 #include "mv_ddr_regs.h"
 #include <log.h>
+#include <linux/delay.h>
 
 #define GET_CS_FROM_MASK(mask)	(cs_mask2_num[mask])
 #define CS_CBE_VALUE(cs_num)	(cs_cbe_reg[cs_num])
diff --git a/drivers/ddr/marvell/a38x/ddr3_training_ip_engine.c b/drivers/ddr/marvell/a38x/ddr3_training_ip_engine.c
index 1eababeebd..979f3530b7 100644
--- a/drivers/ddr/marvell/a38x/ddr3_training_ip_engine.c
+++ b/drivers/ddr/marvell/a38x/ddr3_training_ip_engine.c
@@ -7,6 +7,7 @@
 #include "mv_ddr_regs.h"
 #include "ddr_training_ip_db.h"
 #include <image.h>
+#include <linux/delay.h>
 
 #define PATTERN_1	0x55555555
 #define PATTERN_2	0xaaaaaaaa
diff --git a/drivers/ddr/marvell/a38x/ddr3_training_leveling.c b/drivers/ddr/marvell/a38x/ddr3_training_leveling.c
index 7f7df6794a..dadb06b318 100644
--- a/drivers/ddr/marvell/a38x/ddr3_training_leveling.c
+++ b/drivers/ddr/marvell/a38x/ddr3_training_leveling.c
@@ -7,6 +7,7 @@
 #include "mv_ddr_training_db.h"
 #include "ddr_training_ip_db.h"
 #include "mv_ddr_regs.h"
+#include <linux/delay.h>
 
 #define WL_ITERATION_NUM	10
 
diff --git a/drivers/ddr/marvell/a38x/mv_ddr_plat.c b/drivers/ddr/marvell/a38x/mv_ddr_plat.c
index cc7942d0ba..72f0dfbbbb 100644
--- a/drivers/ddr/marvell/a38x/mv_ddr_plat.c
+++ b/drivers/ddr/marvell/a38x/mv_ddr_plat.c
@@ -7,6 +7,7 @@
 #include "mv_ddr_training_db.h"
 #include "mv_ddr_regs.h"
 #include "mv_ddr_sys_env_lib.h"
+#include <linux/delay.h>
 
 #define DDR_INTERFACES_NUM		1
 #define DDR_INTERFACE_OCTETS_NUM	5
diff --git a/drivers/ddr/marvell/axp/ddr3_dfs.c b/drivers/ddr/marvell/axp/ddr3_dfs.c
index ba899592f8..b58c0fe01e 100644
--- a/drivers/ddr/marvell/axp/ddr3_dfs.c
+++ b/drivers/ddr/marvell/axp/ddr3_dfs.c
@@ -9,6 +9,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <linux/delay.h>
 
 #include "ddr3_hw_training.h"
 
diff --git a/drivers/ddr/marvell/axp/ddr3_hw_training.c b/drivers/ddr/marvell/axp/ddr3_hw_training.c
index 9dc911c335..35d98faf58 100644
--- a/drivers/ddr/marvell/axp/ddr3_hw_training.c
+++ b/drivers/ddr/marvell/axp/ddr3_hw_training.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <linux/delay.h>
 
 #include "ddr3_init.h"
 #include "ddr3_hw_training.h"
diff --git a/drivers/ddr/marvell/axp/ddr3_init.c b/drivers/ddr/marvell/axp/ddr3_init.c
index 8e6d44708f..607f3e12c3 100644
--- a/drivers/ddr/marvell/axp/ddr3_init.c
+++ b/drivers/ddr/marvell/axp/ddr3_init.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <linux/delay.h>
 
 #include "ddr3_init.h"
 
diff --git a/drivers/ddr/marvell/axp/ddr3_pbs.c b/drivers/ddr/marvell/axp/ddr3_pbs.c
index e44f08d26a..069a42fbf5 100644
--- a/drivers/ddr/marvell/axp/ddr3_pbs.c
+++ b/drivers/ddr/marvell/axp/ddr3_pbs.c
@@ -9,6 +9,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <linux/delay.h>
 
 #include "ddr3_hw_training.h"
 
diff --git a/drivers/ddr/marvell/axp/ddr3_write_leveling.c b/drivers/ddr/marvell/axp/ddr3_write_leveling.c
index 20614894e1..d4add44777 100644
--- a/drivers/ddr/marvell/axp/ddr3_write_leveling.c
+++ b/drivers/ddr/marvell/axp/ddr3_write_leveling.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <linux/delay.h>
 
 #include "ddr3_hw_training.h"
 
diff --git a/drivers/dma/bcm6348-iudma.c b/drivers/dma/bcm6348-iudma.c
index cce0c611a8..9e0e82520e 100644
--- a/drivers/dma/bcm6348-iudma.c
+++ b/drivers/dma/bcm6348-iudma.c
@@ -26,6 +26,7 @@
 #include <net.h>
 #include <reset.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 #define DMA_RX_DESC	6
 #define DMA_TX_DESC	1
diff --git a/drivers/dma/keystone_nav.c b/drivers/dma/keystone_nav.c
index 3a15121200..443e4b2366 100644
--- a/drivers/dma/keystone_nav.c
+++ b/drivers/dma/keystone_nav.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/ti-common/keystone_nav.h>
+#include <linux/delay.h>
 
 struct qm_config qm_memmap = {
 	.stat_cfg	= CONFIG_KSNAV_QM_QUEUE_STATUS_BASE,
diff --git a/drivers/dma/lpc32xx_dma.c b/drivers/dma/lpc32xx_dma.c
index 1637e329df..de963347f1 100644
--- a/drivers/dma/lpc32xx_dma.c
+++ b/drivers/dma/lpc32xx_dma.c
@@ -15,6 +15,7 @@
 #include <asm/arch/clk.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 /* DMA controller channel register structure */
 struct dmac_chan_reg {
diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c
index 1dc179ad4d..e0d66d74f5 100644
--- a/drivers/firmware/psci.c
+++ b/drivers/firmware/psci.c
@@ -13,6 +13,7 @@
 #include <log.h>
 #include <dm/lists.h>
 #include <efi_loader.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <linux/arm-smccc.h>
 #include <linux/errno.h>
diff --git a/drivers/fpga/ACEX1K.c b/drivers/fpga/ACEX1K.c
index 5afd42a97b..aca8049c56 100644
--- a/drivers/fpga/ACEX1K.c
+++ b/drivers/fpga/ACEX1K.c
@@ -10,6 +10,7 @@
 #include <common.h>		/* core U-Boot definitions */
 #include <console.h>
 #include <ACEX1K.h>		/* ACEX device family */
+#include <linux/delay.h>
 
 /* Define FPGA_DEBUG to get debug printf's */
 #ifdef	FPGA_DEBUG
diff --git a/drivers/fpga/cyclon2.c b/drivers/fpga/cyclon2.c
index c929cd2cc5..3b008facb8 100644
--- a/drivers/fpga/cyclon2.c
+++ b/drivers/fpga/cyclon2.c
@@ -8,6 +8,7 @@
 #include <common.h>		/* core U-Boot definitions */
 #include <altera.h>
 #include <ACEX1K.h>		/* ACEX device family */
+#include <linux/delay.h>
 
 /* Define FPGA_DEBUG to get debug printf's */
 #ifdef	FPGA_DEBUG
diff --git a/drivers/fpga/lattice.c b/drivers/fpga/lattice.c
index 2cf4a602d7..e292d991cd 100644
--- a/drivers/fpga/lattice.c
+++ b/drivers/fpga/lattice.c
@@ -15,6 +15,7 @@
 #include <malloc.h>
 #include <fpga.h>
 #include <lattice.h>
+#include <linux/delay.h>
 
 static lattice_board_specific_func *pfns;
 static const char *fpga_image;
diff --git a/drivers/fpga/socfpga_arria10.c b/drivers/fpga/socfpga_arria10.c
index 272f6d5e5f..e14204633e 100644
--- a/drivers/fpga/socfpga_arria10.c
+++ b/drivers/fpga/socfpga_arria10.c
@@ -18,6 +18,7 @@
 #include <fs_loader.h>
 #include <wait_bit.h>
 #include <watchdog.h>
+#include <linux/delay.h>
 
 #define CFGWDTH_32	1
 #define MIN_BITSTREAM_SIZECHECK	230
diff --git a/drivers/fpga/stratix10.c b/drivers/fpga/stratix10.c
index 802051069e..da8fa315e3 100644
--- a/drivers/fpga/stratix10.c
+++ b/drivers/fpga/stratix10.c
@@ -7,6 +7,7 @@
 #include <altera.h>
 #include <log.h>
 #include <asm/arch/mailbox_s10.h>
+#include <linux/delay.h>
 
 #define RECONFIG_STATUS_POLL_RESP_TIMEOUT_MS		60000
 #define RECONFIG_STATUS_INTERVAL_DELAY_US		1000000
diff --git a/drivers/fpga/stratixII.c b/drivers/fpga/stratixII.c
index 4edbfe4ba8..b450a81072 100644
--- a/drivers/fpga/stratixII.c
+++ b/drivers/fpga/stratixII.c
@@ -6,6 +6,7 @@
 
 #include <common.h>		/* core U-Boot definitions */
 #include <altera.h>
+#include <linux/delay.h>
 
 int StratixII_ps_fpp_load (Altera_desc * desc, void *buf, size_t bsize,
 			   int isSerial, int isSecure);
diff --git a/drivers/fpga/stratixv.c b/drivers/fpga/stratixv.c
index 650b1b136e..abae3b5b75 100644
--- a/drivers/fpga/stratixv.c
+++ b/drivers/fpga/stratixv.c
@@ -8,6 +8,7 @@
 #include <log.h>
 #include <spi.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 
 /* Write the RBF data to FPGA via SPI */
diff --git a/drivers/fpga/virtex2.c b/drivers/fpga/virtex2.c
index 395736875f..b3e0537bab 100644
--- a/drivers/fpga/virtex2.c
+++ b/drivers/fpga/virtex2.c
@@ -15,6 +15,7 @@
 #include <common.h>
 #include <console.h>
 #include <virtex2.h>
+#include <linux/delay.h>
 
 #if 0
 #define FPGA_DEBUG
diff --git a/drivers/fpga/zynqpl.c b/drivers/fpga/zynqpl.c
index e9bf3a6180..dcfe513eeb 100644
--- a/drivers/fpga/zynqpl.c
+++ b/drivers/fpga/zynqpl.c
@@ -14,6 +14,7 @@
 #include <asm/io.h>
 #include <fs.h>
 #include <zynqpl.h>
+#include <linux/delay.h>
 #include <linux/sizes.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
diff --git a/drivers/i2c/ast_i2c.c b/drivers/i2c/ast_i2c.c
index 9e6dc02b61..214362d04b 100644
--- a/drivers/i2c/ast_i2c.c
+++ b/drivers/i2c/ast_i2c.c
@@ -14,6 +14,7 @@
 #include <log.h>
 #include <asm/io.h>
 #include <asm/arch/scu_ast2500.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 
 #include "ast_i2c.h"
diff --git a/drivers/i2c/davinci_i2c.c b/drivers/i2c/davinci_i2c.c
index f41ea01b10..f8e9d003e6 100644
--- a/drivers/i2c/davinci_i2c.c
+++ b/drivers/i2c/davinci_i2c.c
@@ -18,6 +18,7 @@
 #include <asm/arch/hardware.h>
 #include <asm/arch/i2c_defs.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include "davinci_i2c.h"
 
 #ifdef CONFIG_DM_I2C
diff --git a/drivers/i2c/designware_i2c.c b/drivers/i2c/designware_i2c.c
index 4c4b5e17ca..42ee7d523e 100644
--- a/drivers/i2c/designware_i2c.c
+++ b/drivers/i2c/designware_i2c.c
@@ -13,6 +13,7 @@
 #include <pci.h>
 #include <reset.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include "designware_i2c.h"
 #include <dm/device_compat.h>
 #include <linux/err.h>
diff --git a/drivers/i2c/exynos_hs_i2c.c b/drivers/i2c/exynos_hs_i2c.c
index 59fc9a3c09..4fc9d90580 100644
--- a/drivers/i2c/exynos_hs_i2c.c
+++ b/drivers/i2c/exynos_hs_i2c.c
@@ -13,6 +13,7 @@
 #include <asm/arch/clk.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/pinmux.h>
+#include <linux/delay.h>
 #include "s3c24x0_i2c.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/i2c/fsl_i2c.c b/drivers/i2c/fsl_i2c.c
index 7e3c75b610..da933452f5 100644
--- a/drivers/i2c/fsl_i2c.c
+++ b/drivers/i2c/fsl_i2c.c
@@ -16,6 +16,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <mapmem.h>
+#include <linux/delay.h>
 
 /* The maximum number of microseconds we will wait until another master has
  * released the bus.  If not defined in the board header file, then use a
diff --git a/drivers/i2c/i2c-cdns.c b/drivers/i2c/i2c-cdns.c
index 642df972e5..402a664876 100644
--- a/drivers/i2c/i2c-cdns.c
+++ b/drivers/i2c/i2c-cdns.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <dm.h>
 #include <log.h>
+#include <linux/delay.h>
 #include <linux/types.h>
 #include <linux/io.h>
 #include <linux/errno.h>
diff --git a/drivers/i2c/i2c-gpio.c b/drivers/i2c/i2c-gpio.c
index 900017ad04..cfdeadc752 100644
--- a/drivers/i2c/i2c-gpio.c
+++ b/drivers/i2c/i2c-gpio.c
@@ -11,6 +11,7 @@
 #include <i2c.h>
 #include <log.h>
 #include <asm/gpio.h>
+#include <linux/delay.h>
 
 #define DEFAULT_UDELAY	5
 #define RETRIES		0
diff --git a/drivers/i2c/i2c-uclass.c b/drivers/i2c/i2c-uclass.c
index 32aed921b7..8166df7ba6 100644
--- a/drivers/i2c/i2c-uclass.c
+++ b/drivers/i2c/i2c-uclass.c
@@ -15,6 +15,7 @@
 #if CONFIG_IS_ENABLED(DM_GPIO)
 #include <asm/gpio.h>
 #endif
+#include <linux/delay.h>
 
 #define I2C_MAX_OFFSET_LEN	4
 
diff --git a/drivers/i2c/i2c-versatile.c b/drivers/i2c/i2c-versatile.c
index f523844204..46eb017ea0 100644
--- a/drivers/i2c/i2c-versatile.c
+++ b/drivers/i2c/i2c-versatile.c
@@ -11,6 +11,7 @@
 #include <i2c.h>
 #include <asm/io.h>
 #include <clk.h>
+#include <linux/delay.h>
 #include <linux/io.h>
 
 #define I2C_CONTROL_REG		0x00
diff --git a/drivers/i2c/ihs_i2c.c b/drivers/i2c/ihs_i2c.c
index 674561b4ad..296e01b41c 100644
--- a/drivers/i2c/ihs_i2c.c
+++ b/drivers/i2c/ihs_i2c.c
@@ -14,6 +14,7 @@
 #endif
 #include <log.h>
 #include <asm/unaligned.h>
+#include <linux/delay.h>
 
 #ifdef CONFIG_DM_I2C
 struct ihs_i2c_priv {
diff --git a/drivers/i2c/kona_i2c.c b/drivers/i2c/kona_i2c.c
index 61c4045959..4edcba2911 100644
--- a/drivers/i2c/kona_i2c.c
+++ b/drivers/i2c/kona_i2c.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <log.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/arch/sysmap.h>
 #include <asm/kona-common/clk.h>
diff --git a/drivers/i2c/meson_i2c.c b/drivers/i2c/meson_i2c.c
index 2eb1eba642..0a647b8f73 100644
--- a/drivers/i2c/meson_i2c.c
+++ b/drivers/i2c/meson_i2c.c
@@ -8,6 +8,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <i2c.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 
 #define I2C_TIMEOUT_MS		100
diff --git a/drivers/i2c/muxes/i2c-arb-gpio-challenge.c b/drivers/i2c/muxes/i2c-arb-gpio-challenge.c
index 07600c5022..584d0a4fef 100644
--- a/drivers/i2c/muxes/i2c-arb-gpio-challenge.c
+++ b/drivers/i2c/muxes/i2c-arb-gpio-challenge.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <asm/gpio.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/i2c/mv_i2c.c b/drivers/i2c/mv_i2c.c
index 88b62959d3..59675d8d57 100644
--- a/drivers/i2c/mv_i2c.c
+++ b/drivers/i2c/mv_i2c.c
@@ -21,6 +21,7 @@
 #include <i2c.h>
 #include <log.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include "mv_i2c.h"
 
 /* All transfers are described by this data structure */
diff --git a/drivers/i2c/mvtwsi.c b/drivers/i2c/mvtwsi.c
index 3b654ef661..d5bee10f15 100644
--- a/drivers/i2c/mvtwsi.c
+++ b/drivers/i2c/mvtwsi.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <log.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c
index bd2f568348..2acde915d3 100644
--- a/drivers/i2c/mxc_i2c.c
+++ b/drivers/i2c/mxc_i2c.c
@@ -18,6 +18,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/mach-imx/mxc_i2c.h>
 #include <asm/io.h>
diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c
index d5be824de8..8592a819c4 100644
--- a/drivers/i2c/omap24xx_i2c.c
+++ b/drivers/i2c/omap24xx_i2c.c
@@ -42,6 +42,7 @@
 #include <dm.h>
 #include <i2c.h>
 #include <log.h>
+#include <linux/delay.h>
 
 #include <asm/io.h>
 #include <asm/omap_i2c.h>
diff --git a/drivers/i2c/rcar_i2c.c b/drivers/i2c/rcar_i2c.c
index b877602aab..5a902047bc 100644
--- a/drivers/i2c/rcar_i2c.c
+++ b/drivers/i2c/rcar_i2c.c
@@ -18,6 +18,7 @@
 #include <asm/io.h>
 #include <wait_bit.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 
 #define RCAR_I2C_ICSCR			0x00 /* slave ctrl */
 #define RCAR_I2C_ICMCR			0x04 /* master ctrl */
diff --git a/drivers/i2c/rcar_iic.c b/drivers/i2c/rcar_iic.c
index 2a82eb0b76..6b21f6a532 100644
--- a/drivers/i2c/rcar_iic.c
+++ b/drivers/i2c/rcar_iic.c
@@ -14,6 +14,7 @@
 #include <dm.h>
 #include <i2c.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 struct rcar_iic_priv {
 	void __iomem		*base;
diff --git a/drivers/i2c/rk_i2c.c b/drivers/i2c/rk_i2c.c
index 703d9a1c7a..fa6f69f400 100644
--- a/drivers/i2c/rk_i2c.c
+++ b/drivers/i2c/rk_i2c.c
@@ -17,6 +17,7 @@
 #include <asm/arch-rockchip/i2c.h>
 #include <asm/arch-rockchip/periph.h>
 #include <dm/pinctrl.h>
+#include <linux/delay.h>
 #include <linux/sizes.h>
 
 /* i2c timerout */
diff --git a/drivers/i2c/sh_i2c.c b/drivers/i2c/sh_i2c.c
index 5cc5095666..f857307e6a 100644
--- a/drivers/i2c/sh_i2c.c
+++ b/drivers/i2c/sh_i2c.c
@@ -11,6 +11,7 @@
 #include <i2c.h>
 #include <log.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/i2c/soft_i2c.c b/drivers/i2c/soft_i2c.c
index 9ad1c281ff..1031066b8c 100644
--- a/drivers/i2c/soft_i2c.c
+++ b/drivers/i2c/soft_i2c.c
@@ -25,6 +25,7 @@
 #endif
 #endif
 #include <i2c.h>
+#include <linux/delay.h>
 
 #if defined(CONFIG_SOFT_I2C_GPIO_SCL)
 # include <asm/gpio.h>
diff --git a/drivers/i2c/stm32f7_i2c.c b/drivers/i2c/stm32f7_i2c.c
index 4adac498d0..18affd08e3 100644
--- a/drivers/i2c/stm32f7_i2c.c
+++ b/drivers/i2c/stm32f7_i2c.c
@@ -9,6 +9,7 @@
 #include <i2c.h>
 #include <log.h>
 #include <reset.h>
+#include <linux/delay.h>
 
 #include <dm/device.h>
 #include <linux/err.h>
diff --git a/drivers/i2c/tegra_i2c.c b/drivers/i2c/tegra_i2c.c
index 09c0be9dcd..65b3734348 100644
--- a/drivers/i2c/tegra_i2c.c
+++ b/drivers/i2c/tegra_i2c.c
@@ -19,6 +19,7 @@
 #endif
 #include <asm/arch/gpio.h>
 #include <asm/arch-tegra/tegra_i2c.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 
 enum i2c_type {
diff --git a/drivers/input/i8042.c b/drivers/input/i8042.c
index cfd8dc6415..7beaccca2c 100644
--- a/drivers/input/i8042.c
+++ b/drivers/input/i8042.c
@@ -15,6 +15,7 @@
 #include <keyboard.h>
 #include <log.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/input/tegra-kbc.c b/drivers/input/tegra-kbc.c
index 40ebb2497b..3409bb61d5 100644
--- a/drivers/input/tegra-kbc.c
+++ b/drivers/input/tegra-kbc.c
@@ -17,6 +17,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/funcmux.h>
 #include <asm/arch-tegra/timer.h>
+#include <linux/delay.h>
 #include <linux/input.h>
 
 enum {
diff --git a/drivers/led/led_bcm6358.c b/drivers/led/led_bcm6358.c
index 56c3d146a5..307d418a17 100644
--- a/drivers/led/led_bcm6358.c
+++ b/drivers/led/led_bcm6358.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <asm/io.h>
 #include <dm/lists.h>
+#include <linux/delay.h>
 
 #define LEDS_MAX		32
 #define LEDS_WAIT		100
diff --git a/drivers/misc/atsha204a-i2c.c b/drivers/misc/atsha204a-i2c.c
index 8e0b41e346..422ea6f3e5 100644
--- a/drivers/misc/atsha204a-i2c.c
+++ b/drivers/misc/atsha204a-i2c.c
@@ -16,6 +16,7 @@
 #include <errno.h>
 #include <atsha204a-i2c.h>
 #include <log.h>
+#include <linux/delay.h>
 #include <u-boot/crc.h>
 
 #define ATSHA204A_TWLO			60
diff --git a/drivers/misc/cros_ec.c b/drivers/misc/cros_ec.c
index 818ad56a0d..a5534b1667 100644
--- a/drivers/misc/cros_ec.c
+++ b/drivers/misc/cros_ec.c
@@ -25,6 +25,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <spi.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <asm-generic/gpio.h>
diff --git a/drivers/misc/ds4510.c b/drivers/misc/ds4510.c
index 0b37e8a4e4..a2a5291565 100644
--- a/drivers/misc/ds4510.c
+++ b/drivers/misc/ds4510.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <i2c.h>
 #include <command.h>
+#include <linux/delay.h>
 #include "ds4510.h"
 
 enum {
diff --git a/drivers/misc/fsl_iim.c b/drivers/misc/fsl_iim.c
index f8075db8d5..85cc3c26b2 100644
--- a/drivers/misc/fsl_iim.c
+++ b/drivers/misc/fsl_iim.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <fuse.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
diff --git a/drivers/misc/fsl_sec_mon.c b/drivers/misc/fsl_sec_mon.c
index e9f351dc3a..321bd27fd3 100644
--- a/drivers/misc/fsl_sec_mon.c
+++ b/drivers/misc/fsl_sec_mon.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <fsl_sec_mon.h>
+#include <linux/delay.h>
 
 static u32 get_sec_mon_state(void)
 {
diff --git a/drivers/misc/i2c_eeprom.c b/drivers/misc/i2c_eeprom.c
index ef5f103c98..ed23a62384 100644
--- a/drivers/misc/i2c_eeprom.c
+++ b/drivers/misc/i2c_eeprom.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <eeprom.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/kernel.h>
 #include <dm.h>
diff --git a/drivers/misc/ihs_fpga.c b/drivers/misc/ihs_fpga.c
index 71c4226a83..4923c81783 100644
--- a/drivers/misc/ihs_fpga.c
+++ b/drivers/misc/ihs_fpga.c
@@ -14,6 +14,7 @@
 #include <log.h>
 #include <regmap.h>
 #include <asm/gpio.h>
+#include <linux/delay.h>
 
 #include "ihs_fpga.h"
 
diff --git a/drivers/misc/mpc83xx_serdes.c b/drivers/misc/mpc83xx_serdes.c
index 2d40621c15..ab1e34e6f4 100644
--- a/drivers/misc/mpc83xx_serdes.c
+++ b/drivers/misc/mpc83xx_serdes.c
@@ -14,6 +14,7 @@
 #include <log.h>
 #include <mapmem.h>
 #include <misc.h>
+#include <linux/delay.h>
 
 #include "mpc83xx_serdes.h"
 
diff --git a/drivers/misc/mxc_ocotp.c b/drivers/misc/mxc_ocotp.c
index 80cd8dceda..926c62c8a1 100644
--- a/drivers/misc/mxc_ocotp.c
+++ b/drivers/misc/mxc_ocotp.c
@@ -13,6 +13,7 @@
 
 #include <common.h>
 #include <fuse.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
diff --git a/drivers/misc/mxs_ocotp.c b/drivers/misc/mxs_ocotp.c
index 21cae02118..facc720c8e 100644
--- a/drivers/misc/mxs_ocotp.c
+++ b/drivers/misc/mxs_ocotp.c
@@ -13,6 +13,7 @@
 
 #include <common.h>
 #include <fuse.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
diff --git a/drivers/mmc/arm_pl180_mmci.c b/drivers/mmc/arm_pl180_mmci.c
index 8c95229bf7..846622892a 100644
--- a/drivers/mmc/arm_pl180_mmci.c
+++ b/drivers/mmc/arm_pl180_mmci.c
@@ -23,6 +23,7 @@
 #include <asm-generic/gpio.h>
 
 #include "arm_pl180_mmci.h"
+#include <linux/delay.h>
 
 #ifdef CONFIG_DM_MMC
 #include <dm.h>
diff --git a/drivers/mmc/bcm2835_sdhost.c b/drivers/mmc/bcm2835_sdhost.c
index d44799b4af..52bb39a905 100644
--- a/drivers/mmc/bcm2835_sdhost.c
+++ b/drivers/mmc/bcm2835_sdhost.c
@@ -39,6 +39,7 @@
 #include <dm/device_compat.h>
 #include <linux/bug.h>
 #include <linux/compat.h>
+#include <linux/delay.h>
 #include <linux/io.h>
 #include <linux/iopoll.h>
 #include <linux/sizes.h>
diff --git a/drivers/mmc/davinci_mmc.c b/drivers/mmc/davinci_mmc.c
index ef5cd4e723..2408a687d2 100644
--- a/drivers/mmc/davinci_mmc.c
+++ b/drivers/mmc/davinci_mmc.c
@@ -16,6 +16,7 @@
 #include <asm/io.h>
 #include <asm/arch/sdmmc_defs.h>
 #include <asm-generic/gpio.h>
+#include <linux/delay.h>
 
 #define DAVINCI_MAX_BLOCKS	(32)
 #define WATCHDOG_COUNT		(100000)
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
index ba93c26255..7702f4be3f 100644
--- a/drivers/mmc/dw_mmc.c
+++ b/drivers/mmc/dw_mmc.c
@@ -16,6 +16,7 @@
 #include <dwmmc.h>
 #include <wait_bit.h>
 #include <asm/cache.h>
+#include <linux/delay.h>
 #include <power/regulator.h>
 
 #define PAGE_SIZE 4096
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index a35e791fcc..665eb9aa68 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -24,6 +24,7 @@
 #include <asm/io.h>
 #include <dm.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c
index 27c86320f0..1d040f6086 100644
--- a/drivers/mmc/fsl_esdhc_imx.c
+++ b/drivers/mmc/fsl_esdhc_imx.c
@@ -22,6 +22,7 @@
 #include <part.h>
 #include <asm/cache.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #include <power/regulator.h>
 #include <malloc.h>
diff --git a/drivers/mmc/gen_atmel_mci.c b/drivers/mmc/gen_atmel_mci.c
index 6ec454c3bb..9d20e28383 100644
--- a/drivers/mmc/gen_atmel_mci.c
+++ b/drivers/mmc/gen_atmel_mci.c
@@ -16,6 +16,7 @@
 #include <part.h>
 #include <malloc.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/byteorder.h>
 #include <asm/arch/clk.h>
diff --git a/drivers/mmc/iproc_sdhci.c b/drivers/mmc/iproc_sdhci.c
index c2319b4134..91e2e3f0b8 100644
--- a/drivers/mmc/iproc_sdhci.c
+++ b/drivers/mmc/iproc_sdhci.c
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <malloc.h>
 #include <sdhci.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/mmc/jz_mmc.c b/drivers/mmc/jz_mmc.c
index 8d4f886cb4..83ae1e5169 100644
--- a/drivers/mmc/jz_mmc.c
+++ b/drivers/mmc/jz_mmc.c
@@ -13,6 +13,7 @@
 #include <asm/unaligned.h>
 #include <errno.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 #include <mach/jz4780.h>
 #include <wait_bit.h>
 
diff --git a/drivers/mmc/kona_sdhci.c b/drivers/mmc/kona_sdhci.c
index f5e1f2cbbd..2bbe673b91 100644
--- a/drivers/mmc/kona_sdhci.c
+++ b/drivers/mmc/kona_sdhci.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <malloc.h>
 #include <sdhci.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/kona-common/clk.h>
 
diff --git a/drivers/mmc/meson_gx_mmc.c b/drivers/mmc/meson_gx_mmc.c
index 86c1a7164a..b7f793cd04 100644
--- a/drivers/mmc/meson_gx_mmc.c
+++ b/drivers/mmc/meson_gx_mmc.c
@@ -14,6 +14,7 @@
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <asm/arch/sd_emmc.h>
+#include <linux/delay.h>
 #include <linux/log2.h>
 
 static inline void *get_regbase(const struct mmc *mmc)
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index df550e25ed..02494db75a 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -16,6 +16,7 @@
 #include <errno.h>
 #include <mmc.h>
 #include <part.h>
+#include <linux/delay.h>
 #include <power/regulator.h>
 #include <malloc.h>
 #include <memalign.h>
diff --git a/drivers/mmc/mxsmmc.c b/drivers/mmc/mxsmmc.c
index 17f1ebf5d2..ad2c0e0002 100644
--- a/drivers/mmc/mxsmmc.c
+++ b/drivers/mmc/mxsmmc.c
@@ -24,6 +24,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <mmc.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
index 492bf58c39..0c21ec716e 100644
--- a/drivers/mmc/omap_hsmmc.c
+++ b/drivers/mmc/omap_hsmmc.c
@@ -50,6 +50,7 @@
 #endif
 #include <dm.h>
 #include <dm/devres.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #include <power/regulator.h>
 #include <thermal.h>
diff --git a/drivers/mmc/pxa_mmc_gen.c b/drivers/mmc/pxa_mmc_gen.c
index a4dcdb5cff..cc6014703c 100644
--- a/drivers/mmc/pxa_mmc_gen.c
+++ b/drivers/mmc/pxa_mmc_gen.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/regs-mmc.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <malloc.h>
diff --git a/drivers/mmc/renesas-sdhi.c b/drivers/mmc/renesas-sdhi.c
index 33bb5dcc0a..668222999d 100644
--- a/drivers/mmc/renesas-sdhi.c
+++ b/drivers/mmc/renesas-sdhi.c
@@ -13,6 +13,7 @@
 #include <dm.h>
 #include <dm/device_compat.h>
 #include <linux/compat.h>
+#include <linux/delay.h>
 #include <linux/dma-direction.h>
 #include <linux/io.h>
 #include <linux/sizes.h>
diff --git a/drivers/mmc/rockchip_dw_mmc.c b/drivers/mmc/rockchip_dw_mmc.c
index d1b293aa03..638107a7ff 100644
--- a/drivers/mmc/rockchip_dw_mmc.c
+++ b/drivers/mmc/rockchip_dw_mmc.c
@@ -16,6 +16,7 @@
 #include <asm/gpio.h>
 #include <asm/arch-rockchip/clock.h>
 #include <asm/arch-rockchip/periph.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 
 struct rockchip_mmc_plat {
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index 99eb20fe60..d8fd11ffd7 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -17,6 +17,7 @@
 #include <sdhci.h>
 #include <dm.h>
 #include <asm/cache.h>
+#include <linux/delay.h>
 #include <linux/dma-mapping.h>
 
 static void sdhci_reset(struct sdhci_host *host, u8 mask)
diff --git a/drivers/mmc/sh_mmcif.c b/drivers/mmc/sh_mmcif.c
index bc94d01fab..1a01fe5a73 100644
--- a/drivers/mmc/sh_mmcif.c
+++ b/drivers/mmc/sh_mmcif.c
@@ -15,6 +15,7 @@
 #include <dm.h>
 #include <malloc.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/compat.h>
 #include <linux/io.h>
diff --git a/drivers/mmc/sh_sdhi.c b/drivers/mmc/sh_sdhi.c
index 54bd687a25..22a0f78933 100644
--- a/drivers/mmc/sh_sdhi.c
+++ b/drivers/mmc/sh_sdhi.c
@@ -16,6 +16,7 @@
 #include <dm.h>
 #include <part.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/compat.h>
 #include <linux/io.h>
diff --git a/drivers/mmc/stm32_sdmmc2.c b/drivers/mmc/stm32_sdmmc2.c
index a089dfb11d..73cc7e05fb 100644
--- a/drivers/mmc/stm32_sdmmc2.c
+++ b/drivers/mmc/stm32_sdmmc2.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <asm/cache.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <mmc.h>
 #include <reset.h>
diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c
index 2903d89ef3..0e03b07ce5 100644
--- a/drivers/mmc/sunxi_mmc.c
+++ b/drivers/mmc/sunxi_mmc.c
@@ -21,6 +21,7 @@
 #include <asm/arch/gpio.h>
 #include <asm/arch/mmc.h>
 #include <asm-generic/gpio.h>
+#include <linux/delay.h>
 
 #ifdef CONFIG_DM_MMC
 struct sunxi_mmc_variant {
diff --git a/drivers/mmc/tegra_mmc.c b/drivers/mmc/tegra_mmc.c
index 731a519e40..78838682c7 100644
--- a/drivers/mmc/tegra_mmc.c
+++ b/drivers/mmc/tegra_mmc.c
@@ -15,6 +15,7 @@
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch-tegra/tegra_mmc.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #if defined(CONFIG_TEGRA30) || defined(CONFIG_TEGRA210)
 #include <asm/arch/clock.h>
diff --git a/drivers/mmc/tmio-common.c b/drivers/mmc/tmio-common.c
index 1dc13db9ea..20cd237ef0 100644
--- a/drivers/mmc/tmio-common.c
+++ b/drivers/mmc/tmio-common.c
@@ -13,6 +13,7 @@
 #include <dm/device_compat.h>
 #include <dm/pinctrl.h>
 #include <linux/compat.h>
+#include <linux/delay.h>
 #include <linux/dma-mapping.h>
 #include <linux/io.h>
 #include <linux/sizes.h>
diff --git a/drivers/mmc/xenon_sdhci.c b/drivers/mmc/xenon_sdhci.c
index 829b75683b..7dc600032b 100644
--- a/drivers/mmc/xenon_sdhci.c
+++ b/drivers/mmc/xenon_sdhci.c
@@ -17,6 +17,7 @@
 #include <common.h>
 #include <dm.h>
 #include <fdtdec.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <malloc.h>
 #include <sdhci.h>
diff --git a/drivers/mmc/zynq_sdhci.c b/drivers/mmc/zynq_sdhci.c
index 2f46f17f4a..de404aa956 100644
--- a/drivers/mmc/zynq_sdhci.c
+++ b/drivers/mmc/zynq_sdhci.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <dm.h>
 #include <fdtdec.h>
+#include <linux/delay.h>
 #include "mmc_private.h"
 #include <log.h>
 #include <dm/device_compat.h>
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index 6be40d04e9..b7289ba539 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -31,6 +31,7 @@
 #include <asm/byteorder.h>
 #include <asm/unaligned.h>
 #include <env_internal.h>
+#include <linux/delay.h>
 #include <mtd/cfi_flash.h>
 #include <watchdog.h>
 
diff --git a/drivers/mtd/mw_eeprom.c b/drivers/mtd/mw_eeprom.c
index 6a3a6f6751..9837733bee 100644
--- a/drivers/mtd/mw_eeprom.c
+++ b/drivers/mtd/mw_eeprom.c
@@ -3,6 +3,7 @@
 #include <common.h>
 #include <eeprom.h>
 #include <asm/ic/ssi.h>
+#include <linux/delay.h>
 
 /*
  * Serial EEPROM opcodes, including start bit
diff --git a/drivers/mtd/nand/raw/am335x_spl_bch.c b/drivers/mtd/nand/raw/am335x_spl_bch.c
index ba2f33a96e..b6fc5f29c7 100644
--- a/drivers/mtd/nand/raw/am335x_spl_bch.c
+++ b/drivers/mtd/nand/raw/am335x_spl_bch.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <nand.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/mtd/nand_ecc.h>
 
 static int nand_ecc_pos[] = CONFIG_SYS_NAND_ECCPOS;
diff --git a/drivers/mtd/nand/raw/arasan_nfc.c b/drivers/mtd/nand/raw/arasan_nfc.c
index 110c32b396..6c1d64054c 100644
--- a/drivers/mtd/nand/raw/arasan_nfc.c
+++ b/drivers/mtd/nand/raw/arasan_nfc.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <malloc.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/rawnand.h>
diff --git a/drivers/mtd/nand/raw/atmel_nand.c b/drivers/mtd/nand/raw/atmel_nand.c
index 2b39e4195a..4a017ea74d 100644
--- a/drivers/mtd/nand/raw/atmel_nand.c
+++ b/drivers/mtd/nand/raw/atmel_nand.c
@@ -17,6 +17,7 @@
 #include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <linux/bug.h>
+#include <linux/delay.h>
 
 #include <malloc.h>
 #include <nand.h>
diff --git a/drivers/mtd/nand/raw/denali_spl.c b/drivers/mtd/nand/raw/denali_spl.c
index 4b815a433e..f72142817e 100644
--- a/drivers/mtd/nand/raw/denali_spl.c
+++ b/drivers/mtd/nand/raw/denali_spl.c
@@ -8,6 +8,7 @@
 #include <log.h>
 #include <asm/io.h>
 #include <asm/unaligned.h>
+#include <linux/delay.h>
 #include <linux/mtd/rawnand.h>
 #include "denali.h"
 
diff --git a/drivers/mtd/nand/raw/fsl_upm.c b/drivers/mtd/nand/raw/fsl_upm.c
index ec233b2790..6c86a7e767 100644
--- a/drivers/mtd/nand/raw/fsl_upm.c
+++ b/drivers/mtd/nand/raw/fsl_upm.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <log.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/fsl_upm.h>
diff --git a/drivers/mtd/nand/raw/kmeter1_nand.c b/drivers/mtd/nand/raw/kmeter1_nand.c
index 7103300060..cf33f2863e 100644
--- a/drivers/mtd/nand/raw/kmeter1_nand.c
+++ b/drivers/mtd/nand/raw/kmeter1_nand.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <nand.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 #define CONFIG_NAND_MODE_REG	(void *)(CONFIG_SYS_NAND_BASE + 0x20000)
 #define CONFIG_NAND_DATA_REG	(void *)(CONFIG_SYS_NAND_BASE + 0x30000)
diff --git a/drivers/mtd/nand/raw/lpc32xx_nand_mlc.c b/drivers/mtd/nand/raw/lpc32xx_nand_mlc.c
index 79d1489dc7..b3232ed59d 100644
--- a/drivers/mtd/nand/raw/lpc32xx_nand_mlc.c
+++ b/drivers/mtd/nand/raw/lpc32xx_nand_mlc.c
@@ -21,6 +21,7 @@
 
 #include <common.h>
 #include <nand.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <nand.h>
diff --git a/drivers/mtd/nand/raw/mxc_nand.c b/drivers/mtd/nand/raw/mxc_nand.c
index 049bc79e3b..59cef20575 100644
--- a/drivers/mtd/nand/raw/mxc_nand.c
+++ b/drivers/mtd/nand/raw/mxc_nand.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <log.h>
 #include <nand.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #include <asm/io.h>
 #if defined(CONFIG_MX25) || defined(CONFIG_MX27) || defined(CONFIG_MX35) || \
diff --git a/drivers/mtd/nand/raw/mxs_nand_spl.c b/drivers/mtd/nand/raw/mxs_nand_spl.c
index c01b0db3cc..a008a388ed 100644
--- a/drivers/mtd/nand/raw/mxs_nand_spl.c
+++ b/drivers/mtd/nand/raw/mxs_nand_spl.c
@@ -9,6 +9,7 @@
 #include <malloc.h>
 #include <mxs_nand.h>
 #include <asm/cache.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 
 static struct mtd_info *mtd;
diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c
index c9e54eae39..26650389f4 100644
--- a/drivers/mtd/nand/raw/nand_base.c
+++ b/drivers/mtd/nand/raw/nand_base.c
@@ -37,6 +37,7 @@
 #include <watchdog.h>
 #include <dm/devres.h>
 #include <linux/bug.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/compat.h>
 #include <linux/mtd/mtd.h>
diff --git a/drivers/mtd/nand/raw/pxa3xx_nand.c b/drivers/mtd/nand/raw/pxa3xx_nand.c
index fc5b6275f2..244b0fecb7 100644
--- a/drivers/mtd/nand/raw/pxa3xx_nand.c
+++ b/drivers/mtd/nand/raw/pxa3xx_nand.c
@@ -13,6 +13,7 @@
 #include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <linux/bug.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <asm/io.h>
diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
index 912fe480e8..97188b200c 100644
--- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
+++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <nand.h>
 #include <reset.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/iopoll.h>
 #include <linux/ioport.h>
diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c
index 9b99be10e6..5331e73c2d 100644
--- a/drivers/mtd/nand/raw/sunxi_nand.c
+++ b/drivers/mtd/nand/raw/sunxi_nand.c
@@ -31,6 +31,7 @@
 #include <nand.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 
 #include <linux/kernel.h>
diff --git a/drivers/mtd/nand/raw/sunxi_nand_spl.c b/drivers/mtd/nand/raw/sunxi_nand_spl.c
index 6cde9814c4..8b2f7ea491 100644
--- a/drivers/mtd/nand/raw/sunxi_nand_spl.c
+++ b/drivers/mtd/nand/raw/sunxi_nand_spl.c
@@ -10,6 +10,7 @@
 #include <config.h>
 #include <nand.h>
 #include <linux/ctype.h>
+#include <linux/delay.h>
 
 /* registers */
 #define NFC_CTL                    0x00000000
diff --git a/drivers/mtd/nand/raw/tegra_nand.c b/drivers/mtd/nand/raw/tegra_nand.c
index b3bdd201c3..b9f5bdd953 100644
--- a/drivers/mtd/nand/raw/tegra_nand.c
+++ b/drivers/mtd/nand/raw/tegra_nand.c
@@ -16,6 +16,7 @@
 #include <asm/arch-tegra/clk_rst.h>
 #include <dm/device_compat.h>
 #include <linux/bug.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
 #include <fdtdec.h>
diff --git a/drivers/mtd/nand/raw/zynq_nand.c b/drivers/mtd/nand/raw/zynq_nand.c
index 0bddaaaac0..fa59455210 100644
--- a/drivers/mtd/nand/raw/zynq_nand.c
+++ b/drivers/mtd/nand/raw/zynq_nand.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <nand.h>
 #include <linux/ioport.h>
diff --git a/drivers/mtd/spi/sf_dataflash.c b/drivers/mtd/spi/sf_dataflash.c
index f85799d628..27d847d421 100644
--- a/drivers/mtd/spi/sf_dataflash.c
+++ b/drivers/mtd/spi/sf_dataflash.c
@@ -15,6 +15,7 @@
 #include <spi.h>
 #include <spi_flash.h>
 #include <div64.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/math64.h>
 
diff --git a/drivers/mtd/st_smi.c b/drivers/mtd/st_smi.c
index d29a71595d..7c652e6c53 100644
--- a/drivers/mtd/st_smi.c
+++ b/drivers/mtd/st_smi.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <flash.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/mtd/st_smi.h>
 
diff --git a/drivers/net/ag7xxx.c b/drivers/net/ag7xxx.c
index 38f3cbac73..0fe140cf6e 100644
--- a/drivers/net/ag7xxx.c
+++ b/drivers/net/ag7xxx.c
@@ -17,6 +17,7 @@
 #include <net.h>
 #include <asm/cache.h>
 #include <linux/compiler.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/mii.h>
 #include <wait_bit.h>
diff --git a/drivers/net/armada100_fec.c b/drivers/net/armada100_fec.c
index 828f978f73..3ee119bcbc 100644
--- a/drivers/net/armada100_fec.c
+++ b/drivers/net/armada100_fec.c
@@ -17,6 +17,7 @@
 #include <netdev.h>
 #include <asm/types.h>
 #include <asm/byteorder.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/mii.h>
 #include <asm/io.h>
diff --git a/drivers/net/at91_emac.c b/drivers/net/at91_emac.c
index fc227edea7..4e4ad61da4 100644
--- a/drivers/net/at91_emac.c
+++ b/drivers/net/at91_emac.c
@@ -18,6 +18,7 @@
 #include <netdev.h>
 #include <malloc.h>
 #include <miiphy.h>
+#include <linux/delay.h>
 #include <linux/mii.h>
 
 #undef MII_DEBUG
diff --git a/drivers/net/ax88180.c b/drivers/net/ax88180.c
index 2715653cd4..28cb41272a 100644
--- a/drivers/net/ax88180.c
+++ b/drivers/net/ax88180.c
@@ -42,6 +42,7 @@
 #include <log.h>
 #include <net.h>
 #include <malloc.h>
+#include <linux/delay.h>
 #include <linux/mii.h>
 #include "ax88180.h"
 
diff --git a/drivers/net/ax88796.c b/drivers/net/ax88796.c
index 01c1ae2729..d161f0e09c 100644
--- a/drivers/net/ax88796.c
+++ b/drivers/net/ax88796.c
@@ -3,6 +3,7 @@
  * (c) 2007 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
  */
 #include <common.h>
+#include <linux/delay.h>
 #include "ax88796.h"
 
 /*
diff --git a/drivers/net/bcm-sf2-eth-gmac.c b/drivers/net/bcm-sf2-eth-gmac.c
index eaadb2662a..f57861e870 100644
--- a/drivers/net/bcm-sf2-eth-gmac.c
+++ b/drivers/net/bcm-sf2-eth-gmac.c
@@ -18,6 +18,7 @@
 #include <asm/cache.h>
 #include <asm/io.h>
 #include <phy.h>
+#include <linux/delay.h>
 
 #include "bcm-sf2-eth.h"
 #include "bcm-sf2-eth-gmac.h"
diff --git a/drivers/net/bcm-sf2-eth.c b/drivers/net/bcm-sf2-eth.c
index c8393c5f50..2998d57c72 100644
--- a/drivers/net/bcm-sf2-eth.c
+++ b/drivers/net/bcm-sf2-eth.c
@@ -8,6 +8,7 @@
 #include <malloc.h>
 #include <net.h>
 #include <config.h>
+#include <linux/delay.h>
 
 #include <phy.h>
 #include <miiphy.h>
diff --git a/drivers/net/bcm6368-eth.c b/drivers/net/bcm6368-eth.c
index db573c0831..648fafd3e0 100644
--- a/drivers/net/bcm6368-eth.c
+++ b/drivers/net/bcm6368-eth.c
@@ -18,6 +18,7 @@
 #include <wait_bit.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 
 #define ETH_PORT_STR			"brcm,enetsw-port"
 
diff --git a/drivers/net/bcmgenet.c b/drivers/net/bcmgenet.c
index 106aa4ba1c..6a428c420a 100644
--- a/drivers/net/bcmgenet.c
+++ b/drivers/net/bcmgenet.c
@@ -23,6 +23,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <fdt_support.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #include <malloc.h>
 #include <miiphy.h>
diff --git a/drivers/net/calxedaxgmac.c b/drivers/net/calxedaxgmac.c
index 0dd64e4582..5dad69c0b7 100644
--- a/drivers/net/calxedaxgmac.c
+++ b/drivers/net/calxedaxgmac.c
@@ -7,6 +7,7 @@
 #include <malloc.h>
 #include <net.h>
 #include <linux/compiler.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #include <asm/io.h>
 
diff --git a/drivers/net/cs8900.c b/drivers/net/cs8900.c
index f840e11421..7ec95be6fc 100644
--- a/drivers/net/cs8900.c
+++ b/drivers/net/cs8900.c
@@ -29,6 +29,7 @@
 #include <asm/io.h>
 #include <net.h>
 #include <malloc.h>
+#include <linux/delay.h>
 #include "cs8900.h"
 
 #undef DEBUG
diff --git a/drivers/net/dc2114x.c b/drivers/net/dc2114x.c
index d008696b0f..611a8c4b9e 100644
--- a/drivers/net/dc2114x.c
+++ b/drivers/net/dc2114x.c
@@ -6,6 +6,7 @@
 #include <net.h>
 #include <netdev.h>
 #include <pci.h>
+#include <linux/delay.h>
 
 #define SROM_DLEVEL	0
 
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index 1eda9c3800..b89a68afe4 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -23,6 +23,7 @@
 #include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <linux/compiler.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/kernel.h>
 #include <asm/io.h>
diff --git a/drivers/net/dm9000x.c b/drivers/net/dm9000x.c
index a6c0a2452f..d575a62592 100644
--- a/drivers/net/dm9000x.c
+++ b/drivers/net/dm9000x.c
@@ -54,6 +54,7 @@ TODO: external MII is not functional, only internal at the moment.
 #include <net.h>
 #include <asm/io.h>
 #include <dm9000.h>
+#include <linux/delay.h>
 
 #include "dm9000x.h"
 
diff --git a/drivers/net/dnet.c b/drivers/net/dnet.c
index 35c2ed9fe0..98e9b2c663 100644
--- a/drivers/net/dnet.c
+++ b/drivers/net/dnet.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <linux/delay.h>
 
 #ifndef CONFIG_DNET_AUTONEG_TIMEOUT
 #define CONFIG_DNET_AUTONEG_TIMEOUT	5000000	/* default value */
diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c
index a82e8d8041..6b9b20fd18 100644
--- a/drivers/net/dwc_eth_qos.c
+++ b/drivers/net/dwc_eth_qos.c
@@ -43,6 +43,7 @@
 #include <asm/cache.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 /* Core registers */
 
diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c
index 6c1358568a..008da4ab3e 100644
--- a/drivers/net/e1000.c
+++ b/drivers/net/e1000.c
@@ -39,6 +39,7 @@ tested on both gig copper and gig fiber boards
 #include <memalign.h>
 #include <net.h>
 #include <pci.h>
+#include <linux/delay.h>
 #include "e1000.h"
 #include <asm/cache.h>
 
diff --git a/drivers/net/e1000_spi.c b/drivers/net/e1000_spi.c
index dcb561ff79..4fcc65d978 100644
--- a/drivers/net/e1000_spi.c
+++ b/drivers/net/e1000_spi.c
@@ -1,6 +1,7 @@
 #include <common.h>
 #include <command.h>
 #include <console.h>
+#include <linux/delay.h>
 #include "e1000.h"
 #include <malloc.h>
 #include <linux/compiler.h>
diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c
index 36a9d4d91c..e186ab4e5f 100644
--- a/drivers/net/eepro100.c
+++ b/drivers/net/eepro100.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <pci.h>
 #include <miiphy.h>
+#include <linux/delay.h>
 
 #undef DEBUG
 
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 23d2e0754e..a883f95f28 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -18,6 +18,7 @@
 #include <net.h>
 #include <netdev.h>
 #include <asm/cache.h>
+#include <linux/delay.h>
 #include <power/regulator.h>
 
 #include <asm/io.h>
diff --git a/drivers/net/fm/dtsec.c b/drivers/net/fm/dtsec.c
index 4c78a4d63f..c51a65cb94 100644
--- a/drivers/net/fm/dtsec.c
+++ b/drivers/net/fm/dtsec.c
@@ -9,6 +9,7 @@
 #include <fsl_dtsec.h>
 #include <fsl_mdio.h>
 #include <phy.h>
+#include <linux/delay.h>
 
 #include "fm.h"
 
diff --git a/drivers/net/fm/eth.c b/drivers/net/fm/eth.c
index f3ce2ac40c..81a4cf2129 100644
--- a/drivers/net/fm/eth.c
+++ b/drivers/net/fm/eth.c
@@ -24,6 +24,7 @@
 #include <fsl_dtsec.h>
 #include <fsl_tgec.h>
 #include <fsl_memac.h>
+#include <linux/delay.h>
 
 #include "fm.h"
 
diff --git a/drivers/net/fm/tgec.c b/drivers/net/fm/tgec.c
index 9f2f6f6d5b..9cc9f3fde3 100644
--- a/drivers/net/fm/tgec.c
+++ b/drivers/net/fm/tgec.c
@@ -12,6 +12,7 @@
 #include <asm/types.h>
 #include <asm/io.h>
 #include <fsl_tgec.h>
+#include <linux/delay.h>
 
 #include "fm.h"
 
diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
index 3b44abcd94..1c034273b7 100644
--- a/drivers/net/fsl-mc/mc.c
+++ b/drivers/net/fsl-mc/mc.c
@@ -13,6 +13,7 @@
 #include <malloc.h>
 #include <linux/bug.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <net.h>
 #include <fdt_support.h>
diff --git a/drivers/net/fsl-mc/mc_sys.c b/drivers/net/fsl-mc/mc_sys.c
index fddf5cb023..b5ae2ea3eb 100644
--- a/drivers/net/fsl-mc/mc_sys.c
+++ b/drivers/net/fsl-mc/mc_sys.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <errno.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 #define MC_CMD_HDR_READ_CMDID(_hdr) \
 	((uint16_t)mc_dec((_hdr), MC_CMD_HDR_CMDID_O, MC_CMD_HDR_CMDID_S))
diff --git a/drivers/net/fsl_enetc.c b/drivers/net/fsl_enetc.c
index b47b27210c..2929ae7209 100644
--- a/drivers/net/fsl_enetc.c
+++ b/drivers/net/fsl_enetc.c
@@ -16,6 +16,7 @@
 #include <pci.h>
 #include <miiphy.h>
 #include <linux/bug.h>
+#include <linux/delay.h>
 
 #include "fsl_enetc.h"
 
diff --git a/drivers/net/fsl_mcdmafec.c b/drivers/net/fsl_mcdmafec.c
index 45954cecb6..73e92b7a0d 100644
--- a/drivers/net/fsl_mcdmafec.c
+++ b/drivers/net/fsl_mcdmafec.c
@@ -18,6 +18,7 @@
 #include <config.h>
 #include <net.h>
 #include <miiphy.h>
+#include <linux/delay.h>
 #include <linux/mii.h>
 #include <asm/immap.h>
 #include <asm/fsl_mcdmafec.h>
diff --git a/drivers/net/ftmac100.c b/drivers/net/ftmac100.c
index 24bb45f351..4aae7c43fe 100644
--- a/drivers/net/ftmac100.c
+++ b/drivers/net/ftmac100.c
@@ -12,6 +12,7 @@
 #include <env.h>
 #include <malloc.h>
 #include <net.h>
+#include <linux/delay.h>
 #include <linux/io.h>
 
 #include "ftmac100.h"
diff --git a/drivers/net/higmacv300.c b/drivers/net/higmacv300.c
index ea9f9470c8..1ec98644c9 100644
--- a/drivers/net/higmacv300.c
+++ b/drivers/net/higmacv300.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <console.h>
 #include <linux/bug.h>
+#include <linux/delay.h>
 #include <linux/mii.h>
 #include <miiphy.h>
 #include <net.h>
diff --git a/drivers/net/ks8851_mll.c b/drivers/net/ks8851_mll.c
index 8fcb63d1a6..6643d1e9c1 100644
--- a/drivers/net/ks8851_mll.c
+++ b/drivers/net/ks8851_mll.c
@@ -11,6 +11,7 @@
 #include <malloc.h>
 #include <net.h>
 #include <miiphy.h>
+#include <linux/delay.h>
 
 #include "ks8851_mll.h"
 
diff --git a/drivers/net/lan91c96.c b/drivers/net/lan91c96.c
index 1989b66a48..13900f10b1 100644
--- a/drivers/net/lan91c96.c
+++ b/drivers/net/lan91c96.c
@@ -48,6 +48,7 @@
 #include <command.h>
 #include <env.h>
 #include <malloc.h>
+#include <linux/delay.h>
 #include "lan91c96.h"
 #include <net.h>
 #include <linux/compiler.h>
diff --git a/drivers/net/ldpaa_eth/ldpaa_eth.c b/drivers/net/ldpaa_eth/ldpaa_eth.c
index 66bfafe217..116b307b67 100644
--- a/drivers/net/ldpaa_eth/ldpaa_eth.c
+++ b/drivers/net/ldpaa_eth/ldpaa_eth.c
@@ -17,6 +17,7 @@
 #include <linux/bug.h>
 #include <linux/compat.h>
 #include <fsl-mc/fsl_dpmac.h>
+#include <linux/delay.h>
 
 #include <fsl-mc/ldpaa_wriop.h>
 #include "ldpaa_eth.h"
diff --git a/drivers/net/lpc32xx_eth.c b/drivers/net/lpc32xx_eth.c
index 604f676bff..f68daaaff5 100644
--- a/drivers/net/lpc32xx_eth.c
+++ b/drivers/net/lpc32xx_eth.c
@@ -12,6 +12,7 @@
 #include <malloc.h>
 #include <miiphy.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/types.h>
 #include <asm/system.h>
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index ddd1c06059..424ca59707 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -7,6 +7,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <log.h>
+#include <linux/delay.h>
 
 /*
  * The u-boot networking stack is a little weird.  It seems like the
diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c
index 8caf0ba6b1..697549301f 100644
--- a/drivers/net/mcffec.c
+++ b/drivers/net/mcffec.c
@@ -19,6 +19,7 @@
 #include <miiphy.h>
 #include <asm/fec.h>
 #include <asm/immap.h>
+#include <linux/delay.h>
 #include <linux/mii.h>
 
 #undef	ET_DEBUG
diff --git a/drivers/net/mcfmii.c b/drivers/net/mcfmii.c
index 3b8ee07c13..393605512d 100644
--- a/drivers/net/mcfmii.c
+++ b/drivers/net/mcfmii.c
@@ -8,6 +8,7 @@
 #include <config.h>
 #include <net.h>
 #include <netdev.h>
+#include <linux/delay.h>
 
 #ifdef CONFIG_MCF547x_8x
 #include <asm/fsl_mcdmafec.h>
diff --git a/drivers/net/mpc8xx_fec.c b/drivers/net/mpc8xx_fec.c
index 69b2174ab3..f9f7dd7cb3 100644
--- a/drivers/net/mpc8xx_fec.c
+++ b/drivers/net/mpc8xx_fec.c
@@ -12,6 +12,7 @@
 #include <netdev.h>
 #include <asm/cpm_8xx.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 #include <phy.h>
 #include <linux/mii.h>
diff --git a/drivers/net/mscc_eswitch/jr2_switch.c b/drivers/net/mscc_eswitch/jr2_switch.c
index 33dd002146..76823c618e 100644
--- a/drivers/net/mscc_eswitch/jr2_switch.c
+++ b/drivers/net/mscc_eswitch/jr2_switch.c
@@ -10,6 +10,7 @@
 #include <dm/of_access.h>
 #include <dm/of_addr.h>
 #include <fdt_support.h>
+#include <linux/delay.h>
 #include <linux/io.h>
 #include <linux/ioport.h>
 #include <miiphy.h>
diff --git a/drivers/net/mscc_eswitch/mscc_xfer.c b/drivers/net/mscc_eswitch/mscc_xfer.c
index 447b53782d..01eb204db8 100644
--- a/drivers/net/mscc_eswitch/mscc_xfer.c
+++ b/drivers/net/mscc_eswitch/mscc_xfer.c
@@ -4,6 +4,7 @@
  */
 
 #include <log.h>
+#include <linux/delay.h>
 #include <linux/io.h>
 #include "mscc_xfer.h"
 
diff --git a/drivers/net/mt7628-eth.c b/drivers/net/mt7628-eth.c
index 8110af2d82..a2e022db35 100644
--- a/drivers/net/mt7628-eth.c
+++ b/drivers/net/mt7628-eth.c
@@ -25,6 +25,7 @@
 #include <asm/cache.h>
 #include <asm/io.h>
 #include <linux/bitfield.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 
 /* Ethernet frame engine register */
diff --git a/drivers/net/mtk_eth.c b/drivers/net/mtk_eth.c
index c0cabd9b36..86f1360ae3 100644
--- a/drivers/net/mtk_eth.c
+++ b/drivers/net/mtk_eth.c
@@ -21,6 +21,7 @@
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/ioport.h>
 #include <linux/mdio.h>
diff --git a/drivers/net/mvgbe.c b/drivers/net/mvgbe.c
index 1d1a5e8501..cf42489fac 100644
--- a/drivers/net/mvgbe.c
+++ b/drivers/net/mvgbe.c
@@ -19,6 +19,7 @@
 #include <miiphy.h>
 #include <wait_bit.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/types.h>
 #include <asm/system.h>
diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c
index f593aa6508..f9aef17f7e 100644
--- a/drivers/net/mvneta.c
+++ b/drivers/net/mvneta.c
@@ -25,6 +25,7 @@
 #include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <linux/bug.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <phy.h>
 #include <miiphy.h>
diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c
index 83914286e8..ebe67e45ab 100644
--- a/drivers/net/mvpp2.c
+++ b/drivers/net/mvpp2.c
@@ -27,6 +27,7 @@
 #include <malloc.h>
 #include <asm/io.h>
 #include <linux/bug.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <phy.h>
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c
index 86f689802e..bf6fa8f2ba 100644
--- a/drivers/net/natsemi.c
+++ b/drivers/net/natsemi.c
@@ -56,6 +56,7 @@
 #include <netdev.h>
 #include <asm/io.h>
 #include <pci.h>
+#include <linux/delay.h>
 
 /* defines */
 #define EEPROM_SIZE 0xb /*12 16-bit chunks, or 24 bytes*/
diff --git a/drivers/net/ne2000.c b/drivers/net/ne2000.c
index e6cd3e9ba0..28a99bb8c4 100644
--- a/drivers/net/ne2000.c
+++ b/drivers/net/ne2000.c
@@ -74,6 +74,7 @@ Add SNMP
 
 #include <common.h>
 #include <command.h>
+#include <linux/delay.h>
 
 /* NE2000 base header file */
 #include "ne2000_base.h"
diff --git a/drivers/net/ne2000_base.h b/drivers/net/ne2000_base.h
index eee0956fdb..2493608a5a 100644
--- a/drivers/net/ne2000_base.h
+++ b/drivers/net/ne2000_base.h
@@ -106,6 +106,7 @@ are GPL, so this is, of course, GPL.
 #endif
 
 /* timeout for tx/rx in s */
+#include <linux/delay.h>
 #define TOUT 5
 /* Ether MAC address size */
 #define ETHER_ADDR_LEN 6
diff --git a/drivers/net/ns8382x.c b/drivers/net/ns8382x.c
index 9ef3baed1d..c292abad07 100644
--- a/drivers/net/ns8382x.c
+++ b/drivers/net/ns8382x.c
@@ -57,6 +57,7 @@
 #include <netdev.h>
 #include <asm/io.h>
 #include <pci.h>
+#include <linux/delay.h>
 
 /* defines */
 #define DSIZE     0x00000FFF
diff --git a/drivers/net/pch_gbe.c b/drivers/net/pch_gbe.c
index a592ec07da..1daafbe2b9 100644
--- a/drivers/net/pch_gbe.c
+++ b/drivers/net/pch_gbe.c
@@ -14,6 +14,7 @@
 #include <asm/io.h>
 #include <pci.h>
 #include <miiphy.h>
+#include <linux/delay.h>
 #include "pch_gbe.h"
 
 #if !defined(CONFIG_PHYLIB)
diff --git a/drivers/net/pcnet.c b/drivers/net/pcnet.c
index 39cce05293..260a5a38cf 100644
--- a/drivers/net/pcnet.c
+++ b/drivers/net/pcnet.c
@@ -15,6 +15,7 @@
 #include <asm/cache.h>
 #include <asm/io.h>
 #include <pci.h>
+#include <linux/delay.h>
 
 #define	PCNET_DEBUG_LEVEL	0	/* 0=off, 1=init, 2=rx/tx */
 
diff --git a/drivers/net/pfe_eth/pfe_cmd.c b/drivers/net/pfe_eth/pfe_cmd.c
index 66c8cca4d2..1e69525cb7 100644
--- a/drivers/net/pfe_eth/pfe_cmd.c
+++ b/drivers/net/pfe_eth/pfe_cmd.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <command.h>
 #include <log.h>
+#include <linux/delay.h>
 #include <net/pfe_eth/pfe_eth.h>
 
 static inline void pfe_command_help(void)
diff --git a/drivers/net/pfe_eth/pfe_driver.c b/drivers/net/pfe_eth/pfe_driver.c
index e5edfbeaa6..6f443b4ea8 100644
--- a/drivers/net/pfe_eth/pfe_driver.c
+++ b/drivers/net/pfe_eth/pfe_driver.c
@@ -6,6 +6,7 @@
 
 #include <log.h>
 #include <malloc.h>
+#include <linux/delay.h>
 #include <net/pfe_eth/pfe_eth.h>
 #include <net/pfe_eth/pfe_firmware.h>
 
diff --git a/drivers/net/pfe_eth/pfe_eth.c b/drivers/net/pfe_eth/pfe_eth.c
index 4aa5ac4be6..718e24f14d 100644
--- a/drivers/net/pfe_eth/pfe_eth.c
+++ b/drivers/net/pfe_eth/pfe_eth.c
@@ -10,6 +10,7 @@
 #include <malloc.h>
 #include <dm/platform_data/pfe_dm_eth.h>
 #include <net.h>
+#include <linux/delay.h>
 #include <net/pfe_eth/pfe_eth.h>
 #include <net/pfe_eth/pfe_mdio.h>
 
diff --git a/drivers/net/pfe_eth/pfe_mdio.c b/drivers/net/pfe_eth/pfe_mdio.c
index 2f88f5d8bc..3228b8df49 100644
--- a/drivers/net/pfe_eth/pfe_mdio.c
+++ b/drivers/net/pfe_eth/pfe_mdio.c
@@ -9,6 +9,7 @@
 #include <malloc.h>
 #include <dm/platform_data/pfe_dm_eth.h>
 #include <net.h>
+#include <linux/delay.h>
 #include <net/pfe_eth/pfe_eth.h>
 
 extern struct gemac_s gem_info[];
diff --git a/drivers/net/phy/aquantia.c b/drivers/net/phy/aquantia.c
index 75396dec95..8b1cad8540 100644
--- a/drivers/net/phy/aquantia.c
+++ b/drivers/net/phy/aquantia.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <net.h>
 #include <phy.h>
+#include <linux/delay.h>
 #include <u-boot/crc.h>
 #include <malloc.h>
 #include <asm/byteorder.h>
diff --git a/drivers/net/phy/b53.c b/drivers/net/phy/b53.c
index f039f895c8..25dbf215b4 100644
--- a/drivers/net/phy/b53.c
+++ b/drivers/net/phy/b53.c
@@ -24,6 +24,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <linux/delay.h>
 
 #include <errno.h>
 #include <malloc.h>
diff --git a/drivers/net/phy/broadcom.c b/drivers/net/phy/broadcom.c
index 3399fd2366..566fcb8de7 100644
--- a/drivers/net/phy/broadcom.c
+++ b/drivers/net/phy/broadcom.c
@@ -7,6 +7,7 @@
  */
 #include <common.h>
 #include <phy.h>
+#include <linux/delay.h>
 
 /* Broadcom BCM54xx -- taken from linux sungem_phy */
 #define MIIM_BCM54xx_AUXCNTL			0x18
diff --git a/drivers/net/phy/cortina.c b/drivers/net/phy/cortina.c
index ecaa2b9f92..dbc20b1405 100644
--- a/drivers/net/phy/cortina.c
+++ b/drivers/net/phy/cortina.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <linux/ctype.h>
+#include <linux/delay.h>
 #include <linux/string.h>
 #include <linux/err.h>
 #include <phy.h>
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index 93cf44ad4c..be5e3dcaab 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <errno.h>
 #include <phy.h>
+#include <linux/delay.h>
 
 #define PHY_AUTONEGOTIATE_TIMEOUT 5000
 
diff --git a/drivers/net/phy/mv88e61xx.c b/drivers/net/phy/mv88e61xx.c
index cbc3650971..3f8aa7cd99 100644
--- a/drivers/net/phy/mv88e61xx.c
+++ b/drivers/net/phy/mv88e61xx.c
@@ -31,6 +31,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <linux/delay.h>
 
 #include <bitfield.h>
 #include <errno.h>
diff --git a/drivers/net/phy/mv88e6352.c b/drivers/net/phy/mv88e6352.c
index e2261d6a11..62a7f19214 100644
--- a/drivers/net/phy/mv88e6352.c
+++ b/drivers/net/phy/mv88e6352.c
@@ -8,6 +8,7 @@
 #include <command.h>
 #include <log.h>
 #include <miiphy.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <mv88e6352.h>
 
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 6c4381ec6c..6b6497c93a 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -17,6 +17,7 @@
 #include <miiphy.h>
 #include <phy.h>
 #include <errno.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/compiler.h>
 
diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c
index 8f1d759632..86de989df8 100644
--- a/drivers/net/phy/realtek.c
+++ b/drivers/net/phy/realtek.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <linux/bitops.h>
 #include <phy.h>
+#include <linux/delay.h>
 
 #define PHY_RTL8211x_FORCE_MASTER BIT(1)
 #define PHY_RTL8211E_PINE64_GIGABIT_FIX BIT(2)
diff --git a/drivers/net/phy/teranetics.c b/drivers/net/phy/teranetics.c
index 49d6a1ad90..60049c2074 100644
--- a/drivers/net/phy/teranetics.c
+++ b/drivers/net/phy/teranetics.c
@@ -7,6 +7,7 @@
  */
 #include <common.h>
 #include <phy.h>
+#include <linux/delay.h>
 
 #ifndef CONFIG_PHYLIB_10G
 #error The Teranetics PHY needs 10G support
diff --git a/drivers/net/pic32_eth.c b/drivers/net/pic32_eth.c
index d367a1fe37..6a2084947b 100644
--- a/drivers/net/pic32_eth.c
+++ b/drivers/net/pic32_eth.c
@@ -15,6 +15,7 @@
 #include <time.h>
 #include <wait_bit.h>
 #include <asm/gpio.h>
+#include <linux/delay.h>
 #include <linux/mii.h>
 
 #include "pic32_eth.h"
diff --git a/drivers/net/pic32_mdio.c b/drivers/net/pic32_mdio.c
index 1aa5b1d8da..d4049cfea5 100644
--- a/drivers/net/pic32_mdio.c
+++ b/drivers/net/pic32_mdio.c
@@ -11,6 +11,7 @@
 #include <errno.h>
 #include <wait_bit.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include "pic32_eth.h"
 
 static int pic32_mdio_write(struct mii_dev *bus,
diff --git a/drivers/net/ravb.c b/drivers/net/ravb.c
index fae72a1127..3dab91b74b 100644
--- a/drivers/net/ravb.c
+++ b/drivers/net/ravb.c
@@ -17,6 +17,7 @@
 #include <miiphy.h>
 #include <malloc.h>
 #include <asm/cache.h>
+#include <linux/delay.h>
 #include <linux/mii.h>
 #include <wait_bit.h>
 #include <asm/io.h>
diff --git a/drivers/net/rtl8139.c b/drivers/net/rtl8139.c
index e87ee26f7f..fd2454b56f 100644
--- a/drivers/net/rtl8139.c
+++ b/drivers/net/rtl8139.c
@@ -76,6 +76,7 @@
 #include <netdev.h>
 #include <asm/io.h>
 #include <pci.h>
+#include <linux/delay.h>
 #include <linux/types.h>
 
 #define RTL_TIMEOUT	100000
diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c
index c3413431ec..75058fdadc 100644
--- a/drivers/net/rtl8169.c
+++ b/drivers/net/rtl8169.c
@@ -53,6 +53,7 @@
 #include <asm/cache.h>
 #include <asm/io.h>
 #include <pci.h>
+#include <linux/delay.h>
 
 #undef DEBUG_RTL8169
 #undef DEBUG_RTL8169_TX
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c
index 1ad3d0526d..b26fc7b8eb 100644
--- a/drivers/net/sh_eth.c
+++ b/drivers/net/sh_eth.c
@@ -18,6 +18,7 @@
 #include <netdev.h>
 #include <miiphy.h>
 #include <asm/cache.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 
diff --git a/drivers/net/smc91111.c b/drivers/net/smc91111.c
index 52bbf05a1e..23265eff93 100644
--- a/drivers/net/smc91111.c
+++ b/drivers/net/smc91111.c
@@ -51,6 +51,7 @@
 #include <command.h>
 #include <config.h>
 #include <malloc.h>
+#include <linux/delay.h>
 #include "smc91111.h"
 #include <net.h>
 
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index 45ecd6a263..9d2790e561 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -11,6 +11,7 @@
 #include <net.h>
 #include <miiphy.h>
 #include <linux/io.h>
+#include <linux/delay.h>
 #include <linux/types.h>
 
 #include "smc911x.h"
diff --git a/drivers/net/sni_ave.c b/drivers/net/sni_ave.c
index 8f651fa4dc..92b4a65631 100644
--- a/drivers/net/sni_ave.c
+++ b/drivers/net/sni_ave.c
@@ -17,6 +17,7 @@
 #include <syscon.h>
 #include <asm/cache.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/io.h>
 #include <linux/iopoll.h>
diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c
index c24ab83c1a..45ac118495 100644
--- a/drivers/net/sun8i_emac.c
+++ b/drivers/net/sun8i_emac.c
@@ -21,6 +21,7 @@
 #include <dm.h>
 #include <fdt_support.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #include <malloc.h>
 #include <miiphy.h>
diff --git a/drivers/net/sunxi_emac.c b/drivers/net/sunxi_emac.c
index 26c75067bf..6364beb9f2 100644
--- a/drivers/net/sunxi_emac.c
+++ b/drivers/net/sunxi_emac.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <log.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #include <malloc.h>
 #include <miiphy.h>
diff --git a/drivers/net/ti/cpsw_mdio.c b/drivers/net/ti/cpsw_mdio.c
index fb93548dee..e77a2ff0a7 100644
--- a/drivers/net/ti/cpsw_mdio.c
+++ b/drivers/net/ti/cpsw_mdio.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <miiphy.h>
 #include <wait_bit.h>
+#include <linux/delay.h>
 
 struct cpsw_mdio_regs {
 	u32	version;
diff --git a/drivers/net/ti/davinci_emac.c b/drivers/net/ti/davinci_emac.c
index 804797476c..56ea1fec0a 100644
--- a/drivers/net/ti/davinci_emac.c
+++ b/drivers/net/ti/davinci_emac.c
@@ -32,6 +32,7 @@
 #include <linux/compiler.h>
 #include <asm/arch/emac_defs.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include "davinci_emac.h"
 
 unsigned int	emac_dbg = 0;
diff --git a/drivers/net/ti/keystone_net.c b/drivers/net/ti/keystone_net.c
index ecd6df9e45..e3ac40ca0d 100644
--- a/drivers/net/ti/keystone_net.c
+++ b/drivers/net/ti/keystone_net.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <command.h>
 #include <console.h>
+#include <linux/delay.h>
 
 #include <dm.h>
 #include <dm/lists.h>
diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c
index f85cdcb97e..15701ee147 100644
--- a/drivers/net/tsec.c
+++ b/drivers/net/tsec.c
@@ -15,6 +15,7 @@
 #include <command.h>
 #include <tsec.h>
 #include <fsl_mdio.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/processor.h>
 #include <asm/io.h>
diff --git a/drivers/net/uli526x.c b/drivers/net/uli526x.c
index c56836641b..cfdd1137be 100644
--- a/drivers/net/uli526x.c
+++ b/drivers/net/uli526x.c
@@ -16,6 +16,7 @@
 #include <asm/io.h>
 #include <pci.h>
 #include <miiphy.h>
+#include <linux/delay.h>
 
 /* some kernel function compatible define */
 
diff --git a/drivers/net/vsc7385.c b/drivers/net/vsc7385.c
index d020aa915e..af8d99cefb 100644
--- a/drivers/net/vsc7385.c
+++ b/drivers/net/vsc7385.c
@@ -17,6 +17,7 @@
 #include <console.h>
 #include <log.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include "vsc7385.h"
 
diff --git a/drivers/net/vsc9953.c b/drivers/net/vsc9953.c
index 8bad351951..c438dab561 100644
--- a/drivers/net/vsc9953.c
+++ b/drivers/net/vsc9953.c
@@ -17,6 +17,7 @@
 #include <malloc.h>
 #include <vsc9953.h>
 #include <ethsw.h>
+#include <linux/delay.h>
 
 static struct vsc9953_info vsc9953_l2sw = {
 		.port[0] = VSC9953_PORT_INFO_INITIALIZER(0),
diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c
index 09151986f1..d0683db80d 100644
--- a/drivers/net/xilinx_axi_emac.c
+++ b/drivers/net/xilinx_axi_emac.c
@@ -16,6 +16,7 @@
 #include <phy.h>
 #include <miiphy.h>
 #include <wait_bit.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
index b15e5514e6..9bdb6798b6 100644
--- a/drivers/net/xilinx_emaclite.c
+++ b/drivers/net/xilinx_emaclite.c
@@ -17,6 +17,7 @@
 #include <phy.h>
 #include <miiphy.h>
 #include <fdtdec.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <asm/io.h>
diff --git a/drivers/pci/fsl_pci_init.c b/drivers/pci/fsl_pci_init.c
index c3c67fc97b..1d09c5ac4f 100644
--- a/drivers/pci/fsl_pci_init.c
+++ b/drivers/pci/fsl_pci_init.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <asm/fsl_serdes.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/pci/pci-aardvark.c b/drivers/pci/pci-aardvark.c
index d678e0b599..158679139b 100644
--- a/drivers/pci/pci-aardvark.c
+++ b/drivers/pci/pci-aardvark.c
@@ -30,6 +30,7 @@
 #include <asm/io.h>
 #include <asm-generic/gpio.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 #include <linux/ioport.h>
 
 /* PCIe core registers */
diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c
index 76dfc1a957..9ab3539a49 100644
--- a/drivers/pci/pci-uclass.c
+++ b/drivers/pci/pci-uclass.c
@@ -17,6 +17,7 @@
 #if defined(CONFIG_X86) && defined(CONFIG_HAVE_FSP)
 #include <asm/fsp/fsp_support.h>
 #endif
+#include <linux/delay.h>
 #include "pci_internal.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 3b67cd24f1..664e8379eb 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -17,6 +17,7 @@
 #include <common.h>
 #include <init.h>
 #include <log.h>
+#include <linux/delay.h>
 
 #include <command.h>
 #include <env.h>
diff --git a/drivers/pci/pci_sh4.c b/drivers/pci/pci_sh4.c
index 4500e8bb29..aac9be055e 100644
--- a/drivers/pci/pci_sh4.c
+++ b/drivers/pci/pci_sh4.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <linux/delay.h>
 
 #include <asm/processor.h>
 #include <asm/io.h>
diff --git a/drivers/pci/pci_sh7751.c b/drivers/pci/pci_sh7751.c
index 2f48b96719..1f23bbc126 100644
--- a/drivers/pci/pci_sh7751.c
+++ b/drivers/pci/pci_sh7751.c
@@ -11,6 +11,7 @@
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <asm/pci.h>
+#include <linux/delay.h>
 
 /* Register addresses and such */
 #define SH7751_BCR1	(vu_long *)0xFF800000
diff --git a/drivers/pci/pci_sh7780.c b/drivers/pci/pci_sh7780.c
index 722b5e7cf2..06d711a6cb 100644
--- a/drivers/pci/pci_sh7780.c
+++ b/drivers/pci/pci_sh7780.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <linux/delay.h>
 
 #include <pci.h>
 #include <asm/processor.h>
diff --git a/drivers/pci/pci_tegra.c b/drivers/pci/pci_tegra.c
index 3b4b276abe..82f5c59d91 100644
--- a/drivers/pci/pci_tegra.c
+++ b/drivers/pci/pci_tegra.c
@@ -21,6 +21,7 @@
 #include <pci_tegra.h>
 #include <power-domain.h>
 #include <reset.h>
+#include <linux/delay.h>
 
 #include <asm/io.h>
 #include <asm/gpio.h>
diff --git a/drivers/pci/pcie_dw_mvebu.c b/drivers/pci/pcie_dw_mvebu.c
index b003791100..c773f8d28d 100644
--- a/drivers/pci/pcie_dw_mvebu.c
+++ b/drivers/pci/pcie_dw_mvebu.c
@@ -16,6 +16,7 @@
 #include <pci.h>
 #include <asm/io.h>
 #include <asm-generic/gpio.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/pci/pcie_dw_ti.c b/drivers/pci/pcie_dw_ti.c
index 0cca4e6d0d..e49e39e399 100644
--- a/drivers/pci/pcie_dw_ti.c
+++ b/drivers/pci/pcie_dw_ti.c
@@ -14,6 +14,7 @@
 #include <asm/io.h>
 #include <asm-generic/gpio.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/pci/pcie_fsl.c b/drivers/pci/pcie_fsl.c
index dc994b748a..ab33459e28 100644
--- a/drivers/pci/pcie_fsl.c
+++ b/drivers/pci/pcie_fsl.c
@@ -14,6 +14,7 @@
 #include <asm/fsl_pci.h>
 #include <asm/fsl_serdes.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include "pcie_fsl.h"
 #include <dm/device_compat.h>
 
diff --git a/drivers/pci/pcie_imx.c b/drivers/pci/pcie_imx.c
index dc18d1ca3a..cbf12371a0 100644
--- a/drivers/pci/pcie_imx.c
+++ b/drivers/pci/pcie_imx.c
@@ -20,6 +20,7 @@
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <dm.h>
+#include <linux/delay.h>
 #include <linux/sizes.h>
 #include <errno.h>
 #include <asm/arch/sys_proto.h>
diff --git a/drivers/pci/pcie_intel_fpga.c b/drivers/pci/pcie_intel_fpga.c
index 6a9f29c5c8..8249c6212e 100644
--- a/drivers/pci/pcie_intel_fpga.c
+++ b/drivers/pci/pcie_intel_fpga.c
@@ -11,6 +11,7 @@
 #include <pci.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 
 #define RP_TX_REG0			0x2000
 #define RP_TX_CNTRL			0x2004
diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c
index 9696c84e4b..af974cdddb 100644
--- a/drivers/phy/allwinner/phy-sun4i-usb.c
+++ b/drivers/phy/allwinner/phy-sun4i-usb.c
@@ -23,6 +23,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/cpu.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 
 #define REG_ISCR			0x00
diff --git a/drivers/phy/bcm6318-usbh-phy.c b/drivers/phy/bcm6318-usbh-phy.c
index a1ff0b773f..fe0e43d270 100644
--- a/drivers/phy/bcm6318-usbh-phy.c
+++ b/drivers/phy/bcm6318-usbh-phy.c
@@ -17,6 +17,7 @@
 #include <reset.h>
 #include <asm/io.h>
 #include <dm/device.h>
+#include <linux/delay.h>
 
 /* USBH Setup register */
 #define USBH_SETUP_REG		0x00
diff --git a/drivers/phy/bcm6368-usbh-phy.c b/drivers/phy/bcm6368-usbh-phy.c
index f24e9ff5ee..8b918b09f9 100644
--- a/drivers/phy/bcm6368-usbh-phy.c
+++ b/drivers/phy/bcm6368-usbh-phy.c
@@ -17,6 +17,7 @@
 #include <reset.h>
 #include <asm/io.h>
 #include <dm/device.h>
+#include <linux/delay.h>
 
 /* USBH PLL Control register */
 #define USBH_PLL_REG		0x18
diff --git a/drivers/phy/keystone-usb-phy.c b/drivers/phy/keystone-usb-phy.c
index 3be51a33f8..7624f10a04 100644
--- a/drivers/phy/keystone-usb-phy.c
+++ b/drivers/phy/keystone-usb-phy.c
@@ -11,6 +11,7 @@
 #include <generic-phy.h>
 #include <asm/io.h>
 #include <asm/arch/psc_defs.h>
+#include <linux/delay.h>
 
 /* USB PHY control register offsets */
 #define USB_PHY_CTL_UTMI		0x0000
diff --git a/drivers/phy/marvell/comphy_a3700.c b/drivers/phy/marvell/comphy_a3700.c
index 53b55ce7af..dc188c44e0 100644
--- a/drivers/phy/marvell/comphy_a3700.c
+++ b/drivers/phy/marvell/comphy_a3700.c
@@ -9,6 +9,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <linux/delay.h>
 
 #include "comphy_a3700.h"
 
diff --git a/drivers/phy/marvell/comphy_cp110.c b/drivers/phy/marvell/comphy_cp110.c
index ddfacf65d6..15e80049de 100644
--- a/drivers/phy/marvell/comphy_cp110.c
+++ b/drivers/phy/marvell/comphy_cp110.c
@@ -9,6 +9,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <linux/delay.h>
 
 #include "comphy_core.h"
 #include "comphy_hpipe.h"
diff --git a/drivers/phy/meson-g12a-usb2.c b/drivers/phy/meson-g12a-usb2.c
index 6030031184..a1e6219758 100644
--- a/drivers/phy/meson-g12a-usb2.c
+++ b/drivers/phy/meson-g12a-usb2.c
@@ -16,6 +16,7 @@
 #include <errno.h>
 #include <generic-phy.h>
 #include <regmap.h>
+#include <linux/delay.h>
 #include <power/regulator.h>
 #include <reset.h>
 #include <clk.h>
diff --git a/drivers/phy/meson-g12a-usb3-pcie.c b/drivers/phy/meson-g12a-usb3-pcie.c
index 82655f26dd..4e9696fd59 100644
--- a/drivers/phy/meson-g12a-usb3-pcie.c
+++ b/drivers/phy/meson-g12a-usb3-pcie.c
@@ -17,6 +17,7 @@
 #include <reset.h>
 #include <bitfield.h>
 #include <generic-phy.h>
+#include <linux/delay.h>
 
 #include <linux/bitops.h>
 #include <linux/compat.h>
diff --git a/drivers/phy/meson-gxl-usb2.c b/drivers/phy/meson-gxl-usb2.c
index b4f4c3c76b..2267bd08c2 100644
--- a/drivers/phy/meson-gxl-usb2.c
+++ b/drivers/phy/meson-gxl-usb2.c
@@ -15,6 +15,7 @@
 #include <errno.h>
 #include <generic-phy.h>
 #include <regmap.h>
+#include <linux/delay.h>
 #include <power/regulator.h>
 #include <clk.h>
 #include <linux/usb/otg.h>
diff --git a/drivers/phy/mt76x8-usb-phy.c b/drivers/phy/mt76x8-usb-phy.c
index 7fa8c8bf70..4c0818f6e8 100644
--- a/drivers/phy/mt76x8-usb-phy.c
+++ b/drivers/phy/mt76x8-usb-phy.c
@@ -14,6 +14,7 @@
 #include <reset.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
+#include <linux/delay.h>
 
 #define OFS_U2_PHY_AC0			0x800
 #define USBPLL_FBDIV_S			16
diff --git a/drivers/phy/phy-mtk-tphy.c b/drivers/phy/phy-mtk-tphy.c
index 81525a48b7..048e2b19e3 100644
--- a/drivers/phy/phy-mtk-tphy.c
+++ b/drivers/phy/phy-mtk-tphy.c
@@ -14,6 +14,7 @@
 #include <asm/io.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
+#include <linux/delay.h>
 
 #include <dt-bindings/phy/phy.h>
 
diff --git a/drivers/phy/phy-rcar-gen2.c b/drivers/phy/phy-rcar-gen2.c
index e93130aee6..18da86e4be 100644
--- a/drivers/phy/phy-rcar-gen2.c
+++ b/drivers/phy/phy-rcar-gen2.c
@@ -18,6 +18,7 @@
 #include <asm/io.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
+#include <linux/delay.h>
 #include <power/regulator.h>
 
 #define USBHS_LPSTS			0x02
diff --git a/drivers/phy/phy-stm32-usbphyc.c b/drivers/phy/phy-stm32-usbphyc.c
index b436c2184b..464b0735e8 100644
--- a/drivers/phy/phy-stm32-usbphyc.c
+++ b/drivers/phy/phy-stm32-usbphyc.c
@@ -16,6 +16,7 @@
 #include <asm/io.h>
 #include <dm/device_compat.h>
 #include <linux/bitops.h>
+#include <linux/delay.h>
 #include <power/regulator.h>
 
 /* USBPHYC registers */
diff --git a/drivers/phy/phy-ti-am654.c b/drivers/phy/phy-ti-am654.c
index 18cf654c78..5220f01558 100644
--- a/drivers/phy/phy-ti-am654.c
+++ b/drivers/phy/phy-ti-am654.c
@@ -20,6 +20,7 @@
 #include <power-domain.h>
 #include <regmap.h>
 #include <syscon.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 
 #define CMU_R07C		0x7c
diff --git a/drivers/phy/ti-pipe3-phy.c b/drivers/phy/ti-pipe3-phy.c
index 7fc36319cb..d247a98fc4 100644
--- a/drivers/phy/ti-pipe3-phy.c
+++ b/drivers/phy/ti-pipe3-phy.c
@@ -12,6 +12,7 @@
 #include <asm/arch/sys_proto.h>
 #include <syscon.h>
 #include <regmap.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 
 /* PLLCTRL Registers */
diff --git a/drivers/pinctrl/pinctrl-stmfx.c b/drivers/pinctrl/pinctrl-stmfx.c
index b0e43ae0a1..9b6a7fa6bb 100644
--- a/drivers/pinctrl/pinctrl-stmfx.c
+++ b/drivers/pinctrl/pinctrl-stmfx.c
@@ -15,6 +15,7 @@
 #include <dm/lists.h>
 #include <dm/pinctrl.h>
 #include <linux/bitfield.h>
+#include <linux/delay.h>
 #include <power/regulator.h>
 
 /* STMFX pins = GPIO[15:0] + aGPIO[7:0] */
diff --git a/drivers/power/axp209.c b/drivers/power/axp209.c
index 60f69ec27a..ade531940b 100644
--- a/drivers/power/axp209.c
+++ b/drivers/power/axp209.c
@@ -8,6 +8,7 @@
 #include <command.h>
 #include <asm/arch/pmic_bus.h>
 #include <axp_pmic.h>
+#include <linux/delay.h>
 
 #ifdef CONFIG_AXP_ALDO3_VOLT_SLOPE_08
 #  define AXP209_VRC_SLOPE AXP209_VRC_LDO3_800uV_uS
diff --git a/drivers/power/battery/bat_trats.c b/drivers/power/battery/bat_trats.c
index f461a37a9f..54b2bf91e5 100644
--- a/drivers/power/battery/bat_trats.c
+++ b/drivers/power/battery/bat_trats.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <console.h>
 #include <log.h>
+#include <linux/delay.h>
 #include <power/pmic.h>
 #include <power/battery.h>
 #include <power/max8997_pmic.h>
diff --git a/drivers/power/domain/meson-ee-pwrc.c b/drivers/power/domain/meson-ee-pwrc.c
index 0fc8cb66d1..b668d94974 100644
--- a/drivers/power/domain/meson-ee-pwrc.c
+++ b/drivers/power/domain/meson-ee-pwrc.c
@@ -15,6 +15,7 @@
 #include <clk.h>
 #include <dt-bindings/power/meson-g12a-power.h>
 #include <dt-bindings/power/meson-sm1-power.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 
 /* AO Offsets */
diff --git a/drivers/power/domain/meson-gx-pwrc-vpu.c b/drivers/power/domain/meson-gx-pwrc-vpu.c
index 6a938bb995..d43383b68d 100644
--- a/drivers/power/domain/meson-gx-pwrc-vpu.c
+++ b/drivers/power/domain/meson-gx-pwrc-vpu.c
@@ -15,6 +15,7 @@
 #include <syscon.h>
 #include <reset.h>
 #include <clk.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 
 enum {
diff --git a/drivers/power/fuel_gauge/fg_max17042.c b/drivers/power/fuel_gauge/fg_max17042.c
index 7c7e9a752d..a395d587a8 100644
--- a/drivers/power/fuel_gauge/fg_max17042.c
+++ b/drivers/power/fuel_gauge/fg_max17042.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <linux/delay.h>
 #include <power/pmic.h>
 #include <power/max17042_fg.h>
 #include <i2c.h>
diff --git a/drivers/power/mt6323.c b/drivers/power/mt6323.c
index f5b27548d3..354817a037 100644
--- a/drivers/power/mt6323.c
+++ b/drivers/power/mt6323.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <command.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 #define PWRAP_BASE		0x1000d000
 #define PWRAP_WACS2_CMD		0x9c
diff --git a/drivers/power/pmic/pmic_hi6553.c b/drivers/power/pmic/pmic_hi6553.c
index 6443c9ffc9..80b9078cf8 100644
--- a/drivers/power/pmic/pmic_hi6553.c
+++ b/drivers/power/pmic/pmic_hi6553.c
@@ -5,6 +5,7 @@
  */
 #include <asm/io.h>
 #include <common.h>
+#include <linux/delay.h>
 #include <power/pmic.h>
 #include <power/max8997_muic.h>
 #include <power/hi6553_pmic.h>
diff --git a/drivers/power/regulator/pbias_regulator.c b/drivers/power/regulator/pbias_regulator.c
index db8c5a949c..28a9a1470b 100644
--- a/drivers/power/regulator/pbias_regulator.c
+++ b/drivers/power/regulator/pbias_regulator.c
@@ -8,6 +8,7 @@
 #include <errno.h>
 #include <dm.h>
 #include <log.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/regulator/regulator-uclass.c
index b959c469ec..7dcb317192 100644
--- a/drivers/power/regulator/regulator-uclass.c
+++ b/drivers/power/regulator/regulator-uclass.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <log.h>
 #include <dm/uclass-internal.h>
+#include <linux/delay.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 
diff --git a/drivers/power/regulator/regulator_common.c b/drivers/power/regulator/regulator_common.c
index 637db02434..16d9412cd5 100644
--- a/drivers/power/regulator/regulator_common.c
+++ b/drivers/power/regulator/regulator_common.c
@@ -7,6 +7,7 @@
 #include "regulator_common.h"
 #include <common.h>
 #include <log.h>
+#include <linux/delay.h>
 #include <power/regulator.h>
 
 int regulator_common_ofdata_to_platdata(struct udevice *dev,
diff --git a/drivers/power/regulator/s2mps11_regulator.c b/drivers/power/regulator/s2mps11_regulator.c
index 67d1f9689d..a6b4f158ef 100644
--- a/drivers/power/regulator/s2mps11_regulator.c
+++ b/drivers/power/regulator/s2mps11_regulator.c
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <dm.h>
 #include <i2c.h>
+#include <linux/delay.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <power/s2mps11.h>
diff --git a/drivers/power/regulator/stpmic1.c b/drivers/power/regulator/stpmic1.c
index 1e3f96f3a0..3e342f4808 100644
--- a/drivers/power/regulator/stpmic1.c
+++ b/drivers/power/regulator/stpmic1.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <linux/delay.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <power/stpmic1.h>
diff --git a/drivers/power/regulator/tps65090_regulator.c b/drivers/power/regulator/tps65090_regulator.c
index 6dfec89336..9e45627a74 100644
--- a/drivers/power/regulator/tps65090_regulator.c
+++ b/drivers/power/regulator/tps65090_regulator.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <log.h>
+#include <linux/delay.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <power/tps65090.h>
diff --git a/drivers/power/regulator/tps65941_regulator.c b/drivers/power/regulator/tps65941_regulator.c
index 3f8be6c8e4..150c72d7ec 100644
--- a/drivers/power/regulator/tps65941_regulator.c
+++ b/drivers/power/regulator/tps65941_regulator.c
@@ -12,6 +12,7 @@
 #include <dm.h>
 #include <i2c.h>
 #include <log.h>
+#include <linux/delay.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
 #include <power/tps65941.h>
diff --git a/drivers/power/tps6586x.c b/drivers/power/tps6586x.c
index 8c61a41b20..49b28a5e6b 100644
--- a/drivers/power/tps6586x.c
+++ b/drivers/power/tps6586x.c
@@ -9,6 +9,7 @@
 #include <tps6586x.h>
 #include <asm/io.h>
 #include <i2c.h>
+#include <linux/delay.h>
 
 static struct udevice *tps6586x_dev;
 
diff --git a/drivers/power/twl4030.c b/drivers/power/twl4030.c
index 4cc261aced..b0d5cba2c4 100644
--- a/drivers/power/twl4030.c
+++ b/drivers/power/twl4030.c
@@ -24,6 +24,7 @@
 
 #include <command.h>
 #include <twl4030.h>
+#include <linux/delay.h>
 
 /*
  * Power Reset
diff --git a/drivers/power/twl6030.c b/drivers/power/twl6030.c
index 103960d48d..60a5aaaf19 100644
--- a/drivers/power/twl6030.c
+++ b/drivers/power/twl6030.c
@@ -4,6 +4,7 @@
  * Texas Instruments, <www.ti.com>
  */
 #include <config.h>
+#include <linux/delay.h>
 
 #include <twl6030.h>
 
diff --git a/drivers/qe/uec.c b/drivers/qe/uec.c
index 4ab0e21d21..849f191d6d 100644
--- a/drivers/qe/uec.c
+++ b/drivers/qe/uec.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <net.h>
 #include <malloc.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <linux/immap_qe.h>
diff --git a/drivers/qe/uec_phy.c b/drivers/qe/uec_phy.c
index 1dae261509..69c22dd5e2 100644
--- a/drivers/qe/uec_phy.c
+++ b/drivers/qe/uec_phy.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <net.h>
 #include <malloc.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/immap_qe.h>
 #include <asm/io.h>
diff --git a/drivers/ram/imxrt_sdram.c b/drivers/ram/imxrt_sdram.c
index b9831ec8b1..80fcb7e56e 100644
--- a/drivers/ram/imxrt_sdram.c
+++ b/drivers/ram/imxrt_sdram.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <ram.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 
 /* SDRAM Command Code */
diff --git a/drivers/ram/mediatek/ddr3-mt7629.c b/drivers/ram/mediatek/ddr3-mt7629.c
index b413f499d0..6b4296d714 100644
--- a/drivers/ram/mediatek/ddr3-mt7629.c
+++ b/drivers/ram/mediatek/ddr3-mt7629.c
@@ -12,6 +12,7 @@
 #include <dm.h>
 #include <ram.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 /* EMI */
 #define EMI_CONA			0x000
diff --git a/drivers/ram/rockchip/dmc-rk3368.c b/drivers/ram/rockchip/dmc-rk3368.c
index 8dc4738920..31a3c83b03 100644
--- a/drivers/ram/rockchip/dmc-rk3368.c
+++ b/drivers/ram/rockchip/dmc-rk3368.c
@@ -20,6 +20,7 @@
 #include <asm/arch-rockchip/ddr_rk3368.h>
 #include <asm/arch-rockchip/sdram.h>
 #include <asm/arch-rockchip/sdram_rk3288.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 
 struct dram_info {
diff --git a/drivers/ram/rockchip/sdram_pctl_px30.c b/drivers/ram/rockchip/sdram_pctl_px30.c
index 1839cebb67..331d85fba2 100644
--- a/drivers/ram/rockchip/sdram_pctl_px30.c
+++ b/drivers/ram/rockchip/sdram_pctl_px30.c
@@ -8,6 +8,7 @@
 #include <asm/io.h>
 #include <asm/arch-rockchip/sdram.h>
 #include <asm/arch-rockchip/sdram_pctl_px30.h>
+#include <linux/delay.h>
 
 /*
  * rank = 1: cs0
diff --git a/drivers/ram/rockchip/sdram_phy_px30.c b/drivers/ram/rockchip/sdram_phy_px30.c
index 5de73770a8..f7f6de1ba9 100644
--- a/drivers/ram/rockchip/sdram_phy_px30.c
+++ b/drivers/ram/rockchip/sdram_phy_px30.c
@@ -9,6 +9,7 @@
 #include <asm/arch-rockchip/sdram.h>
 #include <asm/arch-rockchip/sdram_common.h>
 #include <asm/arch-rockchip/sdram_phy_px30.h>
+#include <linux/delay.h>
 
 static void sdram_phy_dll_bypass_set(void __iomem *phy_base, u32 freq)
 {
diff --git a/drivers/ram/rockchip/sdram_px30.c b/drivers/ram/rockchip/sdram_px30.c
index 67f494c7f1..fd5763d0a0 100644
--- a/drivers/ram/rockchip/sdram_px30.c
+++ b/drivers/ram/rockchip/sdram_px30.c
@@ -17,6 +17,7 @@
 #include <asm/arch-rockchip/hardware.h>
 #include <asm/arch-rockchip/sdram.h>
 #include <asm/arch-rockchip/sdram_px30.h>
+#include <linux/delay.h>
 
 struct dram_info {
 #ifdef CONFIG_TPL_BUILD
diff --git a/drivers/ram/rockchip/sdram_rk3188.c b/drivers/ram/rockchip/sdram_rk3188.c
index cc9bd02c16..7aedb4fbac 100644
--- a/drivers/ram/rockchip/sdram_rk3188.c
+++ b/drivers/ram/rockchip/sdram_rk3188.c
@@ -25,6 +25,7 @@
 #include <asm/arch-rockchip/pmu_rk3188.h>
 #include <asm/arch-rockchip/sdram.h>
 #include <asm/arch-rockchip/sdram_rk3288.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 
 struct chan_info {
diff --git a/drivers/ram/rockchip/sdram_rk322x.c b/drivers/ram/rockchip/sdram_rk322x.c
index 0b11b48697..094693ce24 100644
--- a/drivers/ram/rockchip/sdram_rk322x.c
+++ b/drivers/ram/rockchip/sdram_rk322x.c
@@ -20,6 +20,7 @@
 #include <asm/arch-rockchip/uart.h>
 #include <asm/arch-rockchip/sdram.h>
 #include <asm/types.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/ram/rockchip/sdram_rk3288.c b/drivers/ram/rockchip/sdram_rk3288.c
index 2e6186d38d..64d704ef26 100644
--- a/drivers/ram/rockchip/sdram_rk3288.c
+++ b/drivers/ram/rockchip/sdram_rk3288.c
@@ -25,6 +25,7 @@
 #include <asm/arch-rockchip/pmu_rk3288.h>
 #include <asm/arch-rockchip/sdram.h>
 #include <asm/arch-rockchip/sdram_rk3288.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #include <power/regulator.h>
 #include <power/rk8xx_pmic.h>
diff --git a/drivers/ram/rockchip/sdram_rk3328.c b/drivers/ram/rockchip/sdram_rk3328.c
index f01301068e..3f3926f9e4 100644
--- a/drivers/ram/rockchip/sdram_rk3328.c
+++ b/drivers/ram/rockchip/sdram_rk3328.c
@@ -19,6 +19,7 @@
 #include <asm/arch-rockchip/sdram.h>
 #include <asm/arch-rockchip/sdram_rk3328.h>
 #include <asm/arch-rockchip/uart.h>
+#include <linux/delay.h>
 
 struct dram_info {
 #ifdef CONFIG_TPL_BUILD
diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c
index 9d2d3cf510..60a1ab8b51 100644
--- a/drivers/ram/rockchip/sdram_rk3399.c
+++ b/drivers/ram/rockchip/sdram_rk3399.c
@@ -22,6 +22,7 @@
 #include <asm/arch-rockchip/hardware.h>
 #include <asm/arch-rockchip/sdram.h>
 #include <asm/arch-rockchip/sdram_rk3399.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #include <time.h>
 
diff --git a/drivers/ram/stm32_sdram.c b/drivers/ram/stm32_sdram.c
index d9b1b24f03..1894a60f1a 100644
--- a/drivers/ram/stm32_sdram.c
+++ b/drivers/ram/stm32_sdram.c
@@ -12,6 +12,7 @@
 #include <ram.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 
 #define MEM_MODE_MASK	GENMASK(2, 0)
 #define SWP_FMC_OFFSET 10
diff --git a/drivers/ram/stm32mp1/stm32mp1_ddr.c b/drivers/ram/stm32mp1/stm32mp1_ddr.c
index f10ecdd2ef..f523dc8ea2 100644
--- a/drivers/ram/stm32mp1/stm32mp1_ddr.c
+++ b/drivers/ram/stm32mp1/stm32mp1_ddr.c
@@ -11,6 +11,7 @@
 #include <timer.h>
 #include <asm/io.h>
 #include <asm/arch/ddr.h>
+#include <linux/delay.h>
 #include <linux/iopoll.h>
 #include "stm32mp1_ddr.h"
 #include "stm32mp1_ddr_regs.h"
diff --git a/drivers/ram/stm32mp1/stm32mp1_tuning.c b/drivers/ram/stm32mp1/stm32mp1_tuning.c
index d2c3e89fa6..a8d6892bb0 100644
--- a/drivers/ram/stm32mp1/stm32mp1_tuning.c
+++ b/drivers/ram/stm32mp1/stm32mp1_tuning.c
@@ -11,6 +11,7 @@
 #include <reset.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
+#include <linux/delay.h>
 #include <linux/iopoll.h>
 
 #include "stm32mp1_ddr_regs.h"
diff --git a/drivers/reset/reset-bcm6345.c b/drivers/reset/reset-bcm6345.c
index 20ea16d37c..0511a0c63a 100644
--- a/drivers/reset/reset-bcm6345.c
+++ b/drivers/reset/reset-bcm6345.c
@@ -13,6 +13,7 @@
 #include <malloc.h>
 #include <reset-uclass.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 #define MAX_RESETS	32
 
diff --git a/drivers/reset/reset-imx7.c b/drivers/reset/reset-imx7.c
index bbbca13925..ce7e1c4ed2 100644
--- a/drivers/reset/reset-imx7.c
+++ b/drivers/reset/reset-imx7.c
@@ -11,6 +11,7 @@
 #include <dt-bindings/reset/imx7-reset.h>
 #include <dt-bindings/reset/imx8mq-reset.h>
 #include <reset-uclass.h>
+#include <linux/delay.h>
 
 struct imx7_reset_priv {
 	void __iomem *base;
diff --git a/drivers/rng/stm32mp1_rng.c b/drivers/rng/stm32mp1_rng.c
index 7ee7471875..a9a927336b 100644
--- a/drivers/rng/stm32mp1_rng.c
+++ b/drivers/rng/stm32mp1_rng.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <reset.h>
 #include <rng.h>
+#include <linux/delay.h>
 
 #include <asm/io.h>
 #include <linux/iopoll.h>
diff --git a/drivers/rtc/davinci.c b/drivers/rtc/davinci.c
index 3514e7351e..c446e7a735 100644
--- a/drivers/rtc/davinci.c
+++ b/drivers/rtc/davinci.c
@@ -9,6 +9,7 @@
 #include <rtc.h>
 #include <asm/io.h>
 #include <asm/davinci_rtc.h>
+#include <linux/delay.h>
 
 int rtc_get(struct rtc_time *tmp)
 {
diff --git a/drivers/rtc/ds1302.c b/drivers/rtc/ds1302.c
index b94163f748..189607c3e0 100644
--- a/drivers/rtc/ds1302.c
+++ b/drivers/rtc/ds1302.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <command.h>
 #include <rtc.h>
+#include <linux/delay.h>
 
 /* GPP Pins */
 #define DATA		0x200
diff --git a/drivers/rtc/ds1306.c b/drivers/rtc/ds1306.c
index 1bd1151e1b..36d615812b 100644
--- a/drivers/rtc/ds1306.c
+++ b/drivers/rtc/ds1306.c
@@ -18,6 +18,7 @@
 #include <command.h>
 #include <rtc.h>
 #include <spi.h>
+#include <linux/delay.h>
 
 #define	RTC_SECONDS		0x00
 #define	RTC_MINUTES		0x01
diff --git a/drivers/rtc/imxdi.c b/drivers/rtc/imxdi.c
index 39920f1a7a..e3a1393266 100644
--- a/drivers/rtc/imxdi.c
+++ b/drivers/rtc/imxdi.c
@@ -16,6 +16,7 @@
 #include <command.h>
 #include <linux/compat.h>
 #include <rtc.h>
+#include <linux/delay.h>
 
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
diff --git a/drivers/rtc/max6900.c b/drivers/rtc/max6900.c
index b35186579a..11928839dc 100644
--- a/drivers/rtc/max6900.c
+++ b/drivers/rtc/max6900.c
@@ -14,6 +14,7 @@
 #include <command.h>
 #include <rtc.h>
 #include <i2c.h>
+#include <linux/delay.h>
 
 #ifndef	CONFIG_SYS_I2C_RTC_ADDR
 #define	CONFIG_SYS_I2C_RTC_ADDR	0x50
diff --git a/drivers/rtc/mvrtc.c b/drivers/rtc/mvrtc.c
index 94a065379c..6f49505d4e 100644
--- a/drivers/rtc/mvrtc.c
+++ b/drivers/rtc/mvrtc.c
@@ -13,6 +13,7 @@
 #include <dm.h>
 #include <rtc.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include "mvrtc.h"
 
 /* This RTC does not support century, so we assume 20 */
diff --git a/drivers/rtc/rv3029.c b/drivers/rtc/rv3029.c
index 5e1689a91d..9be58425bf 100644
--- a/drivers/rtc/rv3029.c
+++ b/drivers/rtc/rv3029.c
@@ -15,6 +15,7 @@
 #include <log.h>
 #include <rtc.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 
 #define RTC_RV3029_PAGE_LEN             7
 
diff --git a/drivers/rtc/s35392a.c b/drivers/rtc/s35392a.c
index 3bfe481403..80f55c8623 100644
--- a/drivers/rtc/s35392a.c
+++ b/drivers/rtc/s35392a.c
@@ -23,6 +23,7 @@
 #include <i2c.h>
 #include <linux/bitrev.h>
 #include <rtc.h>
+#include <linux/delay.h>
 
 #define S35390A_CHIP_ADDR	0x30
 
diff --git a/drivers/serial/atmel_usart.c b/drivers/serial/atmel_usart.c
index 98d209072d..71cb31ff75 100644
--- a/drivers/serial/atmel_usart.c
+++ b/drivers/serial/atmel_usart.c
@@ -14,6 +14,7 @@
 #include <serial.h>
 #include <debug_uart.h>
 #include <linux/compiler.h>
+#include <linux/delay.h>
 
 #include <asm/io.h>
 #ifdef CONFIG_DM_SERIAL
diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c
index 7703c67492..a0af0e6bfd 100644
--- a/drivers/serial/serial-uclass.c
+++ b/drivers/serial/serial-uclass.c
@@ -15,6 +15,7 @@
 #include <dm/lists.h>
 #include <dm/device-internal.h>
 #include <dm/of_access.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index baeaeaac8e..da017dc5b3 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -12,6 +12,7 @@
 #include <post.h>
 #include <linux/compiler.h>
 #include <errno.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/serial/serial_sh.c b/drivers/serial/serial_sh.c
index acfcc2954a..5f45d58e58 100644
--- a/drivers/serial/serial_sh.c
+++ b/drivers/serial/serial_sh.c
@@ -15,6 +15,7 @@
 #include <serial.h>
 #include <linux/compiler.h>
 #include <dm/platform_data/serial_sh.h>
+#include <linux/delay.h>
 #include "serial_sh.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/serial/serial_stm32.c b/drivers/serial/serial_stm32.c
index a9f5c3c3ea..5c1cf81ae0 100644
--- a/drivers/serial/serial_stm32.c
+++ b/drivers/serial/serial_stm32.c
@@ -13,6 +13,7 @@
 #include <watchdog.h>
 #include <asm/io.h>
 #include <asm/arch/stm32.h>
+#include <linux/delay.h>
 #include "serial_stm32.h"
 #include <dm/device_compat.h>
 
diff --git a/drivers/sound/hda_codec.c b/drivers/sound/hda_codec.c
index 92e19452f1..b59c63edb3 100644
--- a/drivers/sound/hda_codec.c
+++ b/drivers/sound/hda_codec.c
@@ -15,6 +15,7 @@
 #include <sound.h>
 #include <asm/io.h>
 #include <dt-bindings/sound/azalia.h>
+#include <linux/delay.h>
 
 /**
  * struct hda_regs - HDA registers
diff --git a/drivers/sound/max98090.c b/drivers/sound/max98090.c
index 29afbbc5c4..d23955d6e1 100644
--- a/drivers/sound/max98090.c
+++ b/drivers/sound/max98090.c
@@ -14,6 +14,7 @@
 #include <log.h>
 #include <sound.h>
 #include <asm/gpio.h>
+#include <linux/delay.h>
 #include "maxim_codec.h"
 #include "max98090.h"
 
diff --git a/drivers/sound/sound-uclass.c b/drivers/sound/sound-uclass.c
index 9aeeb80968..92f4b0b924 100644
--- a/drivers/sound/sound-uclass.c
+++ b/drivers/sound/sound-uclass.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <sound.h>
+#include <linux/delay.h>
 
 #define SOUND_BITS_IN_BYTE 8
 
diff --git a/drivers/spi/cadence_qspi_apb.c b/drivers/spi/cadence_qspi_apb.c
index e0a2003239..6362869299 100644
--- a/drivers/spi/cadence_qspi_apb.c
+++ b/drivers/spi/cadence_qspi_apb.c
@@ -29,6 +29,7 @@
 #include <log.h>
 #include <asm/io.h>
 #include <dma.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <wait_bit.h>
 #include <spi.h>
diff --git a/drivers/spi/davinci_spi.c b/drivers/spi/davinci_spi.c
index 3efa8dbaf0..c00a05af7d 100644
--- a/drivers/spi/davinci_spi.c
+++ b/drivers/spi/davinci_spi.c
@@ -16,6 +16,7 @@
 #include <asm/arch/hardware.h>
 #include <dm.h>
 #include <dm/platform_data/spi_davinci.h>
+#include <linux/delay.h>
 
 /* SPIGCR0 */
 #define SPIGCR0_SPIENA_MASK	0x1
diff --git a/drivers/spi/exynos_spi.c b/drivers/spi/exynos_spi.c
index cded7a8ddc..746686a18a 100644
--- a/drivers/spi/exynos_spi.c
+++ b/drivers/spi/exynos_spi.c
@@ -19,6 +19,7 @@
 #include <asm/arch/pinmux.h>
 #include <asm/arch/spi.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/spi/fsl_dspi.c b/drivers/spi/fsl_dspi.c
index c85253dc71..cb3d44cb0f 100644
--- a/drivers/spi/fsl_dspi.c
+++ b/drivers/spi/fsl_dspi.c
@@ -22,6 +22,7 @@
 #include <asm/arch/clock.h>
 #endif
 #include <fsl_dspi.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/spi/fsl_espi.c b/drivers/spi/fsl_espi.c
index 67544ff522..ba49839107 100644
--- a/drivers/spi/fsl_espi.c
+++ b/drivers/spi/fsl_espi.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <linux/delay.h>
 
 #include <malloc.h>
 #include <spi.h>
diff --git a/drivers/spi/fsl_qspi.c b/drivers/spi/fsl_qspi.c
index 0ee5074269..de93cbda67 100644
--- a/drivers/spi/fsl_qspi.c
+++ b/drivers/spi/fsl_qspi.c
@@ -26,6 +26,7 @@
 #include <common.h>
 #include <log.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <linux/sizes.h>
 #include <linux/iopoll.h>
diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c
index 537c756602..9c42755dae 100644
--- a/drivers/spi/ich.c
+++ b/drivers/spi/ich.c
@@ -25,6 +25,7 @@
 #include <asm/fast_spi.h>
 #include <asm/io.h>
 #include <asm/mtrr.h>
+#include <linux/delay.h>
 #include <linux/sizes.h>
 
 #include "ich.h"
diff --git a/drivers/spi/mpc8xx_spi.c b/drivers/spi/mpc8xx_spi.c
index b020ce2b9d..0026ad23e3 100644
--- a/drivers/spi/mpc8xx_spi.c
+++ b/drivers/spi/mpc8xx_spi.c
@@ -20,6 +20,7 @@
 #include <dm.h>
 #include <mpc8xx.h>
 #include <spi.h>
+#include <linux/delay.h>
 
 #include <asm/cpm_8xx.h>
 #include <asm/io.h>
diff --git a/drivers/spi/mpc8xxx_spi.c b/drivers/spi/mpc8xxx_spi.c
index 8aedd5e705..8491eacb1b 100644
--- a/drivers/spi/mpc8xxx_spi.c
+++ b/drivers/spi/mpc8xxx_spi.c
@@ -14,6 +14,7 @@
 #include <asm/mpc8xxx_spi.h>
 #include <asm-generic/gpio.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 
 enum {
 	SPI_EV_NE = BIT(31 - 22),	/* Receiver Not Empty */
diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c
index 4865fd91f8..e35c6f9b4a 100644
--- a/drivers/spi/mxc_spi.c
+++ b/drivers/spi/mxc_spi.c
@@ -9,6 +9,7 @@
 #include <malloc.h>
 #include <spi.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
diff --git a/drivers/spi/rk_spi.c b/drivers/spi/rk_spi.c
index c5842dc926..833cb04922 100644
--- a/drivers/spi/rk_spi.c
+++ b/drivers/spi/rk_spi.c
@@ -18,6 +18,7 @@
 #include <log.h>
 #include <spi.h>
 #include <time.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/clock.h>
diff --git a/drivers/spi/sh_spi.c b/drivers/spi/sh_spi.c
index c58fd0ebc4..4ecfe60115 100644
--- a/drivers/spi/sh_spi.c
+++ b/drivers/spi/sh_spi.c
@@ -10,6 +10,7 @@
 #include <malloc.h>
 #include <spi.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include "sh_spi.h"
 
 static void sh_spi_write(unsigned long data, unsigned long *reg)
diff --git a/drivers/spi/soft_spi.c b/drivers/spi/soft_spi.c
index af0dd7150f..e5f9f49caf 100644
--- a/drivers/spi/soft_spi.c
+++ b/drivers/spi/soft_spi.c
@@ -17,6 +17,7 @@
 #include <malloc.h>
 #include <spi.h>
 #include <asm/gpio.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/spi/stm32_qspi.c b/drivers/spi/stm32_qspi.c
index ae62aebc02..9fc5f6e00e 100644
--- a/drivers/spi/stm32_qspi.c
+++ b/drivers/spi/stm32_qspi.c
@@ -13,6 +13,7 @@
 #include <reset.h>
 #include <spi-mem.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 #include <linux/iopoll.h>
 #include <linux/ioport.h>
 #include <linux/sizes.h>
diff --git a/drivers/spi/stm32_spi.c b/drivers/spi/stm32_spi.c
index fdc9f952e7..8071de09eb 100644
--- a/drivers/spi/stm32_spi.c
+++ b/drivers/spi/stm32_spi.c
@@ -13,6 +13,7 @@
 #include <reset.h>
 #include <spi.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 
 #include <asm/io.h>
 #include <asm/gpio.h>
diff --git a/drivers/spi/tegra114_spi.c b/drivers/spi/tegra114_spi.c
index 27409186b0..bf02bdb1af 100644
--- a/drivers/spi/tegra114_spi.c
+++ b/drivers/spi/tegra114_spi.c
@@ -13,6 +13,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch-tegra/clk_rst.h>
 #include <spi.h>
+#include <linux/delay.h>
 #include "tegra_spi.h"
 
 /* COMMAND1 */
diff --git a/drivers/spi/tegra20_sflash.c b/drivers/spi/tegra20_sflash.c
index 3a1ef8c093..1461f09427 100644
--- a/drivers/spi/tegra20_sflash.c
+++ b/drivers/spi/tegra20_sflash.c
@@ -17,6 +17,7 @@
 #include <asm/arch-tegra/clk_rst.h>
 #include <spi.h>
 #include <fdtdec.h>
+#include <linux/delay.h>
 #include "tegra_spi.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/spi/tegra20_slink.c b/drivers/spi/tegra20_slink.c
index f09d9603d8..dcd0950894 100644
--- a/drivers/spi/tegra20_slink.c
+++ b/drivers/spi/tegra20_slink.c
@@ -14,6 +14,7 @@
 #include <asm/arch-tegra/clk_rst.h>
 #include <spi.h>
 #include <fdtdec.h>
+#include <linux/delay.h>
 #include "tegra_spi.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/spi/tegra210_qspi.c b/drivers/spi/tegra210_qspi.c
index c810dc421b..96ab6502de 100644
--- a/drivers/spi/tegra210_qspi.c
+++ b/drivers/spi/tegra210_qspi.c
@@ -15,6 +15,7 @@
 #include <asm/arch-tegra/clk_rst.h>
 #include <spi.h>
 #include <fdtdec.h>
+#include <linux/delay.h>
 #include "tegra_spi.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/spi/uniphier_spi.c b/drivers/spi/uniphier_spi.c
index 57d41b778b..42ed1ba20b 100644
--- a/drivers/spi/uniphier_spi.c
+++ b/drivers/spi/uniphier_spi.c
@@ -11,6 +11,7 @@
 #include <time.h>
 #include <dm/device_compat.h>
 #include <linux/bitfield.h>
+#include <linux/delay.h>
 #include <linux/io.h>
 #include <spi.h>
 #include <wait_bit.h>
diff --git a/drivers/spi/zynq_spi.c b/drivers/spi/zynq_spi.c
index b59b876a62..e3bad5532a 100644
--- a/drivers/spi/zynq_spi.c
+++ b/drivers/spi/zynq_spi.c
@@ -13,6 +13,7 @@
 #include <spi.h>
 #include <time.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/sysreset/sysreset-uclass.c b/drivers/sysreset/sysreset-uclass.c
index d43c7b7003..995240f0cb 100644
--- a/drivers/sysreset/sysreset-uclass.c
+++ b/drivers/sysreset/sysreset-uclass.c
@@ -18,6 +18,7 @@
 #include <dm/device-internal.h>
 #include <dm/lists.h>
 #include <dm/root.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 
 int sysreset_request(struct udevice *dev, enum sysreset_t type)
diff --git a/drivers/sysreset/sysreset_mpc83xx.c b/drivers/sysreset/sysreset_mpc83xx.c
index ff08d356bf..456f006bc1 100644
--- a/drivers/sysreset/sysreset_mpc83xx.c
+++ b/drivers/sysreset/sysreset_mpc83xx.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <sysreset.h>
 #include <wait_bit.h>
+#include <linux/delay.h>
 
 #include "sysreset_mpc83xx.h"
 
diff --git a/drivers/thermal/imx_scu_thermal.c b/drivers/thermal/imx_scu_thermal.c
index 691cad9d45..31eef0ade9 100644
--- a/drivers/thermal/imx_scu_thermal.c
+++ b/drivers/thermal/imx_scu_thermal.c
@@ -12,6 +12,7 @@
 #include <dm/device-internal.h>
 #include <dm/device.h>
 #include <asm/arch/sci/sci.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c
index da3fca9036..101bd5ef2d 100644
--- a/drivers/thermal/imx_thermal.c
+++ b/drivers/thermal/imx_thermal.c
@@ -16,6 +16,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <malloc.h>
+#include <linux/delay.h>
 #include <linux/math64.h>
 #include <thermal.h>
 #include <imx_thermal.h>
diff --git a/drivers/timer/tsc_timer.c b/drivers/timer/tsc_timer.c
index 890660b44a..93c959ff44 100644
--- a/drivers/timer/tsc_timer.c
+++ b/drivers/timer/tsc_timer.c
@@ -19,6 +19,7 @@
 #include <asm/ibmpc.h>
 #include <asm/msr.h>
 #include <asm/u-boot-x86.h>
+#include <linux/delay.h>
 
 #define MAX_NUM_FREQS	9
 
diff --git a/drivers/tpm/cr50_i2c.c b/drivers/tpm/cr50_i2c.c
index 026adbd737..1942c07c60 100644
--- a/drivers/tpm/cr50_i2c.c
+++ b/drivers/tpm/cr50_i2c.c
@@ -18,6 +18,7 @@
 #include <asm/io.h>
 #include <asm/arch/iomap.h>
 #include <asm/arch/pm.h>
+#include <linux/delay.h>
 
 enum {
 	TIMEOUT_INIT_MS		= 30000, /* Very long timeout for TPM init */
diff --git a/drivers/tpm/tpm-uclass.c b/drivers/tpm/tpm-uclass.c
index 19c0502d87..6ea795bc0c 100644
--- a/drivers/tpm/tpm-uclass.c
+++ b/drivers/tpm/tpm-uclass.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <log.h>
+#include <linux/delay.h>
 #include <linux/unaligned/be_byteshift.h>
 #include <tpm-v1.h>
 #include <tpm-v2.h>
diff --git a/drivers/tpm/tpm2_tis_spi.c b/drivers/tpm/tpm2_tis_spi.c
index 713111f6c3..03918ed6a7 100644
--- a/drivers/tpm/tpm2_tis_spi.c
+++ b/drivers/tpm/tpm2_tis_spi.c
@@ -19,6 +19,7 @@
 #include <log.h>
 #include <spi.h>
 #include <tpm-v2.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/compiler.h>
 #include <linux/types.h>
diff --git a/drivers/tpm/tpm_atmel_twi.c b/drivers/tpm/tpm_atmel_twi.c
index 2079ea913e..d9e4877c5c 100644
--- a/drivers/tpm/tpm_atmel_twi.c
+++ b/drivers/tpm/tpm_atmel_twi.c
@@ -10,6 +10,7 @@
 #include <tpm-v1.h>
 #include <i2c.h>
 #include <asm/unaligned.h>
+#include <linux/delay.h>
 
 #include "tpm_internal.h"
 
diff --git a/drivers/tpm/tpm_tis_infineon.c b/drivers/tpm/tpm_tis_infineon.c
index b007c7ec6f..f47813e76d 100644
--- a/drivers/tpm/tpm_tis_infineon.c
+++ b/drivers/tpm/tpm_tis_infineon.c
@@ -25,6 +25,7 @@
 #include <i2c.h>
 #include <log.h>
 #include <tpm-v1.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/compiler.h>
 #include <linux/types.h>
diff --git a/drivers/tpm/tpm_tis_lpc.c b/drivers/tpm/tpm_tis_lpc.c
index da4269a56e..2dd374cf77 100644
--- a/drivers/tpm/tpm_tis_lpc.c
+++ b/drivers/tpm/tpm_tis_lpc.c
@@ -18,6 +18,7 @@
 #include <mapmem.h>
 #include <tpm-v1.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 #define PREFIX "lpc_tpm: "
 
diff --git a/drivers/tpm/tpm_tis_st33zp24_i2c.c b/drivers/tpm/tpm_tis_st33zp24_i2c.c
index c8f8265813..a253ee1502 100644
--- a/drivers/tpm/tpm_tis_st33zp24_i2c.c
+++ b/drivers/tpm/tpm_tis_st33zp24_i2c.c
@@ -19,6 +19,7 @@
 #include <log.h>
 #include <tpm-v1.h>
 #include <errno.h>
+#include <linux/delay.h>
 #include <linux/types.h>
 #include <asm/unaligned.h>
 
diff --git a/drivers/tpm/tpm_tis_st33zp24_spi.c b/drivers/tpm/tpm_tis_st33zp24_spi.c
index 8e7b297fe2..ef54e3b7b2 100644
--- a/drivers/tpm/tpm_tis_st33zp24_spi.c
+++ b/drivers/tpm/tpm_tis_st33zp24_spi.c
@@ -19,6 +19,7 @@
 #include <spi.h>
 #include <tpm-v1.h>
 #include <errno.h>
+#include <linux/delay.h>
 #include <linux/types.h>
 #include <asm/unaligned.h>
 #include <linux/compat.h>
diff --git a/drivers/ufs/ufs.c b/drivers/ufs/ufs.c
index bbb18e89e0..136dab5602 100644
--- a/drivers/ufs/ufs.c
+++ b/drivers/ufs/ufs.c
@@ -19,6 +19,7 @@
 #include <malloc.h>
 #include <hexdump.h>
 #include <scsi.h>
+#include <linux/delay.h>
 
 #include <linux/dma-mapping.h>
 
diff --git a/drivers/usb/cdns3/ep0.c b/drivers/usb/cdns3/ep0.c
index 4266bd630c..4a6374c492 100644
--- a/drivers/usb/cdns3/ep0.c
+++ b/drivers/usb/cdns3/ep0.c
@@ -13,6 +13,7 @@
 #include <cpu_func.h>
 #include <asm/cache.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 #include <linux/usb/composite.h>
 #include <linux/iopoll.h>
 
diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c
index caed27c32f..f5b6e5be64 100644
--- a/drivers/usb/cdns3/gadget.c
+++ b/drivers/usb/cdns3/gadget.c
@@ -59,6 +59,7 @@
 #include <dm.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/usb/gadget.h>
 #include <linux/compat.h>
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index f31a24b064..b77014db87 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -20,6 +20,7 @@
 #include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <linux/bug.h>
+#include <linux/delay.h>
 #include <linux/dma-mapping.h>
 #include <linux/err.h>
 #include <linux/ioport.h>
diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c
index f66f083453..6567502cdd 100644
--- a/drivers/usb/dwc3/dwc3-meson-g12a.c
+++ b/drivers/usb/dwc3/dwc3-meson-g12a.c
@@ -14,6 +14,7 @@
 #include <dm/lists.h>
 #include <dwc3-uboot.h>
 #include <generic-phy.h>
+#include <linux/delay.h>
 #include <linux/usb/ch9.h>
 #include <linux/usb/gadget.h>
 #include <malloc.h>
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 8945abc396..2aec874e1d 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -20,6 +20,7 @@
 #include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <linux/bug.h>
+#include <linux/delay.h>
 #include <linux/dma-mapping.h>
 #include <linux/list.h>
 
diff --git a/drivers/usb/dwc3/samsung_usb_phy.c b/drivers/usb/dwc3/samsung_usb_phy.c
index 677061458c..abbd413689 100644
--- a/drivers/usb/dwc3/samsung_usb_phy.c
+++ b/drivers/usb/dwc3/samsung_usb_phy.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <asm/arch/power.h>
 #include <asm/arch/xhci-exynos.h>
+#include <linux/delay.h>
 
 void exynos5_usb3_phy_init(struct exynos_usb3_phy *phy)
 {
diff --git a/drivers/usb/dwc3/ti_usb_phy.c b/drivers/usb/dwc3/ti_usb_phy.c
index 6b0166a1e0..ade3a7f85c 100644
--- a/drivers/usb/dwc3/ti_usb_phy.c
+++ b/drivers/usb/dwc3/ti_usb_phy.c
@@ -21,6 +21,7 @@
 #include <ti-usb-phy-uboot.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
+#include <linux/delay.h>
 #include <linux/ioport.h>
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
diff --git a/drivers/usb/eth/asix.c b/drivers/usb/eth/asix.c
index 5f56f6f2dd..db75ae2498 100644
--- a/drivers/usb/eth/asix.c
+++ b/drivers/usb/eth/asix.c
@@ -12,6 +12,7 @@
 #include <usb.h>
 #include <malloc.h>
 #include <memalign.h>
+#include <linux/delay.h>
 #include <linux/mii.h>
 #include "usb_ether.h"
 
diff --git a/drivers/usb/eth/asix88179.c b/drivers/usb/eth/asix88179.c
index b4a56390b3..381bef2bed 100644
--- a/drivers/usb/eth/asix88179.c
+++ b/drivers/usb/eth/asix88179.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <usb.h>
 #include <net.h>
+#include <linux/delay.h>
 #include <linux/mii.h>
 #include "usb_ether.h"
 #include <malloc.h>
diff --git a/drivers/usb/eth/mcs7830.c b/drivers/usb/eth/mcs7830.c
index b8fe65237d..0cb7dbc8fb 100644
--- a/drivers/usb/eth/mcs7830.c
+++ b/drivers/usb/eth/mcs7830.c
@@ -14,6 +14,7 @@
 #include <errno.h>
 #include <log.h>
 #include <net.h>
+#include <linux/delay.h>
 #include <linux/mii.h>
 #include <malloc.h>
 #include <memalign.h>
diff --git a/drivers/usb/eth/r8152.c b/drivers/usb/eth/r8152.c
index 1454d98d8f..61b8683230 100644
--- a/drivers/usb/eth/r8152.c
+++ b/drivers/usb/eth/r8152.c
@@ -12,6 +12,7 @@
 #include <memalign.h>
 #include <net.h>
 #include <usb.h>
+#include <linux/delay.h>
 #include <linux/mii.h>
 #include <linux/bitops.h>
 #include "usb_ether.h"
diff --git a/drivers/usb/eth/r8152_fw.c b/drivers/usb/eth/r8152_fw.c
index 4bf4066d7a..d564de285f 100644
--- a/drivers/usb/eth/r8152_fw.c
+++ b/drivers/usb/eth/r8152_fw.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <linux/delay.h>
 #include "usb_ether.h"
 #include "r8152.h"
 
diff --git a/drivers/usb/eth/smsc95xx.c b/drivers/usb/eth/smsc95xx.c
index 82fea742b0..d3532df141 100644
--- a/drivers/usb/eth/smsc95xx.c
+++ b/drivers/usb/eth/smsc95xx.c
@@ -15,6 +15,7 @@
 #include <net.h>
 #include <usb.h>
 #include <asm/unaligned.h>
+#include <linux/delay.h>
 #include <linux/mii.h>
 #include "usb_ether.h"
 
diff --git a/drivers/usb/gadget/bcm_udc_otg_phy.c b/drivers/usb/gadget/bcm_udc_otg_phy.c
index 3ecb669507..c89cd57c25 100644
--- a/drivers/usb/gadget/bcm_udc_otg_phy.c
+++ b/drivers/usb/gadget/bcm_udc_otg_phy.c
@@ -8,6 +8,7 @@
 #include <asm/io.h>
 #include <asm/arch/sysmap.h>
 #include <asm/kona-common/clk.h>
+#include <linux/delay.h>
 
 #include "dwc2_udc_otg_priv.h"
 #include "bcm_udc_otg.h"
diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c
index 5677eab426..cdbdbcc5ca 100644
--- a/drivers/usb/gadget/ci_udc.c
+++ b/drivers/usb/gadget/ci_udc.c
@@ -15,6 +15,7 @@
 #include <malloc.h>
 #include <asm/byteorder.h>
 #include <asm/cache.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <asm/unaligned.h>
diff --git a/drivers/usb/gadget/designware_udc.c b/drivers/usb/gadget/designware_udc.c
index 70c5c678c3..7fc5d27d43 100644
--- a/drivers/usb/gadget/designware_udc.c
+++ b/drivers/usb/gadget/designware_udc.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <serial.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 #include <env.h>
 #include <usbdevice.h>
diff --git a/drivers/usb/gadget/dwc2_udc_otg.c b/drivers/usb/gadget/dwc2_udc_otg.c
index 32bf92752d..eaa5dcb9b1 100644
--- a/drivers/usb/gadget/dwc2_udc_otg.c
+++ b/drivers/usb/gadget/dwc2_udc_otg.c
@@ -27,6 +27,7 @@
 #include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <linux/bug.h>
+#include <linux/delay.h>
 
 #include <linux/errno.h>
 #include <linux/list.h>
diff --git a/drivers/usb/gadget/dwc2_udc_otg_phy.c b/drivers/usb/gadget/dwc2_udc_otg_phy.c
index c4338af0d7..7f8e9564b9 100644
--- a/drivers/usb/gadget/dwc2_udc_otg_phy.c
+++ b/drivers/usb/gadget/dwc2_udc_otg_phy.c
@@ -18,6 +18,7 @@
  */
 
 #include <common.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/list.h>
 #include <malloc.h>
diff --git a/drivers/usb/gadget/f_thor.c b/drivers/usb/gadget/f_thor.c
index 900eb96377..88fc87f2e9 100644
--- a/drivers/usb/gadget/f_thor.c
+++ b/drivers/usb/gadget/f_thor.c
@@ -23,6 +23,7 @@
 #include <malloc.h>
 #include <memalign.h>
 #include <version.h>
+#include <linux/delay.h>
 #include <linux/usb/ch9.h>
 #include <linux/usb/gadget.h>
 #include <linux/usb/composite.h>
diff --git a/drivers/usb/gadget/fotg210.c b/drivers/usb/gadget/fotg210.c
index 4211eea3a4..af43433d88 100644
--- a/drivers/usb/gadget/fotg210.c
+++ b/drivers/usb/gadget/fotg210.c
@@ -14,6 +14,7 @@
 #include <net.h>
 #include <malloc.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/types.h>
 #include <linux/usb/ch9.h>
diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c
index ebf1f4eb55..d19ac1d035 100644
--- a/drivers/usb/gadget/pxa25x_udc.c
+++ b/drivers/usb/gadget/pxa25x_udc.c
@@ -29,6 +29,7 @@
 #include <malloc.h>
 #include <asm/io.h>
 #include <asm/arch/pxa.h>
+#include <linux/delay.h>
 
 #include <linux/usb/ch9.h>
 #include <linux/usb/gadget.h>
diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c
index 15c43782b8..ba362b8f25 100644
--- a/drivers/usb/gadget/pxa27x_udc.c
+++ b/drivers/usb/gadget/pxa27x_udc.c
@@ -13,6 +13,7 @@
 #include <asm/byteorder.h>
 #include <asm/io.h>
 #include <usbdevice.h>
+#include <linux/delay.h>
 #include <usb/pxa27x_udc.h>
 #include <usb/udc.h>
 
diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c
index 0d694f3d39..cefe9d83b1 100644
--- a/drivers/usb/host/dwc2.c
+++ b/drivers/usb/host/dwc2.c
@@ -20,6 +20,7 @@
 #include <asm/cache.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 #include <power/regulator.h>
 #include <reset.h>
 
diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c
index 9093e029ea..0b0b2137c7 100644
--- a/drivers/usb/host/ehci-exynos.c
+++ b/drivers/usb/host/ehci-exynos.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <log.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <malloc.h>
 #include <usb.h>
diff --git a/drivers/usb/host/ehci-faraday.c b/drivers/usb/host/ehci-faraday.c
index f46bdb441d..b61b5382df 100644
--- a/drivers/usb/host/ehci-faraday.c
+++ b/drivers/usb/host/ehci-faraday.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <asm/io.h>
 #include <usb.h>
+#include <linux/delay.h>
 #include <usb/fusbh200.h>
 #include <usb/fotg210.h>
 
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index 75d24ae015..ac6c5b5845 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -13,6 +13,7 @@
 #include <pci.h>
 #include <usb.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <usb/ehci-ci.h>
 #include <hwconfig.h>
 #include <fsl_usb.h>
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 1e03c83fe6..f79f06320b 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -21,6 +21,7 @@
 #include <watchdog.h>
 #include <dm/device_compat.h>
 #include <linux/compiler.h>
+#include <linux/delay.h>
 
 #include "ehci.h"
 
diff --git a/drivers/usb/host/ehci-marvell.c b/drivers/usb/host/ehci-marvell.c
index 2c9382fa99..9c15bb574d 100644
--- a/drivers/usb/host/ehci-marvell.c
+++ b/drivers/usb/host/ehci-marvell.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <asm/io.h>
 #include <usb.h>
+#include <linux/delay.h>
 #include "ehci.h"
 #include <linux/mbus.h>
 #include <asm/arch/cpu.h>
diff --git a/drivers/usb/host/ehci-mx5.c b/drivers/usb/host/ehci-mx5.c
index 82f99e924e..212b362332 100644
--- a/drivers/usb/host/ehci-mx5.c
+++ b/drivers/usb/host/ehci-mx5.c
@@ -9,6 +9,7 @@
 #include <usb.h>
 #include <errno.h>
 #include <linux/compiler.h>
+#include <linux/delay.h>
 #include <usb/ehci-ci.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c
index 4fb78380ac..66e6221443 100644
--- a/drivers/usb/host/ehci-mx6.c
+++ b/drivers/usb/host/ehci-mx6.c
@@ -10,6 +10,7 @@
 #include <errno.h>
 #include <wait_bit.h>
 #include <linux/compiler.h>
+#include <linux/delay.h>
 #include <usb/ehci-ci.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c
index 4941cb9457..d0b7ac512e 100644
--- a/drivers/usb/host/ehci-mxc.c
+++ b/drivers/usb/host/ehci-mxc.c
@@ -8,6 +8,7 @@
 #include <usb.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
+#include <linux/delay.h>
 #include <usb/ehci-ci.h>
 #include <errno.h>
 
diff --git a/drivers/usb/host/ehci-mxs.c b/drivers/usb/host/ehci-mxs.c
index 8e8f6d4928..824c620e63 100644
--- a/drivers/usb/host/ehci-mxs.c
+++ b/drivers/usb/host/ehci-mxs.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <errno.h>
+#include <linux/delay.h>
 
 #include "ehci.h"
 
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index a5061f7726..5fee537140 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -13,6 +13,7 @@
 #include <common.h>
 #include <log.h>
 #include <usb.h>
+#include <linux/delay.h>
 #include <usb/ulpi.h>
 #include <errno.h>
 #include <asm/io.h>
diff --git a/drivers/usb/host/ehci-rmobile.c b/drivers/usb/host/ehci-rmobile.c
index 4868581066..130b73dfe4 100644
--- a/drivers/usb/host/ehci-rmobile.c
+++ b/drivers/usb/host/ehci-rmobile.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/arch/ehci-rmobile.h>
+#include <linux/delay.h>
 #include "ehci.h"
 
 #if defined(CONFIG_R8A7740)
diff --git a/drivers/usb/host/ehci-spear.c b/drivers/usb/host/ehci-spear.c
index 8f5bfd5ed8..3e87e0c7fd 100644
--- a/drivers/usb/host/ehci-spear.c
+++ b/drivers/usb/host/ehci-spear.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <asm/io.h>
 #include <usb.h>
+#include <linux/delay.h>
 #include "ehci.h"
 #include <asm/arch/hardware.h>
 #include <asm/arch/spr_misc.h>
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index 55fe6fec9a..d81f4a03f1 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <log.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <asm-generic/gpio.h>
diff --git a/drivers/usb/host/ehci-vf.c b/drivers/usb/host/ehci-vf.c
index ba6eecada1..562207d3d2 100644
--- a/drivers/usb/host/ehci-vf.c
+++ b/drivers/usb/host/ehci-vf.c
@@ -19,6 +19,7 @@
 #include <asm/arch/crm_regs.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/regs-usbphy.h>
+#include <linux/delay.h>
 #include <usb/ehci-ci.h>
 #include <linux/libfdt.h>
 #include <fdtdec.h>
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index ac1ad29b02..c62d8feecc 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -33,6 +33,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <asm/cache.h>
+#include <linux/delay.h>
 
 #if defined(CONFIG_PCI_OHCI)
 # include <pci.h>
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c
index d790839fda..37aa2c55f2 100644
--- a/drivers/usb/host/r8a66597-hcd.c
+++ b/drivers/usb/host/r8a66597-hcd.c
@@ -12,6 +12,7 @@
 #include <usb.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 #include <linux/iopoll.h>
 #include <power/regulator.h>
 
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c
index e08da6130b..7c823f241a 100644
--- a/drivers/usb/host/sl811-hcd.c
+++ b/drivers/usb/host/sl811-hcd.c
@@ -21,6 +21,7 @@
 #include <common.h>
 #include <mpc8xx.h>
 #include <usb.h>
+#include <linux/delay.h>
 #include "sl811.h"
 
 #include "../../../board/kup/common/kup.h"
diff --git a/drivers/usb/host/utmi-armada100.c b/drivers/usb/host/utmi-armada100.c
index 8a40f66447..5d66e5881f 100644
--- a/drivers/usb/host/utmi-armada100.c
+++ b/drivers/usb/host/utmi-armada100.c
@@ -14,6 +14,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/armada100.h>
 #include <asm/arch/utmi-armada100.h>
+#include <linux/delay.h>
 
 static int utmi_phy_init(void)
 {
diff --git a/drivers/usb/host/xhci-dwc3.c b/drivers/usb/host/xhci-dwc3.c
index 37b59c80fd..cf72f0236d 100644
--- a/drivers/usb/host/xhci-dwc3.c
+++ b/drivers/usb/host/xhci-dwc3.c
@@ -13,6 +13,7 @@
 #include <log.h>
 #include <usb.h>
 #include <dwc3-uboot.h>
+#include <linux/delay.h>
 
 #include <usb/xhci.h>
 #include <asm/io.h>
diff --git a/drivers/usb/host/xhci-exynos5.c b/drivers/usb/host/xhci-exynos5.c
index 76aa431243..1705accbde 100644
--- a/drivers/usb/host/xhci-exynos5.c
+++ b/drivers/usb/host/xhci-exynos5.c
@@ -16,6 +16,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <log.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <malloc.h>
 #include <usb.h>
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index ec57f725d3..963cc3c3c5 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -30,6 +30,7 @@
 #include <asm/cache.h>
 #include <asm/unaligned.h>
 #include <linux/bug.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <usb/xhci.h>
 
diff --git a/drivers/usb/musb-new/am35x.c b/drivers/usb/musb-new/am35x.c
index 69d6104044..0a52e09e19 100644
--- a/drivers/usb/musb-new/am35x.c
+++ b/drivers/usb/musb-new/am35x.c
@@ -27,6 +27,7 @@
 #include <common.h>
 #include <asm/omap_musb.h>
 #include <linux/bug.h>
+#include <linux/delay.h>
 #include "linux-compat.h"
 #endif
 
diff --git a/drivers/usb/musb-new/da8xx.c b/drivers/usb/musb-new/da8xx.c
index 1f6e51ed98..67488ddb50 100644
--- a/drivers/usb/musb-new/da8xx.c
+++ b/drivers/usb/musb-new/da8xx.c
@@ -21,6 +21,7 @@
 #include <dm/lists.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/da8xx-usb.h>
+#include <linux/delay.h>
 #include <linux/usb/otg.h>
 #include <asm/omap_musb.h>
 #include <generic-phy.h>
diff --git a/drivers/usb/musb-new/linux-compat.h b/drivers/usb/musb-new/linux-compat.h
index f366ae58e8..733b197f59 100644
--- a/drivers/usb/musb-new/linux-compat.h
+++ b/drivers/usb/musb-new/linux-compat.h
@@ -2,6 +2,7 @@
 #define __LINUX_COMPAT_H__
 
 #include <malloc.h>
+#include <linux/delay.h>
 #include <linux/list.h>
 #include <linux/compat.h>
 
diff --git a/drivers/usb/musb-new/mt85xx.c b/drivers/usb/musb-new/mt85xx.c
index 131fd7dd79..c281c38a28 100644
--- a/drivers/usb/musb-new/mt85xx.c
+++ b/drivers/usb/musb-new/mt85xx.c
@@ -14,6 +14,7 @@
 #include <dm.h>
 #include <dm/lists.h>
 #include <dm/root.h>
+#include <linux/delay.h>
 #include <linux/usb/musb.h>
 #include <usb.h>
 #include "linux-compat.h"
diff --git a/drivers/usb/musb-new/musb_uboot.c b/drivers/usb/musb-new/musb_uboot.c
index 72f14b9343..988071a61d 100644
--- a/drivers/usb/musb-new/musb_uboot.c
+++ b/drivers/usb/musb-new/musb_uboot.c
@@ -2,6 +2,7 @@
 #include <console.h>
 #include <malloc.h>
 #include <watchdog.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/usb/ch9.h>
diff --git a/drivers/usb/musb-new/pic32.c b/drivers/usb/musb-new/pic32.c
index c7867fef8a..66e8e9ce88 100644
--- a/drivers/usb/musb-new/pic32.c
+++ b/drivers/usb/musb-new/pic32.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 #include <linux/usb/musb.h>
 #include "linux-compat.h"
 #include "musb_core.h"
diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c
index 1c32f3fc06..a29d10d335 100644
--- a/drivers/usb/musb-new/sunxi.c
+++ b/drivers/usb/musb-new/sunxi.c
@@ -30,6 +30,7 @@
 #include <dm/device_compat.h>
 #include <dm/lists.h>
 #include <dm/root.h>
+#include <linux/delay.h>
 #include <linux/usb/musb.h>
 #include "linux-compat.h"
 #include "musb_core.h"
diff --git a/drivers/usb/musb/am35x.c b/drivers/usb/musb/am35x.c
index 0617364f35..f945f1f5e2 100644
--- a/drivers/usb/musb/am35x.c
+++ b/drivers/usb/musb/am35x.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <linux/delay.h>
 
 #include "am35x.h"
 
diff --git a/drivers/usb/musb/musb_hcd.c b/drivers/usb/musb/musb_hcd.c
index 632a9882b3..afbc648883 100644
--- a/drivers/usb/musb/musb_hcd.c
+++ b/drivers/usb/musb/musb_hcd.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <log.h>
 #include <usb.h>
+#include <linux/delay.h>
 #include "musb_hcd.h"
 
 /* MSC control transfers */
diff --git a/drivers/usb/musb/musb_udc.c b/drivers/usb/musb/musb_udc.c
index 4d7723621d..d901f8777c 100644
--- a/drivers/usb/musb/musb_udc.c
+++ b/drivers/usb/musb/musb_udc.c
@@ -41,6 +41,7 @@
 #include <hang.h>
 #include <serial.h>
 #include <usbdevice.h>
+#include <linux/delay.h>
 #include <usb/udc.h>
 #include "../gadget/ep0.h"
 #include "musb_core.h"
diff --git a/drivers/usb/phy/omap_usb_phy.c b/drivers/usb/phy/omap_usb_phy.c
index 9209942430..be733f39b2 100644
--- a/drivers/usb/phy/omap_usb_phy.c
+++ b/drivers/usb/phy/omap_usb_phy.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <usb.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/omap_common.h>
 #include <asm/arch/cpu.h>
diff --git a/drivers/usb/phy/rockchip_usb2_phy.c b/drivers/usb/phy/rockchip_usb2_phy.c
index 24ea8d8c31..6a60523e0f 100644
--- a/drivers/usb/phy/rockchip_usb2_phy.c
+++ b/drivers/usb/phy/rockchip_usb2_phy.c
@@ -7,6 +7,7 @@
 #include <hang.h>
 #include <log.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 #include "../gadget/dwc2_udc_otg_priv.h"
 
diff --git a/drivers/usb/phy/twl4030.c b/drivers/usb/phy/twl4030.c
index d2945d1417..676868bead 100644
--- a/drivers/usb/phy/twl4030.c
+++ b/drivers/usb/phy/twl4030.c
@@ -24,6 +24,7 @@
  */
 
 #include <twl4030.h>
+#include <linux/delay.h>
 
 /* Defines for bits in registers */
 #define OPMODE_MASK		(3 << 3)
diff --git a/drivers/usb/ulpi/omap-ulpi-viewport.c b/drivers/usb/ulpi/omap-ulpi-viewport.c
index 26299e04d5..8b930e3fa9 100644
--- a/drivers/usb/ulpi/omap-ulpi-viewport.c
+++ b/drivers/usb/ulpi/omap-ulpi-viewport.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <log.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <usb/ulpi.h>
 
 #define OMAP_ULPI_WR_OPSEL	(2 << 22)
diff --git a/drivers/usb/ulpi/ulpi-viewport.c b/drivers/usb/ulpi/ulpi-viewport.c
index a2158c9bb8..3bb152be89 100644
--- a/drivers/usb/ulpi/ulpi-viewport.c
+++ b/drivers/usb/ulpi/ulpi-viewport.c
@@ -15,6 +15,7 @@
 
 #include <common.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 #include <usb/ulpi.h>
 
 /* ULPI viewport control bits */
diff --git a/drivers/usb/ulpi/ulpi.c b/drivers/usb/ulpi/ulpi.c
index e8499bfdee..dd0da0e841 100644
--- a/drivers/usb/ulpi/ulpi.c
+++ b/drivers/usb/ulpi/ulpi.c
@@ -22,6 +22,7 @@
 #include <common.h>
 #include <exports.h>
 #include <log.h>
+#include <linux/delay.h>
 #include <usb/ulpi.h>
 
 #define ULPI_ID_REGS_COUNT	4
diff --git a/drivers/video/am335x-fb.c b/drivers/video/am335x-fb.c
index 3e76d4e5ea..dfad3fa683 100644
--- a/drivers/video/am335x-fb.c
+++ b/drivers/video/am335x-fb.c
@@ -23,6 +23,7 @@
 #include <linux/err.h>
 #include <lcd.h>
 #include <video.h>
+#include <linux/delay.h>
 #include "am335x-fb.h"
 
 #define LCDC_FMAX				200000000
diff --git a/drivers/video/anx9804.c b/drivers/video/anx9804.c
index fc2f431b9c..b050c4292f 100644
--- a/drivers/video/anx9804.c
+++ b/drivers/video/anx9804.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <i2c.h>
+#include <linux/delay.h>
 #include "anx98xx-edp.h"
 #include "anx9804.h"
 
diff --git a/drivers/video/ati_radeon_fb.c b/drivers/video/ati_radeon_fb.c
index 6fce033636..c4da2e3ae7 100644
--- a/drivers/video/ati_radeon_fb.c
+++ b/drivers/video/ati_radeon_fb.c
@@ -16,6 +16,7 @@
  */
 
 #include <common.h>
+#include <linux/delay.h>
 
 #include <command.h>
 #include <bios_emul.h>
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index f66ce2cd63..ae8ec26468 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -18,6 +18,7 @@
 #include <lcd.h>
 #include <bmp_layout.h>
 #include <atmel_lcdc.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/video/bridge/anx6345.c b/drivers/video/bridge/anx6345.c
index 6a30a5e6a6..1c5270ff05 100644
--- a/drivers/video/bridge/anx6345.c
+++ b/drivers/video/bridge/anx6345.c
@@ -10,6 +10,7 @@
 #include <edid.h>
 #include <log.h>
 #include <video_bridge.h>
+#include <linux/delay.h>
 #include "../anx98xx-edp.h"
 
 #define DP_MAX_LINK_RATE		0x001
diff --git a/drivers/video/bridge/ps862x.c b/drivers/video/bridge/ps862x.c
index 52e7d697ec..8399c6f74c 100644
--- a/drivers/video/bridge/ps862x.c
+++ b/drivers/video/bridge/ps862x.c
@@ -10,6 +10,7 @@
 #include <i2c.h>
 #include <log.h>
 #include <video_bridge.h>
+#include <linux/delay.h>
 #include <power/regulator.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/video/bridge/video-bridge-uclass.c b/drivers/video/bridge/video-bridge-uclass.c
index bd6635ecf5..389b02cdcb 100644
--- a/drivers/video/bridge/video-bridge-uclass.c
+++ b/drivers/video/bridge/video-bridge-uclass.c
@@ -10,6 +10,7 @@
 #include <edid.h>
 #include <log.h>
 #include <video_bridge.h>
+#include <linux/delay.h>
 
 int video_bridge_set_backlight(struct udevice *dev, int percent)
 {
diff --git a/drivers/video/broadwell_igd.c b/drivers/video/broadwell_igd.c
index fafde7df4b..8e8fe9d9b3 100644
--- a/drivers/video/broadwell_igd.c
+++ b/drivers/video/broadwell_igd.c
@@ -20,6 +20,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/iomap.h>
 #include <asm/arch/pch.h>
+#include <linux/delay.h>
 #include "i915_reg.h"
 
 struct broadwell_igd_priv {
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
index c21da6ea06..4984dda847 100644
--- a/drivers/video/da8xx-fb.c
+++ b/drivers/video/da8xx-fb.c
@@ -17,6 +17,7 @@
 #include <malloc.h>
 #include <memalign.h>
 #include <video_fb.h>
+#include <linux/delay.h>
 #include <linux/list.h>
 #include <linux/fb.h>
 
diff --git a/drivers/video/dw_hdmi.c b/drivers/video/dw_hdmi.c
index daf0024c64..c4fbb18294 100644
--- a/drivers/video/dw_hdmi.c
+++ b/drivers/video/dw_hdmi.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <i2c.h>
 #include <media_bus_format.h>
+#include <linux/delay.h>
 #include "dw_hdmi.h"
 
 struct tmds_n_cts {
diff --git a/drivers/video/dw_mipi_dsi.c b/drivers/video/dw_mipi_dsi.c
index 5dd75e7ec8..e8a3af7e60 100644
--- a/drivers/video/dw_mipi_dsi.c
+++ b/drivers/video/dw_mipi_dsi.c
@@ -20,6 +20,7 @@
 #include <asm/arch/gpio.h>
 #include <dm/device-internal.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 #include <linux/iopoll.h>
 #include <video_bridge.h>
 
diff --git a/drivers/video/exynos/exynos_dp.c b/drivers/video/exynos/exynos_dp.c
index c20d3c1346..749bde862e 100644
--- a/drivers/video/exynos/exynos_dp.c
+++ b/drivers/video/exynos/exynos_dp.c
@@ -11,6 +11,7 @@
 #include <display.h>
 #include <fdtdec.h>
 #include <log.h>
+#include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <malloc.h>
 #include <video_bridge.h>
diff --git a/drivers/video/exynos/exynos_dp_lowlevel.c b/drivers/video/exynos/exynos_dp_lowlevel.c
index b835b5c383..ae500a7028 100644
--- a/drivers/video/exynos/exynos_dp_lowlevel.c
+++ b/drivers/video/exynos/exynos_dp_lowlevel.c
@@ -8,6 +8,7 @@
 #include <config.h>
 #include <common.h>
 #include <log.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/dp_info.h>
diff --git a/drivers/video/exynos/exynos_mipi_dsi_common.c b/drivers/video/exynos/exynos_mipi_dsi_common.c
index 48edb9c55f..ab7d61afc8 100644
--- a/drivers/video/exynos/exynos_mipi_dsi_common.c
+++ b/drivers/video/exynos/exynos_mipi_dsi_common.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <lcd.h>
 #include <log.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #include <asm/arch/dsim.h>
 #include <asm/arch/mipi_dsim.h>
diff --git a/drivers/video/exynos/exynos_mipi_dsi_lowlevel.c b/drivers/video/exynos/exynos_mipi_dsi_lowlevel.c
index 1b6e71dfaf..8111acd9a0 100644
--- a/drivers/video/exynos/exynos_mipi_dsi_lowlevel.c
+++ b/drivers/video/exynos/exynos_mipi_dsi_lowlevel.c
@@ -11,6 +11,7 @@
 #include <asm/arch/mipi_dsim.h>
 #include <asm/arch/power.h>
 #include <asm/arch/cpu.h>
+#include <linux/delay.h>
 
 #include "exynos_mipi_dsi_lowlevel.h"
 #include "exynos_mipi_dsi_common.h"
diff --git a/drivers/video/formike.c b/drivers/video/formike.c
index 1e2febd796..5cbe50d4cb 100644
--- a/drivers/video/formike.c
+++ b/drivers/video/formike.c
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <log.h>
 #include <spi.h>
+#include <linux/delay.h>
 
 #define TAG_READ	0x80
 #define TAG_WRITE	0x00
diff --git a/drivers/video/hitachi_tx18d42vm_lcd.c b/drivers/video/hitachi_tx18d42vm_lcd.c
index a57abd23f7..c6c8df6a96 100644
--- a/drivers/video/hitachi_tx18d42vm_lcd.c
+++ b/drivers/video/hitachi_tx18d42vm_lcd.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <malloc.h>
+#include <linux/delay.h>
 
 #include <asm/gpio.h>
 #include <errno.h>
diff --git a/drivers/video/imx/ipu_common.c b/drivers/video/imx/ipu_common.c
index 0f24de9bf8..5908b23acc 100644
--- a/drivers/video/imx/ipu_common.c
+++ b/drivers/video/imx/ipu_common.c
@@ -13,6 +13,7 @@
 /* #define DEBUG */
 #include <common.h>
 #include <log.h>
+#include <linux/delay.h>
 #include <linux/types.h>
 #include <linux/err.h>
 #include <asm/io.h>
diff --git a/drivers/video/imx/ipu_disp.c b/drivers/video/imx/ipu_disp.c
index 2274976c6c..c2f00bff18 100644
--- a/drivers/video/imx/ipu_disp.c
+++ b/drivers/video/imx/ipu_disp.c
@@ -14,6 +14,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <linux/delay.h>
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <asm/io.h>
diff --git a/drivers/video/ivybridge_igd.c b/drivers/video/ivybridge_igd.c
index 1881423091..4c57e311d1 100644
--- a/drivers/video/ivybridge_igd.c
+++ b/drivers/video/ivybridge_igd.c
@@ -17,6 +17,7 @@
 #include <asm/pci.h>
 #include <asm/arch/pch.h>
 #include <asm/arch/sandybridge.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/video/ld9040.c b/drivers/video/ld9040.c
index 93aea05ff8..a36bc2f06c 100644
--- a/drivers/video/ld9040.c
+++ b/drivers/video/ld9040.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <spi.h>
+#include <linux/delay.h>
 
 static const unsigned char SEQ_USER_SETTING[] = {
 	0xF0, 0x5A, 0x5A
diff --git a/drivers/video/lg4573.c b/drivers/video/lg4573.c
index 8b458e28dc..45df9c1347 100644
--- a/drivers/video/lg4573.c
+++ b/drivers/video/lg4573.c
@@ -15,6 +15,7 @@
 #include <errno.h>
 #include <spi.h>
 #include <asm/gpio.h>
+#include <linux/delay.h>
 
 #define PWR_ON_DELAY_MSECS  120
 
diff --git a/drivers/video/logicore_dp_tx.c b/drivers/video/logicore_dp_tx.c
index 84fafe4341..9bc4bbb85d 100644
--- a/drivers/video/logicore_dp_tx.c
+++ b/drivers/video/logicore_dp_tx.c
@@ -14,6 +14,7 @@
 #include <display.h>
 #include <dm.h>
 #include <errno.h>
+#include <linux/delay.h>
 
 #include "axi.h"
 #include "logicore_dp_dpcd.h"
diff --git a/drivers/video/mali_dp.c b/drivers/video/mali_dp.c
index 87a75a9ca2..1e6da0e1e2 100644
--- a/drivers/video/mali_dp.c
+++ b/drivers/video/mali_dp.c
@@ -18,6 +18,7 @@
 #include <fdt_support.h>
 #include <clk.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 #include <linux/sizes.h>
 
 #define MALIDP_CORE_ID		0x0018
diff --git a/drivers/video/mb862xx.c b/drivers/video/mb862xx.c
index a3a7a8dd98..04e435f913 100644
--- a/drivers/video/mb862xx.c
+++ b/drivers/video/mb862xx.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <linux/delay.h>
 
 #include <asm/io.h>
 #include <env.h>
diff --git a/drivers/video/mvebu_lcd.c b/drivers/video/mvebu_lcd.c
index d5ed8d0096..f3cb2bfb48 100644
--- a/drivers/video/mvebu_lcd.c
+++ b/drivers/video/mvebu_lcd.c
@@ -11,6 +11,7 @@
 #include <video.h>
 #include <asm/cache.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 #include <linux/mbus.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
diff --git a/drivers/video/mx3fb.c b/drivers/video/mx3fb.c
index 4b8712fb69..9b42ca8d03 100644
--- a/drivers/video/mx3fb.c
+++ b/drivers/video/mx3fb.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <video_fb.h>
+#include <linux/delay.h>
 
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index 0235731c5c..6589a2a09d 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <asm/cache.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <malloc.h>
 #include <video.h>
diff --git a/drivers/video/orisetech_otm8009a.c b/drivers/video/orisetech_otm8009a.c
index 650ed07239..b1f2dd403e 100644
--- a/drivers/video/orisetech_otm8009a.c
+++ b/drivers/video/orisetech_otm8009a.c
@@ -14,6 +14,7 @@
 #include <panel.h>
 #include <asm/gpio.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 #include <power/regulator.h>
 
 #define OTM8009A_BACKLIGHT_DEFAULT	240
diff --git a/drivers/video/pwm_backlight.c b/drivers/video/pwm_backlight.c
index 149fbaef06..468a5703bd 100644
--- a/drivers/video/pwm_backlight.c
+++ b/drivers/video/pwm_backlight.c
@@ -13,6 +13,7 @@
 #include <malloc.h>
 #include <pwm.h>
 #include <asm/gpio.h>
+#include <linux/delay.h>
 #include <power/regulator.h>
 
 /**
diff --git a/drivers/video/raydium-rm68200.c b/drivers/video/raydium-rm68200.c
index 853dbc52d6..9169280fb8 100644
--- a/drivers/video/raydium-rm68200.c
+++ b/drivers/video/raydium-rm68200.c
@@ -14,6 +14,7 @@
 #include <panel.h>
 #include <asm/gpio.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 #include <power/regulator.h>
 
 /*** Manufacturer Command Set ***/
diff --git a/drivers/video/rockchip/rk3288_vop.c b/drivers/video/rockchip/rk3288_vop.c
index 0f91dab1f2..25ef25b870 100644
--- a/drivers/video/rockchip/rk3288_vop.c
+++ b/drivers/video/rockchip/rk3288_vop.c
@@ -15,6 +15,7 @@
 #include <asm/arch-rockchip/clock.h>
 #include <asm/arch-rockchip/grf_rk3288.h>
 #include <asm/arch-rockchip/hardware.h>
+#include <linux/delay.h>
 #include "rk_vop.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/video/rockchip/rk_edp.c b/drivers/video/rockchip/rk_edp.c
index 49ed5aaae6..92188be927 100644
--- a/drivers/video/rockchip/rk_edp.c
+++ b/drivers/video/rockchip/rk_edp.c
@@ -21,6 +21,7 @@
 #include <asm/arch-rockchip/grf_rk3288.h>
 #include <asm/arch-rockchip/hardware.h>
 #include <dt-bindings/clock/rk3288-cru.h>
+#include <linux/delay.h>
 
 #define MAX_CR_LOOP 5
 #define MAX_EQ_LOOP 5
diff --git a/drivers/video/s6e8ax0.c b/drivers/video/s6e8ax0.c
index 9c7b5f6ab3..497258f3de 100644
--- a/drivers/video/s6e8ax0.c
+++ b/drivers/video/s6e8ax0.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <asm/arch/mipi_dsim.h>
+#include <linux/delay.h>
 
 #include "exynos/exynos_mipi_dsi_lowlevel.h"
 #include "exynos/exynos_mipi_dsi_common.h"
diff --git a/drivers/video/scf0403_lcd.c b/drivers/video/scf0403_lcd.c
index 60075a6cf3..54f0f88b4c 100644
--- a/drivers/video/scf0403_lcd.c
+++ b/drivers/video/scf0403_lcd.c
@@ -17,6 +17,7 @@
 #include <malloc.h>
 #include <asm/gpio.h>
 #include <spi.h>
+#include <linux/delay.h>
 
 struct scf0403_cmd {
 	u16 cmd;
diff --git a/drivers/video/ssd2828.c b/drivers/video/ssd2828.c
index 83566bc6d6..4cdcbe7755 100644
--- a/drivers/video/ssd2828.c
+++ b/drivers/video/ssd2828.c
@@ -14,6 +14,7 @@
 #include <mipi_display.h>
 #include <asm/arch/gpio.h>
 #include <asm/gpio.h>
+#include <linux/delay.h>
 
 #include "videomodes.h"
 #include "ssd2828.h"
diff --git a/drivers/video/sunxi/lcdc.c b/drivers/video/sunxi/lcdc.c
index e8da302303..73033c3b85 100644
--- a/drivers/video/sunxi/lcdc.c
+++ b/drivers/video/sunxi/lcdc.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <linux/delay.h>
 
 #include <asm/arch/clock.h>
 #include <asm/arch/lcdc.h>
diff --git a/drivers/video/sunxi/sunxi_display.c b/drivers/video/sunxi/sunxi_display.c
index 40ee009f62..6c340e4116 100644
--- a/drivers/video/sunxi/sunxi_display.c
+++ b/drivers/video/sunxi/sunxi_display.c
@@ -11,6 +11,7 @@
 #include <efi_loader.h>
 #include <init.h>
 #include <time.h>
+#include <linux/delay.h>
 
 #include <asm/arch/clock.h>
 #include <asm/arch/display.h>
diff --git a/drivers/video/sunxi/sunxi_dw_hdmi.c b/drivers/video/sunxi/sunxi_dw_hdmi.c
index 546b863b64..cf2d6a772b 100644
--- a/drivers/video/sunxi/sunxi_dw_hdmi.c
+++ b/drivers/video/sunxi/sunxi_dw_hdmi.c
@@ -15,6 +15,7 @@
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/lcdc.h>
+#include <linux/delay.h>
 
 struct sunxi_dw_hdmi_priv {
 	struct dw_hdmi hdmi;
diff --git a/drivers/video/tda19988.c b/drivers/video/tda19988.c
index 01ed6193ea..4223d5f789 100644
--- a/drivers/video/tda19988.c
+++ b/drivers/video/tda19988.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <display.h>
 #include <i2c.h>
+#include <linux/delay.h>
 
 /*
  * TDA19988 uses paged registers. We encode the page# in the upper
diff --git a/drivers/video/tegra124/display.c b/drivers/video/tegra124/display.c
index 0aa9541101..6c27932263 100644
--- a/drivers/video/tegra124/display.c
+++ b/drivers/video/tegra124/display.c
@@ -22,6 +22,7 @@
 #include <asm/arch/pwm.h>
 #include <asm/arch-tegra/dc.h>
 #include <dm/uclass-internal.h>
+#include <linux/delay.h>
 #include "displayport.h"
 
 /* return in 1000ths of a Hertz */
diff --git a/drivers/video/tegra124/dp.c b/drivers/video/tegra124/dp.c
index e90210b695..59758eb936 100644
--- a/drivers/video/tegra124/dp.c
+++ b/drivers/video/tegra124/dp.c
@@ -13,6 +13,7 @@
 #include <video_bridge.h>
 #include <asm/io.h>
 #include <asm/arch-tegra/dc.h>
+#include <linux/delay.h>
 #include "display.h"
 #include "edid.h"
 #include "sor.h"
diff --git a/drivers/video/tegra124/sor.c b/drivers/video/tegra124/sor.c
index 0d35a3eb62..49f33c15b5 100644
--- a/drivers/video/tegra124/sor.c
+++ b/drivers/video/tegra124/sor.c
@@ -14,6 +14,7 @@
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch-tegra/dc.h>
+#include <linux/delay.h>
 #include "displayport.h"
 #include "sor.h"
 #include <linux/err.h>
diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c
index 64430f3b19..2e5bbade00 100644
--- a/drivers/virtio/virtio_pci_modern.c
+++ b/drivers/virtio/virtio_pci_modern.c
@@ -15,6 +15,7 @@
 #include <dm/device.h>
 #include <linux/bug.h>
 #include <linux/compat.h>
+#include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/io.h>
 #include "virtio_pci.h"
diff --git a/drivers/w1/mxc_w1.c b/drivers/w1/mxc_w1.c
index 08715c6a66..1881a3b1f1 100644
--- a/drivers/w1/mxc_w1.c
+++ b/drivers/w1/mxc_w1.c
@@ -21,6 +21,7 @@
 #include <common.h>
 #include <dm.h>
 #include <dm/device_compat.h>
+#include <linux/delay.h>
 #include <linux/io.h>
 #include <w1.h>
 
diff --git a/drivers/w1/w1-gpio.c b/drivers/w1/w1-gpio.c
index 90821cf73b..45ad47a5d6 100644
--- a/drivers/w1/w1-gpio.c
+++ b/drivers/w1/w1-gpio.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <log.h>
 #include <w1.h>
+#include <linux/delay.h>
 
 #include <asm/gpio.h>
 
diff --git a/examples/api/libgenwrap.c b/examples/api/libgenwrap.c
index 51d6273a93..3aa222866f 100644
--- a/examples/api/libgenwrap.c
+++ b/examples/api/libgenwrap.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <command.h>
 #include <hang.h>
+#include <linux/delay.h>
 #include <linux/types.h>
 #include <api_public.h>
 
diff --git a/examples/standalone/atmel_df_pow2.c b/examples/standalone/atmel_df_pow2.c
index b71b406126..9c74f4994b 100644
--- a/examples/standalone/atmel_df_pow2.c
+++ b/examples/standalone/atmel_df_pow2.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <exports.h>
 #include <spi.h>
+#include <linux/delay.h>
 
 #define CMD_ID    0x9f
 #define CMD_STAT  0xd7
diff --git a/examples/standalone/smc91111_eeprom.c b/examples/standalone/smc91111_eeprom.c
index 631b1b04d6..bf7e930643 100644
--- a/examples/standalone/smc91111_eeprom.c
+++ b/examples/standalone/smc91111_eeprom.c
@@ -12,6 +12,7 @@
 
 #include <common.h>
 #include <exports.h>
+#include <linux/delay.h>
 #include "../drivers/net/smc91111.h"
 
 #ifndef SMC91111_EEPROM_INIT
diff --git a/include/common.h b/include/common.h
index 552cb298a2..f7c0f5724a 100644
--- a/include/common.h
+++ b/include/common.h
@@ -17,7 +17,6 @@
 #include <errno.h>
 #include <time.h>
 #include <linux/bitops.h>
-#include <linux/delay.h>
 #include <linux/types.h>
 #include <linux/printk.h>
 #include <linux/string.h>
diff --git a/include/configs/MPC8560ADS.h b/include/configs/MPC8560ADS.h
index 866049febf..97d8cc48ed 100644
--- a/include/configs/MPC8560ADS.h
+++ b/include/configs/MPC8560ADS.h
@@ -17,6 +17,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <linux/delay.h>
+
 /* High Level Configuration Options */
 #define CONFIG_CPM2		1	/* has CPM2 */
 
diff --git a/include/configs/km/km_arm.h b/include/configs/km/km_arm.h
index 4e833faa87..79edfa728a 100644
--- a/include/configs/km/km_arm.h
+++ b/include/configs/km/km_arm.h
@@ -104,6 +104,7 @@
 
 #ifndef __ASSEMBLY__
 #include <asm/arch/gpio.h>
+#include <linux/delay.h>
 #include <linux/stringify.h>
 extern void __set_direction(unsigned pin, int high);
 void set_sda(int state);
diff --git a/include/exports.h b/include/exports.h
index 85f9a7a708..b300554091 100644
--- a/include/exports.h
+++ b/include/exports.h
@@ -2,6 +2,7 @@
 #define __EXPORTS_H__
 
 #include <irq_func.h>
+#include <linux/delay.h>
 
 #ifndef __ASSEMBLY__
 #ifdef CONFIG_PHY_AQUANTIA
diff --git a/include/regmap.h b/include/regmap.h
index 9ada1af5ef..30183c5e71 100644
--- a/include/regmap.h
+++ b/include/regmap.h
@@ -7,6 +7,8 @@
 #ifndef __REGMAP_H
 #define __REGMAP_H
 
+#include <linux/delay.h>
+
 /**
  * DOC: Overview
  *
diff --git a/include/xyzModem.h b/include/xyzModem.h
index 6fae634961..a8911b6bf5 100644
--- a/include/xyzModem.h
+++ b/include/xyzModem.h
@@ -25,6 +25,8 @@
 #ifndef _XYZMODEM_H_
 #define _XYZMODEM_H_
 
+#include <linux/delay.h>
+
 #define xyzModem_xmodem 1
 #define xyzModem_ymodem 2
 /* Don't define this until the protocol support is in place */
diff --git a/lib/panic.c b/lib/panic.c
index 8e72c265a6..58382ac4f4 100644
--- a/lib/panic.c
+++ b/lib/panic.c
@@ -14,6 +14,7 @@
 #if !defined(CONFIG_PANIC_HANG)
 #include <command.h>
 #endif
+#include <linux/delay.h>
 
 static void panic_finish(void) __attribute__ ((noreturn));
 
diff --git a/lib/time.c b/lib/time.c
index 551698e36d..65db0f6cda 100644
--- a/lib/time.c
+++ b/lib/time.c
@@ -14,6 +14,7 @@
 #include <watchdog.h>
 #include <div64.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 #ifndef CONFIG_WD_PERIOD
 # define CONFIG_WD_PERIOD	(10 * 1000 * 1000)	/* 10 seconds default */
diff --git a/net/arp.c b/net/arp.c
index b72b1fd737..1d06ed2572 100644
--- a/net/arp.c
+++ b/net/arp.c
@@ -13,6 +13,7 @@
 #include <env.h>
 #include <log.h>
 #include <net.h>
+#include <linux/delay.h>
 
 #include "arp.h"
 
diff --git a/net/bootp.c b/net/bootp.c
index d1e8cb8815..de3dab4114 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -17,6 +17,7 @@
 #include <net.h>
 #include <rand.h>
 #include <uuid.h>
+#include <linux/delay.h>
 #include <net/tftp.h>
 #include "bootp.h"
 #ifdef CONFIG_LED_STATUS
diff --git a/test/time_ut.c b/test/time_ut.c
index 70a866b441..80b82dbfd8 100644
--- a/test/time_ut.c
+++ b/test/time_ut.c
@@ -8,6 +8,7 @@
 #include <command.h>
 #include <errno.h>
 #include <time.h>
+#include <linux/delay.h>
 
 static int test_get_timer(void)
 {
-- 
2.26.2.645.ge9eca65c58-goog

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH v3 21/22] Use __ASSEMBLY__ as the assembly macros
  2020-05-10 17:39 [PATCH v3 00/22] common: Further reduce the size of common.h Simon Glass
                   ` (19 preceding siblings ...)
  2020-05-10 17:40 ` [PATCH v3 20/22] common: Drop linux/delay.h from common header Simon Glass
@ 2020-05-10 17:40 ` Simon Glass
  2020-05-11  4:56   ` Masahiro Yamada
  2020-05-19 17:34   ` Tom Rini
  2020-05-10 17:40 ` [PATCH v3 22/22] common: Drop linux/bitops.h from common header Simon Glass
  2020-05-15 21:02 ` [PATCH v3 00/22] common: Further reduce the size of common.h Simon Glass
  22 siblings, 2 replies; 53+ messages in thread
From: Simon Glass @ 2020-05-10 17:40 UTC (permalink / raw)
  To: u-boot

Some places use __ASSEMBLER__ instead which does not work since the
Makefile does not define it. Fix them.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v3: None
Changes in v2:
- Add new patch to fix occurances of __ASSEMBLER__

 arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h     | 2 +-
 arch/arm/include/asm/arch-mx27/regs-rtc.h                  | 2 +-
 arch/arm/include/asm/arch-mx5/imx-regs.h                   | 2 +-
 arch/arm/include/asm/arch-mx6/imx-regs.h                   | 2 +-
 arch/arm/include/asm/arch-mx7/imx-regs.h                   | 2 +-
 arch/arm/include/asm/arch-s32v234/imx-regs.h               | 2 +-
 arch/arm/include/asm/arch-vf610/imx-regs.h                 | 2 +-
 arch/arm/mach-socfpga/include/mach/clock_manager.h         | 2 +-
 arch/arm/mach-socfpga/include/mach/clock_manager_arria10.h | 4 ++--
 arch/arm/mach-socfpga/include/mach/clock_manager_gen5.h    | 4 ++--
 arch/arm/mach-socfpga/include/mach/sdram_arria10.h         | 2 +-
 arch/arm/mach-stm32mp/include/mach/stm32.h                 | 2 +-
 arch/x86/include/asm/mtrr.h                                | 2 +-
 arch/x86/include/asm/sipi.h                                | 4 ++--
 include/atf_common.h                                       | 2 +-
 include/elf.h                                              | 4 ++--
 16 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h b/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h
index c2fbc23b11..baa9fa8529 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h
@@ -589,5 +589,5 @@ struct ccsr_serdes {
 	u8 res5[0x19fc - 0xa00];
 };
 
-#endif /*__ASSEMBLY__*/
+#endif /*__ASSEMBLY__ */
 #endif /* __ARCH_FSL_LSCH3_IMMAP_H_ */
diff --git a/arch/arm/include/asm/arch-mx27/regs-rtc.h b/arch/arm/include/asm/arch-mx27/regs-rtc.h
index d373ab1583..8434f4c1cb 100644
--- a/arch/arm/include/asm/arch-mx27/regs-rtc.h
+++ b/arch/arm/include/asm/arch-mx27/regs-rtc.h
@@ -21,6 +21,6 @@ struct rtc_regs {
 	u32 dayr;
 	u32 dayalarm;
 };
-#endif /* __ASSEMBLY__*/
+#endif /* __ASSEMBLY__ */
 
 #endif	/* __MX28_REGS_RTC_H__ */
diff --git a/arch/arm/include/asm/arch-mx5/imx-regs.h b/arch/arm/include/asm/arch-mx5/imx-regs.h
index fbb6e599b6..3d1cc68322 100644
--- a/arch/arm/include/asm/arch-mx5/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx5/imx-regs.h
@@ -557,6 +557,6 @@ struct pwm_regs {
 	u32	cnr;
 };
 
-#endif /* __ASSEMBLER__*/
+#endif /* __ASSEMBLY__ */
 
 #endif				/* __ASM_ARCH_MX5_IMX_REGS_H__ */
diff --git a/arch/arm/include/asm/arch-mx6/imx-regs.h b/arch/arm/include/asm/arch-mx6/imx-regs.h
index 4f01b20aed..5b41a7a4b8 100644
--- a/arch/arm/include/asm/arch-mx6/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx6/imx-regs.h
@@ -1003,5 +1003,5 @@ struct pwm_regs {
  */
 #define	is_boot_from_usb(void) (!(readl(USB_PHY0_BASE_ADDR) & (1<<20)))
 
-#endif /* __ASSEMBLER__*/
+#endif /* __ASSEMBLY__ */
 #endif /* __ASM_ARCH_MX6_IMX_REGS_H__ */
diff --git a/arch/arm/include/asm/arch-mx7/imx-regs.h b/arch/arm/include/asm/arch-mx7/imx-regs.h
index 6336514007..7b23abbc7e 100644
--- a/arch/arm/include/asm/arch-mx7/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx7/imx-regs.h
@@ -1223,5 +1223,5 @@ struct bootrom_sw_info {
 	u32 reserved_3[3];
 };
 
-#endif /* __ASSEMBLER__*/
+#endif /* __ASSEMBLY__ */
 #endif /* __ASM_ARCH_MX7_IMX_REGS_H__ */
diff --git a/arch/arm/include/asm/arch-s32v234/imx-regs.h b/arch/arm/include/asm/arch-s32v234/imx-regs.h
index 9a779cce96..1472a43f1b 100644
--- a/arch/arm/include/asm/arch-s32v234/imx-regs.h
+++ b/arch/arm/include/asm/arch-s32v234/imx-regs.h
@@ -323,6 +323,6 @@ struct mscm_ir {
 	u32 ipcie[4];		/* Interconnect Parity Checking Injection Enable Register       */
 };
 
-#endif /* __ASSEMBLER__ */
+#endif /* __ASSEMBLY__ */
 
 #endif /* __ASM_ARCH_IMX_REGS_H__ */
diff --git a/arch/arm/include/asm/arch-vf610/imx-regs.h b/arch/arm/include/asm/arch-vf610/imx-regs.h
index ae0a187c4d..03def8e3c5 100644
--- a/arch/arm/include/asm/arch-vf610/imx-regs.h
+++ b/arch/arm/include/asm/arch-vf610/imx-regs.h
@@ -474,6 +474,6 @@ struct mscm {
 	u32 cpxcfg3;
 };
 
-#endif	/* __ASSEMBLER__*/
+#endif	/* __ASSEMBLY__ */
 
 #endif	/* __ASM_ARCH_IMX_REGS_H__ */
diff --git a/arch/arm/mach-socfpga/include/mach/clock_manager.h b/arch/arm/mach-socfpga/include/mach/clock_manager.h
index c6830582a5..1f734bcd65 100644
--- a/arch/arm/mach-socfpga/include/mach/clock_manager.h
+++ b/arch/arm/mach-socfpga/include/mach/clock_manager.h
@@ -8,7 +8,7 @@
 
 phys_addr_t socfpga_get_clkmgr_addr(void);
 
-#ifndef __ASSEMBLER__
+#ifndef __ASSEMBLY__
 void cm_wait_for_lock(u32 mask);
 int cm_wait_for_fsm(void);
 void cm_print_clock_quick_summary(void);
diff --git a/arch/arm/mach-socfpga/include/mach/clock_manager_arria10.h b/arch/arm/mach-socfpga/include/mach/clock_manager_arria10.h
index 23f280df1b..8d62d75432 100644
--- a/arch/arm/mach-socfpga/include/mach/clock_manager_arria10.h
+++ b/arch/arm/mach-socfpga/include/mach/clock_manager_arria10.h
@@ -6,7 +6,7 @@
 #ifndef CLOCK_MANAGER_ARRIA10
 #define CLOCK_MANAGER_ARRIA10
 
-#ifndef __ASSEMBLER__
+#ifndef __ASSEMBLY__
 
 /* Clock manager group */
 #define CLKMGR_A10_CTRL				0x00
@@ -69,7 +69,7 @@ unsigned long cm_get_mpu_clk_hz(void);
 
 unsigned int cm_get_qspi_controller_clk_hz(void);
 
-#endif /* __ASSEMBLER__ */
+#endif /* __ASSEMBLY__ */
 
 #define LOCKED_MASK	(CLKMGR_CLKMGR_STAT_MAINPLLLOCKED_SET_MSK | \
 			 CLKMGR_CLKMGR_STAT_PERPLLLOCKED_SET_MSK)
diff --git a/arch/arm/mach-socfpga/include/mach/clock_manager_gen5.h b/arch/arm/mach-socfpga/include/mach/clock_manager_gen5.h
index 08655094ca..fc6d230156 100644
--- a/arch/arm/mach-socfpga/include/mach/clock_manager_gen5.h
+++ b/arch/arm/mach-socfpga/include/mach/clock_manager_gen5.h
@@ -6,7 +6,7 @@
 #ifndef _CLOCK_MANAGER_GEN5_H_
 #define _CLOCK_MANAGER_GEN5_H_
 
-#ifndef __ASSEMBLER__
+#ifndef __ASSEMBLY__
 
 struct cm_config {
 	/* main group */
@@ -107,7 +107,7 @@ const unsigned int cm_get_f2s_sdr_ref_clk_hz(void);
 /* Clock configuration accessors */
 int cm_basic_init(const struct cm_config * const cfg);
 const struct cm_config * const cm_get_default_config(void);
-#endif /* __ASSEMBLER__ */
+#endif /* __ASSEMBLY__ */
 
 #define LOCKED_MASK \
 	(CLKMGR_INTER_SDRPLLLOCKED_MASK  | \
diff --git a/arch/arm/mach-socfpga/include/mach/sdram_arria10.h b/arch/arm/mach-socfpga/include/mach/sdram_arria10.h
index 25b82fb285..f2773883fd 100644
--- a/arch/arm/mach-socfpga/include/mach/sdram_arria10.h
+++ b/arch/arm/mach-socfpga/include/mach/sdram_arria10.h
@@ -205,7 +205,7 @@ struct socfpga_io48_mmr {
 	u32 niosreserve2;
 };
 
-#endif /*__ASSEMBLY__*/
+#endif /*__ASSEMBLY__ */
 
 #define IO48_MMR_CTRLCFG0_DB2_BURST_LENGTH_MASK		0x1F000000
 #define IO48_MMR_CTRLCFG0_DB2_BURST_LENGTH_SHIFT	24
diff --git a/arch/arm/mach-stm32mp/include/mach/stm32.h b/arch/arm/mach-stm32mp/include/mach/stm32.h
index 76d593d785..f8ddb1cb57 100644
--- a/arch/arm/mach-stm32mp/include/mach/stm32.h
+++ b/arch/arm/mach-stm32mp/include/mach/stm32.h
@@ -130,5 +130,5 @@ enum forced_boot_mode {
 #define BSEC_OTP_MAC	57
 #define BSEC_OTP_BOARD	59
 
-#endif /* __ASSEMBLY__*/
+#endif /* __ASSEMBLY__ */
 #endif /* _MACH_STM32_H_ */
diff --git a/arch/x86/include/asm/mtrr.h b/arch/x86/include/asm/mtrr.h
index 672617256e..212a699c1b 100644
--- a/arch/x86/include/asm/mtrr.h
+++ b/arch/x86/include/asm/mtrr.h
@@ -57,7 +57,7 @@
 
 #define MTRR_FIX_TYPE(t)	((t << 24) | (t << 16) | (t << 8) | t)
 
-#if !defined(__ASSEMBLER__)
+#if !defined(__ASSEMBLY__)
 
 /**
  * Information about the previous MTRR state, set up by mtrr_open()
diff --git a/arch/x86/include/asm/sipi.h b/arch/x86/include/asm/sipi.h
index 1ab6c2874a..2483422528 100644
--- a/arch/x86/include/asm/sipi.h
+++ b/arch/x86/include/asm/sipi.h
@@ -10,7 +10,7 @@
 #define AP_DEFAULT_BASE 0x30000
 #define AP_DEFAULT_SIZE 0x10000
 
-#ifndef __ASSEMBLER__
+#ifndef __ASSEMBLY__
 
 /**
  * struct sipi_params_16bit - 16-bit SIPI entry-point parameters
@@ -81,6 +81,6 @@ void ap_start(void);
 extern char sipi_params_16bit[];
 extern char sipi_params[];
 
-#endif /* __ASSEMBLER__ */
+#endif /* __ASSEMBLY__ */
 
 #endif
diff --git a/include/atf_common.h b/include/atf_common.h
index 3a7d40e5f0..fd5454c55b 100644
--- a/include/atf_common.h
+++ b/include/atf_common.h
@@ -177,6 +177,6 @@ struct bl2_to_bl31_params_mem {
 	struct entry_point_info bl31_ep_info;
 };
 
-#endif /*__ASSEMBLY__*/
+#endif /*__ASSEMBLY__ */
 
 #endif /* __BL_COMMON_H__ */
diff --git a/include/elf.h b/include/elf.h
index e7c51986df..b04e746d61 100644
--- a/include/elf.h
+++ b/include/elf.h
@@ -9,7 +9,7 @@
 #ifndef _ELF_H
 #define _ELF_H
 
-#ifndef __ASSEMBLER__
+#ifndef __ASSEMBLY__
 #include "compiler.h"
 
 /* This version doesn't work for 64-bit ABIs - Erik */
@@ -690,7 +690,7 @@ unsigned long elf_hash(const unsigned char *name);
 #define R_RISCV_64		2
 #define R_RISCV_RELATIVE	3
 
-#ifndef __ASSEMBLER__
+#ifndef __ASSEMBLY__
 int valid_elf_image(unsigned long addr);
 unsigned long load_elf64_image_phdr(unsigned long addr);
 unsigned long load_elf64_image_shdr(unsigned long addr);
-- 
2.26.2.645.ge9eca65c58-goog

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH v3 22/22] common: Drop linux/bitops.h from common header
  2020-05-10 17:39 [PATCH v3 00/22] common: Further reduce the size of common.h Simon Glass
                   ` (20 preceding siblings ...)
  2020-05-10 17:40 ` [PATCH v3 21/22] Use __ASSEMBLY__ as the assembly macros Simon Glass
@ 2020-05-10 17:40 ` Simon Glass
  2020-05-19 17:34   ` Tom Rini
  2020-05-15 21:02 ` [PATCH v3 00/22] common: Further reduce the size of common.h Simon Glass
  22 siblings, 1 reply; 53+ messages in thread
From: Simon Glass @ 2020-05-10 17:40 UTC (permalink / raw)
  To: u-boot

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v3:
- Rebase to master
- Addition fix for xilinx_zynqmp_mini etc.

Changes in v2: None

 arch/arc/include/asm/arcregs.h                         |  2 ++
 arch/arc/lib/cache.c                                   |  1 +
 arch/arc/lib/cpu.c                                     |  1 +
 arch/arm/cpu/armv7/mpu_v7r.c                           |  1 +
 arch/arm/cpu/armv7m/cache.c                            |  1 +
 arch/arm/cpu/armv7m/systick-timer.c                    |  1 +
 arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c   |  1 +
 arch/arm/cpu/armv8/generic_timer.c                     |  1 +
 arch/arm/cpu/armv8/hisilicon/pinmux.c                  |  1 +
 arch/arm/cpu/armv8/s32v234/cpu.c                       |  1 +
 arch/arm/include/asm/arch-am33xx/cpu.h                 |  1 +
 arch/arm/include/asm/arch-am33xx/hardware_am43xx.h     |  4 ++++
 arch/arm/include/asm/arch-fsl-layerscape/config.h      |  4 ++++
 arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h |  3 +++
 arch/arm/include/asm/arch-hi3660/hi3660.h              |  4 ++++
 arch/arm/include/asm/arch-imx8/iomux.h                 |  4 ++++
 arch/arm/include/asm/arch-imx8m/clock_imx8mm.h         |  4 ++++
 arch/arm/include/asm/arch-imx8m/clock_imx8mq.h         |  4 ++++
 arch/arm/include/asm/arch-meson/axg.h                  |  4 ++++
 arch/arm/include/asm/arch-meson/g12a.h                 |  4 ++++
 arch/arm/include/asm/arch-meson/gx.h                   |  4 ++++
 arch/arm/include/asm/arch-meson/sd_emmc.h              |  4 ++++
 arch/arm/include/asm/arch-mx6/imx-regs.h               |  1 +
 arch/arm/include/asm/arch-mx7/imx-regs.h               |  1 +
 arch/arm/include/asm/arch-mx7/mx7-ddr.h                |  4 ++++
 arch/arm/include/asm/arch-rockchip/cru.h               |  4 ++++
 arch/arm/include/asm/arch-rockchip/cru_rk3128.h        |  4 ++++
 arch/arm/include/asm/arch-rockchip/cru_rk3368.h        |  4 ++++
 arch/arm/include/asm/arch-rockchip/cru_rv1108.h        |  4 ++++
 arch/arm/include/asm/arch-rockchip/ddr_rk3368.h        |  4 ++++
 arch/arm/include/asm/arch-rockchip/grf_rk3368.h        |  4 ++++
 arch/arm/include/asm/arch-rockchip/lvds_rk3288.h       |  4 ++++
 arch/arm/include/asm/arch-rockchip/sdram_pctl_px30.h   |  4 ++++
 arch/arm/include/asm/arch-rockchip/sdram_phy_px30.h    |  4 ++++
 arch/arm/include/asm/arch-rockchip/sdram_rk322x.h      |  4 ++++
 arch/arm/include/asm/arch-rockchip/sdram_rk3399.h      |  3 +++
 arch/arm/include/asm/arch-stih410/sdhci.h              |  4 ++++
 arch/arm/include/asm/arch-stm32f4/stm32_pwr.h          |  5 +++++
 arch/arm/include/asm/arch-stm32f7/stm32_pwr.h          |  5 +++++
 arch/arm/include/asm/arch-stm32f7/syscfg.h             |  4 ++++
 arch/arm/include/asm/arch-sunxi/ccu.h                  |  4 ++++
 arch/arm/include/asm/arch-sunxi/clock_sun50i_h6.h      |  4 ++++
 arch/arm/include/asm/arch-sunxi/clock_sun9i.h          |  4 ++++
 arch/arm/include/asm/arch-sunxi/dram_sun50i_h6.h       |  3 +++
 arch/arm/include/asm/arch-sunxi/dram_sun6i.h           |  4 ++++
 arch/arm/include/asm/arch-sunxi/dram_sun8i_a33.h       |  4 ++++
 arch/arm/include/asm/arch-sunxi/dram_sun8i_a83t.h      |  4 ++++
 arch/arm/include/asm/arch-sunxi/dram_sun9i.h           |  4 ++++
 arch/arm/include/asm/arch-sunxi/pwm.h                  |  4 ++++
 arch/arm/include/asm/arch-tegra/dc.h                   |  4 ++++
 arch/arm/include/asm/arch-tegra/pmc.h                  |  4 ++++
 arch/arm/include/asm/arch-tegra124/flow.h              |  4 ++++
 arch/arm/include/asm/arch-vf610/imx-regs.h             |  1 +
 arch/arm/include/asm/armv7_mpu.h                       |  4 ++++
 arch/arm/include/asm/bitops.h                          | 10 ++++++----
 arch/arm/include/asm/gic-v3.h                          |  4 ++++
 arch/arm/include/asm/omap_mmc.h                        |  3 +++
 arch/arm/include/asm/psci.h                            |  1 +
 arch/arm/include/asm/ti-common/keystone_net.h          |  3 +++
 arch/arm/include/asm/ti-common/omap_wdt.h              |  4 ++++
 arch/arm/include/asm/ti-common/ti-edma3.h              |  3 +++
 arch/arm/lib/gic-v3-its.c                              |  1 +
 arch/arm/lib/image.c                                   |  1 +
 arch/arm/mach-at91/include/mach/at91_pmc.h             |  1 +
 arch/arm/mach-at91/include/mach/at91_sfr.h             |  1 +
 arch/arm/mach-at91/include/mach/atmel_pio4.h           |  1 +
 arch/arm/mach-exynos/include/mach/clock.h              |  1 +
 arch/arm/mach-imx/imx8m/clock_imx8mm.c                 |  1 +
 arch/arm/mach-imx/imx8m/soc.c                          |  1 +
 arch/arm/mach-imx/imxrt/soc.c                          |  1 +
 arch/arm/mach-imx/mx7ulp/soc.c                         |  1 +
 arch/arm/mach-k3/include/mach/am6_hardware.h           |  3 +++
 arch/arm/mach-k3/include/mach/j721e_hardware.h         |  3 +++
 arch/arm/mach-k3/include/mach/j721e_spl.h              |  1 +
 arch/arm/mach-keystone/clock.c                         |  1 +
 arch/arm/mach-keystone/include/mach/clock_defs.h       |  3 +++
 arch/arm/mach-keystone/include/mach/hardware-k2hk.h    |  4 ++++
 arch/arm/mach-keystone/include/mach/hardware-k2l.h     |  4 ++++
 arch/arm/mach-keystone/include/mach/hardware.h         |  1 +
 arch/arm/mach-keystone/include/mach/xhci-keystone.h    |  4 ++++
 arch/arm/mach-keystone/init.c                          |  1 +
 arch/arm/mach-mediatek/mt7629/init.c                   |  1 +
 arch/arm/mach-meson/board-info.c                       |  1 +
 arch/arm/mach-meson/sm.c                               |  1 +
 arch/arm/mach-mvebu/armada3700/cpu.c                   |  1 +
 arch/arm/mach-mvebu/cpu.c                              |  1 +
 arch/arm/mach-mvebu/efuse.c                            |  1 +
 arch/arm/mach-mvebu/include/mach/soc.h                 |  4 ++++
 arch/arm/mach-mvebu/mbus.c                             |  1 +
 arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c             |  1 +
 arch/arm/mach-mvebu/timer.c                            |  1 +
 arch/arm/mach-omap2/abb.c                              |  1 +
 arch/arm/mach-omap2/am33xx/clock_ti816x.c              |  1 +
 arch/arm/mach-omap2/omap5/abb.c                        |  1 +
 arch/arm/mach-omap2/pipe3-phy.c                        |  1 +
 arch/arm/mach-rmobile/include/mach/rcar-gen3-base.h    |  1 +
 arch/arm/mach-rmobile/include/mach/sh_sdhi.h           |  1 +
 arch/arm/mach-rockchip/rk3308/rk3308.c                 |  1 +
 arch/arm/mach-rockchip/rk3368/rk3368.c                 |  1 +
 arch/arm/mach-rockchip/rk3399/rk3399.c                 |  1 +
 arch/arm/mach-rockchip/spl.c                           |  1 +
 arch/arm/mach-rockchip/tpl.c                           |  1 +
 arch/arm/mach-snapdragon/pinctrl-snapdragon.c          |  1 +
 .../mach-socfpga/include/mach/clock_manager_arria10.h  |  3 +++
 .../arm/mach-socfpga/include/mach/clock_manager_gen5.h |  3 +++
 arch/arm/mach-socfpga/include/mach/clock_manager_s10.h |  1 +
 arch/arm/mach-socfpga/include/mach/firewall.h          |  2 ++
 .../mach-socfpga/include/mach/fpga_manager_arria10.h   |  1 +
 arch/arm/mach-socfpga/include/mach/fpga_manager_gen5.h |  1 +
 arch/arm/mach-socfpga/include/mach/mailbox_s10.h       |  1 +
 .../mach-socfpga/include/mach/reset_manager_arria10.h  |  1 +
 arch/arm/mach-socfpga/include/mach/sdram_arria10.h     |  1 +
 arch/arm/mach-socfpga/include/mach/system_manager.h    |  1 +
 .../mach-socfpga/include/mach/system_manager_soc64.h   |  1 +
 arch/arm/mach-socfpga/misc_gen5.c                      |  1 +
 arch/arm/mach-socfpga/reset_manager_gen5.c             |  1 +
 arch/arm/mach-socfpga/spl_gen5.c                       |  1 +
 arch/arm/mach-stm32mp/cpu.c                            |  1 +
 arch/arm/mach-stm32mp/include/mach/stm32.h             |  4 ++++
 arch/arm/mach-stm32mp/psci.c                           |  1 +
 arch/arm/mach-stm32mp/pwr_regulator.c                  |  1 +
 arch/arm/mach-sunxi/clock_sun6i.c                      |  1 +
 arch/arm/mach-sunxi/spl_spi_sunxi.c                    |  1 +
 arch/arm/mach-tegra/tegra210/clock.c                   |  1 +
 arch/arm/mach-uniphier/boot-device/boot-device-pxs3.c  |  1 +
 arch/arm/mach-uniphier/boot-device/boot-device.c       |  1 +
 arch/arm/mach-uniphier/dram/ddrphy-regs.h              |  1 +
 arch/arm/mach-uniphier/dram/umc-pxs2.c                 |  1 +
 arch/arm/mach-uniphier/init.h                          |  1 +
 arch/arm/mach-versal/include/mach/hardware.h           |  4 ++++
 arch/arm/mach-zynqmp/include/mach/hardware.h           |  4 ++++
 arch/mips/include/asm/cm.h                             |  1 +
 arch/mips/include/asm/mipsregs.h                       |  1 +
 arch/mips/lib/reloc.c                                  |  1 +
 arch/mips/mach-ath79/ar933x/ddr.c                      |  1 +
 arch/mips/mach-ath79/ar934x/clk.c                      |  1 +
 arch/mips/mach-ath79/ar934x/ddr.c                      |  1 +
 arch/mips/mach-ath79/qca953x/ddr.c                     |  1 +
 arch/mips/mach-ath79/reset.c                           |  1 +
 arch/mips/mach-jz47xx/include/mach/jz4780_dram.h       |  1 +
 arch/mips/mach-jz47xx/jz4780/gpio.c                    |  1 +
 arch/mips/mach-jz47xx/jz4780/pll.c                     |  1 +
 arch/mips/mach-jz47xx/jz4780/reset.c                   |  1 +
 arch/mips/mach-jz47xx/jz4780/sdram.c                   |  1 +
 arch/mips/mach-jz47xx/jz4780/timer.c                   |  1 +
 arch/mips/mach-mscc/cpu.c                              |  1 +
 arch/mips/mach-mscc/gpio.c                             |  1 +
 arch/mips/mach-mscc/include/mach/ddr.h                 |  1 +
 arch/mips/mach-mscc/include/mach/jr2/jr2_devcpu_gcb.h  |  2 ++
 .../include/mach/jr2/jr2_devcpu_gcb_miim_regs.h        |  2 ++
 arch/mips/mach-mscc/include/mach/jr2/jr2_icpu_cfg.h    |  2 ++
 .../mach-mscc/include/mach/luton/luton_devcpu_gcb.h    |  1 +
 .../include/mach/luton/luton_devcpu_gcb_miim_regs.h    |  1 +
 .../mips/mach-mscc/include/mach/luton/luton_icpu_cfg.h |  1 +
 .../mach-mscc/include/mach/ocelot/ocelot_devcpu_gcb.h  |  1 +
 .../include/mach/ocelot/ocelot_devcpu_gcb_miim_regs.h  |  1 +
 .../mach-mscc/include/mach/ocelot/ocelot_icpu_cfg.h    |  1 +
 .../mach-mscc/include/mach/serval/serval_devcpu_gcb.h  |  1 +
 .../include/mach/serval/serval_devcpu_gcb_miim_regs.h  |  1 +
 .../mach-mscc/include/mach/serval/serval_icpu_cfg.h    |  1 +
 .../include/mach/servalt/servalt_devcpu_gcb.h          |  1 +
 .../mach/servalt/servalt_devcpu_gcb_miim_regs.h        |  1 +
 .../mach-mscc/include/mach/servalt/servalt_icpu_cfg.h  |  1 +
 arch/mips/mach-mscc/include/mach/tlb.h                 |  1 +
 arch/mips/mach-mtmips/cpu.c                            |  1 +
 arch/mips/mach-mtmips/ddr_calibrate.c                  |  1 +
 arch/nios2/cpu/cpu.c                                   |  1 +
 arch/powerpc/cpu/mpc83xx/pci.c                         |  1 +
 arch/powerpc/cpu/mpc83xx/spd_sdram.c                   |  1 +
 arch/powerpc/cpu/mpc85xx/pci.c                         |  1 +
 arch/powerpc/cpu/mpc85xx/tlb.c                         |  1 +
 arch/powerpc/cpu/mpc8xxx/fsl_pamu.c                    |  1 +
 arch/powerpc/cpu/mpc8xxx/law.c                         |  1 +
 arch/powerpc/include/asm/mmu.h                         |  1 +
 arch/powerpc/include/asm/u-boot.h                      |  2 ++
 arch/riscv/cpu/cpu.c                                   |  1 +
 arch/riscv/include/asm/encoding.h                      |  3 +++
 arch/sh/lib/time.c                                     |  1 +
 arch/x86/cpu/apollolake/fsp_s.c                        |  1 +
 arch/x86/cpu/apollolake/pmc.c                          |  1 +
 arch/x86/cpu/baytrail/valleyview.c                     |  1 +
 arch/x86/cpu/intel_common/lpc.c                        |  1 +
 arch/x86/cpu/intel_common/p2sb.c                       |  1 +
 arch/x86/cpu/ivybridge/bd82x6x.c                       |  1 +
 arch/x86/include/asm/arch-apollolake/lpc.h             |  1 +
 arch/x86/include/asm/arch-apollolake/systemagent.h     |  1 +
 arch/x86/include/asm/arch-broadwell/adsp.h             |  1 +
 arch/x86/include/asm/arch-broadwell/serialio.h         |  1 +
 arch/x86/include/asm/atomic.h                          |  1 +
 arch/x86/include/asm/fast_spi.h                        |  1 +
 arch/x86/include/asm/intel_pinctrl.h                   |  1 +
 arch/x86/include/asm/msr-index.h                       |  4 ++++
 arch/x86/lib/scu.c                                     |  1 +
 board/CZ.NIC/turris_mox/mox_sp.c                       |  1 +
 board/CZ.NIC/turris_omnia/turris_omnia.c               |  1 +
 board/Marvell/db-88f6281-bp/db-88f6281-bp.c            |  1 +
 board/Marvell/db-88f6720/db-88f6720.c                  |  1 +
 board/Marvell/db-88f6820-amc/db-88f6820-amc.c          |  1 +
 board/Marvell/db-88f6820-gp/db-88f6820-gp.c            |  1 +
 board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c            |  1 +
 board/Marvell/db-xc3-24g4xg/db-xc3-24g4xg.c            |  1 +
 board/Synology/ds414/ds414.c                           |  1 +
 board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c            |  1 +
 board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c        |  1 +
 board/alliedtelesis/x530/x530.c                        |  1 +
 board/cortina/presidio-asic/presidio.c                 |  1 +
 board/dhelectronics/dh_stm32mp1/board.c                |  1 +
 board/firefly/firefly-rk3308/roc_cc_rk3308.c           |  1 +
 board/freescale/imx8mq_evk/imx8mq_evk.c                |  1 +
 board/freescale/lx2160a/lx2160a.c                      |  1 +
 board/freescale/mpc8349emds/mpc8349emds.c              |  1 +
 board/freescale/mpc8349itx/mpc8349itx.c                |  1 +
 board/freescale/mpc837xemds/mpc837xemds.c              |  1 +
 board/freescale/mpc837xerdb/mpc837xerdb.c              |  1 +
 board/gdsys/a38x/ihs_phys.c                            |  1 +
 board/gdsys/common/cmd_ioloop.c                        |  1 +
 board/gdsys/common/ioep-fpga.c                         |  2 ++
 board/gdsys/mpc8308/hrcon.c                            |  1 +
 board/gdsys/mpc8308/strider.c                          |  1 +
 board/hisilicon/poplar/poplar.c                        |  1 +
 board/ids/ids8313/ids8313.c                            |  1 +
 board/imgtec/ci20/ci20.c                               |  1 +
 board/keymile/common/qrio.c                            |  1 +
 board/menlo/m53menlo/m53menlo.c                        |  1 +
 board/mikrotik/crs305-1g-4s/crs305-1g-4s.c             |  1 +
 board/mscc/common/spi.c                                |  1 +
 board/mscc/jr2/jr2.c                                   |  1 +
 board/mscc/ocelot/ocelot.c                             |  1 +
 board/netgear/dgnd3700v2/dgnd3700v2.c                  |  1 +
 board/nvidia/p2371-2180/p2371-2180.c                   |  1 +
 board/nvidia/p3450-0000/p3450-0000.c                   |  1 +
 board/phytec/pcm052/pcm052.c                           |  1 +
 board/phytec/phycore_rk3288/phycore-rk3288.c           |  1 +
 board/renesas/alt/alt.c                                |  1 +
 board/renesas/alt/alt_spl.c                            |  1 +
 board/renesas/blanche/blanche.c                        |  1 +
 board/renesas/draak/draak.c                            |  1 +
 board/renesas/gose/gose.c                              |  1 +
 board/renesas/gose/gose_spl.c                          |  1 +
 board/renesas/koelsch/koelsch.c                        |  1 +
 board/renesas/koelsch/koelsch_spl.c                    |  1 +
 board/renesas/lager/lager.c                            |  1 +
 board/renesas/lager/lager_spl.c                        |  1 +
 board/renesas/porter/porter.c                          |  1 +
 board/renesas/porter/porter_spl.c                      |  1 +
 board/renesas/rcar-common/gen3-spl.c                   |  1 +
 board/renesas/salvator-x/salvator-x.c                  |  1 +
 board/renesas/silk/silk.c                              |  1 +
 board/renesas/silk/silk_spl.c                          |  1 +
 board/renesas/stout/stout.c                            |  1 +
 board/renesas/stout/stout_spl.c                        |  1 +
 board/renesas/ulcb/ulcb.c                              |  1 +
 board/sbc8349/sbc8349.c                                |  1 +
 board/seeed/linkit-smart-7688/board.c                  |  1 +
 board/softing/vining_2000/vining_2000.c                |  1 +
 board/solidrun/clearfog/clearfog.c                     |  1 +
 board/st/stm32mp1/board.c                              |  1 +
 board/st/stm32mp1/stm32mp1.c                           |  1 +
 board/synopsys/emsdp/emsdp.c                           |  1 +
 board/synopsys/hsdk/clk-lib.h                          |  1 +
 board/synopsys/hsdk/hsdk.c                             |  1 +
 board/synopsys/iot_devkit/iot_devkit.c                 |  1 +
 board/ti/am335x/board.c                                |  1 +
 board/ti/common/board_detect.h                         |  1 +
 board/ti/ks2_evm/board_k2g.c                           |  1 +
 board/toradex/apalis_imx6/apalis_imx6.c                |  1 +
 board/toradex/colibri_imx6/colibri_imx6.c              |  1 +
 board/tplink/wdr4300/wdr4300.c                         |  1 +
 board/xilinx/zynq/cmds.c                               |  1 +
 board/xilinx/zynqmp/zynqmp.c                           |  1 +
 cmd/mem.c                                              |  1 +
 cmd/nvedit.c                                           |  1 +
 common/image-cipher.c                                  |  2 +-
 drivers/adc/meson-saradc.c                             |  1 +
 drivers/adc/rockchip-saradc.c                          |  1 +
 drivers/adc/stm32-adc-core.c                           |  1 +
 drivers/adc/stm32-adc.c                                |  1 +
 drivers/ata/ahci.c                                     |  1 +
 drivers/ata/sata_mv.c                                  |  1 +
 drivers/axi/ihs_axi.c                                  |  1 +
 drivers/cache/cache-v5l2.c                             |  1 +
 drivers/clk/altera/clk-agilex.c                        |  1 +
 drivers/clk/altera/clk-agilex.h                        |  4 ++++
 drivers/clk/altera/clk-arria10.c                       |  1 +
 drivers/clk/at91/clk-system.c                          |  1 +
 drivers/clk/clk-cdce9xx.c                              |  1 +
 drivers/clk/clk-gate.c                                 |  1 +
 drivers/clk/clk-hsdk-cgu.c                             |  1 +
 drivers/clk/clk-mux.c                                  |  1 +
 drivers/clk/clk_bcm6345.c                              |  1 +
 drivers/clk/clk_boston.c                               |  1 +
 drivers/clk/clk_pic32.c                                |  1 +
 drivers/clk/clk_sandbox_ccf.c                          |  1 +
 drivers/clk/clk_stm32f.c                               |  1 +
 drivers/clk/clk_stm32h7.c                              |  1 +
 drivers/clk/clk_stm32mp1.c                             |  1 +
 drivers/clk/clk_vexpress_osc.c                         |  1 +
 drivers/clk/imx/clk-pll14xx.c                          |  1 +
 drivers/clk/mediatek/clk-mt7622.c                      |  1 +
 drivers/clk/mediatek/clk-mt7623.c                      |  1 +
 drivers/clk/mediatek/clk-mt7629.c                      |  1 +
 drivers/clk/mediatek/clk-mt8512.c                      |  1 +
 drivers/clk/mediatek/clk-mt8516.c                      |  1 +
 drivers/clk/mediatek/clk-mt8518.c                      |  1 +
 drivers/clk/mediatek/clk-mtk.c                         |  1 +
 drivers/clk/mediatek/clk-mtk.h                         |  1 +
 drivers/clk/meson/axg.c                                |  1 +
 drivers/clk/meson/clk_meson.h                          |  1 +
 drivers/clk/meson/g12a.c                               |  1 +
 drivers/clk/meson/gxbb.c                               |  1 +
 drivers/clk/mpc83xx_clk.c                              |  1 +
 drivers/clk/mpc83xx_clk.h                              |  1 +
 drivers/clk/mvebu/armada-37xx-periph.c                 |  1 +
 drivers/clk/owl/clk_owl.c                              |  1 +
 drivers/clk/owl/clk_owl.h                              |  3 +++
 drivers/clk/renesas/clk-rcar-gen3.c                    |  1 +
 drivers/clk/renesas/r8a7790-cpg-mssr.c                 |  1 +
 drivers/clk/renesas/r8a7791-cpg-mssr.c                 |  1 +
 drivers/clk/renesas/r8a7792-cpg-mssr.c                 |  1 +
 drivers/clk/renesas/r8a7794-cpg-mssr.c                 |  1 +
 drivers/clk/renesas/r8a7795-cpg-mssr.c                 |  1 +
 drivers/clk/renesas/r8a7796-cpg-mssr.c                 |  1 +
 drivers/clk/renesas/r8a77965-cpg-mssr.c                |  1 +
 drivers/clk/renesas/r8a77970-cpg-mssr.c                |  1 +
 drivers/clk/renesas/r8a77980-cpg-mssr.c                |  1 +
 drivers/clk/renesas/r8a77990-cpg-mssr.c                |  1 +
 drivers/clk/renesas/r8a77995-cpg-mssr.c                |  1 +
 drivers/clk/renesas/renesas-cpg-mssr.c                 |  1 +
 drivers/clk/renesas/renesas-cpg-mssr.h                 |  1 +
 drivers/clk/rockchip/clk_px30.c                        |  1 +
 drivers/clk/rockchip/clk_rk322x.c                      |  1 +
 drivers/clk/rockchip/clk_rk3288.c                      |  1 +
 drivers/clk/rockchip/clk_rk3308.c                      |  1 +
 drivers/clk/rockchip/clk_rk3328.c                      |  1 +
 drivers/clk/rockchip/clk_rk3399.c                      |  1 +
 drivers/clk/sunxi/clk_a10.c                            |  1 +
 drivers/clk/sunxi/clk_a10s.c                           |  1 +
 drivers/clk/sunxi/clk_a23.c                            |  1 +
 drivers/clk/sunxi/clk_a31.c                            |  1 +
 drivers/clk/sunxi/clk_a64.c                            |  1 +
 drivers/clk/sunxi/clk_a80.c                            |  1 +
 drivers/clk/sunxi/clk_a83t.c                           |  1 +
 drivers/clk/sunxi/clk_h3.c                             |  1 +
 drivers/clk/sunxi/clk_h6.c                             |  1 +
 drivers/clk/sunxi/clk_r40.c                            |  1 +
 drivers/clk/sunxi/clk_sunxi.c                          |  1 +
 drivers/clk/sunxi/clk_v3s.c                            |  1 +
 drivers/cpu/bmips_cpu.c                                |  1 +
 drivers/cpu/imx8_cpu.c                                 |  1 +
 drivers/cpu/mpc83xx_cpu.c                              |  1 +
 drivers/cpu/riscv_cpu.c                                |  1 +
 drivers/ddr/altera/sdram_arria10.c                     |  1 +
 drivers/ddr/altera/sdram_gen5.c                        |  1 +
 drivers/ddr/fsl/ctrl_regs.c                            |  1 +
 drivers/ddr/fsl/ddr1_dimm_params.c                     |  1 +
 drivers/ddr/fsl/ddr2_dimm_params.c                     |  1 +
 drivers/ddr/fsl/interactive.c                          |  1 +
 drivers/ddr/fsl/lc_common_dimm_params.c                |  1 +
 drivers/ddr/fsl/main.c                                 |  1 +
 drivers/dma/bcm6348-iudma.c                            |  1 +
 drivers/dma/lpc32xx_dma.c                              |  1 +
 drivers/dma/ti/k3-udma-hwdef.h                         |  1 +
 drivers/dma/ti/k3-udma.c                               |  1 +
 drivers/firmware/ti_sci.c                              |  1 +
 drivers/firmware/ti_sci.h                              |  1 +
 drivers/fpga/socfpga_arria10.c                         |  1 +
 drivers/fpga/zynqmppl.c                                |  1 +
 drivers/gpio/atmel_pio4.c                              |  1 +
 drivers/gpio/bcm6345_gpio.c                            |  1 +
 drivers/gpio/cortina_gpio.c                            |  1 +
 drivers/gpio/dwapb_gpio.c                              |  1 +
 drivers/gpio/gpio-rcar.c                               |  1 +
 drivers/gpio/gpio-rza1.c                               |  1 +
 drivers/gpio/hi6220_gpio.c                             |  1 +
 drivers/gpio/hsdk-creg-gpio.c                          |  1 +
 drivers/gpio/mscc_sgpio.c                              |  1 +
 drivers/gpio/mt7621_gpio.c                             |  1 +
 drivers/gpio/mvebu_gpio.c                              |  1 +
 drivers/gpio/mxs_gpio.c                                |  1 +
 drivers/gpio/pca953x_gpio.c                            |  1 +
 drivers/gpio/pcf8575_gpio.c                            |  1 +
 drivers/gpio/pic32_gpio.c                              |  1 +
 drivers/gpio/sh_pfc.c                                  |  1 +
 drivers/gpio/sifive-gpio.c                             |  1 +
 drivers/gpio/stm32_gpio.c                              |  1 +
 drivers/gpio/tegra186_gpio_priv.h                      |  1 +
 drivers/gpio/zynq_gpio.c                               |  1 +
 drivers/hwspinlock/stm32_hwspinlock.c                  |  1 +
 drivers/i2c/at91_i2c.h                                 |  1 +
 drivers/i2c/designware_i2c.h                           |  1 +
 drivers/i2c/i2c-cdns.c                                 |  1 +
 drivers/i2c/i2c-versatile.c                            |  1 +
 drivers/i2c/ihs_i2c.c                                  |  1 +
 drivers/i2c/meson_i2c.c                                |  1 +
 drivers/i2c/rcar_i2c.c                                 |  1 +
 drivers/i2c/rcar_iic.c                                 |  1 +
 drivers/i2c/stm32f7_i2c.c                              |  1 +
 drivers/i2c/tegra186_bpmp_i2c.c                        |  1 +
 drivers/led/led_bcm6858.c                              |  1 +
 drivers/mailbox/stm32-ipcc.c                           |  1 +
 drivers/mailbox/tegra-hsp.c                            |  1 +
 drivers/misc/esm_pmic.c                                |  1 +
 drivers/misc/gdsys_ioep.h                              |  1 +
 drivers/misc/ihs_fpga.c                                |  1 +
 drivers/misc/imx8/scu.c                                |  1 +
 drivers/misc/jz4780_efuse.c                            |  1 +
 drivers/misc/k3_avs.c                                  |  1 +
 drivers/misc/k3_esm.c                                  |  1 +
 drivers/misc/mpc83xx_serdes.h                          |  1 +
 drivers/misc/tegra186_bpmp.c                           |  1 +
 drivers/misc/vexpress_config.c                         |  1 +
 drivers/mmc/am654_sdhci.c                              |  1 +
 drivers/mmc/bcm2835_sdhost.c                           |  1 +
 drivers/mmc/fsl_esdhc.c                                |  1 +
 drivers/mmc/fsl_esdhc_imx.c                            |  1 +
 drivers/mmc/ftsdc010_mci.c                             |  1 +
 drivers/mmc/jz_mmc.c                                   |  1 +
 drivers/mmc/mmc.c                                      |  1 +
 drivers/mmc/mmc_spi.c                                  |  1 +
 drivers/mmc/mxsmmc.c                                   |  1 +
 drivers/mmc/omap_hsmmc.c                               |  1 +
 drivers/mmc/renesas-sdhi.c                             |  1 +
 drivers/mmc/sdhci-cadence.c                            |  1 +
 drivers/mmc/sdhci.c                                    |  1 +
 drivers/mmc/sh_mmcif.c                                 |  1 +
 drivers/mmc/sh_sdhi.c                                  |  1 +
 drivers/mmc/stm32_sdmmc2.c                             |  2 ++
 drivers/mmc/tegra_mmc.c                                |  1 +
 drivers/mmc/tmio-common.h                              |  1 +
 drivers/mmc/xenon_sdhci.c                              |  1 +
 drivers/mtd/altera_qspi.c                              |  1 +
 drivers/mtd/mtdcore.c                                  |  1 +
 drivers/mtd/nand/bbt.c                                 |  1 +
 drivers/mtd/nand/core.c                                |  1 +
 drivers/mtd/nand/raw/atmel_nand.c                      |  1 +
 drivers/mtd/nand/raw/brcmnand/bcm63158_nand.c          |  1 +
 drivers/mtd/nand/raw/brcmnand/bcm6368_nand.c           |  1 +
 drivers/mtd/nand/raw/brcmnand/bcm68360_nand.c          |  1 +
 drivers/mtd/nand/raw/brcmnand/bcm6838_nand.c           |  1 +
 drivers/mtd/nand/raw/brcmnand/bcm6858_nand.c           |  1 +
 drivers/mtd/nand/raw/brcmnand/brcmnand.c               |  1 +
 drivers/mtd/nand/raw/denali.c                          |  1 +
 drivers/mtd/nand/raw/mxs_nand_spl.c                    |  1 +
 drivers/mtd/nand/raw/nand_base.c                       |  1 +
 drivers/mtd/nand/raw/pxa3xx_nand.c                     |  1 +
 drivers/mtd/nand/raw/stm32_fmc2_nand.c                 |  1 +
 drivers/mtd/nand/raw/sunxi_nand.c                      |  1 +
 drivers/mtd/nand/raw/sunxi_nand_spl.c                  |  1 +
 drivers/mtd/nand/spi/core.c                            |  1 +
 drivers/mtd/nand/spi/micron.c                          |  1 +
 drivers/mtd/nand/spi/winbond.c                         |  1 +
 drivers/mtd/onenand/onenand_base.c                     |  1 +
 drivers/mtd/onenand/onenand_spl.c                      |  1 +
 drivers/mtd/pic32_flash.c                              |  1 +
 drivers/mtd/renesas_rpc_hf.c                           |  1 +
 drivers/mtd/spi/sf_internal.h                          |  1 +
 drivers/mtd/spi/spi-nor-core.c                         |  1 +
 drivers/mtd/ubispl/ubispl.c                            |  1 +
 drivers/net/ag7xxx.c                                   |  1 +
 drivers/net/altera_tse.h                               |  1 +
 drivers/net/bcm-sf2-eth-gmac.c                         |  1 +
 drivers/net/bcmgenet.c                                 |  1 +
 drivers/net/dc2114x.c                                  |  1 +
 drivers/net/dwc_eth_qos.c                              |  1 +
 drivers/net/fsl_enetc.h                                |  1 +
 drivers/net/ftgmac100.c                                |  1 +
 drivers/net/ftgmac100.h                                |  1 +
 drivers/net/gmac_rockchip.c                            |  1 +
 drivers/net/higmacv300.c                               |  1 +
 drivers/net/mscc_eswitch/jr2_switch.c                  |  1 +
 drivers/net/mscc_eswitch/luton_switch.c                |  1 +
 drivers/net/mscc_eswitch/mscc_mac_table.c              |  1 +
 drivers/net/mscc_eswitch/mscc_miim.c                   |  1 +
 drivers/net/mscc_eswitch/mscc_xfer.c                   |  1 +
 drivers/net/mscc_eswitch/ocelot_switch.c               |  1 +
 drivers/net/mscc_eswitch/serval_switch.c               |  1 +
 drivers/net/mscc_eswitch/servalt_switch.c              |  1 +
 drivers/net/mt7628-eth.c                               |  1 +
 drivers/net/mtk_eth.h                                  |  1 +
 drivers/net/mvmdio.c                                   |  1 +
 drivers/net/mvneta.c                                   |  1 +
 drivers/net/mvpp2.c                                    |  1 +
 drivers/net/pfe_eth/pfe_firmware.c                     |  1 +
 drivers/net/pfe_eth/pfe_hw.c                           |  1 +
 drivers/net/phy/aquantia.c                             |  1 +
 drivers/net/phy/atheros.c                              |  1 +
 drivers/net/phy/b53.c                                  |  1 +
 drivers/net/phy/dp83867.c                              |  1 +
 drivers/net/phy/marvell.c                              |  1 +
 drivers/net/phy/micrel_ksz8xxx.c                       |  1 +
 drivers/net/phy/mscc.c                                 |  1 +
 drivers/net/phy/mv88e61xx.c                            |  1 +
 drivers/net/phy/phy.c                                  |  1 +
 drivers/net/pic32_eth.h                                |  1 +
 drivers/net/ravb.c                                     |  1 +
 drivers/net/rtl8139.c                                  |  1 +
 drivers/net/sni_ave.c                                  |  1 +
 drivers/net/sun8i_emac.c                               |  1 +
 drivers/net/ti/am65-cpsw-nuss.c                        |  1 +
 drivers/net/ti/cpsw.c                                  |  1 +
 drivers/net/ti/cpsw_mdio.c                             |  1 +
 drivers/net/tsec.c                                     |  1 +
 drivers/net/zynq_gem.c                                 |  1 +
 drivers/pci/pci-aardvark.c                             |  1 +
 drivers/pci/pci-rcar-gen2.c                            |  1 +
 drivers/pci/pci-rcar-gen3.c                            |  1 +
 drivers/pci/pci_mpc85xx.c                              |  1 +
 drivers/pci/pci_mvebu.c                                |  1 +
 drivers/pci/pci_sh7751.c                               |  1 +
 drivers/pci/pcie_dw_ti.c                               |  1 +
 drivers/pci/pcie_intel_fpga.c                          |  1 +
 drivers/pci/pcie_layerscape_gen4.h                     |  1 +
 drivers/pci/pcie_mediatek.c                            |  1 +
 drivers/pci/pcie_xilinx.c                              |  1 +
 drivers/pci_endpoint/pcie-cadence.h                    |  1 +
 drivers/phy/allwinner/phy-sun4i-usb.c                  |  1 +
 drivers/phy/bcm6318-usbh-phy.c                         |  1 +
 drivers/phy/bcm6348-usbh-phy.c                         |  1 +
 drivers/phy/bcm6358-usbh-phy.c                         |  1 +
 drivers/phy/bcm6368-usbh-phy.c                         |  1 +
 drivers/phy/keystone-usb-phy.c                         |  1 +
 drivers/phy/msm8916-usbh-phy.c                         |  1 +
 drivers/phy/omap-usb2-phy.c                            |  1 +
 drivers/phy/phy-mtk-tphy.c                             |  1 +
 drivers/phy/phy-ti-am654.c                             |  1 +
 drivers/phy/ti-pipe3-phy.c                             |  1 +
 drivers/pinctrl/mediatek/pinctrl-mtk-common.c          |  1 +
 drivers/pinctrl/meson/pinctrl-meson-gx-pmx.c           |  1 +
 drivers/pinctrl/meson/pinctrl-meson.c                  |  1 +
 drivers/pinctrl/mscc/mscc-common.c                     |  1 +
 drivers/pinctrl/mvebu/pinctrl-armada-37xx.c            |  1 +
 drivers/pinctrl/mvebu/pinctrl-mvebu.c                  |  1 +
 drivers/pinctrl/nxp/pinctrl-imx.c                      |  1 +
 drivers/pinctrl/pinctrl-at91-pio4.c                    |  1 +
 drivers/pinctrl/pinctrl-at91.c                         |  1 +
 drivers/pinctrl/pinctrl-sandbox.c                      |  1 +
 drivers/pinctrl/pinctrl-stmfx.c                        |  1 +
 drivers/pinctrl/pinctrl_pic32.c                        |  1 +
 drivers/pinctrl/pinctrl_stm32.c                        |  1 +
 drivers/pinctrl/renesas/pfc-r7s72100.c                 |  1 +
 drivers/pinctrl/renesas/pfc-r8a77990.c                 |  1 +
 drivers/pinctrl/renesas/pfc.c                          |  1 +
 drivers/pinctrl/rockchip/pinctrl-px30.c                |  1 +
 drivers/pinctrl/rockchip/pinctrl-rk3036.c              |  1 +
 drivers/pinctrl/rockchip/pinctrl-rk3128.c              |  1 +
 drivers/pinctrl/rockchip/pinctrl-rk322x.c              |  1 +
 drivers/pinctrl/rockchip/pinctrl-rk3288.c              |  1 +
 drivers/pinctrl/rockchip/pinctrl-rk3308.c              |  1 +
 drivers/pinctrl/rockchip/pinctrl-rk3328.c              |  1 +
 drivers/pinctrl/rockchip/pinctrl-rk3399.c              |  1 +
 drivers/pinctrl/rockchip/pinctrl-rockchip-core.c       |  1 +
 drivers/pinctrl/rockchip/pinctrl-rockchip.h            |  1 +
 drivers/pinctrl/rockchip/pinctrl-rv1108.c              |  1 +
 drivers/pinctrl/uniphier/pinctrl-uniphier-core.c       |  1 +
 drivers/power/domain/bcm6328-power-domain.c            |  1 +
 drivers/power/domain/meson-ee-pwrc.c                   |  1 +
 drivers/power/domain/meson-gx-pwrc-vpu.c               |  1 +
 drivers/power/domain/mtk-power-domain.c                |  1 +
 drivers/power/domain/tegra186-power-domain.c           |  1 +
 drivers/power/regulator/bd71837.c                      |  1 +
 drivers/power/regulator/da9063.c                       |  1 +
 drivers/power/regulator/fan53555.c                     |  1 +
 drivers/power/regulator/stm32-vrefbuf.c                |  1 +
 drivers/pwm/rk_pwm.c                                   |  1 +
 drivers/ram/imxrt_sdram.c                              |  1 +
 drivers/ram/k3-am654-ddrss.h                           |  1 +
 drivers/ram/mediatek/ddr3-mt7629.c                     |  1 +
 drivers/ram/mpc83xx_sdram.c                            |  1 +
 drivers/ram/rockchip/dmc-rk3368.c                      |  1 +
 drivers/ram/stm32_sdram.c                              |  1 +
 drivers/ram/stm32mp1/stm32mp1_ddr.c                    |  1 +
 drivers/ram/stm32mp1/stm32mp1_ddr_regs.h               |  1 +
 drivers/reset/reset-bcm6345.c                          |  1 +
 drivers/reset/reset-hisilicon.c                        |  1 +
 drivers/reset/reset-hsdk.c                             |  1 +
 drivers/reset/reset-imx7.c                             |  1 +
 drivers/reset/reset-mediatek.c                         |  1 +
 drivers/reset/reset-meson.c                            |  1 +
 drivers/reset/reset-mtmips.c                           |  1 +
 drivers/reset/reset-rockchip.c                         |  1 +
 drivers/reset/reset-sunxi.c                            |  1 +
 drivers/reset/sti-reset.c                              |  1 +
 drivers/reset/stm32-reset.c                            |  1 +
 drivers/rng/rockchip_rng.c                             |  1 +
 drivers/rng/stm32mp1_rng.c                             |  1 +
 drivers/rtc/ds3232.c                                   |  1 +
 drivers/rtc/rv3029.c                                   |  1 +
 drivers/rtc/rv8803.c                                   |  1 +
 drivers/rtc/rx8010sj.c                                 |  1 +
 drivers/rtc/stm32_rtc.c                                |  1 +
 drivers/serial/altera_jtag_uart.c                      |  1 +
 drivers/serial/altera_uart.c                           |  1 +
 drivers/serial/serial_ar933x.c                         |  1 +
 drivers/serial/serial_bcm283x_mu.c                     |  1 +
 drivers/serial/serial_cortina.c                        |  1 +
 drivers/serial/serial_lpuart.c                         |  1 +
 drivers/serial/serial_meson.c                          |  1 +
 drivers/serial/serial_owl.c                            |  1 +
 drivers/serial/serial_pic32.c                          |  1 +
 drivers/serial/serial_sti_asc.c                        |  1 +
 drivers/serial/serial_stm32.c                          |  1 +
 drivers/serial/serial_stm32.h                          |  1 +
 drivers/serial/serial_xuartlite.c                      |  1 +
 drivers/serial/serial_zynq.c                           |  1 +
 drivers/soc/ti/k3-navss-ringacc.c                      |  1 +
 drivers/soc/ti/keystone_serdes.c                       |  1 +
 drivers/sound/hda_codec.c                              |  1 +
 drivers/sound/ivybridge_sound.c                        |  1 +
 drivers/sound/max98088.h                               |  1 +
 drivers/sound/rockchip_i2s.c                           |  1 +
 drivers/spi/altera_spi.c                               |  1 +
 drivers/spi/atmel-quadspi.c                            |  1 +
 drivers/spi/atmel_spi.h                                |  1 +
 drivers/spi/bcm63xx_hsspi.c                            |  1 +
 drivers/spi/cadence_qspi_apb.c                         |  1 +
 drivers/spi/davinci_spi.c                              |  1 +
 drivers/spi/designware_spi.c                           |  1 +
 drivers/spi/fsl_dspi.c                                 |  1 +
 drivers/spi/fsl_espi.c                                 |  1 +
 drivers/spi/fsl_qspi.c                                 |  1 +
 drivers/spi/ich.c                                      |  1 +
 drivers/spi/ich.h                                      |  1 +
 drivers/spi/meson_spifc.c                              |  1 +
 drivers/spi/mpc8xxx_spi.c                              |  1 +
 drivers/spi/mscc_bb_spi.c                              |  1 +
 drivers/spi/mt7621_spi.c                               |  1 +
 drivers/spi/mvebu_a3700_spi.c                          |  1 +
 drivers/spi/mxc_spi.c                                  |  1 +
 drivers/spi/mxs_spi.c                                  |  1 +
 drivers/spi/nxp_fspi.c                                 |  1 +
 drivers/spi/omap3_spi.c                                |  1 +
 drivers/spi/pic32_spi.c                                |  1 +
 drivers/spi/renesas_rpc_spi.c                          |  1 +
 drivers/spi/sh_qspi.c                                  |  1 +
 drivers/spi/soft_spi.c                                 |  1 +
 drivers/spi/spi-sifive.c                               |  1 +
 drivers/spi/spi-sunxi.c                                |  1 +
 drivers/spi/stm32_qspi.c                               |  1 +
 drivers/spi/stm32_spi.c                                |  1 +
 drivers/spi/tegra114_spi.c                             |  1 +
 drivers/spi/tegra20_sflash.c                           |  1 +
 drivers/spi/tegra20_slink.c                            |  1 +
 drivers/spi/tegra210_qspi.c                            |  1 +
 drivers/spi/ti_qspi.c                                  |  1 +
 drivers/spi/uniphier_spi.c                             |  1 +
 drivers/spi/xilinx_spi.c                               |  1 +
 drivers/spi/zynq_qspi.c                                |  1 +
 drivers/spi/zynq_spi.c                                 |  1 +
 drivers/spi/zynqmp_gqspi.c                             |  1 +
 drivers/sysreset/sysreset_socfpga.c                    |  1 +
 drivers/sysreset/sysreset_sti.c                        |  1 +
 drivers/timer/altera_timer.c                           |  1 +
 drivers/timer/atmel_pit_timer.c                        |  1 +
 drivers/timer/cadence-ttc.c                            |  1 +
 drivers/timer/mpc83xx_timer.c                          |  1 +
 drivers/timer/mtk_timer.c                              |  1 +
 drivers/timer/nomadik-mtu-timer.c                      |  1 +
 drivers/timer/omap-timer.c                             |  1 +
 drivers/timer/ostm_timer.c                             |  1 +
 drivers/timer/stm32_timer.c                            |  1 +
 drivers/tpm/tpm2_tis_sandbox.c                         |  1 +
 drivers/tpm/tpm2_tis_spi.c                             |  1 +
 drivers/ufs/cdns-platform.c                            |  1 +
 drivers/ufs/ti-j721e-ufs.c                             |  1 +
 drivers/ufs/ufs.c                                      |  1 +
 drivers/usb/cdns3/cdns3-ti.c                           |  1 +
 drivers/usb/cdns3/drd.h                                |  1 +
 drivers/usb/cdns3/ep0.c                                |  1 +
 drivers/usb/cdns3/gadget.c                             |  1 +
 drivers/usb/cdns3/gadget.h                             |  1 +
 drivers/usb/dwc3/core.h                                |  1 +
 drivers/usb/dwc3/dwc3-generic.c                        |  1 +
 drivers/usb/dwc3/ti_usb_phy.c                          |  1 +
 drivers/usb/eth/lan75xx.c                              |  1 +
 drivers/usb/eth/lan78xx.c                              |  1 +
 drivers/usb/eth/lan7x.h                                |  1 +
 drivers/usb/eth/r8152.h                                |  1 +
 drivers/usb/eth/r8152_fw.c                             |  1 +
 drivers/usb/gadget/atmel_usba_udc.c                    |  1 +
 drivers/usb/gadget/dwc2_udc_otg_regs.h                 |  1 +
 drivers/usb/host/ehci.h                                |  1 +
 drivers/usb/host/r8a66597.h                            |  1 +
 drivers/usb/host/xhci-rcar.c                           |  1 +
 drivers/usb/host/xhci.c                                |  1 +
 drivers/usb/musb-new/musb_core.c                       |  1 +
 drivers/usb/musb-new/pic32.c                           |  1 +
 drivers/usb/musb-new/sunxi.c                           |  1 +
 drivers/usb/musb/musb_core.c                           |  1 +
 drivers/usb/phy/rockchip_usb2_phy.c                    |  1 +
 drivers/video/anx98xx-edp.h                            |  1 +
 drivers/video/dw_mipi_dsi.c                            |  1 +
 drivers/video/meson/meson_dw_hdmi.c                    |  1 +
 drivers/video/meson/meson_dw_hdmi.h                    |  1 +
 drivers/video/meson/meson_plane.c                      |  1 +
 drivers/video/meson/meson_registers.h                  |  1 +
 drivers/video/meson/meson_vclk.c                       |  1 +
 drivers/video/meson/meson_vpu_init.c                   |  1 +
 drivers/video/rockchip/rk_vop.c                        |  1 +
 drivers/video/stm32/stm32_dsi.c                        |  1 +
 drivers/video/stm32/stm32_ltdc.c                       |  1 +
 drivers/video/sunxi/sunxi_de2.c                        |  1 +
 drivers/video/sunxi/sunxi_dw_hdmi.c                    |  1 +
 drivers/video/tda19988.c                               |  1 +
 drivers/virtio/virtio_mmio.h                           |  1 +
 drivers/w1/mxc_w1.c                                    |  1 +
 drivers/watchdog/designware_wdt.c                      |  1 +
 drivers/watchdog/mt7621_wdt.c                          |  1 +
 drivers/watchdog/mtk_wdt.c                             |  1 +
 drivers/watchdog/orion_wdt.c                           |  1 +
 drivers/watchdog/stm32mp_wdt.c                         |  1 +
 env/env.c                                              |  1 +
 fs/ubifs/lpt_commit.c                                  |  1 +
 fs/ubifs/super.c                                       |  1 +
 fs/ubifs/tnc.c                                         |  1 +
 include/acpi/acpi_table.h                              |  2 ++
 include/asm-generic/gpio.h                             |  1 +
 include/bitfield.h                                     |  1 +
 include/common.h                                       |  1 -
 include/configs/gardena-smart-gateway-at91sam.h        |  4 ++++
 include/dma.h                                          |  1 +
 include/dwc3-sti-glue.h                                |  1 +
 include/dwmmc.h                                        |  1 +
 include/faraday/ftpci100.h                             |  1 +
 include/faraday/ftsdc010.h                             |  1 +
 include/faraday/ftsdmc021.h                            |  1 +
 include/fsl-mc/fsl_mc.h                                |  1 +
 include/linux/bitops.h                                 |  4 ++++
 include/linux/soc/ti/k3-navss-ringacc.h                |  1 +
 include/linux/soc/ti/ti_sci_protocol.h                 |  1 +
 include/mipi_dsi.h                                     |  1 +
 include/mmc.h                                          |  1 +
 include/net/pfe_eth/pfe/cbus/class_csr.h               |  1 +
 include/net/pfe_eth/pfe/cbus/emac.h                    |  1 +
 include/net/pfe_eth/pfe/cbus/hif.h                     |  1 +
 include/net/pfe_eth/pfe/cbus/tmu_csr.h                 |  1 +
 include/net/pfe_eth/pfe/pfe_hw.h                       |  1 +
 include/net/pfe_eth/pfe_eth.h                          |  1 +
 include/pch.h                                          |  1 +
 include/power/stpmic1.h                                |  1 +
 include/sdhci.h                                        |  1 +
 include/spi.h                                          |  1 +
 include/tee.h                                          |  1 +
 include/tpm-v1.h                                       |  1 +
 include/virtio.h                                       |  1 +
 include/vsc9953.h                                      |  1 +
 include/zynqmppl.h                                     |  1 +
 lib/div64.c                                            |  1 +
 lib/efi_loader/efi_variable.c                          |  1 +
 lib/tpm-v2.c                                           |  1 +
 749 files changed, 940 insertions(+), 6 deletions(-)

diff --git a/arch/arc/include/asm/arcregs.h b/arch/arc/include/asm/arcregs.h
index 516c14e105..a9f54f61e0 100644
--- a/arch/arc/include/asm/arcregs.h
+++ b/arch/arc/include/asm/arcregs.h
@@ -109,6 +109,8 @@
 #define ARC_AUX_SUBSYS_BUILD	0xF0
 
 #ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+
 /* Accessors for auxiliary registers */
 #define read_aux_reg(reg)	__builtin_arc_lr(reg)
 
diff --git a/arch/arc/lib/cache.c b/arch/arc/lib/cache.c
index 8a1d67870a..85651b219c 100644
--- a/arch/arc/lib/cache.c
+++ b/arch/arc/lib/cache.c
@@ -6,6 +6,7 @@
 #include <config.h>
 #include <common.h>
 #include <cpu_func.h>
+#include <linux/bitops.h>
 #include <linux/compiler.h>
 #include <linux/kernel.h>
 #include <linux/log2.h>
diff --git a/arch/arc/lib/cpu.c b/arch/arc/lib/cpu.c
index f032f3e2f2..27b5832a0c 100644
--- a/arch/arc/lib/cpu.c
+++ b/arch/arc/lib/cpu.c
@@ -9,6 +9,7 @@
 #include <vsprintf.h>
 #include <asm/arcregs.h>
 #include <asm/cache.h>
+#include <linux/bitops.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/cpu/armv7/mpu_v7r.c b/arch/arm/cpu/armv7/mpu_v7r.c
index 6deecfdc23..57ab640e26 100644
--- a/arch/arm/cpu/armv7/mpu_v7r.c
+++ b/arch/arm/cpu/armv7/mpu_v7r.c
@@ -12,6 +12,7 @@
 #include <asm/armv7.h>
 #include <asm/system.h>
 #include <asm/barriers.h>
+#include <linux/bitops.h>
 #include <linux/compiler.h>
 
 #include <asm/armv7_mpu.h>
diff --git a/arch/arm/cpu/armv7m/cache.c b/arch/arm/cpu/armv7m/cache.c
index 72fc34db1c..d1aecf6a85 100644
--- a/arch/arm/cpu/armv7m/cache.c
+++ b/arch/arm/cpu/armv7m/cache.c
@@ -11,6 +11,7 @@
 #include <asm/armv7m.h>
 #include <asm/cache.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 /* Cache maintenance operation registers */
 
diff --git a/arch/arm/cpu/armv7m/systick-timer.c b/arch/arm/cpu/armv7m/systick-timer.c
index dbe1b61977..d2672fd40c 100644
--- a/arch/arm/cpu/armv7m/systick-timer.c
+++ b/arch/arm/cpu/armv7m/systick-timer.c
@@ -25,6 +25,7 @@
 #include <init.h>
 #include <time.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c
index 3f1da43614..aa6fd6b28c 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c
@@ -8,6 +8,7 @@
 #include <env.h>
 #include <log.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/arch/fsl_serdes.h>
diff --git a/arch/arm/cpu/armv8/generic_timer.c b/arch/arm/cpu/armv8/generic_timer.c
index 6fe3ede387..e23629ab0b 100644
--- a/arch/arm/cpu/armv8/generic_timer.c
+++ b/arch/arm/cpu/armv8/generic_timer.c
@@ -9,6 +9,7 @@
 #include <command.h>
 #include <time.h>
 #include <asm/system.h>
+#include <linux/bitops.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/cpu/armv8/hisilicon/pinmux.c b/arch/arm/cpu/armv8/hisilicon/pinmux.c
index 6b6ad02031..5183e00a44 100644
--- a/arch/arm/cpu/armv8/hisilicon/pinmux.c
+++ b/arch/arm/cpu/armv8/hisilicon/pinmux.c
@@ -10,6 +10,7 @@
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch/pinmux.h>
+#include <linux/bitops.h>
 
 struct hi6220_pinmux0_regs *pmx0 =
 	(struct hi6220_pinmux0_regs *)HI6220_PINMUX0_BASE;
diff --git a/arch/arm/cpu/armv8/s32v234/cpu.c b/arch/arm/cpu/armv8/s32v234/cpu.c
index 5394a6697e..8ee3adc805 100644
--- a/arch/arm/cpu/armv8/s32v234/cpu.c
+++ b/arch/arm/cpu/armv8/s32v234/cpu.c
@@ -12,6 +12,7 @@
 #include <asm/armv8/mmu.h>
 #include <asm/io.h>
 #include <asm/arch/mc_me_regs.h>
+#include <linux/bitops.h>
 #include "cpu.h"
 
 u32 cpu_mask(void)
diff --git a/arch/arm/include/asm/arch-am33xx/cpu.h b/arch/arm/include/asm/arch-am33xx/cpu.h
index 9b819b0a1c..79081de700 100644
--- a/arch/arm/include/asm/arch-am33xx/cpu.h
+++ b/arch/arm/include/asm/arch-am33xx/cpu.h
@@ -12,6 +12,7 @@
 
 #if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))
 #include <asm/types.h>
+#include <linux/bitops.h>
 #endif /* !(__KERNEL_STRICT_NAMES || __ASSEMBLY__) */
 
 #include <asm/arch/hardware.h>
diff --git a/arch/arm/include/asm/arch-am33xx/hardware_am43xx.h b/arch/arm/include/asm/arch-am33xx/hardware_am43xx.h
index 64809d5deb..0b73ebdbb4 100644
--- a/arch/arm/include/asm/arch-am33xx/hardware_am43xx.h
+++ b/arch/arm/include/asm/arch-am33xx/hardware_am43xx.h
@@ -10,6 +10,10 @@
 #ifndef __AM43XX_HARDWARE_AM43XX_H
 #define __AM43XX_HARDWARE_AM43XX_H
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 /* Module base addresses */
 
 /* L3 Fast Configuration Bandwidth Limiter Base Address */
diff --git a/arch/arm/include/asm/arch-fsl-layerscape/config.h b/arch/arm/include/asm/arch-fsl-layerscape/config.h
index ddd9390df4..908d860027 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/config.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/config.h
@@ -10,6 +10,10 @@
 #include <linux/kconfig.h>
 #include <fsl_ddrc_version.h>
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 #define CONFIG_STANDALONE_LOAD_ADDR	0x80300000
 
 /*
diff --git a/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h b/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h
index 862ec2e2f1..c9be0768e3 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h
@@ -7,6 +7,9 @@
 #define __ARCH_FSL_LSCH2_IMMAP_H__
 
 #include <fsl_immap.h>
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
 
 #define CONFIG_SYS_IMMR				0x01000000
 #define CONFIG_SYS_DCSRBAR			0x20000000
diff --git a/arch/arm/include/asm/arch-hi3660/hi3660.h b/arch/arm/include/asm/arch-hi3660/hi3660.h
index 3ca0951543..882262d13c 100644
--- a/arch/arm/include/asm/arch-hi3660/hi3660.h
+++ b/arch/arm/include/asm/arch-hi3660/hi3660.h
@@ -7,6 +7,10 @@
 #ifndef __HI3660_H__
 #define __HI3660_H__
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 #define HI3660_UART6_BASE			0xfff32000
 
 #define PMU_REG_BASE                            0xfff34000
diff --git a/arch/arm/include/asm/arch-imx8/iomux.h b/arch/arm/include/asm/arch-imx8/iomux.h
index bedd01bfd8..3acef1ea6b 100644
--- a/arch/arm/include/asm/arch-imx8/iomux.h
+++ b/arch/arm/include/asm/arch-imx8/iomux.h
@@ -6,6 +6,10 @@
 #ifndef __ASM_ARCH_IMX8_IOMUX_H__
 #define __ASM_ARCH_IMX8_IOMUX_H__
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 /*
  * We use 64bits value for iomux settings.
  * High 32bits are used for padring register value,
diff --git a/arch/arm/include/asm/arch-imx8m/clock_imx8mm.h b/arch/arm/include/asm/arch-imx8m/clock_imx8mm.h
index 140e8bbabd..63b14b9ca5 100644
--- a/arch/arm/include/asm/arch-imx8m/clock_imx8mm.h
+++ b/arch/arm/include/asm/arch-imx8m/clock_imx8mm.h
@@ -8,6 +8,10 @@
 #ifndef _ASM_ARCH_IMX8MM_CLOCK_H
 #define _ASM_ARCH_IMX8MM_CLOCK_H
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 #define PLL_1443X_RATE(_rate, _m, _p, _s, _k)			\
 	{							\
 		.rate	=	(_rate),			\
diff --git a/arch/arm/include/asm/arch-imx8m/clock_imx8mq.h b/arch/arm/include/asm/arch-imx8m/clock_imx8mq.h
index 9dda6ddc8c..742cbf3bf8 100644
--- a/arch/arm/include/asm/arch-imx8m/clock_imx8mq.h
+++ b/arch/arm/include/asm/arch-imx8m/clock_imx8mq.h
@@ -8,6 +8,10 @@
 #ifndef _ASM_ARCH_IMX8M_CLOCK_H
 #define _ASM_ARCH_IMX8M_CLOCK_H
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 enum pll_clocks {
 	ANATOP_ARM_PLL,
 	ANATOP_GPU_PLL,
diff --git a/arch/arm/include/asm/arch-meson/axg.h b/arch/arm/include/asm/arch-meson/axg.h
index d293f2a839..91c87696e0 100644
--- a/arch/arm/include/asm/arch-meson/axg.h
+++ b/arch/arm/include/asm/arch-meson/axg.h
@@ -7,6 +7,10 @@
 #ifndef __AXG_H__
 #define __AXG_H__
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 #define AXG_AOBUS_BASE		0xff800000
 #define AXG_PERIPHS_BASE	0xff634400
 #define AXG_HIU_BASE		0xff63c000
diff --git a/arch/arm/include/asm/arch-meson/g12a.h b/arch/arm/include/asm/arch-meson/g12a.h
index b806667860..db29cc3a00 100644
--- a/arch/arm/include/asm/arch-meson/g12a.h
+++ b/arch/arm/include/asm/arch-meson/g12a.h
@@ -7,6 +7,10 @@
 #ifndef __G12A_H__
 #define __G12A_H__
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 #define G12A_AOBUS_BASE			0xff800000
 #define G12A_PERIPHS_BASE		0xff634400
 #define G12A_HIU_BASE			0xff63c000
diff --git a/arch/arm/include/asm/arch-meson/gx.h b/arch/arm/include/asm/arch-meson/gx.h
index b781ba9475..743d2e8bb9 100644
--- a/arch/arm/include/asm/arch-meson/gx.h
+++ b/arch/arm/include/asm/arch-meson/gx.h
@@ -6,6 +6,10 @@
 #ifndef __GX_H__
 #define __GX_H__
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 #define GX_FIRMWARE_MEM_SIZE	0x1000000
 
 #define GX_AOBUS_BASE		0xc8100000
diff --git a/arch/arm/include/asm/arch-meson/sd_emmc.h b/arch/arm/include/asm/arch-meson/sd_emmc.h
index e3a72c8b66..1e9f8cf498 100644
--- a/arch/arm/include/asm/arch-meson/sd_emmc.h
+++ b/arch/arm/include/asm/arch-meson/sd_emmc.h
@@ -7,6 +7,10 @@
 #define __SD_EMMC_H__
 
 #include <mmc.h>
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 
 #define SDIO_PORT_A			0
 #define SDIO_PORT_B			1
diff --git a/arch/arm/include/asm/arch-mx6/imx-regs.h b/arch/arm/include/asm/arch-mx6/imx-regs.h
index 5b41a7a4b8..ccd48e8305 100644
--- a/arch/arm/include/asm/arch-mx6/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx6/imx-regs.h
@@ -372,6 +372,7 @@
 #include <asm/mach-imx/regs-lcdif.h>
 #if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))
 #include <asm/types.h>
+#include <linux/bitops.h>
 
 /* only for i.MX6SX/UL */
 #define WDOG3_BASE_ADDR (((is_mx6ul() || is_mx6ull()) ?	\
diff --git a/arch/arm/include/asm/arch-mx7/imx-regs.h b/arch/arm/include/asm/arch-mx7/imx-regs.h
index 7b23abbc7e..95238dcaa8 100644
--- a/arch/arm/include/asm/arch-mx7/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx7/imx-regs.h
@@ -225,6 +225,7 @@
 #if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))
 #include <asm/mach-imx/regs-lcdif.h>
 #include <asm/types.h>
+#include <linux/bitops.h>
 
 extern void imx_get_mac_from_fuse(int dev_id, unsigned char *mac);
 
diff --git a/arch/arm/include/asm/arch-mx7/mx7-ddr.h b/arch/arm/include/asm/arch-mx7/mx7-ddr.h
index 3c0790487e..37aaee0ad7 100644
--- a/arch/arm/include/asm/arch-mx7/mx7-ddr.h
+++ b/arch/arm/include/asm/arch-mx7/mx7-ddr.h
@@ -10,6 +10,10 @@
 #ifndef __ASM_ARCH_MX7_DDR_H__
 #define __ASM_ARCH_MX7_DDR_H__
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 /* DDRC Registers (DDRC_IPS_BASE_ADDR) */
 struct ddrc {
 	u32 mstr;		/* 0x0000 */
diff --git a/arch/arm/include/asm/arch-rockchip/cru.h b/arch/arm/include/asm/arch-rockchip/cru.h
index 5cf2aec11a..5eb17f9d55 100644
--- a/arch/arm/include/asm/arch-rockchip/cru.h
+++ b/arch/arm/include/asm/arch-rockchip/cru.h
@@ -7,6 +7,10 @@
 #ifndef _ROCKCHIP_CLOCK_H
 #define _ROCKCHIP_CLOCK_H
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 #if defined(CONFIG_ROCKCHIP_RK3288)
 # include <asm/arch-rockchip/cru_rk3288.h>
 #elif defined(CONFIG_ROCKCHIP_RK3399)
diff --git a/arch/arm/include/asm/arch-rockchip/cru_rk3128.h b/arch/arm/include/asm/arch-rockchip/cru_rk3128.h
index 40a5ca7390..cca812d29e 100644
--- a/arch/arm/include/asm/arch-rockchip/cru_rk3128.h
+++ b/arch/arm/include/asm/arch-rockchip/cru_rk3128.h
@@ -6,6 +6,10 @@
 #ifndef _ASM_ARCH_CRU_RK3128_H
 #define _ASM_ARCH_CRU_RK3128_H
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 #define MHz		1000000
 #define OSC_HZ		(24 * MHz)
 
diff --git a/arch/arm/include/asm/arch-rockchip/cru_rk3368.h b/arch/arm/include/asm/arch-rockchip/cru_rk3368.h
index 714cea85b4..316c67c62f 100644
--- a/arch/arm/include/asm/arch-rockchip/cru_rk3368.h
+++ b/arch/arm/include/asm/arch-rockchip/cru_rk3368.h
@@ -6,6 +6,10 @@
 #ifndef _ASM_ARCH_CRU_RK3368_H
 #define _ASM_ARCH_CRU_RK3368_H
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 /* RK3368 clock numbers */
 enum rk3368_pll_id {
 	APLLB,
diff --git a/arch/arm/include/asm/arch-rockchip/cru_rv1108.h b/arch/arm/include/asm/arch-rockchip/cru_rv1108.h
index 1db25afe26..0ba5ff6a04 100644
--- a/arch/arm/include/asm/arch-rockchip/cru_rv1108.h
+++ b/arch/arm/include/asm/arch-rockchip/cru_rv1108.h
@@ -6,6 +6,10 @@
 #ifndef _ASM_ARCH_CRU_RV1108_H
 #define _ASM_ARCH_CRU_RV1108_H
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 #define OSC_HZ		(24 * 1000 * 1000)
 
 #define APLL_HZ		(600 * 1000000)
diff --git a/arch/arm/include/asm/arch-rockchip/ddr_rk3368.h b/arch/arm/include/asm/arch-rockchip/ddr_rk3368.h
index 82234cf8ad..40cdcf4a45 100644
--- a/arch/arm/include/asm/arch-rockchip/ddr_rk3368.h
+++ b/arch/arm/include/asm/arch-rockchip/ddr_rk3368.h
@@ -6,6 +6,10 @@
 #ifndef __ASM_ARCH_DDR_RK3368_H__
 #define __ASM_ARCH_DDR_RK3368_H__
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 /*
  * The RK3368 DDR PCTL differs from the incarnation in the RK3288 only
  * in a few details. Most notably, it has an additional field to track
diff --git a/arch/arm/include/asm/arch-rockchip/grf_rk3368.h b/arch/arm/include/asm/arch-rockchip/grf_rk3368.h
index 45e882b3c9..0079d20078 100644
--- a/arch/arm/include/asm/arch-rockchip/grf_rk3368.h
+++ b/arch/arm/include/asm/arch-rockchip/grf_rk3368.h
@@ -6,6 +6,10 @@
 #ifndef _ASM_ARCH_GRF_RK3368_H
 #define _ASM_ARCH_GRF_RK3368_H
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 struct rk3368_grf {
 	u32 gpio1a_iomux;
 	u32 gpio1b_iomux;
diff --git a/arch/arm/include/asm/arch-rockchip/lvds_rk3288.h b/arch/arm/include/asm/arch-rockchip/lvds_rk3288.h
index 0f00df6bf5..fb25504b12 100644
--- a/arch/arm/include/asm/arch-rockchip/lvds_rk3288.h
+++ b/arch/arm/include/asm/arch-rockchip/lvds_rk3288.h
@@ -6,6 +6,10 @@
 #ifndef _ASM_ARCH_LVDS_RK3288_H
 #define _ASM_ARCH_LVDS_RK3288_H
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 #define RK3288_LVDS_CH0_REG0			0x00
 #define RK3288_LVDS_CH0_REG0_LVDS_EN		BIT(7)
 #define RK3288_LVDS_CH0_REG0_TTL_EN		BIT(6)
diff --git a/arch/arm/include/asm/arch-rockchip/sdram_pctl_px30.h b/arch/arm/include/asm/arch-rockchip/sdram_pctl_px30.h
index 9781881738..3a3657789f 100644
--- a/arch/arm/include/asm/arch-rockchip/sdram_pctl_px30.h
+++ b/arch/arm/include/asm/arch-rockchip/sdram_pctl_px30.h
@@ -7,6 +7,10 @@
 #define _ASM_ARCH_SDRAM_PCTL_PX30_H
 #include <asm/arch-rockchip/sdram_common.h>
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 struct ddr_pctl_regs {
 	u32 pctl[30][2];
 };
diff --git a/arch/arm/include/asm/arch-rockchip/sdram_phy_px30.h b/arch/arm/include/asm/arch-rockchip/sdram_phy_px30.h
index c75a633c91..a033a18538 100644
--- a/arch/arm/include/asm/arch-rockchip/sdram_phy_px30.h
+++ b/arch/arm/include/asm/arch-rockchip/sdram_phy_px30.h
@@ -8,6 +8,10 @@
 #include <asm/arch-rockchip/sdram_common.h>
 #include <asm/arch-rockchip/sdram_phy_ron_rtt_px30.h>
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 struct ddr_phy_regs {
 	u32 phy[5][2];
 };
diff --git a/arch/arm/include/asm/arch-rockchip/sdram_rk322x.h b/arch/arm/include/asm/arch-rockchip/sdram_rk322x.h
index 99942e6aac..6f6c5c9954 100644
--- a/arch/arm/include/asm/arch-rockchip/sdram_rk322x.h
+++ b/arch/arm/include/asm/arch-rockchip/sdram_rk322x.h
@@ -5,6 +5,10 @@
 #ifndef _ASM_ARCH_SDRAM_RK322X_H
 #define _ASM_ARCH_SDRAM_RK322X_H
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 struct rk322x_sdram_channel {
 	/*
 	 * bit width in address, eg:
diff --git a/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h b/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h
index 267649fda4..c76372ee82 100644
--- a/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h
+++ b/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h
@@ -7,6 +7,9 @@
 #define _ASM_ARCH_SDRAM_RK3399_H
 #include <asm/arch-rockchip/sdram_common.h>
 #include <asm/arch-rockchip/sdram_msch.h>
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
 
 struct rk3399_ddr_pctl_regs {
 	u32 denali_ctl[332];
diff --git a/arch/arm/include/asm/arch-stih410/sdhci.h b/arch/arm/include/asm/arch-stih410/sdhci.h
index 105d3580ef..d5557b89fc 100644
--- a/arch/arm/include/asm/arch-stih410/sdhci.h
+++ b/arch/arm/include/asm/arch-stih410/sdhci.h
@@ -7,6 +7,10 @@
 #ifndef __STI_SDHCI_H__
 #define __STI_SDHCI_H__
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 #define FLASHSS_MMC_CORE_CONFIG_1			0x400
 #define FLASHSS_MMC_CORECFG_TIMEOUT_CLK_UNIT_MHZ	BIT(24)
 #define FLASHSS_MMC_CORECFG_TIMEOUT_CLK_FREQ_MIN	BIT(12)
diff --git a/arch/arm/include/asm/arch-stm32f4/stm32_pwr.h b/arch/arm/include/asm/arch-stm32f4/stm32_pwr.h
index de42996037..8af6de220d 100644
--- a/arch/arm/include/asm/arch-stm32f4/stm32_pwr.h
+++ b/arch/arm/include/asm/arch-stm32f4/stm32_pwr.h
@@ -5,6 +5,11 @@
  */
 
 #ifndef __STM32_PWR_H_
+#define __STM32_PWR_H_
+
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
 
 /*
  * Offsets of some PWR registers
diff --git a/arch/arm/include/asm/arch-stm32f7/stm32_pwr.h b/arch/arm/include/asm/arch-stm32f7/stm32_pwr.h
index c93fc5a7e3..02faaeb663 100644
--- a/arch/arm/include/asm/arch-stm32f7/stm32_pwr.h
+++ b/arch/arm/include/asm/arch-stm32f7/stm32_pwr.h
@@ -5,6 +5,11 @@
  */
 
 #ifndef __STM32_PWR_H_
+#define __STM32_PWR_H_
+
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
 
 /*
  * Offsets of some PWR registers
diff --git a/arch/arm/include/asm/arch-stm32f7/syscfg.h b/arch/arm/include/asm/arch-stm32f7/syscfg.h
index ce2a952f78..985ae2544d 100644
--- a/arch/arm/include/asm/arch-stm32f7/syscfg.h
+++ b/arch/arm/include/asm/arch-stm32f7/syscfg.h
@@ -7,6 +7,10 @@
 #ifndef _STM32_SYSCFG_H
 #define _STM32_SYSCFG_H
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 struct stm32_syscfg_regs {
 	u32 memrmp;
 	u32 pmc;
diff --git a/arch/arm/include/asm/arch-sunxi/ccu.h b/arch/arm/include/asm/arch-sunxi/ccu.h
index 5dd97ab227..cac5c5faf0 100644
--- a/arch/arm/include/asm/arch-sunxi/ccu.h
+++ b/arch/arm/include/asm/arch-sunxi/ccu.h
@@ -7,6 +7,10 @@
 #ifndef _ASM_ARCH_CCU_H
 #define _ASM_ARCH_CCU_H
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 /**
  * enum ccu_flags - ccu clock/reset flags
  *
diff --git a/arch/arm/include/asm/arch-sunxi/clock_sun50i_h6.h b/arch/arm/include/asm/arch-sunxi/clock_sun50i_h6.h
index e36937059b..426069fc69 100644
--- a/arch/arm/include/asm/arch-sunxi/clock_sun50i_h6.h
+++ b/arch/arm/include/asm/arch-sunxi/clock_sun50i_h6.h
@@ -9,6 +9,10 @@
 #ifndef _SUNXI_CLOCK_SUN50I_H6_H
 #define _SUNXI_CLOCK_SUN50I_H6_H
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 struct sunxi_ccm_reg {
 	u32 pll1_cfg;		/* 0x000 pll1 (cpux) control */
 	u8 reserved_0x004[12];
diff --git a/arch/arm/include/asm/arch-sunxi/clock_sun9i.h b/arch/arm/include/asm/arch-sunxi/clock_sun9i.h
index 530e0dd73b..fe6b8ba273 100644
--- a/arch/arm/include/asm/arch-sunxi/clock_sun9i.h
+++ b/arch/arm/include/asm/arch-sunxi/clock_sun9i.h
@@ -8,6 +8,10 @@
 #ifndef _SUNXI_CLOCK_SUN9I_H
 #define _SUNXI_CLOCK_SUN9I_H
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 struct sunxi_ccm_reg {
 	u32 pll1_c0_cfg;	/* 0x00 c0cpu# pll configuration */
 	u32 pll2_c1_cfg;	/* 0x04 c1cpu# pll configuration */
diff --git a/arch/arm/include/asm/arch-sunxi/dram_sun50i_h6.h b/arch/arm/include/asm/arch-sunxi/dram_sun50i_h6.h
index 49a8a66f7b..be02655cdd 100644
--- a/arch/arm/include/asm/arch-sunxi/dram_sun50i_h6.h
+++ b/arch/arm/include/asm/arch-sunxi/dram_sun50i_h6.h
@@ -10,6 +10,9 @@
 #define _SUNXI_DRAM_SUN50I_H6_H
 
 #include <stdbool.h>
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
 
 enum sunxi_dram_type {
 	SUNXI_DRAM_TYPE_DDR3 = 3,
diff --git a/arch/arm/include/asm/arch-sunxi/dram_sun6i.h b/arch/arm/include/asm/arch-sunxi/dram_sun6i.h
index 929450fc67..b66d58cd73 100644
--- a/arch/arm/include/asm/arch-sunxi/dram_sun6i.h
+++ b/arch/arm/include/asm/arch-sunxi/dram_sun6i.h
@@ -13,6 +13,10 @@
 #ifndef _SUNXI_DRAM_SUN6I_H
 #define _SUNXI_DRAM_SUN6I_H
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 struct sunxi_mctl_com_reg {
 	u32 cr;			/* 0x00 */
 	u32 ccr;		/* 0x04 controller configuration register */
diff --git a/arch/arm/include/asm/arch-sunxi/dram_sun8i_a33.h b/arch/arm/include/asm/arch-sunxi/dram_sun8i_a33.h
index 49a6108c19..3f65306cc6 100644
--- a/arch/arm/include/asm/arch-sunxi/dram_sun8i_a33.h
+++ b/arch/arm/include/asm/arch-sunxi/dram_sun8i_a33.h
@@ -11,6 +11,10 @@
 #ifndef _SUNXI_DRAM_SUN8I_A33_H
 #define _SUNXI_DRAM_SUN8I_A33_H
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 struct sunxi_mctl_com_reg {
 	u32 cr;			/* 0x00 */
 	u32 ccr;		/* 0x04 controller configuration register */
diff --git a/arch/arm/include/asm/arch-sunxi/dram_sun8i_a83t.h b/arch/arm/include/asm/arch-sunxi/dram_sun8i_a83t.h
index d4634e55e4..2a87996354 100644
--- a/arch/arm/include/asm/arch-sunxi/dram_sun8i_a83t.h
+++ b/arch/arm/include/asm/arch-sunxi/dram_sun8i_a83t.h
@@ -11,6 +11,10 @@
 #ifndef _SUNXI_DRAM_SUN8I_A83T_H
 #define _SUNXI_DRAM_SUN8I_A83T_H
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 struct sunxi_mctl_com_reg {
 	u32 cr;			/* 0x00 */
 	u32 ccr;		/* 0x04 controller configuration register */
diff --git a/arch/arm/include/asm/arch-sunxi/dram_sun9i.h b/arch/arm/include/asm/arch-sunxi/dram_sun9i.h
index 603850b9ff..41df5fe5b6 100644
--- a/arch/arm/include/asm/arch-sunxi/dram_sun9i.h
+++ b/arch/arm/include/asm/arch-sunxi/dram_sun9i.h
@@ -11,6 +11,10 @@
 #ifndef _SUNXI_DRAM_SUN9I_H
 #define _SUNXI_DRAM_SUN9I_H
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 struct sunxi_mctl_com_reg {
 	u32 cr;			/* 0x00 */
 	u32 ccr;		/* 0x04 controller configuration register */
diff --git a/arch/arm/include/asm/arch-sunxi/pwm.h b/arch/arm/include/asm/arch-sunxi/pwm.h
index dca283c7a9..b89bddd2e8 100644
--- a/arch/arm/include/asm/arch-sunxi/pwm.h
+++ b/arch/arm/include/asm/arch-sunxi/pwm.h
@@ -6,6 +6,10 @@
 #ifndef _SUNXI_PWM_H
 #define _SUNXI_PWM_H
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 #define SUNXI_PWM_CTRL_REG		(SUNXI_PWM_BASE + 0)
 #define SUNXI_PWM_CH0_PERIOD		(SUNXI_PWM_BASE + 4)
 
diff --git a/arch/arm/include/asm/arch-tegra/dc.h b/arch/arm/include/asm/arch-tegra/dc.h
index 59347dd3d8..6444af2993 100644
--- a/arch/arm/include/asm/arch-tegra/dc.h
+++ b/arch/arm/include/asm/arch-tegra/dc.h
@@ -7,6 +7,10 @@
 #ifndef __ASM_ARCH_TEGRA_DC_H
 #define __ASM_ARCH_TEGRA_DC_H
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 /* Register definitions for the Tegra display controller */
 
 /* CMD register 0x000 ~ 0x43 */
diff --git a/arch/arm/include/asm/arch-tegra/pmc.h b/arch/arm/include/asm/arch-tegra/pmc.h
index 1524bf2911..e1f5a73813 100644
--- a/arch/arm/include/asm/arch-tegra/pmc.h
+++ b/arch/arm/include/asm/arch-tegra/pmc.h
@@ -7,6 +7,10 @@
 #ifndef _PMC_H_
 #define _PMC_H_
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 /* Power Management Controller (APBDEV_PMC_) registers */
 struct pmc_ctlr {
 	uint pmc_cntrl;			/* _CNTRL_0, offset 00 */
diff --git a/arch/arm/include/asm/arch-tegra124/flow.h b/arch/arm/include/asm/arch-tegra124/flow.h
index 62947bf99c..ebcb22f1cb 100644
--- a/arch/arm/include/asm/arch-tegra124/flow.h
+++ b/arch/arm/include/asm/arch-tegra124/flow.h
@@ -7,6 +7,10 @@
 #ifndef _TEGRA124_FLOW_H_
 #define _TEGRA124_FLOW_H_
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 struct flow_ctlr {
 	u32 halt_cpu_events;	/* offset 0x00 */
 	u32 halt_cop_events;	/* offset 0x04 */
diff --git a/arch/arm/include/asm/arch-vf610/imx-regs.h b/arch/arm/include/asm/arch-vf610/imx-regs.h
index 03def8e3c5..97211f4b12 100644
--- a/arch/arm/include/asm/arch-vf610/imx-regs.h
+++ b/arch/arm/include/asm/arch-vf610/imx-regs.h
@@ -302,6 +302,7 @@
 
 #if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))
 #include <asm/types.h>
+#include <linux/bitops.h>
 
 /* System Reset Controller (SRC) */
 struct src {
diff --git a/arch/arm/include/asm/armv7_mpu.h b/arch/arm/include/asm/armv7_mpu.h
index 8f77ec42a6..16b9d0d1ae 100644
--- a/arch/arm/include/asm/armv7_mpu.h
+++ b/arch/arm/include/asm/armv7_mpu.h
@@ -7,6 +7,10 @@
 #ifndef _ASM_ARMV7_MPU_H
 #define _ASM_ARMV7_MPU_H
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 #ifdef CONFIG_CPU_V7M
 #define AP_SHIFT			24
 #define XN_SHIFT			28
diff --git a/arch/arm/include/asm/bitops.h b/arch/arm/include/asm/bitops.h
index b02c454d04..fa8548624a 100644
--- a/arch/arm/include/asm/bitops.h
+++ b/arch/arm/include/asm/bitops.h
@@ -16,9 +16,15 @@
 #define __ASM_ARM_BITOPS_H
 
 #include <asm-generic/bitops/__ffs.h>
+#include <asm-generic/bitops/__fls.h>
+#include <asm-generic/bitops/fls.h>
+#include <asm-generic/bitops/fls64.h>
 
 #ifdef __KERNEL__
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
 #include <asm/proc-armv/system.h>
 
 #define smp_mb__before_clear_bit()	do { } while (0)
@@ -176,8 +182,4 @@ found_middle:
 
 #endif /* __KERNEL__ */
 
-#include <asm-generic/bitops/__fls.h>
-#include <asm-generic/bitops/fls.h>
-#include <asm-generic/bitops/fls64.h>
-
 #endif /* _ARM_BITOPS_H */
diff --git a/arch/arm/include/asm/gic-v3.h b/arch/arm/include/asm/gic-v3.h
index ac6c9e7013..5131fabec4 100644
--- a/arch/arm/include/asm/gic-v3.h
+++ b/arch/arm/include/asm/gic-v3.h
@@ -6,6 +6,10 @@
 #ifndef __GIC_V3_H__
 #define __GIC_V3_H__
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 #define GICR_CTLR_ENABLE_LPIS		BIT(0)
 #define GICR_CTLR_RWP			BIT(3)
 
diff --git a/arch/arm/include/asm/omap_mmc.h b/arch/arm/include/asm/omap_mmc.h
index 6d31cc4422..7933ad5a86 100644
--- a/arch/arm/include/asm/omap_mmc.h
+++ b/arch/arm/include/asm/omap_mmc.h
@@ -26,6 +26,9 @@
 #define OMAP_MMC_H_
 
 #include <mmc.h>
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
 
 struct hsmmc {
 #ifndef CONFIG_OMAP34XX
diff --git a/arch/arm/include/asm/psci.h b/arch/arm/include/asm/psci.h
index ac0ab6253f..67e9234066 100644
--- a/arch/arm/include/asm/psci.h
+++ b/arch/arm/include/asm/psci.h
@@ -100,6 +100,7 @@
 
 #ifndef __ASSEMBLY__
 #include <asm/types.h>
+#include <linux/bitops.h>
 
 /* These 3 helper functions assume cpu < CONFIG_ARMV7_PSCI_NR_CPUS */
 u32 psci_get_target_pc(int cpu);
diff --git a/arch/arm/include/asm/ti-common/keystone_net.h b/arch/arm/include/asm/ti-common/keystone_net.h
index bba1048499..0852ce80a6 100644
--- a/arch/arm/include/asm/ti-common/keystone_net.h
+++ b/arch/arm/include/asm/ti-common/keystone_net.h
@@ -11,6 +11,9 @@
 
 #include <asm/io.h>
 #include <phy.h>
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
 
 /* EMAC */
 #ifdef CONFIG_KSNET_NETCP_V1_0
diff --git a/arch/arm/include/asm/ti-common/omap_wdt.h b/arch/arm/include/asm/ti-common/omap_wdt.h
index fbc421b630..42d7e4c989 100644
--- a/arch/arm/include/asm/ti-common/omap_wdt.h
+++ b/arch/arm/include/asm/ti-common/omap_wdt.h
@@ -10,6 +10,10 @@
 #ifndef __OMAP_WDT_H__
 #define __OMAP_WDT_H__
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 /*
  * Watchdog:
  * Using the prescaler, the OMAP watchdog could go for many
diff --git a/arch/arm/include/asm/ti-common/ti-edma3.h b/arch/arm/include/asm/ti-common/ti-edma3.h
index 96c8a31fb8..9abdbc88e4 100644
--- a/arch/arm/include/asm/ti-common/ti-edma3.h
+++ b/arch/arm/include/asm/ti-common/ti-edma3.h
@@ -9,6 +9,9 @@
 #ifndef _EDMA3_H_
 #define _EDMA3_H_
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
 #include <linux/stddef.h>
 
 #define EDMA3_PARSET_NULL_LINK			0xffff
diff --git a/arch/arm/lib/gic-v3-its.c b/arch/arm/lib/gic-v3-its.c
index 6ee22d2944..90f37a123c 100644
--- a/arch/arm/lib/gic-v3-its.c
+++ b/arch/arm/lib/gic-v3-its.c
@@ -6,6 +6,7 @@
 #include <asm/gic.h>
 #include <asm/gic-v3.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/sizes.h>
 
 static u32 lpi_id_bits;
diff --git a/arch/arm/lib/image.c b/arch/arm/lib/image.c
index 9cf4a67406..94590d3049 100644
--- a/arch/arm/lib/image.c
+++ b/arch/arm/lib/image.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <image.h>
 #include <mapmem.h>
+#include <linux/bitops.h>
 #include <linux/sizes.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-at91/include/mach/at91_pmc.h b/arch/arm/mach-at91/include/mach/at91_pmc.h
index f423afd0ad..2ce99d956c 100644
--- a/arch/arm/mach-at91/include/mach/at91_pmc.h
+++ b/arch/arm/mach-at91/include/mach/at91_pmc.h
@@ -24,6 +24,7 @@
 #else
 
 #include <asm/types.h>
+#include <linux/bitops.h>
 
 typedef struct at91_pmc {
 	u32	scer;		/* 0x00 System Clock Enable Register */
diff --git a/arch/arm/mach-at91/include/mach/at91_sfr.h b/arch/arm/mach-at91/include/mach/at91_sfr.h
index 0300c336dd..4517df41bc 100644
--- a/arch/arm/mach-at91/include/mach/at91_sfr.h
+++ b/arch/arm/mach-at91/include/mach/at91_sfr.h
@@ -9,6 +9,7 @@
 #ifndef __AT91_SFR_H
 #define __AT91_SFR_H
 
+#include <linux/bitops.h>
 struct atmel_sfr {
 	u32 reserved1;	/* 0x00 */
 	union {
diff --git a/arch/arm/mach-at91/include/mach/atmel_pio4.h b/arch/arm/mach-at91/include/mach/atmel_pio4.h
index 7a03d6d3c7..f348b05bc8 100644
--- a/arch/arm/mach-at91/include/mach/atmel_pio4.h
+++ b/arch/arm/mach-at91/include/mach/atmel_pio4.h
@@ -9,6 +9,7 @@
 
 #ifndef __ASSEMBLY__
 
+#include <linux/bitops.h>
 struct atmel_pio4_port {
 	u32 mskr;		/* 0x00 PIO Mask Register */
 	u32 cfgr;		/* 0x04 PIO Configuration Register */
diff --git a/arch/arm/mach-exynos/include/mach/clock.h b/arch/arm/mach-exynos/include/mach/clock.h
index e4c706adea..9d23c476f9 100644
--- a/arch/arm/mach-exynos/include/mach/clock.h
+++ b/arch/arm/mach-exynos/include/mach/clock.h
@@ -8,6 +8,7 @@
 #define __ASM_ARM_ARCH_CLOCK_H_
 
 #ifndef __ASSEMBLY__
+#include <linux/bitops.h>
 struct exynos4_clock {
 	unsigned char	res1[0x4200];
 	unsigned int	src_leftbus;
diff --git a/arch/arm/mach-imx/imx8m/clock_imx8mm.c b/arch/arm/mach-imx/imx8m/clock_imx8mm.c
index 8ea7f016c2..aafe2ed084 100644
--- a/arch/arm/mach-imx/imx8m/clock_imx8mm.c
+++ b/arch/arm/mach-imx/imx8m/clock_imx8mm.c
@@ -12,6 +12,7 @@
 #include <asm/io.h>
 #include <div64.h>
 #include <errno.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c
index 344fa17d81..567e05b500 100644
--- a/arch/arm/mach-imx/imx8m/soc.c
+++ b/arch/arm/mach-imx/imx8m/soc.c
@@ -22,6 +22,7 @@
 #include <fdt_support.h>
 #include <fsl_wdog.h>
 #include <imx_sip.h>
+#include <linux/bitops.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-imx/imxrt/soc.c b/arch/arm/mach-imx/imxrt/soc.c
index 8d5fae9a97..8e7d15160d 100644
--- a/arch/arm/mach-imx/imxrt/soc.c
+++ b/arch/arm/mach-imx/imxrt/soc.c
@@ -8,6 +8,7 @@
 #include <init.h>
 #include <asm/io.h>
 #include <asm/armv7_mpu.h>
+#include <linux/bitops.h>
 
 int arch_cpu_init(void)
 {
diff --git a/arch/arm/mach-imx/mx7ulp/soc.c b/arch/arm/mach-imx/mx7ulp/soc.c
index 0936522283..8dd6b4d40e 100644
--- a/arch/arm/mach-imx/mx7ulp/soc.c
+++ b/arch/arm/mach-imx/mx7ulp/soc.c
@@ -13,6 +13,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/mach-imx/hab.h>
+#include <linux/bitops.h>
 
 #define PMC0_BASE_ADDR		0x410a1000
 #define PMC0_CTRL		0x28
diff --git a/arch/arm/mach-k3/include/mach/am6_hardware.h b/arch/arm/mach-k3/include/mach/am6_hardware.h
index 6df7631545..a91ef5f735 100644
--- a/arch/arm/mach-k3/include/mach/am6_hardware.h
+++ b/arch/arm/mach-k3/include/mach/am6_hardware.h
@@ -8,6 +8,9 @@
 #define __ASM_ARCH_AM6_HARDWARE_H
 
 #include <config.h>
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
 
 #define CTRL_MMR0_BASE					0x00100000
 #define CTRLMMR_MAIN_DEVSTAT				(CTRL_MMR0_BASE + 0x30)
diff --git a/arch/arm/mach-k3/include/mach/j721e_hardware.h b/arch/arm/mach-k3/include/mach/j721e_hardware.h
index ead136ed63..0deed66eff 100644
--- a/arch/arm/mach-k3/include/mach/j721e_hardware.h
+++ b/arch/arm/mach-k3/include/mach/j721e_hardware.h
@@ -8,6 +8,9 @@
 #define __ASM_ARCH_J721E_HARDWARE_H
 
 #include <config.h>
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
 
 #define CTRL_MMR0_BASE					0x00100000
 #define CTRLMMR_MAIN_DEVSTAT				(CTRL_MMR0_BASE + 0x30)
diff --git a/arch/arm/mach-k3/include/mach/j721e_spl.h b/arch/arm/mach-k3/include/mach/j721e_spl.h
index 475278bd04..959bdd4358 100644
--- a/arch/arm/mach-k3/include/mach/j721e_spl.h
+++ b/arch/arm/mach-k3/include/mach/j721e_spl.h
@@ -7,6 +7,7 @@
 #define _ASM_ARCH_J721E_SPL_H_
 
 /* With BootMode B = 0 */
+#include <linux/bitops.h>
 #define BOOT_DEVICE_HYPERFLASH		0x00
 #define BOOT_DEVICE_OSPI		0x01
 #define BOOT_DEVICE_QSPI		0x02
diff --git a/arch/arm/mach-keystone/clock.c b/arch/arm/mach-keystone/clock.c
index 3c46824d0b..0c59515d2e 100644
--- a/arch/arm/mach-keystone/clock.c
+++ b/arch/arm/mach-keystone/clock.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/clock_defs.h>
+#include <linux/bitops.h>
 
 /* DEV and ARM speed definitions as specified in DEVSPEED register */
 int __weak speeds[DEVSPEED_NUMSPDS] = {
diff --git a/arch/arm/mach-keystone/include/mach/clock_defs.h b/arch/arm/mach-keystone/include/mach/clock_defs.h
index 42bd0ac1cd..336b103dc8 100644
--- a/arch/arm/mach-keystone/include/mach/clock_defs.h
+++ b/arch/arm/mach-keystone/include/mach/clock_defs.h
@@ -9,6 +9,9 @@
 #define _CLOCK_DEFS_H_
 
 #include <asm/arch/hardware.h>
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
 
 /* PLL Control Registers */
 struct pllctl_regs {
diff --git a/arch/arm/mach-keystone/include/mach/hardware-k2hk.h b/arch/arm/mach-keystone/include/mach/hardware-k2hk.h
index 7793cf1266..3d078be991 100644
--- a/arch/arm/mach-keystone/include/mach/hardware-k2hk.h
+++ b/arch/arm/mach-keystone/include/mach/hardware-k2hk.h
@@ -9,6 +9,10 @@
 #ifndef __ASM_ARCH_HARDWARE_K2HK_H
 #define __ASM_ARCH_HARDWARE_K2HK_H
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 #define KS2_ARM_PLL_EN			BIT(13)
 
 /* PA SS Registers */
diff --git a/arch/arm/mach-keystone/include/mach/hardware-k2l.h b/arch/arm/mach-keystone/include/mach/hardware-k2l.h
index f46a98cfd1..0e710a3795 100644
--- a/arch/arm/mach-keystone/include/mach/hardware-k2l.h
+++ b/arch/arm/mach-keystone/include/mach/hardware-k2l.h
@@ -9,6 +9,10 @@
 #ifndef __ASM_ARCH_HARDWARE_K2L_H
 #define __ASM_ARCH_HARDWARE_K2L_H
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 #define KS2_ARM_PLL_EN			BIT(13)
 
 /* PA SS Registers */
diff --git a/arch/arm/mach-keystone/include/mach/hardware.h b/arch/arm/mach-keystone/include/mach/hardware.h
index d2234dc88c..0c5dc6a739 100644
--- a/arch/arm/mach-keystone/include/mach/hardware.h
+++ b/arch/arm/mach-keystone/include/mach/hardware.h
@@ -11,6 +11,7 @@
 #include <config.h>
 
 #ifndef __ASSEMBLY__
+#include <linux/bitops.h>
 
 #include <linux/sizes.h>
 #include <asm/io.h>
diff --git a/arch/arm/mach-keystone/include/mach/xhci-keystone.h b/arch/arm/mach-keystone/include/mach/xhci-keystone.h
index a05351292c..989b0c3158 100644
--- a/arch/arm/mach-keystone/include/mach/xhci-keystone.h
+++ b/arch/arm/mach-keystone/include/mach/xhci-keystone.h
@@ -6,6 +6,10 @@
  *     Texas Instruments Incorporated, <www.ti.com>
  */
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 #define USB3_PHY_REF_SSP_EN		BIT(29)
 #define USB3_PHY_OTG_VBUSVLDECTSEL	BIT(16)
 
diff --git a/arch/arm/mach-keystone/init.c b/arch/arm/mach-keystone/init.c
index d947d40eac..88e8912959 100644
--- a/arch/arm/mach-keystone/init.c
+++ b/arch/arm/mach-keystone/init.c
@@ -16,6 +16,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/psc_defs.h>
+#include <linux/bitops.h>
 
 #define MAX_PCI_PORTS		2
 enum pci_mode	{
diff --git a/arch/arm/mach-mediatek/mt7629/init.c b/arch/arm/mach-mediatek/mt7629/init.c
index aa9ff2bdba..c260413a57 100644
--- a/arch/arm/mach-mediatek/mt7629/init.c
+++ b/arch/arm/mach-mediatek/mt7629/init.c
@@ -14,6 +14,7 @@
 #include <asm/arch/misc.h>
 #include <asm/sections.h>
 #include <dm/uclass.h>
+#include <linux/bitops.h>
 #include <linux/io.h>
 
 #include <dt-bindings/clock/mt7629-clk.h>
diff --git a/arch/arm/mach-meson/board-info.c b/arch/arm/mach-meson/board-info.c
index bfae0c36ea..3abb27e03b 100644
--- a/arch/arm/mach-meson/board-info.c
+++ b/arch/arm/mach-meson/board-info.c
@@ -11,6 +11,7 @@
 #include <linux/bitfield.h>
 #include <regmap.h>
 #include <syscon.h>
+#include <linux/bitops.h>
 #include <linux/err.h>
 
 #define AO_SEC_SD_CFG8		0xe0
diff --git a/arch/arm/mach-meson/sm.c b/arch/arm/mach-meson/sm.c
index dd660769e2..ebbb880b71 100644
--- a/arch/arm/mach-meson/sm.c
+++ b/arch/arm/mach-meson/sm.c
@@ -12,6 +12,7 @@
 #include <asm/arch/sm.h>
 #include <asm/cache.h>
 #include <asm/ptrace.h>
+#include <linux/bitops.h>
 #include <linux/err.h>
 #include <linux/kernel.h>
 #include <dm.h>
diff --git a/arch/arm/mach-mvebu/armada3700/cpu.c b/arch/arm/mach-mvebu/armada3700/cpu.c
index d6e84f1e20..e438b4922e 100644
--- a/arch/arm/mach-mvebu/armada3700/cpu.c
+++ b/arch/arm/mach-mvebu/armada3700/cpu.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <init.h>
+#include <linux/bitops.h>
 #include <linux/libfdt.h>
 #include <asm/io.h>
 #include <asm/system.h>
diff --git a/arch/arm/mach-mvebu/cpu.c b/arch/arm/mach-mvebu/cpu.c
index c56b0aeb79..3a63dafde4 100644
--- a/arch/arm/mach-mvebu/cpu.c
+++ b/arch/arm/mach-mvebu/cpu.c
@@ -7,6 +7,7 @@
 #include <ahci.h>
 #include <cpu_func.h>
 #include <init.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/mbus.h>
 #include <asm/io.h>
diff --git a/arch/arm/mach-mvebu/efuse.c b/arch/arm/mach-mvebu/efuse.c
index 304be95703..c79eee98fe 100644
--- a/arch/arm/mach-mvebu/efuse.c
+++ b/arch/arm/mach-mvebu/efuse.c
@@ -10,6 +10,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/efuse.h>
 #include <asm/arch/soc.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/mbus.h>
 
diff --git a/arch/arm/mach-mvebu/include/mach/soc.h b/arch/arm/mach-mvebu/include/mach/soc.h
index acb9257c90..3f3b15aa8a 100644
--- a/arch/arm/mach-mvebu/include/mach/soc.h
+++ b/arch/arm/mach-mvebu/include/mach/soc.h
@@ -10,6 +10,10 @@
 #ifndef _MVEBU_SOC_H
 #define _MVEBU_SOC_H
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 #define SOC_MV78230_ID		0x7823
 #define SOC_MV78260_ID		0x7826
 #define SOC_MV78460_ID		0x7846
diff --git a/arch/arm/mach-mvebu/mbus.c b/arch/arm/mach-mvebu/mbus.c
index a95db5e5c3..9000f98d01 100644
--- a/arch/arm/mach-mvebu/mbus.c
+++ b/arch/arm/mach-mvebu/mbus.c
@@ -48,6 +48,7 @@
 
 #include <common.h>
 #include <malloc.h>
+#include <linux/bitops.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
diff --git a/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c b/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c
index af50cbc4f4..adef3331a7 100644
--- a/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c
+++ b/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c
@@ -8,6 +8,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 #include "ctrl_pex.h"
diff --git a/arch/arm/mach-mvebu/timer.c b/arch/arm/mach-mvebu/timer.c
index 50b78cb07b..43b3ed15d0 100644
--- a/arch/arm/mach-mvebu/timer.c
+++ b/arch/arm/mach-mvebu/timer.c
@@ -10,6 +10,7 @@
 #include <init.h>
 #include <asm/io.h>
 #include <asm/arch/soc.h>
+#include <linux/bitops.h>
 
 #define TIMER_LOAD_VAL			0xffffffff
 
diff --git a/arch/arm/mach-omap2/abb.c b/arch/arm/mach-omap2/abb.c
index 108c93542d..722e6db056 100644
--- a/arch/arm/mach-omap2/abb.c
+++ b/arch/arm/mach-omap2/abb.c
@@ -13,6 +13,7 @@
 #include <asm/arch/clock.h>
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
+#include <linux/bitops.h>
 
 __weak s8 abb_setup_ldovbb(u32 fuse, u32 ldovbb)
 {
diff --git a/arch/arm/mach-omap2/am33xx/clock_ti816x.c b/arch/arm/mach-omap2/am33xx/clock_ti816x.c
index e9c7b2d996..ec4cc75381 100644
--- a/arch/arm/mach-omap2/am33xx/clock_ti816x.c
+++ b/arch/arm/mach-omap2/am33xx/clock_ti816x.c
@@ -27,6 +27,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/hardware.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 #include <asm/emif.h>
 
diff --git a/arch/arm/mach-omap2/omap5/abb.c b/arch/arm/mach-omap2/omap5/abb.c
index 446f99f634..2f9f8e65d0 100644
--- a/arch/arm/mach-omap2/omap5/abb.c
+++ b/arch/arm/mach-omap2/omap5/abb.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <asm/omap_common.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 /*
  * Setup LDOVBB for OMAP5.
diff --git a/arch/arm/mach-omap2/pipe3-phy.c b/arch/arm/mach-omap2/pipe3-phy.c
index 94332b7ede..35ec81d314 100644
--- a/arch/arm/mach-omap2/pipe3-phy.c
+++ b/arch/arm/mach-omap2/pipe3-phy.c
@@ -11,6 +11,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include "pipe3-phy.h"
diff --git a/arch/arm/mach-rmobile/include/mach/rcar-gen3-base.h b/arch/arm/mach-rmobile/include/mach/rcar-gen3-base.h
index ecd02b9be0..5cd8a8c787 100644
--- a/arch/arm/mach-rmobile/include/mach/rcar-gen3-base.h
+++ b/arch/arm/mach-rmobile/include/mach/rcar-gen3-base.h
@@ -79,6 +79,7 @@
 
 #ifndef __ASSEMBLY__
 #include <asm/types.h>
+#include <linux/bitops.h>
 
 /* RWDT */
 struct rcar_rwdt {
diff --git a/arch/arm/mach-rmobile/include/mach/sh_sdhi.h b/arch/arm/mach-rmobile/include/mach/sh_sdhi.h
index be9b233747..7741718be1 100644
--- a/arch/arm/mach-rmobile/include/mach/sh_sdhi.h
+++ b/arch/arm/mach-rmobile/include/mach/sh_sdhi.h
@@ -11,6 +11,7 @@
 #ifndef _SH_SDHI_H
 #define _SH_SDHI_H
 
+#include <linux/bitops.h>
 #define SDHI_CMD			(0x0000 >> 1)
 #define SDHI_PORTSEL			(0x0004 >> 1)
 #define SDHI_ARG0			(0x0008 >> 1)
diff --git a/arch/arm/mach-rockchip/rk3308/rk3308.c b/arch/arm/mach-rockchip/rk3308/rk3308.c
index 35a5c79728..8e8214cf7e 100644
--- a/arch/arm/mach-rockchip/rk3308/rk3308.c
+++ b/arch/arm/mach-rockchip/rk3308/rk3308.c
@@ -10,6 +10,7 @@
 #include <asm/arch-rockchip/hardware.h>
 #include <asm/gpio.h>
 #include <debug_uart.h>
+#include <linux/bitops.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-rockchip/rk3368/rk3368.c b/arch/arm/mach-rockchip/rk3368/rk3368.c
index c865afa5f2..1c6d65a588 100644
--- a/arch/arm/mach-rockchip/rk3368/rk3368.c
+++ b/arch/arm/mach-rockchip/rk3368/rk3368.c
@@ -14,6 +14,7 @@
 #include <asm/arch-rockchip/cru_rk3368.h>
 #include <asm/arch-rockchip/grf_rk3368.h>
 #include <asm/arch-rockchip/hardware.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-rockchip/rk3399/rk3399.c b/arch/arm/mach-rockchip/rk3399/rk3399.c
index f263f7e8b2..09b0d6ebe8 100644
--- a/arch/arm/mach-rockchip/rk3399/rk3399.c
+++ b/arch/arm/mach-rockchip/rk3399/rk3399.c
@@ -17,6 +17,7 @@
 #include <asm/arch-rockchip/gpio.h>
 #include <asm/arch-rockchip/grf_rk3399.h>
 #include <asm/arch-rockchip/hardware.h>
+#include <linux/bitops.h>
 #include <power/regulator.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c
index f5a0ac473b..ec2f66d188 100644
--- a/arch/arm/mach-rockchip/spl.c
+++ b/arch/arm/mach-rockchip/spl.c
@@ -14,6 +14,7 @@
 #include <spl.h>
 #include <asm/arch-rockchip/bootrom.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-rockchip/tpl.c b/arch/arm/mach-rockchip/tpl.c
index 74f185c87f..88f80b05a9 100644
--- a/arch/arm/mach-rockchip/tpl.c
+++ b/arch/arm/mach-rockchip/tpl.c
@@ -14,6 +14,7 @@
 #include <version.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/bootrom.h>
+#include <linux/bitops.h>
 
 #define TIMER_LOAD_COUNT_L	0x00
 #define TIMER_LOAD_COUNT_H	0x04
diff --git a/arch/arm/mach-snapdragon/pinctrl-snapdragon.c b/arch/arm/mach-snapdragon/pinctrl-snapdragon.c
index 9ba8fdd729..442d236255 100644
--- a/arch/arm/mach-snapdragon/pinctrl-snapdragon.c
+++ b/arch/arm/mach-snapdragon/pinctrl-snapdragon.c
@@ -11,6 +11,7 @@
 #include <errno.h>
 #include <asm/io.h>
 #include <dm/pinctrl.h>
+#include <linux/bitops.h>
 #include "pinctrl-snapdragon.h"
 
 struct msm_pinctrl_priv {
diff --git a/arch/arm/mach-socfpga/include/mach/clock_manager_arria10.h b/arch/arm/mach-socfpga/include/mach/clock_manager_arria10.h
index 8d62d75432..11ddee5cb6 100644
--- a/arch/arm/mach-socfpga/include/mach/clock_manager_arria10.h
+++ b/arch/arm/mach-socfpga/include/mach/clock_manager_arria10.h
@@ -8,6 +8,8 @@
 
 #ifndef __ASSEMBLY__
 
+#include <linux/bitops.h>
+
 /* Clock manager group */
 #define CLKMGR_A10_CTRL				0x00
 #define CLKMGR_A10_INTR				0x04
@@ -64,6 +66,7 @@
 int cm_basic_init(const void *blob);
 #endif
 
+#include <linux/bitops.h>
 unsigned int cm_get_l4_sp_clk_hz(void);
 unsigned long cm_get_mpu_clk_hz(void);
 
diff --git a/arch/arm/mach-socfpga/include/mach/clock_manager_gen5.h b/arch/arm/mach-socfpga/include/mach/clock_manager_gen5.h
index fc6d230156..5c9abe619b 100644
--- a/arch/arm/mach-socfpga/include/mach/clock_manager_gen5.h
+++ b/arch/arm/mach-socfpga/include/mach/clock_manager_gen5.h
@@ -8,6 +8,8 @@
 
 #ifndef __ASSEMBLY__
 
+#include <linux/bitops.h>
+
 struct cm_config {
 	/* main group */
 	u32 main_vco_base;
@@ -109,6 +111,7 @@ int cm_basic_init(const struct cm_config * const cfg);
 const struct cm_config * const cm_get_default_config(void);
 #endif /* __ASSEMBLY__ */
 
+#include <linux/bitops.h>
 #define LOCKED_MASK \
 	(CLKMGR_INTER_SDRPLLLOCKED_MASK  | \
 	CLKMGR_INTER_PERPLLLOCKED_MASK  | \
diff --git a/arch/arm/mach-socfpga/include/mach/clock_manager_s10.h b/arch/arm/mach-socfpga/include/mach/clock_manager_s10.h
index 9d2b3babab..cb7923baef 100644
--- a/arch/arm/mach-socfpga/include/mach/clock_manager_s10.h
+++ b/arch/arm/mach-socfpga/include/mach/clock_manager_s10.h
@@ -8,6 +8,7 @@
 #define	_CLOCK_MANAGER_S10_
 
 #include <asm/arch/clock_manager_soc64.h>
+#include <linux/bitops.h>
 
 /* Clock speed accessors */
 unsigned long cm_get_mpu_clk_hz(void);
diff --git a/arch/arm/mach-socfpga/include/mach/firewall.h b/arch/arm/mach-socfpga/include/mach/firewall.h
index 430341bea1..adab65bc96 100644
--- a/arch/arm/mach-socfpga/include/mach/firewall.h
+++ b/arch/arm/mach-socfpga/include/mach/firewall.h
@@ -7,6 +7,8 @@
 #ifndef	_FIREWALL_H_
 #define	_FIREWALL_H_
 
+#include <linux/bitops.h>
+
 struct socfpga_firwall_l4_per {
 	u32	nand;		/* 0x00 */
 	u32	nand_data;
diff --git a/arch/arm/mach-socfpga/include/mach/fpga_manager_arria10.h b/arch/arm/mach-socfpga/include/mach/fpga_manager_arria10.h
index 62249b3695..048708202c 100644
--- a/arch/arm/mach-socfpga/include/mach/fpga_manager_arria10.h
+++ b/arch/arm/mach-socfpga/include/mach/fpga_manager_arria10.h
@@ -7,6 +7,7 @@
 #include <asm/cache.h>
 #include <altera.h>
 #include <image.h>
+#include <linux/bitops.h>
 
 #ifndef _FPGA_MANAGER_ARRIA10_H_
 #define _FPGA_MANAGER_ARRIA10_H_
diff --git a/arch/arm/mach-socfpga/include/mach/fpga_manager_gen5.h b/arch/arm/mach-socfpga/include/mach/fpga_manager_gen5.h
index c8ec5d4c3c..e08c005628 100644
--- a/arch/arm/mach-socfpga/include/mach/fpga_manager_gen5.h
+++ b/arch/arm/mach-socfpga/include/mach/fpga_manager_gen5.h
@@ -7,6 +7,7 @@
 #ifndef _FPGA_MANAGER_GEN5_H_
 #define _FPGA_MANAGER_GEN5_H_
 
+#include <linux/bitops.h>
 #define FPGAMGRREGS_STAT_MODE_MASK		0x7
 #define FPGAMGRREGS_STAT_MSEL_MASK		0xf8
 #define FPGAMGRREGS_STAT_MSEL_LSB		3
diff --git a/arch/arm/mach-socfpga/include/mach/mailbox_s10.h b/arch/arm/mach-socfpga/include/mach/mailbox_s10.h
index ae728a5df5..55707ab9c5 100644
--- a/arch/arm/mach-socfpga/include/mach/mailbox_s10.h
+++ b/arch/arm/mach-socfpga/include/mach/mailbox_s10.h
@@ -8,6 +8,7 @@
 #define _MAILBOX_S10_H_
 
 /* user define Uboot ID */
+#include <linux/bitops.h>
 #define MBOX_CLIENT_ID_UBOOT	0xB
 #define MBOX_ID_UBOOT		0x1
 
diff --git a/arch/arm/mach-socfpga/include/mach/reset_manager_arria10.h b/arch/arm/mach-socfpga/include/mach/reset_manager_arria10.h
index 22e4eb33de..19507c292d 100644
--- a/arch/arm/mach-socfpga/include/mach/reset_manager_arria10.h
+++ b/arch/arm/mach-socfpga/include/mach/reset_manager_arria10.h
@@ -7,6 +7,7 @@
 #define _RESET_MANAGER_ARRIA10_H_
 
 #include <dt-bindings/reset/altr,rst-mgr-a10.h>
+#include <linux/bitops.h>
 
 void socfpga_watchdog_disable(void);
 void socfpga_reset_deassert_noc_ddr_scheduler(void);
diff --git a/arch/arm/mach-socfpga/include/mach/sdram_arria10.h b/arch/arm/mach-socfpga/include/mach/sdram_arria10.h
index f2773883fd..ff05994ccc 100644
--- a/arch/arm/mach-socfpga/include/mach/sdram_arria10.h
+++ b/arch/arm/mach-socfpga/include/mach/sdram_arria10.h
@@ -7,6 +7,7 @@
 #define _SOCFPGA_SDRAM_ARRIA10_H_
 
 #ifndef __ASSEMBLY__
+#include <linux/bitops.h>
 int ddr_calibration_sequence(void);
 
 struct socfpga_ecc_hmc {
diff --git a/arch/arm/mach-socfpga/include/mach/system_manager.h b/arch/arm/mach-socfpga/include/mach/system_manager.h
index 6de0a08131..f816954717 100644
--- a/arch/arm/mach-socfpga/include/mach/system_manager.h
+++ b/arch/arm/mach-socfpga/include/mach/system_manager.h
@@ -94,5 +94,6 @@ phys_addr_t socfpga_get_sysmgr_addr(void);
 
 #define SYSMGR_GET_BOOTINFO_BSEL(bsel)		\
 		(((bsel) >> SYSMGR_BOOTINFO_BSEL_SHIFT) & 7)
+#include <linux/bitops.h>
 #endif
 #endif /* _SYSTEM_MANAGER_H_ */
diff --git a/arch/arm/mach-socfpga/include/mach/system_manager_soc64.h b/arch/arm/mach-socfpga/include/mach/system_manager_soc64.h
index 3a6c9515c6..c90f63a754 100644
--- a/arch/arm/mach-socfpga/include/mach/system_manager_soc64.h
+++ b/arch/arm/mach-socfpga/include/mach/system_manager_soc64.h
@@ -6,6 +6,7 @@
 #ifndef _SYSTEM_MANAGER_SOC64_H_
 #define _SYSTEM_MANAGER_SOC64_H_
 
+#include <linux/bitops.h>
 void sysmgr_pinmux_init(void);
 void populate_sysmgr_fpgaintf_module(void);
 void populate_sysmgr_pinmux(void);
diff --git a/arch/arm/mach-socfpga/misc_gen5.c b/arch/arm/mach-socfpga/misc_gen5.c
index 39acc8cfdb..7209e8d6db 100644
--- a/arch/arm/mach-socfpga/misc_gen5.c
+++ b/arch/arm/mach-socfpga/misc_gen5.c
@@ -10,6 +10,7 @@
 #include <env.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <linux/bitops.h>
 #include <linux/libfdt.h>
 #include <altera.h>
 #include <miiphy.h>
diff --git a/arch/arm/mach-socfpga/reset_manager_gen5.c b/arch/arm/mach-socfpga/reset_manager_gen5.c
index 1008a78dc8..a65860ef02 100644
--- a/arch/arm/mach-socfpga/reset_manager_gen5.c
+++ b/arch/arm/mach-socfpga/reset_manager_gen5.c
@@ -9,6 +9,7 @@
 #include <asm/arch/fpga_manager.h>
 #include <asm/arch/reset_manager.h>
 #include <asm/arch/system_manager.h>
+#include <linux/bitops.h>
 
 /* Assert or de-assert SoCFPGA reset manager reset. */
 void socfpga_per_reset(u32 reset, int set)
diff --git a/arch/arm/mach-socfpga/spl_gen5.c b/arch/arm/mach-socfpga/spl_gen5.c
index 91bc9df70a..5a7c5ef76d 100644
--- a/arch/arm/mach-socfpga/spl_gen5.c
+++ b/arch/arm/mach-socfpga/spl_gen5.c
@@ -24,6 +24,7 @@
 #include <fdtdec.h>
 #include <watchdog.h>
 #include <dm/uclass.h>
+#include <linux/bitops.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c
index d03aa12bb8..31fc3f90e0 100644
--- a/arch/arm/mach-stm32mp/cpu.c
+++ b/arch/arm/mach-stm32mp/cpu.c
@@ -16,6 +16,7 @@
 #include <asm/arch/sys_proto.h>
 #include <dm/device.h>
 #include <dm/uclass.h>
+#include <linux/bitops.h>
 
 /* RCC register */
 #define RCC_TZCR		(STM32_RCC_BASE + 0x00)
diff --git a/arch/arm/mach-stm32mp/include/mach/stm32.h b/arch/arm/mach-stm32mp/include/mach/stm32.h
index f8ddb1cb57..e6bddfb7dc 100644
--- a/arch/arm/mach-stm32mp/include/mach/stm32.h
+++ b/arch/arm/mach-stm32mp/include/mach/stm32.h
@@ -6,6 +6,10 @@
 #ifndef _MACH_STM32_H_
 #define _MACH_STM32_H_
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 /*
  * Peripheral memory map
  * only address used before device tree parsing
diff --git a/arch/arm/mach-stm32mp/psci.c b/arch/arm/mach-stm32mp/psci.c
index 19f1acfe23..155aa79cd5 100644
--- a/arch/arm/mach-stm32mp/psci.c
+++ b/arch/arm/mach-stm32mp/psci.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <asm/psci.h>
 #include <asm/secure.h>
+#include <linux/bitops.h>
 
 #define BOOT_API_A7_CORE0_MAGIC_NUMBER	0xCA7FACE0
 #define BOOT_API_A7_CORE1_MAGIC_NUMBER	0xCA7FACE1
diff --git a/arch/arm/mach-stm32mp/pwr_regulator.c b/arch/arm/mach-stm32mp/pwr_regulator.c
index b52e1e85d5..900dee4c38 100644
--- a/arch/arm/mach-stm32mp/pwr_regulator.c
+++ b/arch/arm/mach-stm32mp/pwr_regulator.c
@@ -9,6 +9,7 @@
 #include <syscon.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/err.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
diff --git a/arch/arm/mach-sunxi/clock_sun6i.c b/arch/arm/mach-sunxi/clock_sun6i.c
index b46083e9db..8e84062bd7 100644
--- a/arch/arm/mach-sunxi/clock_sun6i.c
+++ b/arch/arm/mach-sunxi/clock_sun6i.c
@@ -14,6 +14,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/prcm.h>
 #include <asm/arch/sys_proto.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 #ifdef CONFIG_SPL_BUILD
diff --git a/arch/arm/mach-sunxi/spl_spi_sunxi.c b/arch/arm/mach-sunxi/spl_spi_sunxi.c
index d369df93d4..15e86cbac8 100644
--- a/arch/arm/mach-sunxi/spl_spi_sunxi.c
+++ b/arch/arm/mach-sunxi/spl_spi_sunxi.c
@@ -9,6 +9,7 @@
 #include <spl.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/libfdt.h>
 
diff --git a/arch/arm/mach-tegra/tegra210/clock.c b/arch/arm/mach-tegra/tegra210/clock.c
index 4fe6df4812..ccc64eb77b 100644
--- a/arch/arm/mach-tegra/tegra210/clock.c
+++ b/arch/arm/mach-tegra/tegra210/clock.c
@@ -19,6 +19,7 @@
 #include <asm/arch-tegra/timer.h>
 #include <div64.h>
 #include <fdtdec.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 /*
diff --git a/arch/arm/mach-uniphier/boot-device/boot-device-pxs3.c b/arch/arm/mach-uniphier/boot-device/boot-device-pxs3.c
index 2edf66d5c1..4aee50f5d3 100644
--- a/arch/arm/mach-uniphier/boot-device/boot-device-pxs3.c
+++ b/arch/arm/mach-uniphier/boot-device/boot-device-pxs3.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <spl.h>
+#include <linux/bitops.h>
 #include <linux/io.h>
 #include <linux/kernel.h>
 
diff --git a/arch/arm/mach-uniphier/boot-device/boot-device.c b/arch/arm/mach-uniphier/boot-device/boot-device.c
index 43b28f8b86..2fb625535b 100644
--- a/arch/arm/mach-uniphier/boot-device/boot-device.c
+++ b/arch/arm/mach-uniphier/boot-device/boot-device.c
@@ -8,6 +8,7 @@
 #include <command.h>
 #include <spl.h>
 #include <stdio.h>
+#include <linux/bitops.h>
 #include <linux/bug.h>
 #include <linux/io.h>
 #include <linux/log2.h>
diff --git a/arch/arm/mach-uniphier/dram/ddrphy-regs.h b/arch/arm/mach-uniphier/dram/ddrphy-regs.h
index 6a041c500b..8b342921bf 100644
--- a/arch/arm/mach-uniphier/dram/ddrphy-regs.h
+++ b/arch/arm/mach-uniphier/dram/ddrphy-regs.h
@@ -9,6 +9,7 @@
 #ifndef ARCH_DDRPHY_REGS_H
 #define ARCH_DDRPHY_REGS_H
 
+#include <linux/bitops.h>
 #define PHY_REG_SHIFT		2
 
 #define PHY_RIDR		(0x000 << PHY_REG_SHIFT)
diff --git a/arch/arm/mach-uniphier/dram/umc-pxs2.c b/arch/arm/mach-uniphier/dram/umc-pxs2.c
index 7de6b7fbde..3f7e5f30ba 100644
--- a/arch/arm/mach-uniphier/dram/umc-pxs2.c
+++ b/arch/arm/mach-uniphier/dram/umc-pxs2.c
@@ -9,6 +9,7 @@
 
 #include <init.h>
 #include <log.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/io.h>
diff --git a/arch/arm/mach-uniphier/init.h b/arch/arm/mach-uniphier/init.h
index 3c77f48853..622303786c 100644
--- a/arch/arm/mach-uniphier/init.h
+++ b/arch/arm/mach-uniphier/init.h
@@ -7,6 +7,7 @@
 #ifndef __MACH_INIT_H
 #define __MACH_INIT_H
 
+#include <linux/bitops.h>
 #include <linux/types.h>
 
 #define UNIPHIER_MAX_NR_DRAM_CH		3
diff --git a/arch/arm/mach-versal/include/mach/hardware.h b/arch/arm/mach-versal/include/mach/hardware.h
index e26beab2e9..9af5afd3f3 100644
--- a/arch/arm/mach-versal/include/mach/hardware.h
+++ b/arch/arm/mach-versal/include/mach/hardware.h
@@ -3,6 +3,10 @@
  * Copyright 2016 - 2018 Xilinx, Inc.
  */
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 #define VERSAL_CRL_APB_BASEADDR	0xFF5E0000
 
 #define CRL_APB_TIMESTAMP_REF_CTRL_CLKACT_BIT	BIT(25)
diff --git a/arch/arm/mach-zynqmp/include/mach/hardware.h b/arch/arm/mach-zynqmp/include/mach/hardware.h
index a0acfa2ff1..c5ba42124b 100644
--- a/arch/arm/mach-zynqmp/include/mach/hardware.h
+++ b/arch/arm/mach-zynqmp/include/mach/hardware.h
@@ -7,6 +7,10 @@
 #ifndef _ASM_ARCH_HARDWARE_H
 #define _ASM_ARCH_HARDWARE_H
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 #define ZYNQMP_TCM_BASE_ADDR	0xFFE00000
 #define ZYNQMP_TCM_SIZE		0x40000
 
diff --git a/arch/mips/include/asm/cm.h b/arch/mips/include/asm/cm.h
index 8f37471f81..3878171607 100644
--- a/arch/mips/include/asm/cm.h
+++ b/arch/mips/include/asm/cm.h
@@ -39,6 +39,7 @@
 #ifndef __ASSEMBLY__
 
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 static inline void *mips_cm_base(void)
 {
diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h
index f80311e64e..7538e6b2e0 100644
--- a/arch/mips/include/asm/mipsregs.h
+++ b/arch/mips/include/asm/mipsregs.h
@@ -27,6 +27,7 @@
 #ifdef __ASSEMBLY__
 #define _ULCAST_
 #else
+#include <linux/bitops.h>
 #define _ULCAST_ (unsigned long)
 #endif
 
diff --git a/arch/mips/lib/reloc.c b/arch/mips/lib/reloc.c
index 1e3cfadd2d..ffc8c7a1b7 100644
--- a/arch/mips/lib/reloc.c
+++ b/arch/mips/lib/reloc.c
@@ -31,6 +31,7 @@
 #include <init.h>
 #include <asm/relocs.h>
 #include <asm/sections.h>
+#include <linux/bitops.h>
 
 /**
  * read_uint() - Read an unsigned integer from the buffer
diff --git a/arch/mips/mach-ath79/ar933x/ddr.c b/arch/mips/mach-ath79/ar933x/ddr.c
index 2cf0b2cb1f..09166ecf8f 100644
--- a/arch/mips/mach-ath79/ar933x/ddr.c
+++ b/arch/mips/mach-ath79/ar933x/ddr.c
@@ -8,6 +8,7 @@
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
+#include <linux/bitops.h>
 #include <mach/ar71xx_regs.h>
 #include <mach/ath79.h>
 
diff --git a/arch/mips/mach-ath79/ar934x/clk.c b/arch/mips/mach-ath79/ar934x/clk.c
index bb972b3a60..9fa2225ed2 100644
--- a/arch/mips/mach-ath79/ar934x/clk.c
+++ b/arch/mips/mach-ath79/ar934x/clk.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <mach/ar71xx_regs.h>
 #include <mach/ath79.h>
diff --git a/arch/mips/mach-ath79/ar934x/ddr.c b/arch/mips/mach-ath79/ar934x/ddr.c
index 9c5a6b68ec..218f60a96c 100644
--- a/arch/mips/mach-ath79/ar934x/ddr.c
+++ b/arch/mips/mach-ath79/ar934x/ddr.c
@@ -9,6 +9,7 @@
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <mach/ar71xx_regs.h>
 #include <mach/ath79.h>
diff --git a/arch/mips/mach-ath79/qca953x/ddr.c b/arch/mips/mach-ath79/qca953x/ddr.c
index 3a009bb532..78f2370e09 100644
--- a/arch/mips/mach-ath79/qca953x/ddr.c
+++ b/arch/mips/mach-ath79/qca953x/ddr.c
@@ -8,6 +8,7 @@
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <mach/ar71xx_regs.h>
 #include <mach/ath79.h>
diff --git a/arch/mips/mach-ath79/reset.c b/arch/mips/mach-ath79/reset.c
index 62330a6575..6cd5e77fd1 100644
--- a/arch/mips/mach-ath79/reset.c
+++ b/arch/mips/mach-ath79/reset.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
diff --git a/arch/mips/mach-jz47xx/include/mach/jz4780_dram.h b/arch/mips/mach-jz47xx/include/mach/jz4780_dram.h
index 92d431bd04..61cc148988 100644
--- a/arch/mips/mach-jz47xx/include/mach/jz4780_dram.h
+++ b/arch/mips/mach-jz47xx/include/mach/jz4780_dram.h
@@ -12,6 +12,7 @@
 /*
  * DDR
  */
+#include <linux/bitops.h>
 #define DDRC_ST				0x0
 #define DDRC_CFG			0x4
 #define DDRC_CTRL			0x8
diff --git a/arch/mips/mach-jz47xx/jz4780/gpio.c b/arch/mips/mach-jz47xx/jz4780/gpio.c
index cee2328ab1..d4884e7fa9 100644
--- a/arch/mips/mach-jz47xx/jz4780/gpio.c
+++ b/arch/mips/mach-jz47xx/jz4780/gpio.c
@@ -3,6 +3,7 @@
 #include <config.h>
 #include <common.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <mach/jz4780.h>
 
 int jz47xx_gpio_get_value(unsigned int gpio)
diff --git a/arch/mips/mach-jz47xx/jz4780/pll.c b/arch/mips/mach-jz47xx/jz4780/pll.c
index 43827d1967..323c634fb3 100644
--- a/arch/mips/mach-jz47xx/jz4780/pll.c
+++ b/arch/mips/mach-jz47xx/jz4780/pll.c
@@ -9,6 +9,7 @@
 #include <config.h>
 #include <common.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <mach/jz4780.h>
 
diff --git a/arch/mips/mach-jz47xx/jz4780/reset.c b/arch/mips/mach-jz47xx/jz4780/reset.c
index 73af34721f..bf6addccb5 100644
--- a/arch/mips/mach-jz47xx/jz4780/reset.c
+++ b/arch/mips/mach-jz47xx/jz4780/reset.c
@@ -9,6 +9,7 @@
 #include <config.h>
 #include <common.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <mach/jz4780.h>
 
 /* WDT */
diff --git a/arch/mips/mach-jz47xx/jz4780/sdram.c b/arch/mips/mach-jz47xx/jz4780/sdram.c
index efbb82f62b..690f3c5601 100644
--- a/arch/mips/mach-jz47xx/jz4780/sdram.c
+++ b/arch/mips/mach-jz47xx/jz4780/sdram.c
@@ -13,6 +13,7 @@
 #include <hang.h>
 #include <init.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <mach/jz4780.h>
 #include <mach/jz4780_dram.h>
diff --git a/arch/mips/mach-jz47xx/jz4780/timer.c b/arch/mips/mach-jz47xx/jz4780/timer.c
index 70db74d3a0..82bb9e8c3b 100644
--- a/arch/mips/mach-jz47xx/jz4780/timer.c
+++ b/arch/mips/mach-jz47xx/jz4780/timer.c
@@ -14,6 +14,7 @@
 #include <time.h>
 #include <asm/io.h>
 #include <asm/mipsregs.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <mach/jz4780.h>
 
diff --git a/arch/mips/mach-mscc/cpu.c b/arch/mips/mach-mscc/cpu.c
index 8273a0f5aa..b4ffd44ea4 100644
--- a/arch/mips/mach-mscc/cpu.c
+++ b/arch/mips/mach-mscc/cpu.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <linux/bitops.h>
 
 #include <asm/io.h>
 #include <asm/types.h>
diff --git a/arch/mips/mach-mscc/gpio.c b/arch/mips/mach-mscc/gpio.c
index 5e3a53372d..d6b4c5d768 100644
--- a/arch/mips/mach-mscc/gpio.c
+++ b/arch/mips/mach-mscc/gpio.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 void mscc_gpio_set_alternate(int gpio, int mode)
 {
diff --git a/arch/mips/mach-mscc/include/mach/ddr.h b/arch/mips/mach-mscc/include/mach/ddr.h
index bf75e52ec3..d52eabbd2b 100644
--- a/arch/mips/mach-mscc/include/mach/ddr.h
+++ b/arch/mips/mach-mscc/include/mach/ddr.h
@@ -9,6 +9,7 @@
 #include <asm/cacheops.h>
 #include <asm/io.h>
 #include <asm/reboot.h>
+#include <linux/bitops.h>
 #include <mach/common.h>
 
 #define MIPS_VCOREIII_MEMORY_DDR3
diff --git a/arch/mips/mach-mscc/include/mach/jr2/jr2_devcpu_gcb.h b/arch/mips/mach-mscc/include/mach/jr2/jr2_devcpu_gcb.h
index 4a1228d29f..8d1d21b9b1 100644
--- a/arch/mips/mach-mscc/include/mach/jr2/jr2_devcpu_gcb.h
+++ b/arch/mips/mach-mscc/include/mach/jr2/jr2_devcpu_gcb.h
@@ -6,6 +6,8 @@
 #ifndef _MSCC_JR2_DEVCPU_GCB_H_
 #define _MSCC_JR2_DEVCPU_GCB_H_
 
+#include <linux/bitops.h>
+
 #define PERF_GPR                                          0x4
 
 #define PERF_SOFT_RST                                     0x8
diff --git a/arch/mips/mach-mscc/include/mach/jr2/jr2_devcpu_gcb_miim_regs.h b/arch/mips/mach-mscc/include/mach/jr2/jr2_devcpu_gcb_miim_regs.h
index 3c84edc18a..e11ad8788f 100644
--- a/arch/mips/mach-mscc/include/mach/jr2/jr2_devcpu_gcb_miim_regs.h
+++ b/arch/mips/mach-mscc/include/mach/jr2/jr2_devcpu_gcb_miim_regs.h
@@ -6,6 +6,8 @@
 #ifndef _MSCC_JR2_DEVCPU_GCB_MIIM_REGS_H_
 #define _MSCC_JR2_DEVCPU_GCB_MIIM_REGS_H_
 
+#include <linux/bitops.h>
+
 #define MIIM_MII_STATUS(gi)  (0xc8 + (gi * 36))
 #define MIIM_MII_CMD(gi)     (0xd0 + (gi * 36))
 #define MIIM_MII_DATA(gi)    (0xd4 + (gi * 36))
diff --git a/arch/mips/mach-mscc/include/mach/jr2/jr2_icpu_cfg.h b/arch/mips/mach-mscc/include/mach/jr2/jr2_icpu_cfg.h
index 6e0bbe2746..151bb3e6d4 100644
--- a/arch/mips/mach-mscc/include/mach/jr2/jr2_icpu_cfg.h
+++ b/arch/mips/mach-mscc/include/mach/jr2/jr2_icpu_cfg.h
@@ -6,6 +6,8 @@
 #ifndef _MSCC_JR2_ICPU_CFG_H_
 #define _MSCC_JR2_ICPU_CFG_H_
 
+#include <linux/bitops.h>
+
 #define ICPU_GPR(x)                                       (0x4 * (x))
 #define ICPU_GPR_RSZ                                      0x4
 
diff --git a/arch/mips/mach-mscc/include/mach/luton/luton_devcpu_gcb.h b/arch/mips/mach-mscc/include/mach/luton/luton_devcpu_gcb.h
index a74a68593d..750a8013d1 100644
--- a/arch/mips/mach-mscc/include/mach/luton/luton_devcpu_gcb.h
+++ b/arch/mips/mach-mscc/include/mach/luton/luton_devcpu_gcb.h
@@ -6,6 +6,7 @@
 #ifndef _MSCC_OCELOT_DEVCPU_GCB_H_
 #define _MSCC_OCELOT_DEVCPU_GCB_H_
 
+#include <linux/bitops.h>
 #define PERF_SOFT_RST                                     0x90
 
 #define PERF_SOFT_RST_SOFT_SWC_RST                        BIT(1)
diff --git a/arch/mips/mach-mscc/include/mach/luton/luton_devcpu_gcb_miim_regs.h b/arch/mips/mach-mscc/include/mach/luton/luton_devcpu_gcb_miim_regs.h
index 2303734894..07c4f9aeb6 100644
--- a/arch/mips/mach-mscc/include/mach/luton/luton_devcpu_gcb_miim_regs.h
+++ b/arch/mips/mach-mscc/include/mach/luton/luton_devcpu_gcb_miim_regs.h
@@ -8,6 +8,7 @@
 #ifndef _MSCC_LUTON_MIIM_REGS_H_
 #define _MSCC_LUTON_MIIM_REGS_H_
 
+#include <linux/bitops.h>
 #define MIIM_MII_STATUS(gi) (0xa0 + (gi * 36))
 #define MIIM_MII_CMD(gi)    (0xa8 + (gi * 36))
 #define MIIM_MII_DATA(gi)   (0xac + (gi * 36))
diff --git a/arch/mips/mach-mscc/include/mach/luton/luton_icpu_cfg.h b/arch/mips/mach-mscc/include/mach/luton/luton_icpu_cfg.h
index 9233f037bb..ded7c5fa77 100644
--- a/arch/mips/mach-mscc/include/mach/luton/luton_icpu_cfg.h
+++ b/arch/mips/mach-mscc/include/mach/luton/luton_icpu_cfg.h
@@ -6,6 +6,7 @@
 #ifndef _MSCC_OCELOT_ICPU_CFG_H_
 #define _MSCC_OCELOT_ICPU_CFG_H_
 
+#include <linux/bitops.h>
 #define ICPU_GPR(x) (0x4 * (x))
 #define ICPU_GPR_RSZ                                      0x4
 
diff --git a/arch/mips/mach-mscc/include/mach/ocelot/ocelot_devcpu_gcb.h b/arch/mips/mach-mscc/include/mach/ocelot/ocelot_devcpu_gcb.h
index b2a4203644..5715ec164c 100644
--- a/arch/mips/mach-mscc/include/mach/ocelot/ocelot_devcpu_gcb.h
+++ b/arch/mips/mach-mscc/include/mach/ocelot/ocelot_devcpu_gcb.h
@@ -6,6 +6,7 @@
 #ifndef _MSCC_OCELOT_DEVCPU_GCB_H_
 #define _MSCC_OCELOT_DEVCPU_GCB_H_
 
+#include <linux/bitops.h>
 #define PERF_SOFT_RST                                     0x8
 
 #define PERF_SOFT_RST_SOFT_NON_CFG_RST                    BIT(2)
diff --git a/arch/mips/mach-mscc/include/mach/ocelot/ocelot_devcpu_gcb_miim_regs.h b/arch/mips/mach-mscc/include/mach/ocelot/ocelot_devcpu_gcb_miim_regs.h
index 4ad92214a3..50cf073eab 100644
--- a/arch/mips/mach-mscc/include/mach/ocelot/ocelot_devcpu_gcb_miim_regs.h
+++ b/arch/mips/mach-mscc/include/mach/ocelot/ocelot_devcpu_gcb_miim_regs.h
@@ -6,6 +6,7 @@
 #ifndef _MSCC_OCELOT_DEVCPU_GCB_MIIM_REGS_H_
 #define _MSCC_OCELOT_DEVCPU_GCB_MIIM_REGS_H_
 
+#include <linux/bitops.h>
 #define MIIM_MII_STATUS(gi) (0x9c + (gi * 36))
 #define MIIM_MII_CMD(gi)    (0xa4 + (gi * 36))
 #define MIIM_MII_DATA(gi)   (0xa8 + (gi * 36))
diff --git a/arch/mips/mach-mscc/include/mach/ocelot/ocelot_icpu_cfg.h b/arch/mips/mach-mscc/include/mach/ocelot/ocelot_icpu_cfg.h
index 04cf70bec3..fb10bf2c26 100644
--- a/arch/mips/mach-mscc/include/mach/ocelot/ocelot_icpu_cfg.h
+++ b/arch/mips/mach-mscc/include/mach/ocelot/ocelot_icpu_cfg.h
@@ -6,6 +6,7 @@
 #ifndef _MSCC_OCELOT_ICPU_CFG_H_
 #define _MSCC_OCELOT_ICPU_CFG_H_
 
+#include <linux/bitops.h>
 #define ICPU_GPR(x) (0x4 * (x))
 #define ICPU_GPR_RSZ                                      0x4
 
diff --git a/arch/mips/mach-mscc/include/mach/serval/serval_devcpu_gcb.h b/arch/mips/mach-mscc/include/mach/serval/serval_devcpu_gcb.h
index 9b80fdb574..43d40be716 100644
--- a/arch/mips/mach-mscc/include/mach/serval/serval_devcpu_gcb.h
+++ b/arch/mips/mach-mscc/include/mach/serval/serval_devcpu_gcb.h
@@ -6,6 +6,7 @@
 #ifndef _MSCC_SERVAL_DEVCPU_GCB_H_
 #define _MSCC_SERVAL_DEVCPU_GCB_H_
 
+#include <linux/bitops.h>
 #define CHIP_ID                                           0x0
 
 #define PERF_GPR                                          0x4
diff --git a/arch/mips/mach-mscc/include/mach/serval/serval_devcpu_gcb_miim_regs.h b/arch/mips/mach-mscc/include/mach/serval/serval_devcpu_gcb_miim_regs.h
index a3abbc4015..e8cb1dcf9a 100644
--- a/arch/mips/mach-mscc/include/mach/serval/serval_devcpu_gcb_miim_regs.h
+++ b/arch/mips/mach-mscc/include/mach/serval/serval_devcpu_gcb_miim_regs.h
@@ -6,6 +6,7 @@
 #ifndef _MSCC_SERVAL_DEVCPU_GCB_MIIM_REGS_H_
 #define _MSCC_SERVAL_DEVCPU_GCB_MIIM_REGS_H_
 
+#include <linux/bitops.h>
 #define MIIM_MII_STATUS(gi)  (0x5c + (gi * 36))
 #define MIIM_MII_CMD(gi)     (0x64 + (gi * 36))
 #define MIIM_MII_DATA(gi)    (0x68 + (gi * 36))
diff --git a/arch/mips/mach-mscc/include/mach/serval/serval_icpu_cfg.h b/arch/mips/mach-mscc/include/mach/serval/serval_icpu_cfg.h
index b8c9d5ca49..4d4151b3d5 100644
--- a/arch/mips/mach-mscc/include/mach/serval/serval_icpu_cfg.h
+++ b/arch/mips/mach-mscc/include/mach/serval/serval_icpu_cfg.h
@@ -6,6 +6,7 @@
 #ifndef _MSCC_SERVAL_ICPU_CFG_H_
 #define _MSCC_SERVAL_ICPU_CFG_H_
 
+#include <linux/bitops.h>
 #define ICPU_GPR(x)                                       (0x4 * (x))
 #define ICPU_GPR_RSZ                                      0x8
 
diff --git a/arch/mips/mach-mscc/include/mach/servalt/servalt_devcpu_gcb.h b/arch/mips/mach-mscc/include/mach/servalt/servalt_devcpu_gcb.h
index 493eaad1df..7d6c64f316 100644
--- a/arch/mips/mach-mscc/include/mach/servalt/servalt_devcpu_gcb.h
+++ b/arch/mips/mach-mscc/include/mach/servalt/servalt_devcpu_gcb.h
@@ -6,6 +6,7 @@
 #ifndef _MSCC_SERVALT_DEVCPU_GCB_H_
 #define _MSCC_SERVALT_DEVCPU_GCB_H_
 
+#include <linux/bitops.h>
 #define PERF_GPR                                          0x4
 
 #define PERF_SOFT_RST                                     0x8
diff --git a/arch/mips/mach-mscc/include/mach/servalt/servalt_devcpu_gcb_miim_regs.h b/arch/mips/mach-mscc/include/mach/servalt/servalt_devcpu_gcb_miim_regs.h
index 8c67190ecb..72d7c4d08d 100644
--- a/arch/mips/mach-mscc/include/mach/servalt/servalt_devcpu_gcb_miim_regs.h
+++ b/arch/mips/mach-mscc/include/mach/servalt/servalt_devcpu_gcb_miim_regs.h
@@ -6,6 +6,7 @@
 #ifndef _MSCC_SERVALT_DEVCPU_GCB_MIIM_REGS_H_
 #define _MSCC_SERVALT_DEVCPU_GCB_MIIM_REGS_H_
 
+#include <linux/bitops.h>
 #define MIIM_MII_STATUS(gi)  (0xc4 + (gi * 36))
 #define MIIM_MII_CMD(gi)     (0xcc + (gi * 36))
 #define MIIM_MII_DATA(gi)    (0xd0 + (gi * 36))
diff --git a/arch/mips/mach-mscc/include/mach/servalt/servalt_icpu_cfg.h b/arch/mips/mach-mscc/include/mach/servalt/servalt_icpu_cfg.h
index 491ead169f..13967f66b0 100644
--- a/arch/mips/mach-mscc/include/mach/servalt/servalt_icpu_cfg.h
+++ b/arch/mips/mach-mscc/include/mach/servalt/servalt_icpu_cfg.h
@@ -6,6 +6,7 @@
 #ifndef _MSCC_SERVALT_ICPU_CFG_H_
 #define _MSCC_SERVALT_ICPU_CFG_H_
 
+#include <linux/bitops.h>
 #define ICPU_GPR(x)                                       (0x4 * (x))
 #define ICPU_GPR_RSZ                                      0x8
 
diff --git a/arch/mips/mach-mscc/include/mach/tlb.h b/arch/mips/mach-mscc/include/mach/tlb.h
index fdb554f551..ebd8ad0dc1 100644
--- a/arch/mips/mach-mscc/include/mach/tlb.h
+++ b/arch/mips/mach-mscc/include/mach/tlb.h
@@ -7,6 +7,7 @@
 #define __ASM_MACH_TLB_H
 
 #include <asm/mipsregs.h>
+#include <linux/bitops.h>
 #include <mach/common.h>
 #include <linux/sizes.h>
 
diff --git a/arch/mips/mach-mtmips/cpu.c b/arch/mips/mach-mtmips/cpu.c
index 9ee5c7fdf6..2ddf8cb096 100644
--- a/arch/mips/mach-mtmips/cpu.c
+++ b/arch/mips/mach-mtmips/cpu.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <init.h>
 #include <malloc.h>
+#include <linux/bitops.h>
 #include <linux/io.h>
 #include <linux/sizes.h>
 
diff --git a/arch/mips/mach-mtmips/ddr_calibrate.c b/arch/mips/mach-mtmips/ddr_calibrate.c
index dfc42ba92f..0b5d437007 100644
--- a/arch/mips/mach-mtmips/ddr_calibrate.c
+++ b/arch/mips/mach-mtmips/ddr_calibrate.c
@@ -19,6 +19,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <log.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/io.h>
 #include <asm/cacheops.h>
diff --git a/arch/nios2/cpu/cpu.c b/arch/nios2/cpu/cpu.c
index 756535a0b4..7f5e731a0f 100644
--- a/arch/nios2/cpu/cpu.c
+++ b/arch/nios2/cpu/cpu.c
@@ -13,6 +13,7 @@
 #include <init.h>
 #include <irq_func.h>
 #include <asm/cache.h>
+#include <asm/system.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/powerpc/cpu/mpc83xx/pci.c b/arch/powerpc/cpu/mpc83xx/pci.c
index 74f824d2bc..f017985ae9 100644
--- a/arch/powerpc/cpu/mpc83xx/pci.c
+++ b/arch/powerpc/cpu/mpc83xx/pci.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <init.h>
 #include <pci.h>
+#include <asm/bitops.h>
 #include <linux/delay.h>
 
 #if defined(CONFIG_OF_LIBFDT)
diff --git a/arch/powerpc/cpu/mpc83xx/spd_sdram.c b/arch/powerpc/cpu/mpc83xx/spd_sdram.c
index c28e4425ee..aeff007fb0 100644
--- a/arch/powerpc/cpu/mpc83xx/spd_sdram.c
+++ b/arch/powerpc/cpu/mpc83xx/spd_sdram.c
@@ -23,6 +23,7 @@
 #include <spd.h>
 #include <asm/mmu.h>
 #include <spd_sdram.h>
+#include <asm/bitops.h>
 #include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/powerpc/cpu/mpc85xx/pci.c b/arch/powerpc/cpu/mpc85xx/pci.c
index 1d0213a513..9a6fc13b73 100644
--- a/arch/powerpc/cpu/mpc85xx/pci.c
+++ b/arch/powerpc/cpu/mpc85xx/pci.c
@@ -9,6 +9,7 @@
  * PCI Configuration space access support for MPC85xx PCI Bridge
  */
 #include <common.h>
+#include <asm/bitops.h>
 #include <asm/cpm_85xx.h>
 #include <pci.h>
 
diff --git a/arch/powerpc/cpu/mpc85xx/tlb.c b/arch/powerpc/cpu/mpc85xx/tlb.c
index 808d953c52..4465ae7565 100644
--- a/arch/powerpc/cpu/mpc85xx/tlb.c
+++ b/arch/powerpc/cpu/mpc85xx/tlb.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <asm/bitops.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #ifdef CONFIG_ADDR_MAP
diff --git a/arch/powerpc/cpu/mpc8xxx/fsl_pamu.c b/arch/powerpc/cpu/mpc8xxx/fsl_pamu.c
index 3d00de3181..2c378b7615 100644
--- a/arch/powerpc/cpu/mpc8xxx/fsl_pamu.c
+++ b/arch/powerpc/cpu/mpc8xxx/fsl_pamu.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <linux/bitops.h>
 #include <linux/log2.h>
 #include <malloc.h>
 #include <asm/fsl_pamu.h>
diff --git a/arch/powerpc/cpu/mpc8xxx/law.c b/arch/powerpc/cpu/mpc8xxx/law.c
index ca9e6aa8eb..e388386ad4 100644
--- a/arch/powerpc/cpu/mpc8xxx/law.c
+++ b/arch/powerpc/cpu/mpc8xxx/law.c
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <asm/bitops.h>
 #include <linux/compiler.h>
 #include <asm/fsl_law.h>
 #include <asm/io.h>
diff --git a/arch/powerpc/include/asm/mmu.h b/arch/powerpc/include/asm/mmu.h
index 82e5f9ffc7..353dc4e874 100644
--- a/arch/powerpc/include/asm/mmu.h
+++ b/arch/powerpc/include/asm/mmu.h
@@ -7,6 +7,7 @@
 
 #ifndef __ASSEMBLY__
 /* Hardware Page Table Entry */
+#include <linux/bitops.h>
 typedef struct _PTE {
 #ifdef CONFIG_PPC64BRIDGE
 	unsigned long long vsid:52;
diff --git a/arch/powerpc/include/asm/u-boot.h b/arch/powerpc/include/asm/u-boot.h
index 1841565d0a..19b3c0db5f 100644
--- a/arch/powerpc/include/asm/u-boot.h
+++ b/arch/powerpc/include/asm/u-boot.h
@@ -13,6 +13,8 @@
 #ifndef __U_BOOT_H__
 #define __U_BOOT_H__
 
+#include <config.h>
+
 /* For image.h:image_check_target_arch() */
 #define IH_ARCH_DEFAULT IH_ARCH_PPC
 
diff --git a/arch/riscv/cpu/cpu.c b/arch/riscv/cpu/cpu.c
index 1cebb0322e..5804aa8e73 100644
--- a/arch/riscv/cpu/cpu.c
+++ b/arch/riscv/cpu/cpu.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <asm/encoding.h>
 #include <dm/uclass-internal.h>
+#include <linux/bitops.h>
 
 /*
  * The variables here must be stored in the data section since they are used
diff --git a/arch/riscv/include/asm/encoding.h b/arch/riscv/include/asm/encoding.h
index a0695da936..edafad36b3 100644
--- a/arch/riscv/include/asm/encoding.h
+++ b/arch/riscv/include/asm/encoding.h
@@ -8,6 +8,9 @@
 #define RISCV_CSR_ENCODING_H
 
 #include <asm/csr.h>
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
 
 #if CONFIG_IS_ENABLED(RISCV_SMODE)
 #define MODE_PREFIX(__suffix)	s##__suffix
diff --git a/arch/sh/lib/time.c b/arch/sh/lib/time.c
index d09f782f5f..f951544728 100644
--- a/arch/sh/lib/time.c
+++ b/arch/sh/lib/time.c
@@ -14,6 +14,7 @@
 #include <init.h>
 #include <asm/processor.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 #if defined(CONFIG_CPU_SH4) || defined(CONFIG_ARCH_RMOBILE)
 #define TSTR	0x4
diff --git a/arch/x86/cpu/apollolake/fsp_s.c b/arch/x86/cpu/apollolake/fsp_s.c
index 7d62af9cc0..3e303f8f32 100644
--- a/arch/x86/cpu/apollolake/fsp_s.c
+++ b/arch/x86/cpu/apollolake/fsp_s.c
@@ -23,6 +23,7 @@
 #include <asm/arch/systemagent.h>
 #include <asm/arch/fsp/fsp_configs.h>
 #include <asm/arch/fsp/fsp_s_upd.h>
+#include <linux/bitops.h>
 
 #define PCH_P2SB_E0		0xe0
 #define HIDE_BIT		BIT(0)
diff --git a/arch/x86/cpu/apollolake/pmc.c b/arch/x86/cpu/apollolake/pmc.c
index c82cbdca6a..192dec7109 100644
--- a/arch/x86/cpu/apollolake/pmc.c
+++ b/arch/x86/cpu/apollolake/pmc.c
@@ -16,6 +16,7 @@
 #include <acpi/acpi_s3.h>
 #include <asm/io.h>
 #include <asm/pci.h>
+#include <linux/bitops.h>
 #include <power/acpi_pmc.h>
 
 #define GPIO_GPE_CFG		0x1050
diff --git a/arch/x86/cpu/baytrail/valleyview.c b/arch/x86/cpu/baytrail/valleyview.c
index f2e48f401f..f73738ce5c 100644
--- a/arch/x86/cpu/baytrail/valleyview.c
+++ b/arch/x86/cpu/baytrail/valleyview.c
@@ -11,6 +11,7 @@
 #include <asm/mrccache.h>
 #include <asm/post.h>
 #include <asm/arch/iomap.h>
+#include <linux/bitops.h>
 
 /* GPIO SUS */
 #define GPIO_SUS_PAD_BASE	(IO_BASE_ADDRESS + IO_BASE_OFFSET_GPSSUS)
diff --git a/arch/x86/cpu/intel_common/lpc.c b/arch/x86/cpu/intel_common/lpc.c
index 2a538cf12e..3420f03cca 100644
--- a/arch/x86/cpu/intel_common/lpc.c
+++ b/arch/x86/cpu/intel_common/lpc.c
@@ -12,6 +12,7 @@
 #include <asm/intel_regs.h>
 #include <asm/io.h>
 #include <asm/lpc_common.h>
+#include <linux/bitops.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/x86/cpu/intel_common/p2sb.c b/arch/x86/cpu/intel_common/p2sb.c
index 860eaf91f3..ec35d04ae5 100644
--- a/arch/x86/cpu/intel_common/p2sb.c
+++ b/arch/x86/cpu/intel_common/p2sb.c
@@ -14,6 +14,7 @@
 #include <p2sb.h>
 #include <spl.h>
 #include <asm/pci.h>
+#include <linux/bitops.h>
 
 struct p2sb_platdata {
 #if CONFIG_IS_ENABLED(OF_PLATDATA)
diff --git a/arch/x86/cpu/ivybridge/bd82x6x.c b/arch/x86/cpu/ivybridge/bd82x6x.c
index d72c0d637a..5448f064fc 100644
--- a/arch/x86/cpu/ivybridge/bd82x6x.c
+++ b/arch/x86/cpu/ivybridge/bd82x6x.c
@@ -18,6 +18,7 @@
 #include <asm/arch/model_206ax.h>
 #include <asm/arch/pch.h>
 #include <asm/arch/sandybridge.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/include/asm/arch-apollolake/lpc.h b/arch/x86/include/asm/arch-apollolake/lpc.h
index 5d2adad319..977b7eccd8 100644
--- a/arch/x86/include/asm/arch-apollolake/lpc.h
+++ b/arch/x86/include/asm/arch-apollolake/lpc.h
@@ -7,6 +7,7 @@
 #ifndef _ASM_ARCH_LPC_H
 #define _ASM_ARCH_LPC_H
 
+#include <linux/bitops.h>
 #define LPC_SERIRQ_CTL			0x64
 #define  LPC_SCNT_EN			BIT(7)
 #define  LPC_SCNT_MODE			BIT(6)
diff --git a/arch/x86/include/asm/arch-apollolake/systemagent.h b/arch/x86/include/asm/arch-apollolake/systemagent.h
index 206d8903fa..9e7bd62751 100644
--- a/arch/x86/include/asm/arch-apollolake/systemagent.h
+++ b/arch/x86/include/asm/arch-apollolake/systemagent.h
@@ -8,6 +8,7 @@
 #define _ASM_ARCH_SYSTEMAGENT_H
 
 /* Device 0:0.0 PCI configuration space */
+#include <linux/bitops.h>
 #define MCHBAR		0x48
 
 /* RAPL Package Power Limit register under MCHBAR */
diff --git a/arch/x86/include/asm/arch-broadwell/adsp.h b/arch/x86/include/asm/arch-broadwell/adsp.h
index eb825ce1c0..a5a1f73bf4 100644
--- a/arch/x86/include/asm/arch-broadwell/adsp.h
+++ b/arch/x86/include/asm/arch-broadwell/adsp.h
@@ -10,6 +10,7 @@
 #ifndef __ASM_ARCH_BROADWELL_ADSP_H
 #define __ASM_ARCH_BROADWELL_ADSP_H
 
+#include <linux/bitops.h>
 #define ADSP_PCI_IRQ			23
 #define ADSP_ACPI_IRQ			3
 #define  ADSP_ACPI_IRQEN		BIT(3)
diff --git a/arch/x86/include/asm/arch-broadwell/serialio.h b/arch/x86/include/asm/arch-broadwell/serialio.h
index 5e98eaf53f..ff09278b96 100644
--- a/arch/x86/include/asm/arch-broadwell/serialio.h
+++ b/arch/x86/include/asm/arch-broadwell/serialio.h
@@ -9,6 +9,7 @@
 #define __ARCH_BROADWELL_SERIALIO_H_
 
 /* Serial IO IOBP Registers */
+#include <linux/bitops.h>
 #define SIO_IOBP_PORTCTRL0	0xcb000000	/* SDIO D23:F0 */
 #define  SIO_IOBP_PORTCTRL0_ACPI_IRQ_EN		BIT(5)
 #define  SIO_IOBP_PORTCTRL0_PCI_CONF_DIS	BIT(4)
diff --git a/arch/x86/include/asm/atomic.h b/arch/x86/include/asm/atomic.h
index 806f787381..4ca0f79bff 100644
--- a/arch/x86/include/asm/atomic.h
+++ b/arch/x86/include/asm/atomic.h
@@ -1,6 +1,7 @@
 #ifndef _ASM_X86_ATOMIC_H
 #define _ASM_X86_ATOMIC_H
 
+#include <linux/bitops.h>
 #include <linux/compiler.h>
 #include <linux/types.h>
 #include <asm/processor.h>
diff --git a/arch/x86/include/asm/fast_spi.h b/arch/x86/include/asm/fast_spi.h
index 6894298526..47c1da80d7 100644
--- a/arch/x86/include/asm/fast_spi.h
+++ b/arch/x86/include/asm/fast_spi.h
@@ -7,6 +7,7 @@
 #define ASM_FAST_SPI_H
 
 /* Register offsets from the MMIO region base (PCI_BASE_ADDRESS_0) */
+#include <linux/bitops.h>
 struct fast_spi_regs {
 	u32 bfp;
 	u32 hsfsts_ctl;
diff --git a/arch/x86/include/asm/intel_pinctrl.h b/arch/x86/include/asm/intel_pinctrl.h
index 72fd9246cb..e2524b089d 100644
--- a/arch/x86/include/asm/intel_pinctrl.h
+++ b/arch/x86/include/asm/intel_pinctrl.h
@@ -10,6 +10,7 @@
 #define __ASM_INTEL_PINCTRL_H
 
 #include <dm/pinctrl.h>
+#include <linux/bitops.h>
 
 /**
  * struct pad_config - config for a pad
diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h
index 246c14f815..94e6b18e21 100644
--- a/arch/x86/include/asm/msr-index.h
+++ b/arch/x86/include/asm/msr-index.h
@@ -9,6 +9,10 @@
 #ifndef _ASM_X86_MSR_INDEX_H
 #define _ASM_X86_MSR_INDEX_H
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 /* CPU model specific register (MSR) numbers */
 
 /* x86-64 specific MSRs */
diff --git a/arch/x86/lib/scu.c b/arch/x86/lib/scu.c
index 41e6739236..d29d701631 100644
--- a/arch/x86/lib/scu.c
+++ b/arch/x86/lib/scu.c
@@ -15,6 +15,7 @@
 #include <syscon.h>
 #include <asm/cpu.h>
 #include <asm/scu.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/io.h>
diff --git a/board/CZ.NIC/turris_mox/mox_sp.c b/board/CZ.NIC/turris_mox/mox_sp.c
index 8139345ff2..cc57b9f095 100644
--- a/board/CZ.NIC/turris_mox/mox_sp.c
+++ b/board/CZ.NIC/turris_mox/mox_sp.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <asm/arch/soc.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 #define RWTM_BASE		(MVEBU_REGISTER(0xb0000))
diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c
index 25759e09ec..2da878d364 100644
--- a/board/CZ.NIC/turris_omnia/turris_omnia.c
+++ b/board/CZ.NIC/turris_omnia/turris_omnia.c
@@ -21,6 +21,7 @@
 #include <dm/uclass.h>
 #include <fdt_support.h>
 #include <time.h>
+#include <linux/bitops.h>
 #include <u-boot/crc.h>
 # include <atsha204a-i2c.h>
 
diff --git a/board/Marvell/db-88f6281-bp/db-88f6281-bp.c b/board/Marvell/db-88f6281-bp/db-88f6281-bp.c
index a6f1167e39..62027bd638 100644
--- a/board/Marvell/db-88f6281-bp/db-88f6281-bp.c
+++ b/board/Marvell/db-88f6281-bp/db-88f6281-bp.c
@@ -3,6 +3,7 @@
 #include <common.h>
 #include <init.h>
 #include <net.h>
+#include <linux/bitops.h>
 #include <linux/io.h>
 #include <miiphy.h>
 #include <netdev.h>
diff --git a/board/Marvell/db-88f6720/db-88f6720.c b/board/Marvell/db-88f6720/db-88f6720.c
index ba0a944b9a..e9897b3976 100644
--- a/board/Marvell/db-88f6720/db-88f6720.c
+++ b/board/Marvell/db-88f6720/db-88f6720.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <linux/bitops.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/Marvell/db-88f6820-amc/db-88f6820-amc.c b/board/Marvell/db-88f6820-amc/db-88f6820-amc.c
index f225f467bf..60ce940e1d 100644
--- a/board/Marvell/db-88f6820-amc/db-88f6820-amc.c
+++ b/board/Marvell/db-88f6820-amc/db-88f6820-amc.c
@@ -12,6 +12,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <linux/bitops.h>
 
 #include "../drivers/ddr/marvell/a38x/ddr3_init.h"
 #include <../serdes/a38x/high_speed_env_spec.h>
diff --git a/board/Marvell/db-88f6820-gp/db-88f6820-gp.c b/board/Marvell/db-88f6820-gp/db-88f6820-gp.c
index 53a80c949b..08a3c1cc80 100644
--- a/board/Marvell/db-88f6820-gp/db-88f6820-gp.c
+++ b/board/Marvell/db-88f6820-gp/db-88f6820-gp.c
@@ -12,6 +12,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <linux/bitops.h>
 
 #include "../drivers/ddr/marvell/a38x/ddr3_init.h"
 #include <../serdes/a38x/high_speed_env_spec.h>
diff --git a/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c b/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c
index cb65357844..63bb771ab3 100644
--- a/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c
+++ b/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <linux/bitops.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/Marvell/db-xc3-24g4xg/db-xc3-24g4xg.c b/board/Marvell/db-xc3-24g4xg/db-xc3-24g4xg.c
index 1153b188e7..5f12a27002 100644
--- a/board/Marvell/db-xc3-24g4xg/db-xc3-24g4xg.c
+++ b/board/Marvell/db-xc3-24g4xg/db-xc3-24g4xg.c
@@ -7,6 +7,7 @@
 #include <i2c.h>
 #include <init.h>
 #include <asm/gpio.h>
+#include <linux/bitops.h>
 #include <linux/mbus.h>
 #include <linux/io.h>
 #include <asm/arch/cpu.h>
diff --git a/board/Synology/ds414/ds414.c b/board/Synology/ds414/ds414.c
index deb530fe78..632205164e 100644
--- a/board/Synology/ds414/ds414.c
+++ b/board/Synology/ds414/ds414.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <linux/bitops.h>
 #include <linux/mbus.h>
 
 #include "../drivers/ddr/marvell/axp/ddr3_hw_training.h"
diff --git a/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c b/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c
index 982cb157b7..668484b71b 100644
--- a/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c
+++ b/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <init.h>
 #include <net.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/io.h>
 #include <miiphy.h>
diff --git a/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c b/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c
index 5c9124fbb4..e4bf507cc3 100644
--- a/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c
+++ b/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c
@@ -10,6 +10,7 @@
 #include <net.h>
 #include <netdev.h>
 #include <led.h>
+#include <linux/bitops.h>
 #include <linux/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
diff --git a/board/alliedtelesis/x530/x530.c b/board/alliedtelesis/x530/x530.c
index 1a6dec04a3..c7438aeaf1 100644
--- a/board/alliedtelesis/x530/x530.c
+++ b/board/alliedtelesis/x530/x530.c
@@ -11,6 +11,7 @@
 #include <init.h>
 #include <wdt.h>
 #include <asm/gpio.h>
+#include <linux/bitops.h>
 #include <linux/mbus.h>
 #include <linux/io.h>
 #include <asm/arch/cpu.h>
diff --git a/board/cortina/presidio-asic/presidio.c b/board/cortina/presidio-asic/presidio.c
index 427151c8df..3c132f1271 100644
--- a/board/cortina/presidio-asic/presidio.c
+++ b/board/cortina/presidio-asic/presidio.c
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <netdev.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/compiler.h>
 #include <configs/presidio_asic.h>
 #include <linux/psci.h>
diff --git a/board/dhelectronics/dh_stm32mp1/board.c b/board/dhelectronics/dh_stm32mp1/board.c
index 376fc7032e..5f7211d451 100644
--- a/board/dhelectronics/dh_stm32mp1/board.c
+++ b/board/dhelectronics/dh_stm32mp1/board.c
@@ -32,6 +32,7 @@
 #include <mtd_node.h>
 #include <netdev.h>
 #include <phy.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <power/regulator.h>
 #include <remoteproc.h>
diff --git a/board/firefly/firefly-rk3308/roc_cc_rk3308.c b/board/firefly/firefly-rk3308/roc_cc_rk3308.c
index 5f0a6594b6..28dcc2a690 100644
--- a/board/firefly/firefly-rk3308/roc_cc_rk3308.c
+++ b/board/firefly/firefly-rk3308/roc_cc_rk3308.c
@@ -8,6 +8,7 @@
 #include <asm/io.h>
 #include <asm/arch/grf_rk3308.h>
 #include <asm/arch-rockchip/hardware.h>
+#include <linux/bitops.h>
 
 #if defined(CONFIG_DEBUG_UART)
 #define GRF_BASE	0xff000000
diff --git a/board/freescale/imx8mq_evk/imx8mq_evk.c b/board/freescale/imx8mq_evk/imx8mq_evk.c
index b2f464abb1..ae3be5785c 100644
--- a/board/freescale/imx8mq_evk/imx8mq_evk.c
+++ b/board/freescale/imx8mq_evk/imx8mq_evk.c
@@ -21,6 +21,7 @@
 #include <asm/mach-imx/mxc_i2c.h>
 #include <asm/arch/clock.h>
 #include <spl.h>
+#include <linux/bitops.h>
 #include <power/pmic.h>
 #include <power/pfuze100_pmic.h>
 #include "../common/pfuze.h"
diff --git a/board/freescale/lx2160a/lx2160a.c b/board/freescale/lx2160a/lx2160a.c
index fba068c824..88eb66b03b 100644
--- a/board/freescale/lx2160a/lx2160a.c
+++ b/board/freescale/lx2160a/lx2160a.c
@@ -16,6 +16,7 @@
 #include <fsl_sec.h>
 #include <asm/io.h>
 #include <fdt_support.h>
+#include <linux/bitops.h>
 #include <linux/libfdt.h>
 #include <fsl-mc/fsl_mc.h>
 #include <env_internal.h>
diff --git a/board/freescale/mpc8349emds/mpc8349emds.c b/board/freescale/mpc8349emds/mpc8349emds.c
index 688bffae79..576f04c144 100644
--- a/board/freescale/mpc8349emds/mpc8349emds.c
+++ b/board/freescale/mpc8349emds/mpc8349emds.c
@@ -9,6 +9,7 @@
 #include <init.h>
 #include <ioports.h>
 #include <mpc83xx.h>
+#include <asm/bitops.h>
 #include <asm/mpc8349_pci.h>
 #include <i2c.h>
 #include <spi.h>
diff --git a/board/freescale/mpc8349itx/mpc8349itx.c b/board/freescale/mpc8349itx/mpc8349itx.c
index 074f3d2928..3993d58515 100644
--- a/board/freescale/mpc8349itx/mpc8349itx.c
+++ b/board/freescale/mpc8349itx/mpc8349itx.c
@@ -17,6 +17,7 @@
 #include <pci.h>
 #endif
 #include <spd_sdram.h>
+#include <asm/bitops.h>
 #include <asm/mmu.h>
 #if defined(CONFIG_OF_LIBFDT)
 #include <linux/libfdt.h>
diff --git a/board/freescale/mpc837xemds/mpc837xemds.c b/board/freescale/mpc837xemds/mpc837xemds.c
index d53c861807..182391ca9c 100644
--- a/board/freescale/mpc837xemds/mpc837xemds.c
+++ b/board/freescale/mpc837xemds/mpc837xemds.c
@@ -9,6 +9,7 @@
 #include <i2c.h>
 #include <init.h>
 #include <net.h>
+#include <asm/bitops.h>
 #include <asm/io.h>
 #include <asm/fsl_mpc83xx_serdes.h>
 #include <spd_sdram.h>
diff --git a/board/freescale/mpc837xerdb/mpc837xerdb.c b/board/freescale/mpc837xerdb/mpc837xerdb.c
index 3fd2c5e849..94cb93a42d 100644
--- a/board/freescale/mpc837xerdb/mpc837xerdb.c
+++ b/board/freescale/mpc837xerdb/mpc837xerdb.c
@@ -10,6 +10,7 @@
 #include <hwconfig.h>
 #include <i2c.h>
 #include <init.h>
+#include <asm/bitops.h>
 #include <asm/io.h>
 #include <asm/fsl_mpc83xx_serdes.h>
 #include <fdt_support.h>
diff --git a/board/gdsys/a38x/ihs_phys.c b/board/gdsys/a38x/ihs_phys.c
index 2ef3b3ab27..c23d150921 100644
--- a/board/gdsys/a38x/ihs_phys.c
+++ b/board/gdsys/a38x/ihs_phys.c
@@ -2,6 +2,7 @@
 #include <dm.h>
 #include <miiphy.h>
 #include <asm-generic/gpio.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 #include "ihs_phys.h"
diff --git a/board/gdsys/common/cmd_ioloop.c b/board/gdsys/common/cmd_ioloop.c
index 3b4494c59f..3ea2bec8eb 100644
--- a/board/gdsys/common/cmd_ioloop.c
+++ b/board/gdsys/common/cmd_ioloop.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <command.h>
 #include <console.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 #include <gdsys_fpga.h>
diff --git a/board/gdsys/common/ioep-fpga.c b/board/gdsys/common/ioep-fpga.c
index 066222c563..7292d7ab5a 100644
--- a/board/gdsys/common/ioep-fpga.c
+++ b/board/gdsys/common/ioep-fpga.c
@@ -9,6 +9,7 @@
 #include <common.h>
 
 #include <gdsys_fpga.h>
+#include <linux/bitops.h>
 
 enum pcb_video_type {
 	PCB_DVI_SL,
@@ -443,6 +444,7 @@ static int get_features(unsigned int fpga, struct fpga_features *features)
 	return 0;
 }
 
+#include <linux/bitops.h>
 #endif
 
 bool ioep_fpga_has_osd(unsigned int fpga)
diff --git a/board/gdsys/mpc8308/hrcon.c b/board/gdsys/mpc8308/hrcon.c
index 90946cc34e..d206f8f0c5 100644
--- a/board/gdsys/mpc8308/hrcon.c
+++ b/board/gdsys/mpc8308/hrcon.c
@@ -11,6 +11,7 @@
 #include <i2c.h>
 #include <init.h>
 #include <spi.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
diff --git a/board/gdsys/mpc8308/strider.c b/board/gdsys/mpc8308/strider.c
index 9b82c949b3..b3af8fec91 100644
--- a/board/gdsys/mpc8308/strider.c
+++ b/board/gdsys/mpc8308/strider.c
@@ -11,6 +11,7 @@
 #include <i2c.h>
 #include <init.h>
 #include <spi.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
diff --git a/board/hisilicon/poplar/poplar.c b/board/hisilicon/poplar/poplar.c
index 8e2dd5fa50..371c3c33fc 100644
--- a/board/hisilicon/poplar/poplar.c
+++ b/board/hisilicon/poplar/poplar.c
@@ -13,6 +13,7 @@
 #include <dm/platform_data/serial_pl01x.h>
 #include <asm/arch/hi3798cv200.h>
 #include <asm/armv8/mmu.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/ids/ids8313/ids8313.c b/board/ids/ids8313/ids8313.c
index 2065a5a7db..d0d34012d7 100644
--- a/board/ids/ids8313/ids8313.c
+++ b/board/ids/ids8313/ids8313.c
@@ -16,6 +16,7 @@
 #include <init.h>
 #include <mpc83xx.h>
 #include <spi.h>
+#include <asm/bitops.h>
 #include <linux/delay.h>
 #include <linux/libfdt.h>
 
diff --git a/board/imgtec/ci20/ci20.c b/board/imgtec/ci20/ci20.c
index e87ea0a7ad..5339b9e9f9 100644
--- a/board/imgtec/ci20/ci20.c
+++ b/board/imgtec/ci20/ci20.c
@@ -13,6 +13,7 @@
 #include <netdev.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <mach/jz4780.h>
 #include <mach/jz4780_dram.h>
diff --git a/board/keymile/common/qrio.c b/board/keymile/common/qrio.c
index 0cb33663aa..06a4e67881 100644
--- a/board/keymile/common/qrio.c
+++ b/board/keymile/common/qrio.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <linux/bitops.h>
 
 #include "common.h"
 #include "qrio.h"
diff --git a/board/menlo/m53menlo/m53menlo.c b/board/menlo/m53menlo/m53menlo.c
index 70a13aa17b..58a564ac31 100644
--- a/board/menlo/m53menlo/m53menlo.c
+++ b/board/menlo/m53menlo/m53menlo.c
@@ -26,6 +26,7 @@
 #include <gzip.h>
 #include <i2c.h>
 #include <ipu_pixfmt.h>
+#include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/fb.h>
 #include <mmc.h>
diff --git a/board/mikrotik/crs305-1g-4s/crs305-1g-4s.c b/board/mikrotik/crs305-1g-4s/crs305-1g-4s.c
index 4b67a4ba2d..8b419ef6f7 100644
--- a/board/mikrotik/crs305-1g-4s/crs305-1g-4s.c
+++ b/board/mikrotik/crs305-1g-4s/crs305-1g-4s.c
@@ -7,6 +7,7 @@
 #include <i2c.h>
 #include <init.h>
 #include <asm/gpio.h>
+#include <linux/bitops.h>
 #include <linux/mbus.h>
 #include <linux/io.h>
 #include <asm/arch/cpu.h>
diff --git a/board/mscc/common/spi.c b/board/mscc/common/spi.c
index 0566fcba5c..45b9649336 100644
--- a/board/mscc/common/spi.c
+++ b/board/mscc/common/spi.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <spi.h>
+#include <linux/bitops.h>
 
 void external_cs_manage(struct udevice *dev, bool enable)
 {
diff --git a/board/mscc/jr2/jr2.c b/board/mscc/jr2/jr2.c
index f806576b90..51700f4acf 100644
--- a/board/mscc/jr2/jr2.c
+++ b/board/mscc/jr2/jr2.c
@@ -9,6 +9,7 @@
 #include <asm/io.h>
 #include <led.h>
 #include <miiphy.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 enum {
diff --git a/board/mscc/ocelot/ocelot.c b/board/mscc/ocelot/ocelot.c
index a5345360fe..74e8bfc431 100644
--- a/board/mscc/ocelot/ocelot.c
+++ b/board/mscc/ocelot/ocelot.c
@@ -14,6 +14,7 @@
 #include <led.h>
 #include <wait_bit.h>
 #include <miiphy.h>
+#include <linux/bitops.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/netgear/dgnd3700v2/dgnd3700v2.c b/board/netgear/dgnd3700v2/dgnd3700v2.c
index d9c0200f24..cfc3529c34 100644
--- a/board/netgear/dgnd3700v2/dgnd3700v2.c
+++ b/board/netgear/dgnd3700v2/dgnd3700v2.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <init.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 #define GPIO_BASE_6362			0x10000080
 
diff --git a/board/nvidia/p2371-2180/p2371-2180.c b/board/nvidia/p2371-2180/p2371-2180.c
index 0a988cb7dd..4aeec473b1 100644
--- a/board/nvidia/p2371-2180/p2371-2180.c
+++ b/board/nvidia/p2371-2180/p2371-2180.c
@@ -10,6 +10,7 @@
 #include <i2c.h>
 #include <log.h>
 #include <net.h>
+#include <linux/bitops.h>
 #include <linux/libfdt.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/pinmux.h>
diff --git a/board/nvidia/p3450-0000/p3450-0000.c b/board/nvidia/p3450-0000/p3450-0000.c
index f4212ab822..45f9bacc71 100644
--- a/board/nvidia/p3450-0000/p3450-0000.c
+++ b/board/nvidia/p3450-0000/p3450-0000.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <fdtdec.h>
 #include <i2c.h>
+#include <linux/bitops.h>
 #include <linux/libfdt.h>
 #include <pca953x.h>
 #include <asm/arch-tegra/cboot.h>
diff --git a/board/phytec/pcm052/pcm052.c b/board/phytec/pcm052/pcm052.c
index c40dc052b5..b0c56a29f1 100644
--- a/board/phytec/pcm052/pcm052.c
+++ b/board/phytec/pcm052/pcm052.c
@@ -17,6 +17,7 @@
 #include <env.h>
 #include <led.h>
 #include <miiphy.h>
+#include <linux/bitops.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/phytec/phycore_rk3288/phycore-rk3288.c b/board/phytec/phycore_rk3288/phycore-rk3288.c
index ac7c5b0bc5..ecc73227a0 100644
--- a/board/phytec/phycore_rk3288/phycore-rk3288.c
+++ b/board/phytec/phycore_rk3288/phycore-rk3288.c
@@ -16,6 +16,7 @@
 #include <i2c.h>
 #include <i2c_eeprom.h>
 #include <netdev.h>
+#include <linux/bitops.h>
 #include "som.h"
 #include <power/regulator.h>
 #include <power/rk8xx_pmic.h>
diff --git a/board/renesas/alt/alt.c b/board/renesas/alt/alt.c
index 600a355a6b..279ed48721 100644
--- a/board/renesas/alt/alt.c
+++ b/board/renesas/alt/alt.c
@@ -17,6 +17,7 @@
 #include <asm/processor.h>
 #include <asm/mach-types.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/renesas/alt/alt_spl.c b/board/renesas/alt/alt_spl.c
index a9c289447e..2de236fc29 100644
--- a/board/renesas/alt/alt_spl.c
+++ b/board/renesas/alt/alt_spl.c
@@ -13,6 +13,7 @@
 #include <asm/processor.h>
 #include <asm/mach-types.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/errno.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/gpio.h>
diff --git a/board/renesas/blanche/blanche.c b/board/renesas/blanche/blanche.c
index 400c166b90..5fa10878d2 100644
--- a/board/renesas/blanche/blanche.c
+++ b/board/renesas/blanche/blanche.c
@@ -24,6 +24,7 @@
 #include <env.h>
 #include <hang.h>
 #include <i2c.h>
+#include <linux/bitops.h>
 #include <linux/errno.h>
 #include <malloc.h>
 #include <miiphy.h>
diff --git a/board/renesas/draak/draak.c b/board/renesas/draak/draak.c
index 5f37a19600..c8f4b214a2 100644
--- a/board/renesas/draak/draak.c
+++ b/board/renesas/draak/draak.c
@@ -17,6 +17,7 @@
 #include <asm/processor.h>
 #include <asm/mach-types.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/errno.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/gpio.h>
diff --git a/board/renesas/gose/gose.c b/board/renesas/gose/gose.c
index 686ad28f65..c6a93c25e6 100644
--- a/board/renesas/gose/gose.c
+++ b/board/renesas/gose/gose.c
@@ -17,6 +17,7 @@
 #include <asm/processor.h>
 #include <asm/mach-types.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/renesas/gose/gose_spl.c b/board/renesas/gose/gose_spl.c
index b1b2ceb607..624ba5db04 100644
--- a/board/renesas/gose/gose_spl.c
+++ b/board/renesas/gose/gose_spl.c
@@ -13,6 +13,7 @@
 #include <asm/processor.h>
 #include <asm/mach-types.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/errno.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/gpio.h>
diff --git a/board/renesas/koelsch/koelsch.c b/board/renesas/koelsch/koelsch.c
index 0f21f8d743..1b3acc8fd1 100644
--- a/board/renesas/koelsch/koelsch.c
+++ b/board/renesas/koelsch/koelsch.c
@@ -18,6 +18,7 @@
 #include <asm/processor.h>
 #include <asm/mach-types.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/renesas/koelsch/koelsch_spl.c b/board/renesas/koelsch/koelsch_spl.c
index a321678e1b..449bbfa7b8 100644
--- a/board/renesas/koelsch/koelsch_spl.c
+++ b/board/renesas/koelsch/koelsch_spl.c
@@ -13,6 +13,7 @@
 #include <asm/processor.h>
 #include <asm/mach-types.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/errno.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/gpio.h>
diff --git a/board/renesas/lager/lager.c b/board/renesas/lager/lager.c
index 8a94f21811..36a35a9a9c 100644
--- a/board/renesas/lager/lager.c
+++ b/board/renesas/lager/lager.c
@@ -20,6 +20,7 @@
 #include <asm/processor.h>
 #include <asm/mach-types.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/renesas/lager/lager_spl.c b/board/renesas/lager/lager_spl.c
index ceaf164e78..1ca857c2c3 100644
--- a/board/renesas/lager/lager_spl.c
+++ b/board/renesas/lager/lager_spl.c
@@ -13,6 +13,7 @@
 #include <asm/processor.h>
 #include <asm/mach-types.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/errno.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/gpio.h>
diff --git a/board/renesas/porter/porter.c b/board/renesas/porter/porter.c
index f311a72391..793e02cb44 100644
--- a/board/renesas/porter/porter.c
+++ b/board/renesas/porter/porter.c
@@ -18,6 +18,7 @@
 #include <asm/processor.h>
 #include <asm/mach-types.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/renesas/porter/porter_spl.c b/board/renesas/porter/porter_spl.c
index 5b1f03cf7d..f10c6cffc2 100644
--- a/board/renesas/porter/porter_spl.c
+++ b/board/renesas/porter/porter_spl.c
@@ -13,6 +13,7 @@
 #include <asm/processor.h>
 #include <asm/mach-types.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/errno.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/gpio.h>
diff --git a/board/renesas/rcar-common/gen3-spl.c b/board/renesas/rcar-common/gen3-spl.c
index e006774edf..fd6e5054a6 100644
--- a/board/renesas/rcar-common/gen3-spl.c
+++ b/board/renesas/rcar-common/gen3-spl.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <asm/io.h>
 #include <spl.h>
+#include <linux/bitops.h>
 
 #define RCAR_CNTC_BASE	0xE6080000
 #define CNTCR_EN	BIT(0)
diff --git a/board/renesas/salvator-x/salvator-x.c b/board/renesas/salvator-x/salvator-x.c
index ff0409be98..947bdaefa8 100644
--- a/board/renesas/salvator-x/salvator-x.c
+++ b/board/renesas/salvator-x/salvator-x.c
@@ -18,6 +18,7 @@
 #include <asm/processor.h>
 #include <asm/mach-types.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/errno.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/gpio.h>
diff --git a/board/renesas/silk/silk.c b/board/renesas/silk/silk.c
index fe753a79da..171d06f317 100644
--- a/board/renesas/silk/silk.c
+++ b/board/renesas/silk/silk.c
@@ -18,6 +18,7 @@
 #include <asm/processor.h>
 #include <asm/mach-types.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/renesas/silk/silk_spl.c b/board/renesas/silk/silk_spl.c
index 9859977c77..f10f84a3cc 100644
--- a/board/renesas/silk/silk_spl.c
+++ b/board/renesas/silk/silk_spl.c
@@ -13,6 +13,7 @@
 #include <asm/processor.h>
 #include <asm/mach-types.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/errno.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/gpio.h>
diff --git a/board/renesas/stout/stout.c b/board/renesas/stout/stout.c
index b32e11a199..babcce9aa1 100644
--- a/board/renesas/stout/stout.c
+++ b/board/renesas/stout/stout.c
@@ -19,6 +19,7 @@
 #include <asm/processor.h>
 #include <asm/mach-types.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/arch/sys_proto.h>
diff --git a/board/renesas/stout/stout_spl.c b/board/renesas/stout/stout_spl.c
index a10752de1c..57c1fabaf3 100644
--- a/board/renesas/stout/stout_spl.c
+++ b/board/renesas/stout/stout_spl.c
@@ -13,6 +13,7 @@
 #include <asm/processor.h>
 #include <asm/mach-types.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/errno.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/gpio.h>
diff --git a/board/renesas/ulcb/ulcb.c b/board/renesas/ulcb/ulcb.c
index ebb379a82a..07bc1ec719 100644
--- a/board/renesas/ulcb/ulcb.c
+++ b/board/renesas/ulcb/ulcb.c
@@ -16,6 +16,7 @@
 #include <asm/processor.h>
 #include <asm/mach-types.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/errno.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/gpio.h>
diff --git a/board/sbc8349/sbc8349.c b/board/sbc8349/sbc8349.c
index c84146a608..1e3529f334 100644
--- a/board/sbc8349/sbc8349.c
+++ b/board/sbc8349/sbc8349.c
@@ -12,6 +12,7 @@
 #include <init.h>
 #include <ioports.h>
 #include <mpc83xx.h>
+#include <asm/bitops.h>
 #include <asm/mpc8349_pci.h>
 #include <i2c.h>
 #include <spd_sdram.h>
diff --git a/board/seeed/linkit-smart-7688/board.c b/board/seeed/linkit-smart-7688/board.c
index 492530ec4e..bf7c69ea83 100644
--- a/board/seeed/linkit-smart-7688/board.c
+++ b/board/seeed/linkit-smart-7688/board.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <init.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 #define MT76XX_GPIO1_MODE	0x10000060
 
diff --git a/board/softing/vining_2000/vining_2000.c b/board/softing/vining_2000/vining_2000.c
index 19fb85f34c..e5e33dcf15 100644
--- a/board/softing/vining_2000/vining_2000.c
+++ b/board/softing/vining_2000/vining_2000.c
@@ -19,6 +19,7 @@
 #include <asm/io.h>
 #include <asm/mach-imx/mxc_i2c.h>
 #include <env.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/sizes.h>
 #include <common.h>
diff --git a/board/solidrun/clearfog/clearfog.c b/board/solidrun/clearfog/clearfog.c
index df23c0d8b3..4184754a9a 100644
--- a/board/solidrun/clearfog/clearfog.c
+++ b/board/solidrun/clearfog/clearfog.c
@@ -13,6 +13,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include "../common/tlv_data.h"
 
diff --git a/board/st/stm32mp1/board.c b/board/st/stm32mp1/board.c
index b0d165028c..c218d37ecc 100644
--- a/board/st/stm32mp1/board.c
+++ b/board/st/stm32mp1/board.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <asm/io.h>
 #include <asm/arch/ddr.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <power/pmic.h>
 #include <power/stpmic1.h>
diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
index dc6abd1933..3dd0a93cde 100644
--- a/board/st/stm32mp1/stm32mp1.c
+++ b/board/st/stm32mp1/stm32mp1.c
@@ -37,6 +37,7 @@
 #include <asm/arch/stm32.h>
 #include <asm/arch/sys_proto.h>
 #include <jffs2/load_kernel.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 #include <power/regulator.h>
diff --git a/board/synopsys/emsdp/emsdp.c b/board/synopsys/emsdp/emsdp.c
index c1746b6110..91fa94a638 100644
--- a/board/synopsys/emsdp/emsdp.c
+++ b/board/synopsys/emsdp/emsdp.c
@@ -9,6 +9,7 @@
 #include <dwmmc.h>
 #include <init.h>
 #include <malloc.h>
+#include <linux/bitops.h>
 
 #include <asm/arcregs.h>
 
diff --git a/board/synopsys/hsdk/clk-lib.h b/board/synopsys/hsdk/clk-lib.h
index c1c105a8fd..970bcd4a17 100644
--- a/board/synopsys/hsdk/clk-lib.h
+++ b/board/synopsys/hsdk/clk-lib.h
@@ -8,6 +8,7 @@
 #define __BOARD_CLK_LIB_H
 
 #include <common.h>
+#include <linux/bitops.h>
 
 enum clk_ctl_ops {
 	CLK_SET		= BIT(0), /* set frequency */
diff --git a/board/synopsys/hsdk/hsdk.c b/board/synopsys/hsdk/hsdk.c
index fa6f841146..fd7cc8e69a 100644
--- a/board/synopsys/hsdk/hsdk.c
+++ b/board/synopsys/hsdk/hsdk.c
@@ -14,6 +14,7 @@
 #include <irq_func.h>
 #include <log.h>
 #include <asm/cache.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/printk.h>
 #include <linux/kernel.h>
diff --git a/board/synopsys/iot_devkit/iot_devkit.c b/board/synopsys/iot_devkit/iot_devkit.c
index 05b63e415b..497ea186d3 100644
--- a/board/synopsys/iot_devkit/iot_devkit.c
+++ b/board/synopsys/iot_devkit/iot_devkit.c
@@ -8,6 +8,7 @@
 #include <init.h>
 #include <malloc.h>
 #include <dwmmc.h>
+#include <linux/bitops.h>
 #include <linux/libfdt.h>
 #include <fdtdec.h>
 
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index 474495a005..4199bee2e6 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -36,6 +36,7 @@
 #include <i2c.h>
 #include <miiphy.h>
 #include <cpsw.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <power/tps65217.h>
 #include <power/tps65910.h>
diff --git a/board/ti/common/board_detect.h b/board/ti/common/board_detect.h
index 5835af5344..9f75b5c004 100644
--- a/board/ti/common/board_detect.h
+++ b/board/ti/common/board_detect.h
@@ -9,6 +9,7 @@
 #define __BOARD_DETECT_H
 
 /* TI EEPROM MAGIC Header identifier */
+#include <linux/bitops.h>
 #define TI_EEPROM_HEADER_MAGIC	0xEE3355AA
 #define TI_DEAD_EEPROM_MAGIC	0xADEAD12C
 
diff --git a/board/ti/ks2_evm/board_k2g.c b/board/ti/ks2_evm/board_k2g.c
index 450ccc4e07..ece75326a5 100644
--- a/board/ti/ks2_evm/board_k2g.c
+++ b/board/ti/ks2_evm/board_k2g.c
@@ -18,6 +18,7 @@
 #include <fdtdec.h>
 #include <i2c.h>
 #include <remoteproc.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include "mux-k2g.h"
 #include "../common/board_detect.h"
diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c
index f7b79c576e..40c71adf51 100644
--- a/board/toradex/apalis_imx6/apalis_imx6.c
+++ b/board/toradex/apalis_imx6/apalis_imx6.c
@@ -12,6 +12,7 @@
 #include <image.h>
 #include <init.h>
 #include <net.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 #include <ahci.h>
diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c
index bdb4ac6b11..6522af416a 100644
--- a/board/toradex/colibri_imx6/colibri_imx6.c
+++ b/board/toradex/colibri_imx6/colibri_imx6.c
@@ -12,6 +12,7 @@
 #include <env.h>
 #include <init.h>
 #include <net.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 #include <asm/arch/clock.h>
diff --git a/board/tplink/wdr4300/wdr4300.c b/board/tplink/wdr4300/wdr4300.c
index 287132e4fc..9134d6bf6d 100644
--- a/board/tplink/wdr4300/wdr4300.c
+++ b/board/tplink/wdr4300/wdr4300.c
@@ -8,6 +8,7 @@
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <mach/ath79.h>
 #include <mach/ar71xx_regs.h>
diff --git a/board/xilinx/zynq/cmds.c b/board/xilinx/zynq/cmds.c
index 10984662b6..0c46de7599 100644
--- a/board/xilinx/zynq/cmds.c
+++ b/board/xilinx/zynq/cmds.c
@@ -10,6 +10,7 @@
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
 #include <malloc.h>
+#include <linux/bitops.h>
 #include <u-boot/md5.h>
 #include <u-boot/rsa.h>
 #include <u-boot/rsa-mod-exp.h>
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index 35ffac9735..cb72914adb 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -31,6 +31,7 @@
 #include <zynqmppl.h>
 #include <zynqmp_firmware.h>
 #include <g_dnl.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/sizes.h>
 #include "../common/board.h"
diff --git a/cmd/mem.c b/cmd/mem.c
index 4d88254188..9b97f7bf69 100644
--- a/cmd/mem.c
+++ b/cmd/mem.c
@@ -23,6 +23,7 @@
 #include <rand.h>
 #include <watchdog.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/compiler.h>
 #include <linux/delay.h>
 
diff --git a/cmd/nvedit.c b/cmd/nvedit.c
index 3784abcd59..08d49df220 100644
--- a/cmd/nvedit.c
+++ b/cmd/nvedit.c
@@ -35,6 +35,7 @@
 #include <errno.h>
 #include <malloc.h>
 #include <mapmem.h>
+#include <linux/bitops.h>
 #include <u-boot/crc.h>
 #include <watchdog.h>
 #include <linux/stddef.h>
diff --git a/common/image-cipher.c b/common/image-cipher.c
index f50c3d31bd..09869f7846 100644
--- a/common/image-cipher.c
+++ b/common/image-cipher.c
@@ -10,7 +10,7 @@
 #include <common.h>
 #include <malloc.h>
 DECLARE_GLOBAL_DATA_PTR;
-#endif /* !USE_HOSTCC*/
+#endif /* !USE_HOSdTCC*/
 #include <image.h>
 #include <uboot_aes.h>
 #include <u-boot/aes.h>
diff --git a/drivers/adc/meson-saradc.c b/drivers/adc/meson-saradc.c
index 1e1515f6e3..72b0cc4e5b 100644
--- a/drivers/adc/meson-saradc.c
+++ b/drivers/adc/meson-saradc.c
@@ -14,6 +14,7 @@
 #include <regmap.h>
 #include <errno.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/math64.h>
 #include <linux/bitfield.h>
diff --git a/drivers/adc/rockchip-saradc.c b/drivers/adc/rockchip-saradc.c
index 850142cce3..561740f63b 100644
--- a/drivers/adc/rockchip-saradc.c
+++ b/drivers/adc/rockchip-saradc.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/err.h>
 
 #define SARADC_CTRL_CHN_MASK		GENMASK(2, 0)
diff --git a/drivers/adc/stm32-adc-core.c b/drivers/adc/stm32-adc-core.c
index 2ca0fb4f10..31bbb6f9d6 100644
--- a/drivers/adc/stm32-adc-core.c
+++ b/drivers/adc/stm32-adc-core.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <power/regulator.h>
 #include "stm32-adc-core.h"
 
diff --git a/drivers/adc/stm32-adc.c b/drivers/adc/stm32-adc.c
index 140ddcee3c..b12f894a9b 100644
--- a/drivers/adc/stm32-adc.c
+++ b/drivers/adc/stm32-adc.c
@@ -10,6 +10,7 @@
 #include <adc.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/iopoll.h>
 #include "stm32-adc-core.h"
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index dda3586d7c..47cdea1f58 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -12,6 +12,7 @@
 #include <blk.h>
 #include <cpu_func.h>
 #include <log.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 #include <command.h>
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index b29cb4e435..8d17d12c5a 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -44,6 +44,7 @@
 #include <libata.h>
 #include <malloc.h>
 #include <sata.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
diff --git a/drivers/axi/ihs_axi.c b/drivers/axi/ihs_axi.c
index a4aee8b58a..3945511090 100644
--- a/drivers/axi/ihs_axi.c
+++ b/drivers/axi/ihs_axi.c
@@ -12,6 +12,7 @@
 #include <dm.h>
 #include <log.h>
 #include <regmap.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 /**
diff --git a/drivers/cache/cache-v5l2.c b/drivers/cache/cache-v5l2.c
index 1373e7c387..51c074bfe2 100644
--- a/drivers/cache/cache-v5l2.c
+++ b/drivers/cache/cache-v5l2.c
@@ -11,6 +11,7 @@
 #include <hang.h>
 #include <asm/io.h>
 #include <dm/ofnode.h>
+#include <linux/bitops.h>
 
 struct l2cache {
 	volatile u64	configure;
diff --git a/drivers/clk/altera/clk-agilex.c b/drivers/clk/altera/clk-agilex.c
index 63153fa660..0042958f4c 100644
--- a/drivers/clk/altera/clk-agilex.c
+++ b/drivers/clk/altera/clk-agilex.c
@@ -11,6 +11,7 @@
 #include <dm/lists.h>
 #include <dm/util.h>
 #include <dt-bindings/clock/agilex-clock.h>
+#include <linux/bitops.h>
 
 #include <asm/arch/clock_manager.h>
 
diff --git a/drivers/clk/altera/clk-agilex.h b/drivers/clk/altera/clk-agilex.h
index d93328ef29..cd68ebc438 100644
--- a/drivers/clk/altera/clk-agilex.h
+++ b/drivers/clk/altera/clk-agilex.h
@@ -6,6 +6,10 @@
 #ifndef	_CLK_AGILEX_
 #define	_CLK_AGILEX_
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 #define CM_REG_READL(plat, reg)				\
 	readl((plat)->regs + (reg))
 
diff --git a/drivers/clk/altera/clk-arria10.c b/drivers/clk/altera/clk-arria10.c
index 694a9427e1..ede0be299d 100644
--- a/drivers/clk/altera/clk-arria10.c
+++ b/drivers/clk/altera/clk-arria10.c
@@ -12,6 +12,7 @@
 #include <dm/devres.h>
 #include <dm/lists.h>
 #include <dm/util.h>
+#include <linux/bitops.h>
 
 #include <asm/arch/clock_manager.h>
 
diff --git a/drivers/clk/at91/clk-system.c b/drivers/clk/at91/clk-system.c
index f9adef2eaa..76b1958670 100644
--- a/drivers/clk/at91/clk-system.c
+++ b/drivers/clk/at91/clk-system.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <linux/bitops.h>
 #include <linux/io.h>
 #include <mach/at91_pmc.h>
 #include "pmc.h"
diff --git a/drivers/clk/clk-cdce9xx.c b/drivers/clk/clk-cdce9xx.c
index f1f76b0a4d..fd47872ab9 100644
--- a/drivers/clk/clk-cdce9xx.c
+++ b/drivers/clk/clk-cdce9xx.c
@@ -14,6 +14,7 @@
 #include <clk-uclass.h>
 #include <i2c.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 
 #define MAX_NUMBER_OF_PLLS		4
 #define MAX_NUMER_OF_OUTPUTS		9
diff --git a/drivers/clk/clk-gate.c b/drivers/clk/clk-gate.c
index 6415c2f1b9..23c1f2c4ba 100644
--- a/drivers/clk/clk-gate.c
+++ b/drivers/clk/clk-gate.c
@@ -13,6 +13,7 @@
 #include <clk-uclass.h>
 #include <dm/device.h>
 #include <dm/devres.h>
+#include <linux/bitops.h>
 #include <linux/clk-provider.h>
 #include <clk.h>
 #include "clk.h"
diff --git a/drivers/clk/clk-hsdk-cgu.c b/drivers/clk/clk-hsdk-cgu.c
index 6d0099423e..c029712a71 100644
--- a/drivers/clk/clk-hsdk-cgu.c
+++ b/drivers/clk/clk-hsdk-cgu.c
@@ -14,6 +14,7 @@
 #include <div64.h>
 #include <dm.h>
 #include <log.h>
+#include <linux/bitops.h>
 #include <linux/bug.h>
 #include <linux/delay.h>
 #include <linux/io.h>
diff --git a/drivers/clk/clk-mux.c b/drivers/clk/clk-mux.c
index b9d2ae6778..c69cce0565 100644
--- a/drivers/clk/clk-mux.c
+++ b/drivers/clk/clk-mux.c
@@ -27,6 +27,7 @@
 #include <clk-uclass.h>
 #include <dm/device.h>
 #include <dm/devres.h>
+#include <linux/bitops.h>
 #include <linux/clk-provider.h>
 #include <clk.h>
 #include "clk.h"
diff --git a/drivers/clk/clk_bcm6345.c b/drivers/clk/clk_bcm6345.c
index f01ec9a859..b850b9fc06 100644
--- a/drivers/clk/clk_bcm6345.c
+++ b/drivers/clk/clk_bcm6345.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 #define MAX_CLKS	32
 
diff --git a/drivers/clk/clk_boston.c b/drivers/clk/clk_boston.c
index 0c49ee0798..2318dcf6a4 100644
--- a/drivers/clk/clk_boston.c
+++ b/drivers/clk/clk_boston.c
@@ -9,6 +9,7 @@
 #include <dt-bindings/clock/boston-clock.h>
 #include <regmap.h>
 #include <syscon.h>
+#include <linux/bitops.h>
 
 struct clk_boston {
 	struct regmap *regmap;
diff --git a/drivers/clk/clk_pic32.c b/drivers/clk/clk_pic32.c
index 7ddff2feaf..dc46de2a7c 100644
--- a/drivers/clk/clk_pic32.c
+++ b/drivers/clk/clk_pic32.c
@@ -12,6 +12,7 @@
 #include <wait_bit.h>
 #include <dm/lists.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/bug.h>
 #include <mach/pic32.h>
 #include <dt-bindings/clock/microchip,clock.h>
diff --git a/drivers/clk/clk_sandbox_ccf.c b/drivers/clk/clk_sandbox_ccf.c
index 3543bea70d..0619d04f0e 100644
--- a/drivers/clk/clk_sandbox_ccf.c
+++ b/drivers/clk/clk_sandbox_ccf.c
@@ -13,6 +13,7 @@
 #include <asm/clk.h>
 #include <clk-uclass.h>
 #include <dm/devres.h>
+#include <linux/bitops.h>
 #include <linux/clk-provider.h>
 #include <sandbox-clk.h>
 #include <linux/err.h>
diff --git a/drivers/clk/clk_stm32f.c b/drivers/clk/clk_stm32f.c
index 6d604cd82c..93722f74ae 100644
--- a/drivers/clk/clk_stm32f.c
+++ b/drivers/clk/clk_stm32f.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <log.h>
 #include <stm32_rcc.h>
+#include <linux/bitops.h>
 
 #include <asm/io.h>
 #include <asm/arch/stm32.h>
diff --git a/drivers/clk/clk_stm32h7.c b/drivers/clk/clk_stm32h7.c
index f147392fa1..5e6abca56f 100644
--- a/drivers/clk/clk_stm32h7.c
+++ b/drivers/clk/clk_stm32h7.c
@@ -12,6 +12,7 @@
 #include <syscon.h>
 #include <asm/io.h>
 #include <dm/root.h>
+#include <linux/bitops.h>
 
 #include <dt-bindings/clock/stm32h7-clks.h>
 
diff --git a/drivers/clk/clk_stm32mp1.c b/drivers/clk/clk_stm32mp1.c
index 2c598836a1..ae18a1d4ec 100644
--- a/drivers/clk/clk_stm32mp1.c
+++ b/drivers/clk/clk_stm32mp1.c
@@ -14,6 +14,7 @@
 #include <syscon.h>
 #include <time.h>
 #include <vsprintf.h>
+#include <linux/bitops.h>
 #include <linux/io.h>
 #include <linux/iopoll.h>
 #include <dt-bindings/clock/stm32mp1-clks.h>
diff --git a/drivers/clk/clk_vexpress_osc.c b/drivers/clk/clk_vexpress_osc.c
index ddfc5f6e68..b48319bba6 100644
--- a/drivers/clk/clk_vexpress_osc.c
+++ b/drivers/clk/clk_vexpress_osc.c
@@ -13,6 +13,7 @@
 #include <dm/lists.h>
 #include <errno.h>
 #include <misc.h>
+#include <linux/bitops.h>
 
 #define CLK_FUNCTION		BIT(20)
 
diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/clk-pll14xx.c
index c526fc1cce..b0ccb6c8ed 100644
--- a/drivers/clk/imx/clk-pll14xx.c
+++ b/drivers/clk/imx/clk-pll14xx.c
@@ -11,6 +11,7 @@
 #include <clk-uclass.h>
 #include <dm/device.h>
 #include <dm/devres.h>
+#include <linux/bitops.h>
 #include <linux/clk-provider.h>
 #include <linux/delay.h>
 #include <linux/err.h>
diff --git a/drivers/clk/mediatek/clk-mt7622.c b/drivers/clk/mediatek/clk-mt7622.c
index 0a1495a464..dc0ba71f10 100644
--- a/drivers/clk/mediatek/clk-mt7622.c
+++ b/drivers/clk/mediatek/clk-mt7622.c
@@ -12,6 +12,7 @@
 #include <asm/arch-mediatek/reset.h>
 #include <asm/io.h>
 #include <dt-bindings/clock/mt7622-clk.h>
+#include <linux/bitops.h>
 
 #include "clk-mtk.h"
 
diff --git a/drivers/clk/mediatek/clk-mt7623.c b/drivers/clk/mediatek/clk-mt7623.c
index c44969a073..a15fb45e8e 100644
--- a/drivers/clk/mediatek/clk-mt7623.c
+++ b/drivers/clk/mediatek/clk-mt7623.c
@@ -12,6 +12,7 @@
 #include <asm/arch-mediatek/reset.h>
 #include <asm/io.h>
 #include <dt-bindings/clock/mt7623-clk.h>
+#include <linux/bitops.h>
 
 #include "clk-mtk.h"
 
diff --git a/drivers/clk/mediatek/clk-mt7629.c b/drivers/clk/mediatek/clk-mt7629.c
index d683752403..5b2aa5f200 100644
--- a/drivers/clk/mediatek/clk-mt7629.c
+++ b/drivers/clk/mediatek/clk-mt7629.c
@@ -12,6 +12,7 @@
 #include <asm/arch-mediatek/reset.h>
 #include <asm/io.h>
 #include <dt-bindings/clock/mt7629-clk.h>
+#include <linux/bitops.h>
 
 #include "clk-mtk.h"
 
diff --git a/drivers/clk/mediatek/clk-mt8512.c b/drivers/clk/mediatek/clk-mt8512.c
index cb168f146b..ad254d1cce 100644
--- a/drivers/clk/mediatek/clk-mt8512.c
+++ b/drivers/clk/mediatek/clk-mt8512.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <asm/io.h>
 #include <dt-bindings/clock/mt8512-clk.h>
+#include <linux/bitops.h>
 
 #include "clk-mtk.h"
 
diff --git a/drivers/clk/mediatek/clk-mt8516.c b/drivers/clk/mediatek/clk-mt8516.c
index 071bf69b19..cd1db25783 100644
--- a/drivers/clk/mediatek/clk-mt8516.c
+++ b/drivers/clk/mediatek/clk-mt8516.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <asm/io.h>
 #include <dt-bindings/clock/mt8516-clk.h>
+#include <linux/bitops.h>
 
 #include "clk-mtk.h"
 
diff --git a/drivers/clk/mediatek/clk-mt8518.c b/drivers/clk/mediatek/clk-mt8518.c
index 76f7b3b361..985a0c1de5 100644
--- a/drivers/clk/mediatek/clk-mt8518.c
+++ b/drivers/clk/mediatek/clk-mt8518.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <asm/io.h>
 #include <dt-bindings/clock/mt8518-clk.h>
+#include <linux/bitops.h>
 
 #include "clk-mtk.h"
 
diff --git a/drivers/clk/mediatek/clk-mtk.c b/drivers/clk/mediatek/clk-mtk.c
index 671d4b35c7..388471b03a 100644
--- a/drivers/clk/mediatek/clk-mtk.c
+++ b/drivers/clk/mediatek/clk-mtk.c
@@ -11,6 +11,7 @@
 #include <div64.h>
 #include <dm.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 #include "clk-mtk.h"
diff --git a/drivers/clk/mediatek/clk-mtk.h b/drivers/clk/mediatek/clk-mtk.h
index c7dc980861..95a23d14a8 100644
--- a/drivers/clk/mediatek/clk-mtk.h
+++ b/drivers/clk/mediatek/clk-mtk.h
@@ -7,6 +7,7 @@
 #ifndef __DRV_CLK_MTK_H
 #define __DRV_CLK_MTK_H
 
+#include <linux/bitops.h>
 #define CLK_XTAL			0
 #define MHZ				(1000 * 1000)
 
diff --git a/drivers/clk/meson/axg.c b/drivers/clk/meson/axg.c
index d84447260a..6ef8b418d7 100644
--- a/drivers/clk/meson/axg.c
+++ b/drivers/clk/meson/axg.c
@@ -15,6 +15,7 @@
 #include <syscon.h>
 #include <div64.h>
 #include <dt-bindings/clock/axg-clkc.h>
+#include <linux/bitops.h>
 #include "clk_meson.h"
 #include <linux/err.h>
 
diff --git a/drivers/clk/meson/clk_meson.h b/drivers/clk/meson/clk_meson.h
index 7adc55a980..ef72a416c1 100644
--- a/drivers/clk/meson/clk_meson.h
+++ b/drivers/clk/meson/clk_meson.h
@@ -10,6 +10,7 @@
 
 /* Gate Structure */
 
+#include <linux/bitops.h>
 struct meson_gate {
 	unsigned int reg;
 	unsigned int bit;
diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c
index c540bb0a16..bf2f357435 100644
--- a/drivers/clk/meson/g12a.c
+++ b/drivers/clk/meson/g12a.c
@@ -15,6 +15,7 @@
 #include <syscon.h>
 #include <div64.h>
 #include <dt-bindings/clock/g12a-clkc.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/kernel.h>
diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c
index 0ed1d03506..b9353c053e 100644
--- a/drivers/clk/meson/gxbb.c
+++ b/drivers/clk/meson/gxbb.c
@@ -15,6 +15,7 @@
 #include <regmap.h>
 #include <syscon.h>
 #include <dt-bindings/clock/gxbb-clkc.h>
+#include <linux/bitops.h>
 #include "clk_meson.h"
 #include <linux/err.h>
 
diff --git a/drivers/clk/mpc83xx_clk.c b/drivers/clk/mpc83xx_clk.c
index 4c77c8da1a..8d96ec767a 100644
--- a/drivers/clk/mpc83xx_clk.c
+++ b/drivers/clk/mpc83xx_clk.c
@@ -14,6 +14,7 @@
 #include <dm/lists.h>
 #include <dt-bindings/clk/mpc83xx-clk.h>
 #include <asm/arch/soc.h>
+#include <linux/bitops.h>
 
 #include "mpc83xx_clk.h"
 
diff --git a/drivers/clk/mpc83xx_clk.h b/drivers/clk/mpc83xx_clk.h
index 7fb8802920..8a31a4c868 100644
--- a/drivers/clk/mpc83xx_clk.h
+++ b/drivers/clk/mpc83xx_clk.h
@@ -17,6 +17,7 @@
  * @RAT_2_5_TO_1: Ratio 2.5:1
  * @RAT_3_TO_1:   Ratio 3:1
  */
+#include <linux/bitops.h>
 enum ratio {
 	RAT_UNK,
 	RAT_BYP,
diff --git a/drivers/clk/mvebu/armada-37xx-periph.c b/drivers/clk/mvebu/armada-37xx-periph.c
index 855f979b4f..223da22c1b 100644
--- a/drivers/clk/mvebu/armada-37xx-periph.c
+++ b/drivers/clk/mvebu/armada-37xx-periph.c
@@ -16,6 +16,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 
 #define TBG_SEL		0x0
 #define DIV_SEL0	0x4
diff --git a/drivers/clk/owl/clk_owl.c b/drivers/clk/owl/clk_owl.c
index 11b8da1558..9715fce162 100644
--- a/drivers/clk/owl/clk_owl.c
+++ b/drivers/clk/owl/clk_owl.c
@@ -17,6 +17,7 @@
 #include <asm/arch-owl/regs_s700.h>
 #include <dt-bindings/clock/actions,s700-cmu.h>
 #endif
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 void owl_clk_init(struct owl_clk_priv *priv)
diff --git a/drivers/clk/owl/clk_owl.h b/drivers/clk/owl/clk_owl.h
index b8d33624c5..cf896bdb98 100644
--- a/drivers/clk/owl/clk_owl.h
+++ b/drivers/clk/owl/clk_owl.h
@@ -11,6 +11,9 @@
 #define _OWL_CLK_H_
 
 #include <clk-uclass.h>
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
 
 enum owl_soc {
 	S700,
diff --git a/drivers/clk/renesas/clk-rcar-gen3.c b/drivers/clk/renesas/clk-rcar-gen3.c
index 8e1af1caa1..15e3833756 100644
--- a/drivers/clk/renesas/clk-rcar-gen3.c
+++ b/drivers/clk/renesas/clk-rcar-gen3.c
@@ -17,6 +17,7 @@
 #include <log.h>
 #include <wait_bit.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 #include <dt-bindings/clock/renesas-cpg-mssr.h>
 
diff --git a/drivers/clk/renesas/r8a7790-cpg-mssr.c b/drivers/clk/renesas/r8a7790-cpg-mssr.c
index b62b8753cd..7451f53ba3 100644
--- a/drivers/clk/renesas/r8a7790-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7790-cpg-mssr.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <linux/bitops.h>
 
 #include <dt-bindings/clock/r8a7790-cpg-mssr.h>
 
diff --git a/drivers/clk/renesas/r8a7791-cpg-mssr.c b/drivers/clk/renesas/r8a7791-cpg-mssr.c
index e11c02e6e8..25fd489609 100644
--- a/drivers/clk/renesas/r8a7791-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7791-cpg-mssr.c
@@ -17,6 +17,7 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <linux/bitops.h>
 
 #include <dt-bindings/clock/r8a7791-cpg-mssr.h>
 
diff --git a/drivers/clk/renesas/r8a7792-cpg-mssr.c b/drivers/clk/renesas/r8a7792-cpg-mssr.c
index fb18ee7aed..d47ab99e88 100644
--- a/drivers/clk/renesas/r8a7792-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7792-cpg-mssr.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <linux/bitops.h>
 
 #include <dt-bindings/clock/r8a7792-cpg-mssr.h>
 
diff --git a/drivers/clk/renesas/r8a7794-cpg-mssr.c b/drivers/clk/renesas/r8a7794-cpg-mssr.c
index b6be1bc032..7093e0d42c 100644
--- a/drivers/clk/renesas/r8a7794-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7794-cpg-mssr.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <linux/bitops.h>
 
 #include <dt-bindings/clock/r8a7794-cpg-mssr.h>
 
diff --git a/drivers/clk/renesas/r8a7795-cpg-mssr.c b/drivers/clk/renesas/r8a7795-cpg-mssr.c
index ab4747ee14..dcd96ad017 100644
--- a/drivers/clk/renesas/r8a7795-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7795-cpg-mssr.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <linux/bitops.h>
 
 #include <dt-bindings/clock/r8a7795-cpg-mssr.h>
 
diff --git a/drivers/clk/renesas/r8a7796-cpg-mssr.c b/drivers/clk/renesas/r8a7796-cpg-mssr.c
index 253a9143b7..89dc141239 100644
--- a/drivers/clk/renesas/r8a7796-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7796-cpg-mssr.c
@@ -18,6 +18,7 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <linux/bitops.h>
 
 #include <dt-bindings/clock/r8a7796-cpg-mssr.h>
 
diff --git a/drivers/clk/renesas/r8a77965-cpg-mssr.c b/drivers/clk/renesas/r8a77965-cpg-mssr.c
index bd36ea3b6d..6ed88295c9 100644
--- a/drivers/clk/renesas/r8a77965-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a77965-cpg-mssr.c
@@ -13,6 +13,7 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <linux/bitops.h>
 
 #include <dt-bindings/clock/r8a77965-cpg-mssr.h>
 
diff --git a/drivers/clk/renesas/r8a77970-cpg-mssr.c b/drivers/clk/renesas/r8a77970-cpg-mssr.c
index 961eb7fb60..df07120171 100644
--- a/drivers/clk/renesas/r8a77970-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a77970-cpg-mssr.c
@@ -13,6 +13,7 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <linux/bitops.h>
 
 #include <dt-bindings/clock/r8a77970-cpg-mssr.h>
 
diff --git a/drivers/clk/renesas/r8a77980-cpg-mssr.c b/drivers/clk/renesas/r8a77980-cpg-mssr.c
index c076ac771f..c8d7a9469b 100644
--- a/drivers/clk/renesas/r8a77980-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a77980-cpg-mssr.c
@@ -13,6 +13,7 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <linux/bitops.h>
 
 #include <dt-bindings/clock/r8a77980-cpg-mssr.h>
 
diff --git a/drivers/clk/renesas/r8a77990-cpg-mssr.c b/drivers/clk/renesas/r8a77990-cpg-mssr.c
index 3168de20f9..357e7b534d 100644
--- a/drivers/clk/renesas/r8a77990-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a77990-cpg-mssr.c
@@ -13,6 +13,7 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <linux/bitops.h>
 
 #include <dt-bindings/clock/r8a77990-cpg-mssr.h>
 
diff --git a/drivers/clk/renesas/r8a77995-cpg-mssr.c b/drivers/clk/renesas/r8a77995-cpg-mssr.c
index 1c79370982..d62aeba635 100644
--- a/drivers/clk/renesas/r8a77995-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a77995-cpg-mssr.c
@@ -13,6 +13,7 @@
 #include <common.h>
 #include <clk-uclass.h>
 #include <dm.h>
+#include <linux/bitops.h>
 
 #include <dt-bindings/clock/r8a77995-cpg-mssr.h>
 
diff --git a/drivers/clk/renesas/renesas-cpg-mssr.c b/drivers/clk/renesas/renesas-cpg-mssr.c
index 6ad684c10b..7c1222f6c8 100644
--- a/drivers/clk/renesas/renesas-cpg-mssr.c
+++ b/drivers/clk/renesas/renesas-cpg-mssr.c
@@ -16,6 +16,7 @@
 #include <log.h>
 #include <wait_bit.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 #include <dt-bindings/clock/renesas-cpg-mssr.h>
 
diff --git a/drivers/clk/renesas/renesas-cpg-mssr.h b/drivers/clk/renesas/renesas-cpg-mssr.h
index 5b7012d37c..b669dec594 100644
--- a/drivers/clk/renesas/renesas-cpg-mssr.h
+++ b/drivers/clk/renesas/renesas-cpg-mssr.h
@@ -13,6 +13,7 @@
 #ifndef __DRIVERS_CLK_RENESAS_CPG_MSSR__
 #define __DRIVERS_CLK_RENESAS_CPG_MSSR__
 
+#include <linux/bitops.h>
 struct cpg_mssr_info {
 	const struct cpg_core_clk	*core_clk;
 	unsigned int			core_clk_size;
diff --git a/drivers/clk/rockchip/clk_px30.c b/drivers/clk/rockchip/clk_px30.c
index b5b46e3950..71916dbf3b 100644
--- a/drivers/clk/rockchip/clk_px30.c
+++ b/drivers/clk/rockchip/clk_px30.c
@@ -17,6 +17,7 @@
 #include <asm/io.h>
 #include <dm/lists.h>
 #include <dt-bindings/clock/px30-cru.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/clk/rockchip/clk_rk322x.c b/drivers/clk/rockchip/clk_rk322x.c
index 912e1f6e92..054b2fd349 100644
--- a/drivers/clk/rockchip/clk_rk322x.c
+++ b/drivers/clk/rockchip/clk_rk322x.c
@@ -16,6 +16,7 @@
 #include <asm/arch-rockchip/hardware.h>
 #include <dm/lists.h>
 #include <dt-bindings/clock/rk3228-cru.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/log2.h>
 #include <linux/stringify.h>
diff --git a/drivers/clk/rockchip/clk_rk3288.c b/drivers/clk/rockchip/clk_rk3288.c
index 3b199bbb86..a1dd642eef 100644
--- a/drivers/clk/rockchip/clk_rk3288.c
+++ b/drivers/clk/rockchip/clk_rk3288.c
@@ -23,6 +23,7 @@
 #include <dm/device-internal.h>
 #include <dm/lists.h>
 #include <dm/uclass-internal.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/log2.h>
diff --git a/drivers/clk/rockchip/clk_rk3308.c b/drivers/clk/rockchip/clk_rk3308.c
index 5889cf862e..d3633b6979 100644
--- a/drivers/clk/rockchip/clk_rk3308.c
+++ b/drivers/clk/rockchip/clk_rk3308.c
@@ -17,6 +17,7 @@
 #include <asm/arch-rockchip/hardware.h>
 #include <dm/lists.h>
 #include <dt-bindings/clock/rk3308-cru.h>
+#include <linux/bitops.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/clk/rockchip/clk_rk3328.c b/drivers/clk/rockchip/clk_rk3328.c
index 6d692ec8b7..02d3b08efa 100644
--- a/drivers/clk/rockchip/clk_rk3328.c
+++ b/drivers/clk/rockchip/clk_rk3328.c
@@ -18,6 +18,7 @@
 #include <asm/io.h>
 #include <dm/lists.h>
 #include <dt-bindings/clock/rk3328-cru.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 struct pll_div {
diff --git a/drivers/clk/rockchip/clk_rk3399.c b/drivers/clk/rockchip/clk_rk3399.c
index 2c58814b70..e009f1cf6c 100644
--- a/drivers/clk/rockchip/clk_rk3399.c
+++ b/drivers/clk/rockchip/clk_rk3399.c
@@ -20,6 +20,7 @@
 #include <asm/arch-rockchip/hardware.h>
 #include <dm/lists.h>
 #include <dt-bindings/clock/rk3399-cru.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 #if CONFIG_IS_ENABLED(OF_PLATDATA)
diff --git a/drivers/clk/sunxi/clk_a10.c b/drivers/clk/sunxi/clk_a10.c
index 7a96d1708e..67507c5ab1 100644
--- a/drivers/clk/sunxi/clk_a10.c
+++ b/drivers/clk/sunxi/clk_a10.c
@@ -11,6 +11,7 @@
 #include <asm/arch/ccu.h>
 #include <dt-bindings/clock/sun4i-a10-ccu.h>
 #include <dt-bindings/reset/sun4i-a10-ccu.h>
+#include <linux/bitops.h>
 
 static struct ccu_clk_gate a10_gates[] = {
 	[CLK_AHB_OTG]		= GATE(0x060, BIT(0)),
diff --git a/drivers/clk/sunxi/clk_a10s.c b/drivers/clk/sunxi/clk_a10s.c
index 33d41d47b0..d11a4b5f03 100644
--- a/drivers/clk/sunxi/clk_a10s.c
+++ b/drivers/clk/sunxi/clk_a10s.c
@@ -11,6 +11,7 @@
 #include <asm/arch/ccu.h>
 #include <dt-bindings/clock/sun5i-ccu.h>
 #include <dt-bindings/reset/sun5i-ccu.h>
+#include <linux/bitops.h>
 
 static struct ccu_clk_gate a10s_gates[] = {
 	[CLK_AHB_OTG]		= GATE(0x060, BIT(0)),
diff --git a/drivers/clk/sunxi/clk_a23.c b/drivers/clk/sunxi/clk_a23.c
index c16019215e..4d562bfe42 100644
--- a/drivers/clk/sunxi/clk_a23.c
+++ b/drivers/clk/sunxi/clk_a23.c
@@ -11,6 +11,7 @@
 #include <asm/arch/ccu.h>
 #include <dt-bindings/clock/sun8i-a23-a33-ccu.h>
 #include <dt-bindings/reset/sun8i-a23-a33-ccu.h>
+#include <linux/bitops.h>
 
 static struct ccu_clk_gate a23_gates[] = {
 	[CLK_BUS_MMC0]		= GATE(0x060, BIT(8)),
diff --git a/drivers/clk/sunxi/clk_a31.c b/drivers/clk/sunxi/clk_a31.c
index 4ec3c2ae89..4a9454eebe 100644
--- a/drivers/clk/sunxi/clk_a31.c
+++ b/drivers/clk/sunxi/clk_a31.c
@@ -11,6 +11,7 @@
 #include <asm/arch/ccu.h>
 #include <dt-bindings/clock/sun6i-a31-ccu.h>
 #include <dt-bindings/reset/sun6i-a31-ccu.h>
+#include <linux/bitops.h>
 
 static struct ccu_clk_gate a31_gates[] = {
 	[CLK_AHB1_MMC0]		= GATE(0x060, BIT(8)),
diff --git a/drivers/clk/sunxi/clk_a64.c b/drivers/clk/sunxi/clk_a64.c
index f94e8aa754..d96cb1aac1 100644
--- a/drivers/clk/sunxi/clk_a64.c
+++ b/drivers/clk/sunxi/clk_a64.c
@@ -11,6 +11,7 @@
 #include <asm/arch/ccu.h>
 #include <dt-bindings/clock/sun50i-a64-ccu.h>
 #include <dt-bindings/reset/sun50i-a64-ccu.h>
+#include <linux/bitops.h>
 
 static const struct ccu_clk_gate a64_gates[] = {
 	[CLK_BUS_MMC0]		= GATE(0x060, BIT(8)),
diff --git a/drivers/clk/sunxi/clk_a80.c b/drivers/clk/sunxi/clk_a80.c
index fb76aad528..80d7407037 100644
--- a/drivers/clk/sunxi/clk_a80.c
+++ b/drivers/clk/sunxi/clk_a80.c
@@ -11,6 +11,7 @@
 #include <asm/arch/ccu.h>
 #include <dt-bindings/clock/sun9i-a80-ccu.h>
 #include <dt-bindings/reset/sun9i-a80-ccu.h>
+#include <linux/bitops.h>
 
 static const struct ccu_clk_gate a80_gates[] = {
 	[CLK_SPI0]		= GATE(0x430, BIT(31)),
diff --git a/drivers/clk/sunxi/clk_a83t.c b/drivers/clk/sunxi/clk_a83t.c
index 2be87a31fd..d6f23ddc77 100644
--- a/drivers/clk/sunxi/clk_a83t.c
+++ b/drivers/clk/sunxi/clk_a83t.c
@@ -11,6 +11,7 @@
 #include <asm/arch/ccu.h>
 #include <dt-bindings/clock/sun8i-a83t-ccu.h>
 #include <dt-bindings/reset/sun8i-a83t-ccu.h>
+#include <linux/bitops.h>
 
 static struct ccu_clk_gate a83t_gates[] = {
 	[CLK_BUS_MMC0]		= GATE(0x060, BIT(8)),
diff --git a/drivers/clk/sunxi/clk_h3.c b/drivers/clk/sunxi/clk_h3.c
index 6111a13f1c..7e844f4ff1 100644
--- a/drivers/clk/sunxi/clk_h3.c
+++ b/drivers/clk/sunxi/clk_h3.c
@@ -11,6 +11,7 @@
 #include <asm/arch/ccu.h>
 #include <dt-bindings/clock/sun8i-h3-ccu.h>
 #include <dt-bindings/reset/sun8i-h3-ccu.h>
+#include <linux/bitops.h>
 
 static struct ccu_clk_gate h3_gates[] = {
 	[CLK_BUS_MMC0]		= GATE(0x060, BIT(8)),
diff --git a/drivers/clk/sunxi/clk_h6.c b/drivers/clk/sunxi/clk_h6.c
index 105c15d869..a1cb8952d3 100644
--- a/drivers/clk/sunxi/clk_h6.c
+++ b/drivers/clk/sunxi/clk_h6.c
@@ -11,6 +11,7 @@
 #include <asm/arch/ccu.h>
 #include <dt-bindings/clock/sun50i-h6-ccu.h>
 #include <dt-bindings/reset/sun50i-h6-ccu.h>
+#include <linux/bitops.h>
 
 static struct ccu_clk_gate h6_gates[] = {
 	[CLK_BUS_MMC0]		= GATE(0x84c, BIT(0)),
diff --git a/drivers/clk/sunxi/clk_r40.c b/drivers/clk/sunxi/clk_r40.c
index 44abc4f536..ac360b2beb 100644
--- a/drivers/clk/sunxi/clk_r40.c
+++ b/drivers/clk/sunxi/clk_r40.c
@@ -11,6 +11,7 @@
 #include <asm/arch/ccu.h>
 #include <dt-bindings/clock/sun8i-r40-ccu.h>
 #include <dt-bindings/reset/sun8i-r40-ccu.h>
+#include <linux/bitops.h>
 
 static struct ccu_clk_gate r40_gates[] = {
 	[CLK_BUS_MMC0]		= GATE(0x060, BIT(8)),
diff --git a/drivers/clk/sunxi/clk_sunxi.c b/drivers/clk/sunxi/clk_sunxi.c
index 77fba5357f..41934cd826 100644
--- a/drivers/clk/sunxi/clk_sunxi.c
+++ b/drivers/clk/sunxi/clk_sunxi.c
@@ -12,6 +12,7 @@
 #include <reset.h>
 #include <asm/io.h>
 #include <asm/arch/ccu.h>
+#include <linux/bitops.h>
 #include <linux/log2.h>
 
 static const struct ccu_clk_gate *priv_to_gate(struct ccu_priv *priv,
diff --git a/drivers/clk/sunxi/clk_v3s.c b/drivers/clk/sunxi/clk_v3s.c
index 789ac72026..b79446cc4f 100644
--- a/drivers/clk/sunxi/clk_v3s.c
+++ b/drivers/clk/sunxi/clk_v3s.c
@@ -11,6 +11,7 @@
 #include <asm/arch/ccu.h>
 #include <dt-bindings/clock/sun8i-v3s-ccu.h>
 #include <dt-bindings/reset/sun8i-v3s-ccu.h>
+#include <linux/bitops.h>
 
 static struct ccu_clk_gate v3s_gates[] = {
 	[CLK_BUS_MMC0]		= GATE(0x060, BIT(8)),
diff --git a/drivers/cpu/bmips_cpu.c b/drivers/cpu/bmips_cpu.c
index 613c836049..2649c5c6e9 100644
--- a/drivers/cpu/bmips_cpu.c
+++ b/drivers/cpu/bmips_cpu.c
@@ -13,6 +13,7 @@
 #include <errno.h>
 #include <init.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 #define REV_CHIPID_SHIFT		16
 #define REV_CHIPID_MASK			(0xffff << REV_CHIPID_SHIFT)
diff --git a/drivers/cpu/imx8_cpu.c b/drivers/cpu/imx8_cpu.c
index 95653683ac..24fd146baf 100644
--- a/drivers/cpu/imx8_cpu.c
+++ b/drivers/cpu/imx8_cpu.c
@@ -11,6 +11,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/arch-imx/cpu.h>
 #include <asm/armv8/cpu.h>
+#include <linux/bitops.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/cpu/mpc83xx_cpu.c b/drivers/cpu/mpc83xx_cpu.c
index c1a7a555c6..f8a84bae9d 100644
--- a/drivers/cpu/mpc83xx_cpu.c
+++ b/drivers/cpu/mpc83xx_cpu.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <log.h>
 #include <vsprintf.h>
+#include <linux/bitops.h>
 
 #include "mpc83xx_cpu.h"
 
diff --git a/drivers/cpu/riscv_cpu.c b/drivers/cpu/riscv_cpu.c
index 1dc7ee9fdc..cb04f5638d 100644
--- a/drivers/cpu/riscv_cpu.c
+++ b/drivers/cpu/riscv_cpu.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
+#include <linux/bitops.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/ddr/altera/sdram_arria10.c b/drivers/ddr/altera/sdram_arria10.c
index 19d5724a60..3c58f59f3a 100644
--- a/drivers/ddr/altera/sdram_arria10.c
+++ b/drivers/ddr/altera/sdram_arria10.c
@@ -18,6 +18,7 @@
 #include <asm/arch/misc.h>
 #include <asm/arch/reset_manager.h>
 #include <asm/arch/sdram.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
 
diff --git a/drivers/ddr/altera/sdram_gen5.c b/drivers/ddr/altera/sdram_gen5.c
index ba588e96af..1360bd0a3b 100644
--- a/drivers/ddr/altera/sdram_gen5.c
+++ b/drivers/ddr/altera/sdram_gen5.c
@@ -15,6 +15,7 @@
 #include <asm/arch/reset_manager.h>
 #include <asm/arch/sdram.h>
 #include <asm/arch/system_manager.h>
+#include <asm/bitops.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
 
diff --git a/drivers/ddr/fsl/ctrl_regs.c b/drivers/ddr/fsl/ctrl_regs.c
index ed60b226df..2d3fb1953b 100644
--- a/drivers/ddr/fsl/ctrl_regs.c
+++ b/drivers/ddr/fsl/ctrl_regs.c
@@ -16,6 +16,7 @@
 #include <fsl_ddr.h>
 #include <fsl_immap.h>
 #include <log.h>
+#include <asm/bitops.h>
 #include <asm/io.h>
 #if defined(CONFIG_FSL_LSCH2) || defined(CONFIG_FSL_LSCH3) || \
 	defined(CONFIG_ARM)
diff --git a/drivers/ddr/fsl/ddr1_dimm_params.c b/drivers/ddr/fsl/ddr1_dimm_params.c
index ef430ae135..e5481eaa0d 100644
--- a/drivers/ddr/fsl/ddr1_dimm_params.c
+++ b/drivers/ddr/fsl/ddr1_dimm_params.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <fsl_ddr_sdram.h>
 #include <log.h>
+#include <asm/bitops.h>
 
 #include <fsl_ddr.h>
 
diff --git a/drivers/ddr/fsl/ddr2_dimm_params.c b/drivers/ddr/fsl/ddr2_dimm_params.c
index 442f72c270..3b78118a9d 100644
--- a/drivers/ddr/fsl/ddr2_dimm_params.c
+++ b/drivers/ddr/fsl/ddr2_dimm_params.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <fsl_ddr_sdram.h>
 #include <log.h>
+#include <asm/bitops.h>
 
 #include <fsl_ddr.h>
 /*
diff --git a/drivers/ddr/fsl/interactive.c b/drivers/ddr/fsl/interactive.c
index ea8bcbeb51..2f76beb2db 100644
--- a/drivers/ddr/fsl/interactive.c
+++ b/drivers/ddr/fsl/interactive.c
@@ -16,6 +16,7 @@
 #include <command.h>
 #include <env.h>
 #include <log.h>
+#include <asm/bitops.h>
 #include <linux/ctype.h>
 #include <asm/types.h>
 #include <asm/io.h>
diff --git a/drivers/ddr/fsl/lc_common_dimm_params.c b/drivers/ddr/fsl/lc_common_dimm_params.c
index 16ff6eeeb9..d299d763db 100644
--- a/drivers/ddr/fsl/lc_common_dimm_params.c
+++ b/drivers/ddr/fsl/lc_common_dimm_params.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <fsl_ddr_sdram.h>
 #include <log.h>
+#include <asm/bitops.h>
 
 #include <fsl_ddr.h>
 
diff --git a/drivers/ddr/fsl/main.c b/drivers/ddr/fsl/main.c
index 8533b28c25..84139b85c3 100644
--- a/drivers/ddr/fsl/main.c
+++ b/drivers/ddr/fsl/main.c
@@ -16,6 +16,7 @@
 #include <fsl_ddr.h>
 #include <init.h>
 #include <log.h>
+#include <asm/bitops.h>
 
 /*
  * CONFIG_SYS_FSL_DDR_SDRAM_BASE_PHY is the physical address from the view
diff --git a/drivers/dma/bcm6348-iudma.c b/drivers/dma/bcm6348-iudma.c
index 9e0e82520e..91172d483c 100644
--- a/drivers/dma/bcm6348-iudma.c
+++ b/drivers/dma/bcm6348-iudma.c
@@ -26,6 +26,7 @@
 #include <net.h>
 #include <reset.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 #define DMA_RX_DESC	6
diff --git a/drivers/dma/lpc32xx_dma.c b/drivers/dma/lpc32xx_dma.c
index de963347f1..ab58e97bfe 100644
--- a/drivers/dma/lpc32xx_dma.c
+++ b/drivers/dma/lpc32xx_dma.c
@@ -15,6 +15,7 @@
 #include <asm/arch/clk.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 /* DMA controller channel register structure */
diff --git a/drivers/dma/ti/k3-udma-hwdef.h b/drivers/dma/ti/k3-udma-hwdef.h
index c88399a815..5d50bbcb03 100644
--- a/drivers/dma/ti/k3-udma-hwdef.h
+++ b/drivers/dma/ti/k3-udma-hwdef.h
@@ -12,6 +12,7 @@
 #ifndef K3_NAVSS_UDMA_HWDEF_H_
 #define K3_NAVSS_UDMA_HWDEF_H_
 
+#include <linux/bitops.h>
 #define UDMA_PSIL_DST_THREAD_ID_OFFSET 0x8000
 
 /* Global registers */
diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
index 299e707adc..2ce16c8e27 100644
--- a/drivers/dma/ti/k3-udma.c
+++ b/drivers/dma/ti/k3-udma.c
@@ -12,6 +12,7 @@
 #include <asm/io.h>
 #include <asm/bitops.h>
 #include <malloc.h>
+#include <linux/bitops.h>
 #include <linux/dma-mapping.h>
 #include <dm.h>
 #include <dm/device_compat.h>
diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
index de9a2eaff5..15f5b0b14c 100644
--- a/drivers/firmware/ti_sci.c
+++ b/drivers/firmware/ti_sci.c
@@ -16,6 +16,7 @@
 #include <dm/device.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
+#include <linux/bitops.h>
 #include <linux/compat.h>
 #include <linux/err.h>
 #include <linux/soc/ti/k3-sec-proxy.h>
diff --git a/drivers/firmware/ti_sci.h b/drivers/firmware/ti_sci.h
index 24b4d1c794..327bb820f3 100644
--- a/drivers/firmware/ti_sci.h
+++ b/drivers/firmware/ti_sci.h
@@ -15,6 +15,7 @@
 #define __TI_SCI_H
 
 /* Generic Messages */
+#include <linux/bitops.h>
 #define TI_SCI_MSG_ENABLE_WDT		0x0000
 #define TI_SCI_MSG_WAKE_RESET		0x0001
 #define TI_SCI_MSG_VERSION		0x0002
diff --git a/drivers/fpga/socfpga_arria10.c b/drivers/fpga/socfpga_arria10.c
index e14204633e..dfd3cbb461 100644
--- a/drivers/fpga/socfpga_arria10.c
+++ b/drivers/fpga/socfpga_arria10.c
@@ -18,6 +18,7 @@
 #include <fs_loader.h>
 #include <wait_bit.h>
 #include <watchdog.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 #define CFGWDTH_32	1
diff --git a/drivers/fpga/zynqmppl.c b/drivers/fpga/zynqmppl.c
index b995bcc008..2ac4e38952 100644
--- a/drivers/fpga/zynqmppl.c
+++ b/drivers/fpga/zynqmppl.c
@@ -12,6 +12,7 @@
 #include <zynqmppl.h>
 #include <zynqmp_firmware.h>
 #include <asm/cache.h>
+#include <linux/bitops.h>
 #include <linux/sizes.h>
 #include <asm/arch/sys_proto.h>
 #include <memalign.h>
diff --git a/drivers/gpio/atmel_pio4.c b/drivers/gpio/atmel_pio4.c
index a3f5e7a2e0..455944d547 100644
--- a/drivers/gpio/atmel_pio4.c
+++ b/drivers/gpio/atmel_pio4.c
@@ -12,6 +12,7 @@
 #include <malloc.h>
 #include <asm/arch/hardware.h>
 #include <asm/gpio.h>
+#include <linux/bitops.h>
 #include <mach/gpio.h>
 #include <mach/atmel_pio4.h>
 
diff --git a/drivers/gpio/bcm6345_gpio.c b/drivers/gpio/bcm6345_gpio.c
index 71a978cf40..5da11d988e 100644
--- a/drivers/gpio/bcm6345_gpio.c
+++ b/drivers/gpio/bcm6345_gpio.c
@@ -12,6 +12,7 @@
 #include <errno.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 struct bcm6345_gpio_priv {
 	void __iomem *reg_dirout;
diff --git a/drivers/gpio/cortina_gpio.c b/drivers/gpio/cortina_gpio.c
index c6266b88cb..055907c1a1 100644
--- a/drivers/gpio/cortina_gpio.c
+++ b/drivers/gpio/cortina_gpio.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
+#include <linux/bitops.h>
 #include <linux/compat.h>
 #include <linux/compiler.h>
 
diff --git a/drivers/gpio/dwapb_gpio.c b/drivers/gpio/dwapb_gpio.c
index 7b50a34b3f..e5e3518194 100644
--- a/drivers/gpio/dwapb_gpio.c
+++ b/drivers/gpio/dwapb_gpio.c
@@ -19,6 +19,7 @@
 #include <dm/root.h>
 #include <errno.h>
 #include <reset.h>
+#include <linux/bitops.h>
 
 #define GPIO_SWPORT_DR(p)	(0x00 + (p) * 0xc)
 #define GPIO_SWPORT_DDR(p)	(0x04 + (p) * 0xc)
diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
index 9dc4cd6042..c49a041059 100644
--- a/drivers/gpio/gpio-rcar.c
+++ b/drivers/gpio/gpio-rcar.c
@@ -12,6 +12,7 @@
 #include <errno.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include "../pinctrl/renesas/sh_pfc.h"
 
 #define GPIO_IOINTSEL	0x00	/* General IO/Interrupt Switching Register */
diff --git a/drivers/gpio/gpio-rza1.c b/drivers/gpio/gpio-rza1.c
index ce2453e2ba..21a87d645c 100644
--- a/drivers/gpio/gpio-rza1.c
+++ b/drivers/gpio/gpio-rza1.c
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 #define P(bank)			(0x0000 + (bank) * 4)
 #define PSR(bank)		(0x0100 + (bank) * 4)
diff --git a/drivers/gpio/hi6220_gpio.c b/drivers/gpio/hi6220_gpio.c
index 97a0417891..95de2ae366 100644
--- a/drivers/gpio/hi6220_gpio.c
+++ b/drivers/gpio/hi6220_gpio.c
@@ -9,6 +9,7 @@
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <errno.h>
+#include <linux/bitops.h>
 
 static int hi6220_gpio_direction_input(struct udevice *dev, unsigned int gpio)
 {
diff --git a/drivers/gpio/hsdk-creg-gpio.c b/drivers/gpio/hsdk-creg-gpio.c
index 8eeb3849c2..d9df804f63 100644
--- a/drivers/gpio/hsdk-creg-gpio.c
+++ b/drivers/gpio/hsdk-creg-gpio.c
@@ -15,6 +15,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <linux/bitops.h>
 #include <linux/printk.h>
 
 #define DRV_NAME	"gpio_creg"
diff --git a/drivers/gpio/mscc_sgpio.c b/drivers/gpio/mscc_sgpio.c
index 1bbd212b4f..780d77b2f8 100644
--- a/drivers/gpio/mscc_sgpio.c
+++ b/drivers/gpio/mscc_sgpio.c
@@ -15,6 +15,7 @@
 #include <errno.h>
 #include <clk.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/err.h>
 
 #define MSCC_SGPIOS_PER_BANK	32
diff --git a/drivers/gpio/mt7621_gpio.c b/drivers/gpio/mt7621_gpio.c
index 54d313d6f1..612413e17b 100644
--- a/drivers/gpio/mt7621_gpio.c
+++ b/drivers/gpio/mt7621_gpio.c
@@ -12,6 +12,7 @@
 #include <errno.h>
 #include <fdtdec.h>
 #include <malloc.h>
+#include <linux/bitops.h>
 #include <linux/io.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
diff --git a/drivers/gpio/mvebu_gpio.c b/drivers/gpio/mvebu_gpio.c
index e8b1c5965c..770cbf6b60 100644
--- a/drivers/gpio/mvebu_gpio.c
+++ b/drivers/gpio/mvebu_gpio.c
@@ -8,6 +8,7 @@
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <errno.h>
+#include <linux/bitops.h>
 
 #define MVEBU_GPIOS_PER_BANK	32
 
diff --git a/drivers/gpio/mxs_gpio.c b/drivers/gpio/mxs_gpio.c
index 3094f1c804..815339a156 100644
--- a/drivers/gpio/mxs_gpio.c
+++ b/drivers/gpio/mxs_gpio.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <log.h>
 #include <malloc.h>
+#include <linux/bitops.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <asm/arch/iomux.h>
diff --git a/drivers/gpio/pca953x_gpio.c b/drivers/gpio/pca953x_gpio.c
index d06b834a3b..fd17d1a591 100644
--- a/drivers/gpio/pca953x_gpio.c
+++ b/drivers/gpio/pca953x_gpio.c
@@ -28,6 +28,7 @@
 #include <asm/io.h>
 #include <dm/device_compat.h>
 #include <dt-bindings/gpio/gpio.h>
+#include <linux/bitops.h>
 
 #define PCA953X_INPUT           0
 #define PCA953X_OUTPUT          1
diff --git a/drivers/gpio/pcf8575_gpio.c b/drivers/gpio/pcf8575_gpio.c
index 7c790bb64a..1b9a18fe5d 100644
--- a/drivers/gpio/pcf8575_gpio.c
+++ b/drivers/gpio/pcf8575_gpio.c
@@ -28,6 +28,7 @@
 #include <i2c.h>
 #include <log.h>
 #include <asm-generic/gpio.h>
+#include <linux/bitops.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/gpio/pic32_gpio.c b/drivers/gpio/pic32_gpio.c
index d8789e7607..bb1ad256fa 100644
--- a/drivers/gpio/pic32_gpio.c
+++ b/drivers/gpio/pic32_gpio.c
@@ -10,6 +10,7 @@
 #include <malloc.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
+#include <linux/bitops.h>
 #include <linux/compat.h>
 #include <mach/pic32.h>
 
diff --git a/drivers/gpio/sh_pfc.c b/drivers/gpio/sh_pfc.c
index 00b806e6a6..0653171af4 100644
--- a/drivers/gpio/sh_pfc.c
+++ b/drivers/gpio/sh_pfc.c
@@ -15,6 +15,7 @@
 #include <asm/bitops.h>
 #include <asm/io.h>
 #include <sh_pfc.h>
+#include <linux/bitops.h>
 #include <linux/bug.h>
 
 static struct pinmux_info *gpioc;
diff --git a/drivers/gpio/sifive-gpio.c b/drivers/gpio/sifive-gpio.c
index 76d5a1d34e..24da3b3c23 100644
--- a/drivers/gpio/sifive-gpio.c
+++ b/drivers/gpio/sifive-gpio.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <errno.h>
 #include <asm/gpio.h>
+#include <linux/bitops.h>
 
 static int sifive_gpio_probe(struct udevice *dev)
 {
diff --git a/drivers/gpio/stm32_gpio.c b/drivers/gpio/stm32_gpio.c
index 240adc488a..bed182f81f 100644
--- a/drivers/gpio/stm32_gpio.c
+++ b/drivers/gpio/stm32_gpio.c
@@ -14,6 +14,7 @@
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/io.h>
 
diff --git a/drivers/gpio/tegra186_gpio_priv.h b/drivers/gpio/tegra186_gpio_priv.h
index ac8df27c46..3e686beedc 100644
--- a/drivers/gpio/tegra186_gpio_priv.h
+++ b/drivers/gpio/tegra186_gpio_priv.h
@@ -10,6 +10,7 @@
  * For each GPIO, there are a set of registers than affect it, all packed
  * back-to-back.
  */
+#include <linux/bitops.h>
 #define TEGRA186_GPIO_ENABLE_CONFIG				0x00
 #define TEGRA186_GPIO_ENABLE_CONFIG_ENABLE			BIT(0)
 #define TEGRA186_GPIO_ENABLE_CONFIG_OUT				BIT(1)
diff --git a/drivers/gpio/zynq_gpio.c b/drivers/gpio/zynq_gpio.c
index fe3b2c3b1a..d0e90b8d63 100644
--- a/drivers/gpio/zynq_gpio.c
+++ b/drivers/gpio/zynq_gpio.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/errno.h>
 #include <dm.h>
 #include <fdtdec.h>
diff --git a/drivers/hwspinlock/stm32_hwspinlock.c b/drivers/hwspinlock/stm32_hwspinlock.c
index 74afb4aec2..8be585a0c8 100644
--- a/drivers/hwspinlock/stm32_hwspinlock.c
+++ b/drivers/hwspinlock/stm32_hwspinlock.c
@@ -9,6 +9,7 @@
 #include <hwspinlock.h>
 #include <malloc.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 #define STM32_MUTEX_COREID	BIT(8)
 #define STM32_MUTEX_LOCK_BIT	BIT(31)
diff --git a/drivers/i2c/at91_i2c.h b/drivers/i2c/at91_i2c.h
index 87f02bfaf3..3915af8372 100644
--- a/drivers/i2c/at91_i2c.h
+++ b/drivers/i2c/at91_i2c.h
@@ -1,6 +1,7 @@
 #ifndef _AT91_I2C_H
 #define _AT91_I2C_H
 
+#include <linux/bitops.h>
 #define	TWI_CR_START		BIT(0)	/* Send a Start Condition */
 #define	TWI_CR_MSEN		BIT(2)	/* Master Transfer Enable */
 #define	TWI_CR_STOP		BIT(1)	/* Send a Stop Condition */
diff --git a/drivers/i2c/designware_i2c.h b/drivers/i2c/designware_i2c.h
index 7ee236193d..dc9a6ccb63 100644
--- a/drivers/i2c/designware_i2c.h
+++ b/drivers/i2c/designware_i2c.h
@@ -10,6 +10,7 @@
 #include <clk.h>
 #include <i2c.h>
 #include <reset.h>
+#include <linux/bitops.h>
 
 struct i2c_regs {
 	u32 ic_con;		/* 0x00 */
diff --git a/drivers/i2c/i2c-cdns.c b/drivers/i2c/i2c-cdns.c
index 402a664876..024c63c4ea 100644
--- a/drivers/i2c/i2c-cdns.c
+++ b/drivers/i2c/i2c-cdns.c
@@ -10,6 +10,7 @@
 #include <common.h>
 #include <dm.h>
 #include <log.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/types.h>
 #include <linux/io.h>
diff --git a/drivers/i2c/i2c-versatile.c b/drivers/i2c/i2c-versatile.c
index 46eb017ea0..62831522bd 100644
--- a/drivers/i2c/i2c-versatile.c
+++ b/drivers/i2c/i2c-versatile.c
@@ -11,6 +11,7 @@
 #include <i2c.h>
 #include <asm/io.h>
 #include <clk.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/io.h>
 
diff --git a/drivers/i2c/ihs_i2c.c b/drivers/i2c/ihs_i2c.c
index 296e01b41c..cec38538da 100644
--- a/drivers/i2c/ihs_i2c.c
+++ b/drivers/i2c/ihs_i2c.c
@@ -14,6 +14,7 @@
 #endif
 #include <log.h>
 #include <asm/unaligned.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 #ifdef CONFIG_DM_I2C
diff --git a/drivers/i2c/meson_i2c.c b/drivers/i2c/meson_i2c.c
index 0a647b8f73..e070caf43f 100644
--- a/drivers/i2c/meson_i2c.c
+++ b/drivers/i2c/meson_i2c.c
@@ -8,6 +8,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <i2c.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 
diff --git a/drivers/i2c/rcar_i2c.c b/drivers/i2c/rcar_i2c.c
index 5a902047bc..4267bbfa5a 100644
--- a/drivers/i2c/rcar_i2c.c
+++ b/drivers/i2c/rcar_i2c.c
@@ -18,6 +18,7 @@
 #include <asm/io.h>
 #include <wait_bit.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 #define RCAR_I2C_ICSCR			0x00 /* slave ctrl */
diff --git a/drivers/i2c/rcar_iic.c b/drivers/i2c/rcar_iic.c
index 6b21f6a532..cad0a623d3 100644
--- a/drivers/i2c/rcar_iic.c
+++ b/drivers/i2c/rcar_iic.c
@@ -14,6 +14,7 @@
 #include <dm.h>
 #include <i2c.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 struct rcar_iic_priv {
diff --git a/drivers/i2c/stm32f7_i2c.c b/drivers/i2c/stm32f7_i2c.c
index 18affd08e3..ada8f4095e 100644
--- a/drivers/i2c/stm32f7_i2c.c
+++ b/drivers/i2c/stm32f7_i2c.c
@@ -9,6 +9,7 @@
 #include <i2c.h>
 #include <log.h>
 #include <reset.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 #include <dm/device.h>
diff --git a/drivers/i2c/tegra186_bpmp_i2c.c b/drivers/i2c/tegra186_bpmp_i2c.c
index ac41a7f0f8..37204718ca 100644
--- a/drivers/i2c/tegra186_bpmp_i2c.c
+++ b/drivers/i2c/tegra186_bpmp_i2c.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <misc.h>
 #include <asm/arch-tegra/bpmp_abi.h>
+#include <linux/bitops.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/led/led_bcm6858.c b/drivers/led/led_bcm6858.c
index 2be4279c08..b415d8b2b4 100644
--- a/drivers/led/led_bcm6858.c
+++ b/drivers/led/led_bcm6858.c
@@ -14,6 +14,7 @@
 #include <log.h>
 #include <asm/io.h>
 #include <dm/lists.h>
+#include <linux/bitops.h>
 
 #define LEDS_MAX		32
 #define LEDS_WAIT		100
diff --git a/drivers/mailbox/stm32-ipcc.c b/drivers/mailbox/stm32-ipcc.c
index 0778eb5225..b8bf356b4a 100644
--- a/drivers/mailbox/stm32-ipcc.c
+++ b/drivers/mailbox/stm32-ipcc.c
@@ -11,6 +11,7 @@
 #include <malloc.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 
 /*
  * IPCC has one set of registers per CPU
diff --git a/drivers/mailbox/tegra-hsp.c b/drivers/mailbox/tegra-hsp.c
index 1d2c979847..f82e6d3d16 100644
--- a/drivers/mailbox/tegra-hsp.c
+++ b/drivers/mailbox/tegra-hsp.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <mailbox-uclass.h>
 #include <dt-bindings/mailbox/tegra186-hsp.h>
+#include <linux/bitops.h>
 
 #define TEGRA_HSP_INT_DIMENSIONING		0x380
 #define TEGRA_HSP_INT_DIMENSIONING_NSI_SHIFT	16
diff --git a/drivers/misc/esm_pmic.c b/drivers/misc/esm_pmic.c
index 92c8d68f7c..a195dc5eb1 100644
--- a/drivers/misc/esm_pmic.c
+++ b/drivers/misc/esm_pmic.c
@@ -12,6 +12,7 @@
 #include <errno.h>
 #include <power/pmic.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 
 #define INT_ESM_REG		0x6c
 #define INT_ESM_MASK		0x3f
diff --git a/drivers/misc/gdsys_ioep.h b/drivers/misc/gdsys_ioep.h
index 4d9524b6b6..f195388eda 100644
--- a/drivers/misc/gdsys_ioep.h
+++ b/drivers/misc/gdsys_ioep.h
@@ -15,6 +15,7 @@
  * @bc:                 Block counter (filled in by FPGA).
  * @packet_length:      Length of the packet's payload bytes.
  */
+#include <linux/bitops.h>
 struct io_generic_packet {
 	u16 target_address;
 	u16 source_address;
diff --git a/drivers/misc/ihs_fpga.c b/drivers/misc/ihs_fpga.c
index 4923c81783..00d34a3adc 100644
--- a/drivers/misc/ihs_fpga.c
+++ b/drivers/misc/ihs_fpga.c
@@ -14,6 +14,7 @@
 #include <log.h>
 #include <regmap.h>
 #include <asm/gpio.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 #include "ihs_fpga.h"
diff --git a/drivers/misc/imx8/scu.c b/drivers/misc/imx8/scu.c
index c988dd402c..cb4ea2878a 100644
--- a/drivers/misc/imx8/scu.c
+++ b/drivers/misc/imx8/scu.c
@@ -13,6 +13,7 @@
 #include <dm/root.h>
 #include <dm/device-internal.h>
 #include <asm/arch/sci/sci.h>
+#include <linux/bitops.h>
 #include <linux/iopoll.h>
 #include <misc.h>
 
diff --git a/drivers/misc/jz4780_efuse.c b/drivers/misc/jz4780_efuse.c
index bc3dc93af2..1fba3271db 100644
--- a/drivers/misc/jz4780_efuse.c
+++ b/drivers/misc/jz4780_efuse.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/unaligned.h>
 #include <errno.h>
+#include <linux/bitops.h>
 #include <mach/jz4780.h>
 #include <wait_bit.h>
 
diff --git a/drivers/misc/k3_avs.c b/drivers/misc/k3_avs.c
index d8048e1b70..408c89315a 100644
--- a/drivers/misc/k3_avs.c
+++ b/drivers/misc/k3_avs.c
@@ -14,6 +14,7 @@
 #include <i2c.h>
 #include <k3-avs.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <power/regulator.h>
 
 #define AM6_VTM_DEVINFO(i)	(priv->base + 0x100 + 0x20 * (i))
diff --git a/drivers/misc/k3_esm.c b/drivers/misc/k3_esm.c
index 8f270f3b5c..cc2a23dd66 100644
--- a/drivers/misc/k3_esm.c
+++ b/drivers/misc/k3_esm.c
@@ -12,6 +12,7 @@
 #include <errno.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 
 #define ESM_SFT_RST			0x0c
 #define ESM_SFT_RST_KEY			0x0f
diff --git a/drivers/misc/mpc83xx_serdes.h b/drivers/misc/mpc83xx_serdes.h
index 89ea1dbab7..2a13c5892b 100644
--- a/drivers/misc/mpc83xx_serdes.h
+++ b/drivers/misc/mpc83xx_serdes.h
@@ -18,6 +18,7 @@
  *			lane E) field of the SRCSCR0
  * @SRDSCR0_TXEQE_SATA: Bitmask to set the TXEQE to the value used for SATA
  */
+#include <linux/bitops.h>
 enum srdscr0_mask {
 	SRDSCR0_DPPA        = BIT(31 - 16),
 	SRDSCR0_DPPE        = BIT(31 - 20),
diff --git a/drivers/misc/tegra186_bpmp.c b/drivers/misc/tegra186_bpmp.c
index 4077c46a23..18da138507 100644
--- a/drivers/misc/tegra186_bpmp.c
+++ b/drivers/misc/tegra186_bpmp.c
@@ -14,6 +14,7 @@
 #include <misc.h>
 #include <asm/arch-tegra/bpmp_abi.h>
 #include <asm/arch-tegra/ivc.h>
+#include <linux/bitops.h>
 #include <linux/err.h>
 
 #define BPMP_IVC_FRAME_COUNT 1
diff --git a/drivers/misc/vexpress_config.c b/drivers/misc/vexpress_config.c
index 53d7e1d154..02e5b586e2 100644
--- a/drivers/misc/vexpress_config.c
+++ b/drivers/misc/vexpress_config.c
@@ -9,6 +9,7 @@
 #include <malloc.h>
 #include <dm/read.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <misc.h>
 
diff --git a/drivers/mmc/am654_sdhci.c b/drivers/mmc/am654_sdhci.c
index ca76e1f559..cbc531dc53 100644
--- a/drivers/mmc/am654_sdhci.c
+++ b/drivers/mmc/am654_sdhci.c
@@ -13,6 +13,7 @@
 #include <regmap.h>
 #include <sdhci.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/err.h>
 
 /* CTL_CFG Registers */
diff --git a/drivers/mmc/bcm2835_sdhost.c b/drivers/mmc/bcm2835_sdhost.c
index 52bb39a905..c4876e81f8 100644
--- a/drivers/mmc/bcm2835_sdhost.c
+++ b/drivers/mmc/bcm2835_sdhost.c
@@ -37,6 +37,7 @@
 #include <asm/arch/mbox.h>
 #include <asm/unaligned.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/bug.h>
 #include <linux/compat.h>
 #include <linux/delay.h>
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index 665eb9aa68..d5d955846c 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -24,6 +24,7 @@
 #include <asm/io.h>
 #include <dm.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c
index 1d040f6086..588d6a9d76 100644
--- a/drivers/mmc/fsl_esdhc_imx.c
+++ b/drivers/mmc/fsl_esdhc_imx.c
@@ -22,6 +22,7 @@
 #include <part.h>
 #include <asm/cache.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 #include <power/regulator.h>
diff --git a/drivers/mmc/ftsdc010_mci.c b/drivers/mmc/ftsdc010_mci.c
index 5b8416813b..b37523e26f 100644
--- a/drivers/mmc/ftsdc010_mci.c
+++ b/drivers/mmc/ftsdc010_mci.c
@@ -15,6 +15,7 @@
 #include <malloc.h>
 #include <part.h>
 #include <mmc.h>
+#include <linux/bitops.h>
 #include <linux/io.h>
 #include <linux/errno.h>
 #include <asm/byteorder.h>
diff --git a/drivers/mmc/jz_mmc.c b/drivers/mmc/jz_mmc.c
index 83ae1e5169..d3f1eddf45 100644
--- a/drivers/mmc/jz_mmc.c
+++ b/drivers/mmc/jz_mmc.c
@@ -13,6 +13,7 @@
 #include <asm/unaligned.h>
 #include <errno.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <mach/jz4780.h>
 #include <wait_bit.h>
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 02494db75a..620bb93064 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -16,6 +16,7 @@
 #include <errno.h>
 #include <mmc.h>
 #include <part.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <power/regulator.h>
 #include <malloc.h>
diff --git a/drivers/mmc/mmc_spi.c b/drivers/mmc/mmc_spi.c
index 0b690ecb4b..e76ab54838 100644
--- a/drivers/mmc/mmc_spi.c
+++ b/drivers/mmc/mmc_spi.c
@@ -13,6 +13,7 @@
 #include <part.h>
 #include <mmc.h>
 #include <stdlib.h>
+#include <linux/bitops.h>
 #include <u-boot/crc.h>
 #include <linux/crc7.h>
 #include <asm/byteorder.h>
diff --git a/drivers/mmc/mxsmmc.c b/drivers/mmc/mxsmmc.c
index ad2c0e0002..e3c352b44a 100644
--- a/drivers/mmc/mxsmmc.c
+++ b/drivers/mmc/mxsmmc.c
@@ -24,6 +24,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <mmc.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
index 0c21ec716e..8636cd713a 100644
--- a/drivers/mmc/omap_hsmmc.c
+++ b/drivers/mmc/omap_hsmmc.c
@@ -50,6 +50,7 @@
 #endif
 #include <dm.h>
 #include <dm/devres.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 #include <power/regulator.h>
diff --git a/drivers/mmc/renesas-sdhi.c b/drivers/mmc/renesas-sdhi.c
index 668222999d..d6ea99d2ce 100644
--- a/drivers/mmc/renesas-sdhi.c
+++ b/drivers/mmc/renesas-sdhi.c
@@ -12,6 +12,7 @@
 #include <mmc.h>
 #include <dm.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/compat.h>
 #include <linux/delay.h>
 #include <linux/dma-direction.h>
diff --git a/drivers/mmc/sdhci-cadence.c b/drivers/mmc/sdhci-cadence.c
index 86408d57f3..7b5010b655 100644
--- a/drivers/mmc/sdhci-cadence.c
+++ b/drivers/mmc/sdhci-cadence.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <dm/device_compat.h>
 #include <linux/bitfield.h>
+#include <linux/bitops.h>
 #include <linux/bug.h>
 #include <linux/io.h>
 #include <linux/iopoll.h>
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index d8fd11ffd7..92401da59a 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -17,6 +17,7 @@
 #include <sdhci.h>
 #include <dm.h>
 #include <asm/cache.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/dma-mapping.h>
 
diff --git a/drivers/mmc/sh_mmcif.c b/drivers/mmc/sh_mmcif.c
index 1a01fe5a73..2e994d0178 100644
--- a/drivers/mmc/sh_mmcif.c
+++ b/drivers/mmc/sh_mmcif.c
@@ -15,6 +15,7 @@
 #include <dm.h>
 #include <malloc.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/compat.h>
diff --git a/drivers/mmc/sh_sdhi.c b/drivers/mmc/sh_sdhi.c
index 22a0f78933..772fe943e4 100644
--- a/drivers/mmc/sh_sdhi.c
+++ b/drivers/mmc/sh_sdhi.c
@@ -16,6 +16,7 @@
 #include <dm.h>
 #include <part.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/compat.h>
diff --git a/drivers/mmc/stm32_sdmmc2.c b/drivers/mmc/stm32_sdmmc2.c
index 73cc7e05fb..bd5dc29c08 100644
--- a/drivers/mmc/stm32_sdmmc2.c
+++ b/drivers/mmc/stm32_sdmmc2.c
@@ -11,7 +11,9 @@
 #include <fdtdec.h>
 #include <log.h>
 #include <malloc.h>
+#include <asm/bitops.h>
 #include <asm/cache.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <mmc.h>
diff --git a/drivers/mmc/tegra_mmc.c b/drivers/mmc/tegra_mmc.c
index 78838682c7..cc78a2f2f0 100644
--- a/drivers/mmc/tegra_mmc.c
+++ b/drivers/mmc/tegra_mmc.c
@@ -15,6 +15,7 @@
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch-tegra/tegra_mmc.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 #if defined(CONFIG_TEGRA30) || defined(CONFIG_TEGRA210)
diff --git a/drivers/mmc/tmio-common.h b/drivers/mmc/tmio-common.h
index 2f671df4bc..9062300c64 100644
--- a/drivers/mmc/tmio-common.h
+++ b/drivers/mmc/tmio-common.h
@@ -7,6 +7,7 @@
 #ifndef __TMIO_COMMON_H__
 #define __TMIO_COMMON_H__
 
+#include <linux/bitops.h>
 #define TMIO_SD_CMD			0x000	/* command */
 #define   TMIO_SD_CMD_NOSTOP		BIT(14)	/* No automatic CMD12 issue */
 #define   TMIO_SD_CMD_MULTI		BIT(13)	/* multiple block transfer */
diff --git a/drivers/mmc/xenon_sdhci.c b/drivers/mmc/xenon_sdhci.c
index 7dc600032b..e765dd384a 100644
--- a/drivers/mmc/xenon_sdhci.c
+++ b/drivers/mmc/xenon_sdhci.c
@@ -17,6 +17,7 @@
 #include <common.h>
 #include <dm.h>
 #include <fdtdec.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <malloc.h>
diff --git a/drivers/mtd/altera_qspi.c b/drivers/mtd/altera_qspi.c
index 6896351995..cd4d32959a 100644
--- a/drivers/mtd/altera_qspi.c
+++ b/drivers/mtd/altera_qspi.c
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <mtd.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index 97e88b7178..1a4dec34d9 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -28,6 +28,7 @@
 #include <linux/gfp.h>
 #include <linux/slab.h>
 #else
+#include <linux/bitops.h>
 #include <linux/bug.h>
 #include <linux/err.h>
 #include <ubi_uboot.h>
diff --git a/drivers/mtd/nand/bbt.c b/drivers/mtd/nand/bbt.c
index 133670cb19..84d60b8652 100644
--- a/drivers/mtd/nand/bbt.c
+++ b/drivers/mtd/nand/bbt.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <dm/devres.h>
+#include <linux/bitops.h>
 #include <linux/mtd/nand.h>
 #ifndef __UBOOT__
 #include <linux/slab.h>
diff --git a/drivers/mtd/nand/core.c b/drivers/mtd/nand/core.c
index bc0accf8c6..6fbd24ba74 100644
--- a/drivers/mtd/nand/core.c
+++ b/drivers/mtd/nand/core.c
@@ -14,6 +14,7 @@
 #include <linux/compat.h>
 #include <linux/module.h>
 #endif
+#include <linux/bitops.h>
 #include <linux/mtd/nand.h>
 
 /**
diff --git a/drivers/mtd/nand/raw/atmel_nand.c b/drivers/mtd/nand/raw/atmel_nand.c
index 4a017ea74d..5e95901e27 100644
--- a/drivers/mtd/nand/raw/atmel_nand.c
+++ b/drivers/mtd/nand/raw/atmel_nand.c
@@ -16,6 +16,7 @@
 #include <asm/arch/gpio.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
+#include <linux/bitops.h>
 #include <linux/bug.h>
 #include <linux/delay.h>
 
diff --git a/drivers/mtd/nand/raw/brcmnand/bcm63158_nand.c b/drivers/mtd/nand/raw/brcmnand/bcm63158_nand.c
index ea7c65a1f6..6313403cd6 100644
--- a/drivers/mtd/nand/raw/brcmnand/bcm63158_nand.c
+++ b/drivers/mtd/nand/raw/brcmnand/bcm63158_nand.c
@@ -4,6 +4,7 @@
 #include <asm/io.h>
 #include <memalign.h>
 #include <nand.h>
+#include <linux/bitops.h>
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/io.h>
diff --git a/drivers/mtd/nand/raw/brcmnand/bcm6368_nand.c b/drivers/mtd/nand/raw/brcmnand/bcm6368_nand.c
index e2f5452c27..cd4b24a51a 100644
--- a/drivers/mtd/nand/raw/brcmnand/bcm6368_nand.c
+++ b/drivers/mtd/nand/raw/brcmnand/bcm6368_nand.c
@@ -4,6 +4,7 @@
 #include <asm/io.h>
 #include <memalign.h>
 #include <nand.h>
+#include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/io.h>
 #include <linux/ioport.h>
diff --git a/drivers/mtd/nand/raw/brcmnand/bcm68360_nand.c b/drivers/mtd/nand/raw/brcmnand/bcm68360_nand.c
index 0f1a28e476..aa042bef15 100644
--- a/drivers/mtd/nand/raw/brcmnand/bcm68360_nand.c
+++ b/drivers/mtd/nand/raw/brcmnand/bcm68360_nand.c
@@ -4,6 +4,7 @@
 #include <asm/io.h>
 #include <memalign.h>
 #include <nand.h>
+#include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/io.h>
 #include <linux/ioport.h>
diff --git a/drivers/mtd/nand/raw/brcmnand/bcm6838_nand.c b/drivers/mtd/nand/raw/brcmnand/bcm6838_nand.c
index 3a136155dd..0788455090 100644
--- a/drivers/mtd/nand/raw/brcmnand/bcm6838_nand.c
+++ b/drivers/mtd/nand/raw/brcmnand/bcm6838_nand.c
@@ -4,6 +4,7 @@
 #include <asm/io.h>
 #include <memalign.h>
 #include <nand.h>
+#include <linux/bitops.h>
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/io.h>
diff --git a/drivers/mtd/nand/raw/brcmnand/bcm6858_nand.c b/drivers/mtd/nand/raw/brcmnand/bcm6858_nand.c
index 6aca011db2..818eae8a7c 100644
--- a/drivers/mtd/nand/raw/brcmnand/bcm6858_nand.c
+++ b/drivers/mtd/nand/raw/brcmnand/bcm6858_nand.c
@@ -4,6 +4,7 @@
 #include <asm/io.h>
 #include <memalign.h>
 #include <nand.h>
+#include <linux/bitops.h>
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/io.h>
diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
index 5d77d53a09..48c0ca69de 100644
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
@@ -19,6 +19,7 @@
 #include <clk.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
+#include <linux/bitops.h>
 #include <linux/bug.h>
 #include <linux/err.h>
 #include <linux/ioport.h>
diff --git a/drivers/mtd/nand/raw/denali.c b/drivers/mtd/nand/raw/denali.c
index a58d7ce4ab..5bae7f1197 100644
--- a/drivers/mtd/nand/raw/denali.c
+++ b/drivers/mtd/nand/raw/denali.c
@@ -14,6 +14,7 @@
 #include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <linux/bitfield.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/dma-direction.h>
 #include <linux/dma-mapping.h>
diff --git a/drivers/mtd/nand/raw/mxs_nand_spl.c b/drivers/mtd/nand/raw/mxs_nand_spl.c
index a008a388ed..c2e001735e 100644
--- a/drivers/mtd/nand/raw/mxs_nand_spl.c
+++ b/drivers/mtd/nand/raw/mxs_nand_spl.c
@@ -9,6 +9,7 @@
 #include <malloc.h>
 #include <mxs_nand.h>
 #include <asm/cache.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 
diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c
index 26650389f4..698968bc11 100644
--- a/drivers/mtd/nand/raw/nand_base.c
+++ b/drivers/mtd/nand/raw/nand_base.c
@@ -36,6 +36,7 @@
 #include <malloc.h>
 #include <watchdog.h>
 #include <dm/devres.h>
+#include <linux/bitops.h>
 #include <linux/bug.h>
 #include <linux/delay.h>
 #include <linux/err.h>
diff --git a/drivers/mtd/nand/raw/pxa3xx_nand.c b/drivers/mtd/nand/raw/pxa3xx_nand.c
index 244b0fecb7..a30e82166b 100644
--- a/drivers/mtd/nand/raw/pxa3xx_nand.c
+++ b/drivers/mtd/nand/raw/pxa3xx_nand.c
@@ -12,6 +12,7 @@
 #include <nand.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
+#include <linux/bitops.h>
 #include <linux/bug.h>
 #include <linux/delay.h>
 #include <linux/err.h>
diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
index 97188b200c..3306bd8ac9 100644
--- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
+++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <nand.h>
 #include <reset.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/iopoll.h>
diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c
index 5331e73c2d..004b6f17a5 100644
--- a/drivers/mtd/nand/raw/sunxi_nand.c
+++ b/drivers/mtd/nand/raw/sunxi_nand.c
@@ -31,6 +31,7 @@
 #include <nand.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 
diff --git a/drivers/mtd/nand/raw/sunxi_nand_spl.c b/drivers/mtd/nand/raw/sunxi_nand_spl.c
index 8b2f7ea491..85d8013b1a 100644
--- a/drivers/mtd/nand/raw/sunxi_nand_spl.c
+++ b/drivers/mtd/nand/raw/sunxi_nand_spl.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <config.h>
 #include <nand.h>
+#include <linux/bitops.h>
 #include <linux/ctype.h>
 #include <linux/delay.h>
 
diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c
index f76b1239a4..93371fdde0 100644
--- a/drivers/mtd/nand/spi/core.c
+++ b/drivers/mtd/nand/spi/core.c
@@ -26,6 +26,7 @@
 #include <spi-mem.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
+#include <linux/bitops.h>
 #include <linux/bug.h>
 #include <linux/mtd/spinand.h>
 #endif
diff --git a/drivers/mtd/nand/spi/micron.c b/drivers/mtd/nand/spi/micron.c
index 687306e33e..04de51cb46 100644
--- a/drivers/mtd/nand/spi/micron.c
+++ b/drivers/mtd/nand/spi/micron.c
@@ -11,6 +11,7 @@
 #include <linux/device.h>
 #include <linux/kernel.h>
 #endif
+#include <linux/bitops.h>
 #include <linux/mtd/spinand.h>
 
 #define SPINAND_MFR_MICRON		0x2c
diff --git a/drivers/mtd/nand/spi/winbond.c b/drivers/mtd/nand/spi/winbond.c
index 6ede98c85d..c119486efb 100644
--- a/drivers/mtd/nand/spi/winbond.c
+++ b/drivers/mtd/nand/spi/winbond.c
@@ -12,6 +12,7 @@
 #include <linux/device.h>
 #include <linux/kernel.h>
 #endif
+#include <linux/bitops.h>
 #include <linux/mtd/spinand.h>
 
 #define SPINAND_MFR_WINBOND		0xEF
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index 0580b509f8..36daef01ae 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -23,6 +23,7 @@
 #include <log.h>
 #include <watchdog.h>
 #include <dm/devres.h>
+#include <linux/bitops.h>
 #include <linux/compat.h>
 #include <linux/mtd/mtd.h>
 #include "linux/mtd/flashchip.h"
diff --git a/drivers/mtd/onenand/onenand_spl.c b/drivers/mtd/onenand/onenand_spl.c
index c4983d15d5..ab6f1a8be3 100644
--- a/drivers/mtd/onenand/onenand_spl.c
+++ b/drivers/mtd/onenand/onenand_spl.c
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/mtd/onenand_regs.h>
 #include <onenand_uboot.h>
 
diff --git a/drivers/mtd/pic32_flash.c b/drivers/mtd/pic32_flash.c
index 1766ba4802..a58a2c4b6c 100644
--- a/drivers/mtd/pic32_flash.c
+++ b/drivers/mtd/pic32_flash.c
@@ -12,6 +12,7 @@
 #include <flash.h>
 #include <init.h>
 #include <irq_func.h>
+#include <linux/bitops.h>
 #include <mach/pic32.h>
 #include <wait_bit.h>
 
diff --git a/drivers/mtd/renesas_rpc_hf.c b/drivers/mtd/renesas_rpc_hf.c
index fc2aa22d7f..65320c7ed9 100644
--- a/drivers/mtd/renesas_rpc_hf.c
+++ b/drivers/mtd/renesas_rpc_hf.c
@@ -19,6 +19,7 @@
 #include <flash.h>
 #include <mtd.h>
 #include <wait_bit.h>
+#include <linux/bitops.h>
 #include <mtd/cfi_flash.h>
 
 #define RPC_CMNCR		0x0000	/* R/W */
diff --git a/drivers/mtd/spi/sf_internal.h b/drivers/mtd/spi/sf_internal.h
index 940b2e4c9e..ce0cf4c428 100644
--- a/drivers/mtd/spi/sf_internal.h
+++ b/drivers/mtd/spi/sf_internal.h
@@ -9,6 +9,7 @@
 #ifndef _SF_INTERNAL_H_
 #define _SF_INTERNAL_H_
 
+#include <linux/bitops.h>
 #include <linux/types.h>
 #include <linux/compiler.h>
 
diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c
index a4ec5bffc0..cfdebaee5c 100644
--- a/drivers/mtd/spi/spi-nor-core.c
+++ b/drivers/mtd/spi/spi-nor-core.c
@@ -13,6 +13,7 @@
 #include <log.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
+#include <linux/bitops.h>
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/log2.h>
diff --git a/drivers/mtd/ubispl/ubispl.c b/drivers/mtd/ubispl/ubispl.c
index ee2df11522..03b31f002b 100644
--- a/drivers/mtd/ubispl/ubispl.c
+++ b/drivers/mtd/ubispl/ubispl.c
@@ -13,6 +13,7 @@
 #include <u-boot/crc.h>
 #include <ubispl.h>
 
+#include <linux/bitops.h>
 #include <linux/crc32.h>
 
 #include "ubispl.h"
diff --git a/drivers/net/ag7xxx.c b/drivers/net/ag7xxx.c
index 0fe140cf6e..3b5d11f956 100644
--- a/drivers/net/ag7xxx.c
+++ b/drivers/net/ag7xxx.c
@@ -16,6 +16,7 @@
 #include <malloc.h>
 #include <net.h>
 #include <asm/cache.h>
+#include <linux/bitops.h>
 #include <linux/compiler.h>
 #include <linux/delay.h>
 #include <linux/err.h>
diff --git a/drivers/net/altera_tse.h b/drivers/net/altera_tse.h
index 2b1af81429..79509b8084 100644
--- a/drivers/net/altera_tse.h
+++ b/drivers/net/altera_tse.h
@@ -11,6 +11,7 @@
 #ifndef _ALTERA_TSE_H_
 #define _ALTERA_TSE_H_
 
+#include <linux/bitops.h>
 #define __packed_1_    __packed __aligned(1)
 
 /* dma type */
diff --git a/drivers/net/bcm-sf2-eth-gmac.c b/drivers/net/bcm-sf2-eth-gmac.c
index f57861e870..3caf0f3310 100644
--- a/drivers/net/bcm-sf2-eth-gmac.c
+++ b/drivers/net/bcm-sf2-eth-gmac.c
@@ -19,6 +19,7 @@
 #include <asm/io.h>
 #include <phy.h>
 #include <linux/delay.h>
+#include <linux/bitops.h>
 
 #include "bcm-sf2-eth.h"
 #include "bcm-sf2-eth-gmac.h"
diff --git a/drivers/net/bcmgenet.c b/drivers/net/bcmgenet.c
index 6a428c420a..c6c674dfa5 100644
--- a/drivers/net/bcmgenet.c
+++ b/drivers/net/bcmgenet.c
@@ -23,6 +23,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <fdt_support.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 #include <malloc.h>
diff --git a/drivers/net/dc2114x.c b/drivers/net/dc2114x.c
index 611a8c4b9e..c55358ef83 100644
--- a/drivers/net/dc2114x.c
+++ b/drivers/net/dc2114x.c
@@ -6,6 +6,7 @@
 #include <net.h>
 #include <netdev.h>
 #include <pci.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 #define SROM_DLEVEL	0
diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c
index 6b9b20fd18..8ac735df35 100644
--- a/drivers/net/dwc_eth_qos.c
+++ b/drivers/net/dwc_eth_qos.c
@@ -43,6 +43,7 @@
 #include <asm/cache.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 /* Core registers */
diff --git a/drivers/net/fsl_enetc.h b/drivers/net/fsl_enetc.h
index 48c3005cb3..37e7e85843 100644
--- a/drivers/net/fsl_enetc.h
+++ b/drivers/net/fsl_enetc.h
@@ -7,6 +7,7 @@
 #ifndef _ENETC_H
 #define _ENETC_H
 
+#include <linux/bitops.h>
 #define enetc_dbg(dev, fmt, args...)	debug("%s:" fmt, dev->name, ##args)
 
 /* PCI function IDs */
diff --git a/drivers/net/ftgmac100.c b/drivers/net/ftgmac100.c
index 3322dcf2aa..e4d08f2ba0 100644
--- a/drivers/net/ftgmac100.c
+++ b/drivers/net/ftgmac100.c
@@ -22,6 +22,7 @@
 #include <wait_bit.h>
 #include <asm/cache.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/io.h>
 #include <linux/iopoll.h>
 
diff --git a/drivers/net/ftgmac100.h b/drivers/net/ftgmac100.h
index 9a789e4d5b..f7874ae68b 100644
--- a/drivers/net/ftgmac100.h
+++ b/drivers/net/ftgmac100.h
@@ -13,6 +13,7 @@
 #define __FTGMAC100_H
 
 /* The registers offset table of ftgmac100 */
+#include <linux/bitops.h>
 struct ftgmac100 {
 	unsigned int	isr;		/* 0x00 */
 	unsigned int	ier;		/* 0x04 */
diff --git a/drivers/net/gmac_rockchip.c b/drivers/net/gmac_rockchip.c
index 52a637bd54..8d95ee15ff 100644
--- a/drivers/net/gmac_rockchip.c
+++ b/drivers/net/gmac_rockchip.c
@@ -26,6 +26,7 @@
 #include <asm/arch-rockchip/grf_rv1108.h>
 #include <dm/pinctrl.h>
 #include <dt-bindings/clock/rk3288-cru.h>
+#include <linux/bitops.h>
 #include "designware.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/net/higmacv300.c b/drivers/net/higmacv300.c
index 1ec98644c9..2aae7f4863 100644
--- a/drivers/net/higmacv300.c
+++ b/drivers/net/higmacv300.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <common.h>
 #include <console.h>
+#include <linux/bitops.h>
 #include <linux/bug.h>
 #include <linux/delay.h>
 #include <linux/mii.h>
diff --git a/drivers/net/mscc_eswitch/jr2_switch.c b/drivers/net/mscc_eswitch/jr2_switch.c
index 76823c618e..1c9a401de8 100644
--- a/drivers/net/mscc_eswitch/jr2_switch.c
+++ b/drivers/net/mscc_eswitch/jr2_switch.c
@@ -10,6 +10,7 @@
 #include <dm/of_access.h>
 #include <dm/of_addr.h>
 #include <fdt_support.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/io.h>
 #include <linux/ioport.h>
diff --git a/drivers/net/mscc_eswitch/luton_switch.c b/drivers/net/mscc_eswitch/luton_switch.c
index 9d24c005c1..1d46d0e5e1 100644
--- a/drivers/net/mscc_eswitch/luton_switch.c
+++ b/drivers/net/mscc_eswitch/luton_switch.c
@@ -10,6 +10,7 @@
 #include <dm/of_access.h>
 #include <dm/of_addr.h>
 #include <fdt_support.h>
+#include <linux/bitops.h>
 #include <linux/io.h>
 #include <linux/ioport.h>
 #include <miiphy.h>
diff --git a/drivers/net/mscc_eswitch/mscc_mac_table.c b/drivers/net/mscc_eswitch/mscc_mac_table.c
index 833e233aa5..25b9cad42c 100644
--- a/drivers/net/mscc_eswitch/mscc_mac_table.c
+++ b/drivers/net/mscc_eswitch/mscc_mac_table.c
@@ -3,6 +3,7 @@
  * Copyright (c) 2018 Microsemi Corporation
  */
 
+#include <linux/bitops.h>
 #include <linux/io.h>
 #include "mscc_mac_table.h"
 
diff --git a/drivers/net/mscc_eswitch/mscc_miim.c b/drivers/net/mscc_eswitch/mscc_miim.c
index d8ee8df47b..6687787b1a 100644
--- a/drivers/net/mscc_eswitch/mscc_miim.c
+++ b/drivers/net/mscc_eswitch/mscc_miim.c
@@ -5,6 +5,7 @@
 
 #include <miiphy.h>
 #include <wait_bit.h>
+#include <linux/bitops.h>
 #include "mscc_miim.h"
 
 #define MIIM_STATUS			0x0
diff --git a/drivers/net/mscc_eswitch/mscc_xfer.c b/drivers/net/mscc_eswitch/mscc_xfer.c
index 01eb204db8..6f74746457 100644
--- a/drivers/net/mscc_eswitch/mscc_xfer.c
+++ b/drivers/net/mscc_eswitch/mscc_xfer.c
@@ -4,6 +4,7 @@
  */
 
 #include <log.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/io.h>
 #include "mscc_xfer.h"
diff --git a/drivers/net/mscc_eswitch/ocelot_switch.c b/drivers/net/mscc_eswitch/ocelot_switch.c
index cae31e2f6e..2a48dc6a19 100644
--- a/drivers/net/mscc_eswitch/ocelot_switch.c
+++ b/drivers/net/mscc_eswitch/ocelot_switch.c
@@ -11,6 +11,7 @@
 #include <dm/of_access.h>
 #include <dm/of_addr.h>
 #include <fdt_support.h>
+#include <linux/bitops.h>
 #include <linux/io.h>
 #include <linux/ioport.h>
 #include <miiphy.h>
diff --git a/drivers/net/mscc_eswitch/serval_switch.c b/drivers/net/mscc_eswitch/serval_switch.c
index cf8bf9c8b0..d8ee1a7698 100644
--- a/drivers/net/mscc_eswitch/serval_switch.c
+++ b/drivers/net/mscc_eswitch/serval_switch.c
@@ -11,6 +11,7 @@
 #include <dm/of_access.h>
 #include <dm/of_addr.h>
 #include <fdt_support.h>
+#include <linux/bitops.h>
 #include <linux/io.h>
 #include <linux/ioport.h>
 #include <miiphy.h>
diff --git a/drivers/net/mscc_eswitch/servalt_switch.c b/drivers/net/mscc_eswitch/servalt_switch.c
index bf95a38354..1cf2273142 100644
--- a/drivers/net/mscc_eswitch/servalt_switch.c
+++ b/drivers/net/mscc_eswitch/servalt_switch.c
@@ -10,6 +10,7 @@
 #include <dm/of_access.h>
 #include <dm/of_addr.h>
 #include <fdt_support.h>
+#include <linux/bitops.h>
 #include <linux/io.h>
 #include <linux/ioport.h>
 #include <miiphy.h>
diff --git a/drivers/net/mt7628-eth.c b/drivers/net/mt7628-eth.c
index a2e022db35..64f1c8c828 100644
--- a/drivers/net/mt7628-eth.c
+++ b/drivers/net/mt7628-eth.c
@@ -25,6 +25,7 @@
 #include <asm/cache.h>
 #include <asm/io.h>
 #include <linux/bitfield.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 
diff --git a/drivers/net/mtk_eth.h b/drivers/net/mtk_eth.h
index f2940c9996..be74ac27ea 100644
--- a/drivers/net/mtk_eth.h
+++ b/drivers/net/mtk_eth.h
@@ -10,6 +10,7 @@
 #define _MTK_ETH_H_
 
 /* Frame Engine Register Bases */
+#include <linux/bitops.h>
 #define PDMA_BASE			0x0800
 #define GDMA1_BASE			0x0500
 #define GDMA2_BASE			0x1500
diff --git a/drivers/net/mvmdio.c b/drivers/net/mvmdio.c
index ec6805e536..a8e93e80fc 100644
--- a/drivers/net/mvmdio.c
+++ b/drivers/net/mvmdio.c
@@ -12,6 +12,7 @@
 #include <phy.h>
 #include <asm/io.h>
 #include <wait_bit.h>
+#include <linux/bitops.h>
 
 #define MVMDIO_SMI_DATA_SHIFT		0
 #define MVMDIO_SMI_PHY_ADDR_SHIFT	16
diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c
index f9aef17f7e..092f619bd5 100644
--- a/drivers/net/mvneta.c
+++ b/drivers/net/mvneta.c
@@ -24,6 +24,7 @@
 #include <asm/io.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
+#include <linux/bitops.h>
 #include <linux/bug.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c
index ebe67e45ab..19b9375ee2 100644
--- a/drivers/net/mvpp2.c
+++ b/drivers/net/mvpp2.c
@@ -26,6 +26,7 @@
 #include <config.h>
 #include <malloc.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/bug.h>
 #include <linux/delay.h>
 #include <linux/err.h>
diff --git a/drivers/net/pfe_eth/pfe_firmware.c b/drivers/net/pfe_eth/pfe_firmware.c
index 0ad8c63d71..0493cfe872 100644
--- a/drivers/net/pfe_eth/pfe_firmware.c
+++ b/drivers/net/pfe_eth/pfe_firmware.c
@@ -13,6 +13,7 @@
 #include <image.h>
 #include <log.h>
 #include <malloc.h>
+#include <linux/bitops.h>
 #include <net/pfe_eth/pfe_eth.h>
 #include <net/pfe_eth/pfe_firmware.h>
 #ifdef CONFIG_CHAIN_OF_TRUST
diff --git a/drivers/net/pfe_eth/pfe_hw.c b/drivers/net/pfe_eth/pfe_hw.c
index caba8717be..722f5c238f 100644
--- a/drivers/net/pfe_eth/pfe_hw.c
+++ b/drivers/net/pfe_eth/pfe_hw.c
@@ -4,6 +4,7 @@
  * Copyright 2017 NXP
  */
 #include <log.h>
+#include <linux/bitops.h>
 #include <net/pfe_eth/pfe_eth.h>
 #include <net/pfe_eth/pfe/pfe_hw.h>
 
diff --git a/drivers/net/phy/aquantia.c b/drivers/net/phy/aquantia.c
index 8b1cad8540..68cd3d03fd 100644
--- a/drivers/net/phy/aquantia.c
+++ b/drivers/net/phy/aquantia.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <net.h>
 #include <phy.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <u-boot/crc.h>
 #include <malloc.h>
diff --git a/drivers/net/phy/atheros.c b/drivers/net/phy/atheros.c
index 47ff9f8d44..13f7275d17 100644
--- a/drivers/net/phy/atheros.c
+++ b/drivers/net/phy/atheros.c
@@ -10,6 +10,7 @@
 #include <phy.h>
 #include <dm/device_compat.h>
 #include <linux/bitfield.h>
+#include <linux/bitops.h>
 #include <dt-bindings/net/qca-ar803x.h>
 
 #define AR803x_PHY_DEBUG_ADDR_REG	0x1d
diff --git a/drivers/net/phy/b53.c b/drivers/net/phy/b53.c
index 25dbf215b4..21da53c7e5 100644
--- a/drivers/net/phy/b53.c
+++ b/drivers/net/phy/b53.c
@@ -24,6 +24,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 #include <errno.h>
diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c
index 6fac0d5956..d435cc1e6c 100644
--- a/drivers/net/phy/dp83867.c
+++ b/drivers/net/phy/dp83867.c
@@ -7,6 +7,7 @@
 #include <log.h>
 #include <phy.h>
 #include <dm/devres.h>
+#include <linux/bitops.h>
 #include <linux/compat.h>
 #include <malloc.h>
 
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index be5e3dcaab..a62c695c5c 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <errno.h>
 #include <phy.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 #define PHY_AUTONEGOTIATE_TIMEOUT 5000
diff --git a/drivers/net/phy/micrel_ksz8xxx.c b/drivers/net/phy/micrel_ksz8xxx.c
index e27fc45a28..98a0c83e68 100644
--- a/drivers/net/phy/micrel_ksz8xxx.c
+++ b/drivers/net/phy/micrel_ksz8xxx.c
@@ -12,6 +12,7 @@
 #include <fdtdec.h>
 #include <micrel.h>
 #include <phy.h>
+#include <linux/bitops.h>
 
 static struct phy_driver KSZ804_driver = {
 	.name = "Micrel KSZ804",
diff --git a/drivers/net/phy/mscc.c b/drivers/net/phy/mscc.c
index 9fd5ca7c9f..709979f48c 100644
--- a/drivers/net/phy/mscc.c
+++ b/drivers/net/phy/mscc.c
@@ -13,6 +13,7 @@
 #include <miiphy.h>
 #include <bitfield.h>
 #include <time.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 /* Microsemi PHY ID's */
diff --git a/drivers/net/phy/mv88e61xx.c b/drivers/net/phy/mv88e61xx.c
index 3f8aa7cd99..7eff37b244 100644
--- a/drivers/net/phy/mv88e61xx.c
+++ b/drivers/net/phy/mv88e61xx.c
@@ -31,6 +31,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 #include <bitfield.h>
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 6b6497c93a..cce09c47f9 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -17,6 +17,7 @@
 #include <miiphy.h>
 #include <phy.h>
 #include <errno.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/compiler.h>
diff --git a/drivers/net/pic32_eth.h b/drivers/net/pic32_eth.h
index 823c565a9b..7b873bc772 100644
--- a/drivers/net/pic32_eth.h
+++ b/drivers/net/pic32_eth.h
@@ -7,6 +7,7 @@
 #ifndef __MICROCHIP_PIC32_ETH_H_
 #define __MICROCHIP_PIC32_ETH_H_
 
+#include <linux/bitops.h>
 #include <mach/pic32.h>
 
 /* Ethernet */
diff --git a/drivers/net/ravb.c b/drivers/net/ravb.c
index 3dab91b74b..393ee9bb81 100644
--- a/drivers/net/ravb.c
+++ b/drivers/net/ravb.c
@@ -17,6 +17,7 @@
 #include <miiphy.h>
 #include <malloc.h>
 #include <asm/cache.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/mii.h>
 #include <wait_bit.h>
diff --git a/drivers/net/rtl8139.c b/drivers/net/rtl8139.c
index fd2454b56f..0daeefa489 100644
--- a/drivers/net/rtl8139.c
+++ b/drivers/net/rtl8139.c
@@ -76,6 +76,7 @@
 #include <netdev.h>
 #include <asm/io.h>
 #include <pci.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/types.h>
 
diff --git a/drivers/net/sni_ave.c b/drivers/net/sni_ave.c
index 92b4a65631..0784635689 100644
--- a/drivers/net/sni_ave.c
+++ b/drivers/net/sni_ave.c
@@ -17,6 +17,7 @@
 #include <syscon.h>
 #include <asm/cache.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/io.h>
diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c
index 45ac118495..99e24c6348 100644
--- a/drivers/net/sun8i_emac.c
+++ b/drivers/net/sun8i_emac.c
@@ -21,6 +21,7 @@
 #include <dm.h>
 #include <fdt_support.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 #include <malloc.h>
diff --git a/drivers/net/ti/am65-cpsw-nuss.c b/drivers/net/ti/am65-cpsw-nuss.c
index eea15701f7..8d5f3eb743 100644
--- a/drivers/net/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ti/am65-cpsw-nuss.c
@@ -21,6 +21,7 @@
 #include <net.h>
 #include <phy.h>
 #include <power-domain.h>
+#include <linux/bitops.h>
 #include <linux/soc/ti/ti-udma.h>
 
 #include "cpsw_mdio.h"
diff --git a/drivers/net/ti/cpsw.c b/drivers/net/ti/cpsw.c
index a927ea03e0..95761fffc0 100644
--- a/drivers/net/ti/cpsw.c
+++ b/drivers/net/ti/cpsw.c
@@ -16,6 +16,7 @@
 #include <netdev.h>
 #include <cpsw.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
diff --git a/drivers/net/ti/cpsw_mdio.c b/drivers/net/ti/cpsw_mdio.c
index e77a2ff0a7..f4cb86d10a 100644
--- a/drivers/net/ti/cpsw_mdio.c
+++ b/drivers/net/ti/cpsw_mdio.c
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <miiphy.h>
 #include <wait_bit.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 struct cpsw_mdio_regs {
diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c
index 15701ee147..c2e755f2b1 100644
--- a/drivers/net/tsec.c
+++ b/drivers/net/tsec.c
@@ -15,6 +15,7 @@
 #include <command.h>
 #include <tsec.h>
 #include <fsl_mdio.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/processor.h>
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 28cef3b1ea..412daf7d58 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -28,6 +28,7 @@
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/err.h>
 #include <linux/errno.h>
 
diff --git a/drivers/pci/pci-aardvark.c b/drivers/pci/pci-aardvark.c
index 158679139b..711b930d0f 100644
--- a/drivers/pci/pci-aardvark.c
+++ b/drivers/pci/pci-aardvark.c
@@ -30,6 +30,7 @@
 #include <asm/io.h>
 #include <asm-generic/gpio.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/ioport.h>
 
diff --git a/drivers/pci/pci-rcar-gen2.c b/drivers/pci/pci-rcar-gen2.c
index 014d870478..e76abc1f84 100644
--- a/drivers/pci/pci-rcar-gen2.c
+++ b/drivers/pci/pci-rcar-gen2.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <pci.h>
+#include <linux/bitops.h>
 
 /* AHB-PCI Bridge PCI communication registers */
 #define RCAR_AHBPCI_PCICOM_OFFSET	0x800
diff --git a/drivers/pci/pci-rcar-gen3.c b/drivers/pci/pci-rcar-gen3.c
index 30eff67dca..df7b37a592 100644
--- a/drivers/pci/pci-rcar-gen3.c
+++ b/drivers/pci/pci-rcar-gen3.c
@@ -22,6 +22,7 @@
 #include <errno.h>
 #include <pci.h>
 #include <wait_bit.h>
+#include <linux/bitops.h>
 
 #define PCIECAR			0x000010
 #define PCIECCTLR		0x000018
diff --git a/drivers/pci/pci_mpc85xx.c b/drivers/pci/pci_mpc85xx.c
index 8dff68dbd0..6576f53f52 100644
--- a/drivers/pci/pci_mpc85xx.c
+++ b/drivers/pci/pci_mpc85xx.c
@@ -5,6 +5,7 @@
  *
  */
 #include <common.h>
+#include <asm/bitops.h>
 #include <asm/cpm_85xx.h>
 #include <pci.h>
 #include <dm.h>
diff --git a/drivers/pci/pci_mvebu.c b/drivers/pci/pci_mvebu.c
index 8bc04c978d..c9afe75150 100644
--- a/drivers/pci/pci_mvebu.c
+++ b/drivers/pci/pci_mvebu.c
@@ -20,6 +20,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
+#include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/ioport.h>
 #include <linux/mbus.h>
diff --git a/drivers/pci/pci_sh7751.c b/drivers/pci/pci_sh7751.c
index 1f23bbc126..e110550c71 100644
--- a/drivers/pci/pci_sh7751.c
+++ b/drivers/pci/pci_sh7751.c
@@ -11,6 +11,7 @@
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <asm/pci.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 /* Register addresses and such */
diff --git a/drivers/pci/pcie_dw_ti.c b/drivers/pci/pcie_dw_ti.c
index e49e39e399..742dd93633 100644
--- a/drivers/pci/pcie_dw_ti.c
+++ b/drivers/pci/pcie_dw_ti.c
@@ -14,6 +14,7 @@
 #include <asm/io.h>
 #include <asm-generic/gpio.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 
diff --git a/drivers/pci/pcie_intel_fpga.c b/drivers/pci/pcie_intel_fpga.c
index 8249c6212e..aa1903e547 100644
--- a/drivers/pci/pcie_intel_fpga.c
+++ b/drivers/pci/pcie_intel_fpga.c
@@ -11,6 +11,7 @@
 #include <pci.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 #define RP_TX_REG0			0x2000
diff --git a/drivers/pci/pcie_layerscape_gen4.h b/drivers/pci/pcie_layerscape_gen4.h
index 27c2d09332..d298a2b810 100644
--- a/drivers/pci/pcie_layerscape_gen4.h
+++ b/drivers/pci/pcie_layerscape_gen4.h
@@ -10,6 +10,7 @@
 #define _PCIE_LAYERSCAPE_GEN4_H_
 #include <pci.h>
 #include <dm.h>
+#include <linux/bitops.h>
 
 #ifndef CONFIG_SYS_PCI_MEMORY_SIZE
 #define CONFIG_SYS_PCI_MEMORY_SIZE		(4 * 1024 * 1024 * 1024ULL)
diff --git a/drivers/pci/pcie_mediatek.c b/drivers/pci/pcie_mediatek.c
index c7cd2f5b69..6e6375cec0 100644
--- a/drivers/pci/pcie_mediatek.c
+++ b/drivers/pci/pcie_mediatek.c
@@ -17,6 +17,7 @@
 #include <reset.h>
 #include <asm/io.h>
 #include <dm/devres.h>
+#include <linux/bitops.h>
 #include <linux/iopoll.h>
 #include <linux/list.h>
 
diff --git a/drivers/pci/pcie_xilinx.c b/drivers/pci/pcie_xilinx.c
index 05787ae144..713ad49d04 100644
--- a/drivers/pci/pcie_xilinx.c
+++ b/drivers/pci/pcie_xilinx.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <pci.h>
+#include <linux/bitops.h>
 
 #include <asm/io.h>
 
diff --git a/drivers/pci_endpoint/pcie-cadence.h b/drivers/pci_endpoint/pcie-cadence.h
index 91630d35c3..8a659c36aa 100644
--- a/drivers/pci_endpoint/pcie-cadence.h
+++ b/drivers/pci_endpoint/pcie-cadence.h
@@ -14,6 +14,7 @@
 #include <common.h>
 #include <pci_ep.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 /*
  * Local Management Registers
diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c
index af974cdddb..b4bae22c2c 100644
--- a/drivers/phy/allwinner/phy-sun4i-usb.c
+++ b/drivers/phy/allwinner/phy-sun4i-usb.c
@@ -23,6 +23,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/cpu.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 
diff --git a/drivers/phy/bcm6318-usbh-phy.c b/drivers/phy/bcm6318-usbh-phy.c
index fe0e43d270..d29344ddb4 100644
--- a/drivers/phy/bcm6318-usbh-phy.c
+++ b/drivers/phy/bcm6318-usbh-phy.c
@@ -17,6 +17,7 @@
 #include <reset.h>
 #include <asm/io.h>
 #include <dm/device.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 /* USBH Setup register */
diff --git a/drivers/phy/bcm6348-usbh-phy.c b/drivers/phy/bcm6348-usbh-phy.c
index a486152da7..8d28292726 100644
--- a/drivers/phy/bcm6348-usbh-phy.c
+++ b/drivers/phy/bcm6348-usbh-phy.c
@@ -16,6 +16,7 @@
 #include <reset.h>
 #include <asm/io.h>
 #include <dm/device.h>
+#include <linux/bitops.h>
 
 #define USBH_SETUP_PORT1_EN	BIT(0)
 
diff --git a/drivers/phy/bcm6358-usbh-phy.c b/drivers/phy/bcm6358-usbh-phy.c
index 13e0e7b612..501b97f3e2 100644
--- a/drivers/phy/bcm6358-usbh-phy.c
+++ b/drivers/phy/bcm6358-usbh-phy.c
@@ -15,6 +15,7 @@
 #include <reset.h>
 #include <asm/io.h>
 #include <dm/device.h>
+#include <linux/bitops.h>
 
 /* USBH Swap Control register */
 #define USBH_SWAP_REG		0x00
diff --git a/drivers/phy/bcm6368-usbh-phy.c b/drivers/phy/bcm6368-usbh-phy.c
index 8b918b09f9..99fdd33499 100644
--- a/drivers/phy/bcm6368-usbh-phy.c
+++ b/drivers/phy/bcm6368-usbh-phy.c
@@ -17,6 +17,7 @@
 #include <reset.h>
 #include <asm/io.h>
 #include <dm/device.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 /* USBH PLL Control register */
diff --git a/drivers/phy/keystone-usb-phy.c b/drivers/phy/keystone-usb-phy.c
index 7624f10a04..9faf501003 100644
--- a/drivers/phy/keystone-usb-phy.c
+++ b/drivers/phy/keystone-usb-phy.c
@@ -11,6 +11,7 @@
 #include <generic-phy.h>
 #include <asm/io.h>
 #include <asm/arch/psc_defs.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 /* USB PHY control register offsets */
diff --git a/drivers/phy/msm8916-usbh-phy.c b/drivers/phy/msm8916-usbh-phy.c
index 2c90738fca..4efaddd701 100644
--- a/drivers/phy/msm8916-usbh-phy.c
+++ b/drivers/phy/msm8916-usbh-phy.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <generic-phy.h>
+#include <linux/bitops.h>
 #include <usb/ehci-ci.h>
 #include <usb/ulpi.h>
 #include <asm/io.h>
diff --git a/drivers/phy/omap-usb2-phy.c b/drivers/phy/omap-usb2-phy.c
index 160a386801..0793b97dd5 100644
--- a/drivers/phy/omap-usb2-phy.c
+++ b/drivers/phy/omap-usb2-phy.c
@@ -13,6 +13,7 @@
 #include <generic-phy.h>
 #include <regmap.h>
 #include <syscon.h>
+#include <linux/bitops.h>
 #include <linux/err.h>
 
 #define OMAP_USB2_CALIBRATE_FALSE_DISCONNECT	BIT(0)
diff --git a/drivers/phy/phy-mtk-tphy.c b/drivers/phy/phy-mtk-tphy.c
index 048e2b19e3..1e65c24356 100644
--- a/drivers/phy/phy-mtk-tphy.c
+++ b/drivers/phy/phy-mtk-tphy.c
@@ -14,6 +14,7 @@
 #include <asm/io.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 #include <dt-bindings/phy/phy.h>
diff --git a/drivers/phy/phy-ti-am654.c b/drivers/phy/phy-ti-am654.c
index 5220f01558..6907c1afb3 100644
--- a/drivers/phy/phy-ti-am654.c
+++ b/drivers/phy/phy-ti-am654.c
@@ -20,6 +20,7 @@
 #include <power-domain.h>
 #include <regmap.h>
 #include <syscon.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 
diff --git a/drivers/phy/ti-pipe3-phy.c b/drivers/phy/ti-pipe3-phy.c
index d247a98fc4..3f49851bca 100644
--- a/drivers/phy/ti-pipe3-phy.c
+++ b/drivers/phy/ti-pipe3-phy.c
@@ -12,6 +12,7 @@
 #include <asm/arch/sys_proto.h>
 #include <syscon.h>
 #include <regmap.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 
diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
index c7351f32bb..5fdc150295 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
@@ -11,6 +11,7 @@
 #include <dm/pinctrl.h>
 #include <asm/io.h>
 #include <asm-generic/gpio.h>
+#include <linux/bitops.h>
 
 #include "pinctrl-mtk-common.h"
 
diff --git a/drivers/pinctrl/meson/pinctrl-meson-gx-pmx.c b/drivers/pinctrl/meson/pinctrl-meson-gx-pmx.c
index adfc9aedcc..159f3406a2 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-gx-pmx.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-gx-pmx.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <dm/pinctrl.h>
+#include <linux/bitops.h>
 #include <linux/io.h>
 #include "pinctrl-meson-gx.h"
 
diff --git a/drivers/pinctrl/meson/pinctrl-meson.c b/drivers/pinctrl/meson/pinctrl-meson.c
index 18b8eee883..d4539b02d8 100644
--- a/drivers/pinctrl/meson/pinctrl-meson.c
+++ b/drivers/pinctrl/meson/pinctrl-meson.c
@@ -12,6 +12,7 @@
 #include <dm/lists.h>
 #include <dm/pinctrl.h>
 #include <fdt_support.h>
+#include <linux/bitops.h>
 #include <linux/err.h>
 #include <linux/io.h>
 #include <linux/libfdt.h>
diff --git a/drivers/pinctrl/mscc/mscc-common.c b/drivers/pinctrl/mscc/mscc-common.c
index 90c54b45c3..307ed1db87 100644
--- a/drivers/pinctrl/mscc/mscc-common.c
+++ b/drivers/pinctrl/mscc/mscc-common.c
@@ -21,6 +21,7 @@
 #include <dm/root.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <linux/bitops.h>
 #include <linux/io.h>
 #include "mscc-common.h"
 
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
index b9fb46815b..2dee79af17 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
@@ -32,6 +32,7 @@
 #include <asm/gpio.h>
 #include <asm/system.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/libfdt.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/pinctrl/mvebu/pinctrl-mvebu.c b/drivers/pinctrl/mvebu/pinctrl-mvebu.c
index 550de384ed..2206e958ec 100644
--- a/drivers/pinctrl/mvebu/pinctrl-mvebu.c
+++ b/drivers/pinctrl/mvebu/pinctrl-mvebu.c
@@ -15,6 +15,7 @@
 #include <asm/system.h>
 #include <asm/io.h>
 #include <asm/arch-armada8k/soc-info.h>
+#include <linux/bitops.h>
 #include "pinctrl-mvebu.h"
 
 #define AP_EMMC_PHY_CTRL_REG		0x100
diff --git a/drivers/pinctrl/nxp/pinctrl-imx.c b/drivers/pinctrl/nxp/pinctrl-imx.c
index 474c38a049..48c7bde375 100644
--- a/drivers/pinctrl/nxp/pinctrl-imx.c
+++ b/drivers/pinctrl/nxp/pinctrl-imx.c
@@ -8,6 +8,7 @@
 #include <mapmem.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
+#include <linux/bitops.h>
 #include <linux/io.h>
 #include <linux/err.h>
 #include <dm.h>
diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c
index 0c43686e01..801d14253c 100644
--- a/drivers/pinctrl/pinctrl-at91-pio4.c
+++ b/drivers/pinctrl/pinctrl-at91-pio4.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <dm.h>
 #include <dm/pinctrl.h>
+#include <linux/bitops.h>
 #include <linux/io.h>
 #include <linux/err.h>
 #include <mach/atmel_pio4.h>
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
index ff663ab374..b3fa124cfb 100644
--- a/drivers/pinctrl/pinctrl-at91.c
+++ b/drivers/pinctrl/pinctrl-at91.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <dm/pinctrl.h>
 #include <asm/hardware.h>
+#include <linux/bitops.h>
 #include <linux/io.h>
 #include <linux/err.h>
 #include <mach/at91_pio.h>
diff --git a/drivers/pinctrl/pinctrl-sandbox.c b/drivers/pinctrl/pinctrl-sandbox.c
index dcef38ea5b..ac0119d198 100644
--- a/drivers/pinctrl/pinctrl-sandbox.c
+++ b/drivers/pinctrl/pinctrl-sandbox.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <log.h>
 #include <dm/pinctrl.h>
+#include <linux/bitops.h>
 
 static const char * const sandbox_pins[] = {
 	"SCL",
diff --git a/drivers/pinctrl/pinctrl-stmfx.c b/drivers/pinctrl/pinctrl-stmfx.c
index 9b6a7fa6bb..a3240ccd5a 100644
--- a/drivers/pinctrl/pinctrl-stmfx.c
+++ b/drivers/pinctrl/pinctrl-stmfx.c
@@ -15,6 +15,7 @@
 #include <dm/lists.h>
 #include <dm/pinctrl.h>
 #include <linux/bitfield.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <power/regulator.h>
 
diff --git a/drivers/pinctrl/pinctrl_pic32.c b/drivers/pinctrl/pinctrl_pic32.c
index ce02d28b90..911af1297b 100644
--- a/drivers/pinctrl/pinctrl_pic32.c
+++ b/drivers/pinctrl/pinctrl_pic32.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <asm/io.h>
 #include <dm/pinctrl.h>
+#include <linux/bitops.h>
 #include <mach/pic32.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/pinctrl/pinctrl_stm32.c b/drivers/pinctrl/pinctrl_stm32.c
index 14fcacdbed..fc241fdcde 100644
--- a/drivers/pinctrl/pinctrl_stm32.c
+++ b/drivers/pinctrl/pinctrl_stm32.c
@@ -9,6 +9,7 @@
 #include <dm/device_compat.h>
 #include <dm/lists.h>
 #include <dm/pinctrl.h>
+#include <linux/bitops.h>
 #include <linux/err.h>
 #include <linux/libfdt.h>
 
diff --git a/drivers/pinctrl/renesas/pfc-r7s72100.c b/drivers/pinctrl/renesas/pfc-r7s72100.c
index 7e4530d684..5055780bf7 100644
--- a/drivers/pinctrl/renesas/pfc-r7s72100.c
+++ b/drivers/pinctrl/renesas/pfc-r7s72100.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <dm/lists.h>
 #include <dm/pinctrl.h>
+#include <linux/bitops.h>
 #include <linux/io.h>
 #include <linux/err.h>
 
diff --git a/drivers/pinctrl/renesas/pfc-r8a77990.c b/drivers/pinctrl/renesas/pfc-r8a77990.c
index 5313f2f509..de22e49ebe 100644
--- a/drivers/pinctrl/renesas/pfc-r8a77990.c
+++ b/drivers/pinctrl/renesas/pfc-r8a77990.c
@@ -15,6 +15,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <dm/pinctrl.h>
+#include <linux/bitops.h>
 #include <linux/kernel.h>
 
 #include "sh_pfc.h"
diff --git a/drivers/pinctrl/renesas/pfc.c b/drivers/pinctrl/renesas/pfc.c
index efbff49f9b..1179afd2e7 100644
--- a/drivers/pinctrl/renesas/pfc.c
+++ b/drivers/pinctrl/renesas/pfc.c
@@ -17,6 +17,7 @@
 #include <dm/device_compat.h>
 #include <dm/devres.h>
 #include <dm/pinctrl.h>
+#include <linux/bitops.h>
 #include <linux/bug.h>
 #include <linux/io.h>
 #include <linux/sizes.h>
diff --git a/drivers/pinctrl/rockchip/pinctrl-px30.c b/drivers/pinctrl/rockchip/pinctrl-px30.c
index 20ffd249c7..617721a626 100644
--- a/drivers/pinctrl/rockchip/pinctrl-px30.c
+++ b/drivers/pinctrl/rockchip/pinctrl-px30.c
@@ -9,6 +9,7 @@
 #include <dm/pinctrl.h>
 #include <regmap.h>
 #include <syscon.h>
+#include <linux/bitops.h>
 
 #include "pinctrl-rockchip.h"
 
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3036.c b/drivers/pinctrl/rockchip/pinctrl-rk3036.c
index 28c905129b..d49e3007ce 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3036.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3036.c
@@ -8,6 +8,7 @@
 #include <dm/pinctrl.h>
 #include <regmap.h>
 #include <syscon.h>
+#include <linux/bitops.h>
 
 #include "pinctrl-rockchip.h"
 
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3128.c b/drivers/pinctrl/rockchip/pinctrl-rk3128.c
index 3eb4d952bb..a175d6c07f 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3128.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3128.c
@@ -8,6 +8,7 @@
 #include <dm/pinctrl.h>
 #include <regmap.h>
 #include <syscon.h>
+#include <linux/bitops.h>
 
 #include "pinctrl-rockchip.h"
 
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk322x.c b/drivers/pinctrl/rockchip/pinctrl-rk322x.c
index e082eb6a32..85bc0ef0f3 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk322x.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk322x.c
@@ -9,6 +9,7 @@
 #include <dm/pinctrl.h>
 #include <regmap.h>
 #include <syscon.h>
+#include <linux/bitops.h>
 
 #include "pinctrl-rockchip.h"
 
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3288.c b/drivers/pinctrl/rockchip/pinctrl-rk3288.c
index 2780302585..faaa2ce1f7 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3288.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3288.c
@@ -8,6 +8,7 @@
 #include <log.h>
 #include <dm/pinctrl.h>
 #include <regmap.h>
+#include <linux/bitops.h>
 
 #include "pinctrl-rockchip.h"
 
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3308.c b/drivers/pinctrl/rockchip/pinctrl-rk3308.c
index 0817f7136c..db2b10a690 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3308.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3308.c
@@ -9,6 +9,7 @@
 #include <dm/pinctrl.h>
 #include <regmap.h>
 #include <syscon.h>
+#include <linux/bitops.h>
 
 #include "pinctrl-rockchip.h"
 
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3328.c b/drivers/pinctrl/rockchip/pinctrl-rk3328.c
index 990f6811e9..f9160f26c7 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3328.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3328.c
@@ -9,6 +9,7 @@
 #include <dm/pinctrl.h>
 #include <regmap.h>
 #include <syscon.h>
+#include <linux/bitops.h>
 
 #include "pinctrl-rockchip.h"
 
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3399.c b/drivers/pinctrl/rockchip/pinctrl-rk3399.c
index 7647d90eb5..d04c1afb09 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3399.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3399.c
@@ -9,6 +9,7 @@
 #include <dm/pinctrl.h>
 #include <regmap.h>
 #include <syscon.h>
+#include <linux/bitops.h>
 
 #include "pinctrl-rockchip.h"
 
diff --git a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c b/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
index 63aebdb612..ec1cb9b652 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
@@ -10,6 +10,7 @@
 #include <regmap.h>
 #include <syscon.h>
 #include <fdtdec.h>
+#include <linux/bitops.h>
 #include <linux/libfdt.h>
 
 #include "pinctrl-rockchip.h"
diff --git a/drivers/pinctrl/rockchip/pinctrl-rockchip.h b/drivers/pinctrl/rockchip/pinctrl-rockchip.h
index 5edc7cbd74..d969c20082 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rockchip.h
+++ b/drivers/pinctrl/rockchip/pinctrl-rockchip.h
@@ -6,6 +6,7 @@
 #ifndef __DRIVERS_PINCTRL_ROCKCHIP_H
 #define __DRIVERS_PINCTRL_ROCKCHIP_H
 
+#include <linux/bitops.h>
 #include <linux/types.h>
 
 /**
diff --git a/drivers/pinctrl/rockchip/pinctrl-rv1108.c b/drivers/pinctrl/rockchip/pinctrl-rv1108.c
index 653e40b354..22334329ed 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rv1108.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rv1108.c
@@ -9,6 +9,7 @@
 #include <dm/pinctrl.h>
 #include <regmap.h>
 #include <syscon.h>
+#include <linux/bitops.h>
 
 #include "pinctrl-rockchip.h"
 
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
index 25231c10f9..8545b9d070 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/bug.h>
 #include <linux/io.h>
 #include <linux/err.h>
diff --git a/drivers/power/domain/bcm6328-power-domain.c b/drivers/power/domain/bcm6328-power-domain.c
index a6426bee27..a494bfa8c9 100644
--- a/drivers/power/domain/bcm6328-power-domain.c
+++ b/drivers/power/domain/bcm6328-power-domain.c
@@ -8,6 +8,7 @@
 #include <malloc.h>
 #include <power-domain-uclass.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 #define MAX_DOMAINS	32
 
diff --git a/drivers/power/domain/meson-ee-pwrc.c b/drivers/power/domain/meson-ee-pwrc.c
index b668d94974..8349a9c158 100644
--- a/drivers/power/domain/meson-ee-pwrc.c
+++ b/drivers/power/domain/meson-ee-pwrc.c
@@ -15,6 +15,7 @@
 #include <clk.h>
 #include <dt-bindings/power/meson-g12a-power.h>
 #include <dt-bindings/power/meson-sm1-power.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 
diff --git a/drivers/power/domain/meson-gx-pwrc-vpu.c b/drivers/power/domain/meson-gx-pwrc-vpu.c
index d43383b68d..a41b230448 100644
--- a/drivers/power/domain/meson-gx-pwrc-vpu.c
+++ b/drivers/power/domain/meson-gx-pwrc-vpu.c
@@ -15,6 +15,7 @@
 #include <syscon.h>
 #include <reset.h>
 #include <clk.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 
diff --git a/drivers/power/domain/mtk-power-domain.c b/drivers/power/domain/mtk-power-domain.c
index 3ff7ca1bef..fae4749012 100644
--- a/drivers/power/domain/mtk-power-domain.c
+++ b/drivers/power/domain/mtk-power-domain.c
@@ -13,6 +13,7 @@
 #include <syscon.h>
 #include <asm/io.h>
 #include <asm/processor.h>
+#include <linux/bitops.h>
 #include <linux/err.h>
 #include <linux/iopoll.h>
 
diff --git a/drivers/power/domain/tegra186-power-domain.c b/drivers/power/domain/tegra186-power-domain.c
index 9cebc7f3f1..707735cf85 100644
--- a/drivers/power/domain/tegra186-power-domain.c
+++ b/drivers/power/domain/tegra186-power-domain.c
@@ -10,6 +10,7 @@
 #include <misc.h>
 #include <power-domain-uclass.h>
 #include <asm/arch-tegra/bpmp_abi.h>
+#include <linux/bitops.h>
 
 #define UPDATE	BIT(0)
 #define ON	BIT(1)
diff --git a/drivers/power/regulator/bd71837.c b/drivers/power/regulator/bd71837.c
index 850b533b84..931d753e34 100644
--- a/drivers/power/regulator/bd71837.c
+++ b/drivers/power/regulator/bd71837.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <log.h>
+#include <linux/bitops.h>
 #include <power/bd71837.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
diff --git a/drivers/power/regulator/da9063.c b/drivers/power/regulator/da9063.c
index 8990be113e..5055e39cb7 100644
--- a/drivers/power/regulator/da9063.c
+++ b/drivers/power/regulator/da9063.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <linux/bitops.h>
 #include <power/da9063_pmic.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
diff --git a/drivers/power/regulator/fan53555.c b/drivers/power/regulator/fan53555.c
index fa92fd84f9..b407f555fe 100644
--- a/drivers/power/regulator/fan53555.c
+++ b/drivers/power/regulator/fan53555.c
@@ -11,6 +11,7 @@
 #include <i2c.h>
 #include <log.h>
 #include <asm/gpio.h>
+#include <linux/bitops.h>
 #include <power/fan53555.h>
 #include <power/pmic.h>
 #include <power/regulator.h>
diff --git a/drivers/power/regulator/stm32-vrefbuf.c b/drivers/power/regulator/stm32-vrefbuf.c
index 08a10f05b4..250773514f 100644
--- a/drivers/power/regulator/stm32-vrefbuf.c
+++ b/drivers/power/regulator/stm32-vrefbuf.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/iopoll.h>
 #include <linux/kernel.h>
 #include <power/regulator.h>
diff --git a/drivers/pwm/rk_pwm.c b/drivers/pwm/rk_pwm.c
index 66eb0e72fe..911da1d426 100644
--- a/drivers/pwm/rk_pwm.c
+++ b/drivers/pwm/rk_pwm.c
@@ -14,6 +14,7 @@
 #include <syscon.h>
 #include <asm/io.h>
 #include <asm/arch-rockchip/pwm.h>
+#include <linux/bitops.h>
 #include <power/regulator.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/ram/imxrt_sdram.c b/drivers/ram/imxrt_sdram.c
index 80fcb7e56e..765a2141d1 100644
--- a/drivers/ram/imxrt_sdram.c
+++ b/drivers/ram/imxrt_sdram.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <ram.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 
diff --git a/drivers/ram/k3-am654-ddrss.h b/drivers/ram/k3-am654-ddrss.h
index 94a7c91b2b..c87f186291 100644
--- a/drivers/ram/k3-am654-ddrss.h
+++ b/drivers/ram/k3-am654-ddrss.h
@@ -11,6 +11,7 @@
 #define __K3_AM654_DDRSS_H
 
 /* DDRSS subsystem wrapper logic registers */
+#include <linux/bitops.h>
 #define DDRSS_SS_ID_REV_REG		0x00000000
 #define DDRSS_SS_CTL_REG		0x00000004
 #define DDRSS_V2H_CTL_REG		0x00000020
diff --git a/drivers/ram/mediatek/ddr3-mt7629.c b/drivers/ram/mediatek/ddr3-mt7629.c
index 6b4296d714..b3a68cb078 100644
--- a/drivers/ram/mediatek/ddr3-mt7629.c
+++ b/drivers/ram/mediatek/ddr3-mt7629.c
@@ -12,6 +12,7 @@
 #include <dm.h>
 #include <ram.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 /* EMI */
diff --git a/drivers/ram/mpc83xx_sdram.c b/drivers/ram/mpc83xx_sdram.c
index e97467029f..a226bac2cc 100644
--- a/drivers/ram/mpc83xx_sdram.c
+++ b/drivers/ram/mpc83xx_sdram.c
@@ -9,6 +9,7 @@
 #include <init.h>
 #include <log.h>
 #include <ram.h>
+#include <asm/bitops.h>
 #include <dt-bindings/memory/mpc83xx-sdram.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/ram/rockchip/dmc-rk3368.c b/drivers/ram/rockchip/dmc-rk3368.c
index 31a3c83b03..92457a1fa4 100644
--- a/drivers/ram/rockchip/dmc-rk3368.c
+++ b/drivers/ram/rockchip/dmc-rk3368.c
@@ -20,6 +20,7 @@
 #include <asm/arch-rockchip/ddr_rk3368.h>
 #include <asm/arch-rockchip/sdram.h>
 #include <asm/arch-rockchip/sdram_rk3288.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 
diff --git a/drivers/ram/stm32_sdram.c b/drivers/ram/stm32_sdram.c
index 1894a60f1a..3fddf4df96 100644
--- a/drivers/ram/stm32_sdram.c
+++ b/drivers/ram/stm32_sdram.c
@@ -12,6 +12,7 @@
 #include <ram.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 #define MEM_MODE_MASK	GENMASK(2, 0)
diff --git a/drivers/ram/stm32mp1/stm32mp1_ddr.c b/drivers/ram/stm32mp1/stm32mp1_ddr.c
index f523dc8ea2..bf3a4c97a4 100644
--- a/drivers/ram/stm32mp1/stm32mp1_ddr.c
+++ b/drivers/ram/stm32mp1/stm32mp1_ddr.c
@@ -11,6 +11,7 @@
 #include <timer.h>
 #include <asm/io.h>
 #include <asm/arch/ddr.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/iopoll.h>
 #include "stm32mp1_ddr.h"
diff --git a/drivers/ram/stm32mp1/stm32mp1_ddr_regs.h b/drivers/ram/stm32mp1/stm32mp1_ddr_regs.h
index afd93c518e..3c8885a965 100644
--- a/drivers/ram/stm32mp1/stm32mp1_ddr_regs.h
+++ b/drivers/ram/stm32mp1/stm32mp1_ddr_regs.h
@@ -7,6 +7,7 @@
 #define _RAM_STM32MP1_DDR_REGS_H
 
 /* DDR3/LPDDR2/LPDDR3 Controller (DDRCTRL) registers */
+#include <linux/bitops.h>
 struct stm32mp1_ddrctl {
 	u32 mstr ;		/* 0x0 Master*/
 	u32 stat;		/* 0x4 Operating Mode Status*/
diff --git a/drivers/reset/reset-bcm6345.c b/drivers/reset/reset-bcm6345.c
index 0511a0c63a..156703e084 100644
--- a/drivers/reset/reset-bcm6345.c
+++ b/drivers/reset/reset-bcm6345.c
@@ -13,6 +13,7 @@
 #include <malloc.h>
 #include <reset-uclass.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 #define MAX_RESETS	32
diff --git a/drivers/reset/reset-hisilicon.c b/drivers/reset/reset-hisilicon.c
index e7bec9cd7c..139bc5d73e 100644
--- a/drivers/reset/reset-hisilicon.c
+++ b/drivers/reset/reset-hisilicon.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <dt-bindings/reset/ti-syscon.h>
 #include <reset-uclass.h>
+#include <linux/bitops.h>
 
 struct hisi_reset_priv {
 	void __iomem *base;
diff --git a/drivers/reset/reset-hsdk.c b/drivers/reset/reset-hsdk.c
index 149eaef0e9..0c8f276293 100644
--- a/drivers/reset/reset-hsdk.c
+++ b/drivers/reset/reset-hsdk.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <common.h>
 #include <dm.h>
+#include <linux/bitops.h>
 #include <linux/iopoll.h>
 #include <reset-uclass.h>
 
diff --git a/drivers/reset/reset-imx7.c b/drivers/reset/reset-imx7.c
index ce7e1c4ed2..96916b644a 100644
--- a/drivers/reset/reset-imx7.c
+++ b/drivers/reset/reset-imx7.c
@@ -11,6 +11,7 @@
 #include <dt-bindings/reset/imx7-reset.h>
 #include <dt-bindings/reset/imx8mq-reset.h>
 #include <reset-uclass.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 struct imx7_reset_priv {
diff --git a/drivers/reset/reset-mediatek.c b/drivers/reset/reset-mediatek.c
index 9f2e809aa4..97d3d57592 100644
--- a/drivers/reset/reset-mediatek.c
+++ b/drivers/reset/reset-mediatek.c
@@ -14,6 +14,7 @@
 #include <regmap.h>
 #include <reset-uclass.h>
 #include <syscon.h>
+#include <linux/bitops.h>
 #include <linux/err.h>
 
 struct mediatek_reset_priv {
diff --git a/drivers/reset/reset-meson.c b/drivers/reset/reset-meson.c
index 461c0ccb7a..4e3327898e 100644
--- a/drivers/reset/reset-meson.c
+++ b/drivers/reset/reset-meson.c
@@ -12,6 +12,7 @@
 #include <malloc.h>
 #include <reset-uclass.h>
 #include <regmap.h>
+#include <linux/bitops.h>
 
 #define REG_COUNT	8
 #define BITS_PER_REG	32
diff --git a/drivers/reset/reset-mtmips.c b/drivers/reset/reset-mtmips.c
index a79a4acd67..bc20e3335c 100644
--- a/drivers/reset/reset-mtmips.c
+++ b/drivers/reset/reset-mtmips.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <reset-uclass.h>
+#include <linux/bitops.h>
 #include <linux/io.h>
 
 struct mtmips_reset_priv {
diff --git a/drivers/reset/reset-rockchip.c b/drivers/reset/reset-rockchip.c
index 7c30919215..8092555650 100644
--- a/drivers/reset/reset-rockchip.c
+++ b/drivers/reset/reset-rockchip.c
@@ -8,6 +8,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <reset-uclass.h>
+#include <linux/bitops.h>
 #include <linux/io.h>
 #include <asm/arch-rockchip/hardware.h>
 #include <dm/lists.h>
diff --git a/drivers/reset/reset-sunxi.c b/drivers/reset/reset-sunxi.c
index 48c24ed44d..05f7f599ce 100644
--- a/drivers/reset/reset-sunxi.c
+++ b/drivers/reset/reset-sunxi.c
@@ -12,6 +12,7 @@
 #include <reset-uclass.h>
 #include <asm/io.h>
 #include <dm/lists.h>
+#include <linux/bitops.h>
 #include <linux/log2.h>
 #include <asm/arch/ccu.h>
 
diff --git a/drivers/reset/sti-reset.c b/drivers/reset/sti-reset.c
index ab67bc02de..ac3a99f9bf 100644
--- a/drivers/reset/sti-reset.c
+++ b/drivers/reset/sti-reset.c
@@ -14,6 +14,7 @@
 #include <regmap.h>
 #include <syscon.h>
 #include <dt-bindings/reset/stih407-resets.h>
+#include <linux/bitops.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/reset/stm32-reset.c b/drivers/reset/stm32-reset.c
index 47ed140166..64a11cfcfc 100644
--- a/drivers/reset/stm32-reset.c
+++ b/drivers/reset/stm32-reset.c
@@ -12,6 +12,7 @@
 #include <reset-uclass.h>
 #include <stm32_rcc.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 /* reset clear offset for STM32MP RCC */
 #define RCC_CL 0x4
diff --git a/drivers/rng/rockchip_rng.c b/drivers/rng/rockchip_rng.c
index 47fb140077..c6a834b67c 100644
--- a/drivers/rng/rockchip_rng.c
+++ b/drivers/rng/rockchip_rng.c
@@ -6,6 +6,7 @@
 #include <asm/io.h>
 #include <common.h>
 #include <dm.h>
+#include <linux/bitops.h>
 #include <linux/iopoll.h>
 #include <linux/string.h>
 #include <rng.h>
diff --git a/drivers/rng/stm32mp1_rng.c b/drivers/rng/stm32mp1_rng.c
index a9a927336b..7ef7ff9756 100644
--- a/drivers/rng/stm32mp1_rng.c
+++ b/drivers/rng/stm32mp1_rng.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <reset.h>
 #include <rng.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 #include <asm/io.h>
diff --git a/drivers/rtc/ds3232.c b/drivers/rtc/ds3232.c
index e3b3579c4a..0a30e0eabb 100644
--- a/drivers/rtc/ds3232.c
+++ b/drivers/rtc/ds3232.c
@@ -9,6 +9,7 @@
 #include <i2c.h>
 #include <rtc.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 
 /*
  * RTC register addresses
diff --git a/drivers/rtc/rv3029.c b/drivers/rtc/rv3029.c
index 9be58425bf..3afe5b2fdd 100644
--- a/drivers/rtc/rv3029.c
+++ b/drivers/rtc/rv3029.c
@@ -15,6 +15,7 @@
 #include <log.h>
 #include <rtc.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 #define RTC_RV3029_PAGE_LEN             7
diff --git a/drivers/rtc/rv8803.c b/drivers/rtc/rv8803.c
index 7f56b155fc..acd50c6564 100644
--- a/drivers/rtc/rv8803.c
+++ b/drivers/rtc/rv8803.c
@@ -16,6 +16,7 @@
 #include <log.h>
 #include <rtc.h>
 #include <i2c.h>
+#include <linux/bitops.h>
 
 /*
  * RTC register addresses
diff --git a/drivers/rtc/rx8010sj.c b/drivers/rtc/rx8010sj.c
index 82c5185e2e..d513561b82 100644
--- a/drivers/rtc/rx8010sj.c
+++ b/drivers/rtc/rx8010sj.c
@@ -21,6 +21,7 @@
 #include <dm.h>
 #include <i2c.h>
 #include <rtc.h>
+#include <linux/bitops.h>
 
 /*---------------------------------------------------------------------*/
 /* #undef DEBUG_RTC */
diff --git a/drivers/rtc/stm32_rtc.c b/drivers/rtc/stm32_rtc.c
index 3e12f57ce0..f9db318af1 100644
--- a/drivers/rtc/stm32_rtc.c
+++ b/drivers/rtc/stm32_rtc.c
@@ -9,6 +9,7 @@
 #include <rtc.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/iopoll.h>
 
 #define STM32_RTC_TR		0x00
diff --git a/drivers/serial/altera_jtag_uart.c b/drivers/serial/altera_jtag_uart.c
index 86c3de4e45..7a86161a0d 100644
--- a/drivers/serial/altera_jtag_uart.c
+++ b/drivers/serial/altera_jtag_uart.c
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <serial.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 /* data register */
 #define ALTERA_JTAG_RVALID	BIT(15)	/* Read valid */
diff --git a/drivers/serial/altera_uart.c b/drivers/serial/altera_uart.c
index 436cf2331d..f88a293d56 100644
--- a/drivers/serial/altera_uart.c
+++ b/drivers/serial/altera_uart.c
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <serial.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 /* status register */
 #define ALTERA_UART_TMT		BIT(5)	/* tx empty */
diff --git a/drivers/serial/serial_ar933x.c b/drivers/serial/serial_ar933x.c
index 897ea5d6dc..382c3b3d34 100644
--- a/drivers/serial/serial_ar933x.c
+++ b/drivers/serial/serial_ar933x.c
@@ -13,6 +13,7 @@
 #include <asm/addrspace.h>
 #include <asm/types.h>
 #include <dm/pinctrl.h>
+#include <linux/bitops.h>
 #include <mach/ar71xx_regs.h>
 
 #define AR933X_UART_DATA_REG            0x00
diff --git a/drivers/serial/serial_bcm283x_mu.c b/drivers/serial/serial_bcm283x_mu.c
index a6ffc84b96..b928300285 100644
--- a/drivers/serial/serial_bcm283x_mu.c
+++ b/drivers/serial/serial_bcm283x_mu.c
@@ -23,6 +23,7 @@
 #include <serial.h>
 #include <dm/platform_data/serial_bcm283x_mu.h>
 #include <dm/pinctrl.h>
+#include <linux/bitops.h>
 #include <linux/compiler.h>
 
 struct bcm283x_mu_regs {
diff --git a/drivers/serial/serial_cortina.c b/drivers/serial/serial_cortina.c
index 4f227bfe0a..cc20673efe 100644
--- a/drivers/serial/serial_cortina.c
+++ b/drivers/serial/serial_cortina.c
@@ -11,6 +11,7 @@
 #include <watchdog.h>
 #include <asm/io.h>
 #include <serial.h>
+#include <linux/bitops.h>
 #include <linux/compiler.h>
 
 /* Register definitions */
diff --git a/drivers/serial/serial_lpuart.c b/drivers/serial/serial_lpuart.c
index 9d7ed5e88a..0c63c41270 100644
--- a/drivers/serial/serial_lpuart.c
+++ b/drivers/serial/serial_lpuart.c
@@ -13,6 +13,7 @@
 #include <asm/io.h>
 #include <serial.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/compiler.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
diff --git a/drivers/serial/serial_meson.c b/drivers/serial/serial_meson.c
index b3dad77aa2..439057b1b9 100644
--- a/drivers/serial/serial_meson.c
+++ b/drivers/serial/serial_meson.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <linux/bitops.h>
 #include <linux/compiler.h>
 #include <serial.h>
 
diff --git a/drivers/serial/serial_owl.c b/drivers/serial/serial_owl.c
index bb60ca2d9b..2651a45a7f 100644
--- a/drivers/serial/serial_owl.c
+++ b/drivers/serial/serial_owl.c
@@ -14,6 +14,7 @@
 #include <serial.h>
 #include <asm/io.h>
 #include <asm/types.h>
+#include <linux/bitops.h>
 
 /* UART Registers */
 #define	OWL_UART_CTL			(0x0000)
diff --git a/drivers/serial/serial_pic32.c b/drivers/serial/serial_pic32.c
index bac506ed79..a492063e39 100644
--- a/drivers/serial/serial_pic32.c
+++ b/drivers/serial/serial_pic32.c
@@ -9,6 +9,7 @@
 #include <malloc.h>
 #include <serial.h>
 #include <wait_bit.h>
+#include <linux/bitops.h>
 #include <mach/pic32.h>
 #include <dt-bindings/clock/microchip,clock.h>
 
diff --git a/drivers/serial/serial_sti_asc.c b/drivers/serial/serial_sti_asc.c
index 27d3ec9dbc..5fbbfac820 100644
--- a/drivers/serial/serial_sti_asc.c
+++ b/drivers/serial/serial_sti_asc.c
@@ -11,6 +11,7 @@
 #include <log.h>
 #include <serial.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/serial/serial_stm32.c b/drivers/serial/serial_stm32.c
index 5c1cf81ae0..e77b90670a 100644
--- a/drivers/serial/serial_stm32.c
+++ b/drivers/serial/serial_stm32.c
@@ -13,6 +13,7 @@
 #include <watchdog.h>
 #include <asm/io.h>
 #include <asm/arch/stm32.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include "serial_stm32.h"
 #include <dm/device_compat.h>
diff --git a/drivers/serial/serial_stm32.h b/drivers/serial/serial_stm32.h
index 7b0c53145e..5737651888 100644
--- a/drivers/serial/serial_stm32.h
+++ b/drivers/serial/serial_stm32.h
@@ -7,6 +7,7 @@
 #ifndef _SERIAL_STM32_
 #define _SERIAL_STM32_
 
+#include <linux/bitops.h>
 #define CR1_OFFSET(x)	(x ? 0x0c : 0x00)
 #define CR3_OFFSET(x)	(x ? 0x14 : 0x08)
 #define BRR_OFFSET(x)	(x ? 0x08 : 0x0c)
diff --git a/drivers/serial/serial_xuartlite.c b/drivers/serial/serial_xuartlite.c
index 1be777bd3b..f29a9a0b56 100644
--- a/drivers/serial/serial_xuartlite.c
+++ b/drivers/serial/serial_xuartlite.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <dm.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/compiler.h>
 #include <serial.h>
 
diff --git a/drivers/serial/serial_zynq.c b/drivers/serial/serial_zynq.c
index 5f2dcd6d6b..0e71cada1b 100644
--- a/drivers/serial/serial_zynq.c
+++ b/drivers/serial/serial_zynq.c
@@ -14,6 +14,7 @@
 #include <watchdog.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/compiler.h>
 #include <serial.h>
 #include <linux/err.h>
diff --git a/drivers/soc/ti/k3-navss-ringacc.c b/drivers/soc/ti/k3-navss-ringacc.c
index c3953fdf85..ecc4b8b5a0 100644
--- a/drivers/soc/ti/k3-navss-ringacc.c
+++ b/drivers/soc/ti/k3-navss-ringacc.c
@@ -17,6 +17,7 @@
 #include <dm/devres.h>
 #include <dm/read.h>
 #include <dm/uclass.h>
+#include <linux/bitops.h>
 #include <linux/compat.h>
 #include <linux/dma-mapping.h>
 #include <linux/err.h>
diff --git a/drivers/soc/ti/keystone_serdes.c b/drivers/soc/ti/keystone_serdes.c
index 7907e6f977..2ece1a8f64 100644
--- a/drivers/soc/ti/keystone_serdes.c
+++ b/drivers/soc/ti/keystone_serdes.c
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <common.h>
 #include <asm/ti-common/keystone_serdes.h>
+#include <linux/bitops.h>
 
 #define SERDES_CMU_REGS(x)		(0x0000 + (0x0c00 * (x)))
 #define SERDES_LANE_REGS(x)		(0x0200 + (0x200 * (x)))
diff --git a/drivers/sound/hda_codec.c b/drivers/sound/hda_codec.c
index b59c63edb3..4154d29399 100644
--- a/drivers/sound/hda_codec.c
+++ b/drivers/sound/hda_codec.c
@@ -15,6 +15,7 @@
 #include <sound.h>
 #include <asm/io.h>
 #include <dt-bindings/sound/azalia.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 /**
diff --git a/drivers/sound/ivybridge_sound.c b/drivers/sound/ivybridge_sound.c
index f446a140b2..bc3c1e85f8 100644
--- a/drivers/sound/ivybridge_sound.c
+++ b/drivers/sound/ivybridge_sound.c
@@ -18,6 +18,7 @@
 #include <log.h>
 #include <pch.h>
 #include <sound.h>
+#include <linux/bitops.h>
 
 static int bd82x6x_azalia_probe(struct udevice *dev)
 {
diff --git a/drivers/sound/max98088.h b/drivers/sound/max98088.h
index 127d2bda30..b1307a7362 100644
--- a/drivers/sound/max98088.h
+++ b/drivers/sound/max98088.h
@@ -9,6 +9,7 @@
 #define _MAX98088_H
 
 /* MAX98088 Registers Definition */
+#include <linux/bitops.h>
 #define M98088_REG_IRQ_STATUS		0x00
 #define M98088_REG_MIC_STATUS		0x01
 #define M98088_REG_JACK_STAUS		0x02
diff --git a/drivers/sound/rockchip_i2s.c b/drivers/sound/rockchip_i2s.c
index 5e8ed6d896..4e9e68aaac 100644
--- a/drivers/sound/rockchip_i2s.c
+++ b/drivers/sound/rockchip_i2s.c
@@ -13,6 +13,7 @@
 #include <log.h>
 #include <sound.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 struct rk_i2s_regs {
 	u32 txcr;		/* I2S_TXCR, 0x00 */
diff --git a/drivers/spi/altera_spi.c b/drivers/spi/altera_spi.c
index 11d745f53a..3aa7a40b77 100644
--- a/drivers/spi/altera_spi.c
+++ b/drivers/spi/altera_spi.c
@@ -14,6 +14,7 @@
 #include <fdtdec.h>
 #include <spi.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 #define ALTERA_SPI_STATUS_RRDY_MSK	BIT(7)
 #define ALTERA_SPI_CONTROL_SSO_MSK	BIT(10)
diff --git a/drivers/spi/atmel-quadspi.c b/drivers/spi/atmel-quadspi.c
index a6c3939db5..9320a8be68 100644
--- a/drivers/spi/atmel-quadspi.c
+++ b/drivers/spi/atmel-quadspi.c
@@ -17,6 +17,7 @@
 #include <errno.h>
 #include <fdtdec.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/err.h>
 #include <linux/io.h>
 #include <linux/iopoll.h>
diff --git a/drivers/spi/atmel_spi.h b/drivers/spi/atmel_spi.h
index 76b8556c98..6167bd164b 100644
--- a/drivers/spi/atmel_spi.h
+++ b/drivers/spi/atmel_spi.h
@@ -3,6 +3,7 @@
  */
 
 /* Register offsets */
+#include <linux/bitops.h>
 #define ATMEL_SPI_CR			0x0000
 #define ATMEL_SPI_MR			0x0004
 #define ATMEL_SPI_RDR			0x0008
diff --git a/drivers/spi/bcm63xx_hsspi.c b/drivers/spi/bcm63xx_hsspi.c
index afc7be0f01..f30a8a42bd 100644
--- a/drivers/spi/bcm63xx_hsspi.c
+++ b/drivers/spi/bcm63xx_hsspi.c
@@ -16,6 +16,7 @@
 #include <reset.h>
 #include <wait_bit.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 #define HSSPI_PP			0
 
diff --git a/drivers/spi/cadence_qspi_apb.c b/drivers/spi/cadence_qspi_apb.c
index 6362869299..f9675f75a4 100644
--- a/drivers/spi/cadence_qspi_apb.c
+++ b/drivers/spi/cadence_qspi_apb.c
@@ -29,6 +29,7 @@
 #include <log.h>
 #include <asm/io.h>
 #include <dma.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <wait_bit.h>
diff --git a/drivers/spi/davinci_spi.c b/drivers/spi/davinci_spi.c
index c00a05af7d..97ac97b1a5 100644
--- a/drivers/spi/davinci_spi.c
+++ b/drivers/spi/davinci_spi.c
@@ -16,6 +16,7 @@
 #include <asm/arch/hardware.h>
 #include <dm.h>
 #include <dm/platform_data/spi_davinci.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 /* SPIGCR0 */
diff --git a/drivers/spi/designware_spi.c b/drivers/spi/designware_spi.c
index 09044bd137..c9b14f9029 100644
--- a/drivers/spi/designware_spi.c
+++ b/drivers/spi/designware_spi.c
@@ -20,6 +20,7 @@
 #include <fdtdec.h>
 #include <reset.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/compat.h>
 #include <linux/iopoll.h>
 #include <asm/io.h>
diff --git a/drivers/spi/fsl_dspi.c b/drivers/spi/fsl_dspi.c
index cb3d44cb0f..1cdb233110 100644
--- a/drivers/spi/fsl_dspi.c
+++ b/drivers/spi/fsl_dspi.c
@@ -22,6 +22,7 @@
 #include <asm/arch/clock.h>
 #endif
 #include <fsl_dspi.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/spi/fsl_espi.c b/drivers/spi/fsl_espi.c
index ba49839107..50d194f614 100644
--- a/drivers/spi/fsl_espi.c
+++ b/drivers/spi/fsl_espi.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 #include <malloc.h>
diff --git a/drivers/spi/fsl_qspi.c b/drivers/spi/fsl_qspi.c
index de93cbda67..e715f9838f 100644
--- a/drivers/spi/fsl_qspi.c
+++ b/drivers/spi/fsl_qspi.c
@@ -26,6 +26,7 @@
 #include <common.h>
 #include <log.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/libfdt.h>
 #include <linux/sizes.h>
diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c
index 9c42755dae..7405062846 100644
--- a/drivers/spi/ich.c
+++ b/drivers/spi/ich.c
@@ -25,6 +25,7 @@
 #include <asm/fast_spi.h>
 #include <asm/io.h>
 #include <asm/mtrr.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/sizes.h>
 
diff --git a/drivers/spi/ich.h b/drivers/spi/ich.h
index d7f1ffdf37..23c7827740 100644
--- a/drivers/spi/ich.h
+++ b/drivers/spi/ich.h
@@ -8,6 +8,7 @@
 #ifndef _ICH_H_
 #define _ICH_H_
 
+#include <linux/bitops.h>
 struct ich7_spi_regs {
 	uint16_t spis;
 	uint16_t spic;
diff --git a/drivers/spi/meson_spifc.c b/drivers/spi/meson_spifc.c
index ad15995573..2cdc018682 100644
--- a/drivers/spi/meson_spifc.c
+++ b/drivers/spi/meson_spifc.c
@@ -16,6 +16,7 @@
 #include <errno.h>
 #include <asm/io.h>
 #include <linux/bitfield.h>
+#include <linux/bitops.h>
 
 /* register map */
 #define REG_CMD			0x00
diff --git a/drivers/spi/mpc8xxx_spi.c b/drivers/spi/mpc8xxx_spi.c
index 8491eacb1b..811b5d44fb 100644
--- a/drivers/spi/mpc8xxx_spi.c
+++ b/drivers/spi/mpc8xxx_spi.c
@@ -14,6 +14,7 @@
 #include <asm/mpc8xxx_spi.h>
 #include <asm-generic/gpio.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 enum {
diff --git a/drivers/spi/mscc_bb_spi.c b/drivers/spi/mscc_bb_spi.c
index 37327ec508..0454410ee9 100644
--- a/drivers/spi/mscc_bb_spi.c
+++ b/drivers/spi/mscc_bb_spi.c
@@ -14,6 +14,7 @@
 #include <dm.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 struct mscc_bb_priv {
diff --git a/drivers/spi/mt7621_spi.c b/drivers/spi/mt7621_spi.c
index df9d9da1a9..3a0738eb2b 100644
--- a/drivers/spi/mt7621_spi.c
+++ b/drivers/spi/mt7621_spi.c
@@ -14,6 +14,7 @@
 #include <log.h>
 #include <spi.h>
 #include <wait_bit.h>
+#include <linux/bitops.h>
 #include <linux/io.h>
 
 #define MT7621_RX_FIFO_LEN	32
diff --git a/drivers/spi/mvebu_a3700_spi.c b/drivers/spi/mvebu_a3700_spi.c
index 73a3f91efc..2302e62be4 100644
--- a/drivers/spi/mvebu_a3700_spi.c
+++ b/drivers/spi/mvebu_a3700_spi.c
@@ -14,6 +14,7 @@
 #include <wait_bit.h>
 #include <asm/io.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c
index e35c6f9b4a..f52ebf4d67 100644
--- a/drivers/spi/mxc_spi.c
+++ b/drivers/spi/mxc_spi.c
@@ -9,6 +9,7 @@
 #include <malloc.h>
 #include <spi.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <asm/io.h>
diff --git a/drivers/spi/mxs_spi.c b/drivers/spi/mxs_spi.c
index 635955e819..0da4a80d71 100644
--- a/drivers/spi/mxs_spi.c
+++ b/drivers/spi/mxs_spi.c
@@ -19,6 +19,7 @@
 #include <memalign.h>
 #include <spi.h>
 #include <asm/cache.h>
+#include <linux/bitops.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
diff --git a/drivers/spi/nxp_fspi.c b/drivers/spi/nxp_fspi.c
index 0e6c7be785..04b7238aa5 100644
--- a/drivers/spi/nxp_fspi.c
+++ b/drivers/spi/nxp_fspi.c
@@ -40,6 +40,7 @@
 #include <spi-mem.h>
 #include <dm.h>
 #include <clk.h>
+#include <linux/bitops.h>
 #include <linux/kernel.h>
 #include <linux/sizes.h>
 #include <linux/iopoll.h>
diff --git a/drivers/spi/omap3_spi.c b/drivers/spi/omap3_spi.c
index ff4c700645..6a615d1498 100644
--- a/drivers/spi/omap3_spi.c
+++ b/drivers/spi/omap3_spi.c
@@ -21,6 +21,7 @@
 #include <spi.h>
 #include <malloc.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/spi/pic32_spi.c b/drivers/spi/pic32_spi.c
index 88dc1444e1..52e9eff743 100644
--- a/drivers/spi/pic32_spi.c
+++ b/drivers/spi/pic32_spi.c
@@ -10,6 +10,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <log.h>
+#include <linux/bitops.h>
 #include <linux/compat.h>
 #include <malloc.h>
 #include <spi.h>
diff --git a/drivers/spi/renesas_rpc_spi.c b/drivers/spi/renesas_rpc_spi.c
index 61ae92d603..3ea59b8fb8 100644
--- a/drivers/spi/renesas_rpc_spi.c
+++ b/drivers/spi/renesas_rpc_spi.c
@@ -12,6 +12,7 @@
 #include <dm/of_access.h>
 #include <dt-structs.h>
 #include <errno.h>
+#include <linux/bitops.h>
 #include <linux/bug.h>
 #include <linux/errno.h>
 #include <spi.h>
diff --git a/drivers/spi/sh_qspi.c b/drivers/spi/sh_qspi.c
index 5ae203d8d4..2839dd1ceb 100644
--- a/drivers/spi/sh_qspi.c
+++ b/drivers/spi/sh_qspi.c
@@ -13,6 +13,7 @@
 #include <wait_bit.h>
 #include <asm/arch/rmobile.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 /* SH QSPI register bit masks <REG>_<BIT> */
 #define SPCR_MSTR	0x08
diff --git a/drivers/spi/soft_spi.c b/drivers/spi/soft_spi.c
index e5f9f49caf..e8d7758da0 100644
--- a/drivers/spi/soft_spi.c
+++ b/drivers/spi/soft_spi.c
@@ -17,6 +17,7 @@
 #include <malloc.h>
 #include <spi.h>
 #include <asm/gpio.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/spi/spi-sifive.c b/drivers/spi/spi-sifive.c
index 4cab0391f7..0e0ce25abb 100644
--- a/drivers/spi/spi-sifive.c
+++ b/drivers/spi/spi-sifive.c
@@ -13,6 +13,7 @@
 #include <spi-mem.h>
 #include <wait_bit.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/log2.h>
 #include <clk.h>
 
diff --git a/drivers/spi/spi-sunxi.c b/drivers/spi/spi-sunxi.c
index 85b662bb0a..d2dccd67e5 100644
--- a/drivers/spi/spi-sunxi.c
+++ b/drivers/spi/spi-sunxi.c
@@ -28,6 +28,7 @@
 #include <reset.h>
 #include <wait_bit.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 
 #include <asm/bitops.h>
 #include <asm/gpio.h>
diff --git a/drivers/spi/stm32_qspi.c b/drivers/spi/stm32_qspi.c
index 9fc5f6e00e..001f0703e3 100644
--- a/drivers/spi/stm32_qspi.c
+++ b/drivers/spi/stm32_qspi.c
@@ -13,6 +13,7 @@
 #include <reset.h>
 #include <spi-mem.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/iopoll.h>
 #include <linux/ioport.h>
diff --git a/drivers/spi/stm32_spi.c b/drivers/spi/stm32_spi.c
index 8071de09eb..4a0833b6fa 100644
--- a/drivers/spi/stm32_spi.c
+++ b/drivers/spi/stm32_spi.c
@@ -13,6 +13,7 @@
 #include <reset.h>
 #include <spi.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 #include <asm/io.h>
diff --git a/drivers/spi/tegra114_spi.c b/drivers/spi/tegra114_spi.c
index bf02bdb1af..0e8198c5a0 100644
--- a/drivers/spi/tegra114_spi.c
+++ b/drivers/spi/tegra114_spi.c
@@ -13,6 +13,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch-tegra/clk_rst.h>
 #include <spi.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include "tegra_spi.h"
 
diff --git a/drivers/spi/tegra20_sflash.c b/drivers/spi/tegra20_sflash.c
index 1461f09427..22a0304bfc 100644
--- a/drivers/spi/tegra20_sflash.c
+++ b/drivers/spi/tegra20_sflash.c
@@ -17,6 +17,7 @@
 #include <asm/arch-tegra/clk_rst.h>
 #include <spi.h>
 #include <fdtdec.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include "tegra_spi.h"
 
diff --git a/drivers/spi/tegra20_slink.c b/drivers/spi/tegra20_slink.c
index dcd0950894..3679cf06a0 100644
--- a/drivers/spi/tegra20_slink.c
+++ b/drivers/spi/tegra20_slink.c
@@ -14,6 +14,7 @@
 #include <asm/arch-tegra/clk_rst.h>
 #include <spi.h>
 #include <fdtdec.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include "tegra_spi.h"
 
diff --git a/drivers/spi/tegra210_qspi.c b/drivers/spi/tegra210_qspi.c
index 96ab6502de..ae16b45dcb 100644
--- a/drivers/spi/tegra210_qspi.c
+++ b/drivers/spi/tegra210_qspi.c
@@ -15,6 +15,7 @@
 #include <asm/arch-tegra/clk_rst.h>
 #include <spi.h>
 #include <fdtdec.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include "tegra_spi.h"
 
diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c
index f25fc363ac..0db0de8f1b 100644
--- a/drivers/spi/ti_qspi.c
+++ b/drivers/spi/ti_qspi.c
@@ -19,6 +19,7 @@
 #include <asm/omap_gpio.h>
 #include <asm/omap_common.h>
 #include <asm/ti-common/ti-edma3.h>
+#include <linux/bitops.h>
 #include <linux/err.h>
 #include <linux/kernel.h>
 #include <regmap.h>
diff --git a/drivers/spi/uniphier_spi.c b/drivers/spi/uniphier_spi.c
index 42ed1ba20b..114bd8abd7 100644
--- a/drivers/spi/uniphier_spi.c
+++ b/drivers/spi/uniphier_spi.c
@@ -11,6 +11,7 @@
 #include <time.h>
 #include <dm/device_compat.h>
 #include <linux/bitfield.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/io.h>
 #include <spi.h>
diff --git a/drivers/spi/xilinx_spi.c b/drivers/spi/xilinx_spi.c
index 4a568cb56d..05768eef72 100644
--- a/drivers/spi/xilinx_spi.c
+++ b/drivers/spi/xilinx_spi.c
@@ -21,6 +21,7 @@
 #include <spi.h>
 #include <asm/io.h>
 #include <wait_bit.h>
+#include <linux/bitops.h>
 
 /*
  * [0]: http://www.xilinx.com/support/documentation
diff --git a/drivers/spi/zynq_qspi.c b/drivers/spi/zynq_qspi.c
index 8451f83b70..db473da6ea 100644
--- a/drivers/spi/zynq_qspi.c
+++ b/drivers/spi/zynq_qspi.c
@@ -12,6 +12,7 @@
 #include <malloc.h>
 #include <spi.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/spi/zynq_spi.c b/drivers/spi/zynq_spi.c
index e3bad5532a..3e66b34ebb 100644
--- a/drivers/spi/zynq_spi.c
+++ b/drivers/spi/zynq_spi.c
@@ -13,6 +13,7 @@
 #include <spi.h>
 #include <time.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/spi/zynqmp_gqspi.c b/drivers/spi/zynqmp_gqspi.c
index f12c6f766d..c3a5b3e301 100644
--- a/drivers/spi/zynqmp_gqspi.c
+++ b/drivers/spi/zynqmp_gqspi.c
@@ -19,6 +19,7 @@
 #include <ubi_uboot.h>
 #include <wait_bit.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/err.h>
 
 #define GQSPI_GFIFO_STRT_MODE_MASK	BIT(29)
diff --git a/drivers/sysreset/sysreset_socfpga.c b/drivers/sysreset/sysreset_socfpga.c
index 3390b7bdc2..178bcb227f 100644
--- a/drivers/sysreset/sysreset_socfpga.c
+++ b/drivers/sysreset/sysreset_socfpga.c
@@ -10,6 +10,7 @@
 #include <sysreset.h>
 #include <asm/io.h>
 #include <asm/arch/reset_manager.h>
+#include <linux/bitops.h>
 
 struct socfpga_sysreset_data {
 	void __iomem *rstmgr_base;
diff --git a/drivers/sysreset/sysreset_sti.c b/drivers/sysreset/sysreset_sti.c
index 9996716f13..3482d2a078 100644
--- a/drivers/sysreset/sysreset_sti.c
+++ b/drivers/sysreset/sysreset_sti.c
@@ -10,6 +10,7 @@
 #include <syscon.h>
 #include <sysreset.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/timer/altera_timer.c b/drivers/timer/altera_timer.c
index 6f504f7cc4..6ca9501eb1 100644
--- a/drivers/timer/altera_timer.c
+++ b/drivers/timer/altera_timer.c
@@ -12,6 +12,7 @@
 #include <errno.h>
 #include <timer.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 /* control register */
 #define ALTERA_TIMER_CONT	BIT(1)	/* Continuous mode */
diff --git a/drivers/timer/atmel_pit_timer.c b/drivers/timer/atmel_pit_timer.c
index 009af2f929..70511697fe 100644
--- a/drivers/timer/atmel_pit_timer.c
+++ b/drivers/timer/atmel_pit_timer.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <timer.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 #define AT91_PIT_VALUE		0xfffff
 #define AT91_PIT_PITEN		BIT(24)		/* Timer Enabled */
diff --git a/drivers/timer/cadence-ttc.c b/drivers/timer/cadence-ttc.c
index f4942a5500..e6b6dfe376 100644
--- a/drivers/timer/cadence-ttc.c
+++ b/drivers/timer/cadence-ttc.c
@@ -10,6 +10,7 @@
 #include <init.h>
 #include <timer.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/err.h>
 
 #define CNT_CNTRL_RESET		BIT(4)
diff --git a/drivers/timer/mpc83xx_timer.c b/drivers/timer/mpc83xx_timer.c
index 186fe2b45a..ad8bb28e8b 100644
--- a/drivers/timer/mpc83xx_timer.c
+++ b/drivers/timer/mpc83xx_timer.c
@@ -15,6 +15,7 @@
 #include <timer.h>
 #include <watchdog.h>
 #include <asm/ptrace.h>
+#include <linux/bitops.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/timer/mtk_timer.c b/drivers/timer/mtk_timer.c
index e99135e5be..69ed521811 100644
--- a/drivers/timer/mtk_timer.c
+++ b/drivers/timer/mtk_timer.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <timer.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 #define MTK_GPT4_CTRL	0x40
 #define MTK_GPT4_CLK	0x44
diff --git a/drivers/timer/nomadik-mtu-timer.c b/drivers/timer/nomadik-mtu-timer.c
index 8648f1f1df..7ff921385a 100644
--- a/drivers/timer/nomadik-mtu-timer.c
+++ b/drivers/timer/nomadik-mtu-timer.c
@@ -16,6 +16,7 @@
 #include <dm.h>
 #include <timer.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 #define MTU_NUM_TIMERS		4
 
diff --git a/drivers/timer/omap-timer.c b/drivers/timer/omap-timer.c
index a13fb71165..700c349f37 100644
--- a/drivers/timer/omap-timer.c
+++ b/drivers/timer/omap-timer.c
@@ -11,6 +11,7 @@
 #include <timer.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
+#include <linux/bitops.h>
 
 /* Timer register bits */
 #define TCLR_START			BIT(0)	/* Start=1 */
diff --git a/drivers/timer/ostm_timer.c b/drivers/timer/ostm_timer.c
index 48a5055b05..bea97159eb 100644
--- a/drivers/timer/ostm_timer.c
+++ b/drivers/timer/ostm_timer.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <clk.h>
 #include <timer.h>
+#include <linux/bitops.h>
 
 #define OSTM_CMP	0x00
 #define OSTM_CNT	0x04
diff --git a/drivers/timer/stm32_timer.c b/drivers/timer/stm32_timer.c
index 76d99a2b86..c57fa3f557 100644
--- a/drivers/timer/stm32_timer.c
+++ b/drivers/timer/stm32_timer.c
@@ -10,6 +10,7 @@
 #include <fdtdec.h>
 #include <timer.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 
 #include <asm/io.h>
 
diff --git a/drivers/tpm/tpm2_tis_sandbox.c b/drivers/tpm/tpm2_tis_sandbox.c
index 522988795c..41a15bd49f 100644
--- a/drivers/tpm/tpm2_tis_sandbox.c
+++ b/drivers/tpm/tpm2_tis_sandbox.c
@@ -9,6 +9,7 @@
 #include <tpm-v2.h>
 #include <asm/state.h>
 #include <asm/unaligned.h>
+#include <linux/bitops.h>
 #include <u-boot/crc.h>
 
 /* Hierarchies */
diff --git a/drivers/tpm/tpm2_tis_spi.c b/drivers/tpm/tpm2_tis_spi.c
index 03918ed6a7..36016de4a6 100644
--- a/drivers/tpm/tpm2_tis_spi.c
+++ b/drivers/tpm/tpm2_tis_spi.c
@@ -19,6 +19,7 @@
 #include <log.h>
 #include <spi.h>
 #include <tpm-v2.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/compiler.h>
diff --git a/drivers/ufs/cdns-platform.c b/drivers/ufs/cdns-platform.c
index 41ee6a60c9..1a7bb7bed8 100644
--- a/drivers/ufs/cdns-platform.c
+++ b/drivers/ufs/cdns-platform.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <ufs.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/err.h>
 
 #include "ufs.h"
diff --git a/drivers/ufs/ti-j721e-ufs.c b/drivers/ufs/ti-j721e-ufs.c
index 4990fba6eb..d875269760 100644
--- a/drivers/ufs/ti-j721e-ufs.c
+++ b/drivers/ufs/ti-j721e-ufs.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/err.h>
 
 #define UFS_SS_CTRL             0x4
diff --git a/drivers/ufs/ufs.c b/drivers/ufs/ufs.c
index 136dab5602..87b4e5fc56 100644
--- a/drivers/ufs/ufs.c
+++ b/drivers/ufs/ufs.c
@@ -19,6 +19,7 @@
 #include <malloc.h>
 #include <hexdump.h>
 #include <scsi.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 #include <linux/dma-mapping.h>
diff --git a/drivers/usb/cdns3/cdns3-ti.c b/drivers/usb/cdns3/cdns3-ti.c
index 652cd5cb17..cd7b2113ac 100644
--- a/drivers/usb/cdns3/cdns3-ti.c
+++ b/drivers/usb/cdns3/cdns3-ti.c
@@ -10,6 +10,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/io.h>
 #include <linux/usb/otg.h>
 #include <malloc.h>
diff --git a/drivers/usb/cdns3/drd.h b/drivers/usb/cdns3/drd.h
index 815b93f2fb..fffda7b43a 100644
--- a/drivers/usb/cdns3/drd.h
+++ b/drivers/usb/cdns3/drd.h
@@ -9,6 +9,7 @@
 #ifndef __LINUX_CDNS3_DRD
 #define __LINUX_CDNS3_DRD
 
+#include <linux/bitops.h>
 #include <linux/types.h>
 #include <linux/usb/otg.h>
 #include "core.h"
diff --git a/drivers/usb/cdns3/ep0.c b/drivers/usb/cdns3/ep0.c
index 4a6374c492..a08c694559 100644
--- a/drivers/usb/cdns3/ep0.c
+++ b/drivers/usb/cdns3/ep0.c
@@ -13,6 +13,7 @@
 #include <cpu_func.h>
 #include <asm/cache.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/usb/composite.h>
 #include <linux/iopoll.h>
diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c
index f5b6e5be64..8f81d17ec8 100644
--- a/drivers/usb/cdns3/gadget.c
+++ b/drivers/usb/cdns3/gadget.c
@@ -59,6 +59,7 @@
 #include <dm.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/usb/gadget.h>
diff --git a/drivers/usb/cdns3/gadget.h b/drivers/usb/cdns3/gadget.h
index 3d5242b331..8803fa48bd 100644
--- a/drivers/usb/cdns3/gadget.h
+++ b/drivers/usb/cdns3/gadget.h
@@ -11,6 +11,7 @@
  */
 #ifndef __LINUX_CDNS3_GADGET
 #define __LINUX_CDNS3_GADGET
+#include <linux/bitops.h>
 #include <linux/usb/gadget.h>
 
 /*
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
index 1c08a2c5b6..fb9863fa43 100644
--- a/drivers/usb/dwc3/core.h
+++ b/drivers/usb/dwc3/core.h
@@ -17,6 +17,7 @@
 #ifndef __DRIVERS_USB_DWC3_CORE_H
 #define __DRIVERS_USB_DWC3_CORE_H
 
+#include <linux/bitops.h>
 #include <linux/ioport.h>
 
 #include <linux/usb/ch9.h>
diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c
index 8b75d71b0e..d91ebb74e3 100644
--- a/drivers/usb/dwc3/dwc3-generic.c
+++ b/drivers/usb/dwc3/dwc3-generic.c
@@ -15,6 +15,7 @@
 #include <dm/device-internal.h>
 #include <dm/lists.h>
 #include <dwc3-uboot.h>
+#include <linux/bitops.h>
 #include <linux/usb/ch9.h>
 #include <linux/usb/gadget.h>
 #include <malloc.h>
diff --git a/drivers/usb/dwc3/ti_usb_phy.c b/drivers/usb/dwc3/ti_usb_phy.c
index ade3a7f85c..f8ab06482c 100644
--- a/drivers/usb/dwc3/ti_usb_phy.c
+++ b/drivers/usb/dwc3/ti_usb_phy.c
@@ -21,6 +21,7 @@
 #include <ti-usb-phy-uboot.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/ioport.h>
 #include <asm/io.h>
diff --git a/drivers/usb/eth/lan75xx.c b/drivers/usb/eth/lan75xx.c
index 94c6522a41..46b92e8d68 100644
--- a/drivers/usb/eth/lan75xx.c
+++ b/drivers/usb/eth/lan75xx.c
@@ -6,6 +6,7 @@
 #include <dm.h>
 #include <log.h>
 #include <usb.h>
+#include <linux/bitops.h>
 #include <linux/mii.h>
 #include "usb_ether.h"
 #include "lan7x.h"
diff --git a/drivers/usb/eth/lan78xx.c b/drivers/usb/eth/lan78xx.c
index 1d1b64ef3e..e34ad2603f 100644
--- a/drivers/usb/eth/lan78xx.c
+++ b/drivers/usb/eth/lan78xx.c
@@ -7,6 +7,7 @@
 #include <log.h>
 #include <net.h>
 #include <usb.h>
+#include <linux/bitops.h>
 #include "usb_ether.h"
 #include "lan7x.h"
 
diff --git a/drivers/usb/eth/lan7x.h b/drivers/usb/eth/lan7x.h
index 35965e9645..f71e8c7268 100644
--- a/drivers/usb/eth/lan7x.h
+++ b/drivers/usb/eth/lan7x.h
@@ -6,6 +6,7 @@
 #include <console.h>
 #include <time.h>
 #include <watchdog.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 
diff --git a/drivers/usb/eth/r8152.h b/drivers/usb/eth/r8152.h
index b6df535a83..09f1c6178b 100644
--- a/drivers/usb/eth/r8152.h
+++ b/drivers/usb/eth/r8152.h
@@ -7,6 +7,7 @@
 #ifndef _RTL8152_ETH_H
 #define _RTL8152_ETH_H
 
+#include <linux/bitops.h>
 #define R8152_BASE_NAME		"r8152"
 
 #define PLA_IDR			0xc000
diff --git a/drivers/usb/eth/r8152_fw.c b/drivers/usb/eth/r8152_fw.c
index d564de285f..3ebbd533cc 100644
--- a/drivers/usb/eth/r8152_fw.c
+++ b/drivers/usb/eth/r8152_fw.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include "usb_ether.h"
 #include "r8152.h"
diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c
index dffa5117f9..7d51821497 100644
--- a/drivers/usb/gadget/atmel_usba_udc.c
+++ b/drivers/usb/gadget/atmel_usba_udc.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <linux/bitops.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
 #include <asm/hardware.h>
diff --git a/drivers/usb/gadget/dwc2_udc_otg_regs.h b/drivers/usb/gadget/dwc2_udc_otg_regs.h
index 434db5ba39..2eda5c3720 100644
--- a/drivers/usb/gadget/dwc2_udc_otg_regs.h
+++ b/drivers/usb/gadget/dwc2_udc_otg_regs.h
@@ -11,6 +11,7 @@
 #define __ASM_ARCH_REGS_USB_OTG_HS_H
 
 /* USB2.0 OTG Controller register */
+#include <linux/bitops.h>
 struct dwc2_usbotg_phy {
 	u32 phypwr;
 	u32 phyclk;
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index 66c1d61dbf..8e0755423a 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -298,4 +298,5 @@ extern struct dm_usb_ops ehci_usb_ops;
 int ehci_setup_phy(struct udevice *dev, struct phy *phy, int index);
 int ehci_shutdown_phy(struct udevice *dev, struct phy *phy);
 
+#include <linux/bitops.h>
 #endif /* USB_EHCI_H */
diff --git a/drivers/usb/host/r8a66597.h b/drivers/usb/host/r8a66597.h
index b6110d6b3f..625d4938cc 100644
--- a/drivers/usb/host/r8a66597.h
+++ b/drivers/usb/host/r8a66597.h
@@ -8,6 +8,7 @@
 #ifndef __R8A66597_H__
 #define __R8A66597_H__
 
+#include <linux/bitops.h>
 #define SYSCFG0		0x00
 #define SYSCFG1		0x02
 #define SYSSTS0		0x04
diff --git a/drivers/usb/host/xhci-rcar.c b/drivers/usb/host/xhci-rcar.c
index b3675bb1db..4964697f27 100644
--- a/drivers/usb/host/xhci-rcar.c
+++ b/drivers/usb/host/xhci-rcar.c
@@ -14,6 +14,7 @@
 #include <usb.h>
 #include <wait_bit.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 
 #include <usb/xhci.h>
 #include "xhci-rcar-r8a779x_usb3_v3.h"
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 963cc3c3c5..ebd2954571 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -29,6 +29,7 @@
 #include <watchdog.h>
 #include <asm/cache.h>
 #include <asm/unaligned.h>
+#include <linux/bitops.h>
 #include <linux/bug.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
diff --git a/drivers/usb/musb-new/musb_core.c b/drivers/usb/musb-new/musb_core.c
index 8e0e57cae8..961de99795 100644
--- a/drivers/usb/musb-new/musb_core.c
+++ b/drivers/usb/musb-new/musb_core.c
@@ -81,6 +81,7 @@
 #else
 #include <common.h>
 #include <usb.h>
+#include <linux/bitops.h>
 #include <linux/bug.h>
 #include <linux/errno.h>
 #include <linux/usb/ch9.h>
diff --git a/drivers/usb/musb-new/pic32.c b/drivers/usb/musb-new/pic32.c
index 66e8e9ce88..74a841af46 100644
--- a/drivers/usb/musb-new/pic32.c
+++ b/drivers/usb/musb-new/pic32.c
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/usb/musb.h>
 #include "linux-compat.h"
diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c
index a29d10d335..53c336fc3f 100644
--- a/drivers/usb/musb-new/sunxi.c
+++ b/drivers/usb/musb-new/sunxi.c
@@ -30,6 +30,7 @@
 #include <dm/device_compat.h>
 #include <dm/lists.h>
 #include <dm/root.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/usb/musb.h>
 #include "linux-compat.h"
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index c6d47bef56..147b2eb929 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <linux/bitops.h>
 
 #include "musb_core.h"
 struct musb_regs *musbr;
diff --git a/drivers/usb/phy/rockchip_usb2_phy.c b/drivers/usb/phy/rockchip_usb2_phy.c
index 6a60523e0f..f1cf9160d5 100644
--- a/drivers/usb/phy/rockchip_usb2_phy.c
+++ b/drivers/usb/phy/rockchip_usb2_phy.c
@@ -7,6 +7,7 @@
 #include <hang.h>
 #include <log.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 #include "../gadget/dwc2_udc_otg_priv.h"
diff --git a/drivers/video/anx98xx-edp.h b/drivers/video/anx98xx-edp.h
index 64269c30bd..ece36d41ee 100644
--- a/drivers/video/anx98xx-edp.h
+++ b/drivers/video/anx98xx-edp.h
@@ -6,6 +6,7 @@
 
 /* Registers at i2c address 0x38 */
 
+#include <linux/bitops.h>
 #define ANX9804_HDCP_CONTROL_0_REG				0x01
 
 #define ANX9804_SYS_CTRL1_REG					0x80
diff --git a/drivers/video/dw_mipi_dsi.c b/drivers/video/dw_mipi_dsi.c
index e8a3af7e60..b7bfbb5e50 100644
--- a/drivers/video/dw_mipi_dsi.c
+++ b/drivers/video/dw_mipi_dsi.c
@@ -20,6 +20,7 @@
 #include <asm/arch/gpio.h>
 #include <dm/device-internal.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/iopoll.h>
 #include <video_bridge.h>
diff --git a/drivers/video/meson/meson_dw_hdmi.c b/drivers/video/meson/meson_dw_hdmi.c
index 288b906544..7b2ff94eba 100644
--- a/drivers/video/meson/meson_dw_hdmi.c
+++ b/drivers/video/meson/meson_dw_hdmi.c
@@ -13,6 +13,7 @@
 #include <dw_hdmi.h>
 #include <dm/device-internal.h>
 #include <dm/uclass-internal.h>
+#include <linux/bitops.h>
 #include <power/regulator.h>
 #include <clk.h>
 #include <linux/delay.h>
diff --git a/drivers/video/meson/meson_dw_hdmi.h b/drivers/video/meson/meson_dw_hdmi.h
index b13beb1f75..d507e59c06 100644
--- a/drivers/video/meson/meson_dw_hdmi.h
+++ b/drivers/video/meson/meson_dw_hdmi.h
@@ -24,6 +24,7 @@
  * Bit 0 RW sw_reset_core: connects to IP's ~irstz. 1=Apply reset;
  *     0=Release from reset. Default 1.
  */
+#include <linux/bitops.h>
 #define HDMITX_TOP_SW_RESET                     (0x000)
 
 /*
diff --git a/drivers/video/meson/meson_plane.c b/drivers/video/meson/meson_plane.c
index 8edf451f13..b367276f23 100644
--- a/drivers/video/meson/meson_plane.c
+++ b/drivers/video/meson/meson_plane.c
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <asm/io.h>
 #include <linux/bitfield.h>
+#include <linux/bitops.h>
 
 #include "meson_vpu.h"
 
diff --git a/drivers/video/meson/meson_registers.h b/drivers/video/meson/meson_registers.h
index 39e8ec8639..f6a5d1ac8c 100644
--- a/drivers/video/meson/meson_registers.h
+++ b/drivers/video/meson/meson_registers.h
@@ -7,6 +7,7 @@
 #define __MESON_REGISTERS_H
 
 /* Shift all registers by 2 */
+#include <linux/bitops.h>
 #define _REG(reg)	((reg) << 2)
 
 #define writel_bits(mask, val, addr) \
diff --git a/drivers/video/meson/meson_vclk.c b/drivers/video/meson/meson_vclk.c
index 3b5b73b7c3..cd1e69040f 100644
--- a/drivers/video/meson/meson_vclk.c
+++ b/drivers/video/meson/meson_vclk.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <dm.h>
 #include <edid.h>
+#include <linux/bitops.h>
 #include "meson_vpu.h"
 #include <log.h>
 #include <linux/iopoll.h>
diff --git a/drivers/video/meson/meson_vpu_init.c b/drivers/video/meson/meson_vpu_init.c
index 8408c59eaa..c9808e1c63 100644
--- a/drivers/video/meson/meson_vpu_init.c
+++ b/drivers/video/meson/meson_vpu_init.c
@@ -11,6 +11,7 @@
 #include <common.h>
 #include <dm.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 #include "meson_vpu.h"
 
diff --git a/drivers/video/rockchip/rk_vop.c b/drivers/video/rockchip/rk_vop.c
index 45385b175b..9032eb430e 100644
--- a/drivers/video/rockchip/rk_vop.c
+++ b/drivers/video/rockchip/rk_vop.c
@@ -20,6 +20,7 @@
 #include <asm/arch-rockchip/vop_rk3288.h>
 #include <dm/device-internal.h>
 #include <dm/uclass-internal.h>
+#include <linux/bitops.h>
 #include <linux/err.h>
 #include <power/regulator.h>
 #include "rk_vop.h"
diff --git a/drivers/video/stm32/stm32_dsi.c b/drivers/video/stm32/stm32_dsi.c
index fa4efdb298..04796435f1 100644
--- a/drivers/video/stm32/stm32_dsi.c
+++ b/drivers/video/stm32/stm32_dsi.c
@@ -23,6 +23,7 @@
 #include <dm/device-internal.h>
 #include <dm/device_compat.h>
 #include <dm/lists.h>
+#include <linux/bitops.h>
 #include <linux/iopoll.h>
 #include <power/regulator.h>
 
diff --git a/drivers/video/stm32/stm32_ltdc.c b/drivers/video/stm32/stm32_ltdc.c
index ff48fd7af9..2f3427a32e 100644
--- a/drivers/video/stm32/stm32_ltdc.c
+++ b/drivers/video/stm32/stm32_ltdc.c
@@ -18,6 +18,7 @@
 #include <asm/arch/gpio.h>
 #include <dm/device-internal.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 
 struct stm32_ltdc_priv {
 	void __iomem *regs;
diff --git a/drivers/video/sunxi/sunxi_de2.c b/drivers/video/sunxi/sunxi_de2.c
index 0d20e82ba3..64993c4e00 100644
--- a/drivers/video/sunxi/sunxi_de2.c
+++ b/drivers/video/sunxi/sunxi_de2.c
@@ -21,6 +21,7 @@
 #include <asm/arch/display2.h>
 #include <dm/device-internal.h>
 #include <dm/uclass-internal.h>
+#include <linux/bitops.h>
 #include "simplefb_common.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/video/sunxi/sunxi_dw_hdmi.c b/drivers/video/sunxi/sunxi_dw_hdmi.c
index cf2d6a772b..01d4b7a11c 100644
--- a/drivers/video/sunxi/sunxi_dw_hdmi.c
+++ b/drivers/video/sunxi/sunxi_dw_hdmi.c
@@ -15,6 +15,7 @@
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/lcdc.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 struct sunxi_dw_hdmi_priv {
diff --git a/drivers/video/tda19988.c b/drivers/video/tda19988.c
index 4223d5f789..191cda3ce7 100644
--- a/drivers/video/tda19988.c
+++ b/drivers/video/tda19988.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <display.h>
 #include <i2c.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 /*
diff --git a/drivers/virtio/virtio_mmio.h b/drivers/virtio/virtio_mmio.h
index b3408828a5..b446674ccc 100644
--- a/drivers/virtio/virtio_mmio.h
+++ b/drivers/virtio/virtio_mmio.h
@@ -12,6 +12,7 @@
 /* Control registers */
 
 /* Magic value ("virt" string) - Read Only */
+#include <linux/bitops.h>
 #define VIRTIO_MMIO_MAGIC_VALUE		0x000
 
 /* Virtio device version - Read Only */
diff --git a/drivers/w1/mxc_w1.c b/drivers/w1/mxc_w1.c
index 1881a3b1f1..5bf08653a9 100644
--- a/drivers/w1/mxc_w1.c
+++ b/drivers/w1/mxc_w1.c
@@ -21,6 +21,7 @@
 #include <common.h>
 #include <dm.h>
 #include <dm/device_compat.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/io.h>
 #include <w1.h>
diff --git a/drivers/watchdog/designware_wdt.c b/drivers/watchdog/designware_wdt.c
index 1024a04596..12f09a7a39 100644
--- a/drivers/watchdog/designware_wdt.c
+++ b/drivers/watchdog/designware_wdt.c
@@ -10,6 +10,7 @@
 #include <wdt.h>
 #include <asm/io.h>
 #include <asm/utils.h>
+#include <linux/bitops.h>
 
 #define DW_WDT_CR	0x00
 #define DW_WDT_TORR	0x04
diff --git a/drivers/watchdog/mt7621_wdt.c b/drivers/watchdog/mt7621_wdt.c
index 38866141e4..1cd8866ef8 100644
--- a/drivers/watchdog/mt7621_wdt.c
+++ b/drivers/watchdog/mt7621_wdt.c
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <dm.h>
 #include <wdt.h>
+#include <linux/bitops.h>
 #include <linux/io.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c
index b3c597e1d0..a636cff354 100644
--- a/drivers/watchdog/mtk_wdt.c
+++ b/drivers/watchdog/mtk_wdt.c
@@ -11,6 +11,7 @@
 #include <hang.h>
 #include <wdt.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 #define MTK_WDT_MODE			0x00
 #define MTK_WDT_LENGTH			0x04
diff --git a/drivers/watchdog/orion_wdt.c b/drivers/watchdog/orion_wdt.c
index 581e1f1693..d33e2ac3dc 100644
--- a/drivers/watchdog/orion_wdt.c
+++ b/drivers/watchdog/orion_wdt.c
@@ -17,6 +17,7 @@
 #include <clk.h>
 #include <log.h>
 #include <wdt.h>
+#include <linux/bitops.h>
 #include <linux/kernel.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
diff --git a/drivers/watchdog/stm32mp_wdt.c b/drivers/watchdog/stm32mp_wdt.c
index 2d509a0522..2d8bfc09a0 100644
--- a/drivers/watchdog/stm32mp_wdt.c
+++ b/drivers/watchdog/stm32mp_wdt.c
@@ -10,6 +10,7 @@
 #include <syscon.h>
 #include <wdt.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/iopoll.h>
 
 /* IWDG registers */
diff --git a/env/env.c b/env/env.c
index 2084538f28..dcc25c030b 100644
--- a/env/env.c
+++ b/env/env.c
@@ -8,6 +8,7 @@
 #include <env.h>
 #include <env_internal.h>
 #include <log.h>
+#include <linux/bitops.h>
 #include <linux/bug.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/fs/ubifs/lpt_commit.c b/fs/ubifs/lpt_commit.c
index 32938a8ffe..897d001430 100644
--- a/fs/ubifs/lpt_commit.c
+++ b/fs/ubifs/lpt_commit.c
@@ -20,6 +20,7 @@
 #include <linux/slab.h>
 #include <linux/random.h>
 #else
+#include <linux/bitops.h>
 #include <linux/compat.h>
 #include <linux/err.h>
 #include "crc16.h"
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 2f6b25d338..e3a4c0bca2 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -32,6 +32,7 @@
 #include <common.h>
 #include <malloc.h>
 #include <memalign.h>
+#include <linux/bitops.h>
 #include <linux/bug.h>
 #include <linux/log2.h>
 #include <linux/stat.h>
diff --git a/fs/ubifs/tnc.c b/fs/ubifs/tnc.c
index 41c7d5666f..e8b8f16838 100644
--- a/fs/ubifs/tnc.c
+++ b/fs/ubifs/tnc.c
@@ -25,6 +25,7 @@
 #include <linux/slab.h>
 #include <u-boot/crc.h>
 #else
+#include <linux/bitops.h>
 #include <linux/bug.h>
 #include <linux/compat.h>
 #include <linux/err.h>
diff --git a/include/acpi/acpi_table.h b/include/acpi/acpi_table.h
index 3681c5c8ed..fe9b29f3f8 100644
--- a/include/acpi/acpi_table.h
+++ b/include/acpi/acpi_table.h
@@ -13,6 +13,8 @@
 #ifndef __ACPI_TABLE_H__
 #define __ACPI_TABLE_H__
 
+#include <linux/bitops.h>
+
 #define RSDP_SIG		"RSD PTR "	/* RSDP pointer signature */
 #define OEM_ID			"U-BOOT"	/* U-Boot */
 #define OEM_TABLE_ID		"U-BOOTBL"	/* U-Boot Table */
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index 859f41a0d4..e16c2f31d9 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -8,6 +8,7 @@
 #define _ASM_GENERIC_GPIO_H_
 
 #include <dm/ofnode.h>
+#include <linux/bitops.h>
 
 struct ofnode_phandle_args;
 
diff --git a/include/bitfield.h b/include/bitfield.h
index 579a69c856..d3ceeedccd 100644
--- a/include/bitfield.h
+++ b/include/bitfield.h
@@ -36,6 +36,7 @@
  * tables which describe all bitfields in all registers.
  */
 
+#include <linux/bitops.h>
 #include <linux/types.h>
 
 /* Produces a mask of set bits covering a range of a uint value */
diff --git a/include/common.h b/include/common.h
index f7c0f5724a..f0679ac705 100644
--- a/include/common.h
+++ b/include/common.h
@@ -16,7 +16,6 @@
 #include <config.h>
 #include <errno.h>
 #include <time.h>
-#include <linux/bitops.h>
 #include <linux/types.h>
 #include <linux/printk.h>
 #include <linux/string.h>
diff --git a/include/configs/gardena-smart-gateway-at91sam.h b/include/configs/gardena-smart-gateway-at91sam.h
index f5ee65cb8a..78d2136248 100644
--- a/include/configs/gardena-smart-gateway-at91sam.h
+++ b/include/configs/gardena-smart-gateway-at91sam.h
@@ -9,6 +9,10 @@
 #ifndef __CONFIG_H__
 #define __CONFIG_H__
 
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
 /* ARM asynchronous clock */
 #define CONFIG_SYS_AT91_SLOW_CLOCK	32768
 #define CONFIG_SYS_AT91_MAIN_CLOCK	12000000	/* 12 MHz crystal */
diff --git a/include/dma.h b/include/dma.h
index 5b247b5b06..6ff591977b 100644
--- a/include/dma.h
+++ b/include/dma.h
@@ -9,6 +9,7 @@
 #ifndef _DMA_H_
 #define _DMA_H_
 
+#include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/types.h>
 
diff --git a/include/dwc3-sti-glue.h b/include/dwc3-sti-glue.h
index e2856f1268..3989a9bb53 100644
--- a/include/dwc3-sti-glue.h
+++ b/include/dwc3-sti-glue.h
@@ -8,6 +8,7 @@
 #define __DWC3_STI_UBOOT_H_
 
 /* glue registers */
+#include <linux/bitops.h>
 #define CLKRST_CTRL		0x00
 #define AUX_CLK_EN		BIT(0)
 #define SW_PIPEW_RESET_N	BIT(4)
diff --git a/include/dwmmc.h b/include/dwmmc.h
index 58110aa3e7..d8a8355a0a 100644
--- a/include/dwmmc.h
+++ b/include/dwmmc.h
@@ -10,6 +10,7 @@
 #include <asm/cache.h>
 #include <asm/io.h>
 #include <mmc.h>
+#include <linux/bitops.h>
 
 #define DWMCI_CTRL		0x000
 #define	DWMCI_PWREN		0x004
diff --git a/include/faraday/ftpci100.h b/include/faraday/ftpci100.h
index b4a43f82e5..8801bd1350 100644
--- a/include/faraday/ftpci100.h
+++ b/include/faraday/ftpci100.h
@@ -11,6 +11,7 @@
 #define __FTPCI100_H
 
 /* AHB Control Registers */
+#include <linux/bitops.h>
 struct ftpci100_ahbc {
 	unsigned int iosize;		/* 0x00 - I/O Space Size Signal */
 	unsigned int prot;		/* 0x04 - AHB Protection */
diff --git a/include/faraday/ftsdc010.h b/include/faraday/ftsdc010.h
index d3a359ab75..30726dab85 100644
--- a/include/faraday/ftsdc010.h
+++ b/include/faraday/ftsdc010.h
@@ -12,6 +12,7 @@
 #ifndef __ASSEMBLY__
 
 /* sd controller register */
+#include <linux/bitops.h>
 struct ftsdc010_mmc {
 	unsigned int	cmd;		/* 0x00 - command reg		*/
 	unsigned int	argu;		/* 0x04 - argument reg		*/
diff --git a/include/faraday/ftsdmc021.h b/include/faraday/ftsdmc021.h
index 3c979ced27..e0e5eb339e 100644
--- a/include/faraday/ftsdmc021.h
+++ b/include/faraday/ftsdmc021.h
@@ -14,6 +14,7 @@
 #define __FTSDMC021_H
 
 #ifndef __ASSEMBLY__
+#include <linux/bitops.h>
 struct ftsdmc021 {
 	unsigned int	tp1;		/* 0x00 - SDRAM Timing Parameter 1 */
 	unsigned int	tp2;		/* 0x04 - SDRAM Timing Parameter 2 */
diff --git a/include/fsl-mc/fsl_mc.h b/include/fsl-mc/fsl_mc.h
index a4d7d85fce..6cbcd39f12 100644
--- a/include/fsl-mc/fsl_mc.h
+++ b/include/fsl-mc/fsl_mc.h
@@ -7,6 +7,7 @@
 #define __FSL_MC_H__
 
 #include <common.h>
+#include <linux/bitops.h>
 
 #define MC_CCSR_BASE_ADDR \
 	((struct mc_ccsr_registers __iomem *)0x8340000)
diff --git a/include/linux/bitops.h b/include/linux/bitops.h
index a07c70fd48..6b509dce58 100644
--- a/include/linux/bitops.h
+++ b/include/linux/bitops.h
@@ -1,6 +1,8 @@
 #ifndef _LINUX_BITOPS_H
 #define _LINUX_BITOPS_H
 
+#ifndef USE_HOSTCC
+
 #include <asm/types.h>
 #include <asm-generic/bitsperlong.h>
 #include <linux/compiler.h>
@@ -216,4 +218,6 @@ static inline void generic_clear_bit(int nr, volatile unsigned long *addr)
 	*p &= ~mask;
 }
 
+#endif /* !USE_HOSTCC */
+
 #endif
diff --git a/include/linux/soc/ti/k3-navss-ringacc.h b/include/linux/soc/ti/k3-navss-ringacc.h
index 487dfe9859..7b027f8bd4 100644
--- a/include/linux/soc/ti/k3-navss-ringacc.h
+++ b/include/linux/soc/ti/k3-navss-ringacc.h
@@ -9,6 +9,7 @@
 #define __SOC_TI_K3_NAVSS_RINGACC_API_H_
 
 #include <dm/ofnode.h>
+#include <linux/bitops.h>
 
 /**
  * enum k3_nav_ring_mode - &struct k3_nav_ring_cfg mode
diff --git a/include/linux/soc/ti/ti_sci_protocol.h b/include/linux/soc/ti/ti_sci_protocol.h
index 8c4863efe1..eb916ba101 100644
--- a/include/linux/soc/ti/ti_sci_protocol.h
+++ b/include/linux/soc/ti/ti_sci_protocol.h
@@ -20,6 +20,7 @@
  * @firmware_revision:	Firmware revision (not usually used).
  * @firmware_description: Firmware description (not usually used).
  */
+#include <linux/bitops.h>
 struct ti_sci_version_info {
 	u8 abi_major;
 	u8 abi_minor;
diff --git a/include/mipi_dsi.h b/include/mipi_dsi.h
index f4a63b47f3..83c5163cf8 100644
--- a/include/mipi_dsi.h
+++ b/include/mipi_dsi.h
@@ -16,6 +16,7 @@
 #define MIPI_DSI_H
 
 #include <mipi_display.h>
+#include <linux/bitops.h>
 
 struct mipi_dsi_host;
 struct mipi_dsi_device;
diff --git a/include/mmc.h b/include/mmc.h
index 6a2e9739e0..82562193cc 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -9,6 +9,7 @@
 #ifndef _MMC_H_
 #define _MMC_H_
 
+#include <linux/bitops.h>
 #include <linux/list.h>
 #include <linux/sizes.h>
 #include <linux/compiler.h>
diff --git a/include/net/pfe_eth/pfe/cbus/class_csr.h b/include/net/pfe_eth/pfe/cbus/class_csr.h
index e2fece7aa1..80f1f96b44 100644
--- a/include/net/pfe_eth/pfe/cbus/class_csr.h
+++ b/include/net/pfe_eth/pfe/cbus/class_csr.h
@@ -12,6 +12,7 @@
  * class_csr - block containing all the classifier control and status register.
  * Mapped on CBUS and accessible from all PE's and ARM.
  */
+#include <linux/bitops.h>
 #define CLASS_VERSION			(CLASS_CSR_BASE_ADDR + 0x000)
 #define CLASS_TX_CTRL			(CLASS_CSR_BASE_ADDR + 0x004)
 #define CLASS_INQ_PKTPTR		(CLASS_CSR_BASE_ADDR + 0x010)
diff --git a/include/net/pfe_eth/pfe/cbus/emac.h b/include/net/pfe_eth/pfe/cbus/emac.h
index 53db8cc08f..5dc2113687 100644
--- a/include/net/pfe_eth/pfe/cbus/emac.h
+++ b/include/net/pfe_eth/pfe/cbus/emac.h
@@ -7,6 +7,7 @@
 #ifndef _EMAC_H_
 #define _EMAC_H_
 
+#include <linux/bitops.h>
 #define EMAC_IEVENT_REG		0x004
 #define EMAC_IMASK_REG		0x008
 #define EMAC_R_DES_ACTIVE_REG	0x010
diff --git a/include/net/pfe_eth/pfe/cbus/hif.h b/include/net/pfe_eth/pfe/cbus/hif.h
index 36722c5e07..aa4951ec0e 100644
--- a/include/net/pfe_eth/pfe/cbus/hif.h
+++ b/include/net/pfe_eth/pfe/cbus/hif.h
@@ -12,6 +12,7 @@
  * hif - PFE hif block control and status register.
  * Mapped on CBUS and accessible from all PE's and ARM.
  */
+#include <linux/bitops.h>
 #define HIF_VERSION		(HIF_BASE_ADDR + 0x00)
 #define HIF_TX_CTRL		(HIF_BASE_ADDR + 0x04)
 #define HIF_TX_CURR_BD_ADDR	(HIF_BASE_ADDR + 0x08)
diff --git a/include/net/pfe_eth/pfe/cbus/tmu_csr.h b/include/net/pfe_eth/pfe/cbus/tmu_csr.h
index 1e1abe26ca..cfe8f8ce8f 100644
--- a/include/net/pfe_eth/pfe/cbus/tmu_csr.h
+++ b/include/net/pfe_eth/pfe/cbus/tmu_csr.h
@@ -7,6 +7,7 @@
 #ifndef _TMU_CSR_H_
 #define _TMU_CSR_H_
 
+#include <linux/bitops.h>
 #define TMU_VERSION			(TMU_CSR_BASE_ADDR + 0x000)
 #define TMU_INQ_WATERMARK		(TMU_CSR_BASE_ADDR + 0x004)
 #define TMU_PHY_INQ_PKTPTR		(TMU_CSR_BASE_ADDR + 0x008)
diff --git a/include/net/pfe_eth/pfe/pfe_hw.h b/include/net/pfe_eth/pfe/pfe_hw.h
index 5da676bf8b..c69fc69130 100644
--- a/include/net/pfe_eth/pfe/pfe_hw.h
+++ b/include/net/pfe_eth/pfe/pfe_hw.h
@@ -8,6 +8,7 @@
 #define _PFE_H_
 
 #include <elf.h>
+#include <linux/bitops.h>
 #include "cbus.h"
 
 #define PFE_RESET_WA
diff --git a/include/net/pfe_eth/pfe_eth.h b/include/net/pfe_eth/pfe_eth.h
index 68b2e381b9..116a2b2c1d 100644
--- a/include/net/pfe_eth/pfe_eth.h
+++ b/include/net/pfe_eth/pfe_eth.h
@@ -7,6 +7,7 @@
 #ifndef __PFE_ETH_H__
 #define __PFE_ETH_H__
 
+#include <linux/bitops.h>
 #include <linux/sizes.h>
 #include <asm/io.h>
 #include <miiphy.h>
diff --git a/include/pch.h b/include/pch.h
index 0b44b66df9..620566819c 100644
--- a/include/pch.h
+++ b/include/pch.h
@@ -7,6 +7,7 @@
 #ifndef __pch_h
 #define __pch_h
 
+#include <linux/bitops.h>
 #define PCH_RCBA		0xf0
 
 #define BIOS_CTRL_BIOSWE	BIT(0)
diff --git a/include/power/stpmic1.h b/include/power/stpmic1.h
index 1493a677f0..d3567df326 100644
--- a/include/power/stpmic1.h
+++ b/include/power/stpmic1.h
@@ -6,6 +6,7 @@
 #ifndef __PMIC_STPMIC1_H_
 #define __PMIC_STPMIC1_H_
 
+#include <linux/bitops.h>
 #define STPMIC1_MAIN_CR			0x10
 #define STPMIC1_BUCKS_MRST_CR		0x18
 #define STPMIC1_LDOS_MRST_CR		0x1a
diff --git a/include/sdhci.h b/include/sdhci.h
index 0ef8c2ed62..94fc3ed56a 100644
--- a/include/sdhci.h
+++ b/include/sdhci.h
@@ -9,6 +9,7 @@
 #ifndef __SDHCI_HW_H
 #define __SDHCI_HW_H
 
+#include <linux/bitops.h>
 #include <linux/types.h>
 #include <asm/io.h>
 #include <mmc.h>
diff --git a/include/spi.h b/include/spi.h
index 2b4929fc79..5cc6d6e008 100644
--- a/include/spi.h
+++ b/include/spi.h
@@ -10,6 +10,7 @@
 #define _SPI_H_
 
 #include <common.h>
+#include <linux/bitops.h>
 
 /* SPI mode flags */
 #define SPI_CPHA	BIT(0)			/* clock phase */
diff --git a/include/tee.h b/include/tee.h
index 02bcd9e703..8207d0c02a 100644
--- a/include/tee.h
+++ b/include/tee.h
@@ -6,6 +6,7 @@
 #ifndef __TEE_H
 #define __TEE_H
 
+#include <linux/bitops.h>
 #define TEE_UUID_LEN		16
 
 #define TEE_GEN_CAP_GP          BIT(0)	/* GlobalPlatform compliant TEE */
diff --git a/include/tpm-v1.h b/include/tpm-v1.h
index 45b7a4831d..59ad4aecf4 100644
--- a/include/tpm-v1.h
+++ b/include/tpm-v1.h
@@ -8,6 +8,7 @@
 #define __TPM_V1_H
 
 #include <tpm-common.h>
+#include <linux/bitops.h>
 
 /* Useful constants */
 enum {
diff --git a/include/virtio.h b/include/virtio.h
index 46f9efb732..10a9c073ba 100644
--- a/include/virtio.h
+++ b/include/virtio.h
@@ -20,6 +20,7 @@
 #ifndef __VIRTIO_H__
 #define __VIRTIO_H__
 
+#include <linux/bitops.h>
 #include <linux/bug.h>
 #define VIRTIO_ID_NET		1 /* virtio net */
 #define VIRTIO_ID_BLOCK		2 /* virtio block */
diff --git a/include/vsc9953.h b/include/vsc9953.h
index fe072da516..5d6fc7716c 100644
--- a/include/vsc9953.h
+++ b/include/vsc9953.h
@@ -11,6 +11,7 @@
 #include <config.h>
 #include <miiphy.h>
 #include <asm/types.h>
+#include <linux/bitops.h>
 
 #define VSC9953_OFFSET			(CONFIG_SYS_CCSRBAR_DEFAULT + 0x800000)
 
diff --git a/include/zynqmppl.h b/include/zynqmppl.h
index 5214db99fb..a0a52ec4c1 100644
--- a/include/zynqmppl.h
+++ b/include/zynqmppl.h
@@ -8,6 +8,7 @@
 #define _ZYNQMPPL_H_
 
 #include <xilinx.h>
+#include <linux/bitops.h>
 
 #define ZYNQMP_SIP_SVC_CSU_DMA_CHIPID		0xC2000018
 #define ZYNQMP_SIP_SVC_PM_FPGA_LOAD		0xC2000016
diff --git a/lib/div64.c b/lib/div64.c
index 62933c92c4..779d7521f6 100644
--- a/lib/div64.c
+++ b/lib/div64.c
@@ -17,6 +17,7 @@
  * or by defining a preprocessor macro in arch/include/asm/div64.h.
  */
 
+#include <linux/bitops.h>
 #include <linux/compat.h>
 #include <linux/kernel.h>
 #include <linux/math64.h>
diff --git a/lib/efi_loader/efi_variable.c b/lib/efi_loader/efi_variable.c
index c357ebe7d0..c39fa676c8 100644
--- a/lib/efi_loader/efi_variable.c
+++ b/lib/efi_loader/efi_variable.c
@@ -15,6 +15,7 @@
 #include <search.h>
 #include <uuid.h>
 #include <crypto/pkcs7_parser.h>
+#include <linux/bitops.h>
 #include <linux/compat.h>
 #include <u-boot/crc.h>
 
diff --git a/lib/tpm-v2.c b/lib/tpm-v2.c
index f89592d6e2..5a039f65d1 100644
--- a/lib/tpm-v2.c
+++ b/lib/tpm-v2.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <tpm-common.h>
 #include <tpm-v2.h>
+#include <linux/bitops.h>
 #include "tpm-utils.h"
 
 u32 tpm2_startup(struct udevice *dev, enum tpm2_startup_types mode)
-- 
2.26.2.645.ge9eca65c58-goog

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH v3 21/22] Use __ASSEMBLY__ as the assembly macros
  2020-05-10 17:40 ` [PATCH v3 21/22] Use __ASSEMBLY__ as the assembly macros Simon Glass
@ 2020-05-11  4:56   ` Masahiro Yamada
  2020-05-11 20:28     ` Simon Glass
  2020-05-19 17:34   ` Tom Rini
  1 sibling, 1 reply; 53+ messages in thread
From: Masahiro Yamada @ 2020-05-11  4:56 UTC (permalink / raw)
  To: u-boot

On Mon, May 11, 2020 at 2:43 AM Simon Glass <sjg@chromium.org> wrote:
>
> Some places use __ASSEMBLER__ instead which does not work since the
> Makefile does not define it. Fix them.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>


I think we decided to not do this in v2, didn't we?

http://patchwork.ozlabs.org/project/uboot/patch/20200409201506.133129-6-sjg at chromium.org/


> ---
>
> Changes in v3: None
> Changes in v2:
> - Add new patch to fix occurances of __ASSEMBLER__
>
>  arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h     | 2 +-
>  arch/arm/include/asm/arch-mx27/regs-rtc.h                  | 2 +-
>  arch/arm/include/asm/arch-mx5/imx-regs.h                   | 2 +-
>  arch/arm/include/asm/arch-mx6/imx-regs.h                   | 2 +-
>  arch/arm/include/asm/arch-mx7/imx-regs.h                   | 2 +-
>  arch/arm/include/asm/arch-s32v234/imx-regs.h               | 2 +-
>  arch/arm/include/asm/arch-vf610/imx-regs.h                 | 2 +-
>  arch/arm/mach-socfpga/include/mach/clock_manager.h         | 2 +-
>  arch/arm/mach-socfpga/include/mach/clock_manager_arria10.h | 4 ++--
>  arch/arm/mach-socfpga/include/mach/clock_manager_gen5.h    | 4 ++--
>  arch/arm/mach-socfpga/include/mach/sdram_arria10.h         | 2 +-
>  arch/arm/mach-stm32mp/include/mach/stm32.h                 | 2 +-
>  arch/x86/include/asm/mtrr.h                                | 2 +-
>  arch/x86/include/asm/sipi.h                                | 4 ++--
>  include/atf_common.h                                       | 2 +-
>  include/elf.h                                              | 4 ++--
>  16 files changed, 20 insertions(+), 20 deletions(-)
>
> diff --git a/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h b/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h
> index c2fbc23b11..baa9fa8529 100644
> --- a/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h
> +++ b/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h
> @@ -589,5 +589,5 @@ struct ccsr_serdes {
>         u8 res5[0x19fc - 0xa00];
>  };
>
> -#endif /*__ASSEMBLY__*/
> +#endif /*__ASSEMBLY__ */
>  #endif /* __ARCH_FSL_LSCH3_IMMAP_H_ */
> diff --git a/arch/arm/include/asm/arch-mx27/regs-rtc.h b/arch/arm/include/asm/arch-mx27/regs-rtc.h
> index d373ab1583..8434f4c1cb 100644
> --- a/arch/arm/include/asm/arch-mx27/regs-rtc.h
> +++ b/arch/arm/include/asm/arch-mx27/regs-rtc.h
> @@ -21,6 +21,6 @@ struct rtc_regs {
>         u32 dayr;
>         u32 dayalarm;
>  };
> -#endif /* __ASSEMBLY__*/
> +#endif /* __ASSEMBLY__ */
>
>  #endif /* __MX28_REGS_RTC_H__ */
> diff --git a/arch/arm/include/asm/arch-mx5/imx-regs.h b/arch/arm/include/asm/arch-mx5/imx-regs.h
> index fbb6e599b6..3d1cc68322 100644
> --- a/arch/arm/include/asm/arch-mx5/imx-regs.h
> +++ b/arch/arm/include/asm/arch-mx5/imx-regs.h
> @@ -557,6 +557,6 @@ struct pwm_regs {
>         u32     cnr;
>  };
>
> -#endif /* __ASSEMBLER__*/
> +#endif /* __ASSEMBLY__ */
>
>  #endif                         /* __ASM_ARCH_MX5_IMX_REGS_H__ */
> diff --git a/arch/arm/include/asm/arch-mx6/imx-regs.h b/arch/arm/include/asm/arch-mx6/imx-regs.h
> index 4f01b20aed..5b41a7a4b8 100644
> --- a/arch/arm/include/asm/arch-mx6/imx-regs.h
> +++ b/arch/arm/include/asm/arch-mx6/imx-regs.h
> @@ -1003,5 +1003,5 @@ struct pwm_regs {
>   */
>  #define        is_boot_from_usb(void) (!(readl(USB_PHY0_BASE_ADDR) & (1<<20)))
>
> -#endif /* __ASSEMBLER__*/
> +#endif /* __ASSEMBLY__ */
>  #endif /* __ASM_ARCH_MX6_IMX_REGS_H__ */
> diff --git a/arch/arm/include/asm/arch-mx7/imx-regs.h b/arch/arm/include/asm/arch-mx7/imx-regs.h
> index 6336514007..7b23abbc7e 100644
> --- a/arch/arm/include/asm/arch-mx7/imx-regs.h
> +++ b/arch/arm/include/asm/arch-mx7/imx-regs.h
> @@ -1223,5 +1223,5 @@ struct bootrom_sw_info {
>         u32 reserved_3[3];
>  };
>
> -#endif /* __ASSEMBLER__*/
> +#endif /* __ASSEMBLY__ */
>  #endif /* __ASM_ARCH_MX7_IMX_REGS_H__ */
> diff --git a/arch/arm/include/asm/arch-s32v234/imx-regs.h b/arch/arm/include/asm/arch-s32v234/imx-regs.h
> index 9a779cce96..1472a43f1b 100644
> --- a/arch/arm/include/asm/arch-s32v234/imx-regs.h
> +++ b/arch/arm/include/asm/arch-s32v234/imx-regs.h
> @@ -323,6 +323,6 @@ struct mscm_ir {
>         u32 ipcie[4];           /* Interconnect Parity Checking Injection Enable Register       */
>  };
>
> -#endif /* __ASSEMBLER__ */
> +#endif /* __ASSEMBLY__ */
>
>  #endif /* __ASM_ARCH_IMX_REGS_H__ */
> diff --git a/arch/arm/include/asm/arch-vf610/imx-regs.h b/arch/arm/include/asm/arch-vf610/imx-regs.h
> index ae0a187c4d..03def8e3c5 100644
> --- a/arch/arm/include/asm/arch-vf610/imx-regs.h
> +++ b/arch/arm/include/asm/arch-vf610/imx-regs.h
> @@ -474,6 +474,6 @@ struct mscm {
>         u32 cpxcfg3;
>  };
>
> -#endif /* __ASSEMBLER__*/
> +#endif /* __ASSEMBLY__ */
>
>  #endif /* __ASM_ARCH_IMX_REGS_H__ */
> diff --git a/arch/arm/mach-socfpga/include/mach/clock_manager.h b/arch/arm/mach-socfpga/include/mach/clock_manager.h
> index c6830582a5..1f734bcd65 100644
> --- a/arch/arm/mach-socfpga/include/mach/clock_manager.h
> +++ b/arch/arm/mach-socfpga/include/mach/clock_manager.h
> @@ -8,7 +8,7 @@
>
>  phys_addr_t socfpga_get_clkmgr_addr(void);
>
> -#ifndef __ASSEMBLER__
> +#ifndef __ASSEMBLY__
>  void cm_wait_for_lock(u32 mask);
>  int cm_wait_for_fsm(void);
>  void cm_print_clock_quick_summary(void);
> diff --git a/arch/arm/mach-socfpga/include/mach/clock_manager_arria10.h b/arch/arm/mach-socfpga/include/mach/clock_manager_arria10.h
> index 23f280df1b..8d62d75432 100644
> --- a/arch/arm/mach-socfpga/include/mach/clock_manager_arria10.h
> +++ b/arch/arm/mach-socfpga/include/mach/clock_manager_arria10.h
> @@ -6,7 +6,7 @@
>  #ifndef CLOCK_MANAGER_ARRIA10
>  #define CLOCK_MANAGER_ARRIA10
>
> -#ifndef __ASSEMBLER__
> +#ifndef __ASSEMBLY__
>
>  /* Clock manager group */
>  #define CLKMGR_A10_CTRL                                0x00
> @@ -69,7 +69,7 @@ unsigned long cm_get_mpu_clk_hz(void);
>
>  unsigned int cm_get_qspi_controller_clk_hz(void);
>
> -#endif /* __ASSEMBLER__ */
> +#endif /* __ASSEMBLY__ */
>
>  #define LOCKED_MASK    (CLKMGR_CLKMGR_STAT_MAINPLLLOCKED_SET_MSK | \
>                          CLKMGR_CLKMGR_STAT_PERPLLLOCKED_SET_MSK)
> diff --git a/arch/arm/mach-socfpga/include/mach/clock_manager_gen5.h b/arch/arm/mach-socfpga/include/mach/clock_manager_gen5.h
> index 08655094ca..fc6d230156 100644
> --- a/arch/arm/mach-socfpga/include/mach/clock_manager_gen5.h
> +++ b/arch/arm/mach-socfpga/include/mach/clock_manager_gen5.h
> @@ -6,7 +6,7 @@
>  #ifndef _CLOCK_MANAGER_GEN5_H_
>  #define _CLOCK_MANAGER_GEN5_H_
>
> -#ifndef __ASSEMBLER__
> +#ifndef __ASSEMBLY__
>
>  struct cm_config {
>         /* main group */
> @@ -107,7 +107,7 @@ const unsigned int cm_get_f2s_sdr_ref_clk_hz(void);
>  /* Clock configuration accessors */
>  int cm_basic_init(const struct cm_config * const cfg);
>  const struct cm_config * const cm_get_default_config(void);
> -#endif /* __ASSEMBLER__ */
> +#endif /* __ASSEMBLY__ */
>
>  #define LOCKED_MASK \
>         (CLKMGR_INTER_SDRPLLLOCKED_MASK  | \
> diff --git a/arch/arm/mach-socfpga/include/mach/sdram_arria10.h b/arch/arm/mach-socfpga/include/mach/sdram_arria10.h
> index 25b82fb285..f2773883fd 100644
> --- a/arch/arm/mach-socfpga/include/mach/sdram_arria10.h
> +++ b/arch/arm/mach-socfpga/include/mach/sdram_arria10.h
> @@ -205,7 +205,7 @@ struct socfpga_io48_mmr {
>         u32 niosreserve2;
>  };
>
> -#endif /*__ASSEMBLY__*/
> +#endif /*__ASSEMBLY__ */
>
>  #define IO48_MMR_CTRLCFG0_DB2_BURST_LENGTH_MASK                0x1F000000
>  #define IO48_MMR_CTRLCFG0_DB2_BURST_LENGTH_SHIFT       24
> diff --git a/arch/arm/mach-stm32mp/include/mach/stm32.h b/arch/arm/mach-stm32mp/include/mach/stm32.h
> index 76d593d785..f8ddb1cb57 100644
> --- a/arch/arm/mach-stm32mp/include/mach/stm32.h
> +++ b/arch/arm/mach-stm32mp/include/mach/stm32.h
> @@ -130,5 +130,5 @@ enum forced_boot_mode {
>  #define BSEC_OTP_MAC   57
>  #define BSEC_OTP_BOARD 59
>
> -#endif /* __ASSEMBLY__*/
> +#endif /* __ASSEMBLY__ */
>  #endif /* _MACH_STM32_H_ */
> diff --git a/arch/x86/include/asm/mtrr.h b/arch/x86/include/asm/mtrr.h
> index 672617256e..212a699c1b 100644
> --- a/arch/x86/include/asm/mtrr.h
> +++ b/arch/x86/include/asm/mtrr.h
> @@ -57,7 +57,7 @@
>
>  #define MTRR_FIX_TYPE(t)       ((t << 24) | (t << 16) | (t << 8) | t)
>
> -#if !defined(__ASSEMBLER__)
> +#if !defined(__ASSEMBLY__)
>
>  /**
>   * Information about the previous MTRR state, set up by mtrr_open()
> diff --git a/arch/x86/include/asm/sipi.h b/arch/x86/include/asm/sipi.h
> index 1ab6c2874a..2483422528 100644
> --- a/arch/x86/include/asm/sipi.h
> +++ b/arch/x86/include/asm/sipi.h
> @@ -10,7 +10,7 @@
>  #define AP_DEFAULT_BASE 0x30000
>  #define AP_DEFAULT_SIZE 0x10000
>
> -#ifndef __ASSEMBLER__
> +#ifndef __ASSEMBLY__
>
>  /**
>   * struct sipi_params_16bit - 16-bit SIPI entry-point parameters
> @@ -81,6 +81,6 @@ void ap_start(void);
>  extern char sipi_params_16bit[];
>  extern char sipi_params[];
>
> -#endif /* __ASSEMBLER__ */
> +#endif /* __ASSEMBLY__ */
>
>  #endif
> diff --git a/include/atf_common.h b/include/atf_common.h
> index 3a7d40e5f0..fd5454c55b 100644
> --- a/include/atf_common.h
> +++ b/include/atf_common.h
> @@ -177,6 +177,6 @@ struct bl2_to_bl31_params_mem {
>         struct entry_point_info bl31_ep_info;
>  };
>
> -#endif /*__ASSEMBLY__*/
> +#endif /*__ASSEMBLY__ */
>
>  #endif /* __BL_COMMON_H__ */
> diff --git a/include/elf.h b/include/elf.h
> index e7c51986df..b04e746d61 100644
> --- a/include/elf.h
> +++ b/include/elf.h
> @@ -9,7 +9,7 @@
>  #ifndef _ELF_H
>  #define _ELF_H
>
> -#ifndef __ASSEMBLER__
> +#ifndef __ASSEMBLY__
>  #include "compiler.h"
>
>  /* This version doesn't work for 64-bit ABIs - Erik */
> @@ -690,7 +690,7 @@ unsigned long elf_hash(const unsigned char *name);
>  #define R_RISCV_64             2
>  #define R_RISCV_RELATIVE       3
>
> -#ifndef __ASSEMBLER__
> +#ifndef __ASSEMBLY__
>  int valid_elf_image(unsigned long addr);
>  unsigned long load_elf64_image_phdr(unsigned long addr);
>  unsigned long load_elf64_image_shdr(unsigned long addr);
> --
> 2.26.2.645.ge9eca65c58-goog
>


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH v3 11/22] common: Drop init.h from common header
  2020-05-10 17:40 ` [PATCH v3 11/22] common: Drop init.h " Simon Glass
@ 2020-05-11  6:44   ` Masahiro Yamada
  2020-05-11  7:04     ` Masahiro Yamada
  2020-05-19 17:32   ` Tom Rini
  1 sibling, 1 reply; 53+ messages in thread
From: Masahiro Yamada @ 2020-05-11  6:44 UTC (permalink / raw)
  To: u-boot

Simon,

On Mon, May 11, 2020 at 7:58 AM Simon Glass <sjg@chromium.org> wrote:
>
> Move this uncommon header out of the common header.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>


Why are you adding <init.h> to
arch/arm/mach-uniphier/cpu-info.c,
which does not include <common.h>
in the first place?


This seems a wrong conversion.

For uniphier, NACK.




> ---
>
> Changes in v3: None
> Changes in v2:
> - Adjustments for chromebook_coral, etc.
>
>  arch/arc/lib/cpu.c                                        | 1 +
>  arch/arc/lib/init_helpers.c                               | 1 +
>  arch/arm/cpu/arm1136/mx31/generic.c                       | 1 +
>  arch/arm/cpu/arm1136/mx31/timer.c                         | 1 +
>  arch/arm/cpu/arm1136/mx35/generic.c                       | 1 +
>  arch/arm/cpu/arm1136/mx35/timer.c                         | 1 +
>  arch/arm/cpu/arm920t/ep93xx/timer.c                       | 1 +
>  arch/arm/cpu/arm926ejs/armada100/cpu.c                    | 1 +
>  arch/arm/cpu/arm926ejs/armada100/dram.c                   | 1 +
>  arch/arm/cpu/arm926ejs/armada100/timer.c                  | 1 +
>  arch/arm/cpu/arm926ejs/lpc32xx/cpu.c                      | 1 +
>  arch/arm/cpu/arm926ejs/lpc32xx/timer.c                    | 1 +
>  arch/arm/cpu/arm926ejs/mx25/generic.c                     | 1 +
>  arch/arm/cpu/arm926ejs/mx25/timer.c                       | 1 +
>  arch/arm/cpu/arm926ejs/mx27/timer.c                       | 1 +
>  arch/arm/cpu/arm926ejs/mxs/mxs.c                          | 1 +
>  arch/arm/cpu/arm926ejs/mxs/spl_boot.c                     | 1 +
>  arch/arm/cpu/arm926ejs/mxs/timer.c                        | 1 +
>  arch/arm/cpu/arm926ejs/spear/cpu.c                        | 1 +
>  arch/arm/cpu/arm926ejs/spear/spl.c                        | 1 +
>  arch/arm/cpu/arm926ejs/spear/timer.c                      | 1 +
>  arch/arm/cpu/armv7/arch_timer.c                           | 1 +
>  arch/arm/cpu/armv7/iproc-common/timer.c                   | 1 +
>  arch/arm/cpu/armv7/ls102xa/cpu.c                          | 1 +
>  arch/arm/cpu/armv7/ls102xa/timer.c                        | 1 +
>  arch/arm/cpu/armv7/s5p-common/cpu_info.c                  | 1 +
>  arch/arm/cpu/armv7/s5p-common/timer.c                     | 1 +
>  arch/arm/cpu/armv7/stv0991/timer.c                        | 1 +
>  arch/arm/cpu/armv7/sunxi/timer.c                          | 1 +
>  arch/arm/cpu/armv7/vf610/generic.c                        | 1 +
>  arch/arm/cpu/armv7/vf610/timer.c                          | 1 +
>  arch/arm/cpu/armv7m/systick-timer.c                       | 1 +
>  arch/arm/cpu/armv8/fsl-layerscape/spl.c                   | 1 +
>  arch/arm/cpu/armv8/s32v234/cpu.c                          | 1 +
>  arch/arm/cpu/armv8/s32v234/generic.c                      | 1 +
>  arch/arm/cpu/pxa/cpuinfo.c                                | 1 +
>  arch/arm/cpu/pxa/pxa2xx.c                                 | 1 +
>  arch/arm/cpu/pxa/timer.c                                  | 1 +
>  arch/arm/lib/spl.c                                        | 1 +
>  arch/arm/lib/stack.c                                      | 1 +
>  arch/arm/mach-aspeed/ast2500-board.c                      | 1 +
>  arch/arm/mach-at91/arm920t/cpu.c                          | 1 +
>  arch/arm/mach-at91/arm920t/timer.c                        | 1 +
>  arch/arm/mach-at91/arm926ejs/cpu.c                        | 1 +
>  arch/arm/mach-at91/arm926ejs/timer.c                      | 1 +
>  arch/arm/mach-at91/armv7/cpu.c                            | 1 +
>  arch/arm/mach-at91/armv7/timer.c                          | 1 +
>  arch/arm/mach-at91/spl_at91.c                             | 1 +
>  arch/arm/mach-at91/spl_atmel.c                            | 1 +
>  arch/arm/mach-bcm283x/init.c                              | 1 +
>  arch/arm/mach-davinci/cpu.c                               | 1 +
>  arch/arm/mach-davinci/da850_lowlevel.c                    | 1 +
>  arch/arm/mach-davinci/spl.c                               | 1 +
>  arch/arm/mach-davinci/timer.c                             | 1 +
>  arch/arm/mach-exynos/lowlevel_init.c                      | 1 +
>  arch/arm/mach-exynos/spl_boot.c                           | 1 +
>  arch/arm/mach-highbank/timer.c                            | 1 +
>  arch/arm/mach-imx/cpu.c                                   | 1 +
>  arch/arm/mach-imx/imx8m/soc.c                             | 1 +
>  arch/arm/mach-imx/imxrt/soc.c                             | 1 +
>  arch/arm/mach-imx/mx7/soc.c                               | 1 +
>  arch/arm/mach-imx/spl.c                                   | 1 +
>  arch/arm/mach-imx/syscounter.c                            | 1 +
>  arch/arm/mach-imx/timer.c                                 | 1 +
>  arch/arm/mach-k3/am6_init.c                               | 1 +
>  arch/arm/mach-k3/common.c                                 | 1 +
>  arch/arm/mach-k3/j721e_init.c                             | 1 +
>  arch/arm/mach-keystone/init.c                             | 1 +
>  arch/arm/mach-keystone/keystone.c                         | 1 +
>  arch/arm/mach-kirkwood/cpu.c                              | 1 +
>  arch/arm/mach-mediatek/cpu.c                              | 1 +
>  arch/arm/mach-mediatek/mt7622/init.c                      | 1 +
>  arch/arm/mach-mediatek/mt7629/init.c                      | 1 +
>  arch/arm/mach-mediatek/mt8512/init.c                      | 1 +
>  arch/arm/mach-mediatek/mt8516/init.c                      | 1 +
>  arch/arm/mach-mediatek/mt8518/init.c                      | 1 +
>  arch/arm/mach-mediatek/spl.c                              | 1 +
>  arch/arm/mach-meson/board-info.c                          | 1 +
>  arch/arm/mach-mvebu/armada3700/cpu.c                      | 1 +
>  arch/arm/mach-mvebu/cpu.c                                 | 1 +
>  arch/arm/mach-mvebu/spl.c                                 | 1 +
>  arch/arm/mach-mvebu/timer.c                               | 1 +
>  arch/arm/mach-omap2/am33xx/chilisom.c                     | 1 +
>  arch/arm/mach-omap2/am33xx/clock.c                        | 1 +
>  arch/arm/mach-omap2/am33xx/sys_info.c                     | 1 +
>  arch/arm/mach-omap2/clocks-common.c                       | 1 +
>  arch/arm/mach-omap2/hwinit-common.c                       | 1 +
>  arch/arm/mach-omap2/omap3/board.c                         | 1 +
>  arch/arm/mach-omap2/omap3/emif4.c                         | 1 +
>  arch/arm/mach-omap2/omap3/sdrc.c                          | 1 +
>  arch/arm/mach-omap2/timer.c                               | 1 +
>  arch/arm/mach-orion5x/cpu.c                               | 1 +
>  arch/arm/mach-orion5x/timer.c                             | 1 +
>  arch/arm/mach-owl/soc.c                                   | 1 +
>  arch/arm/mach-rmobile/board.c                             | 1 +
>  arch/arm/mach-rmobile/cpu_info.c                          | 1 +
>  arch/arm/mach-rmobile/timer.c                             | 1 +
>  arch/arm/mach-rockchip/cpu-info.c                         | 1 +
>  arch/arm/mach-rockchip/px30-board-tpl.c                   | 1 +
>  arch/arm/mach-rockchip/px30/px30.c                        | 1 +
>  arch/arm/mach-rockchip/rk3036-board-spl.c                 | 1 +
>  arch/arm/mach-rockchip/rk3036/rk3036.c                    | 1 +
>  arch/arm/mach-rockchip/rk3036/sdram_rk3036.c              | 1 +
>  arch/arm/mach-rockchip/rk3128/rk3128.c                    | 1 +
>  arch/arm/mach-rockchip/rk3188/rk3188.c                    | 1 +
>  arch/arm/mach-rockchip/rk322x/rk322x.c                    | 1 +
>  arch/arm/mach-rockchip/rk3308/rk3308.c                    | 1 +
>  arch/arm/mach-rockchip/rk3328/rk3328.c                    | 1 +
>  arch/arm/mach-rockchip/rk3368/rk3368.c                    | 1 +
>  arch/arm/mach-rockchip/rk3399/rk3399.c                    | 1 +
>  arch/arm/mach-rockchip/spl.c                              | 1 +
>  arch/arm/mach-rockchip/tpl.c                              | 1 +
>  arch/arm/mach-socfpga/board.c                             | 1 +
>  arch/arm/mach-socfpga/clock_manager.c                     | 1 +
>  arch/arm/mach-socfpga/misc.c                              | 1 +
>  arch/arm/mach-socfpga/misc_arria10.c                      | 1 +
>  arch/arm/mach-socfpga/misc_gen5.c                         | 1 +
>  arch/arm/mach-socfpga/misc_s10.c                          | 1 +
>  arch/arm/mach-socfpga/spl_a10.c                           | 1 +
>  arch/arm/mach-socfpga/spl_agilex.c                        | 1 +
>  arch/arm/mach-socfpga/spl_gen5.c                          | 1 +
>  arch/arm/mach-socfpga/spl_s10.c                           | 1 +
>  arch/arm/mach-socfpga/timer.c                             | 1 +
>  arch/arm/mach-socfpga/timer_s10.c                         | 1 +
>  arch/arm/mach-stm32/soc.c                                 | 1 +
>  arch/arm/mach-stm32mp/cpu.c                               | 1 +
>  arch/arm/mach-stm32mp/dram_init.c                         | 1 +
>  arch/arm/mach-stm32mp/spl.c                               | 1 +
>  arch/arm/mach-sunxi/board.c                               | 1 +
>  arch/arm/mach-sunxi/cpu_info.c                            | 1 +
>  arch/arm/mach-sunxi/dram_sun50i_h6.c                      | 3 ++-
>  arch/arm/mach-sunxi/dram_sun6i.c                          | 1 +
>  arch/arm/mach-sunxi/dram_sun8i_a23.c                      | 1 +
>  arch/arm/mach-sunxi/dram_sun8i_a33.c                      | 1 +
>  arch/arm/mach-sunxi/dram_sun8i_a83t.c                     | 1 +
>  arch/arm/mach-sunxi/dram_sun9i.c                          | 1 +
>  arch/arm/mach-sunxi/dram_sunxi_dw.c                       | 1 +
>  arch/arm/mach-tegra/cboot.c                               | 1 +
>  arch/arm/mach-tegra/sys_info.c                            | 1 +
>  arch/arm/mach-tegra/tegra114/clock.c                      | 1 +
>  arch/arm/mach-tegra/tegra124/clock.c                      | 1 +
>  arch/arm/mach-tegra/tegra20/clock.c                       | 1 +
>  arch/arm/mach-tegra/tegra210/clock.c                      | 1 +
>  arch/arm/mach-tegra/tegra30/clock.c                       | 1 +
>  arch/arm/mach-u8500/cpuinfo.c                             | 1 +
>  arch/arm/mach-uniphier/arm32/timer.c                      | 1 +
>  arch/arm/mach-uniphier/cpu-info.c                         | 1 +
>  arch/arm/mach-uniphier/dram/umc-pxs2.c                    | 1 +
>  arch/arm/mach-uniphier/dram_init.c                        | 1 +
>  arch/arm/mach-versal/clk.c                                | 1 +
>  arch/arm/mach-versal/cpu.c                                | 1 +
>  arch/arm/mach-zynq/clk.c                                  | 1 +
>  arch/arm/mach-zynq/cpu.c                                  | 1 +
>  arch/arm/mach-zynq/spl.c                                  | 1 +
>  arch/arm/mach-zynq/timer.c                                | 1 +
>  arch/arm/mach-zynqmp-r5/cpu.c                             | 1 +
>  arch/arm/mach-zynqmp/clk.c                                | 1 +
>  arch/arm/mach-zynqmp/cpu.c                                | 1 +
>  arch/m68k/cpu/mcf5227x/cpu.c                              | 1 +
>  arch/m68k/cpu/mcf5227x/cpu_init.c                         | 1 +
>  arch/m68k/cpu/mcf523x/cpu.c                               | 1 +
>  arch/m68k/cpu/mcf523x/cpu_init.c                          | 1 +
>  arch/m68k/cpu/mcf52x2/cpu.c                               | 1 +
>  arch/m68k/cpu/mcf52x2/cpu_init.c                          | 1 +
>  arch/m68k/cpu/mcf530x/cpu.c                               | 1 +
>  arch/m68k/cpu/mcf530x/cpu_init.c                          | 1 +
>  arch/m68k/cpu/mcf532x/cpu.c                               | 1 +
>  arch/m68k/cpu/mcf532x/cpu_init.c                          | 1 +
>  arch/m68k/cpu/mcf5445x/cpu.c                              | 1 +
>  arch/m68k/cpu/mcf5445x/cpu_init.c                         | 1 +
>  arch/m68k/cpu/mcf547x_8x/cpu.c                            | 1 +
>  arch/m68k/cpu/mcf547x_8x/cpu_init.c                       | 1 +
>  arch/m68k/cpu/mcf547x_8x/slicetimer.c                     | 1 +
>  arch/m68k/lib/time.c                                      | 1 +
>  arch/microblaze/cpu/timer.c                               | 1 +
>  arch/mips/cpu/cpu.c                                       | 1 +
>  arch/mips/lib/stack.c                                     | 1 +
>  arch/mips/mach-ath79/cpu.c                                | 1 +
>  arch/mips/mach-bmips/dram.c                               | 1 +
>  arch/mips/mach-jz47xx/jz4780/sdram.c                      | 1 +
>  arch/mips/mach-jz47xx/jz4780/timer.c                      | 1 +
>  arch/mips/mach-mscc/cpu.c                                 | 1 +
>  arch/mips/mach-mscc/dram.c                                | 1 +
>  arch/mips/mach-mtmips/cpu.c                               | 1 +
>  arch/mips/mach-mtmips/spl.c                               | 1 +
>  arch/mips/mach-pic32/cpu.c                                | 1 +
>  arch/nds32/cpu/n1213/ag101/timer.c                        | 1 +
>  arch/nios2/cpu/cpu.c                                      | 1 +
>  arch/powerpc/cpu/mpc83xx/pci.c                            | 1 +
>  arch/powerpc/cpu/mpc85xx/cmd_errata.c                     | 1 +
>  arch/powerpc/cpu/mpc85xx/cpu.c                            | 1 +
>  arch/powerpc/cpu/mpc86xx/cpu_init.c                       | 1 +
>  arch/powerpc/cpu/mpc8xx/cpu_init.c                        | 1 +
>  arch/powerpc/cpu/mpc8xxx/cpu.c                            | 1 +
>  arch/powerpc/cpu/mpc8xxx/fsl_lbc.c                        | 1 +
>  arch/powerpc/lib/stack.c                                  | 1 +
>  arch/powerpc/lib/time.c                                   | 1 +
>  arch/riscv/cpu/cpu.c                                      | 1 +
>  arch/riscv/lib/spl.c                                      | 1 +
>  arch/sandbox/cpu/spl.c                                    | 1 +
>  arch/sandbox/cpu/start.c                                  | 1 +
>  arch/sh/lib/time.c                                        | 1 +
>  arch/sh/lib/time_sh2.c                                    | 1 +
>  arch/x86/cpu/apollolake/cpu_spl.c                         | 1 +
>  arch/x86/cpu/apollolake/fsp_s.c                           | 1 +
>  arch/x86/cpu/braswell/braswell.c                          | 1 +
>  arch/x86/cpu/broadwell/cpu.c                              | 1 +
>  arch/x86/cpu/broadwell/cpu_from_spl.c                     | 1 +
>  arch/x86/cpu/broadwell/cpu_full.c                         | 1 +
>  arch/x86/cpu/broadwell/refcode.c                          | 1 +
>  arch/x86/cpu/coreboot/coreboot.c                          | 1 +
>  arch/x86/cpu/efi/app.c                                    | 1 +
>  arch/x86/cpu/intel_common/cpu_from_spl.c                  | 1 +
>  arch/x86/cpu/ivybridge/cpu.c                              | 1 +
>  arch/x86/cpu/ivybridge/ivybridge.c                        | 1 +
>  arch/x86/cpu/ivybridge/sdram_nop.c                        | 1 +
>  arch/x86/cpu/qemu/qemu.c                                  | 1 +
>  arch/x86/cpu/quark/quark.c                                | 1 +
>  arch/x86/cpu/queensbay/tnc.c                              | 1 +
>  arch/x86/cpu/slimbootloader/slimbootloader.c              | 1 +
>  arch/x86/cpu/tangier/tangier.c                            | 1 +
>  arch/x86/cpu/x86_64/cpu.c                                 | 1 +
>  arch/x86/lib/fsp/fsp_common.c                             | 1 +
>  arch/x86/lib/fsp/fsp_graphics.c                           | 1 +
>  arch/x86/lib/fsp1/fsp_common.c                            | 1 +
>  arch/x86/lib/fsp1/fsp_dram.c                              | 1 +
>  arch/x86/lib/fsp2/fsp_dram.c                              | 1 +
>  arch/x86/lib/spl.c                                        | 1 +
>  arch/x86/lib/tpl.c                                        | 1 +
>  arch/xtensa/cpu/cpu.c                                     | 1 +
>  board/BuR/brppt2/board.c                                  | 1 +
>  board/LaCie/net2big_v2/net2big_v2.c                       | 1 +
>  board/LaCie/netspace_v2/netspace_v2.c                     | 1 +
>  board/Marvell/aspenite/aspenite.c                         | 1 +
>  board/Marvell/db-88f6281-bp/db-88f6281-bp.c               | 1 +
>  board/Marvell/db-88f6720/db-88f6720.c                     | 1 +
>  board/Marvell/db-88f6820-amc/db-88f6820-amc.c             | 1 +
>  board/Marvell/db-88f6820-gp/db-88f6820-gp.c               | 1 +
>  board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c               | 1 +
>  board/Marvell/db-xc3-24g4xg/db-xc3-24g4xg.c               | 1 +
>  board/Marvell/dreamplug/dreamplug.c                       | 1 +
>  board/Marvell/gplugd/gplugd.c                             | 1 +
>  board/Marvell/guruplug/guruplug.c                         | 1 +
>  board/Marvell/mvebu_armada-37xx/board.c                   | 1 +
>  board/Marvell/openrd/openrd.c                             | 1 +
>  board/Marvell/sheevaplug/sheevaplug.c                     | 1 +
>  board/Seagate/dockstar/dockstar.c                         | 1 +
>  board/Seagate/goflexhome/goflexhome.c                     | 1 +
>  board/Seagate/nas220/nas220.c                             | 1 +
>  board/Synology/ds109/ds109.c                              | 1 +
>  board/Synology/ds414/ds414.c                              | 1 +
>  board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c     | 1 +
>  board/advantech/imx8qm_rom7720_a1/spl.c                   | 1 +
>  board/advantech/som-db5800-som-6867/som-db5800-som-6867.c | 1 +
>  board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c               | 1 +
>  board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c           | 1 +
>  board/alliedtelesis/x530/x530.c                           | 1 +
>  board/amazon/kc1/kc1.c                                    | 1 +
>  board/amlogic/p200/p200.c                                 | 1 +
>  board/amlogic/p201/p201.c                                 | 1 +
>  board/amlogic/p212/p212.c                                 | 1 +
>  board/amlogic/q200/q200.c                                 | 1 +
>  board/amlogic/s400/s400.c                                 | 1 +
>  board/amlogic/sei510/sei510.c                             | 1 +
>  board/amlogic/sei610/sei610.c                             | 1 +
>  board/amlogic/u200/u200.c                                 | 1 +
>  board/amlogic/w400/w400.c                                 | 1 +
>  board/aristainetos/aristainetos.c                         | 1 +
>  board/armltd/vexpress64/pcie.c                            | 1 +
>  board/armltd/vexpress64/vexpress64.c                      | 1 +
>  board/atmel/at91sam9260ek/led.c                           | 1 +
>  board/atmel/common/video_display.c                        | 1 +
>  board/bachmann/ot1200/ot1200.c                            | 1 +
>  board/bachmann/ot1200/ot1200_spl.c                        | 1 +
>  board/barco/platinum/spl_picon.c                          | 1 +
>  board/barco/platinum/spl_titanium.c                       | 1 +
>  board/bluegiga/apx4devkit/apx4devkit.c                    | 1 +
>  board/bosch/guardian/board.c                              | 1 +
>  board/boundary/nitrogen6x/nitrogen6x.c                    | 1 +
>  board/broadcom/bcm963158/bcm963158.c                      | 1 +
>  board/broadcom/bcm968360bg/bcm968360bg.c                  | 1 +
>  board/broadcom/bcm968580xref/bcm968580xref.c              | 1 +
>  board/bticino/mamoj/mamoj.c                               | 1 +
>  board/bticino/mamoj/spl.c                                 | 1 +
>  board/buffalo/lsxl/lsxl.c                                 | 1 +
>  board/ccv/xpress/spl.c                                    | 1 +
>  board/cirrus/edb93xx/edb93xx.c                            | 1 +
>  board/cloudengines/pogo_e02/pogo_e02.c                    | 1 +
>  board/compulab/cm_t35/cm_t35.c                            | 1 +
>  board/corscience/tricorder/tricorder.c                    | 1 +
>  board/cortina/presidio-asic/presidio.c                    | 1 +
>  board/creative/xfi3/xfi3.c                                | 1 +
>  board/d-link/dns325/dns325.c                              | 1 +
>  board/davinci/da8xxevm/da850evm.c                         | 1 +
>  board/davinci/da8xxevm/omapl138_lcdk.c                    | 1 +
>  board/dhelectronics/dh_imx6/dh_imx6_spl.c                 | 1 +
>  board/ea/mx7ulp_com/mx7ulp_com.c                          | 1 +
>  board/elgin/elgin_rv1108/elgin_rv1108.c                   | 1 +
>  board/emulation/qemu-arm/qemu-arm.c                       | 1 +
>  board/engicam/common/spl.c                                | 1 +
>  board/freescale/b4860qds/ddr.c                            | 1 +
>  board/freescale/bsc9131rdb/bsc9131rdb.c                   | 1 +
>  board/freescale/common/sys_eeprom.c                       | 1 +
>  board/freescale/corenet_ds/ddr.c                          | 1 +
>  board/freescale/imx8mm_evk/imx8mm_evk.c                   | 1 +
>  board/freescale/imx8mm_evk/spl.c                          | 1 +
>  board/freescale/imx8mn_evk/imx8mn_evk.c                   | 1 +
>  board/freescale/imx8mn_evk/spl.c                          | 1 +
>  board/freescale/imx8mp_evk/imx8mp_evk.c                   | 1 +
>  board/freescale/imx8mp_evk/spl.c                          | 1 +
>  board/freescale/imx8mq_evk/spl.c                          | 1 +
>  board/freescale/imx8qm_mek/spl.c                          | 1 +
>  board/freescale/imx8qxp_mek/spl.c                         | 1 +
>  board/freescale/imxrt1050-evk/imxrt1050-evk.c             | 1 +
>  board/freescale/ls1012afrdm/ls1012afrdm.c                 | 1 +
>  board/freescale/ls1012aqds/ls1012aqds.c                   | 1 +
>  board/freescale/ls1012ardb/ls1012ardb.c                   | 1 +
>  board/freescale/ls1021aqds/ddr.c                          | 1 +
>  board/freescale/ls1028a/ls1028a.c                         | 1 +
>  board/freescale/ls1043aqds/ls1043aqds.c                   | 1 +
>  board/freescale/ls1043ardb/ls1043ardb.c                   | 1 +
>  board/freescale/ls1046afrwy/ls1046afrwy.c                 | 1 +
>  board/freescale/ls1046aqds/ls1046aqds.c                   | 1 +
>  board/freescale/ls1046ardb/ls1046ardb.c                   | 1 +
>  board/freescale/ls1088a/ls1088a.c                         | 1 +
>  board/freescale/ls2080a/ls2080a.c                         | 1 +
>  board/freescale/ls2080aqds/ls2080aqds.c                   | 1 +
>  board/freescale/ls2080ardb/ls2080ardb.c                   | 1 +
>  board/freescale/lx2160a/lx2160a.c                         | 1 +
>  board/freescale/m5253demo/flash.c                         | 1 +
>  board/freescale/m5282evb/m5282evb.c                       | 1 +
>  board/freescale/mpc8313erdb/sdram.c                       | 1 +
>  board/freescale/mpc8315erdb/sdram.c                       | 1 +
>  board/freescale/mpc8349emds/mpc8349emds.c                 | 1 +
>  board/freescale/mpc8349itx/mpc8349itx.c                   | 1 +
>  board/freescale/mx23evk/mx23evk.c                         | 1 +
>  board/freescale/mx28evk/mx28evk.c                         | 1 +
>  board/freescale/mx6memcal/mx6memcal.c                     | 1 +
>  board/freescale/mx6memcal/spl.c                           | 1 +
>  board/freescale/mx6qarm2/mx6qarm2.c                       | 1 +
>  board/freescale/mx6slevk/mx6slevk.c                       | 1 +
>  board/freescale/mx7ulp_evk/mx7ulp_evk.c                   | 1 +
>  board/freescale/p2041rdb/ddr.c                            | 1 +
>  board/freescale/t102xqds/ddr.c                            | 1 +
>  board/freescale/t102xrdb/ddr.c                            | 1 +
>  board/freescale/t1040qds/ddr.c                            | 1 +
>  board/freescale/t104xrdb/ddr.c                            | 1 +
>  board/freescale/t208xqds/ddr.c                            | 1 +
>  board/freescale/t208xrdb/ddr.c                            | 1 +
>  board/freescale/t4qds/ddr.c                               | 1 +
>  board/freescale/t4rdb/ddr.c                               | 1 +
>  board/gateworks/gw_ventana/gw_ventana.c                   | 1 +
>  board/gateworks/gw_ventana/gw_ventana_spl.c               | 1 +
>  board/google/gru/gru.c                                    | 1 +
>  board/google/veyron/veyron.c                              | 1 +
>  board/gumstix/duovero/duovero.c                           | 1 +
>  board/gumstix/pepper/board.c                              | 1 +
>  board/highbank/highbank.c                                 | 1 +
>  board/hisilicon/hikey/hikey.c                             | 1 +
>  board/hisilicon/hikey960/hikey960.c                       | 1 +
>  board/imgtec/boston/checkboard.c                          | 1 +
>  board/imgtec/ci20/ci20.c                                  | 1 +
>  board/imgtec/xilfpga/xilfpga.c                            | 1 +
>  board/intel/cougarcanyon2/cougarcanyon2.c                 | 1 +
>  board/intel/crownbay/crownbay.c                           | 1 +
>  board/intel/minnowmax/minnowmax.c                         | 1 +
>  board/iomega/iconnect/iconnect.c                          | 1 +
>  board/isee/igep00x0/igep00x0.c                            | 1 +
>  board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c                 | 1 +
>  board/keymile/kmp204x/ddr.c                               | 1 +
>  board/kmc/kzm9g/kzm9g.c                                   | 1 +
>  board/kobol/helios4/helios4.c                             | 1 +
>  board/lego/ev3/legoev3.c                                  | 1 +
>  board/lg/sniper/sniper.c                                  | 1 +
>  board/liebherr/display5/display5.c                        | 1 +
>  board/liebherr/display5/spl.c                             | 1 +
>  board/liebherr/mccmon6/spl.c                              | 1 +
>  board/liebherr/xea/xea.c                                  | 1 +
>  board/logicpd/am3517evm/am3517evm.c                       | 1 +
>  board/logicpd/zoom1/zoom1.c                               | 1 +
>  board/maxbcm/maxbcm.c                                     | 1 +
>  board/mediatek/mt7622/mt7622_rfb.c                        | 1 +
>  board/mediatek/mt8518/mt8518_ap1.c                        | 1 +
>  board/microchip/mpfs_icicle/mpfs_icicle.c                 | 1 +
>  board/microchip/pic32mzda/pic32mzda.c                     | 1 +
>  board/mikrotik/crs305-1g-4s/crs305-1g-4s.c                | 1 +
>  board/netgear/dgnd3700v2/dgnd3700v2.c                     | 1 +
>  board/nokia/rx51/rx51.c                                   | 1 +
>  board/novtech/meerkat96/meerkat96.c                       | 1 +
>  board/olimex/mx23_olinuxino/mx23_olinuxino.c              | 1 +
>  board/overo/overo.c                                       | 1 +
>  board/pandora/pandora.c                                   | 1 +
>  board/phytec/pcl063/spl.c                                 | 1 +
>  board/phytec/pcm051/board.c                               | 1 +
>  board/phytium/durian/durian.c                             | 1 +
>  board/pine64/rockpro64_rk3399/rockpro64-rk3399.c          | 1 +
>  board/ppcag/bg0900/bg0900.c                               | 1 +
>  board/qca/ap121/ap121.c                                   | 1 +
>  board/qca/ap143/ap143.c                                   | 1 +
>  board/qca/ap152/ap152.c                                   | 1 +
>  board/qemu-mips/qemu-mips.c                               | 1 +
>  board/qualcomm/dragonboard820c/dragonboard820c.c          | 1 +
>  board/raidsonic/ib62x0/ib62x0.c                           | 1 +
>  board/renesas/MigoR/migo_r.c                              | 1 +
>  board/renesas/alt/alt.c                                   | 1 +
>  board/renesas/alt/alt_spl.c                               | 1 +
>  board/renesas/blanche/blanche.c                           | 1 +
>  board/renesas/condor/condor.c                             | 1 +
>  board/renesas/draak/draak.c                               | 1 +
>  board/renesas/eagle/eagle.c                               | 1 +
>  board/renesas/ebisu/ebisu.c                               | 1 +
>  board/renesas/gose/gose.c                                 | 1 +
>  board/renesas/gose/gose_spl.c                             | 1 +
>  board/renesas/grpeach/grpeach.c                           | 1 +
>  board/renesas/koelsch/koelsch.c                           | 1 +
>  board/renesas/koelsch/koelsch_spl.c                       | 1 +
>  board/renesas/lager/lager.c                               | 1 +
>  board/renesas/lager/lager_spl.c                           | 1 +
>  board/renesas/porter/porter.c                             | 1 +
>  board/renesas/porter/porter_spl.c                         | 1 +
>  board/renesas/rcar-common/common.c                        | 1 +
>  board/renesas/rcar-common/gen3-spl.c                      | 1 +
>  board/renesas/salvator-x/salvator-x.c                     | 1 +
>  board/renesas/sh7763rdp/sh7763rdp.c                       | 1 +
>  board/renesas/silk/silk.c                                 | 1 +
>  board/renesas/silk/silk_spl.c                             | 1 +
>  board/renesas/stout/stout.c                               | 1 +
>  board/renesas/stout/stout_spl.c                           | 1 +
>  board/renesas/ulcb/ulcb.c                                 | 1 +
>  board/rockchip/evb_rk3399/evb-rk3399.c                    | 1 +
>  board/rockchip/evb_rv1108/evb_rv1108.c                    | 1 +
>  board/samsung/goni/goni.c                                 | 1 +
>  board/sandisk/sansa_fuze_plus/sfp.c                       | 1 +
>  board/sbc8349/sbc8349.c                                   | 1 +
>  board/schulercontrol/sc_sps_1/sc_sps_1.c                  | 1 +
>  board/seeed/linkit-smart-7688/board.c                     | 1 +
>  board/siemens/capricorn/board.c                           | 1 +
>  board/siemens/capricorn/spl.c                             | 1 +
>  board/siemens/common/board.c                              | 1 +
>  board/sifive/fu540/fu540.c                                | 1 +
>  board/silica/pengwyn/board.c                              | 1 +
>  board/sks-kinkel/sksimx6/sksimx6.c                        | 1 +
>  board/socrates/socrates.c                                 | 1 +
>  board/solidrun/clearfog/clearfog.c                        | 1 +
>  board/sr1500/socfpga.c                                    | 1 +
>  board/st/stih410-b2260/board.c                            | 1 +
>  board/st/stm32f429-discovery/stm32f429-discovery.c        | 1 +
>  board/st/stm32f429-evaluation/stm32f429-evaluation.c      | 1 +
>  board/st/stm32f469-discovery/stm32f469-discovery.c        | 1 +
>  board/st/stv0991/stv0991.c                                | 1 +
>  board/ste/stemmy/stemmy.c                                 | 1 +
>  board/sunxi/dram_sun4i_auto.c                             | 1 +
>  board/sunxi/dram_sun5i_auto.c                             | 1 +
>  board/synopsys/axs10x/axs10x.c                            | 1 +
>  board/synopsys/emsdp/emsdp.c                              | 1 +
>  board/synopsys/iot_devkit/iot_devkit.c                    | 1 +
>  board/synopsys/nsim/nsim.c                                | 1 +
>  board/tbs/tbs2910/tbs2910.c                               | 1 +
>  board/technexion/pico-imx6/pico-imx6.c                    | 1 +
>  board/technexion/pico-imx6/spl.c                          | 1 +
>  board/technexion/pico-imx6ul/pico-imx6ul.c                | 1 +
>  board/technexion/pico-imx7d/spl.c                         | 1 +
>  board/technexion/tao3530/tao3530.c                        | 1 +
>  board/technologic/ts4600/ts4600.c                         | 1 +
>  board/theobroma-systems/puma_rk3399/puma-rk3399.c         | 1 +
>  board/ti/am3517crane/am3517crane.c                        | 1 +
>  board/ti/beagle/beagle.c                                  | 1 +
>  board/ti/evm/evm.c                                        | 1 +
>  board/ti/ks2_evm/board_k2e.c                              | 1 +
>  board/ti/ks2_evm/board_k2hk.c                             | 1 +
>  board/ti/ks2_evm/board_k2l.c                              | 1 +
>  board/ti/omap5_uevm/evm.c                                 | 1 +
>  board/ti/panda/panda.c                                    | 1 +
>  board/ti/sdp4430/sdp.c                                    | 1 +
>  board/ti/ti814x/evm.c                                     | 1 +
>  board/ti/ti816x/evm.c                                     | 1 +
>  board/timll/devkit8000/devkit8000.c                       | 1 +
>  board/toradex/apalis-tk1/apalis-tk1.c                     | 1 +
>  board/toradex/apalis_t30/apalis_t30.c                     | 1 +
>  board/toradex/colibri_pxa270/colibri_pxa270.c             | 1 +
>  board/toradex/colibri_t20/colibri_t20.c                   | 1 +
>  board/toradex/colibri_t30/colibri_t30.c                   | 1 +
>  board/toradex/common/tdx-common.c                         | 1 +
>  board/toradex/verdin-imx8mm/spl.c                         | 1 +
>  board/toradex/verdin-imx8mm/verdin-imx8mm.c               | 1 +
>  board/tplink/wdr4300/wdr4300.c                            | 1 +
>  board/udoo/udoo_spl.c                                     | 1 +
>  board/variscite/dart_6ul/dart_6ul.c                       | 1 +
>  board/variscite/dart_6ul/spl.c                            | 1 +
>  board/varisys/cyrus/ddr.c                                 | 1 +
>  board/wandboard/spl.c                                     | 1 +
>  board/xes/common/board.c                                  | 1 +
>  board/xilinx/zynqmp_r5/board.c                            | 1 +
>  board/zyxel/nsa310s/nsa310s.c                             | 1 +
>  cmd/pci.c                                                 | 1 +
>  cmd/tlv_eeprom.c                                          | 1 +
>  common/board_info.c                                       | 1 +
>  common/init/board_init.c                                  | 1 +
>  common/lcd.c                                              | 1 +
>  common/spl/spl.c                                          | 1 +
>  drivers/clk/clk_stm32mp1.c                                | 1 +
>  drivers/cpu/bmips_cpu.c                                   | 1 +
>  drivers/ddr/altera/sdram_arria10.c                        | 1 +
>  drivers/ddr/altera/sdram_soc64.c                          | 1 +
>  drivers/ddr/fsl/main.c                                    | 1 +
>  drivers/dma/lpc32xx_dma.c                                 | 1 +
>  drivers/fpga/fpga.c                                       | 1 +
>  drivers/mtd/cfi_flash.c                                   | 1 +
>  drivers/mtd/pic32_flash.c                                 | 1 +
>  drivers/pci/fsl_pci_init.c                                | 1 +
>  drivers/pci/pci-uclass.c                                  | 1 +
>  drivers/pci/pci_ftpci100.c                                | 1 +
>  drivers/pci/pci_gt64120.c                                 | 1 +
>  drivers/pci/pci_msc01.c                                   | 1 +
>  drivers/pci/pcie_layerscape_fixup.c                       | 1 +
>  drivers/pci/pcie_layerscape_fixup_common.c                | 1 +
>  drivers/ram/imxrt_sdram.c                                 | 1 +
>  drivers/ram/rockchip/sdram_px30.c                         | 1 +
>  drivers/ram/rockchip/sdram_rk3188.c                       | 1 +
>  drivers/ram/rockchip/sdram_rk322x.c                       | 1 +
>  drivers/ram/rockchip/sdram_rk3288.c                       | 1 +
>  drivers/ram/rockchip/sdram_rk3328.c                       | 1 +
>  drivers/ram/rockchip/sdram_rk3399.c                       | 1 +
>  drivers/ram/stm32_sdram.c                                 | 1 +
>  drivers/timer/cadence-ttc.c                               | 1 +
>  drivers/timer/rockchip_timer.c                            | 1 +
>  drivers/timer/timer-uclass.c                              | 1 +
>  drivers/usb/gadget/f_thor.c                               | 1 +
>  drivers/usb/host/ehci-pci.c                               | 1 +
>  drivers/usb/host/ohci-lpc32xx.c                           | 1 +
>  drivers/usb/host/xhci-pci.c                               | 1 +
>  fs/ubifs/io.c                                             | 1 +
>  include/common.h                                          | 1 -
>  lib/efi/efi_app.c                                         | 1 +
>  lib/time.c                                                | 1 +
>  535 files changed, 535 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arc/lib/cpu.c b/arch/arc/lib/cpu.c
> index 83246550ec..f032f3e2f2 100644
> --- a/arch/arc/lib/cpu.c
> +++ b/arch/arc/lib/cpu.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <vsprintf.h>
>  #include <asm/arcregs.h>
> diff --git a/arch/arc/lib/init_helpers.c b/arch/arc/lib/init_helpers.c
> index c853f25d34..023eae1907 100644
> --- a/arch/arc/lib/init_helpers.c
> +++ b/arch/arc/lib/init_helpers.c
> @@ -3,6 +3,7 @@
>   * Copyright (C) 2013-2015 Synopsys, Inc. All rights reserved.
>   */
>
> +#include <init.h>
>  #include <asm/cache.h>
>  #include <common.h>
>
> diff --git a/arch/arm/cpu/arm1136/mx31/generic.c b/arch/arm/cpu/arm1136/mx31/generic.c
> index 3f6af6f5a3..a3d4f14796 100644
> --- a/arch/arm/cpu/arm1136/mx31/generic.c
> +++ b/arch/arm/cpu/arm1136/mx31/generic.c
> @@ -6,6 +6,7 @@
>
>  #include <common.h>
>  #include <div64.h>
> +#include <init.h>
>  #include <asm/arch/imx-regs.h>
>  #include <asm/arch/clock.h>
>  #include <asm/io.h>
> diff --git a/arch/arm/cpu/arm1136/mx31/timer.c b/arch/arm/cpu/arm1136/mx31/timer.c
> index 3d07ee6809..a913860491 100644
> --- a/arch/arm/cpu/arm1136/mx31/timer.c
> +++ b/arch/arm/cpu/arm1136/mx31/timer.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/arch/imx-regs.h>
>  #include <asm/io.h>
>
> diff --git a/arch/arm/cpu/arm1136/mx35/generic.c b/arch/arm/cpu/arm1136/mx35/generic.c
> index c78f2cbfc9..4c45810fbe 100644
> --- a/arch/arm/cpu/arm1136/mx35/generic.c
> +++ b/arch/arm/cpu/arm1136/mx35/generic.c
> @@ -9,6 +9,7 @@
>  #include <common.h>
>  #include <clock_legacy.h>
>  #include <div64.h>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/io.h>
>  #include <linux/errno.h>
> diff --git a/arch/arm/cpu/arm1136/mx35/timer.c b/arch/arm/cpu/arm1136/mx35/timer.c
> index c1cdf35fb2..cb351ecf76 100644
> --- a/arch/arm/cpu/arm1136/mx35/timer.c
> +++ b/arch/arm/cpu/arm1136/mx35/timer.c
> @@ -7,6 +7,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/imx-regs.h>
>  #include <asm/arch/crm_regs.h>
> diff --git a/arch/arm/cpu/arm920t/ep93xx/timer.c b/arch/arm/cpu/arm920t/ep93xx/timer.c
> index 4829c996be..0ee6034220 100644
> --- a/arch/arm/cpu/arm920t/ep93xx/timer.c
> +++ b/arch/arm/cpu/arm920t/ep93xx/timer.c
> @@ -12,6 +12,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <time.h>
>  #include <linux/types.h>
>  #include <asm/arch/ep93xx.h>
> diff --git a/arch/arm/cpu/arm926ejs/armada100/cpu.c b/arch/arm/cpu/arm926ejs/armada100/cpu.c
> index 0c81de7e36..96726b3144 100644
> --- a/arch/arm/cpu/arm926ejs/armada100/cpu.c
> +++ b/arch/arm/cpu/arm926ejs/armada100/cpu.c
> @@ -8,6 +8,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <asm/arch/cpu.h>
>  #include <asm/arch/armada100.h>
>
> diff --git a/arch/arm/cpu/arm926ejs/armada100/dram.c b/arch/arm/cpu/arm926ejs/armada100/dram.c
> index f4e1f0db09..da0615faf1 100644
> --- a/arch/arm/cpu/arm926ejs/armada100/dram.c
> +++ b/arch/arm/cpu/arm926ejs/armada100/dram.c
> @@ -7,6 +7,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/armada100.h>
>
> diff --git a/arch/arm/cpu/arm926ejs/armada100/timer.c b/arch/arm/cpu/arm926ejs/armada100/timer.c
> index f4962ec45f..b9941fcb2f 100644
> --- a/arch/arm/cpu/arm926ejs/armada100/timer.c
> +++ b/arch/arm/cpu/arm926ejs/armada100/timer.c
> @@ -8,6 +8,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <time.h>
>  #include <asm/arch/cpu.h>
>  #include <asm/arch/armada100.h>
> diff --git a/arch/arm/cpu/arm926ejs/lpc32xx/cpu.c b/arch/arm/cpu/arm926ejs/lpc32xx/cpu.c
> index 2bc3513abf..ee15a9453d 100644
> --- a/arch/arm/cpu/arm926ejs/lpc32xx/cpu.c
> +++ b/arch/arm/cpu/arm926ejs/lpc32xx/cpu.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <net.h>
>  #include <netdev.h>
>  #include <asm/arch/cpu.h>
> diff --git a/arch/arm/cpu/arm926ejs/lpc32xx/timer.c b/arch/arm/cpu/arm926ejs/lpc32xx/timer.c
> index 3a896d10ca..46b7b46659 100644
> --- a/arch/arm/cpu/arm926ejs/lpc32xx/timer.c
> +++ b/arch/arm/cpu/arm926ejs/lpc32xx/timer.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <time.h>
>  #include <asm/arch/cpu.h>
>  #include <asm/arch/clk.h>
> diff --git a/arch/arm/cpu/arm926ejs/mx25/generic.c b/arch/arm/cpu/arm926ejs/mx25/generic.c
> index ef8d2d202d..8f6cd4dc19 100644
> --- a/arch/arm/cpu/arm926ejs/mx25/generic.c
> +++ b/arch/arm/cpu/arm926ejs/mx25/generic.c
> @@ -11,6 +11,7 @@
>  #include <common.h>
>  #include <clock_legacy.h>
>  #include <div64.h>
> +#include <init.h>
>  #include <net.h>
>  #include <netdev.h>
>  #include <vsprintf.h>
> diff --git a/arch/arm/cpu/arm926ejs/mx25/timer.c b/arch/arm/cpu/arm926ejs/mx25/timer.c
> index 04698fe563..7e2698b605 100644
> --- a/arch/arm/cpu/arm926ejs/mx25/timer.c
> +++ b/arch/arm/cpu/arm926ejs/mx25/timer.c
> @@ -20,6 +20,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/imx-regs.h>
>
> diff --git a/arch/arm/cpu/arm926ejs/mx27/timer.c b/arch/arm/cpu/arm926ejs/mx27/timer.c
> index f51f0df8ec..193588ea10 100644
> --- a/arch/arm/cpu/arm926ejs/mx27/timer.c
> +++ b/arch/arm/cpu/arm926ejs/mx27/timer.c
> @@ -17,6 +17,7 @@
>
>  #include <common.h>
>  #include <div64.h>
> +#include <init.h>
>  #include <time.h>
>  #include <asm/io.h>
>  #include <asm/arch/imx-regs.h>
> diff --git a/arch/arm/cpu/arm926ejs/mxs/mxs.c b/arch/arm/cpu/arm926ejs/mxs/mxs.c
> index f65053c4b6..72988417ac 100644
> --- a/arch/arm/cpu/arm926ejs/mxs/mxs.c
> +++ b/arch/arm/cpu/arm926ejs/mxs/mxs.c
> @@ -12,6 +12,7 @@
>  #include <common.h>
>  #include <cpu_func.h>
>  #include <hang.h>
> +#include <init.h>
>  #include <net.h>
>  #include <linux/errno.h>
>  #include <asm/io.h>
> diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
> index 9168b91f27..83dd8b625e 100644
> --- a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
> +++ b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
> @@ -8,6 +8,7 @@
>
>  #include <common.h>
>  #include <config.h>
> +#include <init.h>
>  #include <serial.h>
>  #include <asm/io.h>
>  #include <asm/arch/imx-regs.h>
> diff --git a/arch/arm/cpu/arm926ejs/mxs/timer.c b/arch/arm/cpu/arm926ejs/mxs/timer.c
> index 226401dd6e..b6fdc88be7 100644
> --- a/arch/arm/cpu/arm926ejs/mxs/timer.c
> +++ b/arch/arm/cpu/arm926ejs/mxs/timer.c
> @@ -10,6 +10,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <time.h>
>  #include <asm/io.h>
>  #include <asm/arch/imx-regs.h>
> diff --git a/arch/arm/cpu/arm926ejs/spear/cpu.c b/arch/arm/cpu/arm926ejs/spear/cpu.c
> index 51c4a730f4..f5192240e4 100644
> --- a/arch/arm/cpu/arm926ejs/spear/cpu.c
> +++ b/arch/arm/cpu/arm926ejs/spear/cpu.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/hardware.h>
>  #include <asm/arch/spr_misc.h>
> diff --git a/arch/arm/cpu/arm926ejs/spear/spl.c b/arch/arm/cpu/arm926ejs/spear/spl.c
> index a919a455eb..7b14ba05b4 100644
> --- a/arch/arm/cpu/arm926ejs/spear/spl.c
> +++ b/arch/arm/cpu/arm926ejs/spear/spl.c
> @@ -7,6 +7,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <spl.h>
>  #include <version.h>
>  #include <asm/io.h>
> diff --git a/arch/arm/cpu/arm926ejs/spear/timer.c b/arch/arm/cpu/arm926ejs/spear/timer.c
> index 28c09e9fd6..9db1c74b36 100644
> --- a/arch/arm/cpu/arm926ejs/spear/timer.c
> +++ b/arch/arm/cpu/arm926ejs/spear/timer.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <time.h>
>  #include <asm/io.h>
>  #include <asm/arch/hardware.h>
> diff --git a/arch/arm/cpu/armv7/arch_timer.c b/arch/arm/cpu/armv7/arch_timer.c
> index 2eb571050a..871629c233 100644
> --- a/arch/arm/cpu/armv7/arch_timer.c
> +++ b/arch/arm/cpu/armv7/arch_timer.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <time.h>
>  #include <asm/io.h>
>  #include <div64.h>
> diff --git a/arch/arm/cpu/armv7/iproc-common/timer.c b/arch/arm/cpu/armv7/iproc-common/timer.c
> index 668b5e11a6..5c109764e9 100644
> --- a/arch/arm/cpu/armv7/iproc-common/timer.c
> +++ b/arch/arm/cpu/armv7/iproc-common/timer.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <div64.h>
> +#include <init.h>
>  #include <time.h>
>  #include <asm/io.h>
>  #include <asm/iproc-common/timer.h>
> diff --git a/arch/arm/cpu/armv7/ls102xa/cpu.c b/arch/arm/cpu/armv7/ls102xa/cpu.c
> index c544f38641..e9464ee7e4 100644
> --- a/arch/arm/cpu/armv7/ls102xa/cpu.c
> +++ b/arch/arm/cpu/armv7/ls102xa/cpu.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <net.h>
>  #include <vsprintf.h>
>  #include <asm/arch/clock.h>
> diff --git a/arch/arm/cpu/armv7/ls102xa/timer.c b/arch/arm/cpu/armv7/ls102xa/timer.c
> index a5f4e31ac7..46ade4ae86 100644
> --- a/arch/arm/cpu/armv7/ls102xa/timer.c
> +++ b/arch/arm/cpu/armv7/ls102xa/timer.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <time.h>
>  #include <asm/io.h>
>  #include <div64.h>
> diff --git a/arch/arm/cpu/armv7/s5p-common/cpu_info.c b/arch/arm/cpu/armv7/s5p-common/cpu_info.c
> index 5f4076d6b7..7790f087a0 100644
> --- a/arch/arm/cpu/armv7/s5p-common/cpu_info.c
> +++ b/arch/arm/cpu/armv7/s5p-common/cpu_info.c
> @@ -5,6 +5,7 @@
>   */
>  #include <common.h>
>  #include <fdtdec.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/clk.h>
>
> diff --git a/arch/arm/cpu/armv7/s5p-common/timer.c b/arch/arm/cpu/armv7/s5p-common/timer.c
> index e54cfb06dc..d2b5b4d3fc 100644
> --- a/arch/arm/cpu/armv7/s5p-common/timer.c
> +++ b/arch/arm/cpu/armv7/s5p-common/timer.c
> @@ -8,6 +8,7 @@
>
>  #include <common.h>
>  #include <div64.h>
> +#include <init.h>
>  #include <time.h>
>  #include <asm/io.h>
>  #include <asm/arch/pwm.h>
> diff --git a/arch/arm/cpu/armv7/stv0991/timer.c b/arch/arm/cpu/armv7/stv0991/timer.c
> index 695bdd7a5c..5adccab012 100644
> --- a/arch/arm/cpu/armv7/stv0991/timer.c
> +++ b/arch/arm/cpu/armv7/stv0991/timer.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <time.h>
>  #include <asm/io.h>
>  #include <asm/arch-stv0991/hardware.h>
> diff --git a/arch/arm/cpu/armv7/sunxi/timer.c b/arch/arm/cpu/armv7/sunxi/timer.c
> index 6bda5fbbb6..4f6a66d803 100644
> --- a/arch/arm/cpu/armv7/sunxi/timer.c
> +++ b/arch/arm/cpu/armv7/sunxi/timer.c
> @@ -6,6 +6,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <time.h>
>  #include <asm/io.h>
>  #include <asm/arch/timer.h>
> diff --git a/arch/arm/cpu/armv7/vf610/generic.c b/arch/arm/cpu/armv7/vf610/generic.c
> index c1ba69893f..da43e34394 100644
> --- a/arch/arm/cpu/armv7/vf610/generic.c
> +++ b/arch/arm/cpu/armv7/vf610/generic.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <clock_legacy.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/cache.h>
>  #include <asm/io.h>
> diff --git a/arch/arm/cpu/armv7/vf610/timer.c b/arch/arm/cpu/armv7/vf610/timer.c
> index f858de953d..229e9e959e 100644
> --- a/arch/arm/cpu/armv7/vf610/timer.c
> +++ b/arch/arm/cpu/armv7/vf610/timer.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <time.h>
>  #include <asm/io.h>
>  #include <div64.h>
> diff --git a/arch/arm/cpu/armv7m/systick-timer.c b/arch/arm/cpu/armv7m/systick-timer.c
> index 5c310d306d..dbe1b61977 100644
> --- a/arch/arm/cpu/armv7m/systick-timer.c
> +++ b/arch/arm/cpu/armv7m/systick-timer.c
> @@ -22,6 +22,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <time.h>
>  #include <asm/io.h>
>
> diff --git a/arch/arm/cpu/armv8/fsl-layerscape/spl.c b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
> index c0201341ea..ec40df41f6 100644
> --- a/arch/arm/cpu/armv8/fsl-layerscape/spl.c
> +++ b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
> @@ -8,6 +8,7 @@
>  #include <cpu_func.h>
>  #include <env.h>
>  #include <image.h>
> +#include <init.h>
>  #include <spl.h>
>  #include <asm/cache.h>
>  #include <asm/io.h>
> diff --git a/arch/arm/cpu/armv8/s32v234/cpu.c b/arch/arm/cpu/armv8/s32v234/cpu.c
> index f910b6ed72..5394a6697e 100644
> --- a/arch/arm/cpu/armv8/s32v234/cpu.c
> +++ b/arch/arm/cpu/armv8/s32v234/cpu.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <asm/cache.h>
>  #include <asm/io.h>
>  #include <asm/system.h>
> diff --git a/arch/arm/cpu/armv8/s32v234/generic.c b/arch/arm/cpu/armv8/s32v234/generic.c
> index 98f526e252..bc07dae318 100644
> --- a/arch/arm/cpu/armv8/s32v234/generic.c
> +++ b/arch/arm/cpu/armv8/s32v234/generic.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <clock_legacy.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/io.h>
>  #include <asm/arch/imx-regs.h>
> diff --git a/arch/arm/cpu/pxa/cpuinfo.c b/arch/arm/cpu/pxa/cpuinfo.c
> index 5379e13e2b..0d9542f998 100644
> --- a/arch/arm/cpu/pxa/cpuinfo.c
> +++ b/arch/arm/cpu/pxa/cpuinfo.c
> @@ -6,6 +6,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <errno.h>
>  #include <linux/compiler.h>
> diff --git a/arch/arm/cpu/pxa/pxa2xx.c b/arch/arm/cpu/pxa/pxa2xx.c
> index ecf85d2f14..ea91d8aaec 100644
> --- a/arch/arm/cpu/pxa/pxa2xx.c
> +++ b/arch/arm/cpu/pxa/pxa2xx.c
> @@ -11,6 +11,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <irq_func.h>
>  #include <asm/arch/pxa-regs.h>
>  #include <asm/cache.h>
> diff --git a/arch/arm/cpu/pxa/timer.c b/arch/arm/cpu/pxa/timer.c
> index 169fed808b..8e9d610441 100644
> --- a/arch/arm/cpu/pxa/timer.c
> +++ b/arch/arm/cpu/pxa/timer.c
> @@ -6,6 +6,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>
>  int timer_init(void)
> diff --git a/arch/arm/lib/spl.c b/arch/arm/lib/spl.c
> index 8a24e34f62..5d5437cbbc 100644
> --- a/arch/arm/lib/spl.c
> +++ b/arch/arm/lib/spl.c
> @@ -9,6 +9,7 @@
>
>  #include <common.h>
>  #include <config.h>
> +#include <init.h>
>  #include <spl.h>
>  #include <image.h>
>  #include <asm/cache.h>
> diff --git a/arch/arm/lib/stack.c b/arch/arm/lib/stack.c
> index c89a219dd2..96a248c0a9 100644
> --- a/arch/arm/lib/stack.c
> +++ b/arch/arm/lib/stack.c
> @@ -11,6 +11,7 @@
>   * Marius Groeger <mgroeger@sysgo.de>
>   */
>  #include <common.h>
> +#include <init.h>
>
>  DECLARE_GLOBAL_DATA_PTR;
>
> diff --git a/arch/arm/mach-aspeed/ast2500-board.c b/arch/arm/mach-aspeed/ast2500-board.c
> index e7edd544e2..20594e0efb 100644
> --- a/arch/arm/mach-aspeed/ast2500-board.c
> +++ b/arch/arm/mach-aspeed/ast2500-board.c
> @@ -4,6 +4,7 @@
>   */
>  #include <common.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <ram.h>
>  #include <timer.h>
>  #include <asm/io.h>
> diff --git a/arch/arm/mach-at91/arm920t/cpu.c b/arch/arm/mach-at91/arm920t/cpu.c
> index 42d0d2269f..44c079c0fd 100644
> --- a/arch/arm/mach-at91/arm920t/cpu.c
> +++ b/arch/arm/mach-at91/arm920t/cpu.c
> @@ -11,6 +11,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/hardware.h>
>  #include <asm/arch/clk.h>
> diff --git a/arch/arm/mach-at91/arm920t/timer.c b/arch/arm/mach-at91/arm920t/timer.c
> index 3aef9538b4..1e014ad9c9 100644
> --- a/arch/arm/mach-at91/arm920t/timer.c
> +++ b/arch/arm/mach-at91/arm920t/timer.c
> @@ -14,6 +14,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <time.h>
>
>  #include <asm/io.h>
> diff --git a/arch/arm/mach-at91/arm926ejs/cpu.c b/arch/arm/mach-at91/arm926ejs/cpu.c
> index e9b4e06595..761edb6df5 100644
> --- a/arch/arm/mach-at91/arm926ejs/cpu.c
> +++ b/arch/arm/mach-at91/arm926ejs/cpu.c
> @@ -7,6 +7,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <vsprintf.h>
>  #include <asm/io.h>
>  #include <asm/arch/hardware.h>
> diff --git a/arch/arm/mach-at91/arm926ejs/timer.c b/arch/arm/mach-at91/arm926ejs/timer.c
> index 31ad0bf702..42ef349966 100644
> --- a/arch/arm/mach-at91/arm926ejs/timer.c
> +++ b/arch/arm/mach-at91/arm926ejs/timer.c
> @@ -6,6 +6,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <time.h>
>  #include <asm/io.h>
>  #include <asm/arch/hardware.h>
> diff --git a/arch/arm/mach-at91/armv7/cpu.c b/arch/arm/mach-at91/armv7/cpu.c
> index 4474a96743..a8f4356ce9 100644
> --- a/arch/arm/mach-at91/armv7/cpu.c
> +++ b/arch/arm/mach-at91/armv7/cpu.c
> @@ -10,6 +10,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <vsprintf.h>
>  #include <asm/io.h>
>  #include <asm/arch/hardware.h>
> diff --git a/arch/arm/mach-at91/armv7/timer.c b/arch/arm/mach-at91/armv7/timer.c
> index 15c036cc27..a6346c01b2 100644
> --- a/arch/arm/mach-at91/armv7/timer.c
> +++ b/arch/arm/mach-at91/armv7/timer.c
> @@ -9,6 +9,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <time.h>
>  #include <asm/io.h>
>  #include <asm/arch/hardware.h>
> diff --git a/arch/arm/mach-at91/spl_at91.c b/arch/arm/mach-at91/spl_at91.c
> index 822f877de7..b78cafdd9c 100644
> --- a/arch/arm/mach-at91/spl_at91.c
> +++ b/arch/arm/mach-at91/spl_at91.c
> @@ -10,6 +10,7 @@
>
>  #include <common.h>
>  #include <hang.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/at91_common.h>
>  #include <asm/arch/at91sam9_matrix.h>
> diff --git a/arch/arm/mach-at91/spl_atmel.c b/arch/arm/mach-at91/spl_atmel.c
> index 6ee0e1c24c..f40bc531d4 100644
> --- a/arch/arm/mach-at91/spl_atmel.c
> +++ b/arch/arm/mach-at91/spl_atmel.c
> @@ -6,6 +6,7 @@
>
>  #include <common.h>
>  #include <hang.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/at91_common.h>
>  #include <asm/arch/at91_pit.h>
> diff --git a/arch/arm/mach-bcm283x/init.c b/arch/arm/mach-bcm283x/init.c
> index 9966d6c833..f4d00d892d 100644
> --- a/arch/arm/mach-bcm283x/init.c
> +++ b/arch/arm/mach-bcm283x/init.c
> @@ -8,6 +8,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <dm/device.h>
>  #include <fdt_support.h>
>
> diff --git a/arch/arm/mach-davinci/cpu.c b/arch/arm/mach-davinci/cpu.c
> index 9fd6564d04..40dd44af67 100644
> --- a/arch/arm/mach-davinci/cpu.c
> +++ b/arch/arm/mach-davinci/cpu.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/arch/hardware.h>
>  #include <asm/io.h>
>
> diff --git a/arch/arm/mach-davinci/da850_lowlevel.c b/arch/arm/mach-davinci/da850_lowlevel.c
> index 822e0dc4a1..07bf19b5e4 100644
> --- a/arch/arm/mach-davinci/da850_lowlevel.c
> +++ b/arch/arm/mach-davinci/da850_lowlevel.c
> @@ -6,6 +6,7 @@
>   * Heiko Schocher, DENX Software Engineering, hs at denx.de.
>   */
>  #include <common.h>
> +#include <init.h>
>  #include <nand.h>
>  #include <ns16550.h>
>  #include <post.h>
> diff --git a/arch/arm/mach-davinci/spl.c b/arch/arm/mach-davinci/spl.c
> index d44e840aa0..5fea935d6e 100644
> --- a/arch/arm/mach-davinci/spl.c
> +++ b/arch/arm/mach-davinci/spl.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <config.h>
>  #include <hang.h>
> +#include <init.h>
>  #include <spl.h>
>  #include <asm/u-boot.h>
>  #include <asm/utils.h>
> diff --git a/arch/arm/mach-davinci/timer.c b/arch/arm/mach-davinci/timer.c
> index 9846463c60..ebe985f795 100644
> --- a/arch/arm/mach-davinci/timer.c
> +++ b/arch/arm/mach-davinci/timer.c
> @@ -21,6 +21,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <time.h>
>  #include <asm/io.h>
>  #include <asm/arch/timer_defs.h>
> diff --git a/arch/arm/mach-exynos/lowlevel_init.c b/arch/arm/mach-exynos/lowlevel_init.c
> index ecd0105121..97d6ca8fc2 100644
> --- a/arch/arm/mach-exynos/lowlevel_init.c
> +++ b/arch/arm/mach-exynos/lowlevel_init.c
> @@ -27,6 +27,7 @@
>  #include <config.h>
>  #include <debug_uart.h>
>  #include <asm/system.h>
> +#include <init.h>
>  #include <asm/arch/cpu.h>
>  #include <asm/arch/dmc.h>
>  #include <asm/arch/power.h>
> diff --git a/arch/arm/mach-exynos/spl_boot.c b/arch/arm/mach-exynos/spl_boot.c
> index 8b2c5c79c0..d9672e79ef 100644
> --- a/arch/arm/mach-exynos/spl_boot.c
> +++ b/arch/arm/mach-exynos/spl_boot.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <config.h>
> +#include <init.h>
>
>  #include <asm/cache.h>
>  #include <asm/arch/clock.h>
> diff --git a/arch/arm/mach-highbank/timer.c b/arch/arm/mach-highbank/timer.c
> index cd08ff444d..2423a0e378 100644
> --- a/arch/arm/mach-highbank/timer.c
> +++ b/arch/arm/mach-highbank/timer.c
> @@ -6,6 +6,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch-armv7/systimer.h>
>
> diff --git a/arch/arm/mach-imx/cpu.c b/arch/arm/mach-imx/cpu.c
> index 0a2c43378f..97464391d5 100644
> --- a/arch/arm/mach-imx/cpu.c
> +++ b/arch/arm/mach-imx/cpu.c
> @@ -8,6 +8,7 @@
>
>  #include <bootm.h>
>  #include <common.h>
> +#include <init.h>
>  #include <net.h>
>  #include <netdev.h>
>  #include <linux/errno.h>
> diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c
> index 89229da3b6..1551717cc0 100644
> --- a/arch/arm/mach-imx/imx8m/soc.c
> +++ b/arch/arm/mach-imx/imx8m/soc.c
> @@ -7,6 +7,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <asm/arch/imx-regs.h>
>  #include <asm/io.h>
>  #include <asm/arch/clock.h>
> diff --git a/arch/arm/mach-imx/imxrt/soc.c b/arch/arm/mach-imx/imxrt/soc.c
> index e1eea23035..8d5fae9a97 100644
> --- a/arch/arm/mach-imx/imxrt/soc.c
> +++ b/arch/arm/mach-imx/imxrt/soc.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/armv7_mpu.h>
>
> diff --git a/arch/arm/mach-imx/mx7/soc.c b/arch/arm/mach-imx/mx7/soc.c
> index 4aafeed188..60e688c518 100644
> --- a/arch/arm/mach-imx/mx7/soc.c
> +++ b/arch/arm/mach-imx/mx7/soc.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/imx-regs.h>
>  #include <asm/arch/clock.h>
> diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c
> index fd3fa04600..4af3e6985c 100644
> --- a/arch/arm/mach-imx/spl.c
> +++ b/arch/arm/mach-imx/spl.c
> @@ -8,6 +8,7 @@
>
>  #include <common.h>
>  #include <hang.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/imx-regs.h>
>  #include <asm/arch/sys_proto.h>
> diff --git a/arch/arm/mach-imx/syscounter.c b/arch/arm/mach-imx/syscounter.c
> index 5a292c3964..db1c2c1e01 100644
> --- a/arch/arm/mach-imx/syscounter.c
> +++ b/arch/arm/mach-imx/syscounter.c
> @@ -6,6 +6,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <time.h>
>  #include <asm/io.h>
>  #include <div64.h>
> diff --git a/arch/arm/mach-imx/timer.c b/arch/arm/mach-imx/timer.c
> index 5fe5c51f6a..fa1941aec4 100644
> --- a/arch/arm/mach-imx/timer.c
> +++ b/arch/arm/mach-imx/timer.c
> @@ -7,6 +7,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <time.h>
>  #include <asm/io.h>
>  #include <div64.h>
> diff --git a/arch/arm/mach-k3/am6_init.c b/arch/arm/mach-k3/am6_init.c
> index b692806352..ddc9f3c4f4 100644
> --- a/arch/arm/mach-k3/am6_init.c
> +++ b/arch/arm/mach-k3/am6_init.c
> @@ -7,6 +7,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <spl.h>
>  #include <asm/arch/hardware.h>
> diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c
> index af1020be95..53cad78dd5 100644
> --- a/arch/arm/mach-k3/common.c
> +++ b/arch/arm/mach-k3/common.c
> @@ -9,6 +9,7 @@
>  #include <common.h>
>  #include <cpu_func.h>
>  #include <image.h>
> +#include <init.h>
>  #include <spl.h>
>  #include "common.h"
>  #include <dm.h>
> diff --git a/arch/arm/mach-k3/j721e_init.c b/arch/arm/mach-k3/j721e_init.c
> index 71fc20c30b..7a999f9d9c 100644
> --- a/arch/arm/mach-k3/j721e_init.c
> +++ b/arch/arm/mach-k3/j721e_init.c
> @@ -7,6 +7,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <spl.h>
>  #include <asm/io.h>
>  #include <asm/armv7_mpu.h>
> diff --git a/arch/arm/mach-keystone/init.c b/arch/arm/mach-keystone/init.c
> index 59fd029e4c..d947d40eac 100644
> --- a/arch/arm/mach-keystone/init.c
> +++ b/arch/arm/mach-keystone/init.c
> @@ -8,6 +8,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <ns16550.h>
>  #include <asm/cache.h>
>  #include <asm/io.h>
> diff --git a/arch/arm/mach-keystone/keystone.c b/arch/arm/mach-keystone/keystone.c
> index 7441052a55..1d79927ac7 100644
> --- a/arch/arm/mach-keystone/keystone.c
> +++ b/arch/arm/mach-keystone/keystone.c
> @@ -7,6 +7,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/psc_defs.h>
>  #include <asm/arch/hardware.h>
> diff --git a/arch/arm/mach-kirkwood/cpu.c b/arch/arm/mach-kirkwood/cpu.c
> index c56620dc5a..d328fee8bd 100644
> --- a/arch/arm/mach-kirkwood/cpu.c
> +++ b/arch/arm/mach-kirkwood/cpu.c
> @@ -9,6 +9,7 @@
>  #include <command.h>
>  #include <cpu_func.h>
>  #include <env.h>
> +#include <init.h>
>  #include <net.h>
>  #include <netdev.h>
>  #include <asm/cache.h>
> diff --git a/arch/arm/mach-mediatek/cpu.c b/arch/arm/mach-mediatek/cpu.c
> index 5e5f3f0842..c329e7cc98 100644
> --- a/arch/arm/mach-mediatek/cpu.c
> +++ b/arch/arm/mach-mediatek/cpu.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <cpu_func.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <wdt.h>
>  #include <dm/uclass-internal.h>
>
> diff --git a/arch/arm/mach-mediatek/mt7622/init.c b/arch/arm/mach-mediatek/mt7622/init.c
> index a715378127..7f6ce80f37 100644
> --- a/arch/arm/mach-mediatek/mt7622/init.c
> +++ b/arch/arm/mach-mediatek/mt7622/init.c
> @@ -6,6 +6,7 @@
>
>  #include <common.h>
>  #include <fdtdec.h>
> +#include <init.h>
>  #include <asm/armv8/mmu.h>
>  #include <asm/cache.h>
>
> diff --git a/arch/arm/mach-mediatek/mt7629/init.c b/arch/arm/mach-mediatek/mt7629/init.c
> index ba91a6eaa6..098892802b 100644
> --- a/arch/arm/mach-mediatek/mt7629/init.c
> +++ b/arch/arm/mach-mediatek/mt7629/init.c
> @@ -8,6 +8,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <fdtdec.h>
> +#include <init.h>
>  #include <ram.h>
>  #include <asm/arch/misc.h>
>  #include <asm/sections.h>
> diff --git a/arch/arm/mach-mediatek/mt8512/init.c b/arch/arm/mach-mediatek/mt8512/init.c
> index 4e6b710c11..9680251941 100644
> --- a/arch/arm/mach-mediatek/mt8512/init.c
> +++ b/arch/arm/mach-mediatek/mt8512/init.c
> @@ -10,6 +10,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <fdtdec.h>
> +#include <init.h>
>  #include <ram.h>
>  #include <wdt.h>
>  #include <asm/arch/misc.h>
> diff --git a/arch/arm/mach-mediatek/mt8516/init.c b/arch/arm/mach-mediatek/mt8516/init.c
> index b038437a17..13be391221 100644
> --- a/arch/arm/mach-mediatek/mt8516/init.c
> +++ b/arch/arm/mach-mediatek/mt8516/init.c
> @@ -10,6 +10,7 @@
>  #include <cpu_func.h>
>  #include <dm.h>
>  #include <fdtdec.h>
> +#include <init.h>
>  #include <ram.h>
>  #include <asm/arch/misc.h>
>  #include <asm/armv8/mmu.h>
> diff --git a/arch/arm/mach-mediatek/mt8518/init.c b/arch/arm/mach-mediatek/mt8518/init.c
> index c46cc5fcaf..531a403da1 100644
> --- a/arch/arm/mach-mediatek/mt8518/init.c
> +++ b/arch/arm/mach-mediatek/mt8518/init.c
> @@ -11,6 +11,7 @@
>  #include <cpu_func.h>
>  #include <dm.h>
>  #include <fdtdec.h>
> +#include <init.h>
>  #include <ram.h>
>  #include <asm/arch/misc.h>
>  #include <asm/armv8/mmu.h>
> diff --git a/arch/arm/mach-mediatek/spl.c b/arch/arm/mach-mediatek/spl.c
> index 37f1f219b2..927175c5a3 100644
> --- a/arch/arm/mach-mediatek/spl.c
> +++ b/arch/arm/mach-mediatek/spl.c
> @@ -7,6 +7,7 @@
>  #include <clk.h>
>  #include <common.h>
>  #include <hang.h>
> +#include <init.h>
>  #include <spl.h>
>
>  #include "init.h"
> diff --git a/arch/arm/mach-meson/board-info.c b/arch/arm/mach-meson/board-info.c
> index 4b88afa9b7..bfae0c36ea 100644
> --- a/arch/arm/mach-meson/board-info.c
> +++ b/arch/arm/mach-meson/board-info.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <dm.h>
>  #include <linux/bitfield.h>
> diff --git a/arch/arm/mach-mvebu/armada3700/cpu.c b/arch/arm/mach-mvebu/armada3700/cpu.c
> index 17d2d43bab..d6e84f1e20 100644
> --- a/arch/arm/mach-mvebu/armada3700/cpu.c
> +++ b/arch/arm/mach-mvebu/armada3700/cpu.c
> @@ -8,6 +8,7 @@
>  #include <cpu_func.h>
>  #include <dm.h>
>  #include <fdtdec.h>
> +#include <init.h>
>  #include <linux/libfdt.h>
>  #include <asm/io.h>
>  #include <asm/system.h>
> diff --git a/arch/arm/mach-mvebu/cpu.c b/arch/arm/mach-mvebu/cpu.c
> index fb241c7e4d..ab8b02956b 100644
> --- a/arch/arm/mach-mvebu/cpu.c
> +++ b/arch/arm/mach-mvebu/cpu.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <ahci.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <linux/mbus.h>
>  #include <asm/io.h>
>  #include <asm/pl310.h>
> diff --git a/arch/arm/mach-mvebu/spl.c b/arch/arm/mach-mvebu/spl.c
> index 70fef3b573..c6ecd5bee0 100644
> --- a/arch/arm/mach-mvebu/spl.c
> +++ b/arch/arm/mach-mvebu/spl.c
> @@ -8,6 +8,7 @@
>  #include <debug_uart.h>
>  #include <fdtdec.h>
>  #include <hang.h>
> +#include <init.h>
>  #include <spl.h>
>  #include <asm/io.h>
>  #include <asm/arch/cpu.h>
> diff --git a/arch/arm/mach-mvebu/timer.c b/arch/arm/mach-mvebu/timer.c
> index 2f6b4d1702..50b78cb07b 100644
> --- a/arch/arm/mach-mvebu/timer.c
> +++ b/arch/arm/mach-mvebu/timer.c
> @@ -7,6 +7,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/soc.h>
>
> diff --git a/arch/arm/mach-omap2/am33xx/chilisom.c b/arch/arm/mach-omap2/am33xx/chilisom.c
> index 3942305108..15b6b35ae7 100644
> --- a/arch/arm/mach-omap2/am33xx/chilisom.c
> +++ b/arch/arm/mach-omap2/am33xx/chilisom.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/clk_synthesizer.h>
>  #include <asm/arch/cpu.h>
> diff --git a/arch/arm/mach-omap2/am33xx/clock.c b/arch/arm/mach-omap2/am33xx/clock.c
> index 8c61547ee9..862c5e0905 100644
> --- a/arch/arm/mach-omap2/am33xx/clock.c
> +++ b/arch/arm/mach-omap2/am33xx/clock.c
> @@ -9,6 +9,7 @@
>   */
>  #include <common.h>
>  #include <hang.h>
> +#include <init.h>
>  #include <asm/arch/cpu.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/hardware.h>
> diff --git a/arch/arm/mach-omap2/am33xx/sys_info.c b/arch/arm/mach-omap2/am33xx/sys_info.c
> index 17b46619b5..338f6afcae 100644
> --- a/arch/arm/mach-omap2/am33xx/sys_info.c
> +++ b/arch/arm/mach-omap2/am33xx/sys_info.c
> @@ -12,6 +12,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/sys_proto.h>
>  #include <asm/arch/cpu.h>
> diff --git a/arch/arm/mach-omap2/clocks-common.c b/arch/arm/mach-omap2/clocks-common.c
> index 9aff83e9df..f968a26d64 100644
> --- a/arch/arm/mach-omap2/clocks-common.c
> +++ b/arch/arm/mach-omap2/clocks-common.c
> @@ -15,6 +15,7 @@
>  #include <common.h>
>  #include <hang.h>
>  #include <i2c.h>
> +#include <init.h>
>  #include <asm/omap_common.h>
>  #include <asm/gpio.h>
>  #include <asm/arch/clock.h>
> diff --git a/arch/arm/mach-omap2/hwinit-common.c b/arch/arm/mach-omap2/hwinit-common.c
> index 772b4c4db5..7a7086776e 100644
> --- a/arch/arm/mach-omap2/hwinit-common.c
> +++ b/arch/arm/mach-omap2/hwinit-common.c
> @@ -13,6 +13,7 @@
>  #include <common.h>
>  #include <debug_uart.h>
>  #include <fdtdec.h>
> +#include <init.h>
>  #include <spl.h>
>  #include <asm/arch/sys_proto.h>
>  #include <linux/sizes.h>
> diff --git a/arch/arm/mach-omap2/omap3/board.c b/arch/arm/mach-omap2/omap3/board.c
> index 60de0d6052..b893fb732e 100644
> --- a/arch/arm/mach-omap2/omap3/board.c
> +++ b/arch/arm/mach-omap2/omap3/board.c
> @@ -17,6 +17,7 @@
>   */
>  #include <common.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <spl.h>
>  #include <asm/io.h>
>  #include <asm/arch/sys_proto.h>
> diff --git a/arch/arm/mach-omap2/omap3/emif4.c b/arch/arm/mach-omap2/omap3/emif4.c
> index a8bd428e0c..4cfa132388 100644
> --- a/arch/arm/mach-omap2/omap3/emif4.c
> +++ b/arch/arm/mach-omap2/omap3/emif4.c
> @@ -10,6 +10,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/mem.h>
>  #include <asm/arch/sys_proto.h>
> diff --git a/arch/arm/mach-omap2/omap3/sdrc.c b/arch/arm/mach-omap2/omap3/sdrc.c
> index 861d01d6df..1d65ed6227 100644
> --- a/arch/arm/mach-omap2/omap3/sdrc.c
> +++ b/arch/arm/mach-omap2/omap3/sdrc.c
> @@ -22,6 +22,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/mem.h>
>  #include <asm/arch/sys_proto.h>
> diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
> index dbb68f718d..7752dd1565 100644
> --- a/arch/arm/mach-omap2/timer.c
> +++ b/arch/arm/mach-omap2/timer.c
> @@ -16,6 +16,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <time.h>
>  #include <asm/io.h>
>  #include <asm/arch/cpu.h>
> diff --git a/arch/arm/mach-orion5x/cpu.c b/arch/arm/mach-orion5x/cpu.c
> index 7d57dd257f..d9abcacbb4 100644
> --- a/arch/arm/mach-orion5x/cpu.c
> +++ b/arch/arm/mach-orion5x/cpu.c
> @@ -10,6 +10,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <net.h>
>  #include <netdev.h>
>  #include <asm/cache.h>
> diff --git a/arch/arm/mach-orion5x/timer.c b/arch/arm/mach-orion5x/timer.c
> index 077eb63e74..a64d572112 100644
> --- a/arch/arm/mach-orion5x/timer.c
> +++ b/arch/arm/mach-orion5x/timer.c
> @@ -8,6 +8,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <time.h>
>  #include <asm/io.h>
>
> diff --git a/arch/arm/mach-owl/soc.c b/arch/arm/mach-owl/soc.c
> index 8a434bd496..7d3f6f6285 100644
> --- a/arch/arm/mach-owl/soc.c
> +++ b/arch/arm/mach-owl/soc.c
> @@ -6,6 +6,7 @@
>   */
>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <asm/cache.h>
>  #include <linux/arm-smccc.h>
>  #include <linux/psci.h>
> diff --git a/arch/arm/mach-rmobile/board.c b/arch/arm/mach-rmobile/board.c
> index 8a2d3ce621..a10371f74e 100644
> --- a/arch/arm/mach-rmobile/board.c
> +++ b/arch/arm/mach-rmobile/board.c
> @@ -4,6 +4,7 @@
>   * (C) Copyright 2012 Renesas Solutions Corp.
>   */
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>
>  #ifdef CONFIG_ARCH_RMOBILE_BOARD_STRING
> diff --git a/arch/arm/mach-rmobile/cpu_info.c b/arch/arm/mach-rmobile/cpu_info.c
> index 9b34cba047..fdbbd72e28 100644
> --- a/arch/arm/mach-rmobile/cpu_info.c
> +++ b/arch/arm/mach-rmobile/cpu_info.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <cpu_func.h>
>  #include <asm/cache.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <env.h>
>  #include <linux/ctype.h>
> diff --git a/arch/arm/mach-rmobile/timer.c b/arch/arm/mach-rmobile/timer.c
> index 9fcab446a5..f88ccfde9f 100644
> --- a/arch/arm/mach-rmobile/timer.c
> +++ b/arch/arm/mach-rmobile/timer.c
> @@ -6,6 +6,7 @@
>
>  #include <common.h>
>  #include <div64.h>
> +#include <init.h>
>  #include <time.h>
>  #include <asm/io.h>
>  #include <asm/arch-armv7/globaltimer.h>
> diff --git a/arch/arm/mach-rockchip/cpu-info.c b/arch/arm/mach-rockchip/cpu-info.c
> index 4b0e99299a..08b7d3519d 100644
> --- a/arch/arm/mach-rockchip/cpu-info.c
> +++ b/arch/arm/mach-rockchip/cpu-info.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch-rockchip/clock.h>
>  #include <asm/arch-rockchip/cru.h>
> diff --git a/arch/arm/mach-rockchip/px30-board-tpl.c b/arch/arm/mach-rockchip/px30-board-tpl.c
> index 8c8976f61c..085e650620 100644
> --- a/arch/arm/mach-rockchip/px30-board-tpl.c
> +++ b/arch/arm/mach-rockchip/px30-board-tpl.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <debug_uart.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <ram.h>
>  #include <spl.h>
>  #include <version.h>
> diff --git a/arch/arm/mach-rockchip/px30/px30.c b/arch/arm/mach-rockchip/px30/px30.c
> index 5014ee83d7..6fcef63c1b 100644
> --- a/arch/arm/mach-rockchip/px30/px30.c
> +++ b/arch/arm/mach-rockchip/px30/px30.c
> @@ -5,6 +5,7 @@
>  #include <common.h>
>  #include <clk.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <asm/armv8/mmu.h>
>  #include <asm/io.h>
>  #include <asm/arch-rockchip/grf_px30.h>
> diff --git a/arch/arm/mach-rockchip/rk3036-board-spl.c b/arch/arm/mach-rockchip/rk3036-board-spl.c
> index fbc89b66c4..6eb89e15b8 100644
> --- a/arch/arm/mach-rockchip/rk3036-board-spl.c
> +++ b/arch/arm/mach-rockchip/rk3036-board-spl.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <debug_uart.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch-rockchip/bootrom.h>
>  #include <asm/arch-rockchip/sdram_rk3036.h>
> diff --git a/arch/arm/mach-rockchip/rk3036/rk3036.c b/arch/arm/mach-rockchip/rk3036/rk3036.c
> index e0a6e4b025..e9e020ff3f 100644
> --- a/arch/arm/mach-rockchip/rk3036/rk3036.c
> +++ b/arch/arm/mach-rockchip/rk3036/rk3036.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch-rockchip/grf_rk3036.h>
>  #include <asm/arch-rockchip/hardware.h>
> diff --git a/arch/arm/mach-rockchip/rk3036/sdram_rk3036.c b/arch/arm/mach-rockchip/rk3036/sdram_rk3036.c
> index c39cbb8111..3874716e52 100644
> --- a/arch/arm/mach-rockchip/rk3036/sdram_rk3036.c
> +++ b/arch/arm/mach-rockchip/rk3036/sdram_rk3036.c
> @@ -3,6 +3,7 @@
>   * (C) Copyright 2015 Rockchip Electronics Co., Ltd
>   */
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/types.h>
>  #include <asm/arch-rockchip/cru_rk3036.h>
> diff --git a/arch/arm/mach-rockchip/rk3128/rk3128.c b/arch/arm/mach-rockchip/rk3128/rk3128.c
> index ee176de80b..740bd2ba07 100644
> --- a/arch/arm/mach-rockchip/rk3128/rk3128.c
> +++ b/arch/arm/mach-rockchip/rk3128/rk3128.c
> @@ -3,6 +3,7 @@
>   * Copyright (c) 2017 Rockchip Electronics Co., Ltd
>   */
>  #include <common.h>
> +#include <init.h>
>
>  DECLARE_GLOBAL_DATA_PTR;
>
> diff --git a/arch/arm/mach-rockchip/rk3188/rk3188.c b/arch/arm/mach-rockchip/rk3188/rk3188.c
> index e52466fb6f..dca9de28d4 100644
> --- a/arch/arm/mach-rockchip/rk3188/rk3188.c
> +++ b/arch/arm/mach-rockchip/rk3188/rk3188.c
> @@ -5,6 +5,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <hang.h>
> +#include <init.h>
>  #include <syscon.h>
>  #include <asm/io.h>
>  #include <asm/arch-rockchip/bootrom.h>
> diff --git a/arch/arm/mach-rockchip/rk322x/rk322x.c b/arch/arm/mach-rockchip/rk322x/rk322x.c
> index 562117e6c1..ad4ac62e51 100644
> --- a/arch/arm/mach-rockchip/rk322x/rk322x.c
> +++ b/arch/arm/mach-rockchip/rk322x/rk322x.c
> @@ -2,6 +2,7 @@
>  /*
>   * (C) Copyright 2019 Rockchip Electronics Co., Ltd
>   */
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch-rockchip/bootrom.h>
>  #include <asm/arch-rockchip/grf_rk322x.h>
> diff --git a/arch/arm/mach-rockchip/rk3308/rk3308.c b/arch/arm/mach-rockchip/rk3308/rk3308.c
> index edf5994709..35a5c79728 100644
> --- a/arch/arm/mach-rockchip/rk3308/rk3308.c
> +++ b/arch/arm/mach-rockchip/rk3308/rk3308.c
> @@ -3,6 +3,7 @@
>   *Copyright (c) 2018 Rockchip Electronics Co., Ltd
>   */
>  #include <common.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <asm/io.h>
>  #include <asm/arch/grf_rk3308.h>
> diff --git a/arch/arm/mach-rockchip/rk3328/rk3328.c b/arch/arm/mach-rockchip/rk3328/rk3328.c
> index 8c81242e5d..7c85b2663c 100644
> --- a/arch/arm/mach-rockchip/rk3328/rk3328.c
> +++ b/arch/arm/mach-rockchip/rk3328/rk3328.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/arch-rockchip/bootrom.h>
>  #include <asm/arch-rockchip/hardware.h>
>  #include <asm/arch-rockchip/grf_rk3328.h>
> diff --git a/arch/arm/mach-rockchip/rk3368/rk3368.c b/arch/arm/mach-rockchip/rk3368/rk3368.c
> index 20ae797794..bcc230c900 100644
> --- a/arch/arm/mach-rockchip/rk3368/rk3368.c
> +++ b/arch/arm/mach-rockchip/rk3368/rk3368.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <syscon.h>
>  #include <asm/armv8/mmu.h>
>  #include <asm/io.h>
> diff --git a/arch/arm/mach-rockchip/rk3399/rk3399.c b/arch/arm/mach-rockchip/rk3399/rk3399.c
> index 3a51194108..aaa7246393 100644
> --- a/arch/arm/mach-rockchip/rk3399/rk3399.c
> +++ b/arch/arm/mach-rockchip/rk3399/rk3399.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <fdt_support.h>
> +#include <init.h>
>  #include <spl.h>
>  #include <spl_gpio.h>
>  #include <syscon.h>
> diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c
> index 2796e41369..0d74989adb 100644
> --- a/arch/arm/mach-rockchip/spl.c
> +++ b/arch/arm/mach-rockchip/spl.c
> @@ -8,6 +8,7 @@
>  #include <dm.h>
>  #include <hang.h>
>  #include <image.h>
> +#include <init.h>
>  #include <ram.h>
>  #include <spl.h>
>  #include <asm/arch-rockchip/bootrom.h>
> diff --git a/arch/arm/mach-rockchip/tpl.c b/arch/arm/mach-rockchip/tpl.c
> index a2b8d31cbd..2de4e980e4 100644
> --- a/arch/arm/mach-rockchip/tpl.c
> +++ b/arch/arm/mach-rockchip/tpl.c
> @@ -7,6 +7,7 @@
>  #include <debug_uart.h>
>  #include <dm.h>
>  #include <hang.h>
> +#include <init.h>
>  #include <ram.h>
>  #include <spl.h>
>  #include <version.h>
> diff --git a/arch/arm/mach-socfpga/board.c b/arch/arm/mach-socfpga/board.c
> index 7c8c05cc31..340abf9305 100644
> --- a/arch/arm/mach-socfpga/board.c
> +++ b/arch/arm/mach-socfpga/board.c
> @@ -8,6 +8,7 @@
>  #include <common.h>
>  #include <errno.h>
>  #include <fdtdec.h>
> +#include <init.h>
>  #include <asm/arch/reset_manager.h>
>  #include <asm/arch/clock_manager.h>
>  #include <asm/arch/misc.h>
> diff --git a/arch/arm/mach-socfpga/clock_manager.c b/arch/arm/mach-socfpga/clock_manager.c
> index dbb10ecb68..0a6025fffa 100644
> --- a/arch/arm/mach-socfpga/clock_manager.c
> +++ b/arch/arm/mach-socfpga/clock_manager.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <wait_bit.h>
>  #include <asm/io.h>
>  #include <asm/arch/clock_manager.h>
> diff --git a/arch/arm/mach-socfpga/misc.c b/arch/arm/mach-socfpga/misc.c
> index 0158f4f04c..557305c703 100644
> --- a/arch/arm/mach-socfpga/misc.c
> +++ b/arch/arm/mach-socfpga/misc.c
> @@ -7,6 +7,7 @@
>  #include <cpu_func.h>
>  #include <hang.h>
>  #include <asm/cache.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <errno.h>
>  #include <fdtdec.h>
> diff --git a/arch/arm/mach-socfpga/misc_arria10.c b/arch/arm/mach-socfpga/misc_arria10.c
> index d56349b7f3..bf978053ca 100644
> --- a/arch/arm/mach-socfpga/misc_arria10.c
> +++ b/arch/arm/mach-socfpga/misc_arria10.c
> @@ -7,6 +7,7 @@
>  #include <common.h>
>  #include <errno.h>
>  #include <fdtdec.h>
> +#include <init.h>
>  #include <miiphy.h>
>  #include <netdev.h>
>  #include <ns16550.h>
> diff --git a/arch/arm/mach-socfpga/misc_gen5.c b/arch/arm/mach-socfpga/misc_gen5.c
> index 21eb934e56..39acc8cfdb 100644
> --- a/arch/arm/mach-socfpga/misc_gen5.c
> +++ b/arch/arm/mach-socfpga/misc_gen5.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <env.h>
>  #include <errno.h>
> diff --git a/arch/arm/mach-socfpga/misc_s10.c b/arch/arm/mach-socfpga/misc_s10.c
> index a3f5b4364e..a87dd44181 100644
> --- a/arch/arm/mach-socfpga/misc_s10.c
> +++ b/arch/arm/mach-socfpga/misc_s10.c
> @@ -9,6 +9,7 @@
>  #include <env.h>
>  #include <errno.h>
>  #include <fdtdec.h>
> +#include <init.h>
>  #include <miiphy.h>
>  #include <netdev.h>
>  #include <asm/io.h>
> diff --git a/arch/arm/mach-socfpga/spl_a10.c b/arch/arm/mach-socfpga/spl_a10.c
> index d2f52f2f2c..45aea4ab6c 100644
> --- a/arch/arm/mach-socfpga/spl_a10.c
> +++ b/arch/arm/mach-socfpga/spl_a10.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <cpu_func.h>
>  #include <hang.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/pl310.h>
>  #include <asm/u-boot.h>
> diff --git a/arch/arm/mach-socfpga/spl_agilex.c b/arch/arm/mach-socfpga/spl_agilex.c
> index aa9f3e646c..0192cccbd1 100644
> --- a/arch/arm/mach-socfpga/spl_agilex.c
> +++ b/arch/arm/mach-socfpga/spl_agilex.c
> @@ -4,6 +4,7 @@
>   *
>   */
>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/u-boot.h>
>  #include <asm/utils.h>
> diff --git a/arch/arm/mach-socfpga/spl_gen5.c b/arch/arm/mach-socfpga/spl_gen5.c
> index e9967ac450..6c9f45396d 100644
> --- a/arch/arm/mach-socfpga/spl_gen5.c
> +++ b/arch/arm/mach-socfpga/spl_gen5.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <hang.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/u-boot.h>
>  #include <asm/utils.h>
> diff --git a/arch/arm/mach-socfpga/spl_s10.c b/arch/arm/mach-socfpga/spl_s10.c
> index 08427dd83e..0f8588ba0c 100644
> --- a/arch/arm/mach-socfpga/spl_s10.c
> +++ b/arch/arm/mach-socfpga/spl_s10.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <hang.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/u-boot.h>
>  #include <asm/utils.h>
> diff --git a/arch/arm/mach-socfpga/timer.c b/arch/arm/mach-socfpga/timer.c
> index f1c0262ae5..a58f1cf9d3 100644
> --- a/arch/arm/mach-socfpga/timer.c
> +++ b/arch/arm/mach-socfpga/timer.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/timer.h>
>
> diff --git a/arch/arm/mach-socfpga/timer_s10.c b/arch/arm/mach-socfpga/timer_s10.c
> index 57237892c3..3ad98bdb25 100644
> --- a/arch/arm/mach-socfpga/timer_s10.c
> +++ b/arch/arm/mach-socfpga/timer_s10.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/timer.h>
>
> diff --git a/arch/arm/mach-stm32/soc.c b/arch/arm/mach-stm32/soc.c
> index 41338a1a33..1f12da401c 100644
> --- a/arch/arm/mach-stm32/soc.c
> +++ b/arch/arm/mach-stm32/soc.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/armv7_mpu.h>
>
> diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c
> index 603c690a3d..001c246635 100644
> --- a/arch/arm/mach-stm32mp/cpu.c
> +++ b/arch/arm/mach-stm32mp/cpu.c
> @@ -7,6 +7,7 @@
>  #include <cpu_func.h>
>  #include <debug_uart.h>
>  #include <env.h>
> +#include <init.h>
>  #include <misc.h>
>  #include <net.h>
>  #include <asm/io.h>
> diff --git a/arch/arm/mach-stm32mp/dram_init.c b/arch/arm/mach-stm32mp/dram_init.c
> index 7688b3e315..f4cc609d2d 100644
> --- a/arch/arm/mach-stm32mp/dram_init.c
> +++ b/arch/arm/mach-stm32mp/dram_init.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <ram.h>
>
>  DECLARE_GLOBAL_DATA_PTR;
> diff --git a/arch/arm/mach-stm32mp/spl.c b/arch/arm/mach-stm32mp/spl.c
> index f85391c6af..fefb255419 100644
> --- a/arch/arm/mach-stm32mp/spl.c
> +++ b/arch/arm/mach-stm32mp/spl.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <hang.h>
> +#include <init.h>
>  #include <spl.h>
>  #include <asm/io.h>
>  #include <asm/arch/sys_proto.h>
> diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c
> index 11b333b563..32e3664265 100644
> --- a/arch/arm/mach-sunxi/board.c
> +++ b/arch/arm/mach-sunxi/board.c
> @@ -11,6 +11,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <mmc.h>
>  #include <i2c.h>
>  #include <serial.h>
> diff --git a/arch/arm/mach-sunxi/cpu_info.c b/arch/arm/mach-sunxi/cpu_info.c
> index ae4745bfec..875e5a1a8a 100644
> --- a/arch/arm/mach-sunxi/cpu_info.c
> +++ b/arch/arm/mach-sunxi/cpu_info.c
> @@ -6,6 +6,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/cpu.h>
>  #include <asm/arch/clock.h>
> diff --git a/arch/arm/mach-sunxi/dram_sun50i_h6.c b/arch/arm/mach-sunxi/dram_sun50i_h6.c
> index 9375db76a1..411a612393 100644
> --- a/arch/arm/mach-sunxi/dram_sun50i_h6.c
> +++ b/arch/arm/mach-sunxi/dram_sun50i_h6.c
> @@ -1,11 +1,12 @@
> +// SPDX-License-Identifier: GPL-2.0+
>  /*
>   * sun50i H6 platform dram controller init
>   *
>   * (C) Copyright 2017      Icenowy Zheng <icenowy@aosc.io>
>   *
> - * SPDX-License-Identifier:    GPL-2.0+
>   */
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/dram.h>
> diff --git a/arch/arm/mach-sunxi/dram_sun6i.c b/arch/arm/mach-sunxi/dram_sun6i.c
> index f473230bb5..8e781267c5 100644
> --- a/arch/arm/mach-sunxi/dram_sun6i.c
> +++ b/arch/arm/mach-sunxi/dram_sun6i.c
> @@ -11,6 +11,7 @@
>   */
>  #include <common.h>
>  #include <errno.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/dram.h>
> diff --git a/arch/arm/mach-sunxi/dram_sun8i_a23.c b/arch/arm/mach-sunxi/dram_sun8i_a23.c
> index 9f00fefb77..221f92869c 100644
> --- a/arch/arm/mach-sunxi/dram_sun8i_a23.c
> +++ b/arch/arm/mach-sunxi/dram_sun8i_a23.c
> @@ -21,6 +21,7 @@
>
>  #include <common.h>
>  #include <errno.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/dram.h>
> diff --git a/arch/arm/mach-sunxi/dram_sun8i_a33.c b/arch/arm/mach-sunxi/dram_sun8i_a33.c
> index 5da01922bf..179acc7e6f 100644
> --- a/arch/arm/mach-sunxi/dram_sun8i_a33.c
> +++ b/arch/arm/mach-sunxi/dram_sun8i_a33.c
> @@ -9,6 +9,7 @@
>   */
>  #include <common.h>
>  #include <errno.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/dram.h>
> diff --git a/arch/arm/mach-sunxi/dram_sun8i_a83t.c b/arch/arm/mach-sunxi/dram_sun8i_a83t.c
> index 2c43b3ceba..2febb23654 100644
> --- a/arch/arm/mach-sunxi/dram_sun8i_a83t.c
> +++ b/arch/arm/mach-sunxi/dram_sun8i_a83t.c
> @@ -9,6 +9,7 @@
>   */
>  #include <common.h>
>  #include <errno.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/dram.h>
> diff --git a/arch/arm/mach-sunxi/dram_sun9i.c b/arch/arm/mach-sunxi/dram_sun9i.c
> index 77cc60623e..58ce05db6d 100644
> --- a/arch/arm/mach-sunxi/dram_sun9i.c
> +++ b/arch/arm/mach-sunxi/dram_sun9i.c
> @@ -13,6 +13,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <errno.h>
> +#include <init.h>
>  #include <ram.h>
>  #include <asm/io.h>
>  #include <asm/arch/clock.h>
> diff --git a/arch/arm/mach-sunxi/dram_sunxi_dw.c b/arch/arm/mach-sunxi/dram_sunxi_dw.c
> index 85e7a1874e..ea5fe108eb 100644
> --- a/arch/arm/mach-sunxi/dram_sunxi_dw.c
> +++ b/arch/arm/mach-sunxi/dram_sunxi_dw.c
> @@ -9,6 +9,7 @@
>   * (C) Copyright 2015      Jens Kuske <jenskuske@gmail.com>
>   */
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/dram.h>
> diff --git a/arch/arm/mach-tegra/cboot.c b/arch/arm/mach-tegra/cboot.c
> index 4416827220..7cfbb6270f 100644
> --- a/arch/arm/mach-tegra/cboot.c
> +++ b/arch/arm/mach-tegra/cboot.c
> @@ -8,6 +8,7 @@
>  #include <fdt_support.h>
>  #include <fdtdec.h>
>  #include <hang.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <net.h>
>  #include <stdlib.h>
> diff --git a/arch/arm/mach-tegra/sys_info.c b/arch/arm/mach-tegra/sys_info.c
> index 5dc998a52b..5ad586ac17 100644
> --- a/arch/arm/mach-tegra/sys_info.c
> +++ b/arch/arm/mach-tegra/sys_info.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <linux/ctype.h>
>  #if defined(CONFIG_TEGRA124) || defined(CONFIG_TEGRA30)
>  #include <asm/arch-tegra/pmc.h>
> diff --git a/arch/arm/mach-tegra/tegra114/clock.c b/arch/arm/mach-tegra/tegra114/clock.c
> index ad09cc52eb..8d662c23d0 100644
> --- a/arch/arm/mach-tegra/tegra114/clock.c
> +++ b/arch/arm/mach-tegra/tegra114/clock.c
> @@ -7,6 +7,7 @@
>  /* Tegra114 Clock control functions */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/sysctr.h>
> diff --git a/arch/arm/mach-tegra/tegra124/clock.c b/arch/arm/mach-tegra/tegra124/clock.c
> index 70916ea3c1..f02f8b0532 100644
> --- a/arch/arm/mach-tegra/tegra124/clock.c
> +++ b/arch/arm/mach-tegra/tegra124/clock.c
> @@ -7,6 +7,7 @@
>  /* Tegra124 Clock control functions */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/sysctr.h>
> diff --git a/arch/arm/mach-tegra/tegra20/clock.c b/arch/arm/mach-tegra/tegra20/clock.c
> index 8f1bb4f069..4e607816a7 100644
> --- a/arch/arm/mach-tegra/tegra20/clock.c
> +++ b/arch/arm/mach-tegra/tegra20/clock.c
> @@ -9,6 +9,7 @@
>
>  #include <common.h>
>  #include <errno.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/tegra.h>
> diff --git a/arch/arm/mach-tegra/tegra210/clock.c b/arch/arm/mach-tegra/tegra210/clock.c
> index 492f4d8c11..ed0ad2ee8b 100644
> --- a/arch/arm/mach-tegra/tegra210/clock.c
> +++ b/arch/arm/mach-tegra/tegra210/clock.c
> @@ -8,6 +8,7 @@
>
>  #include <common.h>
>  #include <errno.h>
> +#include <init.h>
>  #include <asm/cache.h>
>  #include <asm/io.h>
>  #include <asm/arch/clock.h>
> diff --git a/arch/arm/mach-tegra/tegra30/clock.c b/arch/arm/mach-tegra/tegra30/clock.c
> index dd1193be14..ea17d14536 100644
> --- a/arch/arm/mach-tegra/tegra30/clock.c
> +++ b/arch/arm/mach-tegra/tegra30/clock.c
> @@ -8,6 +8,7 @@
>
>  #include <common.h>
>  #include <errno.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/tegra.h>
> diff --git a/arch/arm/mach-u8500/cpuinfo.c b/arch/arm/mach-u8500/cpuinfo.c
> index 20f5ff3398..ab05b8a51b 100644
> --- a/arch/arm/mach-u8500/cpuinfo.c
> +++ b/arch/arm/mach-u8500/cpuinfo.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>
>  #define U8500_BOOTROM_BASE     0x90000000
> diff --git a/arch/arm/mach-uniphier/arm32/timer.c b/arch/arm/mach-uniphier/arm32/timer.c
> index 899b539104..b3c907b508 100644
> --- a/arch/arm/mach-uniphier/arm32/timer.c
> +++ b/arch/arm/mach-uniphier/arm32/timer.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <linux/io.h>
>
>  #include "arm-mpcore.h"
> diff --git a/arch/arm/mach-uniphier/cpu-info.c b/arch/arm/mach-uniphier/cpu-info.c
> index 6a7b203a44..1ede50771e 100644
> --- a/arch/arm/mach-uniphier/cpu-info.c
> +++ b/arch/arm/mach-uniphier/cpu-info.c
> @@ -5,6 +5,7 @@
>   *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
>   */
>
> +#include <init.h>
>  #include <stdio.h>
>  #include <linux/errno.h>
>  #include <linux/io.h>
> diff --git a/arch/arm/mach-uniphier/dram/umc-pxs2.c b/arch/arm/mach-uniphier/dram/umc-pxs2.c
> index 5392ffa603..b013571f36 100644
> --- a/arch/arm/mach-uniphier/dram/umc-pxs2.c
> +++ b/arch/arm/mach-uniphier/dram/umc-pxs2.c
> @@ -7,6 +7,7 @@
>   * Copyright (C) 2015 Socionext Inc.
>   */
>
> +#include <init.h>
>  #include <linux/delay.h>
>  #include <linux/errno.h>
>  #include <linux/io.h>
> diff --git a/arch/arm/mach-uniphier/dram_init.c b/arch/arm/mach-uniphier/dram_init.c
> index 5f9d90fe6d..1127373b20 100644
> --- a/arch/arm/mach-uniphier/dram_init.c
> +++ b/arch/arm/mach-uniphier/dram_init.c
> @@ -6,6 +6,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <linux/errno.h>
>  #include <linux/io.h>
>  #include <linux/kernel.h>
> diff --git a/arch/arm/mach-versal/clk.c b/arch/arm/mach-versal/clk.c
> index 9184714e47..b1e34796d0 100644
> --- a/arch/arm/mach-versal/clk.c
> +++ b/arch/arm/mach-versal/clk.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <time.h>
>
>  DECLARE_GLOBAL_DATA_PTR;
> diff --git a/arch/arm/mach-versal/cpu.c b/arch/arm/mach-versal/cpu.c
> index 71731f324f..61c0b663fc 100644
> --- a/arch/arm/mach-versal/cpu.c
> +++ b/arch/arm/mach-versal/cpu.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/armv8/mmu.h>
>  #include <asm/cache.h>
>  #include <asm/io.h>
> diff --git a/arch/arm/mach-zynq/clk.c b/arch/arm/mach-zynq/clk.c
> index b578f6538a..1ace117fc8 100644
> --- a/arch/arm/mach-zynq/clk.c
> +++ b/arch/arm/mach-zynq/clk.c
> @@ -6,6 +6,7 @@
>  #include <clk.h>
>  #include <common.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <asm/arch/clk.h>
>
> diff --git a/arch/arm/mach-zynq/cpu.c b/arch/arm/mach-zynq/cpu.c
> index 43c5ca39d4..77b7cb1307 100644
> --- a/arch/arm/mach-zynq/cpu.c
> +++ b/arch/arm/mach-zynq/cpu.c
> @@ -5,6 +5,7 @@
>   */
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <zynqpl.h>
>  #include <asm/cache.h>
>  #include <asm/io.h>
> diff --git a/arch/arm/mach-zynq/spl.c b/arch/arm/mach-zynq/spl.c
> index 627c84ceba..05f42e6e8b 100644
> --- a/arch/arm/mach-zynq/spl.c
> +++ b/arch/arm/mach-zynq/spl.c
> @@ -6,6 +6,7 @@
>  #include <debug_uart.h>
>  #include <hang.h>
>  #include <image.h>
> +#include <init.h>
>  #include <spl.h>
>  #include <generated/dt.h>
>
> diff --git a/arch/arm/mach-zynq/timer.c b/arch/arm/mach-zynq/timer.c
> index d822e20d2b..cc0e24cbfe 100644
> --- a/arch/arm/mach-zynq/timer.c
> +++ b/arch/arm/mach-zynq/timer.c
> @@ -31,6 +31,7 @@
>  #include <common.h>
>  #include <div64.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <time.h>
>  #include <malloc.h>
>  #include <asm/io.h>
> diff --git a/arch/arm/mach-zynqmp-r5/cpu.c b/arch/arm/mach-zynqmp-r5/cpu.c
> index aa5de863eb..b3402d7189 100644
> --- a/arch/arm/mach-zynqmp-r5/cpu.c
> +++ b/arch/arm/mach-zynqmp-r5/cpu.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <asm/armv7_mpu.h>
>
>  DECLARE_GLOBAL_DATA_PTR;
> diff --git a/arch/arm/mach-zynqmp/clk.c b/arch/arm/mach-zynqmp/clk.c
> index db2b4a8be2..5067b339c2 100644
> --- a/arch/arm/mach-zynqmp/clk.c
> +++ b/arch/arm/mach-zynqmp/clk.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <time.h>
>  #include <asm/arch/clk.h>
>  #include <asm/arch/hardware.h>
> diff --git a/arch/arm/mach-zynqmp/cpu.c b/arch/arm/mach-zynqmp/cpu.c
> index d832406434..3eb8e8f448 100644
> --- a/arch/arm/mach-zynqmp/cpu.c
> +++ b/arch/arm/mach-zynqmp/cpu.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <time.h>
>  #include <asm/arch/hardware.h>
>  #include <asm/arch/sys_proto.h>
> diff --git a/arch/m68k/cpu/mcf5227x/cpu.c b/arch/m68k/cpu/mcf5227x/cpu.c
> index 34534d876b..1590d4a954 100644
> --- a/arch/m68k/cpu/mcf5227x/cpu.c
> +++ b/arch/m68k/cpu/mcf5227x/cpu.c
> @@ -9,6 +9,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <vsprintf.h>
>  #include <watchdog.h>
>  #include <command.h>
> diff --git a/arch/m68k/cpu/mcf5227x/cpu_init.c b/arch/m68k/cpu/mcf5227x/cpu_init.c
> index 7cde4c6105..4ab13b4d8e 100644
> --- a/arch/m68k/cpu/mcf5227x/cpu_init.c
> +++ b/arch/m68k/cpu/mcf5227x/cpu_init.c
> @@ -10,6 +10,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <watchdog.h>
>
>  #include <asm/immap.h>
> diff --git a/arch/m68k/cpu/mcf523x/cpu.c b/arch/m68k/cpu/mcf523x/cpu.c
> index 8c808a6b0c..225bdc2d25 100644
> --- a/arch/m68k/cpu/mcf523x/cpu.c
> +++ b/arch/m68k/cpu/mcf523x/cpu.c
> @@ -9,6 +9,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <net.h>
>  #include <vsprintf.h>
>  #include <watchdog.h>
> diff --git a/arch/m68k/cpu/mcf523x/cpu_init.c b/arch/m68k/cpu/mcf523x/cpu_init.c
> index 8c6e12d548..87effa71dc 100644
> --- a/arch/m68k/cpu/mcf523x/cpu_init.c
> +++ b/arch/m68k/cpu/mcf523x/cpu_init.c
> @@ -10,6 +10,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <watchdog.h>
>  #include <asm/immap.h>
>  #include <asm/io.h>
> diff --git a/arch/m68k/cpu/mcf52x2/cpu.c b/arch/m68k/cpu/mcf52x2/cpu.c
> index 5eee856392..1f70d90f0b 100644
> --- a/arch/m68k/cpu/mcf52x2/cpu.c
> +++ b/arch/m68k/cpu/mcf52x2/cpu.c
> @@ -14,6 +14,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <net.h>
>  #include <vsprintf.h>
>  #include <watchdog.h>
> diff --git a/arch/m68k/cpu/mcf52x2/cpu_init.c b/arch/m68k/cpu/mcf52x2/cpu_init.c
> index f39fe19baf..9d4a10f028 100644
> --- a/arch/m68k/cpu/mcf52x2/cpu_init.c
> +++ b/arch/m68k/cpu/mcf52x2/cpu_init.c
> @@ -19,6 +19,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <watchdog.h>
>  #include <asm/immap.h>
>  #include <asm/io.h>
> diff --git a/arch/m68k/cpu/mcf530x/cpu.c b/arch/m68k/cpu/mcf530x/cpu.c
> index a76deebc68..bef9047b35 100644
> --- a/arch/m68k/cpu/mcf530x/cpu.c
> +++ b/arch/m68k/cpu/mcf530x/cpu.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <vsprintf.h>
>  #include <asm/immap.h>
>  #include <asm/io.h>
> diff --git a/arch/m68k/cpu/mcf530x/cpu_init.c b/arch/m68k/cpu/mcf530x/cpu_init.c
> index 166720aef5..83529408eb 100644
> --- a/arch/m68k/cpu/mcf530x/cpu_init.c
> +++ b/arch/m68k/cpu/mcf530x/cpu_init.c
> @@ -6,6 +6,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <watchdog.h>
>  #include <asm/immap.h>
>  #include <asm/io.h>
> diff --git a/arch/m68k/cpu/mcf532x/cpu.c b/arch/m68k/cpu/mcf532x/cpu.c
> index 32c477a5fd..52b64a94a7 100644
> --- a/arch/m68k/cpu/mcf532x/cpu.c
> +++ b/arch/m68k/cpu/mcf532x/cpu.c
> @@ -9,6 +9,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <net.h>
>  #include <vsprintf.h>
>  #include <watchdog.h>
> diff --git a/arch/m68k/cpu/mcf532x/cpu_init.c b/arch/m68k/cpu/mcf532x/cpu_init.c
> index bd130c1b0c..1311f3967c 100644
> --- a/arch/m68k/cpu/mcf532x/cpu_init.c
> +++ b/arch/m68k/cpu/mcf532x/cpu_init.c
> @@ -10,6 +10,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <watchdog.h>
>  #include <asm/immap.h>
>  #include <asm/io.h>
> diff --git a/arch/m68k/cpu/mcf5445x/cpu.c b/arch/m68k/cpu/mcf5445x/cpu.c
> index 1602369080..cb1514c600 100644
> --- a/arch/m68k/cpu/mcf5445x/cpu.c
> +++ b/arch/m68k/cpu/mcf5445x/cpu.c
> @@ -9,6 +9,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <net.h>
>  #include <vsprintf.h>
>  #include <watchdog.h>
> diff --git a/arch/m68k/cpu/mcf5445x/cpu_init.c b/arch/m68k/cpu/mcf5445x/cpu_init.c
> index 6ee23f0db2..9deab51d07 100644
> --- a/arch/m68k/cpu/mcf5445x/cpu_init.c
> +++ b/arch/m68k/cpu/mcf5445x/cpu_init.c
> @@ -10,6 +10,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <watchdog.h>
>  #include <asm/immap.h>
>  #include <asm/processor.h>
> diff --git a/arch/m68k/cpu/mcf547x_8x/cpu.c b/arch/m68k/cpu/mcf547x_8x/cpu.c
> index 51281549a3..2a64c7b6f6 100644
> --- a/arch/m68k/cpu/mcf547x_8x/cpu.c
> +++ b/arch/m68k/cpu/mcf547x_8x/cpu.c
> @@ -9,6 +9,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <net.h>
>  #include <vsprintf.h>
>  #include <watchdog.h>
> diff --git a/arch/m68k/cpu/mcf547x_8x/cpu_init.c b/arch/m68k/cpu/mcf547x_8x/cpu_init.c
> index 8779384c0a..8e42b63141 100644
> --- a/arch/m68k/cpu/mcf547x_8x/cpu_init.c
> +++ b/arch/m68k/cpu/mcf547x_8x/cpu_init.c
> @@ -11,6 +11,7 @@
>  #include <common.h>
>  #include <MCD_dma.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <asm/immap.h>
>  #include <asm/io.h>
>
> diff --git a/arch/m68k/cpu/mcf547x_8x/slicetimer.c b/arch/m68k/cpu/mcf547x_8x/slicetimer.c
> index 885659e342..c4988f9031 100644
> --- a/arch/m68k/cpu/mcf547x_8x/slicetimer.c
> +++ b/arch/m68k/cpu/mcf547x_8x/slicetimer.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <irq_func.h>
>
>  #include <asm/timer.h>
> diff --git a/arch/m68k/lib/time.c b/arch/m68k/lib/time.c
> index bde1f4c228..eab6e2088e 100644
> --- a/arch/m68k/lib/time.c
> +++ b/arch/m68k/lib/time.c
> @@ -7,6 +7,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <irq_func.h>
>  #include <time.h>
>
> diff --git a/arch/microblaze/cpu/timer.c b/arch/microblaze/cpu/timer.c
> index 805eac7fa3..e07fc628d1 100644
> --- a/arch/microblaze/cpu/timer.c
> +++ b/arch/microblaze/cpu/timer.c
> @@ -7,6 +7,7 @@
>
>  #include <common.h>
>  #include <fdtdec.h>
> +#include <init.h>
>  #include <time.h>
>  #include <asm/microblaze_timer.h>
>  #include <asm/microblaze_intc.h>
> diff --git a/arch/mips/cpu/cpu.c b/arch/mips/cpu/cpu.c
> index a403ff729b..682bee6be2 100644
> --- a/arch/mips/cpu/cpu.c
> +++ b/arch/mips/cpu/cpu.c
> @@ -6,6 +6,7 @@
>
>  #include <common.h>
>  #include <command.h>
> +#include <init.h>
>  #include <linux/compiler.h>
>  #include <asm/cache.h>
>  #include <asm/mipsregs.h>
> diff --git a/arch/mips/lib/stack.c b/arch/mips/lib/stack.c
> index 99fd056905..4d1d98c3ad 100644
> --- a/arch/mips/lib/stack.c
> +++ b/arch/mips/lib/stack.c
> @@ -1,6 +1,7 @@
>  // SPDX-License-Identifier: GPL-2.0+
>
>  #include <common.h>
> +#include <init.h>
>
>  DECLARE_GLOBAL_DATA_PTR;
>
> diff --git a/arch/mips/mach-ath79/cpu.c b/arch/mips/mach-ath79/cpu.c
> index 9afc672602..31e87d6206 100644
> --- a/arch/mips/mach-ath79/cpu.c
> +++ b/arch/mips/mach-ath79/cpu.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/addrspace.h>
>  #include <asm/types.h>
> diff --git a/arch/mips/mach-bmips/dram.c b/arch/mips/mach-bmips/dram.c
> index 87ced7c5d5..764ce89231 100644
> --- a/arch/mips/mach-bmips/dram.c
> +++ b/arch/mips/mach-bmips/dram.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <ram.h>
>  #include <dm.h>
>
> diff --git a/arch/mips/mach-jz47xx/jz4780/sdram.c b/arch/mips/mach-jz47xx/jz4780/sdram.c
> index 65afefe53e..3049a63d57 100644
> --- a/arch/mips/mach-jz47xx/jz4780/sdram.c
> +++ b/arch/mips/mach-jz47xx/jz4780/sdram.c
> @@ -11,6 +11,7 @@
>
>  #include <common.h>
>  #include <hang.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <mach/jz4780.h>
>  #include <mach/jz4780_dram.h>
> diff --git a/arch/mips/mach-jz47xx/jz4780/timer.c b/arch/mips/mach-jz47xx/jz4780/timer.c
> index b32a2f5643..340e35e6fc 100644
> --- a/arch/mips/mach-jz47xx/jz4780/timer.c
> +++ b/arch/mips/mach-jz47xx/jz4780/timer.c
> @@ -9,6 +9,7 @@
>  #include <config.h>
>  #include <common.h>
>  #include <div64.h>
> +#include <init.h>
>  #include <irq_func.h>
>  #include <time.h>
>  #include <asm/io.h>
> diff --git a/arch/mips/mach-mscc/cpu.c b/arch/mips/mach-mscc/cpu.c
> index 3ee589891b..8273a0f5aa 100644
> --- a/arch/mips/mach-mscc/cpu.c
> +++ b/arch/mips/mach-mscc/cpu.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>
>  #include <asm/io.h>
>  #include <asm/types.h>
> diff --git a/arch/mips/mach-mscc/dram.c b/arch/mips/mach-mscc/dram.c
> index 72c70c9e84..b12bac63c2 100644
> --- a/arch/mips/mach-mscc/dram.c
> +++ b/arch/mips/mach-mscc/dram.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>
>  #include <asm/io.h>
>  #include <asm/types.h>
> diff --git a/arch/mips/mach-mtmips/cpu.c b/arch/mips/mach-mtmips/cpu.c
> index 459a9673eb..9ee5c7fdf6 100644
> --- a/arch/mips/mach-mtmips/cpu.c
> +++ b/arch/mips/mach-mtmips/cpu.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <linux/io.h>
>  #include <linux/sizes.h>
> diff --git a/arch/mips/mach-mtmips/spl.c b/arch/mips/mach-mtmips/spl.c
> index 2a24af70c3..38d9e9160d 100644
> --- a/arch/mips/mach-mtmips/spl.c
> +++ b/arch/mips/mach-mtmips/spl.c
> @@ -7,6 +7,7 @@
>
>  #include <common.h>
>  #include <fdt.h>
> +#include <init.h>
>  #include <spl.h>
>  #include <asm/sections.h>
>  #include <linux/sizes.h>
> diff --git a/arch/mips/mach-pic32/cpu.c b/arch/mips/mach-pic32/cpu.c
> index 8075d93d41..1d8c397144 100644
> --- a/arch/mips/mach-pic32/cpu.c
> +++ b/arch/mips/mach-pic32/cpu.c
> @@ -7,6 +7,7 @@
>  #include <common.h>
>  #include <clk.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <mach/pic32.h>
>  #include <mach/ddr.h>
> diff --git a/arch/nds32/cpu/n1213/ag101/timer.c b/arch/nds32/cpu/n1213/ag101/timer.c
> index f2e362102e..c59585692d 100644
> --- a/arch/nds32/cpu/n1213/ag101/timer.c
> +++ b/arch/nds32/cpu/n1213/ag101/timer.c
> @@ -9,6 +9,7 @@
>   */
>  #ifndef CONFIG_TIMER
>  #include <common.h>
> +#include <init.h>
>  #include <irq_func.h>
>  #include <time.h>
>  #include <asm/io.h>
> diff --git a/arch/nios2/cpu/cpu.c b/arch/nios2/cpu/cpu.c
> index 37ffa8f4a4..9008db6aa5 100644
> --- a/arch/nios2/cpu/cpu.c
> +++ b/arch/nios2/cpu/cpu.c
> @@ -9,6 +9,7 @@
>  #include <cpu_func.h>
>  #include <dm.h>
>  #include <errno.h>
> +#include <init.h>
>  #include <irq_func.h>
>  #include <asm/cache.h>
>
> diff --git a/arch/powerpc/cpu/mpc83xx/pci.c b/arch/powerpc/cpu/mpc83xx/pci.c
> index 665ac378c8..a183ed6343 100644
> --- a/arch/powerpc/cpu/mpc83xx/pci.c
> +++ b/arch/powerpc/cpu/mpc83xx/pci.c
> @@ -7,6 +7,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <pci.h>
>
>  #if defined(CONFIG_OF_LIBFDT)
> diff --git a/arch/powerpc/cpu/mpc85xx/cmd_errata.c b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
> index e455d8baf5..d3167f6cb9 100644
> --- a/arch/powerpc/cpu/mpc85xx/cmd_errata.c
> +++ b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <command.h>
> +#include <init.h>
>  #include <linux/compiler.h>
>  #include <fsl_errata.h>
>  #include <asm/processor.h>
> diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c
> index 9f9eed165b..eff0d5d7e2 100644
> --- a/arch/powerpc/cpu/mpc85xx/cpu.c
> +++ b/arch/powerpc/cpu/mpc85xx/cpu.c
> @@ -11,6 +11,7 @@
>  #include <config.h>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <irq_func.h>
>  #include <time.h>
>  #include <vsprintf.h>
> diff --git a/arch/powerpc/cpu/mpc86xx/cpu_init.c b/arch/powerpc/cpu/mpc86xx/cpu_init.c
> index 89add62dc1..34752a34af 100644
> --- a/arch/powerpc/cpu/mpc86xx/cpu_init.c
> +++ b/arch/powerpc/cpu/mpc86xx/cpu_init.c
> @@ -11,6 +11,7 @@
>
>  #include <config.h>
>  #include <common.h>
> +#include <init.h>
>  #include <mpc86xx.h>
>  #include <asm/mmu.h>
>  #include <asm/fsl_law.h>
> diff --git a/arch/powerpc/cpu/mpc8xx/cpu_init.c b/arch/powerpc/cpu/mpc8xx/cpu_init.c
> index 8bd6d0fbcf..c8d06b0508 100644
> --- a/arch/powerpc/cpu/mpc8xx/cpu_init.c
> +++ b/arch/powerpc/cpu/mpc8xx/cpu_init.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <watchdog.h>
>
>  #include <mpc8xx.h>
> diff --git a/arch/powerpc/cpu/mpc8xxx/cpu.c b/arch/powerpc/cpu/mpc8xxx/cpu.c
> index bb81f49ae7..da0a80e6fc 100644
> --- a/arch/powerpc/cpu/mpc8xxx/cpu.c
> +++ b/arch/powerpc/cpu/mpc8xxx/cpu.c
> @@ -11,6 +11,7 @@
>  #include <common.h>
>  #include <command.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <net.h>
>  #include <tsec.h>
>  #include <fm_eth.h>
> diff --git a/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c b/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c
> index afcb75ba17..29489b46e6 100644
> --- a/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c
> +++ b/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <hang.h>
> +#include <init.h>
>  #include <asm/fsl_lbc.h>
>
>  #ifdef CONFIG_MPC83xx
> diff --git a/arch/powerpc/lib/stack.c b/arch/powerpc/lib/stack.c
> index 9a956c221d..5840fe6349 100644
> --- a/arch/powerpc/lib/stack.c
> +++ b/arch/powerpc/lib/stack.c
> @@ -11,6 +11,7 @@
>   * Marius Groeger <mgroeger@sysgo.de>
>   */
>  #include <common.h>
> +#include <init.h>
>
>  DECLARE_GLOBAL_DATA_PTR;
>
> diff --git a/arch/powerpc/lib/time.c b/arch/powerpc/lib/time.c
> index e1494fa129..58931f0e6e 100644
> --- a/arch/powerpc/lib/time.c
> +++ b/arch/powerpc/lib/time.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <time.h>
>  #include <asm/io.h>
>
> diff --git a/arch/riscv/cpu/cpu.c b/arch/riscv/cpu/cpu.c
> index e457f6acbf..1cebb0322e 100644
> --- a/arch/riscv/cpu/cpu.c
> +++ b/arch/riscv/cpu/cpu.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <cpu.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <log.h>
>  #include <asm/encoding.h>
>  #include <dm/uclass-internal.h>
> diff --git a/arch/riscv/lib/spl.c b/arch/riscv/lib/spl.c
> index 4ca038b148..f3f603b76e 100644
> --- a/arch/riscv/lib/spl.c
> +++ b/arch/riscv/lib/spl.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <cpu_func.h>
>  #include <hang.h>
> +#include <init.h>
>  #include <spl.h>
>  #include <asm/smp.h>
>
> diff --git a/arch/sandbox/cpu/spl.c b/arch/sandbox/cpu/spl.c
> index d5f683bbaa..b92db85c22 100644
> --- a/arch/sandbox/cpu/spl.c
> +++ b/arch/sandbox/cpu/spl.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <hang.h>
> +#include <init.h>
>  #include <os.h>
>  #include <spl.h>
>  #include <asm/spl.h>
> diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c
> index b6ff5c3d64..c6a2bbe468 100644
> --- a/arch/sandbox/cpu/start.c
> +++ b/arch/sandbox/cpu/start.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <command.h>
>  #include <errno.h>
> +#include <init.h>
>  #include <os.h>
>  #include <cli.h>
>  #include <sort.h>
> diff --git a/arch/sh/lib/time.c b/arch/sh/lib/time.c
> index 51e1cc1181..d09f782f5f 100644
> --- a/arch/sh/lib/time.c
> +++ b/arch/sh/lib/time.c
> @@ -11,6 +11,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/processor.h>
>  #include <asm/io.h>
>
> diff --git a/arch/sh/lib/time_sh2.c b/arch/sh/lib/time_sh2.c
> index d82c1d2feb..ef7c6073cc 100644
> --- a/arch/sh/lib/time_sh2.c
> +++ b/arch/sh/lib/time_sh2.c
> @@ -8,6 +8,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <time.h>
>  #include <asm/io.h>
>  #include <asm/processor.h>
> diff --git a/arch/x86/cpu/apollolake/cpu_spl.c b/arch/x86/cpu/apollolake/cpu_spl.c
> index e2509e391f..707ceb3e64 100644
> --- a/arch/x86/cpu/apollolake/cpu_spl.c
> +++ b/arch/x86/cpu/apollolake/cpu_spl.c
> @@ -8,6 +8,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <ec_commands.h>
> +#include <init.h>
>  #include <log.h>
>  #include <spi_flash.h>
>  #include <spl.h>
> diff --git a/arch/x86/cpu/apollolake/fsp_s.c b/arch/x86/cpu/apollolake/fsp_s.c
> index fd6e73dfc8..30b820fdbc 100644
> --- a/arch/x86/cpu/apollolake/fsp_s.c
> +++ b/arch/x86/cpu/apollolake/fsp_s.c
> @@ -8,6 +8,7 @@
>  #include <binman.h>
>  #include <bootstage.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <irq.h>
>  #include <malloc.h>
>  #include <acpi/acpi_s3.h>
> diff --git a/arch/x86/cpu/braswell/braswell.c b/arch/x86/cpu/braswell/braswell.c
> index 7a83b06005..3345049993 100644
> --- a/arch/x86/cpu/braswell/braswell.c
> +++ b/arch/x86/cpu/braswell/braswell.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/mrccache.h>
>  #include <asm/post.h>
>
> diff --git a/arch/x86/cpu/broadwell/cpu.c b/arch/x86/cpu/broadwell/cpu.c
> index 55a7439f1c..793167937c 100644
> --- a/arch/x86/cpu/broadwell/cpu.c
> +++ b/arch/x86/cpu/broadwell/cpu.c
> @@ -8,6 +8,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <cpu.h>
> +#include <init.h>
>  #include <asm/cpu.h>
>  #include <asm/cpu_x86.h>
>  #include <asm/cpu_common.h>
> diff --git a/arch/x86/cpu/broadwell/cpu_from_spl.c b/arch/x86/cpu/broadwell/cpu_from_spl.c
> index 2aa6f245e7..17ff43b58e 100644
> --- a/arch/x86/cpu/broadwell/cpu_from_spl.c
> +++ b/arch/x86/cpu/broadwell/cpu_from_spl.c
> @@ -9,6 +9,7 @@
>  #include <cpu_func.h>
>  #include <debug_uart.h>
>  #include <handoff.h>
> +#include <init.h>
>  #include <asm/mtrr.h>
>
>  int misc_init_r(void)
> diff --git a/arch/x86/cpu/broadwell/cpu_full.c b/arch/x86/cpu/broadwell/cpu_full.c
> index 895edeb4bc..3d42b1caac 100644
> --- a/arch/x86/cpu/broadwell/cpu_full.c
> +++ b/arch/x86/cpu/broadwell/cpu_full.c
> @@ -8,6 +8,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <cpu.h>
> +#include <init.h>
>  #include <asm/cpu.h>
>  #include <asm/cpu_x86.h>
>  #include <asm/cpu_common.h>
> diff --git a/arch/x86/cpu/broadwell/refcode.c b/arch/x86/cpu/broadwell/refcode.c
> index f016489185..b944896e75 100644
> --- a/arch/x86/cpu/broadwell/refcode.c
> +++ b/arch/x86/cpu/broadwell/refcode.c
> @@ -8,6 +8,7 @@
>
>  #include <common.h>
>  #include <errno.h>
> +#include <init.h>
>  #include <asm/arch/pei_data.h>
>
>  #define RMODULE_MAGIC          0xf8fe
> diff --git a/arch/x86/cpu/coreboot/coreboot.c b/arch/x86/cpu/coreboot/coreboot.c
> index 624caf67a6..d44db1347b 100644
> --- a/arch/x86/cpu/coreboot/coreboot.c
> +++ b/arch/x86/cpu/coreboot/coreboot.c
> @@ -8,6 +8,7 @@
>  #include <common.h>
>  #include <cpu_func.h>
>  #include <fdtdec.h>
> +#include <init.h>
>  #include <usb.h>
>  #include <asm/io.h>
>  #include <asm/msr.h>
> diff --git a/arch/x86/cpu/efi/app.c b/arch/x86/cpu/efi/app.c
> index 13077411dc..10677ecbc2 100644
> --- a/arch/x86/cpu/efi/app.c
> +++ b/arch/x86/cpu/efi/app.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <cpu_func.h>
>  #include <fdtdec.h>
> +#include <init.h>
>  #include <netdev.h>
>
>  int arch_cpu_init(void)
> diff --git a/arch/x86/cpu/intel_common/cpu_from_spl.c b/arch/x86/cpu/intel_common/cpu_from_spl.c
> index b7bb524162..e4157c5734 100644
> --- a/arch/x86/cpu/intel_common/cpu_from_spl.c
> +++ b/arch/x86/cpu/intel_common/cpu_from_spl.c
> @@ -7,6 +7,7 @@
>  #include <dm.h>
>  #include <errno.h>
>  #include <handoff.h>
> +#include <init.h>
>  #include <asm/cpu_common.h>
>  #include <asm/intel_regs.h>
>  #include <asm/lapic.h>
> diff --git a/arch/x86/cpu/ivybridge/cpu.c b/arch/x86/cpu/ivybridge/cpu.c
> index 8f30cdbe24..0639b5cf02 100644
> --- a/arch/x86/cpu/ivybridge/cpu.c
> +++ b/arch/x86/cpu/ivybridge/cpu.c
> @@ -15,6 +15,7 @@
>  #include <dm.h>
>  #include <errno.h>
>  #include <fdtdec.h>
> +#include <init.h>
>  #include <pch.h>
>  #include <asm/cpu.h>
>  #include <asm/cpu_common.h>
> diff --git a/arch/x86/cpu/ivybridge/ivybridge.c b/arch/x86/cpu/ivybridge/ivybridge.c
> index 8d10fd6c54..eb3f362e4e 100644
> --- a/arch/x86/cpu/ivybridge/ivybridge.c
> +++ b/arch/x86/cpu/ivybridge/ivybridge.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/post.h>
>  #include <asm/processor.h>
>
> diff --git a/arch/x86/cpu/ivybridge/sdram_nop.c b/arch/x86/cpu/ivybridge/sdram_nop.c
> index c55213ca2d..54e6acf262 100644
> --- a/arch/x86/cpu/ivybridge/sdram_nop.c
> +++ b/arch/x86/cpu/ivybridge/sdram_nop.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>
>  DECLARE_GLOBAL_DATA_PTR;
>
> diff --git a/arch/x86/cpu/qemu/qemu.c b/arch/x86/cpu/qemu/qemu.c
> index 716351ad7f..044a429c13 100644
> --- a/arch/x86/cpu/qemu/qemu.c
> +++ b/arch/x86/cpu/qemu/qemu.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <pci.h>
>  #include <qfw.h>
>  #include <asm/irq.h>
> diff --git a/arch/x86/cpu/quark/quark.c b/arch/x86/cpu/quark/quark.c
> index 46c6d00eb4..e2e2d9fe33 100644
> --- a/arch/x86/cpu/quark/quark.c
> +++ b/arch/x86/cpu/quark/quark.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <mmc.h>
>  #include <asm/cache.h>
>  #include <asm/io.h>
> diff --git a/arch/x86/cpu/queensbay/tnc.c b/arch/x86/cpu/queensbay/tnc.c
> index 66737e655b..782ed863fe 100644
> --- a/arch/x86/cpu/queensbay/tnc.c
> +++ b/arch/x86/cpu/queensbay/tnc.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <dm/device-internal.h>
>  #include <pci.h>
>  #include <asm/io.h>
> diff --git a/arch/x86/cpu/slimbootloader/slimbootloader.c b/arch/x86/cpu/slimbootloader/slimbootloader.c
> index 21dcfb2142..889fba5473 100644
> --- a/arch/x86/cpu/slimbootloader/slimbootloader.c
> +++ b/arch/x86/cpu/slimbootloader/slimbootloader.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <asm/arch/slimbootloader.h>
>
>  DECLARE_GLOBAL_DATA_PTR;
> diff --git a/arch/x86/cpu/tangier/tangier.c b/arch/x86/cpu/tangier/tangier.c
> index 43bee1fb70..1e2f6cc8b7 100644
> --- a/arch/x86/cpu/tangier/tangier.c
> +++ b/arch/x86/cpu/tangier/tangier.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <asm/u-boot-x86.h>
>
>  /*
> diff --git a/arch/x86/cpu/x86_64/cpu.c b/arch/x86/cpu/x86_64/cpu.c
> index 4b64339f25..1b4d3971b0 100644
> --- a/arch/x86/cpu/x86_64/cpu.c
> +++ b/arch/x86/cpu/x86_64/cpu.c
> @@ -7,6 +7,7 @@
>  #include <common.h>
>  #include <cpu_func.h>
>  #include <debug_uart.h>
> +#include <init.h>
>
>  /*
>   * Global declaration of gd.
> diff --git a/arch/x86/lib/fsp/fsp_common.c b/arch/x86/lib/fsp/fsp_common.c
> index 267527eb34..114d3d9cf8 100644
> --- a/arch/x86/lib/fsp/fsp_common.c
> +++ b/arch/x86/lib/fsp/fsp_common.c
> @@ -7,6 +7,7 @@
>  #include <cpu_func.h>
>  #include <dm.h>
>  #include <errno.h>
> +#include <init.h>
>  #include <rtc.h>
>  #include <acpi/acpi_s3.h>
>  #include <asm/cmos_layout.h>
> diff --git a/arch/x86/lib/fsp/fsp_graphics.c b/arch/x86/lib/fsp/fsp_graphics.c
> index 98b762209f..0e71583a49 100644
> --- a/arch/x86/lib/fsp/fsp_graphics.c
> +++ b/arch/x86/lib/fsp/fsp_graphics.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <vbe.h>
>  #include <video.h>
>  #include <asm/fsp/fsp_support.h>
> diff --git a/arch/x86/lib/fsp1/fsp_common.c b/arch/x86/lib/fsp1/fsp_common.c
> index 0a726807c2..312283ae9d 100644
> --- a/arch/x86/lib/fsp1/fsp_common.c
> +++ b/arch/x86/lib/fsp1/fsp_common.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <errno.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <rtc.h>
>  #include <acpi/acpi_s3.h>
> diff --git a/arch/x86/lib/fsp1/fsp_dram.c b/arch/x86/lib/fsp1/fsp_dram.c
> index 5ef89744b9..e3f9e30f6a 100644
> --- a/arch/x86/lib/fsp1/fsp_dram.c
> +++ b/arch/x86/lib/fsp1/fsp_dram.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/fsp/fsp_support.h>
>
>  int dram_init(void)
> diff --git a/arch/x86/lib/fsp2/fsp_dram.c b/arch/x86/lib/fsp2/fsp_dram.c
> index 3869c53c5f..e2e6efd8b0 100644
> --- a/arch/x86/lib/fsp2/fsp_dram.c
> +++ b/arch/x86/lib/fsp2/fsp_dram.c
> @@ -6,6 +6,7 @@
>
>  #include <common.h>
>  #include <handoff.h>
> +#include <init.h>
>  #include <spl.h>
>  #include <acpi/acpi_s3.h>
>  #include <asm/arch/cpu.h>
> diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c
> index bdae9291e7..fb8d40c02d 100644
> --- a/arch/x86/lib/spl.c
> +++ b/arch/x86/lib/spl.c
> @@ -9,6 +9,7 @@
>  #include <dm.h>
>  #include <hang.h>
>  #include <image.h>
> +#include <init.h>
>  #include <irq_func.h>
>  #include <malloc.h>
>  #include <spl.h>
> diff --git a/arch/x86/lib/tpl.c b/arch/x86/lib/tpl.c
> index f9dcf32d73..ac265b6744 100644
> --- a/arch/x86/lib/tpl.c
> +++ b/arch/x86/lib/tpl.c
> @@ -8,6 +8,7 @@
>  #include <dm.h>
>  #include <hang.h>
>  #include <image.h>
> +#include <init.h>
>  #include <spl.h>
>  #include <asm/cpu.h>
>  #include <asm/mtrr.h>
> diff --git a/arch/xtensa/cpu/cpu.c b/arch/xtensa/cpu/cpu.c
> index 6f4b88f88e..85d3464607 100644
> --- a/arch/xtensa/cpu/cpu.c
> +++ b/arch/xtensa/cpu/cpu.c
> @@ -10,6 +10,7 @@
>
>  #include <common.h>
>  #include <command.h>
> +#include <init.h>
>  #include <vsprintf.h>
>  #include <linux/stringify.h>
>  #include <asm/global_data.h>
> diff --git a/board/BuR/brppt2/board.c b/board/BuR/brppt2/board.c
> index c91d2f9494..f156b552a7 100644
> --- a/board/BuR/brppt2/board.c
> +++ b/board/BuR/brppt2/board.c
> @@ -9,6 +9,7 @@
>  #include <common.h>
>  #include <cpu_func.h>
>  #include <hang.h>
> +#include <init.h>
>  #include <spl.h>
>  #include <dm.h>
>  #include <miiphy.h>
> diff --git a/board/LaCie/net2big_v2/net2big_v2.c b/board/LaCie/net2big_v2/net2big_v2.c
> index 50305656e8..8b97e1a533 100644
> --- a/board/LaCie/net2big_v2/net2big_v2.c
> +++ b/board/LaCie/net2big_v2/net2big_v2.c
> @@ -12,6 +12,7 @@
>  #include <command.h>
>  #include <env.h>
>  #include <i2c.h>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/mach-types.h>
>  #include <asm/arch/cpu.h>
> diff --git a/board/LaCie/netspace_v2/netspace_v2.c b/board/LaCie/netspace_v2/netspace_v2.c
> index b7ae58c645..f9bf527739 100644
> --- a/board/LaCie/netspace_v2/netspace_v2.c
> +++ b/board/LaCie/netspace_v2/netspace_v2.c
> @@ -11,6 +11,7 @@
>  #include <common.h>
>  #include <command.h>
>  #include <env.h>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/mach-types.h>
>  #include <asm/arch/cpu.h>
> diff --git a/board/Marvell/aspenite/aspenite.c b/board/Marvell/aspenite/aspenite.c
> index c4e506ff3b..c1406d7489 100644
> --- a/board/Marvell/aspenite/aspenite.c
> +++ b/board/Marvell/aspenite/aspenite.c
> @@ -7,6 +7,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <mvmfp.h>
>  #include <asm/mach-types.h>
>  #include <asm/arch/cpu.h>
> diff --git a/board/Marvell/db-88f6281-bp/db-88f6281-bp.c b/board/Marvell/db-88f6281-bp/db-88f6281-bp.c
> index 729516d9e1..a6f1167e39 100644
> --- a/board/Marvell/db-88f6281-bp/db-88f6281-bp.c
> +++ b/board/Marvell/db-88f6281-bp/db-88f6281-bp.c
> @@ -1,6 +1,7 @@
>  // SPDX-License-Identifier: GPL-2.0+
>
>  #include <common.h>
> +#include <init.h>
>  #include <net.h>
>  #include <linux/io.h>
>  #include <miiphy.h>
> diff --git a/board/Marvell/db-88f6720/db-88f6720.c b/board/Marvell/db-88f6720/db-88f6720.c
> index 3e975801b8..ba0a944b9a 100644
> --- a/board/Marvell/db-88f6720/db-88f6720.c
> +++ b/board/Marvell/db-88f6720/db-88f6720.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <miiphy.h>
>  #include <net.h>
>  #include <netdev.h>
> diff --git a/board/Marvell/db-88f6820-amc/db-88f6820-amc.c b/board/Marvell/db-88f6820-amc/db-88f6820-amc.c
> index 372beb3c43..f225f467bf 100644
> --- a/board/Marvell/db-88f6820-amc/db-88f6820-amc.c
> +++ b/board/Marvell/db-88f6820-amc/db-88f6820-amc.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <i2c.h>
> +#include <init.h>
>  #include <miiphy.h>
>  #include <net.h>
>  #include <netdev.h>
> diff --git a/board/Marvell/db-88f6820-gp/db-88f6820-gp.c b/board/Marvell/db-88f6820-gp/db-88f6820-gp.c
> index f3df7e666b..53a80c949b 100644
> --- a/board/Marvell/db-88f6820-gp/db-88f6820-gp.c
> +++ b/board/Marvell/db-88f6820-gp/db-88f6820-gp.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <i2c.h>
> +#include <init.h>
>  #include <miiphy.h>
>  #include <net.h>
>  #include <netdev.h>
> diff --git a/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c b/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c
> index e7808f5a5c..cb65357844 100644
> --- a/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c
> +++ b/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <miiphy.h>
>  #include <net.h>
>  #include <netdev.h>
> diff --git a/board/Marvell/db-xc3-24g4xg/db-xc3-24g4xg.c b/board/Marvell/db-xc3-24g4xg/db-xc3-24g4xg.c
> index cae428ffd0..1153b188e7 100644
> --- a/board/Marvell/db-xc3-24g4xg/db-xc3-24g4xg.c
> +++ b/board/Marvell/db-xc3-24g4xg/db-xc3-24g4xg.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <i2c.h>
> +#include <init.h>
>  #include <asm/gpio.h>
>  #include <linux/mbus.h>
>  #include <linux/io.h>
> diff --git a/board/Marvell/dreamplug/dreamplug.c b/board/Marvell/dreamplug/dreamplug.c
> index 887dd1ed74..7d188c3279 100644
> --- a/board/Marvell/dreamplug/dreamplug.c
> +++ b/board/Marvell/dreamplug/dreamplug.c
> @@ -9,6 +9,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <miiphy.h>
>  #include <net.h>
>  #include <asm/arch/cpu.h>
> diff --git a/board/Marvell/gplugd/gplugd.c b/board/Marvell/gplugd/gplugd.c
> index fc2bc85f00..10236bd07f 100644
> --- a/board/Marvell/gplugd/gplugd.c
> +++ b/board/Marvell/gplugd/gplugd.c
> @@ -12,6 +12,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <mvmfp.h>
>  #include <asm/arch/cpu.h>
>  #include <asm/arch/mfp.h>
> diff --git a/board/Marvell/guruplug/guruplug.c b/board/Marvell/guruplug/guruplug.c
> index 71bee76bdc..f3981c66d2 100644
> --- a/board/Marvell/guruplug/guruplug.c
> +++ b/board/Marvell/guruplug/guruplug.c
> @@ -6,6 +6,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <miiphy.h>
>  #include <net.h>
>  #include <asm/mach-types.h>
> diff --git a/board/Marvell/mvebu_armada-37xx/board.c b/board/Marvell/mvebu_armada-37xx/board.c
> index bef4e1767c..29bd6a9a40 100644
> --- a/board/Marvell/mvebu_armada-37xx/board.c
> +++ b/board/Marvell/mvebu_armada-37xx/board.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <i2c.h>
> +#include <init.h>
>  #include <phy.h>
>  #include <asm/io.h>
>  #include <asm/arch/cpu.h>
> diff --git a/board/Marvell/openrd/openrd.c b/board/Marvell/openrd/openrd.c
> index ae9202895d..d9b5b213fe 100644
> --- a/board/Marvell/openrd/openrd.c
> +++ b/board/Marvell/openrd/openrd.c
> @@ -11,6 +11,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <miiphy.h>
>  #include <net.h>
>  #include <asm/mach-types.h>
> diff --git a/board/Marvell/sheevaplug/sheevaplug.c b/board/Marvell/sheevaplug/sheevaplug.c
> index 6c6106c23c..6311ed3b2e 100644
> --- a/board/Marvell/sheevaplug/sheevaplug.c
> +++ b/board/Marvell/sheevaplug/sheevaplug.c
> @@ -6,6 +6,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <miiphy.h>
>  #include <net.h>
>  #include <asm/mach-types.h>
> diff --git a/board/Seagate/dockstar/dockstar.c b/board/Seagate/dockstar/dockstar.c
> index 0ff8a9053e..85dd10e55a 100644
> --- a/board/Seagate/dockstar/dockstar.c
> +++ b/board/Seagate/dockstar/dockstar.c
> @@ -10,6 +10,7 @@
>
>  #include <common.h>
>  #include <bootstage.h>
> +#include <init.h>
>  #include <miiphy.h>
>  #include <net.h>
>  #include <asm/arch/soc.h>
> diff --git a/board/Seagate/goflexhome/goflexhome.c b/board/Seagate/goflexhome/goflexhome.c
> index fd2f0df371..de1ec54466 100644
> --- a/board/Seagate/goflexhome/goflexhome.c
> +++ b/board/Seagate/goflexhome/goflexhome.c
> @@ -13,6 +13,7 @@
>
>  #include <common.h>
>  #include <bootstage.h>
> +#include <init.h>
>  #include <miiphy.h>
>  #include <net.h>
>  #include <asm/mach-types.h>
> diff --git a/board/Seagate/nas220/nas220.c b/board/Seagate/nas220/nas220.c
> index 99462052f0..3a027d083a 100644
> --- a/board/Seagate/nas220/nas220.c
> +++ b/board/Seagate/nas220/nas220.c
> @@ -9,6 +9,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <miiphy.h>
>  #include <net.h>
>  #include <asm/mach-types.h>
> diff --git a/board/Synology/ds109/ds109.c b/board/Synology/ds109/ds109.c
> index f2031ef3bb..c4cd95cd80 100644
> --- a/board/Synology/ds109/ds109.c
> +++ b/board/Synology/ds109/ds109.c
> @@ -6,6 +6,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <miiphy.h>
>  #include <net.h>
>  #include <asm/setup.h>
> diff --git a/board/Synology/ds414/ds414.c b/board/Synology/ds414/ds414.c
> index d23e97c9b9..deb530fe78 100644
> --- a/board/Synology/ds414/ds414.c
> +++ b/board/Synology/ds414/ds414.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <miiphy.h>
>  #include <asm/io.h>
>  #include <asm/arch/cpu.h>
> diff --git a/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c b/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c
> index bb7913025d..772e21b9c5 100644
> --- a/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c
> +++ b/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c
> @@ -7,6 +7,7 @@
>  #include <common.h>
>  #include <cpu_func.h>
>  #include <errno.h>
> +#include <init.h>
>  #include <linux/libfdt.h>
>  #include <asm/io.h>
>  #include <asm/gpio.h>
> diff --git a/board/advantech/imx8qm_rom7720_a1/spl.c b/board/advantech/imx8qm_rom7720_a1/spl.c
> index 6863da82d6..21ebd5dddb 100644
> --- a/board/advantech/imx8qm_rom7720_a1/spl.c
> +++ b/board/advantech/imx8qm_rom7720_a1/spl.c
> @@ -5,6 +5,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <image.h>
> +#include <init.h>
>  #include <spl.h>
>  #include <fsl_esdhc.h>
>
> diff --git a/board/advantech/som-db5800-som-6867/som-db5800-som-6867.c b/board/advantech/som-db5800-som-6867/som-db5800-som-6867.c
> index 8f4c587371..8499fc541f 100644
> --- a/board/advantech/som-db5800-som-6867/som-db5800-som-6867.c
> +++ b/board/advantech/som-db5800-som-6867/som-db5800-som-6867.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/fsp1/fsp_support.h>
>
>  /* ALC262 Verb Table - 10EC0262 */
> diff --git a/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c b/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c
> index 1f3f293bd9..b96cf0b59c 100644
> --- a/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c
> +++ b/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <net.h>
>  #include <linux/io.h>
>  #include <miiphy.h>
> diff --git a/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c b/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c
> index 889ce70d75..5c9124fbb4 100644
> --- a/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c
> +++ b/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <miiphy.h>
>  #include <net.h>
>  #include <netdev.h>
> diff --git a/board/alliedtelesis/x530/x530.c b/board/alliedtelesis/x530/x530.c
> index 04b053dc20..1a6dec04a3 100644
> --- a/board/alliedtelesis/x530/x530.c
> +++ b/board/alliedtelesis/x530/x530.c
> @@ -8,6 +8,7 @@
>  #include <dm.h>
>  #include <env.h>
>  #include <i2c.h>
> +#include <init.h>
>  #include <wdt.h>
>  #include <asm/gpio.h>
>  #include <linux/mbus.h>
> diff --git a/board/amazon/kc1/kc1.c b/board/amazon/kc1/kc1.c
> index 9034c4fbff..fb1828ff44 100644
> --- a/board/amazon/kc1/kc1.c
> +++ b/board/amazon/kc1/kc1.c
> @@ -8,6 +8,7 @@
>  #include <config.h>
>  #include <common.h>
>  #include <env.h>
> +#include <init.h>
>  #include <linux/ctype.h>
>  #include <linux/usb/musb.h>
>  #include <asm/omap_musb.h>
> diff --git a/board/amlogic/p200/p200.c b/board/amlogic/p200/p200.c
> index d7f7ebd962..8f1bf8bfda 100644
> --- a/board/amlogic/p200/p200.c
> +++ b/board/amlogic/p200/p200.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <env.h>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/io.h>
>  #include <asm/arch/gx.h>
> diff --git a/board/amlogic/p201/p201.c b/board/amlogic/p201/p201.c
> index cdac64ed92..597bb71cbf 100644
> --- a/board/amlogic/p201/p201.c
> +++ b/board/amlogic/p201/p201.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <env.h>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/io.h>
>  #include <asm/arch/gx.h>
> diff --git a/board/amlogic/p212/p212.c b/board/amlogic/p212/p212.c
> index 6ac5aadecf..fbc49e9565 100644
> --- a/board/amlogic/p212/p212.c
> +++ b/board/amlogic/p212/p212.c
> @@ -7,6 +7,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <env.h>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/io.h>
>  #include <asm/arch/gx.h>
> diff --git a/board/amlogic/q200/q200.c b/board/amlogic/q200/q200.c
> index ae9b888c12..62e6fa3d19 100644
> --- a/board/amlogic/q200/q200.c
> +++ b/board/amlogic/q200/q200.c
> @@ -7,6 +7,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <env.h>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/io.h>
>  #include <asm/arch/gx.h>
> diff --git a/board/amlogic/s400/s400.c b/board/amlogic/s400/s400.c
> index 79b867996b..7e2f0cdae3 100644
> --- a/board/amlogic/s400/s400.c
> +++ b/board/amlogic/s400/s400.c
> @@ -6,6 +6,7 @@
>
>  #include <common.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/io.h>
>  #include <asm/arch/axg.h>
> diff --git a/board/amlogic/sei510/sei510.c b/board/amlogic/sei510/sei510.c
> index 07a6a47ebc..70fe3559f6 100644
> --- a/board/amlogic/sei510/sei510.c
> +++ b/board/amlogic/sei510/sei510.c
> @@ -7,6 +7,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <env_internal.h>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/io.h>
>  #include <asm/arch/axg.h>
> diff --git a/board/amlogic/sei610/sei610.c b/board/amlogic/sei610/sei610.c
> index 5c24276d51..3c44fba516 100644
> --- a/board/amlogic/sei610/sei610.c
> +++ b/board/amlogic/sei610/sei610.c
> @@ -7,6 +7,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <env_internal.h>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/io.h>
>  #include <asm/arch/axg.h>
> diff --git a/board/amlogic/u200/u200.c b/board/amlogic/u200/u200.c
> index 4df7ff437e..373235d77a 100644
> --- a/board/amlogic/u200/u200.c
> +++ b/board/amlogic/u200/u200.c
> @@ -6,6 +6,7 @@
>
>  #include <common.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/io.h>
>  #include <asm/arch/axg.h>
> diff --git a/board/amlogic/w400/w400.c b/board/amlogic/w400/w400.c
> index 95bbdedbdd..47a51710dc 100644
> --- a/board/amlogic/w400/w400.c
> +++ b/board/amlogic/w400/w400.c
> @@ -7,6 +7,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <env_internal.h>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/io.h>
>  #include <asm/arch/eth.h>
> diff --git a/board/aristainetos/aristainetos.c b/board/aristainetos/aristainetos.c
> index 5095cf65d1..3a59b51c1c 100644
> --- a/board/aristainetos/aristainetos.c
> +++ b/board/aristainetos/aristainetos.c
> @@ -10,6 +10,7 @@
>   */
>
>  #include <image.h>
> +#include <init.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/imx-regs.h>
>  #include <asm/arch/iomux.h>
> diff --git a/board/armltd/vexpress64/pcie.c b/board/armltd/vexpress64/pcie.c
> index 21156a4ca9..888434a6f8 100644
> --- a/board/armltd/vexpress64/pcie.c
> +++ b/board/armltd/vexpress64/pcie.c
> @@ -6,6 +6,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <linux/bitops.h>
>  #include <pci_ids.h>
> diff --git a/board/armltd/vexpress64/vexpress64.c b/board/armltd/vexpress64/vexpress64.c
> index 912202d8eb..fbfa7a18f1 100644
> --- a/board/armltd/vexpress64/vexpress64.c
> +++ b/board/armltd/vexpress64/vexpress64.c
> @@ -7,6 +7,7 @@
>  #include <common.h>
>  #include <cpu_func.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <errno.h>
>  #include <net.h>
> diff --git a/board/atmel/at91sam9260ek/led.c b/board/atmel/at91sam9260ek/led.c
> index 2ea66b9b15..cc6d5d7a05 100644
> --- a/board/atmel/at91sam9260ek/led.c
> +++ b/board/atmel/at91sam9260ek/led.c
> @@ -6,6 +6,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/gpio.h>
>  #include <status_led.h>
> diff --git a/board/atmel/common/video_display.c b/board/atmel/common/video_display.c
> index 5cc52139a7..2666b0b3cd 100644
> --- a/board/atmel/common/video_display.c
> +++ b/board/atmel/common/video_display.c
> @@ -7,6 +7,7 @@
>  #include <common.h>
>  #include <atmel_lcd.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <nand.h>
>  #include <version.h>
>  #include <video.h>
> diff --git a/board/bachmann/ot1200/ot1200.c b/board/bachmann/ot1200/ot1200.c
> index dd7863f7ac..db0da0ca2f 100644
> --- a/board/bachmann/ot1200/ot1200.c
> +++ b/board/bachmann/ot1200/ot1200.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/io.h>
>  #include <asm/arch/clock.h>
> diff --git a/board/bachmann/ot1200/ot1200_spl.c b/board/bachmann/ot1200/ot1200_spl.c
> index a3a822f65a..7fbd6f2c5d 100644
> --- a/board/bachmann/ot1200/ot1200_spl.c
> +++ b/board/bachmann/ot1200/ot1200_spl.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <spl.h>
>  #include <asm/arch/mx6-ddr.h>
>
> diff --git a/board/barco/platinum/spl_picon.c b/board/barco/platinum/spl_picon.c
> index ec6de460c1..253a64d28e 100644
> --- a/board/barco/platinum/spl_picon.c
> +++ b/board/barco/platinum/spl_picon.c
> @@ -8,6 +8,7 @@
>
>  #include <common.h>
>  #include <i2c.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/iomux.h>
>  #include <asm/arch/mx6-ddr.h>
> diff --git a/board/barco/platinum/spl_titanium.c b/board/barco/platinum/spl_titanium.c
> index 263371a2b2..8c91b752ff 100644
> --- a/board/barco/platinum/spl_titanium.c
> +++ b/board/barco/platinum/spl_titanium.c
> @@ -8,6 +8,7 @@
>
>  #include <common.h>
>  #include <i2c.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/iomux.h>
>  #include <asm/arch/mx6-ddr.h>
> diff --git a/board/bluegiga/apx4devkit/apx4devkit.c b/board/bluegiga/apx4devkit/apx4devkit.c
> index 2599db7bf7..be8eefb365 100644
> --- a/board/bluegiga/apx4devkit/apx4devkit.c
> +++ b/board/bluegiga/apx4devkit/apx4devkit.c
> @@ -14,6 +14,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/gpio.h>
>  #include <asm/io.h>
> diff --git a/board/bosch/guardian/board.c b/board/bosch/guardian/board.c
> index 03ba9e8c5e..b8dbe8ac53 100644
> --- a/board/bosch/guardian/board.c
> +++ b/board/bosch/guardian/board.c
> @@ -14,6 +14,7 @@
>  #include <env_internal.h>
>  #include <errno.h>
>  #include <i2c.h>
> +#include <init.h>
>  #include <led.h>
>  #include <miiphy.h>
>  #include <panel.h>
> diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c
> index 4d40cb8ff5..8e29fd0095 100644
> --- a/board/boundary/nitrogen6x/nitrogen6x.c
> +++ b/board/boundary/nitrogen6x/nitrogen6x.c
> @@ -6,6 +6,7 @@
>
>  #include <common.h>
>  #include <env.h>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/io.h>
>  #include <asm/arch/clock.h>
> diff --git a/board/broadcom/bcm963158/bcm963158.c b/board/broadcom/bcm963158/bcm963158.c
> index db82cd570d..9feaee3c0f 100644
> --- a/board/broadcom/bcm963158/bcm963158.c
> +++ b/board/broadcom/bcm963158/bcm963158.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <fdtdec.h>
> +#include <init.h>
>  #include <linux/io.h>
>
>  #ifdef CONFIG_ARM64
> diff --git a/board/broadcom/bcm968360bg/bcm968360bg.c b/board/broadcom/bcm968360bg/bcm968360bg.c
> index a5fbc1d297..90af6b88bd 100644
> --- a/board/broadcom/bcm968360bg/bcm968360bg.c
> +++ b/board/broadcom/bcm968360bg/bcm968360bg.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <fdtdec.h>
> +#include <init.h>
>  #include <linux/io.h>
>
>  #ifdef CONFIG_ARM64
> diff --git a/board/broadcom/bcm968580xref/bcm968580xref.c b/board/broadcom/bcm968580xref/bcm968580xref.c
> index 2e547f5170..1bd723d49e 100644
> --- a/board/broadcom/bcm968580xref/bcm968580xref.c
> +++ b/board/broadcom/bcm968580xref/bcm968580xref.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <fdtdec.h>
> +#include <init.h>
>  #include <linux/io.h>
>
>  #ifdef CONFIG_ARM64
> diff --git a/board/bticino/mamoj/mamoj.c b/board/bticino/mamoj/mamoj.c
> index 6ad7e31092..b7d37b7004 100644
> --- a/board/bticino/mamoj/mamoj.c
> +++ b/board/bticino/mamoj/mamoj.c
> @@ -6,6 +6,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/arch/sys_proto.h>
>
>  DECLARE_GLOBAL_DATA_PTR;
> diff --git a/board/bticino/mamoj/spl.c b/board/bticino/mamoj/spl.c
> index 620e4d1de0..ece37800bf 100644
> --- a/board/bticino/mamoj/spl.c
> +++ b/board/bticino/mamoj/spl.c
> @@ -6,6 +6,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <serial.h>
>  #include <spl.h>
>
> diff --git a/board/buffalo/lsxl/lsxl.c b/board/buffalo/lsxl/lsxl.c
> index 56a2c29e4c..6afb6bbdb5 100644
> --- a/board/buffalo/lsxl/lsxl.c
> +++ b/board/buffalo/lsxl/lsxl.c
> @@ -12,6 +12,7 @@
>  #include <env.h>
>  #include <env_internal.h>
>  #include <flash.h>
> +#include <init.h>
>  #include <net.h>
>  #include <malloc.h>
>  #include <netdev.h>
> diff --git a/board/ccv/xpress/spl.c b/board/ccv/xpress/spl.c
> index 90f655ab2e..38bda8d184 100644
> --- a/board/ccv/xpress/spl.c
> +++ b/board/ccv/xpress/spl.c
> @@ -6,6 +6,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <spl.h>
>  #include <asm/io.h>
>  #include <asm/arch/mx6-ddr.h>
> diff --git a/board/cirrus/edb93xx/edb93xx.c b/board/cirrus/edb93xx/edb93xx.c
> index b64ec95e31..0318bf18cf 100644
> --- a/board/cirrus/edb93xx/edb93xx.c
> +++ b/board/cirrus/edb93xx/edb93xx.c
> @@ -16,6 +16,7 @@
>  #include <config.h>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <irq_func.h>
>  #include <net.h>
>  #include <netdev.h>
> diff --git a/board/cloudengines/pogo_e02/pogo_e02.c b/board/cloudengines/pogo_e02/pogo_e02.c
> index 835c3279be..433e0de8a3 100644
> --- a/board/cloudengines/pogo_e02/pogo_e02.c
> +++ b/board/cloudengines/pogo_e02/pogo_e02.c
> @@ -10,6 +10,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <miiphy.h>
>  #include <net.h>
>  #include <asm/arch/cpu.h>
> diff --git a/board/compulab/cm_t35/cm_t35.c b/board/compulab/cm_t35/cm_t35.c
> index b52358baac..b714712f2a 100644
> --- a/board/compulab/cm_t35/cm_t35.c
> +++ b/board/compulab/cm_t35/cm_t35.c
> @@ -13,6 +13,7 @@
>
>  #include <common.h>
>  #include <env.h>
> +#include <init.h>
>  #include <status_led.h>
>  #include <netdev.h>
>  #include <net.h>
> diff --git a/board/corscience/tricorder/tricorder.c b/board/corscience/tricorder/tricorder.c
> index cec819b36f..30974e8d92 100644
> --- a/board/corscience/tricorder/tricorder.c
> +++ b/board/corscience/tricorder/tricorder.c
> @@ -10,6 +10,7 @@
>   * Frederik Kriewitz <frederik@kriewitz.eu>
>   */
>  #include <common.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <twl4030.h>
>  #include <status_led.h>
> diff --git a/board/cortina/presidio-asic/presidio.c b/board/cortina/presidio-asic/presidio.c
> index b4fa01f368..427151c8df 100644
> --- a/board/cortina/presidio-asic/presidio.c
> +++ b/board/cortina/presidio-asic/presidio.c
> @@ -4,6 +4,7 @@
>   *
>   */
>  #include <common.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <errno.h>
>  #include <netdev.h>
> diff --git a/board/creative/xfi3/xfi3.c b/board/creative/xfi3/xfi3.c
> index 66781ef316..4a32893a79 100644
> --- a/board/creative/xfi3/xfi3.c
> +++ b/board/creative/xfi3/xfi3.c
> @@ -11,6 +11,7 @@
>
>  #include <common.h>
>  #include <errno.h>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/gpio.h>
>  #include <asm/io.h>
> diff --git a/board/d-link/dns325/dns325.c b/board/d-link/dns325/dns325.c
> index dfdc683683..a0f3dada42 100644
> --- a/board/d-link/dns325/dns325.c
> +++ b/board/d-link/dns325/dns325.c
> @@ -10,6 +10,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <miiphy.h>
>  #include <net.h>
>  #include <netdev.h>
> diff --git a/board/davinci/da8xxevm/da850evm.c b/board/davinci/da8xxevm/da850evm.c
> index d9019de6e0..a3b0f8bf09 100644
> --- a/board/davinci/da8xxevm/da850evm.c
> +++ b/board/davinci/da8xxevm/da850evm.c
> @@ -12,6 +12,7 @@
>  #include <dm.h>
>  #include <env.h>
>  #include <i2c.h>
> +#include <init.h>
>  #include <net.h>
>  #include <spi.h>
>  #include <spi_flash.h>
> diff --git a/board/davinci/da8xxevm/omapl138_lcdk.c b/board/davinci/da8xxevm/omapl138_lcdk.c
> index 608a7f28eb..adb56c6c87 100644
> --- a/board/davinci/da8xxevm/omapl138_lcdk.c
> +++ b/board/davinci/da8xxevm/omapl138_lcdk.c
> @@ -11,6 +11,7 @@
>  #include <common.h>
>  #include <env.h>
>  #include <i2c.h>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/arch/hardware.h>
>  #include <asm/ti-common/davinci_nand.h>
> diff --git a/board/dhelectronics/dh_imx6/dh_imx6_spl.c b/board/dhelectronics/dh_imx6/dh_imx6_spl.c
> index f2c3ac3e28..fd6099c566 100644
> --- a/board/dhelectronics/dh_imx6/dh_imx6_spl.c
> +++ b/board/dhelectronics/dh_imx6/dh_imx6_spl.c
> @@ -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>
> diff --git a/board/ea/mx7ulp_com/mx7ulp_com.c b/board/ea/mx7ulp_com/mx7ulp_com.c
> index 6fc1631bf7..a9b8a32108 100644
> --- a/board/ea/mx7ulp_com/mx7ulp_com.c
> +++ b/board/ea/mx7ulp_com/mx7ulp_com.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/sys_proto.h>
>  #include <asm/arch/mx7ulp-pins.h>
> diff --git a/board/elgin/elgin_rv1108/elgin_rv1108.c b/board/elgin/elgin_rv1108/elgin_rv1108.c
> index c5a1cc95e4..5d8f62244b 100644
> --- a/board/elgin/elgin_rv1108/elgin_rv1108.c
> +++ b/board/elgin/elgin_rv1108/elgin_rv1108.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <syscon.h>
>  #include <asm/io.h>
>  #include <asm/arch-rockchip/clock.h>
> diff --git a/board/emulation/qemu-arm/qemu-arm.c b/board/emulation/qemu-arm/qemu-arm.c
> index 4e18733001..ee5d4b41f2 100644
> --- a/board/emulation/qemu-arm/qemu-arm.c
> +++ b/board/emulation/qemu-arm/qemu-arm.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <fdtdec.h>
> +#include <init.h>
>  #include <virtio_types.h>
>  #include <virtio.h>
>
> diff --git a/board/engicam/common/spl.c b/board/engicam/common/spl.c
> index 6359fb3223..62b06783c9 100644
> --- a/board/engicam/common/spl.c
> +++ b/board/engicam/common/spl.c
> @@ -7,6 +7,7 @@
>
>  #include <common.h>
>  #include <image.h>
> +#include <init.h>
>  #include <serial.h>
>  #include <spl.h>
>
> diff --git a/board/freescale/b4860qds/ddr.c b/board/freescale/b4860qds/ddr.c
> index de9f5f5f8b..c6cd3f4292 100644
> --- a/board/freescale/b4860qds/ddr.c
> +++ b/board/freescale/b4860qds/ddr.c
> @@ -7,6 +7,7 @@
>  #include <i2c.h>
>  #include <hwconfig.h>
>  #include <fsl_ddr.h>
> +#include <init.h>
>  #include <asm/mmu.h>
>  #include <fsl_ddr_sdram.h>
>  #include <fsl_ddr_dimm_params.h>
> diff --git a/board/freescale/bsc9131rdb/bsc9131rdb.c b/board/freescale/bsc9131rdb/bsc9131rdb.c
> index 871d066d68..75c2aec75d 100644
> --- a/board/freescale/bsc9131rdb/bsc9131rdb.c
> +++ b/board/freescale/bsc9131rdb/bsc9131rdb.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <image.h>
> +#include <init.h>
>  #include <asm/processor.h>
>  #include <asm/mmu.h>
>  #include <asm/cache.h>
> diff --git a/board/freescale/common/sys_eeprom.c b/board/freescale/common/sys_eeprom.c
> index c487e3a515..71af645b03 100644
> --- a/board/freescale/common/sys_eeprom.c
> +++ b/board/freescale/common/sys_eeprom.c
> @@ -10,6 +10,7 @@
>  #include <command.h>
>  #include <env.h>
>  #include <i2c.h>
> +#include <init.h>
>  #include <linux/ctype.h>
>  #include <u-boot/crc.h>
>
> diff --git a/board/freescale/corenet_ds/ddr.c b/board/freescale/corenet_ds/ddr.c
> index 9c8731ce78..073f3ac704 100644
> --- a/board/freescale/corenet_ds/ddr.c
> +++ b/board/freescale/corenet_ds/ddr.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <i2c.h>
>  #include <hwconfig.h>
> +#include <init.h>
>  #include <vsprintf.h>
>  #include <asm/mmu.h>
>  #include <fsl_ddr_sdram.h>
> diff --git a/board/freescale/imx8mm_evk/imx8mm_evk.c b/board/freescale/imx8mm_evk/imx8mm_evk.c
> index 53ebb949df..1f95f3b0c4 100644
> --- a/board/freescale/imx8mm_evk/imx8mm_evk.c
> +++ b/board/freescale/imx8mm_evk/imx8mm_evk.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <miiphy.h>
>  #include <netdev.h>
>
> diff --git a/board/freescale/imx8mm_evk/spl.c b/board/freescale/imx8mm_evk/spl.c
> index f73ade5549..3abf6be482 100644
> --- a/board/freescale/imx8mm_evk/spl.c
> +++ b/board/freescale/imx8mm_evk/spl.c
> @@ -7,6 +7,7 @@
>  #include <cpu_func.h>
>  #include <hang.h>
>  #include <image.h>
> +#include <init.h>
>  #include <spl.h>
>  #include <asm/io.h>
>  #include <asm/mach-imx/iomux-v3.h>
> diff --git a/board/freescale/imx8mn_evk/imx8mn_evk.c b/board/freescale/imx8mn_evk/imx8mn_evk.c
> index 4f33c0e7c9..8bd54ea2aa 100644
> --- a/board/freescale/imx8mn_evk/imx8mn_evk.c
> +++ b/board/freescale/imx8mn_evk/imx8mn_evk.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>
>  DECLARE_GLOBAL_DATA_PTR;
>
> diff --git a/board/freescale/imx8mn_evk/spl.c b/board/freescale/imx8mn_evk/spl.c
> index 7cb7f6e60b..fae1f0c9c7 100644
> --- a/board/freescale/imx8mn_evk/spl.c
> +++ b/board/freescale/imx8mn_evk/spl.c
> @@ -8,6 +8,7 @@
>  #include <cpu_func.h>
>  #include <hang.h>
>  #include <image.h>
> +#include <init.h>
>  #include <spl.h>
>  #include <asm/io.h>
>  #include <asm/mach-imx/iomux-v3.h>
> diff --git a/board/freescale/imx8mp_evk/imx8mp_evk.c b/board/freescale/imx8mp_evk/imx8mp_evk.c
> index f004af681b..aa5100f5bf 100644
> --- a/board/freescale/imx8mp_evk/imx8mp_evk.c
> +++ b/board/freescale/imx8mp_evk/imx8mp_evk.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <errno.h>
> +#include <init.h>
>  #include <asm/mach-imx/iomux-v3.h>
>  #include <asm-generic/gpio.h>
>  #include <asm/arch/imx8mp_pins.h>
> diff --git a/board/freescale/imx8mp_evk/spl.c b/board/freescale/imx8mp_evk/spl.c
> index 79b504d409..e84e470ac2 100644
> --- a/board/freescale/imx8mp_evk/spl.c
> +++ b/board/freescale/imx8mp_evk/spl.c
> @@ -8,6 +8,7 @@
>  #include <cpu_func.h>
>  #include <hang.h>
>  #include <image.h>
> +#include <init.h>
>  #include <spl.h>
>  #include <asm/io.h>
>  #include <errno.h>
> diff --git a/board/freescale/imx8mq_evk/spl.c b/board/freescale/imx8mq_evk/spl.c
> index 8b5b240edf..69ca7c37f5 100644
> --- a/board/freescale/imx8mq_evk/spl.c
> +++ b/board/freescale/imx8mq_evk/spl.c
> @@ -8,6 +8,7 @@
>  #include <common.h>
>  #include <hang.h>
>  #include <image.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <errno.h>
>  #include <asm/io.h>
> diff --git a/board/freescale/imx8qm_mek/spl.c b/board/freescale/imx8qm_mek/spl.c
> index c5c07089a2..38a981cf8b 100644
> --- a/board/freescale/imx8qm_mek/spl.c
> +++ b/board/freescale/imx8qm_mek/spl.c
> @@ -7,6 +7,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <image.h>
> +#include <init.h>
>  #include <spl.h>
>  #include <dm/uclass.h>
>  #include <dm/device.h>
> diff --git a/board/freescale/imx8qxp_mek/spl.c b/board/freescale/imx8qxp_mek/spl.c
> index 3cbbc9b84c..74c2ea2e6c 100644
> --- a/board/freescale/imx8qxp_mek/spl.c
> +++ b/board/freescale/imx8qxp_mek/spl.c
> @@ -7,6 +7,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <image.h>
> +#include <init.h>
>  #include <spl.h>
>  #include <dm/uclass.h>
>  #include <dm/device.h>
> diff --git a/board/freescale/imxrt1050-evk/imxrt1050-evk.c b/board/freescale/imxrt1050-evk/imxrt1050-evk.c
> index bda03b5ea5..b6a0d2567e 100644
> --- a/board/freescale/imxrt1050-evk/imxrt1050-evk.c
> +++ b/board/freescale/imxrt1050-evk/imxrt1050-evk.c
> @@ -6,6 +6,7 @@
>
>  #include <common.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <ram.h>
>  #include <spl.h>
>  #include <asm/io.h>
> diff --git a/board/freescale/ls1012afrdm/ls1012afrdm.c b/board/freescale/ls1012afrdm/ls1012afrdm.c
> index 8260e7f797..f63377fdd6 100644
> --- a/board/freescale/ls1012afrdm/ls1012afrdm.c
> +++ b/board/freescale/ls1012afrdm/ls1012afrdm.c
> @@ -7,6 +7,7 @@
>  #include <fdt_support.h>
>  #include <i2c.h>
>  #include <asm/cache.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/fsl_serdes.h>
> diff --git a/board/freescale/ls1012aqds/ls1012aqds.c b/board/freescale/ls1012aqds/ls1012aqds.c
> index e41f7e41bb..24978314a1 100644
> --- a/board/freescale/ls1012aqds/ls1012aqds.c
> +++ b/board/freescale/ls1012aqds/ls1012aqds.c
> @@ -7,6 +7,7 @@
>  #include <i2c.h>
>  #include <fdt_support.h>
>  #include <asm/cache.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/fsl_serdes.h>
> diff --git a/board/freescale/ls1012ardb/ls1012ardb.c b/board/freescale/ls1012ardb/ls1012ardb.c
> index 8633268ed7..fc929c441c 100644
> --- a/board/freescale/ls1012ardb/ls1012ardb.c
> +++ b/board/freescale/ls1012ardb/ls1012ardb.c
> @@ -8,6 +8,7 @@
>  #include <hang.h>
>  #include <i2c.h>
>  #include <asm/cache.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/fsl_serdes.h>
> diff --git a/board/freescale/ls1021aqds/ddr.c b/board/freescale/ls1021aqds/ddr.c
> index d3e2e53321..d854b51155 100644
> --- a/board/freescale/ls1021aqds/ddr.c
> +++ b/board/freescale/ls1021aqds/ddr.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <fsl_ddr_sdram.h>
>  #include <fsl_ddr_dimm_params.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/clock.h>
>  #include "ddr.h"
> diff --git a/board/freescale/ls1028a/ls1028a.c b/board/freescale/ls1028a/ls1028a.c
> index feeae9b406..fd7815e128 100644
> --- a/board/freescale/ls1028a/ls1028a.c
> +++ b/board/freescale/ls1028a/ls1028a.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <errno.h>
>  #include <fsl_ddr.h>
> diff --git a/board/freescale/ls1043aqds/ls1043aqds.c b/board/freescale/ls1043aqds/ls1043aqds.c
> index 2d4b18cdbc..032207af8a 100644
> --- a/board/freescale/ls1043aqds/ls1043aqds.c
> +++ b/board/freescale/ls1043aqds/ls1043aqds.c
> @@ -8,6 +8,7 @@
>  #include <i2c.h>
>  #include <fdt_support.h>
>  #include <fsl_ddr_sdram.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/fsl_serdes.h>
> diff --git a/board/freescale/ls1043ardb/ls1043ardb.c b/board/freescale/ls1043ardb/ls1043ardb.c
> index 26a192957b..0b5f26515a 100644
> --- a/board/freescale/ls1043ardb/ls1043ardb.c
> +++ b/board/freescale/ls1043ardb/ls1043ardb.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <i2c.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/fsl_serdes.h>
> diff --git a/board/freescale/ls1046afrwy/ls1046afrwy.c b/board/freescale/ls1046afrwy/ls1046afrwy.c
> index 71ace192e2..e815bf84fb 100644
> --- a/board/freescale/ls1046afrwy/ls1046afrwy.c
> +++ b/board/freescale/ls1046afrwy/ls1046afrwy.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <i2c.h>
>  #include <fdt_support.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/fsl_serdes.h>
> diff --git a/board/freescale/ls1046aqds/ls1046aqds.c b/board/freescale/ls1046aqds/ls1046aqds.c
> index e6648e9d70..b77b2ed40e 100644
> --- a/board/freescale/ls1046aqds/ls1046aqds.c
> +++ b/board/freescale/ls1046aqds/ls1046aqds.c
> @@ -8,6 +8,7 @@
>  #include <i2c.h>
>  #include <fdt_support.h>
>  #include <fsl_ddr_sdram.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/fsl_serdes.h>
> diff --git a/board/freescale/ls1046ardb/ls1046ardb.c b/board/freescale/ls1046ardb/ls1046ardb.c
> index 5308cb2e1c..27e213f796 100644
> --- a/board/freescale/ls1046ardb/ls1046ardb.c
> +++ b/board/freescale/ls1046ardb/ls1046ardb.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <i2c.h>
>  #include <fdt_support.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/fsl_serdes.h>
> diff --git a/board/freescale/ls1088a/ls1088a.c b/board/freescale/ls1088a/ls1088a.c
> index 225e787c75..1b10aa759b 100644
> --- a/board/freescale/ls1088a/ls1088a.c
> +++ b/board/freescale/ls1088a/ls1088a.c
> @@ -5,6 +5,7 @@
>  #include <common.h>
>  #include <env.h>
>  #include <i2c.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <errno.h>
>  #include <netdev.h>
> diff --git a/board/freescale/ls2080a/ls2080a.c b/board/freescale/ls2080a/ls2080a.c
> index f144bf6b37..95e99eabd7 100644
> --- a/board/freescale/ls2080a/ls2080a.c
> +++ b/board/freescale/ls2080a/ls2080a.c
> @@ -3,6 +3,7 @@
>   * Copyright 2014 Freescale Semiconductor
>   */
>  #include <common.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <errno.h>
>  #include <net.h>
> diff --git a/board/freescale/ls2080aqds/ls2080aqds.c b/board/freescale/ls2080aqds/ls2080aqds.c
> index 4034bdee28..5f95f3c301 100644
> --- a/board/freescale/ls2080aqds/ls2080aqds.c
> +++ b/board/freescale/ls2080aqds/ls2080aqds.c
> @@ -4,6 +4,7 @@
>   */
>  #include <common.h>
>  #include <env.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <errno.h>
>  #include <netdev.h>
> diff --git a/board/freescale/ls2080ardb/ls2080ardb.c b/board/freescale/ls2080ardb/ls2080ardb.c
> index 5e2fc7cc98..b1fa3297a3 100644
> --- a/board/freescale/ls2080ardb/ls2080ardb.c
> +++ b/board/freescale/ls2080ardb/ls2080ardb.c
> @@ -5,6 +5,7 @@
>   */
>  #include <common.h>
>  #include <env.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <errno.h>
>  #include <netdev.h>
> diff --git a/board/freescale/lx2160a/lx2160a.c b/board/freescale/lx2160a/lx2160a.c
> index 0d94107def..fba068c824 100644
> --- a/board/freescale/lx2160a/lx2160a.c
> +++ b/board/freescale/lx2160a/lx2160a.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <clock_legacy.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <dm/platform_data/serial_pl01x.h>
>  #include <i2c.h>
>  #include <malloc.h>
> diff --git a/board/freescale/m5253demo/flash.c b/board/freescale/m5253demo/flash.c
> index 87368564af..3197421781 100644
> --- a/board/freescale/m5253demo/flash.c
> +++ b/board/freescale/m5253demo/flash.c
> @@ -9,6 +9,7 @@
>
>  #include <common.h>
>  #include <flash.h>
> +#include <init.h>
>  #include <irq_func.h>
>
>  #include <asm/immap.h>
> diff --git a/board/freescale/m5282evb/m5282evb.c b/board/freescale/m5282evb/m5282evb.c
> index 065e3e71f5..251be667d4 100644
> --- a/board/freescale/m5282evb/m5282evb.c
> +++ b/board/freescale/m5282evb/m5282evb.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/immap.h>
>
>  DECLARE_GLOBAL_DATA_PTR;
> diff --git a/board/freescale/mpc8313erdb/sdram.c b/board/freescale/mpc8313erdb/sdram.c
> index c8e30a0947..5874e1a924 100644
> --- a/board/freescale/mpc8313erdb/sdram.c
> +++ b/board/freescale/mpc8313erdb/sdram.c
> @@ -8,6 +8,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <mpc83xx.h>
>  #include <spd_sdram.h>
>
> diff --git a/board/freescale/mpc8315erdb/sdram.c b/board/freescale/mpc8315erdb/sdram.c
> index 2f0f29a0e5..13bfc1e5f1 100644
> --- a/board/freescale/mpc8315erdb/sdram.c
> +++ b/board/freescale/mpc8315erdb/sdram.c
> @@ -8,6 +8,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <mpc83xx.h>
>  #include <spd_sdram.h>
>
> diff --git a/board/freescale/mpc8349emds/mpc8349emds.c b/board/freescale/mpc8349emds/mpc8349emds.c
> index 0996b87c0f..5451437f37 100644
> --- a/board/freescale/mpc8349emds/mpc8349emds.c
> +++ b/board/freescale/mpc8349emds/mpc8349emds.c
> @@ -6,6 +6,7 @@
>
>  #include <common.h>
>  #include <fdt_support.h>
> +#include <init.h>
>  #include <ioports.h>
>  #include <mpc83xx.h>
>  #include <asm/mpc8349_pci.h>
> diff --git a/board/freescale/mpc8349itx/mpc8349itx.c b/board/freescale/mpc8349itx/mpc8349itx.c
> index a2e284f1a2..5d78fea336 100644
> --- a/board/freescale/mpc8349itx/mpc8349itx.c
> +++ b/board/freescale/mpc8349itx/mpc8349itx.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <fdt_support.h>
> +#include <init.h>
>  #include <ioports.h>
>  #include <mpc83xx.h>
>  #include <i2c.h>
> diff --git a/board/freescale/mx23evk/mx23evk.c b/board/freescale/mx23evk/mx23evk.c
> index 6f4d34b9ed..6cfff04966 100644
> --- a/board/freescale/mx23evk/mx23evk.c
> +++ b/board/freescale/mx23evk/mx23evk.c
> @@ -12,6 +12,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/gpio.h>
>  #include <asm/arch/imx-regs.h>
>  #include <asm/arch/clock.h>
> diff --git a/board/freescale/mx28evk/mx28evk.c b/board/freescale/mx28evk/mx28evk.c
> index e5fa4ae765..4272bacf5e 100644
> --- a/board/freescale/mx28evk/mx28evk.c
> +++ b/board/freescale/mx28evk/mx28evk.c
> @@ -12,6 +12,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/gpio.h>
>  #include <asm/io.h>
> diff --git a/board/freescale/mx6memcal/mx6memcal.c b/board/freescale/mx6memcal/mx6memcal.c
> index d01127eccc..ea7a56369d 100644
> --- a/board/freescale/mx6memcal/mx6memcal.c
> +++ b/board/freescale/mx6memcal/mx6memcal.c
> @@ -8,6 +8,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/arch/sys_proto.h>
>
>  DECLARE_GLOBAL_DATA_PTR;
> diff --git a/board/freescale/mx6memcal/spl.c b/board/freescale/mx6memcal/spl.c
> index be551bc375..c11eee51b6 100644
> --- a/board/freescale/mx6memcal/spl.c
> +++ b/board/freescale/mx6memcal/spl.c
> @@ -6,6 +6,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/iomux.h>
>  #include <asm/arch/clock.h>
> diff --git a/board/freescale/mx6qarm2/mx6qarm2.c b/board/freescale/mx6qarm2/mx6qarm2.c
> index 3866020a6d..5c08ecbb96 100644
> --- a/board/freescale/mx6qarm2/mx6qarm2.c
> +++ b/board/freescale/mx6qarm2/mx6qarm2.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/io.h>
>  #include <asm/arch/imx-regs.h>
> diff --git a/board/freescale/mx6slevk/mx6slevk.c b/board/freescale/mx6slevk/mx6slevk.c
> index 38fc30553c..7dd00bda38 100644
> --- a/board/freescale/mx6slevk/mx6slevk.c
> +++ b/board/freescale/mx6slevk/mx6slevk.c
> @@ -5,6 +5,7 @@
>   * Author: Fabio Estevam <fabio.estevam@freescale.com>
>   */
>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/iomux.h>
> diff --git a/board/freescale/mx7ulp_evk/mx7ulp_evk.c b/board/freescale/mx7ulp_evk/mx7ulp_evk.c
> index c939514a5f..1594285860 100644
> --- a/board/freescale/mx7ulp_evk/mx7ulp_evk.c
> +++ b/board/freescale/mx7ulp_evk/mx7ulp_evk.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <fdt_support.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/sys_proto.h>
>  #include <asm/arch/mx7ulp-pins.h>
> diff --git a/board/freescale/p2041rdb/ddr.c b/board/freescale/p2041rdb/ddr.c
> index 8bcd2fb5a7..a30a0738dc 100644
> --- a/board/freescale/p2041rdb/ddr.c
> +++ b/board/freescale/p2041rdb/ddr.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <i2c.h>
>  #include <hwconfig.h>
> +#include <init.h>
>  #include <asm/mmu.h>
>  #include <fsl_ddr_sdram.h>
>  #include <fsl_ddr_dimm_params.h>
> diff --git a/board/freescale/t102xqds/ddr.c b/board/freescale/t102xqds/ddr.c
> index 998a2a5d3f..c3a60d6087 100644
> --- a/board/freescale/t102xqds/ddr.c
> +++ b/board/freescale/t102xqds/ddr.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <i2c.h>
>  #include <hwconfig.h>
> +#include <init.h>
>  #include <asm/mmu.h>
>  #include <fsl_ddr_sdram.h>
>  #include <fsl_ddr_dimm_params.h>
> diff --git a/board/freescale/t102xrdb/ddr.c b/board/freescale/t102xrdb/ddr.c
> index 043f0b5b84..2ab6e62c5a 100644
> --- a/board/freescale/t102xrdb/ddr.c
> +++ b/board/freescale/t102xrdb/ddr.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <i2c.h>
>  #include <hwconfig.h>
> +#include <init.h>
>  #include <asm/mmu.h>
>  #include <fsl_ddr_sdram.h>
>  #include <fsl_ddr_dimm_params.h>
> diff --git a/board/freescale/t1040qds/ddr.c b/board/freescale/t1040qds/ddr.c
> index 2b1d768f1b..c9639e9170 100644
> --- a/board/freescale/t1040qds/ddr.c
> +++ b/board/freescale/t1040qds/ddr.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <i2c.h>
>  #include <hwconfig.h>
> +#include <init.h>
>  #include <asm/mmu.h>
>  #include <fsl_ddr_sdram.h>
>  #include <fsl_ddr_dimm_params.h>
> diff --git a/board/freescale/t104xrdb/ddr.c b/board/freescale/t104xrdb/ddr.c
> index 2b1b28da88..ae365652c2 100644
> --- a/board/freescale/t104xrdb/ddr.c
> +++ b/board/freescale/t104xrdb/ddr.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <i2c.h>
>  #include <hwconfig.h>
> +#include <init.h>
>  #include <asm/mmu.h>
>  #include <fsl_ddr_sdram.h>
>  #include <fsl_ddr_dimm_params.h>
> diff --git a/board/freescale/t208xqds/ddr.c b/board/freescale/t208xqds/ddr.c
> index a2a56540b5..5a97a84948 100644
> --- a/board/freescale/t208xqds/ddr.c
> +++ b/board/freescale/t208xqds/ddr.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <i2c.h>
>  #include <hwconfig.h>
> +#include <init.h>
>  #include <asm/mmu.h>
>  #include <fsl_ddr_sdram.h>
>  #include <fsl_ddr_dimm_params.h>
> diff --git a/board/freescale/t208xrdb/ddr.c b/board/freescale/t208xrdb/ddr.c
> index 0b16982f06..78316ffe84 100644
> --- a/board/freescale/t208xrdb/ddr.c
> +++ b/board/freescale/t208xrdb/ddr.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <i2c.h>
>  #include <hwconfig.h>
> +#include <init.h>
>  #include <asm/mmu.h>
>  #include <fsl_ddr_sdram.h>
>  #include <fsl_ddr_dimm_params.h>
> diff --git a/board/freescale/t4qds/ddr.c b/board/freescale/t4qds/ddr.c
> index 08656b4e30..5a6d0eb69b 100644
> --- a/board/freescale/t4qds/ddr.c
> +++ b/board/freescale/t4qds/ddr.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <i2c.h>
>  #include <hwconfig.h>
> +#include <init.h>
>  #include <asm/mmu.h>
>  #include <fsl_ddr_sdram.h>
>  #include <fsl_ddr_dimm_params.h>
> diff --git a/board/freescale/t4rdb/ddr.c b/board/freescale/t4rdb/ddr.c
> index 787de6d7ad..3b67186cc2 100644
> --- a/board/freescale/t4rdb/ddr.c
> +++ b/board/freescale/t4rdb/ddr.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <i2c.h>
>  #include <hwconfig.h>
> +#include <init.h>
>  #include <asm/mmu.h>
>  #include <fsl_ddr_sdram.h>
>  #include <fsl_ddr_dimm_params.h>
> diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c
> index 1443ef91ef..2ef213ce0f 100644
> --- a/board/gateworks/gw_ventana/gw_ventana.c
> +++ b/board/gateworks/gw_ventana/gw_ventana.c
> @@ -6,6 +6,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/crm_regs.h>
> diff --git a/board/gateworks/gw_ventana/gw_ventana_spl.c b/board/gateworks/gw_ventana/gw_ventana_spl.c
> index 80fec5f9cf..3ccd65271e 100644
> --- a/board/gateworks/gw_ventana/gw_ventana_spl.c
> +++ b/board/gateworks/gw_ventana/gw_ventana_spl.c
> @@ -7,6 +7,7 @@
>  #include <common.h>
>  #include <env.h>
>  #include <hang.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/crm_regs.h>
>  #include <asm/arch/mx6-ddr.h>
> diff --git a/board/google/gru/gru.c b/board/google/gru/gru.c
> index b6b4f19d84..7dfbc3ac86 100644
> --- a/board/google/gru/gru.c
> +++ b/board/google/gru/gru.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>
>  #ifdef CONFIG_SPL_BUILD
>  /* provided to defeat compiler optimisation in board_init_f() */
> diff --git a/board/google/veyron/veyron.c b/board/google/veyron/veyron.c
> index 6b9c34818b..4a847edd89 100644
> --- a/board/google/veyron/veyron.c
> +++ b/board/google/veyron/veyron.c
> @@ -6,6 +6,7 @@
>  #include <clk.h>
>  #include <common.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <asm/arch-rockchip/clock.h>
>  #include <dt-bindings/clock/rk3288-cru.h>
>  #include <linux/err.h>
> diff --git a/board/gumstix/duovero/duovero.c b/board/gumstix/duovero/duovero.c
> index cbb1cd0f8f..7b6fd5c737 100644
> --- a/board/gumstix/duovero/duovero.c
> +++ b/board/gumstix/duovero/duovero.c
> @@ -5,6 +5,7 @@
>   * Maintainer: Ash Charles  <ash@gumstix.com>
>   */
>  #include <common.h>
> +#include <init.h>
>  #include <net.h>
>  #include <netdev.h>
>  #include <asm/arch/sys_proto.h>
> diff --git a/board/gumstix/pepper/board.c b/board/gumstix/pepper/board.c
> index 2a6a449306..ebb5a560c3 100644
> --- a/board/gumstix/pepper/board.c
> +++ b/board/gumstix/pepper/board.c
> @@ -9,6 +9,7 @@
>  #include <common.h>
>  #include <env.h>
>  #include <errno.h>
> +#include <init.h>
>  #include <net.h>
>  #include <serial.h>
>  #include <spl.h>
> diff --git a/board/highbank/highbank.c b/board/highbank/highbank.c
> index ffde1161d0..063831dfe8 100644
> --- a/board/highbank/highbank.c
> +++ b/board/highbank/highbank.c
> @@ -8,6 +8,7 @@
>  #include <cpu_func.h>
>  #include <env.h>
>  #include <fdt_support.h>
> +#include <init.h>
>  #include <net.h>
>  #include <netdev.h>
>  #include <scsi.h>
> diff --git a/board/hisilicon/hikey/hikey.c b/board/hisilicon/hikey/hikey.c
> index 84400090b3..2a50b8458a 100644
> --- a/board/hisilicon/hikey/hikey.c
> +++ b/board/hisilicon/hikey/hikey.c
> @@ -7,6 +7,7 @@
>  #include <cpu_func.h>
>  #include <dm.h>
>  #include <fdt_support.h>
> +#include <init.h>
>  #include <dm/platform_data/serial_pl01x.h>
>  #include <errno.h>
>  #include <malloc.h>
> diff --git a/board/hisilicon/hikey960/hikey960.c b/board/hisilicon/hikey960/hikey960.c
> index 0ed62c7d84..89a922fb82 100644
> --- a/board/hisilicon/hikey960/hikey960.c
> +++ b/board/hisilicon/hikey960/hikey960.c
> @@ -9,6 +9,7 @@
>  #include <dm.h>
>  #include <errno.h>
>  #include <asm/cache.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/hi3660.h>
>  #include <asm/armv8/mmu.h>
> diff --git a/board/imgtec/boston/checkboard.c b/board/imgtec/boston/checkboard.c
> index 46ec1e8d9c..1b8a47d254 100644
> --- a/board/imgtec/boston/checkboard.c
> +++ b/board/imgtec/boston/checkboard.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>
>  #include <asm/io.h>
>  #include <asm/mipsregs.h>
> diff --git a/board/imgtec/ci20/ci20.c b/board/imgtec/ci20/ci20.c
> index 170ea12c93..66c64f8056 100644
> --- a/board/imgtec/ci20/ci20.c
> +++ b/board/imgtec/ci20/ci20.c
> @@ -8,6 +8,7 @@
>
>  #include <common.h>
>  #include <env.h>
> +#include <init.h>
>  #include <net.h>
>  #include <netdev.h>
>  #include <asm/io.h>
> diff --git a/board/imgtec/xilfpga/xilfpga.c b/board/imgtec/xilfpga/xilfpga.c
> index 86645155e6..0b68bbde50 100644
> --- a/board/imgtec/xilfpga/xilfpga.c
> +++ b/board/imgtec/xilfpga/xilfpga.c
> @@ -9,6 +9,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>
>  DECLARE_GLOBAL_DATA_PTR;
>
> diff --git a/board/intel/cougarcanyon2/cougarcanyon2.c b/board/intel/cougarcanyon2/cougarcanyon2.c
> index 7aadd9e477..ce11eae59d 100644
> --- a/board/intel/cougarcanyon2/cougarcanyon2.c
> +++ b/board/intel/cougarcanyon2/cougarcanyon2.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <errno.h>
> +#include <init.h>
>  #include <pci.h>
>  #include <smsc_sio1007.h>
>  #include <asm/ibmpc.h>
> diff --git a/board/intel/crownbay/crownbay.c b/board/intel/crownbay/crownbay.c
> index 57dce4185d..55095deead 100644
> --- a/board/intel/crownbay/crownbay.c
> +++ b/board/intel/crownbay/crownbay.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/ibmpc.h>
>  #include <asm/pnp_def.h>
>  #include <smsc_lpc47m.h>
> diff --git a/board/intel/minnowmax/minnowmax.c b/board/intel/minnowmax/minnowmax.c
> index e5fc939793..e486f9d7d9 100644
> --- a/board/intel/minnowmax/minnowmax.c
> +++ b/board/intel/minnowmax/minnowmax.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <asm/gpio.h>
>  #include <dm/device-internal.h>
>  #include <dm/uclass-internal.h>
> diff --git a/board/iomega/iconnect/iconnect.c b/board/iomega/iconnect/iconnect.c
> index fc7847bd1d..79c794bfc8 100644
> --- a/board/iomega/iconnect/iconnect.c
> +++ b/board/iomega/iconnect/iconnect.c
> @@ -6,6 +6,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <miiphy.h>
>  #include <asm/arch/cpu.h>
>  #include <asm/arch/soc.h>
> diff --git a/board/isee/igep00x0/igep00x0.c b/board/isee/igep00x0/igep00x0.c
> index 0ad601f39b..887ec6a66b 100644
> --- a/board/isee/igep00x0/igep00x0.c
> +++ b/board/isee/igep00x0/igep00x0.c
> @@ -5,6 +5,7 @@
>   */
>  #include <common.h>
>  #include <env.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <net.h>
>  #include <status_led.h>
> diff --git a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c
> index 25a5e4b9ba..01c8691f31 100644
> --- a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c
> +++ b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c
> @@ -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>
> diff --git a/board/keymile/kmp204x/ddr.c b/board/keymile/kmp204x/ddr.c
> index ee2e3d6b9a..bea9451aec 100644
> --- a/board/keymile/kmp204x/ddr.c
> +++ b/board/keymile/kmp204x/ddr.c
> @@ -9,6 +9,7 @@
>  #include <common.h>
>  #include <i2c.h>
>  #include <hwconfig.h>
> +#include <init.h>
>  #include <asm/mmu.h>
>  #include <fsl_ddr_sdram.h>
>  #include <fsl_ddr_dimm_params.h>
> diff --git a/board/kmc/kzm9g/kzm9g.c b/board/kmc/kzm9g/kzm9g.c
> index c6117b33bc..7bc66af193 100644
> --- a/board/kmc/kzm9g/kzm9g.c
> +++ b/board/kmc/kzm9g/kzm9g.c
> @@ -6,6 +6,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/io.h>
>  #include <asm/arch/sys_proto.h>
> diff --git a/board/kobol/helios4/helios4.c b/board/kobol/helios4/helios4.c
> index f8134b7042..97b152664a 100644
> --- a/board/kobol/helios4/helios4.c
> +++ b/board/kobol/helios4/helios4.c
> @@ -6,6 +6,7 @@
>
>  #include <common.h>
>  #include <i2c.h>
> +#include <init.h>
>  #include <miiphy.h>
>  #include <net.h>
>  #include <netdev.h>
> diff --git a/board/lego/ev3/legoev3.c b/board/lego/ev3/legoev3.c
> index fa099e95f5..51b669a891 100644
> --- a/board/lego/ev3/legoev3.c
> +++ b/board/lego/ev3/legoev3.c
> @@ -14,6 +14,7 @@
>
>  #include <common.h>
>  #include <i2c.h>
> +#include <init.h>
>  #include <spi.h>
>  #include <spi_flash.h>
>  #include <asm/arch/hardware.h>
> diff --git a/board/lg/sniper/sniper.c b/board/lg/sniper/sniper.c
> index b4205d6ed4..2825eccc03 100644
> --- a/board/lg/sniper/sniper.c
> +++ b/board/lg/sniper/sniper.c
> @@ -9,6 +9,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <env.h>
> +#include <init.h>
>  #include <linux/ctype.h>
>  #include <linux/usb/musb.h>
>  #include <asm/omap_musb.h>
> diff --git a/board/liebherr/display5/display5.c b/board/liebherr/display5/display5.c
> index a362d25c01..b979ddd296 100644
> --- a/board/liebherr/display5/display5.c
> +++ b/board/liebherr/display5/display5.c
> @@ -7,6 +7,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <fdt_support.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/imx-regs.h>
> diff --git a/board/liebherr/display5/spl.c b/board/liebherr/display5/spl.c
> index 0f5eab79b5..fc3ebaf145 100644
> --- a/board/liebherr/display5/spl.c
> +++ b/board/liebherr/display5/spl.c
> @@ -8,6 +8,7 @@
>  #include <cpu_func.h>
>  #include <env.h>
>  #include <image.h>
> +#include <init.h>
>  #include <serial.h>
>  #include <spl.h>
>  #include <linux/libfdt.h>
> diff --git a/board/liebherr/mccmon6/spl.c b/board/liebherr/mccmon6/spl.c
> index 8ed8e03295..f40e814f86 100644
> --- a/board/liebherr/mccmon6/spl.c
> +++ b/board/liebherr/mccmon6/spl.c
> @@ -6,6 +6,7 @@
>   */
>
>  #include <image.h>
> +#include <init.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/imx-regs.h>
>  #include <asm/arch/iomux.h>
> diff --git a/board/liebherr/xea/xea.c b/board/liebherr/xea/xea.c
> index 95c9064066..41fa21292e 100644
> --- a/board/liebherr/xea/xea.c
> +++ b/board/liebherr/xea/xea.c
> @@ -15,6 +15,7 @@
>
>  #include <common.h>
>  #include <fdt_support.h>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/gpio.h>
>  #include <asm/io.h>
> diff --git a/board/logicpd/am3517evm/am3517evm.c b/board/logicpd/am3517evm/am3517evm.c
> index 6ed3a9b847..b25b02b641 100644
> --- a/board/logicpd/am3517evm/am3517evm.c
> +++ b/board/logicpd/am3517evm/am3517evm.c
> @@ -12,6 +12,7 @@
>
>  #include <common.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <net.h>
>  #include <ns16550.h>
>  #include <serial.h>
> diff --git a/board/logicpd/zoom1/zoom1.c b/board/logicpd/zoom1/zoom1.c
> index 7438d37923..53dc9762f8 100644
> --- a/board/logicpd/zoom1/zoom1.c
> +++ b/board/logicpd/zoom1/zoom1.c
> @@ -16,6 +16,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <env.h>
> +#include <init.h>
>  #include <net.h>
>  #include <ns16550.h>
>  #include <netdev.h>
> diff --git a/board/maxbcm/maxbcm.c b/board/maxbcm/maxbcm.c
> index 395904f8c8..3c6422214f 100644
> --- a/board/maxbcm/maxbcm.c
> +++ b/board/maxbcm/maxbcm.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <miiphy.h>
>  #include <asm/io.h>
>  #include <asm/arch/cpu.h>
> diff --git a/board/mediatek/mt7622/mt7622_rfb.c b/board/mediatek/mt7622/mt7622_rfb.c
> index b9296bede2..912b993240 100644
> --- a/board/mediatek/mt7622/mt7622_rfb.c
> +++ b/board/mediatek/mt7622/mt7622_rfb.c
> @@ -6,6 +6,7 @@
>
>  #include <common.h>
>  #include <config.h>
> +#include <init.h>
>
>  DECLARE_GLOBAL_DATA_PTR;
>
> diff --git a/board/mediatek/mt8518/mt8518_ap1.c b/board/mediatek/mt8518/mt8518_ap1.c
> index 2ac7c6cd18..72284a2689 100644
> --- a/board/mediatek/mt8518/mt8518_ap1.c
> +++ b/board/mediatek/mt8518/mt8518_ap1.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <dm.h>
> +#include <init.h>
>
>  DECLARE_GLOBAL_DATA_PTR;
>
> diff --git a/board/microchip/mpfs_icicle/mpfs_icicle.c b/board/microchip/mpfs_icicle/mpfs_icicle.c
> index 0ef243186d..8381361ec3 100644
> --- a/board/microchip/mpfs_icicle/mpfs_icicle.c
> +++ b/board/microchip/mpfs_icicle/mpfs_icicle.c
> @@ -6,6 +6,7 @@
>
>  #include <common.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <asm/io.h>
>
>  #define MPFS_SYSREG_SOFT_RESET ((unsigned int *)0x20002088)
> diff --git a/board/microchip/pic32mzda/pic32mzda.c b/board/microchip/pic32mzda/pic32mzda.c
> index aa8aab39ce..e7337deea7 100644
> --- a/board/microchip/pic32mzda/pic32mzda.c
> +++ b/board/microchip/pic32mzda/pic32mzda.c
> @@ -10,6 +10,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <clk.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <dt-bindings/clock/microchip,clock.h>
>  #include <mach/pic32.h>
> diff --git a/board/mikrotik/crs305-1g-4s/crs305-1g-4s.c b/board/mikrotik/crs305-1g-4s/crs305-1g-4s.c
> index d1d1f40092..4b67a4ba2d 100644
> --- a/board/mikrotik/crs305-1g-4s/crs305-1g-4s.c
> +++ b/board/mikrotik/crs305-1g-4s/crs305-1g-4s.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <i2c.h>
> +#include <init.h>
>  #include <asm/gpio.h>
>  #include <linux/mbus.h>
>  #include <linux/io.h>
> diff --git a/board/netgear/dgnd3700v2/dgnd3700v2.c b/board/netgear/dgnd3700v2/dgnd3700v2.c
> index 6840a21001..d9c0200f24 100644
> --- a/board/netgear/dgnd3700v2/dgnd3700v2.c
> +++ b/board/netgear/dgnd3700v2/dgnd3700v2.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>
>  #define GPIO_BASE_6362                 0x10000080
> diff --git a/board/nokia/rx51/rx51.c b/board/nokia/rx51/rx51.c
> index 71ca79deab..92b5c20b51 100644
> --- a/board/nokia/rx51/rx51.c
> +++ b/board/nokia/rx51/rx51.c
> @@ -23,6 +23,7 @@
>
>  #include <common.h>
>  #include <env.h>
> +#include <init.h>
>  #include <watchdog.h>
>  #include <malloc.h>
>  #include <twl4030.h>
> diff --git a/board/novtech/meerkat96/meerkat96.c b/board/novtech/meerkat96/meerkat96.c
> index 5fb4d43997..b13e7ce3b1 100644
> --- a/board/novtech/meerkat96/meerkat96.c
> +++ b/board/novtech/meerkat96/meerkat96.c
> @@ -4,6 +4,7 @@
>   * Copyright (C) 2016 NXP Semiconductors
>   */
>
> +#include <init.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/imx-regs.h>
>  #include <asm/arch/mx7-pins.h>
> diff --git a/board/olimex/mx23_olinuxino/mx23_olinuxino.c b/board/olimex/mx23_olinuxino/mx23_olinuxino.c
> index f1d7cb8c93..cfe33d3072 100644
> --- a/board/olimex/mx23_olinuxino/mx23_olinuxino.c
> +++ b/board/olimex/mx23_olinuxino/mx23_olinuxino.c
> @@ -6,6 +6,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/gpio.h>
>  #include <asm/io.h>
>  #include <asm/arch/iomux-mx23.h>
> diff --git a/board/overo/overo.c b/board/overo/overo.c
> index f7da1a95ea..7a54719e87 100644
> --- a/board/overo/overo.c
> +++ b/board/overo/overo.c
> @@ -14,6 +14,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <env.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <net.h>
>  #include <ns16550.h>
> diff --git a/board/pandora/pandora.c b/board/pandora/pandora.c
> index a9aae7951d..bb310d9e68 100644
> --- a/board/pandora/pandora.c
> +++ b/board/pandora/pandora.c
> @@ -14,6 +14,7 @@
>   */
>  #include <common.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <ns16550.h>
>  #include <twl4030.h>
>  #include <asm/io.h>
> diff --git a/board/phytec/pcl063/spl.c b/board/phytec/pcl063/spl.c
> index b5e080c072..48cb2e267c 100644
> --- a/board/phytec/pcl063/spl.c
> +++ b/board/phytec/pcl063/spl.c
> @@ -7,6 +7,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <spl.h>
>  #include <asm/arch/clock.h>
>  #include <asm/io.h>
> diff --git a/board/phytec/pcm051/board.c b/board/phytec/pcm051/board.c
> index e561c82253..6f1ada82c4 100644
> --- a/board/phytec/pcm051/board.c
> +++ b/board/phytec/pcm051/board.c
> @@ -11,6 +11,7 @@
>  #include <common.h>
>  #include <env.h>
>  #include <errno.h>
> +#include <init.h>
>  #include <net.h>
>  #include <spl.h>
>  #include <asm/arch/cpu.h>
> diff --git a/board/phytium/durian/durian.c b/board/phytium/durian/durian.c
> index 91d13bdea4..7dceebdeae 100644
> --- a/board/phytium/durian/durian.c
> +++ b/board/phytium/durian/durian.c
> @@ -7,6 +7,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <asm/armv8/mmu.h>
>  #include <asm/cache.h>
>  #include <asm/system.h>
> diff --git a/board/pine64/rockpro64_rk3399/rockpro64-rk3399.c b/board/pine64/rockpro64_rk3399/rockpro64-rk3399.c
> index 3f60235771..d79084614f 100644
> --- a/board/pine64/rockpro64_rk3399/rockpro64-rk3399.c
> +++ b/board/pine64/rockpro64_rk3399/rockpro64-rk3399.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <syscon.h>
>  #include <asm/io.h>
>  #include <asm/arch-rockchip/clock.h>
> diff --git a/board/ppcag/bg0900/bg0900.c b/board/ppcag/bg0900/bg0900.c
> index 00afff3abf..70870797bb 100644
> --- a/board/ppcag/bg0900/bg0900.c
> +++ b/board/ppcag/bg0900/bg0900.c
> @@ -6,6 +6,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/gpio.h>
>  #include <asm/io.h>
> diff --git a/board/qca/ap121/ap121.c b/board/qca/ap121/ap121.c
> index 24acdcb2e6..60a2e19143 100644
> --- a/board/qca/ap121/ap121.c
> +++ b/board/qca/ap121/ap121.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/addrspace.h>
>  #include <asm/types.h>
> diff --git a/board/qca/ap143/ap143.c b/board/qca/ap143/ap143.c
> index 8ee26ababa..ac65054136 100644
> --- a/board/qca/ap143/ap143.c
> +++ b/board/qca/ap143/ap143.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/addrspace.h>
>  #include <asm/types.h>
> diff --git a/board/qca/ap152/ap152.c b/board/qca/ap152/ap152.c
> index 30cd56563b..1064705d26 100644
> --- a/board/qca/ap152/ap152.c
> +++ b/board/qca/ap152/ap152.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/addrspace.h>
>  #include <asm/types.h>
> diff --git a/board/qemu-mips/qemu-mips.c b/board/qemu-mips/qemu-mips.c
> index b3e0830843..cf22ed5627 100644
> --- a/board/qemu-mips/qemu-mips.c
> +++ b/board/qemu-mips/qemu-mips.c
> @@ -6,6 +6,7 @@
>
>  #include <common.h>
>  #include <command.h>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/mipsregs.h>
>  #include <asm/io.h>
> diff --git a/board/qualcomm/dragonboard820c/dragonboard820c.c b/board/qualcomm/dragonboard820c/dragonboard820c.c
> index 3134415d80..c1ade5ce43 100644
> --- a/board/qualcomm/dragonboard820c/dragonboard820c.c
> +++ b/board/qualcomm/dragonboard820c/dragonboard820c.c
> @@ -6,6 +6,7 @@
>   */
>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <asm/arch/sysmap-apq8096.h>
>  #include <env.h>
>  #include <asm/cache.h>
> diff --git a/board/raidsonic/ib62x0/ib62x0.c b/board/raidsonic/ib62x0/ib62x0.c
> index e8aae4cb81..db1b0adc38 100644
> --- a/board/raidsonic/ib62x0/ib62x0.c
> +++ b/board/raidsonic/ib62x0/ib62x0.c
> @@ -7,6 +7,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <miiphy.h>
>  #include <asm/io.h>
>  #include <asm/arch/cpu.h>
> diff --git a/board/renesas/MigoR/migo_r.c b/board/renesas/MigoR/migo_r.c
> index 3ffd9ad75d..f8bdb4d48a 100644
> --- a/board/renesas/MigoR/migo_r.c
> +++ b/board/renesas/MigoR/migo_r.c
> @@ -10,6 +10,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <net.h>
>  #include <netdev.h>
>  #include <asm/io.h>
> diff --git a/board/renesas/alt/alt.c b/board/renesas/alt/alt.c
> index a6d7cb48a2..de487ff4b7 100644
> --- a/board/renesas/alt/alt.c
> +++ b/board/renesas/alt/alt.c
> @@ -9,6 +9,7 @@
>  #include <cpu_func.h>
>  #include <env.h>
>  #include <hang.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <dm.h>
>  #include <dm/platform_data/serial_sh.h>
> diff --git a/board/renesas/alt/alt_spl.c b/board/renesas/alt/alt_spl.c
> index dbb210584d..a9c289447e 100644
> --- a/board/renesas/alt/alt_spl.c
> +++ b/board/renesas/alt/alt_spl.c
> @@ -7,6 +7,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <dm/platform_data/serial_sh.h>
>  #include <asm/processor.h>
> diff --git a/board/renesas/blanche/blanche.c b/board/renesas/blanche/blanche.c
> index 892f7e7260..400c166b90 100644
> --- a/board/renesas/blanche/blanche.c
> +++ b/board/renesas/blanche/blanche.c
> @@ -8,6 +8,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/arch/mmc.h>
>  #include <asm/arch/rcar-mstp.h>
> diff --git a/board/renesas/condor/condor.c b/board/renesas/condor/condor.c
> index 6505beda81..91afcdd85a 100644
> --- a/board/renesas/condor/condor.c
> +++ b/board/renesas/condor/condor.c
> @@ -9,6 +9,7 @@
>  #include <common.h>
>  #include <cpu_func.h>
>  #include <hang.h>
> +#include <init.h>
>  #include <asm/processor.h>
>  #include <asm/mach-types.h>
>  #include <asm/io.h>
> diff --git a/board/renesas/draak/draak.c b/board/renesas/draak/draak.c
> index 2f9364c484..5f37a19600 100644
> --- a/board/renesas/draak/draak.c
> +++ b/board/renesas/draak/draak.c
> @@ -9,6 +9,7 @@
>  #include <common.h>
>  #include <cpu_func.h>
>  #include <hang.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <netdev.h>
>  #include <dm.h>
> diff --git a/board/renesas/eagle/eagle.c b/board/renesas/eagle/eagle.c
> index cf06a173e4..6228f22e01 100644
> --- a/board/renesas/eagle/eagle.c
> +++ b/board/renesas/eagle/eagle.c
> @@ -9,6 +9,7 @@
>  #include <common.h>
>  #include <cpu_func.h>
>  #include <hang.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <netdev.h>
>  #include <dm.h>
> diff --git a/board/renesas/ebisu/ebisu.c b/board/renesas/ebisu/ebisu.c
> index 81d7f8eafa..d164a36361 100644
> --- a/board/renesas/ebisu/ebisu.c
> +++ b/board/renesas/ebisu/ebisu.c
> @@ -9,6 +9,7 @@
>  #include <common.h>
>  #include <cpu_func.h>
>  #include <hang.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <netdev.h>
>  #include <dm.h>
> diff --git a/board/renesas/gose/gose.c b/board/renesas/gose/gose.c
> index eb6ee6f6a4..aec947ab5a 100644
> --- a/board/renesas/gose/gose.c
> +++ b/board/renesas/gose/gose.c
> @@ -9,6 +9,7 @@
>  #include <cpu_func.h>
>  #include <env.h>
>  #include <hang.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <dm.h>
>  #include <dm/platform_data/serial_sh.h>
> diff --git a/board/renesas/gose/gose_spl.c b/board/renesas/gose/gose_spl.c
> index 42a6758148..b1b2ceb607 100644
> --- a/board/renesas/gose/gose_spl.c
> +++ b/board/renesas/gose/gose_spl.c
> @@ -7,6 +7,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <dm/platform_data/serial_sh.h>
>  #include <asm/processor.h>
> diff --git a/board/renesas/grpeach/grpeach.c b/board/renesas/grpeach/grpeach.c
> index ba904609ae..b92e01ca98 100644
> --- a/board/renesas/grpeach/grpeach.c
> +++ b/board/renesas/grpeach/grpeach.c
> @@ -6,6 +6,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/sys_proto.h>
>
> diff --git a/board/renesas/koelsch/koelsch.c b/board/renesas/koelsch/koelsch.c
> index e09d3d0a63..67ac85d580 100644
> --- a/board/renesas/koelsch/koelsch.c
> +++ b/board/renesas/koelsch/koelsch.c
> @@ -10,6 +10,7 @@
>  #include <cpu_func.h>
>  #include <env.h>
>  #include <hang.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <dm.h>
>  #include <dm/platform_data/serial_sh.h>
> diff --git a/board/renesas/koelsch/koelsch_spl.c b/board/renesas/koelsch/koelsch_spl.c
> index b3530d7ce7..a321678e1b 100644
> --- a/board/renesas/koelsch/koelsch_spl.c
> +++ b/board/renesas/koelsch/koelsch_spl.c
> @@ -7,6 +7,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <dm/platform_data/serial_sh.h>
>  #include <asm/processor.h>
> diff --git a/board/renesas/lager/lager.c b/board/renesas/lager/lager.c
> index 9ac9515925..1a5877bf15 100644
> --- a/board/renesas/lager/lager.c
> +++ b/board/renesas/lager/lager.c
> @@ -12,6 +12,7 @@
>  #include <env.h>
>  #include <env_internal.h>
>  #include <hang.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <netdev.h>
>  #include <dm.h>
> diff --git a/board/renesas/lager/lager_spl.c b/board/renesas/lager/lager_spl.c
> index d7db361b12..ceaf164e78 100644
> --- a/board/renesas/lager/lager_spl.c
> +++ b/board/renesas/lager/lager_spl.c
> @@ -7,6 +7,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <dm/platform_data/serial_sh.h>
>  #include <asm/processor.h>
> diff --git a/board/renesas/porter/porter.c b/board/renesas/porter/porter.c
> index 097710b479..acff2e3b39 100644
> --- a/board/renesas/porter/porter.c
> +++ b/board/renesas/porter/porter.c
> @@ -10,6 +10,7 @@
>  #include <cpu_func.h>
>  #include <env.h>
>  #include <hang.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <dm.h>
>  #include <dm/platform_data/serial_sh.h>
> diff --git a/board/renesas/porter/porter_spl.c b/board/renesas/porter/porter_spl.c
> index 026220d9e2..5b1f03cf7d 100644
> --- a/board/renesas/porter/porter_spl.c
> +++ b/board/renesas/porter/porter_spl.c
> @@ -7,6 +7,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <dm/platform_data/serial_sh.h>
>  #include <asm/processor.h>
> diff --git a/board/renesas/rcar-common/common.c b/board/renesas/rcar-common/common.c
> index 5a6aa8255b..b9e8cb4ce7 100644
> --- a/board/renesas/rcar-common/common.c
> +++ b/board/renesas/rcar-common/common.c
> @@ -9,6 +9,7 @@
>
>  #include <common.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <dm/uclass-internal.h>
>  #include <asm/arch/rmobile.h>
>  #include <linux/libfdt.h>
> diff --git a/board/renesas/rcar-common/gen3-spl.c b/board/renesas/rcar-common/gen3-spl.c
> index a3e2aebe77..2b21a29de1 100644
> --- a/board/renesas/rcar-common/gen3-spl.c
> +++ b/board/renesas/rcar-common/gen3-spl.c
> @@ -8,6 +8,7 @@
>  #include <common.h>
>  #include <cpu_func.h>
>  #include <image.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <spl.h>
>
> diff --git a/board/renesas/salvator-x/salvator-x.c b/board/renesas/salvator-x/salvator-x.c
> index ecf0dde4ef..ff0409be98 100644
> --- a/board/renesas/salvator-x/salvator-x.c
> +++ b/board/renesas/salvator-x/salvator-x.c
> @@ -10,6 +10,7 @@
>  #include <common.h>
>  #include <cpu_func.h>
>  #include <image.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <netdev.h>
>  #include <dm.h>
> diff --git a/board/renesas/sh7763rdp/sh7763rdp.c b/board/renesas/sh7763rdp/sh7763rdp.c
> index 9bc2c55986..73a53c1e5a 100644
> --- a/board/renesas/sh7763rdp/sh7763rdp.c
> +++ b/board/renesas/sh7763rdp/sh7763rdp.c
> @@ -8,6 +8,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/processor.h>
>
> diff --git a/board/renesas/silk/silk.c b/board/renesas/silk/silk.c
> index e7cbd75776..db88f0ddb6 100644
> --- a/board/renesas/silk/silk.c
> +++ b/board/renesas/silk/silk.c
> @@ -10,6 +10,7 @@
>  #include <cpu_func.h>
>  #include <env.h>
>  #include <hang.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <dm.h>
>  #include <dm/platform_data/serial_sh.h>
> diff --git a/board/renesas/silk/silk_spl.c b/board/renesas/silk/silk_spl.c
> index a2c397f935..9859977c77 100644
> --- a/board/renesas/silk/silk_spl.c
> +++ b/board/renesas/silk/silk_spl.c
> @@ -7,6 +7,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <dm/platform_data/serial_sh.h>
>  #include <asm/processor.h>
> diff --git a/board/renesas/stout/stout.c b/board/renesas/stout/stout.c
> index 0a0ff5ff76..594070a9bf 100644
> --- a/board/renesas/stout/stout.c
> +++ b/board/renesas/stout/stout.c
> @@ -10,6 +10,7 @@
>
>  #include <common.h>
>  #include <env.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <netdev.h>
>  #include <dm.h>
> diff --git a/board/renesas/stout/stout_spl.c b/board/renesas/stout/stout_spl.c
> index 8d01efce56..a10752de1c 100644
> --- a/board/renesas/stout/stout_spl.c
> +++ b/board/renesas/stout/stout_spl.c
> @@ -7,6 +7,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <dm/platform_data/serial_sh.h>
>  #include <asm/processor.h>
> diff --git a/board/renesas/ulcb/ulcb.c b/board/renesas/ulcb/ulcb.c
> index 04ca49572f..ebb379a82a 100644
> --- a/board/renesas/ulcb/ulcb.c
> +++ b/board/renesas/ulcb/ulcb.c
> @@ -8,6 +8,7 @@
>
>  #include <common.h>
>  #include <image.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <netdev.h>
>  #include <dm.h>
> diff --git a/board/rockchip/evb_rk3399/evb-rk3399.c b/board/rockchip/evb_rk3399/evb-rk3399.c
> index b9049abcc7..7909ef5c18 100644
> --- a/board/rockchip/evb_rk3399/evb-rk3399.c
> +++ b/board/rockchip/evb_rk3399/evb-rk3399.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <asm/arch-rockchip/periph.h>
>  #include <power/regulator.h>
>
> diff --git a/board/rockchip/evb_rv1108/evb_rv1108.c b/board/rockchip/evb_rv1108/evb_rv1108.c
> index 5d622c3737..c57913828d 100644
> --- a/board/rockchip/evb_rv1108/evb_rv1108.c
> +++ b/board/rockchip/evb_rv1108/evb_rv1108.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <syscon.h>
>  #include <asm/io.h>
>  #include <asm/arch-rockchip/clock.h>
> diff --git a/board/samsung/goni/goni.c b/board/samsung/goni/goni.c
> index 623e4abc21..a900ad1476 100644
> --- a/board/samsung/goni/goni.c
> +++ b/board/samsung/goni/goni.c
> @@ -6,6 +6,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/gpio.h>
>  #include <asm/arch/mmc.h>
>  #include <dm.h>
> diff --git a/board/sandisk/sansa_fuze_plus/sfp.c b/board/sandisk/sansa_fuze_plus/sfp.c
> index c2c9b9c7e7..ae965a80a5 100644
> --- a/board/sandisk/sansa_fuze_plus/sfp.c
> +++ b/board/sandisk/sansa_fuze_plus/sfp.c
> @@ -11,6 +11,7 @@
>
>  #include <common.h>
>  #include <errno.h>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/gpio.h>
>  #include <asm/io.h>
> diff --git a/board/sbc8349/sbc8349.c b/board/sbc8349/sbc8349.c
> index 9051392cd0..2c05ebb1bd 100644
> --- a/board/sbc8349/sbc8349.c
> +++ b/board/sbc8349/sbc8349.c
> @@ -9,6 +9,7 @@
>
>  #include <common.h>
>  #include <fdt_support.h>
> +#include <init.h>
>  #include <ioports.h>
>  #include <mpc83xx.h>
>  #include <asm/mpc8349_pci.h>
> diff --git a/board/schulercontrol/sc_sps_1/sc_sps_1.c b/board/schulercontrol/sc_sps_1/sc_sps_1.c
> index 422f25c2e9..d2c5f807ad 100644
> --- a/board/schulercontrol/sc_sps_1/sc_sps_1.c
> +++ b/board/schulercontrol/sc_sps_1/sc_sps_1.c
> @@ -7,6 +7,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/gpio.h>
>  #include <asm/io.h>
> diff --git a/board/seeed/linkit-smart-7688/board.c b/board/seeed/linkit-smart-7688/board.c
> index d3d3d50c2c..492530ec4e 100644
> --- a/board/seeed/linkit-smart-7688/board.c
> +++ b/board/seeed/linkit-smart-7688/board.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>
>  #define MT76XX_GPIO1_MODE      0x10000060
> diff --git a/board/siemens/capricorn/board.c b/board/siemens/capricorn/board.c
> index 00fd4b9658..b4eae7f027 100644
> --- a/board/siemens/capricorn/board.c
> +++ b/board/siemens/capricorn/board.c
> @@ -8,6 +8,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <errno.h>
> +#include <init.h>
>  #include <netdev.h>
>  #include <env_internal.h>
>  #include <fsl_esdhc_imx.h>
> diff --git a/board/siemens/capricorn/spl.c b/board/siemens/capricorn/spl.c
> index 47fe86ccc0..8435bd3863 100644
> --- a/board/siemens/capricorn/spl.c
> +++ b/board/siemens/capricorn/spl.c
> @@ -6,6 +6,7 @@
>   *
>   */
>  #include <common.h>
> +#include <init.h>
>  #include <spl.h>
>  #include <dm.h>
>  #include <dm/uclass.h>
> diff --git a/board/siemens/common/board.c b/board/siemens/common/board.c
> index 24429d2837..f1bca4b27f 100644
> --- a/board/siemens/common/board.c
> +++ b/board/siemens/common/board.c
> @@ -12,6 +12,7 @@
>  #include <common.h>
>  #include <env.h>
>  #include <errno.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <serial.h>
>  #include <spl.h>
> diff --git a/board/sifive/fu540/fu540.c b/board/sifive/fu540/fu540.c
> index 47a2090251..e9d1cf9a4b 100644
> --- a/board/sifive/fu540/fu540.c
> +++ b/board/sifive/fu540/fu540.c
> @@ -8,6 +8,7 @@
>
>  #include <common.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <linux/delay.h>
>  #include <linux/io.h>
>
> diff --git a/board/silica/pengwyn/board.c b/board/silica/pengwyn/board.c
> index 08eafefb91..e3c9d9e755 100644
> --- a/board/silica/pengwyn/board.c
> +++ b/board/silica/pengwyn/board.c
> @@ -7,6 +7,7 @@
>
>  #include <common.h>
>  #include <env.h>
> +#include <init.h>
>  #include <net.h>
>  #include <serial.h>
>  #include <asm/arch/cpu.h>
> diff --git a/board/sks-kinkel/sksimx6/sksimx6.c b/board/sks-kinkel/sksimx6/sksimx6.c
> index 48e7ff2479..e5f6e90e0c 100644
> --- a/board/sks-kinkel/sksimx6/sksimx6.c
> +++ b/board/sks-kinkel/sksimx6/sksimx6.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/imx-regs.h>
> diff --git a/board/socrates/socrates.c b/board/socrates/socrates.c
> index 84644a85c7..c51f3e4f92 100644
> --- a/board/socrates/socrates.c
> +++ b/board/socrates/socrates.c
> @@ -13,6 +13,7 @@
>  #include <common.h>
>  #include <clock_legacy.h>
>  #include <env.h>
> +#include <init.h>
>  #include <pci.h>
>  #include <uuid.h>
>  #include <asm/processor.h>
> diff --git a/board/solidrun/clearfog/clearfog.c b/board/solidrun/clearfog/clearfog.c
> index 490ca9bc34..b8391a35c0 100644
> --- a/board/solidrun/clearfog/clearfog.c
> +++ b/board/solidrun/clearfog/clearfog.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <i2c.h>
> +#include <init.h>
>  #include <miiphy.h>
>  #include <net.h>
>  #include <netdev.h>
> diff --git a/board/sr1500/socfpga.c b/board/sr1500/socfpga.c
> index c9e32e3960..83663c7e4d 100644
> --- a/board/sr1500/socfpga.c
> +++ b/board/sr1500/socfpga.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/arch/reset_manager.h>
>  #include <asm/gpio.h>
>  #include <asm/io.h>
> diff --git a/board/st/stih410-b2260/board.c b/board/st/stih410-b2260/board.c
> index 35bf497156..b1147f2e1a 100644
> --- a/board/st/stih410-b2260/board.c
> +++ b/board/st/stih410-b2260/board.c
> @@ -6,6 +6,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <asm/cache.h>
>  #include <linux/usb/otg.h>
>  #include <dwc3-sti-glue.h>
> diff --git a/board/st/stm32f429-discovery/stm32f429-discovery.c b/board/st/stm32f429-discovery/stm32f429-discovery.c
> index 500dc5fe3a..5b0744ff6b 100644
> --- a/board/st/stm32f429-discovery/stm32f429-discovery.c
> +++ b/board/st/stm32f429-discovery/stm32f429-discovery.c
> @@ -12,6 +12,7 @@
>
>  #include <common.h>
>  #include <dm.h>
> +#include <init.h>
>
>  #include <asm/io.h>
>  #include <asm/arch/stm32.h>
> diff --git a/board/st/stm32f429-evaluation/stm32f429-evaluation.c b/board/st/stm32f429-evaluation/stm32f429-evaluation.c
> index 8ab2fa5d59..1570d110bf 100644
> --- a/board/st/stm32f429-evaluation/stm32f429-evaluation.c
> +++ b/board/st/stm32f429-evaluation/stm32f429-evaluation.c
> @@ -6,6 +6,7 @@
>
>  #include <common.h>
>  #include <dm.h>
> +#include <init.h>
>
>  #include <asm/io.h>
>  #include <asm/arch/stm32.h>
> diff --git a/board/st/stm32f469-discovery/stm32f469-discovery.c b/board/st/stm32f469-discovery/stm32f469-discovery.c
> index 70d23d90f4..d9bcb39bea 100644
> --- a/board/st/stm32f469-discovery/stm32f469-discovery.c
> +++ b/board/st/stm32f469-discovery/stm32f469-discovery.c
> @@ -6,6 +6,7 @@
>
>  #include <common.h>
>  #include <dm.h>
> +#include <init.h>
>
>  #include <asm/io.h>
>  #include <asm/arch/stm32.h>
> diff --git a/board/st/stv0991/stv0991.c b/board/st/stv0991/stv0991.c
> index fbcb87092b..d5a9f1386e 100644
> --- a/board/st/stv0991/stv0991.c
> +++ b/board/st/stv0991/stv0991.c
> @@ -7,6 +7,7 @@
>  #include <common.h>
>  #include <bootstage.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <miiphy.h>
>  #include <net.h>
>  #include <asm/arch/stv0991_periph.h>
> diff --git a/board/ste/stemmy/stemmy.c b/board/ste/stemmy/stemmy.c
> index 8cf6f18755..f7834c08fc 100644
> --- a/board/ste/stemmy/stemmy.c
> +++ b/board/ste/stemmy/stemmy.c
> @@ -3,6 +3,7 @@
>   * Copyright (C) 2019 Stephan Gerhold <stephan@gerhold.net>
>   */
>  #include <common.h>
> +#include <init.h>
>
>  DECLARE_GLOBAL_DATA_PTR;
>
> diff --git a/board/sunxi/dram_sun4i_auto.c b/board/sunxi/dram_sun4i_auto.c
> index 7d4409b51e..e8bbee4ee5 100644
> --- a/board/sunxi/dram_sun4i_auto.c
> +++ b/board/sunxi/dram_sun4i_auto.c
> @@ -1,4 +1,5 @@
>  #include <common.h>
> +#include <init.h>
>  #include <asm/arch/dram.h>
>
>  static struct dram_para dram_para = {
> diff --git a/board/sunxi/dram_sun5i_auto.c b/board/sunxi/dram_sun5i_auto.c
> index e3fa243267..a5f4f8b743 100644
> --- a/board/sunxi/dram_sun5i_auto.c
> +++ b/board/sunxi/dram_sun5i_auto.c
> @@ -1,6 +1,7 @@
>  /* DRAM parameters for auto dram configuration on sun5i and sun7i */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/arch/dram.h>
>
>  static struct dram_para dram_para = {
> diff --git a/board/synopsys/axs10x/axs10x.c b/board/synopsys/axs10x/axs10x.c
> index 4bd88f85a6..b4a1d4c5df 100644
> --- a/board/synopsys/axs10x/axs10x.c
> +++ b/board/synopsys/axs10x/axs10x.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <cpu_func.h>
>  #include <dwmmc.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <asm/arcregs.h>
>  #include "axs10x.h"
> diff --git a/board/synopsys/emsdp/emsdp.c b/board/synopsys/emsdp/emsdp.c
> index c09ed8cff8..d98e606426 100644
> --- a/board/synopsys/emsdp/emsdp.c
> +++ b/board/synopsys/emsdp/emsdp.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <cpu_func.h>
>  #include <dwmmc.h>
> +#include <init.h>
>  #include <malloc.h>
>
>  #include <asm/arcregs.h>
> diff --git a/board/synopsys/iot_devkit/iot_devkit.c b/board/synopsys/iot_devkit/iot_devkit.c
> index 36aa8f6ae5..05b63e415b 100644
> --- a/board/synopsys/iot_devkit/iot_devkit.c
> +++ b/board/synopsys/iot_devkit/iot_devkit.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <dwmmc.h>
>  #include <linux/libfdt.h>
> diff --git a/board/synopsys/nsim/nsim.c b/board/synopsys/nsim/nsim.c
> index f384f707f6..00e5cc3641 100644
> --- a/board/synopsys/nsim/nsim.c
> +++ b/board/synopsys/nsim/nsim.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <dm/device.h>
>  #include <virtio_types.h>
>  #include <virtio.h>
> diff --git a/board/tbs/tbs2910/tbs2910.c b/board/tbs/tbs2910/tbs2910.c
> index b4fd183394..d32517f998 100644
> --- a/board/tbs/tbs2910/tbs2910.c
> +++ b/board/tbs/tbs2910/tbs2910.c
> @@ -3,6 +3,7 @@
>   * Copyright (C) 2014 Soeren Moch <smoch@web.de>
>   */
>
> +#include <init.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/imx-regs.h>
>  #include <asm/arch/iomux.h>
> diff --git a/board/technexion/pico-imx6/pico-imx6.c b/board/technexion/pico-imx6/pico-imx6.c
> index 146bbc26d6..eac30368f7 100644
> --- a/board/technexion/pico-imx6/pico-imx6.c
> +++ b/board/technexion/pico-imx6/pico-imx6.c
> @@ -6,6 +6,7 @@
>   * Author: Fabio Estevam <festevam@gmail.com>
>   */
>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/crm_regs.h>
> diff --git a/board/technexion/pico-imx6/spl.c b/board/technexion/pico-imx6/spl.c
> index 983f98beec..fe3c584662 100644
> --- a/board/technexion/pico-imx6/spl.c
> +++ b/board/technexion/pico-imx6/spl.c
> @@ -8,6 +8,7 @@
>
>  #include <common.h>
>  #include <image.h>
> +#include <init.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/imx-regs.h>
>  #include <asm/arch/iomux.h>
> diff --git a/board/technexion/pico-imx6ul/pico-imx6ul.c b/board/technexion/pico-imx6ul/pico-imx6ul.c
> index 4294f3ed54..e4ca83a5ff 100644
> --- a/board/technexion/pico-imx6ul/pico-imx6ul.c
> +++ b/board/technexion/pico-imx6ul/pico-imx6ul.c
> @@ -5,6 +5,7 @@
>   * Author: Richard Hu <richard.hu@technexion.com>
>   */
>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/iomux.h>
> diff --git a/board/technexion/pico-imx7d/spl.c b/board/technexion/pico-imx7d/spl.c
> index 69db77412c..a651a00c1a 100644
> --- a/board/technexion/pico-imx7d/spl.c
> +++ b/board/technexion/pico-imx7d/spl.c
> @@ -7,6 +7,7 @@
>
>  #include <common.h>
>  #include <cpu_func.h>
> +#include <init.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/imx-regs.h>
>  #include <asm/arch/crm_regs.h>
> diff --git a/board/technexion/tao3530/tao3530.c b/board/technexion/tao3530/tao3530.c
> index b604ee951b..8ce3637731 100644
> --- a/board/technexion/tao3530/tao3530.c
> +++ b/board/technexion/tao3530/tao3530.c
> @@ -5,6 +5,7 @@
>   */
>  #include <common.h>
>  #include <bootstage.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <netdev.h>
>  #include <twl4030.h>
> diff --git a/board/technologic/ts4600/ts4600.c b/board/technologic/ts4600/ts4600.c
> index f9cc2e8f10..2a63e84ec3 100644
> --- a/board/technologic/ts4600/ts4600.c
> +++ b/board/technologic/ts4600/ts4600.c
> @@ -14,6 +14,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/gpio.h>
>  #include <asm/io.h>
>  #include <asm/arch/imx-regs.h>
> diff --git a/board/theobroma-systems/puma_rk3399/puma-rk3399.c b/board/theobroma-systems/puma_rk3399/puma-rk3399.c
> index 7ff4766947..7e7effe56e 100644
> --- a/board/theobroma-systems/puma_rk3399/puma-rk3399.c
> +++ b/board/theobroma-systems/puma_rk3399/puma-rk3399.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <env.h>
> +#include <init.h>
>  #include <misc.h>
>  #include <spl.h>
>  #include <syscon.h>
> diff --git a/board/ti/am3517crane/am3517crane.c b/board/ti/am3517crane/am3517crane.c
> index 5d4e57ffc5..888aa5b9ca 100644
> --- a/board/ti/am3517crane/am3517crane.c
> +++ b/board/ti/am3517crane/am3517crane.c
> @@ -10,6 +10,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/arch/mmc_host_def.h>
>  #include <asm/arch/mem.h>
> diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
> index 439b023da8..9139ad87d4 100644
> --- a/board/ti/beagle/beagle.c
> +++ b/board/ti/beagle/beagle.c
> @@ -16,6 +16,7 @@
>  #include <bootstage.h>
>  #include <dm.h>
>  #include <env.h>
> +#include <init.h>
>  #include <net.h>
>  #include <ns16550.h>
>  #include <serial.h>
> diff --git a/board/ti/evm/evm.c b/board/ti/evm/evm.c
> index 7161c934cd..d6d21bae1f 100644
> --- a/board/ti/evm/evm.c
> +++ b/board/ti/evm/evm.c
> @@ -13,6 +13,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <env.h>
> +#include <init.h>
>  #include <net.h>
>  #include <ns16550.h>
>  #include <netdev.h>
> diff --git a/board/ti/ks2_evm/board_k2e.c b/board/ti/ks2_evm/board_k2e.c
> index 350cc68e49..39abb24e15 100644
> --- a/board/ti/ks2_evm/board_k2e.c
> +++ b/board/ti/ks2_evm/board_k2e.c
> @@ -8,6 +8,7 @@
>
>  #include <common.h>
>  #include <image.h>
> +#include <init.h>
>  #include <asm/arch/ddr3.h>
>  #include <asm/arch/hardware.h>
>  #include <asm/ti-common/keystone_net.h>
> diff --git a/board/ti/ks2_evm/board_k2hk.c b/board/ti/ks2_evm/board_k2hk.c
> index 1eb6cd761e..12c4649c3c 100644
> --- a/board/ti/ks2_evm/board_k2hk.c
> +++ b/board/ti/ks2_evm/board_k2hk.c
> @@ -8,6 +8,7 @@
>
>  #include <common.h>
>  #include <image.h>
> +#include <init.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/hardware.h>
>  #include <asm/ti-common/keystone_net.h>
> diff --git a/board/ti/ks2_evm/board_k2l.c b/board/ti/ks2_evm/board_k2l.c
> index 5ff11ee0d6..f759ee3646 100644
> --- a/board/ti/ks2_evm/board_k2l.c
> +++ b/board/ti/ks2_evm/board_k2l.c
> @@ -8,6 +8,7 @@
>
>  #include <common.h>
>  #include <image.h>
> +#include <init.h>
>  #include <asm/arch/ddr3.h>
>  #include <asm/arch/hardware.h>
>  #include <asm/ti-common/keystone_net.h>
> diff --git a/board/ti/omap5_uevm/evm.c b/board/ti/omap5_uevm/evm.c
> index 0d19ad018a..fab48a70ef 100644
> --- a/board/ti/omap5_uevm/evm.c
> +++ b/board/ti/omap5_uevm/evm.c
> @@ -6,6 +6,7 @@
>   * Steve Sakoman  <steve@sakoman.com>
>   */
>  #include <common.h>
> +#include <init.h>
>  #include <net.h>
>  #include <palmas.h>
>  #include <asm/arch/omap.h>
> diff --git a/board/ti/panda/panda.c b/board/ti/panda/panda.c
> index b1e51bc431..c9413af350 100644
> --- a/board/ti/panda/panda.c
> +++ b/board/ti/panda/panda.c
> @@ -5,6 +5,7 @@
>   * Steve Sakoman  <steve@sakoman.com>
>   */
>  #include <common.h>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/mach-types.h>
>  #include <asm/arch/sys_proto.h>
> diff --git a/board/ti/sdp4430/sdp.c b/board/ti/sdp4430/sdp.c
> index 97da5ccf0d..a5b3504045 100644
> --- a/board/ti/sdp4430/sdp.c
> +++ b/board/ti/sdp4430/sdp.c
> @@ -6,6 +6,7 @@
>   * Steve Sakoman  <steve@sakoman.com>
>   */
>  #include <common.h>
> +#include <init.h>
>  #include <net.h>
>  #include <twl6030.h>
>  #include <asm/arch/sys_proto.h>
> diff --git a/board/ti/ti814x/evm.c b/board/ti/ti814x/evm.c
> index 7f82e71228..8ed80d2f46 100644
> --- a/board/ti/ti814x/evm.c
> +++ b/board/ti/ti814x/evm.c
> @@ -11,6 +11,7 @@
>  #include <cpsw.h>
>  #include <env.h>
>  #include <errno.h>
> +#include <init.h>
>  #include <net.h>
>  #include <spl.h>
>  #include <asm/arch/cpu.h>
> diff --git a/board/ti/ti816x/evm.c b/board/ti/ti816x/evm.c
> index e895a216fe..590c15676a 100644
> --- a/board/ti/ti816x/evm.c
> +++ b/board/ti/ti816x/evm.c
> @@ -8,6 +8,7 @@
>
>  #include <common.h>
>  #include <env.h>
> +#include <init.h>
>  #include <net.h>
>  #include <spl.h>
>  #include <asm/cache.h>
> diff --git a/board/timll/devkit8000/devkit8000.c b/board/timll/devkit8000/devkit8000.c
> index b037d725c3..cbb219931d 100644
> --- a/board/timll/devkit8000/devkit8000.c
> +++ b/board/timll/devkit8000/devkit8000.c
> @@ -18,6 +18,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <env.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <ns16550.h>
>  #include <twl4030.h>
> diff --git a/board/toradex/apalis-tk1/apalis-tk1.c b/board/toradex/apalis-tk1/apalis-tk1.c
> index bc98858ae0..81329a6131 100644
> --- a/board/toradex/apalis-tk1/apalis-tk1.c
> +++ b/board/toradex/apalis-tk1/apalis-tk1.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <asm/arch-tegra/ap.h>
>  #include <asm/gpio.h>
>  #include <asm/io.h>
> diff --git a/board/toradex/apalis_t30/apalis_t30.c b/board/toradex/apalis_t30/apalis_t30.c
> index df9bc8e707..b750d66aae 100644
> --- a/board/toradex/apalis_t30/apalis_t30.c
> +++ b/board/toradex/apalis_t30/apalis_t30.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/arch/gp_padctrl.h>
>  #include <asm/arch/pinmux.h>
>  #include <asm/arch-tegra/ap.h>
> diff --git a/board/toradex/colibri_pxa270/colibri_pxa270.c b/board/toradex/colibri_pxa270/colibri_pxa270.c
> index 93693712a9..d9b09ae461 100644
> --- a/board/toradex/colibri_pxa270/colibri_pxa270.c
> +++ b/board/toradex/colibri_pxa270/colibri_pxa270.c
> @@ -9,6 +9,7 @@
>  #include <common.h>
>  #include <cpu_func.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/arch/hardware.h>
>  #include <asm/arch/pxa.h>
> diff --git a/board/toradex/colibri_t20/colibri_t20.c b/board/toradex/colibri_t20/colibri_t20.c
> index e0b27e92f8..6cecbe5e28 100644
> --- a/board/toradex/colibri_t20/colibri_t20.c
> +++ b/board/toradex/colibri_t20/colibri_t20.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/funcmux.h>
>  #include <asm/arch/pinmux.h>
> diff --git a/board/toradex/colibri_t30/colibri_t30.c b/board/toradex/colibri_t30/colibri_t30.c
> index b6b00e3860..d21ff544f4 100644
> --- a/board/toradex/colibri_t30/colibri_t30.c
> +++ b/board/toradex/colibri_t30/colibri_t30.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/arch/gp_padctrl.h>
>  #include <asm/arch/pinmux.h>
>  #include <asm/arch-tegra/ap.h>
> diff --git a/board/toradex/common/tdx-common.c b/board/toradex/common/tdx-common.c
> index e9441a7979..e8de923f3e 100644
> --- a/board/toradex/common/tdx-common.c
> +++ b/board/toradex/common/tdx-common.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <env.h>
>  #include <g_dnl.h>
> +#include <init.h>
>  #include <linux/libfdt.h>
>
>  #include "tdx-cfg-block.h"
> diff --git a/board/toradex/verdin-imx8mm/spl.c b/board/toradex/verdin-imx8mm/spl.c
> index c614fc7a3f..338952ea71 100644
> --- a/board/toradex/verdin-imx8mm/spl.c
> +++ b/board/toradex/verdin-imx8mm/spl.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <image.h>
> +#include <init.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/ddr.h>
>  #include <asm/arch/imx8mm_pins.h>
> diff --git a/board/toradex/verdin-imx8mm/verdin-imx8mm.c b/board/toradex/verdin-imx8mm/verdin-imx8mm.c
> index 35866e096a..ff05c7d552 100644
> --- a/board/toradex/verdin-imx8mm/verdin-imx8mm.c
> +++ b/board/toradex/verdin-imx8mm/verdin-imx8mm.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/sys_proto.h>
>  #include <asm/io.h>
> diff --git a/board/tplink/wdr4300/wdr4300.c b/board/tplink/wdr4300/wdr4300.c
> index 4dacaa4285..7e7339553b 100644
> --- a/board/tplink/wdr4300/wdr4300.c
> +++ b/board/tplink/wdr4300/wdr4300.c
> @@ -4,6 +4,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/io.h>
>  #include <asm/addrspace.h>
>  #include <asm/types.h>
> diff --git a/board/udoo/udoo_spl.c b/board/udoo/udoo_spl.c
> index 1a3b136529..09fc23a901 100644
> --- a/board/udoo/udoo_spl.c
> +++ b/board/udoo/udoo_spl.c
> @@ -7,6 +7,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/imx-regs.h>
>  #include <asm/arch/iomux.h>
> diff --git a/board/variscite/dart_6ul/dart_6ul.c b/board/variscite/dart_6ul/dart_6ul.c
> index 0f00506d7a..a4f449d2e2 100644
> --- a/board/variscite/dart_6ul/dart_6ul.c
> +++ b/board/variscite/dart_6ul/dart_6ul.c
> @@ -4,6 +4,7 @@
>   * Copyright (C) 2019 Parthiban Nallathambi <parthitce@gmail.com>
>   */
>
> +#include <init.h>
>  #include <net.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/crm_regs.h>
> diff --git a/board/variscite/dart_6ul/spl.c b/board/variscite/dart_6ul/spl.c
> index 798523d0d0..1b06a66060 100644
> --- a/board/variscite/dart_6ul/spl.c
> +++ b/board/variscite/dart_6ul/spl.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <spl.h>
>  #include <asm/arch/clock.h>
>  #include <asm/io.h>
> diff --git a/board/varisys/cyrus/ddr.c b/board/varisys/cyrus/ddr.c
> index cac00e0467..54d15accbd 100644
> --- a/board/varisys/cyrus/ddr.c
> +++ b/board/varisys/cyrus/ddr.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <i2c.h>
>  #include <hwconfig.h>
> +#include <init.h>
>  #include <asm/mmu.h>
>  #include <fsl_ddr_sdram.h>
>  #include <fsl_ddr_dimm_params.h>
> diff --git a/board/wandboard/spl.c b/board/wandboard/spl.c
> index 250043a26d..816b9cb6fc 100644
> --- a/board/wandboard/spl.c
> +++ b/board/wandboard/spl.c
> @@ -6,6 +6,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/imx-regs.h>
>  #include <asm/arch/iomux.h>
> diff --git a/board/xes/common/board.c b/board/xes/common/board.c
> index 43575bc302..053b07a0b7 100644
> --- a/board/xes/common/board.c
> +++ b/board/xes/common/board.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <env.h>
>  #include "fsl_8xxx_misc.h"
> +#include <init.h>
>
>  int checkboard(void)
>  {
> diff --git a/board/xilinx/zynqmp_r5/board.c b/board/xilinx/zynqmp_r5/board.c
> index 1c45ee7196..5c5a2e9386 100644
> --- a/board/xilinx/zynqmp_r5/board.c
> +++ b/board/xilinx/zynqmp_r5/board.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <fdtdec.h>
> +#include <init.h>
>
>  int board_init(void)
>  {
> diff --git a/board/zyxel/nsa310s/nsa310s.c b/board/zyxel/nsa310s/nsa310s.c
> index 82a3feee69..3f71e3da44 100644
> --- a/board/zyxel/nsa310s/nsa310s.c
> +++ b/board/zyxel/nsa310s/nsa310s.c
> @@ -6,6 +6,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <miiphy.h>
>  #include <net.h>
>  #include <asm/arch/cpu.h>
> diff --git a/cmd/pci.c b/cmd/pci.c
> index 0043471fc7..b2174e2a9c 100644
> --- a/cmd/pci.c
> +++ b/cmd/pci.c
> @@ -18,6 +18,7 @@
>  #include <command.h>
>  #include <console.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <asm/processor.h>
>  #include <asm/io.h>
>  #include <pci.h>
> diff --git a/cmd/tlv_eeprom.c b/cmd/tlv_eeprom.c
> index 8b768f3108..b5f293ba7f 100644
> --- a/cmd/tlv_eeprom.c
> +++ b/cmd/tlv_eeprom.c
> @@ -15,6 +15,7 @@
>  #include <i2c.h>
>  #include <i2c_eeprom.h>
>  #include <env.h>
> +#include <init.h>
>  #include <net.h>
>  #include <linux/ctype.h>
>  #include <u-boot/crc.h>
> diff --git a/common/board_info.c b/common/board_info.c
> index a392bece62..a6db087f96 100644
> --- a/common/board_info.c
> +++ b/common/board_info.c
> @@ -1,6 +1,7 @@
>  // SPDX-License-Identifier: GPL-2.0+
>
>  #include <common.h>
> +#include <init.h>
>  #include <linux/libfdt.h>
>  #include <linux/compiler.h>
>
> diff --git a/common/init/board_init.c b/common/init/board_init.c
> index 4c4f0ced53..8c8a5eac05 100644
> --- a/common/init/board_init.c
> +++ b/common/init/board_init.c
> @@ -8,6 +8,7 @@
>
>  #include <common.h>
>  #include <bootstage.h>
> +#include <init.h>
>
>  DECLARE_GLOBAL_DATA_PTR;
>
> diff --git a/common/lcd.c b/common/lcd.c
> index c421090c87..4acf91e623 100644
> --- a/common/lcd.c
> +++ b/common/lcd.c
> @@ -13,6 +13,7 @@
>  #include <cpu_func.h>
>  #include <env_callback.h>
>  #include <asm/cache.h>
> +#include <init.h>
>  #include <linux/types.h>
>  #include <stdio_dev.h>
>  #include <lcd.h>
> diff --git a/common/spl/spl.c b/common/spl/spl.c
> index ab62b8b79e..c59808b924 100644
> --- a/common/spl/spl.c
> +++ b/common/spl/spl.c
> @@ -13,6 +13,7 @@
>  #include <dm.h>
>  #include <handoff.h>
>  #include <hang.h>
> +#include <init.h>
>  #include <irq_func.h>
>  #include <serial.h>
>  #include <spl.h>
> diff --git a/drivers/clk/clk_stm32mp1.c b/drivers/clk/clk_stm32mp1.c
> index 50df8425bf..a70388b750 100644
> --- a/drivers/clk/clk_stm32mp1.c
> +++ b/drivers/clk/clk_stm32mp1.c
> @@ -7,6 +7,7 @@
>  #include <clk-uclass.h>
>  #include <div64.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <regmap.h>
>  #include <spl.h>
>  #include <syscon.h>
> diff --git a/drivers/cpu/bmips_cpu.c b/drivers/cpu/bmips_cpu.c
> index fc047473f5..613c836049 100644
> --- a/drivers/cpu/bmips_cpu.c
> +++ b/drivers/cpu/bmips_cpu.c
> @@ -11,6 +11,7 @@
>  #include <cpu.h>
>  #include <dm.h>
>  #include <errno.h>
> +#include <init.h>
>  #include <asm/io.h>
>
>  #define REV_CHIPID_SHIFT               16
> diff --git a/drivers/ddr/altera/sdram_arria10.c b/drivers/ddr/altera/sdram_arria10.c
> index 049f202e03..d1dec58295 100644
> --- a/drivers/ddr/altera/sdram_arria10.c
> +++ b/drivers/ddr/altera/sdram_arria10.c
> @@ -7,6 +7,7 @@
>  #include <cpu_func.h>
>  #include <errno.h>
>  #include <fdtdec.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <wait_bit.h>
>  #include <watchdog.h>
> diff --git a/drivers/ddr/altera/sdram_soc64.c b/drivers/ddr/altera/sdram_soc64.c
> index c06fba92f8..1a69b0328a 100644
> --- a/drivers/ddr/altera/sdram_soc64.c
> +++ b/drivers/ddr/altera/sdram_soc64.c
> @@ -11,6 +11,7 @@
>  #include <div64.h>
>  #include <fdtdec.h>
>  #include <hang.h>
> +#include <init.h>
>  #include <ram.h>
>  #include <reset.h>
>  #include "sdram_soc64.h"
> diff --git a/drivers/ddr/fsl/main.c b/drivers/ddr/fsl/main.c
> index 0aa6aedae7..794ff55378 100644
> --- a/drivers/ddr/fsl/main.c
> +++ b/drivers/ddr/fsl/main.c
> @@ -14,6 +14,7 @@
>  #include <i2c.h>
>  #include <fsl_ddr_sdram.h>
>  #include <fsl_ddr.h>
> +#include <init.h>
>
>  /*
>   * CONFIG_SYS_FSL_DDR_SDRAM_BASE_PHY is the physical address from the view
> diff --git a/drivers/dma/lpc32xx_dma.c b/drivers/dma/lpc32xx_dma.c
> index d3ce141eef..1637e329df 100644
> --- a/drivers/dma/lpc32xx_dma.c
> +++ b/drivers/dma/lpc32xx_dma.c
> @@ -9,6 +9,7 @@
>
>  #include <common.h>
>  #include <errno.h>
> +#include <init.h>
>  #include <asm/arch/dma.h>
>  #include <asm/arch/cpu.h>
>  #include <asm/arch/clk.h>
> diff --git a/drivers/fpga/fpga.c b/drivers/fpga/fpga.c
> index 0917871d49..f7e5556805 100644
> --- a/drivers/fpga/fpga.c
> +++ b/drivers/fpga/fpga.c
> @@ -6,6 +6,7 @@
>
>  /* Generic FPGA support */
>  #include <common.h>             /* core U-Boot definitions */
> +#include <init.h>
>  #include <xilinx.h>             /* xilinx specific definitions */
>  #include <altera.h>             /* altera specific definitions */
>  #include <lattice.h>
> diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
> index 036cf0b4a1..16cdfe3978 100644
> --- a/drivers/mtd/cfi_flash.c
> +++ b/drivers/mtd/cfi_flash.c
> @@ -23,6 +23,7 @@
>  #include <errno.h>
>  #include <fdt_support.h>
>  #include <flash.h>
> +#include <init.h>
>  #include <irq_func.h>
>  #include <asm/processor.h>
>  #include <asm/io.h>
> diff --git a/drivers/mtd/pic32_flash.c b/drivers/mtd/pic32_flash.c
> index 8fff818e42..1766ba4802 100644
> --- a/drivers/mtd/pic32_flash.c
> +++ b/drivers/mtd/pic32_flash.c
> @@ -10,6 +10,7 @@
>  #include <dm.h>
>  #include <fdt_support.h>
>  #include <flash.h>
> +#include <init.h>
>  #include <irq_func.h>
>  #include <mach/pic32.h>
>  #include <wait_bit.h>
> diff --git a/drivers/pci/fsl_pci_init.c b/drivers/pci/fsl_pci_init.c
> index ab5e49941f..c4eeb9b67c 100644
> --- a/drivers/pci/fsl_pci_init.c
> +++ b/drivers/pci/fsl_pci_init.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <env.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <asm/fsl_serdes.h>
>
> diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c
> index 7f46e901fb..93cfc1cade 100644
> --- a/drivers/pci/pci-uclass.c
> +++ b/drivers/pci/pci-uclass.c
> @@ -7,6 +7,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <errno.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <pci.h>
>  #include <asm/io.h>
> diff --git a/drivers/pci/pci_ftpci100.c b/drivers/pci/pci_ftpci100.c
> index 736befdc3b..f5eb702723 100644
> --- a/drivers/pci/pci_ftpci100.c
> +++ b/drivers/pci/pci_ftpci100.c
> @@ -7,6 +7,7 @@
>   * Macpaul Lin, Andes Technology Corporation <macpaul@andestech.com>
>   */
>  #include <common.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <pci.h>
>
> diff --git a/drivers/pci/pci_gt64120.c b/drivers/pci/pci_gt64120.c
> index 55f4800781..62f213d122 100644
> --- a/drivers/pci/pci_gt64120.c
> +++ b/drivers/pci/pci_gt64120.c
> @@ -10,6 +10,7 @@
>
>  #include <common.h>
>  #include <gt64120.h>
> +#include <init.h>
>  #include <pci.h>
>  #include <pci_gt64120.h>
>
> diff --git a/drivers/pci/pci_msc01.c b/drivers/pci/pci_msc01.c
> index 504eb65c27..04838200a8 100644
> --- a/drivers/pci/pci_msc01.c
> +++ b/drivers/pci/pci_msc01.c
> @@ -5,6 +5,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <msc01.h>
>  #include <pci.h>
>  #include <pci_msc01.h>
> diff --git a/drivers/pci/pcie_layerscape_fixup.c b/drivers/pci/pcie_layerscape_fixup.c
> index ec6acbb138..0d6750beb7 100644
> --- a/drivers/pci/pcie_layerscape_fixup.c
> +++ b/drivers/pci/pcie_layerscape_fixup.c
> @@ -6,6 +6,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <pci.h>
>  #include <asm/arch/fsl_serdes.h>
>  #include <asm/io.h>
> diff --git a/drivers/pci/pcie_layerscape_fixup_common.c b/drivers/pci/pcie_layerscape_fixup_common.c
> index b010a6300c..c11c691b86 100644
> --- a/drivers/pci/pcie_layerscape_fixup_common.c
> +++ b/drivers/pci/pcie_layerscape_fixup_common.c
> @@ -8,6 +8,7 @@
>   */
>
>  #include <common.h>
> +#include <init.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/soc.h>
>  #include "pcie_layerscape_fixup_common.h"
> diff --git a/drivers/ram/imxrt_sdram.c b/drivers/ram/imxrt_sdram.c
> index ac15e94f00..6e20432f31 100644
> --- a/drivers/ram/imxrt_sdram.c
> +++ b/drivers/ram/imxrt_sdram.c
> @@ -7,6 +7,7 @@
>  #include <common.h>
>  #include <clk.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <ram.h>
>  #include <asm/io.h>
>  #include <linux/err.h>
> diff --git a/drivers/ram/rockchip/sdram_px30.c b/drivers/ram/rockchip/sdram_px30.c
> index 729255493a..ac7d96540f 100644
> --- a/drivers/ram/rockchip/sdram_px30.c
> +++ b/drivers/ram/rockchip/sdram_px30.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <debug_uart.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <ram.h>
>  #include <syscon.h>
>  #include <asm/io.h>
> diff --git a/drivers/ram/rockchip/sdram_rk3188.c b/drivers/ram/rockchip/sdram_rk3188.c
> index 9b5eb38ecc..4f3ed739fb 100644
> --- a/drivers/ram/rockchip/sdram_rk3188.c
> +++ b/drivers/ram/rockchip/sdram_rk3188.c
> @@ -12,6 +12,7 @@
>  #include <dt-structs.h>
>  #include <errno.h>
>  #include <hang.h>
> +#include <init.h>
>  #include <ram.h>
>  #include <regmap.h>
>  #include <syscon.h>
> diff --git a/drivers/ram/rockchip/sdram_rk322x.c b/drivers/ram/rockchip/sdram_rk322x.c
> index 223f048161..0b11b48697 100644
> --- a/drivers/ram/rockchip/sdram_rk322x.c
> +++ b/drivers/ram/rockchip/sdram_rk322x.c
> @@ -7,6 +7,7 @@
>  #include <dm.h>
>  #include <dt-structs.h>
>  #include <errno.h>
> +#include <init.h>
>  #include <ram.h>
>  #include <regmap.h>
>  #include <syscon.h>
> diff --git a/drivers/ram/rockchip/sdram_rk3288.c b/drivers/ram/rockchip/sdram_rk3288.c
> index 9f6f555147..23fd7956a7 100644
> --- a/drivers/ram/rockchip/sdram_rk3288.c
> +++ b/drivers/ram/rockchip/sdram_rk3288.c
> @@ -12,6 +12,7 @@
>  #include <dt-structs.h>
>  #include <errno.h>
>  #include <hang.h>
> +#include <init.h>
>  #include <ram.h>
>  #include <regmap.h>
>  #include <syscon.h>
> diff --git a/drivers/ram/rockchip/sdram_rk3328.c b/drivers/ram/rockchip/sdram_rk3328.c
> index 8329f4a352..36e0d2e840 100644
> --- a/drivers/ram/rockchip/sdram_rk3328.c
> +++ b/drivers/ram/rockchip/sdram_rk3328.c
> @@ -7,6 +7,7 @@
>  #include <debug_uart.h>
>  #include <dm.h>
>  #include <dt-structs.h>
> +#include <init.h>
>  #include <ram.h>
>  #include <regmap.h>
>  #include <syscon.h>
> diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c
> index d69ef01d08..7b95c954a6 100644
> --- a/drivers/ram/rockchip/sdram_rk3399.c
> +++ b/drivers/ram/rockchip/sdram_rk3399.c
> @@ -9,6 +9,7 @@
>  #include <clk.h>
>  #include <dm.h>
>  #include <dt-structs.h>
> +#include <init.h>
>  #include <ram.h>
>  #include <regmap.h>
>  #include <syscon.h>
> diff --git a/drivers/ram/stm32_sdram.c b/drivers/ram/stm32_sdram.c
> index 2d03333b1b..2e06b526e2 100644
> --- a/drivers/ram/stm32_sdram.c
> +++ b/drivers/ram/stm32_sdram.c
> @@ -7,6 +7,7 @@
>  #include <common.h>
>  #include <clk.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <ram.h>
>  #include <asm/io.h>
>  #include <dm/device_compat.h>
> diff --git a/drivers/timer/cadence-ttc.c b/drivers/timer/cadence-ttc.c
> index 4837b0645b..f4942a5500 100644
> --- a/drivers/timer/cadence-ttc.c
> +++ b/drivers/timer/cadence-ttc.c
> @@ -7,6 +7,7 @@
>  #include <bootstage.h>
>  #include <dm.h>
>  #include <errno.h>
> +#include <init.h>
>  #include <timer.h>
>  #include <asm/io.h>
>  #include <linux/err.h>
> diff --git a/drivers/timer/rockchip_timer.c b/drivers/timer/rockchip_timer.c
> index 0cbdc279a5..7534e0363e 100644
> --- a/drivers/timer/rockchip_timer.c
> +++ b/drivers/timer/rockchip_timer.c
> @@ -6,6 +6,7 @@
>  #include <common.h>
>  #include <bootstage.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <dm/ofnode.h>
>  #include <mapmem.h>
>  #include <asm/arch-rockchip/timer.h>
> diff --git a/drivers/timer/timer-uclass.c b/drivers/timer/timer-uclass.c
> index b619200f00..14dde950a1 100644
> --- a/drivers/timer/timer-uclass.c
> +++ b/drivers/timer/timer-uclass.c
> @@ -5,6 +5,7 @@
>
>  #include <common.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <dm/lists.h>
>  #include <dm/device-internal.h>
>  #include <dm/root.h>
> diff --git a/drivers/usb/gadget/f_thor.c b/drivers/usb/gadget/f_thor.c
> index ee646fdd5c..dea17b9209 100644
> --- a/drivers/usb/gadget/f_thor.c
> +++ b/drivers/usb/gadget/f_thor.c
> @@ -18,6 +18,7 @@
>  #include <errno.h>
>  #include <common.h>
>  #include <console.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <memalign.h>
>  #include <version.h>
> diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
> index 04e7c5e37f..450caf056c 100644
> --- a/drivers/usb/host/ehci-pci.c
> +++ b/drivers/usb/host/ehci-pci.c
> @@ -7,6 +7,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <errno.h>
> +#include <init.h>
>  #include <pci.h>
>  #include <usb.h>
>  #include <asm/io.h>
> diff --git a/drivers/usb/host/ohci-lpc32xx.c b/drivers/usb/host/ohci-lpc32xx.c
> index 34a4b00dda..8ddced3d10 100644
> --- a/drivers/usb/host/ohci-lpc32xx.c
> +++ b/drivers/usb/host/ohci-lpc32xx.c
> @@ -10,6 +10,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <errno.h>
> +#include <init.h>
>  #include <wait_bit.h>
>  #include <asm/io.h>
>  #include <asm/arch/cpu.h>
> diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
> index c1f60da541..b095612ada 100644
> --- a/drivers/usb/host/xhci-pci.c
> +++ b/drivers/usb/host/xhci-pci.c
> @@ -7,6 +7,7 @@
>
>  #include <common.h>
>  #include <dm.h>
> +#include <init.h>
>  #include <pci.h>
>  #include <usb.h>
>  #include <usb/xhci.h>
> diff --git a/fs/ubifs/io.c b/fs/ubifs/io.c
> index 8148055f67..1389268b5f 100644
> --- a/fs/ubifs/io.c
> +++ b/fs/ubifs/io.c
> @@ -59,6 +59,7 @@
>   */
>
>  #ifndef __UBOOT__
> +#include <init.h>
>  #include <dm/devres.h>
>  #include <linux/crc32.h>
>  #include <linux/slab.h>
> diff --git a/include/common.h b/include/common.h
> index a87c062880..d69cda339c 100644
> --- a/include/common.h
> +++ b/include/common.h
> @@ -31,7 +31,6 @@
>  #include <log.h>
>  #include <asm/u-boot.h> /* boot information for Linux kernel */
>  #include <asm/global_data.h>   /* global data used for startup functions */
> -#include <init.h>
>  #include <display_options.h>
>  #include <vsprintf.h>
>  #endif /* __ASSEMBLY__ */
> diff --git a/lib/efi/efi_app.c b/lib/efi/efi_app.c
> index 7c64077d42..b7e19c3475 100644
> --- a/lib/efi/efi_app.c
> +++ b/lib/efi/efi_app.c
> @@ -13,6 +13,7 @@
>  #include <debug_uart.h>
>  #include <dm.h>
>  #include <errno.h>
> +#include <init.h>
>  #include <malloc.h>
>  #include <linux/err.h>
>  #include <linux/types.h>
> diff --git a/lib/time.c b/lib/time.c
> index 1395f28715..3d6447d7c0 100644
> --- a/lib/time.c
> +++ b/lib/time.c
> @@ -8,6 +8,7 @@
>  #include <bootstage.h>
>  #include <dm.h>
>  #include <errno.h>
> +#include <init.h>
>  #include <time.h>
>  #include <timer.h>
>  #include <watchdog.h>
> --
> 2.26.2.645.ge9eca65c58-goog
>


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH v3 11/22] common: Drop init.h from common header
  2020-05-11  6:44   ` Masahiro Yamada
@ 2020-05-11  7:04     ` Masahiro Yamada
  2020-05-11 20:28       ` Simon Glass
  0 siblings, 1 reply; 53+ messages in thread
From: Masahiro Yamada @ 2020-05-11  7:04 UTC (permalink / raw)
  To: u-boot

On Mon, May 11, 2020 at 3:44 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> Simon,
>
> On Mon, May 11, 2020 at 7:58 AM Simon Glass <sjg@chromium.org> wrote:
> >
> > Move this uncommon header out of the common header.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
>
>
> Why are you adding <init.h> to
> arch/arm/mach-uniphier/cpu-info.c,
> which does not include <common.h>
> in the first place?
>
>
> This seems a wrong conversion.
>
> For uniphier, NACK.



Hmm, are you fixing -Wmissing-prototypes,
which is displayed with W=1 builds.

If so, adding <init.h> to arch/arm/mach-uniphier/cpu-info.c
makes sense although it is unclear from commit log.


But, I still do not understand why you are adding <init.h> to
arch/arm/mach-uniphier/dram/umc-pxs2.c

It looks fine to me as-is.


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH v3 11/22] common: Drop init.h from common header
  2020-05-11  7:04     ` Masahiro Yamada
@ 2020-05-11 20:28       ` Simon Glass
  0 siblings, 0 replies; 53+ messages in thread
From: Simon Glass @ 2020-05-11 20:28 UTC (permalink / raw)
  To: u-boot

Hi Masahiro,

On Mon, 11 May 2020 at 01:05, Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> On Mon, May 11, 2020 at 3:44 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
> >
> > Simon,
> >
> > On Mon, May 11, 2020 at 7:58 AM Simon Glass <sjg@chromium.org> wrote:
> > >
> > > Move this uncommon header out of the common header.
> > >
> > > Signed-off-by: Simon Glass <sjg@chromium.org>
> >
> >
> > Why are you adding <init.h> to
> > arch/arm/mach-uniphier/cpu-info.c,
> > which does not include <common.h>
> > in the first place?
> >
> >
> > This seems a wrong conversion.
> >
> > For uniphier, NACK.
>
>
>
> Hmm, are you fixing -Wmissing-prototypes,
> which is displayed with W=1 builds.

I wonder how bad it would be if we enabled that option?

>
> If so, adding <init.h> to arch/arm/mach-uniphier/cpu-info.c
> makes sense although it is unclear from commit log.
>
>
> But, I still do not understand why you are adding <init.h> to
> arch/arm/mach-uniphier/dram/umc-pxs2.c
>
> It looks fine to me as-is.

Yes it is not needed - the dram_init() is throwing things off.

However given the scale of this series this seems like a small problem.

Regards,
Simon

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH v3 21/22] Use __ASSEMBLY__ as the assembly macros
  2020-05-11  4:56   ` Masahiro Yamada
@ 2020-05-11 20:28     ` Simon Glass
  2020-05-11 21:15       ` Tom Rini
  0 siblings, 1 reply; 53+ messages in thread
From: Simon Glass @ 2020-05-11 20:28 UTC (permalink / raw)
  To: u-boot

Hi Masahiro,

On Sun, 10 May 2020 at 22:57, Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> On Mon, May 11, 2020 at 2:43 AM Simon Glass <sjg@chromium.org> wrote:
> >
> > Some places use __ASSEMBLER__ instead which does not work since the
> > Makefile does not define it. Fix them.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
>
>
> I think we decided to not do this in v2, didn't we?
>
> http://patchwork.ozlabs.org/project/uboot/patch/20200409201506.133129-6-sjg at chromium.org/

I must have misunderstood that thread. I think we should be consistent
in U-Boot as to which one we use. It makes it much harder to check
things when there are multiple options.

Regards,
Simon



>
>
> > ---
> >
> > Changes in v3: None
> > Changes in v2:
> > - Add new patch to fix occurances of __ASSEMBLER__
> >
> >  arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h     | 2 +-
> >  arch/arm/include/asm/arch-mx27/regs-rtc.h                  | 2 +-
> >  arch/arm/include/asm/arch-mx5/imx-regs.h                   | 2 +-
> >  arch/arm/include/asm/arch-mx6/imx-regs.h                   | 2 +-
> >  arch/arm/include/asm/arch-mx7/imx-regs.h                   | 2 +-
> >  arch/arm/include/asm/arch-s32v234/imx-regs.h               | 2 +-
> >  arch/arm/include/asm/arch-vf610/imx-regs.h                 | 2 +-
> >  arch/arm/mach-socfpga/include/mach/clock_manager.h         | 2 +-
> >  arch/arm/mach-socfpga/include/mach/clock_manager_arria10.h | 4 ++--
> >  arch/arm/mach-socfpga/include/mach/clock_manager_gen5.h    | 4 ++--
> >  arch/arm/mach-socfpga/include/mach/sdram_arria10.h         | 2 +-
> >  arch/arm/mach-stm32mp/include/mach/stm32.h                 | 2 +-
> >  arch/x86/include/asm/mtrr.h                                | 2 +-
> >  arch/x86/include/asm/sipi.h                                | 4 ++--
> >  include/atf_common.h                                       | 2 +-
> >  include/elf.h                                              | 4 ++--
> >  16 files changed, 20 insertions(+), 20 deletions(-)
> >

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH v3 21/22] Use __ASSEMBLY__ as the assembly macros
  2020-05-11 20:28     ` Simon Glass
@ 2020-05-11 21:15       ` Tom Rini
  0 siblings, 0 replies; 53+ messages in thread
From: Tom Rini @ 2020-05-11 21:15 UTC (permalink / raw)
  To: u-boot

On Mon, May 11, 2020 at 02:28:54PM -0600, Simon Glass wrote:
> Hi Masahiro,
> 
> On Sun, 10 May 2020 at 22:57, Masahiro Yamada <masahiroy@kernel.org> wrote:
> >
> > On Mon, May 11, 2020 at 2:43 AM Simon Glass <sjg@chromium.org> wrote:
> > >
> > > Some places use __ASSEMBLER__ instead which does not work since the
> > > Makefile does not define it. Fix them.
> > >
> > > Signed-off-by: Simon Glass <sjg@chromium.org>
> >
> >
> > I think we decided to not do this in v2, didn't we?
> >
> > http://patchwork.ozlabs.org/project/uboot/patch/20200409201506.133129-6-sjg at chromium.org/
> 
> I must have misunderstood that thread. I think we should be consistent
> in U-Boot as to which one we use. It makes it much harder to check
> things when there are multiple options.

So, we should generally use __ASSMEBLY__ which is what U-Boot and Linux
kernel have used for forever.  I do see a handful of __ASSEMBLER__ in
Linux now.  That said:

> > >  include/atf_common.h                                       | 2 +-

atf_common.h comes from another project, so this is just going to
introduce sync-noise and unlikely to matter for the binman use-case?

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200511/fb411bc4/attachment.sig>

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH v3 00/22] common: Further reduce the size of common.h
  2020-05-10 17:39 [PATCH v3 00/22] common: Further reduce the size of common.h Simon Glass
                   ` (21 preceding siblings ...)
  2020-05-10 17:40 ` [PATCH v3 22/22] common: Drop linux/bitops.h from common header Simon Glass
@ 2020-05-15 21:02 ` Simon Glass
  2020-05-15 21:13   ` Tom Rini
  22 siblings, 1 reply; 53+ messages in thread
From: Simon Glass @ 2020-05-15 21:02 UTC (permalink / raw)
  To: u-boot

Hi Tom,

On Sun, 10 May 2020 at 11:40, Simon Glass <sjg@chromium.org> wrote:
>
> This is yet another series to remove the contents of common.h so that
> individual files include the headers they need.
>
> With this series there are only 14 includes left.
>
> In order to get this far the commits include a number of small clean-ups:
>
> - Fixing code style like 'udelay (2)' to 'udelay(1)
> - Dropping typedefs so that forward struct declarations can be used
> - Actually adding common.h in a few files where it is missing (thus
>    causing inconsistent blk.h config in EFI, for example)
>
> Unfortunately removing a header from common.h does not always just affect
> the files that rely on that header. For example, removing net.h from
> common.h created problems since net.h itself includes a lots of headers.
> Rather than blindly add net.h to each of those files, I chose to add what
> those files actually needed.
>
> Changes in v3:
> - Update imxrt1020-evk, etc.
> - Update stm32mp15_optee, etc.
> - Update vocore2, etc.
> - Rebase to master
> - Addition fix for xilinx_zynqmp_mini etc.
>

Just wondering about the fate of this series?

Regards,
Simon

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH v3 00/22] common: Further reduce the size of common.h
  2020-05-15 21:02 ` [PATCH v3 00/22] common: Further reduce the size of common.h Simon Glass
@ 2020-05-15 21:13   ` Tom Rini
  0 siblings, 0 replies; 53+ messages in thread
From: Tom Rini @ 2020-05-15 21:13 UTC (permalink / raw)
  To: u-boot

On Fri, May 15, 2020 at 03:02:48PM -0600, Simon Glass wrote:
> Hi Tom,
> 
> On Sun, 10 May 2020 at 11:40, Simon Glass <sjg@chromium.org> wrote:
> >
> > This is yet another series to remove the contents of common.h so that
> > individual files include the headers they need.
> >
> > With this series there are only 14 includes left.
> >
> > In order to get this far the commits include a number of small clean-ups:
> >
> > - Fixing code style like 'udelay (2)' to 'udelay(1)
> > - Dropping typedefs so that forward struct declarations can be used
> > - Actually adding common.h in a few files where it is missing (thus
> >    causing inconsistent blk.h config in EFI, for example)
> >
> > Unfortunately removing a header from common.h does not always just affect
> > the files that rely on that header. For example, removing net.h from
> > common.h created problems since net.h itself includes a lots of headers.
> > Rather than blindly add net.h to each of those files, I chose to add what
> > those files actually needed.
> >
> > Changes in v3:
> > - Update imxrt1020-evk, etc.
> > - Update stm32mp15_optee, etc.
> > - Update vocore2, etc.
> > - Rebase to master
> > - Addition fix for xilinx_zynqmp_mini etc.
> >
> 
> Just wondering about the fate of this series?

Working my way back to it again, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200515/d6b59f0b/attachment.sig>

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH v3 01/22] common: Drop uuid.h from common header
  2020-05-10 17:39 ` [PATCH v3 01/22] common: Drop uuid.h from common header Simon Glass
@ 2020-05-19 17:31   ` Tom Rini
  0 siblings, 0 replies; 53+ messages in thread
From: Tom Rini @ 2020-05-19 17:31 UTC (permalink / raw)
  To: u-boot

On Sun, May 10, 2020 at 11:39:52AM -0600, Simon Glass wrote:

> Move this uncommon header out of the common header.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200519/7fb8076c/attachment.sig>

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH v3 02/22] flash: Tidy up coding style for flash functions
  2020-05-10 17:39 ` [PATCH v3 02/22] flash: Tidy up coding style for flash functions Simon Glass
@ 2020-05-19 17:32   ` Tom Rini
  0 siblings, 0 replies; 53+ messages in thread
From: Tom Rini @ 2020-05-19 17:32 UTC (permalink / raw)
  To: u-boot

On Sun, May 10, 2020 at 11:39:53AM -0600, Simon Glass wrote:

> Some functions use the wrong code style and generate checkpatch errors.
> Fix these.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200519/ec5488f7/attachment.sig>

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH v3 03/22] common: Drop flash.h from common header
  2020-05-10 17:39 ` [PATCH v3 03/22] common: Drop flash.h from common header Simon Glass
@ 2020-05-19 17:32   ` Tom Rini
  0 siblings, 0 replies; 53+ messages in thread
From: Tom Rini @ 2020-05-19 17:32 UTC (permalink / raw)
  To: u-boot

On Sun, May 10, 2020 at 11:39:54AM -0600, Simon Glass wrote:

> Move this uncommon header out of the common header.
> 
> Fix up some style problems in flash.h while we are here.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200519/d037ab92/attachment.sig>

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH v3 04/22] arm: Don't include common.h in header files
  2020-05-10 17:39 ` [PATCH v3 04/22] arm: Don't include common.h in header files Simon Glass
@ 2020-05-19 17:32   ` Tom Rini
  0 siblings, 0 replies; 53+ messages in thread
From: Tom Rini @ 2020-05-19 17:32 UTC (permalink / raw)
  To: u-boot

On Sun, May 10, 2020 at 11:39:55AM -0600, Simon Glass wrote:

> It is bad practice to include common.h in other header files since it can
> bring in any number of superfluous definitions. It implies that some C
> files don't include it and thus may be missing CONFIG options that are set
> up by that file. The C files should include these themselves.
> 
> Update some header files in arch/arm to drop this.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200519/0e2c8a7f/attachment.sig>

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH v3 05/22] common: Drop net.h from common header
  2020-05-10 17:39 ` [PATCH v3 05/22] common: Drop net.h from common header Simon Glass
@ 2020-05-19 17:32   ` Tom Rini
  0 siblings, 0 replies; 53+ messages in thread
From: Tom Rini @ 2020-05-19 17:32 UTC (permalink / raw)
  To: u-boot

On Sun, May 10, 2020 at 11:39:56AM -0600, Simon Glass wrote:

> Move this header out of the common header. Network support is used in
> quite a few places but it still does not warrant blanket inclusion.
> 
> Note that this net.h header itself has quite a lot in it. It could be
> split into the driver-mode support, functions, structures, checksumming,
> etc.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200519/31202401/attachment.sig>

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH v3 06/22] part: Drop disk_partition_t typedef
  2020-05-10 17:39 ` [PATCH v3 06/22] part: Drop disk_partition_t typedef Simon Glass
@ 2020-05-19 17:32   ` Tom Rini
  0 siblings, 0 replies; 53+ messages in thread
From: Tom Rini @ 2020-05-19 17:32 UTC (permalink / raw)
  To: u-boot

On Sun, May 10, 2020 at 11:39:57AM -0600, Simon Glass wrote:

> We should not be using typedefs and these make it harder to use
> forward declarations (to reduce header file inclusions). Drop the typedef.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200519/7247ce74/attachment.sig>

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH v3 07/22] common: Drop part.h from common header
  2020-05-10 17:39 ` [PATCH v3 07/22] common: Drop part.h from common header Simon Glass
@ 2020-05-19 17:32   ` Tom Rini
  0 siblings, 0 replies; 53+ messages in thread
From: Tom Rini @ 2020-05-19 17:32 UTC (permalink / raw)
  To: u-boot

On Sun, May 10, 2020 at 11:39:58AM -0600, Simon Glass wrote:

> Move this uncommon header out of the common header.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200519/3db37a31/attachment.sig>

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH v3 08/22] bootstage: Use BOOTSTAGE instead of BOOTSTATE
  2020-05-10 17:39 ` [PATCH v3 08/22] bootstage: Use BOOTSTAGE instead of BOOTSTATE Simon Glass
@ 2020-05-19 17:32   ` Tom Rini
  0 siblings, 0 replies; 53+ messages in thread
From: Tom Rini @ 2020-05-19 17:32 UTC (permalink / raw)
  To: u-boot

On Sun, May 10, 2020 at 11:39:59AM -0600, Simon Glass wrote:

> Some of the enum members are wrong. Fix them.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200519/167bbecf/attachment.sig>

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH v3 09/22] common: Drop bootstage.h from common header
  2020-05-10 17:40 ` [PATCH v3 09/22] common: Drop bootstage.h from common header Simon Glass
@ 2020-05-19 17:32   ` Tom Rini
  0 siblings, 0 replies; 53+ messages in thread
From: Tom Rini @ 2020-05-19 17:32 UTC (permalink / raw)
  To: u-boot

On Sun, May 10, 2020 at 11:40:00AM -0600, Simon Glass wrote:

> Move this fairly uncommon header out of the common header.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200519/e02d61e9/attachment-0001.sig>

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH v3 10/22] common: Drop image.h from common header
  2020-05-10 17:40 ` [PATCH v3 10/22] common: Drop image.h " Simon Glass
@ 2020-05-19 17:32   ` Tom Rini
  0 siblings, 0 replies; 53+ messages in thread
From: Tom Rini @ 2020-05-19 17:32 UTC (permalink / raw)
  To: u-boot

On Sun, May 10, 2020 at 11:40:01AM -0600, Simon Glass wrote:

> Move this uncommon header out of the common header.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200519/585da5d7/attachment.sig>

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH v3 11/22] common: Drop init.h from common header
  2020-05-10 17:40 ` [PATCH v3 11/22] common: Drop init.h " Simon Glass
  2020-05-11  6:44   ` Masahiro Yamada
@ 2020-05-19 17:32   ` Tom Rini
  1 sibling, 0 replies; 53+ messages in thread
From: Tom Rini @ 2020-05-19 17:32 UTC (permalink / raw)
  To: u-boot

On Sun, May 10, 2020 at 11:40:02AM -0600, Simon Glass wrote:

> Move this uncommon header out of the common header.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200519/72a468e5/attachment.sig>

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH v3 12/22] command: Remove the cmd_tbl_t typedef
  2020-05-10 17:40 ` [PATCH v3 12/22] command: Remove the cmd_tbl_t typedef Simon Glass
@ 2020-05-19 17:33   ` Tom Rini
  0 siblings, 0 replies; 53+ messages in thread
From: Tom Rini @ 2020-05-19 17:33 UTC (permalink / raw)
  To: u-boot

On Sun, May 10, 2020 at 11:40:03AM -0600, Simon Glass wrote:

> We should not use typedefs in U-Boot. They cannot be used as forward
> declarations which means that header files must include the full header to
> access them.
> 
> Drop the typedef and rename the struct to remove the _s suffix which is
> now not useful.
> 
> This requires quite a few header-file additions.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200519/c20efcc0/attachment.sig>

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH v3 13/22] Fix some checkpatch warnings in calls to debug()
  2020-05-10 17:40 ` [PATCH v3 13/22] Fix some checkpatch warnings in calls to debug() Simon Glass
@ 2020-05-19 17:33   ` Tom Rini
  0 siblings, 0 replies; 53+ messages in thread
From: Tom Rini @ 2020-05-19 17:33 UTC (permalink / raw)
  To: u-boot

On Sun, May 10, 2020 at 11:40:04AM -0600, Simon Glass wrote:

> Fix up some incorrect code style in calls to functions in the log.h
> header, mostly debug().
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200519/856fb611/attachment.sig>

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH v3 14/22] common: Drop log.h from common header
  2020-05-10 17:40 ` [PATCH v3 14/22] common: Drop log.h from common header Simon Glass
@ 2020-05-19 17:33   ` Tom Rini
  0 siblings, 0 replies; 53+ messages in thread
From: Tom Rini @ 2020-05-19 17:33 UTC (permalink / raw)
  To: u-boot

On Sun, May 10, 2020 at 11:40:05AM -0600, Simon Glass wrote:

> Move this header out of the common header.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200519/0a00c67f/attachment.sig>

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH v3 15/22] common: Drop asm/ptrace.h from common header
  2020-05-10 17:40 ` [PATCH v3 15/22] common: Drop asm/ptrace.h " Simon Glass
@ 2020-05-19 17:33   ` Tom Rini
  0 siblings, 0 replies; 53+ messages in thread
From: Tom Rini @ 2020-05-19 17:33 UTC (permalink / raw)
  To: u-boot

On Sun, May 10, 2020 at 11:40:06AM -0600, Simon Glass wrote:

> Move this uncommon header out of the common header.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200519/6386f441/attachment.sig>

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH v3 16/22] common: Drop asm_offsets.h from common header
  2020-05-10 17:40 ` [PATCH v3 16/22] common: Drop asm_offsets.h " Simon Glass
@ 2020-05-19 17:33   ` Tom Rini
  0 siblings, 0 replies; 53+ messages in thread
From: Tom Rini @ 2020-05-19 17:33 UTC (permalink / raw)
  To: u-boot

On Sun, May 10, 2020 at 11:40:07AM -0600, Simon Glass wrote:

> Move this uncommon header out of the common header.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200519/b94ce2f0/attachment.sig>

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH v3 17/22] common: Drop linux/bug.h from common header
  2020-05-10 17:40 ` [PATCH v3 17/22] common: Drop linux/bug.h " Simon Glass
@ 2020-05-19 17:33   ` Tom Rini
  0 siblings, 0 replies; 53+ messages in thread
From: Tom Rini @ 2020-05-19 17:33 UTC (permalink / raw)
  To: u-boot

On Sun, May 10, 2020 at 11:40:08AM -0600, Simon Glass wrote:

> Move this uncommon header out of the common header.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200519/48344300/attachment.sig>

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH v3 18/22] common: Drop linux/stringify.h from common header
  2020-05-10 17:40 ` [PATCH v3 18/22] common: Drop linux/stringify.h " Simon Glass
@ 2020-05-19 17:33   ` Tom Rini
  0 siblings, 0 replies; 53+ messages in thread
From: Tom Rini @ 2020-05-19 17:33 UTC (permalink / raw)
  To: u-boot

On Sun, May 10, 2020 at 11:40:09AM -0600, Simon Glass wrote:

> Move this uncommon header out of the common header.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200519/be0fea25/attachment.sig>

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH v3 19/22] Fix some checkpatch warnings in calls to udelay()
  2020-05-10 17:40 ` [PATCH v3 19/22] Fix some checkpatch warnings in calls to udelay() Simon Glass
@ 2020-05-19 17:33   ` Tom Rini
  0 siblings, 0 replies; 53+ messages in thread
From: Tom Rini @ 2020-05-19 17:33 UTC (permalink / raw)
  To: u-boot

On Sun, May 10, 2020 at 11:40:10AM -0600, Simon Glass wrote:

> Fix up some incorrect code style in calls to functions in the linux/time.h
> header, mostly udelay().
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200519/e462e659/attachment.sig>

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH v3 20/22] common: Drop linux/delay.h from common header
  2020-05-10 17:40 ` [PATCH v3 20/22] common: Drop linux/delay.h from common header Simon Glass
@ 2020-05-19 17:34   ` Tom Rini
  0 siblings, 0 replies; 53+ messages in thread
From: Tom Rini @ 2020-05-19 17:34 UTC (permalink / raw)
  To: u-boot

On Sun, May 10, 2020 at 11:40:11AM -0600, Simon Glass wrote:

> Move this uncommon header out of the common header.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200519/48aa70d3/attachment.sig>

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH v3 21/22] Use __ASSEMBLY__ as the assembly macros
  2020-05-10 17:40 ` [PATCH v3 21/22] Use __ASSEMBLY__ as the assembly macros Simon Glass
  2020-05-11  4:56   ` Masahiro Yamada
@ 2020-05-19 17:34   ` Tom Rini
  1 sibling, 0 replies; 53+ messages in thread
From: Tom Rini @ 2020-05-19 17:34 UTC (permalink / raw)
  To: u-boot

On Sun, May 10, 2020 at 11:40:12AM -0600, Simon Glass wrote:

> Some places use __ASSEMBLER__ instead which does not work since the
> Makefile does not define it. Fix them.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200519/4b6f24be/attachment.sig>

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH v3 22/22] common: Drop linux/bitops.h from common header
  2020-05-10 17:40 ` [PATCH v3 22/22] common: Drop linux/bitops.h from common header Simon Glass
@ 2020-05-19 17:34   ` Tom Rini
  0 siblings, 0 replies; 53+ messages in thread
From: Tom Rini @ 2020-05-19 17:34 UTC (permalink / raw)
  To: u-boot

On Sun, May 10, 2020 at 11:40:13AM -0600, Simon Glass wrote:

> Move this uncommon header out of the common header.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200519/b1b3a94a/attachment.sig>

^ permalink raw reply	[flat|nested] 53+ messages in thread

end of thread, other threads:[~2020-05-19 17:34 UTC | newest]

Thread overview: 53+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-10 17:39 [PATCH v3 00/22] common: Further reduce the size of common.h Simon Glass
2020-05-10 17:39 ` [PATCH v3 01/22] common: Drop uuid.h from common header Simon Glass
2020-05-19 17:31   ` Tom Rini
2020-05-10 17:39 ` [PATCH v3 02/22] flash: Tidy up coding style for flash functions Simon Glass
2020-05-19 17:32   ` Tom Rini
2020-05-10 17:39 ` [PATCH v3 03/22] common: Drop flash.h from common header Simon Glass
2020-05-19 17:32   ` Tom Rini
2020-05-10 17:39 ` [PATCH v3 04/22] arm: Don't include common.h in header files Simon Glass
2020-05-19 17:32   ` Tom Rini
2020-05-10 17:39 ` [PATCH v3 05/22] common: Drop net.h from common header Simon Glass
2020-05-19 17:32   ` Tom Rini
2020-05-10 17:39 ` [PATCH v3 06/22] part: Drop disk_partition_t typedef Simon Glass
2020-05-19 17:32   ` Tom Rini
2020-05-10 17:39 ` [PATCH v3 07/22] common: Drop part.h from common header Simon Glass
2020-05-19 17:32   ` Tom Rini
2020-05-10 17:39 ` [PATCH v3 08/22] bootstage: Use BOOTSTAGE instead of BOOTSTATE Simon Glass
2020-05-19 17:32   ` Tom Rini
2020-05-10 17:40 ` [PATCH v3 09/22] common: Drop bootstage.h from common header Simon Glass
2020-05-19 17:32   ` Tom Rini
2020-05-10 17:40 ` [PATCH v3 10/22] common: Drop image.h " Simon Glass
2020-05-19 17:32   ` Tom Rini
2020-05-10 17:40 ` [PATCH v3 11/22] common: Drop init.h " Simon Glass
2020-05-11  6:44   ` Masahiro Yamada
2020-05-11  7:04     ` Masahiro Yamada
2020-05-11 20:28       ` Simon Glass
2020-05-19 17:32   ` Tom Rini
2020-05-10 17:40 ` [PATCH v3 12/22] command: Remove the cmd_tbl_t typedef Simon Glass
2020-05-19 17:33   ` Tom Rini
2020-05-10 17:40 ` [PATCH v3 13/22] Fix some checkpatch warnings in calls to debug() Simon Glass
2020-05-19 17:33   ` Tom Rini
2020-05-10 17:40 ` [PATCH v3 14/22] common: Drop log.h from common header Simon Glass
2020-05-19 17:33   ` Tom Rini
2020-05-10 17:40 ` [PATCH v3 15/22] common: Drop asm/ptrace.h " Simon Glass
2020-05-19 17:33   ` Tom Rini
2020-05-10 17:40 ` [PATCH v3 16/22] common: Drop asm_offsets.h " Simon Glass
2020-05-19 17:33   ` Tom Rini
2020-05-10 17:40 ` [PATCH v3 17/22] common: Drop linux/bug.h " Simon Glass
2020-05-19 17:33   ` Tom Rini
2020-05-10 17:40 ` [PATCH v3 18/22] common: Drop linux/stringify.h " Simon Glass
2020-05-19 17:33   ` Tom Rini
2020-05-10 17:40 ` [PATCH v3 19/22] Fix some checkpatch warnings in calls to udelay() Simon Glass
2020-05-19 17:33   ` Tom Rini
2020-05-10 17:40 ` [PATCH v3 20/22] common: Drop linux/delay.h from common header Simon Glass
2020-05-19 17:34   ` Tom Rini
2020-05-10 17:40 ` [PATCH v3 21/22] Use __ASSEMBLY__ as the assembly macros Simon Glass
2020-05-11  4:56   ` Masahiro Yamada
2020-05-11 20:28     ` Simon Glass
2020-05-11 21:15       ` Tom Rini
2020-05-19 17:34   ` Tom Rini
2020-05-10 17:40 ` [PATCH v3 22/22] common: Drop linux/bitops.h from common header Simon Glass
2020-05-19 17:34   ` Tom Rini
2020-05-15 21:02 ` [PATCH v3 00/22] common: Further reduce the size of common.h Simon Glass
2020-05-15 21:13   ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.