All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/18] common: Further reduce the size of common.h
@ 2020-04-07  2:40 ` Simon Glass
  0 siblings, 0 replies; 30+ messages in thread
From: Simon Glass @ 2020-04-07  2:40 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.


Simon Glass (18):
  common: Drop uuid.h from common header
  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
  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
  common: Drop linux/delay.h from common header
  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 +
 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-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-owl/clk_s900.h      |   3 +
 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                   |   1 +
 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/imx8m/clock_imx8mm.c        |   2 +
 arch/arm/mach-imx/imx8m/clock_imx8mq.c        |   6 +-
 arch/arm/mach-imx/imx8m/soc.c                 |   2 +
 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          |   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-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 |   1 +
 .../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    |   4 +
 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/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                   |   1 +
 arch/mips/mach-mtmips/ddr_calibrate.c         |   3 +
 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/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/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               |   3 +
 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               |   1 +
 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         |   2 +
 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              |   6 +-
 board/freescale/imx8mn_evk/imx8mn_evk.c       |   2 +
 board/freescale/imx8mn_evk/spl.c              |   6 +-
 board/freescale/imx8mp_evk/imx8mp_evk.c       |   2 +
 board/freescale/imx8mp_evk/spl.c              |   6 +-
 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/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/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             |   6 +-
 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/ucRobotics/bubblegum_96/bubblegum_96.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                   |   1 +
 .../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                  |   8 +-
 board/xilinx/zynqmp_r5/board.c                |   1 +
 board/zyxel/nsa310s/nsa310s.c                 |   1 +
 cmd/ab_select.c                               |   9 +-
 cmd/abootimg.c                                |  32 ++---
 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                                |  61 ++++-----
 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                                     |  27 ++--
 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                                     |  63 ++++++----
 cmd/mfsl.c                                    |   6 +-
 cmd/mii.c                                     |   2 +-
 cmd/misc.c                                    |   7 +-
 cmd/mmc.c                                     | 111 ++++++++++-------
 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/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_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.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/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_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_s900.c                    |   2 +
 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/device-remove.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                    |   1 +
 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_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/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/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/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                         |   1 +
 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/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                         |   8 +-
 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             |   1 +
 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/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                        |   4 +
 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/android_ab.h                          |   5 +-
 include/asm-generic/u-boot.h                  |   3 +
 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/netdev.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                         |  25 ++--
 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                             |   4 +-
 include/wait_bit.h                            |   4 +-
 include/wdt.h                                 |   1 +
 include/xyzModem.h                            |   2 +
 include/zfs_common.h                          |   2 +-
 include/zynqmppl.h                            |   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                     |   2 +-
 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/libfdt/fdt_region.c                       |   1 +
 lib/libfdt/fdt_ro.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/optee/cmd_ut_optee.c                     |   3 +-
 test/overlay/cmd_ut_overlay.c                 |   4 +-
 test/print_ut.c                               |   4 +-
 test/time_ut.c                                |   3 +-
 test/unicode_ut.c                             |   3 +-
 tools/imx8image.c                             |   1 +
 tools/proftool.c                              |   2 +-
 3337 files changed, 7454 insertions(+), 1943 deletions(-)

-- 
2.26.0.292.g33ef6b2f38-goog

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

* [PATCH 00/18] common: Further reduce the size of common.h
@ 2020-04-07  2:40 ` Simon Glass
  0 siblings, 0 replies; 30+ messages in thread
From: Simon Glass @ 2020-04-07  2:40 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: Tom Rini, Masahiro Yamada, Simon Glass, Andrej Rosano,
	Ashish Kumar, Bao Xiaowei, Beniamino Galvani, Daniel Gorsulowski,
	Dennis Gilmore, Eugeniu Rosca, Ezequiel Garcia, Fabio Estevam,
	Francesco Montefoschi, GSS_MTK_Uboot_upstream, Giulio Benetti,
	Hannes Schmelzer, Heinrich Schuchardt, Ibai Erkiaga,
	Jaehoon Chung, Jorge Ramirez-Ortiz, Krunal Bhargav,
	Kunihiko Hayashi, Levin Du, Lukas Auer, Magnus Lilja,
	Marcin Niestroj, Marek Vasut, Miquel Raynal, Oliver Graute,
	Patrick Doyle, Paul Walmsley, Prabhakar Kushwaha, Pramod Kumar,
	Raffaele RECALCATI, Roger Quadros, Roman Kapl, Sam Shih,
	Samuel Egli, Sebastien Bourdelin, Sergey Kubushyn, Shawn Guo,
	Shengzhou Liu, Stefano Babic, Steve Rae, Suniel Mahesh,
	Sven Schwermer, Trevor Woerner, Vladimir Olovyannikov,
	Wolfgang Denk, Wolfgang Wallner, Ye Li, u-boot-amlogic

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.


Simon Glass (18):
  common: Drop uuid.h from common header
  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
  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
  common: Drop linux/delay.h from common header
  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 +
 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-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-owl/clk_s900.h      |   3 +
 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                   |   1 +
 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/imx8m/clock_imx8mm.c        |   2 +
 arch/arm/mach-imx/imx8m/clock_imx8mq.c        |   6 +-
 arch/arm/mach-imx/imx8m/soc.c                 |   2 +
 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          |   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-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 |   1 +
 .../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    |   4 +
 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/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                   |   1 +
 arch/mips/mach-mtmips/ddr_calibrate.c         |   3 +
 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/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/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               |   3 +
 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               |   1 +
 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         |   2 +
 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              |   6 +-
 board/freescale/imx8mn_evk/imx8mn_evk.c       |   2 +
 board/freescale/imx8mn_evk/spl.c              |   6 +-
 board/freescale/imx8mp_evk/imx8mp_evk.c       |   2 +
 board/freescale/imx8mp_evk/spl.c              |   6 +-
 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/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/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             |   6 +-
 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/ucRobotics/bubblegum_96/bubblegum_96.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                   |   1 +
 .../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                  |   8 +-
 board/xilinx/zynqmp_r5/board.c                |   1 +
 board/zyxel/nsa310s/nsa310s.c                 |   1 +
 cmd/ab_select.c                               |   9 +-
 cmd/abootimg.c                                |  32 ++---
 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                                |  61 ++++-----
 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                                     |  27 ++--
 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                                     |  63 ++++++----
 cmd/mfsl.c                                    |   6 +-
 cmd/mii.c                                     |   2 +-
 cmd/misc.c                                    |   7 +-
 cmd/mmc.c                                     | 111 ++++++++++-------
 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/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_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.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/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_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_s900.c                    |   2 +
 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/device-remove.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                    |   1 +
 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_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/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/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/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                         |   1 +
 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/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                         |   8 +-
 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             |   1 +
 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/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                        |   4 +
 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/android_ab.h                          |   5 +-
 include/asm-generic/u-boot.h                  |   3 +
 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/netdev.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                         |  25 ++--
 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                             |   4 +-
 include/wait_bit.h                            |   4 +-
 include/wdt.h                                 |   1 +
 include/xyzModem.h                            |   2 +
 include/zfs_common.h                          |   2 +-
 include/zynqmppl.h                            |   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                     |   2 +-
 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/libfdt/fdt_region.c                       |   1 +
 lib/libfdt/fdt_ro.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/optee/cmd_ut_optee.c                     |   3 +-
 test/overlay/cmd_ut_overlay.c                 |   4 +-
 test/print_ut.c                               |   4 +-
 test/time_ut.c                                |   3 +-
 test/unicode_ut.c                             |   3 +-
 tools/imx8image.c                             |   1 +
 tools/proftool.c                              |   2 +-
 3337 files changed, 7454 insertions(+), 1943 deletions(-)

-- 
2.26.0.292.g33ef6b2f38-goog


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

* [PATCH 01/18] common: Drop uuid.h from common header
  2020-04-07  2:40 ` Simon Glass
  (?)
@ 2020-04-07  2:40 ` Simon Glass
  -1 siblings, 0 replies; 30+ messages in thread
From: Simon Glass @ 2020-04-07  2:40 UTC (permalink / raw)
  To: u-boot

Move this uncommon header out of the common header.

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

 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 efaf1bcecb2..e05ef4355bc 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 8ea0da01283..3fdeec945c6 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 3967a7ca5a7..29d9e3d5a27 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 b2e157d9c1e..2709aebd60e 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 cb7e1827422..2e3985e3855 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 966b427a974..96ca276839e 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 0ef8505fc79..a8242cafc51 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 fe2f2645913..81a678c2036 100644
--- a/lib/efi_loader/efi_variable.c
+++ b/lib/efi_loader/efi_variable.c
@@ -11,6 +11,7 @@
 #include <hexdump.h>
 #include <malloc.h>
 #include <search.h>
+#include <uuid.h>
 #include <u-boot/crc.h>
 
 #define READ_ONLY BIT(31)
diff --git a/lib/uuid.c b/lib/uuid.c
index 3d3c7abcaea..db26911414a 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 b4edee29b0d..de9ef902b96 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 505489140e8..c73a82e642c 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.0.292.g33ef6b2f38-goog

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

* [PATCH 02/18] common: Drop flash.h from common header
  2020-04-07  2:40 ` Simon Glass
  (?)
  (?)
@ 2020-04-07  2:40 ` Simon Glass
  2020-04-07 14:24   ` Wolfgang Denk
  -1 siblings, 1 reply; 30+ messages in thread
From: Simon Glass @ 2020-04-07  2:40 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>
---

 arch/arm/mach-at91/arm926ejs/eflash.c      |  9 +++----
 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                    | 18 +++++++-------
 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                  | 28 ++++++++++++----------
 board/spear/x600/x600.c                    |  1 +
 cmd/armflash.c                             |  1 +
 cmd/cros_ec.c                              |  1 +
 cmd/flash.c                                | 23 ++++++++++--------
 cmd/jffs2.c                                |  1 +
 cmd/mvebu/bubt.c                           |  1 +
 cmd/sf.c                                   |  1 +
 common/board_r.c                           |  1 +
 common/flash.c                             | 11 +++++----
 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 -
 include/flash.h                            | 24 +++++++++----------
 46 files changed, 101 insertions(+), 53 deletions(-)

diff --git a/arch/arm/mach-at91/arm926ejs/eflash.c b/arch/arm/mach-at91/arm926ejs/eflash.c
index 7b61fa72260..c875bfd89b7 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>
@@ -58,7 +59,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 +128,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 +203,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 +216,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/AndesTech/adp-ae3xx/adp-ae3xx.c b/board/AndesTech/adp-ae3xx/adp-ae3xx.c
index a04415decaf..8eb40bf295c 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 faf39b4ba6a..d349b19648d 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 f164073000c..de546dab174 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 b50de63c5e0..2b4853f8f91 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 b811d931c44..be132bc185f 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 95d3a5e1f57..aa641259ac6 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 1d3c5acddf8..5860cd0ac03 100644
--- a/board/cobra5272/flash.c
+++ b/board/cobra5272/flash.c
@@ -7,14 +7,16 @@
 #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
 
 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 +57,7 @@ Done:
 }
 
 
-unsigned long flash_init (void)
+unsigned long flash_init(void)
 {
 	int i, j;
 	ulong size = 0;
@@ -98,9 +100,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 +129,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 +246,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 +313,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/freescale/common/fsl_validate.c b/board/freescale/common/fsl_validate.c
index 2bf9d587460..6aa412a9377 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 a5223ecee6c..87368564afa 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 28e2a9435c6..b1e638af5ae 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 5167f81be71..da974956640 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 57cea0af689..9ed00f6e5b1 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 cf5d8a5244f..18e0d87a488 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 48cf3091e99..0fcb605e1b9 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 d1110157a2e..8994c8c71b4 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 9ba9e4278a5..a12e08685bf 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 203eecf3d6d..135aaa5234c 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 0b118b2f65d..fbfc49ee01d 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 e8d1fdd03fa..ed041b14ee8 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 0979df563ae..9f9cdfa2346 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 b0ddee7906a..84644a85c7b 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>
@@ -105,25 +106,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/board/spear/x600/x600.c b/board/spear/x600/x600.c
index e1232edd143..7cff6eecf25 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 6872b0dde3d..f82f3dd1a37 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 9e2f1b06f3c..c6bbed9c4a2 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 cd1758d7e2e..df97fe740d8 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>
@@ -88,7 +89,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 +280,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 +292,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 +317,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 +371,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 +391,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 +416,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 +528,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 +583,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/cmd/jffs2.c b/cmd/jffs2.c
index da2580d85d7..748a73e2af9 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 2041a7a29aa..a422dee168a 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 e993b3e5adc..2b9c268ac42 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 0bbeaa7594c..1f1c23bfe7c 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 5f155aefd1d..4a28ac5d347 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>
 
@@ -24,7 +25,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 +85,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 +120,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/drivers/dfu/dfu_sf.c b/drivers/dfu/dfu_sf.c
index 0fdbfae4341..318e43c179b 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 3c4acfecf6d..49f6a61c374 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 d7cf9f4aac7..d3249a54f7c 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 6756ea769f3..b1654681450 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 fa9984f6bd9..c145b679318 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 4ce183b6f31..036cf0b4a1e 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 f59b2bc62fb..ce921b461af 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 55fb4bd31ac..b1a38048d32 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 68c36002bee..987fac2501f 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 fd0d5506e8f..95afa2d6bc7 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 5ef40552194..ac16ed5bdd4 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 228f599d44b..7ef48bbc064 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 5912cde8384..f58ec0e9a04 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 a8242cafc51..1705d85e8a9 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 */
diff --git a/include/flash.h b/include/flash.h
index 2655c72087f..3bf6b22399e 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.0.292.g33ef6b2f38-goog

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

* [PATCH 03/18] arm: Don't include common.h in header files
  2020-04-07  2:40 ` Simon Glass
                   ` (2 preceding siblings ...)
  (?)
@ 2020-04-07  2:40 ` Simon Glass
  -1 siblings, 0 replies; 30+ messages in thread
From: Simon Glass @ 2020-04-07  2:40 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>
---

 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/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 ++
 79 files changed, 63 insertions(+), 89 deletions(-)

diff --git a/arch/arm/cpu/armv8/fwcall.c b/arch/arm/cpu/armv8/fwcall.c
index cbd35b7f4a2..4bffec9560a 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 6579cc0c5d9..7bcafba6f0b 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 d8bf87258b5..b16b1847336 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 d5cab3e0834..26bd4b46ffb 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 256c5e243f8..f74ae74ff16 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 e4e5a48ad67..a6a8a988a0c 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 95d6156476f..d5616914374 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 87754912459..d69e3c4664d 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 5301d4c1b0f..f39b14001b6 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 e66e57f7598..01978c08f5e 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 7eec73163b3..3045b78d08f 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 aafc2d690ef..e99e115f79e 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 788534083c8..cb0b53a69f4 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 6f5ca5888ae..63a51042e1e 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 f7760541a4c..769917679e5 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 984bd3f141a..48c7c3367a5 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 eb02a20fdc5..92d4463dff5 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 dee3cfcdc00..8f0d7006286 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 b79bde338f4..3b5b7f6803c 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 037045ca314..0a626fe647a 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 e261bd43f26..87eb3f335ab 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 09edfadc321..ea2f113f98d 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 a14b64cdb3e..86c906bb0ed 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 3e68626d3e9..a995bb950d9 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 798444ae49f..732ca370403 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 47225229540..5db0407baa7 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 b8565605cd8..40a5ca7390e 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 c87c830716d..ee12fa831f2 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 4bf69dbe088..226744d67d9 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 1fe1f01b9e5..714cea85b4b 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 789ca6aa28f..d941a129f3e 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 7697e96a91e..1db25afe264 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 3d2a8770322..d51e29b19ee 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 5f12ebf262f..08348d8228a 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 519b36ad2ad..fe07d69b428 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 a99d13732d0..5f4d9d82249 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 b70b08fccec..45e882b3c96 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 9f42fbde8dc..92bbe34af68 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 5de3220d6f1..46298165fbc 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 336c5d7e8c4..99942e6aac2 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 c60065444cc..70846094e89 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 616b6e2a649..8c64a995f25 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 53cb56d2713..52c10b8fab3 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 70dcf4aa663..d6a55764ba3 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 72184fd6083..ec9786ce4fe 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 8bb3fa2e0ee..8af1ea0aa4d 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 dc398efd32c..35424345bf0 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 06dbd8d943a..1de70933550 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 35b39b1f86c..ff14c8446a4 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)
 
@@ -172,7 +174,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 54b7cd19bbf..de8fc99d047 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 f10a41f3048..30f0a9f5cbc 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/system.h b/arch/arm/include/asm/system.h
index 81ccead1127..12394a6a45b 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 461fba4d3f6..f25119a7d66 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 46484813d2c..981a0a152c2 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 b9f630952df..c4599aaf68f 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 3fd1d086ff1..8cacc1dea6c 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 a29a264016e..2a18cf0215d 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 6bf4cf4a758..786da45fac8 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 e9ada6dea3c..e0a6e4b0259 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 50d58217e47..ea90bc6e342 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 9aa71b99419..03e9364765d 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 bf5c020af13..b644f273fe2 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 1240a9da174..64553c0617c 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 5d71b639df0..df32e12037b 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 d577e00fbca..91d8091d258 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 59a07a9ffde..fa2acf59a7a 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 6a96f9ecdb5..13f77a3db27 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 06ad0a8c322..bafe9ba6b7a 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 6c432ca5a62..69db77412c5 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 b287fbf4106..1a3b136529e 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 dbd9d0286fd..250043a26d9 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 5725c5816cd..b879c80cd86 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 b525b1be549..3a09a8165c1 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 41b93e660a0..2728e8098fa 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 7af610be370..35965e9645a 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 171188a76f0..712eeaef4ed 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 bd373b96172..66febc6b721 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 82500eeb30f..774ae2de63c 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 6087cd793c2..6d9f4e56348 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -22,6 +22,8 @@
 #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.0.292.g33ef6b2f38-goog

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

* [PATCH 04/18] common: Drop net.h from common header
  2020-04-07  2:40 ` Simon Glass
                   ` (3 preceding siblings ...)
  (?)
@ 2020-04-07  2:40 ` Simon Glass
  2020-05-30 14:59   ` Adam Ford
  -1 siblings, 1 reply; 30+ messages in thread
From: Simon Glass @ 2020-04-07  2:40 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>
---

 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-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/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_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/ucRobotics/bubblegum_96/bubblegum_96.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/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                             | 1 +
 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/netdev.h                                  | 1 +
 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 +
 468 files changed, 495 insertions(+), 5 deletions(-)

diff --git a/arch/arm/cpu/arm11/cpu.c b/arch/arm/cpu/arm11/cpu.c
index 177d1f40b93..ffe35111d58 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 45bf49b5ac7..c78f2cbfc93 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 7b7eaaf31df..acab9bccc01 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 6ab320da7d9..93d7a02ed4c 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 4c59a44f7e6..2bc3513abfa 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 09bda0e3398..ef8d2d202d5 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 9bed0e91bea..a003ab816a0 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 16c080a1e15..f65053c4b65 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 99eb7db3426..146cf526089 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 a5445338cb7..896d2f95694 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 6bf89e07d87..cfc7c9fbc64 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 664c9c1f4de..c544f38641b 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 16ab8676fe4..56ca7b01641 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 2c5d99e9acd..1ac50f558a4 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 6698b821d0e..c1ba69893fe 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 26c93393cd7..5ffeca13d91 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 73536985579..f607b77d41d 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 6a5518f9de8..a64bc1bde22 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 267abb83e8f..97d4473a686 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 35752037bcf..ea40c55dd2c 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 9c1f4a8ca8b..10dd034c7b4 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 b4438944536..6102fe1b55a 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 87c3e05f458..4e463fddbdd 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
@@ -6,6 +6,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 ca07c68863b..4e779dde1db 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 d391f930415..daaaeab26cc 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 d0e10cb007b..ff7f29275c0 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/soc.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
@@ -12,6 +12,7 @@
 #include <init.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 accad6e8ae7..2c0ce80c0ca 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 4bffec9560a..b29bc30fc25 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 b5a9513eadc..f910b6ed72c 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 ec4641dcdbe..98f526e2523 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 95ea57d571b..36f40a4015d 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 d4dfe7f6d85..a2ec5e28c7d 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 002ff7988b9..ecf85d2f14b 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 021c2461757..4e1da98d1f2 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 ca70731b9eb..8586f3a04d3 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 a135bcfc7b5..3e387e49e70 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 007d4ebc491..41544954578 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>
 
 /*
  * Flush range from all levels of d-cache/unified-cache.
diff --git a/arch/arm/lib/psci-dt.c b/arch/arm/lib/psci-dt.c
index 246f3c7cb84..0ed29a43f10 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 33cc76ba3de..8a24e34f620 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 17855506427..da0b4feacbc 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 1e090fd63ca..ecd01051211 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 c4cf59dabbd..810fa348eea 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 103bb38d450..8b2c5c79c03 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 4fd2e434488..4e3b49a3fdf 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 bfa85c64c6a..5444b07c88e 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 21103809577..4c965158fc7 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 b3a57bcf4bc..c61fcce3eb4 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 c8f6ca235b9..f32945ea371 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 fca520c671b..a4f0ab48863 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 7af60a7f2f8..aed3e14164e 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 0d77d983596..dd7c998487f 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 db02607b171..824cf6f8e33 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 375588894da..59fd029e4c9 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 6b12ea5e914..009b7deeca6 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 5e964af8eab..c56620dc5a7 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 1e527c0485e..a7153781279 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 a38b5d12d93..4e6b710c11a 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 360d94abb00..b038437a174 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 c2b1b769824..c46cc5fcaf4 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 6874458e36a..5e0b3f6cb5e 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 bc4c92074cb..3a7cffcab31 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 26d6b907906..fc1729edd38 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 191fd490058..82ac7af0b04 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 fac286b9c85..dacc897533c 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 40b98dbf08b..2896d6b0611 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 283f73522d6..533601eac4a 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 fb0c9188f57..eecc5d334e1 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 5a693e20bb5..7d57dd257fe 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-rmobile/cpu_info.c b/arch/arm/mach-rmobile/cpu_info.c
index 2cc701c4f5f..9b34cba0475 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 f9cd89a1314..3211dfee027 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 14b9e89ea35..9f26b8d16c8 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 1524eca2729..b36e559e871 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 7816ba11778..b390bdf8278 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 2901b7db680..0158f4f04c4 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 ea0bd94605b..d231ac94ddd 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 1d91b2d324a..cc6be076c07 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 b487b265af2..11b333b563d 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 31c49a7c849..267bfde09dc 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 390229436ec..4416827220e 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 00c65c281fc..492f4d8c11c 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 3d96d09f31e..f9fd4fe7d33 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 9a3793316ab..e231e7b60b8 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 c71470a2042..951e71430f1 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 6ee6cd43eca..4c41ce88164 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 aca44dfe67c..43c5ca39d47 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 442427bc110..5b98fe22bcd 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>
 
diff --git a/arch/m68k/cpu/mcf523x/cpu.c b/arch/m68k/cpu/mcf523x/cpu.c
index 429781945bf..8c808a6b0ce 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 b48a753f9b7..5eee856392f 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 6807992de53..32c477a5fd4 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 2f79380c8be..16023690803 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 dc5ed1aa79f..51281549a35 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 02f66f9087d..aa832d6be6d 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 2d6a41be2fd..87d2d6ee70d 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 98b67ccc8ec..641e2ad58de 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 502956d050c..eff1a9c7835 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 e11d300b6db..21917e5da5e 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 f4e25f1f59c..f0e3ada1952 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 a9f39dc5838..1c2d8edf605 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 4a1698d3bca..9d6c08f17a0 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 ed482a9c098..bb81f49ae73 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 9f424198b4a..a3b53da5a6f 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 c0a5288bdbb..bff4fc6b990 100644
--- a/arch/riscv/cpu/generic/cpu.c
+++ b/arch/riscv/cpu/generic/cpu.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <irq_func.h>
+#include <asm/cache.h>
 
 /*
  * cleanup_before_linux() is called just before we call linux
diff --git a/arch/sh/cpu/sh4/cache.c b/arch/sh/cpu/sh4/cache.c
index 2f49ce86816..0f7dfdd3cf7 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 a8d0590d51e..e94e980c0e5 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 a43cb7fc154..0e4402d68e9 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 2bf90dcfc62..30f47556264 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 fb59e2f67d6..9dddf88b5a1 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 2943e11d2a4..5fc4295f40a 100644
--- a/arch/x86/lib/coreboot_table.c
+++ b/arch/x86/lib/coreboot_table.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <acpi_s3.h>
 #include <malloc.h>
+#include <net.h>
 #include <vbe.h>
 #include <asm/coreboot_tables.h>
 #include <asm/e820.h>
diff --git a/board/AndesTech/adp-ae3xx/adp-ae3xx.c b/board/AndesTech/adp-ae3xx/adp-ae3xx.c
index 8eb40bf295c..54f7178b360 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 d349b19648d..23cdf4f578a 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 de546dab174..920d43ecc69 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 b641b72aaa7..dfa1fd4f153 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 377191baefb..1ada6279c89 100644
--- a/board/CZ.NIC/turris_mox/turris_mox.c
+++ b/board/CZ.NIC/turris_mox/turris_mox.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <net.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <dm.h>
diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c
index e1775d30047..29c11204580 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 94306b3d8ec..3e975801b8d 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 922576e9d59..372beb3c432 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 1a0746b9d3d..f3df7e666b5 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 604e8c1670b..e7808f5a5c0 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 777948f90f5..bd6eefd7735 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 e3fbbbaa8aa..47eb64dd1f8 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 299f2f102d1..33e0e4a4ae1 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 41d331dda2d..d7f7ebd962a 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 e46fcaea6dc..cdac64ed928 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 094ab5478d0..6ac5aadecfe 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 f1faa7418e0..ae9b888c12f 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 bdb4eca8839..79b867996b4 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 5de610d85fc..07a6a47ebc1 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 b17eb9ef55b..5c24276d510 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 69fd29d4fec..4df7ff437e0 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 e60dc3a622e..95bbdedbddc 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 1a472f50d3f..32e4933d20a 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 14626c1f553..ebd3322c6fc 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 dd0ebdd3030..91a86b00a47 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 e75d5b182f6..e4a6776f963 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 90d32353e9b..f16c137565c 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 96343678e0b..ced27b65e63 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 050aa51ee1f..2205dd30f8f 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 36f37084b36..dd7863f7acc 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 c2c7c095536..7984647e3a3 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 6348f123ad4..016e0adc06a 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 9eb851c3976..5900e654662 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 9268aa0daaf..2599db7bf77 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 d34f3ba0077..9698d8ee16a 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 5018167fcf1..4d40cb8ff5f 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 e4dbe426490..31cae470288 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 6cbad9c1f0a..91f489aad3f 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 2e7ba69d764..ea2f2bade00 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 687ade544ac..1b1b9d513c3 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 0caeea58853..dc86d43d9a1 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 dfebb7c1c13..b64ec95e313 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 9277094e441..e97efc1dc33 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 3e185ad82a2..f0a821d9a9c 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 561f2f30bb2..4497aa5af88 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 2aa453471d9..9348d6dcadf 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 811bbb528a8..0efbf761da8 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 49c731f8911..16f655f188e 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 228a3943c09..66781ef3161 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_stm32mp1/board.c b/board/dhelectronics/dh_stm32mp1/board.c
index 7bcd713a862..916d06bfeaf 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 03e9364765d..286c1adabc6 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 b644f273fe2..50b6f98c296 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 6c5992733cc..fd7d6db9bc2 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 ff811643a67..f54c89d154b 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 67fb1b9b2bc..95ec0b9a736 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 ab05d84190f..89742dfedb8 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 a9ea986579a..17292936b76 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 0e6f2135b4a..02845514edd 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 45c23df27ef..a17ca7ac60a 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 0979c5f4890..b1989bcbc23 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 1962b7e3c73..5adfecd2650 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 d138c9384eb..8260e7f7974 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 30bf1047d53..e41f7e41bba 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 ab83ef11a09..8633268ed73 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 b4201e76d1c..dca60b7401a 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 d0a98836e2b..2de62cf0952 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 3876910cbbe..0f940998bf5 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 d1ff7b8ba6f..acf146de4d6 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 aa93534ac68..fb4101b80f9 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 e1919d29885..b2709be8bee 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 a8d0c1109b4..4b9f94a0a56 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 d38e4d7ac7c..3f7c35b5c95 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 1eb40677b50..0ce41d3e4e4 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 7dbfcac307b..6ffd4aec3e4 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 76c18b8504f..6a6c65fe5f2 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 ae73246e5bf..bd052b903d3 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 93e0fca083f..204b40bf47b 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 1ae2308e9b8..90e95399d20 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 e55ee400260..bfbb8a5fb7e 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 2d4aace98d0..85d370f6280 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 a4455d3f612..454da1d7da6 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 4111d69b4b9..b7e0eeded52 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 86edd66bca2..fc331a995ad 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 d9e538b868f..57f91a42f58 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 cfbe89ebfe0..e5fa4ae7659 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 fb57f263573..06fe51db717 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 d0f7f045a5b..dda20eed519 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 33d056b47d4..fabcb03ac84 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 3957c09ac06..3866020a6d3 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 de19a562eb4..33da3914d3e 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 07d3b0edb39..d46dcd4b8a7 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 43029e42453..38fc30553cd 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 0c7904204f7..d01c74d241d 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 4f1d6602e50..a2c27823030 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 9cb5b14f135..b25fe3c1ed1 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 41c620795cb..6d6763db6ac 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 a0866926832..ea9d04e4b99 100644
--- a/board/freescale/p1010rdb/p1010rdb.c
+++ b/board/freescale/p1010rdb/p1010rdb.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/p1022ds/p1022ds.c b/board/freescale/p1022ds/p1022ds.c
index ebf822acb5f..33edff9727d 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 eeb13ccc9b9..5321e26a9cf 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 71fca8ca1e1..eb51ee9fd93 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 <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 72fe1b41660..6d0e1b1ffa0 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 854a839b8ce..32c68f2a718 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 e804cfe986b..fef7b8142ca 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 5b65818eede..1820419511b 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 299b859cb64..d40b5901080 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 4185cfac12e..3f10e420a01 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 107d28da33b..9cbc8754dc5 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 23b59bcc09d..e178d7f2927 100644
--- a/board/freescale/t208xqds/eth_t208xqds.c
+++ b/board/freescale/t208xqds/eth_t208xqds.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/t208xrdb/eth_t208xrdb.c b/board/freescale/t208xrdb/eth_t208xrdb.c
index 68949473040..669bc1efefb 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 b341c82e676..d93d75950cb 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 2ef192c4522..3321ce1ea1c 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 8a694a71c90..6c818643192 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 4eb7d76660e..7aad6831273 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 8e868165ed6..14e3e25c18d 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 7f0de5e42b0..8cc9278287b 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 78fb98ef645..cbb1cd0f8f1 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 65e5e1e60f2..2a6a449306d 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 3e0edd48f51..f7f2e2c5259 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 84c26e0c14f..0ed62c7d84d 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 4937dc374c7..70a69f5b8c9 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 77ce75ecf26..80005ec3cc1 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 b0f8d8a314a..a28d4478254 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 1b871fdcc5a..0ad601f39b6 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 9dae54dda5f..7103a3e0f2b 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 7499d2078b7..8635a5448b8 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 6ef960b06ba..c6117b33bcf 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 3c3592ecf58..f8134b70421 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 df5d316717f..1a9c05275f8 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 18f3c3f9d9c..6ed3a9b8475 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 21d8a21010e..5c178a27e72 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 6bfa41737f6..7438d379237 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 5b2fd9c23f6..caa6187ffe6 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 1756bbca985..b92f0974af5 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 63cdb3a604b..e552877fdcd 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 baa7997477e..f7da1a95ea9 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 43f6c5afcb8..e561c822531 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 820b5fde142..b1bf8d50f81 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 a3af823ef6b..7439aa56ad8 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 039ed0f1bcc..236342c8d70 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 40dd27a7b0d..91d13bdea41 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 e3e8e74220d..00afff3abfa 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 414a9c001dc..b3e0830843b 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 81bd8bd95b1..75505d0c189 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 6c096b49a1f..3134415d804 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 767c45cc9c8..3ffd9ad75d1 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 c15387366c7..892f7e72609 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 f2da4686c3f..e4d0967c14c 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 8dbeeb6e680..120464ced46 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 135aaa5234c..565ce5f5d1c 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 fbfc49ee01d..0a762bc5536 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 ed041b14ee8..eef5d36fd5d 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 7af39e10cd5..f85209c6498 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 390060e51f7..948007c4a83 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 a80300b0c00..fc2c2a94dce 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 05369d22271..9b6502386e1 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 663eddac119..c2c9b9c7e7b 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 d246dce36d0..c0e14cd5aa4 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 41090dda109..422f25c2e91 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 fabc348440d..b8aa0e7f694 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 94bd71ad097..963de15fa87 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 58bb5bab1a1..792b9137df7 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 bd4eaa4f3a5..fff2b696ced 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 cb7206a5616..40c9c7e21da 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 c0496c549ab..08eafefb91e 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 fa2acf59a7a..48e7ff24798 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 c74c06eaeec..f523e50ea56 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 5a88b6c8ade..537d9d18721 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 e268ef55a2a..f3483a7aed0 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 13f77a3db27..262f6640d9d 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 83fdf027e9e..c531eb3fc62 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 1b3478a9fb1..6e88547e1c3 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 640242e718a..d8b1e7de4ed 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 91c2691b860..241f123ae11 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 7cff6eecf25..e6f8dc90839 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 5d9fdf27b25..35bf497156d 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 c36e7655c07..11c11b91c77 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 33b29e647e9..f193e833619 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 fa982bda5cc..4bd88f85a62 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 67a29e334d7..66135ad2a9a 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 7537fa213aa..afa6290a2a5 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 f8eeb40555b..146bbc26d6a 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 e27a03c2125..4294f3ed54d 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 b7ca2e1315e..a6fd49d729c 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 ff1a189c7e9..f79e7747e28 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 621e26905ba..9af1799fa5e 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 01b28e8da46..c6de8602d08 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 21fc5ed1d3d..87c7ef6b3f5 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 34ca3ec9b02..c80a458c125 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 a6108794243..9d96710f056 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 12e657c9c61..cb3a12ec373 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 cbd35f24342..3938dea4300 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 8132cdfbf2f..8f595989507 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 d26dd5ba840..7161c934cd4 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 aa2240b8523..f918c81f5b6 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 ee7efcbfa7c..0d19ad018a2 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 20199da390e..b1e51bc4310 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 e71c53e5ee4..97da5ccf0da 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 2b9385d14b4..7f82e71228f 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 3896ebbfda2..e895a216fe9 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 3f85f1ac89b..3b5eabec775 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 f04b7493119..b33cca1f061 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 8727101aa38..8e62b79ef36 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 c4db516b074..93693712a9d 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 1b6c9114186..bd7d8b7f53f 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 154ea0e9258..5fea9d83347 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 1320f8ad78c..d64eff4ffa6 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/ucRobotics/bubblegum_96/bubblegum_96.c b/board/ucRobotics/bubblegum_96/bubblegum_96.c
index c16f117bf8a..d680a82bda7 100644
--- a/board/ucRobotics/bubblegum_96/bubblegum_96.c
+++ b/board/ucRobotics/bubblegum_96/bubblegum_96.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/board/udoo/neo/neo.c b/board/udoo/neo/neo.c
index 2ba98c7b52e..096551b3c7a 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 2a4e790d88a..0370db67e49 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 2d0b760c39f..0f00506d7aa 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 9783abd6595..45b21fba32b 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 c76502c9648..197405e5555 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 1ebec939169..50630574fd1 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 75aedb09292..e7169ea393c 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 8bdc67748ec..641639bb502 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -8,6 +8,7 @@
 #include <cpu_func.h>
 #include <env.h>
 #include <init.h>
+#include <net.h>
 #include <sata.h>
 #include <ahci.h>
 #include <scsi.h>
@@ -17,6 +18,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 d6a7175b379..89747c2f5bb 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 036be5f4438..e71ef7355b0 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 8d271ce1f3c..d178a0c10de 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 50df127f6d2..2392907be2f 100644
--- a/cmd/fat.c
+++ b/cmd/fat.c
@@ -12,6 +12,7 @@
 #include <s_record.h>
 #include <net.h>
 #include <ata.h>
+#include <asm/cache.h>
 #include <asm/io.h>
 #include <mapmem.h>
 #include <part.h>
diff --git a/cmd/load.c b/cmd/load.c
index fab30fe8943..36db571cea6 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 6d54f195272..bb318f3902c 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 a422dee168a..ddc1508fb73 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 4de6892a01b..9c2b5d718ef 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 81d94cd193c..1c42f2114b2 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 53af04d7dc7..a238937891f 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 2b9c268ac42..69e0d46a557 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 211ab2680f8..8b768f31088 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 770f6a3eede..73c764255fa 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 82a164752aa..c59400269a6 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 1f1c23bfe7c..95319a2b50d 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 db4362a6430..96cba015890 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 614eb36c785..02b1f013863 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 02cf5c6241b..fad551fdd64 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 ff4986a6190..2cf763575f9 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 94873cb6ed5..ed712804561 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 f8bc1ceba74..c421090c87a 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/main.c b/common/main.c
index ec8994ad457..09333651586 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>
 
 /*
diff --git a/common/spl/spl_atf.c b/common/spl/spl_atf.c
index 702367b2a23..bc2921c552d 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 69dabd27f6d..425a3b00c4b 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 097b6729c14..759fc48a60e 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 2709aebd60e..f5730ae7173 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 e733227f599..4f14c9a56e2 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 c2e28fe518e..0f070b6bc93 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 6019ac089e8..a71a7edf88a 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 7a6d03dcca3..6b162678ddf 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>
 
 /* Now implement the generic default functions */
diff --git a/drivers/bootcount/bootcount_ram.c b/drivers/bootcount/bootcount_ram.c
index 9c678e25f4b..078c84d5eca 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 d3673a5c8b8..cd9ddd0ddb4 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 89ea820d487..e64dee4ab77 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 34611056ecf..b5321ed8206 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 0531b1b735f..c2059b8b0a3 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 74e38ca7592..e63def8b2de 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 637ef29f150..2f35e0c90b8 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 aa84f2cee0a..9228149863a 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 2fd50b7ae55..049f202e03a 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 1f7ead0c674..c06fba92f84 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 15133128bef..242ffde5594 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 d99460f2fb2..70bdb650711 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 9d5a7fc796c..d2b0b63ecd5 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 7e11b13e45c..77c4ba95307 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 e587f1fcb2b..b2ceab2eeab 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 2a2aa2f4f16..35e7165c173 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 6c69ab7802c..8ab19e0c74e 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 4a826e4a71a..a2a5f9cbbe0 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 21624f715ba..6370cafb23c 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 12245408114..6290b7fb5be 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 386781da031..a35e791fcc9 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 6bca2a9c829..0cdf5a04897 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 4d0dc339369..886299a50d7 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 520c9f9feba..6556cd5b467 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 6f3b2ad653a..b76a7edc0ba 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 3a09a8165c1..a58d7ce4ab1 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 fe8097c1460..522e33a33b5 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 a653dfa5edf..45c9ed4b9c0 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 f3c8f7f2cb1..9c4af8a5d63 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 e3a7222efba..11c9124e310 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 6a25f67c30b..3794e40b01b 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 8f4848aec68..f3ac064c1d3 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 1b7c94f654d..0dd64e45821 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 baac277a84d..34e0da1a1b7 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 3519a4167a7..ffaf5a14d07 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 0564bebf76c..5511b2a8389 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 9212920549d..7e98449cfa2 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 ecb34b24508..8ec7b36f9ac 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 bc5b63d7881..9a0c7110fbf 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 f896e80b6d9..1ff405bf5b7 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 bee73153d0e..2fa27c7b6ec 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 40e6b3ba395..35257366747 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 84082407d27..10d5fc34cc0 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 e152faf083d..85f8d3b419a 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 0c1dd6834a3..d338643e60d 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 404a0464229..217c684702f 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 126b824b1a8..7a153997117 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 d737400a20d..75831dfe147 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 fcd24868af4..29067194cb1 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 b4ad11d3fa5..283f099f863 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 8ece926dd37..e30a7fd5d6b 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 fb4a628d63c..9139b5b1a10 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 5ccdfdd6839..27dc233323c 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 f8e5d05722a..d75bf546704 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 013542770dd..4c3acba35a9 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 3145fbde2bd..b7f59aa0df9 100644
--- a/drivers/net/smc911x.h
+++ b/drivers/net/smc911x.h
@@ -8,6 +8,7 @@
 #ifndef _SMC911X_H_
 #define _SMC911X_H_
 
+#include <net.h>
 #include <linux/types.h>
 
 #define DRIVERNAME "smc911x"
diff --git a/drivers/net/sni_ave.c b/drivers/net/sni_ave.c
index 5d66a63a8bf..0f665087c60 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 1ae776b4464..09ea586e071 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 2b77213001f..eea15701f77 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 9c6bfca5a9f..b5dfa8bd914 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 5f2f87d352c..f7aaff5e38d 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 12298cf3273..3325dfef2b8 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 4e1c1fab54c..f5b16b8fb3b 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>
 
diff --git a/drivers/remoteproc/rproc-elf-loader.c b/drivers/remoteproc/rproc-elf-loader.c
index f2e033aa741..d308100cf41 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 cd0b0ac77b6..cc5e1f6e25b 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 c5661c52fac..b24a8f128f5 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 3ca30887fbe..ee44973c7fa 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 e3750b0b171..ef39198b43f 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 02b78df8437..5d15072d498 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 1957a3b91d5..4266bd630c3 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 3a8ec0bf2dd..448f5245d17 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 e8ee6650bc4..fe8cc6acc53 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 21786e1bdfc..afe78d44a38 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 75c45ee0ae8..a9e0aabc61f 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 e5f73e3d4c0..8dae5097b8d 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 25f69a061b4..ab6411f561a 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 3aca9ac265d..d76e2ff5bbf 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 d9cfff3a29f..5677eab4261 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 e4efaf1e593..d048a42d3df 100644
--- a/drivers/usb/host/dwc2.c
+++ b/drivers/usb/host/dwc2.c
@@ -14,6 +14,7 @@
 #include <phys2bus.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 1cc02052f54..6ec25fc80a6 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 c94960f2cc7..ac1ad29b02b 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 1d2eda084c8..ea5a4529cee 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 076e9ea0193..e9d05c93946 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 c64be38e492..db8eb4ade88 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 3ff5b28ae2f..2907c533783 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 585af3d5714..dc8a55f70ef 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -7,6 +7,7 @@
 #include <common.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 f4bae9fc369..1fa052e306e 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 3d658e61d7c..eed61cd731c 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 1836556f361..53fc9c7fa60 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 ac16ed5bdd4..9717b5fcb90 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 2c05ed902d0..70e9ab219ca 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 "../drivers/net/smc911x.h"
 
diff --git a/fs/ext4/ext4_common.h b/fs/ext4/ext4_common.h
index 4dff1914d9e..beaee9c80bd 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 68ce6583867..f68c8f73c48 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 4f96699e363..d2aff092001 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 1705d85e8a9..a900596c5f9 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 f06720dc0d9..58110aa3e71 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 62fb8afbd0e..34385aafb1a 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 774ae2de63c..3ef212dd00f 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/netdev.h b/include/netdev.h
index 68a3fceab66..f2d21c45d0f 100644
--- a/include/netdev.h
+++ b/include/netdev.h
@@ -125,6 +125,7 @@ int fec_probe(bd_t *bd, int dev_id, uint32_t base_addr,
 /*
  * Allow FEC to fine-tune MII configuration on boards which require this.
  */
+struct eth_device;
 int fecmxc_register_mii_postcall(struct eth_device *dev, int (*cb)(int));
 #endif
 
diff --git a/include/scsi.h b/include/scsi.h
index 61da958bf68..96cb7266762 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 73f1fe75a83..3c53c55b218 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 97d90f069a6..b8c518614e8 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 82d2595847a..22f0123eca4 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 d98a854e6d1..5eb297d285a 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 42f51b65203..13f3ee6bc19 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 9797ecaf42e..79f04678039 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 eb11fc898e3..c44a0f5be5e 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 036062139bb..df623adc58e 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 89a6fd6ec96..c83426f59dc 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 8af77829705..0a8a557319c 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 db26911414a..1b57917320e 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 b49c3d3ced9..4b12b699d09 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 c73a82e642c..2c918d83796 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 633c942e678..024e8eab909 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 fb8a0b17ba4..cbc712f7eda 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.0.292.g33ef6b2f38-goog

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

* [PATCH 05/18] part: Drop disk_partition_t typedef
  2020-04-07  2:40 ` Simon Glass
                   ` (4 preceding siblings ...)
  (?)
@ 2020-04-07  2:40 ` Simon Glass
  -1 siblings, 0 replies; 30+ messages in thread
From: Simon Glass @ 2020-04-07  2:40 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>
---

 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        |  2 +-
 lib/efi_loader/efi_file.c        |  2 +-
 54 files changed, 131 insertions(+), 123 deletions(-)

diff --git a/arch/arm/mach-omap2/utils.c b/arch/arm/mach-omap2/utils.c
index 0d5ca20e8e8..6e519d8c910 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 d6611eea5dc..46c6d00eb4d 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 7c8f2ee8eb3..d0d957d4f9d 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 9626f2c69e3..62f9a44e38a 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 15973b7d132..9e008a38890 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 2392907be2f..a88a49c1171 100644
--- a/cmd/fat.c
+++ b/cmd/fat.c
@@ -70,7 +70,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");
@@ -107,7 +107,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 e05ef4355bc..f3731487627 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 5e4e45ca6d8..4b2e06e615a 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 82c2d9ad994..7977e9d847e 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 598fab48b32..28e827796b3 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 c5c6899787c..52ff637e2fb 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 9c237a5758d..2b622a8f53e 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 e0fe32d24da..b5b8af1b278 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 2a6252229ca..954133ba84e 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 a2ea363e96a..e6af5b567bc 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 4cc2fc19f7e..68cba61c5a0 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 5a2bb718b59..5a17d11b9b7 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 83ff40d310a..a4e92ac991b 100644
--- a/disk/part_dos.c
+++ b/disk/part_dos.c
@@ -207,7 +207,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;
@@ -311,7 +311,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 f5730ae7173..b85377b02ec 100644
--- a/disk/part_efi.c
+++ b/disk/part_efi.c
@@ -255,7 +255,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;
@@ -409,7 +409,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)
@@ -599,7 +599,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;
@@ -694,7 +694,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 4f14c9a56e2..2ccb7867c9b 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 8b2c004027c..fbd0ad73e35 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 0d495a785bc..cddca0c45fe 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 95cb4341895..467a8618fe3 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 d3249a54f7c..c666eb0f29b 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 1f6b1b5bd81..c03909d91ab 100644
--- a/env/ext4.c
+++ b/env/ext4.c
@@ -46,7 +46,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();
@@ -89,7 +89,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 53fc9c7fa60..0ecc337085e 100644
--- a/env/fat.c
+++ b/env/fat.c
@@ -37,7 +37,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;
@@ -84,7 +84,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 251ad07d7c0..a8b661db80a 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 2e3985e3855..de16217d0dd 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 986d0786797..25a8cf6a879 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 ada3800f1e1..e686abc5e3b 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 29076880bcc..0d4f756aa5c 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 96ca276839e..ad71f5ab6e2 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 f68c8f73c48..425d877c749 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 0c66d604770..e3de25da5b6 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 d369c43ca68..1ff804d13ba 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 c6b67795df5..5d9c26489aa 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 af47224b6c6..5851fe2434f 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 e097d284444..742c2f47ebf 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 3cdb9e03edc..251e7d1f74f 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 810906d22b3..3f4e69be9ef 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 18278f829e4..a8d7090f794 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 5be61e3264d..f7f82ad7d10 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 34585d407d0..aafcd841402 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 bc139f8c88c..84573fd3fe9 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 95db001beee..0c58109e2f8 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 96d26032ac7..3d4d25da960 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 0b5cf3d5e81..151de91744f 100644
--- a/include/part.h
+++ b/include/part.h
@@ -51,7 +51,7 @@ struct block_drvr {
 #define PART_TYPE_LEN 32
 #define MAX_SEARCH_PARTITIONS 64
 
-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			*/
@@ -67,11 +67,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;
 };
 
@@ -96,12 +96,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);
@@ -170,7 +172,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
@@ -185,7 +187,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
@@ -199,7 +201,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.
@@ -220,7 +222,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
@@ -243,9 +245,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) {}
@@ -254,10 +256,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
 
@@ -292,7 +294,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
@@ -344,7 +346,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
@@ -370,7 +372,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
@@ -424,7 +426,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 de4150024ce..a655d5ea9fc 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 6e6e3c62ff9..49724d05c89 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 015ce122266..16b757286e4 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 bca3dff06e1..027ba91b287 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 3c53c55b218..e4f8b490b52 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 fc0682bc48c..80945714518 100644
--- a/lib/efi_loader/efi_disk.c
+++ b/lib/efi_loader/efi_disk.c
@@ -393,7 +393,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;
diff --git a/lib/efi_loader/efi_file.c b/lib/efi_loader/efi_file.c
index 140116ddc4a..1fe7cf539e3 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.0.292.g33ef6b2f38-goog

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

* [PATCH 06/18] common: Drop part.h from common header
  2020-04-07  2:40 ` Simon Glass
                   ` (5 preceding siblings ...)
  (?)
@ 2020-04-07  2:40 ` Simon Glass
  -1 siblings, 0 replies; 30+ messages in thread
From: Simon Glass @ 2020-04-07  2:40 UTC (permalink / raw)
  To: u-boot

Move this uncommon header out of the common header.

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

 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/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                     | 2 ++
 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 +
 96 files changed, 140 insertions(+), 10 deletions(-)

diff --git a/api/api_storage.c b/api/api_storage.c
index 7ae03ac2306..a0dacad1a55 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 6e519d8c910..6e6791fc659 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 79eb19992d0..12c26a91c65 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 e9ac86b2da6..4941e2d74f0 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 511dfb78b81..7492c87c34a 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 56d69cddacf..1ed6b2aa929 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 d0d957d4f9d..7a4e51571b6 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 62f9a44e38a..b944e62b6a9 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/gpt.c b/cmd/gpt.c
index f3731487627..fe49d533209 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 1860a3f2e5d..002c96becbd 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 5da903bd524..9ae91ce9cb5 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 6bdb516cb5d..c507e9dbd80 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 67de1a3bdc2..e81194de0f4 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 afd58e7cdb1..725624627c1 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 dd9ac0bc976..98fa300dfe4 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 52ff637e2fb..b6037302487 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 b7082bc63ad..f38cc56598c 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 b5b8af1b278..72025bb552c 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 954133ba84e..3898041d106 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 e6af5b567bc..cd0c2b24efe 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 759fc48a60e..e4b48f4643f 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 68cba61c5a0..bb0f6e20469 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 5a17d11b9b7..7eea60b564d 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 a4e92ac991b..f2a6e6328d1 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 b85377b02ec..3ae733df431 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 2ccb7867c9b..822f2c4d9f4 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 fbd0ad73e35..cda497e04a6 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 4cd7420c3ca..d54acc96ee4 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 0f070b6bc93..df3f1efa397 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 c6680dc1c98..0ef70d0d59a 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 e384b805b21..6a38d500245 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 a71a7edf88a..cebb165a476 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 a28ac56ccd9..e64cc4a5c10 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 41635742a81..4a7ffad6bdf 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 7c39aa5f2f5..4bda74bd067 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 0c343f7b646..e3ee778c29d 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 ea40929e3e5..6a8f789ff08 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 4b8a4eac176..01b3b37a07c 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 cddca0c45fe..8cd466f02e5 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 467a8618fe3..52da34b1e37 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 b1654681450..eb8a36f2922 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 0dbf304487f..8fdaacd5e04 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 3e365666934..af404c42484 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 b52ff9f3bc0..6a4453ca02e 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 2202158c88a..4851198571c 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 0983fbced3f..b7e37416a49 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 88019c9a88c..f70f29beb98 100644
--- a/drivers/net/fm/eth.c
+++ b/drivers/net/fm/eth.c
@@ -4,6 +4,7 @@
  *	Dave Liu <daveliu@freescale.com>
  */
 #include <common.h>
+#include <part.h>
 #include <asm/io.h>
 #include <malloc.h>
 #include <net.h>
diff --git a/drivers/nvme/nvme-uclass.c b/drivers/nvme/nvme-uclass.c
index 2d88efdb619..277e31e1f39 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 ef4382da1a1..5e75152f421 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 69de6a53d56..849c42f0cd2 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 a118283984c..43ee756c0ae 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 1cfeabcd31a..da3d63c0f0d 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 62acccedf37..0fd74fdec96 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 bd2e9c0c9bf..8cc2eb1973e 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 db8eb4ade88..f8ed0a9fea2 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 aa8c0a962fa..fbdec3af67a 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 2907c533783..d5ed8d00962 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 8333ddc44c0..ba34f1a107f 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 1fa052e306e..82ba5c4e7ec 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 f08f117cf8d..913beab4d49 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 e793e34e836..992118c6075 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 c03909d91ab..4819ad510bb 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 0ecc337085e..733f2de6af1 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 e686abc5e3b..1e5b83235ad 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 2dc4a6fcd7a..71eee36537a 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -5,8 +5,10 @@
  * 2017 Marek Behun, CZ.NIC, marek.behun at nic.cz
  */
 
-#include "btrfs.h"
+#include <common.h>
 #include <memalign.h>
+#include <part.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 5bf78b530a9..9adef57476a 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 3559daf11d2..ecae5768c9e 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 67aeba1339d..ce1fddc9a47 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 ad71f5ab6e2..4c89152ce4a 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 e3de25da5b6..061917a9847 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 1ff804d13ba..115c010ef88 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 5851fe2434f..4ae41d5b4db 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 742c2f47ebf..bb355123803 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 3f4e69be9ef..0941eb6b9cc 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 f7f82ad7d10..a7605e15897 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 a900596c5f9..85a211554a1 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 3f2792892f3..2b262948d54 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -12,6 +12,8 @@
 #include <part_efi.h>
 #include <efi_api.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 aafcd841402..cb5d9cc0a5c 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 84573fd3fe9..02742f92a5c 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 0c58109e2f8..76ed7cd6be1 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 37e35c21206..9fdb4a34249 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 3edcc39f4e2..fd915335b2c 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 2e340673c38..783acbb60d2 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 b5acdd01bdb..c871767e20a 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 a655d5ea9fc..b61bb600679 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 49724d05c89..783dd5c88a7 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 6d9f4e56348..d123fac8625 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -22,6 +22,7 @@
 #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 16b757286e4..b025779d59f 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 33e66fcad2e..e7d8745ad85 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 af1adbb71ef..49bebb58cc2 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 1fe7cf539e3..9233767ee26 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 9e6ccd692a3..bee3b9261f3 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 df623adc58e..3170c024f7b 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 9c71adc69d9..94b2855b8e9 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 9ab0db1b66f..49402b9c902 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 e396c2a0ea1..a25c2c14820 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.0.292.g33ef6b2f38-goog

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

* [PATCH 07/18] bootstage: Use BOOTSTAGE instead of BOOTSTATE
  2020-04-07  2:40 ` Simon Glass
                   ` (6 preceding siblings ...)
  (?)
@ 2020-04-07  2:40 ` Simon Glass
  -1 siblings, 0 replies; 30+ messages in thread
From: Simon Glass @ 2020-04-07  2:40 UTC (permalink / raw)
  To: u-boot

Some of the enum members are wrong. Fix them.

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

 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 bf30c479899..300be8b093f 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 d7ce43e1eb2..66a3cb39f18 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 c59400269a6..c32a77a95b8 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -837,9 +837,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 95319a2b50d..46806fe8611 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 932e6ab98ac..0526cd7718d 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -455,11 +455,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 82f0307ef1e..f507271375f 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.0.292.g33ef6b2f38-goog

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

* [PATCH 08/18] common: Drop bootstage.h from common header
  2020-04-07  2:40 ` Simon Glass
                   ` (7 preceding siblings ...)
  (?)
@ 2020-04-07  2:40 ` Simon Glass
  -1 siblings, 0 replies; 30+ messages in thread
From: Simon Glass @ 2020-04-07  2: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>
---

 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 d38c18ef8f4..1b08ffe2857 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 46e63294fef..6fe3ede387b 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 3e387e49e70..37fc727601c 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 19445b3fc7a..fb1170d00d7 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 87d2d6ee70d..f7303b790fc 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 8c0d7672f24..9be9d18ac85 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 1003bc87b9d..b17368647d3 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 390e8c0673c..1cef75c4bef 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 fad16901c5f..d2f7ddcd2d1 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 56ee3f58260..842640c50ed 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 2de03fb8e02..d38c3164c12 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 1f22c1ea3c6..35fe029a244 100644
--- a/arch/x86/cpu/apollolake/fsp_s.c
+++ b/arch/x86/cpu/apollolake/fsp_s.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <acpi_s3.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 d32f2a98987..a555e6c0d38 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 e698200d704..d37925bc80d 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 dae06949cc6..7d48f95c3f4 100644
--- a/arch/x86/cpu/cpu.c
+++ b/arch/x86/cpu/cpu.c
@@ -20,6 +20,7 @@
 
 #include <common.h>
 #include <acpi_s3.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 07d8f1f279c..0837655e124 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 da9bd6b45cf..c65e8c8d63c 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 300be8b093f..117f36a8482 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 66a3cb39f18..28c15a22a2e 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 057b229433e..458eaf95c04 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 5a8c6e282bf..0ff8a9053e7 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 1e4477aa5ff..fd2f0df371a 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 32e4933d20a..ac6462d7ff5 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 ebd3322c6fc..9dc26b949eb 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 9698d8ee16a..6e0ad4b53f8 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 aa641259ac6..56a2c29e4c7 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 ad56dd7d019..3da5005f403 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 f193e833619..fbcb87092b2 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 7d7c427392f..b604ee951b4 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 cb3a12ec373..439b023da82 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 ed0b0ff1fc8..f1ea4e95982 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 9e008a38890..da0660148c1 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 9c2b5d718ef..c42ab24ec06 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 1b724cc5709..282b38ccf99 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 98fa300dfe4..858be726a47 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 c32a77a95b8..a53a5e518dc 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 46806fe8611..2eef614885b 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 1d58462509c..44023532e13 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 d2ed33663b7..817f85a7fee 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 38bba17585c..e5e5894b2fa 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 ed712804561..dea66cf0d4d 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 f7c8a173ffb..4c4f0ced535 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 09333651586..9ce5c70ff39 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 0526cd7718d..d5b6c40e59e 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 90f224b0452..fbedd4f38a9 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 849c42f0cd2..949e364e78b 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 a9d7715a556..990a5ffa513 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 ed48a145f2c..4837b0645b6 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 54956e557a1..0cbdc279a56 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 43cb2d820e8..04596ff1174 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 c23421d25be..86c4c10b386 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 913beab4d49..a552f38cd07 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 1fd1bd01d3b..0256b3e3567 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 85a211554a1..fd3e2de4cce 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 75de48f9003..1395f28715c 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 2c918d83796..05bfede14a5 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 ed81cbd5374..da22ddbd7a8 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 ed26b1b6935..58f899a0240 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 5d6b0d7d7f4..e0ef4a11a7a 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 087d399a24b..035293537b8 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 696a60f70a7..0f977fe2450 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.0.292.g33ef6b2f38-goog

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

* [PATCH 09/18] common: Drop image.h from common header
  2020-04-07  2:40 ` Simon Glass
@ 2020-04-07  2:40   ` Simon Glass
  -1 siblings, 0 replies; 30+ messages in thread
From: Simon Glass @ 2020-04-07  2:40 UTC (permalink / raw)
  To: u-boot

Move this uncommon header out of the common header.

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

 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/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_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                           | 1 +
 drivers/thermal/imx_scu_thermal.c                | 1 +
 include/asm-generic/u-boot.h                     | 3 +++
 include/common.h                                 | 1 -
 include/tee/optee.h                              | 7 +++++--
 lib/libfdt/fdt_region.c                          | 1 +
 lib/libfdt/fdt_ro.c                              | 1 +
 lib/lmb.c                                        | 1 +
 net/tftp.c                                       | 1 +
 test/compression.c                               | 1 +
 test/overlay/cmd_ut_overlay.c                    | 1 +
 tools/imx8image.c                                | 1 +
 171 files changed, 189 insertions(+), 5 deletions(-)

diff --git a/arch/arc/lib/bootm.c b/arch/arc/lib/bootm.c
index 1b08ffe2857..9fa6aaf3b2d 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 8110412da60..e73689ce269 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 4e779dde1db..4ef2a302785 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 2c0ce80c0ca..c0201341ea7 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 36f40a4015d..c7445e647ee 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 37fc727601c..1d2a84a3b04 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 699bf44e702..9cf4a67406e 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 49305299b39..477ea94997d 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 31e95a9a288..6744fbda46d 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 aed3e14164e..041b6ea180a 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 dd7c998487f..256b0526f22 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 824cf6f8e33..0478c15f3fc 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 b7de9ba099d..58995d73ac8 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 6dbb9bde483..17066bcf8bc 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 dafa142824c..3a511941080 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 48ab0e60c63..fb4ae3d32d4 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 a3997b25901..612942025bc 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 96ba90fb7a7..d617c7d9b01 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 <asm/io.h>
diff --git a/arch/arm/mach-zynqmp/spl.c b/arch/arm/mach-zynqmp/spl.c
index 896657f51c3..1c304f1af3a 100644
--- a/arch/arm/mach-zynqmp/spl.c
+++ b/arch/arm/mach-zynqmp/spl.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <debug_uart.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 fb1170d00d7..c36ee79c923 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 f7303b790fc..592ac97f827 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 9be9d18ac85..8a65912ceaf 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 015840de256..26fcfc842c2 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 7d39320c150..f086f34729f 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 e1891617c76..bec18fe28f6 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 fbf32b9a07a..73105fa8e48 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 1cef75c4bef..8aec8c9fd3b 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 7357d3b07d6..91b7f1624e9 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 d38c3164c12..d1d460b84a4 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 2896e45f0df..5f14a04ab41 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 a555e6c0d38..1cf7cebff52 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 90baec2a175..e34529bd98a 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 34804b53cca..f9dcf32d733 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 920d43ecc69..da5bc5b1f12 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 dfa1fd4f153..240e8041379 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 3f31a8f9c3d..6863da82d6e 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 70671039c28..5095cf65d13 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 33ce7e8ff11..cb2f6da76f6 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 <dm/device-internal.h>
 #include <asm/arch/clock.h>
diff --git a/board/emulation/qemu-riscv/qemu-riscv.c b/board/emulation/qemu-riscv/qemu-riscv.c
index cbce5ffe6e3..c40f8388bc6 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 a9820a9028e..6359fb32234 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 e7f684bfb3a..037a8beb64d 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 30e7a1f7ed9..871d066d681 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 89742dfedb8..6870674f7a4 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 17292936b76..74502c6d18e 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 66eea32e077..f0c7bed68f0 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 b1989bcbc23..5892bbd62ca 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 5d17f397cb6..d067489df72 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 7aed14c52b6..95e02e9b262 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 0b20668e2b3..c3b523d55e8 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 e442510f44d..eafadc691b3 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 cb4006eb2a4..c5c07089a2c 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 cb4006eb2a4..c5c07089a2c 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 3f7c35b5c95..09a692be1dc 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 6ffd4aec3e4..f3b1dcd306d 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 6500649d7b9..8b86e44c902 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 aeb989a638b..21fb559250c 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 b7e0eeded52..13cfe159ae1 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 33da3914d3e..829e42f6771 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 d46dcd4b8a7..8d24af0a99e 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 ea9d04e4b99..ef8b4916100 100644
--- a/board/freescale/p1010rdb/p1010rdb.c
+++ b/board/freescale/p1010rdb/p1010rdb.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/p1022ds/p1022ds.c b/board/freescale/p1022ds/p1022ds.c
index 33edff9727d..244a053d7a4 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 5321e26a9cf..13df3e86379 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 eb51ee9fd93..1c0b85a1fbd 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
@@ -8,6 +8,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 6d0e1b1ffa0..8e1522a6045 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 95ed0ef429e..076e63a3573 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 1820419511b..4a3be4c5690 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 e42337e47a4..8c5da0bfdff 100644
--- a/board/freescale/t102xqds/t102xqds.c
+++ b/board/freescale/t102xqds/t102xqds.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/t102xrdb/eth_t102xrdb.c b/board/freescale/t102xrdb/eth_t102xrdb.c
index d40b5901080..dbf25a237d1 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 eee09a57019..601c2ecadfa 100644
--- a/board/freescale/t102xrdb/t102xrdb.c
+++ b/board/freescale/t102xrdb/t102xrdb.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/t1040qds/eth.c b/board/freescale/t1040qds/eth.c
index 3f10e420a01..b349b77951b 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 92dd9237ec7..d29218d2915 100644
--- a/board/freescale/t1040qds/t1040qds.c
+++ b/board/freescale/t1040qds/t1040qds.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/t104xrdb/t104xrdb.c b/board/freescale/t104xrdb/t104xrdb.c
index dc3b59d26f9..a156d2ee09a 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 e178d7f2927..2151ede7f91 100644
--- a/board/freescale/t208xqds/eth_t208xqds.c
+++ b/board/freescale/t208xqds/eth_t208xqds.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>
@@ -27,6 +28,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 79cc1543f95..737c6a2c5a4 100644
--- a/board/freescale/t208xqds/t208xqds.c
+++ b/board/freescale/t208xqds/t208xqds.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/t208xrdb/eth_t208xrdb.c b/board/freescale/t208xrdb/eth_t208xrdb.c
index 669bc1efefb..db4718128dc 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 b5c20112d0e..24f0d0764ce 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 d93d75950cb..8a9f631e8da 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 104b40a1109..8f2032acc7b 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 5608774afd1..1d449afb2a3 100644
--- a/board/freescale/t4qds/t4240qds.c
+++ b/board/freescale/t4qds/t4240qds.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/t4rdb/eth.c b/board/freescale/t4rdb/eth.c
index 3321ce1ea1c..4c896c8a90d 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 8015666eccd..d801f2c7a1b 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 6c818643192..1443ef91ef4 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 14e3e25c18d..b39b0b60022 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 69cd0a1bc76..6f7f752a8dc 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 f7f2e2c5259..ffde1161d0b 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 0a6cf1fd29a..21afbc7f39a 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 85ca777c1d2..a362d25c01a 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 765463e3707..0f5eab79b57 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 08d2b56d54b..8ed8e032956 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 1a9c05275f8..95c90640668 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 067907ba52c..b240c7649ce 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 e614058d10f..acc26157c77 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 ad227a41693..5fbd8fc6cde 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 6c6dbf2bfff..ed1aea55cc2 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 71891f6fe38..d0e6016b9af 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 37f8a46d7e5..5a6aa8255b3 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 d9741c19398..a3e2aebe776 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 058fa6fbb61..30427e54fae 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 bcae6ff67ca..5d701a98c64 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 262f6640d9d..a2d7b1a1c8f 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 11c11b91c77..00823d2874e 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 6afea6ef42e..e210824b4ef 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 66135ad2a9a..44d95951988 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 bafe9ba6b7a..983f98beec3 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 c6de8602d08..56fe171aa75 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 87c7ef6b3f5..923b224e4c1 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 c80a458c125..8720eb87a55 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 9d96710f056..346f745bb07 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 8f595989507..acf7ff16917 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 f918c81f5b6..a1e1915b21f 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 6554c0eb118..8595b20e872 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 ecd4a42df40..350cc68e490 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 c6a14a05546..21f002e3b1a 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 4c0acd627f2..1eb6cd761e2 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 e49d8b34823..5ff11ee0d62 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 3b5eabec775..d338dc5f694 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 a5dc5408205..f6556acca69 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 c8ddc2c1f85..843dd763d5c 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 13429072c79..a42910f6000 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 b879c80cd86..b338a527010 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 670bcb3aaa8..15e727f4a2d 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 aaed5755059..380daf09a15 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 25a6ed40d20..8e8de1cd555 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 b1c7b5453b3..563528ca5e6 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 63cbae0364c..4e30334951a 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 56051b8a4be..61256f4830f 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 44023532e13..8599bc8ca37 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/hash.c b/common/hash.c
index 2cf763575f9..810854ce0f5 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 3002948b6b0..270732278e6 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 0fef0a918da..68d85de6554 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 6563effcf34..387268d975e 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 dea66cf0d4d..99fcf96f063 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 bc2921c552d..b83e3bb54ae 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_nand.c b/common/spl/spl_nand.c
index 5f8a111a2f0..e81279aa1b9 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 30c050c0b3e..a9b6b07ab30 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 b1e79b9ded6..2737dc9bff6 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 ee30f328e60..8ba3d4027a0 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 a136073fdbb..4a8053f0434 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 954e91a0045..80572ceec2d 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 288dbb5fa98..7a374bbfcc3 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 0cb50808827..de6a63bd2d4 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 1af4da87255..f8572780184 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 8500ee8ba5d..414e62176bc 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 c666eb0f29b..94fab4e5e0e 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 2853581b975..6a3ad6a9690 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 0575bd8937f..83dcb402133 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 a6b0d87415f..242d27a34ea 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 1ff405bf5b7..c0e5a02db76 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 07bbcc9b231..966e9c75eb7 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 2fa27c7b6ec..2a66c2e5f9b 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 29067194cb1..1e0db6c8c7a 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 13112d9c1a3..dbb69a0c595 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 4baeeb83f10..ecd6df9e451 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 244beef18dd..27bff27ff7e 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 7fbe2810a29..535f491d495 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 6e0bcae9912..b9fb46815b9 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 f0cd845fea5..14fcad5aadb 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 9926235b52e..32038cea8fa 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 0fd0416b180..386a13ed876 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 8e2a09df366..c17b2e30d7e 100644
--- a/drivers/spi/fsl_qspi.c
+++ b/drivers/spi/fsl_qspi.c
@@ -9,6 +9,7 @@
 #include <malloc.h>
 #include <spi.h>
 #include <asm/io.h>
+#include <linux/libfdt.h>
 #include <linux/sizes.h>
 #include <linux/iopoll.h>
 #include <dm.h>
diff --git a/drivers/thermal/imx_scu_thermal.c b/drivers/thermal/imx_scu_thermal.c
index 7e17377b696..ec908199f86 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 eee84f49bb1..6f749736f18 100644
--- a/include/asm-generic/u-boot.h
+++ b/include/asm-generic/u-boot.h
@@ -23,6 +23,9 @@
 
 #ifndef __ASSEMBLY__
 
+#include <asm/types.h>
+#include <linux/types.h>
+
 typedef struct bd_info {
 	unsigned long	bi_memstart;	/* start of DRAM memory */
 	phys_size_t	bi_memsize;	/* size	 of DRAM memory in bytes */
diff --git a/include/common.h b/include/common.h
index fd3e2de4cce..a87c0628806 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 121b30a3030..affa937da08 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/lib/libfdt/fdt_region.c b/lib/libfdt/fdt_region.c
index 7e9fa9272e8..4af5f77e1b9 100644
--- a/lib/libfdt/fdt_region.c
+++ b/lib/libfdt/fdt_region.c
@@ -5,6 +5,7 @@
  * Written by Simon Glass <sjg@chromium.org>
  */
 
+#include <fdt_support.h>
 #include <linux/libfdt_env.h>
 
 #ifndef USE_HOSTCC
diff --git a/lib/libfdt/fdt_ro.c b/lib/libfdt/fdt_ro.c
index be03aea9eb0..241b60856c1 100644
--- a/lib/libfdt/fdt_ro.c
+++ b/lib/libfdt/fdt_ro.c
@@ -3,6 +3,7 @@
  * libfdt - Flat Device Tree manipulation
  * Copyright (C) 2006 David Gibson, IBM Corporation.
  */
+#include <fdt_support.h>
 #include <linux/libfdt_env.h>
 
 #ifndef USE_HOSTCC
diff --git a/lib/lmb.c b/lib/lmb.c
index 07b9308adf2..2f0e495edf2 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 585eb6ef0cb..118439b1b82 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 63f929fa4bd..bceb2c273c7 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 d0083fd6bee..c8d41a4dca2 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 1b428c3b2fd..133780f5eaa 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.0.292.g33ef6b2f38-goog

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

* [PATCH 09/18] common: Drop image.h from common header
@ 2020-04-07  2:40   ` Simon Glass
  0 siblings, 0 replies; 30+ messages in thread
From: Simon Glass @ 2020-04-07  2:40 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: Tom Rini, Masahiro Yamada, Simon Glass, Alex Marginean,
	Alexander Graf, Alexey Brodkin, Andreas Dannenberg,
	Andreas Geisreiter, Andy Fleming, Angelo Dureghello,
	Ashish Kumar, Biwen Li, Boris Brezillon, Breno Matheus Lima,
	Christoph Muellner, Cristian Ciocaltea, Dirk Eibach,
	Ezequiel Garcia, Fabio Estevam, Florinel Iordache,
	Hamish Guthrie, Hans de Goede, Heinrich Schuchardt, Hou Zhiqiang,
	Ian Ray, Jagan Teki, Joseph Chen, Laurentiu Tudor, Lukas Auer,
	Marek Vasut, Markus Klotzbuecher, Michael Walle, Miquel Raynal,
	NXP i.MX U-Boot Team, Oliver Graute, Patrick Doyle, Peng Fan,
	Philippe Reynes, Prabhakar Kushwaha, Pramod Kumar, Rajesh Bhagat,
	Sam Protsenko, Shawn Guo, Shengzhou Liu, Stefan Roese,
	Stefano Babic, Thirupathaiah Annapureddy, Thomas Chou,
	Wolfgang Denk, Ye Li, mingming lee, u-boot-amlogic,
	uboot-snps-arc

Move this uncommon header out of the common header.

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

 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/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_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                           | 1 +
 drivers/thermal/imx_scu_thermal.c                | 1 +
 include/asm-generic/u-boot.h                     | 3 +++
 include/common.h                                 | 1 -
 include/tee/optee.h                              | 7 +++++--
 lib/libfdt/fdt_region.c                          | 1 +
 lib/libfdt/fdt_ro.c                              | 1 +
 lib/lmb.c                                        | 1 +
 net/tftp.c                                       | 1 +
 test/compression.c                               | 1 +
 test/overlay/cmd_ut_overlay.c                    | 1 +
 tools/imx8image.c                                | 1 +
 171 files changed, 189 insertions(+), 5 deletions(-)

diff --git a/arch/arc/lib/bootm.c b/arch/arc/lib/bootm.c
index 1b08ffe2857..9fa6aaf3b2d 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 8110412da60..e73689ce269 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 4e779dde1db..4ef2a302785 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 2c0ce80c0ca..c0201341ea7 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 36f40a4015d..c7445e647ee 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 37fc727601c..1d2a84a3b04 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 699bf44e702..9cf4a67406e 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 49305299b39..477ea94997d 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 31e95a9a288..6744fbda46d 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 aed3e14164e..041b6ea180a 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 dd7c998487f..256b0526f22 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 824cf6f8e33..0478c15f3fc 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 b7de9ba099d..58995d73ac8 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 6dbb9bde483..17066bcf8bc 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 dafa142824c..3a511941080 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 48ab0e60c63..fb4ae3d32d4 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 a3997b25901..612942025bc 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 96ba90fb7a7..d617c7d9b01 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 <asm/io.h>
diff --git a/arch/arm/mach-zynqmp/spl.c b/arch/arm/mach-zynqmp/spl.c
index 896657f51c3..1c304f1af3a 100644
--- a/arch/arm/mach-zynqmp/spl.c
+++ b/arch/arm/mach-zynqmp/spl.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <debug_uart.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 fb1170d00d7..c36ee79c923 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 f7303b790fc..592ac97f827 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 9be9d18ac85..8a65912ceaf 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 015840de256..26fcfc842c2 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 7d39320c150..f086f34729f 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 e1891617c76..bec18fe28f6 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 fbf32b9a07a..73105fa8e48 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 1cef75c4bef..8aec8c9fd3b 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 7357d3b07d6..91b7f1624e9 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 d38c3164c12..d1d460b84a4 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 2896e45f0df..5f14a04ab41 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 a555e6c0d38..1cf7cebff52 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 90baec2a175..e34529bd98a 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 34804b53cca..f9dcf32d733 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 920d43ecc69..da5bc5b1f12 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 dfa1fd4f153..240e8041379 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 3f31a8f9c3d..6863da82d6e 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 70671039c28..5095cf65d13 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 33ce7e8ff11..cb2f6da76f6 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 <dm/device-internal.h>
 #include <asm/arch/clock.h>
diff --git a/board/emulation/qemu-riscv/qemu-riscv.c b/board/emulation/qemu-riscv/qemu-riscv.c
index cbce5ffe6e3..c40f8388bc6 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 a9820a9028e..6359fb32234 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 e7f684bfb3a..037a8beb64d 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 30e7a1f7ed9..871d066d681 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 89742dfedb8..6870674f7a4 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 17292936b76..74502c6d18e 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 66eea32e077..f0c7bed68f0 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 b1989bcbc23..5892bbd62ca 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 5d17f397cb6..d067489df72 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 7aed14c52b6..95e02e9b262 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 0b20668e2b3..c3b523d55e8 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 e442510f44d..eafadc691b3 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 cb4006eb2a4..c5c07089a2c 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 cb4006eb2a4..c5c07089a2c 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 3f7c35b5c95..09a692be1dc 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 6ffd4aec3e4..f3b1dcd306d 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 6500649d7b9..8b86e44c902 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 aeb989a638b..21fb559250c 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 b7e0eeded52..13cfe159ae1 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 33da3914d3e..829e42f6771 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 d46dcd4b8a7..8d24af0a99e 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 ea9d04e4b99..ef8b4916100 100644
--- a/board/freescale/p1010rdb/p1010rdb.c
+++ b/board/freescale/p1010rdb/p1010rdb.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/p1022ds/p1022ds.c b/board/freescale/p1022ds/p1022ds.c
index 33edff9727d..244a053d7a4 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 5321e26a9cf..13df3e86379 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 eb51ee9fd93..1c0b85a1fbd 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
@@ -8,6 +8,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 6d0e1b1ffa0..8e1522a6045 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 95ed0ef429e..076e63a3573 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 1820419511b..4a3be4c5690 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 e42337e47a4..8c5da0bfdff 100644
--- a/board/freescale/t102xqds/t102xqds.c
+++ b/board/freescale/t102xqds/t102xqds.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/t102xrdb/eth_t102xrdb.c b/board/freescale/t102xrdb/eth_t102xrdb.c
index d40b5901080..dbf25a237d1 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 eee09a57019..601c2ecadfa 100644
--- a/board/freescale/t102xrdb/t102xrdb.c
+++ b/board/freescale/t102xrdb/t102xrdb.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/t1040qds/eth.c b/board/freescale/t1040qds/eth.c
index 3f10e420a01..b349b77951b 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 92dd9237ec7..d29218d2915 100644
--- a/board/freescale/t1040qds/t1040qds.c
+++ b/board/freescale/t1040qds/t1040qds.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/t104xrdb/t104xrdb.c b/board/freescale/t104xrdb/t104xrdb.c
index dc3b59d26f9..a156d2ee09a 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 e178d7f2927..2151ede7f91 100644
--- a/board/freescale/t208xqds/eth_t208xqds.c
+++ b/board/freescale/t208xqds/eth_t208xqds.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>
@@ -27,6 +28,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 79cc1543f95..737c6a2c5a4 100644
--- a/board/freescale/t208xqds/t208xqds.c
+++ b/board/freescale/t208xqds/t208xqds.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/t208xrdb/eth_t208xrdb.c b/board/freescale/t208xrdb/eth_t208xrdb.c
index 669bc1efefb..db4718128dc 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 b5c20112d0e..24f0d0764ce 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 d93d75950cb..8a9f631e8da 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 104b40a1109..8f2032acc7b 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 5608774afd1..1d449afb2a3 100644
--- a/board/freescale/t4qds/t4240qds.c
+++ b/board/freescale/t4qds/t4240qds.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/t4rdb/eth.c b/board/freescale/t4rdb/eth.c
index 3321ce1ea1c..4c896c8a90d 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 8015666eccd..d801f2c7a1b 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 6c818643192..1443ef91ef4 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 14e3e25c18d..b39b0b60022 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 69cd0a1bc76..6f7f752a8dc 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 f7f2e2c5259..ffde1161d0b 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 0a6cf1fd29a..21afbc7f39a 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 85ca777c1d2..a362d25c01a 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 765463e3707..0f5eab79b57 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 08d2b56d54b..8ed8e032956 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 1a9c05275f8..95c90640668 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 067907ba52c..b240c7649ce 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 e614058d10f..acc26157c77 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 ad227a41693..5fbd8fc6cde 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 6c6dbf2bfff..ed1aea55cc2 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 71891f6fe38..d0e6016b9af 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 37f8a46d7e5..5a6aa8255b3 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 d9741c19398..a3e2aebe776 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 058fa6fbb61..30427e54fae 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 bcae6ff67ca..5d701a98c64 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 262f6640d9d..a2d7b1a1c8f 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 11c11b91c77..00823d2874e 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 6afea6ef42e..e210824b4ef 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 66135ad2a9a..44d95951988 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 bafe9ba6b7a..983f98beec3 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 c6de8602d08..56fe171aa75 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 87c7ef6b3f5..923b224e4c1 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 c80a458c125..8720eb87a55 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 9d96710f056..346f745bb07 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 8f595989507..acf7ff16917 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 f918c81f5b6..a1e1915b21f 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 6554c0eb118..8595b20e872 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 ecd4a42df40..350cc68e490 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 c6a14a05546..21f002e3b1a 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 4c0acd627f2..1eb6cd761e2 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 e49d8b34823..5ff11ee0d62 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 3b5eabec775..d338dc5f694 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 a5dc5408205..f6556acca69 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 c8ddc2c1f85..843dd763d5c 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 13429072c79..a42910f6000 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 b879c80cd86..b338a527010 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 670bcb3aaa8..15e727f4a2d 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 aaed5755059..380daf09a15 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 25a6ed40d20..8e8de1cd555 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 b1c7b5453b3..563528ca5e6 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 63cbae0364c..4e30334951a 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 56051b8a4be..61256f4830f 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 44023532e13..8599bc8ca37 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/hash.c b/common/hash.c
index 2cf763575f9..810854ce0f5 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 3002948b6b0..270732278e6 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 0fef0a918da..68d85de6554 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 6563effcf34..387268d975e 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 dea66cf0d4d..99fcf96f063 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 bc2921c552d..b83e3bb54ae 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_nand.c b/common/spl/spl_nand.c
index 5f8a111a2f0..e81279aa1b9 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 30c050c0b3e..a9b6b07ab30 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 b1e79b9ded6..2737dc9bff6 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 ee30f328e60..8ba3d4027a0 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 a136073fdbb..4a8053f0434 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 954e91a0045..80572ceec2d 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 288dbb5fa98..7a374bbfcc3 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 0cb50808827..de6a63bd2d4 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 1af4da87255..f8572780184 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 8500ee8ba5d..414e62176bc 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 c666eb0f29b..94fab4e5e0e 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 2853581b975..6a3ad6a9690 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 0575bd8937f..83dcb402133 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 a6b0d87415f..242d27a34ea 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 1ff405bf5b7..c0e5a02db76 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 07bbcc9b231..966e9c75eb7 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 2fa27c7b6ec..2a66c2e5f9b 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 29067194cb1..1e0db6c8c7a 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 13112d9c1a3..dbb69a0c595 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 4baeeb83f10..ecd6df9e451 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 244beef18dd..27bff27ff7e 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 7fbe2810a29..535f491d495 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 6e0bcae9912..b9fb46815b9 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 f0cd845fea5..14fcad5aadb 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 9926235b52e..32038cea8fa 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 0fd0416b180..386a13ed876 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 8e2a09df366..c17b2e30d7e 100644
--- a/drivers/spi/fsl_qspi.c
+++ b/drivers/spi/fsl_qspi.c
@@ -9,6 +9,7 @@
 #include <malloc.h>
 #include <spi.h>
 #include <asm/io.h>
+#include <linux/libfdt.h>
 #include <linux/sizes.h>
 #include <linux/iopoll.h>
 #include <dm.h>
diff --git a/drivers/thermal/imx_scu_thermal.c b/drivers/thermal/imx_scu_thermal.c
index 7e17377b696..ec908199f86 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 eee84f49bb1..6f749736f18 100644
--- a/include/asm-generic/u-boot.h
+++ b/include/asm-generic/u-boot.h
@@ -23,6 +23,9 @@
 
 #ifndef __ASSEMBLY__
 
+#include <asm/types.h>
+#include <linux/types.h>
+
 typedef struct bd_info {
 	unsigned long	bi_memstart;	/* start of DRAM memory */
 	phys_size_t	bi_memsize;	/* size	 of DRAM memory in bytes */
diff --git a/include/common.h b/include/common.h
index fd3e2de4cce..a87c0628806 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 121b30a3030..affa937da08 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/lib/libfdt/fdt_region.c b/lib/libfdt/fdt_region.c
index 7e9fa9272e8..4af5f77e1b9 100644
--- a/lib/libfdt/fdt_region.c
+++ b/lib/libfdt/fdt_region.c
@@ -5,6 +5,7 @@
  * Written by Simon Glass <sjg@chromium.org>
  */
 
+#include <fdt_support.h>
 #include <linux/libfdt_env.h>
 
 #ifndef USE_HOSTCC
diff --git a/lib/libfdt/fdt_ro.c b/lib/libfdt/fdt_ro.c
index be03aea9eb0..241b60856c1 100644
--- a/lib/libfdt/fdt_ro.c
+++ b/lib/libfdt/fdt_ro.c
@@ -3,6 +3,7 @@
  * libfdt - Flat Device Tree manipulation
  * Copyright (C) 2006 David Gibson, IBM Corporation.
  */
+#include <fdt_support.h>
 #include <linux/libfdt_env.h>
 
 #ifndef USE_HOSTCC
diff --git a/lib/lmb.c b/lib/lmb.c
index 07b9308adf2..2f0e495edf2 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 585eb6ef0cb..118439b1b82 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 63f929fa4bd..bceb2c273c7 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 d0083fd6bee..c8d41a4dca2 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 1b428c3b2fd..133780f5eaa 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.0.292.g33ef6b2f38-goog


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

* [PATCH 10/18] common: Drop init.h from common header
  2020-04-07  2:40 ` Simon Glass
                   ` (9 preceding siblings ...)
  (?)
@ 2020-04-07  2:40 ` Simon Glass
  -1 siblings, 0 replies; 30+ messages in thread
From: Simon Glass @ 2020-04-07  2:40 UTC (permalink / raw)
  To: u-boot

Move this uncommon header out of the common header.

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

 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/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-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-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/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/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/ucRobotics/bubblegum_96/bubblegum_96.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 +
 530 files changed, 530 insertions(+), 2 deletions(-)

diff --git a/arch/arc/lib/cpu.c b/arch/arc/lib/cpu.c
index 83246550ec1..f032f3e2f2a 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 c853f25d34a..023eae19075 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 3f6af6f5a36..a3d4f147962 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 3d07ee68094..a913860491c 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 c78f2cbfc93..4c45810fbe3 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 c1cdf35fb25..cb351ecf769 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 4829c996be8..0ee60342200 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 0c81de7e36a..96726b3144e 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 f4e1f0db094..da0615faf15 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 f4962ec45f9..b9941fcb2f2 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 2bc3513abfa..ee15a9453d9 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 3a896d10ca5..46b7b46659c 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 ef8d2d202d5..8f6cd4dc19b 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 04698fe5639..7e2698b6055 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 f51f0df8ec7..193588ea10b 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 f65053c4b65..72988417ac8 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 9168b91f27a..83dd8b625e4 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 226401dd6e2..b6fdc88be7e 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 51c4a730f40..f5192240e4d 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 a919a455eb0..7b14ba05b46 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 28c09e9fd67..9db1c74b369 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 2eb571050a3..871629c2333 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 668b5e11a68..5c109764e9e 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 c544f38641b..e9464ee7e47 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 a5f4e31ac70..46ade4ae86d 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 5f4076d6b70..7790f087a09 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 e54cfb06dcb..d2b5b4d3fcd 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 695bdd7a5cc..5adccab012a 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 6bda5fbbb66..4f6a66d8039 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 c1ba69893fe..da43e34394c 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 f858de953d4..229e9e959e4 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 5c310d306d0..dbe1b619772 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 c0201341ea7..ec40df41f60 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 f910b6ed72c..5394a6697e9 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 98f526e2523..bc07dae318b 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 5379e13e2b2..0d9542f998e 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 ecf85d2f14b..ea91d8aaec2 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 169fed808ba..8e9d610441e 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 8a24e34f620..5d5437cbbc2 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 c89a219dd26..96a248c0a90 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 e7edd544e2e..20594e0efbe 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 42d0d2269f5..44c079c0fdd 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 3aef9538b4a..1e014ad9c92 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 e9b4e06595e..761edb6df58 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 31ad0bf7026..42ef349966b 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 4474a967437..a8f4356ce94 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 15c036cc27e..a6346c01b28 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 822f877de71..b78cafdd9cb 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 6ee0e1c24cf..f40bc531d4f 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 9966d6c8336..f4d00d892dc 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 9fd6564d044..40dd44af67e 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 822e0dc4a1b..07bf19b5e42 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 d44e840aa0e..5fea935d6e4 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 9846463c606..ebe985f795e 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 ecd01051211..97d6ca8fc2a 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 8b2c5c79c03..d9672e79efc 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 cd08ff444d2..2423a0e3785 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 5444b07c88e..0dd97c93a8e 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 7fcbd53f302..9cd32d14f07 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 e1eea230352..8d5fae9a976 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 4aafeed1881..60e688c5184 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 87dbdf3011e..beabb541173 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 5a292c39643..db1c2c1e01c 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 5fe5c51f6a6..fa1941aec42 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 d0b10e58ad3..4d67333306f 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 041b6ea180a..8502d234080 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 0994522f6c3..8cfe1cf2b75 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 59fd029e4c9..d947d40eac8 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 7441052a553..1d79927ac74 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 c56620dc5a7..d328fee8bd5 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 5e5f3f08425..c329e7cc98a 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 a7153781279..7f6ce80f37b 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 ba91a6eaa68..098892802bb 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 4e6b710c11a..96802519418 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 b038437a174..13be3912211 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 c46cc5fcaf4..531a403da1b 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 37f1f219b2d..927175c5a31 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 4b88afa9b7b..bfae0c36ea1 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/cpu.c b/arch/arm/mach-mvebu/cpu.c
index fb241c7e4dd..ab8b02956b2 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 a99bf166fd8..193e7be6a4b 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 2f6b4d1702f..50b78cb07b0 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 39423051088..15b6b35ae7c 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 8c61547ee9c..862c5e0905b 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 17b46619b57..338f6afcae3 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 9aff83e9dfd..f968a26d640 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 772b4c4db5d..7a7086776ee 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 60de0d60521..b893fb732e0 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 a8bd428e0c4..4cfa1323881 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 861d01d6dfe..1d65ed62270 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 dbb68f718d6..7752dd15656 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 7d57dd257fe..d9abcacbb4a 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 077eb63e74e..a64d5721120 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-rmobile/board.c b/arch/arm/mach-rmobile/board.c
index 8a2d3ce621d..a10371f74e0 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 9b34cba0475..fdbbd72e285 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 9fcab446a5d..f88ccfde9ff 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 4b0e99299a0..08b7d3519de 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 8c8976f61cd..085e6506201 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 5014ee83d74..6fcef63c1b0 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 fbc89b66c47..6eb89e15b81 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 e0a6e4b0259..e9e020ff3f5 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 c39cbb8111a..3874716e529 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 ee176de80b0..740bd2ba077 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 e52466fb6fb..dca9de28d47 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 562117e6c13..ad4ac62e514 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 edf59947094..35a5c797282 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 8c81242e5d4..7c85b2663c8 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 20ae7977947..bcc230c9006 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 3a511941080..aaa7246393b 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 fb4ae3d32d4..6c1d0aa9694 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 a2b8d31cbd7..2de4e980e46 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 7c8c05cc319..340abf9305c 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 dbb10ecb681..0a6025fffac 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 0158f4f04c4..557305c7036 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 d56349b7f3e..bf978053ca6 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 21eb934e565..39acc8cfdb0 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 a3f5b4364e5..a87dd441813 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 b10be332680..d2e2db5f980 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 ecc1a35c497..808f7443346 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 a01e2a5cb9f..8df24689192 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 d89151d9024..46abdc95a80 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 f1c0262ae57..a58f1cf9d3a 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 57237892c34..3ad98bdb251 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 41338a1a339..1f12da401c1 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 d231ac94ddd..a0ee06203a0 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 7688b3e315e..f4cc609d2dc 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 ca4231cd0df..7c1f22d67b2 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 11b333b563d..32e36642658 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 ae4745bfecc..875e5a1a8a8 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 9375db76a1e..411a6123933 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 f473230bb5a..8e781267c51 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 9f00fefb77c..221f92869c2 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 5da01922bfa..179acc7e6fe 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 2c43b3ceba0..2febb236547 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 77cc60623ea..58ce05db6dd 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 85e7a1874e1..ea5fe108eb1 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 4416827220e..7cfbb6270fd 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 5dc998a52b2..5ad586ac17f 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 ad09cc52eb7..8d662c23d02 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 70916ea3c18..f02f8b05324 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 8f1bb4f069d..4e607816a7a 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 492f4d8c11c..ed0ad2ee8bd 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 dd1193be14e..ea17d145366 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 20f5ff33982..ab05b8a51b2 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 899b5391046..b3c907b5089 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 6a7b203a44d..1ede50771e8 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 5392ffa6035..b013571f36c 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 5f9d90fe6dc..1127373b20f 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 9184714e475..b1e34796d0d 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 4c41ce88164..682de9b8a15 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 b578f6538ab..1ace117fc8e 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 43c5ca39d47..77b7cb13071 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 d617c7d9b01..f41ae41b9e6 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 <asm/io.h>
diff --git a/arch/arm/mach-zynq/timer.c b/arch/arm/mach-zynq/timer.c
index d822e20d2b2..cc0e24cbfed 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 aa5de863eb6..b3402d71895 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 db2b4a8be2e..5067b339c21 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 5b98fe22bcd..24f57040224 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 34534d876bc..1590d4a9543 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 7cde4c6105e..4ab13b4d8ea 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 8c808a6b0ce..225bdc2d257 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 8c6e12d5482..87effa71dc3 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 5eee856392f..1f70d90f0b2 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 f39fe19baf2..9d4a10f028d 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 a76deebc68a..bef9047b358 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 166720aef57..83529408eb3 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 32c477a5fd4..52b64a94a71 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 bd130c1b0c0..1311f3967c9 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 16023690803..cb1514c6005 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 6ee23f0db28..9deab51d07e 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 51281549a35..2a64c7b6f65 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 8779384c0ab..8e42b631412 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 885659e342e..c4988f9031c 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 bde1f4c2289..eab6e2088e9 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 805eac7fa3f..e07fc628d16 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 a403ff729b1..682bee6be2c 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 99fd0569051..4d1d98c3ada 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 9afc6726023..31e87d62060 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 87ced7c5d50..764ce892318 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 65afefe53e1..3049a63d577 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 b32a2f56438..340e35e6fcc 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 ac75d51da5f..e33ec8ab867 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 c43f7a585bf..ee2a6d49938 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-pic32/cpu.c b/arch/mips/mach-pic32/cpu.c
index 8075d93d411..1d8c3971441 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 f2e362102e6..c59585692d5 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 37ffa8f4a43..9008db6aa51 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 665ac378c89..a183ed63430 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 e455d8baf58..d3167f6cb9d 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 9f9eed165bc..eff0d5d7e20 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 89add62dc1b..34752a34af5 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 8bd6d0fbcfd..c8d06b0508d 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 bb81f49ae73..da0a80e6fc1 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 afcb75ba17a..29489b46e6c 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 9a956c221dd..5840fe63490 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 e1494fa1292..58931f0e6e2 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 e457f6acbf1..1cebb0322ef 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 ae07bbe40a7..6250a8147b0 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 d5f683bbaae..b92db85c229 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 b6ff5c3d647..c6a2bbe4689 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 51e1cc1181c..d09f782f5f0 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 d82c1d2feb3..ef7c6073cc7 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 8a39c3128e0..b2b523995f7 100644
--- a/arch/x86/cpu/apollolake/cpu_spl.c
+++ b/arch/x86/cpu/apollolake/cpu_spl.c
@@ -9,6 +9,7 @@
 #include <acpi_s3.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/braswell/braswell.c b/arch/x86/cpu/braswell/braswell.c
index 7a83b060058..3345049993d 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 55a7439f1c1..793167937cf 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 2aa6f245e7d..17ff43b58ec 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 895edeb4bc4..3d42b1caac4 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 f016489185a..b944896e75d 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 0c4c6348d1d..bf43bfc432e 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 13077411dc0..10677ecbc2c 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 b7bb524162f..e4157c5734c 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 8f30cdbe247..0639b5cf029 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 8d10fd6c549..eb3f362e4e9 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 c55213ca2d2..54e6acf2621 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 716351ad7ff..044a429c13f 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 46c6d00eb4d..e2e2d9fe33d 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 66737e655bb..782ed863fe7 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 21dcfb2142e..889fba54730 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 43bee1fb704..1e2f6cc8b70 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 90925e46ea2..ba367f81bc8 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 5eff0f99aad..103a41a5d79 100644
--- a/arch/x86/lib/fsp/fsp_common.c
+++ b/arch/x86/lib/fsp/fsp_common.c
@@ -8,6 +8,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <errno.h>
+#include <init.h>
 #include <rtc.h>
 #include <asm/cmos_layout.h>
 #include <asm/early_cmos.h>
diff --git a/arch/x86/lib/fsp1/fsp_common.c b/arch/x86/lib/fsp1/fsp_common.c
index aee2a05044f..37706b79760 100644
--- a/arch/x86/lib/fsp1/fsp_common.c
+++ b/arch/x86/lib/fsp1/fsp_common.c
@@ -7,6 +7,7 @@
 #include <acpi_s3.h>
 #include <dm.h>
 #include <errno.h>
+#include <init.h>
 #include <malloc.h>
 #include <rtc.h>
 #include <asm/cmos_layout.h>
diff --git a/arch/x86/lib/fsp1/fsp_dram.c b/arch/x86/lib/fsp1/fsp_dram.c
index 5ef89744b94..e3f9e30f6a6 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 90a238a2245..b74e6f18ec4 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 <acpi_s3.h>
 #include <handoff.h>
+#include <init.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
 #include <asm/fsp/fsp_support.h>
diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c
index e34529bd98a..f20c28b4826 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 f9dcf32d733..ac265b67449 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 6f4b88f88e1..85d3464607d 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 c91d2f9494d..f156b552a76 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 50305656e8e..8b97e1a533f 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 b7ae58c6454..f9bf5277397 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 c4e506ff3b7..c1406d7489c 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 729516d9e1d..a6f1167e390 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 3e975801b8d..ba0a944b9a0 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 372beb3c432..f225f467bf5 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 f3df7e666b5..53a80c949bc 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 e7808f5a5c0..cb653578446 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 cae428ffd06..1153b188e7e 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 887dd1ed74d..7d188c32795 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 fc2bc85f006..10236bd07f2 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 71bee76bdce..f3981c66d20 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 bef4e1767c8..29bd6a9a406 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 ae9202895d5..d9b5b213fea 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 6c6106c23c5..6311ed3b2e5 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 0ff8a9053e7..85dd10e55a2 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 fd2f0df371a..de1ec544667 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 99462052f04..3a027d083a7 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 f2031ef3bbb..c4cd95cd809 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 d23e97c9b91..deb530fe78f 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 bb7913025d7..772e21b9c51 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 6863da82d6e..21ebd5dddb6 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 8f4c587371d..8499fc541fa 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 1f3f293bd91..b96cf0b59c7 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 889ce70d758..5c9124fbb4a 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 e0fa8067c1c..58bce53e233 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 9034c4fbfff..fb1828ff44d 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 d7f7ebd962a..8f1bf8bfda4 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 cdac64ed928..597bb71cbf7 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 6ac5aadecfe..fbc49e95651 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 ae9b888c12f..62e6fa3d199 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 79b867996b4..7e2f0cdae32 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 07a6a47ebc1..70fe3559f62 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 5c24276d510..3c44fba5161 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 4df7ff437e0..373235d77a9 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 95bbdedbddc..47a51710dc9 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 5095cf65d13..3a59b51c1c7 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 21156a4ca94..888434a6f8e 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 91a86b00a47..31d810d7dcb 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 2ea66b9b155..cc6d5d7a05e 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 5cc52139a77..2666b0b3cd5 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 dd7863f7acc..db0da0ca2f7 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 a3a822f65a1..7fbd6f2c5d3 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 ec6de460c12..253a64d28eb 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 263371a2b27..8c91b752ffe 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 2599db7bf77..be8eefb3657 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 32ebaf42317..fd2a229bf74 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 <miiphy.h>
 #include <panel.h>
 #include <power/tps65217.h>
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c
index 4d40cb8ff5f..8e29fd0095c 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 db82cd570d6..9feaee3c0fc 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 a5fbc1d297c..90af6b88bd4 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 2e547f51708..1bd723d49ed 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 6ad7e31092b..b7d37b70044 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 620e4d1de0c..ece37800bfb 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 56a2c29e4c7..6afb6bbdb5c 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 90f655ab2e7..38bda8d1847 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 b64ec95e313..0318bf18cfc 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 835c3279be2..433e0de8a3a 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 b52358baacd..b714712f2a5 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 cec819b36fb..30974e8d920 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 b4fa01f3688..427151c8dfb 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 66781ef3161..4a32893a794 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 dfdc683683d..a0f3dada42c 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 d9019de6e00..a3b0f8bf092 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 608a7f28eb0..adb56c6c871 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 f2c3ac3e281..fd6099c5669 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 6fc1631bf72..a9b8a321082 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 c5a1cc95e4a..5d8f62244b0 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 4e187330014..ee5d4b41f28 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 6359fb32234..62b06783c9a 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 de9f5f5f8bc..c6cd3f42929 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 871d066d681..75c2aec75d3 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 6f151b0f717..7c301c8545e 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 9c8731ce780..073f3ac7043 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 c5fd940eeb7..0e249f1bc8d 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 d067489df72..77b768aef03 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 4f33c0e7c9e..8bd54ea2aa6 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 95e02e9b262..4795e2a4e3d 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 f004af681b9..aa5100f5bf6 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 c3b523d55e8..cc600fd693b 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 eafadc691b3..552a25c2a9a 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 c5c07089a2c..38a981cf8b2 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 c5c07089a2c..38a981cf8b2 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 bda03b5ea50..b6a0d2567e5 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 8260e7f7974..f63377fdd68 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 e41f7e41bba..24978314a17 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 8633268ed73..fc929c441c2 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 d3e2e533217..d854b511557 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 fb4101b80f9..bbbf108e2f0 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 2d4b18cdbcb..032207af8ad 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 9bc78d6543d..c3d6c1db737 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 8c0abb63a9d..a1727ffd9d3 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 cabd7ee648c..3d68b5ef2c1 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 cc6bd883c3d..6d699aecc56 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 0bd397a0beb..334ba7350c4 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 f144bf6b37b..95e99eabd71 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 4034bdee284..5f95f3c301b 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 282aaf47fb8..f30e652d350 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 4b20bb440f7..e592e4d3897 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 87368564afa..31974217816 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 065e3e71f57..251be667d46 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 c8e30a09478..5874e1a924a 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 2f0f29a0e57..13bfc1e5f15 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 0996b87c0fc..5451437f37f 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 a2e284f1a22..5d78fea3368 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 6f4d34b9ed3..6cfff049663 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 e5fa4ae7659..4272bacf5e6 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 d01127eccc1..ea7a56369d6 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 be551bc3753..c11eee51b61 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 3866020a6d3..5c08ecbb968 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 38fc30553cd..7dd00bda384 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 c939514a5fc..15942858601 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 8bcd2fb5a7a..a30a0738dc3 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 998a2a5d3f5..c3a60d6087b 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 043f0b5b841..2ab6e62c5af 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 2b1d768f1b5..c9639e91701 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 2b1b28da885..ae365652c2f 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 a2a56540b5f..5a97a849480 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 0b16982f06a..78316ffe84d 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 08656b4e309..5a6d0eb69b9 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 787de6d7ad0..3b67186cc22 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 1443ef91ef4..2ef213ce0f9 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 80fec5f9cf3..3ccd65271e3 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 b6b4f19d84d..7dfbc3ac867 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 6b9c34818b3..4a847edd89e 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 cbb1cd0f8f1..7b6fd5c737a 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 2a6a449306d..ebb5a560c3a 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 ffde1161d0b..063831dfe87 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 84400090b30..2a50b8458a4 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 0ed62c7d84d..89a922fb822 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 46ec1e8d9c2..1b8a47d2549 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 170ea12c937..66c64f8056a 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 86645155e64..0b68bbde50f 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 7aadd9e4772..ce11eae59d5 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 57dce4185d6..55095deeadd 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 e5fc9397934..e486f9d7d95 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 fc7847bd1d6..79c794bfc89 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 0ad601f39b6..887ec6a66bb 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 25a5e4b9ba2..01c8691f312 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 ee2e3d6b9aa..bea9451aecf 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 c6117b33bcf..7bc66af1934 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 f8134b70421..97b152664a2 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 fa099e95f54..51b669a891b 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 b4205d6ed4c..2825eccc035 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 a362d25c01a..b979ddd2965 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 0f5eab79b57..fc3ebaf145e 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 8ed8e032956..f40e814f86a 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 95c90640668..41fa21292e7 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 6ed3a9b8475..b25b02b6418 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 7438d379237..53dc9762f87 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 395904f8c87..3c6422214f7 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 b9296bede24..912b9932406 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 2ac7c6cd18d..72284a26898 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 0ef243186d4..8381361ec36 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 aa8aab39cec..e7337deea7f 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 d1d1f40092d..4b67a4ba2dd 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 6840a21001c..d9c0200f24d 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 71ca79deab7..92b5c20b51b 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 5fb4d43997d..b13e7ce3b18 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 f1d7cb8c93a..cfe33d3072e 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 f7da1a95ea9..7a54719e879 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 a9aae7951d9..bb310d9e681 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 b5e080c0723..48cb2e267cf 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 e561c822531..6f1ada82c46 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 91d13bdea41..7dceebdeaeb 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 3f602357713..d79084614f1 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 00afff3abfa..70870797bbf 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 24acdcb2e6f..60a2e19143d 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 8ee26ababaa..ac65054136c 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 30cd56563b9..1064705d262 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 b3e0830843b..cf22ed5627f 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 3134415d804..c1ade5ce43a 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 e8aae4cb816..db1b0adc382 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 3ffd9ad75d1..f8bdb4d48a3 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 a6d7cb48a24..de487ff4b77 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 dbb210584d5..a9c289447e5 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 892f7e72609..400c166b90b 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 6505beda812..91afcdd85a8 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 2f9364c484e..5f37a19600d 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 cf06a173e49..6228f22e010 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 81d7f8eafab..d164a36361f 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 eb6ee6f6a4c..aec947ab5ac 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 42a67581488..b1b2ceb607b 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 ba904609ae7..b92e01ca984 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 e09d3d0a634..67ac85d580d 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 b3530d7ce74..a321678e1b8 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 9ac95159258..1a5877bf156 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 d7db361b12f..ceaf164e780 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 097710b4791..acff2e3b391 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 026220d9e24..5b1f03cf7d5 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 5a6aa8255b3..b9e8cb4ce77 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 a3e2aebe776..2b21a29de15 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 30427e54fae..97d9ed753b2 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 9bc2c55986c..73a53c1e5ac 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 e7cbd757764..db88f0ddb67 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 a2c397f9358..9859977c77a 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 0a0ff5ff76d..594070a9bfb 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 8d01efce56c..a10752de1cf 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 5d701a98c64..d7814af11b1 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 b9049abcc7e..7909ef5c183 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 5d622c3737a..c57913828d7 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 623e4abc218..a900ad1476c 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 c2c9b9c7e7b..ae965a80a53 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 9051392cd09..2c05ebb1bd5 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 422f25c2e91..d2c5f807ad5 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 d3d3d50c2c6..492530ec4e9 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 00fd4b96581..b4eae7f027c 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 47fe86ccc03..8435bd3863b 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 24429d28373..f1bca4b27f6 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 47a20902517..e9d1cf9a4b6 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 08eafefb91e..e3c9d9e7552 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 48e7ff24798..e5f6e90e0c0 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 84644a85c7b..c51f3e4f924 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 f3483a7aed0..a3c8042e14e 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 c9e32e39603..83663c7e4d3 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 35bf497156d..b1147f2e1a7 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 500dc5fe3a6..5b0744ff6ba 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 8ab2fa5d59a..1570d110bfd 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 70d23d90f4c..d9bcb39bea6 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 fbcb87092b2..d5a9f1386eb 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 8cf6f187551..f7834c08fc2 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 7d4409b51e9..e8bbee4ee5e 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 e3fa243267b..a5f4f8b7434 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 4bd88f85a62..b4a1d4c5dff 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 c09ed8cff82..d98e6064269 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 36aa8f6ae55..05b63e415be 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 f384f707f67..00e5cc36414 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 b4fd1833949..d32517f998a 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 146bbc26d6a..eac30368f7d 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 983f98beec3..fe3c584662f 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 4294f3ed54d..e4ca83a5ff0 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 69db77412c5..a651a00c1a5 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 b604ee951b4..8ce36377317 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 f9cc2e8f102..2a63e84ec39 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 7ff47669471..7e7effe56e1 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 5d4e57ffc5c..888aa5b9caf 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 439b023da82..9139ad87d40 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 7161c934cd4..d6d21bae1f4 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 350cc68e490..39abb24e156 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 1eb6cd761e2..12c4649c3c4 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 5ff11ee0d62..f759ee36466 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 0d19ad018a2..fab48a70ef7 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 b1e51bc4310..c9413af3501 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 97da5ccf0da..a5b35040453 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 7f82e71228f..8ed80d2f462 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 e895a216fe9..590c15676a9 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 b037d725c3a..cbb219931d1 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 bc98858ae02..81329a61318 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 df9bc8e7075..b750d66aaeb 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 93693712a9d..d9b09ae461f 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 e0b27e92f8e..6cecbe5e281 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 b6b00e3860d..d21ff544f4b 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 e9441a7979d..e8de923f3e1 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 f6556acca69..17da1e9f55c 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 16b9fa1ec18..b5ac85b37ea 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/io.h>
 #include <miiphy.h>
diff --git a/board/tplink/wdr4300/wdr4300.c b/board/tplink/wdr4300/wdr4300.c
index 4dacaa4285c..7e7339553bc 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/ucRobotics/bubblegum_96/bubblegum_96.c b/board/ucRobotics/bubblegum_96/bubblegum_96.c
index d680a82bda7..033d12a94d0 100644
--- a/board/ucRobotics/bubblegum_96/bubblegum_96.c
+++ b/board/ucRobotics/bubblegum_96/bubblegum_96.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/board/udoo/udoo_spl.c b/board/udoo/udoo_spl.c
index 1a3b136529e..09fc23a9015 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 0f00506d7aa..a4f449d2e25 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 798523d0d09..1b06a660600 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 cac00e0467c..54d15accbd4 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 250043a26d9..816b9cb6fc6 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 43575bc302d..053b07a0b70 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 1c45ee7196f..5c5a2e93863 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 82a3feee69f..3f71e3da446 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 0043471fc73..b2174e2a9ca 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 8b768f31088..b5f293ba7fd 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 a392bece62c..a6db087f960 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 4c4f0ced535..8c8a5eac057 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 c421090c87a..4acf91e623c 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 d5b6c40e59e..8408ef09b69 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 fd8c821e48b..7e478319062 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 fc047473f5b..613c8360495 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 049f202e03a..d1dec582959 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 c06fba92f84..1a69b0328a3 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 0aa6aedae7e..794ff55378d 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 d3ce141eeff..1637e329df8 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 0917871d49b..f7e55568053 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 036cf0b4a1e..16cdfe3978a 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 8fff818e42f..1766ba48023 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 ab5e49941f3..c4eeb9b67cb 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 e2882e3b634..1467c7ef975 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 736befdc3b5..f5eb7027232 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 55f4800781c..62f213d122c 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 504eb65c271..04838200a8d 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 ec6acbb138d..0d6750beb74 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 b010a6300cb..c11c691b864 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 ac15e94f008..6e20432f318 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 729255493af..ac7d96540f8 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 9b5eb38eccd..4f3ed739fbb 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 223f048161e..0b11b48697c 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 9f6f5551471..23fd7956a7e 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 8329f4a352f..36e0d2e8404 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 d69ef01d080..7b95c954a6c 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 2d03333b1b6..2e06b526e28 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 4837b0645b6..f4942a5500c 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 0cbdc279a56..7534e0363e9 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 b619200f00f..14dde950a18 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 ee646fdd5ce..dea17b92099 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 04e7c5e37f8..450caf056c5 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 34a4b00dda5..8ddced3d107 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 c1f60da5416..b095612adab 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 8148055f678..1389268b5fc 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 a87c0628806..d69cda339c6 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 7c64077d42e..b7e19c34750 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 1395f28715c..3d6447d7c0a 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.0.292.g33ef6b2f38-goog

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

* [PATCH 11/18] command: Remove the cmd_tbl_t typedef
  2020-04-07  2:40 ` Simon Glass
                   ` (10 preceding siblings ...)
  (?)
@ 2020-04-07  2:40 ` Simon Glass
  -1 siblings, 0 replies; 30+ messages in thread
From: Simon Glass @ 2020-04-07  2: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>
---

 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/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              |   3 +-
 board/freescale/imx8mn_evk/imx8mn_evk.c       |   1 +
 board/freescale/imx8mn_evk/spl.c              |   3 +-
 board/freescale/imx8mp_evk/imx8mp_evk.c       |   1 +
 board/freescale/imx8mp_evk/spl.c              |   3 +-
 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             |   3 +-
 board/varisys/common/sys_eeprom.c             |   2 +-
 .../work_92105/work_92105_display.c           |   6 +-
 .../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/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                                |  60 ++++-----
 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                                     |  22 ++--
 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                                     |  56 +++++----
 cmd/mfsl.c                                    |   6 +-
 cmd/mii.c                                     |   2 +-
 cmd/misc.c                                    |   6 +-
 cmd/mmc.c                                     | 109 +++++++++-------
 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/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                         |  25 ++--
 include/test/ut.h                             |   1 +
 include/tpm-common.h                          |  16 +--
 include/vxworks.h                             |   4 +-
 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/optee/cmd_ut_optee.c                     |   2 +-
 test/overlay/cmd_ut_overlay.c                 |   2 +-
 test/print_ut.c                               |   3 +-
 test/time_ut.c                                |   2 +-
 test/unicode_ut.c                             |   2 +-
 tools/proftool.c                              |   2 +-
 456 files changed, 1964 insertions(+), 1512 deletions(-)

diff --git a/arch/arc/lib/bootm.c b/arch/arc/lib/bootm.c
index 9fa6aaf3b2d..8f611efb561 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 30dd4b5238b..fbb56ec83af 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 4c45810fbe3..e6fff5b2207 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 72988417ac8..d742c0f1516 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 f5192240e4d..21065410746 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 d5be646555e..998423b6525 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 da43e34394c..fd2ab37a8fe 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 d143864af1c..07a47d51e44 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 4ef2a302785..31536b81811 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 769917679e5..8ae49715789 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 1d2a84a3b04..1c21ab2a9dc 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -419,7 +419,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 03dde842528..c905ecc4bd9 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 835a40e59d9..65b4be20b81 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 2658026cf49..1b365a970fa 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 2d4d6efe5ab..19bfd9f9a03 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 1b111ba26b1..5f21d2b1c50 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 6aa7d82577d..e2571adfb00 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 b3e59b1b003..327b3ed5e8f 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 30db820b565..d0757d8b66a 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 cf3c7d762a7..9eeb2e6d39b 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>
@@ -150,8 +151,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;
 
@@ -251,8 +252,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;
@@ -298,8 +299,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/imx8m/clock_imx8mq.c b/arch/arm/mach-imx/imx8m/clock_imx8mq.c
index aad9cf13ef2..714b6d333a0 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>
@@ -740,8 +741,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 21e96f8c883..a2c588b02d9 100644
--- a/arch/arm/mach-imx/imx_bootaux.c
+++ b/arch/arm/mach-imx/imx_bootaux.c
@@ -156,7 +156,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 2fabdd2eae8..09c4c896647 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 6a9e673ca27..9f3d62fa413 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 75be4f8ad79..f5520374f1c 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 3c0bcccd0dc..a987ff22dfd 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 667826b9f67..7165d666e5e 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 8142039040a..049d5734734 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 89b18516cdf..f0ad9173b96 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 23ff06466dd..9ab6b53adbe 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 1d79927ac74..efaabca5a7e 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 dacc897533c..725897a0ec7 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 b893fb732e0..f08c8ab43a0 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 28b929f84f3..edfb40f00bf 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 7598fe4c43d..349c0648a6d 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 08b7d3519de..21ca9dedce7 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 812f3bd5f31..804abe8a1b7 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 0a6025fffac..a4a97b6a0fc 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 557305c7036..ac2b891fade 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 f1f26e7c943..f191085a12d 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 b2252f36219..110d441d9bc 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 83f8c6a428c..777946970b0 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 9a25bba5997..a6c0735198b 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 a616a2aafb7..476c5b35823 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 e2f4f4eb5c7..7f29b6bccd4 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 fbb551151ab..cc07db48319 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 1590d4a9543..200c53eaf35 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 225bdc2d257..d521a8a2e41 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 1f70d90f0b2..8c91e0e193b 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 bef9047b358..0659bf65581 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 52b64a94a71..87b77f42def 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 cb1514c6005..2608fdd76f1 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 2a64c7b6f65..59cdfe70e48 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 c36ee79c923..b912d130d6a 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 910c5968848..a6a52f85270 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 070c12cce9e..c633e83853e 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 592ac97f827..93f95b1e26f 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 682bee6be2c..7d5c9fd83ae 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 8a65912ceaf..8b98f566e57 100644
--- a/arch/mips/lib/bootm.c
+++ b/arch/mips/lib/bootm.c
@@ -303,8 +303,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 09bdc253ae2..5d0d4550db5 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 0660fffa45f..c3efa31f594 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 3ae87a21bb9..9d99c83bf3a 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 c50e8e51687..da2fd36a16c 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 9008db6aa51..756535a0b45 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 e9d1ff911be..90cabb67571 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 bec18fe28f6..fed412907fc 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 f0e3ada1952..0307039f372 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 a6eb7cb97cb..1343dd3d3a3 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 e83895deabb..8d525dc8373 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 e2fc0b1e8a2..5c14aa1f32e 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 d3167f6cb9d..ff73596ba90 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 eff0d5d7e20..10c4bb91d7d 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 6f539d26776..43f7919b04c 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 9757bffe025..0f8c8cd6677 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 97b93f02131..fe35744b708 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 eb8e73e41c6..8e4a66d23e4 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 07c4c079df3..08d11ad4f2e 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 9d6c08f17a0..1b7c7fa01b8 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 442c01ac6f4..e5b62e9f4ac 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 8aec8c9fd3b..59062ca654e 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 f580c023e58..4a3e26cffc0 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 42b15a13a23..778d011f7ce 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 d2f7ddcd2d1..5213b68eb66 100644
--- a/arch/riscv/lib/bootm.c
+++ b/arch/riscv/lib/bootm.c
@@ -111,7 +111,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 */
@@ -133,7 +133,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 ce3c1cf872b..8779c619cc5 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 e94e980c0e5..f032d88159d 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 5f14a04ab41..dc94f837856 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 602776a4742..c38f0933f89 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 a3bde3d8e75..f2260ae90e8 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 0837655e124..1569d30f8ed 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 9fce021c796..baaf3d13ad4 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 b23b8fd4021..40ba7fcfec7 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 9b5e767ccc2..9e899ddcbae 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 2b4853f8f91..3656cf4cbc4 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 a667413bfc8..1d05e40c209 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 8b97e1a533f..dbd8b5755da 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 f9bf5277397..011cc563d19 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 bd6eefd7735..a120c3123ff 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 772e21b9c51..6168dc92205 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 70fe3559f62..5a5148ea68e 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 3c44fba5161..27dba935824 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 3a59b51c1c7..14931120f6f 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 fd2a229bf74..42d83c5c4d5 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 8e29fd0095c..92a7a2fc6e6 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 6afb6bbdb5c..712ef116667 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 ea2f2bade00..f01ead4e235 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 23c2ea91862..192af304d9f 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 aa99d29c21a..7dbb6e8f2bb 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 db8d7bfe9b3..ba91f4b3c84 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 f57047d1d39..b864a60c446 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 36b620ca23a..638aa3c19a4 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 d7254010bff..37a6f775a05 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 e9b71278333..4127fbc1396 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 dd1ee90b3c7..591203132f9 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 7c301c8545e..b0edc4dfdee 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 20852476dd5..dfc6a91d1af 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 0e249f1bc8d..60767a0b7fe 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 77b768aef03..9b97d1e5dc8 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>
@@ -164,7 +165,7 @@ void board_init_f(ulong dummy)
 	board_init_r(NULL, 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[])
 {
 	puts ("resetting ...\n");
 
diff --git a/board/freescale/imx8mn_evk/imx8mn_evk.c b/board/freescale/imx8mn_evk/imx8mn_evk.c
index 8bd54ea2aa6..ea02bb75f41 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 4795e2a4e3d..0a1f0291fc6 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>
@@ -117,7 +118,7 @@ void board_init_f(ulong dummy)
 	board_init_r(NULL, 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[])
 {
 	puts("resetting ...\n");
 
diff --git a/board/freescale/imx8mp_evk/imx8mp_evk.c b/board/freescale/imx8mp_evk/imx8mp_evk.c
index aa5100f5bf6..97ba15645a2 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 cc600fd693b..430ce5f4ffe 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>
@@ -152,7 +153,7 @@ void board_init_f(ulong dummy)
 	board_init_r(NULL, 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[])
 {
 	puts("resetting ...\n");
 
diff --git a/board/freescale/ls1012ardb/ls1012ardb.c b/board/freescale/ls1012ardb/ls1012ardb.c
index fc929c441c2..5b814f7abf5 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 acf146de4d6..c7f7baa8e67 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 00c70b1e49d..5d2e8015a05 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 a65751986a1..548601a5ae1 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 ef8b4916100..c6db690f560 100644
--- a/board/freescale/p1010rdb/p1010rdb.c
+++ b/board/freescale/p1010rdb/p1010rdb.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <image.h>
 #include <init.h>
 #include <net.h>
@@ -554,8 +555,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 3037ef89f11..b042fe3bcbc 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 2b640e0450e..47c3b1627e3 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 601c2ecadfa..561f5bf8f88 100644
--- a/board/freescale/t102xrdb/t102xrdb.c
+++ b/board/freescale/t102xrdb/t102xrdb.c
@@ -305,8 +305,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 f9c8ab3752e..ac34095f3b6 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 9a9b9d8e779..b9ba62adffc 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 1d449afb2a3..877a9a6e2ff 100644
--- a/board/freescale/t4qds/t4240qds.c
+++ b/board/freescale/t4qds/t4240qds.c
@@ -869,9 +869,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 470b5f91549..d484509bc20 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 0fcb605e1b9..94e28b3f550 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 5e9cf115752..a833657b152 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 068f8cd9e73..6d9565ccfe7 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 7aad6831273..0d53d69ecc9 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 fa50ad28303..daade6da0af 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 05a14ff1038..88ab8233d5c 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 10c43291469..cda0cc6b482 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 53179b98113..fe6249794e7 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 8c9636d292e..b64a6d992d5 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 b39b0b60022..e960fa71aca 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 4e34710b97d..12d4fe63cb0 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 08f7f8d8845..f592eba9e50 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 912b9932406..6a5f936635c 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 7dceebdeaeb..414360fe479 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 565ce5f5d1c..c6e0c12976e 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 0a762bc5536..cdeacb8aaee 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 eef5d36fd5d..5e76b9e7b4c 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 e6c2051bd4b..b56ed1703f5 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 528675651db..a20a34a92a8 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 c5e28df258f..0ca91cdeb01 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 948007c4a83..c54de9fc12b 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 9117669f715..146843d3482 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 b4eae7f027c..ef6630f4f0b 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 f1bca4b27f6..e0bd8590bc9 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 963de15fa87..b4893d39ae8 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 9f9cdfa2346..927ef596506 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 e9d1cf9a4b6..d2a1ed0a3ea 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 e5f6e90e0c0..235d87c053c 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 a3c8042e14e..1d49ff2907a 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 e994a88e717..44cf162a6dd 100644
--- a/board/st/common/cmd_stboard.c
+++ b/board/st/common/cmd_stboard.c
@@ -5,6 +5,7 @@
 
 #ifndef CONFIG_SPL_BUILD
 #include <common.h>
+#include <command.h>
 #include <console.h>
 #include <misc.h>
 #include <dm/device.h>
@@ -38,8 +39,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;
diff --git a/board/st/stm32f429-discovery/stm32f429-discovery.c b/board/st/stm32f429-discovery/stm32f429-discovery.c
index 5b0744ff6ba..d0948b7962f 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 1570d110bfd..680f69dfd16 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 d9bcb39bea6..4b71d400560 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 d98e6064269..c1746b61109 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 44d95951988..72125c6ef91 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>
@@ -756,7 +757,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;
 
@@ -795,7 +797,8 @@ U_BOOT_CMD(
 	"hsdk_go halt - Boot stand-alone application on HSDK, halt CPU just before application run\n"
 );
 
-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[])
 {
 	static bool done = false;
 	int ret;
@@ -819,7 +822,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;
@@ -851,7 +854,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;
@@ -879,7 +882,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 */
@@ -891,7 +894,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[])
 {
 	/*
@@ -945,16 +948,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 715e20dbd05..9ea62bb7960 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 eac30368f7d..c60ce4b138c 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 9af1799fa5e..6ee09034ea4 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 a1e1915b21f..4848fa27a5d 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 c820435386d..6c1e6ca393c 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 81329a61318..3b7fa4b237c 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 22d191f52ae..6991b1bc136 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 ebd6418fd47..f8d0494332e 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 22d191f52ae..6991b1bc136 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 e744243297b..149e9bd3b94 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 bd7d8b7f53f..75216ecf6d3 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 17da1e9f55c..3c0e16460a7 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>
@@ -172,7 +173,7 @@ void board_init_f(ulong dummy)
 	board_init_r(NULL, 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[])
 {
 	puts("resetting ...\n");
 
diff --git a/board/varisys/common/sys_eeprom.c b/board/varisys/common/sys_eeprom.c
index 4c025087db0..134c307e5df 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 db04dcabc7b..3dd60ec8274 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/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c
index 0e33f6af0b7..0f81df3acc2 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 e7169ea393c..86f52f3355e 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 27d44b760da..33589347da3 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 893616b6a19..0f1f26986f2 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 641639bb502..39606e32546 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 <env.h>
 #include <init.h>
@@ -387,7 +388,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 7a4e51571b6..6298fcfb604 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 15e727f4a2d..40e8978f152 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/adc.c b/cmd/adc.c
index 381961cf51a..16f914a030e 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 60bb01c3498..aa943007f35 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 8c5b42fd2c4..4c0dad99326 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 33bc75976fa..522f6dff53f 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 a363818532c..d5de50a0803 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 f82f3dd1a37..5e7315eb7cd 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 a4de5c40a2d..398ad3ba97b 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 588098fddd4..18533efc0dd 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 b944e62b6a9..d99a6980125 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 89747c2f5bb..260feb670e1 100644
--- a/cmd/bdinfo.c
+++ b/cmd/bdinfo.c
@@ -172,7 +172,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;
 
@@ -215,7 +215,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;
 
@@ -235,7 +235,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;
 
@@ -260,7 +260,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;
 
@@ -291,7 +291,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);
@@ -302,8 +302,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;
 
@@ -362,7 +362,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;
 
@@ -375,7 +375,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;
 
@@ -396,7 +396,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;
 
@@ -412,7 +412,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;
 
@@ -427,7 +427,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;
 
@@ -443,7 +443,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;
 
@@ -456,7 +456,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 9fee5288301..b5dad4ba11d 100644
--- a/cmd/bedbug.c
+++ b/cmd/bedbug.c
@@ -56,7 +56,8 @@ void 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 44a5f17f0da..068b1399ab1 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 6d2df5f3dd4..c85cb51568d 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 cc6e161ba0a..87f94b5abbf 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 2cc65a9ee73..25f252e455e 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 80478b8802d..c80e6977b4b 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 edf4f564266..0ad23231cbe 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 9150fce80b4..36aba22b301 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 c358418ebe5..654bbb805c1 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 380daf09a15..e52850227fd 100644
--- a/cmd/bootefi.c
+++ b/cmd/bootefi.c
@@ -601,7 +601,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 de5058236e0..0908512d9f5 100644
--- a/cmd/booti.c
+++ b/cmd/booti.c
@@ -17,8 +17,8 @@
 /*
  * 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;
@@ -64,7 +64,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 931d53f0c72..d5f877cb545 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 3dc2c854aca..2e14fce1a90 100644
--- a/cmd/bootmenu.c
+++ b/cmd/bootmenu.c
@@ -481,7 +481,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 f1ea4e95982..0e623f216b1 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 f14a5fefbfc..ac15856f8df 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 faa1239cc88..7e3cbe12cea 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 27dcec09316..cda8d6cfbe3 100644
--- a/cmd/cache.c
+++ b/cmd/cache.c
@@ -20,7 +20,8 @@ void __weak invalidate_icache_all(void)
 	puts("No arch specific invalidate_icache_all available!\n");
 }
 
-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 */
@@ -54,7 +55,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 98e652a4e7b..8e91d4bb8c2 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 74ad8685002..439736d0724 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 f1ce6e8df1e..eab4e6993bb 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 d2810d573b0..cf30841a359 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 85c5422b7eb..e45e87a64c9 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 3f1d98b17b0..9a1db83c7c3 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 8c0abc17562..ff553c16c4e 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 ad232deae00..1aeb56702ca 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 c6bbed9c4a2..3c7dd4db9b6 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 9f271b6f611..73876e9464a 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 7fa950a9026..75a032cd277 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 52c6e7ec15b..9da06f5e4d3 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 b30f8a56673..7310595a027 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 8d21c7dde80..f51536dbfaa 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 da0660148c1..dbd08a06b2f 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 108707c298a..013680f3354 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 5b018d9349a..d02a4cfd586 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 667149e2d45..9d725cd44c5 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 ea239a01f0b..c7640c862e9 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 c1bb76477a6..88f49566108 100644
--- a/cmd/efidebug.c
+++ b/cmd/efidebug.c
@@ -61,8 +61,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;
@@ -140,8 +140,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;
@@ -312,8 +312,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;
@@ -372,8 +372,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;
@@ -517,8 +517,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;
@@ -547,8 +547,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;
@@ -646,8 +646,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;
@@ -788,8 +788,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;
@@ -952,8 +952,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;
@@ -1001,8 +1001,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;
@@ -1050,7 +1050,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, "", ""),
@@ -1071,10 +1071,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;
@@ -1089,7 +1089,7 @@ static int do_efi_boot_opt(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,
 			 "", ""),
@@ -1118,10 +1118,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 e71ef7355b0..4d3e5609c03 100644
--- a/cmd/elf.c
+++ b/cmd/elf.c
@@ -226,7 +226,7 @@ static unsigned long load_elf_image_shdr(unsigned long addr)
 
 /* 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;
 
@@ -264,7 +264,7 @@ int valid_elf_image(unsigned long addr)
 }
 
 /* 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 */
@@ -320,7 +320,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 d178a0c10de..f8b8a798bf6 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 f40d0686e1e..7bf241ec732 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 dc56ab25ffd..57a99516a6a 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 d2fa7f1db1d..4791b69fd96 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 1b4215114d7..4f35108a369 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 a88a49c1171..032ab8f445a 100644
--- a/cmd/fat.c
+++ b/cmd/fat.c
@@ -19,7 +19,7 @@
 #include <fat.h>
 #include <fs.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);
 }
@@ -32,7 +32,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);
 }
@@ -53,7 +53,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);
 }
@@ -65,8 +66,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;
@@ -98,8 +99,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;
@@ -153,7 +154,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);
 }
@@ -165,8 +167,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 8e8de1cd555..80761c4fe20 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 1e5edd9f9bb..f6270d9c15b 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 df97fe740d8..452b040dbca 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 563528ca5e6..47307bfc895 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 0d55453eaa6..fb2fe63e78a 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 db74767b7b1..3a0c465c157 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 02ae9b7f3c3..5dc94aa6408 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 42d74fa8837..e001619d172 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 863bd875901..2e74e02b499 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 408a942455b..24053e6ad98 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 fe49d533209..e00ce58c527 100644
--- a/cmd/gpt.c
+++ b/cmd/gpt.c
@@ -796,7 +796,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 dff943ac9fe..e163cd67742 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 a1a0b99b6ff..8d67d977bf1 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 eefc4f255ef..cd9c9677f0f 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 43a76299b3c..9ebbdd31284 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 2f93ba79046..b78c38e1590 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 0c425262d0e..c075be623cc 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 7fee9674a28..c7e964153b8 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 fa6c68b1982..652ebefb89e 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 52d06b3eedb..1d3e28cb3ce 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 e21e1f1b1bf..a0cf4bee041 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 748a73e2af9..bb4790402e3 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 50ffa509abf..9433fa886c2 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 7d40d8db58e..86cd969e407 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 c5b04c331b1..15411b5a92d 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 36db571cea6..85e5540f2c6 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 1e3936aeeb7..664f7bd7ac4 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 e3b9cc75ac2..3b8db0a8538 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 4227d10936b..a39e1168a57 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 4e30334951a..5ae3ddf85f8 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 22c8fbe856f..c48bb51237c 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 bb318f3902c..91e89eacd32 100644
--- a/cmd/mem.c
+++ b/cmd/mem.c
@@ -30,7 +30,7 @@ DECLARE_GLOBAL_DATA_PTR;
 #define CONFIG_SYS_MEMTEST_SCRATCH 0
 #endif
 
-static int mod_mem(cmd_tbl_t *, int, int, int, char * const []);
+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.
@@ -47,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;
@@ -97,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;
@@ -167,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;
@@ -194,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;
@@ -222,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;
@@ -302,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;
@@ -360,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.
@@ -374,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;
@@ -472,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;
@@ -866,8 +875,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 *buf, *dummy;
@@ -966,7 +975,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
@@ -1070,7 +1080,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;
@@ -1095,7 +1106,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
@@ -1224,8 +1236,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 583762a3453..31f5b36ade0 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 23ee1e6cfa2..b52a55dc339 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 a1eef72a6c2..d33219308b7 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 002c96becbd..f6a5d580ade 100644
--- a/cmd/mmc.c
+++ b/cmd/mmc.c
@@ -118,7 +118,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;
 
@@ -151,8 +153,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);
@@ -169,8 +172,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;
@@ -197,8 +201,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;
@@ -223,8 +228,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);
@@ -235,17 +241,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;
@@ -292,8 +298,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;
@@ -334,8 +340,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;
@@ -385,8 +391,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;
@@ -415,8 +421,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;
@@ -445,8 +452,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;
 
@@ -456,8 +463,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;
@@ -475,8 +483,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;
@@ -516,8 +525,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;
@@ -525,7 +535,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;
 
@@ -559,7 +569,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;
 
@@ -592,8 +602,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 = { };
@@ -676,8 +686,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;
@@ -702,8 +712,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;
@@ -755,8 +766,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;
@@ -786,8 +797,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;
@@ -821,8 +833,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;
@@ -850,8 +862,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;
@@ -874,7 +886,7 @@ static int do_mmc_bkops_enable(cmd_tbl_t *cmdtp, int flag,
 }
 #endif
 
-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, "", ""),
 #if CONFIG_IS_ENABLED(MMC_WRITE)
@@ -906,9 +918,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 4c8f5fc3fae..c2b5235a373 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 f407c5e4450..485a963bdd0 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 b40c2afadda..9fca08562b9 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 ddc1508fb73..a5ddd1cef38 100644
--- a/cmd/mvebu/bubt.c
+++ b/cmd/mvebu/bubt.c
@@ -708,7 +708,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 c42ab24ec06..92d039af8f5 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 282b38ccf99..25390b0474f 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 1c42f2114b2..7539f07f08d 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 3fdeec945c6..7356ec1b8e5 100644
--- a/cmd/nvedit_efi.c
+++ b/cmd/nvedit_efi.c
@@ -133,7 +133,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;
@@ -167,7 +167,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;
@@ -205,7 +205,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;
@@ -270,7 +270,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;
@@ -460,7 +461,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 9ae91ce9cb5..e715c570a38 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 d97844fa7a3..216458bb474 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 0b1fa499368..bdad5d8e963 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 4b2e06e615a..216f14bf5d7 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 980603f7bd5..d0172f3fffc 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 b2174e2a9ca..f91a4eb8ed0 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 de909a163d8..9942b154196 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 cafeba9fccd..9a3ba2bffc5 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 2400bfb601d..3bda0534a36 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 bce6728875a..6372fc98718 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 a238937891f..3e8ddd61b45 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 a38ac81a470..77d25888758 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 af826627a21..bb571487f06 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 7977e9d847e..34f53f9a292 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 de94dd8071c..c8a04b1754e 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 ed8d778c824..aa06c9a9fc8 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 28e827796b3..3db926f8064 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 da6f3fc8ccf..e8b9178e740 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 547fb7d1325..3c8dbbec0e0 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 76367fed94b..9747c11be46 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 9b70c6a6aff..f181ec61119 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 c507e9dbd80..aa396c1bbdf 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 5701e03797c..f7eb921f43e 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 e81194de0f4..5f710d28957 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 0182f199384..1d81ecfa6a4 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 69e0d46a557..367df576b82 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 3c50fc27ce8..bcc665a5a6c 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 8b1475c2fe0..0b19f6c68c6 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 638f29df21d..7fc19678ea8 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 92f8f77ee6f..5b0b79aadba 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 bfa185b6aef..aec912167c6 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 61256f4830f..b8e0aa42539 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 41b16659260..85fdc34f08f 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 793d67d2f58..af6a2f1b7f1 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 e1ec66ed710..f6e4d2539e3 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 258bfd88065..dd49d0e00aa 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 8dae024e31d..ae20dddfddb 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 a452fe7876a..756aa9eb3ed 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 51cde9749f4..db8c1892df4 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 b5f293ba7fd..eab0531c96b 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 30142552290..88c9e08e318 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 a851d9c4af2..358ddff5761 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 bc34e0654f9..0e2168aea67 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 0cd39821bff..e6742656f57 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 2cde517d7a9..a6a4636ef6a 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 392b1295361..4ce47c76276 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 369a2b5ab3d..25f98acdf70 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 cecf251fdb9..7903b08dc76 100644
--- a/cmd/ubi.c
+++ b/cmd/ubi.c
@@ -495,7 +495,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 e4000b7ad19..e798b833dd4 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 5b25788656f..858cd49b597 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 dc9a8b5617b..5ff47dde4fb 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/unzip.c b/cmd/unzip.c
index 725624627c1..9b28328a1d7 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 858be726a47..b9ec29a8457 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 2ead06be9f5..1af82e11366 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 b6037302487..a117ab213a5 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 b2fffe99772..3686b873324 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 f38cc56598c..3dace5344f7 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 9c95fcf9cd1..92be1f2531d 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 647d9899b43..27410981e7b 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 8a756f373c8..f0d63432272 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 ade1e2ea926..82faaa913e5 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 6e485fb144b..8017eda387c 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 29d9e3d5a27..6b1f7bda5b8 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 d3fd959235f..2c40e711a1d 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 73c764255fa..159ba516489 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 9244606bda9..f29ebcc026e 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 2b622a8f53e..e429ac88d73 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 8ef46e9815f..b433f1889f9 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 2eef614885b..63287bc3b2a 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 96cba015890..c3b3ee371ca 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 8599bc8ca37..08675ffb61c 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 e5e5894b2fa..6635ab2bcf8 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 cf1e273485c..ba0c5967668 100644
--- a/common/cli_hush.c
+++ b/common/cli_hush.c
@@ -3665,8 +3665,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 6ef7a3e5642..1f1e28c6d85 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 0d8bf244be2..d75908aae2c 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 da6289b218d..cd60f9a1e27 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 18af38a5f6e..6253b55694b 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 4a28ac5d347..cde648d4b88 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 810854ce0f5..34f00890b49 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 270732278e6..1d2263de5d7 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 99fcf96f063..4bb79219d4e 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;
@@ -1052,8 +1053,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;
@@ -1348,7 +1349,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;
@@ -1449,8 +1450,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 daf53bed7a9..312e14960aa 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 d34bc2fa830..ad5f307af44 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 4e9e8098fa8..716ad227aa1 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 28ebde1dec7..874ca2f7c66 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 4183db28455..fa519a44300 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 8e171e67fec..8c82d524a3e 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 394f30fa886..572abfa536f 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 fda8054d530..4ab8cee2d18 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 730460a9991..463cfe879a8 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 eff33f7343d..387c70b0704 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 bf20a833ecd..0b37e8a4e41 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 2520c6a38ed..46ce6305fe6 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 7e98449cfa2..82b1db3fb32 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 2ae30855154..19ed4777d9a 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 52b3c79794a..dcb561ff79e 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 966e9c75eb7..e66d592f9b0 100644
--- a/drivers/net/fsl-mc/mc.c
+++ b/drivers/net/fsl-mc/mc.c
@@ -1721,7 +1721,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 dd8c68d57d0..bae5f8a4791 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 30c4812d827..f039f895c89 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 6fe08b80c1e..a27a9cc03ed 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 f17839c70ff..93eb2b158cc 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 361be6c31c7..d6e36125c12 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 67b420910c9..60f69ec27ac 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 c440047d36f..3446fe7365d 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 7de92f4f614..6323492b66d 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 834919ddd4c..0531707c8aa 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 566be5f39e5..f5b27548d3e 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 095d8a51bef..5a18dedada6 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 42c9001518b..4cc261aced6 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 24549ece653..f392a0ab813 100644
--- a/drivers/qe/qe.c
+++ b/drivers/qe/qe.c
@@ -779,7 +779,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 cc9b2e7c96c..a6ce6f34c8c 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;
@@ -212,7 +213,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;
 
@@ -235,7 +236,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:
@@ -255,7 +256,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:
@@ -270,7 +271,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 51fdb1055e3..9e990339a6c 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 9092764e0b1..39f4671fad7 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 fc27dbe8de4..d1be3f5e137 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 da3d63c0f0d..0c4c83f89d1 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 5442bac4c6f..8918d837238 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 997e854ef8f..74a23889242 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 8e0fc7f3ecf..dd6786ffae4 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 e7523786b41..d586174ce8c 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 769dcc70385..51d6273a930 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 b7bd243730b..b71b4061260 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 1f61bb47772..263cd9ca079 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 5ffefc8f36b..a43d14f3967 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 70e9ab219ca..d9960fc4ac8 100644
--- a/examples/standalone/smc911x_eeprom.c
+++ b/examples/standalone/smc911x_eeprom.c
@@ -316,7 +316,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 0827bde35e5..5fb460454f2 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 061917a9847..5591c65eaa9 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 0dee05f077a..1e9ba861088 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 b7b447b1fe3..406eefba71c 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 *);
 void 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 6f541bb2bae..abcd4bedbbb 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 edeeacb0df6..1e7f29e1341 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 d1063774ce5..b9b5ec1afa0 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 f701f02bfef..8aa825daa47 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 fc024902239..a7f21e73d75 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 cbd16fc5185..85f9a7a7084 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 1c10c504748..bc3324172a0 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 9fdb4a34249..29f737b8c21 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 2476f40c56d..025d7a1e74b 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 06951fccf46..252d499e7b1 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 f4019a97918..835962e7f66 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 3ffc0fdd682..f61766bda19 100644
--- a/include/image.h
+++ b/include/image.h
@@ -581,10 +581,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
@@ -607,8 +607,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,
@@ -717,7 +717,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 b6ba742ad33..616ce4451f1 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 34385aafb1a..bfe721d9d92 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 */
@@ -412,7 +414,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 3ef212dd00f..00a8ec0c78a 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 0469a852e07..781b31d6f3c 100644
--- a/include/search.h
+++ b/include/search.h
@@ -82,7 +82,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 0748185eaf7..65de4a6a763 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,16 +24,20 @@ 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_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_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_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_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 04df8ba3af3..0704197abe2 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 <linux/err.h>
 
 struct unit_test_state;
diff --git a/include/tpm-common.h b/include/tpm-common.h
index 702cd6e93b8..e29b10b1766 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 d90d862fb76..eb8fb4a9bb3 100644
--- a/include/vxworks.h
+++ b/include/vxworks.h
@@ -9,6 +9,8 @@
 
 #include <efi_api.h>
 
+struct cmd_tbl;
+
 /* Use Linux compatible standard DTB */
 #define VXWORKS_SYSFLG_STD_DTB	0x1
 
@@ -83,7 +85,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(bootm_headers_t *images);
 void boot_jump_vxworks(bootm_headers_t *images);
 
diff --git a/lib/dhry/cmd_dhry.c b/lib/dhry/cmd_dhry.c
index 29504833efb..d55ab54df97 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 81a678c2036..da43b8f7cb5 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 e8bfd1fb1ec..e0c6e0971cd 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 907e8a642f3..898465445fd 100644
--- a/lib/hashtable.c
+++ b/lib/hashtable.c
@@ -597,7 +597,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 1b57917320e..dfbcd9d0037 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>
@@ -284,7 +285,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 4b12b699d09..8fc744d932c 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 8afc5529cd9..0c57fb9947d 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 bdcca0291c7..4e537ee1b9c 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 a3a9d49f7ec..cd69916fa33 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, "", ""),
@@ -74,7 +75,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;
@@ -90,9 +92,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 8e268e5ee52..d6e6777bd42 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 bceb2c273c7..0b57b7bb406 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 d7dc8d1f915..62a0c692c89 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 ad67dbe7929..a440b1bfb0e 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 c73e8d7b05a..f5c7bf3d3b0 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 febc2c1252a..d29b559410f 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/optee/cmd_ut_optee.c b/test/optee/cmd_ut_optee.c
index 092710326a8..01f829756fd 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 c8d41a4dca2..da050795964 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 a3b9974ad26..1cc2a7b8f14 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/time_ut.c b/test/time_ut.c
index 40a19a50d93..70a866b441e 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 4d99c20bc04..9939480ed94 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 fecb9d6e99c..ea7d07a277e 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.0.292.g33ef6b2f38-goog

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

* [PATCH 12/18] common: Drop log.h from common header
  2020-04-07  2:40 ` Simon Glass
                   ` (11 preceding siblings ...)
  (?)
@ 2020-04-07  2:40 ` Simon Glass
  -1 siblings, 0 replies; 30+ messages in thread
From: Simon Glass @ 2020-04-07  2:40 UTC (permalink / raw)
  To: u-boot

Move this header out of the common header.

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

 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/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/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         |  1 +
 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                      | 11 +++++-----
 arch/powerpc/lib/extable.c                    |  1 +
 arch/powerpc/lib/spl.c                        |  1 +
 arch/riscv/lib/bootm.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/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       |  3 ++-
 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/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                     |  3 ++-
 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                                   | 20 +++++++++----------
 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                                  | 11 +++++-----
 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                                |  7 ++++---
 common/hash.c                                 |  1 +
 common/hwconfig.c                             |  1 +
 common/image-fdt.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_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/device-remove.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                    |  1 +
 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                         |  1 +
 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                          | 13 ++++++------
 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                          |  2 +-
 include/i2c.h                                 |  2 ++
 include/initcall.h                            |  1 +
 include/spl.h                                 |  1 +
 include/wait_bit.h                            |  4 +++-
 include/wdt.h                                 |  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/optee/cmd_ut_optee.c                     |  1 +
 test/overlay/cmd_ut_overlay.c                 |  1 +
 test/print_ut.c                               |  1 +
 test/unicode_ut.c                             |  1 +
 1523 files changed, 1560 insertions(+), 34 deletions(-)

diff --git a/api/api_display.c b/api/api_display.c
index 8ae358abb14..4f2cdd7330e 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 8f611efb561..63d6207c047 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 4ffba84eeb3..6882ebec6d8 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 43d044d917b..4e1cf3a1e32 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 83dd8b625e4..565392eab56 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 cfd6c4a10f3..2cfbd780953 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 542543cc285..a94803ee93d 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 7c57cab0b13..35ea71a5ba8 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 72f8eb7222f..04366c871f6 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 6a36f948f03..574a8a02d8a 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 6648aed291e..f6d25bb682c 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 a779d337399..8a95ee86a9b 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 204187c1b4b..61c82f64699 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 f607b77d41d..72fc34db1c6 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 a64bc1bde22..7ebcaa21a16 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 10dd034c7b4..b11936548fb 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 6102fe1b55a..febb3857f2b 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 4e463fddbdd..7f1c15e47a3 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
@@ -6,6 +6,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 cb64cc2db81..f24ca7f1dc7 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 07a47d51e44..3ac50966e15 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 e73689ce269..49df8b37900 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 daaaeab26cc..1ddb267093c 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 ff7f29275c0..c4a897b11be 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/soc.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
@@ -10,6 +10,7 @@
 #include <fsl_immap.h>
 #include <fsl_ifc.h>
 #include <init.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 ec40df41f60..77724336d62 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 c549ddb3352..6b6ad020316 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 c7445e647ee..789f9ca5667 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 14ee6f999ba..c3a84b832ad 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 1c21ab2a9dc..fb56289e118 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 f8d20960da9..b3e9752b408 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 41544954578..aa9ff34bde6 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 1b365a970fa..904fddd6c04 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 5d5437cbbc2..af0c9ad6bd6 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 20594e0efbe..f74dcbbb624 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 9498cbc92d7..a3adaa8a999 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 c875bfd89b7..23c24936edf 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 b78cafdd9cb..35a3d5185d3 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 f40bc531d4f..23588e79f94 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 da0b4feacbc..da9faafe1dd 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 3e5185261c7..5bfc47dae45 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 73aa4cdad32..ef48d35aa4c 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 b24f1bb8f4f..ad3fbf2da7a 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 d9672e79efc..9c7ca49519b 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 5f21d2b1c50..49dd473af72 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 327b3ed5e8f..85abbb4a89b 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 0dd97c93a8e..09408880c9d 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 f29de74c399..cd7e95e61d0 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 9eeb2e6d39b..b099828b910 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 4c965158fc7..47c64f7a8aa 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 65c8ac1a7e2..46c8073e0f7 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 e6b299691de..5abc0d3a39f 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 0ade85fb8fb..b8e6f48a5f7 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 00fe4670bbc..a4c3fadc853 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>
 
diff --git a/arch/arm/mach-imx/imx8/parse-container.c b/arch/arm/mach-imx/imx8/parse-container.c
index b57e68e4124..a256aa6be2f 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/imx_bootaux.c b/arch/arm/mach-imx/imx_bootaux.c
index a2c588b02d9..65722a65959 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 6744fbda46d..549ef2bd991 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 09c4c896647..bbaddd5a33f 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 9f3d62fa413..fb5e5b6f05c 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 4396880b748..bcf82ed5c86 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 f5520374f1c..aba9461d920 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 8c68655399f..05ddeed2a64 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 234974ba0dd..aa7ea86a443 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 c7bb7a1c667..6e34803067a 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 981a0a152c2..720ef65375f 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 beabb541173..281c0064527 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 5dc0f7174e5..f588a5f5216 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 8502d234080..6a17909187e 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 256b0526f22..66f90a5a34d 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 0478c15f3fc..4282fccc85a 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 6eee9ad13a0..3803449c2b0 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 d328fee8bd5..fa269035935 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 7222504ed3a..4fdad99cade 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 098892802bb..aa9ff2bdba7 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 96802519418..aa779f43766 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 fc1729edd38..14127ca737c 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 725897a0ec7..e6da4de5343 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 193e7be6a4b..e827c8ffa6f 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 862c5e0905b..8819062aaad 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 8cacc1dea6c..71636276d4e 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 734fa9d9e6f..909da3fc173 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 f968a26d640..757fa3801a1 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 4658f67e84d..8bc4fbbb606 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 3f420186ad3..5f344f82838 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 1eff9be2705..2c9ada060cf 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 5af6d28e74b..026e5d2d130 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 598074ba21a..8569eff31ab 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 f3661a0e74e..2de36b6feca 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 c4adba31e68..3f8474b8d0a 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 edfb40f00bf..0551bc125e8 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 9f26b8d16c8..430c0cbf41e 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 349c0648a6d..2158934159a 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 17066bcf8bc..28c7c7214cb 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 0331491b408..4672bdbf009 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 dca9de28d47..ef57dfd7619 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 94f4ec7227d..ea7d7b5b1ac 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 dff2caa5981..e3da0a01947 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 4ba94f2e805..cba0dda3e80 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 aaa7246393b..f263f7e8b2f 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 259ca44d68f..6b02dc8beb2 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 530644c0434..24fe6cc8f0c 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 c147d5821ea..c2e40230072 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 6c1d0aa9694..3c6ba186954 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 2de4e980e46..74f185c87f4 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 12c26a91c65..2a161be137c 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 4ee2b7b4bbe..6188a8c3d2d 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 a87dd441813..ccff78a2307 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 163bf278b14..f378fce7f02 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 808f7443346..bfa1842bf82 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 8df24689192..d18e1069a9f 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 46abdc95a80..b95cf60f145 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 a77c706a1a0..00131fb85a4 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 a0ee06203a0..b772c078b47 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 f4cc609d2dc..3776ffc0829 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 82c430b7c77..80bd63588cd 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 7c1f22d67b2..d281213c6c3 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 32e36642658..f40fccd8f8b 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 411a6123933..045e8679e3f 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 58ce05db6dd..14be212e891 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 ea5fe108eb1..567cb5b18e7 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 612942025bc..c084de7e2ce 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 84c20a48ad4..532730fe727 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 267bfde09dc..03faacbd577 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 224efc97c53..48c4f32d6f9 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 7cfbb6270fd..16c4cf306ec 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 31b6aa2cfc8..c4225b8b5bf 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 3d140760e68..d12ebb319e8 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 e047f678211..13ffade0408 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 1771991fbb1..16b03bfe7b0 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 68a211286f9..cdc8493efd8 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 13ddbc3b816..ed897efc5f0 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 8d662c23d02..1c06865e06d 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 09b52f559f0..92ce3cefae3 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 8fe5e9e3572..23a27c86888 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 f02f8b05324..4359093892e 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 abc050c27b0..c9226af4c5f 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 a8fcac6038b..e7ad85fde2d 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 09ab8c78cf0..9a97c874364 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 4e607816a7a..8e3ad2baa2e 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 b91191eba37..1efaa5c3ecd 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 dff9ac0a4d6..d55b09b4ac8 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 2ee0f6ea76f..90fe0cba8ea 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 d63db8afa05..05d0668cdba 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 ed0ad2ee8bd..171c98daa2e 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 7f00d7b604c..30d994a17ff 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 64dc297ae27..b75cc31c8c1 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 ea17d145366..7a5c54d592f 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 45a5c091ecf..7bd1de19534 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 b3de980ad35..c3ee787f33b 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 c3fb30e24d1..e56e27c8b6e 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 4f9cd6e722c..6bf0811edbb 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 1decdf1cbff..c26f56367e0 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 b013571f36c..7de6b7fbde9 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 951e71430f1..f6e95ee7baa 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 11cadaabd89..dbf54aa9105 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 f41ae41b9e6..e6bb79e9e45 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 <asm/io.h>
diff --git a/arch/arm/mach-zynqmp/mp.c b/arch/arm/mach-zynqmp/mp.c
index cc07db48319..74ada3b6707 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 1c304f1af3a..fa9d17d70b7 100644
--- a/arch/arm/mach-zynqmp/spl.c
+++ b/arch/arm/mach-zynqmp/spl.c
@@ -9,6 +9,7 @@
 #include <debug_uart.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 b912d130d6a..aa17929b9ea 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 a6a52f85270..829ae26ad27 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 c633e83853e..86522f84479 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 e07fc628d16..cd4aba667ed 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 93f95b1e26f..d2ea1453be0 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 8b98f566e57..bafbe707a98 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/stack.c b/arch/mips/lib/stack.c
index 4d1d98c3ada..8f523fd6fb7 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 b8568c00fed..265bd8383bb 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 d71c94e1718..5adf6cd8159 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 764ce892318..a772a655d92 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 add6280e389..83d3e5bdd28 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
index 3cd440804d0..bcc4241ba3d 100644
--- a/arch/mips/mach-mtmips/ddr_calibrate.c
+++ b/arch/mips/mach-mtmips/ddr_calibrate.c
@@ -18,6 +18,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <log.h>
 #include <linux/io.h>
 #include <asm/cacheops.h>
 #include <asm/io.h>
diff --git a/arch/nds32/cpu/n1213/ag101/timer.c b/arch/nds32/cpu/n1213/ag101/timer.c
index c59585692d5..8208b6de90c 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 b17368647d3..ab539f4036f 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 fed412907fc..2c8f9731c74 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 c49b4f784b6..5e02f4094bb 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 22506a5be50..34faff2df59 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 8604f4a8e8f..b972cf3b5e4 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 97eeb489cbe..34b58bb7f9e 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 10c4bb91d7d..8de218666b5 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 65f909fd1e5..55f191f202f 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 d7a633ddf25..796bc15a7c6 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 ebdcd29c13d..e6d4707e3e9 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 43f7919b04c..e9da9c0d48f 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 e7703b8a49d..e552378e78b 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 0f8c8cd6677..28e1580a437 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 c4c4154ac37..111692f15d1 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 bdcf46ed114..f3b5450ad55 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 99bab9e8ef3..2a5c3e32002 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 414c05868f4..81b66c3fa6a 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 637522861eb..eb54b8252b2 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 0e0c63a14f3..1b4e6149184 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 cc907c5894d..8cba4222c4f 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 509051047b0..1a7c839d612 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 4c51a72630d..719cb4f3d4e 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 482172d4e02..bf5cac61992 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 1e7ed439577..f36b1b64ede 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 fe35744b708..9f5bce3992b 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 8e4a66d23e4..033ca327f00 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 0e0a90eb7b5..ecc88ba4374 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 d272d4ba297..4df446618c0 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 d81af70f440..3d00de3181f 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 7b4690abc9f..7dd71d2e0c4 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 a1f94035596..17b11744a4d 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 59062ca654e..cd92db0a92f 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>
@@ -53,8 +54,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 +82,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 +106,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 +150,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/arch/powerpc/lib/extable.c b/arch/powerpc/lib/extable.c
index 683fd53b6af..7e9d4f22f39 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 d90a6e27b90..d4a6057527c 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 5213b68eb66..9c4cf7fd3f4 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/spl.c b/arch/riscv/lib/spl.c
index 6250a8147b0..a658355fb1d 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 842640c50ed..0d9300736d4 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 b92db85c229..7ab8919eb90 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 a347cec5284..1f794123b36 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 f22e47c7f6d..2038141947a 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 55005455c09..8aa2009bd6a 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 5308af8ed45..56ce59dc702 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 35fe029a244..41bcc788c0a 100644
--- a/arch/x86/cpu/apollolake/fsp_s.c
+++ b/arch/x86/cpu/apollolake/fsp_s.c
@@ -10,6 +10,7 @@
 #include <bootstage.h>
 #include <dm.h>
 #include <irq.h>
+#include <log.h>
 #include <malloc.h>
 #include <asm/intel_pinctrl.h>
 #include <asm/io.h>
diff --git a/arch/x86/cpu/apollolake/hostbridge.c b/arch/x86/cpu/apollolake/hostbridge.c
index 793853d5b5c..cb46ec6c0bb 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 45b2144fc68..b81a458f2eb 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 aec0c8394c2..b5098bb5e2a 100644
--- a/arch/x86/cpu/apollolake/pmc.c
+++ b/arch/x86/cpu/apollolake/pmc.c
@@ -12,6 +12,7 @@
 #include <acpi_s3.h>
 #include <dt-structs.h>
 #include <dm.h>
+#include <log.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <asm/pci.h>
diff --git a/arch/x86/cpu/apollolake/punit.c b/arch/x86/cpu/apollolake/punit.c
index 1a131fb0b14..600c5ea9364 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 1cf7cebff52..5a53831dc6a 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 f44228e6939..ca39f662a80 100644
--- a/arch/x86/cpu/baytrail/acpi.c
+++ b/arch/x86/cpu/baytrail/acpi.c
@@ -7,6 +7,7 @@
 #include <acpi_s3.h>
 #include <cpu.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/uclass-internal.h>
 #include <asm/acpi_table.h>
 #include <asm/io.h>
diff --git a/arch/x86/cpu/baytrail/cpu.c b/arch/x86/cpu/baytrail/cpu.c
index a9cfcedd81c..18e48ffa532 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 1d1948c91a8..21816ce5b88 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 60101d742d1..9e710a940ca 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 2ac8cea7c33..41f7d5d4d1a 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 793167937cf..b77301118cd 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 17ff43b58ec..6567d506533 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 3d42b1caac4..120879038da 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 9dc9b63db61..5669a028cf3 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 adc656c07ad..7991e1ea07b 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 a48945adf11..8c71e43a2d8 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 aa83abbf855..0ead13af62a 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 09fda487d04..99d6f72cf6e 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 b944896e75d..6c04dde992d 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 d89e0a1c9b0..9f3c56b204d 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 15bfc5811cb..72f59a0a573 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 7d48f95c3f4..643a44236b7 100644
--- a/arch/x86/cpu/cpu.c
+++ b/arch/x86/cpu/cpu.c
@@ -26,6 +26,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <init.h>
+#include <log.h>
 #include <malloc.h>
 #include <syscon.h>
 #include <asm/acpi.h>
diff --git a/arch/x86/cpu/efi/payload.c b/arch/x86/cpu/efi/payload.c
index 66df1287871..71619f6f01b 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 4d093a53912..509730aea96 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 e4f785ce895..963afa8f5be 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 fc9efbf3a9c..abc5f6fbc77 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 c7a539d2819..0355d3c1da6 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 755670a847e..73bfd123321 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 d5b4846e0a2..8364bf11182 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 0f217c14973..a3612817c45 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 01ade76a586..4f99de6ece2 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 bafa0310822..836a0e8b86e 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 1cb6cecda9e..d276cbe13bd 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 0639b5cf029..cb6eded9c98 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 219d5be3995..cae95785161 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 0e6453c8477..41d7d2a2b42 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 d9ddcdc840b..85fd2a965ab 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 56ab6bf4acf..5954a24873d 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 0f427afcb82..877b31b9d6f 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 fc6c4274300..025b20be31b 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 cf34f94a91d..99bc48021e6 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 44ed4467849..c0691454f12 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 7b09f90cd51..c3cd080885d 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 0e4402d68e9..7ec0733337d 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 e1aae158ce5..d4f9290ca73 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 30f47556264..72937139ed7 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 4a760a9f590..e6e69c49d09 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 bab54b18df6..9813f7977b5 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 889fba54730..f61fe814e94 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 fdd653026b8..5b0e106011a 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 8c7e1c10c2b..df3b9e4ec97 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 be468d2b2ca..f8d85d5a339 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 cba9c24dd45..7a3b00a21dd 100644
--- a/arch/x86/lib/acpi.c
+++ b/arch/x86/lib/acpi.c
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/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 66e32f21bdb..aca7002e4eb 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 <serial.h>
 #include <version.h>
diff --git a/arch/x86/lib/bios.c b/arch/x86/lib/bios.c
index 30c0997fd01..3ab432e2623 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 fdd966b2c84..d6b4da7e250 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 1569d30f8ed..acc15cf2e0c 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 103a41a5d79..663a7eb87bb 100644
--- a/arch/x86/lib/fsp/fsp_common.c
+++ b/arch/x86/lib/fsp/fsp_common.c
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <init.h>
+#include <log.h>
 #include <rtc.h>
 #include <asm/cmos_layout.h>
 #include <asm/early_cmos.h>
diff --git a/arch/x86/lib/fsp/fsp_dram.c b/arch/x86/lib/fsp/fsp_dram.c
index 9ce0ddf0d3d..820ac066b17 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 226c7e66b3f..c20bd36f38c 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 <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 ee228117d13..fd4d98ef627 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 37706b79760..ed948f4cc4a 100644
--- a/arch/x86/lib/fsp1/fsp_common.c
+++ b/arch/x86/lib/fsp1/fsp_common.c
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <errno.h>
 #include <init.h>
+#include <log.h>
 #include <malloc.h>
 #include <rtc.h>
 #include <asm/cmos_layout.h>
diff --git a/arch/x86/lib/fsp1/fsp_support.c b/arch/x86/lib/fsp1/fsp_support.c
index c7a2c73846b..d84c632f140 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 b74e6f18ec4..67dac1d968f 100644
--- a/arch/x86/lib/fsp2/fsp_dram.c
+++ b/arch/x86/lib/fsp2/fsp_dram.c
@@ -8,6 +8,7 @@
 #include <acpi_s3.h>
 #include <handoff.h>
 #include <init.h>
+#include <log.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
 #include <asm/fsp/fsp_support.h>
diff --git a/arch/x86/lib/fsp2/fsp_init.c b/arch/x86/lib/fsp2/fsp_init.c
index c65e8c8d63c..13bbabd7e57 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 117f36a8482..1a758147b08 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 28c15a22a2e..45c0c7d90b9 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 0a04b443f7e..3f2ca840dc9 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 358cd1e70dd..a0e3c092573 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 40ba7fcfec7..a81e4291105 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 b5ad1135a6a..1c49c41b310 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 d1c44f290c4..21c71e036ed 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 c3c709ec072..4578046169a 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 5868d5b60a0..482599478b8 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 17bd2fcb9b4..eb6a7d96de1 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 4d09e4de420..ecbd0927e07 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 f20c28b4826..f5bce0ee89f 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 ac265b67449..6f7eb43a172 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 148fc9075e4..b477d9cda4b 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 29c11204580..25759e09ecf 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 10236bd07f2..459b7ba82c6 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 21ebd5dddb6..54f48b9ba8f 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 e9af8ddd013..5d989481df6 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 c189d23eecd..e3793c1125c 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 888434a6f8e..3285a33a690 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 10278de3c7d..29bde60228f 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 d83eb9bd524..cff9a6840c4 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 40ced1a87ce..e3bf808d7e2 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 ee0cf8f9e29..add4285db31 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 433e0de8a3a..8df039168c9 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 a7a1be3c057..64d0860d213 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 39ca535d11d..8662632a7e3 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 a0f3dada42c..0ae2e7d88c1 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 f4c4b1d6636..68d7cd8154b 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 916d06bfeaf..77fcca49d3b 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 fc4587ed0d5..a602b623adb 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 ee5d4b41f28..69e8ef46f1f 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 c40f8388bc6..cd00dc22340 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 9483516ca0d..5a2003d5098 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 a2b0eb5a996..1965985a0f4 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 de9185a7cee..62a1a10062e 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 037a8beb64d..eed379a9eb5 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 c6cd3f42929..d3aa349ddf8 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 95ec0b9a736..6d5f3d1fda0 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 d18b4fc24b2..bb1ef997927 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 a024e7239e6..cafb24971b2 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 6aa412a9377..564a8b3b54f 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 f1e60cf2771..2143395781a 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 4f8e8b7d42c..faa7f877017 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 d4f0f0c652e..d6b4c65a3c0 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 739a416730d..6f6f4d40fcb 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 02845514edd..ee8ed616cb5 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 f3e0fb2cd5e..23157930101 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 dfc6a91d1af..0bad67e62f4 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 033fae020f1..ae7d2a7322a 100644
--- a/board/freescale/common/vsc3316_3308.c
+++ b/board/freescale/common/vsc3316_3308.c
@@ -4,6 +4,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 acd5343b21c..03679e723f2 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 073f3ac7043..19f6e8700d5 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 5adfecd2650..8ca220b8405 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 9b97d1e5dc8..4a038481321 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 0a1f0291fc6..9d67ccf3a6b 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 430ce5f4ffe..d78b678940d 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 552a25c2a9a..5d9a0d40851 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 38a981cf8b2..47982cc274f 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 38a981cf8b2..47982cc274f 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/imxrt1050-evk/imxrt1050-evk.c b/board/freescale/imxrt1050-evk/imxrt1050-evk.c
index b6a0d2567e5..edc7fb176bb 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 d854b511557..5c53882ccea 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 1ae822e5107..c03e96b4932 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 d29a3ad797b..c0fc9aadf04 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 b2709be8bee..00125728626 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 032207af8ad..6d923cc6e8c 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 2677b7928f5..f16e036d0e8 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 45b1f373a74..f3cfbc4c39b 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 0ce41d3e4e4..e9f3766735c 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 321222d68d7..0e07df52119 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 c21a2ce059d..fd9549bfbc8 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 54ef75347f6..f42b5022c4c 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 334ba7350c4..9399307e505 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 26eada9b498..229fc9cc30e 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 fffe78c301c..3fb2c4448c2 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 bbb70a859a1..df8a7c74a3c 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 72ce872c751..4571a228c59 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 8b86e44c902..6b55aefa1f5 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 5d78fea3368..3976f759205 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 bfbb8a5fb7e..582c5b4f35d 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 da974956640..4746b1e5b53 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>
@@ -303,7 +304,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/freescale/mpc8569mds/mpc8569mds.c b/board/freescale/mpc8569mds/mpc8569mds.c
index 18e0d87a488..762b0c176fe 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 13cfe159ae1..38c8bfd55d3 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 fc331a995ad..cf02d37b019 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 42b8cab3627..9b96d0d33f2 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 57f91a42f58..3f070353c36 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 381c1ca808f..ba74592e4ea 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 7f7251009c9..918b4b9f6ac 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 244a053d7a4..d10160d17ab 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 a30a0738dc3..7a06c7af3dc 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 fef7b8142ca..61a9226eb3d 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 c3a60d6087b..ba589d4cb10 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 4a3be4c5690..49ea21a83a5 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 8c5da0bfdff..77e5a25915c 100644
--- a/board/freescale/t102xqds/t102xqds.c
+++ b/board/freescale/t102xqds/t102xqds.c
@@ -10,6 +10,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 2ab6e62c5af..c389865fc02 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 c9639e91701..f7eef5ca917 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 ae365652c2f..c9d8e1fd44d 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 a156d2ee09a..6a4b3510684 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 5a97a849480..3317f99c81f 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 2151ede7f91..e7d30ce89c7 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 <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 737c6a2c5a4..4804e309bea 100644
--- a/board/freescale/t208xqds/t208xqds.c
+++ b/board/freescale/t208xqds/t208xqds.c
@@ -10,6 +10,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 78316ffe84d..6a09d1cd221 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 5a6d0eb69b9..4fdd69d4247 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 8a9f631e8da..810868ff394 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 877a9a6e2ff..491ca04c285 100644
--- a/board/freescale/t4qds/t4240qds.c
+++ b/board/freescale/t4qds/t4240qds.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/t4rdb/ddr.c b/board/freescale/t4rdb/ddr.c
index 3b67186cc22..5b7d10c9798 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 94e28b3f550..9b905f06b5a 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 64553c0617c..b7e06915425 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 a833657b152..ae467161f12 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 6d9565ccfe7..4179f0fb5c0 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 2ef213ce0f9..acbd200c3ff 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 3ccd65271e3..e0e4bac1612 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 027ad1f57e0..699241b3e62 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 d40c08d9e94..516f4e8edca 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 3da5005f403..ccad907271f 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 591e08f037b..eb06d224711 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 7e1e6ce85c0..9a5d3c11e14 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/veyron/veyron.c b/board/google/veyron/veyron.c
index 4a847edd89e..02bc5ed37bb 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 2a50b8458a4..df0f1104bfc 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 e486f9d7d95..b02e3f0d4e5 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 01c8691f312..c105da58374 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 23bbdcccacf..bf98469858e 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 bea9451aecf..d9c9ddf2bac 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 4bec2be43fb..b1939f8a56e 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 7083b6e103f..a97e97a5654 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 b979ddd2965..728ee83a582 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 fc3ebaf145e..bee99667ee5 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 41fa21292e7..30665ea9924 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 726111d7d39..4ad62b73a6c 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 72284a26898..c9acfcb1a56 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 5fbd8fc6cde..a5345360fe5 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 2ae64b1c33f..ee56497a051 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 fcee21713fa..72511e401e3 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 5aac0404bf8..b819b049f4b 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 aed08b42321..9eccdc4a832 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 3c7bfead249..6464e86c455 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 5aac0404bf8..b819b049f4b 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 b92f0974af5..0a988cb7dda 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 a9e4d21e7b0..a4c4259eeae 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 e552877fdcd..3f0e594b9c8 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 5ebd6a0c099..15fba13e0b7 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 7439aa56ad8..ce3cc6a3eb9 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 236342c8d70..ac7c5b0bc53 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 414360fe479..b80688ae864 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 2b21a29de15..e006774edfa 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 7909ef5c183..abb76585cf8 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 9abad3f8249..7a8e57b6cc2 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 c54de9fc12b..7f7fb070f65 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 eef46b0dc44..69aa2120e12 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 a900ad1476c..9639f9a306a 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 9aa97f0f2ca..7d7e722892e 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 9b6502386e1..0a5773676d5 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 ec85f707c19..b01c93639fa 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 84ff936e4bc..ad5dea7307a 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 ed9c5b50d92..c56a87b083b 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 c0e14cd5aa4..5883859e46e 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 d053eaeec34..2346564c7d0 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>
@@ -49,7 +50,7 @@ int dram_init(void)
 	dram_size = fixed_sdram ();
 #endif
 
-	debug ("    DDR: ");
+	debug("    DDR: ");
 	gd->ram_size = dram_size;
 
 	return 0;
diff --git a/board/siemens/capricorn/board.c b/board/siemens/capricorn/board.c
index ef6630f4f0b..8c614253842 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 0d3701c03cc..2e3ae1a54da 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 03768201c3a..28a974d9789 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 792b9137df7..d86a913e5fe 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 a2d7b1a1c8f..2660735ce78 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 d124d96b14c..6dc3fb38daa 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 d0948b7962f..ee6a90c9fdd 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 680f69dfd16..92e3d40a1b6 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 4b71d400560..85988acb241 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 df907426d2e..ae5e1109898 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 6aab2e243ed..0484c3c2504 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 6aab2e243ed..0484c3c2504 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 00823d2874e..5681d2900e6 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 e210824b4ef..f8d5dba91c8 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 6b6bb70e3cb..1c74bfb93a3 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 f443c21e6d9..235f29565f9 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 72125c6ef91..d4a949f973d 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 f79e7747e28..99f9293f7f2 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 4f8bf5e778f..bc8379cccf6 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 7e7effe56e1..561579d056e 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 3938dea4300..429668404a3 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 4848fa27a5d..53cdb6e4d9e 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 c9413af3501..9ebecfdbf58 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 3b7fa4b237c..3d803816466 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 15f8dce2f16..0b5882c0d89 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 b750d66aaeb..5e6ba69c0b8 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 6cecbe5e281..22517b9c546 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 3c0e16460a7..08700391b1c 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 02b3d2dea11..77fe7e243f9 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 54d15accbd4..7949eb88c07 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 b338a527010..d57aa3e5d1b 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 3dd60ec8274..4641185ceb4 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 604faf2131d..a3fd2fc8ca8 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 65e69c80130..f55102a072e 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 f87e2e91059..ed7006dba0f 100644
--- a/board/xilinx/common/board.c
+++ b/board/xilinx/common/board.c
@@ -5,6 +5,7 @@
  */
 
 #include <common.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 0f81df3acc2..4e569e910d9 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 86f52f3355e..1a83c1b630c 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 1ed6b2aa929..481f012c282 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 33589347da3..10984662b68 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 39606e32546..76758237c00 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -9,6 +9,7 @@
 #include <cpu_func.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 18533efc0dd..c9d53c049e8 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 d99a6980125..e03218066bf 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 0ad23231cbe..6040fa5d95d 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 0908512d9f5..164dc4cf877 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 2e14fce1a90..76ba53e3439 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 ac15856f8df..bc15fd8ec47 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 3c7dd4db9b6..ce1f59a740c 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 dbd08a06b2f..8060e753ebd 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 c7640c862e9..9aeb913ff37 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 88f49566108..9d2a27806e8 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 4d3e5609c03..d0ebcb22e26 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 452b040dbca..240871e8089 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)
@@ -411,13 +412,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 +612,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/fpga.c b/cmd/fpga.c
index 47307bfc895..8ae1c936fbb 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 24053e6ad98..4fdb3135fc1 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 e00ce58c527..d5faeed1a9d 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 9ebbdd31284..a51f781a462 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 91e89eacd32..13641de63c9 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 9fca08562b9..5220142b9ab 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 7539f07f08d..bbc24824b9f 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 3e8ddd61b45..ffe6eb8c0af 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 1d81ecfa6a4..770dc24d2b7 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 367df576b82..727837d9cd1 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 5b0b79aadba..b6c709a3d25 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>
@@ -154,7 +155,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 +171,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/cmd/spl.c b/cmd/spl.c
index b8e0aa42539..28b40dd31e1 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 dd49d0e00aa..fa7c48fb9f1 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 756aa9eb3ed..623b63b0f94 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 a6a4636ef6a..ebfb25cab0a 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 25f98acdf70..2eae14f87f1 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 e798b833dd4..a26b653d61e 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 72025bb552c..4943f26d53a 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 4ea9be6da9e..9d7b6b8d536 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 a53a5e518dc..f16c5dfd329 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 63287bc3b2a..11b1c373121 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 ffa4d740eb3..dfc2a3117d1 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 c3b3ee371ca..2ed7521520a 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 08675ffb61c..55296483f76 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 817f85a7fee..5f87358fd85 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 02b1f013863..7def38169d6 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 358e9b7fe11..7d91316a0fb 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 d75908aae2c..4f49f15bfdf 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 41305d8aa69..a9933081007 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 e66471ebd1b..249d1f19411 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 cd60f9a1e27..d23cf67f194 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 dade68faf74..856caf65229 100644
--- a/common/dlmalloc.c
+++ b/common/dlmalloc.c
@@ -1,4 +1,5 @@
 #include <common.h>
+#include <log.h>
 
 #if defined(CONFIG_UNIT_TEST)
 #define DEBUG
diff --git a/common/edid.c b/common/edid.c
index f99f42dc406..553ab8fd01a 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 fad551fdd64..3778de53686 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 cde648d4b88..bb82385c1f7 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>
@@ -41,7 +42,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 +68,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 +76,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/common/hash.c b/common/hash.c
index 34f00890b49..8c00659d252 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 72f3c4e0faa..daf3eea5f96 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 1d2263de5d7..b63e772bd6e 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.c b/common/image-fit.c
index 68d85de6554..b6a4188596f 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 387268d975e..736bb757dc5 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 4bb79219d4e..f51a1e67db1 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 4acf91e623c..02f2db3a99e 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 ad5f307af44..1a246c492ce 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 eabbb70128b..34f0b490938 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 2db067876e4..9b86b09832f 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 8408ef09b69..ef2e507a589 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 b83e3bb54ae..b54b4f0d22e 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 aa371ab52c5..c2eb097365f 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 425a3b00c4b..ec0f251ca13 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_mmc.c b/common/spl/spl_mmc.c
index cd0c2b24efe..5e8a5fe64a6 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 e81279aa1b9..48c97549eb9 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 a9b6b07ab30..e140a6306ff 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 2737dc9bff6..00fe869b3d0 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 8ba3d4027a0..93cbf47e822 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 80572ceec2d..df1d5b43d8b 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 806bf1327ef..7d1da69c021 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 7a374bbfcc3..2744fb5d520 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 e29d579b0d4..08837b38fc9 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 f8572780184..8ce0a09ef3f 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 414e62176bc..284512478f1 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 2ff15208a70..f51ca5ddf37 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 54ecc9b53db..2119204b982 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 349e838f1d5..6f40d9cd9b2 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 c642b683e7e..354aee76b4c 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 a6221ef7164..b316807844b 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 e4b48f4643f..1e60f3ffc8c 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 bb0f6e20469..f6a31025dc8 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 3ae733df431..7c69a1d66ba 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 cda497e04a6..e01ae745661 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 d54acc96ee4..2bb45606dc7 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 48a9d00d147..8be1826d405 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 77b932aa039..989690a33e0 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 df3f1efa397..4808287ec7a 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 0ef70d0d59a..e8f2d36510f 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 2d496305d09..77508aa5bc7 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 cebb165a476..9fccaea275c 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 71ee0c04efa..17db64009cb 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 4a7ffad6bdf..7e802170d80 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 06c42006ee8..b28351f1adb 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 690aa7796b5..d4f6a4d6b45 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 a6f483ed251..42bcae6af26 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 fb806b53d44..d1dc35d0492 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 4bda74bd067..b19375cbc8d 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 6a8f789ff08..b6fc72fe983 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 01b3b37a07c..3a41a03feac 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 85de4e440ce..ed50fc530cb 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 0689db7a5bc..34ac08d59a6 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 ee760a2742b..a3aa0cf5595 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 db89fa3a358..076a8bb2be8 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 0aab7ee1914..3beff780de0 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 5fedec549d1..63153fa6608 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 f4a441ad684..e5b07c73867 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 a80f259a72c..c0610940c3b 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 c3cb2ba0146..af9d7243693 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 6b55ec59d6d..0f5f6754d90 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 4637b9fdf15..4f2ccefb2e5 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 82241d9f3f5..7a9a6451374 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 71878474ebe..276e4fb3365 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 4c477a488e1..0f55ba751c0 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 cbcfe3a89dd..6d604cd82c9 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 18d06b333db..f147392fa1a 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 7e478319062..b16e068c364 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 cd9ddd0ddb4..649012053b0 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 82e589e239f..ddfc5f6e68a 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 4ca1cc0d52a..a699a3664c3 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 e0eb897da89..2313ac0bc04 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 e85ab1f9a06..4f80bf6e522 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 3e99c528de5..494156751da 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 bd0d3e4f472..11d194363d3 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 671054d9bef..27a652a625a 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 fc41a028f6c..66c9601b0c1 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 eb43971ae6f..2d8e373131b 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 a2693d2f7a0..3d7aebb8e56 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 a6b09d21095..54fb09fda40 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 0db4539a1f8..e6b2fb40da2 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 44ca52c013e..fccdfe42536 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 a5b61a190b1..0a1495a464e 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 dfce32e2836..c44969a0736 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 858be85d15b..d6837524030 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 7035b59a137..a42db939b0a 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 686d94ebfe8..e85a2d64129 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 e781e08d9d5..6d2fdf71399 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 fa519a44300..4c77c8da1a8 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 bfd7620dae1..3ed0aa92cb8 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 a2011dd37c5..8e1af1caa1a 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 7698613877a..6ad684c10b9 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 c4b45314ec5..6dab5097c1d 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 b88534145ef..04d85b4b6d9 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 6e085c41368..2d722405b27 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 a6f7902941a..6d1974844bc 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 2b82a40d281..6b00e77012e 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 ef33adbf294..dfb9fff2e5f 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 81cdb8ee9c7..762c9d4f10d 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 c0f1285e4c7..5889cf862e6 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 8e867c58dfe..28613a971d4 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 2cce1b967d1..f0a72f1a725 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 1f623765956..40a3ea7745f 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 da9c48b962a..def3baa6fdf 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 6d4aeb5315d..77fba5357f9 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 6083f14e751..09a7cf470ca 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 612fb1b972f..5a98a3f3f0e 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/device-remove.c b/drivers/core/device-remove.c
index ff5b28cb6a7..e90eca42c8e 100644
--- a/drivers/core/device-remove.c
+++ b/drivers/core/device-remove.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <errno.h>
+#include <log.h>
 #include <malloc.h>
 #include <dm/device.h>
 #include <dm/device-internal.h>
diff --git a/drivers/core/device.c b/drivers/core/device.c
index e64dee4ab77..50ba7343c1a 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 457e1309c54..88244698b0c 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 33811e62f7a..dfcb868f650 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 68204c303fb..32665193130 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 acd745c1211..1374447a6be 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 4e256d99260..ed8b73e8b37 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 f1f393c3598..6420e6ec448 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 96a5dd20bd1..80a14e0246a 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 a974744a613..4a214eff7cc 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 e85643819e7..b0cc3c03c9a 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 15f0e42a85b..b5cd763b6bb 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 58b19a42109..481044cbc7e 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 457f77b7c89..838710a6f06 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 1e584577421..c1a7a555c67 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 28ad0aa30fd..1dc7ee9fdcb 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 b5321ed8206..261d3efe84e 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 731c7484431..c76574919c7 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 c2059b8b0a3..d6bd861251e 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 e63def8b2de..953deec9ff7 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 c5c76e319fa..8d93779dbf5 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 9228149863a..e2d9216cfc7 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 46b9f1825cc..4ce85b32244 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 626fb724d4e..a0f25d1179e 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 d1dec582959..7e8c0154e54 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 314c7aea00e..ba588e96af9 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 0b36d6c027d..91f76e03c2d 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 1a69b0328a3..491f689c44d 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 35bda9b34c8..2dbde49a9c3 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 e9eaa1e0afd..abe8c11d141 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 98ccbb70de7..ed60b226dfd 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 50fd998425a..ef430ae1358 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 ad91ba63a83..442f72c2709 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 47b4d7663f8..8464438c544 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 2aa53d116f3..3d5f27ef587 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 17a4a8282b7..2b8475fcd16 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 8c82d524a3e..ea8bcbeb516 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 df5bdb6e08d..16ff6eeeb95 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 794ff55378d..8533b28c258 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 1ab15c98f19..4b39b17f72d 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 952b296dd8f..b4f3e423773 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 934b72b08c5..737a879e938 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 b9179315f25..c000a45f8ea 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 b27079670d0..7d6e08d3d16 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 af8c1427d2e..bbddee6ca89 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 306af82504f..f2a997b50a6 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 9ac7ca923c7..d5eef535739 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 b3e63834ca8..5ebf54f5f4a 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 f5fc964d6f8..22e0cc4d917 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 9718f18c302..8d7ac79b28d 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 0a64dde8849..0db94212b90 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 cc3a77c850a..9dc911c3355 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 13df9126e77..0e814a51f7b 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 bf8d67616a6..30a5c354885 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 cd364edabb7..20614894e1c 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 31e65826551..17bfe6a7bf3 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 98b644680c8..8686c998457 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 3b8439b836c..6c36f03254f 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 df50196dfda..a298c2c4399 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 8cd466f02e5..691d01c7ebd 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 58b94348c95..b8d24d203be 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 e5b35bfd5f7..ffae4bb54f8 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 ea8c71f100f..62605bcde50 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 70bdb650711..cce0c611a8d 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 d2b0b63ecd5..8cbb3640427 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 234a7d2134d..838596b24b6 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 b2ceab2eeab..6e28bf913fd 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 94fab4e5e0e..b2f8932e1c7 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 35e7165c173..1bba763b64c 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 572abfa536f..1dc179ad4d1 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 99b2e5dfed4..b3ed7c04d4a 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 7c8f5185095..bb27b3778f3 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 f7e55568053..fe3dfa12335 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 6c6e5c385af..adc60919f3b 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 30bec7feef7..2cf4a602d74 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 6a3ad6a9690..272f6d5e5fe 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 d8e32508d48..802051069e0 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 236a730804d..650b1b136eb 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 8ab19e0c74e..b96519e1a46 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 4b0334b6beb..cbebefb55fe 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 a2a5f9cbbe0..b995bcc008b 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 6370cafb23c..e9bf3a61803 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 e2374ce1e76..c6266b88cbf 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 e3439eebb5b..7b50a34b3f9 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 0a22441d38a..3bd943f97d4 100644
--- a/drivers/gpio/gpio-uclass.c
+++ b/drivers/gpio/gpio-uclass.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
 #include <dm/uclass-internal.h>
diff --git a/drivers/gpio/hsdk-creg-gpio.c b/drivers/gpio/hsdk-creg-gpio.c
index 800027f18ef..8eeb3849c2b 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 37299ecd0d1..95f8b2ba6cd 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 67b8b80b9d6..711fea1b587 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 ad08b3aa794..73d98fde554 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 c65ca817281..1bbd212b4fb 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 405e9ac135b..3094f1c804a 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 e93f6404880..7c790bb64ae 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 74a773c099b..51df5367ea7 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 e4b5383d0f7..258f13395dd 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 2ef5c67ad59..18cdb3c7272 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/of.h>
diff --git a/drivers/gpio/sh_pfc.c b/drivers/gpio/sh_pfc.c
index 6320a6280d5..0b412c2e0c8 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 f55f834e7d6..240adc488a7 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 a730f5c4fec..912577a5719 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 2389abee377..014f120d609 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 61d226bcbb5..9da79455ed3 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 c84d75ac922..9e6dc02b61d 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 501e602b278..c593540ac13 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 2c77234c60e..95b6061ce2f 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 0b5e70af591..79f23b41e8b 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 50f03e3d905..bd34ec0b473 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 9f201c66d05..59fc9a3c091 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 097c54388f8..7e3c75b610e 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 ac15da2c67f..642df972e5f 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 ae5aae03e72..1b70e140545 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 4e8fa214739..25221bb659e 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 2aa3efe8aaa..6df1195267c 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 234277a299c..da50d86cc8b 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 f7b59d36f98..674561b4ad7 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 62e68046d6c..c8e42e05f5d 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 f5509fef163..3b79cb40cd3 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 0726b4c9567..42849813143 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 a95b5cc9025..6af2e975cf3 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 bcf45160d8d..2eb1eba642e 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 5029c71adc7..07600c5022d 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 9a3dd7ec4a9..26897554b0f 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 be90a7b24a8..ee9c4916abe 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 63665f09527..88b62959d34 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 382cf4b3041..3b654ef661c 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 a03c465c8f3..bd2f568348c 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 6e7d24d727b..d5be824de89 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 32b2ee85787..703d9a1c7a0 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 68bf93b324a..5907217981d 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 1a4521d5b8e..f4ae2397a03 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 b69d2135939..0fefc115938 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 7d046c1a1e6..4adcc0a7ae3 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 <malloc.h>
 #include <reset.h>
 
diff --git a/drivers/i2c/tegra186_bpmp_i2c.c b/drivers/i2c/tegra186_bpmp_i2c.c
index 793f3f59b5d..ac41a7f0f83 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 66a0148254c..09c0be9dcd4 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 8c1a25c73f7..6f12ec8b0ac 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 98015899f21..cfd8dc64150 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 6ab378b979b..da264f4166e 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 8951e128ec7..4631728b8b5 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 db1a5150361..f19934e6bb6 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 70429b94a49..40ebb2497b1 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 7be4badbac2..52946835de3 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 01b86b756e1..56c3d146a54 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 27a76fcaf08..2be4279c08d 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 af6b8245c97..ef9b61ee626 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 a560209f035..3f9afaed328 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 291f5c218e5..c972d846089 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 25e23eb05b7..19704dd5da9 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 13e642ab703..0778eb52253 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 60f6a38321e..1d2c9798474 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 17b46545f5f..f206a27a79e 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 116c0661e75..8e0b41e3460 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 c145b679318..818ad56a0dc 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 cdd55f5aa85..c00f5f764a0 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 71d03bfba2b..4ad6c8ca66d 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 9dd6a18b2b5..c9fa7abd718 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 be510704c48..153f971bdeb 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 88e486e9d57..56406aa1dd2 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 45eed22f6eb..632430e4209 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 7f17095cc58..69e16a06a0a 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 94a21e08af7..b4c721c6fe6 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 16758a0ef95..6be76ad02ef 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 f9e4b27a270..71c4226a839 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 a7654a78173..c988dd402cd 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 61aa10e4658..16dc0be75cf 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 4cff160d887..44a8b180a43 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 d572dda3c19..2d40621c15f 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 9fe0aca3426..06b1e8d9ad7 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 a6ee9a235e3..18b6e445e17 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 81e26614d3b..f6eb6583ed0 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 980b84453e1..b82fe54c600 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 97e2afa6765..07c67577d54 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 ce2b9251738..4077c46a237 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 db05c8917ff..0ddbb3c619b 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 d396afc14ce..8c95229bf77 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 39c93db2754..dc3dffb657d 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 6290b7fb5be..ba93c262558 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 0cdf5a04897..27c86320f0b 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 9c15eb36d64..5b8416813bd 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 93b88d17d40..6ec454c3bbf 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 c75892a72c1..da230e787b4 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 af404c42484..f1039c180d2 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 64dc147a478..0a74b1fb776 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 b0f5cf58a2b..2bb12ceeaf1 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 c693fb2d179..0b690ecb4bd 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 958ac17954b..8e7745e2332 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 9414eff42ba..17f1ebf5d2b 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 886299a50d7..492bf58c398 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 c3b13136f80..b8ef163de6e 100644
--- a/drivers/mmc/renesas-sdhi.c
+++ b/drivers/mmc/renesas-sdhi.c
@@ -6,6 +6,7 @@
 #include <common.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 a0e1be8794d..d1b293aa039 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 ee6dbe30db5..ea7e506666b 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 b5fe828dd60..24f599e868a 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 899952d773c..e86ea8fe096 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 6556cd5b467..4e350b34168 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 29bbb4b3a6f..bc94d01fab5 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 4851198571c..54bd687a25c 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 786cdc700a5..892222d27da 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 d6c75ea6010..9bcd8ce5f6c 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 b76a7edc0ba..a089dfb11d7 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 9f426661c49..2903d89ef34 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 2b041562a63..731a519e400 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 da3ff53da10..d3860b75082 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 1d32febe07c..6896351995f 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 16cdfe3978a..6be40d04e9a 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 ce921b461af..859c7fd4ec2 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 db20a6b0b24..9360d4ed172 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 5621c3fd266..4ac65fd28bb 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 f8d3f4d246c..2b7de6c03b6 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 56acdbf65ba..9966cad7955 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 996d3dbb710..89e107ffb7d 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 724bbee7526..4416b8fa1e6 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 b8b29812aab..4b815a433e1 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 dfbdbca3aec..ec233b27903 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 8615b112a21..bf9f4be6de6 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 cf97e0f74f3..049bc79e3b0 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 45c9ed4b9c0..c01b0db3cc8 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 49d5e261b56..ebc2bea0698 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 a6e6e0ef6d7..531d48ce898 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 11a22e021d0..734d1c6204e 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 9c4af8a5d63..5b74ef0dfdb 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 6a050501b04..97fd5690f51 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 1c212daa1dc..912fe480e8a 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 ae699d1da51..3fef2046240 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 28db4153f5e..8953002a9b6 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 693bb78b87c..0580b509f89 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 cde342aaecd..eca9edff603 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 084c66e9840..8cbe97ee207 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 5ebcca590a2..de369aa001d 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 b1a38048d32..f85799d628e 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 72b6ee702d4..c2e51f9c68d 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 7b6ad495ace..a1672dc4176 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 ccc0ab07af5..55f86d51555 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 f02a06fc35d..c40ed62959b 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 7de65bc7c3e..61e38ba1ab7 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 8428278e215..9d4337bcfff 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 a3f5e3e1a93..c19df82747a 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 8ba22d81422..b8b878b9182 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 3f7ee59c946..81275deaeb7 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 0f7951c8590..28a362aa14a 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 2114abbe7c3..0bfedd0debd 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 123c2f344de..636edbb4a3e 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 4038b7f04e0..bae402418fb 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 11c9124e310..38f3cbac734 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 a511068d9ae..93b26da3926 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 da6662c7ee8..828f978f730 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 32334785717..fc227edea73 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 261fde00c15..d13eb11187c 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 3794e40b01b..eaadb2662a8 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 11f937032f3..c8393c5f501 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 fe3532930aa..9ddc0f938f2 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 1200049007e..db573c08317 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 f3ac064c1d3..106aa4ba1c0 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 9331cdf9387..f840e114216 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 34e0da1a1b7..1eda9c38009 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 933d1fc2f11..35c2ed9fe06 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 5511b2a8389..158397859c9 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 82b1db3fb32..6c1358568ae 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 8ec7b36f9ac..5aed164247f 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 be5d9add615..81d0f3d7f89 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 9a0c7110fbf..3b667d405b6 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 f70f29beb98..b69ef20e296 100644
--- a/drivers/net/fm/eth.c
+++ b/drivers/net/fm/eth.c
@@ -4,6 +4,7 @@
  *	Dave Liu <daveliu@freescale.com>
  */
 #include <common.h>
+#include <log.h>
 #include <part.h>
 #include <asm/io.h>
 #include <malloc.h>
diff --git a/drivers/net/fm/memac.c b/drivers/net/fm/memac.c
index bed8f14aeec..8dfcb31d46d 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 e161b4e077a..1f77f84990b 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 e66d592f9b0..ef58056a4b1 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 35257366747..3322dcf2aab 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 10d5fc34cc0..835346cb07d 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 85f8d3b419a..52a637bd548 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 d338643e60d..ea9f9470c80 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 718a7dd0193..8fcb63d1a60 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 a3b9c152b25..1e9b0f0f361 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 ec5184edf88..604f676bfff 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 bd588cab06b..ddd1c060599 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 3e82898f46e..cc02b5ffd45 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 f412901f1d4..447b53782dd 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 fe48f371c31..cae31e2f6e7 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 f05fa42ff3f..cf8bf9c8b06 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 217c684702f..8110af2d825 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 7a153997117..59380a9caa1 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 037e59ec6e3..1d1a5e85011 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 75831dfe147..5c8c5e68007 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 a240d06ad45..55145da2bb6 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 73005ff94d9..f1d0630d020 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 ea7ece54b6b..9ef3baed1df 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 b2823701a41..a592ec07da4 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 283f099f863..9e2b145a724 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 bae5f8a4791..66c8cca4d2b 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 f70a2352177..e5edfbeaa66 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 1b5d11ef323..4aa5ac4be62 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 dbb69a0c595..0ad8c63d710 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 7137ac154a6..caba8717be1 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 b990e7fbe22..2f88f5d8bcf 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 e30a7fd5d6b..75396dec958 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 ec81dab3f6c..ecaa2b9f92e 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 50804c130ef..6fac0d59563 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 72bbda54695..9fd5ca7c9fc 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 5aff7ed397d..cbc36509717 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 a27a9cc03ed..e2261d6a11d 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 adc3ac033e0..bf1e832be9f 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 505d3ab6590..6c4381ec6ce 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 8c20da26820..e2feb17048c 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 3aa8891efe4..39dbfdb7da8 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 e966be038a6..d367a1fe37e 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 9139b5b1a10..fae72a1127c 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 bb59629f81c..67be1a3dc3f 100644
--- a/drivers/net/rtl8139.c
+++ b/drivers/net/rtl8139.c
@@ -73,6 +73,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/rtl8169.c b/drivers/net/rtl8169.c
index 27dc233323c..c3413431ec4 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 3707ee35eb5..4bd94c31031 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 c1363923509..4f7e3d42438 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 d75bf546704..1ad3d0526df 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 0f665087c60..8f651fa4dc9 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 09ea586e071..c24ab83c1a2 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 a9874e4220d..26c75067bf2 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 04b01a81298..a927ea03e04 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 1fa520be0f2..fb93548dee0 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 b5dfa8bd914..804797476c6 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 072421062b6..d020aa915ef 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 93eb2b158cc..8bad3519517 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 b0450fff566..09151986f15 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 4b49290f0e4..b15e5514e63 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 f7aaff5e38d..0daaf17e84a 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 5e75152f421..0357aba7f11 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 268edb3f8fb..5fb35a19eff 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 fd61f163282..3bd011518b3 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 c4eeb9b67cb..c3c67fc97bd 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 9486e1cb96e..a52064341e0 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 1467c7ef975..03ead32f3bb 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 e8285bf9363..3b67cd24f12 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 28667bde8da..3f46b7697d7 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 86903166101..c0a53dcc929 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 b566705c9d9..8b67cfa92b4 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 6c15bdfc034..9dddca8efe0 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 f5eb7027232..32fac878a67 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 62f213d122c..80f11fedd16 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 483a87db7dd..8bc04c978d0 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 fbedd4f38a9..f2139d61cc3 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 fa4c4765978..8745f286bd4 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 96d308f7bfd..3b4b276abe4 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 1f216e1c680..b0037911006 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 f62264cbba7..0cca4e6d0d1 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 f34a157902f..dc18d1ca3a9 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 8b313e92786..39b6d408025 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 0d6750beb74..25a3c3870cb 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 cec61fa7d65..428bfcab09f 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 bfe197e7d83..1975004e598 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 d8a32d53f63..c7cd2f5b692 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 612c428cf56..9696c84e4b3 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 2de343de290..a1ff0b773f3 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 ed9f02b375c..a486152da76 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 f0fda0290e9..13e0e7b6124 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 53d1f45bb96..f24e9ff5ee0 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 14ac6bbbb20..3be51a33f8b 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 3b2902f362a..53b55ce7af1 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 9998c07a473..ddfacf65d66 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 c67ba997629..98327557a89 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 c23bc87d0f8..6030031184c 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 1e7c5f334b1..7fa8c8bf707 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 034b47932da..d025188eae9 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 6ba37213cb8..b436c2184ba 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 0b2b2410b27..18cf654c785 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 e201a90c8c8..37c0b989471 100644
--- a/drivers/phy/phy-uclass.c
+++ b/drivers/phy/phy-uclass.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <dm.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 ec597da84e3..2a20f7601c0 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 a6e9c0d933d..05ef24864f2 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 5e154a9f19b..a0625d7c835 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 3166167d71b..c9f9608c92e 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 eb720f09f8e..f44af6cf9ad 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 e280054f945..ba8206350ea 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 bd80435ffae..c14176d4a77 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 b5d74068c57..c6cb941d0a9 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 b37b517fe57..adfc9aedcc9 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 535f491d495..18b8eee8839 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 0b9c9e1d6a9..550de384ed5 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 8d61dfe8639..a403114f21c 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 27f274ff022..ff663ab374a 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 0786afe747f..b45272aa45d 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 06f1518c78f..ce02d28b901 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 32038cea8fa..14fcacdbed9 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 bb56ae9fb34..20ffd249c78 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 043764fc920..afde8098545 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 c5e4fe30a7b..e082eb6a323 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 7ae147f304b..2780302585c 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 abd57e54a5b..0817f7136c4 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 8d37a6f9457..990f6811e93 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 6cb7bb45d94..7a6059959ef 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 75634e9f4d4..7647d90eb5d 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 386a13ed876..63aebdb612f 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 54610a3e901..653e40b354b 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 dfff335e54e..5ed6fcca262 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 7fbbf97b454..48a6c663bd2 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 450b1dfa28f..f461a37a9f6 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 bb21cd7ff82..1172970d1e0 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 6f01a60b346..d198eaeddc6 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 571146e19d2..6461ab23d62 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 7082c80bfab..0fc8cb66d15 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 12cdfcdd1f5..6a938bb9958 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 2b7a1cb8fe3..c2c7c3bd507 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 3a834a9f1ee..4d9a2006e66 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 e87244197f8..9cebc7f3f16 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 a5866703ae3..7ee121dfb26 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 6a662677a7c..4fba7b527c6 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 8cfdf654f74..7c7e9a752da 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 0de9ee712d0..983a6d4a2bd 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 0eb26d29d47..36ee44b9a2c 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 c3bd6c49903..e32a9722a40 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 186fa907e18..8f0f5a6d96e 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 54adcbf50f5..3aa3cce945e 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 2e042982734..31c9139c646 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 abda7a5a404..25101d18f74 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 a5f855ce2a3..4d1e686d274 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 86d7b89b1f0..404fe008fe6 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 4ae4043b943..2b1260ec6b1 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 3e5fc608d28..f4a4bd03d70 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 8e3a8cf870b..9f02c0b6f6f 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 241ab35b630..969ce902395 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 36be119b6cf..6080cbff0be 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 77986c47d75..0c9d9a366e8 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 6cf5f35f0f2..8c6ef83fd7a 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 db68c766f5d..7770171917d 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 87c438ea047..1d834ff7130 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 489af59b417..e03ddc98d73 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 52e6d9d8c0e..195884bde9c 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 f238396d368..d9a8298ebbb 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 f2aab6c4570..1ba1640a8df 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 b5ddd4930e3..db6d0357ee4 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 5b1d19f3e0b..b81df0dff1a 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 e8f3c950bd7..306803f6695 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 5a18dedada6..eeed8e24a90 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 9ecd358100a..e286dd108f3 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 b30f223a5c2..5a0455e1195 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 a0703c9e059..0fee9bf00b6 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 575429aa2d3..850b533b846 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 24a9b67586b..fa92fd84f9f 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 763e671d54e..f9f9659621c 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 ec1dcb64b3d..cf3fbae79de 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 f438dea8fc1..4ea6c346d7c 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 60255eeab02..db8c5a949c6 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 d6d35f3a39d..b56843046f2 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 4030144dd36..f8706227058 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 c9d26344d78..b959c469ec6 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 33b73b7c2f5..637db024348 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 e99331f6c96..a08e2151f93 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 0bcf1a61ea6..6dfec893360 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 12e66ebd43f..171afd34a5f 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 a00ef58129c..3f8be6c8e46 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 19680e2e76d..8c61a41b202 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 1c829d286bd..fed1583796a 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 8d8f3e6f9f9..f5b9544cb8d 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 46888e9077c..66eb0e72fed 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 8a55e4f4616..56215dbf6c2 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 02c3650ec63..5e98d0fc2c7 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 69cdf9444a6..4ab0e21d217 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 6e20432f318..b9831ec8b17 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 8cf74861a8a..8bbd8cfa836 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 352483c4d74..d647a8a2090 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 46449d3d122..e97467029ff 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 2d82a176db7..8dc47389206 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 ac7d96540f8..67f494c7f1f 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 8486653c6fb..0162955aae0 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 4f3ed739fbb..cc9bd02c161 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 23fd7956a7e..2e6186d38d3 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 36e0d2e8404..f01301068ea 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 7b95c954a6c..9d2d3cf510a 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 2e06b526e28..d9b1b24f032 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 d765a46f7c2..0ea3d535534 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 a6ce6f34c8c..9afcff6be11 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 eb78f1198d7..1b9878b1c28 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 3325dfef2b8..bacdd74705d 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 f5b16b8fb3b..fb0a1a83fe5 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 88430299c92..54209fccb3e 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 d308100cf41..c464ecebb77 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 c8a41a63327..9640a81e534 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 eeee49c4ddc..2b58b27947c 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 e9dce0d173a..33b574b1bd3 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 09e050ffb2d..bf6c76d21ba 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 ea56689552a..6527851a7c6 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 f9660d45113..350450d1fb4 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 d1d44f37281..beb5cd8fa8c 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 c1f1e7f70bf..20ea16d37c2 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 a678b8f7456..e7bec9cd7c0 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 f9a432a7a2c..149eaef0e91 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 a61855e9edf..bbbca139251 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 6d17f52ac78..9f2e809aa47 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 70f96355b37..461c0ccb7a0 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 677de0a6f91..a79a4acd676 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 100afc8103b..7c30919215c 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 c0930a624b7..830eda9430e 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 f21bf3b1ae0..48c24ed44d8 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 f5d82b56810..95cd3885876 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 8ec8e462e62..5e38ce5c066 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 348f3886d10..06079d2a9ce 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 ae79be0730d..9bc4a7e0ded 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 bdf53a3de9f..7a6f7f676cc 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 31b3e48e0e9..ab67bc02de8 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 5dda522a4eb..47ed140166f 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 23c6facff27..a33d4533a82 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 e85f42b3a34..c60a03f0bfa 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 e0f0a66c6e7..7ee74718759 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 b6930bd8394..3514e7351ee 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 a33f47525f7..17344d4d4ff 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 9b31048e972..7a0735e4cdb 100644
--- a/drivers/rtc/ds1337.c
+++ b/drivers/rtc/ds1337.c
@@ -12,6 +12,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <log.h>
 #include <rtc.h>
 #include <i2c.h>
 
diff --git a/drivers/rtc/ds3231.c b/drivers/rtc/ds3231.c
index eb5ce73a761..5b72e86768a 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 b68ea223f7f..67c2b6e320a 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 d4b33e59d69..a010af411bb 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 960348bb3ea..706b7188cf8 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>
 
@@ -109,9 +110,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 +121,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);
diff --git a/drivers/rtc/m41t60.c b/drivers/rtc/m41t60.c
index 532d2105e12..692042b9351 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 f52e1291a98..94a6b523aab 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 f6953505a5a..bd2a4022f8b 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 84f2b231c23..19faefba7c8 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 8bf04f26a37..1b6717232c7 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 6a19fe1d23f..515ea8a8d5c 100644
--- a/drivers/rtc/pt7c4338.c
+++ b/drivers/rtc/pt7c4338.c
@@ -19,6 +19,7 @@
 
 #include <common.h>
 #include <command.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 a0a238aedda..926cca234e8 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 87c4320d5f4..5e1689a91d9 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 2ab40f08336..7f56b155fc3 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 ed6aaa52377..ce23427b174 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 949e364e78b..0ab1d441f40 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 a2f1b356295..14317847005 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 dd3e511fc91..b152e102587 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 3b53f5a97bb..9d7ed5e88aa 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 e63f2306f03..778a04d87e0 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 4d4d9193586..f7997fc788f 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 5a02f0c8feb..fcc47fb348f 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 c972f1e9af5..27d3ec9dbc3 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 016082814f6..a9f5c3c3ea9 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 e4e4c392858..54c718a0a64 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 b24a8f128f5..c3953fdf855 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 3d577401bdd..adb0b2b104d 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 572ef693cc0..92e19452f14 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 101046f9c20..f446a140b22 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 332254d5aa5..5b4c489f4b1 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 5505c351666..29afbbc5c43 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 9e08e96670e..5037f9516fa 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 5480dce1080..31e67ee6724 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 e5df8ca0d2b..5e8ed6d8967 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 a092dbc4458..94058e603d7 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 64776055d9f..16aa9dfc5b2 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 104584073af..aa1d6bb209b 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 b6952675bde..473cedf7e97 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 9034a8385a8..0686add3c8b 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 d9b3a38f18c..9aeeb809680 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 dd3f9db4f75..b0eab233916 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 c71fce9bb1c..26d457255c9 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 8022dbba642..5cf82250da2 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 7c2ed53f5a7..aef6a2eb147 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 b290c4e8791..367e1445417 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 e24deb4f71f..11d745f53a6 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 e0cc3234440..328b16c277f 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 f88702df4dc..afc7be0f01e 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 719f53d08e0..acc1a493c4e 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 83b114ffe74..9c838a8191c 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 0a5af056143..e0a2003239b 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 923ff6f3114..dd9c77281f1 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 4d2c106440b..3efa8dbaf02 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 2dc16736a3e..09044bd137f 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 d682a11013a..cded7a8ddce 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 a68a51945e4..c85253dc715 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 7444ae1a068..67544ff522e 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 c17b2e30d7e..f421edbcbbe 100644
--- a/drivers/spi/fsl_qspi.c
+++ b/drivers/spi/fsl_qspi.c
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <log.h>
 #include <malloc.h>
 #include <spi.h>
 #include <asm/io.h>
diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c
index 990a5ffa513..537c7566024 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 c725625146d..d364e463334 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 4b09366317a..595ca7801f1 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 3d551694cb0..ad159955734 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 1bde31ad349..39ae7a8bc40 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 c3c7b804267..37327ec508f 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 90e85c6b446..df9d9da1a9b 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 1469771619e..73a3f91efc9 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 4d1317c3646..4865fd91f8c 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 ee44973c7fa..635955e819b 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 4ec6683de19..88dc1444e14 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 95eeb8307ad..c5842dc9261 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 6b610ff8231..b0a46c88681 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 b80f810bd15..af0dd7150f7 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 83dde4806e0..765f05fe542 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 e900c997bd7..d26c070a581 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 c59fee10a89..85b662bb0ad 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 4a02d95a34a..cffd9cf0b0e 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 6857a87dc5f..ae62aebc02c 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 ebf2b98fcd4..fdc9f952e7f 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 bb34b20f545..27409186b0c 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 0e68d33be65..3a1ef8c0935 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 ae2fc3e76dc..f09d9603d84 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 6e540e97df4..c810dc421bd 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 ef39198b43f..f25fc363acb 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 153fbb2889a..57d41b778b2 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 2b5f2cf5483..4a568cb56d6 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 9ad1927a5d5..8451f83b706 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 0b2b2f48103..b59b876a626 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 5d15072d498..f12c6f766da 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 e7fcfcd4d1f..3877b9bc125 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 9e990339a6c..d43c7b70034 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 d0336a1ce55..ee941c77706 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 ed9a49ad08c..d7280eeda86 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 39f4671fad7..ff08d356bfe 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 1fb3c16a141..112e2168834 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 ec908199f86..691cad9d458 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 e50b85bd594..da3fca90367 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 72cb58b6934..3ef56f144e8 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 7534e0363e9..7a5a4842527 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 04596ff1174..890660b44a9 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 b904a7d426e..34a8bdf24cc 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 1b11c93194d..ec2492014a8 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 4b79d4ada08..3197e0ebcd3 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 b5fe43ee50f..b007c7ec6fc 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 30194bce078..da4269a56ed 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 0d380375eb3..c8f82658135 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 f6087e76338..8e7b297fe21 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 24e1bc2a19c..bbb18e89e0f 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 f947e6983c0..21577089a08 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 6debfff513c..0759ec774ab 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 3e116b2c5cc..ed33d7bd7ac 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 832bcd70ff0..1fc899d391b 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 e445c705f18..8945abc396a 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 399d1d3c17a..9c305f46e94 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 7f150340c2b..21bf3bda48d 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 32bc9a16983..f562fb7eca2 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 50da6bda8e4..e3419e2fd47 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 448f5245d17..5f56f6f2dde 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 00706bea86f..b4a56390b32 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 418139d43a8..94c6522a411 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 fe8cc6acc53..1d1b64ef3e2 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 afe78d44a38..0a283619ae5 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 a9e0aabc61f..b8fe65237d5 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 8dae5097b8d..1454d98d8f8 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 ab6411f561a..82fea742b06 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 d76e2ff5bbf..e368ecda0d7 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 b2b279358e1..74b8e0c5ddf 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 7e1e51db967..3781d25fd6d 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 496abf38e72..51b1a894cc2 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 d4fbb75cc9b..e3147c98a1c 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 43ee756c0ae..20c2309f0ac 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 a4a57ba5f59..4bedc7d3a19 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 d1be3f5e137..384c0f6f6e2 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 5250fc8b264..1a181bd6c63 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 0c4c83f89d1..9ae02ae78c1 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 50836db4a04..53053a17b02 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 dea17b92099..900eb963776 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 0866ef65317..4211eea3a4d 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 e9e1600a1a5..c71c1a67435 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 6e1e57f9fda..bce5aeb3649 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 eec639f8c07..13c327ea38a 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 f40779b13a2..5674e8fe494 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 d048a42d3df..7bf3189e0dd 100644
--- a/drivers/usb/host/dwc2.c
+++ b/drivers/usb/host/dwc2.c
@@ -8,6 +8,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <errno.h>
+#include <log.h>
 #include <usb.h>
 #include <malloc.h>
 #include <memalign.h>
diff --git a/drivers/usb/host/dwc3-sti-glue.c b/drivers/usb/host/dwc3-sti-glue.c
index ad7cf6e6b53..4e56c6bfe1d 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 85a8adf8065..2ce9f27b862 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 67eec0e0bb6..f9083d9a64a 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 fabc662eb61..9093e029ea6 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 a01da4da762..f46bdb441d3 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 ced295ef0fa..75d24ae0155 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 06436818461..304a3437d56 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 6ec25fc80a6..3773f38165e 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 8efe6b63b97..2c9382fa999 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 0b32728c574..82f99e924e4 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 1993ad620a8..1254066574a 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 ab459c8cc92..a5061f7726c 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 450caf056c5..7dd5c33c13d 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 f93ffa8d9f8..8f5bfd5ed89 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 702f3b56702..55fe6fec9a6 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 a16cf135e31..ba6eecada12 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 04d5fdb2a86..631711a9e8f 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 8ddced3d107..afb9e29f788 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 8fc9d211db5..d790839fda5 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 28ee4b093b6..beb62ebc0c2 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 85216515886..389fe748a0d 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 c1c681ca6cf..eada0b1a328 100644
--- a/drivers/usb/host/xhci-dwc3.c
+++ b/drivers/usb/host/xhci-dwc3.c
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <fdtdec.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 25c30c24f09..76aa431243a 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 9e0c1b76e44..d8fb2c53450 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 93450ee3b74..c282cf0be33 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 2b871046ae6..5fb74848c25 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 25b195f7d1a..501129d769a 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 b095612adab..9fb6d2f7635 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 d86584b847d..b3675bb1db2 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 3cd6c8a0dcb..b6b7c29b3c9 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 b67722fe45f..1c2bf04df32 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 40dee2e6d9b..6cdb5c3df57 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 2ddcf33b5f0..1f6e51ed983 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 f678aa48265..63ce8a5655c 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 35d2123ddde..435dca60015 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 79e8222e3b3..93f43ba4714 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 0d34dcfc5d1..da63cc2c224 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 98bf7369787..1c32f3fc068 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 00759f3e832..b2aaa35264b 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 adcd319b6d0..632a9882b3c 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 ec998901ab9..24ea8d8c312 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 67cdebc0fcc..26299e04d54 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 e0fb43f89bf..e8499bfdeec 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 51c1af587f2..c48db7d13c1 100644
--- a/drivers/video/am335x-fb.c
+++ b/drivers/video/am335x-fb.c
@@ -11,6 +11,7 @@
  * - starts output DMA from gd->fb_base buffer
  */
 #include <common.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 0fd74fdec96..4ea9dcb59d9 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 8cc2eb1973e..f66ce2cd635 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 fb1525b478c..67fed7f224a 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 ea5a4529cee..0888cb00197 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 3e3f0e2ce6b..6a30a5e6a65 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 3c5bf7b659b..52e7d697eca 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 59f0649646e..4760f04108f 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 5fecb4cfd56..bd6635ecf5d 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 86c4c10b386..fafde7df4b1 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 e87c66d515f..2a72d23eb87 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 8918d837238..6495e22b1aa 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 6d7661db89d..5f7f03904b3 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 5fb68865ef4..c21da6ea060 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 bf74d6adf20..daf0024c640 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 653cb472652..47441a35a64 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 2781f6f55ba..c20d3c1346c 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 802703750f4..b835b5c3835 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 8a8c846262b..d5b13a6723f 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 ad5ef93e01f..042aa9a5b9e 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 adf3d968b6d..48edb9c55fd 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 7bc4bc60418..1e2febd7964 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 0af7c2bf44a..f02fd13d28c 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 cbe1984e4f7..0f24de9bf84 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 5c7722962d7..2274976c6c0 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 f8ed0a9fea2..4044473f998 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 6b986e93583..18814230915 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 74a23889242..8b458e28dc8 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 ae2e6288f3a..288b9065445 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 01bfa4bcb8d..3b5b73b7c3b 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 89e859b02a7..e7366dd2fde 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 fbdec3af67a..d2b5e48fb9f 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 a984443ef9d..4b8712fb691 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 dc8a55f70ef..d47c3972585 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -7,6 +7,7 @@
 #include <common.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 742579aba71..149fbaef060 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 92d6e3d4676..67f5266164f 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 51eb41540bc..f835f4d517a 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 f4444b9c348..1dc53bd07d5 100644
--- a/drivers/video/rockchip/rk3288_mipi.c
+++ b/drivers/video/rockchip/rk3288_mipi.c
@@ -9,6 +9,7 @@
 #include <display.h>
 #include <dm.h>
 #include <fdtdec.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 74ebe770a95..020e89b3dfc 100644
--- a/drivers/video/rockchip/rk3399_mipi.c
+++ b/drivers/video/rockchip/rk3399_mipi.c
@@ -9,6 +9,7 @@
 #include <display.h>
 #include <dm.h>
 #include <fdtdec.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 1d5b3931a65..d5a7aa8ac1b 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 8703df0ec08..b6cad362de7 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 5b44a7e8c97..f27cdf8ed4b 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 cf5c0439b1a..6f558d6db2c 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 f9280e86070..d03d28e3c9d 100644
--- a/drivers/video/rockchip/rk_mipi.c
+++ b/drivers/video/rockchip/rk_mipi.c
@@ -9,6 +9,7 @@
 #include <display.h>
 #include <dm.h>
 #include <fdtdec.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 e1bd656beed..45385b175b8 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 1196e6c6717..20248e66075 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 c3c0e847327..f588584229c 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 1679d200024..0c5b40c30b8 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 ded03b109c9..fa4efdb2987 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 be7e9bff01b..ff48fd7af92 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 4cf3a0eb751..e8da302303f 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 ba34f1a107f..0d20e82ba32 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 c87c919a52a..546b863b64b 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 619f5892f58..49bf083a8d1 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 82ba5c4e7ec..1208d912868 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 a552f38cd07..0aa9541101d 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 73e0651fb9c..e90210b695c 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 8dc3df61aad..0d35a3eb621 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 dd6786ffae4..d30e6db6f6f 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 eed61cd731c..bf396d10918 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 87682280294..eb9636541d7 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 23f281cd6eb..d4ecd16ec84 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 60ece133abe..184c5f0a597 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 d9be2601bba..79e62cfb628 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 4673f4ab550..32ce4ea5aea 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 45c48a927a5..7130b8432a3 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 4edffa6f31a..fc3e19cfaee 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 7b0579344c8..d515b4c5366 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 5e5d6b3f6c1..90821cf73bf 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 042b3b5ce0a..9478c93e9b0 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 fe2f6be5a74..7e11465a570 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 48433cc1589..18756e34dfa 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 9f14e7d7774..ee77f49a944 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 775f06a6e1c..0d28af047b9 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 076d801f5d4..6aed41642de 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 5199d914edd..ed8b2199c29 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 885821d562e..581e1f16938 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 ca3ccbe76cb..a0805771f1c 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 <dm/device.h>
diff --git a/drivers/watchdog/stm32mp_wdt.c b/drivers/watchdog/stm32mp_wdt.c
index 8093d0a9f46..2d509a05224 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 ba265cf223d..358a9b90fdd 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 d9e4dc7cb8a..b6b8c673e67 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 5580764da7c..ea4311c8ce1 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 0256b3e3567..088b2aebb42 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 9237bb9c742..393f1490de9 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 e05f7ef74b9..3198147c380 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 0c9a659f8ff..2e5be650672 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 346875d45a1..3b7d0c6d493 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 7fae383f150..28f98d43ada 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 71eee36537a..c668c0651f8 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 "btrfs.h"
diff --git a/fs/ext4/dev.c b/fs/ext4/dev.c
index 0d4f756aa5c..168443de1ff 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 9adef57476a..c52cc400e1f 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 ecae5768c9e..352063b6e30 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 ce1fddc9a47..f22af45d1b9 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 425d877c749..7fd29470c1a 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 d2aff092001..59cc0bae948 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 5591c65eaa9..ad4caaeb1ec 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 115c010ef88..8b19811a639 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 9eb5d3fed12..514f15f58cf 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 6835f86fec7..2ff8f1a5f9b 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 f923d076525..6a4ada62c82 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 1389268b5fc..eb14b895447 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 5cbb8aa1b2e..77ff52575ea 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 a7c45dd5ecb..a9e22abe6b4 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 ebfb1d4dd78..62748b0210b 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 aa5956c52e8..32938a8ffe4 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 2740aaee8be..055c654ae80 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 a67b3eec93a..6aa2890ff05 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 3388efe2b78..6b6884fb209 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 3a9fa4130e0..aa7f281ef6b 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 599e1a35fbf..1d49285c7d3 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 876a6ee6616..7a6e46df5d9 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 b38513660b6..93f268b4cc1 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 fc6fdaff8d1..0dc7886ac47 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 dfa9e91903d..e4cd785b9f5 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 bb355123803..70beb848e1b 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 4331c16064c..1fec96cd5ce 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 d69cda339c6..b698e35fec1 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 2b262948d54..99585d762e8 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -8,7 +8,7 @@
 #ifndef _EFI_LOADER_H
 #define _EFI_LOADER_H 1
 
-#include <common.h>
+#include <log.h>
 #include <part_efi.h>
 #include <efi_api.h>
 
diff --git a/include/i2c.h b/include/i2c.h
index 0faf8542e28..10eb96ff42e 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 c871767e20a..41b74dc52d2 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 d123fac8625..66dc79c82d9 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 79da0811fe2..dc2ffeb2c24 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 dd83dfdd320..954d95b481a 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/aes.c b/lib/aes.c
index ce53c9f1f37..c998aecb3c7 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 db222625dd0..bcb0390eb41 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 8945d8d4cf2..de66b1acba5 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 6cf6dcfdad6..fd7de24bd23 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 27855215022..36cf8436592 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 071e4fb8a6a..fa79c148dae 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 7aa55092ac7..aac9a1471ac 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 f5dda1179f8..ee5259a7303 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 4e41cffd230..eec416329b9 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 f8badadf660..04e4e457344 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 a4e5e53d15e..8e50b3f57ec 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 <asm/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 2ea21448f03..b112f5d81ef 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 3b79a88a480..34679cb55fe 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 e4f8b490b52..cdb2738cf49 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 9233767ee26..19afa69f530 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 1511e3bdb42..53f6d970f73 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 a1d0ec842c8..caef4085b07 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 6a25acbbcdf..f7c93d50d16 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 a81488495e2..719d3e8880a 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 c44a0f5be5e..b3d4349c30b 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 088e9e9063a..1b198fe43cd 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 898465445fd..4b09d6fcf7f 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 3170c024f7b..187ac28cd36 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 dd859d3467e..cb54e658c48 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 86b8d1b9943..56a3a91fc23 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 58baf522fcb..ae8e1dffa4c 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 94773b77e7e..8719ede15a7 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 beb7273fd30..58e1e1614a5 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 2f0e495edf2..008bcc7930d 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 2537cb8f8c6..521258e623f 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 45dae2d576f..36dc43a523f 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 c49e95e38c7..05a45ed34af 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 d4355c6d033..e59b5766e72 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 84b191dae3e..fc90ce4d7cf 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 f63d4ef7268..2f18588dfcc 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 420ab2eba05..598a296690f 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 326a5e4ea97..813efa0ddae 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 969c46a8591..e82a9e7635b 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 86b4f413c2e..e4af87f76aa 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 b4498e6afc7..a846fe00dd3 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 8fc744d932c..b72b1fd7370 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 05bfede14a5..d1e8cb8815b 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 67d761d7c0f..e35c4dca7c5 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 da22ddbd7a8..7977e599a6b 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 e0ef4a11a7a..9d40f86ab60 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 1986b9b9d3b..8aec3c79969 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 e425207d6e4..6674eb6bee7 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 8e7872155a1..66ee2e19763 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 035293537b8..37932919d04 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 72e1018a3bd..70d0e08bde9 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 024e8eab909..0e33660f6c5 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 c1d9fcaf251..a676a4253b5 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 9c8ee34a4ed..39d7664a224 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 118439b1b82..e0d415fcc31 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 16210c65abe..cc971a89097 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 8b7967cd9dc..3b378921faf 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 571394dc635..9cc48b1ccc4 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 7807eb17acf..f082e4c546c 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 0f977fe2450..6687e0b75ca 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 d6e6777bd42..9837d10eb5c 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 0b57b7bb406..ad719ddb4d6 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 e234ab82e65..289f07a08a8 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 0f267a19260..5472c65fad6 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 0817b7d3ec1..be0c2789070 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 1ad45adb605..73eb3aede3d 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 003b78934f3..48fc3dd714c 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 f74c4308439..6a930ae31ad 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 f5f1caef716..1bac17dc8a0 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 cbd0972c9b4..b5de0cb191a 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 ad5354b4bfb..99c1672b996 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 349123a657c..40dadebf9ff 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 dc229aed6d0..ba1b54f27e2 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 1c49eaf38bf..4ab38862604 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 21d92194b97..7b6c3d76d8b 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 b21f66732b9..809494d585e 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 b967902493d..ca916eeebb6 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 8370820428c..871d6400a07 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 ce20e2d7c2c..583ce9eddf0 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 71887427647..88f86581cce 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 3d741a8c363..fa44735ea1c 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 f1021f374b6..06a1c69ac5c 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 d40f13d2915..632e9960b0b 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 abb5b7115a3..ba85fa313e8 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 75ae08081cd..68fe294045f 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 62a0c692c89..53e5ca321fe 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 25271c6ba04..b6d629a285c 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 f72979fac4e..0664e3f22b3 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 5242c4cc3ed..339cc19ba14 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 1336b54b11f..a0fe0f6b339 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 8e246ab4ed9..64234bef36c 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 d29b559410f..4245372d65f 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/optee/cmd_ut_optee.c b/test/optee/cmd_ut_optee.c
index 01f829756fd..9fa4c91e0dd 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 da050795964..c001fb183fe 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 1cc2a7b8f14..a456a449efa 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 9939480ed94..f083a682e8b 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.0.292.g33ef6b2f38-goog

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

* [PATCH 13/18] common: Drop asm/ptrace.h from common header
  2020-04-07  2:40 ` Simon Glass
@ 2020-04-07  2:40   ` Simon Glass
  -1 siblings, 0 replies; 30+ messages in thread
From: Simon Glass @ 2020-04-07  2:40 UTC (permalink / raw)
  To: u-boot

Move this uncommon header out of the common header.

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

 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/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 -
 38 files changed, 37 insertions(+), 1 deletion(-)

diff --git a/arch/arm/cpu/arm1136/mx35/timer.c b/arch/arm/cpu/arm1136/mx35/timer.c
index cb351ecf769..f2541c398d8 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 7e2698b6055..4b726d5c73f 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 193588ea10b..d6e1e09f93e 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 7b14ba05b46..08b98a2d068 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 9db1c74b369..6803c349e84 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 febb3857f2b..7bab283c399 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 789f9ca5667..bfc0fac3eff 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 6dbf03b00cd..885233e0824 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 dffdf57aa20..bc062dfc9f4 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 a4f0ab48863..6cb8179ee8c 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 3a7cffcab31..9d8668b2de4 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 e6da4de5343..dd660769e2c 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 2896d6b0611..a888f740efc 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/m68k/lib/interrupts.c b/arch/m68k/lib/interrupts.c
index ddc91993a14..1caef61d20e 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 2ccd55add0c..c49141f376d 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 265bd8383bb..196e82a5016 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 8d525dc8373..d04f31df502 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 1c6c38b15f1..c3cc119d654 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 e9da9c0d48f..4ad762683fb 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 bc2fc93e110..f37a45e2694 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 033ca327f00..5a916600ed6 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 79bab913676..c0161e3379c 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 3efe8956ec5..eef1951f2fd 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 899bcd86188..56794b08a15 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 64ee0cc2102..73f270002cf 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 4a3e26cffc0..8727d18884c 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 4c7e9ea2151..387fb9703c4 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 3b8f4a36d3e..cf9af4326a2 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 f01ead4e235..64aa198765f 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 76758237c00..4f8a0453f46 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -22,6 +22,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 b5dad4ba11d..182838bed38 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 42ecf61eff6..18a35ca23ef 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 312e14960aa..4493a159198 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 c061126bed2..66aed7cea1c 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 649012053b0..d0bc9f5fa90 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 1bba763b64c..2dd737d6a0d 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 3ef56f144e8..186fe2b45ac 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 b698e35fec1..395d1d39018 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.0.292.g33ef6b2f38-goog

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

* [PATCH 13/18] common: Drop asm/ptrace.h from common header
@ 2020-04-07  2:40   ` Simon Glass
  0 siblings, 0 replies; 30+ messages in thread
From: Simon Glass @ 2020-04-07  2:40 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: Tom Rini, Masahiro Yamada, Simon Glass, Alex Marginean,
	Angelo Dureghello, Bin Meng, Christophe Leroy,
	Daniel Schwierzeck, Fabio Estevam, Heinrich Schuchardt,
	Hou Zhiqiang, Huan Wang, Ibai Erkiaga, Joe Hershberger,
	Kever Yang, Luca Ceresoli, Lukasz Majewski, Mario Six,
	Max Filippov, Michal Simek, Miquel Raynal, NXP i.MX U-Boot Team,
	Neil Armstrong, Peng Fan, Prabhakar Kushwaha, Priyanka Jain,
	Rajan Vaja, Sergey Temerkhanov, Simon Goldschmidt,
	Siva Durga Prasad Paladugu, Stefan Roese, Stefano Babic,
	Thomas Hebb, Thomas Schaefer, Trevor Woerner, Udit Agarwal,
	Vagrant Cascadian, Wolfgang Denk, Yuantian Tang, u-boot-amlogic

Move this uncommon header out of the common header.

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

 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/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 -
 38 files changed, 37 insertions(+), 1 deletion(-)

diff --git a/arch/arm/cpu/arm1136/mx35/timer.c b/arch/arm/cpu/arm1136/mx35/timer.c
index cb351ecf769..f2541c398d8 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 7e2698b6055..4b726d5c73f 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 193588ea10b..d6e1e09f93e 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 7b14ba05b46..08b98a2d068 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 9db1c74b369..6803c349e84 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 febb3857f2b..7bab283c399 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 789f9ca5667..bfc0fac3eff 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 6dbf03b00cd..885233e0824 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 dffdf57aa20..bc062dfc9f4 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 a4f0ab48863..6cb8179ee8c 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 3a7cffcab31..9d8668b2de4 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 e6da4de5343..dd660769e2c 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 2896d6b0611..a888f740efc 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/m68k/lib/interrupts.c b/arch/m68k/lib/interrupts.c
index ddc91993a14..1caef61d20e 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 2ccd55add0c..c49141f376d 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 265bd8383bb..196e82a5016 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 8d525dc8373..d04f31df502 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 1c6c38b15f1..c3cc119d654 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 e9da9c0d48f..4ad762683fb 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 bc2fc93e110..f37a45e2694 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 033ca327f00..5a916600ed6 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 79bab913676..c0161e3379c 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 3efe8956ec5..eef1951f2fd 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 899bcd86188..56794b08a15 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 64ee0cc2102..73f270002cf 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 4a3e26cffc0..8727d18884c 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 4c7e9ea2151..387fb9703c4 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 3b8f4a36d3e..cf9af4326a2 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 f01ead4e235..64aa198765f 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 76758237c00..4f8a0453f46 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -22,6 +22,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 b5dad4ba11d..182838bed38 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 42ecf61eff6..18a35ca23ef 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 312e14960aa..4493a159198 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 c061126bed2..66aed7cea1c 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 649012053b0..d0bc9f5fa90 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 1bba763b64c..2dd737d6a0d 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 3ef56f144e8..186fe2b45ac 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 b698e35fec1..395d1d39018 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.0.292.g33ef6b2f38-goog


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

* [PATCH 14/18] common: Drop asm_offsets.h from common header
  2020-04-07  2:40 ` Simon Glass
                   ` (13 preceding siblings ...)
  (?)
@ 2020-04-07  2:40 ` Simon Glass
  -1 siblings, 0 replies; 30+ messages in thread
From: Simon Glass @ 2020-04-07  2:40 UTC (permalink / raw)
  To: u-boot

Move this uncommon header out of the common header.

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

 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 af8facad534..4defe984774 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 34c81872591..2c61f2b81db 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 37e706238b6..95215a0b829 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 40cb24dd54a..c519e8bd4b0 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 34752a34af5..a17091d2ff8 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 395d1d39018..976046e6202 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 26175132f32..b17651ed63d 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.0.292.g33ef6b2f38-goog

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

* [PATCH 15/18] common: Drop linux/bug.h from common header
  2020-04-07  2:40 ` Simon Glass
                   ` (14 preceding siblings ...)
  (?)
@ 2020-04-07  2:40 ` Simon Glass
  -1 siblings, 0 replies; 30+ messages in thread
From: Simon Glass @ 2020-04-07  2:40 UTC (permalink / raw)
  To: u-boot

Move this uncommon header out of the common header.

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

 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/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 +
 85 files changed, 84 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-bcm283x/include/mach/timer.h b/arch/arm/mach-bcm283x/include/mach/timer.h
index 01c0ebad64b..5567dbd7f3d 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 85abbb4a89b..2630bfff8ee 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 a448f2df302..e7c6d787446 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 777946970b0..43b28f8b86e 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 eff1a9c7835..b1cf25462d8 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 e3793c1125c..3ef59932131 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 d2a1ed0a3ea..df57b6ecc22 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 bb4790402e3..9540988e33e 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 295ee07b724..7225ee44041 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 d79ae367b80..2a68719eb68 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 4f2ccefb2e5..b4ac83e6273 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 276e4fb3365..9ffc2243cb5 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 79469c454fe..7ddff2feaf3 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 9f240509925..c9ec523080d 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 1374447a6be..bff75dc965a 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 ed8b73e8b37..ca34d84922b 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 3d5f27ef587..e2bdc12ef2c 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 9d293b6994d..d0849c85c3b 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 0b412c2e0c8..00b806e6a65 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 8cebf99c589..d44799b4af3 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 2d38c2270e5..86408d57f30 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 4ac65fd28bb..684bc949985 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 2b7de6c03b6..97e88b71784 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 9966cad7955..d1f6029b2bf 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 89e107ffb7d..2b39e4195ac 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 5232328e1e4..277e78aac1b 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 bf9f4be6de6..9cca3c55cc0 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 ebc2bea0698..c9e54eae399 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 531d48ce898..911472e91e1 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 03f210bdb0b..fb4f77e4146 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 3fef2046240..b3bdd201c36 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 cd624ec6ae6..a6f6eff462b 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 67d092be2cf..215f09acc37 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/ubi/attach.c b/drivers/mtd/ubi/attach.c
index c40ed62959b..e488caa5547 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 c19df82747a..b54b56375b4 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 636edbb4a3e..a2b5352cb2d 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 00102fcf748..ee2df11522b 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 5aed164247f..894ffc9d2bd 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 1f77f84990b..44ce00041ee 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 ded11a643ea..53f1300eaf8 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 cdced681106..8be38e11a84 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 2a66c2e5f9b..b47b27210ce 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 1e9b0f0f361..cec0e161dfe 100644
--- a/drivers/net/ldpaa_eth/ldpaa_eth.c
+++ b/drivers/net/ldpaa_eth/ldpaa_eth.c
@@ -13,6 +13,7 @@
 #include <net.h>
 #include <hwconfig.h>
 #include <phy.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 5c8c5e68007..f593aa6508e 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 1e0db6c8c7a..83914286e8b 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 14fcad5aadb..8e942a82802 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 ab64f4f0c86..efbff49f9ba 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 1cfb881e586..db3d5133582 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 abeba965c49..25231c10f9c 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 8f83ecae7db..5951835d6e8 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 5557fd29ce6..2557269bc54 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 bb2e7748fe4..61ae92d603d 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 21577089a08..3c41f49a4f9 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 4ec3f6df6a9..25d20483bb6 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 4af58941d82..385bed3e34c 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 13dec517f62..1feed417d68 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 74b8e0c5ddf..91ed7fcec5a 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 51b1a894cc2..8cf16356271 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 e3147c98a1c..1c0505eb28c 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 1a181bd6c63..439a31c2556 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 bce5aeb3649..ebf1f4eb553 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 c282cf0be33..2d968aafb03 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 b6b7c29b3c9..86aeaab412e 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 6cdb5c3df57..3dd5bd84fc2 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 6e5be90fe53..69d6104044f 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 63ce8a5655c..8e0e57cae88 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 435dca60015..8ba98d8c0e8 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 b98f0ed40ee..5fa013659c5 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 4ea9dcb59d9..35a56a8eab2 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 d4ecd16ec84..2636cbedfe2 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 184c5f0a597..b951ea3257b 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 79e62cfb628..fa7f2429f1f 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 32ce4ea5aea..64430f3b196 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 7130b8432a3..7f1cbc59329 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 61f6a960083..2a2abb9d499 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 393f1490de9..2084538f28f 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 0dc7886ac47..41c7d5666ff 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 0d9d5cc4b19..81a4d964f3e 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 251eba07921..081391a1d0f 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 976046e6202..711d409d47a 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 34038b31f70..cfdf7ea29fc 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 561dcc34baf..46f9efb7321 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 aac9a1471ac..1d0532d0f2e 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 8b4821767aa..e12ebbb3d0c 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 9d40f86ab60..35f8d398a65 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.0.292.g33ef6b2f38-goog

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

* [PATCH 16/18] common: Drop linux/stringify.h from common header
  2020-04-07  2:40 ` Simon Glass
                   ` (15 preceding siblings ...)
  (?)
@ 2020-04-07  2:40 ` Simon Glass
  -1 siblings, 0 replies; 30+ messages in thread
From: Simon Glass @ 2020-04-07  2:40 UTC (permalink / raw)
  To: u-boot

Move this uncommon header out of the common header.

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

 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 ac475b6dc32..ace384dea78 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 a736ae9e62d..f0fbff081d0 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 3656cf4cbc4..4b30b66e208 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 9b905f06b5a..96a8df18c6d 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 cda0cc6b482..679f8f30191 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 4f35108a369..ad5c0649118 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 2d722405b27..276965245d0 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 6b00e77012e..d4df8175f2e 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 dfb9fff2e5f..68c1fbdc421 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 762c9d4f10d..b4514bc850f 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 f0a72f1a725..34466b8e260 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 def3baa6fdf..c1d2724f20a 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 93f268b4cc1..2f6b25d3381 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 711d409d47a..552cb298a2b 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 4f522dbeccb..3922241be00 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 1a34b95bec7..cdb971eead2 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 d21537c7735..15460a1fb21 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 884ed11dbab..317343d825a 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 9fc0f5f4d19..7d0ef6554a7 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 fe0f5b84fd2..69345b85465 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 62e34538606..095fd896a38 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 7b48c662be6..e9e9f18a601 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 34653f7a464..8f7636d9539 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 29561c41016..071fde65934 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 ea5762a5ef8..aa0588d79d4 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 9d4a6716c76..417b36e1396 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 d39ba8f5d95..791b6c55577 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 d0ae923ec3e..134b5d5e962 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 2ceb123a078..9ed53bc4cec 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 8fc8dfd2b2f..b343d58ea6d 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 4eb2888caea..45bfe675dee 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 a68d190f6ab..22b78b65e91 100644
--- a/include/configs/MPC8548CDS.h
+++ b/include/configs/MPC8548CDS.h
@@ -26,6 +26,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 0f4c7e6f488..bbad98c0331 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 8b10a6cfef9..db184a43b23 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 db05a6cb077..e6702db39de 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 60e8904d429..5e72f3a3682 100644
--- a/include/configs/P1010RDB.h
+++ b/include/configs/P1010RDB.h
@@ -10,6 +10,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 5cc2e069797..3860c2b4837 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 1818b4b70d7..4809bc53404 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 f6472b9e118..38267da589e 100644
--- a/include/configs/P2041RDB.h
+++ b/include/configs/P2041RDB.h
@@ -55,6 +55,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 8ac260c2bc6..2acda58e558 100644
--- a/include/configs/T102xQDS.h
+++ b/include/configs/T102xQDS.h
@@ -10,6 +10,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 43897a711af..f814c57cfe3 100644
--- a/include/configs/T102xRDB.h
+++ b/include/configs/T102xRDB.h
@@ -10,6 +10,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 aa2a8b00de9..8a8246bc9bf 100644
--- a/include/configs/T1040QDS.h
+++ b/include/configs/T1040QDS.h
@@ -23,6 +23,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 50b37acf052..85b03b2760b 100644
--- a/include/configs/T104xRDB.h
+++ b/include/configs/T104xRDB.h
@@ -6,6 +6,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 be5a658d7ee..4e7a30b490b 100644
--- a/include/configs/T208xQDS.h
+++ b/include/configs/T208xQDS.h
@@ -10,6 +10,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 68de90fbbbc..a6d98d0abe4 100644
--- a/include/configs/T208xRDB.h
+++ b/include/configs/T208xRDB.h
@@ -10,6 +10,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 94e0ddbd885..0005b3b1d64 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 042757c20e3..2a719749f31 100644
--- a/include/configs/T4240RDB.h
+++ b/include/configs/T4240RDB.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/UCP1020.h b/include/configs/UCP1020.h
index 68276a15a74..18d918b0157 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 d2ff7e95345..67c6d88f924 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 351b27094a6..53ffc71cedb 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 c08845b3c8d..28b6d20f6fc 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 ba5eb7a4a8a..e58a9510de9 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 3019b97d929..68931c1358e 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 4bff349a032..5aa68d1d469 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 ea15912c900..802e69792ca 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>
 /* ------------------------------------------------------------------------- */
 #define CONFIG_AM335X_LCD
 #define LCD_BPP				LCD_COLOR32
diff --git a/include/configs/cgtqmx6eval.h b/include/configs/cgtqmx6eval.h
index befa06faaae..e27637ae8ba 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 633187d86fe..4145003b8bb 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 311ed439f61..dbab95ec50d 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 cbc7501bcc1..dd843aa112d 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 d62c784e5b7..6dc32896456 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 bafedcb0d25..64137b0a679 100644
--- a/include/configs/corenet_ds.h
+++ b/include/configs/corenet_ds.h
@@ -9,6 +9,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 49fee9249bf..fd6c203d8c1 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 894a8d7973f..089e92478c1 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 95c04c37970..af2c8134486 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 5ae2b427cad..bb34a9e83b0 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 5a4c9ae066e..7530a2ddfe4 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 43c31e6a2c2..09cb4fdffbb 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 b96d4e82adf..dd7324bc6f4 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 18327fb4c3d..6a98360c0c2 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 7da2b900529..ca1e8e8f580 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 ce73ca6b0ae..9ce10e26b62 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 e91c71036d7..6cc30c4219a 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 5d9ef70830f..627233efa81 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 97170dc9494..5669064375d 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 ac25549a183..f5eb9968a17 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
 
@@ -176,4 +177,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 0aaca3325bd..3066074270f 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 e690d8f39da..e9e3981060b 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 dfb78c50f4b..451baf8b802 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 156edfba226..f28407f9680 100644
--- a/include/configs/km/km_arm.h
+++ b/include/configs/km/km_arm.h
@@ -106,6 +106,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 14008fec361..8e9b7ff0243 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 cc58e806def..2a1cc9ef81e 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 a041ddb79bb..6273b224329 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 07b1e06f4f4..0715509ec88 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 a6690367f8c..0ba74dee451 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 ee3b754910c..1349cd487e4 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 8ae1e0a2e63..a2bded96029 100644
--- a/include/configs/mx6sllevk.h
+++ b/include/configs/mx6sllevk.h
@@ -137,4 +137,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 55aace1c6e7..38620e88007 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 f347eeb39fb..df3d4523dff 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 7cce911314b..fd70c8a0d06 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 b6ded774cc4..cc07e858d57 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 9ef6ea90a3f..eb00fa460b5 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 c42f1a9fce7..dc6c194cf1d 100644
--- a/include/configs/p1_p2_rdb_pc.h
+++ b/include/configs/p1_p2_rdb_pc.h
@@ -9,6 +9,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 3ff75663ea1..a1e1a601315 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_PHY_ATHEROS
diff --git a/include/configs/pcl063_ull.h b/include/configs/pcl063_ull.h
index d2459874706..567edbd8253 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 72f8d08a665..46c40b507e5 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 27e83b47cd6..bfc82fe1721 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_MEMTEST_START	0x80000000
 #define CONFIG_SYS_MEMTEST_END		CONFIG_SYS_MEMTEST_START + SZ_128M
diff --git a/include/configs/pico-imx7d.h b/include/configs/pico-imx7d.h
index 4dc206566ef..c06871308e7 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_MEMTEST_START	0x80000000
 #define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_MEMTEST_START + 0x20000000)
diff --git a/include/configs/s32v234evb.h b/include/configs/s32v234evb.h
index 53c94ed70e6..226dfca3179 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 f4113e03c46..74dd52a8609 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 b059100ccd4..ad4c3c0786c 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 410ec80618f..73d7f08673f 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 87c73457a0a..256daa53477 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 ac9fce80cec..7e8ac43df68 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 1ea6332878f..7eda209c022 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 bf9106e239f..4e1b066e77e 100644
--- a/include/configs/udoo.h
+++ b/include/configs/udoo.h
@@ -73,6 +73,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 34726b94253..b3955777502 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 3ab32319438..aec4504d9be 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 a65d23bbe80..7778e511307 100644
--- a/include/configs/wandboard.h
+++ b/include/configs/wandboard.h
@@ -110,6 +110,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 36060975c10..58099802f87 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 634ee424099..8f04558aed2 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 5e027bebcab..4851374ffe6 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 611089cbb93..8ab9d603638 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 56a8bae39a0..a657927e06f 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 523c8fc4fe9..fa116452b7a 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.0.292.g33ef6b2f38-goog

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

* [PATCH 17/18] common: Drop linux/delay.h from common header
  2020-04-07  2:40 ` Simon Glass
                   ` (16 preceding siblings ...)
  (?)
@ 2020-04-07  2:40 ` Simon Glass
  -1 siblings, 0 replies; 30+ messages in thread
From: Simon Glass @ 2020-04-07  2:40 UTC (permalink / raw)
  To: u-boot

Move this uncommon header out of the common header.

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

 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 +
 .../armv8/fsl-layerscape/fsl_lsch2_serdes.c   |  1 +
 .../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                   |  3 ++-
 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 +
 .../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-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/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 +
 .../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 +
 .../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 +
 .../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 +
 .../freescale/mx6sxsabreauto/mx6sxsabreauto.c |  1 +
 board/freescale/mx6sxsabresd/mx6sxsabresd.c   |  1 +
 .../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/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 +
 .../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                     |  9 ++++---
 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 +
 .../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 +
 .../work_92105/work_92105_display.c           |  1 +
 board/xilinx/zynqmp/tap_delays.c              |  1 +
 board/xilinx/zynqmp/xil_io.h                  |  1 +
 cmd/bootmenu.c                                |  1 +
 cmd/conitrace.c                               |  1 +
 cmd/eeprom.c                                  |  1 +
 cmd/i2c.c                                     |  1 +
 cmd/load.c                                    |  1 +
 cmd/mem.c                                     |  5 ++--
 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                    | 17 ++++++------
 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_s900.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 +
 .../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_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                      |  7 ++---
 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                         | 11 ++++----
 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                        | 19 ++++++-------
 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                        | 11 ++++----
 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                         |  7 ++---
 drivers/net/rtl8169.c                         |  1 +
 drivers/net/sh_eth.c                          |  1 +
 drivers/net/smc91111.c                        | 23 ++++++++--------
 drivers/net/smc911x.c                         |  1 +
 drivers/net/smc911x.h                         |  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                          |  7 ++---
 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                          | 27 ++++++++++---------
 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 +
 .../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                       |  7 ++---
 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         |  7 ++---
 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                                    |  3 ++-
 net/arp.c                                     |  1 +
 net/bootp.c                                   |  1 +
 test/time_ut.c                                |  1 +
 886 files changed, 965 insertions(+), 78 deletions(-)

diff --git a/api/api.c b/api/api.c
index 4fc451a83d1..c7f5db776af 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 0ee60342200..892bb06db10 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 21129a7901c..e9d55779214 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 b9941fcb2f2..0f1e68c8355 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 4f975694fd6..16022379235 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 46b7b46659c..90183e3014e 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 d6e1e09f93e..408e88aa129 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 d742c0f1516..12ebc1c8029 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 b6fdc88be7e..5ab4ed0c5a3 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 3b884cd0d3c..a316540d52a 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 6803c349e84..dd0f15c0cee 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 04366c871f6..d7edefee231 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 618af709fa5..209ceca9a06 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 574a8a02d8a..26b673a5405 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 618af709fa5..209ceca9a06 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 5c109764e9e..a4255a44c00 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 e9464ee7e47..91e988217ad 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 46ade4ae86d..2a32b30999f 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 d2b5b4d3fcd..3064fd25d4d 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 008e271dccf..fb67de10f48 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 5adccab012a..919529aa1b0 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 4f6a66d8039..65b64b5ac75 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 229e9e959e4..fa8f8fae10a 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 f24ca7f1dc7..41c89b8904e 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 3ac50966e15..3f1da436142 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 31536b81811..1ea887b3319 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 80a59774155..13e010d91ec 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 8e20c96bcda..a5cdaf5a66c 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)
 {
@@ -23,7 +24,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/arch/arm/lib/reset.c b/arch/arm/lib/reset.c
index 65b4be20b81..4f1a768bfe1 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 1e014ad9c92..dca2d2c70c7 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 3640fce8821..39268969580 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 3df0ea7c792..5422c05456e 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 a10c0cae74a..6101eee3589 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 ebe985f795e..a6681821f6d 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 d3a516fbc63..3226eb95f01 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 f25119a7d66..7895ee66f8a 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 814d834b164..e6c74bf77e9 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 c423ac0058d..3d263418f22 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 714b6d333a0..e0d122bfda1 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 549ef2bd991..818f38e17dd 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 bcf82ed5c86..2c0034254b3 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 b0a6bd589c0..596773f054a 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 b8aaf3ef015..19ca3826495 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 60e688c5184..798fe74a3d6 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 6e34803067a..4c066557c1c 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 db1c2c1e01c..7da43c32e0d 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 9ab6b53adbe..7dea600d509 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 f87bcb3beaa..145aff8ac66 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 ab8b02956b2..c56b0aeb792 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 16ccfec933f..304be957033 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 a1cef9fdd6c..af50cbc4f41 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 33e70569bc4..c22147ede73 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 d9edfaa1dfc..2a51b7113ce 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 c8c92988645..ea3b4c7d5b7 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 533601eac4a..ce58bf811f2 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 aef090b4f8e..27abaff48fc 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 71636276d4e..f8434ecf575 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 9f594899584..707ea807ac2 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 8bc4fbbb606..312f868fbc7 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 3b1733099fd..47ac8656bfe 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 8808e353a92..94332b7edec 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 7752dd15656..bcfba16a08e 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 a64d5721120..4926bb77796 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 f88ccfde9ff..ba06535e4c2 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 3874716e529..6ae254e99af 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 bcc230c9006..c865afa5f28 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 d7c8eaf47dc..58d5d3fd8a5 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 d48aeec3742..561d3408cd8 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 f7ee28915ec..36d6880141e 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 6ca38f73d93..b46083e9db9 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 a55a6162d44..31e4281529a 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 72de807a472..76d698214da 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 045e8679e3f..9e34da47479 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 8e781267c51..0590110d4ac 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 221f92869c2..3ed97b59a32 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 179acc7e6fe..d99a38b10aa 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 2febb236547..a3f833dd341 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 567cb5b18e7..5d84798ca43 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 c084de7e2ce..d369df93d4a 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 c4225b8b5bf..18c19dbf606 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 110d441d9bc..25df31a3b85 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 d12ebb319e8..65b15b79fe9 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 761c9ef19e3..631bc04e950 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 1c06865e06d..167589d1bb7 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 92ce3cefae3..62c10536306 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 4359093892e..79e67f5194e 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 c9226af4c5f..d5f2683b266 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 9a97c874364..38afc3cbe6d 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 8e3ad2baa2e..24e8a13b1f9 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 2d14ac9d95e..e5b60598f7f 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 171c98daa2e..4fe6df48123 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 b75cc31c8c1..d160ce4c999 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 7a5c54d592f..b0641c6a41a 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 7bd1de19534..651edd27ee8 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 0917b33c254..94b9d904dc6 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 72fe8db8dd1..fd77aa7e115 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 62594954848..c86881dabd2 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 f6e95ee7baa..18435dc361e 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 74ada3b6707..656678a1551 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 b6abdfd608e..5c5c7d136e7 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 fa9d17d70b7..2230931e54e 100644
--- a/arch/arm/mach-zynqmp/spl.c
+++ b/arch/arm/mach-zynqmp/spl.c
@@ -11,6 +11,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 200c53eaf35..5ea6158c809 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 8c91e0e193b..d3d4e30ad55 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 02ef5d87aa7..751c83a4fc0 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 87b77f42def..72bfdf056bf 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 2608fdd76f1..886f29d1b6a 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 09bd7455692..af02c4934c9 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 ac42cca2efa..74ba68124f1 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 c4988f9031c..33b4cff4ec7 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 eab6e2088e9..a3eb6db54be 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 cd4aba667ed..1b4617311c5 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 5d0d4550db5..bb972b3a604 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 289973ec953..9c5a6b68ec1 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 268da7336b3..3a009bb532b 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 fb2230430c6..e61a368141b 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 0ab3ab6383c..62330a65759 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 9a46198f364..43827d19678 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 3049a63d577..efbb82f62b0 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 340e35e6fcc..70db74d3a0c 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 bcc4241ba3d..dfc42ba92f3 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/nds32/cpu/n1213/ag101/timer.c b/arch/nds32/cpu/n1213/ag101/timer.c
index 8208b6de90c..394fc10ec3a 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 0307039f372..cefbcf6e817 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 4defe984774..438b14b162e 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 a183ed63430..74f824d2bca 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 b500ddd3f3a..785d4805a46 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 8242f952653..bb963ee5e2f 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 34faff2df59..c28e4425ee7 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 8de218666b5..9bd573dbd6f 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 1c2d8edf605..4bca2671d52 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 796bc15a7c6..ee5015ec8f3 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 e6d4707e3e9..f5126e2c8ac 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 28e1580a437..8822cf29fef 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 1a7c839d612..6b8e447e94a 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 972049b8e95..21b35db08df 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 17b11744a4d..c73cf9319c8 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 58931f0e6e2..8d6babfb83d 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 0d9300736d4..fb857e53d59 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 ef7c6073cc7..5484c543c6c 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 600c5ea9364..e76f2805d7f 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 120879038da..64a1cd414fc 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 8a3ca6cde7e..cb5595c930e 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 7991e1ea07b..ae16ce26499 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 8c71e43a2d8..9bcf211af99 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 9f3c56b204d..641da515c8f 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 d276cbe13bd..d72c0d637a7 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 cae95785161..bee1671baf8 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 877b31b9d6f..b713fcb1cfe 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 c3cd080885d..7fde4ff7e16 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 e2e2d9fe33d..ddad02e375a 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 08fbe990398..3cd7b1f536e 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 a6f8297e72e..41e67392361 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 62bbe37b806..3a02c384934 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 c0e7fb65b29..55aace90880 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 b477d9cda4b..58a02a5f3ca 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 0b29ffcc672..0b227bb4bf9 100644
--- a/board/CZ.NIC/turris_mox/mox_sp.c
+++ b/board/CZ.NIC/turris_mox/mox_sp.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 #define RWTM_CMD_PARAM(i)	(size_t)(0xd00b0000 + (i) * 4)
 #define RWTM_CMD		0xd00b0040
diff --git a/board/CZ.NIC/turris_mox/turris_mox.c b/board/CZ.NIC/turris_mox/turris_mox.c
index 1ada6279c89..2ea4626beee 100644
--- a/board/CZ.NIC/turris_mox/turris_mox.c
+++ b/board/CZ.NIC/turris_mox/turris_mox.c
@@ -12,6 +12,7 @@
 #include <clk.h>
 #include <env.h>
 #include <spi.h>
+#include <linux/delay.h>
 #include <mvebu/comphy.h>
 #include <miiphy.h>
 #include <linux/string.h>
diff --git a/board/CarMediaLab/flea3/flea3.c b/board/CarMediaLab/flea3/flea3.c
index fb66c9ecc74..61d965f5f65 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 459b7ba82c6..1e2f22735ea 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 29bd6a9a406..9bea1986d4d 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 499e89367f8..60b00246307 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 c4cd95cd809..aa2987d924f 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 33e0e4a4ae1..28e505e6c59 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 6168dc92205..ea057d27cf3 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 b96cf0b59c7..982cb157b76 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 5d989481df6..9e2f39f9814 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 3ef59932131..28efc33f1f4 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 d701669be0c..d220b877d66 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 3285a33a690..02de58b3601 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 9adf58eb8a3..e7c2b909300 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 7d99b1694da..3fc29f9e08c 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 5758c147eda..9f7c93b4d54 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 016e0adc06a..91c70a84732 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 398e4ed7202..617b545232a 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 4ae70e1aa54..2bbb2035488 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 47ce3078808..8e2b7e000f3 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 6e0ad4b53f8..6a102d38531 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 92a7a2fc6e6..d49725daa8c 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 ece37800bfb..a9bb2a55e5d 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 712ef116667..64daa456b3c 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 dc86d43d9a1..e41f0639ea8 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 5860cd0ac03..4337f4879de 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 e97efc1dc33..8b3bd5e5f63 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 f0a821d9a9c..4d71bedfb92 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 592d7410951..7d8243563ae 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 4497aa5af88..75b56f7eee0 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 b714712f2a5..4b67df4f1ac 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 9348d6dcadf..f26e42b263d 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 0efbf761da8..413f3c9c8f2 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 2f92c6564d7..528c97df19a 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 4b869ec3af4..f0d365272c1 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 16f655f188e..044cefd9794 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 4a32893a794..adc908143db 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 138d0c61f15..570e846a21b 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 68d7cd8154b..87506a77a17 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 cb2f6da76f6..17c3a1259d8 100644
--- a/board/dhelectronics/dh_imx6/dh_imx6.c
+++ b/board/dhelectronics/dh_imx6/dh_imx6.c
@@ -34,6 +34,7 @@
 #include <net.h>
 #include <netdev.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 fd6099c5669..ed4dea45ea8 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 77fcca49d3b..92cdc7befaa 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 7dbb6e8f2bb..81f1abf2fad 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 286c1adabc6..d3e2981fa8f 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 50b6f98c296..e0834f03c70 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 62b06783c9a..6a0612481a8 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 349e7b567c4..bf51d39b67c 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 eed379a9eb5..e10f948ae5e 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 79df0f3cbd5..4ae9ba06c81 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 dc72b2e2f2e..dd56ad6b2b3 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 b864a60c446..826af428ce1 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 7f11123e6f3..02a271895bd 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 faa7f877017..bb3cdac8418 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 b0edc4dfdee..e5a3daabc52 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 0bad67e62f4..ed0d9b471ca 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 5892bbd62ca..801a6f44f0f 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 5d9a0d40851..2ad23565fe1 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 b96f0da21ef..a005f62a451 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 bd1df092f9b..eaea1c46e48 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 b9018444aa5..b4ef60738eb 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 5edcfcf1cea..63d40de2a3e 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 dca60b7401a..fe97b829833 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 5c53882ccea..f84bce95a84 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 0f940998bf5..b05037d023c 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 c7f7baa8e67..6208a38f161 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 f42b5022c4c..8371c1c9c21 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 9399307e505..24bd56530ed 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 df8a7c74a3c..81b5b9eaf7d 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 e448a64abc6..a950030eb39 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 a4b795fc39b..144e490479e 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 da3adc59541..a89d5100586 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 6a6c65fe5f2..50eb18ba94d 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 8bdb4ad1276..f13b6931ea2 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 d93800b364b..531894f6516 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 1d52ce047fb..29ff55f1596 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 8c90cfe537a..a418fba1401 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 82a2b9093b6..1298bd324e9 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 146cd918c4d..286300645b4 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 e8d86113d64..908a500f4b9 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 40e01c6f24f..796b808e6f9 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 bd052b903d3..259d6aa1c2c 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 5874e1a924a..99f6bcd5a93 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 204b40bf47b..aa2e7fe206a 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 13bfc1e5f15..8a828207f93 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 e513d0bfd53..1dc1c98ad67 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 d4922fe1e12..afcd45769cf 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 45c7294832d..944108f6319 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 5451437f37f..688bffae79c 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 7615a1dfaa2..3ddbe717756 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 3976f759205..074f3d29282 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 550a2afcb73..a09b6586882 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 90e95399d20..d53c8618076 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 c72e49fbe1a..30e8b2585e3 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 45038acf324..3fd2c5e8494 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 07471e0ae56..dccf8c5551b 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 582c5b4f35d..5907a7b4289 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 cb130b4a86b..d470fd1cf6d 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 454da1d7da6..e11ed2e3bea 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 47193dd20e7..8e27e73c25c 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 4746b1e5b53..2871636165e 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 762b0c176fe..90b9c72babb 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 38c8bfd55d3..b43032cee8a 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 cf02d37b019..c060fd9a3f3 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 3f070353c36..cd505dfc0a9 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 6898e9c4d64..ec56acb3071 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 4272bacf5e6..e50b7db2101 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 dda20eed519..63fea37d5d7 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 3314badf9e7..46037acc0e7 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 d01c74d241d..522b840275b 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 a2c27823030..b092ea80538 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 b25fe3c1ed1..c719ba0c839 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 6d6763db6ac..f12e9d4cfef 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 1c0b85a1fbd..39ccafed14c 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
@@ -24,6 +24,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 ba589d4cb10..c27cecd5aaf 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 c389865fc02..3640a479574 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 f7eef5ca917..0a817d0ee8d 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 c9d8e1fd44d..e313bf99cf2 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 491ca04c285..10ebc1fbea0 100644
--- a/board/freescale/t4qds/t4240qds.c
+++ b/board/freescale/t4qds/t4240qds.c
@@ -22,6 +22,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 96a8df18c6d..99bc8a91f72 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 b7e06915425..1a352497249 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 ae467161f12..a5a151d85b4 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 4179f0fb5c0..bcb6bca3462 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 acbd200c3ff..649e6229449 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 0d53d69ecc9..a2287f9deb1 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 494de18f86a..2ef3b3ab270 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 88ab8233d5c..3b4494c59f5 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 f160a57cc2d..5f1215e9e8a 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 c43d24b26d4..6147fbfc87f 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 8994c8c71b4..90946cc34e3 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 d4108457d92..0f90f8ad327 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 a12e08685bf..9b82c949b38 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 ccad907271f..1b5aa9042f5 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 e960fa71aca..73ce985d1a9 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 6f7f752a8dc..edccfd03b3c 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/veyron/veyron.c b/board/google/veyron/veyron.c
index 02bc5ed37bb..6d84a326a3e 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 7b6fd5c737a..0df03a5a61f 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 49cd117e3c5..9c057278ace 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 df0f1104bfc..6eea939b919 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 89a922fb822..db485db10a9 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 70a69f5b8c9..8e2dd5fa507 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 6e74e939c3c..2065a5a7db8 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 66c64f8056a..e87ea0a7adb 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 80005ec3cc1..88a1a63bf48 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 4fa34e1b51c..02a514809f7 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 f5d62ffc2e5..2c269773a85 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 887ec6a66bb..af0bce6426e 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 c105da58374..75fb6acfb3c 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 f592eba9e50..9c9e1598f82 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 bf98469858e..988c2ff0829 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 113ca70a1ac..62100b19492 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 8bb0470bc30..abb5b7d60d0 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 15bbc810a1b..87bf16886ad 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 bc52b91b2f4..9926285675b 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 a97e97a5654..a96a877f5f2 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 728ee83a582..ec55fdf0aa5 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 bee99667ee5..ac4f23f4d64 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 f40e814f86a..b234f062205 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 30665ea9924..8159f3a2d9e 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 caa6187ffe6..601442055d9 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 b240c7649ce..f806576b90c 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 ee56497a051..6848e340046 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 6464e86c455..71c71ed6ec2 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 15fba13e0b7..ba676547d3e 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 cfe33d3072e..808d2210363 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 7a54719e879..5450f5d11ce 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 bb310d9e681..a93848666fe 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 b1bf8d50f81..096425c5dfe 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 ce3cc6a3eb9..fed8f52e3e1 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 70870797bbf..9150748654c 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 75505d0c189..672bd465a50 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 de487ff4b77..600a355a6b9 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 aec947ab5ac..686ad28f65c 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 67ac85d580d..0f21f8d743a 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 1a5877bf156..8a94f21811b 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 acff2e3b391..f311a723919 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 c6e0c12976e..a005029b615 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 cdeacb8aaee..3b4a3ce26af 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 db88f0ddb67..fe753a79dac 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 594070a9bfb..b32e11a1999 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 7f7fb070f65..029a0cc6cde 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 1413dc89788..f1ecb7d2c39 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 146843d3482..837463ba78f 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 9639f9a306a..40a94d547fa 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 b01c93639fa..2e80dbbc84a 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 ad5dea7307a..69e0ef192d1 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 c56a87b083b..f50da6be724 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 ae965a80a53..04f86787047 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 b6435f34f22..26c4f24e4f8 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 2c05ebb1bd5..c84146a6086 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 f7af1e3dedb..61bc77c418a 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 5883859e46e..24782c7e6d3 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 2346564c7d0..3375cd621cf 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>
 
@@ -123,12 +124,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 +155,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/board/seco/mx6quq7/mx6quq7.c b/board/seco/mx6quq7/mx6quq7.c
index b8aa0e7f694..4fa0daba469 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 8c614253842..c46e4ff7363 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 b4893d39ae8..5ac73c0ef40 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 fff2b696ced..3b109e9818f 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 235d87c053c..772c17979be 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 8eb4f8fc950..d358a209a4a 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 c51f3e4f924..58c5f7527bf 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 f523e50ea56..19fb85f34c2 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 537d9d18721..7e311b7a1c3 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 1d49ff2907a..addab8a0b47 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 2660735ce78..94707bccb26 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 6dc3fb38daa..5140694b9e8 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 83663c7e4d3..d9125a76bf7 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 ae5e1109898..0f728fd9f9e 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 c3d832f5848..f6ed3478b44 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 5681d2900e6..4eea343ed24 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 f8d5dba91c8..f32e8f582fa 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 d4a949f973d..9026ee5afb1 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 9ea62bb7960..d5393d70597 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 c60ce4b138c..b5a02eb8327 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 fe3c584662f..f9ae09607fb 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 e4ca83a5ff0..1d24096df5a 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 2a63e84ec39..54508cd8648 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 99f9293f7f2..28918de547d 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 6ee09034ea4..53ef9916a25 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 56fe171aa75..474495a0058 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 d6d21bae1f4..aba74fce775 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 21f002e3b1a..450ccc4e078 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 fab48a70ef7..e35f319b46f 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 b455844c89d..f4eaf15970b 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 3d803816466..d77b4c4ab9c 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 0b5882c0d89..68169f55480 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 d338dc5f694..734b2afda93 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 f8d0494332e..c89052ff5da 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 5e6ba69c0b8..3e8b8b1fe39 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 7dfe8aec88d..c67d02f7c29 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 b33cca1f061..2bdeb8eca76 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 149e9bd3b94..8f08d8c7337 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 8e62b79ef36..8df925dacfb 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 d9b09ae461f..18b3d3f5423 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 22517b9c546..cb0aed872fc 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 d21ff544f4b..0bbe81e44df 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 7e7339553bc..287132e4fc7 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 08342077665..92bda607652 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 77fe7e243f9..165a5433e72 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 5fea9d83347..cfc3489de3f 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 d64eff4ffa6..0488cbaaa8b 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 096551b3c7a..5e49180c764 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 0370db67e49..4c85d99c13d 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 09fc23a9015..d9afbbb7419 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 134c307e5df..251d9fd73e5 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 d1c9535f46e..ceb3d755522 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 816b9cb6fc6..04c351fff98 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 d57aa3e5d1b..9e60f202f6a 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 5cc2566e2a1..2e0def5b64f 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 4641185ceb4..fecbbbdb584 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 c3ae357bbdb..5fde0aed7db 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 1c1bf32adaa..e6caa7c8503 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/cmd/bootmenu.c b/cmd/bootmenu.c
index 76ba53e3439..c62888d3a46 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 e45e87a64c9..88850db541f 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 9d725cd44c5..933c9d137fb 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 a51f781a462..cc01119b210 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 85e5540f2c6..63a94145430 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 13641de63c9..9fd2d896bfb 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;
 
@@ -189,7 +190,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 +218,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/cmd/misc.c b/cmd/misc.c
index d33219308b7..20ab943494e 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 a117ab213a5..d565635c6c4 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 9d7b6b8d536..6d78716a266 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 e398530a138..1deca3cb78f 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 9b86b09832f..7d4d15ed918 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 6f40d9cd9b2..a1fb02630a5 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 354aee76b4c..e578f0be284 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 1e60f3ffc8c..5b9806e5926 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 0a492eba543..d4356672581 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 f7c919d3b0a..1e1515f6e31 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 ca1ac3e757e..140ddcee3cf 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 2bb45606dc7..dda3586d7c6 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 989690a33e0..58e345d9983 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 4808287ec7a..3856106947f 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 e8f2d36510f..8c6726a6214 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 38181235afa..2d395dd6d8c 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 9fccaea275c..b29cb4e435a 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 17db64009cb..6896fa8771b 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 7e802170d80..4d3a680f17f 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 */
@@ -64,9 +65,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 +122,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 +195,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 +393,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 +409,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 +430,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 +617,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/axi/ihs_axi.c b/drivers/axi/ihs_axi.c
index d4f6a4d6b45..a4aee8b58a4 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 d1dc35d0492..9c7f14e98f4 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 3a41a03feac..ac953b7e785 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 e5b07c73867..ccfeded30c5 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 b4ac83e6273..03c9e637da9 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 1673eb26b2c..c526fc1cce4 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 c52537cedf3..671d4b35c7a 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 e85a2d64129..9e1f13d14f6 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_s900.c b/drivers/clk/owl/clk_s900.c
index a7c15d2812e..7e9858234cd 100644
--- a/drivers/clk/owl/clk_s900.c
+++ b/drivers/clk/owl/clk_s900.c
@@ -11,6 +11,7 @@
 #include <asm/arch-owl/clk_s900.h>
 #include <asm/arch-owl/regs_s900.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 #include <dt-bindings/clock/s900_cmu.h>
 
diff --git a/drivers/clk/rockchip/clk_pll.c b/drivers/clk/rockchip/clk_pll.c
index 6dab5097c1d..83d45c75ee2 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 04d85b4b6d9..b5b46e39504 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 276965245d0..274572f70c1 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 6d1974844bc..61f823e254e 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 d4df8175f2e..11e3bd33cbe 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 68c1fbdc421..912e1f6e92e 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 b4514bc850f..3b199bbb869 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 28613a971d4..6d692ec8b70 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 34466b8e260..d1804c6e168 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 40a3ea7745f..8769887b2fc 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 c1d2724f20a..aa1d98ca2a2 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 8847178001b..67e21b6746d 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 7e8c0154e54..19d5724a606 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 abe8c11d141..629ba6784e0 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 2b8475fcd16..eab5b82b239 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 08285120ca5..cbd625b7eea 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 4b39b17f72d..572f3703d51 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 54c10a860aa..d7b8064e5f1 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 b4f3e423773..ea113dc55e9 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 737a879e938..43ed1ba432d 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 7d6e08d3d16..ac4f8d2732d 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 8d7ac79b28d..34cc1709103 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 1eababeebd1..979f3530b79 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 7f7df6794a9..dadb06b3181 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 cc7942d0ba3..72f0dfbbbb1 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 ba899592f88..b58c0fe01e5 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 9dc911c3355..35d98faf58f 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 0e814a51f7b..6f37cc3cda7 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 e44f08d26ac..069a42fbf5e 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 20614894e1c..d4add447774 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 cce0c611a8d..9e0e82520e7 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 3a151212004..443e4b23669 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 1637e329df8..de963347f11 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 1dc179ad4d1..e0d66d74f54 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 5afd42a97b6..aca8049c56a 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 c929cd2cc51..3b008facb8c 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 2cf4a602d74..e292d991cd1 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 272f6d5e5fe..e14204633e7 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 802051069e0..da8fa315e36 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 12d8dd19bf6..b450a81072e 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);
@@ -116,9 +117,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 +169,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/fpga/stratixv.c b/drivers/fpga/stratixv.c
index 650b1b136eb..abae3b5b751 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 395736875f6..b3e0537bab0 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 e9bf3a61803..dcfe513eeb3 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 9e6dc02b61d..214362d04bb 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 95b6061ce2f..4f17154baf8 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 79f23b41e8b..d4b2494694f 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 59fc9a3c091..4fc9d90580c 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 7e3c75b610e..da933452f51 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 642df972e5f..402a664876d 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 25221bb659e..c0734f38031 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 6df1195267c..30a4ad5d47d 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 f523844204a..46eb017ea0d 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 674561b4ad7..296e01b41cb 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 42849813143..f1198361a2f 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 2eb1eba642e..0a647b8f73c 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 07600c5022d..584d0a4fef1 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 88b62959d34..59675d8d574 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 3b654ef661c..d5bee10f159 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 bd2f568348c..2acde915d3c 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 d5be824de89..8592a819c40 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 b877602aab6..5a902047bc9 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 2a82eb0b764..6b21f6a5326 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 703d9a1c7a0..fa6f69f400c 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 0fefc115938..5c0bed2a0b2 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 7f0303cc051..1931919b562 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 4adcc0a7ae3..8be028962a0 100644
--- a/drivers/i2c/stm32f7_i2c.c
+++ b/drivers/i2c/stm32f7_i2c.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <malloc.h>
 #include <reset.h>
+#include <linux/delay.h>
 
 #include <dm/device.h>
 #include <linux/io.h>
diff --git a/drivers/i2c/tegra_i2c.c b/drivers/i2c/tegra_i2c.c
index 09c0be9dcd4..65b3734348b 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 cfd8dc64150..7beaccca2c8 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 40ebb2497b1..3409bb61d54 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 56c3d146a54..307d418a178 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 8e0b41e3460..422ea6f3e5a 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 818ad56a0dc..a5534b16673 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 0b37e8a4e41..a2a52915654 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 f8075db8d5e..85cc3c26b2e 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 e9f351dc3aa..321bd27fd32 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 6c0459dc555..d2857cf39ea 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 71c4226a839..4923c81783d 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 2d40621c15f..ab1e34e6f46 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 80cd8dcedac..926c62c8a14 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 21cae02118f..facc720c8ef 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 8c95229bf77..846622892a9 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 d44799b4af3..52bb39a905e 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 ef5cd4e7234..2408a687d23 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 ba93c262558..7702f4be3f8 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 a35e791fcc9..665eb9aa688 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 27c86320f0b..1d040f60869 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 6ec454c3bbf..9d20e283839 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 831dd32eb79..587fada7978 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 8d4f886cb49..83ae1e51699 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 f5e1f2cbbd3..2bbe673b912 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 b5f5122b1b7..ebd5578d511 100644
--- a/drivers/mmc/meson_gx_mmc.c
+++ b/drivers/mmc/meson_gx_mmc.c
@@ -13,6 +13,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 f1039c180d2..2de8513b7f9 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 17f1ebf5d2b..ad2c0e00023 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 492bf58c398..0c21ec716e4 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 a4dcdb5cffc..cc6014703cc 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 b8ef163de6e..963f2d97b6a 100644
--- a/drivers/mmc/renesas-sdhi.c
+++ b/drivers/mmc/renesas-sdhi.c
@@ -12,6 +12,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 d1b293aa039..638107a7ff6 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 4e350b34168..c5fbf5696cd 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 bc94d01fab5..1a01fe5a739 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 54bd687a25c..22a0f78933d 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 a089dfb11d7..73cc7e05fb4 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 2903d89ef34..0e03b07ce55 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 731a519e400..78838682c7c 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 faf18191b30..60318927995 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 829b75683b2..7dc600032b8 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 d3860b75082..478302f8251 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 6be40d04e9a..b7289ba5394 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 6a3a6f67518..9837733beee 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 ba2f33a96ef..b6fc5f29c7a 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 110c32b3961..6c1d64054c6 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 2b39e4195ac..4a017ea74dc 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 4b815a433e1..f72142817e7 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 ec233b27903..6c86a7e7671 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 71033000609..cf33f2863e1 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 79d1489dc72..b3232ed59d5 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 049bc79e3b0..59cef205754 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 c01b0db3cc8..a008a388ed9 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 c9e54eae399..26650389f43 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 fb4f77e4146..8c14fc55cff 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 912fe480e8a..97188b200cb 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 9b99be10e6e..5331e73c2d1 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 6cde9814c4f..8b2f7ea4915 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 b3bdd201c36..b9f5bdd9535 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 8953002a9b6..b3e6f5f9b4a 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 f85799d628e..27d847d4218 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 d29a71595dc..7c652e6c535 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 38f3cbac734..0fe140cf6e6 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 828f978f730..3ee119bcbcc 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 fc227edea73..4e4ad61da4e 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 d13eb11187c..28cb41272a9 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"
 
@@ -118,7 +119,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 +178,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 +343,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 +365,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 +681,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/ax88796.c b/drivers/net/ax88796.c
index 01c1ae27299..d161f0e09c3 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 eaadb2662a8..f57861e8704 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 c8393c5f501..2998d57c72f 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 db573c08317..648fafd3e09 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 106aa4ba1c0..6a428c420a8 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 0dd64e45821..5dad69c0b76 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 f840e114216..7ec95be6fcf 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 43c2253f10d..c67fe6f8114 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>
 
 #undef DEBUG_SROM
 #undef DEBUG_SROM2
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index 1eda9c38009..b89a68afe4a 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 a6c0a2452f2..d575a625925 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 35c2ed9fe06..98e9b2c663b 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 158397859c9..c0306d97c85 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 6c1358568ae..008da4ab3e7 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 dcb561ff79e..4fcc65d9782 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 2fe0ba6e20f..e186ab4e5f2 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
 
@@ -462,7 +463,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 +481,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 +722,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 +761,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/fec_mxc.c b/drivers/net/fec_mxc.c
index 3b667d405b6..2c3b9c0d963 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 4c78a4d63f5..c51a65cb94f 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 b69ef20e296..992a855fe13 100644
--- a/drivers/net/fm/eth.c
+++ b/drivers/net/fm/eth.c
@@ -17,6 +17,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 9f2f6f6d5b0..9cc9f3fde3a 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 ef58056a4b1..abab936b3af 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 fddf5cb0235..b5ae2ea3eb5 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 b47b27210ce..2929ae72092 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 45954cecb6b..73e92b7a0d2 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 24bb45f3515..4aae7c43fea 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 ea9f9470c80..1ec98644c92 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 8fcb63d1a60..6643d1e9c13 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 c08bd21f95a..13900f10b1c 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>
@@ -211,7 +212,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 +439,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 +456,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 +601,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/ldpaa_eth/ldpaa_eth.c b/drivers/net/ldpaa_eth/ldpaa_eth.c
index cec0e161dfe..8dd6b385985 100644
--- a/drivers/net/ldpaa_eth/ldpaa_eth.c
+++ b/drivers/net/ldpaa_eth/ldpaa_eth.c
@@ -16,6 +16,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 604f676bfff..f68daaaff56 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 ddd1c060599..424ca59707f 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 8caf0ba6b1c..697549301f3 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 3b8ee07c13a..393605512d9 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 69b2174ab3d..f9f7dd7cb36 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 33dd002146c..76823c618e8 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 447b53782dd..01eb204db8c 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 8110af2d825..a2e022db355 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 59380a9caa1..997d0b9ab35 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 1d1a5e85011..cf42489fac2 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 f593aa6508e..f9aef17f7ea 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 83914286e8b..ebe67e45ab3 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 86f689802e3..bf6fa8f2ba2 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 e6cd3e9ba07..28a99bb8c48 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 eee0956fdb5..2493608a5a6 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 9ef3baed1df..c292abad07f 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 a592ec07da4..1daafbe2b9b 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 9e2b145a724..670b7b3a914 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 66c8cca4d2b..1e69525cb71 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 e5edfbeaa66..6f443b4ea81 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 4aa5ac4be62..718e24f14d3 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 2f88f5d8bcf..3228b8df49d 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 75396dec958..8b1cad85407 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 f039f895c89..25dbf215b41 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 3399fd23662..566fcb8de73 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 ecaa2b9f92e..dbc20b14051 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 93cf44ad4cb..be5e3dcaab2 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 cbc36509717..3f8aa7cd99c 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 e2261d6a11d..62a7f192149 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 6c4381ec6ce..6b6497c93a2 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 8f1d7596325..86de989df86 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 49d6a1ad901..60049c2074f 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 d367a1fe37e..6a2084947b0 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 1aa5b1d8dac..d4049cfea52 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 fae72a1127c..3dab91b74b4 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 67be1a3dc3f..806f97b8add 100644
--- a/drivers/net/rtl8139.c
+++ b/drivers/net/rtl8139.c
@@ -79,6 +79,7 @@
 #include <netdev.h>
 #include <asm/io.h>
 #include <pci.h>
+#include <linux/delay.h>
 
 #define RTL_TIMEOUT	100000
 
@@ -237,7 +238,7 @@ int rtl8139_initialize(bd_t *bis)
 
 		pci_write_config_byte (devno, PCI_LATENCY_TIMER, 0x20);
 
-		udelay (10 * 1000);
+		udelay(10 * 1000);
 	}
 
 	return card_number;
@@ -357,7 +358,7 @@ static void rtl_reset(struct eth_device *dev)
 	/* Give the chip 10ms to finish the reset. */
 	for (i=0; i<100; ++i){
 		if ((inb(ioaddr + ChipCmd) & CmdReset) == 0) break;
-		udelay (100); /* wait 100us */
+		udelay(100); /* wait 100us */
 	}
 
 
@@ -528,6 +529,6 @@ static void rtl_disable(struct eth_device *dev)
 	/* Give the chip 10ms to finish the reset. */
 	for (i=0; i<100; ++i){
 		if ((inb(ioaddr + ChipCmd) & CmdReset) == 0) break;
-		udelay (100); /* wait 100us */
+		udelay(100); /* wait 100us */
 	}
 }
diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c
index c3413431ec4..75058fdadc0 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 1ad3d0526df..b26fc7b8eb1 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 5754c3106c9..23265eff936 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>
 
@@ -266,7 +267,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 +319,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 +334,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 +565,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 +584,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 +958,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 +1079,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/net/smc911x.c b/drivers/net/smc911x.c
index 257b0385c2a..c2670128248 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -10,6 +10,7 @@
 #include <malloc.h>
 #include <net.h>
 #include <miiphy.h>
+#include <linux/delay.h>
 
 #include "smc911x.h"
 
diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h
index b7f59aa0df9..60ee788079c 100644
--- a/drivers/net/smc911x.h
+++ b/drivers/net/smc911x.h
@@ -497,4 +497,5 @@ static void smc911x_reset(struct eth_device *dev)
 	smc911x_reg_write(dev, GPIO_CFG, 0x70070000);
 }
 
+#include <linux/delay.h>
 #endif
diff --git a/drivers/net/sni_ave.c b/drivers/net/sni_ave.c
index 8f651fa4dc9..92b4a656319 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 c24ab83c1a2..45ac1184950 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 26c75067bf2..6364beb9f2a 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 fb93548dee0..e77a2ff0a74 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 804797476c6..56ea1fec0af 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 ecd6df9e451..e3ac40ca0d0 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 f85cdcb97eb..15701ee1474 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 c56836641b1..cfdd1137bea 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 d020aa915ef..af8d99cefbe 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 8bad3519517..c438dab5619 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 09151986f15..d0683db80d8 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 b15e5514e63..9bdb6798b67 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 c3c67fc97bd..1d09c5ac4f6 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 d678e0b599c..158679139bb 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 03ead32f3bb..4060cb60e71 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 3b67cd24f12..664e8379eb5 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 4500e8bb296..aac9be055e2 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 2f48b967193..1f23bbc126e 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 722b5e7cf28..06d711a6cb9 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 3b4b276abe4..82f5c59d917 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 b0037911006..c773f8d28d2 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 0cca4e6d0d1..e49e39e3991 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 dc994b748ad..ab33459e28e 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 dc18d1ca3a9..cbf12371a0f 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 6a9f29c5c80..8249c6212ed 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 9696c84e4b3..af974cdddb8 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 a1ff0b773f3..fe0e43d2703 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 f24e9ff5ee0..8b918b09f97 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 3be51a33f8b..7624f10a047 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 53b55ce7af1..dc188c44e0d 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 ddfacf65d66..15e80049def 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 6030031184c..a1e62197586 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 82655f26dd6..4e9696fd590 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 c98d12b627d..d8c6410a471 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>
 
diff --git a/drivers/phy/mt76x8-usb-phy.c b/drivers/phy/mt76x8-usb-phy.c
index 7fa8c8bf707..4c0818f6e8d 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 bd089b7a435..e987a457f0a 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 e93130aee61..18da86e4bea 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 b436c2184ba..464b0735e87 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 18cf654c785..5220f01558a 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 7fc36319cba..d247a98fc42 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 b0e43ae0a16..9b6a7fa6bb3 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 60f69ec27ac..ade531940b9 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 f461a37a9f6..54b2bf91e5c 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 0fc8cb66d15..b668d949747 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 6a938bb9958..d43383b68dd 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 7c7e9a752da..a395d587a86 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 f5b27548d3e..354817a0378 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 6443c9ffc98..80b9078cf8f 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 db8c5a949c6..28a9a1470b1 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 b959c469ec6..7dcb3171928 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 637db024348..16d9412cd52 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 67d1f9689de..a6b4f158ef7 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 1e3f96f3a08..3e342f48086 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 6dfec893360..9e45627a742 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 3f8be6c8e46..150c72d7ec4 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 8c61a41b202..49b28a5e6bf 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 4cc261aced6..b0d5cba2c49 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 103960d48d2..60a5aaaf19f 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 4ab0e21d217..849f191d6d1 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 94253797946..69c22dd5e26 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>
@@ -875,7 +876,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 +885,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/ram/imxrt_sdram.c b/drivers/ram/imxrt_sdram.c
index b9831ec8b17..80fcb7e56ea 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 b413f499d03..6b4296d714d 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 8dc47389206..31a3c83b039 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 1839cebb677..331d85fba26 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 5de73770a8c..f7f6de1ba98 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 67f494c7f1f..fd5763d0a0d 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 cc9bd02c161..7aedb4fbac7 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 0b11b48697c..094693ce247 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 2e6186d38d3..64d704ef267 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 f01301068ea..3f3926f9e4c 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 9d2d3cf510a..60a1ab8b516 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 d9b1b24f032..1894a60f1a2 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 0ea3d535534..4a4cf19fab6 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 fb0a1a83fe5..914652eb542 100644
--- a/drivers/ram/stm32mp1/stm32mp1_tuning.c
+++ b/drivers/ram/stm32mp1/stm32mp1_tuning.c
@@ -10,6 +10,7 @@
 #include <rand.h>
 #include <reset.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 #include "stm32mp1_ddr_regs.h"
 #include "stm32mp1_ddr.h"
diff --git a/drivers/reset/reset-bcm6345.c b/drivers/reset/reset-bcm6345.c
index 20ea16d37c2..0511a0c63a3 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 bbbca139251..ce7e1c4ed22 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 7ee74718759..a9a927336be 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 3514e7351ee..c446e7a735f 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 b94163f7486..189607c3e02 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 02d617e09c9..36d615812b2 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
@@ -71,7 +72,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 +106,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 +128,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 +136,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 +157,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 +169,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 +205,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 +228,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 +254,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/rtc/imxdi.c b/drivers/rtc/imxdi.c
index 39920f1a7a9..e3a1393266c 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 b35186579a5..11928839dcf 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 94a065379c9..6f49505d4eb 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 5e1689a91d9..9be58425bfb 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 3bfe481403d..80f55c86233 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 98d209072d1..71cb31ff75e 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 30f9b8c9394..8d5cfcedb5f 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 baeaeaac8ea..da017dc5b3e 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 acfcc2954a9..5f45d58e580 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 a9f5c3c3ea9..5c1cf81ae04 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 92e19452f14..b59c63edb33 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 29afbbc5c43..d23955d6e10 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 9aeeb809680..92f4b0b924b 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 e0a2003239b..63628692997 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 3efa8dbaf02..c00a05af7d1 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 cded7a8ddce..746686a18af 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 c85253dc715..cb3d44cb0f6 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 67544ff522e..ba49839107d 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 f421edbcbbe..314a2c3155b 100644
--- a/drivers/spi/fsl_qspi.c
+++ b/drivers/spi/fsl_qspi.c
@@ -10,6 +10,7 @@
 #include <malloc.h>
 #include <spi.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 537c7566024..9c42755daed 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 b020ce2b9d7..0026ad23e37 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 39ae7a8bc40..5b48786b727 100644
--- a/drivers/spi/mpc8xxx_spi.c
+++ b/drivers/spi/mpc8xxx_spi.c
@@ -13,6 +13,7 @@
 #include <spi.h>
 #include <asm/mpc8xxx_spi.h>
 #include <asm-generic/gpio.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 4865fd91f8c..e35c6f9b4a9 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 c5842dc9261..833cb04922e 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 c58fd0ebc43..4ecfe60115b 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 af0dd7150f7..e5f9f49caf8 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 ae62aebc02c..9fc5f6e00e9 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 fdc9f952e7f..8071de09eba 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 27409186b0c..bf02bdb1afe 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 3a1ef8c0935..1461f094277 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 f09d9603d84..dcd09508946 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 c810dc421bd..96ab6502de1 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 57d41b778b2..42ed1ba20b0 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 b59b876a626..e3bad5532a5 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 d43c7b70034..995240f0cbc 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 ff08d356bfe..456f006bc12 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 691cad9d458..31eef0ade9e 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 da3fca90367..101bd5ef2d7 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 890660b44a9..93c959ff444 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 34a8bdf24cc..a1b4b0dacfb 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 ec2492014a8..0e17408c644 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 713111f6c3e..03918ed6a74 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 2079ea913e4..d9e4877c5c2 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 b007c7ec6fc..f47813e76d0 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 da4269a56ed..2dd374cf77d 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 c8f82658135..a253ee15027 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 8e7b297fe21..ef54e3b7b29 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 bbb18e89e0f..136dab5602e 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 4266bd630c3..4a6374c4928 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 8377eb458b6..31b7f81f338 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 25d20483bb6..df28dc77d79 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 1fc899d391b..7d6278a52cd 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 8945abc396a..2aec874e1de 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 677061458cc..abbd4136890 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 6b0166a1e06..ade3a7f85c0 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 5f56f6f2dde..db75ae2498c 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 b4a56390b32..381bef2bed8 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 b8fe65237d5..0cb7dbc8fb8 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 1454d98d8f8..61b8683230d 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 4bf4066d7a4..d564de285f1 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 82fea742b06..d3532df141f 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 3ecb669507b..c89cd57c253 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 5677eab4261..cdbdbcc5cac 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 70c5c678c3b..7fc5d27d436 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 8cf16356271..d16f2d1c7d2 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 c4338af0d73..7f8e9564b9e 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 900eb963776..88fc87f2e90 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 4211eea3a4d..af43433d88d 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 ebf1f4eb553..d19ac1d0353 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 15c43782b80..ba362b8f258 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 7bf3189e0dd..1821c140ab1 100644
--- a/drivers/usb/host/dwc2.c
+++ b/drivers/usb/host/dwc2.c
@@ -18,6 +18,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 9093e029ea6..0b0b2137c76 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 f46bdb441d3..b61b5382df4 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 75d24ae0155..ac6c5b58452 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 3773f38165e..45845892376 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 2c9382fa999..9c15bb574d5 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 82f99e924e4..212b3623325 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 1254066574a..a9193b163b6 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 4941cb94575..d0b7ac512e8 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 8e8f6d49289..824c620e638 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 a5061f7726c..5fee5371400 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 4868581066f..130b73dfe49 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 8f5bfd5ed89..3e87e0c7fd8 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 55fe6fec9a6..d81f4a03f14 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 ba6eecada12..562207d3d26 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 ac1ad29b02b..c62d8feecce 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 d790839fda5..37aa2c55f24 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 e08da6130bd..7c823f241a8 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 8a40f664470..5d66e5881f3 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 eada0b1a328..02ce95c7127 100644
--- a/drivers/usb/host/xhci-dwc3.c
+++ b/drivers/usb/host/xhci-dwc3.c
@@ -14,6 +14,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 76aa431243a..1705accbde1 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 3dd5bd84fc2..47ab7b2abd8 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 69d6104044f..0a52e09e19f 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 1f6e51ed983..67488ddb504 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 f366ae58e87..733b197f593 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 131fd7dd79f..c281c38a288 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 72f14b93438..988071a61d1 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 c7867fef8ac..66e8e9ce886 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 1c32f3fc068..a29d10d3354 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 0617364f358..f945f1f5e2c 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 632a9882b3c..afbc648883b 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 4d7723621d0..d901f8777c2 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 9209942430a..be733f39b23 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 24ea8d8c312..6a60523e0f8 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 d2945d1417b..676868bead3 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 26299e04d54..8b930e3fa91 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 a2158c9bb85..3bb152be893 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 e8499bfdeec..dd0da0e841e 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 c48db7d13c1..ef3513fb387 100644
--- a/drivers/video/am335x-fb.c
+++ b/drivers/video/am335x-fb.c
@@ -18,6 +18,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
 #include <lcd.h>
+#include <linux/delay.h>
 #include "am335x-fb.h"
 
 #if !defined(LCD_CNTL_BASE)
diff --git a/drivers/video/anx9804.c b/drivers/video/anx9804.c
index fc2f431b9c9..b050c4292f6 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 6fce0336369..c4da2e3ae7f 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 f66ce2cd635..ae8ec26468f 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 6a30a5e6a65..1c5270ff05c 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 52e7d697eca..8399c6f74cf 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 bd6635ecf5d..389b02cdcba 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 fafde7df4b1..8e8fe9d9b39 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 c21da6ea060..4984dda8477 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 daf0024c640..c4fbb182944 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 5dd75e7ec82..e8a3af7e608 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 c20d3c1346c..749bde862e0 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 b835b5c3835..ae500a70280 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 48edb9c55fd..ab7d61afc88 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 1b6e71dfaf8..8111acd9a0b 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 1e2febd7964..5cbe50d4cbd 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 a57abd23f73..c6c8df6a96e 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 0f24de9bf84..5908b23acc9 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 2274976c6c0..c2f00bff18d 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 18814230915..4c57e311d16 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 93aea05ff84..a36bc2f06cb 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 8b458e28dc8..45df9c13474 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 84fafe43410..9bc4bbb85d3 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 87a75a9ca2a..1e6da0e1e25 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 301c1f0df17..04e435f913c 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>
@@ -79,7 +80,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 +223,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/drivers/video/mvebu_lcd.c b/drivers/video/mvebu_lcd.c
index d5ed8d00962..f3cb2bfb480 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 4b8712fb691..9b42ca8d03f 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 d47c3972585..52c89fca44f 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -10,6 +10,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 650ed072393..b1f2dd403ef 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 149fbaef060..468a5703bdb 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 853dbc52d61..9169280fb8b 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 0f91dab1f25..25ef25b870b 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 b6cad362de7..5c8812f3983 100644
--- a/drivers/video/rockchip/rk_edp.c
+++ b/drivers/video/rockchip/rk_edp.c
@@ -20,6 +20,7 @@
 #include <asm/arch-rockchip/edp_rk3288.h>
 #include <asm/arch-rockchip/grf_rk3288.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 9c7b5f6ab38..497258f3de9 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 60075a6cf32..54f0f88b4c9 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 83566bc6d66..4cdcbe7755a 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 e8da302303f..73033c3b858 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 31f0aa7ddcc..2b93de2d40a 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 546b863b64b..cf2d6a772be 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 01ed6193ea4..4223d5f789b 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 0aa9541101d..6c279322639 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 e90210b695c..59758eb9361 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 0d35a3eb621..49f33c15b5c 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 64430f3b196..2e5bbade002 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 08715c6a666..1881a3b1f14 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 90821cf73bf..45ad47a5d6b 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 51d6273a930..3aa222866ff 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 b71b4061260..9c74f4994b9 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 a43d14f3967..bf7e9306430 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
@@ -237,7 +238,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 +319,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 +342,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/include/common.h b/include/common.h
index 552cb298a2b..f7c0f5724a3 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 20684dc6f3d..237bf2bfb38 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 f28407f9680..8a39694e5d6 100644
--- a/include/configs/km/km_arm.h
+++ b/include/configs/km/km_arm.h
@@ -106,6 +106,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 85f9a7a7084..b3005540916 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 9ada1af5ef0..30183c5e711 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 6fae6349610..a8911b6bf57 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 8e72c265a61..58382ac4f4c 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 3d6447d7c0a..65db0f6cda2 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 */
@@ -183,7 +184,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);
 }
diff --git a/net/arp.c b/net/arp.c
index b72b1fd7370..1d06ed25722 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 d1e8cb8815b..de3dab4114d 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 70a866b441e..80b82dbfd83 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.0.292.g33ef6b2f38-goog

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

* [PATCH 18/18] common: Drop linux/bitops.h from common header
  2020-04-07  2:40 ` Simon Glass
                   ` (17 preceding siblings ...)
  (?)
@ 2020-04-07  2:40 ` Simon Glass
  -1 siblings, 0 replies; 30+ messages in thread
From: Simon Glass @ 2020-04-07  2:40 UTC (permalink / raw)
  To: u-boot

Move this uncommon header out of the common header.

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

 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-mx5/imx-regs.h               |  2 +-
 arch/arm/include/asm/arch-mx6/imx-regs.h               |  3 ++-
 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-owl/clk_s900.h               |  3 +++
 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-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 ++++
 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             |  3 ++-
 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 +
 arch/arm/mach-socfpga/include/mach/clock_manager.h     |  2 +-
 .../mach-socfpga/include/mach/clock_manager_arria10.h  |  7 +++++--
 .../arm/mach-socfpga/include/mach/clock_manager_gen5.h |  7 +++++--
 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/include/asm/mtrr.h                            |  2 +-
 arch/x86/include/asm/sipi.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/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_s900.c                             |  1 +
 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/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/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/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/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/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/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-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/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/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/elf.h                                          |  4 ++--
 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 +
 744 files changed, 943 insertions(+), 21 deletions(-)

diff --git a/arch/arc/include/asm/arcregs.h b/arch/arc/include/asm/arcregs.h
index fff6591c681..b452b4f89c2 100644
--- a/arch/arc/include/asm/arcregs.h
+++ b/arch/arc/include/asm/arcregs.h
@@ -105,6 +105,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 1340776c669..12e4600c1fd 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 f032f3e2f2a..27b5832a0c9 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 6deecfdc238..57ab640e263 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 72fc34db1c6..d1aecf6a85c 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 dbe1b619772..d2672fd40cd 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 3f1da436142..aa6fd6b28ce 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 6fe3ede387b..e23629ab0bc 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 6b6ad020316..5183e00a44c 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 5394a6697e9..8ee3adc8058 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 9b819b0a1cd..79081de700b 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 64809d5deb5..0b73ebdbb4d 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 ddd9390df4c..908d8600279 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 862ec2e2f1f..c9be0768e34 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 3ca0951543b..882262d13cf 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 bedd01bfd85..3acef1ea6ba 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 debed6bac7c..09d44f68cf6 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 38a6f5966b6..97625cfa9b9 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 d293f2a8391..91c87696e03 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 b8066678601..db29cc3a00f 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 b781ba9475b..743d2e8bb97 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 e3a72c8b66d..1e9f8cf498b 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-mx5/imx-regs.h b/arch/arm/include/asm/arch-mx5/imx-regs.h
index fbb6e599b6d..7f62a367eca 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 4f01b20aedf..8c3b37f4756 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()) ?	\
@@ -1003,5 +1004,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 63365140072..17850331dd3 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);
 
@@ -1223,5 +1224,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-mx7/mx7-ddr.h b/arch/arm/include/asm/arch-mx7/mx7-ddr.h
index 3c0790487e1..37aaee0ad79 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-owl/clk_s900.h b/arch/arm/include/asm/arch-owl/clk_s900.h
index 88e88f77f82..c1a10e770ca 100644
--- a/arch/arm/include/asm/arch-owl/clk_s900.h
+++ b/arch/arm/include/asm/arch-owl/clk_s900.h
@@ -11,6 +11,9 @@
 #define _OWL_CLK_S900_H_
 
 #include <clk-uclass.h>
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
 
 struct owl_clk_priv {
 	phys_addr_t base;
diff --git a/arch/arm/include/asm/arch-rockchip/cru.h b/arch/arm/include/asm/arch-rockchip/cru.h
index 5cf2aec11a7..5eb17f9d554 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 40a5ca7390e..cca812d29e4 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 714cea85b4b..316c67c62f9 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 1db25afe264..0ba5ff6a04f 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 82234cf8ad6..40cdcf4a45a 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 45e882b3c96..0079d200780 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 0f00df6bf52..fb25504b12b 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 97818817389..3a3657789f6 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 c75a633c919..a033a185388 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 99942e6aac2..6f6c5c9954f 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 267649fda4c..c76372ee826 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-s32v234/imx-regs.h b/arch/arm/include/asm/arch-s32v234/imx-regs.h
index 9a779cce965..1472a43f1bc 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-stih410/sdhci.h b/arch/arm/include/asm/arch-stih410/sdhci.h
index 105d3580ef1..d5557b89fcb 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 de42996037d..8af6de220d8 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 c93fc5a7e30..02faaeb663c 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 ce2a952f787..985ae2544de 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 5dd97ab2273..cac5c5faf05 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 e36937059b6..426069fc69a 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 530e0dd73b5..fe6b8ba2732 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 49a8a66f7b1..be02655cdd5 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 929450fc674..b66d58cd73b 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 49a6108c19e..3f65306cc68 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 d4634e55e45..2a879963547 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 603850b9ffd..41df5fe5b6f 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 dca283c7a93..b89bddd2e89 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 59347dd3d81..6444af2993a 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 1524bf29116..e1f5a738135 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 62947bf99c8..ebcb22f1cb9 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 ae0a187c4db..d13da56ac0d 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 {
@@ -474,6 +475,6 @@ struct mscm {
 	u32 cpxcfg3;
 };
 
-#endif	/* __ASSEMBLER__*/
+#endif	/* __ASSEMBLY__*/
 
 #endif	/* __ASM_ARCH_IMX_REGS_H__ */
diff --git a/arch/arm/include/asm/armv7_mpu.h b/arch/arm/include/asm/armv7_mpu.h
index 8f77ec42a6a..16b9d0d1aeb 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 b02c454d04c..fa8548624a0 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 ac6c9e70134..5131fabec45 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 6d31cc44226..7933ad5a867 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 3ddcd95a26d..3034e15ce48 100644
--- a/arch/arm/include/asm/psci.h
+++ b/arch/arm/include/asm/psci.h
@@ -96,6 +96,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 bba1048499b..0852ce80a64 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 fbc421b6305..42d7e4c989e 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 96c8a31fb83..9abdbc88e40 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 6ee22d2944b..90f37a123cd 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 9cf4a67406e..94590d3049a 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 f423afd0ad3..2ce99d956c5 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 0300c336dd8..4517df41bce 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 7a03d6d3c73..f348b05bc85 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 e4c706adeac..9d23c476f92 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 3d263418f22..bae228f06bb 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 9cd32d14f07..901a36bc356 100644
--- a/arch/arm/mach-imx/imx8m/soc.c
+++ b/arch/arm/mach-imx/imx8m/soc.c
@@ -21,6 +21,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 8d5fae9a976..8e7d15160da 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 720ef65375f..60409571fae 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 6df76315456..a91ef5f735d 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 ead136ed638..0deed66eff9 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 475278bd041..959bdd4358e 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 3c46824d0b9..0c59515d2eb 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 42bd0ac1cd4..336b103dc8c 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 7793cf12665..3d078be9919 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 f46a98cfd1c..0e710a37955 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 d2234dc88cc..0c5dc6a7395 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 a05351292c4..989b0c31580 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 d947d40eac8..88e8912959f 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 aa9ff2bdba7..c260413a57a 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 bfae0c36ea1..3abb27e03b4 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 dd660769e2c..ebbb880b71e 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 c83268181b9..a107778cd1f 100644
--- a/arch/arm/mach-mvebu/armada3700/cpu.c
+++ b/arch/arm/mach-mvebu/armada3700/cpu.c
@@ -7,6 +7,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <fdtdec.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 c56b0aeb792..3a63dafde4a 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 304be957033..c79eee98fe9 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 acb9257c90f..3f3b15aa8ab 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 a95db5e5c3c..9000f98d01a 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 af50cbc4f41..adef3331a7c 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 50b78cb07b0..43b3ed15d07 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 108c93542de..722e6db0566 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 e9c7b2d9969..ec4cc753812 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 446f99f6349..2f9f8e65d03 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 94332b7edec..35ec81d3146 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 ecd02b9be04..5cd8a8c787f 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 be9b2337471..7741718be14 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 35a5c797282..8e8214cf7ec 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 c865afa5f28..1c6d65a5887 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 f263f7e8b2f..09b0d6ebe81 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 3c6ba186954..ce76f540f3d 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 74f185c87f4..88f80b05a90 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 9ba8fdd7293..442d2362550 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.h b/arch/arm/mach-socfpga/include/mach/clock_manager.h
index c6830582a5a..1f734bcd65e 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 23f280df1b9..11ddee5cb64 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,9 @@
 #ifndef CLOCK_MANAGER_ARRIA10
 #define CLOCK_MANAGER_ARRIA10
 
-#ifndef __ASSEMBLER__
+#ifndef __ASSEMBLY__
+
+#include <linux/bitops.h>
 
 /* Clock manager group */
 #define CLKMGR_A10_CTRL				0x00
@@ -64,12 +66,13 @@
 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);
 
 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 08655094ca3..5c9abe619b9 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,9 @@
 #ifndef _CLOCK_MANAGER_GEN5_H_
 #define _CLOCK_MANAGER_GEN5_H_
 
-#ifndef __ASSEMBLER__
+#ifndef __ASSEMBLY__
+
+#include <linux/bitops.h>
 
 struct cm_config {
 	/* main group */
@@ -107,8 +109,9 @@ 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__ */
 
+#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 e710aa2f94f..2faecfd5ca5 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 430341bea14..adab65bc968 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 62249b3695e..048708202cc 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 c8ec5d4c3c7..e08c0056286 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 ae728a5df5f..55707ab9c58 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 22e4eb33de8..19507c292dd 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 25b82fb2858..bc2a2ca94c8 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 6de0a081317..f8169547172 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 3a6c9515c64..c90f63a754c 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 39acc8cfdb0..7209e8d6db7 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 1008a78dc83..a65860ef021 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 d18e1069a9f..bd0586f75c9 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 b772c078b47..251c56dee6b 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 f0636005e5d..9bf645a7a0d 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 cc6be076c07..6e17e88790f 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 b52e1e85d5c..900dee4c38a 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 b46083e9db9..8e84062bd7c 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 d369df93d4a..15e86cbac8f 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 4fe6df48123..ccc64eb77b4 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 2edf66d5c10..4aee50f5d32 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 43b28f8b86e..2fb625535bd 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 6a041c500b0..8b342921bf8 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 7de6b7fbde9..3f7e5f30ba4 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 3c77f488534..622303786c5 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 e26beab2e9c..9af5afd3f3f 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 fd361c5ce8a..07f30d74205 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 8f37471f81a..3878171607d 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 f80311e64e8..7538e6b2e0b 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 1e3cfadd2d7..ffc8c7a1b72 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 2cf0b2cb1f9..09166ecf8f0 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 bb972b3a604..9fa2225ed2b 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 9c5a6b68ec1..218f60a96cc 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 3a009bb532b..78f2370e09c 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 62330a65759..6cd5e77fd15 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 92d431bd041..61cc1489889 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 cee2328ab1e..d4884e7fa9f 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 43827d19678..323c634fb32 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 73af34721f2..bf6addccb5d 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 efbb82f62b0..690f3c5601d 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 70db74d3a0c..82bb9e8c3bf 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 e33ec8ab867..19a14d76b95 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 5e3a53372d9..d6b4c5d7684 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 d1f4287f654..f60de0ad4be 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 4a1228d29f3..8d1d21b9b10 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 3c84edc18ab..e11ad8788fb 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 6e0bbe2746a..151bb3e6d48 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 a74a68593d2..750a8013d16 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 2303734894c..07c4f9aeb61 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 9233f037bb8..ded7c5fa77a 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 b2a4203644a..5715ec164c8 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 4ad92214a3b..50cf073eab6 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 04cf70bec34..fb10bf2c26e 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 9b80fdb574b..43d40be7165 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 a3abbc40156..e8cb1dcf9a0 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 b8c9d5ca49e..4d4151b3d55 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 493eaad1df7..7d6c64f316b 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 8c67190ecb4..72d7c4d08de 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 491ead169fe..13967f66b06 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 fdb554f5518..ebd8ad0dc1a 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 8976ef57c70..f2472ba0b5b 100644
--- a/arch/mips/mach-mtmips/cpu.c
+++ b/arch/mips/mach-mtmips/cpu.c
@@ -10,6 +10,7 @@
 #include <ram.h>
 #include <wdt.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/io.h>
 #include <linux/sizes.h>
 #include "mt76xx.h"
diff --git a/arch/mips/mach-mtmips/ddr_calibrate.c b/arch/mips/mach-mtmips/ddr_calibrate.c
index dfc42ba92f3..0b5d4370078 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 756535a0b45..7f5e731a0f5 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 74f824d2bca..f017985ae92 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 c28e4425ee7..aeff007fb06 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 1d0213a513c..9a6fc13b73f 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 808d953c525..4465ae7565a 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 3d00de3181f..2c378b76158 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 ca9e6aa8eb1..e388386ad42 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 82e5f9ffc7c..353dc4e8748 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 1841565d0a8..19b3c0db5fa 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 1cebb0322ef..5804aa8e737 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 a0695da9364..edafad36b38 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 d09f782f5f0..f9515447285 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 41bcc788c0a..a48629cc3ad 100644
--- a/arch/x86/cpu/apollolake/fsp_s.c
+++ b/arch/x86/cpu/apollolake/fsp_s.c
@@ -22,6 +22,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 b5098bb5e2a..b96e31eeb80 100644
--- a/arch/x86/cpu/apollolake/pmc.c
+++ b/arch/x86/cpu/apollolake/pmc.c
@@ -16,6 +16,7 @@
 #include <spl.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 f2e48f401fe..f73738ce5c0 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 2a538cf12e3..3420f03ccaa 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 8364bf11182..a872373a3e1 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 d72c0d637a7..5448f064fcb 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 5d2adad3197..977b7eccd88 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 206d8903fa5..9e7bd62751a 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 eb825ce1c06..a5a1f73bf48 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 5e98eaf53fd..ff09278b962 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 806f7873819..4ca0f79bffb 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 6894298526e..47c1da80d77 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 72fd9246cbd..e2524b089d4 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 246c14f815b..94e6b18e21c 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/include/asm/mtrr.h b/arch/x86/include/asm/mtrr.h
index 672617256e9..212a699c1b2 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 1ab6c2874a0..24834225287 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/arch/x86/lib/scu.c b/arch/x86/lib/scu.c
index 41e67392361..d29d701631d 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 0b227bb4bf9..1a7fd801cb3 100644
--- a/board/CZ.NIC/turris_mox/mox_sp.c
+++ b/board/CZ.NIC/turris_mox/mox_sp.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 #define RWTM_CMD_PARAM(i)	(size_t)(0xd00b0000 + (i) * 4)
diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c
index 25759e09ecf..2da878d3648 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 a6f1167e390..62027bd6385 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 ba0a944b9a0..e9897b3976f 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 f225f467bf5..60ce940e1dd 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 53a80c949bc..08a3c1cc80e 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 cb653578446..63bb771ab3c 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 1153b188e7e..5f12a27002f 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 deb530fe78f..632205164eb 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 982cb157b76..668484b71b6 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 5c9124fbb4a..e4bf507cc3f 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 58bce53e233..bcd94dfc85f 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 427151c8dfb..3c132f12717 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 92cdc7befaa..711e03fdeac 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 5f0a6594b67..28dcc2a6903 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 b2f464abb1a..ae3be5785c9 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 e592e4d3897..a6aeaf506a1 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 688bffae79c..576f04c1443 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 074f3d29282..3993d585150 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 d53c8618076..182391ca9ca 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 3fd2c5e8494..94cb93a42d5 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 2ef3b3ab270..c23d1509214 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 3b4494c59f5..3ea2bec8ebd 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 066222c563d..7292d7ab5a4 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 90946cc34e3..d206f8f0c56 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 9b82c949b38..b3af8fec917 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 8e2dd5fa507..371c3c33fc8 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 2065a5a7db8..d0d34012d74 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 e87ea0a7adb..5339b9e9f94 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 0cb33663aaa..06a4e67881f 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 70a13aa17b3..58a564ac314 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 4b67a4ba2dd..8b419ef6f7e 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 0566fcba5c5..45b9649336d 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 f806576b90c..51700f4acff 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 a5345360fe5..74e8bfc4314 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 d9c0200f24d..cfc3529c348 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 0a988cb7dda..4aeec473b16 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 f4212ab8222..45f9bacc712 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 c40dc052b5e..b0c56a29f1f 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 ac7c5b0bc53..ecc73227a02 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 600a355a6b9..279ed487216 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 a9c289447e5..2de236fc298 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 400c166b90b..5fa10878d2c 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 5f37a19600d..c8f4b214a2d 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 686ad28f65c..c6a93c25e6d 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 b1b2ceb607b..624ba5db04e 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 0f21f8d743a..1b3acc8fd1f 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 a321678e1b8..449bbfa7b81 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 8a94f21811b..36a35a9a9cf 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 ceaf164e780..1ca857c2c3d 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 f311a723919..793e02cb440 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 5b1f03cf7d5..f10c6cffc2b 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 e006774edfa..fd6e5054a6d 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 97d9ed753b2..9401a1ed624 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 fe753a79dac..171d06f3175 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 9859977c77a..f10f84a3cce 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 b32e11a1999..babcce9aa1c 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 a10752de1cf..57c1fabaf3a 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 d7814af11b1..836948526d5 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 c84146a6086..1e3529f3348 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 492530ec4e9..bf7c69ea838 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 19fb85f34c2..e5e33dcf15d 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 addab8a0b47..1eceaac9e3c 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 f6ed3478b44..7f83240123e 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 4eea343ed24..bd622261714 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 c1746b61109..91fa94a638e 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 c1c105a8fd9..970bcd4a17e 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 9026ee5afb1..024a33cf245 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 05b63e415be..497ea186d3a 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 474495a0058..4199bee2e64 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 5835af5344b..9f75b5c0044 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 450ccc4e078..ece75326a55 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 734b2afda93..75b37f91a52 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 2bdeb8eca76..8e88ed0aec0 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 287132e4fc7..9134d6bf6d4 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 10984662b68..0c46de7599c 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 4f8a0453f46..1cfe498b70d 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -30,6 +30,7 @@
 #include <zynqmppl.h>
 #include <zynqmp_firmware.h>
 #include <g_dnl.h>
+#include <linux/bitops.h>
 #include <linux/sizes.h>
 
 #include "pm_cfg_obj.h"
diff --git a/cmd/nvedit.c b/cmd/nvedit.c
index bbc24824b9f..e15e516cdfb 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 f50c3d31bd5..09869f78464 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 1e1515f6e31..72b0cc4e5bd 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 850142cce37..561740f63b5 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 2ca0fb4f108..31bbb6f9d68 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 140ddcee3cf..b12f894a9bf 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 dda3586d7c6..47cdea1f586 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 b29cb4e435a..8d17d12c5a9 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 a4aee8b58a4..39455110907 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 1373e7c387d..51c074bfe23 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 63153fa6608..0042958f4c4 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 d93328ef299..cd68ebc4387 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 b7eed948a51..dbcd2c17d16 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 f9adef2eaac..76b1958670d 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 f1f76b0a4da..fd47872ab99 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 6415c2f1b91..23c1f2c4ba9 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 03c9e637da9..8c1a19b7988 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 b9d2ae6778f..c69cce0565d 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 f01ec9a8598..b850b9fc069 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 0c49ee0798b..2318dcf6a45 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 7ddff2feaf3..dc46de2a7cf 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 3543bea70d2..0619d04f0ec 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 6d604cd82c9..93722f74ae4 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 f147392fa1a..5e6abca56fa 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 b16e068c364..f04217f587b 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 ddfc5f6e68a..b48319bba67 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 c526fc1cce4..b0ccb6c8eda 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 0a1495a464e..dc0ba71f109 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 c44969a0736..a15fb45e8e7 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 d6837524030..5b2aa5f200a 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 cb168f146b8..ad254d1cce5 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 071bf69b19a..cd1db257836 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 76f7b3b361e..985a0c1de5e 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 671d4b35c7a..388471b03a9 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 c7dc980861e..95a23d14a8e 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 a42db939b0a..e42cd10c447 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 7adc55a9803..ef72a416c15 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 9e1f13d14f6..1afb3e676be 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 6d2fdf71399..a7a463eeace 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 4c77c8da1a8..8d96ec767ac 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 7fb88029204..8a31a4c868f 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 068e48ea040..f0a10f17bab 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_s900.c b/drivers/clk/owl/clk_s900.c
index 7e9858234cd..01cf8188e7f 100644
--- a/drivers/clk/owl/clk_s900.c
+++ b/drivers/clk/owl/clk_s900.c
@@ -11,6 +11,7 @@
 #include <asm/arch-owl/clk_s900.h>
 #include <asm/arch-owl/regs_s900.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 
 #include <dt-bindings/clock/s900_cmu.h>
diff --git a/drivers/clk/renesas/clk-rcar-gen3.c b/drivers/clk/renesas/clk-rcar-gen3.c
index 8e1af1caa1a..15e38337567 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 b62b8753cd4..7451f53ba39 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 e11c02e6e82..25fd4896094 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 fb18ee7aedf..d47ab99e882 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 b6be1bc0323..7093e0d42cb 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 ab4747ee14b..dcd96ad0177 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 253a9143b7a..89dc141239d 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 bd36ea3b6d8..6ed88295c98 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 961eb7fb600..df071201718 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 c076ac771f2..c8d7a9469ba 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 3168de20f91..357e7b534da 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 1c793709822..d62aeba635b 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 6ad684c10b9..7c1222f6c8c 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 5b7012d37c6..b669dec594f 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 b5b46e39504..71916dbf3b1 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 912e1f6e92e..054b2fd349b 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 3b199bbb869..a1dd642eefe 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 5889cf862e6..d3633b69795 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 6d692ec8b70..02d3b08efa8 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 8769887b2fc..93a88a7630e 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 7a96d1708ea..67507c5ab1d 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 33d41d47b0f..d11a4b5f038 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 c16019215e2..4d562bfe427 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 4ec3c2ae892..4a9454eebe7 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 f94e8aa754a..d96cb1aac1c 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 fb76aad528b..80d7407037e 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 2be87a31fd5..d6f23ddc778 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 6111a13f1c1..7e844f4ff16 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 105c15d8694..a1cb8952d39 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 44abc4f536d..ac360b2bebd 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 77fba5357f9..41934cd826e 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 789ac72026b..b79446cc4fd 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 613c8360495..2649c5c6e91 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 95653683ac2..24fd146bafc 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 c1a7a555c67..f8a84bae9d9 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 1dc7ee9fdcb..cb04f5638db 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 19d5724a606..3c58f59f3ab 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 ba588e96af9..1360bd0a3b8 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 ed60b226dfd..2d3fb1953b8 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 ef430ae1358..e5481eaa0dd 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 442f72c2709..3b78118a9d8 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 ea8bcbeb516..2f76beb2dbe 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 16ff6eeeb95..d299d763db1 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 8533b28c258..84139b85c33 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 9e0e82520e7..91172d483c7 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 de963347f11..ab58e97bfe2 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 c88399a815e..5d50bbcb031 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 6e28bf913fd..fb288222a8f 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 b3ed7c04d4a..5a113190e66 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 69ff74d6a95..99d5ff6273b 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 e14204633e7..dfd3cbb4610 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 b995bcc008b..2ac4e389521 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 a3f5e7a2e0a..455944d547a 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 71a978cf407..5da11d988e0 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 c6266b88cbf..055907c1a1d 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 7b50a34b3f9..e5e35181940 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 9dc4cd60422..c49a041059d 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 ce2453e2ba6..21a87d645cd 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 97a04178917..95de2ae3660 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 8eeb3849c2b..d9df804f639 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 1bbd212b4fb..780d77b2f86 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 54d313d6f1d..612413e17bc 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 e8b1c5965cb..770cbf6b607 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 3094f1c804a..815339a1560 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 d06b834a3bc..fd17d1a5910 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 7c790bb64ae..1b9a18fe5dc 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 d8789e76078..bb1ad256fac 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 00b806e6a65..0653171af48 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 76d5a1d34ee..24da3b3c230 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 240adc488a7..bed182f81f4 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 ac8df27c467..3e686beedc1 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 fe3b2c3b1aa..d0e90b8d633 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 74afb4aec22..8be585a0c86 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 87f02bfaf3f..3915af83723 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/i2c-cdns.c b/drivers/i2c/i2c-cdns.c
index 402a664876d..024c63c4eae 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 46eb017ea0d..62831522bd3 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 296e01b41cb..cec38538da4 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 0a647b8f73c..e070caf43f2 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 5a902047bc9..4267bbfa5a9 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 6b21f6a5326..cad0a623d36 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 8be028962a0..c6b1f1a368a 100644
--- a/drivers/i2c/stm32f7_i2c.c
+++ b/drivers/i2c/stm32f7_i2c.c
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <malloc.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 ac41a7f0f83..37204718ca1 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 2be4279c08d..b415d8b2b40 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 0778eb52253..b8bf356b4ac 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 1d2c9798474..f82e6d3d166 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/gdsys_ioep.h b/drivers/misc/gdsys_ioep.h
index 4d9524b6b63..f195388edaf 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 4923c81783d..00d34a3adc2 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 c988dd402cd..cb4ea2878a9 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 bc3dc93af2d..1fba3271db6 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 90df3772505..395dfe8d946 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/mpc83xx_serdes.h b/drivers/misc/mpc83xx_serdes.h
index 89ea1dbab73..2a13c5892bf 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 4077c46a237..18da138507c 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 53d7e1d154a..02e5b586e29 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 ca76e1f5595..cbc531dc535 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 52bb39a905e..c4876e81f8c 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 665eb9aa688..d5d955846cd 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 1d040f60869..588d6a9d764 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 5b8416813bd..b37523e26f8 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 83ae1e51699..d3f1eddf450 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 2de8513b7f9..0d34594afb6 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 0b690ecb4bd..e76ab54838b 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 ad2c0e00023..e3c352b44a8 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 0c21ec716e4..8636cd713a3 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 963f2d97b6a..197c38c2818 100644
--- a/drivers/mmc/renesas-sdhi.c
+++ b/drivers/mmc/renesas-sdhi.c
@@ -11,6 +11,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 86408d57f30..7b5010b6558 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 c5fbf5696cd..2e90dcc03a8 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 1a01fe5a739..2e994d0178d 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 22a0f78933d..772fe943e4d 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 73cc7e05fb4..bd5dc29c086 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 78838682c7c..cc78a2f2f08 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 047458849bd..fbd1ab94a12 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 7dc600032b8..e765dd384ac 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 6896351995f..cd4d32959a0 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 97e88b71784..1a4dec34d93 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 133670cb199..84d60b86521 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 bc0accf8c66..6fbd24ba749 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 4a017ea74dc..5e95901e275 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 ea7c65a1f6b..6313403cd65 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 e2f5452c272..cd4b24a51a1 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 0f1a28e4765..aa042bef158 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 3a136155dd9..07884550906 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 6aca011db25..818eae8a7c6 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 277e78aac1b..4a9662a5b0c 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 a58d7ce4ab1..5bae7f1197e 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 a008a388ed9..c2e001735e8 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 26650389f43..698968bc116 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 8c14fc55cff..2a470e0ac05 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 97188b200cb..3306bd8ac94 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 5331e73c2d1..004b6f17a51 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 8b2f7ea4915..85d8013b1a6 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 a6f6eff462b..8e2a8096723 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 687306e33e6..04de51cb466 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 6ede98c85d2..c119486efb7 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 0580b509f89..36daef01aec 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 c4983d15d51..ab6f1a8be3e 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 1766ba48023..a58a2c4b6c3 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 fc2aa22d7f3..65320c7ed98 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 940b2e4c9e0..ce0cf4c428b 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 a1672dc4176..c3ccef102e9 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 ee2df11522b..03b31f002b9 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 0fe140cf6e6..3b5d11f956d 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 2b1af814297..79509b80847 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 f57861e8704..3caf0f33109 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 6a428c420a8..c6c674dfa5e 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/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c
index c0306d97c85..834dde666b0 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 48c3005cb3a..37e7e858435 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 3322dcf2aab..e4d08f2ba01 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 9a789e4d5be..f7874ae68b6 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 52a637bd548..8d95ee15ffd 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 1ec98644c92..2aae7f4863c 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 76823c618e8..1c9a401de81 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 9d24c005c12..1d46d0e5e1e 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 833e233aa5a..25b9cad42c9 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 d8ee8df47b1..6687787b1a6 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 01eb204db8c..6f747464571 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 cae31e2f6e7..2a48dc6a190 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 cf8bf9c8b06..d8ee1a76989 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 bf95a38354d..1cf2273142b 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 a2e022db355..64f1c8c828d 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 9bb037d4400..4915e0bc67d 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 ec6805e536e..a8e93e80fc0 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 f9aef17f7ea..092f619bd5c 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 ebe67e45ab3..19b9375ee27 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 0ad8c63d710..0493cfe8724 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 caba8717be1..722f5c238fa 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 8b1cad85407..68cd3d03fd0 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/b53.c b/drivers/net/phy/b53.c
index 25dbf215b41..21da53c7e5b 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 6fac0d59563..d435cc1e6c5 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 be5e3dcaab2..a62c695c5c8 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 e27fc45a281..98a0c83e68b 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 9fd5ca7c9fc..709979f48c9 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 3f8aa7cd99c..7eff37b2449 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 6b6497c93a2..cce09c47f9d 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 823c565a9b8..7b873bc7728 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 3dab91b74b4..393ee9bb816 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/sni_ave.c b/drivers/net/sni_ave.c
index 92b4a656319..07846356895 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 45ac1184950..99e24c63482 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 eea15701f77..8d5f3eb7438 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 a927ea03e04..95761fffc0f 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 e77a2ff0a74..f4cb86d10a7 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 15701ee1474..c2e755f2b1e 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 0daaf17e84a..54750a6396a 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 158679139bb..711b930d0f9 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 014d8704788..e76abc1f84c 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 30eff67dca2..df7b37a5924 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 8dff68dbd0e..6576f53f52a 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 8bc04c978d0..c9afe751501 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 1f23bbc126e..e110550c71c 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 e49e39e3991..742dd93633e 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 8249c6212ed..aa1903e547c 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 27c2d09332c..d298a2b8109 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 c7cd2f5b692..6e6375cec09 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 05787ae1448..713ad49d045 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 91630d35c3f..8a659c36aa2 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 af974cdddb8..b4bae22c2cf 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 fe0e43d2703..d29344ddb48 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 a486152da76..8d28292726c 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 13e0e7b6124..501b97f3e21 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 8b918b09f97..99fdd33499a 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 7624f10a047..9faf5010033 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 2c90738fca0..4efaddd701c 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 160a386801e..0793b97dd51 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 e987a457f0a..18e96e5c623 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 5220f01558a..6907c1afb39 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 d247a98fc42..3f49851bcab 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 c7351f32bb6..5fdc150295e 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 adfc9aedcc9..159f3406a20 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 18b8eee8839..d4539b02d88 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 90c54b45c3e..307ed1db875 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 b9fb46815b9..2dee79af17e 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 550de384ed5..2206e958ec7 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 474c38a0497..48c7bde3752 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 0c43686e01c..801d14253c1 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 ff663ab374a..b3fa124cfbf 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-stmfx.c b/drivers/pinctrl/pinctrl-stmfx.c
index 9b6a7fa6bb3..a3240ccd5a0 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 ce02d28b901..911af1297b8 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 14fcacdbed9..fc241fdcdef 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 7e4530d684c..5055780bf75 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 5313f2f5098..de22e49ebef 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 efbff49f9ba..1179afd2e7b 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 20ffd249c78..617721a6264 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 28c905129ba..d49e3007cea 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 3eb4d952bb5..a175d6c07f1 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 e082eb6a323..85bc0ef0f31 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 2780302585c..faaa2ce1f70 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 0817f7136c4..db2b10a6906 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 990f6811e93..f9160f26c78 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 7647d90eb5d..d04c1afb090 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 63aebdb612f..ec1cb9b652f 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 5edc7cbd742..d969c200826 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 653e40b354b..22334329ed4 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 25231c10f9c..8545b9d0707 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 a6426bee27f..a494bfa8c9d 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 b668d949747..8349a9c1582 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 d43383b68dd..a41b230448f 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 3ff7ca1befa..fae4749012b 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 9cebc7f3f16..707735cf851 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 850b533b846..931d753e344 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 8990be113ea..5055e39cb79 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 fa92fd84f9f..b407f555fe3 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 08a10f05b41..250773514f5 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 66eb0e72fed..911da1d4261 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 80fcb7e56ea..765a2141d13 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 94a7c91b2b7..c87f186291e 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 6b4296d714d..b3a68cb0787 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 e97467029ff..a226bac2cc3 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 31a3c83b039..92457a1fa42 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 1894a60f1a2..3fddf4df961 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 4a4cf19fab6..db2b2942186 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 9d33186b3a2..81ce6552c15 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 0511a0c63a3..156703e0843 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 e7bec9cd7c0..139bc5d73e0 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 149eaef0e91..0c8f276293d 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 ce7e1c4ed22..96916b644ad 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 9f2e809aa47..97d3d575927 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 461c0ccb7a0..4e3327898e2 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 a79a4acd676..bc20e3335c5 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 7c30919215c..80925556508 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 48c24ed44d8..05f7f599ce3 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 ab67bc02de8..ac3a99f9bff 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 47ed140166f..64a11cfcfc0 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/stm32mp1_rng.c b/drivers/rng/stm32mp1_rng.c
index a9a927336be..7ef7ff9756d 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 e3b3579c4aa..0a30e0eabb4 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 9be58425bfb..3afe5b2fdd6 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 7f56b155fc3..acd50c65648 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 82c5185e2e5..d513561b820 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 3e12f57ce0b..f9db318af1d 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 86c3de4e455..7a86161a0df 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 436cf2331df..f88a293d560 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 897ea5d6dc2..382c3b3d34a 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 a6ffc84b963..b9283002850 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 4f227bfe0ad..cc20673efef 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 9d7ed5e88aa..0c63c41270e 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 b3dad77aa28..439057b1b9a 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 7ead73e6b7f..79f261ecb93 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 bac506ed79d..a492063e39c 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 27d3ec9dbc3..5fbbfac8207 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 5c1cf81ae04..e77b90670a3 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 7b0c53145e8..57376518880 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 1be777bd3bb..f29a9a0b569 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 54c718a0a64..d61a9d255c2 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 c3953fdf855..ecc4b8b5a06 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 7907e6f9773..2ece1a8f647 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 b59c63edb33..4154d293998 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 f446a140b22..bc3c1e85f8c 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 127d2bda305..b1307a73623 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 5e8ed6d8967..4e9e68aaac8 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 11d745f53a6..3aa7a40b77e 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 a6c3939db54..9320a8be685 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 76b8556c98a..6167bd164bb 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 afc7be0f01e..f30a8a42bd4 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 63628692997..f9675f75a40 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 c00a05af7d1..97ac97b1a5d 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 09044bd137f..c9b14f90292 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 cb3d44cb0f6..1cdb2331104 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 ba49839107d..50d194f614b 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 314a2c3155b..970813ebef1 100644
--- a/drivers/spi/fsl_qspi.c
+++ b/drivers/spi/fsl_qspi.c
@@ -10,6 +10,7 @@
 #include <malloc.h>
 #include <spi.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 9c42755daed..74050628463 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 d7f1ffdf37d..23c7827740b 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 ad159955734..2cdc0186825 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 5b48786b727..5072860ccc2 100644
--- a/drivers/spi/mpc8xxx_spi.c
+++ b/drivers/spi/mpc8xxx_spi.c
@@ -13,6 +13,7 @@
 #include <spi.h>
 #include <asm/mpc8xxx_spi.h>
 #include <asm-generic/gpio.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 37327ec508f..0454410ee9b 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 df9d9da1a9b..3a0738eb2b7 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 73a3f91efc9..2302e62be4f 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 e35c6f9b4a9..f52ebf4d67c 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 635955e819b..0da4a80d712 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 0e6c7be785a..04b7238aa54 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 ff4c700645c..6a615d1498e 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 88dc1444e14..52e9eff743c 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 61ae92d603d..3ea59b8fb82 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 5ae203d8d4f..2839dd1cebd 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 e5f9f49caf8..e8d7758da03 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 969bd4b75cb..dc492b627af 100644
--- a/drivers/spi/spi-sifive.c
+++ b/drivers/spi/spi-sifive.c
@@ -11,6 +11,7 @@
 #include <malloc.h>
 #include <spi.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 85b662bb0ad..d2dccd67e5b 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 9fc5f6e00e9..001f0703e3c 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 8071de09eba..4a0833b6fa9 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 bf02bdb1afe..0e8198c5a02 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 1461f094277..22a0304bfcb 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 dcd09508946..3679cf06a00 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 96ab6502de1..ae16b45dcb4 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 f25fc363acb..0db0de8f1bf 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 42ed1ba20b0..114bd8abd7a 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 4a568cb56d6..05768eef721 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 8451f83b706..db473da6ea8 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 e3bad5532a5..3e66b34ebbb 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 f12c6f766da..c3a5b3e3015 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 3390b7bdc2c..178bcb227ff 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 9996716f13d..3482d2a0787 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 6f504f7cc4d..6ca9501eb17 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 009af2f9298..70511697fef 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 f4942a5500c..e6b6dfe3765 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 186fe2b45ac..ad8bb28e8b3 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 b5e76bd3586..29cd779b44f 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 8648f1f1df9..7ff921385a3 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 a13fb711656..700c349f371 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 48a5055b05e..bea97159ebe 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 76d99a2b865..c57fa3f5570 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 522988795c0..41a15bd49fb 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 03918ed6a74..36016de4a60 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 41ee6a60c96..1a7bb7bed8a 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 4990fba6ebb..d875269760c 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 136dab5602e..87b4e5fc560 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 652cd5cb17a..cd7b2113ace 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 815b93f2fb4..fffda7b43a4 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 4a6374c4928..a08c6945590 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 31b7f81f338..96c7becc113 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 3d5242b331d..8803fa48bd3 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 1c08a2c5b6e..fb9863fa439 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 ed33d7bd7ac..cd9ce10b3fc 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 ade3a7f85c0..f8ab06482c9 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 94c6522a411..46b92e8d68b 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 1d1b64ef3e2..e34ad2603fb 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 35965e9645a..f71e8c7268c 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 b6df535a832..09f1c6178b9 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 d564de285f1..3ebbd533cc0 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 dffa5117f9c..7d51821497b 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 434db5ba39a..2eda5c37206 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 6c359af90c9..134724e2a13 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -297,4 +297,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 b6110d6b3f4..625d4938cce 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 b3675bb1db2..4964697f27b 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 47ab7b2abd8..f070532eda5 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 8e0e57cae88..961de99795e 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 66e8e9ce886..74a841af460 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 a29d10d3354..53c336fc3f5 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 c6d47bef56a..147b2eb929f 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 6a60523e0f8..f1cf9160d56 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 64269c30bd7..ece36d41eee 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 e8a3af7e608..b7bfbb5e501 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 288b9065445..7b2ff94eba5 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 b13beb1f75a..d507e59c064 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 8edf451f13f..b367276f237 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 39e8ec86395..f6a5d1ac8ce 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 3b5b73b7c3b..cd1e69040f7 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 8408c59eaa1..c9808e1c631 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 45385b175b8..9032eb430e7 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 fa4efdb2987..04796435f11 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 ff48fd7af92..2f3427a32ee 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 0d20e82ba32..64993c4e009 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 cf2d6a772be..01d4b7a11c9 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 4223d5f789b..191cda3ce76 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 b3408828a59..b446674ccce 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 1881a3b1f14..5bf08653a90 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 1024a04596f..12f09a7a392 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 38866141e4a..1cd8866ef8d 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 669a32320d4..10e4754f808 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 581e1f16938..d33e2ac3dc1 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 2d509a05224..2d8bfc09a0d 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 2084538f28f..dcc25c030b2 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 32938a8ffe4..897d0014306 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 2f6b25d3381..e3a4c0bca27 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 41c7d5666ff..e8b8f168380 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/bitfield.h b/include/bitfield.h
index 579a69c856d..d3ceeedccda 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 f7c0f5724a3..f0679ac7054 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 f5ee65cb8a0..78d21362482 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 5b247b5b061..6ff591977b1 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 e2856f12683..3989a9bb536 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 58110aa3e71..d8a8355a0ad 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/elf.h b/include/elf.h
index 81f40191d73..567d9863bef 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);
 #endif
 
diff --git a/include/faraday/ftpci100.h b/include/faraday/ftpci100.h
index b4a43f82e5e..8801bd13508 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 d3a359ab75b..30726dab85d 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 3c979ced27a..e0e5eb339e1 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 a4d7d85fce7..6cbcd39f125 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 a07c70fd485..6b509dce58a 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 487dfe98595..7b027f8bd4b 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 1cba8d9b790..d868dcc85e3 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 f4a63b47f33..83c5163cf8e 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 e83c22423bf..46c08c1d2c3 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 e2fece7aa17..80f1f96b443 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 53db8cc08f5..5dc21136877 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 36722c5e071..aa4951ec0e0 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 1e1abe26caa..cfe8f8ce8fc 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 5da676bf8b6..c69fc69130c 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 68b2e381b96..116a2b2c1d1 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 0b44b66df9f..620566819ce 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 dc8b5a74591..6aa97403953 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 aa4378fd579..ef84bebcb4a 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 852f570eaa8..a0af8d8948e 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 02bcd9e7038..8207d0c02af 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 45b7a4831d4..59ad4aecf42 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 46f9efb7321..10a9c073ba1 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 fe072da5164..5d6fc7716c7 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 5214db99fba..a0a52ec4c1d 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 62933c92c4f..779d7521f69 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 da43b8f7cb5..eb3a096fd1b 100644
--- a/lib/efi_loader/efi_variable.c
+++ b/lib/efi_loader/efi_variable.c
@@ -13,6 +13,7 @@
 #include <malloc.h>
 #include <search.h>
 #include <uuid.h>
+#include <linux/bitops.h>
 #include <u-boot/crc.h>
 
 #define READ_ONLY BIT(31)
diff --git a/lib/tpm-v2.c b/lib/tpm-v2.c
index f89592d6e2f..5a039f65d13 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.0.292.g33ef6b2f38-goog

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

* [PATCH 13/18] common: Drop asm/ptrace.h from common header
  2020-04-07  2:40   ` Simon Glass
@ 2020-04-07  6:50     ` Michal Simek
  -1 siblings, 0 replies; 30+ messages in thread
From: Michal Simek @ 2020-04-07  6:50 UTC (permalink / raw)
  To: u-boot

On 07. 04. 20 4:40, Simon Glass wrote:
> Move this uncommon header out of the common header.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> 
>  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/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 -
>  38 files changed, 37 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/cpu/arm1136/mx35/timer.c b/arch/arm/cpu/arm1136/mx35/timer.c
> index cb351ecf769..f2541c398d8 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 7e2698b6055..4b726d5c73f 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 193588ea10b..d6e1e09f93e 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 7b14ba05b46..08b98a2d068 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 9db1c74b369..6803c349e84 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 febb3857f2b..7bab283c399 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 789f9ca5667..bfc0fac3eff 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 6dbf03b00cd..885233e0824 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 dffdf57aa20..bc062dfc9f4 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 a4f0ab48863..6cb8179ee8c 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 3a7cffcab31..9d8668b2de4 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 e6da4de5343..dd660769e2c 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 2896d6b0611..a888f740efc 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/m68k/lib/interrupts.c b/arch/m68k/lib/interrupts.c
> index ddc91993a14..1caef61d20e 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 2ccd55add0c..c49141f376d 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 265bd8383bb..196e82a5016 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 8d525dc8373..d04f31df502 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 1c6c38b15f1..c3cc119d654 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 e9da9c0d48f..4ad762683fb 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 bc2fc93e110..f37a45e2694 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 033ca327f00..5a916600ed6 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 79bab913676..c0161e3379c 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 3efe8956ec5..eef1951f2fd 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 899bcd86188..56794b08a15 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 64ee0cc2102..73f270002cf 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 4a3e26cffc0..8727d18884c 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 4c7e9ea2151..387fb9703c4 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 3b8f4a36d3e..cf9af4326a2 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 f01ead4e235..64aa198765f 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 76758237c00..4f8a0453f46 100644
> --- a/board/xilinx/zynqmp/zynqmp.c
> +++ b/board/xilinx/zynqmp/zynqmp.c
> @@ -22,6 +22,7 @@
>  #include <asm/arch/psu_init_gpl.h>
>  #include <asm/cache.h>
>  #include <asm/io.h>
> +#include <asm/ptrace.h>

I did a grep and I can't see ptrace macros used anywhere in the code.
I see show_regs used by architecture and common code but not by boards.
That's why at least for zynqmp please remove this header because nothing
is used from it.

Thanks,
Michal

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

* Re: [PATCH 13/18] common: Drop asm/ptrace.h from common header
@ 2020-04-07  6:50     ` Michal Simek
  0 siblings, 0 replies; 30+ messages in thread
From: Michal Simek @ 2020-04-07  6:50 UTC (permalink / raw)
  To: Simon Glass, U-Boot Mailing List
  Cc: Tom Rini, Masahiro Yamada, Alex Marginean, Angelo Dureghello,
	Bin Meng, Christophe Leroy, Daniel Schwierzeck, Fabio Estevam,
	Heinrich Schuchardt, Hou Zhiqiang, Huan Wang, Ibai Erkiaga,
	Joe Hershberger, Kever Yang, Luca Ceresoli, Lukasz Majewski,
	Mario Six, Max Filippov, Michal Simek, Miquel Raynal,
	NXP i.MX U-Boot Team, Neil Armstrong, Peng Fan,
	Prabhakar Kushwaha, Priyanka Jain, Rajan Vaja,
	Sergey Temerkhanov, Simon Goldschmidt,
	Siva Durga Prasad Paladugu, Stefan Roese, Stefano Babic,
	Thomas Hebb, Thomas Schaefer, Trevor Woerner, Udit Agarwal,
	Vagrant Cascadian, Wolfgang Denk, Yuantian Tang, u-boot-amlogic

On 07. 04. 20 4:40, Simon Glass wrote:
> Move this uncommon header out of the common header.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> 
>  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/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 -
>  38 files changed, 37 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/cpu/arm1136/mx35/timer.c b/arch/arm/cpu/arm1136/mx35/timer.c
> index cb351ecf769..f2541c398d8 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 7e2698b6055..4b726d5c73f 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 193588ea10b..d6e1e09f93e 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 7b14ba05b46..08b98a2d068 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 9db1c74b369..6803c349e84 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 febb3857f2b..7bab283c399 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 789f9ca5667..bfc0fac3eff 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 6dbf03b00cd..885233e0824 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 dffdf57aa20..bc062dfc9f4 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 a4f0ab48863..6cb8179ee8c 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 3a7cffcab31..9d8668b2de4 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 e6da4de5343..dd660769e2c 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 2896d6b0611..a888f740efc 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/m68k/lib/interrupts.c b/arch/m68k/lib/interrupts.c
> index ddc91993a14..1caef61d20e 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 2ccd55add0c..c49141f376d 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 265bd8383bb..196e82a5016 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 8d525dc8373..d04f31df502 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 1c6c38b15f1..c3cc119d654 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 e9da9c0d48f..4ad762683fb 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 bc2fc93e110..f37a45e2694 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 033ca327f00..5a916600ed6 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 79bab913676..c0161e3379c 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 3efe8956ec5..eef1951f2fd 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 899bcd86188..56794b08a15 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 64ee0cc2102..73f270002cf 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 4a3e26cffc0..8727d18884c 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 4c7e9ea2151..387fb9703c4 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 3b8f4a36d3e..cf9af4326a2 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 f01ead4e235..64aa198765f 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 76758237c00..4f8a0453f46 100644
> --- a/board/xilinx/zynqmp/zynqmp.c
> +++ b/board/xilinx/zynqmp/zynqmp.c
> @@ -22,6 +22,7 @@
>  #include <asm/arch/psu_init_gpl.h>
>  #include <asm/cache.h>
>  #include <asm/io.h>
> +#include <asm/ptrace.h>

I did a grep and I can't see ptrace macros used anywhere in the code.
I see show_regs used by architecture and common code but not by boards.
That's why at least for zynqmp please remove this header because nothing
is used from it.

Thanks,
Michal

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

* [PATCH 02/18] common: Drop flash.h from common header
  2020-04-07  2:40 ` [PATCH 02/18] common: Drop flash.h " Simon Glass
@ 2020-04-07 14:24   ` Wolfgang Denk
  0 siblings, 0 replies; 30+ messages in thread
From: Wolfgang Denk @ 2020-04-07 14:24 UTC (permalink / raw)
  To: u-boot

Dear Simon,

In message <20200406203250.2.Ia0f8528ae0e9e3ead7d99891b46cccaef5859295@changeid> you wrote:
> Move this uncommon header out of the common header.
>
> Fix up some style problems in flash.h while we are here.

Actually your coding style fixes are anywhere else as well.
I think this should be in a separate commit.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A rolling stone gathers momentum.

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

* [PATCH 13/18] common: Drop asm/ptrace.h from common header
  2020-04-07  6:50     ` Michal Simek
@ 2020-05-10 20:36       ` Simon Glass
  -1 siblings, 0 replies; 30+ messages in thread
From: Simon Glass @ 2020-05-10 20:36 UTC (permalink / raw)
  To: u-boot

Hi Michal,

On Tue, 7 Apr 2020 at 00:50, Michal Simek <michal.simek@xilinx.com> wrote:
>
> On 07. 04. 20 4:40, Simon Glass wrote:
> > Move this uncommon header out of the common header.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> >
> >  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/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 -
> >  38 files changed, 37 insertions(+), 1 deletion(-)
> >

[...]

> > diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
> > index 76758237c00..4f8a0453f46 100644
> > --- a/board/xilinx/zynqmp/zynqmp.c
> > +++ b/board/xilinx/zynqmp/zynqmp.c
> > @@ -22,6 +22,7 @@
> >  #include <asm/arch/psu_init_gpl.h>
> >  #include <asm/cache.h>
> >  #include <asm/io.h>
> > +#include <asm/ptrace.h>
>
> I did a grep and I can't see ptrace macros used anywhere in the code.
> I see show_regs used by architecture and common code but not by boards.
> That's why at least for zynqmp please remove this header because nothing
> is used from it.

For example: xilinx_zynqmp_virt

ilinx_zynqmp_virt
+WARNING: BL31 file bl31.bin NOT found, U-Boot will run in EL3
+board/xilinx/zynqmp/zynqmp.c: In function 'chip_id':
+board/xilinx/zynqmp/zynqmp.c:198:17: error: storage size of 'regs' isn't known
+  struct pt_regs regs;
+                 ^~~~
+make[2]: *** [board/xilinx/zynqmp/zynqmp.o] Error 1
+make[1]: *** [board/xilinx/zynqmp] Error 2
+make: *** [sub-make] Error 2



+WARNING: BL31 file bl31.bin NOT found, U-Boot will run in EL3
+drivers/firmware/firmware-zynqmp.c: In function 'xilinx_pm_request':
+drivers/firmware/firmware-zynqmp.c:159:17: error: storage size of
'regs' isn't known
+  struct pt_regs regs;
+                 ^~~~
+ }
+ ^
+make[3]: *** [drivers/firmware/firmware-zynqmp.o] Error 1
+make[2]: *** [drivers/firmware] Error 2
+make[1]: *** [drivers] Error 2
+make: *** [sub-make] Error 2
w+drivers/firmware/firmware-zynqmp.c:159:17: warning: unused variable
'regs' [-Wunused-variable]
w+drivers/firmware/firmware-zynqmp.c:181:1: warning: control reaches
end of non-void function [-Wreturn-type]

Regards,
Simon

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

* Re: [PATCH 13/18] common: Drop asm/ptrace.h from common header
@ 2020-05-10 20:36       ` Simon Glass
  0 siblings, 0 replies; 30+ messages in thread
From: Simon Glass @ 2020-05-10 20:36 UTC (permalink / raw)
  To: Michal Simek
  Cc: U-Boot Mailing List, Tom Rini, Masahiro Yamada, Alex Marginean,
	Angelo Dureghello, Bin Meng, Christophe Leroy,
	Daniel Schwierzeck, Fabio Estevam, Heinrich Schuchardt,
	Hou Zhiqiang, Huan Wang, Ibai Erkiaga, Joe Hershberger,
	Kever Yang, Luca Ceresoli, Lukasz Majewski, Mario Six,
	Max Filippov, Miquel Raynal, NXP i.MX U-Boot Team,
	Neil Armstrong, Peng Fan, Prabhakar Kushwaha, Priyanka Jain,
	Rajan Vaja, Sergey Temerkhanov, Simon Goldschmidt,
	Siva Durga Prasad Paladugu, Stefan Roese, Stefano Babic,
	Thomas Hebb, Thomas Schaefer, Trevor Woerner, Udit Agarwal,
	Vagrant Cascadian, Wolfgang Denk, Yuantian Tang, u-boot-amlogic

Hi Michal,

On Tue, 7 Apr 2020 at 00:50, Michal Simek <michal.simek@xilinx.com> wrote:
>
> On 07. 04. 20 4:40, Simon Glass wrote:
> > Move this uncommon header out of the common header.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> >
> >  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/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 -
> >  38 files changed, 37 insertions(+), 1 deletion(-)
> >

[...]

> > diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
> > index 76758237c00..4f8a0453f46 100644
> > --- a/board/xilinx/zynqmp/zynqmp.c
> > +++ b/board/xilinx/zynqmp/zynqmp.c
> > @@ -22,6 +22,7 @@
> >  #include <asm/arch/psu_init_gpl.h>
> >  #include <asm/cache.h>
> >  #include <asm/io.h>
> > +#include <asm/ptrace.h>
>
> I did a grep and I can't see ptrace macros used anywhere in the code.
> I see show_regs used by architecture and common code but not by boards.
> That's why at least for zynqmp please remove this header because nothing
> is used from it.

For example: xilinx_zynqmp_virt

ilinx_zynqmp_virt
+WARNING: BL31 file bl31.bin NOT found, U-Boot will run in EL3
+board/xilinx/zynqmp/zynqmp.c: In function 'chip_id':
+board/xilinx/zynqmp/zynqmp.c:198:17: error: storage size of 'regs' isn't known
+  struct pt_regs regs;
+                 ^~~~
+make[2]: *** [board/xilinx/zynqmp/zynqmp.o] Error 1
+make[1]: *** [board/xilinx/zynqmp] Error 2
+make: *** [sub-make] Error 2



+WARNING: BL31 file bl31.bin NOT found, U-Boot will run in EL3
+drivers/firmware/firmware-zynqmp.c: In function 'xilinx_pm_request':
+drivers/firmware/firmware-zynqmp.c:159:17: error: storage size of
'regs' isn't known
+  struct pt_regs regs;
+                 ^~~~
+ }
+ ^
+make[3]: *** [drivers/firmware/firmware-zynqmp.o] Error 1
+make[2]: *** [drivers/firmware] Error 2
+make[1]: *** [drivers] Error 2
+make: *** [sub-make] Error 2
w+drivers/firmware/firmware-zynqmp.c:159:17: warning: unused variable
'regs' [-Wunused-variable]
w+drivers/firmware/firmware-zynqmp.c:181:1: warning: control reaches
end of non-void function [-Wreturn-type]

Regards,
Simon

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

* [PATCH 04/18] common: Drop net.h from common header
  2020-04-07  2:40 ` [PATCH 04/18] common: Drop net.h from common header Simon Glass
@ 2020-05-30 14:59   ` Adam Ford
  2020-05-30 16:29     ` Simon Glass
  0 siblings, 1 reply; 30+ messages in thread
From: Adam Ford @ 2020-05-30 14:59 UTC (permalink / raw)
  To: u-boot

On Mon, Apr 6, 2020 at 10:04 PM Simon Glass <sjg@chromium.org> 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>

This patch appears to break the USB OHCI on the da850-evm.

starting USB...
Bus usb at 200000: Port not available.
Bus usb at 225000: USB OHCI 1.0
scanning bus usb at 225000 for devices... ERROR: CTL:TIMEOUT

The CTL:TIMEOUT is part of drivers/usb/host/ohci-hcd.c

I can go back and forth and the issue appears very repeatable.

A working state looks like:

starting USB...
Bus usb at 200000: Port not available.
Bus usb at 225000: USB OHCI 1.0
scanning bus usb at 225000 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found


I generated drivers/usb/host/ohci-hcd.i files between the working and
non-working versions to see
if/what is different, but they are different.

It's too large of a patch to just do a revert on this commit at
master, because of many of the dependent changes that have been made
after that. I am open for ideas on what to do to regain the broken USB
functionality.

thanks,

adam
> ---
>

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

* [PATCH 04/18] common: Drop net.h from common header
  2020-05-30 14:59   ` Adam Ford
@ 2020-05-30 16:29     ` Simon Glass
  2020-05-30 16:36       ` Adam Ford
  0 siblings, 1 reply; 30+ messages in thread
From: Simon Glass @ 2020-05-30 16:29 UTC (permalink / raw)
  To: u-boot

Hi Adam,

On Sat, 30 May 2020 at 08:59, Adam Ford <aford173@gmail.com> wrote:
>
> On Mon, Apr 6, 2020 at 10:04 PM Simon Glass <sjg@chromium.org> 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>
>
> This patch appears to break the USB OHCI on the da850-evm.
>
> starting USB...
> Bus usb at 200000: Port not available.
> Bus usb at 225000: USB OHCI 1.0
> scanning bus usb at 225000 for devices... ERROR: CTL:TIMEOUT
>
> The CTL:TIMEOUT is part of drivers/usb/host/ohci-hcd.c
>
> I can go back and forth and the issue appears very repeatable.
>
> A working state looks like:
>
> starting USB...
> Bus usb at 200000: Port not available.
> Bus usb at 225000: USB OHCI 1.0
> scanning bus usb at 225000 for devices... 2 USB Device(s) found
>        scanning usb for storage devices... 1 Storage Device(s) found
>
>
> I generated drivers/usb/host/ohci-hcd.i files between the working and
> non-working versions to see
> if/what is different, but they are different.
>
> It's too large of a patch to just do a revert on this commit at
> master, because of many of the dependent changes that have been made
> after that. I am open for ideas on what to do to regain the broken USB
> functionality.

I happen to have an omapl138_lcdk in my lab at the moment which seems
to be close enough to repeat the problem. I've sent a patch.

Regards,
Simon

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

* [PATCH 04/18] common: Drop net.h from common header
  2020-05-30 16:29     ` Simon Glass
@ 2020-05-30 16:36       ` Adam Ford
  0 siblings, 0 replies; 30+ messages in thread
From: Adam Ford @ 2020-05-30 16:36 UTC (permalink / raw)
  To: u-boot

On Sat, May 30, 2020 at 11:29 AM Simon Glass <sjg@chromium.org> wrote:
>
> Hi Adam,
>
> On Sat, 30 May 2020 at 08:59, Adam Ford <aford173@gmail.com> wrote:
> >
> > On Mon, Apr 6, 2020 at 10:04 PM Simon Glass <sjg@chromium.org> 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>
> >
> > This patch appears to break the USB OHCI on the da850-evm.
> >
> > starting USB...
> > Bus usb at 200000: Port not available.
> > Bus usb at 225000: USB OHCI 1.0
> > scanning bus usb at 225000 for devices... ERROR: CTL:TIMEOUT
> >
> > The CTL:TIMEOUT is part of drivers/usb/host/ohci-hcd.c
> >
> > I can go back and forth and the issue appears very repeatable.
> >
> > A working state looks like:
> >
> > starting USB...
> > Bus usb at 200000: Port not available.
> > Bus usb at 225000: USB OHCI 1.0
> > scanning bus usb at 225000 for devices... 2 USB Device(s) found
> >        scanning usb for storage devices... 1 Storage Device(s) found
> >
> >
> > I generated drivers/usb/host/ohci-hcd.i files between the working and
> > non-working versions to see
> > if/what is different, but they are different.
> >
> > It's too large of a patch to just do a revert on this commit at
> > master, because of many of the dependent changes that have been made
> > after that. I am open for ideas on what to do to regain the broken USB
> > functionality.
>
> I happen to have an omapl138_lcdk in my lab at the moment which seems
> to be close enough to repeat the problem. I've sent a patch.

Thank you for your quick response.  I have tested it, and responded
with my 'tested-by' to the other series.

adam
>
> Regards,
> Simon

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

end of thread, other threads:[~2020-05-30 16:36 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-07  2:40 [PATCH 00/18] common: Further reduce the size of common.h Simon Glass
2020-04-07  2:40 ` Simon Glass
2020-04-07  2:40 ` [PATCH 01/18] common: Drop uuid.h from common header Simon Glass
2020-04-07  2:40 ` [PATCH 02/18] common: Drop flash.h " Simon Glass
2020-04-07 14:24   ` Wolfgang Denk
2020-04-07  2:40 ` [PATCH 03/18] arm: Don't include common.h in header files Simon Glass
2020-04-07  2:40 ` [PATCH 04/18] common: Drop net.h from common header Simon Glass
2020-05-30 14:59   ` Adam Ford
2020-05-30 16:29     ` Simon Glass
2020-05-30 16:36       ` Adam Ford
2020-04-07  2:40 ` [PATCH 05/18] part: Drop disk_partition_t typedef Simon Glass
2020-04-07  2:40 ` [PATCH 06/18] common: Drop part.h from common header Simon Glass
2020-04-07  2:40 ` [PATCH 07/18] bootstage: Use BOOTSTAGE instead of BOOTSTATE Simon Glass
2020-04-07  2:40 ` [PATCH 08/18] common: Drop bootstage.h from common header Simon Glass
2020-04-07  2:40 ` [PATCH 09/18] common: Drop image.h " Simon Glass
2020-04-07  2:40   ` Simon Glass
2020-04-07  2:40 ` [PATCH 10/18] common: Drop init.h " Simon Glass
2020-04-07  2:40 ` [PATCH 11/18] command: Remove the cmd_tbl_t typedef Simon Glass
2020-04-07  2:40 ` [PATCH 12/18] common: Drop log.h from common header Simon Glass
2020-04-07  2:40 ` [PATCH 13/18] common: Drop asm/ptrace.h " Simon Glass
2020-04-07  2:40   ` Simon Glass
2020-04-07  6:50   ` Michal Simek
2020-04-07  6:50     ` Michal Simek
2020-05-10 20:36     ` Simon Glass
2020-05-10 20:36       ` Simon Glass
2020-04-07  2:40 ` [PATCH 14/18] common: Drop asm_offsets.h " Simon Glass
2020-04-07  2:40 ` [PATCH 15/18] common: Drop linux/bug.h " Simon Glass
2020-04-07  2:40 ` [PATCH 16/18] common: Drop linux/stringify.h " Simon Glass
2020-04-07  2:40 ` [PATCH 17/18] common: Drop linux/delay.h " Simon Glass
2020-04-07  2:40 ` [PATCH 18/18] common: Drop linux/bitops.h " Simon Glass

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.