summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-05-19 10:51:43 -0400
committerTom Rini <trini@konsulko.com>2020-05-19 10:51:43 -0400
commitc2279d784e35fa25ee3a9fa28a74a1ba545f8c1e (patch)
tree158fd30f3d06142f6a99cbae6ed8ccb0f3be567b
parented9a3aa6452f57af65eb74f73bd2a54c3a2f4b03 (diff)
parentcd93d625fd751d55c729c78b10f82109d56a5f1d (diff)
downloadu-boot-WIP/19May2020.tar.gz
Merge branch '2020-05-18-reduce-size-of-common.h'WIP/19May2020
Bring in the latest round of Simon's changes to reduce what's in <common.h> overall.
-rw-r--r--api/api.c1
-rw-r--r--api/api_display.c1
-rw-r--r--api/api_storage.c1
-rw-r--r--arch/arc/include/asm/arcregs.h2
-rw-r--r--arch/arc/lib/bootm.c7
-rw-r--r--arch/arc/lib/cache.c1
-rw-r--r--arch/arc/lib/cpu.c2
-rw-r--r--arch/arc/lib/init_helpers.c1
-rw-r--r--arch/arc/lib/relocate.c1
-rw-r--r--arch/arc/lib/reset.c2
-rw-r--r--arch/arm/cpu/arm11/cpu.c1
-rw-r--r--arch/arm/cpu/arm1136/mx31/generic.c1
-rw-r--r--arch/arm/cpu/arm1136/mx31/timer.c1
-rw-r--r--arch/arm/cpu/arm1136/mx35/generic.c7
-rw-r--r--arch/arm/cpu/arm1136/mx35/timer.c2
-rw-r--r--arch/arm/cpu/arm920t/ep93xx/timer.c2
-rw-r--r--arch/arm/cpu/arm920t/imx/timer.c3
-rw-r--r--arch/arm/cpu/arm926ejs/armada100/cpu.c1
-rw-r--r--arch/arm/cpu/arm926ejs/armada100/dram.c1
-rw-r--r--arch/arm/cpu/arm926ejs/armada100/timer.c2
-rw-r--r--arch/arm/cpu/arm926ejs/cache.c1
-rw-r--r--arch/arm/cpu/arm926ejs/cpu.c1
-rw-r--r--arch/arm/cpu/arm926ejs/mx25/generic.c2
-rw-r--r--arch/arm/cpu/arm926ejs/mx25/timer.c2
-rw-r--r--arch/arm/cpu/arm926ejs/mx27/generic.c1
-rw-r--r--arch/arm/cpu/arm926ejs/mx27/timer.c3
-rw-r--r--arch/arm/cpu/arm926ejs/mxs/clock.c1
-rw-r--r--arch/arm/cpu/arm926ejs/mxs/mxs.c7
-rw-r--r--arch/arm/cpu/arm926ejs/mxs/spl_boot.c2
-rw-r--r--arch/arm/cpu/arm926ejs/mxs/spl_lradc_init.c1
-rw-r--r--arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c1
-rw-r--r--arch/arm/cpu/arm926ejs/mxs/spl_power_init.c1
-rw-r--r--arch/arm/cpu/arm926ejs/mxs/timer.c2
-rw-r--r--arch/arm/cpu/arm926ejs/spear/cpu.c4
-rw-r--r--arch/arm/cpu/arm926ejs/spear/reset.c1
-rw-r--r--arch/arm/cpu/arm926ejs/spear/spl.c2
-rw-r--r--arch/arm/cpu/arm926ejs/spear/spr_misc.c3
-rw-r--r--arch/arm/cpu/arm926ejs/spear/timer.c3
-rw-r--r--arch/arm/cpu/armv7/arch_timer.c1
-rw-r--r--arch/arm/cpu/armv7/bcm235xx/clk-core.c2
-rw-r--r--arch/arm/cpu/armv7/bcm235xx/clk-core.h1
-rw-r--r--arch/arm/cpu/armv7/bcm235xx/clk-eth.c1
-rw-r--r--arch/arm/cpu/armv7/bcm281xx/clk-core.c2
-rw-r--r--arch/arm/cpu/armv7/bcm281xx/clk-core.h1
-rw-r--r--arch/arm/cpu/armv7/bcm281xx/clk-eth.c1
-rw-r--r--arch/arm/cpu/armv7/cache_v7.c1
-rw-r--r--arch/arm/cpu/armv7/exception_level.c1
-rw-r--r--arch/arm/cpu/armv7/iproc-common/hwinit-common.c1
-rw-r--r--arch/arm/cpu/armv7/iproc-common/timer.c2
-rw-r--r--arch/arm/cpu/armv7/kona-common/hwinit-common.c1
-rw-r--r--arch/arm/cpu/armv7/ls102xa/cpu.c3
-rw-r--r--arch/arm/cpu/armv7/ls102xa/fdt.c1
-rw-r--r--arch/arm/cpu/armv7/ls102xa/soc.c1
-rw-r--r--arch/arm/cpu/armv7/ls102xa/timer.c2
-rw-r--r--arch/arm/cpu/armv7/mpu_v7r.c1
-rw-r--r--arch/arm/cpu/armv7/s5p-common/cpu_info.c1
-rw-r--r--arch/arm/cpu/armv7/s5p-common/timer.c2
-rw-r--r--arch/arm/cpu/armv7/stv0991/reset.c1
-rw-r--r--arch/arm/cpu/armv7/stv0991/timer.c2
-rw-r--r--arch/arm/cpu/armv7/sunxi/psci.c1
-rw-r--r--arch/arm/cpu/armv7/sunxi/timer.c2
-rw-r--r--arch/arm/cpu/armv7/vf610/generic.c8
-rw-r--r--arch/arm/cpu/armv7/vf610/timer.c2
-rw-r--r--arch/arm/cpu/armv7/virt-dt.c1
-rw-r--r--arch/arm/cpu/armv7/virt-v7.c1
-rw-r--r--arch/arm/cpu/armv7m/cache.c3
-rw-r--r--arch/arm/cpu/armv7m/systick-timer.c2
-rw-r--r--arch/arm/cpu/armv8/cache_v8.c2
-rw-r--r--arch/arm/cpu/armv8/cpu-dt.c1
-rw-r--r--arch/arm/cpu/armv8/cpu.c1
-rw-r--r--arch/arm/cpu/armv8/exception_level.c2
-rw-r--r--arch/arm/cpu/armv8/fsl-layerscape/cpu.c4
-rw-r--r--arch/arm/cpu/armv8/fsl-layerscape/fdt.c2
-rw-r--r--arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_serdes.c2
-rw-r--r--arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c4
-rw-r--r--arch/arm/cpu/armv8/fsl-layerscape/ls1028_ids.c2
-rw-r--r--arch/arm/cpu/armv8/fsl-layerscape/mp.c5
-rw-r--r--arch/arm/cpu/armv8/fsl-layerscape/ppa.c2
-rw-r--r--arch/arm/cpu/armv8/fsl-layerscape/soc.c2
-rw-r--r--arch/arm/cpu/armv8/fsl-layerscape/spl.c4
-rw-r--r--arch/arm/cpu/armv8/fwcall.c2
-rw-r--r--arch/arm/cpu/armv8/generic_timer.c2
-rw-r--r--arch/arm/cpu/armv8/hisilicon/pinmux.c2
-rw-r--r--arch/arm/cpu/armv8/s32v234/cpu.c3
-rw-r--r--arch/arm/cpu/armv8/s32v234/generic.c2
-rw-r--r--arch/arm/cpu/armv8/sec_firmware.c5
-rw-r--r--arch/arm/cpu/pxa/cache.c1
-rw-r--r--arch/arm/cpu/pxa/cpuinfo.c1
-rw-r--r--arch/arm/cpu/pxa/pxa2xx.c2
-rw-r--r--arch/arm/cpu/pxa/timer.c1
-rw-r--r--arch/arm/cpu/pxa/usb.c1
-rw-r--r--arch/arm/cpu/sa1100/timer.c3
-rw-r--r--arch/arm/include/asm/arch-am33xx/clk_synthesizer.h2
-rw-r--r--arch/arm/include/asm/arch-am33xx/cpu.h1
-rw-r--r--arch/arm/include/asm/arch-am33xx/hardware_am43xx.h4
-rw-r--r--arch/arm/include/asm/arch-am33xx/mux.h1
-rw-r--r--arch/arm/include/asm/arch-am33xx/mux_am33xx.h1
-rw-r--r--arch/arm/include/asm/arch-am33xx/mux_am43xx.h1
-rw-r--r--arch/arm/include/asm/arch-am33xx/mux_ti816x.h1
-rw-r--r--arch/arm/include/asm/arch-fsl-layerscape/clock.h2
-rw-r--r--arch/arm/include/asm/arch-fsl-layerscape/config.h4
-rw-r--r--arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h3
-rw-r--r--arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h2
-rw-r--r--arch/arm/include/asm/arch-hi3660/hi3660.h4
-rw-r--r--arch/arm/include/asm/arch-imx8/iomux.h4
-rw-r--r--arch/arm/include/asm/arch-imx8/sci/sci.h1
-rw-r--r--arch/arm/include/asm/arch-imx8m/clock_imx8mm.h4
-rw-r--r--arch/arm/include/asm/arch-imx8m/clock_imx8mq.h4
-rw-r--r--arch/arm/include/asm/arch-lpc32xx/dma.h2
-rw-r--r--arch/arm/include/asm/arch-lpc32xx/i2c.h1
-rw-r--r--arch/arm/include/asm/arch-ls102xa/clock.h2
-rw-r--r--arch/arm/include/asm/arch-meson/axg.h4
-rw-r--r--arch/arm/include/asm/arch-meson/g12a.h4
-rw-r--r--arch/arm/include/asm/arch-meson/gx.h4
-rw-r--r--arch/arm/include/asm/arch-meson/sd_emmc.h4
-rw-r--r--arch/arm/include/asm/arch-mx25/clock.h2
-rw-r--r--arch/arm/include/asm/arch-mx27/regs-rtc.h2
-rw-r--r--arch/arm/include/asm/arch-mx31/clock.h2
-rw-r--r--arch/arm/include/asm/arch-mx35/clock.h2
-rw-r--r--arch/arm/include/asm/arch-mx5/clock.h2
-rw-r--r--arch/arm/include/asm/arch-mx5/imx-regs.h2
-rw-r--r--arch/arm/include/asm/arch-mx6/clock.h7
-rw-r--r--arch/arm/include/asm/arch-mx6/imx-regs.h3
-rw-r--r--arch/arm/include/asm/arch-mx7/clock.h1
-rw-r--r--arch/arm/include/asm/arch-mx7/imx-regs.h3
-rw-r--r--arch/arm/include/asm/arch-mx7/mx7-ddr.h4
-rw-r--r--arch/arm/include/asm/arch-mx7ulp/clock.h1
-rw-r--r--arch/arm/include/asm/arch-mx7ulp/pcc.h1
-rw-r--r--arch/arm/include/asm/arch-mx7ulp/scg.h2
-rw-r--r--arch/arm/include/asm/arch-omap4/clock.h1
-rw-r--r--arch/arm/include/asm/arch-omap5/clock.h1
-rw-r--r--arch/arm/include/asm/arch-omap5/dra7xx_iodelay.h1
-rw-r--r--arch/arm/include/asm/arch-rk3308/cru_rk3308.h2
-rw-r--r--arch/arm/include/asm/arch-rk3308/grf_rk3308.h2
-rw-r--r--arch/arm/include/asm/arch-rockchip/cru.h4
-rw-r--r--arch/arm/include/asm/arch-rockchip/cru_px30.h2
-rw-r--r--arch/arm/include/asm/arch-rockchip/cru_rk3036.h2
-rw-r--r--arch/arm/include/asm/arch-rockchip/cru_rk3128.h4
-rw-r--r--arch/arm/include/asm/arch-rockchip/cru_rk322x.h2
-rw-r--r--arch/arm/include/asm/arch-rockchip/cru_rk3328.h2
-rw-r--r--arch/arm/include/asm/arch-rockchip/cru_rk3368.h5
-rw-r--r--arch/arm/include/asm/arch-rockchip/cru_rk3399.h2
-rw-r--r--arch/arm/include/asm/arch-rockchip/cru_rv1108.h4
-rw-r--r--arch/arm/include/asm/arch-rockchip/ddr_rk3368.h4
-rw-r--r--arch/arm/include/asm/arch-rockchip/grf_px30.h2
-rw-r--r--arch/arm/include/asm/arch-rockchip/grf_rk3036.h2
-rw-r--r--arch/arm/include/asm/arch-rockchip/grf_rk3128.h2
-rw-r--r--arch/arm/include/asm/arch-rockchip/grf_rk322x.h2
-rw-r--r--arch/arm/include/asm/arch-rockchip/grf_rk3368.h4
-rw-r--r--arch/arm/include/asm/arch-rockchip/grf_rv1108.h2
-rw-r--r--arch/arm/include/asm/arch-rockchip/lvds_rk3288.h4
-rw-r--r--arch/arm/include/asm/arch-rockchip/sdram_pctl_px30.h4
-rw-r--r--arch/arm/include/asm/arch-rockchip/sdram_phy_px30.h4
-rw-r--r--arch/arm/include/asm/arch-rockchip/sdram_rk3036.h2
-rw-r--r--arch/arm/include/asm/arch-rockchip/sdram_rk322x.h4
-rw-r--r--arch/arm/include/asm/arch-rockchip/sdram_rk3399.h3
-rw-r--r--arch/arm/include/asm/arch-s32v234/clock.h2
-rw-r--r--arch/arm/include/asm/arch-s32v234/imx-regs.h2
-rw-r--r--arch/arm/include/asm/arch-stih410/sdhci.h4
-rw-r--r--arch/arm/include/asm/arch-stm32f4/stm32_pwr.h5
-rw-r--r--arch/arm/include/asm/arch-stm32f7/stm32_pwr.h5
-rw-r--r--arch/arm/include/asm/arch-stm32f7/syscfg.h4
-rw-r--r--arch/arm/include/asm/arch-sunxi/ccu.h4
-rw-r--r--arch/arm/include/asm/arch-sunxi/clock_sun50i_h6.h4
-rw-r--r--arch/arm/include/asm/arch-sunxi/clock_sun9i.h4
-rw-r--r--arch/arm/include/asm/arch-sunxi/dram_sun50i_h6.h3
-rw-r--r--arch/arm/include/asm/arch-sunxi/dram_sun6i.h4
-rw-r--r--arch/arm/include/asm/arch-sunxi/dram_sun8i_a33.h4
-rw-r--r--arch/arm/include/asm/arch-sunxi/dram_sun8i_a83t.h4
-rw-r--r--arch/arm/include/asm/arch-sunxi/dram_sun9i.h4
-rw-r--r--arch/arm/include/asm/arch-sunxi/pwm.h4
-rw-r--r--arch/arm/include/asm/arch-sunxi/rsb.h1
-rw-r--r--arch/arm/include/asm/arch-tegra/cboot.h3
-rw-r--r--arch/arm/include/asm/arch-tegra/dc.h4
-rw-r--r--arch/arm/include/asm/arch-tegra/ivc.h2
-rw-r--r--arch/arm/include/asm/arch-tegra/pmc.h4
-rw-r--r--arch/arm/include/asm/arch-tegra/tegra_mmc.h1
-rw-r--r--arch/arm/include/asm/arch-tegra124/flow.h4
-rw-r--r--arch/arm/include/asm/arch-vf610/clock.h2
-rw-r--r--arch/arm/include/asm/arch-vf610/imx-regs.h3
-rw-r--r--arch/arm/include/asm/armv7_mpu.h4
-rw-r--r--arch/arm/include/asm/bitops.h10
-rw-r--r--arch/arm/include/asm/dma-mapping.h2
-rw-r--r--arch/arm/include/asm/emif.h1
-rw-r--r--arch/arm/include/asm/gic-v3.h4
-rw-r--r--arch/arm/include/asm/mach-imx/dma.h1
-rw-r--r--arch/arm/include/asm/mach-imx/iomux-v3.h2
-rw-r--r--arch/arm/include/asm/mach-imx/sys_proto.h6
-rw-r--r--arch/arm/include/asm/omap_common.h10
-rw-r--r--arch/arm/include/asm/omap_mmc.h3
-rw-r--r--arch/arm/include/asm/omap_sec_common.h2
-rw-r--r--arch/arm/include/asm/psci.h5
-rw-r--r--arch/arm/include/asm/system.h3
-rw-r--r--arch/arm/include/asm/ti-common/keystone_net.h3
-rw-r--r--arch/arm/include/asm/ti-common/omap_wdt.h4
-rw-r--r--arch/arm/include/asm/ti-common/ti-edma3.h3
-rw-r--r--arch/arm/lib/bootm.c6
-rw-r--r--arch/arm/lib/cache-cp15.c1
-rw-r--r--arch/arm/lib/cache.c2
-rw-r--r--arch/arm/lib/cmd_boot.c2
-rw-r--r--arch/arm/lib/gic-v3-its.c1
-rw-r--r--arch/arm/lib/image.c2
-rw-r--r--arch/arm/lib/interrupts.c1
-rw-r--r--arch/arm/lib/interrupts_64.c1
-rw-r--r--arch/arm/lib/psci-dt.c1
-rw-r--r--arch/arm/lib/reset.c6
-rw-r--r--arch/arm/lib/semihosting.c5
-rw-r--r--arch/arm/lib/spl.c3
-rw-r--r--arch/arm/lib/stack.c1
-rw-r--r--arch/arm/lib/zimage.c1
-rw-r--r--arch/arm/mach-aspeed/ast2500-board.c2
-rw-r--r--arch/arm/mach-aspeed/ast2500/sdram_ast2500.c1
-rw-r--r--arch/arm/mach-at91/arm920t/cpu.c1
-rw-r--r--arch/arm/mach-at91/arm920t/timer.c2
-rw-r--r--arch/arm/mach-at91/arm926ejs/cpu.c1
-rw-r--r--arch/arm/mach-at91/arm926ejs/eflash.c10
-rw-r--r--arch/arm/mach-at91/arm926ejs/timer.c1
-rw-r--r--arch/arm/mach-at91/armv7/clock.c1
-rw-r--r--arch/arm/mach-at91/armv7/cpu.c1
-rw-r--r--arch/arm/mach-at91/armv7/timer.c1
-rw-r--r--arch/arm/mach-at91/include/mach/at91_pmc.h1
-rw-r--r--arch/arm/mach-at91/include/mach/at91_sfr.h1
-rw-r--r--arch/arm/mach-at91/include/mach/atmel_pio4.h1
-rw-r--r--arch/arm/mach-at91/mpddrc.c1
-rw-r--r--arch/arm/mach-at91/phy.c1
-rw-r--r--arch/arm/mach-at91/spl_at91.c2
-rw-r--r--arch/arm/mach-at91/spl_atmel.c2
-rw-r--r--arch/arm/mach-bcm283x/include/mach/timer.h1
-rw-r--r--arch/arm/mach-bcm283x/init.c1
-rw-r--r--arch/arm/mach-bcm283x/mbox.c2
-rw-r--r--arch/arm/mach-davinci/cpu.c1
-rw-r--r--arch/arm/mach-davinci/da850_lowlevel.c1
-rw-r--r--arch/arm/mach-davinci/misc.c1
-rw-r--r--arch/arm/mach-davinci/spl.c1
-rw-r--r--arch/arm/mach-davinci/timer.c2
-rw-r--r--arch/arm/mach-exynos/clock.c1
-rw-r--r--arch/arm/mach-exynos/include/mach/clock.h1
-rw-r--r--arch/arm/mach-exynos/include/mach/dp_info.h1
-rw-r--r--arch/arm/mach-exynos/lowlevel_init.c2
-rw-r--r--arch/arm/mach-exynos/pinmux.c1
-rw-r--r--arch/arm/mach-exynos/soc.c1
-rw-r--r--arch/arm/mach-exynos/spl_boot.c3
-rw-r--r--arch/arm/mach-highbank/timer.c1
-rw-r--r--arch/arm/mach-imx/cache.c1
-rw-r--r--arch/arm/mach-imx/cmd_bmode.c6
-rw-r--r--arch/arm/mach-imx/cmd_dek.c4
-rw-r--r--arch/arm/mach-imx/cmd_hdmidet.c4
-rw-r--r--arch/arm/mach-imx/cmd_nandbcb.c9
-rw-r--r--arch/arm/mach-imx/cpu.c3
-rw-r--r--arch/arm/mach-imx/ddrmc-vf610-calibration.c1
-rw-r--r--arch/arm/mach-imx/ddrmc-vf610.c2
-rw-r--r--arch/arm/mach-imx/hab.c21
-rw-r--r--arch/arm/mach-imx/i2c-mxv7.c1
-rw-r--r--arch/arm/mach-imx/imx8/ahab.c14
-rw-r--r--arch/arm/mach-imx/imx8/cpu.c2
-rw-r--r--arch/arm/mach-imx/imx8/fdt.c1
-rw-r--r--arch/arm/mach-imx/imx8/image.c1
-rw-r--r--arch/arm/mach-imx/imx8/iomux.c1
-rw-r--r--arch/arm/mach-imx/imx8/misc.c1
-rw-r--r--arch/arm/mach-imx/imx8/parse-container.c1
-rw-r--r--arch/arm/mach-imx/imx8/snvs_security_sc.c13
-rw-r--r--arch/arm/mach-imx/imx8m/clock_imx8mm.c2
-rw-r--r--arch/arm/mach-imx/imx8m/clock_imx8mq.c6
-rw-r--r--arch/arm/mach-imx/imx8m/soc.c3
-rw-r--r--arch/arm/mach-imx/imx_bootaux.c4
-rw-r--r--arch/arm/mach-imx/imxrt/soc.c2
-rw-r--r--arch/arm/mach-imx/misc.c3
-rw-r--r--arch/arm/mach-imx/mx5/clock.c5
-rw-r--r--arch/arm/mach-imx/mx5/soc.c1
-rw-r--r--arch/arm/mach-imx/mx6/clock.c5
-rw-r--r--arch/arm/mach-imx/mx6/ddr.c2
-rw-r--r--arch/arm/mach-imx/mx6/litesom.c1
-rw-r--r--arch/arm/mach-imx/mx6/soc.c1
-rw-r--r--arch/arm/mach-imx/mx7/clock.c5
-rw-r--r--arch/arm/mach-imx/mx7/psci-mx7.c1
-rw-r--r--arch/arm/mach-imx/mx7/soc.c2
-rw-r--r--arch/arm/mach-imx/mx7ulp/clock.c4
-rw-r--r--arch/arm/mach-imx/mx7ulp/iomux.c1
-rw-r--r--arch/arm/mach-imx/mx7ulp/pcc.c1
-rw-r--r--arch/arm/mach-imx/mx7ulp/scg.c2
-rw-r--r--arch/arm/mach-imx/mx7ulp/soc.c4
-rw-r--r--arch/arm/mach-imx/sata.c1
-rw-r--r--arch/arm/mach-imx/sip.c2
-rw-r--r--arch/arm/mach-imx/spl.c2
-rw-r--r--arch/arm/mach-imx/spl_imx_romapi.c1
-rw-r--r--arch/arm/mach-imx/syscounter.c2
-rw-r--r--arch/arm/mach-imx/timer.c1
-rw-r--r--arch/arm/mach-k3/am6_init.c1
-rw-r--r--arch/arm/mach-k3/common.c4
-rw-r--r--arch/arm/mach-k3/include/mach/am6_hardware.h3
-rw-r--r--arch/arm/mach-k3/include/mach/j721e_hardware.h3
-rw-r--r--arch/arm/mach-k3/include/mach/j721e_spl.h1
-rw-r--r--arch/arm/mach-k3/j721e_init.c1
-rw-r--r--arch/arm/mach-k3/security.c3
-rw-r--r--arch/arm/mach-k3/sysfw-loader.c3
-rw-r--r--arch/arm/mach-keystone/clock.c1
-rw-r--r--arch/arm/mach-keystone/cmd_clock.c7
-rw-r--r--arch/arm/mach-keystone/cmd_mon.c8
-rw-r--r--arch/arm/mach-keystone/cmd_poweroff.c2
-rw-r--r--arch/arm/mach-keystone/ddr3.c2
-rw-r--r--arch/arm/mach-keystone/ddr3_spd.c1
-rw-r--r--arch/arm/mach-keystone/include/mach/clock_defs.h3
-rw-r--r--arch/arm/mach-keystone/include/mach/hardware-k2hk.h4
-rw-r--r--arch/arm/mach-keystone/include/mach/hardware-k2l.h4
-rw-r--r--arch/arm/mach-keystone/include/mach/hardware.h1
-rw-r--r--arch/arm/mach-keystone/include/mach/xhci-keystone.h4
-rw-r--r--arch/arm/mach-keystone/init.c3
-rw-r--r--arch/arm/mach-keystone/keystone.c2
-rw-r--r--arch/arm/mach-keystone/mon.c1
-rw-r--r--arch/arm/mach-keystone/psc.c1
-rw-r--r--arch/arm/mach-kirkwood/cache.c1
-rw-r--r--arch/arm/mach-kirkwood/cpu.c3
-rw-r--r--arch/arm/mach-kirkwood/mpp.c1
-rw-r--r--arch/arm/mach-lpc32xx/cpu.c2
-rw-r--r--arch/arm/mach-lpc32xx/dram.c1
-rw-r--r--arch/arm/mach-lpc32xx/timer.c2
-rw-r--r--arch/arm/mach-mediatek/cpu.c1
-rw-r--r--arch/arm/mach-mediatek/mt7622/init.c2
-rw-r--r--arch/arm/mach-mediatek/mt7629/init.c3
-rw-r--r--arch/arm/mach-mediatek/mt8512/init.c3
-rw-r--r--arch/arm/mach-mediatek/mt8516/init.c2
-rw-r--r--arch/arm/mach-mediatek/mt8518/init.c2
-rw-r--r--arch/arm/mach-mediatek/spl.c1
-rw-r--r--arch/arm/mach-meson/board-axg.c1
-rw-r--r--arch/arm/mach-meson/board-common.c3
-rw-r--r--arch/arm/mach-meson/board-g12a.c2
-rw-r--r--arch/arm/mach-meson/board-gx.c1
-rw-r--r--arch/arm/mach-meson/board-info.c2
-rw-r--r--arch/arm/mach-meson/sm.c18
-rw-r--r--arch/arm/mach-mvebu/arm64-common.c2
-rw-r--r--arch/arm/mach-mvebu/armada3700/cpu.c2
-rw-r--r--arch/arm/mach-mvebu/armada8k/dram.c1
-rw-r--r--arch/arm/mach-mvebu/cpu.c3
-rw-r--r--arch/arm/mach-mvebu/efuse.c2
-rw-r--r--arch/arm/mach-mvebu/include/mach/soc.h4
-rw-r--r--arch/arm/mach-mvebu/mbus.c1
-rw-r--r--arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c2
-rw-r--r--arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c1
-rw-r--r--arch/arm/mach-mvebu/serdes/a38x/seq_exec.c1
-rw-r--r--arch/arm/mach-mvebu/serdes/axp/high_speed_env_lib.c1
-rw-r--r--arch/arm/mach-mvebu/spl.c2
-rw-r--r--arch/arm/mach-mvebu/timer.c2
-rw-r--r--arch/arm/mach-omap2/abb.c1
-rw-r--r--arch/arm/mach-omap2/am33xx/board.c2
-rw-r--r--arch/arm/mach-omap2/am33xx/chilisom.c1
-rw-r--r--arch/arm/mach-omap2/am33xx/clock.c2
-rw-r--r--arch/arm/mach-omap2/am33xx/clock_ti814x.c1
-rw-r--r--arch/arm/mach-omap2/am33xx/clock_ti816x.c1
-rw-r--r--arch/arm/mach-omap2/am33xx/ddr.c3
-rw-r--r--arch/arm/mach-omap2/am33xx/sys_info.c1
-rw-r--r--arch/arm/mach-omap2/am33xx/ti816x_emif4.c1
-rw-r--r--arch/arm/mach-omap2/boot-common.c1
-rw-r--r--arch/arm/mach-omap2/clocks-common.c2
-rw-r--r--arch/arm/mach-omap2/emif-common.c2
-rw-r--r--arch/arm/mach-omap2/fdt-common.c1
-rw-r--r--arch/arm/mach-omap2/hwinit-common.c1
-rw-r--r--arch/arm/mach-omap2/omap-cache.c1
-rw-r--r--arch/arm/mach-omap2/omap3/am35x_musb.c1
-rw-r--r--arch/arm/mach-omap2/omap3/board.c5
-rw-r--r--arch/arm/mach-omap2/omap3/emac.c1
-rw-r--r--arch/arm/mach-omap2/omap3/emif4.c1
-rw-r--r--arch/arm/mach-omap2/omap3/sdrc.c1
-rw-r--r--arch/arm/mach-omap2/omap4/sdram_elpida.c1
-rw-r--r--arch/arm/mach-omap2/omap5/abb.c1
-rw-r--r--arch/arm/mach-omap2/omap5/dra7xx_iodelay.c1
-rw-r--r--arch/arm/mach-omap2/omap5/emif.c1
-rw-r--r--arch/arm/mach-omap2/omap5/fdt.c1
-rw-r--r--arch/arm/mach-omap2/omap5/hwinit.c1
-rw-r--r--arch/arm/mach-omap2/omap5/sdram.c1
-rw-r--r--arch/arm/mach-omap2/pipe3-phy.c2
-rw-r--r--arch/arm/mach-omap2/sec-common.c2
-rw-r--r--arch/arm/mach-omap2/timer.c2
-rw-r--r--arch/arm/mach-omap2/utils.c3
-rw-r--r--arch/arm/mach-orion5x/cpu.c2
-rw-r--r--arch/arm/mach-orion5x/timer.c2
-rw-r--r--arch/arm/mach-owl/soc.c2
-rw-r--r--arch/arm/mach-rmobile/board.c1
-rw-r--r--arch/arm/mach-rmobile/cpu_info.c2
-rw-r--r--arch/arm/mach-rmobile/emac.c1
-rw-r--r--arch/arm/mach-rmobile/include/mach/rcar-gen3-base.h1
-rw-r--r--arch/arm/mach-rmobile/include/mach/sh_sdhi.h1
-rw-r--r--arch/arm/mach-rmobile/timer.c2
-rw-r--r--arch/arm/mach-rockchip/board.c2
-rw-r--r--arch/arm/mach-rockchip/boot_mode.c3
-rw-r--r--arch/arm/mach-rockchip/bootrom.c1
-rw-r--r--arch/arm/mach-rockchip/cpu-info.c2
-rw-r--r--arch/arm/mach-rockchip/misc.c2
-rw-r--r--arch/arm/mach-rockchip/px30-board-tpl.c1
-rw-r--r--arch/arm/mach-rockchip/px30/px30.c1
-rw-r--r--arch/arm/mach-rockchip/px30/syscon_px30.c1
-rw-r--r--arch/arm/mach-rockchip/rk3036-board-spl.c1
-rw-r--r--arch/arm/mach-rockchip/rk3036/rk3036.c3
-rw-r--r--arch/arm/mach-rockchip/rk3036/sdram_rk3036.c2
-rw-r--r--arch/arm/mach-rockchip/rk3128/rk3128.c1
-rw-r--r--arch/arm/mach-rockchip/rk3188/rk3188.c2
-rw-r--r--arch/arm/mach-rockchip/rk3188/syscon_rk3188.c1
-rw-r--r--arch/arm/mach-rockchip/rk322x/rk322x.c1
-rw-r--r--arch/arm/mach-rockchip/rk3288/rk3288.c5
-rw-r--r--arch/arm/mach-rockchip/rk3288/syscon_rk3288.c1
-rw-r--r--arch/arm/mach-rockchip/rk3308/rk3308.c2
-rw-r--r--arch/arm/mach-rockchip/rk3328/rk3328.c1
-rw-r--r--arch/arm/mach-rockchip/rk3368/rk3368.c3
-rw-r--r--arch/arm/mach-rockchip/rk3368/syscon_rk3368.c1
-rw-r--r--arch/arm/mach-rockchip/rk3399/rk3399.c4
-rw-r--r--arch/arm/mach-rockchip/rk3399/syscon_rk3399.c1
-rw-r--r--arch/arm/mach-rockchip/sdram.c1
-rw-r--r--arch/arm/mach-rockchip/spl-boot-order.c1
-rw-r--r--arch/arm/mach-rockchip/spl.c4
-rw-r--r--arch/arm/mach-rockchip/tpl.c3
-rw-r--r--arch/arm/mach-s5pc1xx/cache.c1
-rw-r--r--arch/arm/mach-snapdragon/dram.c2
-rw-r--r--arch/arm/mach-snapdragon/pinctrl-snapdragon.c1
-rw-r--r--arch/arm/mach-socfpga/board.c1
-rw-r--r--arch/arm/mach-socfpga/clock_manager.c5
-rw-r--r--arch/arm/mach-socfpga/clock_manager_agilex.c1
-rw-r--r--arch/arm/mach-socfpga/clock_manager_arria10.c1
-rw-r--r--arch/arm/mach-socfpga/freeze_controller.c1
-rw-r--r--arch/arm/mach-socfpga/include/mach/clock_manager.h2
-rw-r--r--arch/arm/mach-socfpga/include/mach/clock_manager_arria10.h7
-rw-r--r--arch/arm/mach-socfpga/include/mach/clock_manager_gen5.h7
-rw-r--r--arch/arm/mach-socfpga/include/mach/clock_manager_s10.h1
-rw-r--r--arch/arm/mach-socfpga/include/mach/firewall.h2
-rw-r--r--arch/arm/mach-socfpga/include/mach/fpga_manager_arria10.h1
-rw-r--r--arch/arm/mach-socfpga/include/mach/fpga_manager_gen5.h1
-rw-r--r--arch/arm/mach-socfpga/include/mach/mailbox_s10.h1
-rw-r--r--arch/arm/mach-socfpga/include/mach/reset_manager_arria10.h1
-rw-r--r--arch/arm/mach-socfpga/include/mach/sdram_arria10.h3
-rw-r--r--arch/arm/mach-socfpga/include/mach/system_manager.h1
-rw-r--r--arch/arm/mach-socfpga/include/mach/system_manager_soc64.h1
-rw-r--r--arch/arm/mach-socfpga/misc.c6
-rw-r--r--arch/arm/mach-socfpga/misc_arria10.c1
-rw-r--r--arch/arm/mach-socfpga/misc_gen5.c2
-rw-r--r--arch/arm/mach-socfpga/misc_s10.c2
-rw-r--r--arch/arm/mach-socfpga/pinmux_arria10.c1
-rw-r--r--arch/arm/mach-socfpga/reset_manager_gen5.c1
-rw-r--r--arch/arm/mach-socfpga/scan_manager.c1
-rw-r--r--arch/arm/mach-socfpga/spl_a10.c1
-rw-r--r--arch/arm/mach-socfpga/spl_agilex.c2
-rw-r--r--arch/arm/mach-socfpga/spl_gen5.c3
-rw-r--r--arch/arm/mach-socfpga/spl_s10.c2
-rw-r--r--arch/arm/mach-socfpga/timer.c1
-rw-r--r--arch/arm/mach-socfpga/timer_s10.c1
-rw-r--r--arch/arm/mach-stm32/soc.c1
-rw-r--r--arch/arm/mach-stm32mp/boot_params.c1
-rw-r--r--arch/arm/mach-stm32mp/bsec.c1
-rw-r--r--arch/arm/mach-stm32mp/cmd_stm32key.c4
-rw-r--r--arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c2
-rw-r--r--arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c4
-rw-r--r--arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c1
-rw-r--r--arch/arm/mach-stm32mp/cpu.c4
-rw-r--r--arch/arm/mach-stm32mp/dram_init.c3
-rw-r--r--arch/arm/mach-stm32mp/fdt.c1
-rw-r--r--arch/arm/mach-stm32mp/include/mach/stm32.h6
-rw-r--r--arch/arm/mach-stm32mp/psci.c2
-rw-r--r--arch/arm/mach-stm32mp/pwr_regulator.c1
-rw-r--r--arch/arm/mach-stm32mp/spl.c3
-rw-r--r--arch/arm/mach-sunxi/board.c3
-rw-r--r--arch/arm/mach-sunxi/clock_sun6i.c2
-rw-r--r--arch/arm/mach-sunxi/clock_sun8i_a83t.c1
-rw-r--r--arch/arm/mach-sunxi/cpu_info.c1
-rw-r--r--arch/arm/mach-sunxi/dram_sun4i.c1
-rw-r--r--arch/arm/mach-sunxi/dram_sun50i_h6.c5
-rw-r--r--arch/arm/mach-sunxi/dram_sun6i.c2
-rw-r--r--arch/arm/mach-sunxi/dram_sun8i_a23.c2
-rw-r--r--arch/arm/mach-sunxi/dram_sun8i_a33.c2
-rw-r--r--arch/arm/mach-sunxi/dram_sun8i_a83t.c2
-rw-r--r--arch/arm/mach-sunxi/dram_sun9i.c2
-rw-r--r--arch/arm/mach-sunxi/dram_sunxi_dw.c3
-rw-r--r--arch/arm/mach-sunxi/spl_spi_sunxi.c4
-rw-r--r--arch/arm/mach-tegra/ap.c1
-rw-r--r--arch/arm/mach-tegra/board.c2
-rw-r--r--arch/arm/mach-tegra/board2.c1
-rw-r--r--arch/arm/mach-tegra/cboot.c3
-rw-r--r--arch/arm/mach-tegra/clock.c2
-rw-r--r--arch/arm/mach-tegra/cmd_enterrcm.c6
-rw-r--r--arch/arm/mach-tegra/cpu.c2
-rw-r--r--arch/arm/mach-tegra/gpu.c1
-rw-r--r--arch/arm/mach-tegra/ivc.c1
-rw-r--r--arch/arm/mach-tegra/pinmux-common.c1
-rw-r--r--arch/arm/mach-tegra/pmc.c1
-rw-r--r--arch/arm/mach-tegra/powergate.c1
-rw-r--r--arch/arm/mach-tegra/spl.c1
-rw-r--r--arch/arm/mach-tegra/sys_info.c1
-rw-r--r--arch/arm/mach-tegra/tegra114/clock.c3
-rw-r--r--arch/arm/mach-tegra/tegra114/cpu.c2
-rw-r--r--arch/arm/mach-tegra/tegra114/funcmux.c1
-rw-r--r--arch/arm/mach-tegra/tegra124/clock.c3
-rw-r--r--arch/arm/mach-tegra/tegra124/cpu.c2
-rw-r--r--arch/arm/mach-tegra/tegra124/funcmux.c1
-rw-r--r--arch/arm/mach-tegra/tegra124/xusb-padctl.c2
-rw-r--r--arch/arm/mach-tegra/tegra20/clock.c3
-rw-r--r--arch/arm/mach-tegra/tegra20/cpu.c1
-rw-r--r--arch/arm/mach-tegra/tegra20/crypto.c1
-rw-r--r--arch/arm/mach-tegra/tegra20/emc.c1
-rw-r--r--arch/arm/mach-tegra/tegra20/funcmux.c1
-rw-r--r--arch/arm/mach-tegra/tegra20/pmu.c1
-rw-r--r--arch/arm/mach-tegra/tegra210/clock.c5
-rw-r--r--arch/arm/mach-tegra/tegra210/funcmux.c1
-rw-r--r--arch/arm/mach-tegra/tegra210/xusb-padctl.c2
-rw-r--r--arch/arm/mach-tegra/tegra30/clock.c3
-rw-r--r--arch/arm/mach-tegra/tegra30/cpu.c2
-rw-r--r--arch/arm/mach-tegra/tegra30/funcmux.c1
-rw-r--r--arch/arm/mach-tegra/xusb-padctl-common.c1
-rw-r--r--arch/arm/mach-u8500/cache.c1
-rw-r--r--arch/arm/mach-u8500/cpuinfo.c1
-rw-r--r--arch/arm/mach-uniphier/arm32/psci.c1
-rw-r--r--arch/arm/mach-uniphier/arm32/timer.c1
-rw-r--r--arch/arm/mach-uniphier/board_init.c1
-rw-r--r--arch/arm/mach-uniphier/boot-device/boot-device-pxs3.c1
-rw-r--r--arch/arm/mach-uniphier/boot-device/boot-device.c6
-rw-r--r--arch/arm/mach-uniphier/clk/clk-ld11.c1
-rw-r--r--arch/arm/mach-uniphier/clk/dpll-ld4.c1
-rw-r--r--arch/arm/mach-uniphier/clk/dpll-pro4.c1
-rw-r--r--arch/arm/mach-uniphier/cpu-info.c1
-rw-r--r--arch/arm/mach-uniphier/dram/cmd_ddrmphy.c4
-rw-r--r--arch/arm/mach-uniphier/dram/cmd_ddrphy.c4
-rw-r--r--arch/arm/mach-uniphier/dram/ddrphy-regs.h1
-rw-r--r--arch/arm/mach-uniphier/dram/ddrphy-training.c1
-rw-r--r--arch/arm/mach-uniphier/dram/umc-pxs2.c3
-rw-r--r--arch/arm/mach-uniphier/dram_init.c1
-rw-r--r--arch/arm/mach-uniphier/init.h1
-rw-r--r--arch/arm/mach-uniphier/micro-support-card.c5
-rw-r--r--arch/arm/mach-uniphier/mmc-first-dev.c7
-rw-r--r--arch/arm/mach-uniphier/nand-reset.c1
-rw-r--r--arch/arm/mach-versal/clk.c1
-rw-r--r--arch/arm/mach-versal/cpu.c2
-rw-r--r--arch/arm/mach-versal/include/mach/hardware.h4
-rw-r--r--arch/arm/mach-zynq/clk.c1
-rw-r--r--arch/arm/mach-zynq/cpu.c2
-rw-r--r--arch/arm/mach-zynq/spl.c3
-rw-r--r--arch/arm/mach-zynq/timer.c1
-rw-r--r--arch/arm/mach-zynqmp-r5/cpu.c1
-rw-r--r--arch/arm/mach-zynqmp/clk.c1
-rw-r--r--arch/arm/mach-zynqmp/cpu.c2
-rw-r--r--arch/arm/mach-zynqmp/include/mach/hardware.h4
-rw-r--r--arch/arm/mach-zynqmp/mp.c4
-rw-r--r--arch/arm/mach-zynqmp/psu_spl_init.c1
-rw-r--r--arch/arm/mach-zynqmp/spl.c3
-rw-r--r--arch/m68k/cpu/mcf5227x/cpu.c4
-rw-r--r--arch/m68k/cpu/mcf5227x/cpu_init.c1
-rw-r--r--arch/m68k/cpu/mcf523x/cpu.c4
-rw-r--r--arch/m68k/cpu/mcf523x/cpu_init.c1
-rw-r--r--arch/m68k/cpu/mcf52x2/cpu.c17
-rw-r--r--arch/m68k/cpu/mcf52x2/cpu_init.c1
-rw-r--r--arch/m68k/cpu/mcf52x2/speed.c1
-rw-r--r--arch/m68k/cpu/mcf530x/cpu.c4
-rw-r--r--arch/m68k/cpu/mcf530x/cpu_init.c1
-rw-r--r--arch/m68k/cpu/mcf532x/cpu.c5
-rw-r--r--arch/m68k/cpu/mcf532x/cpu_init.c1
-rw-r--r--arch/m68k/cpu/mcf5445x/cpu.c5
-rw-r--r--arch/m68k/cpu/mcf5445x/cpu_init.c1
-rw-r--r--arch/m68k/cpu/mcf5445x/pci.c1
-rw-r--r--arch/m68k/cpu/mcf547x_8x/cpu.c4
-rw-r--r--arch/m68k/cpu/mcf547x_8x/cpu_init.c1
-rw-r--r--arch/m68k/cpu/mcf547x_8x/pci.c1
-rw-r--r--arch/m68k/cpu/mcf547x_8x/slicetimer.c2
-rw-r--r--arch/m68k/lib/bootm.c6
-rw-r--r--arch/m68k/lib/interrupts.c1
-rw-r--r--arch/m68k/lib/time.c2
-rw-r--r--arch/m68k/lib/traps.c1
-rw-r--r--arch/microblaze/cpu/cache.c1
-rw-r--r--arch/microblaze/cpu/interrupts.c3
-rw-r--r--arch/microblaze/cpu/spl.c4
-rw-r--r--arch/microblaze/cpu/timer.c3
-rw-r--r--arch/microblaze/lib/bootm.c6
-rw-r--r--arch/mips/cpu/cpu.c3
-rw-r--r--arch/mips/include/asm/cacheops.h2
-rw-r--r--arch/mips/include/asm/cm.h1
-rw-r--r--arch/mips/include/asm/mipsregs.h1
-rw-r--r--arch/mips/lib/bootm.c7
-rw-r--r--arch/mips/lib/cache.c2
-rw-r--r--arch/mips/lib/reloc.c1
-rw-r--r--arch/mips/lib/spl.c1
-rw-r--r--arch/mips/lib/stack.c2
-rw-r--r--arch/mips/lib/traps.c2
-rw-r--r--arch/mips/mach-ath79/ar933x/ddr.c1
-rw-r--r--arch/mips/mach-ath79/ar934x/clk.c6
-rw-r--r--arch/mips/mach-ath79/ar934x/ddr.c2
-rw-r--r--arch/mips/mach-ath79/cpu.c1
-rw-r--r--arch/mips/mach-ath79/qca953x/ddr.c2
-rw-r--r--arch/mips/mach-ath79/qca956x/clk.c1
-rw-r--r--arch/mips/mach-ath79/qca956x/ddr.c1
-rw-r--r--arch/mips/mach-ath79/reset.c2
-rw-r--r--arch/mips/mach-bmips/dram.c2
-rw-r--r--arch/mips/mach-jz47xx/include/mach/jz4780_dram.h1
-rw-r--r--arch/mips/mach-jz47xx/jz4780/gpio.c1
-rw-r--r--arch/mips/mach-jz47xx/jz4780/jz4780.c1
-rw-r--r--arch/mips/mach-jz47xx/jz4780/pll.c2
-rw-r--r--arch/mips/mach-jz47xx/jz4780/reset.c1
-rw-r--r--arch/mips/mach-jz47xx/jz4780/sdram.c3
-rw-r--r--arch/mips/mach-jz47xx/jz4780/timer.c3
-rw-r--r--arch/mips/mach-mscc/cpu.c2
-rw-r--r--arch/mips/mach-mscc/dram.c1
-rw-r--r--arch/mips/mach-mscc/gpio.c1
-rw-r--r--arch/mips/mach-mscc/include/mach/ddr.h1
-rw-r--r--arch/mips/mach-mscc/include/mach/jr2/jr2_devcpu_gcb.h2
-rw-r--r--arch/mips/mach-mscc/include/mach/jr2/jr2_devcpu_gcb_miim_regs.h2
-rw-r--r--arch/mips/mach-mscc/include/mach/jr2/jr2_icpu_cfg.h2
-rw-r--r--arch/mips/mach-mscc/include/mach/luton/luton_devcpu_gcb.h1
-rw-r--r--arch/mips/mach-mscc/include/mach/luton/luton_devcpu_gcb_miim_regs.h1
-rw-r--r--arch/mips/mach-mscc/include/mach/luton/luton_icpu_cfg.h1
-rw-r--r--arch/mips/mach-mscc/include/mach/ocelot/ocelot_devcpu_gcb.h1
-rw-r--r--arch/mips/mach-mscc/include/mach/ocelot/ocelot_devcpu_gcb_miim_regs.h1
-rw-r--r--arch/mips/mach-mscc/include/mach/ocelot/ocelot_icpu_cfg.h1
-rw-r--r--arch/mips/mach-mscc/include/mach/serval/serval_devcpu_gcb.h1
-rw-r--r--arch/mips/mach-mscc/include/mach/serval/serval_devcpu_gcb_miim_regs.h1
-rw-r--r--arch/mips/mach-mscc/include/mach/serval/serval_icpu_cfg.h1
-rw-r--r--arch/mips/mach-mscc/include/mach/servalt/servalt_devcpu_gcb.h1
-rw-r--r--arch/mips/mach-mscc/include/mach/servalt/servalt_devcpu_gcb_miim_regs.h1
-rw-r--r--arch/mips/mach-mscc/include/mach/servalt/servalt_icpu_cfg.h1
-rw-r--r--arch/mips/mach-mscc/include/mach/tlb.h1
-rw-r--r--arch/mips/mach-mscc/phy.c1
-rw-r--r--arch/mips/mach-mtmips/cpu.c2
-rw-r--r--arch/mips/mach-mtmips/ddr_init.c1
-rw-r--r--arch/mips/mach-mtmips/mt7628/ddr.c1
-rw-r--r--arch/mips/mach-mtmips/spl.c1
-rw-r--r--arch/mips/mach-pic32/cpu.c1
-rw-r--r--arch/nds32/cpu/n1213/ae3xx/cpu.c2
-rw-r--r--arch/nds32/cpu/n1213/ag101/cpu.c2
-rw-r--r--arch/nds32/cpu/n1213/ag101/timer.c3
-rw-r--r--arch/nds32/include/asm/u-boot-nds32.h2
-rw-r--r--arch/nds32/lib/boot.c2
-rw-r--r--arch/nds32/lib/bootm.c2
-rw-r--r--arch/nds32/lib/cache.c1
-rw-r--r--arch/nios2/cpu/cpu.c5
-rw-r--r--arch/nios2/cpu/interrupts.c2
-rw-r--r--arch/nios2/lib/bootm.c6
-rw-r--r--arch/powerpc/cpu/mpc83xx/cpu.c5
-rw-r--r--arch/powerpc/cpu/mpc83xx/cpu_init.c2
-rw-r--r--arch/powerpc/cpu/mpc83xx/ecc.c2
-rw-r--r--arch/powerpc/cpu/mpc83xx/interrupts.c5
-rw-r--r--arch/powerpc/cpu/mpc83xx/law.c1
-rw-r--r--arch/powerpc/cpu/mpc83xx/pci.c3
-rw-r--r--arch/powerpc/cpu/mpc83xx/pcie.c1
-rw-r--r--arch/powerpc/cpu/mpc83xx/serdes.c1
-rw-r--r--arch/powerpc/cpu/mpc83xx/spd_sdram.c3
-rw-r--r--arch/powerpc/cpu/mpc83xx/speed.c3
-rw-r--r--arch/powerpc/cpu/mpc83xx/spl_minimal.c1
-rw-r--r--arch/powerpc/cpu/mpc83xx/traps.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/bsc9132_serdes.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/c29x_serdes.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/cmd_errata.c4
-rw-r--r--arch/powerpc/cpu/mpc85xx/commproc.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/cpu.c5
-rw-r--r--arch/powerpc/cpu/mpc85xx/cpu_init.c2
-rw-r--r--arch/powerpc/cpu/mpc85xx/cpu_init_early.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/fdt.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c2
-rw-r--r--arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c2
-rw-r--r--arch/powerpc/cpu/mpc85xx/interrupts.c4
-rw-r--r--arch/powerpc/cpu/mpc85xx/liodn.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/mp.c4
-rw-r--r--arch/powerpc/cpu/mpc85xx/mpc8536_serdes.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/mpc8544_serdes.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/mpc8548_serdes.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/mpc8568_serdes.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/mpc8569_serdes.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/mpc8572_serdes.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/p1010_serdes.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/p1021_serdes.c2
-rw-r--r--arch/powerpc/cpu/mpc85xx/p1022_serdes.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/p1023_serdes.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/p2020_serdes.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/pci.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/spl_minimal.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/tlb.c1
-rw-r--r--arch/powerpc/cpu/mpc85xx/traps.c1
-rw-r--r--arch/powerpc/cpu/mpc86xx/cpu.c3
-rw-r--r--arch/powerpc/cpu/mpc86xx/cpu_init.c2
-rw-r--r--arch/powerpc/cpu/mpc86xx/interrupts.c4
-rw-r--r--arch/powerpc/cpu/mpc86xx/mp.c2
-rw-r--r--arch/powerpc/cpu/mpc86xx/mpc8610_serdes.c1
-rw-r--r--arch/powerpc/cpu/mpc86xx/mpc8641_serdes.c1
-rw-r--r--arch/powerpc/cpu/mpc86xx/traps.c1
-rw-r--r--arch/powerpc/cpu/mpc8xx/cpu.c3
-rw-r--r--arch/powerpc/cpu/mpc8xx/cpu_init.c1
-rw-r--r--arch/powerpc/cpu/mpc8xx/immap.c19
-rw-r--r--arch/powerpc/cpu/mpc8xx/interrupts.c1
-rw-r--r--arch/powerpc/cpu/mpc8xx/traps.c1
-rw-r--r--arch/powerpc/cpu/mpc8xxx/cpu.c2
-rw-r--r--arch/powerpc/cpu/mpc8xxx/fsl_lbc.c1
-rw-r--r--arch/powerpc/cpu/mpc8xxx/fsl_pamu.c2
-rw-r--r--arch/powerpc/cpu/mpc8xxx/law.c1
-rw-r--r--arch/powerpc/cpu/mpc8xxx/pamu_table.c1
-rw-r--r--arch/powerpc/cpu/mpc8xxx/srio.c2
-rw-r--r--arch/powerpc/include/asm/fsl_i2c.h1
-rw-r--r--arch/powerpc/include/asm/mmu.h1
-rw-r--r--arch/powerpc/include/asm/u-boot.h2
-rw-r--r--arch/powerpc/lib/bootm.c17
-rw-r--r--arch/powerpc/lib/extable.c1
-rw-r--r--arch/powerpc/lib/interrupts.c1
-rw-r--r--arch/powerpc/lib/kgdb.c3
-rw-r--r--arch/powerpc/lib/spl.c1
-rw-r--r--arch/powerpc/lib/stack.c1
-rw-r--r--arch/powerpc/lib/time.c2
-rw-r--r--arch/riscv/cpu/ax25/cache.c1
-rw-r--r--arch/riscv/cpu/cpu.c2
-rw-r--r--arch/riscv/cpu/generic/cpu.c1
-rw-r--r--arch/riscv/include/asm/encoding.h3
-rw-r--r--arch/riscv/lib/boot.c2
-rw-r--r--arch/riscv/lib/bootm.c6
-rw-r--r--arch/riscv/lib/fdt_fixup.c1
-rw-r--r--arch/riscv/lib/image.c1
-rw-r--r--arch/riscv/lib/reset.c2
-rw-r--r--arch/riscv/lib/spl.c2
-rw-r--r--arch/sandbox/cpu/cpu.c3
-rw-r--r--arch/sandbox/cpu/spl.c2
-rw-r--r--arch/sandbox/cpu/start.c1
-rw-r--r--arch/sandbox/cpu/state.c1
-rw-r--r--arch/sandbox/include/asm/eth.h2
-rw-r--r--arch/sandbox/lib/bootm.c2
-rw-r--r--arch/sandbox/lib/pci_io.c1
-rw-r--r--arch/sh/cpu/sh4/cache.c1
-rw-r--r--arch/sh/cpu/sh4/cpu.c3
-rw-r--r--arch/sh/lib/bootm.c5
-rw-r--r--arch/sh/lib/time.c2
-rw-r--r--arch/sh/lib/time_sh2.c2
-rw-r--r--arch/sh/lib/zimageboot.c5
-rw-r--r--arch/x86/cpu/acpi_gpe.c1
-rw-r--r--arch/x86/cpu/apollolake/cpu_spl.c1
-rw-r--r--arch/x86/cpu/apollolake/fsp_m.c1
-rw-r--r--arch/x86/cpu/apollolake/fsp_s.c4
-rw-r--r--arch/x86/cpu/apollolake/hostbridge.c1
-rw-r--r--arch/x86/cpu/apollolake/lpc.c1
-rw-r--r--arch/x86/cpu/apollolake/pmc.c2
-rw-r--r--arch/x86/cpu/apollolake/punit.c2
-rw-r--r--arch/x86/cpu/apollolake/spl.c3
-rw-r--r--arch/x86/cpu/baytrail/acpi.c1
-rw-r--r--arch/x86/cpu/baytrail/cpu.c1
-rw-r--r--arch/x86/cpu/baytrail/fsp_configs.c1
-rw-r--r--arch/x86/cpu/baytrail/valleyview.c1
-rw-r--r--arch/x86/cpu/braswell/braswell.c1
-rw-r--r--arch/x86/cpu/braswell/fsp_configs.c1
-rw-r--r--arch/x86/cpu/broadwell/adsp.c1
-rw-r--r--arch/x86/cpu/broadwell/cpu.c2
-rw-r--r--arch/x86/cpu/broadwell/cpu_from_spl.c2
-rw-r--r--arch/x86/cpu/broadwell/cpu_full.c3
-rw-r--r--arch/x86/cpu/broadwell/iobp.c1
-rw-r--r--arch/x86/cpu/broadwell/lpc.c1
-rw-r--r--arch/x86/cpu/broadwell/me.c2
-rw-r--r--arch/x86/cpu/broadwell/pch.c2
-rw-r--r--arch/x86/cpu/broadwell/pinctrl_broadwell.c1
-rw-r--r--arch/x86/cpu/broadwell/power_state.c1
-rw-r--r--arch/x86/cpu/broadwell/refcode.c2
-rw-r--r--arch/x86/cpu/broadwell/sata.c2
-rw-r--r--arch/x86/cpu/broadwell/sdram.c1
-rw-r--r--arch/x86/cpu/coreboot/coreboot.c1
-rw-r--r--arch/x86/cpu/coreboot/timestamp.c1
-rw-r--r--arch/x86/cpu/cpu.c2
-rw-r--r--arch/x86/cpu/efi/app.c1
-rw-r--r--arch/x86/cpu/efi/payload.c1
-rw-r--r--arch/x86/cpu/i386/interrupt.c1
-rw-r--r--arch/x86/cpu/intel_common/cpu.c1
-rw-r--r--arch/x86/cpu/intel_common/cpu_from_spl.c1
-rw-r--r--arch/x86/cpu/intel_common/itss.c1
-rw-r--r--arch/x86/cpu/intel_common/lpc.c1
-rw-r--r--arch/x86/cpu/intel_common/me_status.c1
-rw-r--r--arch/x86/cpu/intel_common/microcode.c1
-rw-r--r--arch/x86/cpu/intel_common/mrc.c1
-rw-r--r--arch/x86/cpu/intel_common/p2sb.c2
-rw-r--r--arch/x86/cpu/intel_common/report_platform.c1
-rw-r--r--arch/x86/cpu/ioapic.c1
-rw-r--r--arch/x86/cpu/irq.c1
-rw-r--r--arch/x86/cpu/ivybridge/bd82x6x.c3
-rw-r--r--arch/x86/cpu/ivybridge/cpu.c2
-rw-r--r--arch/x86/cpu/ivybridge/early_me.c2
-rw-r--r--arch/x86/cpu/ivybridge/fsp_configs.c1
-rw-r--r--arch/x86/cpu/ivybridge/ivybridge.c1
-rw-r--r--arch/x86/cpu/ivybridge/lpc.c1
-rw-r--r--arch/x86/cpu/ivybridge/model_206ax.c1
-rw-r--r--arch/x86/cpu/ivybridge/northbridge.c2
-rw-r--r--arch/x86/cpu/ivybridge/sata.c1
-rw-r--r--arch/x86/cpu/ivybridge/sdram.c1
-rw-r--r--arch/x86/cpu/ivybridge/sdram_nop.c1
-rw-r--r--arch/x86/cpu/lapic.c1
-rw-r--r--arch/x86/cpu/mp_init.c2
-rw-r--r--arch/x86/cpu/mtrr.c2
-rw-r--r--arch/x86/cpu/pci.c1
-rw-r--r--arch/x86/cpu/qemu/qemu.c1
-rw-r--r--arch/x86/cpu/quark/dram.c2
-rw-r--r--arch/x86/cpu/quark/mrc_util.h2
-rw-r--r--arch/x86/cpu/quark/quark.c3
-rw-r--r--arch/x86/cpu/queensbay/tnc.c1
-rw-r--r--arch/x86/cpu/slimbootloader/serial.c1
-rw-r--r--arch/x86/cpu/slimbootloader/slimbootloader.c2
-rw-r--r--arch/x86/cpu/tangier/pinmux.c1
-rw-r--r--arch/x86/cpu/tangier/sdram.c1
-rw-r--r--arch/x86/cpu/tangier/tangier.c1
-rw-r--r--arch/x86/cpu/turbo.c1
-rw-r--r--arch/x86/cpu/x86_64/cpu.c1
-rw-r--r--arch/x86/include/asm/arch-apollolake/lpc.h1
-rw-r--r--arch/x86/include/asm/arch-apollolake/systemagent.h1
-rw-r--r--arch/x86/include/asm/arch-braswell/fsp/fsp_vpd.h2
-rw-r--r--arch/x86/include/asm/arch-broadwell/adsp.h1
-rw-r--r--arch/x86/include/asm/arch-broadwell/serialio.h1
-rw-r--r--arch/x86/include/asm/atomic.h1
-rw-r--r--arch/x86/include/asm/fast_spi.h1
-rw-r--r--arch/x86/include/asm/fsp/fsp_api.h2
-rw-r--r--arch/x86/include/asm/fsp/fsp_fv.h2
-rw-r--r--arch/x86/include/asm/intel_pinctrl.h1
-rw-r--r--arch/x86/include/asm/mp.h1
-rw-r--r--arch/x86/include/asm/msr-index.h4
-rw-r--r--arch/x86/include/asm/mtrr.h2
-rw-r--r--arch/x86/include/asm/sipi.h4
-rw-r--r--arch/x86/lib/acpi.c1
-rw-r--r--arch/x86/lib/acpi_table.c1
-rw-r--r--arch/x86/lib/bios.c1
-rw-r--r--arch/x86/lib/bios_interrupts.c1
-rw-r--r--arch/x86/lib/bootm.c6
-rw-r--r--arch/x86/lib/cmd_boot.c2
-rw-r--r--arch/x86/lib/coreboot_table.c1
-rw-r--r--arch/x86/lib/fsp/fsp_common.c2
-rw-r--r--arch/x86/lib/fsp/fsp_dram.c1
-rw-r--r--arch/x86/lib/fsp/fsp_graphics.c2
-rw-r--r--arch/x86/lib/fsp/fsp_support.c1
-rw-r--r--arch/x86/lib/fsp1/fsp_common.c2
-rw-r--r--arch/x86/lib/fsp1/fsp_dram.c1
-rw-r--r--arch/x86/lib/fsp1/fsp_support.c1
-rw-r--r--arch/x86/lib/fsp2/fsp_dram.c2
-rw-r--r--arch/x86/lib/fsp2/fsp_init.c2
-rw-r--r--arch/x86/lib/fsp2/fsp_meminit.c6
-rw-r--r--arch/x86/lib/fsp2/fsp_silicon_init.c6
-rw-r--r--arch/x86/lib/fsp2/fsp_support.c1
-rw-r--r--arch/x86/lib/i8259.c1
-rw-r--r--arch/x86/lib/interrupts.c3
-rw-r--r--arch/x86/lib/mpspec.c1
-rw-r--r--arch/x86/lib/mrccache.c1
-rw-r--r--arch/x86/lib/physmem.c1
-rw-r--r--arch/x86/lib/pinctrl_ich6.c1
-rw-r--r--arch/x86/lib/pirq_routing.c1
-rw-r--r--arch/x86/lib/pmu.c1
-rw-r--r--arch/x86/lib/relocate.c1
-rw-r--r--arch/x86/lib/scu.c2
-rw-r--r--arch/x86/lib/spl.c3
-rw-r--r--arch/x86/lib/tpl.c3
-rw-r--r--arch/x86/lib/zimage.c3
-rw-r--r--arch/xtensa/cpu/cpu.c1
-rw-r--r--arch/xtensa/cpu/exceptions.c1
-rw-r--r--arch/xtensa/lib/bootm.c1
-rw-r--r--arch/xtensa/lib/time.c1
-rw-r--r--board/AndesTech/adp-ae3xx/adp-ae3xx.c2
-rw-r--r--board/AndesTech/adp-ag101p/adp-ag101p.c2
-rw-r--r--board/AndesTech/ax25-ae350/ax25-ae350.c3
-rw-r--r--board/Arcturus/ucp1020/cmd_arc.c6
-rw-r--r--board/Arcturus/ucp1020/ucp1020.c2
-rw-r--r--board/BuR/brppt2/board.c1
-rw-r--r--board/BuR/common/br_resetc.c1
-rw-r--r--board/BuR/common/common.c2
-rw-r--r--board/BuS/eb_cpu5282/eb_cpu5282.c2
-rw-r--r--board/CZ.NIC/turris_mox/mox_sp.c2
-rw-r--r--board/CZ.NIC/turris_mox/turris_mox.c2
-rw-r--r--board/CZ.NIC/turris_omnia/turris_omnia.c3
-rw-r--r--board/CarMediaLab/flea3/flea3.c1
-rw-r--r--board/LaCie/net2big_v2/net2big_v2.c4
-rw-r--r--board/LaCie/netspace_v2/netspace_v2.c3
-rw-r--r--board/Marvell/aspenite/aspenite.c1
-rw-r--r--board/Marvell/db-88f6281-bp/db-88f6281-bp.c2
-rw-r--r--board/Marvell/db-88f6720/db-88f6720.c3
-rw-r--r--board/Marvell/db-88f6820-amc/db-88f6820-amc.c3
-rw-r--r--board/Marvell/db-88f6820-gp/db-88f6820-gp.c3
-rw-r--r--board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c3
-rw-r--r--board/Marvell/db-xc3-24g4xg/db-xc3-24g4xg.c2
-rw-r--r--board/Marvell/dreamplug/dreamplug.c1
-rw-r--r--board/Marvell/gplugd/gplugd.c3
-rw-r--r--board/Marvell/guruplug/guruplug.c1
-rw-r--r--board/Marvell/mvebu_armada-37xx/board.c2
-rw-r--r--board/Marvell/mvebu_armada-8k/board.c1
-rw-r--r--board/Marvell/openrd/openrd.c1
-rw-r--r--board/Marvell/sheevaplug/sheevaplug.c1
-rw-r--r--board/Seagate/dockstar/dockstar.c2
-rw-r--r--board/Seagate/goflexhome/goflexhome.c2
-rw-r--r--board/Seagate/nas220/nas220.c1
-rw-r--r--board/Synology/ds109/ds109.c2
-rw-r--r--board/Synology/ds414/cmd_syno.c10
-rw-r--r--board/Synology/ds414/ds414.c2
-rw-r--r--board/abilis/tb100/tb100.c1
-rw-r--r--board/advantech/dms-ba16/dms-ba16.c2
-rw-r--r--board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c3
-rw-r--r--board/advantech/imx8qm_rom7720_a1/spl.c3
-rw-r--r--board/advantech/som-db5800-som-6867/som-db5800-som-6867.c1
-rw-r--r--board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c3
-rw-r--r--board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c2
-rw-r--r--board/alliedtelesis/x530/x530.c2
-rw-r--r--board/amazon/kc1/kc1.c1
-rw-r--r--board/amlogic/p200/p200.c2
-rw-r--r--board/amlogic/p201/p201.c2
-rw-r--r--board/amlogic/p212/p212.c2
-rw-r--r--board/amlogic/q200/q200.c2
-rw-r--r--board/amlogic/s400/s400.c2
-rw-r--r--board/amlogic/sei510/sei510.c3
-rw-r--r--board/amlogic/sei610/sei610.c3
-rw-r--r--board/amlogic/u200/u200.c2
-rw-r--r--board/amlogic/w400/w400.c2
-rw-r--r--board/aristainetos/aristainetos.c3
-rw-r--r--board/armadeus/apf27/fpga.c2
-rw-r--r--board/armltd/integrator/integrator.c2
-rw-r--r--board/armltd/integrator/pci.c3
-rw-r--r--board/armltd/integrator/timer.c3
-rw-r--r--board/armltd/vexpress/vexpress_common.c2
-rw-r--r--board/armltd/vexpress64/pcie.c3
-rw-r--r--board/armltd/vexpress64/vexpress64.c2
-rw-r--r--board/astro/mcf5373l/mcf5373l.c1
-rw-r--r--board/atmel/at91rm9200ek/at91rm9200ek.c1
-rw-r--r--board/atmel/at91sam9260ek/led.c1
-rw-r--r--board/atmel/at91sam9263ek/at91sam9263ek.c1
-rw-r--r--board/atmel/at91sam9n12ek/at91sam9n12ek.c1
-rw-r--r--board/atmel/common/mac-spi-nor.c1
-rw-r--r--board/atmel/common/mac_eeprom.c1
-rw-r--r--board/atmel/common/video_display.c1
-rw-r--r--board/avionic-design/common/tamonten-ng.c1
-rw-r--r--board/bachmann/ot1200/ot1200.c2
-rw-r--r--board/bachmann/ot1200/ot1200_spl.c1
-rw-r--r--board/barco/platinum/platinum.c1
-rw-r--r--board/barco/platinum/platinum_picon.c1
-rw-r--r--board/barco/platinum/platinum_titanium.c1
-rw-r--r--board/barco/platinum/spl_picon.c1
-rw-r--r--board/barco/platinum/spl_titanium.c1
-rw-r--r--board/barco/titanium/titanium.c2
-rw-r--r--board/beacon/imx8mm/spl.c2
-rw-r--r--board/beckhoff/mx53cx9020/mx53cx9020.c1
-rw-r--r--board/birdland/bav335x/board.c1
-rw-r--r--board/bluegiga/apx4devkit/apx4devkit.c2
-rw-r--r--board/bluewater/gurnard/gurnard.c1
-rw-r--r--board/bluewater/snapper9260/snapper9260.c1
-rw-r--r--board/bosch/guardian/board.c2
-rw-r--r--board/bosch/shc/board.c3
-rw-r--r--board/boundary/nitrogen6x/nitrogen6x.c6
-rw-r--r--board/broadcom/bcm23550_w1d/bcm23550_w1d.c1
-rw-r--r--board/broadcom/bcm28155_ap/bcm28155_ap.c1
-rw-r--r--board/broadcom/bcm963158/bcm963158.c1
-rw-r--r--board/broadcom/bcm968360bg/bcm968360bg.c1
-rw-r--r--board/broadcom/bcm968580xref/bcm968580xref.c1
-rw-r--r--board/broadcom/bcm_ep/board.c2
-rw-r--r--board/broadcom/bcmns2/northstar2.c1
-rw-r--r--board/broadcom/bcmstb/bcmstb.c1
-rw-r--r--board/bticino/mamoj/mamoj.c1
-rw-r--r--board/bticino/mamoj/spl.c2
-rw-r--r--board/buffalo/lsxl/lsxl.c5
-rw-r--r--board/cavium/thunderx/atf.c5
-rw-r--r--board/cavium/thunderx/thunderx.c1
-rw-r--r--board/ccv/xpress/spl.c1
-rw-r--r--board/ccv/xpress/xpress.c2
-rw-r--r--board/cirrus/edb93xx/edb93xx.c2
-rw-r--r--board/cloudengines/pogo_e02/pogo_e02.c2
-rw-r--r--board/cobra5272/flash.c21
-rw-r--r--board/compal/paz00/paz00.c1
-rw-r--r--board/compulab/cl-som-imx7/cl-som-imx7.c2
-rw-r--r--board/compulab/cm_fx6/cm_fx6.c2
-rw-r--r--board/compulab/cm_fx6/spl.c1
-rw-r--r--board/compulab/cm_t335/cm_t335.c2
-rw-r--r--board/compulab/cm_t335/spl.c1
-rw-r--r--board/compulab/cm_t35/cm_t35.c2
-rw-r--r--board/compulab/cm_t43/cm_t43.c2
-rw-r--r--board/compulab/cm_t54/cm_t54.c2
-rw-r--r--board/compulab/cm_t54/mux.c1
-rw-r--r--board/compulab/common/common.c1
-rw-r--r--board/compulab/common/omap3_smc911x.c1
-rw-r--r--board/congatec/cgtqmx6eval/cgtqmx6eval.c2
-rw-r--r--board/corscience/tricorder/tricorder-eeprom.c3
-rw-r--r--board/corscience/tricorder/tricorder.c1
-rw-r--r--board/cortina/presidio-asic/presidio.c2
-rw-r--r--board/creative/xfi3/xfi3.c3
-rw-r--r--board/cssi/MCR3000/MCR3000.c1
-rw-r--r--board/d-link/dns325/dns325.c2
-rw-r--r--board/davinci/da8xxevm/da850evm.c1
-rw-r--r--board/davinci/da8xxevm/omapl138_lcdk.c1
-rw-r--r--board/dfi/dfi-bt700/dfi-bt700.c2
-rw-r--r--board/dhelectronics/dh_imx6/dh_imx6.c3
-rw-r--r--board/dhelectronics/dh_imx6/dh_imx6_spl.c2
-rw-r--r--board/dhelectronics/dh_stm32mp1/board.c4
-rw-r--r--board/ea/mx7ulp_com/mx7ulp_com.c1
-rw-r--r--board/eets/pdu001/board.c1
-rw-r--r--board/egnite/ethernut5/ethernut5_pwrman.c4
-rw-r--r--board/el/el6x/el6x.c3
-rw-r--r--board/elgin/elgin_rv1108/elgin_rv1108.c1
-rw-r--r--board/embest/mx6boards/mx6boards.c3
-rw-r--r--board/emulation/qemu-arm/qemu-arm.c2
-rw-r--r--board/emulation/qemu-riscv/qemu-riscv.c2
-rw-r--r--board/engicam/common/board.c1
-rw-r--r--board/engicam/common/spl.c3
-rw-r--r--board/esd/meesc/meesc.c1
-rw-r--r--board/esd/vme8349/caddy.c3
-rw-r--r--board/esd/vme8349/pci.c1
-rw-r--r--board/esd/vme8349/vme8349.c1
-rw-r--r--board/firefly/firefly-rk3288/firefly-rk3288.c1
-rw-r--r--board/firefly/firefly-rk3308/roc_cc_rk3308.c1
-rw-r--r--board/firefly/roc-pc-rk3399/roc-pc-rk3399.c1
-rw-r--r--board/freescale/b4860qds/b4860qds.c3
-rw-r--r--board/freescale/b4860qds/ddr.c2
-rw-r--r--board/freescale/b4860qds/eth_b4860qds.c2
-rw-r--r--board/freescale/bsc9131rdb/bsc9131rdb.c2
-rw-r--r--board/freescale/bsc9131rdb/spl_minimal.c1
-rw-r--r--board/freescale/bsc9132qds/bsc9132qds.c2
-rw-r--r--board/freescale/bsc9132qds/spl_minimal.c1
-rw-r--r--board/freescale/c29xpcie/c29xpcie.c2
-rw-r--r--board/freescale/c29xpcie/cpld.c3
-rw-r--r--board/freescale/common/arm_sleep.c1
-rw-r--r--board/freescale/common/cmd_esbc_validate.c8
-rw-r--r--board/freescale/common/diu_ch7301.c1
-rw-r--r--board/freescale/common/fsl_chain_of_trust.c1
-rw-r--r--board/freescale/common/fsl_validate.c2
-rw-r--r--board/freescale/common/ics307_clk.c1
-rw-r--r--board/freescale/common/idt8t49n222a_serdes_clk.c2
-rw-r--r--board/freescale/common/mc34vr500.c1
-rw-r--r--board/freescale/common/mpc85xx_sleep.c1
-rw-r--r--board/freescale/common/ngpixis.c3
-rw-r--r--board/freescale/common/ns_access.c2
-rw-r--r--board/freescale/common/pixis.c10
-rw-r--r--board/freescale/common/qixis.c3
-rw-r--r--board/freescale/common/sgmii_riser.c1
-rw-r--r--board/freescale/common/sys_eeprom.c4
-rw-r--r--board/freescale/common/vid.c11
-rw-r--r--board/freescale/common/vsc3316_3308.c1
-rw-r--r--board/freescale/common/zm7300.c1
-rw-r--r--board/freescale/corenet_ds/corenet_ds.c1
-rw-r--r--board/freescale/corenet_ds/ddr.c2
-rw-r--r--board/freescale/corenet_ds/eth_hydra.c1
-rw-r--r--board/freescale/corenet_ds/eth_p4080.c3
-rw-r--r--board/freescale/corenet_ds/eth_superhydra.c2
-rw-r--r--board/freescale/imx8mm_evk/imx8mm_evk.c2
-rw-r--r--board/freescale/imx8mm_evk/spl.c4
-rw-r--r--board/freescale/imx8mn_evk/imx8mn_evk.c2
-rw-r--r--board/freescale/imx8mn_evk/spl.c4
-rw-r--r--board/freescale/imx8mp_evk/imx8mp_evk.c2
-rw-r--r--board/freescale/imx8mp_evk/spl.c4
-rw-r--r--board/freescale/imx8mq_evk/imx8mq_evk.c1
-rw-r--r--board/freescale/imx8mq_evk/spl.c4
-rw-r--r--board/freescale/imx8qm_mek/spl.c3
-rw-r--r--board/freescale/imx8qxp_mek/imx8qxp_mek.c1
-rw-r--r--board/freescale/imx8qxp_mek/spl.c3
-rw-r--r--board/freescale/imxrt1020-evk/imxrt1020-evk.c2
-rw-r--r--board/freescale/imxrt1050-evk/imxrt1050-evk.c2
-rw-r--r--board/freescale/ls1012afrdm/eth.c1
-rw-r--r--board/freescale/ls1012afrdm/ls1012afrdm.c2
-rw-r--r--board/freescale/ls1012aqds/eth.c1
-rw-r--r--board/freescale/ls1012aqds/ls1012aqds.c2
-rw-r--r--board/freescale/ls1012ardb/eth.c1
-rw-r--r--board/freescale/ls1012ardb/ls1012ardb.c7
-rw-r--r--board/freescale/ls1021aiot/ls1021aiot.c2
-rw-r--r--board/freescale/ls1021aqds/ddr.c3
-rw-r--r--board/freescale/ls1021aqds/eth.c1
-rw-r--r--board/freescale/ls1021aqds/ls1021aqds.c1
-rw-r--r--board/freescale/ls1021atsn/ls1021atsn.c2
-rw-r--r--board/freescale/ls1021atwr/ls1021atwr.c15
-rw-r--r--board/freescale/ls1028a/ls1028a.c2
-rw-r--r--board/freescale/ls1043aqds/ddr.c1
-rw-r--r--board/freescale/ls1043aqds/eth.c2
-rw-r--r--board/freescale/ls1043aqds/ls1043aqds.c2
-rw-r--r--board/freescale/ls1043ardb/cpld.c2
-rw-r--r--board/freescale/ls1043ardb/ddr.c1
-rw-r--r--board/freescale/ls1043ardb/eth.c1
-rw-r--r--board/freescale/ls1043ardb/ls1043ardb.c1
-rw-r--r--board/freescale/ls1046afrwy/eth.c2
-rw-r--r--board/freescale/ls1046afrwy/ls1046afrwy.c1
-rw-r--r--board/freescale/ls1046aqds/ddr.c1
-rw-r--r--board/freescale/ls1046aqds/eth.c2
-rw-r--r--board/freescale/ls1046aqds/ls1046aqds.c1
-rw-r--r--board/freescale/ls1046ardb/cpld.c2
-rw-r--r--board/freescale/ls1046ardb/ddr.c1
-rw-r--r--board/freescale/ls1046ardb/eth.c2
-rw-r--r--board/freescale/ls1046ardb/ls1046ardb.c1
-rw-r--r--board/freescale/ls1088a/ddr.c1
-rw-r--r--board/freescale/ls1088a/eth_ls1088aqds.c2
-rw-r--r--board/freescale/ls1088a/ls1088a.c3
-rw-r--r--board/freescale/ls2080a/ddr.c1
-rw-r--r--board/freescale/ls2080a/ls2080a.c1
-rw-r--r--board/freescale/ls2080aqds/ddr.c1
-rw-r--r--board/freescale/ls2080aqds/eth.c2
-rw-r--r--board/freescale/ls2080aqds/ls2080aqds.c1
-rw-r--r--board/freescale/ls2080ardb/ddr.c1
-rw-r--r--board/freescale/ls2080ardb/ls2080ardb.c1
-rw-r--r--board/freescale/lx2160a/eth_lx2160aqds.c3
-rw-r--r--board/freescale/lx2160a/eth_lx2160ardb.c1
-rw-r--r--board/freescale/lx2160a/lx2160a.c2
-rw-r--r--board/freescale/m5208evbe/m5208evbe.c1
-rw-r--r--board/freescale/m52277evb/m52277evb.c1
-rw-r--r--board/freescale/m5249evb/m5249evb.c1
-rw-r--r--board/freescale/m5253demo/flash.c2
-rw-r--r--board/freescale/m5253demo/m5253demo.c2
-rw-r--r--board/freescale/m5282evb/m5282evb.c1
-rw-r--r--board/freescale/m53017evb/m53017evb.c1
-rw-r--r--board/freescale/m5329evb/m5329evb.c1
-rw-r--r--board/freescale/m5373evb/m5373evb.c1
-rw-r--r--board/freescale/m54418twr/m54418twr.c1
-rw-r--r--board/freescale/m54451evb/m54451evb.c1
-rw-r--r--board/freescale/m54455evb/m54455evb.c1
-rw-r--r--board/freescale/m547xevb/m547xevb.c1
-rw-r--r--board/freescale/m548xevb/m548xevb.c1
-rw-r--r--board/freescale/mpc8308rdb/mpc8308rdb.c2
-rw-r--r--board/freescale/mpc8313erdb/sdram.c2
-rw-r--r--board/freescale/mpc8315erdb/mpc8315erdb.c2
-rw-r--r--board/freescale/mpc8315erdb/sdram.c2
-rw-r--r--board/freescale/mpc8323erdb/mpc8323erdb.c1
-rw-r--r--board/freescale/mpc832xemds/mpc832xemds.c1
-rw-r--r--board/freescale/mpc832xemds/pci.c1
-rw-r--r--board/freescale/mpc8349emds/mpc8349emds.c3
-rw-r--r--board/freescale/mpc8349emds/pci.c1
-rw-r--r--board/freescale/mpc8349itx/mpc8349itx.c4
-rw-r--r--board/freescale/mpc8349itx/pci.c1
-rw-r--r--board/freescale/mpc837xemds/mpc837xemds.c3
-rw-r--r--board/freescale/mpc837xemds/pci.c1
-rw-r--r--board/freescale/mpc837xerdb/mpc837xerdb.c2
-rw-r--r--board/freescale/mpc837xerdb/pci.c1
-rw-r--r--board/freescale/mpc8536ds/mpc8536ds.c3
-rw-r--r--board/freescale/mpc8541cds/mpc8541cds.c1
-rw-r--r--board/freescale/mpc8544ds/mpc8544ds.c1
-rw-r--r--board/freescale/mpc8548cds/mpc8548cds.c2
-rw-r--r--board/freescale/mpc8555cds/mpc8555cds.c1
-rw-r--r--board/freescale/mpc8568mds/bcsr.c1
-rw-r--r--board/freescale/mpc8568mds/mpc8568mds.c5
-rw-r--r--board/freescale/mpc8569mds/bcsr.c1
-rw-r--r--board/freescale/mpc8569mds/mpc8569mds.c3
-rw-r--r--board/freescale/mpc8572ds/mpc8572ds.c4
-rw-r--r--board/freescale/mpc8610hpcd/mpc8610hpcd.c3
-rw-r--r--board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c1
-rw-r--r--board/freescale/mpc8641hpcn/mpc8641hpcn.c3
-rw-r--r--board/freescale/mx23evk/mx23evk.c1
-rw-r--r--board/freescale/mx25pdk/mx25pdk.c1
-rw-r--r--board/freescale/mx28evk/mx28evk.c3
-rw-r--r--board/freescale/mx31pdk/mx31pdk.c1
-rw-r--r--board/freescale/mx35pdk/mx35pdk.c2
-rw-r--r--board/freescale/mx51evk/mx51evk.c1
-rw-r--r--board/freescale/mx53ard/mx53ard.c1
-rw-r--r--board/freescale/mx53loco/mx53loco.c1
-rw-r--r--board/freescale/mx6memcal/mx6memcal.c1
-rw-r--r--board/freescale/mx6memcal/spl.c1
-rw-r--r--board/freescale/mx6qarm2/mx6qarm2.c2
-rw-r--r--board/freescale/mx6sabreauto/mx6sabreauto.c2
-rw-r--r--board/freescale/mx6sabresd/mx6sabresd.c2
-rw-r--r--board/freescale/mx6slevk/mx6slevk.c2
-rw-r--r--board/freescale/mx6sxsabreauto/mx6sxsabreauto.c2
-rw-r--r--board/freescale/mx6sxsabresd/mx6sxsabresd.c2
-rw-r--r--board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c2
-rw-r--r--board/freescale/mx7dsabresd/mx7dsabresd.c2
-rw-r--r--board/freescale/mx7ulp_evk/mx7ulp_evk.c1
-rw-r--r--board/freescale/p1010rdb/p1010rdb.c7
-rw-r--r--board/freescale/p1022ds/diu.c1
-rw-r--r--board/freescale/p1022ds/p1022ds.c3
-rw-r--r--board/freescale/p1023rdb/p1023rdb.c2
-rw-r--r--board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c3
-rw-r--r--board/freescale/p1_twr/p1_twr.c2
-rw-r--r--board/freescale/p2041rdb/cpld.c2
-rw-r--r--board/freescale/p2041rdb/ddr.c2
-rw-r--r--board/freescale/p2041rdb/eth.c1
-rw-r--r--board/freescale/p2041rdb/p2041rdb.c1
-rw-r--r--board/freescale/qemu-ppce500/qemu-ppce500.c2
-rw-r--r--board/freescale/t102xqds/ddr.c3
-rw-r--r--board/freescale/t102xqds/eth_t102xqds.c3
-rw-r--r--board/freescale/t102xqds/t102xqds.c2
-rw-r--r--board/freescale/t102xrdb/cpld.c2
-rw-r--r--board/freescale/t102xrdb/ddr.c3
-rw-r--r--board/freescale/t102xrdb/eth_t102xrdb.c2
-rw-r--r--board/freescale/t102xrdb/t102xrdb.c5
-rw-r--r--board/freescale/t1040qds/ddr.c3
-rw-r--r--board/freescale/t1040qds/eth.c2
-rw-r--r--board/freescale/t1040qds/t1040qds.c1
-rw-r--r--board/freescale/t104xrdb/cpld.c2
-rw-r--r--board/freescale/t104xrdb/ddr.c3
-rw-r--r--board/freescale/t104xrdb/eth.c1
-rw-r--r--board/freescale/t104xrdb/t104xrdb.c2
-rw-r--r--board/freescale/t208xqds/ddr.c2
-rw-r--r--board/freescale/t208xqds/eth_t208xqds.c4
-rw-r--r--board/freescale/t208xqds/t208xqds.c2
-rw-r--r--board/freescale/t208xrdb/cpld.c2
-rw-r--r--board/freescale/t208xrdb/ddr.c2
-rw-r--r--board/freescale/t208xrdb/eth_t208xrdb.c2
-rw-r--r--board/freescale/t208xrdb/t208xrdb.c1
-rw-r--r--board/freescale/t4qds/ddr.c2
-rw-r--r--board/freescale/t4qds/eth.c4
-rw-r--r--board/freescale/t4qds/t4240emu.c1
-rw-r--r--board/freescale/t4qds/t4240qds.c7
-rw-r--r--board/freescale/t4rdb/cpld.c2
-rw-r--r--board/freescale/t4rdb/ddr.c2
-rw-r--r--board/freescale/t4rdb/eth.c2
-rw-r--r--board/freescale/t4rdb/t4240rdb.c1
-rw-r--r--board/gardena/smart-gateway-mt7688/board.c7
-rw-r--r--board/gateworks/gw_ventana/common.c3
-rw-r--r--board/gateworks/gw_ventana/eeprom.c6
-rw-r--r--board/gateworks/gw_ventana/gsc.c13
-rw-r--r--board/gateworks/gw_ventana/gw_ventana.c5
-rw-r--r--board/gateworks/gw_ventana/gw_ventana_spl.c2
-rw-r--r--board/gdsys/a38x/controlcenterdc.c3
-rw-r--r--board/gdsys/a38x/hre.c1
-rw-r--r--board/gdsys/a38x/hydra.c3
-rw-r--r--board/gdsys/a38x/ihs_phys.c2
-rw-r--r--board/gdsys/common/cmd_ioloop.c12
-rw-r--r--board/gdsys/common/ihs_mdio.c1
-rw-r--r--board/gdsys/common/ioep-fpga.c2
-rw-r--r--board/gdsys/common/mclink.c1
-rw-r--r--board/gdsys/common/osd.c11
-rw-r--r--board/gdsys/common/osd_cmd.c13
-rw-r--r--board/gdsys/common/phy.c1
-rw-r--r--board/gdsys/mpc8308/gazerbeam.c1
-rw-r--r--board/gdsys/mpc8308/hrcon.c3
-rw-r--r--board/gdsys/mpc8308/mpc8308.c1
-rw-r--r--board/gdsys/mpc8308/strider.c3
-rw-r--r--board/gdsys/p1022/controlcenterd-id.c3
-rw-r--r--board/gdsys/p1022/controlcenterd.c5
-rw-r--r--board/gdsys/p1022/ddr.c1
-rw-r--r--board/gdsys/p1022/diu.c1
-rw-r--r--board/ge/bx50v3/bx50v3.c2
-rw-r--r--board/google/chromebook_coral/coral.c1
-rw-r--r--board/google/gru/gru.c1
-rw-r--r--board/google/imx8mq_phanbell/spl.c3
-rw-r--r--board/google/veyron/veyron.c3
-rw-r--r--board/grinn/chiliboard/board.c1
-rw-r--r--board/grinn/liteboard/board.c1
-rw-r--r--board/gumstix/duovero/duovero.c3
-rw-r--r--board/gumstix/pepper/board.c2
-rw-r--r--board/highbank/ahci.c1
-rw-r--r--board/highbank/highbank.c3
-rw-r--r--board/hisilicon/hikey/hikey.c3
-rw-r--r--board/hisilicon/hikey960/hikey960.c3
-rw-r--r--board/hisilicon/poplar/poplar.c3
-rw-r--r--board/ids/ids8313/ids8313.c2
-rw-r--r--board/imgtec/boston/checkboard.c1
-rw-r--r--board/imgtec/ci20/ci20.c3
-rw-r--r--board/imgtec/malta/malta.c2
-rw-r--r--board/imgtec/xilfpga/xilfpga.c1
-rw-r--r--board/intel/cougarcanyon2/cougarcanyon2.c1
-rw-r--r--board/intel/crownbay/crownbay.c1
-rw-r--r--board/intel/minnowmax/minnowmax.c2
-rw-r--r--board/inversepath/usbarmory/usbarmory.c1
-rw-r--r--board/iomega/iconnect/iconnect.c1
-rw-r--r--board/isee/igep003x/board.c1
-rw-r--r--board/isee/igep00x0/common.c1
-rw-r--r--board/isee/igep00x0/igep00x0.c3
-rw-r--r--board/k+p/kp_imx53/kp_id_rev.c1
-rw-r--r--board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c3
-rw-r--r--board/keymile/common/common.c13
-rw-r--r--board/keymile/common/qrio.c1
-rw-r--r--board/keymile/km83xx/km83xx.c2
-rw-r--r--board/keymile/km83xx/km83xx_i2c.c1
-rw-r--r--board/keymile/km_arm/fpga_config.c1
-rw-r--r--board/keymile/kmp204x/ddr.c2
-rw-r--r--board/keymile/kmp204x/eth.c1
-rw-r--r--board/keymile/kmp204x/kmp204x.c1
-rw-r--r--board/keymile/kmp204x/pci.c1
-rw-r--r--board/kmc/kzm9g/kzm9g.c2
-rw-r--r--board/kobol/helios4/helios4.c2
-rw-r--r--board/kosagi/novena/novena.c1
-rw-r--r--board/kosagi/novena/novena_spl.c1
-rw-r--r--board/kosagi/novena/video.c2
-rw-r--r--board/lego/ev3/legoev3.c1
-rw-r--r--board/lg/sniper/sniper.c1
-rw-r--r--board/liebherr/display5/display5.c4
-rw-r--r--board/liebherr/display5/spl.c4
-rw-r--r--board/liebherr/mccmon6/spl.c3
-rw-r--r--board/liebherr/xea/xea.c5
-rw-r--r--board/logicpd/am3517evm/am3517evm.c2
-rw-r--r--board/logicpd/omap3som/omap3logic.c1
-rw-r--r--board/logicpd/zoom1/zoom1.c2
-rw-r--r--board/maxbcm/maxbcm.c1
-rw-r--r--board/mediatek/mt7622/mt7622_rfb.c2
-rw-r--r--board/mediatek/mt8512/mt8512.c1
-rw-r--r--board/mediatek/mt8518/mt8518_ap1.c2
-rw-r--r--board/menlo/m53menlo/m53menlo.c1
-rw-r--r--board/microchip/mpfs_icicle/mpfs_icicle.c1
-rw-r--r--board/microchip/pic32mzda/pic32mzda.c1
-rw-r--r--board/mikrotik/crs305-1g-4s/crs305-1g-4s.c2
-rw-r--r--board/mpc8308_p1m/mpc8308_p1m.c2
-rw-r--r--board/mscc/common/spi.c1
-rw-r--r--board/mscc/jr2/jr2.c3
-rw-r--r--board/mscc/luton/luton.c1
-rw-r--r--board/mscc/ocelot/ocelot.c3
-rw-r--r--board/mscc/serval/serval.c1
-rw-r--r--board/mscc/servalt/servalt.c1
-rw-r--r--board/netgear/dgnd3700v2/dgnd3700v2.c2
-rw-r--r--board/nokia/rx51/rx51.c1
-rw-r--r--board/novtech/meerkat96/meerkat96.c1
-rw-r--r--board/nvidia/cardhu/cardhu.c2
-rw-r--r--board/nvidia/dalmore/dalmore.c1
-rw-r--r--board/nvidia/e2220-1170/e2220-1170.c1
-rw-r--r--board/nvidia/jetson-tk1/jetson-tk1.c1
-rw-r--r--board/nvidia/nyan-big/nyan-big.c2
-rw-r--r--board/nvidia/p2371-0000/p2371-0000.c1
-rw-r--r--board/nvidia/p2371-2180/p2371-2180.c3
-rw-r--r--board/nvidia/p2571/p2571.c1
-rw-r--r--board/nvidia/p2771-0000/p2771-0000.c2
-rw-r--r--board/nvidia/p3450-0000/p3450-0000.c1
-rw-r--r--board/nvidia/venice2/as3722_init.c2
-rw-r--r--board/olimex/mx23_olinuxino/mx23_olinuxino.c2
-rw-r--r--board/overo/overo.c3
-rw-r--r--board/overo/spl.c2
-rw-r--r--board/pandora/pandora.c2
-rw-r--r--board/phytec/pcl063/spl.c1
-rw-r--r--board/phytec/pcm051/board.c2
-rw-r--r--board/phytec/pcm052/pcm052.c1
-rw-r--r--board/phytec/pcm058/pcm058.c2
-rw-r--r--board/phytec/pfla02/pfla02.c3
-rw-r--r--board/phytec/phycore_rk3288/phycore-rk3288.c3
-rw-r--r--board/phytium/durian/durian.c4
-rw-r--r--board/pine64/rockpro64_rk3399/rockpro64-rk3399.c1
-rw-r--r--board/ppcag/bg0900/bg0900.c3
-rw-r--r--board/qca/ap121/ap121.c1
-rw-r--r--board/qca/ap143/ap143.c1
-rw-r--r--board/qca/ap152/ap152.c1
-rw-r--r--board/qemu-mips/qemu-mips.c2
-rw-r--r--board/qualcomm/dragonboard410c/dragonboard410c.c3
-rw-r--r--board/qualcomm/dragonboard820c/dragonboard820c.c2
-rw-r--r--board/raidsonic/ib62x0/ib62x0.c1
-rw-r--r--board/renesas/MigoR/migo_r.c2
-rw-r--r--board/renesas/alt/alt.c3
-rw-r--r--board/renesas/alt/alt_spl.c2
-rw-r--r--board/renesas/blanche/blanche.c3
-rw-r--r--board/renesas/condor/condor.c1
-rw-r--r--board/renesas/draak/draak.c2
-rw-r--r--board/renesas/eagle/eagle.c1
-rw-r--r--board/renesas/ebisu/ebisu.c1
-rw-r--r--board/renesas/gose/gose.c3
-rw-r--r--board/renesas/gose/gose_spl.c2
-rw-r--r--board/renesas/grpeach/grpeach.c1
-rw-r--r--board/renesas/koelsch/koelsch.c3
-rw-r--r--board/renesas/koelsch/koelsch_spl.c2
-rw-r--r--board/renesas/lager/lager.c3
-rw-r--r--board/renesas/lager/lager_spl.c2
-rw-r--r--board/renesas/porter/porter.c3
-rw-r--r--board/renesas/porter/porter_spl.c2
-rw-r--r--board/renesas/r2dplus/r2dplus.c1
-rw-r--r--board/renesas/r7780mp/r7780mp.c1
-rw-r--r--board/renesas/rcar-common/common.c2
-rw-r--r--board/renesas/rcar-common/gen3-spl.c4
-rw-r--r--board/renesas/salvator-x/salvator-x.c3
-rw-r--r--board/renesas/sh7752evb/sh7752evb.c6
-rw-r--r--board/renesas/sh7753evb/sh7753evb.c6
-rw-r--r--board/renesas/sh7757lcr/sh7757lcr.c7
-rw-r--r--board/renesas/sh7763rdp/sh7763rdp.c1
-rw-r--r--board/renesas/silk/silk.c3
-rw-r--r--board/renesas/silk/silk_spl.c2
-rw-r--r--board/renesas/stout/cpld.c4
-rw-r--r--board/renesas/stout/stout.c3
-rw-r--r--board/renesas/stout/stout_spl.c2
-rw-r--r--board/renesas/ulcb/cpld.c4
-rw-r--r--board/renesas/ulcb/ulcb.c3
-rw-r--r--board/rockchip/evb_rk3399/evb-rk3399.c2
-rw-r--r--board/rockchip/evb_rv1108/evb_rv1108.c1
-rw-r--r--board/rockchip/kylin_rk3036/kylin_rk3036.c1
-rw-r--r--board/rockchip/tinker_rk3288/tinker-rk3288.c1
-rw-r--r--board/samsung/arndale/arndale.c1
-rw-r--r--board/samsung/common/board.c4
-rw-r--r--board/samsung/common/exynos5-dt-types.c1
-rw-r--r--board/samsung/common/exynos5-dt.c1
-rw-r--r--board/samsung/common/misc.c3
-rw-r--r--board/samsung/goni/goni.c3
-rw-r--r--board/samsung/odroid/odroid.c1
-rw-r--r--board/samsung/smdkc100/smdkc100.c1
-rw-r--r--board/samsung/smdkv310/smdkv310.c2
-rw-r--r--board/samsung/trats/trats.c2
-rw-r--r--board/samsung/trats2/trats2.c2
-rw-r--r--board/samsung/universal_c210/universal.c2
-rw-r--r--board/sandisk/sansa_fuze_plus/sfp.c3
-rw-r--r--board/sbc8349/pci.c1
-rw-r--r--board/sbc8349/sbc8349.c3
-rw-r--r--board/sbc8548/ddr.c1
-rw-r--r--board/sbc8548/sbc8548.c3
-rw-r--r--board/sbc8641d/sbc8641d.c12
-rw-r--r--board/schulercontrol/sc_sps_1/sc_sps_1.c2
-rw-r--r--board/seco/mx6quq7/mx6quq7.c2
-rw-r--r--board/seeed/linkit-smart-7688/board.c2
-rw-r--r--board/siemens/capricorn/board.c9
-rw-r--r--board/siemens/capricorn/spl.c1
-rw-r--r--board/siemens/common/board.c10
-rw-r--r--board/siemens/common/factoryset.c1
-rw-r--r--board/siemens/corvus/board.c1
-rw-r--r--board/siemens/draco/board.c7
-rw-r--r--board/siemens/pxm2/board.c2
-rw-r--r--board/siemens/rut/board.c2
-rw-r--r--board/siemens/smartweb/smartweb.c1
-rw-r--r--board/siemens/taurus/taurus.c5
-rw-r--r--board/sifive/fu540/fu540.c3
-rw-r--r--board/silica/pengwyn/board.c2
-rw-r--r--board/sks-kinkel/sksimx6/sksimx6.c5
-rw-r--r--board/socrates/sdram.c1
-rw-r--r--board/socrates/socrates.c30
-rw-r--r--board/softing/vining_2000/vining_2000.c3
-rw-r--r--board/softing/vining_fpga/socfpga.c2
-rw-r--r--board/solidrun/clearfog/clearfog.c5
-rw-r--r--board/solidrun/mx6cuboxi/mx6cuboxi.c5
-rw-r--r--board/spear/spear300/spear300.c1
-rw-r--r--board/spear/spear310/spear310.c1
-rw-r--r--board/spear/spear320/spear320.c1
-rw-r--r--board/spear/spear600/spear600.c1
-rw-r--r--board/spear/x600/fpga.c2
-rw-r--r--board/spear/x600/x600.c2
-rw-r--r--board/sr1500/socfpga.c2
-rw-r--r--board/st/common/cmd_stboard.c5
-rw-r--r--board/st/common/stm32mp_dfu.c2
-rw-r--r--board/st/stih410-b2260/board.c2
-rw-r--r--board/st/stm32f429-discovery/stm32f429-discovery.c3
-rw-r--r--board/st/stm32f429-evaluation/stm32f429-evaluation.c3
-rw-r--r--board/st/stm32f469-discovery/stm32f469-discovery.c3
-rw-r--r--board/st/stm32f746-disco/stm32f746-disco.c2
-rw-r--r--board/st/stm32h743-disco/stm32h743-disco.c1
-rw-r--r--board/st/stm32h743-eval/stm32h743-eval.c1
-rw-r--r--board/st/stm32mp1/board.c2
-rw-r--r--board/st/stm32mp1/stm32mp1.c5
-rw-r--r--board/st/stv0991/stv0991.c3
-rw-r--r--board/ste/stemmy/stemmy.c1
-rw-r--r--board/sunxi/board.c3
-rw-r--r--board/sunxi/dram_sun4i_auto.c1
-rw-r--r--board/sunxi/dram_sun5i_auto.c1
-rw-r--r--board/synopsys/axs10x/axs10x.c2
-rw-r--r--board/synopsys/emsdp/emsdp.c13
-rw-r--r--board/synopsys/hsdk/clk-lib.c1
-rw-r--r--board/synopsys/hsdk/clk-lib.h1
-rw-r--r--board/synopsys/hsdk/env-lib.c1
-rw-r--r--board/synopsys/hsdk/hsdk.c27
-rw-r--r--board/synopsys/iot_devkit/iot_devkit.c2
-rw-r--r--board/synopsys/nsim/nsim.c1
-rw-r--r--board/syteco/zmx25/zmx25.c2
-rw-r--r--board/tbs/tbs2910/tbs2910.c1
-rw-r--r--board/tcl/sl50/board.c1
-rw-r--r--board/technexion/pico-imx6/pico-imx6.c4
-rw-r--r--board/technexion/pico-imx6/spl.c4
-rw-r--r--board/technexion/pico-imx6ul/pico-imx6ul.c3
-rw-r--r--board/technexion/pico-imx7d/pico-imx7d.c1
-rw-r--r--board/technexion/pico-imx7d/spl.c2
-rw-r--r--board/technexion/pico-imx8mq/pico-imx8mq.c1
-rw-r--r--board/technexion/pico-imx8mq/spl.c3
-rw-r--r--board/technexion/tao3530/tao3530.c2
-rw-r--r--board/technologic/ts4600/ts4600.c2
-rw-r--r--board/technologic/ts4800/ts4800.c3
-rw-r--r--board/theadorable/fpga.c1
-rw-r--r--board/theadorable/theadorable.c5
-rw-r--r--board/theobroma-systems/puma_rk3399/puma-rk3399.c2
-rw-r--r--board/ti/am335x/board.c4
-rw-r--r--board/ti/am3517crane/am3517crane.c1
-rw-r--r--board/ti/am43xx/board.c2
-rw-r--r--board/ti/am57xx/board.c2
-rw-r--r--board/ti/am65x/evm.c3
-rw-r--r--board/ti/beagle/beagle.c3
-rw-r--r--board/ti/common/board_detect.c2
-rw-r--r--board/ti/common/board_detect.h1
-rw-r--r--board/ti/dra7xx/evm.c2
-rw-r--r--board/ti/evm/evm.c3
-rw-r--r--board/ti/j721e/evm.c5
-rw-r--r--board/ti/ks2_evm/board.c1
-rw-r--r--board/ti/ks2_evm/board_k2e.c2
-rw-r--r--board/ti/ks2_evm/board_k2g.c3
-rw-r--r--board/ti/ks2_evm/board_k2hk.c2
-rw-r--r--board/ti/ks2_evm/board_k2l.c2
-rw-r--r--board/ti/omap5_uevm/evm.c3
-rw-r--r--board/ti/panda/panda.c3
-rw-r--r--board/ti/sdp4430/cmd_bat.c2
-rw-r--r--board/ti/sdp4430/sdp.c2
-rw-r--r--board/ti/ti814x/evm.c2
-rw-r--r--board/ti/ti816x/evm.c2
-rw-r--r--board/timll/devkit3250/devkit3250.c1
-rw-r--r--board/timll/devkit8000/devkit8000.c1
-rw-r--r--board/toradex/apalis-tk1/apalis-tk1.c4
-rw-r--r--board/toradex/apalis-tk1/as3722_init.c2
-rw-r--r--board/toradex/apalis_imx6/apalis_imx6.c4
-rw-r--r--board/toradex/apalis_imx6/do_fuse.c9
-rw-r--r--board/toradex/apalis_imx6/pf0100.c6
-rw-r--r--board/toradex/apalis_t30/apalis_t30.c3
-rw-r--r--board/toradex/colibri-imx6ull/colibri-imx6ull.c1
-rw-r--r--board/toradex/colibri_imx6/colibri_imx6.c3
-rw-r--r--board/toradex/colibri_imx6/do_fuse.c9
-rw-r--r--board/toradex/colibri_imx6/pf0100.c6
-rw-r--r--board/toradex/colibri_imx7/colibri_imx7.c2
-rw-r--r--board/toradex/colibri_pxa270/colibri_pxa270.c3
-rw-r--r--board/toradex/colibri_t20/colibri_t20.c3
-rw-r--r--board/toradex/colibri_t30/colibri_t30.c2
-rw-r--r--board/toradex/common/tdx-cfg-block.c10
-rw-r--r--board/toradex/common/tdx-common.c1
-rw-r--r--board/toradex/verdin-imx8mm/spl.c4
-rw-r--r--board/toradex/verdin-imx8mm/verdin-imx8mm.c1
-rw-r--r--board/tplink/wdr4300/wdr4300.c3
-rw-r--r--board/tqc/tqm834x/pci.c1
-rw-r--r--board/tqc/tqm834x/tqm834x.c2
-rw-r--r--board/tqc/tqma6/tqma6.c1
-rw-r--r--board/tqc/tqma6/tqma6_mba6.c2
-rw-r--r--board/tqc/tqma6/tqma6_wru4.c2
-rw-r--r--board/udoo/neo/neo.c2
-rw-r--r--board/udoo/udoo.c2
-rw-r--r--board/udoo/udoo_spl.c3
-rw-r--r--board/variscite/dart_6ul/dart_6ul.c2
-rw-r--r--board/variscite/dart_6ul/spl.c1
-rw-r--r--board/varisys/common/sys_eeprom.c3
-rw-r--r--board/varisys/cyrus/cyrus.c1
-rw-r--r--board/varisys/cyrus/ddr.c2
-rw-r--r--board/varisys/cyrus/eth.c1
-rw-r--r--board/ve8313/ve8313.c1
-rw-r--r--board/vscom/baltos/board.c1
-rw-r--r--board/wandboard/spl.c3
-rw-r--r--board/wandboard/wandboard.c4
-rw-r--r--board/warp7/warp7.c1
-rw-r--r--board/work-microwave/work_92105/work_92105.c1
-rw-r--r--board/work-microwave/work_92105/work_92105_display.c8
-rw-r--r--board/xes/common/board.c1
-rw-r--r--board/xes/xpedite517x/ddr.c1
-rw-r--r--board/xes/xpedite537x/ddr.c1
-rw-r--r--board/xilinx/common/board.c2
-rw-r--r--board/xilinx/microblaze-generic/microblaze-generic.c2
-rw-r--r--board/xilinx/versal/board.c3
-rw-r--r--board/xilinx/zynq/bootimg.c2
-rw-r--r--board/xilinx/zynq/cmds.c18
-rw-r--r--board/xilinx/zynqmp/cmds.c23
-rw-r--r--board/xilinx/zynqmp/tap_delays.c1
-rw-r--r--board/xilinx/zynqmp/xil_io.h1
-rw-r--r--board/xilinx/zynqmp/zynqmp.c10
-rw-r--r--board/xilinx/zynqmp_r5/board.c1
-rw-r--r--board/zyxel/nsa310s/nsa310s.c1
-rw-r--r--cmd/ab_select.c9
-rw-r--r--cmd/abootimg.c32
-rw-r--r--cmd/acpi.c4
-rw-r--r--cmd/adc.c8
-rw-r--r--cmd/adtimg.c26
-rw-r--r--cmd/aes.c2
-rw-r--r--cmd/arm/exception.c14
-rw-r--r--cmd/arm/exception64.c6
-rw-r--r--cmd/armflash.c3
-rw-r--r--cmd/avb.c40
-rw-r--r--cmd/axi.c23
-rw-r--r--cmd/bcb.c36
-rw-r--r--cmd/bdinfo.c30
-rw-r--r--cmd/bedbug.c25
-rw-r--r--cmd/bind.c5
-rw-r--r--cmd/binop.c3
-rw-r--r--cmd/blk_common.c3
-rw-r--r--cmd/blkcache.c17
-rw-r--r--cmd/blob.c3
-rw-r--r--cmd/bmp.c13
-rw-r--r--cmd/boot.c4
-rw-r--r--cmd/bootcount.c16
-rw-r--r--cmd/bootefi.c4
-rw-r--r--cmd/booti.c7
-rw-r--r--cmd/bootm.c23
-rw-r--r--cmd/bootmenu.c4
-rw-r--r--cmd/bootstage.c20
-rw-r--r--cmd/bootz.c7
-rw-r--r--cmd/btrfs.c2
-rw-r--r--cmd/cache.c6
-rw-r--r--cmd/cbfs.c8
-rw-r--r--cmd/clk.c8
-rw-r--r--cmd/cls.c2
-rw-r--r--cmd/config.c3
-rw-r--r--cmd/conitrace.c5
-rw-r--r--cmd/console.c3
-rw-r--r--cmd/cpu.c12
-rw-r--r--cmd/cramfs.c5
-rw-r--r--cmd/cros_ec.c9
-rw-r--r--cmd/dataflash_mmc_mux.c3
-rw-r--r--cmd/date.c3
-rw-r--r--cmd/demo.c22
-rw-r--r--cmd/dfu.c3
-rw-r--r--cmd/diag.c2
-rw-r--r--cmd/disk.c6
-rw-r--r--cmd/dm.c22
-rw-r--r--cmd/echo.c3
-rw-r--r--cmd/eeprom.c5
-rw-r--r--cmd/efi.c10
-rw-r--r--cmd/efidebug.c71
-rw-r--r--cmd/elf.c8
-rw-r--r--cmd/ethsw.c6
-rw-r--r--cmd/exit.c3
-rw-r--r--cmd/ext2.c7
-rw-r--r--cmd/ext4.c10
-rw-r--r--cmd/fastboot.c4
-rw-r--r--cmd/fat.c29
-rw-r--r--cmd/fdt.c5
-rw-r--r--cmd/fitupd.c3
-rw-r--r--cmd/flash.c52
-rw-r--r--cmd/fpga.c43
-rw-r--r--cmd/fpgad.c2
-rw-r--r--cmd/fs.c23
-rw-r--r--cmd/fs_uuid.c4
-rw-r--r--cmd/fuse.c3
-rw-r--r--cmd/gettime.c4
-rw-r--r--cmd/gpio.c4
-rw-r--r--cmd/gpt.c23
-rw-r--r--cmd/hash.c3
-rw-r--r--cmd/help.c9
-rw-r--r--cmd/host.c37
-rw-r--r--cmd/i2c.c63
-rw-r--r--cmd/ide.c4
-rw-r--r--cmd/ini.c2
-rw-r--r--cmd/io.c4
-rw-r--r--cmd/iotrace.c6
-rw-r--r--cmd/irq.c6
-rw-r--r--cmd/itest.c3
-rw-r--r--cmd/jffs2.c10
-rw-r--r--cmd/led.c2
-rw-r--r--cmd/legacy_led.c2
-rw-r--r--cmd/license.c3
-rw-r--r--cmd/load.c13
-rw-r--r--cmd/log.c17
-rw-r--r--cmd/lzmadec.c3
-rw-r--r--cmd/mac.c3
-rw-r--r--cmd/md5sum.c6
-rw-r--r--cmd/mdio.c3
-rw-r--r--cmd/mem.c68
-rw-r--r--cmd/mfsl.c6
-rw-r--r--cmd/mii.c2
-rw-r--r--cmd/misc.c7
-rw-r--r--cmd/mmc.c113
-rw-r--r--cmd/mp.c2
-rw-r--r--cmd/mtd.c17
-rw-r--r--cmd/mtdparts.c8
-rw-r--r--cmd/mvebu/bubt.c4
-rw-r--r--cmd/nand.c13
-rw-r--r--cmd/net.c39
-rw-r--r--cmd/nvedit.c65
-rw-r--r--cmd/nvedit_efi.c13
-rw-r--r--cmd/nvme.c4
-rw-r--r--cmd/onenand.c33
-rw-r--r--cmd/osd.c27
-rw-r--r--cmd/part.c21
-rw-r--r--cmd/pcap.c20
-rw-r--r--cmd/pci.c3
-rw-r--r--cmd/pinmux.c17
-rw-r--r--cmd/pmc.c12
-rw-r--r--cmd/pmic.c23
-rw-r--r--cmd/pxe.c19
-rw-r--r--cmd/pxe_utils.c30
-rw-r--r--cmd/pxe_utils.h10
-rw-r--r--cmd/qfw.c19
-rw-r--r--cmd/read.c4
-rw-r--r--cmd/reginfo.c4
-rw-r--r--cmd/regulator.c35
-rw-r--r--cmd/reiser.c8
-rw-r--r--cmd/remoteproc.c14
-rw-r--r--cmd/riscv/exception.c6
-rw-r--r--cmd/rng.c2
-rw-r--r--cmd/rockusb.c3
-rw-r--r--cmd/sata.c4
-rw-r--r--cmd/sb.c13
-rw-r--r--cmd/scsi.c7
-rw-r--r--cmd/setexpr.c4
-rw-r--r--cmd/sf.c18
-rw-r--r--cmd/sha1sum.c2
-rw-r--r--cmd/smccc.c3
-rw-r--r--cmd/sound.c13
-rw-r--r--cmd/source.c14
-rw-r--r--cmd/spi.c2
-rw-r--r--cmd/spl.c17
-rw-r--r--cmd/strings.c2
-rw-r--r--cmd/sysboot.c12
-rw-r--r--cmd/terminal.c2
-rw-r--r--cmd/test.c10
-rw-r--r--cmd/thordown.c3
-rw-r--r--cmd/ti/ddr3.c6
-rw-r--r--cmd/time.c3
-rw-r--r--cmd/tlv_eeprom.c4
-rw-r--r--cmd/tpm-common.c10
-rw-r--r--cmd/tpm-user-utils.h9
-rw-r--r--cmd/tpm-v1.c85
-rw-r--r--cmd/tpm-v2.c43
-rw-r--r--cmd/tpm_test.c12
-rw-r--r--cmd/trace.c8
-rw-r--r--cmd/tsi148.c3
-rw-r--r--cmd/ubi.c2
-rw-r--r--cmd/ubifs.c18
-rw-r--r--cmd/ufs.c2
-rw-r--r--cmd/universe.c2
-rw-r--r--cmd/unlz4.c3
-rw-r--r--cmd/unzip.c8
-rw-r--r--cmd/usb.c7
-rw-r--r--cmd/usb_gadget_sdp.c3
-rw-r--r--cmd/usb_mass_storage.c10
-rw-r--r--cmd/version.c3
-rw-r--r--cmd/virtio.c4
-rw-r--r--cmd/w1.c2
-rw-r--r--cmd/wdt.c12
-rw-r--r--cmd/wol.c2
-rw-r--r--cmd/x86/exception.c6
-rw-r--r--cmd/x86/fsp.c8
-rw-r--r--cmd/x86/hob.c3
-rw-r--r--cmd/x86/mtrr.c6
-rw-r--r--cmd/ximg.c3
-rw-r--r--cmd/yaffs2.c28
-rw-r--r--cmd/zfs.c11
-rw-r--r--cmd/zip.c2
-rw-r--r--common/android_ab.c11
-rw-r--r--common/autoboot.c2
-rw-r--r--common/bedbug.c1
-rw-r--r--common/board_f.c7
-rw-r--r--common/board_info.c1
-rw-r--r--common/board_r.c12
-rw-r--r--common/boot_fit.c1
-rw-r--r--common/bootm.c30
-rw-r--r--common/bootm_os.c50
-rw-r--r--common/bootstage.c2
-rw-r--r--common/bouncebuf.c2
-rw-r--r--common/cli.c5
-rw-r--r--common/cli_hush.c4
-rw-r--r--common/cli_readline.c1
-rw-r--r--common/cli_simple.c1
-rw-r--r--common/command.c76
-rw-r--r--common/common_fit.c1
-rw-r--r--common/console.c1
-rw-r--r--common/cros_ec.c1
-rw-r--r--common/dfu.c2
-rw-r--r--common/dlmalloc.c1
-rw-r--r--common/edid.c1
-rw-r--r--common/exports.c1
-rw-r--r--common/fdt_region.c1
-rw-r--r--common/fdt_support.c2
-rw-r--r--common/flash.c24
-rw-r--r--common/hash.c8
-rw-r--r--common/hwconfig.c1
-rw-r--r--common/image-cipher.c2
-rw-r--r--common/image-fdt.c6
-rw-r--r--common/image-fit-sig.c1
-rw-r--r--common/image-fit.c2
-rw-r--r--common/image-sig.c3
-rw-r--r--common/image.c17
-rw-r--r--common/init/board_init.c2
-rw-r--r--common/iotrace.c1
-rw-r--r--common/kgdb.c3
-rw-r--r--common/kgdb_stubs.c1
-rw-r--r--common/lcd.c3
-rw-r--r--common/lcd_console.c6
-rw-r--r--common/log_syslog.c1
-rw-r--r--common/main.c2
-rw-r--r--common/malloc_simple.c1
-rw-r--r--common/miiphyutil.c2
-rw-r--r--common/spl/spl.c7
-rw-r--r--common/spl/spl_atf.c3
-rw-r--r--common/spl/spl_ext.c5
-rw-r--r--common/spl/spl_fat.c1
-rw-r--r--common/spl/spl_fit.c2
-rw-r--r--common/spl/spl_legacy.c2
-rw-r--r--common/spl/spl_mmc.c4
-rw-r--r--common/spl/spl_nand.c3
-rw-r--r--common/spl/spl_net.c2
-rw-r--r--common/spl/spl_nor.c2
-rw-r--r--common/spl/spl_onenand.c2
-rw-r--r--common/spl/spl_opensbi.c2
-rw-r--r--common/spl/spl_ram.c2
-rw-r--r--common/spl/spl_sdp.c1
-rw-r--r--common/spl/spl_spi.c2
-rw-r--r--common/spl/spl_ubi.c1
-rw-r--r--common/spl/spl_usb.c1
-rw-r--r--common/spl/spl_xip.c2
-rw-r--r--common/spl/spl_ymodem.c2
-rw-r--r--common/splash_source.c1
-rw-r--r--common/stdio.c1
-rw-r--r--common/usb.c2
-rw-r--r--common/usb_hub.c2
-rw-r--r--common/usb_kbd.c1
-rw-r--r--common/usb_storage.c4
-rw-r--r--disk/part.c19
-rw-r--r--disk/part_amiga.c3
-rw-r--r--disk/part_dos.c6
-rw-r--r--disk/part_efi.c15
-rw-r--r--disk/part_iso.c11
-rw-r--r--disk/part_mac.c4
-rw-r--r--doc/README.commands12
-rw-r--r--doc/README.standalone2
-rw-r--r--drivers/adc/adc-uclass.c1
-rw-r--r--drivers/adc/meson-saradc.c2
-rw-r--r--drivers/adc/rockchip-saradc.c1
-rw-r--r--drivers/adc/stm32-adc-core.c1
-rw-r--r--drivers/adc/stm32-adc.c2
-rw-r--r--drivers/ata/ahci.c4
-rw-r--r--drivers/ata/ahci_mvebu.c1
-rw-r--r--drivers/ata/ahci_sunxi.c2
-rw-r--r--drivers/ata/dwc_ahsata.c5
-rw-r--r--drivers/ata/fsl_sata.c3
-rw-r--r--drivers/ata/mvsata_ide.c1
-rw-r--r--drivers/ata/sata.c2
-rw-r--r--drivers/ata/sata_ceva.c1
-rw-r--r--drivers/ata/sata_mv.c5
-rw-r--r--drivers/ata/sata_sandbox.c1
-rw-r--r--drivers/ata/sata_sil.c2
-rw-r--r--drivers/ata/sata_sil3114.c20
-rw-r--r--drivers/axi/axi-emul-uclass.c1
-rw-r--r--drivers/axi/ihs_axi.c3
-rw-r--r--drivers/axi/sandbox_store.c1
-rw-r--r--drivers/bios_emulator/atibios.c2
-rw-r--r--drivers/block/blk-uclass.c2
-rw-r--r--drivers/block/blk_legacy.c2
-rw-r--r--drivers/block/blkcache.c3
-rw-r--r--drivers/block/ide.c4
-rw-r--r--drivers/board/gazerbeam.c1
-rw-r--r--drivers/bootcount/bootcount-uclass.c1
-rw-r--r--drivers/bootcount/bootcount.c1
-rw-r--r--drivers/bootcount/bootcount_ram.c1
-rw-r--r--drivers/bootcount/i2c-eeprom.c1
-rw-r--r--drivers/bootcount/rtc.c1
-rw-r--r--drivers/cache/cache-ncore.c1
-rw-r--r--drivers/cache/cache-v5l2.c1
-rw-r--r--drivers/clk/altera/clk-agilex.c2
-rw-r--r--drivers/clk/altera/clk-agilex.h4
-rw-r--r--drivers/clk/altera/clk-arria10.c1
-rw-r--r--drivers/clk/aspeed/clk_ast2500.c2
-rw-r--r--drivers/clk/at91/clk-generated.c1
-rw-r--r--drivers/clk/at91/clk-system.c1
-rw-r--r--drivers/clk/at91/clk-usb.c1
-rw-r--r--drivers/clk/at91/pmc.c1
-rw-r--r--drivers/clk/clk-cdce9xx.c1
-rw-r--r--drivers/clk/clk-divider.c1
-rw-r--r--drivers/clk/clk-gate.c1
-rw-r--r--drivers/clk/clk-hsdk-cgu.c4
-rw-r--r--drivers/clk/clk-mux.c1
-rw-r--r--drivers/clk/clk-ti-sci.c1
-rw-r--r--drivers/clk/clk-uclass.c2
-rw-r--r--drivers/clk/clk.c1
-rw-r--r--drivers/clk/clk_bcm6345.c1
-rw-r--r--drivers/clk/clk_boston.c1
-rw-r--r--drivers/clk/clk_pic32.c2
-rw-r--r--drivers/clk/clk_sandbox_ccf.c1
-rw-r--r--drivers/clk/clk_stm32f.c2
-rw-r--r--drivers/clk/clk_stm32h7.c2
-rw-r--r--drivers/clk/clk_stm32mp1.c3
-rw-r--r--drivers/clk/clk_versal.c3
-rw-r--r--drivers/clk/clk_vexpress_osc.c2
-rw-r--r--drivers/clk/clk_zynq.c1
-rw-r--r--drivers/clk/clk_zynqmp.c1
-rw-r--r--drivers/clk/ics8n3qv01.c1
-rw-r--r--drivers/clk/imx/clk-composite-8m.c1
-rw-r--r--drivers/clk/imx/clk-imx6q.c1
-rw-r--r--drivers/clk/imx/clk-imx8.c1
-rw-r--r--drivers/clk/imx/clk-imx8mm.c1
-rw-r--r--drivers/clk/imx/clk-imx8mn.c1
-rw-r--r--drivers/clk/imx/clk-imx8mp.c1
-rw-r--r--drivers/clk/imx/clk-imx8qm.c1
-rw-r--r--drivers/clk/imx/clk-imx8qxp.c1
-rw-r--r--drivers/clk/imx/clk-imxrt1050.c1
-rw-r--r--drivers/clk/imx/clk-pll14xx.c2
-rw-r--r--drivers/clk/mediatek/clk-mt7622.c2
-rw-r--r--drivers/clk/mediatek/clk-mt7623.c2
-rw-r--r--drivers/clk/mediatek/clk-mt7629.c2
-rw-r--r--drivers/clk/mediatek/clk-mt8512.c1
-rw-r--r--drivers/clk/mediatek/clk-mt8516.c1
-rw-r--r--drivers/clk/mediatek/clk-mt8518.c1
-rw-r--r--drivers/clk/mediatek/clk-mtk.c2
-rw-r--r--drivers/clk/mediatek/clk-mtk.h1
-rw-r--r--drivers/clk/meson/axg.c2
-rw-r--r--drivers/clk/meson/clk_meson.h1
-rw-r--r--drivers/clk/meson/g12a.c3
-rw-r--r--drivers/clk/meson/gxbb.c2
-rw-r--r--drivers/clk/mpc83xx_clk.c6
-rw-r--r--drivers/clk/mpc83xx_clk.h1
-rw-r--r--drivers/clk/mvebu/armada-37xx-periph.c1
-rw-r--r--drivers/clk/owl/clk_owl.c2
-rw-r--r--drivers/clk/owl/clk_owl.h3
-rw-r--r--drivers/clk/renesas/clk-rcar-gen2.c1
-rw-r--r--drivers/clk/renesas/clk-rcar-gen3.c2
-rw-r--r--drivers/clk/renesas/r8a7790-cpg-mssr.c1
-rw-r--r--drivers/clk/renesas/r8a7791-cpg-mssr.c1
-rw-r--r--drivers/clk/renesas/r8a7792-cpg-mssr.c1
-rw-r--r--drivers/clk/renesas/r8a7794-cpg-mssr.c1
-rw-r--r--drivers/clk/renesas/r8a7795-cpg-mssr.c1
-rw-r--r--drivers/clk/renesas/r8a7796-cpg-mssr.c1
-rw-r--r--drivers/clk/renesas/r8a77965-cpg-mssr.c1
-rw-r--r--drivers/clk/renesas/r8a77970-cpg-mssr.c1
-rw-r--r--drivers/clk/renesas/r8a77980-cpg-mssr.c1
-rw-r--r--drivers/clk/renesas/r8a77990-cpg-mssr.c1
-rw-r--r--drivers/clk/renesas/r8a77995-cpg-mssr.c1
-rw-r--r--drivers/clk/renesas/renesas-cpg-mssr.c2
-rw-r--r--drivers/clk/renesas/renesas-cpg-mssr.h1
-rw-r--r--drivers/clk/rockchip/clk_pll.c2
-rw-r--r--drivers/clk/rockchip/clk_px30.c3
-rw-r--r--drivers/clk/rockchip/clk_rk3036.c3
-rw-r--r--drivers/clk/rockchip/clk_rk3128.c2
-rw-r--r--drivers/clk/rockchip/clk_rk3188.c3
-rw-r--r--drivers/clk/rockchip/clk_rk322x.c4
-rw-r--r--drivers/clk/rockchip/clk_rk3288.c4
-rw-r--r--drivers/clk/rockchip/clk_rk3308.c2
-rw-r--r--drivers/clk/rockchip/clk_rk3328.c3
-rw-r--r--drivers/clk/rockchip/clk_rk3368.c3
-rw-r--r--drivers/clk/rockchip/clk_rk3399.c3
-rw-r--r--drivers/clk/rockchip/clk_rv1108.c3
-rw-r--r--drivers/clk/sifive/fu540-prci.c1
-rw-r--r--drivers/clk/sunxi/clk_a10.c1
-rw-r--r--drivers/clk/sunxi/clk_a10s.c1
-rw-r--r--drivers/clk/sunxi/clk_a23.c1
-rw-r--r--drivers/clk/sunxi/clk_a31.c1
-rw-r--r--drivers/clk/sunxi/clk_a64.c1
-rw-r--r--drivers/clk/sunxi/clk_a80.c1
-rw-r--r--drivers/clk/sunxi/clk_a83t.c1
-rw-r--r--drivers/clk/sunxi/clk_h3.c1
-rw-r--r--drivers/clk/sunxi/clk_h6.c1
-rw-r--r--drivers/clk/sunxi/clk_r40.c1
-rw-r--r--drivers/clk/sunxi/clk_sunxi.c2
-rw-r--r--drivers/clk/sunxi/clk_v3s.c1
-rw-r--r--drivers/clk/tegra/tegra-car-clk.c1
-rw-r--r--drivers/clk/tegra/tegra186-clk.c1
-rw-r--r--drivers/clk/uniphier/clk-uniphier-core.c1
-rw-r--r--drivers/core/acpi.c1
-rw-r--r--drivers/core/device.c2
-rw-r--r--drivers/core/devres.c1
-rw-r--r--drivers/core/fdtaddr.c1
-rw-r--r--drivers/core/lists.c1
-rw-r--r--drivers/core/of_access.c2
-rw-r--r--drivers/core/of_addr.c2
-rw-r--r--drivers/core/of_extra.c1
-rw-r--r--drivers/core/ofnode.c1
-rw-r--r--drivers/core/regmap.c1
-rw-r--r--drivers/core/root.c1
-rw-r--r--drivers/core/syscon-uclass.c1
-rw-r--r--drivers/core/uclass.c1
-rw-r--r--drivers/cpu/bmips_cpu.c2
-rw-r--r--drivers/cpu/cpu-uclass.c1
-rw-r--r--drivers/cpu/imx8_cpu.c2
-rw-r--r--drivers/cpu/mpc83xx_cpu.c2
-rw-r--r--drivers/cpu/riscv_cpu.c2
-rw-r--r--drivers/crypto/ace_sha.c2
-rw-r--r--drivers/crypto/fsl/error.c1
-rw-r--r--drivers/crypto/fsl/fsl_blob.c2
-rw-r--r--drivers/crypto/fsl/fsl_hash.c2
-rw-r--r--drivers/crypto/fsl/fsl_rsa.c1
-rw-r--r--drivers/crypto/fsl/jobdesc.c1
-rw-r--r--drivers/crypto/fsl/jr.c3
-rw-r--r--drivers/crypto/rsa_mod_exp/mod_exp_sw.c1
-rw-r--r--drivers/ddr/altera/sdram_agilex.c1
-rw-r--r--drivers/ddr/altera/sdram_arria10.c5
-rw-r--r--drivers/ddr/altera/sdram_gen5.c2
-rw-r--r--drivers/ddr/altera/sdram_s10.c1
-rw-r--r--drivers/ddr/altera/sdram_soc64.c3
-rw-r--r--drivers/ddr/altera/sequencer.c1
-rw-r--r--drivers/ddr/fsl/arm_ddr_gen3.c2
-rw-r--r--drivers/ddr/fsl/ctrl_regs.c2
-rw-r--r--drivers/ddr/fsl/ddr1_dimm_params.c2
-rw-r--r--drivers/ddr/fsl/ddr2_dimm_params.c2
-rw-r--r--drivers/ddr/fsl/ddr3_dimm_params.c1
-rw-r--r--drivers/ddr/fsl/ddr4_dimm_params.c2
-rw-r--r--drivers/ddr/fsl/fsl_ddr_gen4.c2
-rw-r--r--drivers/ddr/fsl/fsl_mmdc.c1
-rw-r--r--drivers/ddr/fsl/interactive.c3
-rw-r--r--drivers/ddr/fsl/lc_common_dimm_params.c2
-rw-r--r--drivers/ddr/fsl/main.c3
-rw-r--r--drivers/ddr/fsl/mpc85xx_ddr_gen1.c2
-rw-r--r--drivers/ddr/fsl/mpc85xx_ddr_gen2.c1
-rw-r--r--drivers/ddr/fsl/mpc85xx_ddr_gen3.c2
-rw-r--r--drivers/ddr/fsl/mpc86xx_ddr.c2
-rw-r--r--drivers/ddr/fsl/options.c1
-rw-r--r--drivers/ddr/fsl/util.c2
-rw-r--r--drivers/ddr/imx/imx8m/ddr_init.c1
-rw-r--r--drivers/ddr/imx/imx8m/ddrphy_train.c1
-rw-r--r--drivers/ddr/imx/imx8m/ddrphy_utils.c1
-rw-r--r--drivers/ddr/imx/imx8m/helper.c1
-rw-r--r--drivers/ddr/marvell/a38x/ddr3_debug.c1
-rw-r--r--drivers/ddr/marvell/a38x/ddr3_training.c2
-rw-r--r--drivers/ddr/marvell/a38x/ddr3_training_ip_engine.c1
-rw-r--r--drivers/ddr/marvell/a38x/ddr3_training_leveling.c1
-rw-r--r--drivers/ddr/marvell/a38x/mv_ddr_plat.c1
-rw-r--r--drivers/ddr/marvell/axp/ddr3_dfs.c1
-rw-r--r--drivers/ddr/marvell/axp/ddr3_dqs.c1
-rw-r--r--drivers/ddr/marvell/axp/ddr3_hw_training.c2
-rw-r--r--drivers/ddr/marvell/axp/ddr3_init.c2
-rw-r--r--drivers/ddr/marvell/axp/ddr3_pbs.c1
-rw-r--r--drivers/ddr/marvell/axp/ddr3_read_leveling.c1
-rw-r--r--drivers/ddr/marvell/axp/ddr3_write_leveling.c2
-rw-r--r--drivers/ddr/marvell/axp/xor.c1
-rw-r--r--drivers/demo/demo-shape.c1
-rw-r--r--drivers/demo/demo-uclass.c1
-rw-r--r--drivers/dfu/dfu.c1
-rw-r--r--drivers/dfu/dfu_mmc.c4
-rw-r--r--drivers/dfu/dfu_nand.c1
-rw-r--r--drivers/dfu/dfu_sf.c1
-rw-r--r--drivers/dfu/dfu_tftp.c1
-rw-r--r--drivers/dfu/dfu_virt.c1
-rw-r--r--drivers/dma/apbh_dma.c1
-rw-r--r--drivers/dma/bcm6348-iudma.c4
-rw-r--r--drivers/dma/dma-uclass.c2
-rw-r--r--drivers/dma/keystone_nav.c1
-rw-r--r--drivers/dma/lpc32xx_dma.c3
-rw-r--r--drivers/dma/sandbox-dma-test.c1
-rw-r--r--drivers/dma/ti-edma3.c1
-rw-r--r--drivers/dma/ti/k3-udma-hwdef.h1
-rw-r--r--drivers/dma/ti/k3-udma.c3
-rw-r--r--drivers/fastboot/fb_command.c1
-rw-r--r--drivers/fastboot/fb_getvar.c5
-rw-r--r--drivers/fastboot/fb_mmc.c23
-rw-r--r--drivers/fastboot/fb_nand.c2
-rw-r--r--drivers/firmware/firmware-zynqmp.c3
-rw-r--r--drivers/firmware/psci.c5
-rw-r--r--drivers/firmware/ti_sci.c2
-rw-r--r--drivers/firmware/ti_sci.h1
-rw-r--r--drivers/fpga/ACEX1K.c1
-rw-r--r--drivers/fpga/altera.c1
-rw-r--r--drivers/fpga/cyclon2.c1
-rw-r--r--drivers/fpga/fpga.c2
-rw-r--r--drivers/fpga/ivm_core.c1
-rw-r--r--drivers/fpga/lattice.c2
-rw-r--r--drivers/fpga/socfpga_arria10.c4
-rw-r--r--drivers/fpga/stratix10.c2
-rw-r--r--drivers/fpga/stratixII.c7
-rw-r--r--drivers/fpga/stratixv.c2
-rw-r--r--drivers/fpga/versalpl.c2
-rw-r--r--drivers/fpga/virtex2.c1
-rw-r--r--drivers/fpga/xilinx.c1
-rw-r--r--drivers/fpga/zynqmppl.c3
-rw-r--r--drivers/fpga/zynqpl.c3
-rw-r--r--drivers/gpio/adi_gpio2.c1
-rw-r--r--drivers/gpio/atmel_pio4.c1
-rw-r--r--drivers/gpio/bcm6345_gpio.c1
-rw-r--r--drivers/gpio/cortina_gpio.c2
-rw-r--r--drivers/gpio/dwapb_gpio.c2
-rw-r--r--drivers/gpio/gpio-rcar.c1
-rw-r--r--drivers/gpio/gpio-rza1.c1
-rw-r--r--drivers/gpio/gpio-uclass.c3
-rw-r--r--drivers/gpio/hi6220_gpio.c1
-rw-r--r--drivers/gpio/hsdk-creg-gpio.c2
-rw-r--r--drivers/gpio/intel_broadwell_gpio.c1
-rw-r--r--drivers/gpio/intel_gpio.c1
-rw-r--r--drivers/gpio/intel_ich6_gpio.c1
-rw-r--r--drivers/gpio/mscc_sgpio.c2
-rw-r--r--drivers/gpio/mt7621_gpio.c1
-rw-r--r--drivers/gpio/mvebu_gpio.c1
-rw-r--r--drivers/gpio/mxs_gpio.c2
-rw-r--r--drivers/gpio/pca953x.c8
-rw-r--r--drivers/gpio/pca953x_gpio.c1
-rw-r--r--drivers/gpio/pcf8575_gpio.c2
-rw-r--r--drivers/gpio/pic32_gpio.c1
-rw-r--r--drivers/gpio/pm8916_gpio.c1
-rw-r--r--drivers/gpio/s5p_gpio.c1
-rw-r--r--drivers/gpio/sandbox.c1
-rw-r--r--drivers/gpio/sh_pfc.c3
-rw-r--r--drivers/gpio/sifive-gpio.c1
-rw-r--r--drivers/gpio/stm32_gpio.c2
-rw-r--r--drivers/gpio/tca642x.c8
-rw-r--r--drivers/gpio/tegra186_gpio_priv.h1
-rw-r--r--drivers/gpio/tegra_gpio.c1
-rw-r--r--drivers/gpio/xilinx_gpio.c1
-rw-r--r--drivers/gpio/zynq_gpio.c1
-rw-r--r--drivers/hwspinlock/hwspinlock-uclass.c1
-rw-r--r--drivers/hwspinlock/stm32_hwspinlock.c1
-rw-r--r--drivers/i2c/ast_i2c.c2
-rw-r--r--drivers/i2c/at91_i2c.h1
-rw-r--r--drivers/i2c/cros_ec_ldo.c1
-rw-r--r--drivers/i2c/davinci_i2c.c2
-rw-r--r--drivers/i2c/designware_i2c.c2
-rw-r--r--drivers/i2c/designware_i2c.h1
-rw-r--r--drivers/i2c/designware_i2c_pci.c1
-rw-r--r--drivers/i2c/exynos_hs_i2c.c2
-rw-r--r--drivers/i2c/fsl_i2c.c2
-rw-r--r--drivers/i2c/i2c-cdns.c3
-rw-r--r--drivers/i2c/i2c-emul-uclass.c1
-rw-r--r--drivers/i2c/i2c-gpio.c2
-rw-r--r--drivers/i2c/i2c-uclass.c2
-rw-r--r--drivers/i2c/i2c-versatile.c2
-rw-r--r--drivers/i2c/i2c_core.c1
-rw-r--r--drivers/i2c/ihs_i2c.c3
-rw-r--r--drivers/i2c/imx_lpi2c.c1
-rw-r--r--drivers/i2c/intel_i2c.c1
-rw-r--r--drivers/i2c/kona_i2c.c2
-rw-r--r--drivers/i2c/lpc32xx_i2c.c1
-rw-r--r--drivers/i2c/meson_i2c.c3
-rw-r--r--drivers/i2c/muxes/i2c-arb-gpio-challenge.c2
-rw-r--r--drivers/i2c/muxes/i2c-mux-gpio.c1
-rw-r--r--drivers/i2c/muxes/i2c-mux-uclass.c1
-rw-r--r--drivers/i2c/muxes/pca954x.c1
-rw-r--r--drivers/i2c/mv_i2c.c2
-rw-r--r--drivers/i2c/mvtwsi.c2
-rw-r--r--drivers/i2c/mxc_i2c.c2
-rw-r--r--drivers/i2c/omap24xx_i2c.c2
-rw-r--r--drivers/i2c/rcar_i2c.c2
-rw-r--r--drivers/i2c/rcar_iic.c2
-rw-r--r--drivers/i2c/rk_i2c.c2
-rw-r--r--drivers/i2c/s3c24x0_i2c.c1
-rw-r--r--drivers/i2c/sandbox_i2c.c1
-rw-r--r--drivers/i2c/sh_i2c.c2
-rw-r--r--drivers/i2c/soft_i2c.c1
-rw-r--r--drivers/i2c/stm32f7_i2c.c3
-rw-r--r--drivers/i2c/tegra186_bpmp_i2c.c2
-rw-r--r--drivers/i2c/tegra_i2c.c2
-rw-r--r--drivers/input/cros_ec_keyb.c1
-rw-r--r--drivers/input/i8042.c2
-rw-r--r--drivers/input/input.c1
-rw-r--r--drivers/input/key_matrix.c1
-rw-r--r--drivers/input/keyboard-uclass.c1
-rw-r--r--drivers/input/tegra-kbc.c2
-rw-r--r--drivers/led/led_bcm6328.c1
-rw-r--r--drivers/led/led_bcm6358.c2
-rw-r--r--drivers/led/led_bcm6858.c2
-rw-r--r--drivers/led/led_gpio.c1
-rw-r--r--drivers/mailbox/k3-sec-proxy.c1
-rw-r--r--drivers/mailbox/mailbox-uclass.c1
-rw-r--r--drivers/mailbox/sandbox-mbox.c1
-rw-r--r--drivers/mailbox/stm32-ipcc.c2
-rw-r--r--drivers/mailbox/tegra-hsp.c2
-rw-r--r--drivers/mailbox/zynqmp-ipi.c1
-rw-r--r--drivers/misc/altera_sysid.c2
-rw-r--r--drivers/misc/atsha204a-i2c.c2
-rw-r--r--drivers/misc/cros_ec.c3
-rw-r--r--drivers/misc/cros_ec_i2c.c1
-rw-r--r--drivers/misc/cros_ec_lpc.c1
-rw-r--r--drivers/misc/cros_ec_sandbox.c1
-rw-r--r--drivers/misc/cros_ec_spi.c1
-rw-r--r--drivers/misc/ds4510.c7
-rw-r--r--drivers/misc/esm_pmic.c1
-rw-r--r--drivers/misc/fs_loader.c1
-rw-r--r--drivers/misc/fsl_ifc.c1
-rw-r--r--drivers/misc/fsl_iim.c1
-rw-r--r--drivers/misc/fsl_portals.c1
-rw-r--r--drivers/misc/fsl_sec_mon.c1
-rw-r--r--drivers/misc/gdsys_ioep.c1
-rw-r--r--drivers/misc/gdsys_ioep.h1
-rw-r--r--drivers/misc/gdsys_soc.c1
-rw-r--r--drivers/misc/i2c_eeprom.c1
-rw-r--r--drivers/misc/i2c_eeprom_emul.c1
-rw-r--r--drivers/misc/ihs_fpga.c3
-rw-r--r--drivers/misc/imx8/scu.c2
-rw-r--r--drivers/misc/irq-uclass.c1
-rw-r--r--drivers/misc/jz4780_efuse.c1
-rw-r--r--drivers/misc/k3_avs.c1
-rw-r--r--drivers/misc/k3_esm.c1
-rw-r--r--drivers/misc/microchip_flexcom.c1
-rw-r--r--drivers/misc/mpc83xx_serdes.c2
-rw-r--r--drivers/misc/mpc83xx_serdes.h1
-rw-r--r--drivers/misc/mxc_ocotp.c1
-rw-r--r--drivers/misc/mxs_ocotp.c1
-rw-r--r--drivers/misc/p2sb-uclass.c1
-rw-r--r--drivers/misc/p2sb_emul.c1
-rw-r--r--drivers/misc/qfw.c1
-rw-r--r--drivers/misc/rockchip-efuse.c4
-rw-r--r--drivers/misc/stm32_rcc.c1
-rw-r--r--drivers/misc/swap_case.c1
-rw-r--r--drivers/misc/tegra186_bpmp.c2
-rw-r--r--drivers/misc/tegra_car.c1
-rw-r--r--drivers/misc/vexpress_config.c1
-rw-r--r--drivers/mmc/am654_sdhci.c1
-rw-r--r--drivers/mmc/arm_pl180_mmci.c2
-rw-r--r--drivers/mmc/bcm2835_sdhci.c1
-rw-r--r--drivers/mmc/bcm2835_sdhost.c3
-rw-r--r--drivers/mmc/davinci_mmc.c1
-rw-r--r--drivers/mmc/dw_mmc.c3
-rw-r--r--drivers/mmc/fsl_esdhc.c3
-rw-r--r--drivers/mmc/fsl_esdhc_imx.c4
-rw-r--r--drivers/mmc/ftsdc010_mci.c2
-rw-r--r--drivers/mmc/gen_atmel_mci.c2
-rw-r--r--drivers/mmc/iproc_sdhci.c1
-rw-r--r--drivers/mmc/jz_mmc.c2
-rw-r--r--drivers/mmc/kona_sdhci.c1
-rw-r--r--drivers/mmc/meson_gx_mmc.c1
-rw-r--r--drivers/mmc/mmc-uclass.c1
-rw-r--r--drivers/mmc/mmc.c4
-rw-r--r--drivers/mmc/mmc_boot.c1
-rw-r--r--drivers/mmc/mmc_legacy.c1
-rw-r--r--drivers/mmc/mmc_spi.c2
-rw-r--r--drivers/mmc/mmc_write.c1
-rw-r--r--drivers/mmc/mvebu_mmc.c1
-rw-r--r--drivers/mmc/mxsmmc.c3
-rw-r--r--drivers/mmc/omap_hsmmc.c4
-rw-r--r--drivers/mmc/pxa_mmc_gen.c1
-rw-r--r--drivers/mmc/renesas-sdhi.c3
-rw-r--r--drivers/mmc/rockchip_dw_mmc.c2
-rw-r--r--drivers/mmc/rpmb.c1
-rw-r--r--drivers/mmc/s5p_sdhci.c1
-rw-r--r--drivers/mmc/sandbox_mmc.c1
-rw-r--r--drivers/mmc/sdhci-cadence.c2
-rw-r--r--drivers/mmc/sdhci.c4
-rw-r--r--drivers/mmc/sh_mmcif.c3
-rw-r--r--drivers/mmc/sh_sdhi.c4
-rw-r--r--drivers/mmc/socfpga_dw_mmc.c1
-rw-r--r--drivers/mmc/sti_sdhci.c1
-rw-r--r--drivers/mmc/stm32_sdmmc2.c5
-rw-r--r--drivers/mmc/sunxi_mmc.c2
-rw-r--r--drivers/mmc/tegra_mmc.c3
-rw-r--r--drivers/mmc/tmio-common.c1
-rw-r--r--drivers/mmc/tmio-common.h1
-rw-r--r--drivers/mmc/xenon_sdhci.c2
-rw-r--r--drivers/mmc/zynq_sdhci.c2
-rw-r--r--drivers/mtd/altera_qspi.c2
-rw-r--r--drivers/mtd/cfi_flash.c4
-rw-r--r--drivers/mtd/jedec_flash.c2
-rw-r--r--drivers/mtd/mtd_uboot.c1
-rw-r--r--drivers/mtd/mtdconcat.c2
-rw-r--r--drivers/mtd/mtdcore.c3
-rw-r--r--drivers/mtd/mtdpart.c2
-rw-r--r--drivers/mtd/mw_eeprom.c1
-rw-r--r--drivers/mtd/nand/bbt.c1
-rw-r--r--drivers/mtd/nand/core.c1
-rw-r--r--drivers/mtd/nand/raw/am335x_spl_bch.c1
-rw-r--r--drivers/mtd/nand/raw/arasan_nfc.c1
-rw-r--r--drivers/mtd/nand/raw/atmel_nand.c4
-rw-r--r--drivers/mtd/nand/raw/brcmnand/bcm63158_nand.c1
-rw-r--r--drivers/mtd/nand/raw/brcmnand/bcm6368_nand.c1
-rw-r--r--drivers/mtd/nand/raw/brcmnand/bcm68360_nand.c1
-rw-r--r--drivers/mtd/nand/raw/brcmnand/bcm6838_nand.c1
-rw-r--r--drivers/mtd/nand/raw/brcmnand/bcm6858_nand.c1
-rw-r--r--drivers/mtd/nand/raw/brcmnand/brcmnand.c2
-rw-r--r--drivers/mtd/nand/raw/davinci_nand.c1
-rw-r--r--drivers/mtd/nand/raw/denali.c6
-rw-r--r--drivers/mtd/nand/raw/denali_dt.c2
-rw-r--r--drivers/mtd/nand/raw/denali_spl.c2
-rw-r--r--drivers/mtd/nand/raw/fsl_ifc_spl.c1
-rw-r--r--drivers/mtd/nand/raw/fsl_upm.c2
-rw-r--r--drivers/mtd/nand/raw/kmeter1_nand.c1
-rw-r--r--drivers/mtd/nand/raw/lpc32xx_nand_mlc.c1
-rw-r--r--drivers/mtd/nand/raw/lpc32xx_nand_slc.c2
-rw-r--r--drivers/mtd/nand/raw/mxc_nand.c2
-rw-r--r--drivers/mtd/nand/raw/mxs_nand.c1
-rw-r--r--drivers/mtd/nand/raw/mxs_nand_spl.c4
-rw-r--r--drivers/mtd/nand/raw/nand_base.c4
-rw-r--r--drivers/mtd/nand/raw/nand_bbt.c2
-rw-r--r--drivers/mtd/nand/raw/nand_bch.c1
-rw-r--r--drivers/mtd/nand/raw/nand_util.c2
-rw-r--r--drivers/mtd/nand/raw/omap_gpmc.c1
-rw-r--r--drivers/mtd/nand/raw/pxa3xx_nand.c3
-rw-r--r--drivers/mtd/nand/raw/stm32_fmc2_nand.c3
-rw-r--r--drivers/mtd/nand/raw/sunxi_nand.c2
-rw-r--r--drivers/mtd/nand/raw/sunxi_nand_spl.c2
-rw-r--r--drivers/mtd/nand/raw/tegra_nand.c3
-rw-r--r--drivers/mtd/nand/raw/zynq_nand.c2
-rw-r--r--drivers/mtd/nand/spi/core.c2
-rw-r--r--drivers/mtd/nand/spi/macronix.c1
-rw-r--r--drivers/mtd/nand/spi/micron.c1
-rw-r--r--drivers/mtd/nand/spi/toshiba.c1
-rw-r--r--drivers/mtd/nand/spi/winbond.c1
-rw-r--r--drivers/mtd/onenand/onenand_base.c2
-rw-r--r--drivers/mtd/onenand/onenand_bbt.c1
-rw-r--r--drivers/mtd/onenand/onenand_spl.c1
-rw-r--r--drivers/mtd/pic32_flash.c2
-rw-r--r--drivers/mtd/renesas_rpc_hf.c1
-rw-r--r--drivers/mtd/spi/sandbox.c1
-rw-r--r--drivers/mtd/spi/sf-uclass.c1
-rw-r--r--drivers/mtd/spi/sf_dataflash.c3
-rw-r--r--drivers/mtd/spi/sf_internal.h1
-rw-r--r--drivers/mtd/spi/sf_mtd.c1
-rw-r--r--drivers/mtd/spi/sf_probe.c1
-rw-r--r--drivers/mtd/spi/spi-nor-core.c2
-rw-r--r--drivers/mtd/spi/spi-nor-tiny.c1
-rw-r--r--drivers/mtd/st_smi.c1
-rw-r--r--drivers/mtd/stm32_flash.c1
-rw-r--r--drivers/mtd/ubi/attach.c2
-rw-r--r--drivers/mtd/ubi/build.c1
-rw-r--r--drivers/mtd/ubi/eba.c1
-rw-r--r--drivers/mtd/ubi/fastmap.c2
-rw-r--r--drivers/mtd/ubi/io.c1
-rw-r--r--drivers/mtd/ubi/misc.c1
-rw-r--r--drivers/mtd/ubi/upd.c1
-rw-r--r--drivers/mtd/ubi/vmt.c1
-rw-r--r--drivers/mtd/ubi/vtbl.c2
-rw-r--r--drivers/mtd/ubi/wl.c1
-rw-r--r--drivers/mtd/ubispl/ubispl.c2
-rw-r--r--drivers/net/ag7xxx.c5
-rw-r--r--drivers/net/altera_tse.c1
-rw-r--r--drivers/net/altera_tse.h1
-rw-r--r--drivers/net/armada100_fec.c2
-rw-r--r--drivers/net/at91_emac.c2
-rw-r--r--drivers/net/ax88180.c12
-rw-r--r--drivers/net/ax88796.c1
-rw-r--r--drivers/net/bcm-sf2-eth-gmac.c4
-rw-r--r--drivers/net/bcm-sf2-eth.c2
-rw-r--r--drivers/net/bcm6348-eth.c1
-rw-r--r--drivers/net/bcm6368-eth.c2
-rw-r--r--drivers/net/bcmgenet.c4
-rw-r--r--drivers/net/calxedaxgmac.c2
-rw-r--r--drivers/net/cs8900.c2
-rw-r--r--drivers/net/dc2114x.c2
-rw-r--r--drivers/net/designware.c4
-rw-r--r--drivers/net/designware.h3
-rw-r--r--drivers/net/dm9000x.c1
-rw-r--r--drivers/net/dnet.c2
-rw-r--r--drivers/net/dwc_eth_qos.c4
-rw-r--r--drivers/net/e1000.c9
-rw-r--r--drivers/net/e1000.h4
-rw-r--r--drivers/net/e1000_spi.c22
-rw-r--r--drivers/net/eepro100.c19
-rw-r--r--drivers/net/ep93xx_eth.c3
-rw-r--r--drivers/net/ethoc.c1
-rw-r--r--drivers/net/fec_mxc.c3
-rw-r--r--drivers/net/fm/dtsec.c1
-rw-r--r--drivers/net/fm/eth.c3
-rw-r--r--drivers/net/fm/fdt.c1
-rw-r--r--drivers/net/fm/init.c2
-rw-r--r--drivers/net/fm/memac.c1
-rw-r--r--drivers/net/fm/tgec.c1
-rw-r--r--drivers/net/fsl-mc/dpio/qbman_portal.c2
-rw-r--r--drivers/net/fsl-mc/dpio/qbman_private.h1
-rw-r--r--drivers/net/fsl-mc/dpio/qbman_sys.h1
-rw-r--r--drivers/net/fsl-mc/mc.c6
-rw-r--r--drivers/net/fsl-mc/mc_sys.c1
-rw-r--r--drivers/net/fsl_enetc.c5
-rw-r--r--drivers/net/fsl_enetc.h1
-rw-r--r--drivers/net/fsl_mcdmafec.c1
-rw-r--r--drivers/net/ftgmac100.c4
-rw-r--r--drivers/net/ftgmac100.h1
-rw-r--r--drivers/net/ftmac100.c1
-rw-r--r--drivers/net/ftmac110.c2
-rw-r--r--drivers/net/gmac_rockchip.c3
-rw-r--r--drivers/net/higmacv300.c4
-rw-r--r--drivers/net/ks8851_mll.c2
-rw-r--r--drivers/net/lan91c96.c11
-rw-r--r--drivers/net/ldpaa_eth/ldpaa_eth.c3
-rw-r--r--drivers/net/lpc32xx_eth.c2
-rw-r--r--drivers/net/macb.c2
-rw-r--r--drivers/net/mcffec.c1
-rw-r--r--drivers/net/mcfmii.c1
-rw-r--r--drivers/net/mdio_mux_i2creg.c1
-rw-r--r--drivers/net/mpc8xx_fec.c1
-rw-r--r--drivers/net/mscc_eswitch/jr2_switch.c2
-rw-r--r--drivers/net/mscc_eswitch/luton_switch.c1
-rw-r--r--drivers/net/mscc_eswitch/mscc_mac_table.c1
-rw-r--r--drivers/net/mscc_eswitch/mscc_miim.c1
-rw-r--r--drivers/net/mscc_eswitch/mscc_xfer.c3
-rw-r--r--drivers/net/mscc_eswitch/ocelot_switch.c2
-rw-r--r--drivers/net/mscc_eswitch/serval_switch.c2
-rw-r--r--drivers/net/mscc_eswitch/servalt_switch.c1
-rw-r--r--drivers/net/mt7628-eth.c4
-rw-r--r--drivers/net/mtk_eth.c4
-rw-r--r--drivers/net/mtk_eth.h1
-rw-r--r--drivers/net/mvgbe.c2
-rw-r--r--drivers/net/mvmdio.c1
-rw-r--r--drivers/net/mvneta.c5
-rw-r--r--drivers/net/mvpp2.c5
-rw-r--r--drivers/net/natsemi.c1
-rw-r--r--drivers/net/ne2000.c1
-rw-r--r--drivers/net/ne2000_base.c1
-rw-r--r--drivers/net/ne2000_base.h1
-rw-r--r--drivers/net/netconsole.c1
-rw-r--r--drivers/net/ns8382x.c2
-rw-r--r--drivers/net/pch_gbe.c2
-rw-r--r--drivers/net/pcnet.c3
-rw-r--r--drivers/net/pfe_eth/pfe_cmd.c18
-rw-r--r--drivers/net/pfe_eth/pfe_driver.c2
-rw-r--r--drivers/net/pfe_eth/pfe_eth.c2
-rw-r--r--drivers/net/pfe_eth/pfe_firmware.c3
-rw-r--r--drivers/net/pfe_eth/pfe_hw.c2
-rw-r--r--drivers/net/pfe_eth/pfe_mdio.c2
-rw-r--r--drivers/net/phy/aquantia.c4
-rw-r--r--drivers/net/phy/atheros.c1
-rw-r--r--drivers/net/phy/b53.c9
-rw-r--r--drivers/net/phy/broadcom.c1
-rw-r--r--drivers/net/phy/cortina.c2
-rw-r--r--drivers/net/phy/dp83867.c2
-rw-r--r--drivers/net/phy/marvell.c2
-rw-r--r--drivers/net/phy/micrel_ksz8xxx.c1
-rw-r--r--drivers/net/phy/mscc.c2
-rw-r--r--drivers/net/phy/mv88e61xx.c3
-rw-r--r--drivers/net/phy/mv88e6352.c9
-rw-r--r--drivers/net/phy/ncsi.c1
-rw-r--r--drivers/net/phy/phy.c3
-rw-r--r--drivers/net/phy/realtek.c1
-rw-r--r--drivers/net/phy/teranetics.c1
-rw-r--r--drivers/net/phy/xilinx_gmii2rgmii.c1
-rw-r--r--drivers/net/phy/xilinx_phy.c1
-rw-r--r--drivers/net/pic32_eth.c2
-rw-r--r--drivers/net/pic32_eth.h1
-rw-r--r--drivers/net/pic32_mdio.c1
-rw-r--r--drivers/net/ravb.c4
-rw-r--r--drivers/net/rtl8139.c5
-rw-r--r--drivers/net/rtl8169.c3
-rw-r--r--drivers/net/sandbox-raw.c1
-rw-r--r--drivers/net/sandbox.c1
-rw-r--r--drivers/net/sh_eth.c3
-rw-r--r--drivers/net/smc91111.c23
-rw-r--r--drivers/net/smc91111.h1
-rw-r--r--drivers/net/smc911x.c1
-rw-r--r--drivers/net/smc911x.h2
-rw-r--r--drivers/net/sni_ave.c4
-rw-r--r--drivers/net/sun8i_emac.c4
-rw-r--r--drivers/net/sunxi_emac.c2
-rw-r--r--drivers/net/ti/am65-cpsw-nuss.c2
-rw-r--r--drivers/net/ti/cpsw.c2
-rw-r--r--drivers/net/ti/cpsw_mdio.c3
-rw-r--r--drivers/net/ti/davinci_emac.c3
-rw-r--r--drivers/net/ti/keystone_net.c2
-rw-r--r--drivers/net/tsec.c2
-rw-r--r--drivers/net/uli526x.c1
-rw-r--r--drivers/net/vsc7385.c2
-rw-r--r--drivers/net/vsc9953.c4
-rw-r--r--drivers/net/xilinx_axi_emac.c2
-rw-r--r--drivers/net/xilinx_emaclite.c2
-rw-r--r--drivers/net/zynq_gem.c3
-rw-r--r--drivers/nvme/nvme-uclass.c1
-rw-r--r--drivers/nvme/nvme.c2
-rw-r--r--drivers/pch/pch7.c1
-rw-r--r--drivers/pch/pch9.c1
-rw-r--r--drivers/pci/fsl_pci_init.c3
-rw-r--r--drivers/pci/pci-aardvark.c2
-rw-r--r--drivers/pci/pci-emul-uclass.c1
-rw-r--r--drivers/pci/pci-rcar-gen2.c1
-rw-r--r--drivers/pci/pci-rcar-gen3.c1
-rw-r--r--drivers/pci/pci-uclass.c3
-rw-r--r--drivers/pci/pci.c2
-rw-r--r--drivers/pci/pci_auto.c1
-rw-r--r--drivers/pci/pci_auto_common.c1
-rw-r--r--drivers/pci/pci_auto_old.c1
-rw-r--r--drivers/pci/pci_compat.c1
-rw-r--r--drivers/pci/pci_ftpci100.c2
-rw-r--r--drivers/pci/pci_gt64120.c2
-rw-r--r--drivers/pci/pci_mpc85xx.c1
-rw-r--r--drivers/pci/pci_msc01.c1
-rw-r--r--drivers/pci/pci_mvebu.c2
-rw-r--r--drivers/pci/pci_rom.c2
-rw-r--r--drivers/pci/pci_sandbox.c1
-rw-r--r--drivers/pci/pci_sh4.c1
-rw-r--r--drivers/pci/pci_sh7751.c2
-rw-r--r--drivers/pci/pci_sh7780.c1
-rw-r--r--drivers/pci/pci_tegra.c2
-rw-r--r--drivers/pci/pcie_dw_mvebu.c2
-rw-r--r--drivers/pci/pcie_dw_ti.c3
-rw-r--r--drivers/pci/pcie_fsl.c1
-rw-r--r--drivers/pci/pcie_imx.c2
-rw-r--r--drivers/pci/pcie_intel_fpga.c2
-rw-r--r--drivers/pci/pcie_layerscape.c1
-rw-r--r--drivers/pci/pcie_layerscape_fixup.c2
-rw-r--r--drivers/pci/pcie_layerscape_fixup_common.c1
-rw-r--r--drivers/pci/pcie_layerscape_gen4.c1
-rw-r--r--drivers/pci/pcie_layerscape_gen4.h1
-rw-r--r--drivers/pci/pcie_layerscape_gen4_fixup.c1
-rw-r--r--drivers/pci/pcie_mediatek.c2
-rw-r--r--drivers/pci/pcie_xilinx.c1
-rw-r--r--drivers/pci_endpoint/pcie-cadence.h1
-rw-r--r--drivers/phy/allwinner/phy-sun4i-usb.c3
-rw-r--r--drivers/phy/bcm6318-usbh-phy.c3
-rw-r--r--drivers/phy/bcm6348-usbh-phy.c2
-rw-r--r--drivers/phy/bcm6358-usbh-phy.c2
-rw-r--r--drivers/phy/bcm6368-usbh-phy.c3
-rw-r--r--drivers/phy/keystone-usb-phy.c3
-rw-r--r--drivers/phy/marvell/comphy_a3700.c2
-rw-r--r--drivers/phy/marvell/comphy_core.c3
-rw-r--r--drivers/phy/marvell/comphy_cp110.c2
-rw-r--r--drivers/phy/marvell/comphy_mux.c1
-rw-r--r--drivers/phy/meson-g12a-usb2.c2
-rw-r--r--drivers/phy/meson-g12a-usb3-pcie.c1
-rw-r--r--drivers/phy/meson-gxbb-usb2.c1
-rw-r--r--drivers/phy/meson-gxl-usb2.c1
-rw-r--r--drivers/phy/msm8916-usbh-phy.c1
-rw-r--r--drivers/phy/mt76x8-usb-phy.c2
-rw-r--r--drivers/phy/omap-usb2-phy.c1
-rw-r--r--drivers/phy/phy-da8xx-usb.c1
-rw-r--r--drivers/phy/phy-mtk-tphy.c2
-rw-r--r--drivers/phy/phy-rcar-gen2.c1
-rw-r--r--drivers/phy/phy-stm32-usbphyc.c2
-rw-r--r--drivers/phy/phy-ti-am654.c3
-rw-r--r--drivers/phy/phy-uclass.c1
-rw-r--r--drivers/phy/sti_usb_phy.c1
-rw-r--r--drivers/phy/ti-pipe3-phy.c2
-rw-r--r--drivers/pinctrl/aspeed/pinctrl_ast2500.c1
-rw-r--r--drivers/pinctrl/ath79/pinctrl_ar933x.c1
-rw-r--r--drivers/pinctrl/ath79/pinctrl_qca953x.c1
-rw-r--r--drivers/pinctrl/broadcom/pinctrl-bcm283x.c1
-rw-r--r--drivers/pinctrl/intel/pinctrl.c1
-rw-r--r--drivers/pinctrl/intel/pinctrl_apl.c1
-rw-r--r--drivers/pinctrl/mediatek/pinctrl-mtk-common.c1
-rw-r--r--drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c1
-rw-r--r--drivers/pinctrl/meson/pinctrl-meson-gx-pmx.c2
-rw-r--r--drivers/pinctrl/meson/pinctrl-meson.c3
-rw-r--r--drivers/pinctrl/mscc/mscc-common.c1
-rw-r--r--drivers/pinctrl/mvebu/pinctrl-armada-37xx.c2
-rw-r--r--drivers/pinctrl/mvebu/pinctrl-mvebu.c2
-rw-r--r--drivers/pinctrl/nxp/pinctrl-imx.c1
-rw-r--r--drivers/pinctrl/nxp/pinctrl-mxs.c1
-rw-r--r--drivers/pinctrl/pinctrl-at91-pio4.c1
-rw-r--r--drivers/pinctrl/pinctrl-at91.c2
-rw-r--r--drivers/pinctrl/pinctrl-sandbox.c2
-rw-r--r--drivers/pinctrl/pinctrl-sti.c2
-rw-r--r--drivers/pinctrl/pinctrl-stmfx.c2
-rw-r--r--drivers/pinctrl/pinctrl_pic32.c2
-rw-r--r--drivers/pinctrl/pinctrl_stm32.c3
-rw-r--r--drivers/pinctrl/renesas/pfc-r7s72100.c1
-rw-r--r--drivers/pinctrl/renesas/pfc-r8a77990.c1
-rw-r--r--drivers/pinctrl/renesas/pfc.c2
-rw-r--r--drivers/pinctrl/renesas/sh_pfc.h1
-rw-r--r--drivers/pinctrl/rockchip/pinctrl-px30.c2
-rw-r--r--drivers/pinctrl/rockchip/pinctrl-rk3036.c1
-rw-r--r--drivers/pinctrl/rockchip/pinctrl-rk3128.c1
-rw-r--r--drivers/pinctrl/rockchip/pinctrl-rk3188.c1
-rw-r--r--drivers/pinctrl/rockchip/pinctrl-rk322x.c2
-rw-r--r--drivers/pinctrl/rockchip/pinctrl-rk3288.c2
-rw-r--r--drivers/pinctrl/rockchip/pinctrl-rk3308.c2
-rw-r--r--drivers/pinctrl/rockchip/pinctrl-rk3328.c2
-rw-r--r--drivers/pinctrl/rockchip/pinctrl-rk3368.c1
-rw-r--r--drivers/pinctrl/rockchip/pinctrl-rk3399.c2
-rw-r--r--drivers/pinctrl/rockchip/pinctrl-rockchip-core.c3
-rw-r--r--drivers/pinctrl/rockchip/pinctrl-rockchip.h1
-rw-r--r--drivers/pinctrl/rockchip/pinctrl-rv1108.c2
-rw-r--r--drivers/pinctrl/uniphier/pinctrl-uniphier-core.c2
-rw-r--r--drivers/pinctrl/uniphier/pinctrl-uniphier.h1
-rw-r--r--drivers/power/acpi_pmc/pmc_emul.c1
-rw-r--r--drivers/power/acpi_pmc/sandbox.c1
-rw-r--r--drivers/power/axp152.c2
-rw-r--r--drivers/power/axp209.c3
-rw-r--r--drivers/power/axp221.c2
-rw-r--r--drivers/power/axp809.c3
-rw-r--r--drivers/power/axp818.c3
-rw-r--r--drivers/power/battery/bat_trats.c2
-rw-r--r--drivers/power/battery/bat_trats2.c1
-rw-r--r--drivers/power/domain/bcm6328-power-domain.c1
-rw-r--r--drivers/power/domain/imx8-power-domain-legacy.c1
-rw-r--r--drivers/power/domain/imx8-power-domain.c1
-rw-r--r--drivers/power/domain/meson-ee-pwrc.c3
-rw-r--r--drivers/power/domain/meson-gx-pwrc-vpu.c3
-rw-r--r--drivers/power/domain/mtk-power-domain.c1
-rw-r--r--drivers/power/domain/power-domain-uclass.c1
-rw-r--r--drivers/power/domain/sandbox-power-domain.c1
-rw-r--r--drivers/power/domain/tegra186-power-domain.c2
-rw-r--r--drivers/power/domain/ti-sci-power-domain.c1
-rw-r--r--drivers/power/exynos-tmu.c1
-rw-r--r--drivers/power/fuel_gauge/fg_max17042.c2
-rw-r--r--drivers/power/mfd/fg_max77693.c1
-rw-r--r--drivers/power/mfd/muic_max77693.c1
-rw-r--r--drivers/power/mfd/pmic_max77693.c1
-rw-r--r--drivers/power/mt6323.c3
-rw-r--r--drivers/power/pmic/act8846.c1
-rw-r--r--drivers/power/pmic/as3722.c1
-rw-r--r--drivers/power/pmic/bd71837.c1
-rw-r--r--drivers/power/pmic/da9063.c1
-rw-r--r--drivers/power/pmic/fan53555.c1
-rw-r--r--drivers/power/pmic/i2c_pmic_emul.c1
-rw-r--r--drivers/power/pmic/lp873x.c1
-rw-r--r--drivers/power/pmic/lp87565.c1
-rw-r--r--drivers/power/pmic/max77686.c1
-rw-r--r--drivers/power/pmic/muic_max8997.c1
-rw-r--r--drivers/power/pmic/palmas.c1
-rw-r--r--drivers/power/pmic/pca9450.c1
-rw-r--r--drivers/power/pmic/pfuze100.c1
-rw-r--r--drivers/power/pmic/pmic-uclass.c1
-rw-r--r--drivers/power/pmic/pmic_hi6553.c1
-rw-r--r--drivers/power/pmic/pmic_max8997.c1
-rw-r--r--drivers/power/pmic/pmic_tps65910_dm.c1
-rw-r--r--drivers/power/pmic/rk8xx.c1
-rw-r--r--drivers/power/pmic/rn5t567.c1
-rw-r--r--drivers/power/pmic/s2mps11.c1
-rw-r--r--drivers/power/pmic/s5m8767.c1
-rw-r--r--drivers/power/pmic/tps65090.c1
-rw-r--r--drivers/power/pmic/tps65941.c1
-rw-r--r--drivers/power/power_core.c5
-rw-r--r--drivers/power/power_dialog.c1
-rw-r--r--drivers/power/power_i2c.c1
-rw-r--r--drivers/power/regulator/as3722_regulator.c1
-rw-r--r--drivers/power/regulator/bd71837.c2
-rw-r--r--drivers/power/regulator/da9063.c1
-rw-r--r--drivers/power/regulator/fan53555.c2
-rw-r--r--drivers/power/regulator/fixed.c1
-rw-r--r--drivers/power/regulator/gpio-regulator.c1
-rw-r--r--drivers/power/regulator/lp87565_regulator.c1
-rw-r--r--drivers/power/regulator/pbias_regulator.c2
-rw-r--r--drivers/power/regulator/pfuze100.c1
-rw-r--r--drivers/power/regulator/pwm_regulator.c1
-rw-r--r--drivers/power/regulator/regulator-uclass.c2
-rw-r--r--drivers/power/regulator/regulator_common.c2
-rw-r--r--drivers/power/regulator/rk8xx.c1
-rw-r--r--drivers/power/regulator/s2mps11_regulator.c1
-rw-r--r--drivers/power/regulator/stm32-vrefbuf.c1
-rw-r--r--drivers/power/regulator/stpmic1.c1
-rw-r--r--drivers/power/regulator/tps65090_regulator.c2
-rw-r--r--drivers/power/regulator/tps65910_regulator.c1
-rw-r--r--drivers/power/regulator/tps65941_regulator.c2
-rw-r--r--drivers/power/tps6586x.c2
-rw-r--r--drivers/power/twl4030.c4
-rw-r--r--drivers/power/twl6030.c1
-rw-r--r--drivers/pwm/exynos_pwm.c1
-rw-r--r--drivers/pwm/pwm-imx.c1
-rw-r--r--drivers/pwm/rk_pwm.c2
-rw-r--r--drivers/pwm/sunxi_pwm.c1
-rw-r--r--drivers/pwm/tegra_pwm.c1
-rw-r--r--drivers/qe/qe.c2
-rw-r--r--drivers/qe/uec.c2
-rw-r--r--drivers/qe/uec_phy.c7
-rw-r--r--drivers/ram/imxrt_sdram.c4
-rw-r--r--drivers/ram/k3-am654-ddrss.c1
-rw-r--r--drivers/ram/k3-am654-ddrss.h1
-rw-r--r--drivers/ram/k3-j721e/k3-j721e-ddrss.c1
-rw-r--r--drivers/ram/mediatek/ddr3-mt7629.c2
-rw-r--r--drivers/ram/mpc83xx_sdram.c2
-rw-r--r--drivers/ram/rockchip/dmc-rk3368.c3
-rw-r--r--drivers/ram/rockchip/sdram_pctl_px30.c1
-rw-r--r--drivers/ram/rockchip/sdram_phy_px30.c1
-rw-r--r--drivers/ram/rockchip/sdram_px30.c3
-rw-r--r--drivers/ram/rockchip/sdram_rk3128.c1
-rw-r--r--drivers/ram/rockchip/sdram_rk3188.c3
-rw-r--r--drivers/ram/rockchip/sdram_rk322x.c2
-rw-r--r--drivers/ram/rockchip/sdram_rk3288.c3
-rw-r--r--drivers/ram/rockchip/sdram_rk3328.c3
-rw-r--r--drivers/ram/rockchip/sdram_rk3399.c3
-rw-r--r--drivers/ram/stm32_sdram.c4
-rw-r--r--drivers/ram/stm32mp1/stm32mp1_ddr.c3
-rw-r--r--drivers/ram/stm32mp1/stm32mp1_ddr_regs.h1
-rw-r--r--drivers/ram/stm32mp1/stm32mp1_interactive.c12
-rw-r--r--drivers/ram/stm32mp1/stm32mp1_ram.c1
-rw-r--r--drivers/ram/stm32mp1/stm32mp1_tests.c2
-rw-r--r--drivers/ram/stm32mp1/stm32mp1_tuning.c3
-rw-r--r--drivers/remoteproc/k3_system_controller.c1
-rw-r--r--drivers/remoteproc/rproc-elf-loader.c2
-rw-r--r--drivers/remoteproc/rproc-uclass.c1
-rw-r--r--drivers/remoteproc/sandbox_testproc.c1
-rw-r--r--drivers/remoteproc/stm32_copro.c1
-rw-r--r--drivers/remoteproc/ti_k3_dsp_rproc.c1
-rw-r--r--drivers/remoteproc/ti_k3_r5f_rproc.c1
-rw-r--r--drivers/remoteproc/ti_power_proc.c1
-rw-r--r--drivers/reset/ast2500-reset.c1
-rw-r--r--drivers/reset/reset-bcm6345.c3
-rw-r--r--drivers/reset/reset-hisilicon.c2
-rw-r--r--drivers/reset/reset-hsdk.c2
-rw-r--r--drivers/reset/reset-imx7.c3
-rw-r--r--drivers/reset/reset-mediatek.c2
-rw-r--r--drivers/reset/reset-meson.c2
-rw-r--r--drivers/reset/reset-mtmips.c2
-rw-r--r--drivers/reset/reset-rockchip.c2
-rw-r--r--drivers/reset/reset-socfpga.c1
-rw-r--r--drivers/reset/reset-sunxi.c2
-rw-r--r--drivers/reset/reset-ti-sci.c1
-rw-r--r--drivers/reset/reset-uclass.c1
-rw-r--r--drivers/reset/reset-uniphier.c1
-rw-r--r--drivers/reset/sandbox-reset-test.c1
-rw-r--r--drivers/reset/sandbox-reset.c1
-rw-r--r--drivers/reset/sti-reset.c2
-rw-r--r--drivers/reset/stm32-reset.c2
-rw-r--r--drivers/reset/tegra-car-reset.c1
-rw-r--r--drivers/reset/tegra186-reset.c1
-rw-r--r--drivers/rng/rockchip_rng.c1
-rw-r--r--drivers/rng/sandbox_rng.c1
-rw-r--r--drivers/rng/stm32mp1_rng.c3
-rw-r--r--drivers/rtc/davinci.c2
-rw-r--r--drivers/rtc/ds1302.c1
-rw-r--r--drivers/rtc/ds1306.c27
-rw-r--r--drivers/rtc/ds1307.c1
-rw-r--r--drivers/rtc/ds1337.c1
-rw-r--r--drivers/rtc/ds3231.c1
-rw-r--r--drivers/rtc/ds3232.c1
-rw-r--r--drivers/rtc/ftrtc010.c1
-rw-r--r--drivers/rtc/i2c_rtc_emul.c1
-rw-r--r--drivers/rtc/imxdi.c1
-rw-r--r--drivers/rtc/m41t11.c13
-rw-r--r--drivers/rtc/m41t60.c1
-rw-r--r--drivers/rtc/m41t62.c1
-rw-r--r--drivers/rtc/max6900.c1
-rw-r--r--drivers/rtc/mvrtc.c1
-rw-r--r--drivers/rtc/pcf2127.c1
-rw-r--r--drivers/rtc/pcf8563.c1
-rw-r--r--drivers/rtc/pl031.c1
-rw-r--r--drivers/rtc/pt7c4338.c1
-rw-r--r--drivers/rtc/rtc-uclass.c1
-rw-r--r--drivers/rtc/rv3029.c3
-rw-r--r--drivers/rtc/rv8803.c2
-rw-r--r--drivers/rtc/rx8010sj.c1
-rw-r--r--drivers/rtc/s35392a.c1
-rw-r--r--drivers/rtc/stm32_rtc.c1
-rw-r--r--drivers/rtc/x1205.c1
-rw-r--r--drivers/scsi/scsi.c4
-rw-r--r--drivers/serial/altera_jtag_uart.c1
-rw-r--r--drivers/serial/altera_uart.c1
-rw-r--r--drivers/serial/atmel_usart.c1
-rw-r--r--drivers/serial/ns16550.c1
-rw-r--r--drivers/serial/serial-uclass.c1
-rw-r--r--drivers/serial/serial.c1
-rw-r--r--drivers/serial/serial_ar933x.c1
-rw-r--r--drivers/serial/serial_bcm283x_mu.c1
-rw-r--r--drivers/serial/serial_cortina.c1
-rw-r--r--drivers/serial/serial_efi.c1
-rw-r--r--drivers/serial/serial_lpuart.c2
-rw-r--r--drivers/serial/serial_meson.c1
-rw-r--r--drivers/serial/serial_mtk.c1
-rw-r--r--drivers/serial/serial_omap.c1
-rw-r--r--drivers/serial/serial_owl.c1
-rw-r--r--drivers/serial/serial_pic32.c1
-rw-r--r--drivers/serial/serial_sh.c1
-rw-r--r--drivers/serial/serial_sifive.c1
-rw-r--r--drivers/serial/serial_sti_asc.c2
-rw-r--r--drivers/serial/serial_stm32.c3
-rw-r--r--drivers/serial/serial_stm32.h1
-rw-r--r--drivers/serial/serial_xuartlite.c1
-rw-r--r--drivers/serial/serial_zynq.c2
-rw-r--r--drivers/smem/msm_smem.c1
-rw-r--r--drivers/soc/ti/k3-navss-ringacc.c3
-rw-r--r--drivers/soc/ti/keystone_serdes.c1
-rw-r--r--drivers/sound/broadwell_i2s.c1
-rw-r--r--drivers/sound/hda_codec.c3
-rw-r--r--drivers/sound/ivybridge_sound.c2
-rw-r--r--drivers/sound/max98088.c1
-rw-r--r--drivers/sound/max98088.h1
-rw-r--r--drivers/sound/max98090.c2
-rw-r--r--drivers/sound/max98095.c1
-rw-r--r--drivers/sound/maxim_codec.c1
-rw-r--r--drivers/sound/rockchip_i2s.c2
-rw-r--r--drivers/sound/rockchip_sound.c1
-rw-r--r--drivers/sound/rt5677.c1
-rw-r--r--drivers/sound/samsung-i2s.c1
-rw-r--r--drivers/sound/samsung_sound.c1
-rw-r--r--drivers/sound/sandbox.c1
-rw-r--r--drivers/sound/sound-uclass.c2
-rw-r--r--drivers/sound/sound.c1
-rw-r--r--drivers/sound/tegra_ahub.c1
-rw-r--r--drivers/sound/tegra_i2s.c1
-rw-r--r--drivers/sound/tegra_sound.c1
-rw-r--r--drivers/sound/wm8994.c1
-rw-r--r--drivers/spi/altera_spi.c2
-rw-r--r--drivers/spi/atcspi200_spi.c1
-rw-r--r--drivers/spi/atmel-quadspi.c1
-rw-r--r--drivers/spi/atmel_spi.h1
-rw-r--r--drivers/spi/bcm63xx_hsspi.c2
-rw-r--r--drivers/spi/bcm63xx_spi.c1
-rw-r--r--drivers/spi/cadence_qspi.c1
-rw-r--r--drivers/spi/cadence_qspi_apb.c3
-rw-r--r--drivers/spi/cf_spi.c1
-rw-r--r--drivers/spi/davinci_spi.c3
-rw-r--r--drivers/spi/designware_spi.c2
-rw-r--r--drivers/spi/exynos_spi.c2
-rw-r--r--drivers/spi/fsl_dspi.c3
-rw-r--r--drivers/spi/fsl_espi.c3
-rw-r--r--drivers/spi/fsl_qspi.c6
-rw-r--r--drivers/spi/ich.c4
-rw-r--r--drivers/spi/ich.h1
-rw-r--r--drivers/spi/kirkwood_spi.c1
-rw-r--r--drivers/spi/meson_spifc.c2
-rw-r--r--drivers/spi/mpc8xx_spi.c1
-rw-r--r--drivers/spi/mpc8xxx_spi.c3
-rw-r--r--drivers/spi/mscc_bb_spi.c2
-rw-r--r--drivers/spi/mt7621_spi.c2
-rw-r--r--drivers/spi/mvebu_a3700_spi.c2
-rw-r--r--drivers/spi/mxc_spi.c3
-rw-r--r--drivers/spi/mxs_spi.c3
-rw-r--r--drivers/spi/nxp_fspi.c1
-rw-r--r--drivers/spi/omap3_spi.c1
-rw-r--r--drivers/spi/pic32_spi.c2
-rw-r--r--drivers/spi/renesas_rpc_spi.c2
-rw-r--r--drivers/spi/rk_spi.c2
-rw-r--r--drivers/spi/sandbox_spi.c1
-rw-r--r--drivers/spi/sh_qspi.c1
-rw-r--r--drivers/spi/sh_spi.c1
-rw-r--r--drivers/spi/soft_spi.c3
-rw-r--r--drivers/spi/spi-mem-nodm.c1
-rw-r--r--drivers/spi/spi-mem.c1
-rw-r--r--drivers/spi/spi-sifive.c1
-rw-r--r--drivers/spi/spi-sunxi.c2
-rw-r--r--drivers/spi/spi-uclass.c1
-rw-r--r--drivers/spi/stm32_qspi.c3
-rw-r--r--drivers/spi/stm32_spi.c3
-rw-r--r--drivers/spi/tegra114_spi.c3
-rw-r--r--drivers/spi/tegra20_sflash.c3
-rw-r--r--drivers/spi/tegra20_slink.c3
-rw-r--r--drivers/spi/tegra210_qspi.c3
-rw-r--r--drivers/spi/ti_qspi.c3
-rw-r--r--drivers/spi/uniphier_spi.c3
-rw-r--r--drivers/spi/xilinx_spi.c2
-rw-r--r--drivers/spi/zynq_qspi.c2
-rw-r--r--drivers/spi/zynq_spi.c3
-rw-r--r--drivers/spi/zynqmp_gqspi.c3
-rw-r--r--drivers/sysreset/sysreset-ti-sci.c1
-rw-r--r--drivers/sysreset/sysreset-uclass.c7
-rw-r--r--drivers/sysreset/sysreset_ast.c1
-rw-r--r--drivers/sysreset/sysreset_gpio.c1
-rw-r--r--drivers/sysreset/sysreset_mpc83xx.c3
-rw-r--r--drivers/sysreset/sysreset_socfpga.c1
-rw-r--r--drivers/sysreset/sysreset_sti.c1
-rw-r--r--drivers/tee/tee-uclass.c1
-rw-r--r--drivers/thermal/imx_scu_thermal.c3
-rw-r--r--drivers/thermal/imx_thermal.c2
-rw-r--r--drivers/timer/altera_timer.c1
-rw-r--r--drivers/timer/atmel_pit_timer.c1
-rw-r--r--drivers/timer/cadence-ttc.c3
-rw-r--r--drivers/timer/mpc83xx_timer.c3
-rw-r--r--drivers/timer/mtk_timer.c1
-rw-r--r--drivers/timer/nomadik-mtu-timer.c1
-rw-r--r--drivers/timer/omap-timer.c1
-rw-r--r--drivers/timer/ostm_timer.c1
-rw-r--r--drivers/timer/rockchip_timer.c3
-rw-r--r--drivers/timer/stm32_timer.c1
-rw-r--r--drivers/timer/timer-uclass.c1
-rw-r--r--drivers/timer/tsc_timer.c3
-rw-r--r--drivers/tpm/cr50_i2c.c2
-rw-r--r--drivers/tpm/tpm-uclass.c2
-rw-r--r--drivers/tpm/tpm2_ftpm_tee.c1
-rw-r--r--drivers/tpm/tpm2_tis_sandbox.c1
-rw-r--r--drivers/tpm/tpm2_tis_spi.c2
-rw-r--r--drivers/tpm/tpm_atmel_twi.c1
-rw-r--r--drivers/tpm/tpm_tis_infineon.c2
-rw-r--r--drivers/tpm/tpm_tis_lpc.c2
-rw-r--r--drivers/tpm/tpm_tis_st33zp24_i2c.c2
-rw-r--r--drivers/tpm/tpm_tis_st33zp24_spi.c2
-rw-r--r--drivers/ufs/cdns-platform.c1
-rw-r--r--drivers/ufs/ti-j721e-ufs.c1
-rw-r--r--drivers/ufs/ufs.c3
-rw-r--r--drivers/usb/cdns3/cdns3-ti.c1
-rw-r--r--drivers/usb/cdns3/core.c2
-rw-r--r--drivers/usb/cdns3/drd.h1
-rw-r--r--drivers/usb/cdns3/ep0.c3
-rw-r--r--drivers/usb/cdns3/gadget.c2
-rw-r--r--drivers/usb/cdns3/gadget.h1
-rw-r--r--drivers/usb/common/fsl-dt-fixup.c1
-rw-r--r--drivers/usb/dwc3/core.c2
-rw-r--r--drivers/usb/dwc3/core.h1
-rw-r--r--drivers/usb/dwc3/dwc3-generic.c2
-rw-r--r--drivers/usb/dwc3/dwc3-meson-g12a.c2
-rw-r--r--drivers/usb/dwc3/ep0.c1
-rw-r--r--drivers/usb/dwc3/gadget.c2
-rw-r--r--drivers/usb/dwc3/samsung_usb_phy.c1
-rw-r--r--drivers/usb/dwc3/ti_usb_phy.c2
-rw-r--r--drivers/usb/emul/sandbox_flash.c1
-rw-r--r--drivers/usb/emul/sandbox_hub.c1
-rw-r--r--drivers/usb/emul/sandbox_keyb.c1
-rw-r--r--drivers/usb/emul/usb-emul-uclass.c1
-rw-r--r--drivers/usb/eth/asix.c3
-rw-r--r--drivers/usb/eth/asix88179.c2
-rw-r--r--drivers/usb/eth/lan75xx.c2
-rw-r--r--drivers/usb/eth/lan78xx.c3
-rw-r--r--drivers/usb/eth/lan7x.c2
-rw-r--r--drivers/usb/eth/lan7x.h8
-rw-r--r--drivers/usb/eth/mcs7830.c3
-rw-r--r--drivers/usb/eth/r8152.c3
-rw-r--r--drivers/usb/eth/r8152.h1
-rw-r--r--drivers/usb/eth/r8152_fw.c2
-rw-r--r--drivers/usb/eth/smsc95xx.c3
-rw-r--r--drivers/usb/eth/usb_ether.c3
-rw-r--r--drivers/usb/gadget/at91_udc.c1
-rw-r--r--drivers/usb/gadget/atmel_usba_udc.c1
-rw-r--r--drivers/usb/gadget/bcm_udc_otg_phy.c1
-rw-r--r--drivers/usb/gadget/ci_udc.c2
-rw-r--r--drivers/usb/gadget/composite.c2
-rw-r--r--drivers/usb/gadget/core.c1
-rw-r--r--drivers/usb/gadget/designware_udc.c1
-rw-r--r--drivers/usb/gadget/dwc2_udc_otg.c3
-rw-r--r--drivers/usb/gadget/dwc2_udc_otg_phy.c1
-rw-r--r--drivers/usb/gadget/dwc2_udc_otg_regs.h1
-rw-r--r--drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c2
-rw-r--r--drivers/usb/gadget/ether.c2
-rw-r--r--drivers/usb/gadget/f_dfu.c1
-rw-r--r--drivers/usb/gadget/f_fastboot.c2
-rw-r--r--drivers/usb/gadget/f_mass_storage.c2
-rw-r--r--drivers/usb/gadget/f_rockusb.c3
-rw-r--r--drivers/usb/gadget/f_sdp.c1
-rw-r--r--drivers/usb/gadget/f_thor.c3
-rw-r--r--drivers/usb/gadget/fotg210.c2
-rw-r--r--drivers/usb/gadget/g_dnl.c1
-rw-r--r--drivers/usb/gadget/pxa25x_udc.c3
-rw-r--r--drivers/usb/gadget/pxa27x_udc.c1
-rw-r--r--drivers/usb/gadget/rndis.c1
-rw-r--r--drivers/usb/gadget/storage_common.c1
-rw-r--r--drivers/usb/host/dwc2.c3
-rw-r--r--drivers/usb/host/dwc3-sti-glue.c1
-rw-r--r--drivers/usb/host/ehci-armada100.c1
-rw-r--r--drivers/usb/host/ehci-atmel.c1
-rw-r--r--drivers/usb/host/ehci-exynos.c2
-rw-r--r--drivers/usb/host/ehci-faraday.c2
-rw-r--r--drivers/usb/host/ehci-fsl.c2
-rw-r--r--drivers/usb/host/ehci-generic.c1
-rw-r--r--drivers/usb/host/ehci-hcd.c3
-rw-r--r--drivers/usb/host/ehci-marvell.c2
-rw-r--r--drivers/usb/host/ehci-mx5.c2
-rw-r--r--drivers/usb/host/ehci-mx6.c2
-rw-r--r--drivers/usb/host/ehci-mxc.c1
-rw-r--r--drivers/usb/host/ehci-mxs.c1
-rw-r--r--drivers/usb/host/ehci-omap.c2
-rw-r--r--drivers/usb/host/ehci-pci.c2
-rw-r--r--drivers/usb/host/ehci-rmobile.c1
-rw-r--r--drivers/usb/host/ehci-spear.c2
-rw-r--r--drivers/usb/host/ehci-tegra.c2
-rw-r--r--drivers/usb/host/ehci-vf.c2
-rw-r--r--drivers/usb/host/ehci.h1
-rw-r--r--drivers/usb/host/ohci-generic.c1
-rw-r--r--drivers/usb/host/ohci-hcd.c2
-rw-r--r--drivers/usb/host/ohci-lpc32xx.c2
-rw-r--r--drivers/usb/host/r8a66597-hcd.c2
-rw-r--r--drivers/usb/host/r8a66597.h1
-rw-r--r--drivers/usb/host/sl811-hcd.c1
-rw-r--r--drivers/usb/host/usb-sandbox.c1
-rw-r--r--drivers/usb/host/usb-uclass.c1
-rw-r--r--drivers/usb/host/utmi-armada100.c1
-rw-r--r--drivers/usb/host/xhci-dwc3.c2
-rw-r--r--drivers/usb/host/xhci-exynos5.c2
-rw-r--r--drivers/usb/host/xhci-fsl.c1
-rw-r--r--drivers/usb/host/xhci-mem.c2
-rw-r--r--drivers/usb/host/xhci-mvebu.c1
-rw-r--r--drivers/usb/host/xhci-omap.c1
-rw-r--r--drivers/usb/host/xhci-pci.c2
-rw-r--r--drivers/usb/host/xhci-rcar.c2
-rw-r--r--drivers/usb/host/xhci-ring.c2
-rw-r--r--drivers/usb/host/xhci-rockchip.c1
-rw-r--r--drivers/usb/host/xhci.c4
-rw-r--r--drivers/usb/musb-new/am35x.c2
-rw-r--r--drivers/usb/musb-new/da8xx.c2
-rw-r--r--drivers/usb/musb-new/linux-compat.h1
-rw-r--r--drivers/usb/musb-new/mt85xx.c1
-rw-r--r--drivers/usb/musb-new/musb_core.c3
-rw-r--r--drivers/usb/musb-new/musb_gadget.c2
-rw-r--r--drivers/usb/musb-new/musb_gadget_ep0.c1
-rw-r--r--drivers/usb/musb-new/musb_host.c1
-rw-r--r--drivers/usb/musb-new/musb_uboot.c1
-rw-r--r--drivers/usb/musb-new/omap2430.c1
-rw-r--r--drivers/usb/musb-new/pic32.c2
-rw-r--r--drivers/usb/musb-new/sunxi.c3
-rw-r--r--drivers/usb/musb-new/ti-musb.c1
-rw-r--r--drivers/usb/musb/am35x.c1
-rw-r--r--drivers/usb/musb/musb_core.c1
-rw-r--r--drivers/usb/musb/musb_hcd.c2
-rw-r--r--drivers/usb/musb/musb_udc.c1
-rw-r--r--drivers/usb/phy/omap_usb_phy.c1
-rw-r--r--drivers/usb/phy/rockchip_usb2_phy.c3
-rw-r--r--drivers/usb/phy/twl4030.c1
-rw-r--r--drivers/usb/ulpi/omap-ulpi-viewport.c2
-rw-r--r--drivers/usb/ulpi/ulpi-viewport.c1
-rw-r--r--drivers/usb/ulpi/ulpi.c2
-rw-r--r--drivers/video/am335x-fb.c2
-rw-r--r--drivers/video/anx9804.c1
-rw-r--r--drivers/video/anx98xx-edp.h1
-rw-r--r--drivers/video/ati_radeon_fb.c1
-rw-r--r--drivers/video/atmel_hlcdfb.c3
-rw-r--r--drivers/video/atmel_lcdfb.c3
-rw-r--r--drivers/video/backlight_gpio.c1
-rw-r--r--drivers/video/bcm2835.c2
-rw-r--r--drivers/video/bridge/anx6345.c2
-rw-r--r--drivers/video/bridge/ps862x.c2
-rw-r--r--drivers/video/bridge/ptn3460.c1
-rw-r--r--drivers/video/bridge/video-bridge-uclass.c2
-rw-r--r--drivers/video/broadwell_igd.c3
-rw-r--r--drivers/video/bus_vcxk.c1
-rw-r--r--drivers/video/cfb_console.c5
-rw-r--r--drivers/video/console_truetype.c1
-rw-r--r--drivers/video/da8xx-fb.c2
-rw-r--r--drivers/video/dw_hdmi.c2
-rw-r--r--drivers/video/dw_mipi_dsi.c2
-rw-r--r--drivers/video/efi.c1
-rw-r--r--drivers/video/exynos/exynos_dp.c2
-rw-r--r--drivers/video/exynos/exynos_dp_lowlevel.c2
-rw-r--r--drivers/video/exynos/exynos_fb.c1
-rw-r--r--drivers/video/exynos/exynos_mipi_dsi.c1
-rw-r--r--drivers/video/exynos/exynos_mipi_dsi_common.c2
-rw-r--r--drivers/video/exynos/exynos_mipi_dsi_lowlevel.c1
-rw-r--r--drivers/video/formike.c2
-rw-r--r--drivers/video/fsl_dcu_fb.c1
-rw-r--r--drivers/video/hitachi_tx18d42vm_lcd.c1
-rw-r--r--drivers/video/ihs_video_out.c1
-rw-r--r--drivers/video/imx/ipu_common.c2
-rw-r--r--drivers/video/imx/ipu_disp.c2
-rw-r--r--drivers/video/imx/mxc_ipuv3_fb.c3
-rw-r--r--drivers/video/ivybridge_igd.c2
-rw-r--r--drivers/video/ld9040.c1
-rw-r--r--drivers/video/lg4573.c7
-rw-r--r--drivers/video/logicore_dp_tx.c1
-rw-r--r--drivers/video/mali_dp.c1
-rw-r--r--drivers/video/mb862xx.c7
-rw-r--r--drivers/video/meson/meson_dw_hdmi.c2
-rw-r--r--drivers/video/meson/meson_dw_hdmi.h1
-rw-r--r--drivers/video/meson/meson_plane.c1
-rw-r--r--drivers/video/meson/meson_registers.h1
-rw-r--r--drivers/video/meson/meson_vclk.c2
-rw-r--r--drivers/video/meson/meson_venc.c1
-rw-r--r--drivers/video/meson/meson_vpu.c2
-rw-r--r--drivers/video/meson/meson_vpu_init.c1
-rw-r--r--drivers/video/mvebu_lcd.c3
-rw-r--r--drivers/video/mx3fb.c2
-rw-r--r--drivers/video/mxsfb.c3
-rw-r--r--drivers/video/orisetech_otm8009a.c1
-rw-r--r--drivers/video/pwm_backlight.c2
-rw-r--r--drivers/video/pxa_lcd.c1
-rw-r--r--drivers/video/raydium-rm68200.c1
-rw-r--r--drivers/video/rockchip/rk3288_hdmi.c1
-rw-r--r--drivers/video/rockchip/rk3288_mipi.c1
-rw-r--r--drivers/video/rockchip/rk3288_vop.c1
-rw-r--r--drivers/video/rockchip/rk3399_mipi.c1
-rw-r--r--drivers/video/rockchip/rk3399_vop.c1
-rw-r--r--drivers/video/rockchip/rk_edp.c2
-rw-r--r--drivers/video/rockchip/rk_hdmi.c1
-rw-r--r--drivers/video/rockchip/rk_lvds.c1
-rw-r--r--drivers/video/rockchip/rk_mipi.c1
-rw-r--r--drivers/video/rockchip/rk_vop.c2
-rw-r--r--drivers/video/s6e8ax0.c1
-rw-r--r--drivers/video/sandbox_sdl.c1
-rw-r--r--drivers/video/scf0403_lcd.c1
-rw-r--r--drivers/video/simple_panel.c1
-rw-r--r--drivers/video/simplefb.c1
-rw-r--r--drivers/video/ssd2828.c1
-rw-r--r--drivers/video/stm32/stm32_dsi.c2
-rw-r--r--drivers/video/stm32/stm32_ltdc.c2
-rw-r--r--drivers/video/sunxi/lcdc.c2
-rw-r--r--drivers/video/sunxi/sunxi_de2.c3
-rw-r--r--drivers/video/sunxi/sunxi_display.c1
-rw-r--r--drivers/video/sunxi/sunxi_dw_hdmi.c3
-rw-r--r--drivers/video/sunxi/sunxi_lcd.c1
-rw-r--r--drivers/video/tda19988.c2
-rw-r--r--drivers/video/tegra.c3
-rw-r--r--drivers/video/tegra124/display.c4
-rw-r--r--drivers/video/tegra124/dp.c2
-rw-r--r--drivers/video/tegra124/sor.c2
-rw-r--r--drivers/video/vidconsole-uclass.c6
-rw-r--r--drivers/video/video-uclass.c2
-rw-r--r--drivers/video/video_bmp.c1
-rw-r--r--drivers/virtio/virtio-uclass.c2
-rw-r--r--drivers/virtio/virtio_blk.c1
-rw-r--r--drivers/virtio/virtio_mmio.c2
-rw-r--r--drivers/virtio/virtio_mmio.h1
-rw-r--r--drivers/virtio/virtio_pci_legacy.c2
-rw-r--r--drivers/virtio/virtio_pci_modern.c3
-rw-r--r--drivers/virtio/virtio_ring.c2
-rw-r--r--drivers/virtio/virtio_rng.c1
-rw-r--r--drivers/virtio/virtio_sandbox.c1
-rw-r--r--drivers/w1-eeprom/w1-eeprom-uclass.c1
-rw-r--r--drivers/w1/mxc_w1.c2
-rw-r--r--drivers/w1/w1-gpio.c2
-rw-r--r--drivers/w1/w1-uclass.c1
-rw-r--r--drivers/watchdog/ast_wdt.c1
-rw-r--r--drivers/watchdog/at91sam9_wdt.c1
-rw-r--r--drivers/watchdog/bcm6345_wdt.c1
-rw-r--r--drivers/watchdog/cdns_wdt.c1
-rw-r--r--drivers/watchdog/designware_wdt.c1
-rw-r--r--drivers/watchdog/ftwdt010_wdt.c1
-rw-r--r--drivers/watchdog/mt7621_wdt.c1
-rw-r--r--drivers/watchdog/mtk_wdt.c1
-rw-r--r--drivers/watchdog/omap_wdt.c1
-rw-r--r--drivers/watchdog/orion_wdt.c2
-rw-r--r--drivers/watchdog/sp805_wdt.c1
-rw-r--r--drivers/watchdog/stm32mp_wdt.c2
-rw-r--r--drivers/watchdog/tangier_wdt.c1
-rw-r--r--drivers/watchdog/wdt-uclass.c1
-rw-r--r--drivers/watchdog/xilinx_tb_wdt.c1
-rw-r--r--env/common.c2
-rw-r--r--env/env.c3
-rw-r--r--env/ext4.c5
-rw-r--r--env/fat.c9
-rw-r--r--env/flash.c1
-rw-r--r--env/mmc.c2
-rw-r--r--env/sf.c3
-rw-r--r--examples/api/demo.c2
-rw-r--r--examples/api/libgenwrap.c4
-rw-r--r--examples/standalone/atmel_df_pow2.c3
-rw-r--r--examples/standalone/hello_world.c2
-rw-r--r--examples/standalone/smc91111_eeprom.c9
-rw-r--r--examples/standalone/smc911x_eeprom.c3
-rw-r--r--examples/standalone/stubs.c2
-rw-r--r--fs/btrfs/btrfs.c4
-rw-r--r--fs/btrfs/btrfs.h2
-rw-r--r--fs/btrfs/chunk-map.c1
-rw-r--r--fs/btrfs/compression.c1
-rw-r--r--fs/btrfs/ctree.c1
-rw-r--r--fs/btrfs/dev.c3
-rw-r--r--fs/btrfs/super.c5
-rw-r--r--fs/cramfs/cramfs.c1
-rw-r--r--fs/ext4/dev.c5
-rw-r--r--fs/ext4/ext4_common.c3
-rw-r--r--fs/ext4/ext4_common.h1
-rw-r--r--fs/ext4/ext4_journal.c2
-rw-r--r--fs/ext4/ext4_write.c3
-rw-r--r--fs/ext4/ext4fs.c5
-rw-r--r--fs/fat/fat.c8
-rw-r--r--fs/fat/fat_write.c2
-rw-r--r--fs/fs.c37
-rw-r--r--fs/fs_internal.c4
-rw-r--r--fs/jffs2/jffs2_1pass.c1
-rw-r--r--fs/reiserfs/dev.c4
-rw-r--r--fs/sandbox/sandboxfs.c3
-rw-r--r--fs/ubifs/budget.c1
-rw-r--r--fs/ubifs/debug.c1
-rw-r--r--fs/ubifs/gc.c1
-rw-r--r--fs/ubifs/io.c2
-rw-r--r--fs/ubifs/log.c1
-rw-r--r--fs/ubifs/lprops.c1
-rw-r--r--fs/ubifs/lpt.c1
-rw-r--r--fs/ubifs/lpt_commit.c2
-rw-r--r--fs/ubifs/master.c1
-rw-r--r--fs/ubifs/orphan.c1
-rw-r--r--fs/ubifs/recovery.c1
-rw-r--r--fs/ubifs/replay.c1
-rw-r--r--fs/ubifs/sb.c1
-rw-r--r--fs/ubifs/scan.c1
-rw-r--r--fs/ubifs/super.c3
-rw-r--r--fs/ubifs/tnc.c3
-rw-r--r--fs/ubifs/tnc_misc.c1
-rw-r--r--fs/ubifs/ubifs.c4
-rw-r--r--fs/yaffs2/yaffs_mtdif2.c1
-rw-r--r--fs/yaffs2/yportenv.h1
-rw-r--r--fs/zfs/dev.c4
-rw-r--r--fs/zfs/zfs.c1
-rw-r--r--include/_exports.h2
-rw-r--r--include/acpi/acpi_table.h2
-rw-r--r--include/android_ab.h5
-rw-r--r--include/asm-generic/gpio.h1
-rw-r--r--include/asm-generic/u-boot.h1
-rw-r--r--include/atf_common.h2
-rw-r--r--include/avb_verify.h2
-rw-r--r--include/bedbug/type.h5
-rw-r--r--include/bitfield.h1
-rw-r--r--include/blk.h2
-rw-r--r--include/bootm.h16
-rw-r--r--include/bootstage.h10
-rw-r--r--include/btrfs.h6
-rw-r--r--include/command.h117
-rw-r--r--include/common.h14
-rw-r--r--include/config_fsl_chain_trust.h2
-rw-r--r--include/configs/B4860QDS.h2
-rw-r--r--include/configs/C29XPCIE.h2
-rw-r--r--include/configs/M52277EVB.h2
-rw-r--r--include/configs/M5253DEMO.h2
-rw-r--r--include/configs/M5373EVB.h2
-rw-r--r--include/configs/M54418TWR.h2
-rw-r--r--include/configs/M54451EVB.h2
-rw-r--r--include/configs/M54455EVB.h2
-rw-r--r--include/configs/MPC8308RDB.h2
-rw-r--r--include/configs/MPC8313ERDB_NAND.h2
-rw-r--r--include/configs/MPC8313ERDB_NOR.h1
-rw-r--r--include/configs/MPC8323ERDB.h2
-rw-r--r--include/configs/MPC8349ITX.h1
-rw-r--r--include/configs/MPC837XERDB.h2
-rw-r--r--include/configs/MPC8536DS.h2
-rw-r--r--include/configs/MPC8544DS.h1
-rw-r--r--include/configs/MPC8548CDS.h1
-rw-r--r--include/configs/MPC8560ADS.h2
-rw-r--r--include/configs/MPC8572DS.h2
-rw-r--r--include/configs/MPC8610HPCD.h2
-rw-r--r--include/configs/MPC8641HPCN.h2
-rw-r--r--include/configs/P1010RDB.h2
-rw-r--r--include/configs/P1022DS.h2
-rw-r--r--include/configs/P1023RDB.h2
-rw-r--r--include/configs/P2041RDB.h1
-rw-r--r--include/configs/T102xQDS.h2
-rw-r--r--include/configs/T102xRDB.h2
-rw-r--r--include/configs/T1040QDS.h2
-rw-r--r--include/configs/T104xRDB.h2
-rw-r--r--include/configs/T208xQDS.h2
-rw-r--r--include/configs/T208xRDB.h2
-rw-r--r--include/configs/T4240QDS.h2
-rw-r--r--include/configs/T4240RDB.h2
-rw-r--r--include/configs/UCP1020.h2
-rw-r--r--include/configs/apalis_imx6.h2
-rw-r--r--include/configs/apf27.h2
-rw-r--r--include/configs/at91sam9263ek.h3
-rw-r--r--include/configs/bcmstb.h1
-rw-r--r--include/configs/brppt1.h1
-rw-r--r--include/configs/brsmarc1.h1
-rw-r--r--include/configs/brxre1.h1
-rw-r--r--include/configs/cgtqmx6eval.h2
-rw-r--r--include/configs/clearfog.h2
-rw-r--r--include/configs/colibri-imx8x.h1
-rw-r--r--include/configs/colibri_imx6.h2
-rw-r--r--include/configs/controlcenterd.h2
-rw-r--r--include/configs/corenet_ds.h2
-rw-r--r--include/configs/cyrus.h2
-rw-r--r--include/configs/dart_6ul.h1
-rw-r--r--include/configs/el6x_common.h2
-rw-r--r--include/configs/exynos-common.h1
-rw-r--r--include/configs/gardena-smart-gateway-at91sam.h4
-rw-r--r--include/configs/helios4.h1
-rw-r--r--include/configs/hrcon.h2
-rw-r--r--include/configs/ids8313.h2
-rw-r--r--include/configs/imx6-engicam.h1
-rw-r--r--include/configs/imx8mm_evk.h1
-rw-r--r--include/configs/imx8mn_evk.h1
-rw-r--r--include/configs/imx8mp_evk.h1
-rw-r--r--include/configs/imx8mq_evk.h1
-rw-r--r--include/configs/imx8qm_mek.h1
-rw-r--r--include/configs/imx8qm_rom7720.h2
-rw-r--r--include/configs/imx8qxp_mek.h1
-rw-r--r--include/configs/km/keymile-common.h2
-rw-r--r--include/configs/km/km-mpc83xx.h1
-rw-r--r--include/configs/km/km_arm.h2
-rw-r--r--include/configs/liteboard.h1
-rw-r--r--include/configs/mpc8308_p1m.h2
-rw-r--r--include/configs/mv-common.h2
-rw-r--r--include/configs/mx6_common.h2
-rw-r--r--include/configs/mx6cuboxi.h2
-rw-r--r--include/configs/mx6sabre_common.h2
-rw-r--r--include/configs/mx6sllevk.h1
-rw-r--r--include/configs/mx6sxsabresd.h2
-rw-r--r--include/configs/mx6ul_14x14_evk.h1
-rw-r--r--include/configs/mx6ullevk.h1
-rw-r--r--include/configs/mx7_common.h1
-rw-r--r--include/configs/nitrogen6x.h1
-rw-r--r--include/configs/p1_p2_rdb_pc.h2
-rw-r--r--include/configs/p1_twr.h2
-rw-r--r--include/configs/pcl063_ull.h1
-rw-r--r--include/configs/pcm052.h1
-rw-r--r--include/configs/pico-imx6ul.h1
-rw-r--r--include/configs/pico-imx7d.h1
-rw-r--r--include/configs/s32v234evb.h1
-rw-r--r--include/configs/sbc8548.h2
-rw-r--r--include/configs/socfpga_arria5_secu1.h1
-rw-r--r--include/configs/socfpga_common.h2
-rw-r--r--include/configs/socfpga_soc64_common.h1
-rw-r--r--include/configs/strider.h2
-rw-r--r--include/configs/tqma6.h2
-rw-r--r--include/configs/udoo.h1
-rw-r--r--include/configs/ve8313.h2
-rw-r--r--include/configs/vf610twr.h1
-rw-r--r--include/configs/wandboard.h1
-rw-r--r--include/configs/wb45n.h1
-rw-r--r--include/configs/xpedite517x.h1
-rw-r--r--include/configs/xpedite537x.h1
-rw-r--r--include/configs/xpedite550x.h1
-rw-r--r--include/cpu_func.h2
-rw-r--r--include/dma.h1
-rw-r--r--include/dwc3-sti-glue.h1
-rw-r--r--include/dwmmc.h2
-rw-r--r--include/efi_loader.h4
-rw-r--r--include/elf.h4
-rw-r--r--include/env_default.h1
-rw-r--r--include/environment/ti/boot.h2
-rw-r--r--include/exception.h12
-rw-r--r--include/exports.h2
-rw-r--r--include/ext4fs.h6
-rw-r--r--include/ext_common.h18
-rw-r--r--include/faraday/ftpci100.h1
-rw-r--r--include/faraday/ftsdc010.h1
-rw-r--r--include/faraday/ftsdmc021.h1
-rw-r--r--include/fat.h4
-rw-r--r--include/fb_mmc.h8
-rw-r--r--include/flash.h24
-rw-r--r--include/fs.h41
-rw-r--r--include/fs_internal.h2
-rw-r--r--include/fsl-mc/fsl_mc.h1
-rw-r--r--include/fsl_ddr.h4
-rw-r--r--include/fsl_ifc.h1
-rw-r--r--include/fsl_validate.h14
-rw-r--r--include/gzip.h2
-rw-r--r--include/hash.h6
-rw-r--r--include/i2c.h2
-rw-r--r--include/image.h14
-rw-r--r--include/initcall.h5
-rw-r--r--include/kgdb.h2
-rw-r--r--include/linux/bitops.h4
-rw-r--r--include/linux/compat.h1
-rw-r--r--include/linux/mtd/rawnand.h1
-rw-r--r--include/linux/soc/ti/cppi5.h1
-rw-r--r--include/linux/soc/ti/k3-navss-ringacc.h1
-rw-r--r--include/linux/soc/ti/ti_sci_protocol.h1
-rw-r--r--include/log.h7
-rw-r--r--include/mipi_dsi.h1
-rw-r--r--include/mmc.h1
-rw-r--r--include/net.h15
-rw-r--r--include/net/pfe_eth/pfe/cbus/class_csr.h1
-rw-r--r--include/net/pfe_eth/pfe/cbus/emac.h1
-rw-r--r--include/net/pfe_eth/pfe/cbus/hif.h1
-rw-r--r--include/net/pfe_eth/pfe/cbus/tmu_csr.h1
-rw-r--r--include/net/pfe_eth/pfe/pfe_hw.h1
-rw-r--r--include/net/pfe_eth/pfe_eth.h1
-rw-r--r--include/part.h40
-rw-r--r--include/pch.h1
-rw-r--r--include/power/stpmic1.h1
-rw-r--r--include/regmap.h2
-rw-r--r--include/reiserfs.h5
-rw-r--r--include/sandboxfs.h5
-rw-r--r--include/scsi.h1
-rw-r--r--include/sdhci.h1
-rw-r--r--include/search.h2
-rw-r--r--include/spi.h1
-rw-r--r--include/spl.h4
-rw-r--r--include/tee.h1
-rw-r--r--include/tee/optee.h7
-rw-r--r--include/test/suites.h29
-rw-r--r--include/test/ut.h1
-rw-r--r--include/tpm-common.h16
-rw-r--r--include/tpm-v1.h1
-rw-r--r--include/ubifs_uboot.h5
-rw-r--r--include/virtio.h2
-rw-r--r--include/vsc9953.h1
-rw-r--r--include/vxworks.h9
-rw-r--r--include/wait_bit.h4
-rw-r--r--include/wdt.h1
-rw-r--r--include/xyzModem.h2
-rw-r--r--include/zfs_common.h2
-rw-r--r--include/zynqmppl.h1
-rw-r--r--lib/acpi/acpi_table.c1
-rw-r--r--lib/aes.c1
-rw-r--r--lib/asm-offsets.c1
-rw-r--r--lib/asn1_decoder.c1
-rw-r--r--lib/bch.c1
-rw-r--r--lib/binman.c1
-rw-r--r--lib/bzip2/bzlib_blocksort.c1
-rw-r--r--lib/circbuf.c1
-rw-r--r--lib/crypto/asymmetric_type.c2
-rw-r--r--lib/crypto/pkcs7_parser.c1
-rw-r--r--lib/crypto/public_key.c1
-rw-r--r--lib/crypto/x509_cert_parser.c1
-rw-r--r--lib/dhry/cmd_dhry.c3
-rw-r--r--lib/div64.c1
-rw-r--r--lib/efi/efi_app.c1
-rw-r--r--lib/efi_driver/efi_block_device.c2
-rw-r--r--lib/efi_driver/efi_uclass.c1
-rw-r--r--lib/efi_loader/efi_acpi.c1
-rw-r--r--lib/efi_loader/efi_bootmgr.c1
-rw-r--r--lib/efi_loader/efi_boottime.c1
-rw-r--r--lib/efi_loader/efi_device_path.c6
-rw-r--r--lib/efi_loader/efi_device_path_to_text.c1
-rw-r--r--lib/efi_loader/efi_disk.c6
-rw-r--r--lib/efi_loader/efi_file.c4
-rw-r--r--lib/efi_loader/efi_gop.c1
-rw-r--r--lib/efi_loader/efi_memory.c1
-rw-r--r--lib/efi_loader/efi_net.c1
-rw-r--r--lib/efi_loader/efi_rng.c1
-rw-r--r--lib/efi_loader/efi_runtime.c1
-rw-r--r--lib/efi_loader/efi_smbios.c1
-rw-r--r--lib/efi_loader/efi_variable.c3
-rw-r--r--lib/efi_selftest/efi_selftest_block_device.c1
-rw-r--r--lib/efi_selftest/efi_selftest_console.c1
-rw-r--r--lib/efi_selftest/efi_selftest_snp.c1
-rw-r--r--lib/fdtdec.c2
-rw-r--r--lib/fdtdec_common.c1
-rw-r--r--lib/fdtdec_test.c5
-rw-r--r--lib/gunzip.c1
-rw-r--r--lib/hashtable.c3
-rw-r--r--lib/image-sparse.c3
-rw-r--r--lib/libavb/avb_cmdline.c1
-rw-r--r--lib/libavb/avb_descriptor.c1
-rw-r--r--lib/libavb/avb_slot_verify.c1
-rw-r--r--lib/libavb/avb_util.c1
-rw-r--r--lib/linux_compat.c1
-rw-r--r--lib/list_sort.c1
-rw-r--r--lib/lmb.c2
-rw-r--r--lib/lzma/LzmaTools.c1
-rw-r--r--lib/membuff.c1
-rw-r--r--lib/net_utils.c1
-rw-r--r--lib/of_live.c1
-rw-r--r--lib/optee/optee.c1
-rw-r--r--lib/panic.c1
-rw-r--r--lib/physmem.c1
-rw-r--r--lib/qsort.c1
-rw-r--r--lib/rsa/rsa-mod-exp.c1
-rw-r--r--lib/rsa/rsa-verify.c1
-rw-r--r--lib/slre.c1
-rw-r--r--lib/time.c5
-rw-r--r--lib/tpm-common.c1
-rw-r--r--lib/tpm-v1.c1
-rw-r--r--lib/tpm-v2.c1
-rw-r--r--lib/uuid.c5
-rw-r--r--lib/vsprintf.c1
-rw-r--r--net/arp.c4
-rw-r--r--net/bootp.c5
-rw-r--r--net/dns.c1
-rw-r--r--net/eth-uclass.c2
-rw-r--r--net/eth_common.c1
-rw-r--r--net/eth_legacy.c3
-rw-r--r--net/fastboot.c1
-rw-r--r--net/link_local.c1
-rw-r--r--net/mdio-mux-uclass.c1
-rw-r--r--net/mdio-uclass.c1
-rw-r--r--net/net.c2
-rw-r--r--net/nfs.c1
-rw-r--r--net/ping.c2
-rw-r--r--net/rarp.c1
-rw-r--r--net/sntp.c1
-rw-r--r--net/tftp.c2
-rw-r--r--post/cpu/mpc83xx/ecc.c1
-rw-r--r--post/drivers/i2c.c1
-rw-r--r--post/drivers/memory.c1
-rw-r--r--post/lib_powerpc/multi.c1
-rw-r--r--post/post.c2
-rw-r--r--test/bloblist.c3
-rw-r--r--test/cmd_ut.c14
-rw-r--r--test/command_ut.c5
-rw-r--r--test/compression.c5
-rw-r--r--test/dm/axi.c1
-rw-r--r--test/dm/blk.c1
-rw-r--r--test/dm/board.c1
-rw-r--r--test/dm/bootcount.c1
-rw-r--r--test/dm/bus.c1
-rw-r--r--test/dm/clk.c1
-rw-r--r--test/dm/core.c1
-rw-r--r--test/dm/cpu.c1
-rw-r--r--test/dm/devres.c1
-rw-r--r--test/dm/eth.c1
-rw-r--r--test/dm/gpio.c1
-rw-r--r--test/dm/mdio.c1
-rw-r--r--test/dm/mmc.c1
-rw-r--r--test/dm/ofnode.c1
-rw-r--r--test/dm/phy.c1
-rw-r--r--test/dm/regmap.c1
-rw-r--r--test/dm/regulator.c1
-rw-r--r--test/dm/reset.c1
-rw-r--r--test/dm/rng.c1
-rw-r--r--test/dm/rtc.c1
-rw-r--r--test/dm/serial.c1
-rw-r--r--test/dm/syscon.c1
-rw-r--r--test/dm/tee.c1
-rw-r--r--test/dm/test-driver.c1
-rw-r--r--test/dm/test-fdt.c1
-rw-r--r--test/dm/test-main.c3
-rw-r--r--test/dm/test-uclass.c1
-rw-r--r--test/dm/usb.c1
-rw-r--r--test/dm/video.c1
-rw-r--r--test/env/cmd_ut_env.c2
-rw-r--r--test/env/hashtable.c1
-rw-r--r--test/lib/cmd_ut_lib.c2
-rw-r--r--test/lib/lmb.c1
-rw-r--r--test/lib/string.c1
-rw-r--r--test/lib/test_aes.c1
-rw-r--r--test/log/log_test.c4
-rw-r--r--test/log/test-main.c3
-rw-r--r--test/optee/cmd_ut_optee.c3
-rw-r--r--test/overlay/cmd_ut_overlay.c4
-rw-r--r--test/print_ut.c4
-rw-r--r--test/str_ut.c2
-rw-r--r--test/time_ut.c3
-rw-r--r--test/unicode_ut.c3
-rw-r--r--tools/imx8image.c1
-rw-r--r--tools/proftool.c2
3371 files changed, 7541 insertions, 1968 deletions
diff --git a/api/api.c b/api/api.c
index 4fc451a83d..c7f5db776a 100644
--- a/api/api.c
+++ b/api/api.c
@@ -11,6 +11,7 @@
#include <env.h>
#include <malloc.h>
#include <env_internal.h>
+#include <linux/delay.h>
#include <linux/types.h>
#include <api_public.h>
#include <u-boot/crc.h>
diff --git a/api/api_display.c b/api/api_display.c
index 8ae358abb1..4f2cdd7330 100644
--- a/api/api_display.c
+++ b/api/api_display.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <api_public.h>
#include <lcd.h>
+#include <log.h>
#include <video_font.h> /* Get font width and height */
/* lcd.h needs BMP_LOGO_HEIGHT to calculate CONSOLE_ROWS */
diff --git a/api/api_storage.c b/api/api_storage.c
index 7ae03ac230..a0dacad1a5 100644
--- a/api/api_storage.c
+++ b/api/api_storage.c
@@ -8,6 +8,7 @@
#include <config.h>
#include <common.h>
#include <api_public.h>
+#include <part.h>
#if defined(CONFIG_CMD_USB) && defined(CONFIG_USB_STORAGE)
#include <usb.h>
diff --git a/arch/arc/include/asm/arcregs.h b/arch/arc/include/asm/arcregs.h
index 516c14e105..a9f54f61e0 100644
--- a/arch/arc/include/asm/arcregs.h
+++ b/arch/arc/include/asm/arcregs.h
@@ -109,6 +109,8 @@
#define ARC_AUX_SUBSYS_BUILD 0xF0
#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+
/* Accessors for auxiliary registers */
#define read_aux_reg(reg) __builtin_arc_lr(reg)
diff --git a/arch/arc/lib/bootm.c b/arch/arc/lib/bootm.c
index d38c18ef8f..63d6207c04 100644
--- a/arch/arc/lib/bootm.c
+++ b/arch/arc/lib/bootm.c
@@ -3,9 +3,14 @@
* Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
*/
+#include <common.h>
+#include <bootstage.h>
+#include <env.h>
+#include <image.h>
#include <irq_func.h>
+#include <lmb.h>
+#include <log.h>
#include <asm/cache.h>
-#include <common.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arc/lib/cache.c b/arch/arc/lib/cache.c
index 8a1d67870a..85651b219c 100644
--- a/arch/arc/lib/cache.c
+++ b/arch/arc/lib/cache.c
@@ -6,6 +6,7 @@
#include <config.h>
#include <common.h>
#include <cpu_func.h>
+#include <linux/bitops.h>
#include <linux/compiler.h>
#include <linux/kernel.h>
#include <linux/log2.h>
diff --git a/arch/arc/lib/cpu.c b/arch/arc/lib/cpu.c
index 83246550ec..27b5832a0c 100644
--- a/arch/arc/lib/cpu.c
+++ b/arch/arc/lib/cpu.c
@@ -4,10 +4,12 @@
*/
#include <common.h>
+#include <init.h>
#include <malloc.h>
#include <vsprintf.h>
#include <asm/arcregs.h>
#include <asm/cache.h>
+#include <linux/bitops.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arc/lib/init_helpers.c b/arch/arc/lib/init_helpers.c
index c853f25d34..023eae1907 100644
--- a/arch/arc/lib/init_helpers.c
+++ b/arch/arc/lib/init_helpers.c
@@ -3,6 +3,7 @@
* Copyright (C) 2013-2015 Synopsys, Inc. All rights reserved.
*/
+#include <init.h>
#include <asm/cache.h>
#include <common.h>
diff --git a/arch/arc/lib/relocate.c b/arch/arc/lib/relocate.c
index 4ffba84eeb..6882ebec6d 100644
--- a/arch/arc/lib/relocate.c
+++ b/arch/arc/lib/relocate.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <elf.h>
+#include <log.h>
#include <asm-generic/sections.h>
extern ulong __image_copy_start;
diff --git a/arch/arc/lib/reset.c b/arch/arc/lib/reset.c
index 30dd4b5238..fbb56ec83a 100644
--- a/arch/arc/lib/reset.c
+++ b/arch/arc/lib/reset.c
@@ -13,7 +13,7 @@ __weak void reset_cpu(ulong addr)
__builtin_arc_brk();
}
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
printf("Resetting the board...\n");
diff --git a/arch/arm/cpu/arm11/cpu.c b/arch/arm/cpu/arm11/cpu.c
index 177d1f40b9..ffe35111d5 100644
--- a/arch/arm/cpu/arm11/cpu.c
+++ b/arch/arm/cpu/arm11/cpu.c
@@ -18,6 +18,7 @@
#include <command.h>
#include <cpu_func.h>
#include <irq_func.h>
+#include <asm/cache.h>
#include <asm/system.h>
static void cache_flush(void);
diff --git a/arch/arm/cpu/arm1136/mx31/generic.c b/arch/arm/cpu/arm1136/mx31/generic.c
index 3f6af6f5a3..a3d4f14796 100644
--- a/arch/arm/cpu/arm1136/mx31/generic.c
+++ b/arch/arm/cpu/arm1136/mx31/generic.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <div64.h>
+#include <init.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/clock.h>
#include <asm/io.h>
diff --git a/arch/arm/cpu/arm1136/mx31/timer.c b/arch/arm/cpu/arm1136/mx31/timer.c
index 3d07ee6809..a913860491 100644
--- a/arch/arm/cpu/arm1136/mx31/timer.c
+++ b/arch/arm/cpu/arm1136/mx31/timer.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/arch/imx-regs.h>
#include <asm/io.h>
diff --git a/arch/arm/cpu/arm1136/mx35/generic.c b/arch/arm/cpu/arm1136/mx35/generic.c
index 45bf49b5ac..e6fff5b220 100644
--- a/arch/arm/cpu/arm1136/mx35/generic.c
+++ b/arch/arm/cpu/arm1136/mx35/generic.c
@@ -8,7 +8,10 @@
#include <common.h>
#include <clock_legacy.h>
+#include <command.h>
#include <div64.h>
+#include <init.h>
+#include <net.h>
#include <asm/io.h>
#include <linux/errno.h>
#include <asm/arch/imx-regs.h>
@@ -377,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/arm1136/mx35/timer.c b/arch/arm/cpu/arm1136/mx35/timer.c
index c1cdf35fb2..f2541c398d 100644
--- a/arch/arm/cpu/arm1136/mx35/timer.c
+++ b/arch/arm/cpu/arm1136/mx35/timer.c
@@ -7,9 +7,11 @@
*/
#include <common.h>
+#include <init.h>
#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/arm920t/ep93xx/timer.c b/arch/arm/cpu/arm920t/ep93xx/timer.c
index 4829c996be..892bb06db1 100644
--- a/arch/arm/cpu/arm920t/ep93xx/timer.c
+++ b/arch/arm/cpu/arm920t/ep93xx/timer.c
@@ -12,7 +12,9 @@
*/
#include <common.h>
+#include <init.h>
#include <time.h>
+#include <linux/delay.h>
#include <linux/types.h>
#include <asm/arch/ep93xx.h>
#include <asm/io.h>
diff --git a/arch/arm/cpu/arm920t/imx/timer.c b/arch/arm/cpu/arm920t/imx/timer.c
index 21129a7901..e9d5577921 100644
--- a/arch/arm/cpu/arm920t/imx/timer.c
+++ b/arch/arm/cpu/arm920t/imx/timer.c
@@ -18,6 +18,7 @@
#if defined (CONFIG_IMX)
#include <asm/arch/imx-regs.h>
+#include <linux/delay.h>
int timer_init (void)
{
@@ -48,7 +49,7 @@ ulong get_timer (ulong base)
return get_timer_masked() - base;
}
-void __udelay (unsigned long usec)
+void __udelay(unsigned long usec)
{
ulong endtime = get_timer_masked() + usec;
signed long diff;
diff --git a/arch/arm/cpu/arm926ejs/armada100/cpu.c b/arch/arm/cpu/arm926ejs/armada100/cpu.c
index 0c81de7e36..96726b3144 100644
--- a/arch/arm/cpu/arm926ejs/armada100/cpu.c
+++ b/arch/arm/cpu/arm926ejs/armada100/cpu.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
#include <asm/arch/cpu.h>
#include <asm/arch/armada100.h>
diff --git a/arch/arm/cpu/arm926ejs/armada100/dram.c b/arch/arm/cpu/arm926ejs/armada100/dram.c
index f4e1f0db09..da0615faf1 100644
--- a/arch/arm/cpu/arm926ejs/armada100/dram.c
+++ b/arch/arm/cpu/arm926ejs/armada100/dram.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/arch/armada100.h>
diff --git a/arch/arm/cpu/arm926ejs/armada100/timer.c b/arch/arm/cpu/arm926ejs/armada100/timer.c
index f4962ec45f..0f1e68c835 100644
--- a/arch/arm/cpu/arm926ejs/armada100/timer.c
+++ b/arch/arm/cpu/arm926ejs/armada100/timer.c
@@ -8,9 +8,11 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
#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/cache.c b/arch/arm/cpu/arm926ejs/cache.c
index 7b7eaaf31d..acab9bccc0 100644
--- a/arch/arm/cpu/arm926ejs/cache.c
+++ b/arch/arm/cpu/arm926ejs/cache.c
@@ -4,6 +4,7 @@
* Ilya Yanok, EmCraft Systems
*/
#include <cpu_func.h>
+#include <asm/cache.h>
#include <linux/types.h>
#include <common.h>
diff --git a/arch/arm/cpu/arm926ejs/cpu.c b/arch/arm/cpu/arm926ejs/cpu.c
index 6ab320da7d..93d7a02ed4 100644
--- a/arch/arm/cpu/arm926ejs/cpu.c
+++ b/arch/arm/cpu/arm926ejs/cpu.c
@@ -16,6 +16,7 @@
#include <command.h>
#include <cpu_func.h>
#include <irq_func.h>
+#include <asm/cache.h>
#include <asm/system.h>
static void cache_flush(void);
diff --git a/arch/arm/cpu/arm926ejs/mx25/generic.c b/arch/arm/cpu/arm926ejs/mx25/generic.c
index 09bda0e339..8f6cd4dc19 100644
--- a/arch/arm/cpu/arm926ejs/mx25/generic.c
+++ b/arch/arm/cpu/arm926ejs/mx25/generic.c
@@ -11,6 +11,8 @@
#include <common.h>
#include <clock_legacy.h>
#include <div64.h>
+#include <init.h>
+#include <net.h>
#include <netdev.h>
#include <vsprintf.h>
#include <asm/io.h>
diff --git a/arch/arm/cpu/arm926ejs/mx25/timer.c b/arch/arm/cpu/arm926ejs/mx25/timer.c
index 04698fe563..4b726d5c73 100644
--- a/arch/arm/cpu/arm926ejs/mx25/timer.c
+++ b/arch/arm/cpu/arm926ejs/mx25/timer.c
@@ -20,8 +20,10 @@
*/
#include <common.h>
+#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/generic.c b/arch/arm/cpu/arm926ejs/mx27/generic.c
index 9bed0e91be..a003ab816a 100644
--- a/arch/arm/cpu/arm926ejs/mx27/generic.c
+++ b/arch/arm/cpu/arm926ejs/mx27/generic.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <div64.h>
+#include <net.h>
#include <netdev.h>
#include <vsprintf.h>
#include <asm/io.h>
diff --git a/arch/arm/cpu/arm926ejs/mx27/timer.c b/arch/arm/cpu/arm926ejs/mx27/timer.c
index f51f0df8ec..408e88aa12 100644
--- a/arch/arm/cpu/arm926ejs/mx27/timer.c
+++ b/arch/arm/cpu/arm926ejs/mx27/timer.c
@@ -17,9 +17,12 @@
#include <common.h>
#include <div64.h>
+#include <init.h>
#include <time.h>
#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/clock.c b/arch/arm/cpu/arm926ejs/mxs/clock.c
index 43d044d917..4e1cf3a1e3 100644
--- a/arch/arm/cpu/arm926ejs/mxs/clock.c
+++ b/arch/arm/cpu/arm926ejs/mxs/clock.c
@@ -10,6 +10,7 @@
*/
#include <common.h>
+#include <log.h>
#include <linux/errno.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
diff --git a/arch/arm/cpu/arm926ejs/mxs/mxs.c b/arch/arm/cpu/arm926ejs/mxs/mxs.c
index 16c080a1e1..12ebc1c802 100644
--- a/arch/arm/cpu/arm926ejs/mxs/mxs.c
+++ b/arch/arm/cpu/arm926ejs/mxs/mxs.c
@@ -10,8 +10,12 @@
*/
#include <common.h>
+#include <command.h>
#include <cpu_func.h>
#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>
@@ -185,7 +189,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/mxs/spl_boot.c b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
index 9168b91f27..565392eab5 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
@@ -8,6 +8,8 @@
#include <common.h>
#include <config.h>
+#include <init.h>
+#include <log.h>
#include <serial.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_lradc_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_lradc_init.c
index cfd6c4a10f..2cfbd78095 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_lradc_init.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_lradc_init.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <config.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c
index 542543cc28..a94803ee93 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <config.h>
#include <init.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/sys_proto.h>
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
index 7c57cab0b1..35ea71a5ba 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <config.h>
#include <hang.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
diff --git a/arch/arm/cpu/arm926ejs/mxs/timer.c b/arch/arm/cpu/arm926ejs/mxs/timer.c
index 226401dd6e..5ab4ed0c5a 100644
--- a/arch/arm/cpu/arm926ejs/mxs/timer.c
+++ b/arch/arm/cpu/arm926ejs/mxs/timer.c
@@ -10,10 +10,12 @@
*/
#include <common.h>
+#include <init.h>
#include <time.h>
#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/cpu.c b/arch/arm/cpu/arm926ejs/spear/cpu.c
index 51c4a730f4..2106541074 100644
--- a/arch/arm/cpu/arm926ejs/spear/cpu.c
+++ b/arch/arm/cpu/arm926ejs/spear/cpu.c
@@ -5,6 +5,8 @@
*/
#include <common.h>
+#include <command.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/arch/hardware.h>
#include <asm/arch/spr_misc.h>
@@ -80,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/reset.c b/arch/arm/cpu/arm926ejs/spear/reset.c
index 3b884cd0d3..a316540d52 100644
--- a/arch/arm/cpu/arm926ejs/spear/reset.c
+++ b/arch/arm/cpu/arm926ejs/spear/reset.c
@@ -9,6 +9,7 @@
#include <asm/io.h>
#include <asm/arch/hardware.h>
#include <asm/arch/spr_syscntl.h>
+#include <linux/delay.h>
void reset_cpu(ulong ignored)
{
diff --git a/arch/arm/cpu/arm926ejs/spear/spl.c b/arch/arm/cpu/arm926ejs/spear/spl.c
index a919a455eb..08b98a2d06 100644
--- a/arch/arm/cpu/arm926ejs/spear/spl.c
+++ b/arch/arm/cpu/arm926ejs/spear/spl.c
@@ -7,9 +7,11 @@
*/
#include <common.h>
+#include <init.h>
#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/spr_misc.c b/arch/arm/cpu/arm926ejs/spear/spr_misc.c
index d5be646555..998423b652 100644
--- a/arch/arm/cpu/arm926ejs/spear/spr_misc.c
+++ b/arch/arm/cpu/arm926ejs/spear/spr_misc.c
@@ -182,7 +182,8 @@ static int write_mac(uchar *mac)
}
#endif
-int do_chip_config(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_chip_config(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
void (*sram_setfreq) (unsigned int, unsigned int);
unsigned int frequency;
diff --git a/arch/arm/cpu/arm926ejs/spear/timer.c b/arch/arm/cpu/arm926ejs/spear/timer.c
index 28c09e9fd6..dd0f15c0ce 100644
--- a/arch/arm/cpu/arm926ejs/spear/timer.c
+++ b/arch/arm/cpu/arm926ejs/spear/timer.c
@@ -5,11 +5,14 @@
*/
#include <common.h>
+#include <init.h>
#include <time.h>
#include <asm/io.h>
#include <asm/arch/hardware.h>
#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/arch_timer.c b/arch/arm/cpu/armv7/arch_timer.c
index 2eb571050a..871629c233 100644
--- a/arch/arm/cpu/armv7/arch_timer.c
+++ b/arch/arm/cpu/armv7/arch_timer.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <init.h>
#include <time.h>
#include <asm/io.h>
#include <div64.h>
diff --git a/arch/arm/cpu/armv7/bcm235xx/clk-core.c b/arch/arm/cpu/armv7/bcm235xx/clk-core.c
index 72f8eb7222..d7edefee23 100644
--- a/arch/arm/cpu/armv7/bcm235xx/clk-core.c
+++ b/arch/arm/cpu/armv7/bcm235xx/clk-core.c
@@ -10,7 +10,9 @@
*/
#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-core.h b/arch/arm/cpu/armv7/bcm235xx/clk-core.h
index ac475b6dc3..ace384dea7 100644
--- a/arch/arm/cpu/armv7/bcm235xx/clk-core.h
+++ b/arch/arm/cpu/armv7/bcm235xx/clk-core.h
@@ -4,6 +4,7 @@
*/
#include <linux/stddef.h>
+#include <linux/stringify.h>
#ifdef CONFIG_CLK_DEBUG
#undef writel
diff --git a/arch/arm/cpu/armv7/bcm235xx/clk-eth.c b/arch/arm/cpu/armv7/bcm235xx/clk-eth.c
index 618af709fa..209ceca9a0 100644
--- a/arch/arm/cpu/armv7/bcm235xx/clk-eth.c
+++ b/arch/arm/cpu/armv7/bcm235xx/clk-eth.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <asm/io.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <asm/arch/sysmap.h>
#include <asm/kona-common/clk.h>
diff --git a/arch/arm/cpu/armv7/bcm281xx/clk-core.c b/arch/arm/cpu/armv7/bcm281xx/clk-core.c
index 6a36f948f0..26b673a540 100644
--- a/arch/arm/cpu/armv7/bcm281xx/clk-core.c
+++ b/arch/arm/cpu/armv7/bcm281xx/clk-core.c
@@ -10,7 +10,9 @@
*/
#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-core.h b/arch/arm/cpu/armv7/bcm281xx/clk-core.h
index a736ae9e62..f0fbff081d 100644
--- a/arch/arm/cpu/armv7/bcm281xx/clk-core.h
+++ b/arch/arm/cpu/armv7/bcm281xx/clk-core.h
@@ -4,6 +4,7 @@
*/
#include <linux/stddef.h>
+#include <linux/stringify.h>
#ifdef CONFIG_CLK_DEBUG
#undef writel
diff --git a/arch/arm/cpu/armv7/bcm281xx/clk-eth.c b/arch/arm/cpu/armv7/bcm281xx/clk-eth.c
index 618af709fa..209ceca9a0 100644
--- a/arch/arm/cpu/armv7/bcm281xx/clk-eth.c
+++ b/arch/arm/cpu/armv7/bcm281xx/clk-eth.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <asm/io.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <asm/arch/sysmap.h>
#include <asm/kona-common/clk.h>
diff --git a/arch/arm/cpu/armv7/cache_v7.c b/arch/arm/cpu/armv7/cache_v7.c
index 99eb7db342..146cf52608 100644
--- a/arch/arm/cpu/armv7/cache_v7.c
+++ b/arch/arm/cpu/armv7/cache_v7.c
@@ -5,6 +5,7 @@
* Aneesh V <aneesh@ti.com>
*/
#include <cpu_func.h>
+#include <asm/cache.h>
#include <linux/types.h>
#include <common.h>
#include <asm/armv7.h>
diff --git a/arch/arm/cpu/armv7/exception_level.c b/arch/arm/cpu/armv7/exception_level.c
index 6648aed291..f6d25bb682 100644
--- a/arch/arm/cpu/armv7/exception_level.c
+++ b/arch/arm/cpu/armv7/exception_level.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <bootm.h>
#include <cpu_func.h>
+#include <log.h>
#include <asm/armv7.h>
#include <asm/secure.h>
#include <asm/setjmp.h>
diff --git a/arch/arm/cpu/armv7/iproc-common/hwinit-common.c b/arch/arm/cpu/armv7/iproc-common/hwinit-common.c
index a5445338cb..896d2f9569 100644
--- a/arch/arm/cpu/armv7/iproc-common/hwinit-common.c
+++ b/arch/arm/cpu/armv7/iproc-common/hwinit-common.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <asm/cache.h>
#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
void enable_caches(void)
diff --git a/arch/arm/cpu/armv7/iproc-common/timer.c b/arch/arm/cpu/armv7/iproc-common/timer.c
index 668b5e11a6..a4255a44c0 100644
--- a/arch/arm/cpu/armv7/iproc-common/timer.c
+++ b/arch/arm/cpu/armv7/iproc-common/timer.c
@@ -5,10 +5,12 @@
#include <common.h>
#include <div64.h>
+#include <init.h>
#include <time.h>
#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/kona-common/hwinit-common.c b/arch/arm/cpu/armv7/kona-common/hwinit-common.c
index 6bf89e07d8..cfc7c9fbc6 100644
--- a/arch/arm/cpu/armv7/kona-common/hwinit-common.c
+++ b/arch/arm/cpu/armv7/kona-common/hwinit-common.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <asm/cache.h>
#include <linux/sizes.h>
#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
diff --git a/arch/arm/cpu/armv7/ls102xa/cpu.c b/arch/arm/cpu/armv7/ls102xa/cpu.c
index 664c9c1f4d..91e988217a 100644
--- a/arch/arm/cpu/armv7/ls102xa/cpu.c
+++ b/arch/arm/cpu/armv7/ls102xa/cpu.c
@@ -5,6 +5,8 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
+#include <net.h>
#include <vsprintf.h>
#include <asm/arch/clock.h>
#include <asm/io.h>
@@ -16,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/fdt.c b/arch/arm/cpu/armv7/ls102xa/fdt.c
index 16ab8676fe..56ca7b0164 100644
--- a/arch/arm/cpu/armv7/ls102xa/fdt.c
+++ b/arch/arm/cpu/armv7/ls102xa/fdt.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <clock_legacy.h>
+#include <net.h>
#include <linux/libfdt.h>
#include <fdt_support.h>
#include <asm/io.h>
diff --git a/arch/arm/cpu/armv7/ls102xa/soc.c b/arch/arm/cpu/armv7/ls102xa/soc.c
index a779d33739..8a95ee86a9 100644
--- a/arch/arm/cpu/armv7/ls102xa/soc.c
+++ b/arch/arm/cpu/armv7/ls102xa/soc.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/arch/clock.h>
#include <asm/io.h>
#include <asm/arch/fsl_serdes.h>
diff --git a/arch/arm/cpu/armv7/ls102xa/timer.c b/arch/arm/cpu/armv7/ls102xa/timer.c
index a5f4e31ac7..2a32b30999 100644
--- a/arch/arm/cpu/armv7/ls102xa/timer.c
+++ b/arch/arm/cpu/armv7/ls102xa/timer.c
@@ -4,11 +4,13 @@
*/
#include <common.h>
+#include <init.h>
#include <time.h>
#include <asm/io.h>
#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/mpu_v7r.c b/arch/arm/cpu/armv7/mpu_v7r.c
index 6deecfdc23..57ab640e26 100644
--- a/arch/arm/cpu/armv7/mpu_v7r.c
+++ b/arch/arm/cpu/armv7/mpu_v7r.c
@@ -12,6 +12,7 @@
#include <asm/armv7.h>
#include <asm/system.h>
#include <asm/barriers.h>
+#include <linux/bitops.h>
#include <linux/compiler.h>
#include <asm/armv7_mpu.h>
diff --git a/arch/arm/cpu/armv7/s5p-common/cpu_info.c b/arch/arm/cpu/armv7/s5p-common/cpu_info.c
index 5f4076d6b7..7790f087a0 100644
--- a/arch/arm/cpu/armv7/s5p-common/cpu_info.c
+++ b/arch/arm/cpu/armv7/s5p-common/cpu_info.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
#include <fdtdec.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/arch/clk.h>
diff --git a/arch/arm/cpu/armv7/s5p-common/timer.c b/arch/arm/cpu/armv7/s5p-common/timer.c
index e54cfb06dc..3064fd25d4 100644
--- a/arch/arm/cpu/armv7/s5p-common/timer.c
+++ b/arch/arm/cpu/armv7/s5p-common/timer.c
@@ -8,10 +8,12 @@
#include <common.h>
#include <div64.h>
+#include <init.h>
#include <time.h>
#include <asm/io.h>
#include <asm/arch/pwm.h>
#include <asm/arch/clk.h>
+#include <linux/delay.h>
/* Use the old PWM interface for now */
#undef CONFIG_DM_PWM
diff --git a/arch/arm/cpu/armv7/stv0991/reset.c b/arch/arm/cpu/armv7/stv0991/reset.c
index 008e271dcc..fb67de10f4 100644
--- a/arch/arm/cpu/armv7/stv0991/reset.c
+++ b/arch/arm/cpu/armv7/stv0991/reset.c
@@ -8,6 +8,7 @@
#include <cpu_func.h>
#include <asm/io.h>
#include <asm/arch/stv0991_wdru.h>
+#include <linux/delay.h>
void reset_cpu(ulong ignored)
{
puts("System is going to reboot ...\n");
diff --git a/arch/arm/cpu/armv7/stv0991/timer.c b/arch/arm/cpu/armv7/stv0991/timer.c
index 695bdd7a5c..919529aa1b 100644
--- a/arch/arm/cpu/armv7/stv0991/timer.c
+++ b/arch/arm/cpu/armv7/stv0991/timer.c
@@ -5,11 +5,13 @@
*/
#include <common.h>
+#include <init.h>
#include <time.h>
#include <asm/io.h>
#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/psci.c b/arch/arm/cpu/armv7/sunxi/psci.c
index 2c5d99e9ac..1ac50f558a 100644
--- a/arch/arm/cpu/armv7/sunxi/psci.c
+++ b/arch/arm/cpu/armv7/sunxi/psci.c
@@ -8,6 +8,7 @@
*/
#include <config.h>
#include <common.h>
+#include <asm/cache.h>
#include <asm/arch/cpu.h>
#include <asm/arch/cpucfg.h>
diff --git a/arch/arm/cpu/armv7/sunxi/timer.c b/arch/arm/cpu/armv7/sunxi/timer.c
index 6bda5fbbb6..65b64b5ac7 100644
--- a/arch/arm/cpu/armv7/sunxi/timer.c
+++ b/arch/arm/cpu/armv7/sunxi/timer.c
@@ -6,9 +6,11 @@
*/
#include <common.h>
+#include <init.h>
#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/generic.c b/arch/arm/cpu/armv7/vf610/generic.c
index 6698b821d0..fd2ab37a8f 100644
--- a/arch/arm/cpu/armv7/vf610/generic.c
+++ b/arch/arm/cpu/armv7/vf610/generic.c
@@ -5,7 +5,11 @@
#include <common.h>
#include <clock_legacy.h>
+#include <command.h>
#include <cpu_func.h>
+#include <init.h>
+#include <net.h>
+#include <asm/cache.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/clock.h>
@@ -237,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/armv7/vf610/timer.c b/arch/arm/cpu/armv7/vf610/timer.c
index f858de953d..fa8f8fae10 100644
--- a/arch/arm/cpu/armv7/vf610/timer.c
+++ b/arch/arm/cpu/armv7/vf610/timer.c
@@ -4,11 +4,13 @@
*/
#include <common.h>
+#include <init.h>
#include <time.h>
#include <asm/io.h>
#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/armv7/virt-dt.c b/arch/arm/cpu/armv7/virt-dt.c
index 204187c1b4..61c82f6469 100644
--- a/arch/arm/cpu/armv7/virt-dt.c
+++ b/arch/arm/cpu/armv7/virt-dt.c
@@ -17,6 +17,7 @@
#include <common.h>
#include <errno.h>
+#include <log.h>
#include <stdio_dev.h>
#include <linux/ctype.h>
#include <linux/types.h>
diff --git a/arch/arm/cpu/armv7/virt-v7.c b/arch/arm/cpu/armv7/virt-v7.c
index 26c93393cd..5ffeca13d9 100644
--- a/arch/arm/cpu/armv7/virt-v7.c
+++ b/arch/arm/cpu/armv7/virt-v7.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <cpu_func.h>
#include <asm/armv7.h>
+#include <asm/cache.h>
#include <asm/gic.h>
#include <asm/io.h>
#include <asm/secure.h>
diff --git a/arch/arm/cpu/armv7m/cache.c b/arch/arm/cpu/armv7m/cache.c
index 7353698557..d1aecf6a85 100644
--- a/arch/arm/cpu/armv7m/cache.c
+++ b/arch/arm/cpu/armv7m/cache.c
@@ -7,8 +7,11 @@
#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>
+#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 5c310d306d..d2672fd40c 100644
--- a/arch/arm/cpu/armv7m/systick-timer.c
+++ b/arch/arm/cpu/armv7m/systick-timer.c
@@ -22,8 +22,10 @@
*/
#include <common.h>
+#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/cache_v8.c b/arch/arm/cpu/armv8/cache_v8.c
index 6a5518f9de..7ebcaa21a1 100644
--- a/arch/arm/cpu/armv8/cache_v8.c
+++ b/arch/arm/cpu/armv8/cache_v8.c
@@ -10,6 +10,8 @@
#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/cpu-dt.c b/arch/arm/cpu/armv8/cpu-dt.c
index 267abb83e8..97d4473a68 100644
--- a/arch/arm/cpu/armv8/cpu-dt.c
+++ b/arch/arm/cpu/armv8/cpu-dt.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <asm/cache.h>
#include <asm/psci.h>
#include <asm/system.h>
#include <asm/armv8/sec_firmware.h>
diff --git a/arch/arm/cpu/armv8/cpu.c b/arch/arm/cpu/armv8/cpu.c
index 35752037bc..ea40c55dd2 100644
--- a/arch/arm/cpu/armv8/cpu.c
+++ b/arch/arm/cpu/armv8/cpu.c
@@ -14,6 +14,7 @@
#include <command.h>
#include <cpu_func.h>
#include <irq_func.h>
+#include <asm/cache.h>
#include <asm/system.h>
#include <asm/secure.h>
#include <linux/compiler.h>
diff --git a/arch/arm/cpu/armv8/exception_level.c b/arch/arm/cpu/armv8/exception_level.c
index 9c1f4a8ca8..b11936548f 100644
--- a/arch/arm/cpu/armv8/exception_level.c
+++ b/arch/arm/cpu/armv8/exception_level.c
@@ -11,6 +11,8 @@
#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 2cf3f4bb98..3fcedd53ff 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
@@ -10,8 +10,12 @@
#include <fsl_ddr_sdram.h>
#include <init.h>
#include <hang.h>
+#include <log.h>
+#include <net.h>
#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/fsl-layerscape/fdt.c b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
index 0696ea6d35..9c7546028a 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
@@ -7,6 +7,8 @@
#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>
#include <phy.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_serdes.c b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_serdes.c
index cb64cc2db8..41c89b8904 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_serdes.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_serdes.c
@@ -4,7 +4,9 @@
*/
#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 d143864af1..aa6fd6b28c 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c
@@ -5,7 +5,11 @@
*/
#include <common.h>
+#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>
#include <asm/arch/soc.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/ls1028_ids.c b/arch/arm/cpu/armv8/fsl-layerscape/ls1028_ids.c
index 8110412da6..49df8b3790 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/ls1028_ids.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/ls1028_ids.c
@@ -4,6 +4,8 @@
*/
#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/mp.c b/arch/arm/cpu/armv8/fsl-layerscape/mp.c
index ca07c68863..1ea887b331 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/mp.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/mp.c
@@ -5,10 +5,13 @@
#include <common.h>
#include <cpu_func.h>
+#include <image.h>
+#include <asm/cache.h>
#include <asm/io.h>
#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>
@@ -258,7 +261,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/cpu/armv8/fsl-layerscape/ppa.c b/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
index d391f93041..1ddb267093 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
@@ -3,9 +3,11 @@
* Copyright 2016 NXP Semiconductor, Inc.
*/
#include <common.h>
+#include <log.h>
#include <malloc.h>
#include <config.h>
#include <errno.h>
+#include <asm/cache.h>
#include <asm/system.h>
#include <asm/types.h>
#include <asm/arch/soc.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/soc.c b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
index 28bb1d7401..ad7ea05935 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/soc.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
@@ -12,8 +12,10 @@
#include <fsl_ifc.h>
#include <init.h>
#include <linux/sizes.h>
+#include <log.h>
#include <asm/arch/fsl_serdes.h>
#include <asm/arch/soc.h>
+#include <asm/cache.h>
#include <asm/io.h>
#include <asm/global_data.h>
#include <asm/arch-fsl-layerscape/config.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/spl.c b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
index accad6e8ae..77724336d6 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/spl.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
@@ -7,7 +7,11 @@
#include <clock_legacy.h>
#include <cpu_func.h>
#include <env.h>
+#include <image.h>
+#include <init.h>
+#include <log.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 cbd35b7f4a..b29bc30fc2 100644
--- a/arch/arm/cpu/armv8/fwcall.c
+++ b/arch/arm/cpu/armv8/fwcall.c
@@ -8,8 +8,10 @@
#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>
#include <asm/system.h>
/*
diff --git a/arch/arm/cpu/armv8/generic_timer.c b/arch/arm/cpu/armv8/generic_timer.c
index 46e63294fe..e23629ab0b 100644
--- a/arch/arm/cpu/armv8/generic_timer.c
+++ b/arch/arm/cpu/armv8/generic_timer.c
@@ -5,9 +5,11 @@
*/
#include <common.h>
+#include <bootstage.h>
#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 c549ddb335..5183e00a44 100644
--- a/arch/arm/cpu/armv8/hisilicon/pinmux.c
+++ b/arch/arm/cpu/armv8/hisilicon/pinmux.c
@@ -6,9 +6,11 @@
#include <common.h>
#include <fdtdec.h>
+#include <log.h>
#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 b5a9513ead..8ee3adc805 100644
--- a/arch/arm/cpu/armv8/s32v234/cpu.c
+++ b/arch/arm/cpu/armv8/s32v234/cpu.c
@@ -5,11 +5,14 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
+#include <asm/cache.h>
#include <asm/io.h>
#include <asm/system.h>
#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/cpu/armv8/s32v234/generic.c b/arch/arm/cpu/armv8/s32v234/generic.c
index ec4641dcdb..bc07dae318 100644
--- a/arch/arm/cpu/armv8/s32v234/generic.c
+++ b/arch/arm/cpu/armv8/s32v234/generic.c
@@ -6,6 +6,8 @@
#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>
#include <asm/arch/clock.h>
diff --git a/arch/arm/cpu/armv8/sec_firmware.c b/arch/arm/cpu/armv8/sec_firmware.c
index 95ea57d571..bfc0fac3ef 100644
--- a/arch/arm/cpu/armv8/sec_firmware.c
+++ b/arch/arm/cpu/armv8/sec_firmware.c
@@ -6,6 +6,11 @@
#include <common.h>
#include <cpu_func.h>
#include <errno.h>
+#include <fdt_support.h>
+#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/cpu/pxa/cache.c b/arch/arm/cpu/pxa/cache.c
index d4dfe7f6d8..a2ec5e28c7 100644
--- a/arch/arm/cpu/pxa/cache.c
+++ b/arch/arm/cpu/pxa/cache.c
@@ -4,6 +4,7 @@
*/
#include <cpu_func.h>
+#include <asm/cache.h>
#include <linux/types.h>
#include <common.h>
diff --git a/arch/arm/cpu/pxa/cpuinfo.c b/arch/arm/cpu/pxa/cpuinfo.c
index 5379e13e2b..0d9542f998 100644
--- a/arch/arm/cpu/pxa/cpuinfo.c
+++ b/arch/arm/cpu/pxa/cpuinfo.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/io.h>
#include <errno.h>
#include <linux/compiler.h>
diff --git a/arch/arm/cpu/pxa/pxa2xx.c b/arch/arm/cpu/pxa/pxa2xx.c
index 002ff7988b..ea91d8aaec 100644
--- a/arch/arm/cpu/pxa/pxa2xx.c
+++ b/arch/arm/cpu/pxa/pxa2xx.c
@@ -11,8 +11,10 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.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/cpu/pxa/timer.c b/arch/arm/cpu/pxa/timer.c
index 169fed808b..8e9d610441 100644
--- a/arch/arm/cpu/pxa/timer.c
+++ b/arch/arm/cpu/pxa/timer.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/io.h>
int timer_init(void)
diff --git a/arch/arm/cpu/pxa/usb.c b/arch/arm/cpu/pxa/usb.c
index 80a5977415..13e010d91e 100644
--- a/arch/arm/cpu/pxa/usb.c
+++ b/arch/arm/cpu/pxa/usb.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <linux/delay.h>
#if defined(CONFIG_USB_OHCI_NEW) && defined(CONFIG_SYS_USB_OHCI_CPU_INIT)
# if defined(CONFIG_CPU_MONAHANS) || defined(CONFIG_CPU_PXA27X)
diff --git a/arch/arm/cpu/sa1100/timer.c b/arch/arm/cpu/sa1100/timer.c
index 8e20c96bcd..a5cdaf5a66 100644
--- a/arch/arm/cpu/sa1100/timer.c
+++ b/arch/arm/cpu/sa1100/timer.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <SA-1100.h>
#include <time.h>
+#include <linux/delay.h>
static ulong get_timer_masked (void)
{
@@ -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/include/asm/arch-am33xx/clk_synthesizer.h b/arch/arm/include/asm/arch-am33xx/clk_synthesizer.h
index 6579cc0c5d..7bcafba6f0 100644
--- a/arch/arm/include/asm/arch-am33xx/clk_synthesizer.h
+++ b/arch/arm/include/asm/arch-am33xx/clk_synthesizer.h
@@ -10,8 +10,6 @@
#ifndef __CLK_SYNTHESIZER_H
#define __CLK_SYNTHESIZER_H
-#include <common.h>
-
#define CLK_SYNTHESIZER_ID_REG 0x0
#define CLK_SYNTHESIZER_XCSEL 0x05
#define CLK_SYNTHESIZER_MUX_REG 0x14
diff --git a/arch/arm/include/asm/arch-am33xx/cpu.h b/arch/arm/include/asm/arch-am33xx/cpu.h
index 9b819b0a1c..79081de700 100644
--- a/arch/arm/include/asm/arch-am33xx/cpu.h
+++ b/arch/arm/include/asm/arch-am33xx/cpu.h
@@ -12,6 +12,7 @@
#if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))
#include <asm/types.h>
+#include <linux/bitops.h>
#endif /* !(__KERNEL_STRICT_NAMES || __ASSEMBLY__) */
#include <asm/arch/hardware.h>
diff --git a/arch/arm/include/asm/arch-am33xx/hardware_am43xx.h b/arch/arm/include/asm/arch-am33xx/hardware_am43xx.h
index 64809d5deb..0b73ebdbb4 100644
--- a/arch/arm/include/asm/arch-am33xx/hardware_am43xx.h
+++ b/arch/arm/include/asm/arch-am33xx/hardware_am43xx.h
@@ -10,6 +10,10 @@
#ifndef __AM43XX_HARDWARE_AM43XX_H
#define __AM43XX_HARDWARE_AM43XX_H
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
/* Module base addresses */
/* L3 Fast Configuration Bandwidth Limiter Base Address */
diff --git a/arch/arm/include/asm/arch-am33xx/mux.h b/arch/arm/include/asm/arch-am33xx/mux.h
index d8bf87258b..b16b184733 100644
--- a/arch/arm/include/asm/arch-am33xx/mux.h
+++ b/arch/arm/include/asm/arch-am33xx/mux.h
@@ -16,7 +16,6 @@
#ifndef _MUX_H_
#define _MUX_H_
-#include <common.h>
#include <asm/io.h>
#ifdef CONFIG_AM33XX
diff --git a/arch/arm/include/asm/arch-am33xx/mux_am33xx.h b/arch/arm/include/asm/arch-am33xx/mux_am33xx.h
index d5cab3e083..26bd4b46ff 100644
--- a/arch/arm/include/asm/arch-am33xx/mux_am33xx.h
+++ b/arch/arm/include/asm/arch-am33xx/mux_am33xx.h
@@ -16,7 +16,6 @@
#ifndef _MUX_AM33XX_H_
#define _MUX_AM33XX_H_
-#include <common.h>
#include <asm/io.h>
#define MUX_CFG(value, offset) \
diff --git a/arch/arm/include/asm/arch-am33xx/mux_am43xx.h b/arch/arm/include/asm/arch-am33xx/mux_am43xx.h
index 256c5e243f..f74ae74ff1 100644
--- a/arch/arm/include/asm/arch-am33xx/mux_am43xx.h
+++ b/arch/arm/include/asm/arch-am33xx/mux_am43xx.h
@@ -8,7 +8,6 @@
#ifndef _MUX_AM43XX_H_
#define _MUX_AM43XX_H_
-#include <common.h>
#include <asm/io.h>
#define MUX_CFG(value, offset) \
diff --git a/arch/arm/include/asm/arch-am33xx/mux_ti816x.h b/arch/arm/include/asm/arch-am33xx/mux_ti816x.h
index e4e5a48ad6..a6a8a988a0 100644
--- a/arch/arm/include/asm/arch-am33xx/mux_ti816x.h
+++ b/arch/arm/include/asm/arch-am33xx/mux_ti816x.h
@@ -17,7 +17,6 @@
#ifndef _MUX_TI816X_H_
#define _MUX_TI816X_H_
-#include <common.h>
#include <asm/io.h>
#define MUX_CFG(value, offset) \
diff --git a/arch/arm/include/asm/arch-fsl-layerscape/clock.h b/arch/arm/include/asm/arch-fsl-layerscape/clock.h
index 95d6156476..d561691437 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/clock.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/clock.h
@@ -8,8 +8,6 @@
#ifndef __ASM_ARCH_FSL_LAYERSCAPE_CLOCK_H_
#define __ASM_ARCH_FSL_LAYERSCAPE_CLOCK_H_
-#include <common.h>
-
enum mxc_clock {
MXC_ARM_CLK = 0,
MXC_BUS_CLK,
diff --git a/arch/arm/include/asm/arch-fsl-layerscape/config.h b/arch/arm/include/asm/arch-fsl-layerscape/config.h
index ddd9390df4..908d860027 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/config.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/config.h
@@ -10,6 +10,10 @@
#include <linux/kconfig.h>
#include <fsl_ddrc_version.h>
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
#define CONFIG_STANDALONE_LOAD_ADDR 0x80300000
/*
diff --git a/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h b/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h
index 862ec2e2f1..c9be0768e3 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h
@@ -7,6 +7,9 @@
#define __ARCH_FSL_LSCH2_IMMAP_H__
#include <fsl_immap.h>
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
#define CONFIG_SYS_IMMR 0x01000000
#define CONFIG_SYS_DCSRBAR 0x20000000
diff --git a/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h b/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h
index c2fbc23b11..baa9fa8529 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h
@@ -589,5 +589,5 @@ struct ccsr_serdes {
u8 res5[0x19fc - 0xa00];
};
-#endif /*__ASSEMBLY__*/
+#endif /*__ASSEMBLY__ */
#endif /* __ARCH_FSL_LSCH3_IMMAP_H_ */
diff --git a/arch/arm/include/asm/arch-hi3660/hi3660.h b/arch/arm/include/asm/arch-hi3660/hi3660.h
index 3ca0951543..882262d13c 100644
--- a/arch/arm/include/asm/arch-hi3660/hi3660.h
+++ b/arch/arm/include/asm/arch-hi3660/hi3660.h
@@ -7,6 +7,10 @@
#ifndef __HI3660_H__
#define __HI3660_H__
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
#define HI3660_UART6_BASE 0xfff32000
#define PMU_REG_BASE 0xfff34000
diff --git a/arch/arm/include/asm/arch-imx8/iomux.h b/arch/arm/include/asm/arch-imx8/iomux.h
index bedd01bfd8..3acef1ea6b 100644
--- a/arch/arm/include/asm/arch-imx8/iomux.h
+++ b/arch/arm/include/asm/arch-imx8/iomux.h
@@ -6,6 +6,10 @@
#ifndef __ASM_ARCH_IMX8_IOMUX_H__
#define __ASM_ARCH_IMX8_IOMUX_H__
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
/*
* We use 64bits value for iomux settings.
* High 32bits are used for padring register value,
diff --git a/arch/arm/include/asm/arch-imx8/sci/sci.h b/arch/arm/include/asm/arch-imx8/sci/sci.h
index 05f736f14f..f91f7cc587 100644
--- a/arch/arm/include/asm/arch-imx8/sci/sci.h
+++ b/arch/arm/include/asm/arch-imx8/sci/sci.h
@@ -6,6 +6,7 @@
#ifndef _SC_SCI_H
#define _SC_SCI_H
+#include <log.h>
#include <asm/arch/sci/types.h>
#include <asm/arch/sci/svc/misc/api.h>
#include <asm/arch/sci/svc/pad/api.h>
diff --git a/arch/arm/include/asm/arch-imx8m/clock_imx8mm.h b/arch/arm/include/asm/arch-imx8m/clock_imx8mm.h
index 140e8bbabd..63b14b9ca5 100644
--- a/arch/arm/include/asm/arch-imx8m/clock_imx8mm.h
+++ b/arch/arm/include/asm/arch-imx8m/clock_imx8mm.h
@@ -8,6 +8,10 @@
#ifndef _ASM_ARCH_IMX8MM_CLOCK_H
#define _ASM_ARCH_IMX8MM_CLOCK_H
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
#define PLL_1443X_RATE(_rate, _m, _p, _s, _k) \
{ \
.rate = (_rate), \
diff --git a/arch/arm/include/asm/arch-imx8m/clock_imx8mq.h b/arch/arm/include/asm/arch-imx8m/clock_imx8mq.h
index 9dda6ddc8c..742cbf3bf8 100644
--- a/arch/arm/include/asm/arch-imx8m/clock_imx8mq.h
+++ b/arch/arm/include/asm/arch-imx8m/clock_imx8mq.h
@@ -8,6 +8,10 @@
#ifndef _ASM_ARCH_IMX8M_CLOCK_H
#define _ASM_ARCH_IMX8M_CLOCK_H
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
enum pll_clocks {
ANATOP_ARM_PLL,
ANATOP_GPU_PLL,
diff --git a/arch/arm/include/asm/arch-lpc32xx/dma.h b/arch/arm/include/asm/arch-lpc32xx/dma.h
index 8775491245..d69e3c4664 100644
--- a/arch/arm/include/asm/arch-lpc32xx/dma.h
+++ b/arch/arm/include/asm/arch-lpc32xx/dma.h
@@ -11,8 +11,6 @@
#ifndef _LPC32XX_DMA_H
#define _LPC32XX_DMA_H
-#include <common.h>
-
/*
* DMA linked list structure used with a channel's LLI register;
* refer to UM10326, "LPC32x0 and LPC32x0/01 User manual" - Rev. 3
diff --git a/arch/arm/include/asm/arch-lpc32xx/i2c.h b/arch/arm/include/asm/arch-lpc32xx/i2c.h
index 5301d4c1b0..f39b14001b 100644
--- a/arch/arm/include/asm/arch-lpc32xx/i2c.h
+++ b/arch/arm/include/asm/arch-lpc32xx/i2c.h
@@ -1,7 +1,6 @@
#ifndef _LPC32XX_I2C_H
#define _LPC32XX_I2C_H
-#include <common.h>
#include <asm/types.h>
/* i2c register set */
diff --git a/arch/arm/include/asm/arch-ls102xa/clock.h b/arch/arm/include/asm/arch-ls102xa/clock.h
index e66e57f759..01978c08f5 100644
--- a/arch/arm/include/asm/arch-ls102xa/clock.h
+++ b/arch/arm/include/asm/arch-ls102xa/clock.h
@@ -7,8 +7,6 @@
#ifndef __ASM_ARCH_LS102XA_CLOCK_H_
#define __ASM_ARCH_LS102XA_CLOCK_H_
-#include <common.h>
-
enum mxc_clock {
MXC_ARM_CLK = 0,
MXC_UART_CLK,
diff --git a/arch/arm/include/asm/arch-meson/axg.h b/arch/arm/include/asm/arch-meson/axg.h
index d293f2a839..91c87696e0 100644
--- a/arch/arm/include/asm/arch-meson/axg.h
+++ b/arch/arm/include/asm/arch-meson/axg.h
@@ -7,6 +7,10 @@
#ifndef __AXG_H__
#define __AXG_H__
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
#define AXG_AOBUS_BASE 0xff800000
#define AXG_PERIPHS_BASE 0xff634400
#define AXG_HIU_BASE 0xff63c000
diff --git a/arch/arm/include/asm/arch-meson/g12a.h b/arch/arm/include/asm/arch-meson/g12a.h
index b806667860..db29cc3a00 100644
--- a/arch/arm/include/asm/arch-meson/g12a.h
+++ b/arch/arm/include/asm/arch-meson/g12a.h
@@ -7,6 +7,10 @@
#ifndef __G12A_H__
#define __G12A_H__
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
#define G12A_AOBUS_BASE 0xff800000
#define G12A_PERIPHS_BASE 0xff634400
#define G12A_HIU_BASE 0xff63c000
diff --git a/arch/arm/include/asm/arch-meson/gx.h b/arch/arm/include/asm/arch-meson/gx.h
index b781ba9475..743d2e8bb9 100644
--- a/arch/arm/include/asm/arch-meson/gx.h
+++ b/arch/arm/include/asm/arch-meson/gx.h
@@ -6,6 +6,10 @@
#ifndef __GX_H__
#define __GX_H__
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
#define GX_FIRMWARE_MEM_SIZE 0x1000000
#define GX_AOBUS_BASE 0xc8100000
diff --git a/arch/arm/include/asm/arch-meson/sd_emmc.h b/arch/arm/include/asm/arch-meson/sd_emmc.h
index e3a72c8b66..1e9f8cf498 100644
--- a/arch/arm/include/asm/arch-meson/sd_emmc.h
+++ b/arch/arm/include/asm/arch-meson/sd_emmc.h
@@ -7,6 +7,10 @@
#define __SD_EMMC_H__
#include <mmc.h>
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
#define SDIO_PORT_A 0
#define SDIO_PORT_B 1
diff --git a/arch/arm/include/asm/arch-mx25/clock.h b/arch/arm/include/asm/arch-mx25/clock.h
index 7eec73163b..3045b78d08 100644
--- a/arch/arm/include/asm/arch-mx25/clock.h
+++ b/arch/arm/include/asm/arch-mx25/clock.h
@@ -9,8 +9,6 @@
#ifndef __ASM_ARCH_CLOCK_H
#define __ASM_ARCH_CLOCK_H
-#include <common.h>
-
#ifdef CONFIG_MX25_HCLK_FREQ
#define MXC_HCLK CONFIG_MX25_HCLK_FREQ
#else
diff --git a/arch/arm/include/asm/arch-mx27/regs-rtc.h b/arch/arm/include/asm/arch-mx27/regs-rtc.h
index d373ab1583..8434f4c1cb 100644
--- a/arch/arm/include/asm/arch-mx27/regs-rtc.h
+++ b/arch/arm/include/asm/arch-mx27/regs-rtc.h
@@ -21,6 +21,6 @@ struct rtc_regs {
u32 dayr;
u32 dayalarm;
};
-#endif /* __ASSEMBLY__*/
+#endif /* __ASSEMBLY__ */
#endif /* __MX28_REGS_RTC_H__ */
diff --git a/arch/arm/include/asm/arch-mx31/clock.h b/arch/arm/include/asm/arch-mx31/clock.h
index aafc2d690e..e99e115f79 100644
--- a/arch/arm/include/asm/arch-mx31/clock.h
+++ b/arch/arm/include/asm/arch-mx31/clock.h
@@ -7,8 +7,6 @@
#ifndef __ASM_ARCH_CLOCK_H
#define __ASM_ARCH_CLOCK_H
-#include <common.h>
-
#define MXC_HCLK CONFIG_MX31_HCLK_FREQ
#define MXC_CLK32 CONFIG_MX31_CLK32
diff --git a/arch/arm/include/asm/arch-mx35/clock.h b/arch/arm/include/asm/arch-mx35/clock.h
index 788534083c..cb0b53a69f 100644
--- a/arch/arm/include/asm/arch-mx35/clock.h
+++ b/arch/arm/include/asm/arch-mx35/clock.h
@@ -7,8 +7,6 @@
#ifndef __ASM_ARCH_CLOCK_H
#define __ASM_ARCH_CLOCK_H
-#include <common.h>
-
#ifdef CONFIG_MX35_HCLK_FREQ
#define MXC_HCLK CONFIG_MX35_HCLK_FREQ
#else
diff --git a/arch/arm/include/asm/arch-mx5/clock.h b/arch/arm/include/asm/arch-mx5/clock.h
index 6f5ca5888a..63a51042e1 100644
--- a/arch/arm/include/asm/arch-mx5/clock.h
+++ b/arch/arm/include/asm/arch-mx5/clock.h
@@ -7,8 +7,6 @@
#ifndef __ASM_ARCH_CLOCK_H
#define __ASM_ARCH_CLOCK_H
-#include <common.h>
-
#ifdef CONFIG_SYS_MX5_HCLK
#define MXC_HCLK CONFIG_SYS_MX5_HCLK
#else
diff --git a/arch/arm/include/asm/arch-mx5/imx-regs.h b/arch/arm/include/asm/arch-mx5/imx-regs.h
index fbb6e599b6..3d1cc68322 100644
--- a/arch/arm/include/asm/arch-mx5/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx5/imx-regs.h
@@ -557,6 +557,6 @@ struct pwm_regs {
u32 cnr;
};
-#endif /* __ASSEMBLER__*/
+#endif /* __ASSEMBLY__ */
#endif /* __ASM_ARCH_MX5_IMX_REGS_H__ */
diff --git a/arch/arm/include/asm/arch-mx6/clock.h b/arch/arm/include/asm/arch-mx6/clock.h
index f7760541a4..8ae4971578 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;
+
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 *cmdtp, int flag, int argc,
+ char *const argv[]);
#endif /* __ASM_ARCH_CLOCK_H */
diff --git a/arch/arm/include/asm/arch-mx6/imx-regs.h b/arch/arm/include/asm/arch-mx6/imx-regs.h
index 4f01b20aed..ccd48e8305 100644
--- a/arch/arm/include/asm/arch-mx6/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx6/imx-regs.h
@@ -372,6 +372,7 @@
#include <asm/mach-imx/regs-lcdif.h>
#if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))
#include <asm/types.h>
+#include <linux/bitops.h>
/* only for i.MX6SX/UL */
#define WDOG3_BASE_ADDR (((is_mx6ul() || is_mx6ull()) ? \
@@ -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/clock.h b/arch/arm/include/asm/arch-mx7/clock.h
index 984bd3f141..48c7c3367a 100644
--- a/arch/arm/include/asm/arch-mx7/clock.h
+++ b/arch/arm/include/asm/arch-mx7/clock.h
@@ -9,7 +9,6 @@
#ifndef _ASM_ARCH_CLOCK_H
#define _ASM_ARCH_CLOCK_H
-#include <common.h>
#include <asm/arch/crm_regs.h>
#ifdef CONFIG_SYS_MX7_HCLK
diff --git a/arch/arm/include/asm/arch-mx7/imx-regs.h b/arch/arm/include/asm/arch-mx7/imx-regs.h
index 6336514007..95238dcaa8 100644
--- a/arch/arm/include/asm/arch-mx7/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx7/imx-regs.h
@@ -225,6 +225,7 @@
#if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))
#include <asm/mach-imx/regs-lcdif.h>
#include <asm/types.h>
+#include <linux/bitops.h>
extern void imx_get_mac_from_fuse(int dev_id, unsigned char *mac);
@@ -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 3c0790487e..37aaee0ad7 100644
--- a/arch/arm/include/asm/arch-mx7/mx7-ddr.h
+++ b/arch/arm/include/asm/arch-mx7/mx7-ddr.h
@@ -10,6 +10,10 @@
#ifndef __ASM_ARCH_MX7_DDR_H__
#define __ASM_ARCH_MX7_DDR_H__
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
/* DDRC Registers (DDRC_IPS_BASE_ADDR) */
struct ddrc {
u32 mstr; /* 0x0000 */
diff --git a/arch/arm/include/asm/arch-mx7ulp/clock.h b/arch/arm/include/asm/arch-mx7ulp/clock.h
index eb02a20fdc..92d4463dff 100644
--- a/arch/arm/include/asm/arch-mx7ulp/clock.h
+++ b/arch/arm/include/asm/arch-mx7ulp/clock.h
@@ -6,7 +6,6 @@
#ifndef _ASM_ARCH_CLOCK_H
#define _ASM_ARCH_CLOCK_H
-#include <common.h>
#include <asm/arch/pcc.h>
#include <asm/arch/scg.h>
diff --git a/arch/arm/include/asm/arch-mx7ulp/pcc.h b/arch/arm/include/asm/arch-mx7ulp/pcc.h
index dee3cfcdc0..8f0d700628 100644
--- a/arch/arm/include/asm/arch-mx7ulp/pcc.h
+++ b/arch/arm/include/asm/arch-mx7ulp/pcc.h
@@ -6,7 +6,6 @@
#ifndef _ASM_ARCH_PCC_H
#define _ASM_ARCH_PCC_H
-#include <common.h>
#include <asm/arch/scg.h>
/* PCC2 */
diff --git a/arch/arm/include/asm/arch-mx7ulp/scg.h b/arch/arm/include/asm/arch-mx7ulp/scg.h
index b79bde338f..3b5b7f6803 100644
--- a/arch/arm/include/asm/arch-mx7ulp/scg.h
+++ b/arch/arm/include/asm/arch-mx7ulp/scg.h
@@ -6,8 +6,6 @@
#ifndef _ASM_ARCH_SCG_H
#define _ASM_ARCH_SCG_H
-#include <common.h>
-
#ifdef CONFIG_CLK_DEBUG
#define clk_debug(fmt, args...) printf(fmt, ##args)
#else
diff --git a/arch/arm/include/asm/arch-omap4/clock.h b/arch/arm/include/asm/arch-omap4/clock.h
index 037045ca31..0a626fe647 100644
--- a/arch/arm/include/asm/arch-omap4/clock.h
+++ b/arch/arm/include/asm/arch-omap4/clock.h
@@ -7,7 +7,6 @@
*/
#ifndef _CLOCKS_OMAP4_H_
#define _CLOCKS_OMAP4_H_
-#include <common.h>
#include <asm/omap_common.h>
/*
diff --git a/arch/arm/include/asm/arch-omap5/clock.h b/arch/arm/include/asm/arch-omap5/clock.h
index e261bd43f2..87eb3f335a 100644
--- a/arch/arm/include/asm/arch-omap5/clock.h
+++ b/arch/arm/include/asm/arch-omap5/clock.h
@@ -8,7 +8,6 @@
*/
#ifndef _CLOCKS_OMAP5_H_
#define _CLOCKS_OMAP5_H_
-#include <common.h>
#include <asm/omap_common.h>
/*
diff --git a/arch/arm/include/asm/arch-omap5/dra7xx_iodelay.h b/arch/arm/include/asm/arch-omap5/dra7xx_iodelay.h
index 09edfadc32..ea2f113f98 100644
--- a/arch/arm/include/asm/arch-omap5/dra7xx_iodelay.h
+++ b/arch/arm/include/asm/arch-omap5/dra7xx_iodelay.h
@@ -9,7 +9,6 @@
#ifndef _DRA7_IODELAY_H_
#define _DRA7_IODELAY_H_
-#include <common.h>
#include <asm/arch/sys_proto.h>
/* CONFIG_REG_0 */
diff --git a/arch/arm/include/asm/arch-rk3308/cru_rk3308.h b/arch/arm/include/asm/arch-rk3308/cru_rk3308.h
index a14b64cdb3..86c906bb0e 100644
--- a/arch/arm/include/asm/arch-rk3308/cru_rk3308.h
+++ b/arch/arm/include/asm/arch-rk3308/cru_rk3308.h
@@ -5,8 +5,6 @@
#ifndef _ASM_ARCH_CRU_RK3308_H
#define _ASM_ARCH_CRU_RK3308_H
-#include <common.h>
-
#define MHz 1000000
#define OSC_HZ (24 * MHz)
diff --git a/arch/arm/include/asm/arch-rk3308/grf_rk3308.h b/arch/arm/include/asm/arch-rk3308/grf_rk3308.h
index 3e68626d3e..a995bb950d 100644
--- a/arch/arm/include/asm/arch-rk3308/grf_rk3308.h
+++ b/arch/arm/include/asm/arch-rk3308/grf_rk3308.h
@@ -5,8 +5,6 @@
#ifndef _ASM_ARCH_GRF_rk3308_H
#define _ASM_ARCH_GRF_rk3308_H
-#include <common.h>
-
struct rk3308_grf {
unsigned int gpio0a_iomux;
unsigned int reserved0;
diff --git a/arch/arm/include/asm/arch-rockchip/cru.h b/arch/arm/include/asm/arch-rockchip/cru.h
index 5cf2aec11a..5eb17f9d55 100644
--- a/arch/arm/include/asm/arch-rockchip/cru.h
+++ b/arch/arm/include/asm/arch-rockchip/cru.h
@@ -7,6 +7,10 @@
#ifndef _ROCKCHIP_CLOCK_H
#define _ROCKCHIP_CLOCK_H
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
#if defined(CONFIG_ROCKCHIP_RK3288)
# include <asm/arch-rockchip/cru_rk3288.h>
#elif defined(CONFIG_ROCKCHIP_RK3399)
diff --git a/arch/arm/include/asm/arch-rockchip/cru_px30.h b/arch/arm/include/asm/arch-rockchip/cru_px30.h
index 798444ae49..732ca37040 100644
--- a/arch/arm/include/asm/arch-rockchip/cru_px30.h
+++ b/arch/arm/include/asm/arch-rockchip/cru_px30.h
@@ -5,8 +5,6 @@
#ifndef _ASM_ARCH_CRU_PX30_H
#define _ASM_ARCH_CRU_PX30_H
-#include <common.h>
-
#define MHz 1000000
#define KHz 1000
#define OSC_HZ (24 * MHz)
diff --git a/arch/arm/include/asm/arch-rockchip/cru_rk3036.h b/arch/arm/include/asm/arch-rockchip/cru_rk3036.h
index 4722522954..5db0407baa 100644
--- a/arch/arm/include/asm/arch-rockchip/cru_rk3036.h
+++ b/arch/arm/include/asm/arch-rockchip/cru_rk3036.h
@@ -5,8 +5,6 @@
#ifndef _ASM_ARCH_CRU_RK3036_H
#define _ASM_ARCH_CRU_RK3036_H
-#include <common.h>
-
#define OSC_HZ (24 * 1000 * 1000)
#define APLL_HZ (600 * 1000000)
diff --git a/arch/arm/include/asm/arch-rockchip/cru_rk3128.h b/arch/arm/include/asm/arch-rockchip/cru_rk3128.h
index b8565605cd..cca812d29e 100644
--- a/arch/arm/include/asm/arch-rockchip/cru_rk3128.h
+++ b/arch/arm/include/asm/arch-rockchip/cru_rk3128.h
@@ -6,7 +6,9 @@
#ifndef _ASM_ARCH_CRU_RK3128_H
#define _ASM_ARCH_CRU_RK3128_H
-#include <common.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_rk322x.h b/arch/arm/include/asm/arch-rockchip/cru_rk322x.h
index c87c830716..ee12fa831f 100644
--- a/arch/arm/include/asm/arch-rockchip/cru_rk322x.h
+++ b/arch/arm/include/asm/arch-rockchip/cru_rk322x.h
@@ -5,8 +5,6 @@
#ifndef _ASM_ARCH_CRU_RK322X_H
#define _ASM_ARCH_CRU_RK322X_H
-#include <common.h>
-
#define MHz 1000000
#define OSC_HZ (24 * MHz)
diff --git a/arch/arm/include/asm/arch-rockchip/cru_rk3328.h b/arch/arm/include/asm/arch-rockchip/cru_rk3328.h
index 4bf69dbe08..226744d67d 100644
--- a/arch/arm/include/asm/arch-rockchip/cru_rk3328.h
+++ b/arch/arm/include/asm/arch-rockchip/cru_rk3328.h
@@ -6,8 +6,6 @@
#ifndef __ASM_ARCH_CRU_RK3328_H_
#define __ASM_ARCH_CRU_RK3328_H_
-#include <common.h>
-
struct rk3328_clk_priv {
struct rk3328_cru *cru;
ulong rate;
diff --git a/arch/arm/include/asm/arch-rockchip/cru_rk3368.h b/arch/arm/include/asm/arch-rockchip/cru_rk3368.h
index 1fe1f01b9e..316c67c62f 100644
--- a/arch/arm/include/asm/arch-rockchip/cru_rk3368.h
+++ b/arch/arm/include/asm/arch-rockchip/cru_rk3368.h
@@ -6,8 +6,9 @@
#ifndef _ASM_ARCH_CRU_RK3368_H
#define _ASM_ARCH_CRU_RK3368_H
-#include <common.h>
-
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
/* RK3368 clock numbers */
enum rk3368_pll_id {
diff --git a/arch/arm/include/asm/arch-rockchip/cru_rk3399.h b/arch/arm/include/asm/arch-rockchip/cru_rk3399.h
index 789ca6aa28..d941a129f3 100644
--- a/arch/arm/include/asm/arch-rockchip/cru_rk3399.h
+++ b/arch/arm/include/asm/arch-rockchip/cru_rk3399.h
@@ -6,8 +6,6 @@
#ifndef __ASM_ARCH_CRU_RK3399_H_
#define __ASM_ARCH_CRU_RK3399_H_
-#include <common.h>
-
/* Private data for the clock driver - used by rockchip_get_cru() */
struct rk3399_clk_priv {
struct rockchip_cru *cru;
diff --git a/arch/arm/include/asm/arch-rockchip/cru_rv1108.h b/arch/arm/include/asm/arch-rockchip/cru_rv1108.h
index 7697e96a91..0ba5ff6a04 100644
--- a/arch/arm/include/asm/arch-rockchip/cru_rv1108.h
+++ b/arch/arm/include/asm/arch-rockchip/cru_rv1108.h
@@ -6,7 +6,9 @@
#ifndef _ASM_ARCH_CRU_RV1108_H
#define _ASM_ARCH_CRU_RV1108_H
-#include <common.h>
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
#define OSC_HZ (24 * 1000 * 1000)
diff --git a/arch/arm/include/asm/arch-rockchip/ddr_rk3368.h b/arch/arm/include/asm/arch-rockchip/ddr_rk3368.h
index 82234cf8ad..40cdcf4a45 100644
--- a/arch/arm/include/asm/arch-rockchip/ddr_rk3368.h
+++ b/arch/arm/include/asm/arch-rockchip/ddr_rk3368.h
@@ -6,6 +6,10 @@
#ifndef __ASM_ARCH_DDR_RK3368_H__
#define __ASM_ARCH_DDR_RK3368_H__
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
/*
* The RK3368 DDR PCTL differs from the incarnation in the RK3288 only
* in a few details. Most notably, it has an additional field to track
diff --git a/arch/arm/include/asm/arch-rockchip/grf_px30.h b/arch/arm/include/asm/arch-rockchip/grf_px30.h
index 3d2a877032..d51e29b19e 100644
--- a/arch/arm/include/asm/arch-rockchip/grf_px30.h
+++ b/arch/arm/include/asm/arch-rockchip/grf_px30.h
@@ -5,8 +5,6 @@
#ifndef _ASM_ARCH_GRF_px30_H
#define _ASM_ARCH_GRF_px30_H
-#include <common.h>
-
struct px30_grf {
unsigned int gpio1al_iomux;
unsigned int gpio1ah_iomux;
diff --git a/arch/arm/include/asm/arch-rockchip/grf_rk3036.h b/arch/arm/include/asm/arch-rockchip/grf_rk3036.h
index 5f12ebf262..08348d8228 100644
--- a/arch/arm/include/asm/arch-rockchip/grf_rk3036.h
+++ b/arch/arm/include/asm/arch-rockchip/grf_rk3036.h
@@ -5,8 +5,6 @@
#ifndef _ASM_ARCH_GRF_RK3036_H
#define _ASM_ARCH_GRF_RK3036_H
-#include <common.h>
-
struct rk3036_grf {
unsigned int reserved[0x2a];
unsigned int gpio0a_iomux;
diff --git a/arch/arm/include/asm/arch-rockchip/grf_rk3128.h b/arch/arm/include/asm/arch-rockchip/grf_rk3128.h
index 519b36ad2a..fe07d69b42 100644
--- a/arch/arm/include/asm/arch-rockchip/grf_rk3128.h
+++ b/arch/arm/include/asm/arch-rockchip/grf_rk3128.h
@@ -5,8 +5,6 @@
#ifndef _ASM_ARCH_GRF_RK3128_H
#define _ASM_ARCH_GRF_RK3128_H
-#include <common.h>
-
struct rk3128_grf {
unsigned int reserved[0x2a];
unsigned int gpio0a_iomux;
diff --git a/arch/arm/include/asm/arch-rockchip/grf_rk322x.h b/arch/arm/include/asm/arch-rockchip/grf_rk322x.h
index a99d13732d..5f4d9d8224 100644
--- a/arch/arm/include/asm/arch-rockchip/grf_rk322x.h
+++ b/arch/arm/include/asm/arch-rockchip/grf_rk322x.h
@@ -5,8 +5,6 @@
#ifndef _ASM_ARCH_GRF_RK322X_H
#define _ASM_ARCH_GRF_RK322X_H
-#include <common.h>
-
struct rk322x_grf {
unsigned int gpio0a_iomux;
unsigned int gpio0b_iomux;
diff --git a/arch/arm/include/asm/arch-rockchip/grf_rk3368.h b/arch/arm/include/asm/arch-rockchip/grf_rk3368.h
index b70b08fcce..0079d20078 100644
--- a/arch/arm/include/asm/arch-rockchip/grf_rk3368.h
+++ b/arch/arm/include/asm/arch-rockchip/grf_rk3368.h
@@ -6,7 +6,9 @@
#ifndef _ASM_ARCH_GRF_RK3368_H
#define _ASM_ARCH_GRF_RK3368_H
-#include <common.h>
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
struct rk3368_grf {
u32 gpio1a_iomux;
diff --git a/arch/arm/include/asm/arch-rockchip/grf_rv1108.h b/arch/arm/include/asm/arch-rockchip/grf_rv1108.h
index 9f42fbde8d..92bbe34af6 100644
--- a/arch/arm/include/asm/arch-rockchip/grf_rv1108.h
+++ b/arch/arm/include/asm/arch-rockchip/grf_rv1108.h
@@ -5,8 +5,6 @@
#ifndef _ASM_ARCH_GRF_RV1108_H
#define _ASM_ARCH_GRF_RV1108_H
-#include <common.h>
-
struct rv1108_grf {
u32 reserved[4];
u32 gpio1a_iomux;
diff --git a/arch/arm/include/asm/arch-rockchip/lvds_rk3288.h b/arch/arm/include/asm/arch-rockchip/lvds_rk3288.h
index 0f00df6bf5..fb25504b12 100644
--- a/arch/arm/include/asm/arch-rockchip/lvds_rk3288.h
+++ b/arch/arm/include/asm/arch-rockchip/lvds_rk3288.h
@@ -6,6 +6,10 @@
#ifndef _ASM_ARCH_LVDS_RK3288_H
#define _ASM_ARCH_LVDS_RK3288_H
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
#define RK3288_LVDS_CH0_REG0 0x00
#define RK3288_LVDS_CH0_REG0_LVDS_EN BIT(7)
#define RK3288_LVDS_CH0_REG0_TTL_EN BIT(6)
diff --git a/arch/arm/include/asm/arch-rockchip/sdram_pctl_px30.h b/arch/arm/include/asm/arch-rockchip/sdram_pctl_px30.h
index 9781881738..3a3657789f 100644
--- a/arch/arm/include/asm/arch-rockchip/sdram_pctl_px30.h
+++ b/arch/arm/include/asm/arch-rockchip/sdram_pctl_px30.h
@@ -7,6 +7,10 @@
#define _ASM_ARCH_SDRAM_PCTL_PX30_H
#include <asm/arch-rockchip/sdram_common.h>
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
struct ddr_pctl_regs {
u32 pctl[30][2];
};
diff --git a/arch/arm/include/asm/arch-rockchip/sdram_phy_px30.h b/arch/arm/include/asm/arch-rockchip/sdram_phy_px30.h
index c75a633c91..a033a18538 100644
--- a/arch/arm/include/asm/arch-rockchip/sdram_phy_px30.h
+++ b/arch/arm/include/asm/arch-rockchip/sdram_phy_px30.h
@@ -8,6 +8,10 @@
#include <asm/arch-rockchip/sdram_common.h>
#include <asm/arch-rockchip/sdram_phy_ron_rtt_px30.h>
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
struct ddr_phy_regs {
u32 phy[5][2];
};
diff --git a/arch/arm/include/asm/arch-rockchip/sdram_rk3036.h b/arch/arm/include/asm/arch-rockchip/sdram_rk3036.h
index 5de3220d6f..46298165fb 100644
--- a/arch/arm/include/asm/arch-rockchip/sdram_rk3036.h
+++ b/arch/arm/include/asm/arch-rockchip/sdram_rk3036.h
@@ -5,8 +5,6 @@
#ifndef _ASM_ARCH_SDRAM_RK3036_H
#define _ASM_ARCH_SDRAM_RK3036_H
-#include <common.h>
-
struct rk3036_ddr_pctl {
u32 scfg;
u32 sctl;
diff --git a/arch/arm/include/asm/arch-rockchip/sdram_rk322x.h b/arch/arm/include/asm/arch-rockchip/sdram_rk322x.h
index 336c5d7e8c..6f6c5c9954 100644
--- a/arch/arm/include/asm/arch-rockchip/sdram_rk322x.h
+++ b/arch/arm/include/asm/arch-rockchip/sdram_rk322x.h
@@ -5,7 +5,9 @@
#ifndef _ASM_ARCH_SDRAM_RK322X_H
#define _ASM_ARCH_SDRAM_RK322X_H
-#include <common.h>
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
struct rk322x_sdram_channel {
/*
diff --git a/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h b/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h
index 267649fda4..c76372ee82 100644
--- a/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h
+++ b/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h
@@ -7,6 +7,9 @@
#define _ASM_ARCH_SDRAM_RK3399_H
#include <asm/arch-rockchip/sdram_common.h>
#include <asm/arch-rockchip/sdram_msch.h>
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
struct rk3399_ddr_pctl_regs {
u32 denali_ctl[332];
diff --git a/arch/arm/include/asm/arch-s32v234/clock.h b/arch/arm/include/asm/arch-s32v234/clock.h
index c60065444c..70846094e8 100644
--- a/arch/arm/include/asm/arch-s32v234/clock.h
+++ b/arch/arm/include/asm/arch-s32v234/clock.h
@@ -6,8 +6,6 @@
#ifndef __ASM_ARCH_CLOCK_H
#define __ASM_ARCH_CLOCK_H
-#include <common.h>
-
enum mxc_clock {
MXC_ARM_CLK = 0,
MXC_BUS_CLK,
diff --git a/arch/arm/include/asm/arch-s32v234/imx-regs.h b/arch/arm/include/asm/arch-s32v234/imx-regs.h
index 9a779cce96..1472a43f1b 100644
--- a/arch/arm/include/asm/arch-s32v234/imx-regs.h
+++ b/arch/arm/include/asm/arch-s32v234/imx-regs.h
@@ -323,6 +323,6 @@ struct mscm_ir {
u32 ipcie[4]; /* Interconnect Parity Checking Injection Enable Register */
};
-#endif /* __ASSEMBLER__ */
+#endif /* __ASSEMBLY__ */
#endif /* __ASM_ARCH_IMX_REGS_H__ */
diff --git a/arch/arm/include/asm/arch-stih410/sdhci.h b/arch/arm/include/asm/arch-stih410/sdhci.h
index 105d3580ef..d5557b89fc 100644
--- a/arch/arm/include/asm/arch-stih410/sdhci.h
+++ b/arch/arm/include/asm/arch-stih410/sdhci.h
@@ -7,6 +7,10 @@
#ifndef __STI_SDHCI_H__
#define __STI_SDHCI_H__
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
#define FLASHSS_MMC_CORE_CONFIG_1 0x400
#define FLASHSS_MMC_CORECFG_TIMEOUT_CLK_UNIT_MHZ BIT(24)
#define FLASHSS_MMC_CORECFG_TIMEOUT_CLK_FREQ_MIN BIT(12)
diff --git a/arch/arm/include/asm/arch-stm32f4/stm32_pwr.h b/arch/arm/include/asm/arch-stm32f4/stm32_pwr.h
index de42996037..8af6de220d 100644
--- a/arch/arm/include/asm/arch-stm32f4/stm32_pwr.h
+++ b/arch/arm/include/asm/arch-stm32f4/stm32_pwr.h
@@ -5,6 +5,11 @@
*/
#ifndef __STM32_PWR_H_
+#define __STM32_PWR_H_
+
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
/*
* Offsets of some PWR registers
diff --git a/arch/arm/include/asm/arch-stm32f7/stm32_pwr.h b/arch/arm/include/asm/arch-stm32f7/stm32_pwr.h
index c93fc5a7e3..02faaeb663 100644
--- a/arch/arm/include/asm/arch-stm32f7/stm32_pwr.h
+++ b/arch/arm/include/asm/arch-stm32f7/stm32_pwr.h
@@ -5,6 +5,11 @@
*/
#ifndef __STM32_PWR_H_
+#define __STM32_PWR_H_
+
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
/*
* Offsets of some PWR registers
diff --git a/arch/arm/include/asm/arch-stm32f7/syscfg.h b/arch/arm/include/asm/arch-stm32f7/syscfg.h
index ce2a952f78..985ae2544d 100644
--- a/arch/arm/include/asm/arch-stm32f7/syscfg.h
+++ b/arch/arm/include/asm/arch-stm32f7/syscfg.h
@@ -7,6 +7,10 @@
#ifndef _STM32_SYSCFG_H
#define _STM32_SYSCFG_H
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
struct stm32_syscfg_regs {
u32 memrmp;
u32 pmc;
diff --git a/arch/arm/include/asm/arch-sunxi/ccu.h b/arch/arm/include/asm/arch-sunxi/ccu.h
index 5dd97ab227..cac5c5faf0 100644
--- a/arch/arm/include/asm/arch-sunxi/ccu.h
+++ b/arch/arm/include/asm/arch-sunxi/ccu.h
@@ -7,6 +7,10 @@
#ifndef _ASM_ARCH_CCU_H
#define _ASM_ARCH_CCU_H
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
/**
* enum ccu_flags - ccu clock/reset flags
*
diff --git a/arch/arm/include/asm/arch-sunxi/clock_sun50i_h6.h b/arch/arm/include/asm/arch-sunxi/clock_sun50i_h6.h
index e36937059b..426069fc69 100644
--- a/arch/arm/include/asm/arch-sunxi/clock_sun50i_h6.h
+++ b/arch/arm/include/asm/arch-sunxi/clock_sun50i_h6.h
@@ -9,6 +9,10 @@
#ifndef _SUNXI_CLOCK_SUN50I_H6_H
#define _SUNXI_CLOCK_SUN50I_H6_H
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
struct sunxi_ccm_reg {
u32 pll1_cfg; /* 0x000 pll1 (cpux) control */
u8 reserved_0x004[12];
diff --git a/arch/arm/include/asm/arch-sunxi/clock_sun9i.h b/arch/arm/include/asm/arch-sunxi/clock_sun9i.h
index 530e0dd73b..fe6b8ba273 100644
--- a/arch/arm/include/asm/arch-sunxi/clock_sun9i.h
+++ b/arch/arm/include/asm/arch-sunxi/clock_sun9i.h
@@ -8,6 +8,10 @@
#ifndef _SUNXI_CLOCK_SUN9I_H
#define _SUNXI_CLOCK_SUN9I_H
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
struct sunxi_ccm_reg {
u32 pll1_c0_cfg; /* 0x00 c0cpu# pll configuration */
u32 pll2_c1_cfg; /* 0x04 c1cpu# pll configuration */
diff --git a/arch/arm/include/asm/arch-sunxi/dram_sun50i_h6.h b/arch/arm/include/asm/arch-sunxi/dram_sun50i_h6.h
index 49a8a66f7b..be02655cdd 100644
--- a/arch/arm/include/asm/arch-sunxi/dram_sun50i_h6.h
+++ b/arch/arm/include/asm/arch-sunxi/dram_sun50i_h6.h
@@ -10,6 +10,9 @@
#define _SUNXI_DRAM_SUN50I_H6_H
#include <stdbool.h>
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
enum sunxi_dram_type {
SUNXI_DRAM_TYPE_DDR3 = 3,
diff --git a/arch/arm/include/asm/arch-sunxi/dram_sun6i.h b/arch/arm/include/asm/arch-sunxi/dram_sun6i.h
index 929450fc67..b66d58cd73 100644
--- a/arch/arm/include/asm/arch-sunxi/dram_sun6i.h
+++ b/arch/arm/include/asm/arch-sunxi/dram_sun6i.h
@@ -13,6 +13,10 @@
#ifndef _SUNXI_DRAM_SUN6I_H
#define _SUNXI_DRAM_SUN6I_H
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
struct sunxi_mctl_com_reg {
u32 cr; /* 0x00 */
u32 ccr; /* 0x04 controller configuration register */
diff --git a/arch/arm/include/asm/arch-sunxi/dram_sun8i_a33.h b/arch/arm/include/asm/arch-sunxi/dram_sun8i_a33.h
index 49a6108c19..3f65306cc6 100644
--- a/arch/arm/include/asm/arch-sunxi/dram_sun8i_a33.h
+++ b/arch/arm/include/asm/arch-sunxi/dram_sun8i_a33.h
@@ -11,6 +11,10 @@
#ifndef _SUNXI_DRAM_SUN8I_A33_H
#define _SUNXI_DRAM_SUN8I_A33_H
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
struct sunxi_mctl_com_reg {
u32 cr; /* 0x00 */
u32 ccr; /* 0x04 controller configuration register */
diff --git a/arch/arm/include/asm/arch-sunxi/dram_sun8i_a83t.h b/arch/arm/include/asm/arch-sunxi/dram_sun8i_a83t.h
index d4634e55e4..2a87996354 100644
--- a/arch/arm/include/asm/arch-sunxi/dram_sun8i_a83t.h
+++ b/arch/arm/include/asm/arch-sunxi/dram_sun8i_a83t.h
@@ -11,6 +11,10 @@
#ifndef _SUNXI_DRAM_SUN8I_A83T_H
#define _SUNXI_DRAM_SUN8I_A83T_H
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
struct sunxi_mctl_com_reg {
u32 cr; /* 0x00 */
u32 ccr; /* 0x04 controller configuration register */
diff --git a/arch/arm/include/asm/arch-sunxi/dram_sun9i.h b/arch/arm/include/asm/arch-sunxi/dram_sun9i.h
index 603850b9ff..41df5fe5b6 100644
--- a/arch/arm/include/asm/arch-sunxi/dram_sun9i.h
+++ b/arch/arm/include/asm/arch-sunxi/dram_sun9i.h
@@ -11,6 +11,10 @@
#ifndef _SUNXI_DRAM_SUN9I_H
#define _SUNXI_DRAM_SUN9I_H
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
struct sunxi_mctl_com_reg {
u32 cr; /* 0x00 */
u32 ccr; /* 0x04 controller configuration register */
diff --git a/arch/arm/include/asm/arch-sunxi/pwm.h b/arch/arm/include/asm/arch-sunxi/pwm.h
index dca283c7a9..b89bddd2e8 100644
--- a/arch/arm/include/asm/arch-sunxi/pwm.h
+++ b/arch/arm/include/asm/arch-sunxi/pwm.h
@@ -6,6 +6,10 @@
#ifndef _SUNXI_PWM_H
#define _SUNXI_PWM_H
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
#define SUNXI_PWM_CTRL_REG (SUNXI_PWM_BASE + 0)
#define SUNXI_PWM_CH0_PERIOD (SUNXI_PWM_BASE + 4)
diff --git a/arch/arm/include/asm/arch-sunxi/rsb.h b/arch/arm/include/asm/arch-sunxi/rsb.h
index 616b6e2a64..8c64a995f2 100644
--- a/arch/arm/include/asm/arch-sunxi/rsb.h
+++ b/arch/arm/include/asm/arch-sunxi/rsb.h
@@ -11,7 +11,6 @@
#ifndef __SUNXI_RSB_H
#define __SUNXI_RSB_H
-#include <common.h>
#include <asm/io.h>
struct sunxi_rsb_reg {
diff --git a/arch/arm/include/asm/arch-tegra/cboot.h b/arch/arm/include/asm/arch-tegra/cboot.h
index 021c246175..4e1da98d1f 100644
--- a/arch/arm/include/asm/arch-tegra/cboot.h
+++ b/arch/arm/include/asm/arch-tegra/cboot.h
@@ -6,7 +6,10 @@
#ifndef _TEGRA_CBOOT_H_
#define _TEGRA_CBOOT_H_
+#include <net.h>
+
#ifdef CONFIG_ARM64
+
extern unsigned long cboot_boot_x0;
void cboot_save_boot_params(unsigned long x0, unsigned long x1,
diff --git a/arch/arm/include/asm/arch-tegra/dc.h b/arch/arm/include/asm/arch-tegra/dc.h
index 59347dd3d8..6444af2993 100644
--- a/arch/arm/include/asm/arch-tegra/dc.h
+++ b/arch/arm/include/asm/arch-tegra/dc.h
@@ -7,6 +7,10 @@
#ifndef __ASM_ARCH_TEGRA_DC_H
#define __ASM_ARCH_TEGRA_DC_H
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
/* Register definitions for the Tegra display controller */
/* CMD register 0x000 ~ 0x43 */
diff --git a/arch/arm/include/asm/arch-tegra/ivc.h b/arch/arm/include/asm/arch-tegra/ivc.h
index 53cb56d271..52c10b8fab 100644
--- a/arch/arm/include/asm/arch-tegra/ivc.h
+++ b/arch/arm/include/asm/arch-tegra/ivc.h
@@ -6,8 +6,6 @@
#ifndef _ASM_ARCH_TEGRA_IVC_H
#define _ASM_ARCH_TEGRA_IVC_H
-#include <common.h>
-
/*
* Tegra IVC is a communication protocol that transfers fixed-size frames
* bi-directionally and in-order between the local CPU and some remote entity.
diff --git a/arch/arm/include/asm/arch-tegra/pmc.h b/arch/arm/include/asm/arch-tegra/pmc.h
index 1524bf2911..e1f5a73813 100644
--- a/arch/arm/include/asm/arch-tegra/pmc.h
+++ b/arch/arm/include/asm/arch-tegra/pmc.h
@@ -7,6 +7,10 @@
#ifndef _PMC_H_
#define _PMC_H_
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
/* Power Management Controller (APBDEV_PMC_) registers */
struct pmc_ctlr {
uint pmc_cntrl; /* _CNTRL_0, offset 00 */
diff --git a/arch/arm/include/asm/arch-tegra/tegra_mmc.h b/arch/arm/include/asm/arch-tegra/tegra_mmc.h
index 70dcf4aa66..d6a55764ba 100644
--- a/arch/arm/include/asm/arch-tegra/tegra_mmc.h
+++ b/arch/arm/include/asm/arch-tegra/tegra_mmc.h
@@ -8,7 +8,6 @@
#ifndef __TEGRA_MMC_H_
#define __TEGRA_MMC_H_
-#include <common.h>
#include <clk.h>
#include <reset.h>
#include <fdtdec.h>
diff --git a/arch/arm/include/asm/arch-tegra124/flow.h b/arch/arm/include/asm/arch-tegra124/flow.h
index 62947bf99c..ebcb22f1cb 100644
--- a/arch/arm/include/asm/arch-tegra124/flow.h
+++ b/arch/arm/include/asm/arch-tegra124/flow.h
@@ -7,6 +7,10 @@
#ifndef _TEGRA124_FLOW_H_
#define _TEGRA124_FLOW_H_
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
struct flow_ctlr {
u32 halt_cpu_events; /* offset 0x00 */
u32 halt_cop_events; /* offset 0x04 */
diff --git a/arch/arm/include/asm/arch-vf610/clock.h b/arch/arm/include/asm/arch-vf610/clock.h
index 72184fd608..ec9786ce4f 100644
--- a/arch/arm/include/asm/arch-vf610/clock.h
+++ b/arch/arm/include/asm/arch-vf610/clock.h
@@ -6,8 +6,6 @@
#ifndef __ASM_ARCH_CLOCK_H
#define __ASM_ARCH_CLOCK_H
-#include <common.h>
-
enum mxc_clock {
MXC_ARM_CLK = 0,
MXC_BUS_CLK,
diff --git a/arch/arm/include/asm/arch-vf610/imx-regs.h b/arch/arm/include/asm/arch-vf610/imx-regs.h
index ae0a187c4d..97211f4b12 100644
--- a/arch/arm/include/asm/arch-vf610/imx-regs.h
+++ b/arch/arm/include/asm/arch-vf610/imx-regs.h
@@ -302,6 +302,7 @@
#if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))
#include <asm/types.h>
+#include <linux/bitops.h>
/* System Reset Controller (SRC) */
struct src {
@@ -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 8f77ec42a6..16b9d0d1ae 100644
--- a/arch/arm/include/asm/armv7_mpu.h
+++ b/arch/arm/include/asm/armv7_mpu.h
@@ -7,6 +7,10 @@
#ifndef _ASM_ARMV7_MPU_H
#define _ASM_ARMV7_MPU_H
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
#ifdef CONFIG_CPU_V7M
#define AP_SHIFT 24
#define XN_SHIFT 28
diff --git a/arch/arm/include/asm/bitops.h b/arch/arm/include/asm/bitops.h
index b02c454d04..fa8548624a 100644
--- a/arch/arm/include/asm/bitops.h
+++ b/arch/arm/include/asm/bitops.h
@@ -16,9 +16,15 @@
#define __ASM_ARM_BITOPS_H
#include <asm-generic/bitops/__ffs.h>
+#include <asm-generic/bitops/__fls.h>
+#include <asm-generic/bitops/fls.h>
+#include <asm-generic/bitops/fls64.h>
#ifdef __KERNEL__
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
#include <asm/proc-armv/system.h>
#define smp_mb__before_clear_bit() do { } while (0)
@@ -176,8 +182,4 @@ found_middle:
#endif /* __KERNEL__ */
-#include <asm-generic/bitops/__fls.h>
-#include <asm-generic/bitops/fls.h>
-#include <asm-generic/bitops/fls64.h>
-
#endif /* _ARM_BITOPS_H */
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h
index 8bb3fa2e0e..8af1ea0aa4 100644
--- a/arch/arm/include/asm/dma-mapping.h
+++ b/arch/arm/include/asm/dma-mapping.h
@@ -7,10 +7,10 @@
#ifndef __ASM_ARM_DMA_MAPPING_H
#define __ASM_ARM_DMA_MAPPING_H
-#include <common.h>
#include <asm/cache.h>
#include <cpu_func.h>
#include <linux/dma-direction.h>
+#include <linux/kernel.h>
#include <linux/types.h>
#include <malloc.h>
diff --git a/arch/arm/include/asm/emif.h b/arch/arm/include/asm/emif.h
index dc398efd32..35424345bf 100644
--- a/arch/arm/include/asm/emif.h
+++ b/arch/arm/include/asm/emif.h
@@ -13,7 +13,6 @@
#ifndef _EMIF_H_
#define _EMIF_H_
#include <asm/types.h>
-#include <common.h>
#include <asm/io.h>
/* Base address */
diff --git a/arch/arm/include/asm/gic-v3.h b/arch/arm/include/asm/gic-v3.h
index ac6c9e7013..5131fabec4 100644
--- a/arch/arm/include/asm/gic-v3.h
+++ b/arch/arm/include/asm/gic-v3.h
@@ -6,6 +6,10 @@
#ifndef __GIC_V3_H__
#define __GIC_V3_H__
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
#define GICR_CTLR_ENABLE_LPIS BIT(0)
#define GICR_CTLR_RWP BIT(3)
diff --git a/arch/arm/include/asm/mach-imx/dma.h b/arch/arm/include/asm/mach-imx/dma.h
index 247a91afb0..55eb84cb8e 100644
--- a/arch/arm/include/asm/mach-imx/dma.h
+++ b/arch/arm/include/asm/mach-imx/dma.h
@@ -13,6 +13,7 @@
#ifndef __DMA_H__
#define __DMA_H__
+#include <asm/cache.h>
#include <linux/list.h>
#include <linux/compiler.h>
diff --git a/arch/arm/include/asm/mach-imx/iomux-v3.h b/arch/arm/include/asm/mach-imx/iomux-v3.h
index 06dbd8d943..1de7093355 100644
--- a/arch/arm/include/asm/mach-imx/iomux-v3.h
+++ b/arch/arm/include/asm/mach-imx/iomux-v3.h
@@ -10,7 +10,7 @@
#ifndef __MACH_IOMUX_V3_H__
#define __MACH_IOMUX_V3_H__
-#include <common.h>
+#include <linux/types.h>
/*
* build IOMUX_PAD structure
diff --git a/arch/arm/include/asm/mach-imx/sys_proto.h b/arch/arm/include/asm/mach-imx/sys_proto.h
index 927195f87a..0bc705df17 100644
--- a/arch/arm/include/asm/mach-imx/sys_proto.h
+++ b/arch/arm/include/asm/mach-imx/sys_proto.h
@@ -10,9 +10,11 @@
#include <asm/io.h>
#include <asm/mach-imx/regs-common.h>
#include <asm/mach-imx/module_fuse.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)
@@ -182,7 +184,7 @@ char nxp_board_rev_string(void);
* Initializes on-chip ethernet controllers.
* to override, implement board_eth_init()
*/
-int fecmxc_initialize(bd_t *bis);
+int fecmxc_initialize(struct bd_info *bis);
u32 get_ahb_clk(void);
u32 get_periph_clk(void);
diff --git a/arch/arm/include/asm/omap_common.h b/arch/arm/include/asm/omap_common.h
index 54b7cd19bb..de8fc99d04 100644
--- a/arch/arm/include/asm/omap_common.h
+++ b/arch/arm/include/asm/omap_common.h
@@ -10,10 +10,12 @@
#ifndef __ASSEMBLY__
-#include <common.h>
+#include <linux/types.h>
#define NUM_SYS_CLKS 7
+struct bd_info;
+
struct prcm_regs {
/* cm1.ckgen */
u32 cm_clksel_core;
@@ -683,9 +685,9 @@ void omap_die_id(unsigned int *die_id);
void gpi2c_init(void);
/* Common FDT Fixups */
-int ft_hs_disable_rng(void *fdt, bd_t *bd);
-int ft_hs_fixup_dram(void *fdt, bd_t *bd);
-int ft_hs_add_tee(void *fdt, bd_t *bd);
+int ft_hs_disable_rng(void *fdt, struct bd_info *bd);
+int ft_hs_fixup_dram(void *fdt, struct bd_info *bd);
+int ft_hs_add_tee(void *fdt, struct bd_info *bd);
/* ABB */
#define OMAP_ABB_NOMINAL_OPP 0
diff --git a/arch/arm/include/asm/omap_mmc.h b/arch/arm/include/asm/omap_mmc.h
index 6d31cc4422..7933ad5a86 100644
--- a/arch/arm/include/asm/omap_mmc.h
+++ b/arch/arm/include/asm/omap_mmc.h
@@ -26,6 +26,9 @@
#define OMAP_MMC_H_
#include <mmc.h>
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
struct hsmmc {
#ifndef CONFIG_OMAP34XX
diff --git a/arch/arm/include/asm/omap_sec_common.h b/arch/arm/include/asm/omap_sec_common.h
index f10a41f304..30f0a9f5cb 100644
--- a/arch/arm/include/asm/omap_sec_common.h
+++ b/arch/arm/include/asm/omap_sec_common.h
@@ -8,8 +8,6 @@
#ifndef _OMAP_SEC_COMMON_H_
#define _OMAP_SEC_COMMON_H_
-#include <common.h>
-
/*
* Invoke secure ROM API on high-security (HS) device variants. It formats
* the variable argument list into the format expected by the ROM code before
diff --git a/arch/arm/include/asm/psci.h b/arch/arm/include/asm/psci.h
index 3ddcd95a26..67e9234066 100644
--- a/arch/arm/include/asm/psci.h
+++ b/arch/arm/include/asm/psci.h
@@ -18,6 +18,10 @@
#ifndef __ARM_PSCI_H__
#define __ARM_PSCI_H__
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
#define ARM_PSCI_VER_1_0 (0x00010000)
#define ARM_PSCI_VER_0_2 (0x00000002)
@@ -96,6 +100,7 @@
#ifndef __ASSEMBLY__
#include <asm/types.h>
+#include <linux/bitops.h>
/* These 3 helper functions assume cpu < CONFIG_ARMV7_PSCI_NR_CPUS */
u32 psci_get_target_pc(int cpu);
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
index a3147fde14..1e3f574403 100644
--- a/arch/arm/include/asm/system.h
+++ b/arch/arm/include/asm/system.h
@@ -1,7 +1,6 @@
#ifndef __ASM_ARM_SYSTEM_H
#define __ASM_ARM_SYSTEM_H
-#include <common.h>
#include <linux/compiler.h>
#include <asm/barriers.h>
@@ -110,6 +109,8 @@
#ifndef __ASSEMBLY__
+struct pt_regs;
+
u64 get_page_table_size(void);
#define PGTABLE_SIZE get_page_table_size()
diff --git a/arch/arm/include/asm/ti-common/keystone_net.h b/arch/arm/include/asm/ti-common/keystone_net.h
index bba1048499..0852ce80a6 100644
--- a/arch/arm/include/asm/ti-common/keystone_net.h
+++ b/arch/arm/include/asm/ti-common/keystone_net.h
@@ -11,6 +11,9 @@
#include <asm/io.h>
#include <phy.h>
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
/* EMAC */
#ifdef CONFIG_KSNET_NETCP_V1_0
diff --git a/arch/arm/include/asm/ti-common/omap_wdt.h b/arch/arm/include/asm/ti-common/omap_wdt.h
index fbc421b630..42d7e4c989 100644
--- a/arch/arm/include/asm/ti-common/omap_wdt.h
+++ b/arch/arm/include/asm/ti-common/omap_wdt.h
@@ -10,6 +10,10 @@
#ifndef __OMAP_WDT_H__
#define __OMAP_WDT_H__
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
/*
* Watchdog:
* Using the prescaler, the OMAP watchdog could go for many
diff --git a/arch/arm/include/asm/ti-common/ti-edma3.h b/arch/arm/include/asm/ti-common/ti-edma3.h
index 96c8a31fb8..9abdbc88e4 100644
--- a/arch/arm/include/asm/ti-common/ti-edma3.h
+++ b/arch/arm/include/asm/ti-common/ti-edma3.h
@@ -9,6 +9,9 @@
#ifndef _EDMA3_H_
#define _EDMA3_H_
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
#include <linux/stddef.h>
#define EDMA3_PARSET_NULL_LINK 0xffff
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index f4b5ca6de0..2df98d3e01 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -12,10 +12,13 @@
*/
#include <common.h>
+#include <bootstage.h>
#include <command.h>
#include <cpu_func.h>
#include <dm.h>
#include <hang.h>
+#include <lmb.h>
+#include <log.h>
#include <dm/root.h>
#include <env.h>
#include <image.h>
@@ -29,6 +32,7 @@
#include <linux/compiler.h>
#include <bootm.h>
#include <vxworks.h>
+#include <asm/cache.h>
#ifdef CONFIG_ARMV7_NONSEC
#include <asm/armv7.h>
@@ -419,7 +423,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/cache-cp15.c b/arch/arm/lib/cache-cp15.c
index f803d6fb8c..1da2e92fe2 100644
--- a/arch/arm/lib/cache-cp15.c
+++ b/arch/arm/lib/cache-cp15.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <log.h>
#include <asm/system.h>
#include <asm/cache.h>
#include <linux/compiler.h>
diff --git a/arch/arm/lib/cache.c b/arch/arm/lib/cache.c
index 224f2aef14..ee7d14b2d3 100644
--- a/arch/arm/lib/cache.c
+++ b/arch/arm/lib/cache.c
@@ -8,7 +8,9 @@
#include <common.h>
#include <cpu_func.h>
+#include <log.h>
#include <malloc.h>
+#include <asm/cache.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/lib/cmd_boot.c b/arch/arm/lib/cmd_boot.c
index 03dde84252..c905ecc4bd 100644
--- a/arch/arm/lib/cmd_boot.c
+++ b/arch/arm/lib/cmd_boot.c
@@ -32,7 +32,7 @@
* instructions, otherwise a fault occurs."
*/
unsigned long do_go_exec(ulong (*entry)(int, char * const []),
- int argc, char * const argv[])
+ int argc, char *const argv[])
{
ulong addr = (ulong)entry | 1;
entry = (void *)addr;
diff --git a/arch/arm/lib/gic-v3-its.c b/arch/arm/lib/gic-v3-its.c
index 6ee22d2944..90f37a123c 100644
--- a/arch/arm/lib/gic-v3-its.c
+++ b/arch/arm/lib/gic-v3-its.c
@@ -6,6 +6,7 @@
#include <asm/gic.h>
#include <asm/gic-v3.h>
#include <asm/io.h>
+#include <linux/bitops.h>
#include <linux/sizes.h>
static u32 lpi_id_bits;
diff --git a/arch/arm/lib/image.c b/arch/arm/lib/image.c
index 699bf44e70..94590d3049 100644
--- a/arch/arm/lib/image.c
+++ b/arch/arm/lib/image.c
@@ -5,7 +5,9 @@
*/
#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/lib/interrupts.c b/arch/arm/lib/interrupts.c
index 36299d6e54..703be5a320 100644
--- a/arch/arm/lib/interrupts.c
+++ b/arch/arm/lib/interrupts.c
@@ -23,6 +23,7 @@
#include <efi_loader.h>
#include <irq_func.h>
#include <asm/proc-armv/ptrace.h>
+#include <asm/ptrace.h>
#include <asm/u-boot-arm.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/lib/interrupts_64.c b/arch/arm/lib/interrupts_64.c
index a2df7cf193..5299489013 100644
--- a/arch/arm/lib/interrupts_64.c
+++ b/arch/arm/lib/interrupts_64.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <asm/ptrace.h>
#include <irq_func.h>
#include <linux/compiler.h>
#include <efi_loader.h>
diff --git a/arch/arm/lib/psci-dt.c b/arch/arm/lib/psci-dt.c
index 246f3c7cb8..0ed29a43f1 100644
--- a/arch/arm/lib/psci-dt.c
+++ b/arch/arm/lib/psci-dt.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <asm/cache.h>
#include <linux/libfdt.h>
#include <fdt_support.h>
#include <linux/sizes.h>
diff --git a/arch/arm/lib/reset.c b/arch/arm/lib/reset.c
index 835a40e59d..4f1a768bfe 100644
--- a/arch/arm/lib/reset.c
+++ b/arch/arm/lib/reset.c
@@ -21,18 +21,20 @@
*/
#include <common.h>
+#include <command.h>
#include <cpu_func.h>
#include <irq_func.h>
+#include <linux/delay.h>
__weak void reset_misc(void)
{
}
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
puts ("resetting ...\n");
- udelay (50000); /* wait 50 ms */
+ mdelay(50); /* wait 50 ms */
disable_interrupts();
diff --git a/arch/arm/lib/semihosting.c b/arch/arm/lib/semihosting.c
index 2658026cf4..904fddd6c0 100644
--- a/arch/arm/lib/semihosting.c
+++ b/arch/arm/lib/semihosting.c
@@ -13,6 +13,8 @@
*/
#include <common.h>
#include <command.h>
+#include <env.h>
+#include <log.h>
#define SYSOPEN 0x01
#define SYSCLOSE 0x02
@@ -180,7 +182,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/lib/spl.c b/arch/arm/lib/spl.c
index 33cc76ba3d..af0c9ad6bd 100644
--- a/arch/arm/lib/spl.c
+++ b/arch/arm/lib/spl.c
@@ -9,8 +9,11 @@
#include <common.h>
#include <config.h>
+#include <init.h>
+#include <log.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/lib/stack.c b/arch/arm/lib/stack.c
index c89a219dd2..96a248c0a9 100644
--- a/arch/arm/lib/stack.c
+++ b/arch/arm/lib/stack.c
@@ -11,6 +11,7 @@
* Marius Groeger <mgroeger@sysgo.de>
*/
#include <common.h>
+#include <init.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/lib/zimage.c b/arch/arm/lib/zimage.c
index 49305299b3..477ea94997 100644
--- a/arch/arm/lib/zimage.c
+++ b/arch/arm/lib/zimage.c
@@ -7,6 +7,7 @@
* Copyright (C) 2012 Marek Vasut <marek.vasut@gmail.com>
*/
#include <common.h>
+#include <image.h>
#define LINUX_ARM_ZIMAGE_MAGIC 0x016f2818
#define BAREBOX_IMAGE_MAGIC 0x00786f62
diff --git a/arch/arm/mach-aspeed/ast2500-board.c b/arch/arm/mach-aspeed/ast2500-board.c
index e7edd544e2..f74dcbbb62 100644
--- a/arch/arm/mach-aspeed/ast2500-board.c
+++ b/arch/arm/mach-aspeed/ast2500-board.c
@@ -4,6 +4,8 @@
*/
#include <common.h>
#include <dm.h>
+#include <init.h>
+#include <log.h>
#include <ram.h>
#include <timer.h>
#include <asm/io.h>
diff --git a/arch/arm/mach-aspeed/ast2500/sdram_ast2500.c b/arch/arm/mach-aspeed/ast2500/sdram_ast2500.c
index 9498cbc92d..a3adaa8a99 100644
--- a/arch/arm/mach-aspeed/ast2500/sdram_ast2500.c
+++ b/arch/arm/mach-aspeed/ast2500/sdram_ast2500.c
@@ -9,6 +9,7 @@
#include <clk.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <ram.h>
#include <regmap.h>
#include <reset.h>
diff --git a/arch/arm/mach-at91/arm920t/cpu.c b/arch/arm/mach-at91/arm920t/cpu.c
index 42d0d2269f..44c079c0fd 100644
--- a/arch/arm/mach-at91/arm920t/cpu.c
+++ b/arch/arm/mach-at91/arm920t/cpu.c
@@ -11,6 +11,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/arch/hardware.h>
#include <asm/arch/clk.h>
diff --git a/arch/arm/mach-at91/arm920t/timer.c b/arch/arm/mach-at91/arm920t/timer.c
index 3aef9538b4..dca2d2c70c 100644
--- a/arch/arm/mach-at91/arm920t/timer.c
+++ b/arch/arm/mach-at91/arm920t/timer.c
@@ -14,7 +14,9 @@
*/
#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/arm926ejs/cpu.c b/arch/arm/mach-at91/arm926ejs/cpu.c
index e9b4e06595..761edb6df5 100644
--- a/arch/arm/mach-at91/arm926ejs/cpu.c
+++ b/arch/arm/mach-at91/arm926ejs/cpu.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <init.h>
#include <vsprintf.h>
#include <asm/io.h>
#include <asm/arch/hardware.h>
diff --git a/arch/arm/mach-at91/arm926ejs/eflash.c b/arch/arm/mach-at91/arm926ejs/eflash.c
index 7b61fa7226..23c24936ed 100644
--- a/arch/arm/mach-at91/arm926ejs/eflash.c
+++ b/arch/arm/mach-at91/arm926ejs/eflash.c
@@ -43,6 +43,8 @@
* do a read-modify-write for partially programmed pages
*/
#include <common.h>
+#include <flash.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/arch/hardware.h>
#include <asm/arch/at91_common.h>
@@ -58,7 +60,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 +129,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 +204,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 +217,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/arch/arm/mach-at91/arm926ejs/timer.c b/arch/arm/mach-at91/arm926ejs/timer.c
index 31ad0bf702..42ef349966 100644
--- a/arch/arm/mach-at91/arm926ejs/timer.c
+++ b/arch/arm/mach-at91/arm926ejs/timer.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <init.h>
#include <time.h>
#include <asm/io.h>
#include <asm/arch/hardware.h>
diff --git a/arch/arm/mach-at91/armv7/clock.c b/arch/arm/mach-at91/armv7/clock.c
index 3640fce882..3926896958 100644
--- a/arch/arm/mach-at91/armv7/clock.c
+++ b/arch/arm/mach-at91/armv7/clock.c
@@ -10,6 +10,7 @@
*/
#include <common.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <asm/io.h>
#include <asm/arch/hardware.h>
diff --git a/arch/arm/mach-at91/armv7/cpu.c b/arch/arm/mach-at91/armv7/cpu.c
index 4474a96743..a8f4356ce9 100644
--- a/arch/arm/mach-at91/armv7/cpu.c
+++ b/arch/arm/mach-at91/armv7/cpu.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
#include <vsprintf.h>
#include <asm/io.h>
#include <asm/arch/hardware.h>
diff --git a/arch/arm/mach-at91/armv7/timer.c b/arch/arm/mach-at91/armv7/timer.c
index 15c036cc27..a6346c01b2 100644
--- a/arch/arm/mach-at91/armv7/timer.c
+++ b/arch/arm/mach-at91/armv7/timer.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <init.h>
#include <time.h>
#include <asm/io.h>
#include <asm/arch/hardware.h>
diff --git a/arch/arm/mach-at91/include/mach/at91_pmc.h b/arch/arm/mach-at91/include/mach/at91_pmc.h
index f423afd0ad..2ce99d956c 100644
--- a/arch/arm/mach-at91/include/mach/at91_pmc.h
+++ b/arch/arm/mach-at91/include/mach/at91_pmc.h
@@ -24,6 +24,7 @@
#else
#include <asm/types.h>
+#include <linux/bitops.h>
typedef struct at91_pmc {
u32 scer; /* 0x00 System Clock Enable Register */
diff --git a/arch/arm/mach-at91/include/mach/at91_sfr.h b/arch/arm/mach-at91/include/mach/at91_sfr.h
index 0300c336dd..4517df41bc 100644
--- a/arch/arm/mach-at91/include/mach/at91_sfr.h
+++ b/arch/arm/mach-at91/include/mach/at91_sfr.h
@@ -9,6 +9,7 @@
#ifndef __AT91_SFR_H
#define __AT91_SFR_H
+#include <linux/bitops.h>
struct atmel_sfr {
u32 reserved1; /* 0x00 */
union {
diff --git a/arch/arm/mach-at91/include/mach/atmel_pio4.h b/arch/arm/mach-at91/include/mach/atmel_pio4.h
index 7a03d6d3c7..f348b05bc8 100644
--- a/arch/arm/mach-at91/include/mach/atmel_pio4.h
+++ b/arch/arm/mach-at91/include/mach/atmel_pio4.h
@@ -9,6 +9,7 @@
#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
struct atmel_pio4_port {
u32 mskr; /* 0x00 PIO Mask Register */
u32 cfgr; /* 0x04 PIO Configuration Register */
diff --git a/arch/arm/mach-at91/mpddrc.c b/arch/arm/mach-at91/mpddrc.c
index 3df0ea7c79..5422c05456 100644
--- a/arch/arm/mach-at91/mpddrc.c
+++ b/arch/arm/mach-at91/mpddrc.c
@@ -11,6 +11,7 @@
#include <asm/io.h>
#include <asm/arch/atmel_mpddrc.h>
#include <asm/arch/at91_common.h>
+#include <linux/delay.h>
#define SAMA5D3_MPDDRC_VERSION 0x140
diff --git a/arch/arm/mach-at91/phy.c b/arch/arm/mach-at91/phy.c
index a10c0cae74..6101eee358 100644
--- a/arch/arm/mach-at91/phy.c
+++ b/arch/arm/mach-at91/phy.c
@@ -14,6 +14,7 @@
#include <common.h>
#include <asm/hardware.h>
#include <asm/io.h>
+#include <linux/delay.h>
#include <linux/sizes.h>
#include <asm/arch/at91_rstc.h>
#include <watchdog.h>
diff --git a/arch/arm/mach-at91/spl_at91.c b/arch/arm/mach-at91/spl_at91.c
index 822f877de7..35a3d5185d 100644
--- a/arch/arm/mach-at91/spl_at91.c
+++ b/arch/arm/mach-at91/spl_at91.c
@@ -10,6 +10,8 @@
#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 6ee0e1c24c..23588e79f9 100644
--- a/arch/arm/mach-at91/spl_atmel.c
+++ b/arch/arm/mach-at91/spl_atmel.c
@@ -6,6 +6,8 @@
#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/include/mach/timer.h b/arch/arm/mach-bcm283x/include/mach/timer.h
index 01c0ebad64..5567dbd7f3 100644
--- a/arch/arm/mach-bcm283x/include/mach/timer.h
+++ b/arch/arm/mach-bcm283x/include/mach/timer.h
@@ -8,6 +8,7 @@
#ifndef __ASSEMBLY__
#include <asm/arch/base.h>
+#include <linux/bug.h>
#endif
#define BCM2835_TIMER_PHYSADDR ({ BUG_ON(!rpi_bcm283x_base); \
diff --git a/arch/arm/mach-bcm283x/init.c b/arch/arm/mach-bcm283x/init.c
index 9966d6c833..f4d00d892d 100644
--- a/arch/arm/mach-bcm283x/init.c
+++ b/arch/arm/mach-bcm283x/init.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
#include <dm/device.h>
#include <fdt_support.h>
diff --git a/arch/arm/mach-bcm283x/mbox.c b/arch/arm/mach-bcm283x/mbox.c
index 1785550642..da9faafe1d 100644
--- a/arch/arm/mach-bcm283x/mbox.c
+++ b/arch/arm/mach-bcm283x/mbox.c
@@ -5,6 +5,8 @@
#include <common.h>
#include <cpu_func.h>
+#include <log.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-davinci/cpu.c b/arch/arm/mach-davinci/cpu.c
index 9fd6564d04..40dd44af67 100644
--- a/arch/arm/mach-davinci/cpu.c
+++ b/arch/arm/mach-davinci/cpu.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/arch/hardware.h>
#include <asm/io.h>
diff --git a/arch/arm/mach-davinci/da850_lowlevel.c b/arch/arm/mach-davinci/da850_lowlevel.c
index 822e0dc4a1..07bf19b5e4 100644
--- a/arch/arm/mach-davinci/da850_lowlevel.c
+++ b/arch/arm/mach-davinci/da850_lowlevel.c
@@ -6,6 +6,7 @@
* Heiko Schocher, DENX Software Engineering, hs@denx.de.
*/
#include <common.h>
+#include <init.h>
#include <nand.h>
#include <ns16550.h>
#include <post.h>
diff --git a/arch/arm/mach-davinci/misc.c b/arch/arm/mach-davinci/misc.c
index 3e5185261c..5bfc47dae4 100644
--- a/arch/arm/mach-davinci/misc.c
+++ b/arch/arm/mach-davinci/misc.c
@@ -12,6 +12,7 @@
#include <env.h>
#include <i2c.h>
#include <init.h>
+#include <log.h>
#include <net.h>
#include <asm/arch/hardware.h>
#include <asm/io.h>
diff --git a/arch/arm/mach-davinci/spl.c b/arch/arm/mach-davinci/spl.c
index d44e840aa0..5fea935d6e 100644
--- a/arch/arm/mach-davinci/spl.c
+++ b/arch/arm/mach-davinci/spl.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <config.h>
#include <hang.h>
+#include <init.h>
#include <spl.h>
#include <asm/u-boot.h>
#include <asm/utils.h>
diff --git a/arch/arm/mach-davinci/timer.c b/arch/arm/mach-davinci/timer.c
index 9846463c60..a6681821f6 100644
--- a/arch/arm/mach-davinci/timer.c
+++ b/arch/arm/mach-davinci/timer.c
@@ -21,10 +21,12 @@
*/
#include <common.h>
+#include <init.h>
#include <time.h>
#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/clock.c b/arch/arm/mach-exynos/clock.c
index 73aa4cdad3..ef48d35aa4 100644
--- a/arch/arm/mach-exynos/clock.c
+++ b/arch/arm/mach-exynos/clock.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
#include <asm/arch/clk.h>
diff --git a/arch/arm/mach-exynos/include/mach/clock.h b/arch/arm/mach-exynos/include/mach/clock.h
index e4c706adea..9d23c476f9 100644
--- a/arch/arm/mach-exynos/include/mach/clock.h
+++ b/arch/arm/mach-exynos/include/mach/clock.h
@@ -8,6 +8,7 @@
#define __ASM_ARM_ARCH_CLOCK_H_
#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
struct exynos4_clock {
unsigned char res1[0x4200];
unsigned int src_leftbus;
diff --git a/arch/arm/mach-exynos/include/mach/dp_info.h b/arch/arm/mach-exynos/include/mach/dp_info.h
index d3a516fbc6..3226eb95f0 100644
--- a/arch/arm/mach-exynos/include/mach/dp_info.h
+++ b/arch/arm/mach-exynos/include/mach/dp_info.h
@@ -197,4 +197,5 @@ unsigned int exynos_init_dp(void)
}
#endif
+#include <linux/delay.h>
#endif /* _DP_INFO_H */
diff --git a/arch/arm/mach-exynos/lowlevel_init.c b/arch/arm/mach-exynos/lowlevel_init.c
index 1e090fd63c..97d6ca8fc2 100644
--- a/arch/arm/mach-exynos/lowlevel_init.c
+++ b/arch/arm/mach-exynos/lowlevel_init.c
@@ -26,6 +26,8 @@
#include <common.h>
#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/pinmux.c b/arch/arm/mach-exynos/pinmux.c
index b24f1bb8f4..ad3fbf2da7 100644
--- a/arch/arm/mach-exynos/pinmux.c
+++ b/arch/arm/mach-exynos/pinmux.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <fdtdec.h>
+#include <log.h>
#include <asm/gpio.h>
#include <asm/arch/pinmux.h>
#include <asm/arch/sromc.h>
diff --git a/arch/arm/mach-exynos/soc.c b/arch/arm/mach-exynos/soc.c
index c4cf59dabb..810fa348ee 100644
--- a/arch/arm/mach-exynos/soc.c
+++ b/arch/arm/mach-exynos/soc.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <asm/cache.h>
#include <asm/io.h>
#include <asm/system.h>
diff --git a/arch/arm/mach-exynos/spl_boot.c b/arch/arm/mach-exynos/spl_boot.c
index 103bb38d45..9c7ca49519 100644
--- a/arch/arm/mach-exynos/spl_boot.c
+++ b/arch/arm/mach-exynos/spl_boot.c
@@ -5,7 +5,10 @@
#include <common.h>
#include <config.h>
+#include <init.h>
+#include <log.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-highbank/timer.c b/arch/arm/mach-highbank/timer.c
index cd08ff444d..2423a0e378 100644
--- a/arch/arm/mach-highbank/timer.c
+++ b/arch/arm/mach-highbank/timer.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/arch-armv7/systimer.h>
diff --git a/arch/arm/mach-imx/cache.c b/arch/arm/mach-imx/cache.c
index 4fd2e43448..4e3b49a3fd 100644
--- a/arch/arm/mach-imx/cache.c
+++ b/arch/arm/mach-imx/cache.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <cpu_func.h>
#include <asm/armv7.h>
+#include <asm/cache.h>
#include <asm/pl310.h>
#include <asm/io.h>
#include <asm/mach-imx/sys_proto.h>
diff --git a/arch/arm/mach-imx/cmd_bmode.c b/arch/arm/mach-imx/cmd_bmode.c
index 2d4d6efe5a..19bfd9f9a0 100644
--- a/arch/arm/mach-imx/cmd_bmode.c
+++ b/arch/arm/mach-imx/cmd_bmode.c
@@ -54,8 +54,8 @@ static int create_usage(char *dest)
return size;
}
-static int do_boot_mode(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_boot_mode(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
const struct boot_mode *p;
int reset_requested = 1;
@@ -87,7 +87,7 @@ void add_board_boot_modes(const struct boot_mode *p)
int size;
char *dest;
- cmd_tbl_t *entry = ll_entry_get(cmd_tbl_t, bmode, cmd);
+ struct cmd_tbl *entry = ll_entry_get(struct cmd_tbl, bmode, cmd);
if (entry->usage) {
free(entry->usage);
diff --git a/arch/arm/mach-imx/cmd_dek.c b/arch/arm/mach-imx/cmd_dek.c
index 1b111ba26b..49dd473af7 100644
--- a/arch/arm/mach-imx/cmd_dek.c
+++ b/arch/arm/mach-imx/cmd_dek.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <command.h>
+#include <log.h>
#include <malloc.h>
#include <asm/byteorder.h>
#include <linux/compiler.h>
@@ -54,7 +55,8 @@ static int blob_encap_dek(const u8 *src, u8 *dst, u32 len)
* Returns zero on success, CMD_RET_USAGE in case of misuse and negative
* on error.
*/
-static int do_dek_blob(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_dek_blob(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
uint32_t src_addr, dst_addr, len;
uint8_t *src_ptr, *dst_ptr;
diff --git a/arch/arm/mach-imx/cmd_hdmidet.c b/arch/arm/mach-imx/cmd_hdmidet.c
index 6aa7d82577..e2571adfb0 100644
--- a/arch/arm/mach-imx/cmd_hdmidet.c
+++ b/arch/arm/mach-imx/cmd_hdmidet.c
@@ -3,11 +3,13 @@
* Copyright (C) 2012 Boundary Devices Inc.
*/
#include <common.h>
+#include <command.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/mxc_hdmi.h>
#include <asm/io.h>
-static int do_hdmidet(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_hdmidet(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct hdmi_regs *hdmi = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR;
return (readb(&hdmi->phy_stat0) & HDMI_DVI_STAT) ? 0 : 1;
diff --git a/arch/arm/mach-imx/cmd_nandbcb.c b/arch/arm/mach-imx/cmd_nandbcb.c
index 94cae146ce..44fc37695d 100644
--- a/arch/arm/mach-imx/cmd_nandbcb.c
+++ b/arch/arm/mach-imx/cmd_nandbcb.c
@@ -12,9 +12,12 @@
*/
#include <common.h>
+#include <command.h>
+#include <log.h>
#include <malloc.h>
#include <nand.h>
#include <dm/devres.h>
+#include <linux/bug.h>
#include <asm/io.h>
#include <jffs2/jffs2.h>
@@ -1048,7 +1051,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;
@@ -1458,8 +1461,8 @@ static int do_nandbcb_init(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/cpu.c b/arch/arm/mach-imx/cpu.c
index 515c1fea40..f2070c9714 100644
--- a/arch/arm/mach-imx/cpu.c
+++ b/arch/arm/mach-imx/cpu.c
@@ -8,6 +8,9 @@
#include <bootm.h>
#include <common.h>
+#include <init.h>
+#include <log.h>
+#include <net.h>
#include <netdev.h>
#include <linux/errno.h>
#include <asm/io.h>
diff --git a/arch/arm/mach-imx/ddrmc-vf610-calibration.c b/arch/arm/mach-imx/ddrmc-vf610-calibration.c
index f29de74c39..cd7e95e61d 100644
--- a/arch/arm/mach-imx/ddrmc-vf610-calibration.c
+++ b/arch/arm/mach-imx/ddrmc-vf610-calibration.c
@@ -8,6 +8,7 @@
*/
/* #define DEBUG */
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
#include <linux/bitmap.h>
diff --git a/arch/arm/mach-imx/ddrmc-vf610.c b/arch/arm/mach-imx/ddrmc-vf610.c
index 461fba4d3f..7895ee66f8 100644
--- a/arch/arm/mach-imx/ddrmc-vf610.c
+++ b/arch/arm/mach-imx/ddrmc-vf610.c
@@ -6,10 +6,12 @@
* Copyright 2013 Freescale Semiconductor, Inc.
*/
+#include <common.h>
#include <asm/io.h>
#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/hab.c b/arch/arm/mach-imx/hab.c
index 30db820b56..d0757d8b66 100644
--- a/arch/arm/mach-imx/hab.c
+++ b/arch/arm/mach-imx/hab.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <command.h>
#include <config.h>
#include <fuse.h>
#include <mapmem.h>
@@ -291,8 +292,8 @@ static int get_hab_status(void)
return 0;
}
-static int do_hab_status(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_hab_status(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
if ((argc != 1)) {
cmd_usage(cmdtp);
@@ -324,8 +325,8 @@ static ulong get_image_ivt_offset(ulong img_addr)
}
}
-static int do_authenticate_image(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_authenticate_image(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
ulong addr, length, ivt_offset;
int rcode = 0;
@@ -349,8 +350,8 @@ static int do_authenticate_image(cmd_tbl_t *cmdtp, int flag, int argc,
return rcode;
}
-static int do_hab_failsafe(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_hab_failsafe(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
hab_rvt_failsafe_t *hab_rvt_failsafe;
@@ -365,8 +366,8 @@ static int do_hab_failsafe(cmd_tbl_t *cmdtp, int flag, int argc,
return 0;
}
-static int do_hab_version(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_hab_version(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct hab_hdr *hdr = (struct hab_hdr *)HAB_RVT_BASE;
@@ -380,8 +381,8 @@ static int do_hab_version(cmd_tbl_t *cmdtp, int flag, int argc,
return 0;
}
-static int do_authenticate_image_or_failover(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+static int do_authenticate_image_or_failover(struct cmd_tbl *cmdtp, int flag,
+ int argc, char *const argv[])
{
int ret = CMD_RET_FAILURE;
diff --git a/arch/arm/mach-imx/i2c-mxv7.c b/arch/arm/mach-imx/i2c-mxv7.c
index 814d834b16..e6c74bf77e 100644
--- a/arch/arm/mach-imx/i2c-mxv7.c
+++ b/arch/arm/mach-imx/i2c-mxv7.c
@@ -6,6 +6,7 @@
#include <malloc.h>
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <asm/gpio.h>
#include <asm/mach-imx/mxc_i2c.h>
diff --git a/arch/arm/mach-imx/imx8/ahab.c b/arch/arm/mach-imx/imx8/ahab.c
index 6d25abe5ce..22e76d535f 100644
--- a/arch/arm/mach-imx/imx8/ahab.c
+++ b/arch/arm/mach-imx/imx8/ahab.c
@@ -4,7 +4,9 @@
*/
#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>
@@ -149,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;
@@ -250,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;
@@ -297,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/imx8/cpu.c b/arch/arm/mach-imx/imx8/cpu.c
index 6d7b17b464..38b2c0926f 100644
--- a/arch/arm/mach-imx/imx8/cpu.c
+++ b/arch/arm/mach-imx/imx8/cpu.c
@@ -9,6 +9,8 @@
#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>
#include <dm/uclass.h>
diff --git a/arch/arm/mach-imx/imx8/fdt.c b/arch/arm/mach-imx/imx8/fdt.c
index 9a6822a929..7d70498fc8 100644
--- a/arch/arm/mach-imx/imx8/fdt.c
+++ b/arch/arm/mach-imx/imx8/fdt.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/arch/sci/sci.h>
#include <asm/arch/sys_proto.h>
#include <dm/ofnode.h>
diff --git a/arch/arm/mach-imx/imx8/image.c b/arch/arm/mach-imx/imx8/image.c
index e6b299691d..5abc0d3a39 100644
--- a/arch/arm/mach-imx/imx8/image.c
+++ b/arch/arm/mach-imx/imx8/image.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include <asm/io.h>
#include <mmc.h>
diff --git a/arch/arm/mach-imx/imx8/iomux.c b/arch/arm/mach-imx/imx8/iomux.c
index 0ade85fb8f..b8e6f48a5f 100644
--- a/arch/arm/mach-imx/imx8/iomux.c
+++ b/arch/arm/mach-imx/imx8/iomux.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/arch/iomux.h>
#include <asm/arch/sci/sci.h>
diff --git a/arch/arm/mach-imx/imx8/misc.c b/arch/arm/mach-imx/imx8/misc.c
index 76d6571d8b..2cd794d54a 100644
--- a/arch/arm/mach-imx/imx8/misc.c
+++ b/arch/arm/mach-imx/imx8/misc.c
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-2.0+
#include <common.h>
+#include <log.h>
#include <asm/arch/sci/sci.h>
#include <asm/mach-imx/sys_proto.h>
#include <imx_sip.h>
diff --git a/arch/arm/mach-imx/imx8/parse-container.c b/arch/arm/mach-imx/imx8/parse-container.c
index cc8a51ad55..375098902f 100644
--- a/arch/arm/mach-imx/imx8/parse-container.c
+++ b/arch/arm/mach-imx/imx8/parse-container.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <errno.h>
+#include <log.h>
#include <spl.h>
#include <asm/arch/image.h>
#include <asm/arch/sci/sci.h>
diff --git a/arch/arm/mach-imx/imx8/snvs_security_sc.c b/arch/arm/mach-imx/imx8/snvs_security_sc.c
index 73f5651161..564d1bfdfb 100644
--- a/arch/arm/mach-imx/imx8/snvs_security_sc.c
+++ b/arch/arm/mach-imx/imx8/snvs_security_sc.c
@@ -626,7 +626,8 @@ static char snvs_cfg_help_text[] =
"ALL values should be in hexadecimal format";
#define NB_REGISTERS 18
-static int do_snvs_cfg(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_snvs_cfg(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int err = 0;
u32 idx = 0;
@@ -677,7 +678,7 @@ static char snvs_dgo_cfg_help_text[] =
"\n"
"ALL values should be in hexadecimal format";
-static int do_snvs_dgo_cfg(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_snvs_dgo_cfg(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
int err = 0;
@@ -713,7 +714,7 @@ static char tamper_pin_cfg_help_text[] =
"\n"
"ALL values should be in hexadecimal format";
-static int do_tamper_pin_cfg(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_tamper_pin_cfg(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
int err = 0;
@@ -748,8 +749,8 @@ static char snvs_clear_status_help_text[] =
"Write the status registers with the value provided,"
" clearing the status";
-static int do_snvs_clear_status(cmd_tbl_t *cmdtp, int flag, int argc,
- char *const argv[])
+static int do_snvs_clear_status(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int scierr = 0;
u32 idx = 0;
@@ -788,7 +789,7 @@ static char snvs_sec_status_help_text[] =
"snvs_sec_status\n"
"Display information about the security related to tamper and secvio";
-static int do_snvs_sec_status(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_snvs_sec_status(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
int scierr;
diff --git a/arch/arm/mach-imx/imx8m/clock_imx8mm.c b/arch/arm/mach-imx/imx8m/clock_imx8mm.c
index 91c827f6c0..aafe2ed084 100644
--- a/arch/arm/mach-imx/imx8m/clock_imx8mm.c
+++ b/arch/arm/mach-imx/imx8m/clock_imx8mm.c
@@ -12,6 +12,8 @@
#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/clock_imx8mq.c b/arch/arm/mach-imx/imx8m/clock_imx8mq.c
index ee18cdee50..759ec6d114 100644
--- a/arch/arm/mach-imx/imx8m/clock_imx8mq.c
+++ b/arch/arm/mach-imx/imx8m/clock_imx8mq.c
@@ -6,11 +6,13 @@
*/
#include <common.h>
+#include <command.h>
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
#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;
@@ -755,8 +757,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/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c
index 347fd6d0ad..1d2c8e6db2 100644
--- a/arch/arm/mach-imx/imx8m/soc.c
+++ b/arch/arm/mach-imx/imx8m/soc.c
@@ -7,6 +7,8 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
+#include <log.h>
#include <asm/arch/imx-regs.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
@@ -20,6 +22,7 @@
#include <fdt_support.h>
#include <fsl_wdog.h>
#include <imx_sip.h>
+#include <linux/bitops.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-imx/imx_bootaux.c b/arch/arm/mach-imx/imx_bootaux.c
index ec0da1164f..868633cf8a 100644
--- a/arch/arm/mach-imx/imx_bootaux.c
+++ b/arch/arm/mach-imx/imx_bootaux.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/mach-imx/sys_proto.h>
#include <command.h>
@@ -92,7 +93,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/imxrt/soc.c b/arch/arm/mach-imx/imxrt/soc.c
index e1eea23035..8e7d15160d 100644
--- a/arch/arm/mach-imx/imxrt/soc.c
+++ b/arch/arm/mach-imx/imxrt/soc.c
@@ -5,8 +5,10 @@
*/
#include <common.h>
+#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/misc.c b/arch/arm/mach-imx/misc.c
index 31e95a9a28..818f38e17d 100644
--- a/arch/arm/mach-imx/misc.c
+++ b/arch/arm/mach-imx/misc.c
@@ -4,7 +4,10 @@
*/
#include <common.h>
+#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/mx5/clock.c b/arch/arm/mach-imx/mx5/clock.c
index 2fabdd2eae..bbaddd5a33 100644
--- a/arch/arm/mach-imx/mx5/clock.c
+++ b/arch/arm/mach-imx/mx5/clock.c
@@ -7,6 +7,8 @@
*/
#include <common.h>
+#include <command.h>
+#include <log.h>
#include <asm/io.h>
#include <linux/errno.h>
#include <asm/arch/imx-regs.h>
@@ -943,7 +945,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/mx5/soc.c b/arch/arm/mach-imx/mx5/soc.c
index b3a57bcf4b..c61fcce3eb 100644
--- a/arch/arm/mach-imx/mx5/soc.c
+++ b/arch/arm/mach-imx/mx5/soc.c
@@ -11,6 +11,7 @@
#include <asm/arch/imx-regs.h>
#include <asm/arch/clock.h>
#include <asm/arch/sys_proto.h>
+#include <asm/cache.h>
#include <linux/errno.h>
#include <asm/io.h>
diff --git a/arch/arm/mach-imx/mx6/clock.c b/arch/arm/mach-imx/mx6/clock.c
index 6a9e673ca2..fb5e5b6f05 100644
--- a/arch/arm/mach-imx/mx6/clock.c
+++ b/arch/arm/mach-imx/mx6/clock.c
@@ -4,7 +4,9 @@
*/
#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>
@@ -1305,7 +1307,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/mx6/ddr.c b/arch/arm/mach-imx/mx6/ddr.c
index 69fe756b0b..16df71083d 100644
--- a/arch/arm/mach-imx/mx6/ddr.c
+++ b/arch/arm/mach-imx/mx6/ddr.c
@@ -6,6 +6,8 @@
#include <common.h>
#include <hang.h>
+#include <log.h>
+#include <linux/delay.h>
#include <linux/types.h>
#include <asm/arch/clock.h>
#include <asm/arch/mx6-ddr.h>
diff --git a/arch/arm/mach-imx/mx6/litesom.c b/arch/arm/mach-imx/mx6/litesom.c
index b0a6bd589c..596773f054 100644
--- a/arch/arm/mach-imx/mx6/litesom.c
+++ b/arch/arm/mach-imx/mx6/litesom.c
@@ -18,6 +18,7 @@
#include <asm/io.h>
#include <common.h>
#include <fsl_esdhc_imx.h>
+#include <linux/delay.h>
#include <linux/sizes.h>
#include <mmc.h>
diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c
index b8aaf3ef01..19ca382649 100644
--- a/arch/arm/mach-imx/mx6/soc.c
+++ b/arch/arm/mach-imx/mx6/soc.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <init.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
diff --git a/arch/arm/mach-imx/mx7/clock.c b/arch/arm/mach-imx/mx7/clock.c
index 75be4f8ad7..aba9461d92 100644
--- a/arch/arm/mach-imx/mx7/clock.c
+++ b/arch/arm/mach-imx/mx7/clock.c
@@ -8,7 +8,9 @@
#include <common.h>
#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>
@@ -1100,7 +1102,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/mx7/psci-mx7.c b/arch/arm/mach-imx/mx7/psci-mx7.c
index c8f6ca235b..f32945ea37 100644
--- a/arch/arm/mach-imx/mx7/psci-mx7.c
+++ b/arch/arm/mach-imx/mx7/psci-mx7.c
@@ -5,6 +5,7 @@
*/
#include <cpu_func.h>
+#include <asm/cache.h>
#include <asm/io.h>
#include <asm/psci.h>
#include <asm/secure.h>
diff --git a/arch/arm/mach-imx/mx7/soc.c b/arch/arm/mach-imx/mx7/soc.c
index 4aafeed188..798fe74a3d 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>
@@ -18,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/clock.c b/arch/arm/mach-imx/mx7ulp/clock.c
index 3c0bcccd0d..a987ff22df 100644
--- a/arch/arm/mach-imx/mx7ulp/clock.c
+++ b/arch/arm/mach-imx/mx7ulp/clock.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <clock_legacy.h>
+#include <command.h>
#include <div64.h>
#include <asm/io.h>
#include <errno.h>
@@ -329,7 +330,8 @@ void hab_caam_clock_enable(unsigned char enable)
/*
* Dump some core clockes.
*/
-int do_mx7_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_mx7_showclocks(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
u32 addr = 0;
u32 freq;
diff --git a/arch/arm/mach-imx/mx7ulp/iomux.c b/arch/arm/mach-imx/mx7ulp/iomux.c
index 8c68655399..05ddeed2a6 100644
--- a/arch/arm/mach-imx/mx7ulp/iomux.c
+++ b/arch/arm/mach-imx/mx7ulp/iomux.c
@@ -3,6 +3,7 @@
* Copyright (C) 2016 Freescale Semiconductor, Inc.
*/
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/iomux.h>
diff --git a/arch/arm/mach-imx/mx7ulp/pcc.c b/arch/arm/mach-imx/mx7ulp/pcc.c
index 234974ba0d..aa7ea86a44 100644
--- a/arch/arm/mach-imx/mx7ulp/pcc.c
+++ b/arch/arm/mach-imx/mx7ulp/pcc.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <div64.h>
+#include <log.h>
#include <asm/io.h>
#include <errno.h>
#include <asm/arch/imx-regs.h>
diff --git a/arch/arm/mach-imx/mx7ulp/scg.c b/arch/arm/mach-imx/mx7ulp/scg.c
index c7bb7a1c66..4c066557c1 100644
--- a/arch/arm/mach-imx/mx7ulp/scg.c
+++ b/arch/arm/mach-imx/mx7ulp/scg.c
@@ -5,11 +5,13 @@
#include <common.h>
#include <div64.h>
+#include <log.h>
#include <asm/io.h>
#include <errno.h>
#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/mx7ulp/soc.c b/arch/arm/mach-imx/mx7ulp/soc.c
index 0d39dab7ea..8dd6b4d40e 100644
--- a/arch/arm/mach-imx/mx7ulp/soc.c
+++ b/arch/arm/mach-imx/mx7ulp/soc.c
@@ -2,14 +2,18 @@
/*
* Copyright (C) 2016 Freescale Semiconductor, Inc.
*/
+
+#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>
#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-imx/sata.c b/arch/arm/mach-imx/sata.c
index b9f630952d..c4599aaf68 100644
--- a/arch/arm/mach-imx/sata.c
+++ b/arch/arm/mach-imx/sata.c
@@ -7,6 +7,7 @@
#include <asm/arch/iomux.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
+#include <asm/arch/imx-regs.h>
#include <asm/arch/sys_proto.h>
int setup_sata(void)
diff --git a/arch/arm/mach-imx/sip.c b/arch/arm/mach-imx/sip.c
index fca520c671..6cb8179ee8 100644
--- a/arch/arm/mach-imx/sip.c
+++ b/arch/arm/mach-imx/sip.c
@@ -5,6 +5,8 @@
#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-imx/spl.c b/arch/arm/mach-imx/spl.c
index fd3fa04600..1a231c67f5 100644
--- a/arch/arm/mach-imx/spl.c
+++ b/arch/arm/mach-imx/spl.c
@@ -8,6 +8,8 @@
#include <common.h>
#include <hang.h>
+#include <init.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-imx/spl_imx_romapi.c b/arch/arm/mach-imx/spl_imx_romapi.c
index 5dc0f7174e..f588a5f521 100644
--- a/arch/arm/mach-imx/spl_imx_romapi.c
+++ b/arch/arm/mach-imx/spl_imx_romapi.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <errno.h>
#include <image.h>
+#include <log.h>
#include <linux/libfdt.h>
#include <spl.h>
diff --git a/arch/arm/mach-imx/syscounter.c b/arch/arm/mach-imx/syscounter.c
index 5a292c3964..7da43c32e0 100644
--- a/arch/arm/mach-imx/syscounter.c
+++ b/arch/arm/mach-imx/syscounter.c
@@ -6,12 +6,14 @@
*/
#include <common.h>
+#include <init.h>
#include <time.h>
#include <asm/io.h>
#include <div64.h>
#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-imx/timer.c b/arch/arm/mach-imx/timer.c
index 5fe5c51f6a..fa1941aec4 100644
--- a/arch/arm/mach-imx/timer.c
+++ b/arch/arm/mach-imx/timer.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <init.h>
#include <time.h>
#include <asm/io.h>
#include <div64.h>
diff --git a/arch/arm/mach-k3/am6_init.c b/arch/arm/mach-k3/am6_init.c
index b692806352..ddc9f3c4f4 100644
--- a/arch/arm/mach-k3/am6_init.c
+++ b/arch/arm/mach-k3/am6_init.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/io.h>
#include <spl.h>
#include <asm/arch/hardware.h>
diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c
index 80dfa5f0fd..0cd34ac3c7 100644
--- a/arch/arm/mach-k3/common.c
+++ b/arch/arm/mach-k3/common.c
@@ -8,10 +8,14 @@
#include <common.h>
#include <cpu_func.h>
+#include <image.h>
+#include <init.h>
+#include <log.h>
#include <spl.h>
#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/include/mach/am6_hardware.h b/arch/arm/mach-k3/include/mach/am6_hardware.h
index 6df7631545..a91ef5f735 100644
--- a/arch/arm/mach-k3/include/mach/am6_hardware.h
+++ b/arch/arm/mach-k3/include/mach/am6_hardware.h
@@ -8,6 +8,9 @@
#define __ASM_ARCH_AM6_HARDWARE_H
#include <config.h>
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
#define CTRL_MMR0_BASE 0x00100000
#define CTRLMMR_MAIN_DEVSTAT (CTRL_MMR0_BASE + 0x30)
diff --git a/arch/arm/mach-k3/include/mach/j721e_hardware.h b/arch/arm/mach-k3/include/mach/j721e_hardware.h
index ead136ed63..0deed66eff 100644
--- a/arch/arm/mach-k3/include/mach/j721e_hardware.h
+++ b/arch/arm/mach-k3/include/mach/j721e_hardware.h
@@ -8,6 +8,9 @@
#define __ASM_ARCH_J721E_HARDWARE_H
#include <config.h>
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
#define CTRL_MMR0_BASE 0x00100000
#define CTRLMMR_MAIN_DEVSTAT (CTRL_MMR0_BASE + 0x30)
diff --git a/arch/arm/mach-k3/include/mach/j721e_spl.h b/arch/arm/mach-k3/include/mach/j721e_spl.h
index 475278bd04..959bdd4358 100644
--- a/arch/arm/mach-k3/include/mach/j721e_spl.h
+++ b/arch/arm/mach-k3/include/mach/j721e_spl.h
@@ -7,6 +7,7 @@
#define _ASM_ARCH_J721E_SPL_H_
/* With BootMode B = 0 */
+#include <linux/bitops.h>
#define BOOT_DEVICE_HYPERFLASH 0x00
#define BOOT_DEVICE_OSPI 0x01
#define BOOT_DEVICE_QSPI 0x02
diff --git a/arch/arm/mach-k3/j721e_init.c b/arch/arm/mach-k3/j721e_init.c
index 71fc20c30b..7a999f9d9c 100644
--- a/arch/arm/mach-k3/j721e_init.c
+++ b/arch/arm/mach-k3/j721e_init.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <init.h>
#include <spl.h>
#include <asm/io.h>
#include <asm/armv7_mpu.h>
diff --git a/arch/arm/mach-k3/security.c b/arch/arm/mach-k3/security.c
index 0d77d98359..66f90a5a34 100644
--- a/arch/arm/mach-k3/security.c
+++ b/arch/arm/mach-k3/security.c
@@ -10,6 +10,9 @@
#include <cpu_func.h>
#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>
#include <spl.h>
diff --git a/arch/arm/mach-k3/sysfw-loader.c b/arch/arm/mach-k3/sysfw-loader.c
index 4f5c848245..513be09c68 100644
--- a/arch/arm/mach-k3/sysfw-loader.c
+++ b/arch/arm/mach-k3/sysfw-loader.c
@@ -7,9 +7,12 @@
*/
#include <common.h>
+#include <image.h>
+#include <log.h>
#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/clock.c b/arch/arm/mach-keystone/clock.c
index 3c46824d0b..0c59515d2e 100644
--- a/arch/arm/mach-keystone/clock.c
+++ b/arch/arm/mach-keystone/clock.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <asm/arch/clock.h>
#include <asm/arch/clock_defs.h>
+#include <linux/bitops.h>
/* DEV and ARM speed definitions as specified in DEVSPEED register */
int __weak speeds[DEVSPEED_NUMSPDS] = {
diff --git a/arch/arm/mach-keystone/cmd_clock.c b/arch/arm/mach-keystone/cmd_clock.c
index 667826b9f6..7165d666e5 100644
--- a/arch/arm/mach-keystone/cmd_clock.c
+++ b/arch/arm/mach-keystone/cmd_clock.c
@@ -19,7 +19,7 @@ struct pll_init_data cmd_pll_data = {
.pll_od = 2,
};
-int do_pll_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_pll_cmd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
if (argc != 5)
goto pll_cmd_usage;
@@ -63,7 +63,8 @@ U_BOOT_CMD(
PLLSET_CMD_LIST " <mult> <div> <OD>\n"
);
-int do_getclk_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_getclk_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
unsigned int clk;
unsigned long freq;
@@ -92,7 +93,7 @@ U_BOOT_CMD(
CLOCK_INDEXES_LIST
);
-int do_psc_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_psc_cmd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
int psc_module;
int res;
diff --git a/arch/arm/mach-keystone/cmd_mon.c b/arch/arm/mach-keystone/cmd_mon.c
index 8142039040..049d573473 100644
--- a/arch/arm/mach-keystone/cmd_mon.c
+++ b/arch/arm/mach-keystone/cmd_mon.c
@@ -12,8 +12,8 @@
#include <mach/mon.h>
asm(".arch_extension sec\n\t");
-static int do_mon_install(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_mon_install(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
u32 addr, dpsc_base = 0x1E80000, freq, load_addr, size;
int rcode = 0;
@@ -65,8 +65,8 @@ static void core_spin(void)
}
}
-int do_mon_power(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+int do_mon_power(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int rcode = 0, core_id, on;
void (*fn)(void);
diff --git a/arch/arm/mach-keystone/cmd_poweroff.c b/arch/arm/mach-keystone/cmd_poweroff.c
index 89b18516cd..f0ad9173b9 100644
--- a/arch/arm/mach-keystone/cmd_poweroff.c
+++ b/arch/arm/mach-keystone/cmd_poweroff.c
@@ -12,7 +12,7 @@
#include <asm/arch/psc_defs.h>
#include <asm/arch/hardware.h>
-int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
mon_power_off(0);
diff --git a/arch/arm/mach-keystone/ddr3.c b/arch/arm/mach-keystone/ddr3.c
index 23ff06466d..7dea600d50 100644
--- a/arch/arm/mach-keystone/ddr3.c
+++ b/arch/arm/mach-keystone/ddr3.c
@@ -7,11 +7,13 @@
*/
#include <cpu_func.h>
+#include <env.h>
#include <asm/io.h>
#include <common.h>
#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/ddr3_spd.c b/arch/arm/mach-keystone/ddr3_spd.c
index 6eee9ad13a..3803449c2b 100644
--- a/arch/arm/mach-keystone/ddr3_spd.c
+++ b/arch/arm/mach-keystone/ddr3_spd.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <log.h>
#include <i2c.h>
#include <ddr_spd.h>
diff --git a/arch/arm/mach-keystone/include/mach/clock_defs.h b/arch/arm/mach-keystone/include/mach/clock_defs.h
index 42bd0ac1cd..336b103dc8 100644
--- a/arch/arm/mach-keystone/include/mach/clock_defs.h
+++ b/arch/arm/mach-keystone/include/mach/clock_defs.h
@@ -9,6 +9,9 @@
#define _CLOCK_DEFS_H_
#include <asm/arch/hardware.h>
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
/* PLL Control Registers */
struct pllctl_regs {
diff --git a/arch/arm/mach-keystone/include/mach/hardware-k2hk.h b/arch/arm/mach-keystone/include/mach/hardware-k2hk.h
index 7793cf1266..3d078be991 100644
--- a/arch/arm/mach-keystone/include/mach/hardware-k2hk.h
+++ b/arch/arm/mach-keystone/include/mach/hardware-k2hk.h
@@ -9,6 +9,10 @@
#ifndef __ASM_ARCH_HARDWARE_K2HK_H
#define __ASM_ARCH_HARDWARE_K2HK_H
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
#define KS2_ARM_PLL_EN BIT(13)
/* PA SS Registers */
diff --git a/arch/arm/mach-keystone/include/mach/hardware-k2l.h b/arch/arm/mach-keystone/include/mach/hardware-k2l.h
index f46a98cfd1..0e710a3795 100644
--- a/arch/arm/mach-keystone/include/mach/hardware-k2l.h
+++ b/arch/arm/mach-keystone/include/mach/hardware-k2l.h
@@ -9,6 +9,10 @@
#ifndef __ASM_ARCH_HARDWARE_K2L_H
#define __ASM_ARCH_HARDWARE_K2L_H
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
#define KS2_ARM_PLL_EN BIT(13)
/* PA SS Registers */
diff --git a/arch/arm/mach-keystone/include/mach/hardware.h b/arch/arm/mach-keystone/include/mach/hardware.h
index d2234dc88c..0c5dc6a739 100644
--- a/arch/arm/mach-keystone/include/mach/hardware.h
+++ b/arch/arm/mach-keystone/include/mach/hardware.h
@@ -11,6 +11,7 @@
#include <config.h>
#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
#include <linux/sizes.h>
#include <asm/io.h>
diff --git a/arch/arm/mach-keystone/include/mach/xhci-keystone.h b/arch/arm/mach-keystone/include/mach/xhci-keystone.h
index a05351292c..989b0c3158 100644
--- a/arch/arm/mach-keystone/include/mach/xhci-keystone.h
+++ b/arch/arm/mach-keystone/include/mach/xhci-keystone.h
@@ -6,6 +6,10 @@
* Texas Instruments Incorporated, <www.ti.com>
*/
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
#define USB3_PHY_REF_SSP_EN BIT(29)
#define USB3_PHY_OTG_VBUSVLDECTSEL BIT(16)
diff --git a/arch/arm/mach-keystone/init.c b/arch/arm/mach-keystone/init.c
index 375588894d..88e8912959 100644
--- a/arch/arm/mach-keystone/init.c
+++ b/arch/arm/mach-keystone/init.c
@@ -8,12 +8,15 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
#include <ns16550.h>
+#include <asm/cache.h>
#include <asm/io.h>
#include <asm/arch/msmc.h>
#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-keystone/keystone.c b/arch/arm/mach-keystone/keystone.c
index 7441052a55..efaabca5a7 100644
--- a/arch/arm/mach-keystone/keystone.c
+++ b/arch/arm/mach-keystone/keystone.c
@@ -7,6 +7,8 @@
*/
#include <common.h>
+#include <env.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-keystone/mon.c b/arch/arm/mach-keystone/mon.c
index b7de9ba099..58995d73ac 100644
--- a/arch/arm/mach-keystone/mon.c
+++ b/arch/arm/mach-keystone/mon.c
@@ -6,6 +6,7 @@
*/
#include <hang.h>
+#include <image.h>
#include <asm/unaligned.h>
#include <common.h>
#include <command.h>
diff --git a/arch/arm/mach-keystone/psc.c b/arch/arm/mach-keystone/psc.c
index f87bcb3bea..145aff8ac6 100644
--- a/arch/arm/mach-keystone/psc.c
+++ b/arch/arm/mach-keystone/psc.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <asm/io.h>
#include <asm/processor.h>
diff --git a/arch/arm/mach-kirkwood/cache.c b/arch/arm/mach-kirkwood/cache.c
index 6b12ea5e91..009b7deeca 100644
--- a/arch/arm/mach-kirkwood/cache.c
+++ b/arch/arm/mach-kirkwood/cache.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
#include <asm/arch/cpu.h>
+#include <asm/cache.h>
#define FEROCEON_EXTRA_FEATURE_L2C_EN (1<<22)
diff --git a/arch/arm/mach-kirkwood/cpu.c b/arch/arm/mach-kirkwood/cpu.c
index 5e964af8ea..fa26903593 100644
--- a/arch/arm/mach-kirkwood/cpu.c
+++ b/arch/arm/mach-kirkwood/cpu.c
@@ -9,6 +9,9 @@
#include <command.h>
#include <cpu_func.h>
#include <env.h>
+#include <init.h>
+#include <log.h>
+#include <net.h>
#include <netdev.h>
#include <asm/cache.h>
#include <asm/io.h>
diff --git a/arch/arm/mach-kirkwood/mpp.c b/arch/arm/mach-kirkwood/mpp.c
index 7222504ed3..4fdad99cad 100644
--- a/arch/arm/mach-kirkwood/mpp.c
+++ b/arch/arm/mach-kirkwood/mpp.c
@@ -10,6 +10,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/arch/cpu.h>
#include <asm/arch/soc.h>
diff --git a/arch/arm/mach-lpc32xx/cpu.c b/arch/arm/mach-lpc32xx/cpu.c
index 4c59a44f7e..ee15a9453d 100644
--- a/arch/arm/mach-lpc32xx/cpu.c
+++ b/arch/arm/mach-lpc32xx/cpu.c
@@ -5,6 +5,8 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
+#include <net.h>
#include <netdev.h>
#include <asm/arch/cpu.h>
#include <asm/arch/clk.h>
diff --git a/arch/arm/mach-lpc32xx/dram.c b/arch/arm/mach-lpc32xx/dram.c
index 4f975694fd..1602237923 100644
--- a/arch/arm/mach-lpc32xx/dram.c
+++ b/arch/arm/mach-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/mach-lpc32xx/timer.c b/arch/arm/mach-lpc32xx/timer.c
index 3a896d10ca..90183e3014 100644
--- a/arch/arm/mach-lpc32xx/timer.c
+++ b/arch/arm/mach-lpc32xx/timer.c
@@ -4,11 +4,13 @@
*/
#include <common.h>
+#include <init.h>
#include <time.h>
#include <asm/arch/cpu.h>
#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/mach-mediatek/cpu.c b/arch/arm/mach-mediatek/cpu.c
index 5e5f3f0842..c329e7cc98 100644
--- a/arch/arm/mach-mediatek/cpu.c
+++ b/arch/arm/mach-mediatek/cpu.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <cpu_func.h>
#include <dm.h>
+#include <init.h>
#include <wdt.h>
#include <dm/uclass-internal.h>
diff --git a/arch/arm/mach-mediatek/mt7622/init.c b/arch/arm/mach-mediatek/mt7622/init.c
index 1e527c0485..7f6ce80f37 100644
--- a/arch/arm/mach-mediatek/mt7622/init.c
+++ b/arch/arm/mach-mediatek/mt7622/init.c
@@ -6,7 +6,9 @@
#include <common.h>
#include <fdtdec.h>
+#include <init.h>
#include <asm/armv8/mmu.h>
+#include <asm/cache.h>
int print_cpuinfo(void)
{
diff --git a/arch/arm/mach-mediatek/mt7629/init.c b/arch/arm/mach-mediatek/mt7629/init.c
index ba91a6eaa6..c260413a57 100644
--- a/arch/arm/mach-mediatek/mt7629/init.c
+++ b/arch/arm/mach-mediatek/mt7629/init.c
@@ -8,10 +8,13 @@
#include <common.h>
#include <dm.h>
#include <fdtdec.h>
+#include <init.h>
+#include <log.h>
#include <ram.h>
#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-mediatek/mt8512/init.c b/arch/arm/mach-mediatek/mt8512/init.c
index a38b5d12d9..aa779f4376 100644
--- a/arch/arm/mach-mediatek/mt8512/init.c
+++ b/arch/arm/mach-mediatek/mt8512/init.c
@@ -10,10 +10,13 @@
#include <common.h>
#include <dm.h>
#include <fdtdec.h>
+#include <init.h>
+#include <log.h>
#include <ram.h>
#include <wdt.h>
#include <asm/arch/misc.h>
#include <asm/armv8/mmu.h>
+#include <asm/cache.h>
#include <asm/sections.h>
#include <dm/uclass.h>
#include <dt-bindings/clock/mt8512-clk.h>
diff --git a/arch/arm/mach-mediatek/mt8516/init.c b/arch/arm/mach-mediatek/mt8516/init.c
index 360d94abb0..13be391221 100644
--- a/arch/arm/mach-mediatek/mt8516/init.c
+++ b/arch/arm/mach-mediatek/mt8516/init.c
@@ -10,9 +10,11 @@
#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>
+#include <asm/cache.h>
#include <asm/sections.h>
#include <dm/uclass.h>
#include <dt-bindings/clock/mt8516-clk.h>
diff --git a/arch/arm/mach-mediatek/mt8518/init.c b/arch/arm/mach-mediatek/mt8518/init.c
index c2b1b76982..531a403da1 100644
--- a/arch/arm/mach-mediatek/mt8518/init.c
+++ b/arch/arm/mach-mediatek/mt8518/init.c
@@ -11,9 +11,11 @@
#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>
+#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-mediatek/spl.c b/arch/arm/mach-mediatek/spl.c
index 37f1f219b2..927175c5a3 100644
--- a/arch/arm/mach-mediatek/spl.c
+++ b/arch/arm/mach-mediatek/spl.c
@@ -7,6 +7,7 @@
#include <clk.h>
#include <common.h>
#include <hang.h>
+#include <init.h>
#include <spl.h>
#include "init.h"
diff --git a/arch/arm/mach-meson/board-axg.c b/arch/arm/mach-meson/board-axg.c
index 6874458e36..5e0b3f6cb5 100644
--- a/arch/arm/mach-meson/board-axg.c
+++ b/arch/arm/mach-meson/board-axg.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <init.h>
+#include <net.h>
#include <asm/arch/boot.h>
#include <asm/arch/eth.h>
#include <asm/arch/axg.h>
diff --git a/arch/arm/mach-meson/board-common.c b/arch/arm/mach-meson/board-common.c
index 747791b10e..19e5bfd366 100644
--- a/arch/arm/mach-meson/board-common.c
+++ b/arch/arm/mach-meson/board-common.c
@@ -6,8 +6,11 @@
#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 <asm/ptrace.h>
#include <linux/libfdt.h>
#include <linux/err.h>
#include <asm/arch/mem.h>
diff --git a/arch/arm/mach-meson/board-g12a.c b/arch/arm/mach-meson/board-g12a.c
index 26d6b90790..14127ca737 100644
--- a/arch/arm/mach-meson/board-g12a.c
+++ b/arch/arm/mach-meson/board-g12a.c
@@ -6,6 +6,8 @@
#include <common.h>
#include <init.h>
+#include <log.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 b591c924ea..c4cc11f1de 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/board-info.c b/arch/arm/mach-meson/board-info.c
index 4b88afa9b7..3abb27e03b 100644
--- a/arch/arm/mach-meson/board-info.c
+++ b/arch/arm/mach-meson/board-info.c
@@ -5,11 +5,13 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/io.h>
#include <dm.h>
#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 fac286b9c8..ebbb880b71 100644
--- a/arch/arm/mach-meson/sm.c
+++ b/arch/arm/mach-meson/sm.c
@@ -6,7 +6,13 @@
*/
#include <common.h>
+#include <command.h>
+#include <env.h>
+#include <log.h>
#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>
@@ -116,7 +122,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;
@@ -152,8 +158,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;
@@ -180,15 +186,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-mvebu/arm64-common.c b/arch/arm/mach-mvebu/arm64-common.c
index 34cc0479a8..c8c065e93c 100644
--- a/arch/arm/mach-mvebu/arm64-common.c
+++ b/arch/arm/mach-mvebu/arm64-common.c
@@ -7,6 +7,8 @@
#include <dm.h>
#include <fdtdec.h>
#include <init.h>
+#include <asm/cache.h>
+#include <asm/ptrace.h>
#include <linux/libfdt.h>
#include <linux/sizes.h>
#include <pci.h>
diff --git a/arch/arm/mach-mvebu/armada3700/cpu.c b/arch/arm/mach-mvebu/armada3700/cpu.c
index 17d2d43bab..e438b4922e 100644
--- a/arch/arm/mach-mvebu/armada3700/cpu.c
+++ b/arch/arm/mach-mvebu/armada3700/cpu.c
@@ -8,6 +8,8 @@
#include <cpu_func.h>
#include <dm.h>
#include <fdtdec.h>
+#include <init.h>
+#include <linux/bitops.h>
#include <linux/libfdt.h>
#include <asm/io.h>
#include <asm/system.h>
diff --git a/arch/arm/mach-mvebu/armada8k/dram.c b/arch/arm/mach-mvebu/armada8k/dram.c
index 265a8b0ae8..3da9fa589d 100644
--- a/arch/arm/mach-mvebu/armada8k/dram.c
+++ b/arch/arm/mach-mvebu/armada8k/dram.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <asm/arch/cpu.h>
#include <asm/arch/soc.h>
+#include <asm/ptrace.h>
#include <asm/system.h>
#include <linux/sizes.h>
diff --git a/arch/arm/mach-mvebu/cpu.c b/arch/arm/mach-mvebu/cpu.c
index fb241c7e4d..3a63dafde4 100644
--- a/arch/arm/mach-mvebu/cpu.c
+++ b/arch/arm/mach-mvebu/cpu.c
@@ -6,6 +6,9 @@
#include <common.h>
#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>
#include <asm/pl310.h>
diff --git a/arch/arm/mach-mvebu/efuse.c b/arch/arm/mach-mvebu/efuse.c
index 16ccfec933..c79eee98fe 100644
--- a/arch/arm/mach-mvebu/efuse.c
+++ b/arch/arm/mach-mvebu/efuse.c
@@ -10,6 +10,8 @@
#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>
#if defined(CONFIG_MVEBU_EFUSE_FAKE)
diff --git a/arch/arm/mach-mvebu/include/mach/soc.h b/arch/arm/mach-mvebu/include/mach/soc.h
index acb9257c90..3f3b15aa8a 100644
--- a/arch/arm/mach-mvebu/include/mach/soc.h
+++ b/arch/arm/mach-mvebu/include/mach/soc.h
@@ -10,6 +10,10 @@
#ifndef _MVEBU_SOC_H
#define _MVEBU_SOC_H
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
#define SOC_MV78230_ID 0x7823
#define SOC_MV78260_ID 0x7826
#define SOC_MV78460_ID 0x7846
diff --git a/arch/arm/mach-mvebu/mbus.c b/arch/arm/mach-mvebu/mbus.c
index 39bd200c83..f29abe5911 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 a1cef9fdd6..adef3331a7 100644
--- a/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c
+++ b/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c
@@ -8,6 +8,8 @@
#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"
#include "sys_env_lib.h"
diff --git a/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c b/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c
index 66409a50c0..67a00cf1cf 100644
--- a/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c
+++ b/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c
@@ -8,6 +8,7 @@
#include <asm/io.h>
#include <asm/arch/cpu.h>
#include <asm/arch/soc.h>
+#include <linux/delay.h>
#include "high_speed_env_spec.h"
#include "sys_env_lib.h"
diff --git a/arch/arm/mach-mvebu/serdes/a38x/seq_exec.c b/arch/arm/mach-mvebu/serdes/a38x/seq_exec.c
index d9edfaa1df..2a51b7113c 100644
--- a/arch/arm/mach-mvebu/serdes/a38x/seq_exec.c
+++ b/arch/arm/mach-mvebu/serdes/a38x/seq_exec.c
@@ -8,6 +8,7 @@
#include <asm/io.h>
#include <asm/arch/cpu.h>
#include <asm/arch/soc.h>
+#include <linux/delay.h>
#include "seq_exec.h"
#include "high_speed_env_spec.h"
diff --git a/arch/arm/mach-mvebu/serdes/axp/high_speed_env_lib.c b/arch/arm/mach-mvebu/serdes/axp/high_speed_env_lib.c
index c8c9298864..ea3b4c7d5b 100644
--- a/arch/arm/mach-mvebu/serdes/axp/high_speed_env_lib.c
+++ b/arch/arm/mach-mvebu/serdes/axp/high_speed_env_lib.c
@@ -9,6 +9,7 @@
#include <asm/io.h>
#include <asm/arch/cpu.h>
#include <asm/arch/soc.h>
+#include <linux/delay.h>
#include "high_speed_env_spec.h"
#include "board_env_spec.h"
diff --git a/arch/arm/mach-mvebu/spl.c b/arch/arm/mach-mvebu/spl.c
index 70fef3b573..f645befb2c 100644
--- a/arch/arm/mach-mvebu/spl.c
+++ b/arch/arm/mach-mvebu/spl.c
@@ -8,6 +8,8 @@
#include <debug_uart.h>
#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-mvebu/timer.c b/arch/arm/mach-mvebu/timer.c
index 2f6b4d1702..43b3ed15d0 100644
--- a/arch/arm/mach-mvebu/timer.c
+++ b/arch/arm/mach-mvebu/timer.c
@@ -7,8 +7,10 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/arch/soc.h>
+#include <linux/bitops.h>
#define TIMER_LOAD_VAL 0xffffffff
diff --git a/arch/arm/mach-omap2/abb.c b/arch/arm/mach-omap2/abb.c
index 108c93542d..722e6db056 100644
--- a/arch/arm/mach-omap2/abb.c
+++ b/arch/arm/mach-omap2/abb.c
@@ -13,6 +13,7 @@
#include <asm/arch/clock.h>
#include <asm/io.h>
#include <asm/arch/sys_proto.h>
+#include <linux/bitops.h>
__weak s8 abb_setup_ldovbb(u32 fuse, u32 ldovbb)
{
diff --git a/arch/arm/mach-omap2/am33xx/board.c b/arch/arm/mach-omap2/am33xx/board.c
index 283f73522d..ce58bf811f 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>
@@ -31,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/chilisom.c b/arch/arm/mach-omap2/am33xx/chilisom.c
index 3942305108..15b6b35ae7 100644
--- a/arch/arm/mach-omap2/am33xx/chilisom.c
+++ b/arch/arm/mach-omap2/am33xx/chilisom.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/arch/clock.h>
#include <asm/arch/clk_synthesizer.h>
#include <asm/arch/cpu.h>
diff --git a/arch/arm/mach-omap2/am33xx/clock.c b/arch/arm/mach-omap2/am33xx/clock.c
index 8c61547ee9..8819062aaa 100644
--- a/arch/arm/mach-omap2/am33xx/clock.c
+++ b/arch/arm/mach-omap2/am33xx/clock.c
@@ -9,6 +9,8 @@
*/
#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/clock_ti814x.c b/arch/arm/mach-omap2/am33xx/clock_ti814x.c
index aef090b4f8..27abaff48f 100644
--- a/arch/arm/mach-omap2/am33xx/clock_ti814x.c
+++ b/arch/arm/mach-omap2/am33xx/clock_ti814x.c
@@ -12,6 +12,7 @@
#include <asm/arch/clock.h>
#include <asm/arch/hardware.h>
#include <asm/io.h>
+#include <linux/delay.h>
/* PRCM */
#define PRCM_MOD_EN 0x2
diff --git a/arch/arm/mach-omap2/am33xx/clock_ti816x.c b/arch/arm/mach-omap2/am33xx/clock_ti816x.c
index e9c7b2d996..ec4cc75381 100644
--- a/arch/arm/mach-omap2/am33xx/clock_ti816x.c
+++ b/arch/arm/mach-omap2/am33xx/clock_ti816x.c
@@ -27,6 +27,7 @@
#include <asm/arch/clock.h>
#include <asm/arch/hardware.h>
#include <asm/io.h>
+#include <linux/bitops.h>
#include <asm/emif.h>
diff --git a/arch/arm/mach-omap2/am33xx/ddr.c b/arch/arm/mach-omap2/am33xx/ddr.c
index 3fd1d086ff..f8434ecf57 100644
--- a/arch/arm/mach-omap2/am33xx/ddr.c
+++ b/arch/arm/mach-omap2/am33xx/ddr.c
@@ -5,11 +5,14 @@
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
*/
+#include <common.h>
+#include <log.h>
#include <asm/arch/cpu.h>
#include <asm/arch/ddr_defs.h>
#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/sys_info.c b/arch/arm/mach-omap2/am33xx/sys_info.c
index 17b46619b5..338f6afcae 100644
--- a/arch/arm/mach-omap2/am33xx/sys_info.c
+++ b/arch/arm/mach-omap2/am33xx/sys_info.c
@@ -12,6 +12,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/arch/sys_proto.h>
#include <asm/arch/cpu.h>
diff --git a/arch/arm/mach-omap2/am33xx/ti816x_emif4.c b/arch/arm/mach-omap2/am33xx/ti816x_emif4.c
index 9f59489958..707ea807ac 100644
--- a/arch/arm/mach-omap2/am33xx/ti816x_emif4.c
+++ b/arch/arm/mach-omap2/am33xx/ti816x_emif4.c
@@ -15,6 +15,7 @@
#include <asm/arch/sys_proto.h>
#include <asm/io.h>
#include <asm/emif.h>
+#include <linux/delay.h>
/*********************************************************************
* Init DDR3 on TI816X EVM
diff --git a/arch/arm/mach-omap2/boot-common.c b/arch/arm/mach-omap2/boot-common.c
index d57382aabe..cb9d7fdb15 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 9aff83e9df..757fa3801a 100644
--- a/arch/arm/mach-omap2/clocks-common.c
+++ b/arch/arm/mach-omap2/clocks-common.c
@@ -15,6 +15,8 @@
#include <common.h>
#include <hang.h>
#include <i2c.h>
+#include <init.h>
+#include <log.h>
#include <asm/omap_common.h>
#include <asm/gpio.h>
#include <asm/arch/clock.h>
diff --git a/arch/arm/mach-omap2/emif-common.c b/arch/arm/mach-omap2/emif-common.c
index 4658f67e84..312f868fbc 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>
@@ -20,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/fdt-common.c b/arch/arm/mach-omap2/fdt-common.c
index 3f420186ad..5f344f8283 100644
--- a/arch/arm/mach-omap2/fdt-common.c
+++ b/arch/arm/mach-omap2/fdt-common.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <log.h>
#include <linux/libfdt.h>
#include <fdt_support.h>
diff --git a/arch/arm/mach-omap2/hwinit-common.c b/arch/arm/mach-omap2/hwinit-common.c
index 772b4c4db5..7a7086776e 100644
--- a/arch/arm/mach-omap2/hwinit-common.c
+++ b/arch/arm/mach-omap2/hwinit-common.c
@@ -13,6 +13,7 @@
#include <common.h>
#include <debug_uart.h>
#include <fdtdec.h>
+#include <init.h>
#include <spl.h>
#include <asm/arch/sys_proto.h>
#include <linux/sizes.h>
diff --git a/arch/arm/mach-omap2/omap-cache.c b/arch/arm/mach-omap2/omap-cache.c
index 1eff9be270..2c9ada060c 100644
--- a/arch/arm/mach-omap2/omap-cache.c
+++ b/arch/arm/mach-omap2/omap-cache.c
@@ -13,6 +13,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <log.h>
#include <asm/cache.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-omap2/omap3/am35x_musb.c b/arch/arm/mach-omap2/omap3/am35x_musb.c
index 5af6d28e74..026e5d2d13 100644
--- a/arch/arm/mach-omap2/omap3/am35x_musb.c
+++ b/arch/arm/mach-omap2/omap3/am35x_musb.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/arch/am35x_def.h>
diff --git a/arch/arm/mach-omap2/omap3/board.c b/arch/arm/mach-omap2/omap3/board.c
index 60de0d6052..f08c8ab43a 100644
--- a/arch/arm/mach-omap2/omap3/board.c
+++ b/arch/arm/mach-omap2/omap3/board.c
@@ -16,7 +16,9 @@
*
*/
#include <common.h>
+#include <command.h>
#include <dm.h>
+#include <init.h>
#include <spl.h>
#include <asm/io.h>
#include <asm/arch/sys_proto.h>
@@ -279,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/omap3/emac.c b/arch/arm/mach-omap2/omap3/emac.c
index fb0c9188f5..eecc5d334e 100644
--- a/arch/arm/mach-omap2/omap3/emac.c
+++ b/arch/arm/mach-omap2/omap3/emac.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <net.h>
#include <asm/io.h>
#include <asm/arch/am35x_def.h>
diff --git a/arch/arm/mach-omap2/omap3/emif4.c b/arch/arm/mach-omap2/omap3/emif4.c
index a8bd428e0c..4cfa132388 100644
--- a/arch/arm/mach-omap2/omap3/emif4.c
+++ b/arch/arm/mach-omap2/omap3/emif4.c
@@ -10,6 +10,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/arch/mem.h>
#include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-omap2/omap3/sdrc.c b/arch/arm/mach-omap2/omap3/sdrc.c
index 861d01d6df..1d65ed6227 100644
--- a/arch/arm/mach-omap2/omap3/sdrc.c
+++ b/arch/arm/mach-omap2/omap3/sdrc.c
@@ -22,6 +22,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/arch/mem.h>
#include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-omap2/omap4/sdram_elpida.c b/arch/arm/mach-omap2/omap4/sdram_elpida.c
index a29a264016..2a18cf0215 100644
--- a/arch/arm/mach-omap2/omap4/sdram_elpida.c
+++ b/arch/arm/mach-omap2/omap4/sdram_elpida.c
@@ -9,6 +9,7 @@
* Aneesh V <aneesh@ti.com>
*/
+#include <common.h>
#include <asm/emif.h>
#include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-omap2/omap5/abb.c b/arch/arm/mach-omap2/omap5/abb.c
index 446f99f634..2f9f8e65d0 100644
--- a/arch/arm/mach-omap2/omap5/abb.c
+++ b/arch/arm/mach-omap2/omap5/abb.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <asm/omap_common.h>
#include <asm/io.h>
+#include <linux/bitops.h>
/*
* Setup LDOVBB for OMAP5.
diff --git a/arch/arm/mach-omap2/omap5/dra7xx_iodelay.c b/arch/arm/mach-omap2/omap5/dra7xx_iodelay.c
index 598074ba21..8569eff31a 100644
--- a/arch/arm/mach-omap2/omap5/dra7xx_iodelay.c
+++ b/arch/arm/mach-omap2/omap5/dra7xx_iodelay.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <hang.h>
+#include <log.h>
#include <asm/utils.h>
#include <asm/arch/dra7xx_iodelay.h>
#include <asm/arch/omap.h>
diff --git a/arch/arm/mach-omap2/omap5/emif.c b/arch/arm/mach-omap2/omap5/emif.c
index f3661a0e74..2de36b6fec 100644
--- a/arch/arm/mach-omap2/omap5/emif.c
+++ b/arch/arm/mach-omap2/omap5/emif.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/emif.h>
#include <asm/arch/sys_proto.h>
#include <asm/utils.h>
diff --git a/arch/arm/mach-omap2/omap5/fdt.c b/arch/arm/mach-omap2/omap5/fdt.c
index c4adba31e6..3f8474b8d0 100644
--- a/arch/arm/mach-omap2/omap5/fdt.c
+++ b/arch/arm/mach-omap2/omap5/fdt.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <hang.h>
+#include <log.h>
#include <linux/libfdt.h>
#include <fdt_support.h>
#include <malloc.h>
diff --git a/arch/arm/mach-omap2/omap5/hwinit.c b/arch/arm/mach-omap2/omap5/hwinit.c
index 3b1733099f..47ac8656bf 100644
--- a/arch/arm/mach-omap2/omap5/hwinit.c
+++ b/arch/arm/mach-omap2/omap5/hwinit.c
@@ -18,6 +18,7 @@
#include <asm/arch/cpu.h>
#include <asm/arch/sys_proto.h>
#include <asm/arch/clock.h>
+#include <linux/delay.h>
#include <linux/sizes.h>
#include <asm/utils.h>
#include <asm/arch/gpio.h>
diff --git a/arch/arm/mach-omap2/omap5/sdram.c b/arch/arm/mach-omap2/omap5/sdram.c
index 6bf4cf4a75..786da45fac 100644
--- a/arch/arm/mach-omap2/omap5/sdram.c
+++ b/arch/arm/mach-omap2/omap5/sdram.c
@@ -10,6 +10,7 @@
* Sricharan R <r.sricharan@ti.com>
*/
+#include <common.h>
#include <asm/emif.h>
#include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-omap2/pipe3-phy.c b/arch/arm/mach-omap2/pipe3-phy.c
index 8808e353a9..35ec81d314 100644
--- a/arch/arm/mach-omap2/pipe3-phy.c
+++ b/arch/arm/mach-omap2/pipe3-phy.c
@@ -11,6 +11,8 @@
#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-omap2/sec-common.c b/arch/arm/mach-omap2/sec-common.c
index 28b929f84f..0551bc125e 100644
--- a/arch/arm/mach-omap2/sec-common.c
+++ b/arch/arm/mach-omap2/sec-common.c
@@ -13,9 +13,11 @@
*/
#include <common.h>
+#include <command.h>
#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-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index dbb68f718d..bcfba16a08 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -16,10 +16,12 @@
*/
#include <common.h>
+#include <init.h>
#include <time.h>
#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-omap2/utils.c b/arch/arm/mach-omap2/utils.c
index 0d5ca20e8e..6e6791fc65 100644
--- a/arch/arm/mach-omap2/utils.c
+++ b/arch/arm/mach-omap2/utils.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
#include <env.h>
+#include <part.h>
#include <asm/setup.h>
#include <asm/arch/sys_proto.h>
#include <asm/omap_common.h>
@@ -90,7 +91,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/arm/mach-orion5x/cpu.c b/arch/arm/mach-orion5x/cpu.c
index 5a693e20bb..d9abcacbb4 100644
--- a/arch/arm/mach-orion5x/cpu.c
+++ b/arch/arm/mach-orion5x/cpu.c
@@ -10,6 +10,8 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
+#include <net.h>
#include <netdev.h>
#include <asm/cache.h>
#include <asm/io.h>
diff --git a/arch/arm/mach-orion5x/timer.c b/arch/arm/mach-orion5x/timer.c
index 077eb63e74..4926bb7779 100644
--- a/arch/arm/mach-orion5x/timer.c
+++ b/arch/arm/mach-orion5x/timer.c
@@ -8,8 +8,10 @@
*/
#include <common.h>
+#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-owl/soc.c b/arch/arm/mach-owl/soc.c
index 409cbd319f..7d3f6f6285 100644
--- a/arch/arm/mach-owl/soc.c
+++ b/arch/arm/mach-owl/soc.c
@@ -6,6 +6,8 @@
*/
#include <cpu_func.h>
+#include <init.h>
+#include <asm/cache.h>
#include <linux/arm-smccc.h>
#include <linux/psci.h>
#include <common.h>
diff --git a/arch/arm/mach-rmobile/board.c b/arch/arm/mach-rmobile/board.c
index 8a2d3ce621..a10371f74e 100644
--- a/arch/arm/mach-rmobile/board.c
+++ b/arch/arm/mach-rmobile/board.c
@@ -4,6 +4,7 @@
* (C) Copyright 2012 Renesas Solutions Corp.
*/
#include <common.h>
+#include <init.h>
#include <asm/io.h>
#ifdef CONFIG_ARCH_RMOBILE_BOARD_STRING
diff --git a/arch/arm/mach-rmobile/cpu_info.c b/arch/arm/mach-rmobile/cpu_info.c
index 2cc701c4f5..fdbbd72e28 100644
--- a/arch/arm/mach-rmobile/cpu_info.c
+++ b/arch/arm/mach-rmobile/cpu_info.c
@@ -5,6 +5,8 @@
*/
#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/emac.c b/arch/arm/mach-rmobile/emac.c
index f9cd89a131..3211dfee02 100644
--- a/arch/arm/mach-rmobile/emac.c
+++ b/arch/arm/mach-rmobile/emac.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <net.h>
#include <linux/errno.h>
#include <netdev.h>
diff --git a/arch/arm/mach-rmobile/include/mach/rcar-gen3-base.h b/arch/arm/mach-rmobile/include/mach/rcar-gen3-base.h
index ecd02b9be0..5cd8a8c787 100644
--- a/arch/arm/mach-rmobile/include/mach/rcar-gen3-base.h
+++ b/arch/arm/mach-rmobile/include/mach/rcar-gen3-base.h
@@ -79,6 +79,7 @@
#ifndef __ASSEMBLY__
#include <asm/types.h>
+#include <linux/bitops.h>
/* RWDT */
struct rcar_rwdt {
diff --git a/arch/arm/mach-rmobile/include/mach/sh_sdhi.h b/arch/arm/mach-rmobile/include/mach/sh_sdhi.h
index be9b233747..7741718be1 100644
--- a/arch/arm/mach-rmobile/include/mach/sh_sdhi.h
+++ b/arch/arm/mach-rmobile/include/mach/sh_sdhi.h
@@ -11,6 +11,7 @@
#ifndef _SH_SDHI_H
#define _SH_SDHI_H
+#include <linux/bitops.h>
#define SDHI_CMD (0x0000 >> 1)
#define SDHI_PORTSEL (0x0004 >> 1)
#define SDHI_ARG0 (0x0008 >> 1)
diff --git a/arch/arm/mach-rmobile/timer.c b/arch/arm/mach-rmobile/timer.c
index 9fcab446a5..ba06535e4c 100644
--- a/arch/arm/mach-rmobile/timer.c
+++ b/arch/arm/mach-rmobile/timer.c
@@ -6,10 +6,12 @@
#include <common.h>
#include <div64.h>
+#include <init.h>
#include <time.h>
#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/board.c b/arch/arm/mach-rockchip/board.c
index 14b9e89ea3..430c0cbf41 100644
--- a/arch/arm/mach-rockchip/board.c
+++ b/arch/arm/mach-rockchip/board.c
@@ -7,8 +7,10 @@
#include <cpu_func.h>
#include <dm.h>
#include <init.h>
+#include <log.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/boot_mode.c b/arch/arm/mach-rockchip/boot_mode.c
index 7598fe4c43..2158934159 100644
--- a/arch/arm/mach-rockchip/boot_mode.c
+++ b/arch/arm/mach-rockchip/boot_mode.c
@@ -5,6 +5,9 @@
#include <common.h>
#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/bootrom.c b/arch/arm/mach-rockchip/bootrom.c
index 1524eca272..b36e559e87 100644
--- a/arch/arm/mach-rockchip/bootrom.c
+++ b/arch/arm/mach-rockchip/bootrom.c
@@ -7,6 +7,7 @@
#include <hang.h>
#include <asm/arch-rockchip/bootrom.h>
#include <asm/arch-rockchip/boot_mode.h>
+#include <asm/cache.h>
#include <asm/io.h>
#include <asm/setjmp.h>
#include <asm/system.h>
diff --git a/arch/arm/mach-rockchip/cpu-info.c b/arch/arm/mach-rockchip/cpu-info.c
index 4b0e99299a..21ca9dedce 100644
--- a/arch/arm/mach-rockchip/cpu-info.c
+++ b/arch/arm/mach-rockchip/cpu-info.c
@@ -5,6 +5,8 @@
*/
#include <common.h>
+#include <env.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/misc.c b/arch/arm/mach-rockchip/misc.c
index 6dbb9bde48..28c7c7214c 100644
--- a/arch/arm/mach-rockchip/misc.c
+++ b/arch/arm/mach-rockchip/misc.c
@@ -12,6 +12,8 @@
#include <common.h>
#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-board-tpl.c b/arch/arm/mach-rockchip/px30-board-tpl.c
index 8c8976f61c..085e650620 100644
--- a/arch/arm/mach-rockchip/px30-board-tpl.c
+++ b/arch/arm/mach-rockchip/px30-board-tpl.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <debug_uart.h>
#include <dm.h>
+#include <init.h>
#include <ram.h>
#include <spl.h>
#include <version.h>
diff --git a/arch/arm/mach-rockchip/px30/px30.c b/arch/arm/mach-rockchip/px30/px30.c
index 5014ee83d7..6fcef63c1b 100644
--- a/arch/arm/mach-rockchip/px30/px30.c
+++ b/arch/arm/mach-rockchip/px30/px30.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#include <init.h>
#include <asm/armv8/mmu.h>
#include <asm/io.h>
#include <asm/arch-rockchip/grf_px30.h>
diff --git a/arch/arm/mach-rockchip/px30/syscon_px30.c b/arch/arm/mach-rockchip/px30/syscon_px30.c
index 0331491b40..4672bdbf00 100644
--- a/arch/arm/mach-rockchip/px30/syscon_px30.c
+++ b/arch/arm/mach-rockchip/px30/syscon_px30.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <syscon.h>
#include <asm/arch-rockchip/clock.h>
diff --git a/arch/arm/mach-rockchip/rk3036-board-spl.c b/arch/arm/mach-rockchip/rk3036-board-spl.c
index fbc89b66c4..6eb89e15b8 100644
--- a/arch/arm/mach-rockchip/rk3036-board-spl.c
+++ b/arch/arm/mach-rockchip/rk3036-board-spl.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <debug_uart.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/arch-rockchip/bootrom.h>
#include <asm/arch-rockchip/sdram_rk3036.h>
diff --git a/arch/arm/mach-rockchip/rk3036/rk3036.c b/arch/arm/mach-rockchip/rk3036/rk3036.c
index e9ada6dea3..e9e020ff3f 100644
--- a/arch/arm/mach-rockchip/rk3036/rk3036.c
+++ b/arch/arm/mach-rockchip/rk3036/rk3036.c
@@ -2,6 +2,9 @@
/*
* (C) Copyright 2019 Rockchip Electronics Co., Ltd
*/
+
+#include <common.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/arch-rockchip/grf_rk3036.h>
#include <asm/arch-rockchip/hardware.h>
diff --git a/arch/arm/mach-rockchip/rk3036/sdram_rk3036.c b/arch/arm/mach-rockchip/rk3036/sdram_rk3036.c
index c39cbb8111..6ae254e99a 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>
@@ -10,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/rk3128/rk3128.c b/arch/arm/mach-rockchip/rk3128/rk3128.c
index ee176de80b..740bd2ba07 100644
--- a/arch/arm/mach-rockchip/rk3128/rk3128.c
+++ b/arch/arm/mach-rockchip/rk3128/rk3128.c
@@ -3,6 +3,7 @@
* Copyright (c) 2017 Rockchip Electronics Co., Ltd
*/
#include <common.h>
+#include <init.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-rockchip/rk3188/rk3188.c b/arch/arm/mach-rockchip/rk3188/rk3188.c
index e52466fb6f..ef57dfd761 100644
--- a/arch/arm/mach-rockchip/rk3188/rk3188.c
+++ b/arch/arm/mach-rockchip/rk3188/rk3188.c
@@ -5,6 +5,8 @@
#include <common.h>
#include <dm.h>
#include <hang.h>
+#include <init.h>
+#include <log.h>
#include <syscon.h>
#include <asm/io.h>
#include <asm/arch-rockchip/bootrom.h>
diff --git a/arch/arm/mach-rockchip/rk3188/syscon_rk3188.c b/arch/arm/mach-rockchip/rk3188/syscon_rk3188.c
index 94f4ec7227..ea7d7b5b1a 100644
--- a/arch/arm/mach-rockchip/rk3188/syscon_rk3188.c
+++ b/arch/arm/mach-rockchip/rk3188/syscon_rk3188.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <syscon.h>
#include <asm/arch-rockchip/clock.h>
diff --git a/arch/arm/mach-rockchip/rk322x/rk322x.c b/arch/arm/mach-rockchip/rk322x/rk322x.c
index 562117e6c1..ad4ac62e51 100644
--- a/arch/arm/mach-rockchip/rk322x/rk322x.c
+++ b/arch/arm/mach-rockchip/rk322x/rk322x.c
@@ -2,6 +2,7 @@
/*
* (C) Copyright 2019 Rockchip Electronics Co., Ltd
*/
+#include <init.h>
#include <asm/io.h>
#include <asm/arch-rockchip/bootrom.h>
#include <asm/arch-rockchip/grf_rk322x.h>
diff --git a/arch/arm/mach-rockchip/rk3288/rk3288.c b/arch/arm/mach-rockchip/rk3288/rk3288.c
index 812f3bd5f3..804abe8a1b 100644
--- a/arch/arm/mach-rockchip/rk3288/rk3288.c
+++ b/arch/arm/mach-rockchip/rk3288/rk3288.c
@@ -3,6 +3,7 @@
* Copyright (c) 2016 Rockchip Electronics Co., Ltd
*/
#include <common.h>
+#include <command.h>
#include <dm.h>
#include <env.h>
#include <clk.h>
@@ -114,8 +115,8 @@ int rk_board_late_init(void)
return rk3288_board_late_init();
}
-static int do_clock(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_clock(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
static const struct {
char *name;
diff --git a/arch/arm/mach-rockchip/rk3288/syscon_rk3288.c b/arch/arm/mach-rockchip/rk3288/syscon_rk3288.c
index dff2caa598..e3da0a0194 100644
--- a/arch/arm/mach-rockchip/rk3288/syscon_rk3288.c
+++ b/arch/arm/mach-rockchip/rk3288/syscon_rk3288.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <syscon.h>
#include <asm/arch-rockchip/clock.h>
diff --git a/arch/arm/mach-rockchip/rk3308/rk3308.c b/arch/arm/mach-rockchip/rk3308/rk3308.c
index edf5994709..8e8214cf7e 100644
--- a/arch/arm/mach-rockchip/rk3308/rk3308.c
+++ b/arch/arm/mach-rockchip/rk3308/rk3308.c
@@ -3,12 +3,14 @@
*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>
#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/rk3328/rk3328.c b/arch/arm/mach-rockchip/rk3328/rk3328.c
index 8c81242e5d..7c85b2663c 100644
--- a/arch/arm/mach-rockchip/rk3328/rk3328.c
+++ b/arch/arm/mach-rockchip/rk3328/rk3328.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/arch-rockchip/bootrom.h>
#include <asm/arch-rockchip/hardware.h>
#include <asm/arch-rockchip/grf_rk3328.h>
diff --git a/arch/arm/mach-rockchip/rk3368/rk3368.c b/arch/arm/mach-rockchip/rk3368/rk3368.c
index 20ae797794..1c6d65a588 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>
@@ -13,6 +14,8 @@
#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/rk3368/syscon_rk3368.c b/arch/arm/mach-rockchip/rk3368/syscon_rk3368.c
index 4ba94f2e80..cba0dda3e8 100644
--- a/arch/arm/mach-rockchip/rk3368/syscon_rk3368.c
+++ b/arch/arm/mach-rockchip/rk3368/syscon_rk3368.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <syscon.h>
#include <asm/arch-rockchip/clock.h>
diff --git a/arch/arm/mach-rockchip/rk3399/rk3399.c b/arch/arm/mach-rockchip/rk3399/rk3399.c
index dafa142824..09b0d6ebe8 100644
--- a/arch/arm/mach-rockchip/rk3399/rk3399.c
+++ b/arch/arm/mach-rockchip/rk3399/rk3399.c
@@ -4,6 +4,9 @@
*/
#include <common.h>
+#include <fdt_support.h>
+#include <init.h>
+#include <log.h>
#include <spl.h>
#include <spl_gpio.h>
#include <syscon.h>
@@ -14,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/rk3399/syscon_rk3399.c b/arch/arm/mach-rockchip/rk3399/syscon_rk3399.c
index 259ca44d68..6b02dc8beb 100644
--- a/arch/arm/mach-rockchip/rk3399/syscon_rk3399.c
+++ b/arch/arm/mach-rockchip/rk3399/syscon_rk3399.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <syscon.h>
#include <asm/arch-rockchip/clock.h>
diff --git a/arch/arm/mach-rockchip/sdram.c b/arch/arm/mach-rockchip/sdram.c
index 530644c043..24fe6cc8f0 100644
--- a/arch/arm/mach-rockchip/sdram.c
+++ b/arch/arm/mach-rockchip/sdram.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <init.h>
+#include <log.h>
#include <ram.h>
#include <asm/io.h>
#include <asm/arch-rockchip/sdram.h>
diff --git a/arch/arm/mach-rockchip/spl-boot-order.c b/arch/arm/mach-rockchip/spl-boot-order.c
index c147d5821e..c2e4023007 100644
--- a/arch/arm/mach-rockchip/spl-boot-order.c
+++ b/arch/arm/mach-rockchip/spl-boot-order.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <mmc.h>
#include <spl.h>
diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c
index 0b76af6080..ec2f66d188 100644
--- a/arch/arm/mach-rockchip/spl.c
+++ b/arch/arm/mach-rockchip/spl.c
@@ -7,10 +7,14 @@
#include <debug_uart.h>
#include <dm.h>
#include <hang.h>
+#include <image.h>
+#include <init.h>
+#include <log.h>
#include <ram.h>
#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 a2b8d31cbd..88f80b05a9 100644
--- a/arch/arm/mach-rockchip/tpl.c
+++ b/arch/arm/mach-rockchip/tpl.c
@@ -7,11 +7,14 @@
#include <debug_uart.h>
#include <dm.h>
#include <hang.h>
+#include <init.h>
+#include <log.h>
#include <ram.h>
#include <spl.h>
#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-s5pc1xx/cache.c b/arch/arm/mach-s5pc1xx/cache.c
index 7816ba1177..b390bdf827 100644
--- a/arch/arm/mach-s5pc1xx/cache.c
+++ b/arch/arm/mach-s5pc1xx/cache.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <asm/cache.h>
#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
void enable_caches(void)
diff --git a/arch/arm/mach-snapdragon/dram.c b/arch/arm/mach-snapdragon/dram.c
index 79eb19992d..2a161be137 100644
--- a/arch/arm/mach-snapdragon/dram.c
+++ b/arch/arm/mach-snapdragon/dram.c
@@ -8,6 +8,8 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
+#include <part.h>
#include <smem.h>
#include <fdt_support.h>
#include <asm/arch/dram.h>
diff --git a/arch/arm/mach-snapdragon/pinctrl-snapdragon.c b/arch/arm/mach-snapdragon/pinctrl-snapdragon.c
index 9ba8fdd729..442d236255 100644
--- a/arch/arm/mach-snapdragon/pinctrl-snapdragon.c
+++ b/arch/arm/mach-snapdragon/pinctrl-snapdragon.c
@@ -11,6 +11,7 @@
#include <errno.h>
#include <asm/io.h>
#include <dm/pinctrl.h>
+#include <linux/bitops.h>
#include "pinctrl-snapdragon.h"
struct msm_pinctrl_priv {
diff --git a/arch/arm/mach-socfpga/board.c b/arch/arm/mach-socfpga/board.c
index 7c8c05cc31..340abf9305 100644
--- a/arch/arm/mach-socfpga/board.c
+++ b/arch/arm/mach-socfpga/board.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <errno.h>
#include <fdtdec.h>
+#include <init.h>
#include <asm/arch/reset_manager.h>
#include <asm/arch/clock_manager.h>
#include <asm/arch/misc.h>
diff --git a/arch/arm/mach-socfpga/clock_manager.c b/arch/arm/mach-socfpga/clock_manager.c
index dbb10ecb68..a4a97b6a0f 100644
--- a/arch/arm/mach-socfpga/clock_manager.c
+++ b/arch/arm/mach-socfpga/clock_manager.c
@@ -4,6 +4,8 @@
*/
#include <common.h>
+#include <command.h>
+#include <init.h>
#include <wait_bit.h>
#include <asm/io.h>
#include <asm/arch/clock_manager.h>
@@ -61,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/clock_manager_agilex.c b/arch/arm/mach-socfpga/clock_manager_agilex.c
index 4ee2b7b4bb..6188a8c3d2 100644
--- a/arch/arm/mach-socfpga/clock_manager_agilex.c
+++ b/arch/arm/mach-socfpga/clock_manager_agilex.c
@@ -7,6 +7,7 @@
#include <clk.h>
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <asm/arch/clock_manager.h>
#include <asm/arch/system_manager.h>
diff --git a/arch/arm/mach-socfpga/clock_manager_arria10.c b/arch/arm/mach-socfpga/clock_manager_arria10.c
index d7c8eaf47d..58d5d3fd8a 100644
--- a/arch/arm/mach-socfpga/clock_manager_arria10.c
+++ b/arch/arm/mach-socfpga/clock_manager_arria10.c
@@ -11,6 +11,7 @@
#include <clk.h>
#include <dm/device-internal.h>
#include <asm/arch/clock_manager.h>
+#include <linux/delay.h>
#ifdef CONFIG_SPL_BUILD
diff --git a/arch/arm/mach-socfpga/freeze_controller.c b/arch/arm/mach-socfpga/freeze_controller.c
index d48aeec374..561d3408cd 100644
--- a/arch/arm/mach-socfpga/freeze_controller.c
+++ b/arch/arm/mach-socfpga/freeze_controller.c
@@ -8,6 +8,7 @@
#include <asm/io.h>
#include <asm/arch/clock_manager.h>
#include <asm/arch/freeze_controller.h>
+#include <linux/delay.h>
#include <linux/errno.h>
static const struct socfpga_freeze_controller *freeze_controller_base =
diff --git a/arch/arm/mach-socfpga/include/mach/clock_manager.h b/arch/arm/mach-socfpga/include/mach/clock_manager.h
index c6830582a5..1f734bcd65 100644
--- a/arch/arm/mach-socfpga/include/mach/clock_manager.h
+++ b/arch/arm/mach-socfpga/include/mach/clock_manager.h
@@ -8,7 +8,7 @@
phys_addr_t socfpga_get_clkmgr_addr(void);
-#ifndef __ASSEMBLER__
+#ifndef __ASSEMBLY__
void cm_wait_for_lock(u32 mask);
int cm_wait_for_fsm(void);
void cm_print_clock_quick_summary(void);
diff --git a/arch/arm/mach-socfpga/include/mach/clock_manager_arria10.h b/arch/arm/mach-socfpga/include/mach/clock_manager_arria10.h
index 23f280df1b..11ddee5cb6 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 08655094ca..5c9abe619b 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 9d2b3babab..cb7923baef 100644
--- a/arch/arm/mach-socfpga/include/mach/clock_manager_s10.h
+++ b/arch/arm/mach-socfpga/include/mach/clock_manager_s10.h
@@ -8,6 +8,7 @@
#define _CLOCK_MANAGER_S10_
#include <asm/arch/clock_manager_soc64.h>
+#include <linux/bitops.h>
/* Clock speed accessors */
unsigned long cm_get_mpu_clk_hz(void);
diff --git a/arch/arm/mach-socfpga/include/mach/firewall.h b/arch/arm/mach-socfpga/include/mach/firewall.h
index 430341bea1..adab65bc96 100644
--- a/arch/arm/mach-socfpga/include/mach/firewall.h
+++ b/arch/arm/mach-socfpga/include/mach/firewall.h
@@ -7,6 +7,8 @@
#ifndef _FIREWALL_H_
#define _FIREWALL_H_
+#include <linux/bitops.h>
+
struct socfpga_firwall_l4_per {
u32 nand; /* 0x00 */
u32 nand_data;
diff --git a/arch/arm/mach-socfpga/include/mach/fpga_manager_arria10.h b/arch/arm/mach-socfpga/include/mach/fpga_manager_arria10.h
index 62249b3695..048708202c 100644
--- a/arch/arm/mach-socfpga/include/mach/fpga_manager_arria10.h
+++ b/arch/arm/mach-socfpga/include/mach/fpga_manager_arria10.h
@@ -7,6 +7,7 @@
#include <asm/cache.h>
#include <altera.h>
#include <image.h>
+#include <linux/bitops.h>
#ifndef _FPGA_MANAGER_ARRIA10_H_
#define _FPGA_MANAGER_ARRIA10_H_
diff --git a/arch/arm/mach-socfpga/include/mach/fpga_manager_gen5.h b/arch/arm/mach-socfpga/include/mach/fpga_manager_gen5.h
index c8ec5d4c3c..e08c005628 100644
--- a/arch/arm/mach-socfpga/include/mach/fpga_manager_gen5.h
+++ b/arch/arm/mach-socfpga/include/mach/fpga_manager_gen5.h
@@ -7,6 +7,7 @@
#ifndef _FPGA_MANAGER_GEN5_H_
#define _FPGA_MANAGER_GEN5_H_
+#include <linux/bitops.h>
#define FPGAMGRREGS_STAT_MODE_MASK 0x7
#define FPGAMGRREGS_STAT_MSEL_MASK 0xf8
#define FPGAMGRREGS_STAT_MSEL_LSB 3
diff --git a/arch/arm/mach-socfpga/include/mach/mailbox_s10.h b/arch/arm/mach-socfpga/include/mach/mailbox_s10.h
index ae728a5df5..55707ab9c5 100644
--- a/arch/arm/mach-socfpga/include/mach/mailbox_s10.h
+++ b/arch/arm/mach-socfpga/include/mach/mailbox_s10.h
@@ -8,6 +8,7 @@
#define _MAILBOX_S10_H_
/* user define Uboot ID */
+#include <linux/bitops.h>
#define MBOX_CLIENT_ID_UBOOT 0xB
#define MBOX_ID_UBOOT 0x1
diff --git a/arch/arm/mach-socfpga/include/mach/reset_manager_arria10.h b/arch/arm/mach-socfpga/include/mach/reset_manager_arria10.h
index 22e4eb33de..19507c292d 100644
--- a/arch/arm/mach-socfpga/include/mach/reset_manager_arria10.h
+++ b/arch/arm/mach-socfpga/include/mach/reset_manager_arria10.h
@@ -7,6 +7,7 @@
#define _RESET_MANAGER_ARRIA10_H_
#include <dt-bindings/reset/altr,rst-mgr-a10.h>
+#include <linux/bitops.h>
void socfpga_watchdog_disable(void);
void socfpga_reset_deassert_noc_ddr_scheduler(void);
diff --git a/arch/arm/mach-socfpga/include/mach/sdram_arria10.h b/arch/arm/mach-socfpga/include/mach/sdram_arria10.h
index 25b82fb285..ff05994ccc 100644
--- a/arch/arm/mach-socfpga/include/mach/sdram_arria10.h
+++ b/arch/arm/mach-socfpga/include/mach/sdram_arria10.h
@@ -7,6 +7,7 @@
#define _SOCFPGA_SDRAM_ARRIA10_H_
#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
int ddr_calibration_sequence(void);
struct socfpga_ecc_hmc {
@@ -205,7 +206,7 @@ struct socfpga_io48_mmr {
u32 niosreserve2;
};
-#endif /*__ASSEMBLY__*/
+#endif /*__ASSEMBLY__ */
#define IO48_MMR_CTRLCFG0_DB2_BURST_LENGTH_MASK 0x1F000000
#define IO48_MMR_CTRLCFG0_DB2_BURST_LENGTH_SHIFT 24
diff --git a/arch/arm/mach-socfpga/include/mach/system_manager.h b/arch/arm/mach-socfpga/include/mach/system_manager.h
index 6de0a08131..f816954717 100644
--- a/arch/arm/mach-socfpga/include/mach/system_manager.h
+++ b/arch/arm/mach-socfpga/include/mach/system_manager.h
@@ -94,5 +94,6 @@ phys_addr_t socfpga_get_sysmgr_addr(void);
#define SYSMGR_GET_BOOTINFO_BSEL(bsel) \
(((bsel) >> SYSMGR_BOOTINFO_BSEL_SHIFT) & 7)
+#include <linux/bitops.h>
#endif
#endif /* _SYSTEM_MANAGER_H_ */
diff --git a/arch/arm/mach-socfpga/include/mach/system_manager_soc64.h b/arch/arm/mach-socfpga/include/mach/system_manager_soc64.h
index 3a6c9515c6..c90f63a754 100644
--- a/arch/arm/mach-socfpga/include/mach/system_manager_soc64.h
+++ b/arch/arm/mach-socfpga/include/mach/system_manager_soc64.h
@@ -6,6 +6,7 @@
#ifndef _SYSTEM_MANAGER_SOC64_H_
#define _SYSTEM_MANAGER_SOC64_H_
+#include <linux/bitops.h>
void sysmgr_pinmux_init(void);
void populate_sysmgr_fpgaintf_module(void);
void populate_sysmgr_pinmux(void);
diff --git a/arch/arm/mach-socfpga/misc.c b/arch/arm/mach-socfpga/misc.c
index 2901b7db68..ac2b891fad 100644
--- a/arch/arm/mach-socfpga/misc.c
+++ b/arch/arm/mach-socfpga/misc.c
@@ -4,8 +4,11 @@
*/
#include <common.h>
+#include <command.h>
#include <cpu_func.h>
#include <hang.h>
+#include <asm/cache.h>
+#include <init.h>
#include <asm/io.h>
#include <errno.h>
#include <fdtdec.h>
@@ -176,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-socfpga/misc_arria10.c b/arch/arm/mach-socfpga/misc_arria10.c
index d56349b7f3..bf978053ca 100644
--- a/arch/arm/mach-socfpga/misc_arria10.c
+++ b/arch/arm/mach-socfpga/misc_arria10.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <errno.h>
#include <fdtdec.h>
+#include <init.h>
#include <miiphy.h>
#include <netdev.h>
#include <ns16550.h>
diff --git a/arch/arm/mach-socfpga/misc_gen5.c b/arch/arm/mach-socfpga/misc_gen5.c
index 21eb934e56..7209e8d6db 100644
--- a/arch/arm/mach-socfpga/misc_gen5.c
+++ b/arch/arm/mach-socfpga/misc_gen5.c
@@ -5,10 +5,12 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
#include <asm/io.h>
#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/misc_s10.c b/arch/arm/mach-socfpga/misc_s10.c
index a3f5b4364e..ccff78a230 100644
--- a/arch/arm/mach-socfpga/misc_s10.c
+++ b/arch/arm/mach-socfpga/misc_s10.c
@@ -9,6 +9,8 @@
#include <env.h>
#include <errno.h>
#include <fdtdec.h>
+#include <init.h>
+#include <log.h>
#include <miiphy.h>
#include <netdev.h>
#include <asm/io.h>
diff --git a/arch/arm/mach-socfpga/pinmux_arria10.c b/arch/arm/mach-socfpga/pinmux_arria10.c
index 163bf278b1..f378fce7f0 100644
--- a/arch/arm/mach-socfpga/pinmux_arria10.c
+++ b/arch/arm/mach-socfpga/pinmux_arria10.c
@@ -3,6 +3,7 @@
* Copyright (C) 2016-2017 Intel Corporation <www.intel.com>
*/
+#include <log.h>
#include <asm/arch/pinmux.h>
#include <asm/io.h>
#include <common.h>
diff --git a/arch/arm/mach-socfpga/reset_manager_gen5.c b/arch/arm/mach-socfpga/reset_manager_gen5.c
index 1008a78dc8..a65860ef02 100644
--- a/arch/arm/mach-socfpga/reset_manager_gen5.c
+++ b/arch/arm/mach-socfpga/reset_manager_gen5.c
@@ -9,6 +9,7 @@
#include <asm/arch/fpga_manager.h>
#include <asm/arch/reset_manager.h>
#include <asm/arch/system_manager.h>
+#include <linux/bitops.h>
/* Assert or de-assert SoCFPGA reset manager reset. */
void socfpga_per_reset(u32 reset, int set)
diff --git a/arch/arm/mach-socfpga/scan_manager.c b/arch/arm/mach-socfpga/scan_manager.c
index f7ee28915e..36d6880141 100644
--- a/arch/arm/mach-socfpga/scan_manager.c
+++ b/arch/arm/mach-socfpga/scan_manager.c
@@ -9,6 +9,7 @@
#include <asm/arch/freeze_controller.h>
#include <asm/arch/scan_manager.h>
#include <asm/arch/system_manager.h>
+#include <linux/delay.h>
/*
* Maximum polling loop to wait for IO scan chain engine becomes idle
diff --git a/arch/arm/mach-socfpga/spl_a10.c b/arch/arm/mach-socfpga/spl_a10.c
index d2f52f2f2c..45aea4ab6c 100644
--- a/arch/arm/mach-socfpga/spl_a10.c
+++ b/arch/arm/mach-socfpga/spl_a10.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <cpu_func.h>
#include <hang.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/pl310.h>
#include <asm/u-boot.h>
diff --git a/arch/arm/mach-socfpga/spl_agilex.c b/arch/arm/mach-socfpga/spl_agilex.c
index aa9f3e646c..bd971ecbd1 100644
--- a/arch/arm/mach-socfpga/spl_agilex.c
+++ b/arch/arm/mach-socfpga/spl_agilex.c
@@ -4,6 +4,8 @@
*
*/
+#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 e9967ac450..5a7c5ef76d 100644
--- a/arch/arm/mach-socfpga/spl_gen5.c
+++ b/arch/arm/mach-socfpga/spl_gen5.c
@@ -5,6 +5,8 @@
#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>
@@ -22,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-socfpga/spl_s10.c b/arch/arm/mach-socfpga/spl_s10.c
index 08427dd83e..b3c6f6afc4 100644
--- a/arch/arm/mach-socfpga/spl_s10.c
+++ b/arch/arm/mach-socfpga/spl_s10.c
@@ -5,6 +5,8 @@
*/
#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/timer.c b/arch/arm/mach-socfpga/timer.c
index f1c0262ae5..a58f1cf9d3 100644
--- a/arch/arm/mach-socfpga/timer.c
+++ b/arch/arm/mach-socfpga/timer.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/arch/timer.h>
diff --git a/arch/arm/mach-socfpga/timer_s10.c b/arch/arm/mach-socfpga/timer_s10.c
index 57237892c3..3ad98bdb25 100644
--- a/arch/arm/mach-socfpga/timer_s10.c
+++ b/arch/arm/mach-socfpga/timer_s10.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/arch/timer.h>
diff --git a/arch/arm/mach-stm32/soc.c b/arch/arm/mach-stm32/soc.c
index 41338a1a33..1f12da401c 100644
--- a/arch/arm/mach-stm32/soc.c
+++ b/arch/arm/mach-stm32/soc.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/armv7_mpu.h>
diff --git a/arch/arm/mach-stm32mp/boot_params.c b/arch/arm/mach-stm32mp/boot_params.c
index e4351de939..37ee9e1612 100644
--- a/arch/arm/mach-stm32mp/boot_params.c
+++ b/arch/arm/mach-stm32mp/boot_params.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/sections.h>
#include <asm/system.h>
diff --git a/arch/arm/mach-stm32mp/bsec.c b/arch/arm/mach-stm32mp/bsec.c
index 0d5850b4a9..fc39230113 100644
--- a/arch/arm/mach-stm32mp/bsec.c
+++ b/arch/arm/mach-stm32mp/bsec.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <misc.h>
#include <asm/io.h>
#include <asm/arch/stm32mp1_smc.h>
diff --git a/arch/arm/mach-stm32mp/cmd_stm32key.c b/arch/arm/mach-stm32mp/cmd_stm32key.c
index f1f26e7c94..f191085a12 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32key.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32key.c
@@ -66,8 +66,8 @@ static int confirm_prog(void)
return 0;
}
-static int do_stm32key(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_stm32key(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
u32 addr;
const char *op = argc >= 2 ? argv[1] : NULL;
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c b/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c
index 6bebea7ad5..0722e4a891 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c
@@ -38,7 +38,7 @@ static void enable_vidconsole(void)
#endif
}
-static int do_stm32prog(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_stm32prog(struct cmd_tbl *cmdtp, int flag, int argc,
char * const argv[])
{
ulong addr, size;
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
index cc303214cf..c5b8841b23 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
@@ -3,7 +3,7 @@
* Copyright (C) 2020, STMicroelectronics - All Rights Reserved
*/
-#include <common.h>
+#include <command.h>
#include <console.h>
#include <dfu.h>
#include <malloc.h>
@@ -727,7 +727,7 @@ static int init_device(struct stm32prog_data *data,
pr_debug("\n");
continue;
}
- disk_partition_t partinfo;
+ struct disk_partition partinfo;
ret = part_get_info(block_dev, part->part_id,
&partinfo);
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
index 5a16979adc..70940f01f3 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
@@ -11,6 +11,7 @@
#include <watchdog.h>
#include <dm/lists.h>
#include <dm/device-internal.h>
+#include <linux/delay.h>
#include "stm32prog.h"
/* - configuration part -----------------------------*/
diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c
index 5a10808a44..472b140321 100644
--- a/arch/arm/mach-stm32mp/cpu.c
+++ b/arch/arm/mach-stm32mp/cpu.c
@@ -7,12 +7,16 @@
#include <cpu_func.h>
#include <debug_uart.h>
#include <env.h>
+#include <init.h>
+#include <log.h>
#include <misc.h>
+#include <net.h>
#include <asm/io.h>
#include <asm/arch/stm32.h>
#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/dram_init.c b/arch/arm/mach-stm32mp/dram_init.c
index 3233415eff..0e8ce63f4a 100644
--- a/arch/arm/mach-stm32mp/dram_init.c
+++ b/arch/arm/mach-stm32mp/dram_init.c
@@ -5,7 +5,10 @@
#include <common.h>
#include <dm.h>
+#include <image.h>
+#include <init.h>
#include <lmb.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 21b5f09728..c723b223e0 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 <tee.h>
#include <asm/arch/sys_proto.h>
#include <dt-bindings/pinctrl/stm32-pinfunc.h>
diff --git a/arch/arm/mach-stm32mp/include/mach/stm32.h b/arch/arm/mach-stm32mp/include/mach/stm32.h
index 242bacc50b..5fdb893b0e 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
@@ -133,5 +137,5 @@ enum forced_boot_mode {
#define BSEC_OTP_MAC 57
#define BSEC_OTP_BOARD 59
-#endif /* __ASSEMBLY__*/
+#endif /* __ASSEMBLY__ */
#endif /* _MACH_STM32_H_ */
diff --git a/arch/arm/mach-stm32mp/psci.c b/arch/arm/mach-stm32mp/psci.c
index 3fb038d3e7..155aa79cd5 100644
--- a/arch/arm/mach-stm32mp/psci.c
+++ b/arch/arm/mach-stm32mp/psci.c
@@ -6,10 +6,12 @@
#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>
#include <asm/secure.h>
+#include <linux/bitops.h>
#define BOOT_API_A7_CORE0_MAGIC_NUMBER 0xCA7FACE0
#define BOOT_API_A7_CORE1_MAGIC_NUMBER 0xCA7FACE1
diff --git a/arch/arm/mach-stm32mp/pwr_regulator.c b/arch/arm/mach-stm32mp/pwr_regulator.c
index b52e1e85d5..900dee4c38 100644
--- a/arch/arm/mach-stm32mp/pwr_regulator.c
+++ b/arch/arm/mach-stm32mp/pwr_regulator.c
@@ -9,6 +9,7 @@
#include <syscon.h>
#include <asm/io.h>
#include <dm/device_compat.h>
+#include <linux/bitops.h>
#include <linux/err.h>
#include <power/pmic.h>
#include <power/regulator.h>
diff --git a/arch/arm/mach-stm32mp/spl.c b/arch/arm/mach-stm32mp/spl.c
index b7e7e92ef6..39413e9a0e 100644
--- a/arch/arm/mach-stm32mp/spl.c
+++ b/arch/arm/mach-stm32mp/spl.c
@@ -7,7 +7,10 @@
#include <cpu_func.h>
#include <dm.h>
#include <hang.h>
+#include <init.h>
+#include <log.h>
#include <spl.h>
+#include <asm/cache.h>
#include <asm/io.h>
#include <asm/arch/sys_proto.h>
#include <linux/libfdt.h>
diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c
index b487b265af..f40fccd8f8 100644
--- a/arch/arm/mach-sunxi/board.c
+++ b/arch/arm/mach-sunxi/board.c
@@ -11,10 +11,13 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
+#include <log.h>
#include <mmc.h>
#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-sunxi/clock_sun6i.c b/arch/arm/mach-sunxi/clock_sun6i.c
index 6ca38f73d9..8e84062bd7 100644
--- a/arch/arm/mach-sunxi/clock_sun6i.c
+++ b/arch/arm/mach-sunxi/clock_sun6i.c
@@ -14,6 +14,8 @@
#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
void clock_init_safe(void)
diff --git a/arch/arm/mach-sunxi/clock_sun8i_a83t.c b/arch/arm/mach-sunxi/clock_sun8i_a83t.c
index a55a6162d4..31e4281529 100644
--- a/arch/arm/mach-sunxi/clock_sun8i_a83t.c
+++ b/arch/arm/mach-sunxi/clock_sun8i_a83t.c
@@ -14,6 +14,7 @@
#include <asm/arch/clock.h>
#include <asm/arch/prcm.h>
#include <asm/arch/sys_proto.h>
+#include <linux/delay.h>
#ifdef CONFIG_SPL_BUILD
void clock_init_safe(void)
diff --git a/arch/arm/mach-sunxi/cpu_info.c b/arch/arm/mach-sunxi/cpu_info.c
index ae4745bfec..875e5a1a8a 100644
--- a/arch/arm/mach-sunxi/cpu_info.c
+++ b/arch/arm/mach-sunxi/cpu_info.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/arch/cpu.h>
#include <asm/arch/clock.h>
diff --git a/arch/arm/mach-sunxi/dram_sun4i.c b/arch/arm/mach-sunxi/dram_sun4i.c
index 72de807a47..76d698214d 100644
--- a/arch/arm/mach-sunxi/dram_sun4i.c
+++ b/arch/arm/mach-sunxi/dram_sun4i.c
@@ -27,6 +27,7 @@
#include <asm/arch/dram.h>
#include <asm/arch/timer.h>
#include <asm/arch/sys_proto.h>
+#include <linux/delay.h>
#define CPU_CFG_CHIP_VER(n) ((n) << 6)
#define CPU_CFG_CHIP_VER_MASK CPU_CFG_CHIP_VER(0x3)
diff --git a/arch/arm/mach-sunxi/dram_sun50i_h6.c b/arch/arm/mach-sunxi/dram_sun50i_h6.c
index 9375db76a1..9e34da4747 100644
--- a/arch/arm/mach-sunxi/dram_sun50i_h6.c
+++ b/arch/arm/mach-sunxi/dram_sun50i_h6.c
@@ -1,16 +1,19 @@
+// 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 <log.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
#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 f473230bb5..0590110d4a 100644
--- a/arch/arm/mach-sunxi/dram_sun6i.c
+++ b/arch/arm/mach-sunxi/dram_sun6i.c
@@ -11,10 +11,12 @@
*/
#include <common.h>
#include <errno.h>
+#include <init.h>
#include <asm/io.h>
#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 9f00fefb77..3ed97b59a3 100644
--- a/arch/arm/mach-sunxi/dram_sun8i_a23.c
+++ b/arch/arm/mach-sunxi/dram_sun8i_a23.c
@@ -21,10 +21,12 @@
#include <common.h>
#include <errno.h>
+#include <init.h>
#include <asm/io.h>
#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 5da01922bf..d99a38b10a 100644
--- a/arch/arm/mach-sunxi/dram_sun8i_a33.c
+++ b/arch/arm/mach-sunxi/dram_sun8i_a33.c
@@ -9,10 +9,12 @@
*/
#include <common.h>
#include <errno.h>
+#include <init.h>
#include <asm/io.h>
#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 2c43b3ceba..a3f833dd34 100644
--- a/arch/arm/mach-sunxi/dram_sun8i_a83t.c
+++ b/arch/arm/mach-sunxi/dram_sun8i_a83t.c
@@ -9,10 +9,12 @@
*/
#include <common.h>
#include <errno.h>
+#include <init.h>
#include <asm/io.h>
#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_sun9i.c b/arch/arm/mach-sunxi/dram_sun9i.c
index 77cc60623e..14be212e89 100644
--- a/arch/arm/mach-sunxi/dram_sun9i.c
+++ b/arch/arm/mach-sunxi/dram_sun9i.c
@@ -13,6 +13,8 @@
#include <common.h>
#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 85e7a1874e..5d84798ca4 100644
--- a/arch/arm/mach-sunxi/dram_sunxi_dw.c
+++ b/arch/arm/mach-sunxi/dram_sunxi_dw.c
@@ -9,10 +9,13 @@
* (C) Copyright 2015 Jens Kuske <jenskuske@gmail.com>
*/
#include <common.h>
+#include <init.h>
+#include <log.h>
#include <asm/io.h>
#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 a3997b2590..15e86cbac8 100644
--- a/arch/arm/mach-sunxi/spl_spi_sunxi.c
+++ b/arch/arm/mach-sunxi/spl_spi_sunxi.c
@@ -4,9 +4,13 @@
*/
#include <common.h>
+#include <image.h>
+#include <log.h>
#include <spl.h>
#include <asm/gpio.h>
#include <asm/io.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <linux/libfdt.h>
#ifdef CONFIG_SPL_OS_BOOT
diff --git a/arch/arm/mach-tegra/ap.c b/arch/arm/mach-tegra/ap.c
index 84c20a48ad..532730fe72 100644
--- a/arch/arm/mach-tegra/ap.c
+++ b/arch/arm/mach-tegra/ap.c
@@ -7,6 +7,7 @@
/* Tegra AP (Application Processor) code */
#include <common.h>
+#include <log.h>
#include <linux/bug.h>
#include <asm/io.h>
#include <asm/arch/gp_padctrl.h>
diff --git a/arch/arm/mach-tegra/board.c b/arch/arm/mach-tegra/board.c
index 31c49a7c84..03faacbd57 100644
--- a/arch/arm/mach-tegra/board.c
+++ b/arch/arm/mach-tegra/board.c
@@ -8,8 +8,10 @@
#include <cpu_func.h>
#include <dm.h>
#include <init.h>
+#include <log.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/board2.c b/arch/arm/mach-tegra/board2.c
index 224efc97c5..48c4f32d6f 100644
--- a/arch/arm/mach-tegra/board2.c
+++ b/arch/arm/mach-tegra/board2.c
@@ -9,6 +9,7 @@
#include <env.h>
#include <errno.h>
#include <init.h>
+#include <log.h>
#include <ns16550.h>
#include <usb.h>
#include <asm/io.h>
diff --git a/arch/arm/mach-tegra/cboot.c b/arch/arm/mach-tegra/cboot.c
index 390229436e..16c4cf306e 100644
--- a/arch/arm/mach-tegra/cboot.c
+++ b/arch/arm/mach-tegra/cboot.c
@@ -8,7 +8,10 @@
#include <fdt_support.h>
#include <fdtdec.h>
#include <hang.h>
+#include <init.h>
+#include <log.h>
#include <malloc.h>
+#include <net.h>
#include <stdlib.h>
#include <string.h>
diff --git a/arch/arm/mach-tegra/clock.c b/arch/arm/mach-tegra/clock.c
index 31b6aa2cfc..18c19dbf60 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>
@@ -17,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 b2252f3621..25df31a3b8 100644
--- a/arch/arm/mach-tegra/cmd_enterrcm.c
+++ b/arch/arm/mach-tegra/cmd_enterrcm.c
@@ -25,13 +25,15 @@
*/
#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>
+#include <linux/delay.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-tegra/cpu.c b/arch/arm/mach-tegra/cpu.c
index 3d140760e6..65b15b79fe 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>
@@ -12,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/gpu.c b/arch/arm/mach-tegra/gpu.c
index e047f67821..13ffade040 100644
--- a/arch/arm/mach-tegra/gpu.c
+++ b/arch/arm/mach-tegra/gpu.c
@@ -6,6 +6,7 @@
/* Tegra vpr routines */
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/arch/tegra.h>
#include <asm/arch/mc.h>
diff --git a/arch/arm/mach-tegra/ivc.c b/arch/arm/mach-tegra/ivc.c
index a448f2df30..e7c6d78744 100644
--- a/arch/arm/mach-tegra/ivc.c
+++ b/arch/arm/mach-tegra/ivc.c
@@ -7,6 +7,7 @@
#include <cpu_func.h>
#include <asm/io.h>
#include <asm/arch-tegra/ivc.h>
+#include <linux/bug.h>
#define TEGRA_IVC_ALIGN 64
diff --git a/arch/arm/mach-tegra/pinmux-common.c b/arch/arm/mach-tegra/pinmux-common.c
index 1771991fbb..16b03bfe7b 100644
--- a/arch/arm/mach-tegra/pinmux-common.c
+++ b/arch/arm/mach-tegra/pinmux-common.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/arch/pinmux.h>
diff --git a/arch/arm/mach-tegra/pmc.c b/arch/arm/mach-tegra/pmc.c
index 68a211286f..cdc8493efd 100644
--- a/arch/arm/mach-tegra/pmc.c
+++ b/arch/arm/mach-tegra/pmc.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <log.h>
#include <linux/arm-smccc.h>
diff --git a/arch/arm/mach-tegra/powergate.c b/arch/arm/mach-tegra/powergate.c
index 761c9ef19e..631bc04e95 100644
--- a/arch/arm/mach-tegra/powergate.c
+++ b/arch/arm/mach-tegra/powergate.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <errno.h>
+#include <linux/delay.h>
#include <asm/io.h>
#include <asm/types.h>
diff --git a/arch/arm/mach-tegra/spl.c b/arch/arm/mach-tegra/spl.c
index 13ddbc3b81..ed897efc5f 100644
--- a/arch/arm/mach-tegra/spl.c
+++ b/arch/arm/mach-tegra/spl.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
#include <debug_uart.h>
+#include <log.h>
#include <spl.h>
#include <asm/io.h>
diff --git a/arch/arm/mach-tegra/sys_info.c b/arch/arm/mach-tegra/sys_info.c
index 5dc998a52b..5ad586ac17 100644
--- a/arch/arm/mach-tegra/sys_info.c
+++ b/arch/arm/mach-tegra/sys_info.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <init.h>
#include <linux/ctype.h>
#if defined(CONFIG_TEGRA124) || defined(CONFIG_TEGRA30)
#include <asm/arch-tegra/pmc.h>
diff --git a/arch/arm/mach-tegra/tegra114/clock.c b/arch/arm/mach-tegra/tegra114/clock.c
index ad09cc52eb..167589d1bb 100644
--- a/arch/arm/mach-tegra/tegra114/clock.c
+++ b/arch/arm/mach-tegra/tegra114/clock.c
@@ -7,6 +7,8 @@
/* Tegra114 Clock control functions */
#include <common.h>
+#include <init.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
#include <asm/arch/sysctr.h>
@@ -15,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 09b52f559f..62c1053630 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>
@@ -12,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/tegra114/funcmux.c b/arch/arm/mach-tegra/tegra114/funcmux.c
index 8fe5e9e357..23a27c8688 100644
--- a/arch/arm/mach-tegra/tegra114/funcmux.c
+++ b/arch/arm/mach-tegra/tegra114/funcmux.c
@@ -6,6 +6,7 @@
/* Tegra114 high-level function multiplexing */
#include <common.h>
+#include <log.h>
#include <asm/arch/clock.h>
#include <asm/arch/funcmux.h>
#include <asm/arch/pinmux.h>
diff --git a/arch/arm/mach-tegra/tegra124/clock.c b/arch/arm/mach-tegra/tegra124/clock.c
index 70916ea3c1..79e67f5194 100644
--- a/arch/arm/mach-tegra/tegra124/clock.c
+++ b/arch/arm/mach-tegra/tegra124/clock.c
@@ -7,6 +7,8 @@
/* Tegra124 Clock control functions */
#include <common.h>
+#include <init.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
#include <asm/arch/sysctr.h>
@@ -15,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 abc050c27b..d5f2683b26 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>
@@ -14,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/funcmux.c b/arch/arm/mach-tegra/tegra124/funcmux.c
index a8fcac6038..e7ad85fde2 100644
--- a/arch/arm/mach-tegra/tegra124/funcmux.c
+++ b/arch/arm/mach-tegra/tegra124/funcmux.c
@@ -7,6 +7,7 @@
/* Tegra124 high-level function multiplexing */
#include <common.h>
+#include <log.h>
#include <asm/arch/clock.h>
#include <asm/arch/funcmux.h>
#include <asm/arch/pinmux.h>
diff --git a/arch/arm/mach-tegra/tegra124/xusb-padctl.c b/arch/arm/mach-tegra/tegra124/xusb-padctl.c
index 09ab8c78cf..38afc3cbe6 100644
--- a/arch/arm/mach-tegra/tegra124/xusb-padctl.c
+++ b/arch/arm/mach-tegra/tegra124/xusb-padctl.c
@@ -7,8 +7,10 @@
#include <common.h>
#include <errno.h>
+#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 8f1bb4f069..24e8a13b1f 100644
--- a/arch/arm/mach-tegra/tegra20/clock.c
+++ b/arch/arm/mach-tegra/tegra20/clock.c
@@ -9,6 +9,8 @@
#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>
@@ -16,6 +18,7 @@
#include <asm/arch-tegra/timer.h>
#include <div64.h>
#include <fdtdec.h>
+#include <linux/delay.h>
/*
* Clock types that we can use as a source. The Tegra20 has muxes for the
diff --git a/arch/arm/mach-tegra/tegra20/cpu.c b/arch/arm/mach-tegra/tegra20/cpu.c
index 2d14ac9d95..e5b60598f7 100644
--- a/arch/arm/mach-tegra/tegra20/cpu.c
+++ b/arch/arm/mach-tegra/tegra20/cpu.c
@@ -7,6 +7,7 @@
#include <asm/io.h>
#include <asm/arch/tegra.h>
#include <asm/arch-tegra/pmc.h>
+#include <linux/delay.h>
#include "../cpu.h"
static void enable_cpu_power_rail(void)
diff --git a/arch/arm/mach-tegra/tegra20/crypto.c b/arch/arm/mach-tegra/tegra20/crypto.c
index b91191eba3..1efaa5c3ec 100644
--- a/arch/arm/mach-tegra/tegra20/crypto.c
+++ b/arch/arm/mach-tegra/tegra20/crypto.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <log.h>
#include <linux/errno.h>
#include "crypto.h"
#include "uboot_aes.h"
diff --git a/arch/arm/mach-tegra/tegra20/emc.c b/arch/arm/mach-tegra/tegra20/emc.c
index dff9ac0a4d..d55b09b4ac 100644
--- a/arch/arm/mach-tegra/tegra20/emc.c
+++ b/arch/arm/mach-tegra/tegra20/emc.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <fdtdec.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/arch-tegra/ap.h>
#include <asm/arch-tegra/apb_misc.h>
diff --git a/arch/arm/mach-tegra/tegra20/funcmux.c b/arch/arm/mach-tegra/tegra20/funcmux.c
index 2ee0f6ea76..90fe0cba8e 100644
--- a/arch/arm/mach-tegra/tegra20/funcmux.c
+++ b/arch/arm/mach-tegra/tegra20/funcmux.c
@@ -5,6 +5,7 @@
/* Tegra20 high-level function multiplexing */
#include <common.h>
+#include <log.h>
#include <asm/arch/clock.h>
#include <asm/arch/funcmux.h>
#include <asm/arch/pinmux.h>
diff --git a/arch/arm/mach-tegra/tegra20/pmu.c b/arch/arm/mach-tegra/tegra20/pmu.c
index d63db8afa0..05d0668cdb 100644
--- a/arch/arm/mach-tegra/tegra20/pmu.c
+++ b/arch/arm/mach-tegra/tegra20/pmu.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <i2c.h>
+#include <log.h>
#include <tps6586x.h>
#include <asm/io.h>
#include <asm/arch/tegra.h>
diff --git a/arch/arm/mach-tegra/tegra210/clock.c b/arch/arm/mach-tegra/tegra210/clock.c
index 00c65c281f..ccc64eb77b 100644
--- a/arch/arm/mach-tegra/tegra210/clock.c
+++ b/arch/arm/mach-tegra/tegra210/clock.c
@@ -8,6 +8,9 @@
#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>
#include <asm/arch/sysctr.h>
@@ -16,6 +19,8 @@
#include <asm/arch-tegra/timer.h>
#include <div64.h>
#include <fdtdec.h>
+#include <linux/bitops.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/funcmux.c b/arch/arm/mach-tegra/tegra210/funcmux.c
index 7f00d7b604..30d994a17f 100644
--- a/arch/arm/mach-tegra/tegra210/funcmux.c
+++ b/arch/arm/mach-tegra/tegra210/funcmux.c
@@ -7,6 +7,7 @@
/* Tegra210 high-level function multiplexing */
#include <common.h>
+#include <log.h>
#include <asm/arch/clock.h>
#include <asm/arch/funcmux.h>
#include <asm/arch/pinmux.h>
diff --git a/arch/arm/mach-tegra/tegra210/xusb-padctl.c b/arch/arm/mach-tegra/tegra210/xusb-padctl.c
index 64dc297ae2..d160ce4c99 100644
--- a/arch/arm/mach-tegra/tegra210/xusb-padctl.c
+++ b/arch/arm/mach-tegra/tegra210/xusb-padctl.c
@@ -7,8 +7,10 @@
#include <common.h>
#include <errno.h>
+#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 dd1193be14..b0641c6a41 100644
--- a/arch/arm/mach-tegra/tegra30/clock.c
+++ b/arch/arm/mach-tegra/tegra30/clock.c
@@ -8,6 +8,8 @@
#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>
@@ -15,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 45a5c091ec..651edd27ee 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>
@@ -11,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-tegra/tegra30/funcmux.c b/arch/arm/mach-tegra/tegra30/funcmux.c
index b3de980ad3..c3ee787f33 100644
--- a/arch/arm/mach-tegra/tegra30/funcmux.c
+++ b/arch/arm/mach-tegra/tegra30/funcmux.c
@@ -6,6 +6,7 @@
/* Tegra30 high-level function multiplexing */
#include <common.h>
+#include <log.h>
#include <asm/arch/clock.h>
#include <asm/arch/funcmux.h>
#include <asm/arch/pinmux.h>
diff --git a/arch/arm/mach-tegra/xusb-padctl-common.c b/arch/arm/mach-tegra/xusb-padctl-common.c
index c3fb30e24d..e56e27c8b6 100644
--- a/arch/arm/mach-tegra/xusb-padctl-common.c
+++ b/arch/arm/mach-tegra/xusb-padctl-common.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <errno.h>
+#include <log.h>
#include "xusb-padctl-common.h"
diff --git a/arch/arm/mach-u8500/cache.c b/arch/arm/mach-u8500/cache.c
index 3d96d09f31..f9fd4fe7d3 100644
--- a/arch/arm/mach-u8500/cache.c
+++ b/arch/arm/mach-u8500/cache.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <cpu_func.h>
#include <asm/armv7.h>
+#include <asm/cache.h>
#include <asm/pl310.h>
#define PL310_WAY_MASK 0xff
diff --git a/arch/arm/mach-u8500/cpuinfo.c b/arch/arm/mach-u8500/cpuinfo.c
index 20f5ff3398..ab05b8a51b 100644
--- a/arch/arm/mach-u8500/cpuinfo.c
+++ b/arch/arm/mach-u8500/cpuinfo.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/io.h>
#define U8500_BOOTROM_BASE 0x90000000
diff --git a/arch/arm/mach-uniphier/arm32/psci.c b/arch/arm/mach-uniphier/arm32/psci.c
index 9a3793316a..e231e7b60b 100644
--- a/arch/arm/mach-uniphier/arm32/psci.c
+++ b/arch/arm/mach-uniphier/arm32/psci.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <asm/cache.h>
#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/io.h>
diff --git a/arch/arm/mach-uniphier/arm32/timer.c b/arch/arm/mach-uniphier/arm32/timer.c
index 899b539104..b3c907b508 100644
--- a/arch/arm/mach-uniphier/arm32/timer.c
+++ b/arch/arm/mach-uniphier/arm32/timer.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <init.h>
#include <linux/io.h>
#include "arm-mpcore.h"
diff --git a/arch/arm/mach-uniphier/board_init.c b/arch/arm/mach-uniphier/board_init.c
index 4f9cd6e722..6bf0811edb 100644
--- a/arch/arm/mach-uniphier/board_init.c
+++ b/arch/arm/mach-uniphier/board_init.c
@@ -5,6 +5,7 @@
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*/
+#include <log.h>
#include <linux/errno.h>
#include <linux/io.h>
#include <linux/printk.h>
diff --git a/arch/arm/mach-uniphier/boot-device/boot-device-pxs3.c b/arch/arm/mach-uniphier/boot-device/boot-device-pxs3.c
index 2edf66d5c1..4aee50f5d3 100644
--- a/arch/arm/mach-uniphier/boot-device/boot-device-pxs3.c
+++ b/arch/arm/mach-uniphier/boot-device/boot-device-pxs3.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <spl.h>
+#include <linux/bitops.h>
#include <linux/io.h>
#include <linux/kernel.h>
diff --git a/arch/arm/mach-uniphier/boot-device/boot-device.c b/arch/arm/mach-uniphier/boot-device/boot-device.c
index 83f8c6a428..2fb625535b 100644
--- a/arch/arm/mach-uniphier/boot-device/boot-device.c
+++ b/arch/arm/mach-uniphier/boot-device/boot-device.c
@@ -5,8 +5,11 @@
*/
#include <common.h>
+#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>
@@ -205,7 +208,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/clk/clk-ld11.c b/arch/arm/mach-uniphier/clk/clk-ld11.c
index 0917b33c25..94b9d904dc 100644
--- a/arch/arm/mach-uniphier/clk/clk-ld11.c
+++ b/arch/arm/mach-uniphier/clk/clk-ld11.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <spl.h>
#include <linux/bitops.h>
+#include <linux/delay.h>
#include <linux/io.h>
#include "../init.h"
diff --git a/arch/arm/mach-uniphier/clk/dpll-ld4.c b/arch/arm/mach-uniphier/clk/dpll-ld4.c
index 72fe8db8dd..fd77aa7e11 100644
--- a/arch/arm/mach-uniphier/clk/dpll-ld4.c
+++ b/arch/arm/mach-uniphier/clk/dpll-ld4.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/io.h>
diff --git a/arch/arm/mach-uniphier/clk/dpll-pro4.c b/arch/arm/mach-uniphier/clk/dpll-pro4.c
index 6259495484..c86881dabd 100644
--- a/arch/arm/mach-uniphier/clk/dpll-pro4.c
+++ b/arch/arm/mach-uniphier/clk/dpll-pro4.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/io.h>
diff --git a/arch/arm/mach-uniphier/cpu-info.c b/arch/arm/mach-uniphier/cpu-info.c
index 6a7b203a44..1ede50771e 100644
--- a/arch/arm/mach-uniphier/cpu-info.c
+++ b/arch/arm/mach-uniphier/cpu-info.c
@@ -5,6 +5,7 @@
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*/
+#include <init.h>
#include <stdio.h>
#include <linux/errno.h>
#include <linux/io.h>
diff --git a/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c b/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c
index 9a25bba599..a6c0735198 100644
--- a/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c
+++ b/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <command.h>
#include <stdio.h>
#include <linux/io.h>
#include <linux/printk.h>
@@ -291,7 +292,8 @@ static void reg_dump(const struct uniphier_ddrmphy_param *param)
}
}
-static int do_ddrm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_ddrm(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
const struct uniphier_ddrmphy_param *param;
char *cmd;
diff --git a/arch/arm/mach-uniphier/dram/cmd_ddrphy.c b/arch/arm/mach-uniphier/dram/cmd_ddrphy.c
index a616a2aafb..476c5b3582 100644
--- a/arch/arm/mach-uniphier/dram/cmd_ddrphy.c
+++ b/arch/arm/mach-uniphier/dram/cmd_ddrphy.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <command.h>
#include <stdio.h>
#include <linux/io.h>
#include <linux/printk.h>
@@ -261,7 +262,8 @@ static void reg_dump(const struct uniphier_ddrphy_param *param)
}
}
-static int do_ddr(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_ddr(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
const struct uniphier_ddrphy_param *param;
char *cmd;
diff --git a/arch/arm/mach-uniphier/dram/ddrphy-regs.h b/arch/arm/mach-uniphier/dram/ddrphy-regs.h
index 6a041c500b..8b342921bf 100644
--- a/arch/arm/mach-uniphier/dram/ddrphy-regs.h
+++ b/arch/arm/mach-uniphier/dram/ddrphy-regs.h
@@ -9,6 +9,7 @@
#ifndef ARCH_DDRPHY_REGS_H
#define ARCH_DDRPHY_REGS_H
+#include <linux/bitops.h>
#define PHY_REG_SHIFT 2
#define PHY_RIDR (0x000 << PHY_REG_SHIFT)
diff --git a/arch/arm/mach-uniphier/dram/ddrphy-training.c b/arch/arm/mach-uniphier/dram/ddrphy-training.c
index 1decdf1cbf..c26f56367e 100644
--- a/arch/arm/mach-uniphier/dram/ddrphy-training.c
+++ b/arch/arm/mach-uniphier/dram/ddrphy-training.c
@@ -4,6 +4,7 @@
* Copyright (C) 2015-2016 Socionext Inc.
*/
+#include <log.h>
#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/errno.h>
diff --git a/arch/arm/mach-uniphier/dram/umc-pxs2.c b/arch/arm/mach-uniphier/dram/umc-pxs2.c
index 5392ffa603..3f7e5f30ba 100644
--- a/arch/arm/mach-uniphier/dram/umc-pxs2.c
+++ b/arch/arm/mach-uniphier/dram/umc-pxs2.c
@@ -7,6 +7,9 @@
* Copyright (C) 2015 Socionext Inc.
*/
+#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/dram_init.c b/arch/arm/mach-uniphier/dram_init.c
index 5f9d90fe6d..1127373b20 100644
--- a/arch/arm/mach-uniphier/dram_init.c
+++ b/arch/arm/mach-uniphier/dram_init.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <init.h>
#include <linux/errno.h>
#include <linux/io.h>
#include <linux/kernel.h>
diff --git a/arch/arm/mach-uniphier/init.h b/arch/arm/mach-uniphier/init.h
index 3c77f48853..622303786c 100644
--- a/arch/arm/mach-uniphier/init.h
+++ b/arch/arm/mach-uniphier/init.h
@@ -7,6 +7,7 @@
#ifndef __MACH_INIT_H
#define __MACH_INIT_H
+#include <linux/bitops.h>
#include <linux/types.h>
#define UNIPHIER_MAX_NR_DRAM_CH 3
diff --git a/arch/arm/mach-uniphier/micro-support-card.c b/arch/arm/mach-uniphier/micro-support-card.c
index c71470a204..18435dc361 100644
--- a/arch/arm/mach-uniphier/micro-support-card.c
+++ b/arch/arm/mach-uniphier/micro-support-card.c
@@ -6,9 +6,12 @@
*/
#include <common.h>
-#include <dm/of.h>
#include <fdt_support.h>
+#include <log.h>
+#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-uniphier/mmc-first-dev.c b/arch/arm/mach-uniphier/mmc-first-dev.c
index e2f4f4eb5c..7f29b6bccd 100644
--- a/arch/arm/mach-uniphier/mmc-first-dev.c
+++ b/arch/arm/mach-uniphier/mmc-first-dev.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <command.h>
#include <env.h>
#include <mmc.h>
#include <linux/errno.h>
@@ -28,7 +29,8 @@ int mmc_get_env_dev(void)
return find_first_mmc_device(false);
}
-static int do_mmcsetn(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_mmcsetn(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int dev;
@@ -46,7 +48,8 @@ U_BOOT_CMD(
""
);
-static int do_sdsetn(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_sdsetn(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int dev;
diff --git a/arch/arm/mach-uniphier/nand-reset.c b/arch/arm/mach-uniphier/nand-reset.c
index 11cadaabd8..dbf54aa910 100644
--- a/arch/arm/mach-uniphier/nand-reset.c
+++ b/arch/arm/mach-uniphier/nand-reset.c
@@ -4,6 +4,7 @@
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*/
+#include <log.h>
#include <linux/errno.h>
#include <dm.h>
#include <dm/uclass-internal.h>
diff --git a/arch/arm/mach-versal/clk.c b/arch/arm/mach-versal/clk.c
index 9184714e47..b1e34796d0 100644
--- a/arch/arm/mach-versal/clk.c
+++ b/arch/arm/mach-versal/clk.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <init.h>
#include <time.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-versal/cpu.c b/arch/arm/mach-versal/cpu.c
index 1b760ba5de..61c0b663fc 100644
--- a/arch/arm/mach-versal/cpu.c
+++ b/arch/arm/mach-versal/cpu.c
@@ -5,7 +5,9 @@
*/
#include <common.h>
+#include <init.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-versal/include/mach/hardware.h b/arch/arm/mach-versal/include/mach/hardware.h
index e26beab2e9..9af5afd3f3 100644
--- a/arch/arm/mach-versal/include/mach/hardware.h
+++ b/arch/arm/mach-versal/include/mach/hardware.h
@@ -3,6 +3,10 @@
* Copyright 2016 - 2018 Xilinx, Inc.
*/
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
#define VERSAL_CRL_APB_BASEADDR 0xFF5E0000
#define CRL_APB_TIMESTAMP_REF_CTRL_CLKACT_BIT BIT(25)
diff --git a/arch/arm/mach-zynq/clk.c b/arch/arm/mach-zynq/clk.c
index b578f6538a..1ace117fc8 100644
--- a/arch/arm/mach-zynq/clk.c
+++ b/arch/arm/mach-zynq/clk.c
@@ -6,6 +6,7 @@
#include <clk.h>
#include <common.h>
#include <dm.h>
+#include <init.h>
#include <malloc.h>
#include <asm/arch/clk.h>
diff --git a/arch/arm/mach-zynq/cpu.c b/arch/arm/mach-zynq/cpu.c
index aca44dfe67..77b7cb1307 100644
--- a/arch/arm/mach-zynq/cpu.c
+++ b/arch/arm/mach-zynq/cpu.c
@@ -5,7 +5,9 @@
*/
#include <common.h>
#include <cpu_func.h>
+#include <init.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-zynq/spl.c b/arch/arm/mach-zynq/spl.c
index 02a7dc9854..239ce3436a 100644
--- a/arch/arm/mach-zynq/spl.c
+++ b/arch/arm/mach-zynq/spl.c
@@ -5,6 +5,9 @@
#include <common.h>
#include <debug_uart.h>
#include <hang.h>
+#include <image.h>
+#include <init.h>
+#include <log.h>
#include <spl.h>
#include <generated/dt.h>
diff --git a/arch/arm/mach-zynq/timer.c b/arch/arm/mach-zynq/timer.c
index d822e20d2b..cc0e24cbfe 100644
--- a/arch/arm/mach-zynq/timer.c
+++ b/arch/arm/mach-zynq/timer.c
@@ -31,6 +31,7 @@
#include <common.h>
#include <div64.h>
#include <dm.h>
+#include <init.h>
#include <time.h>
#include <malloc.h>
#include <asm/io.h>
diff --git a/arch/arm/mach-zynqmp-r5/cpu.c b/arch/arm/mach-zynqmp-r5/cpu.c
index aa5de863eb..b3402d7189 100644
--- a/arch/arm/mach-zynqmp-r5/cpu.c
+++ b/arch/arm/mach-zynqmp-r5/cpu.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
#include <asm/armv7_mpu.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-zynqmp/clk.c b/arch/arm/mach-zynqmp/clk.c
index db2b4a8be2..5067b339c2 100644
--- a/arch/arm/mach-zynqmp/clk.c
+++ b/arch/arm/mach-zynqmp/clk.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <init.h>
#include <time.h>
#include <asm/arch/clk.h>
#include <asm/arch/hardware.h>
diff --git a/arch/arm/mach-zynqmp/cpu.c b/arch/arm/mach-zynqmp/cpu.c
index 811684a9f8..3eb8e8f448 100644
--- a/arch/arm/mach-zynqmp/cpu.c
+++ b/arch/arm/mach-zynqmp/cpu.c
@@ -5,10 +5,12 @@
*/
#include <common.h>
+#include <init.h>
#include <time.h>
#include <asm/arch/hardware.h>
#include <asm/arch/sys_proto.h>
#include <asm/armv8/mmu.h>
+#include <asm/cache.h>
#include <asm/io.h>
#include <zynqmp_firmware.h>
#include <asm/cache.h>
diff --git a/arch/arm/mach-zynqmp/include/mach/hardware.h b/arch/arm/mach-zynqmp/include/mach/hardware.h
index a0acfa2ff1..c5ba42124b 100644
--- a/arch/arm/mach-zynqmp/include/mach/hardware.h
+++ b/arch/arm/mach-zynqmp/include/mach/hardware.h
@@ -7,6 +7,10 @@
#ifndef _ASM_ARCH_HARDWARE_H
#define _ASM_ARCH_HARDWARE_H
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
#define ZYNQMP_TCM_BASE_ADDR 0xFFE00000
#define ZYNQMP_TCM_SIZE 0x40000
diff --git a/arch/arm/mach-zynqmp/mp.c b/arch/arm/mach-zynqmp/mp.c
index fbb551151a..656678a155 100644
--- a/arch/arm/mach-zynqmp/mp.c
+++ b/arch/arm/mach-zynqmp/mp.c
@@ -6,9 +6,11 @@
#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>
+#include <linux/delay.h>
#define LOCK 0
#define SPLIT 1
@@ -221,7 +223,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/arm/mach-zynqmp/psu_spl_init.c b/arch/arm/mach-zynqmp/psu_spl_init.c
index b6abdfd608..5c5c7d136e 100644
--- a/arch/arm/mach-zynqmp/psu_spl_init.c
+++ b/arch/arm/mach-zynqmp/psu_spl_init.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <asm/io.h>
#include <asm/arch/psu_init_gpl.h>
+#include <linux/delay.h>
#define PSU_MASK_POLL_TIME 1100000
diff --git a/arch/arm/mach-zynqmp/spl.c b/arch/arm/mach-zynqmp/spl.c
index 68df0a79c4..9dd61e25f6 100644
--- a/arch/arm/mach-zynqmp/spl.c
+++ b/arch/arm/mach-zynqmp/spl.c
@@ -6,8 +6,11 @@
*/
#include <common.h>
+#include <image.h>
#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 34534d876b..5ea6158c80 100644
--- a/arch/m68k/cpu/mcf5227x/cpu.c
+++ b/arch/m68k/cpu/mcf5227x/cpu.c
@@ -9,16 +9,18 @@
*/
#include <common.h>
+#include <init.h>
#include <vsprintf.h>
#include <watchdog.h>
#include <command.h>
+#include <linux/delay.h>
#include <asm/immap.h>
#include <asm/io.h>
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/mcf5227x/cpu_init.c b/arch/m68k/cpu/mcf5227x/cpu_init.c
index 7cde4c6105..4ab13b4d8e 100644
--- a/arch/m68k/cpu/mcf5227x/cpu_init.c
+++ b/arch/m68k/cpu/mcf5227x/cpu_init.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
#include <watchdog.h>
#include <asm/immap.h>
diff --git a/arch/m68k/cpu/mcf523x/cpu.c b/arch/m68k/cpu/mcf523x/cpu.c
index 429781945b..d521a8a2e4 100644
--- a/arch/m68k/cpu/mcf523x/cpu.c
+++ b/arch/m68k/cpu/mcf523x/cpu.c
@@ -9,6 +9,8 @@
*/
#include <common.h>
+#include <init.h>
+#include <net.h>
#include <vsprintf.h>
#include <watchdog.h>
#include <command.h>
@@ -19,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/mcf523x/cpu_init.c b/arch/m68k/cpu/mcf523x/cpu_init.c
index 8c6e12d548..87effa71dc 100644
--- a/arch/m68k/cpu/mcf523x/cpu_init.c
+++ b/arch/m68k/cpu/mcf523x/cpu_init.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
#include <watchdog.h>
#include <asm/immap.h>
#include <asm/io.h>
diff --git a/arch/m68k/cpu/mcf52x2/cpu.c b/arch/m68k/cpu/mcf52x2/cpu.c
index b48a753f9b..d3d4e30ad5 100644
--- a/arch/m68k/cpu/mcf52x2/cpu.c
+++ b/arch/m68k/cpu/mcf52x2/cpu.c
@@ -14,18 +14,21 @@
*/
#include <common.h>
+#include <init.h>
+#include <net.h>
#include <vsprintf.h>
#include <watchdog.h>
#include <command.h>
#include <asm/immap.h>
#include <asm/io.h>
#include <netdev.h>
+#include <linux/delay.h>
#include "cpu.h"
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);
@@ -138,7 +141,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) {
@@ -173,7 +176,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);
@@ -262,7 +265,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);
@@ -352,7 +355,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;
@@ -371,7 +374,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);
@@ -403,7 +406,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/mcf52x2/cpu_init.c b/arch/m68k/cpu/mcf52x2/cpu_init.c
index f39fe19baf..9d4a10f028 100644
--- a/arch/m68k/cpu/mcf52x2/cpu_init.c
+++ b/arch/m68k/cpu/mcf52x2/cpu_init.c
@@ -19,6 +19,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
#include <watchdog.h>
#include <asm/immap.h>
#include <asm/io.h>
diff --git a/arch/m68k/cpu/mcf52x2/speed.c b/arch/m68k/cpu/mcf52x2/speed.c
index 02ef5d87aa..751c83a4fc 100644
--- a/arch/m68k/cpu/mcf52x2/speed.c
+++ b/arch/m68k/cpu/mcf52x2/speed.c
@@ -12,6 +12,7 @@
#include <asm/processor.h>
#include <asm/immap.h>
#include <asm/io.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/m68k/cpu/mcf530x/cpu.c b/arch/m68k/cpu/mcf530x/cpu.c
index a76deebc68..0659bf6558 100644
--- a/arch/m68k/cpu/mcf530x/cpu.c
+++ b/arch/m68k/cpu/mcf530x/cpu.c
@@ -5,12 +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/mcf530x/cpu_init.c b/arch/m68k/cpu/mcf530x/cpu_init.c
index 166720aef5..83529408eb 100644
--- a/arch/m68k/cpu/mcf530x/cpu_init.c
+++ b/arch/m68k/cpu/mcf530x/cpu_init.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
#include <watchdog.h>
#include <asm/immap.h>
#include <asm/io.h>
diff --git a/arch/m68k/cpu/mcf532x/cpu.c b/arch/m68k/cpu/mcf532x/cpu.c
index 6807992de5..72bfdf056b 100644
--- a/arch/m68k/cpu/mcf532x/cpu.c
+++ b/arch/m68k/cpu/mcf532x/cpu.c
@@ -9,17 +9,20 @@
*/
#include <common.h>
+#include <init.h>
+#include <net.h>
#include <vsprintf.h>
#include <watchdog.h>
#include <command.h>
#include <netdev.h>
+#include <linux/delay.h>
#include <asm/immap.h>
#include <asm/io.h>
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/mcf532x/cpu_init.c b/arch/m68k/cpu/mcf532x/cpu_init.c
index bd130c1b0c..1311f3967c 100644
--- a/arch/m68k/cpu/mcf532x/cpu_init.c
+++ b/arch/m68k/cpu/mcf532x/cpu_init.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
#include <watchdog.h>
#include <asm/immap.h>
#include <asm/io.h>
diff --git a/arch/m68k/cpu/mcf5445x/cpu.c b/arch/m68k/cpu/mcf5445x/cpu.c
index 2f79380c8b..886f29d1b6 100644
--- a/arch/m68k/cpu/mcf5445x/cpu.c
+++ b/arch/m68k/cpu/mcf5445x/cpu.c
@@ -9,17 +9,20 @@
*/
#include <common.h>
+#include <init.h>
+#include <net.h>
#include <vsprintf.h>
#include <watchdog.h>
#include <command.h>
#include <netdev.h>
+#include <linux/delay.h>
#include <asm/immap.h>
#include <asm/io.h>
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/mcf5445x/cpu_init.c b/arch/m68k/cpu/mcf5445x/cpu_init.c
index 6ee23f0db2..9deab51d07 100644
--- a/arch/m68k/cpu/mcf5445x/cpu_init.c
+++ b/arch/m68k/cpu/mcf5445x/cpu_init.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
#include <watchdog.h>
#include <asm/immap.h>
#include <asm/processor.h>
diff --git a/arch/m68k/cpu/mcf5445x/pci.c b/arch/m68k/cpu/mcf5445x/pci.c
index 09bd745569..af02c4934c 100644
--- a/arch/m68k/cpu/mcf5445x/pci.c
+++ b/arch/m68k/cpu/mcf5445x/pci.c
@@ -11,6 +11,7 @@
#include <pci.h>
#include <asm/io.h>
#include <asm/immap.h>
+#include <linux/delay.h>
#if defined(CONFIG_PCI)
/* System RAM mapped over PCI */
diff --git a/arch/m68k/cpu/mcf547x_8x/cpu.c b/arch/m68k/cpu/mcf547x_8x/cpu.c
index dc5ed1aa79..59cdfe70e4 100644
--- a/arch/m68k/cpu/mcf547x_8x/cpu.c
+++ b/arch/m68k/cpu/mcf547x_8x/cpu.c
@@ -9,6 +9,8 @@
*/
#include <common.h>
+#include <init.h>
+#include <net.h>
#include <vsprintf.h>
#include <watchdog.h>
#include <command.h>
@@ -19,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/cpu/mcf547x_8x/cpu_init.c b/arch/m68k/cpu/mcf547x_8x/cpu_init.c
index 8779384c0a..8e42b63141 100644
--- a/arch/m68k/cpu/mcf547x_8x/cpu_init.c
+++ b/arch/m68k/cpu/mcf547x_8x/cpu_init.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <MCD_dma.h>
#include <cpu_func.h>
+#include <init.h>
#include <asm/immap.h>
#include <asm/io.h>
diff --git a/arch/m68k/cpu/mcf547x_8x/pci.c b/arch/m68k/cpu/mcf547x_8x/pci.c
index ac42cca2ef..74ba68124f 100644
--- a/arch/m68k/cpu/mcf547x_8x/pci.c
+++ b/arch/m68k/cpu/mcf547x_8x/pci.c
@@ -11,6 +11,7 @@
#include <pci.h>
#include <asm/io.h>
#include <asm/immap.h>
+#include <linux/delay.h>
#if defined(CONFIG_PCI)
/* System RAM mapped over PCI */
diff --git a/arch/m68k/cpu/mcf547x_8x/slicetimer.c b/arch/m68k/cpu/mcf547x_8x/slicetimer.c
index 885659e342..33b4cff4ec 100644
--- a/arch/m68k/cpu/mcf547x_8x/slicetimer.c
+++ b/arch/m68k/cpu/mcf547x_8x/slicetimer.c
@@ -5,7 +5,9 @@
*/
#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/bootm.c b/arch/m68k/lib/bootm.c
index 19445b3fc7..aa17929b9e 100644
--- a/arch/m68k/lib/bootm.c
+++ b/arch/m68k/lib/bootm.c
@@ -5,9 +5,12 @@
*/
#include <common.h>
+#include <bootstage.h>
#include <command.h>
#include <env.h>
#include <image.h>
+#include <lmb.h>
+#include <log.h>
#include <u-boot/zlib.h>
#include <bzlib.h>
#include <watchdog.h>
@@ -47,7 +50,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/m68k/lib/interrupts.c b/arch/m68k/lib/interrupts.c
index ddc91993a1..1caef61d20 100644
--- a/arch/m68k/lib/interrupts.c
+++ b/arch/m68k/lib/interrupts.c
@@ -12,6 +12,7 @@
#include <watchdog.h>
#include <asm/processor.h>
#include <asm/immap.h>
+#include <asm/ptrace.h>
#define NR_IRQS (CONFIG_SYS_NUM_IRQS)
diff --git a/arch/m68k/lib/time.c b/arch/m68k/lib/time.c
index bde1f4c228..a3eb6db54b 100644
--- a/arch/m68k/lib/time.c
+++ b/arch/m68k/lib/time.c
@@ -7,8 +7,10 @@
*/
#include <common.h>
+#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/m68k/lib/traps.c b/arch/m68k/lib/traps.c
index 2ccd55add0..c49141f376 100644
--- a/arch/m68k/lib/traps.c
+++ b/arch/m68k/lib/traps.c
@@ -12,6 +12,7 @@
#include <watchdog.h>
#include <command.h>
#include <asm/processor.h>
+#include <asm/ptrace.h>
extern void _exc_handler(void);
diff --git a/arch/microblaze/cpu/cache.c b/arch/microblaze/cpu/cache.c
index 02f66f9087..aa832d6be6 100644
--- a/arch/microblaze/cpu/cache.c
+++ b/arch/microblaze/cpu/cache.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <cpu_func.h>
#include <asm/asm.h>
+#include <asm/cache.h>
int dcache_status(void)
{
diff --git a/arch/microblaze/cpu/interrupts.c b/arch/microblaze/cpu/interrupts.c
index 910c596884..829ae26ad2 100644
--- a/arch/microblaze/cpu/interrupts.c
+++ b/arch/microblaze/cpu/interrupts.c
@@ -11,6 +11,7 @@
#include <command.h>
#include <fdtdec.h>
#include <irq_func.h>
+#include <log.h>
#include <malloc.h>
#include <asm/microblaze_intc.h>
#include <asm/asm.h>
@@ -187,7 +188,7 @@ void interrupt_handler(void)
}
#if defined(CONFIG_CMD_IRQ)
-int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, const char *argv[])
+int do_irqinfo(struct cmd_tbl *cmdtp, int flag, int argc, const char *argv[])
{
int i;
struct irq_action *act = vecs;
diff --git a/arch/microblaze/cpu/spl.c b/arch/microblaze/cpu/spl.c
index 070c12cce9..86522f8447 100644
--- a/arch/microblaze/cpu/spl.c
+++ b/arch/microblaze/cpu/spl.c
@@ -6,7 +6,9 @@
*/
#include <common.h>
+#include <command.h>
#include <image.h>
+#include <log.h>
#include <spl.h>
#include <asm/io.h>
#include <asm/u-boot.h>
@@ -48,7 +50,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/cpu/timer.c b/arch/microblaze/cpu/timer.c
index 805eac7fa3..1b4617311c 100644
--- a/arch/microblaze/cpu/timer.c
+++ b/arch/microblaze/cpu/timer.c
@@ -7,9 +7,12 @@
#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>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c
index 2d6a41be2f..d2ea1453be 100644
--- a/arch/microblaze/lib/bootm.c
+++ b/arch/microblaze/lib/bootm.c
@@ -8,12 +8,16 @@
*/
#include <common.h>
+#include <bootstage.h>
#include <command.h>
#include <cpu_func.h>
#include <env.h>
#include <fdt_support.h>
#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>
@@ -105,7 +109,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 a403ff729b..7d5c9fd83a 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>
@@ -20,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/include/asm/cacheops.h b/arch/mips/include/asm/cacheops.h
index 98b67ccc8e..641e2ad58d 100644
--- a/arch/mips/include/asm/cacheops.h
+++ b/arch/mips/include/asm/cacheops.h
@@ -8,6 +8,8 @@
#ifndef __ASM_CACHEOPS_H
#define __ASM_CACHEOPS_H
+#include <asm/cache.h>
+
#ifndef __ASSEMBLY__
static inline void mips_cache(int op, const volatile void *addr)
diff --git a/arch/mips/include/asm/cm.h b/arch/mips/include/asm/cm.h
index 8f37471f81..3878171607 100644
--- a/arch/mips/include/asm/cm.h
+++ b/arch/mips/include/asm/cm.h
@@ -39,6 +39,7 @@
#ifndef __ASSEMBLY__
#include <asm/io.h>
+#include <linux/bitops.h>
static inline void *mips_cm_base(void)
{
diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h
index f80311e64e..7538e6b2e0 100644
--- a/arch/mips/include/asm/mipsregs.h
+++ b/arch/mips/include/asm/mipsregs.h
@@ -27,6 +27,7 @@
#ifdef __ASSEMBLY__
#define _ULCAST_
#else
+#include <linux/bitops.h>
#define _ULCAST_ (unsigned long)
#endif
diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c
index f1db6d23b8..82f986cb81 100644
--- a/arch/mips/lib/bootm.c
+++ b/arch/mips/lib/bootm.c
@@ -5,9 +5,12 @@
*/
#include <common.h>
+#include <bootstage.h>
#include <env.h>
#include <image.h>
#include <fdt_support.h>
+#include <lmb.h>
+#include <log.h>
#include <asm/addrspace.h>
#include <asm/io.h>
@@ -304,8 +307,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/lib/cache.c b/arch/mips/lib/cache.c
index 1a8c87d094..24f115ebc9 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>
@@ -13,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/arch/mips/lib/reloc.c b/arch/mips/lib/reloc.c
index 1e3cfadd2d..ffc8c7a1b7 100644
--- a/arch/mips/lib/reloc.c
+++ b/arch/mips/lib/reloc.c
@@ -31,6 +31,7 @@
#include <init.h>
#include <asm/relocs.h>
#include <asm/sections.h>
+#include <linux/bitops.h>
/**
* read_uint() - Read an unsigned integer from the buffer
diff --git a/arch/mips/lib/spl.c b/arch/mips/lib/spl.c
index 7ba3e53f6d..f96fda5b2d 100644
--- a/arch/mips/lib/spl.c
+++ b/arch/mips/lib/spl.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <log.h>
#include <spl.h>
void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
diff --git a/arch/mips/lib/stack.c b/arch/mips/lib/stack.c
index 99fd056905..8f523fd6fb 100644
--- a/arch/mips/lib/stack.c
+++ b/arch/mips/lib/stack.c
@@ -1,6 +1,8 @@
// SPDX-License-Identifier: GPL-2.0+
#include <common.h>
+#include <init.h>
+#include <log.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/mips/lib/traps.c b/arch/mips/lib/traps.c
index 8fff7541e3..b1ae02fcab 100644
--- a/arch/mips/lib/traps.c
+++ b/arch/mips/lib/traps.c
@@ -11,9 +11,11 @@
*/
#include <common.h>
+#include <asm/ptrace.h>
#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/ar933x/ddr.c b/arch/mips/mach-ath79/ar933x/ddr.c
index 2cf0b2cb1f..09166ecf8f 100644
--- a/arch/mips/mach-ath79/ar933x/ddr.c
+++ b/arch/mips/mach-ath79/ar933x/ddr.c
@@ -8,6 +8,7 @@
#include <asm/io.h>
#include <asm/addrspace.h>
#include <asm/types.h>
+#include <linux/bitops.h>
#include <mach/ar71xx_regs.h>
#include <mach/ath79.h>
diff --git a/arch/mips/mach-ath79/ar934x/clk.c b/arch/mips/mach-ath79/ar934x/clk.c
index 09bdc253ae..9fa2225ed2 100644
--- a/arch/mips/mach-ath79/ar934x/clk.c
+++ b/arch/mips/mach-ath79/ar934x/clk.c
@@ -5,10 +5,13 @@
#include <common.h>
#include <clock_legacy.h>
+#include <command.h>
#include <hang.h>
#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>
#include <wait_bit.h>
@@ -319,7 +322,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/mips/mach-ath79/ar934x/ddr.c b/arch/mips/mach-ath79/ar934x/ddr.c
index 289973ec95..218f60a96c 100644
--- a/arch/mips/mach-ath79/ar934x/ddr.c
+++ b/arch/mips/mach-ath79/ar934x/ddr.c
@@ -9,6 +9,8 @@
#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/cpu.c b/arch/mips/mach-ath79/cpu.c
index 9afc672602..31e87d6206 100644
--- a/arch/mips/mach-ath79/cpu.c
+++ b/arch/mips/mach-ath79/cpu.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/addrspace.h>
#include <asm/types.h>
diff --git a/arch/mips/mach-ath79/qca953x/ddr.c b/arch/mips/mach-ath79/qca953x/ddr.c
index 268da7336b..78f2370e09 100644
--- a/arch/mips/mach-ath79/qca953x/ddr.c
+++ b/arch/mips/mach-ath79/qca953x/ddr.c
@@ -8,6 +8,8 @@
#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/qca956x/clk.c b/arch/mips/mach-ath79/qca956x/clk.c
index d71c94e171..5adf6cd815 100644
--- a/arch/mips/mach-ath79/qca956x/clk.c
+++ b/arch/mips/mach-ath79/qca956x/clk.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <clock_legacy.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/addrspace.h>
#include <asm/types.h>
diff --git a/arch/mips/mach-ath79/qca956x/ddr.c b/arch/mips/mach-ath79/qca956x/ddr.c
index fb2230430c..e61a368141 100644
--- a/arch/mips/mach-ath79/qca956x/ddr.c
+++ b/arch/mips/mach-ath79/qca956x/ddr.c
@@ -9,6 +9,7 @@
#include <asm/io.h>
#include <asm/addrspace.h>
#include <asm/types.h>
+#include <linux/delay.h>
#include <mach/ar71xx_regs.h>
#include <mach/ath79.h>
diff --git a/arch/mips/mach-ath79/reset.c b/arch/mips/mach-ath79/reset.c
index 0ab3ab6383..6cd5e77fd1 100644
--- a/arch/mips/mach-ath79/reset.c
+++ b/arch/mips/mach-ath79/reset.c
@@ -5,6 +5,8 @@
*/
#include <common.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <asm/io.h>
#include <asm/addrspace.h>
diff --git a/arch/mips/mach-bmips/dram.c b/arch/mips/mach-bmips/dram.c
index 87ced7c5d5..a772a655d9 100644
--- a/arch/mips/mach-bmips/dram.c
+++ b/arch/mips/mach-bmips/dram.c
@@ -5,6 +5,8 @@
*/
#include <common.h>
+#include <init.h>
+#include <log.h>
#include <ram.h>
#include <dm.h>
diff --git a/arch/mips/mach-jz47xx/include/mach/jz4780_dram.h b/arch/mips/mach-jz47xx/include/mach/jz4780_dram.h
index 92d431bd04..61cc148988 100644
--- a/arch/mips/mach-jz47xx/include/mach/jz4780_dram.h
+++ b/arch/mips/mach-jz47xx/include/mach/jz4780_dram.h
@@ -12,6 +12,7 @@
/*
* DDR
*/
+#include <linux/bitops.h>
#define DDRC_ST 0x0
#define DDRC_CFG 0x4
#define DDRC_CTRL 0x8
diff --git a/arch/mips/mach-jz47xx/jz4780/gpio.c b/arch/mips/mach-jz47xx/jz4780/gpio.c
index cee2328ab1..d4884e7fa9 100644
--- a/arch/mips/mach-jz47xx/jz4780/gpio.c
+++ b/arch/mips/mach-jz47xx/jz4780/gpio.c
@@ -3,6 +3,7 @@
#include <config.h>
#include <common.h>
#include <asm/io.h>
+#include <linux/bitops.h>
#include <mach/jz4780.h>
int jz47xx_gpio_get_value(unsigned int gpio)
diff --git a/arch/mips/mach-jz47xx/jz4780/jz4780.c b/arch/mips/mach-jz47xx/jz4780/jz4780.c
index 015840de25..26fcfc842c 100644
--- a/arch/mips/mach-jz47xx/jz4780/jz4780.c
+++ b/arch/mips/mach-jz47xx/jz4780/jz4780.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <cpu_func.h>
#include <hang.h>
+#include <image.h>
#include <init.h>
#include <asm/io.h>
#include <asm/sections.h>
diff --git a/arch/mips/mach-jz47xx/jz4780/pll.c b/arch/mips/mach-jz47xx/jz4780/pll.c
index 9a46198f36..323c634fb3 100644
--- a/arch/mips/mach-jz47xx/jz4780/pll.c
+++ b/arch/mips/mach-jz47xx/jz4780/pll.c
@@ -9,6 +9,8 @@
#include <config.h>
#include <common.h>
#include <asm/io.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <mach/jz4780.h>
#define CPM_CPCCR 0x00
diff --git a/arch/mips/mach-jz47xx/jz4780/reset.c b/arch/mips/mach-jz47xx/jz4780/reset.c
index 73af34721f..bf6addccb5 100644
--- a/arch/mips/mach-jz47xx/jz4780/reset.c
+++ b/arch/mips/mach-jz47xx/jz4780/reset.c
@@ -9,6 +9,7 @@
#include <config.h>
#include <common.h>
#include <asm/io.h>
+#include <linux/bitops.h>
#include <mach/jz4780.h>
/* WDT */
diff --git a/arch/mips/mach-jz47xx/jz4780/sdram.c b/arch/mips/mach-jz47xx/jz4780/sdram.c
index 65afefe53e..690f3c5601 100644
--- a/arch/mips/mach-jz47xx/jz4780/sdram.c
+++ b/arch/mips/mach-jz47xx/jz4780/sdram.c
@@ -11,7 +11,10 @@
#include <common.h>
#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 b32a2f5643..82bb9e8c3b 100644
--- a/arch/mips/mach-jz47xx/jz4780/timer.c
+++ b/arch/mips/mach-jz47xx/jz4780/timer.c
@@ -9,10 +9,13 @@
#include <config.h>
#include <common.h>
#include <div64.h>
+#include <init.h>
#include <irq_func.h>
#include <time.h>
#include <asm/io.h>
#include <asm/mipsregs.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <mach/jz4780.h>
#define TCU_TSR 0x1C /* Timer Stop Register */
diff --git a/arch/mips/mach-mscc/cpu.c b/arch/mips/mach-mscc/cpu.c
index 3ee589891b..b4ffd44ea4 100644
--- a/arch/mips/mach-mscc/cpu.c
+++ b/arch/mips/mach-mscc/cpu.c
@@ -4,6 +4,8 @@
*/
#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/dram.c b/arch/mips/mach-mscc/dram.c
index 72c70c9e84..b12bac63c2 100644
--- a/arch/mips/mach-mscc/dram.c
+++ b/arch/mips/mach-mscc/dram.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/types.h>
diff --git a/arch/mips/mach-mscc/gpio.c b/arch/mips/mach-mscc/gpio.c
index 5e3a53372d..d6b4c5d768 100644
--- a/arch/mips/mach-mscc/gpio.c
+++ b/arch/mips/mach-mscc/gpio.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <asm/io.h>
+#include <linux/bitops.h>
void mscc_gpio_set_alternate(int gpio, int mode)
{
diff --git a/arch/mips/mach-mscc/include/mach/ddr.h b/arch/mips/mach-mscc/include/mach/ddr.h
index bf75e52ec3..d52eabbd2b 100644
--- a/arch/mips/mach-mscc/include/mach/ddr.h
+++ b/arch/mips/mach-mscc/include/mach/ddr.h
@@ -9,6 +9,7 @@
#include <asm/cacheops.h>
#include <asm/io.h>
#include <asm/reboot.h>
+#include <linux/bitops.h>
#include <mach/common.h>
#define MIPS_VCOREIII_MEMORY_DDR3
diff --git a/arch/mips/mach-mscc/include/mach/jr2/jr2_devcpu_gcb.h b/arch/mips/mach-mscc/include/mach/jr2/jr2_devcpu_gcb.h
index 4a1228d29f..8d1d21b9b1 100644
--- a/arch/mips/mach-mscc/include/mach/jr2/jr2_devcpu_gcb.h
+++ b/arch/mips/mach-mscc/include/mach/jr2/jr2_devcpu_gcb.h
@@ -6,6 +6,8 @@
#ifndef _MSCC_JR2_DEVCPU_GCB_H_
#define _MSCC_JR2_DEVCPU_GCB_H_
+#include <linux/bitops.h>
+
#define PERF_GPR 0x4
#define PERF_SOFT_RST 0x8
diff --git a/arch/mips/mach-mscc/include/mach/jr2/jr2_devcpu_gcb_miim_regs.h b/arch/mips/mach-mscc/include/mach/jr2/jr2_devcpu_gcb_miim_regs.h
index 3c84edc18a..e11ad8788f 100644
--- a/arch/mips/mach-mscc/include/mach/jr2/jr2_devcpu_gcb_miim_regs.h
+++ b/arch/mips/mach-mscc/include/mach/jr2/jr2_devcpu_gcb_miim_regs.h
@@ -6,6 +6,8 @@
#ifndef _MSCC_JR2_DEVCPU_GCB_MIIM_REGS_H_
#define _MSCC_JR2_DEVCPU_GCB_MIIM_REGS_H_
+#include <linux/bitops.h>
+
#define MIIM_MII_STATUS(gi) (0xc8 + (gi * 36))
#define MIIM_MII_CMD(gi) (0xd0 + (gi * 36))
#define MIIM_MII_DATA(gi) (0xd4 + (gi * 36))
diff --git a/arch/mips/mach-mscc/include/mach/jr2/jr2_icpu_cfg.h b/arch/mips/mach-mscc/include/mach/jr2/jr2_icpu_cfg.h
index 6e0bbe2746..151bb3e6d4 100644
--- a/arch/mips/mach-mscc/include/mach/jr2/jr2_icpu_cfg.h
+++ b/arch/mips/mach-mscc/include/mach/jr2/jr2_icpu_cfg.h
@@ -6,6 +6,8 @@
#ifndef _MSCC_JR2_ICPU_CFG_H_
#define _MSCC_JR2_ICPU_CFG_H_
+#include <linux/bitops.h>
+
#define ICPU_GPR(x) (0x4 * (x))
#define ICPU_GPR_RSZ 0x4
diff --git a/arch/mips/mach-mscc/include/mach/luton/luton_devcpu_gcb.h b/arch/mips/mach-mscc/include/mach/luton/luton_devcpu_gcb.h
index a74a68593d..750a8013d1 100644
--- a/arch/mips/mach-mscc/include/mach/luton/luton_devcpu_gcb.h
+++ b/arch/mips/mach-mscc/include/mach/luton/luton_devcpu_gcb.h
@@ -6,6 +6,7 @@
#ifndef _MSCC_OCELOT_DEVCPU_GCB_H_
#define _MSCC_OCELOT_DEVCPU_GCB_H_
+#include <linux/bitops.h>
#define PERF_SOFT_RST 0x90
#define PERF_SOFT_RST_SOFT_SWC_RST BIT(1)
diff --git a/arch/mips/mach-mscc/include/mach/luton/luton_devcpu_gcb_miim_regs.h b/arch/mips/mach-mscc/include/mach/luton/luton_devcpu_gcb_miim_regs.h
index 2303734894..07c4f9aeb6 100644
--- a/arch/mips/mach-mscc/include/mach/luton/luton_devcpu_gcb_miim_regs.h
+++ b/arch/mips/mach-mscc/include/mach/luton/luton_devcpu_gcb_miim_regs.h
@@ -8,6 +8,7 @@
#ifndef _MSCC_LUTON_MIIM_REGS_H_
#define _MSCC_LUTON_MIIM_REGS_H_
+#include <linux/bitops.h>
#define MIIM_MII_STATUS(gi) (0xa0 + (gi * 36))
#define MIIM_MII_CMD(gi) (0xa8 + (gi * 36))
#define MIIM_MII_DATA(gi) (0xac + (gi * 36))
diff --git a/arch/mips/mach-mscc/include/mach/luton/luton_icpu_cfg.h b/arch/mips/mach-mscc/include/mach/luton/luton_icpu_cfg.h
index 9233f037bb..ded7c5fa77 100644
--- a/arch/mips/mach-mscc/include/mach/luton/luton_icpu_cfg.h
+++ b/arch/mips/mach-mscc/include/mach/luton/luton_icpu_cfg.h
@@ -6,6 +6,7 @@
#ifndef _MSCC_OCELOT_ICPU_CFG_H_
#define _MSCC_OCELOT_ICPU_CFG_H_
+#include <linux/bitops.h>
#define ICPU_GPR(x) (0x4 * (x))
#define ICPU_GPR_RSZ 0x4
diff --git a/arch/mips/mach-mscc/include/mach/ocelot/ocelot_devcpu_gcb.h b/arch/mips/mach-mscc/include/mach/ocelot/ocelot_devcpu_gcb.h
index b2a4203644..5715ec164c 100644
--- a/arch/mips/mach-mscc/include/mach/ocelot/ocelot_devcpu_gcb.h
+++ b/arch/mips/mach-mscc/include/mach/ocelot/ocelot_devcpu_gcb.h
@@ -6,6 +6,7 @@
#ifndef _MSCC_OCELOT_DEVCPU_GCB_H_
#define _MSCC_OCELOT_DEVCPU_GCB_H_
+#include <linux/bitops.h>
#define PERF_SOFT_RST 0x8
#define PERF_SOFT_RST_SOFT_NON_CFG_RST BIT(2)
diff --git a/arch/mips/mach-mscc/include/mach/ocelot/ocelot_devcpu_gcb_miim_regs.h b/arch/mips/mach-mscc/include/mach/ocelot/ocelot_devcpu_gcb_miim_regs.h
index 4ad92214a3..50cf073eab 100644
--- a/arch/mips/mach-mscc/include/mach/ocelot/ocelot_devcpu_gcb_miim_regs.h
+++ b/arch/mips/mach-mscc/include/mach/ocelot/ocelot_devcpu_gcb_miim_regs.h
@@ -6,6 +6,7 @@
#ifndef _MSCC_OCELOT_DEVCPU_GCB_MIIM_REGS_H_
#define _MSCC_OCELOT_DEVCPU_GCB_MIIM_REGS_H_
+#include <linux/bitops.h>
#define MIIM_MII_STATUS(gi) (0x9c + (gi * 36))
#define MIIM_MII_CMD(gi) (0xa4 + (gi * 36))
#define MIIM_MII_DATA(gi) (0xa8 + (gi * 36))
diff --git a/arch/mips/mach-mscc/include/mach/ocelot/ocelot_icpu_cfg.h b/arch/mips/mach-mscc/include/mach/ocelot/ocelot_icpu_cfg.h
index 04cf70bec3..fb10bf2c26 100644
--- a/arch/mips/mach-mscc/include/mach/ocelot/ocelot_icpu_cfg.h
+++ b/arch/mips/mach-mscc/include/mach/ocelot/ocelot_icpu_cfg.h
@@ -6,6 +6,7 @@
#ifndef _MSCC_OCELOT_ICPU_CFG_H_
#define _MSCC_OCELOT_ICPU_CFG_H_
+#include <linux/bitops.h>
#define ICPU_GPR(x) (0x4 * (x))
#define ICPU_GPR_RSZ 0x4
diff --git a/arch/mips/mach-mscc/include/mach/serval/serval_devcpu_gcb.h b/arch/mips/mach-mscc/include/mach/serval/serval_devcpu_gcb.h
index 9b80fdb574..43d40be716 100644
--- a/arch/mips/mach-mscc/include/mach/serval/serval_devcpu_gcb.h
+++ b/arch/mips/mach-mscc/include/mach/serval/serval_devcpu_gcb.h
@@ -6,6 +6,7 @@
#ifndef _MSCC_SERVAL_DEVCPU_GCB_H_
#define _MSCC_SERVAL_DEVCPU_GCB_H_
+#include <linux/bitops.h>
#define CHIP_ID 0x0
#define PERF_GPR 0x4
diff --git a/arch/mips/mach-mscc/include/mach/serval/serval_devcpu_gcb_miim_regs.h b/arch/mips/mach-mscc/include/mach/serval/serval_devcpu_gcb_miim_regs.h
index a3abbc4015..e8cb1dcf9a 100644
--- a/arch/mips/mach-mscc/include/mach/serval/serval_devcpu_gcb_miim_regs.h
+++ b/arch/mips/mach-mscc/include/mach/serval/serval_devcpu_gcb_miim_regs.h
@@ -6,6 +6,7 @@
#ifndef _MSCC_SERVAL_DEVCPU_GCB_MIIM_REGS_H_
#define _MSCC_SERVAL_DEVCPU_GCB_MIIM_REGS_H_
+#include <linux/bitops.h>
#define MIIM_MII_STATUS(gi) (0x5c + (gi * 36))
#define MIIM_MII_CMD(gi) (0x64 + (gi * 36))
#define MIIM_MII_DATA(gi) (0x68 + (gi * 36))
diff --git a/arch/mips/mach-mscc/include/mach/serval/serval_icpu_cfg.h b/arch/mips/mach-mscc/include/mach/serval/serval_icpu_cfg.h
index b8c9d5ca49..4d4151b3d5 100644
--- a/arch/mips/mach-mscc/include/mach/serval/serval_icpu_cfg.h
+++ b/arch/mips/mach-mscc/include/mach/serval/serval_icpu_cfg.h
@@ -6,6 +6,7 @@
#ifndef _MSCC_SERVAL_ICPU_CFG_H_
#define _MSCC_SERVAL_ICPU_CFG_H_
+#include <linux/bitops.h>
#define ICPU_GPR(x) (0x4 * (x))
#define ICPU_GPR_RSZ 0x8
diff --git a/arch/mips/mach-mscc/include/mach/servalt/servalt_devcpu_gcb.h b/arch/mips/mach-mscc/include/mach/servalt/servalt_devcpu_gcb.h
index 493eaad1df..7d6c64f316 100644
--- a/arch/mips/mach-mscc/include/mach/servalt/servalt_devcpu_gcb.h
+++ b/arch/mips/mach-mscc/include/mach/servalt/servalt_devcpu_gcb.h
@@ -6,6 +6,7 @@
#ifndef _MSCC_SERVALT_DEVCPU_GCB_H_
#define _MSCC_SERVALT_DEVCPU_GCB_H_
+#include <linux/bitops.h>
#define PERF_GPR 0x4
#define PERF_SOFT_RST 0x8
diff --git a/arch/mips/mach-mscc/include/mach/servalt/servalt_devcpu_gcb_miim_regs.h b/arch/mips/mach-mscc/include/mach/servalt/servalt_devcpu_gcb_miim_regs.h
index 8c67190ecb..72d7c4d08d 100644
--- a/arch/mips/mach-mscc/include/mach/servalt/servalt_devcpu_gcb_miim_regs.h
+++ b/arch/mips/mach-mscc/include/mach/servalt/servalt_devcpu_gcb_miim_regs.h
@@ -6,6 +6,7 @@
#ifndef _MSCC_SERVALT_DEVCPU_GCB_MIIM_REGS_H_
#define _MSCC_SERVALT_DEVCPU_GCB_MIIM_REGS_H_
+#include <linux/bitops.h>
#define MIIM_MII_STATUS(gi) (0xc4 + (gi * 36))
#define MIIM_MII_CMD(gi) (0xcc + (gi * 36))
#define MIIM_MII_DATA(gi) (0xd0 + (gi * 36))
diff --git a/arch/mips/mach-mscc/include/mach/servalt/servalt_icpu_cfg.h b/arch/mips/mach-mscc/include/mach/servalt/servalt_icpu_cfg.h
index 491ead169f..13967f66b0 100644
--- a/arch/mips/mach-mscc/include/mach/servalt/servalt_icpu_cfg.h
+++ b/arch/mips/mach-mscc/include/mach/servalt/servalt_icpu_cfg.h
@@ -6,6 +6,7 @@
#ifndef _MSCC_SERVALT_ICPU_CFG_H_
#define _MSCC_SERVALT_ICPU_CFG_H_
+#include <linux/bitops.h>
#define ICPU_GPR(x) (0x4 * (x))
#define ICPU_GPR_RSZ 0x8
diff --git a/arch/mips/mach-mscc/include/mach/tlb.h b/arch/mips/mach-mscc/include/mach/tlb.h
index fdb554f551..ebd8ad0dc1 100644
--- a/arch/mips/mach-mscc/include/mach/tlb.h
+++ b/arch/mips/mach-mscc/include/mach/tlb.h
@@ -7,6 +7,7 @@
#define __ASM_MACH_TLB_H
#include <asm/mipsregs.h>
+#include <linux/bitops.h>
#include <mach/common.h>
#include <linux/sizes.h>
diff --git a/arch/mips/mach-mscc/phy.c b/arch/mips/mach-mscc/phy.c
index add6280e38..83d3e5bdd2 100644
--- a/arch/mips/mach-mscc/phy.c
+++ b/arch/mips/mach-mscc/phy.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/io.h>
int mscc_phy_rd_wr(u8 read,
diff --git a/arch/mips/mach-mtmips/cpu.c b/arch/mips/mach-mtmips/cpu.c
index 459a9673eb..2ddf8cb096 100644
--- a/arch/mips/mach-mtmips/cpu.c
+++ b/arch/mips/mach-mtmips/cpu.c
@@ -4,7 +4,9 @@
*/
#include <common.h>
+#include <init.h>
#include <malloc.h>
+#include <linux/bitops.h>
#include <linux/io.h>
#include <linux/sizes.h>
diff --git a/arch/mips/mach-mtmips/ddr_init.c b/arch/mips/mach-mtmips/ddr_init.c
index cd355cc840..6c6d0933f2 100644
--- a/arch/mips/mach-mtmips/ddr_init.c
+++ b/arch/mips/mach-mtmips/ddr_init.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <linux/bitops.h>
+#include <linux/delay.h>
#include <linux/io.h>
#include <linux/sizes.h>
#include <mach/ddr.h>
diff --git a/arch/mips/mach-mtmips/mt7628/ddr.c b/arch/mips/mach-mtmips/mt7628/ddr.c
index 06c0ca6854..3df85cd144 100644
--- a/arch/mips/mach-mtmips/mt7628/ddr.c
+++ b/arch/mips/mach-mtmips/mt7628/ddr.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <asm/addrspace.h>
#include <linux/bitops.h>
+#include <linux/delay.h>
#include <linux/sizes.h>
#include <linux/io.h>
#include <mach/ddr.h>
diff --git a/arch/mips/mach-mtmips/spl.c b/arch/mips/mach-mtmips/spl.c
index 2a24af70c3..38d9e9160d 100644
--- a/arch/mips/mach-mtmips/spl.c
+++ b/arch/mips/mach-mtmips/spl.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <fdt.h>
+#include <init.h>
#include <spl.h>
#include <asm/sections.h>
#include <linux/sizes.h>
diff --git a/arch/mips/mach-pic32/cpu.c b/arch/mips/mach-pic32/cpu.c
index 8075d93d41..1d8c397144 100644
--- a/arch/mips/mach-pic32/cpu.c
+++ b/arch/mips/mach-pic32/cpu.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#include <init.h>
#include <malloc.h>
#include <mach/pic32.h>
#include <mach/ddr.h>
diff --git a/arch/nds32/cpu/n1213/ae3xx/cpu.c b/arch/nds32/cpu/n1213/ae3xx/cpu.c
index 0660fffa45..c3efa31f59 100644
--- a/arch/nds32/cpu/n1213/ae3xx/cpu.c
+++ b/arch/nds32/cpu/n1213/ae3xx/cpu.c
@@ -39,7 +39,7 @@ int cleanup_before_linux(void)
return 0;
}
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
disable_interrupts();
panic("AE3XX wdt not support yet.\n");
diff --git a/arch/nds32/cpu/n1213/ag101/cpu.c b/arch/nds32/cpu/n1213/ag101/cpu.c
index 3ae87a21bb..9d99c83bf3 100644
--- a/arch/nds32/cpu/n1213/ag101/cpu.c
+++ b/arch/nds32/cpu/n1213/ag101/cpu.c
@@ -39,7 +39,7 @@ int cleanup_before_linux(void)
return 0;
}
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
disable_interrupts();
diff --git a/arch/nds32/cpu/n1213/ag101/timer.c b/arch/nds32/cpu/n1213/ag101/timer.c
index f2e362102e..394fc10ec3 100644
--- a/arch/nds32/cpu/n1213/ag101/timer.c
+++ b/arch/nds32/cpu/n1213/ag101/timer.c
@@ -9,10 +9,13 @@
*/
#ifndef CONFIG_TIMER
#include <common.h>
+#include <init.h>
#include <irq_func.h>
+#include <log.h>
#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/nds32/include/asm/u-boot-nds32.h b/arch/nds32/include/asm/u-boot-nds32.h
index 7d39320c15..f086f34729 100644
--- a/arch/nds32/include/asm/u-boot-nds32.h
+++ b/arch/nds32/include/asm/u-boot-nds32.h
@@ -12,6 +12,8 @@
#ifndef _U_BOOT_NDS32_H_
#define _U_BOOT_NDS32_H_ 1
+#include <linux/types.h>
+
/* for the following variables, see start.S */
extern ulong IRQ_STACK_START; /* top of IRQ stack */
extern ulong FIQ_STACK_START; /* top of FIQ stack */
diff --git a/arch/nds32/lib/boot.c b/arch/nds32/lib/boot.c
index c50e8e5168..da2fd36a16 100644
--- a/arch/nds32/lib/boot.c
+++ b/arch/nds32/lib/boot.c
@@ -9,7 +9,7 @@
#include <command.h>
unsigned long do_go_exec(ulong (*entry)(int, char * const []),
- int argc, char * const argv[])
+ int argc, char *const argv[])
{
cleanup_before_linux();
diff --git a/arch/nds32/lib/bootm.c b/arch/nds32/lib/bootm.c
index 1003bc87b9..ab539f4036 100644
--- a/arch/nds32/lib/bootm.c
+++ b/arch/nds32/lib/bootm.c
@@ -6,10 +6,12 @@
*/
#include <common.h>
+#include <bootstage.h>
#include <command.h>
#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/nds32/lib/cache.c b/arch/nds32/lib/cache.c
index e11d300b6d..21917e5da5 100644
--- a/arch/nds32/lib/cache.c
+++ b/arch/nds32/lib/cache.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <cpu_func.h>
#if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF))
+#include <asm/cache.h>
static inline unsigned long CACHE_SET(unsigned char cache)
{
if (cache == ICACHE)
diff --git a/arch/nios2/cpu/cpu.c b/arch/nios2/cpu/cpu.c
index 37ffa8f4a4..7f5e731a0f 100644
--- a/arch/nios2/cpu/cpu.c
+++ b/arch/nios2/cpu/cpu.c
@@ -5,12 +5,15 @@
*/
#include <common.h>
+#include <command.h>
#include <cpu.h>
#include <cpu_func.h>
#include <dm.h>
#include <errno.h>
+#include <init.h>
#include <irq_func.h>
#include <asm/cache.h>
+#include <asm/system.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -30,7 +33,7 @@ int checkboard(void)
}
#endif
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
disable_interrupts();
/* indirect call to go beyond 256MB limitation of toolchain */
diff --git a/arch/nios2/cpu/interrupts.c b/arch/nios2/cpu/interrupts.c
index e9d1ff911b..90cabb6757 100644
--- a/arch/nios2/cpu/interrupts.c
+++ b/arch/nios2/cpu/interrupts.c
@@ -118,7 +118,7 @@ int interrupt_init(void)
/*************************************************************************/
#if defined(CONFIG_CMD_IRQ)
-int do_irqinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_irqinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
int i;
struct irq_action *act = vecs;
diff --git a/arch/nios2/lib/bootm.c b/arch/nios2/lib/bootm.c
index e1891617c7..2c8f9731c7 100644
--- a/arch/nios2/lib/bootm.c
+++ b/arch/nios2/lib/bootm.c
@@ -6,11 +6,15 @@
#include <common.h>
#include <cpu_func.h>
+#include <env.h>
+#include <image.h>
#include <irq_func.h>
+#include <log.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 f4e25f1f59..cefbcf6e81 100644
--- a/arch/powerpc/cpu/mpc83xx/cpu.c
+++ b/arch/powerpc/cpu/mpc83xx/cpu.c
@@ -12,12 +12,14 @@
#include <common.h>
#include <cpu_func.h>
#include <irq_func.h>
+#include <net.h>
#include <time.h>
#include <vsprintf.h>
#include <watchdog.h>
#include <command.h>
#include <mpc83xx.h>
#include <asm/processor.h>
+#include <linux/delay.h>
#include <linux/libfdt.h>
#include <tsec.h>
#include <netdev.h>
@@ -122,8 +124,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/cpu_init.c b/arch/powerpc/cpu/mpc83xx/cpu_init.c
index af8facad53..438b14b162 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>
@@ -11,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/ecc.c b/arch/powerpc/cpu/mpc83xx/ecc.c
index a6eb7cb97c..1343dd3d3a 100644
--- a/arch/powerpc/cpu/mpc83xx/ecc.c
+++ b/arch/powerpc/cpu/mpc83xx/ecc.c
@@ -96,7 +96,7 @@ void ecc_print_status(void)
ddr->capture_attributes & ECC_CAPT_ATTR_VLD);
}
-int do_ecc(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+int do_ecc(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
#ifdef CONFIG_SYS_FSL_DDR2
diff --git a/arch/powerpc/cpu/mpc83xx/interrupts.c b/arch/powerpc/cpu/mpc83xx/interrupts.c
index e83895deab..d04f31df50 100644
--- a/arch/powerpc/cpu/mpc83xx/interrupts.c
+++ b/arch/powerpc/cpu/mpc83xx/interrupts.c
@@ -11,6 +11,7 @@
#include <irq_func.h>
#include <mpc83xx.h>
#include <asm/processor.h>
+#include <asm/ptrace.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -71,8 +72,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/law.c b/arch/powerpc/cpu/mpc83xx/law.c
index c49b4f784b..5e02f4094b 100644
--- a/arch/powerpc/cpu/mpc83xx/law.c
+++ b/arch/powerpc/cpu/mpc83xx/law.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/fsl_law.h>
#include <asm/mmu.h>
#include <linux/log2.h>
diff --git a/arch/powerpc/cpu/mpc83xx/pci.c b/arch/powerpc/cpu/mpc83xx/pci.c
index 665ac378c8..f017985ae9 100644
--- a/arch/powerpc/cpu/mpc83xx/pci.c
+++ b/arch/powerpc/cpu/mpc83xx/pci.c
@@ -7,7 +7,10 @@
*/
#include <common.h>
+#include <init.h>
#include <pci.h>
+#include <asm/bitops.h>
+#include <linux/delay.h>
#if defined(CONFIG_OF_LIBFDT)
#include <linux/libfdt.h>
diff --git a/arch/powerpc/cpu/mpc83xx/pcie.c b/arch/powerpc/cpu/mpc83xx/pcie.c
index b500ddd3f3..785d4805a4 100644
--- a/arch/powerpc/cpu/mpc83xx/pcie.c
+++ b/arch/powerpc/cpu/mpc83xx/pcie.c
@@ -11,6 +11,7 @@
#include <pci.h>
#include <mpc83xx.h>
#include <asm/io.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/powerpc/cpu/mpc83xx/serdes.c b/arch/powerpc/cpu/mpc83xx/serdes.c
index 8242f95265..bb963ee5e2 100644
--- a/arch/powerpc/cpu/mpc83xx/serdes.c
+++ b/arch/powerpc/cpu/mpc83xx/serdes.c
@@ -14,6 +14,7 @@
#include <common.h>
#include <asm/io.h>
#include <asm/fsl_mpc83xx_serdes.h>
+#include <linux/delay.h>
/* SerDes registers */
#define FSL_SRDSCR0_OFFS 0x0
diff --git a/arch/powerpc/cpu/mpc83xx/spd_sdram.c b/arch/powerpc/cpu/mpc83xx/spd_sdram.c
index 22506a5be5..aeff007fb0 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>
@@ -22,6 +23,8 @@
#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/mpc83xx/speed.c b/arch/powerpc/cpu/mpc83xx/speed.c
index e2fc0b1e8a..5c14aa1f32 100644
--- a/arch/powerpc/cpu/mpc83xx/speed.c
+++ b/arch/powerpc/cpu/mpc83xx/speed.c
@@ -523,7 +523,8 @@ int get_serial_clock(void)
return get_bus_freq(0);
}
-static int do_clocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_clocks(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
char buf[32];
diff --git a/arch/powerpc/cpu/mpc83xx/spl_minimal.c b/arch/powerpc/cpu/mpc83xx/spl_minimal.c
index 34c8187259..2c61f2b81d 100644
--- a/arch/powerpc/cpu/mpc83xx/spl_minimal.c
+++ b/arch/powerpc/cpu/mpc83xx/spl_minimal.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <asm-offsets.h>
#include <clock_legacy.h>
#include <mpc83xx.h>
#include <time.h>
diff --git a/arch/powerpc/cpu/mpc83xx/traps.c b/arch/powerpc/cpu/mpc83xx/traps.c
index 1c6c38b15f..c3cc119d65 100644
--- a/arch/powerpc/cpu/mpc83xx/traps.c
+++ b/arch/powerpc/cpu/mpc83xx/traps.c
@@ -12,6 +12,7 @@
*/
#include <common.h>
+#include <asm/ptrace.h>
#include <command.h>
#include <kgdb.h>
#include <asm/processor.h>
diff --git a/arch/powerpc/cpu/mpc85xx/bsc9132_serdes.c b/arch/powerpc/cpu/mpc85xx/bsc9132_serdes.c
index 8604f4a8e8..b972cf3b5e 100644
--- a/arch/powerpc/cpu/mpc85xx/bsc9132_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/bsc9132_serdes.c
@@ -6,6 +6,7 @@
#include <config.h>
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/immap_85xx.h>
#include <asm/fsl_serdes.h>
diff --git a/arch/powerpc/cpu/mpc85xx/c29x_serdes.c b/arch/powerpc/cpu/mpc85xx/c29x_serdes.c
index 97eeb489cb..34b58bb7f9 100644
--- a/arch/powerpc/cpu/mpc85xx/c29x_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/c29x_serdes.c
@@ -5,6 +5,7 @@
#include <config.h>
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/immap_85xx.h>
#include <asm/fsl_serdes.h>
diff --git a/arch/powerpc/cpu/mpc85xx/cmd_errata.c b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
index e455d8baf5..ff73596ba9 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>
@@ -128,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/commproc.c b/arch/powerpc/cpu/mpc85xx/commproc.c
index 37e706238b..95215a0b82 100644
--- a/arch/powerpc/cpu/mpc85xx/commproc.c
+++ b/arch/powerpc/cpu/mpc85xx/commproc.c
@@ -22,6 +22,7 @@
* currently no deallocator for this memory.
*/
#include <common.h>
+#include <asm-offsets.h>
#include <asm/cpm_85xx.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c
index 9f9eed165b..9bd573dbd6 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu.c
@@ -11,7 +11,9 @@
#include <config.h>
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
#include <irq_func.h>
+#include <log.h>
#include <time.h>
#include <vsprintf.h>
#include <watchdog.h>
@@ -27,6 +29,7 @@
#include <asm/processor.h>
#include <fsl_ddr_sdram.h>
#include <asm/ppc.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -294,7 +297,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/cpu_init.c b/arch/powerpc/cpu/mpc85xx/cpu_init.c
index a9f39dc583..4bca2671d5 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>
@@ -32,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/cpu_init_early.c b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
index 40cb24dd54..c519e8bd4b 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <asm-offsets.h>
#include <asm/processor.h>
#include <asm/mmu.h>
#include <asm/fsl_law.h>
diff --git a/arch/powerpc/cpu/mpc85xx/fdt.c b/arch/powerpc/cpu/mpc85xx/fdt.c
index 65f909fd1e..55f191f202 100644
--- a/arch/powerpc/cpu/mpc85xx/fdt.c
+++ b/arch/powerpc/cpu/mpc85xx/fdt.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <clock_legacy.h>
#include <env.h>
+#include <log.h>
#include <time.h>
#include <linux/libfdt.h>
#include <fdt_support.h>
diff --git a/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c b/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c
index d7a633ddf2..ee5015ec8f 100644
--- a/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c
@@ -4,11 +4,13 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/fsl_serdes.h>
#include <asm/immap_85xx.h>
#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 ebdcd29c13..f5126e2c8a 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>
@@ -14,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/interrupts.c b/arch/powerpc/cpu/mpc85xx/interrupts.c
index 6f539d2677..4ad762683f 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>
@@ -20,6 +21,7 @@
#ifdef CONFIG_POST
#include <post.h>
#endif
+#include <asm/ptrace.h>
void interrupt_init_cpu(unsigned *decrementer_count)
{
@@ -102,7 +104,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/liodn.c b/arch/powerpc/cpu/mpc85xx/liodn.c
index e7703b8a49..e552378e78 100644
--- a/arch/powerpc/cpu/mpc85xx/liodn.c
+++ b/arch/powerpc/cpu/mpc85xx/liodn.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <log.h>
#include <linux/libfdt.h>
#include <fdt_support.h>
diff --git a/arch/powerpc/cpu/mpc85xx/mp.c b/arch/powerpc/cpu/mpc85xx/mp.c
index 9757bffe02..8822cf29fe 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>
@@ -14,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;
@@ -140,7 +142,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/mpc85xx/mpc8536_serdes.c b/arch/powerpc/cpu/mpc85xx/mpc8536_serdes.c
index c4c4154ac3..111692f15d 100644
--- a/arch/powerpc/cpu/mpc85xx/mpc8536_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/mpc8536_serdes.c
@@ -6,6 +6,7 @@
#include <config.h>
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/immap_85xx.h>
#include <asm/fsl_serdes.h>
diff --git a/arch/powerpc/cpu/mpc85xx/mpc8544_serdes.c b/arch/powerpc/cpu/mpc85xx/mpc8544_serdes.c
index bdcf46ed11..f3b5450ad5 100644
--- a/arch/powerpc/cpu/mpc85xx/mpc8544_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/mpc8544_serdes.c
@@ -5,6 +5,7 @@
#include <config.h>
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/immap_85xx.h>
#include <asm/fsl_serdes.h>
diff --git a/arch/powerpc/cpu/mpc85xx/mpc8548_serdes.c b/arch/powerpc/cpu/mpc85xx/mpc8548_serdes.c
index 99bab9e8ef..2a5c3e3200 100644
--- a/arch/powerpc/cpu/mpc85xx/mpc8548_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/mpc8548_serdes.c
@@ -5,6 +5,7 @@
#include <config.h>
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/immap_85xx.h>
#include <asm/fsl_serdes.h>
diff --git a/arch/powerpc/cpu/mpc85xx/mpc8568_serdes.c b/arch/powerpc/cpu/mpc85xx/mpc8568_serdes.c
index 414c05868f..81b66c3fa6 100644
--- a/arch/powerpc/cpu/mpc85xx/mpc8568_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/mpc8568_serdes.c
@@ -5,6 +5,7 @@
#include <config.h>
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/immap_85xx.h>
#include <asm/fsl_serdes.h>
diff --git a/arch/powerpc/cpu/mpc85xx/mpc8569_serdes.c b/arch/powerpc/cpu/mpc85xx/mpc8569_serdes.c
index 637522861e..eb54b8252b 100644
--- a/arch/powerpc/cpu/mpc85xx/mpc8569_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/mpc8569_serdes.c
@@ -5,6 +5,7 @@
#include <config.h>
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/immap_85xx.h>
#include <asm/fsl_serdes.h>
diff --git a/arch/powerpc/cpu/mpc85xx/mpc8572_serdes.c b/arch/powerpc/cpu/mpc85xx/mpc8572_serdes.c
index 0e0c63a14f..1b4e614918 100644
--- a/arch/powerpc/cpu/mpc85xx/mpc8572_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/mpc8572_serdes.c
@@ -5,6 +5,7 @@
#include <config.h>
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/immap_85xx.h>
#include <asm/fsl_serdes.h>
diff --git a/arch/powerpc/cpu/mpc85xx/p1010_serdes.c b/arch/powerpc/cpu/mpc85xx/p1010_serdes.c
index cc907c5894..8cba4222c4 100644
--- a/arch/powerpc/cpu/mpc85xx/p1010_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/p1010_serdes.c
@@ -6,6 +6,7 @@
#include <config.h>
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/immap_85xx.h>
#include <asm/fsl_serdes.h>
diff --git a/arch/powerpc/cpu/mpc85xx/p1021_serdes.c b/arch/powerpc/cpu/mpc85xx/p1021_serdes.c
index 509051047b..6b8e447e94 100644
--- a/arch/powerpc/cpu/mpc85xx/p1021_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/p1021_serdes.c
@@ -5,9 +5,11 @@
#include <config.h>
#include <common.h>
+#include <log.h>
#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/p1022_serdes.c b/arch/powerpc/cpu/mpc85xx/p1022_serdes.c
index 4c51a72630..719cb4f3d4 100644
--- a/arch/powerpc/cpu/mpc85xx/p1022_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/p1022_serdes.c
@@ -6,6 +6,7 @@
#include <config.h>
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/immap_85xx.h>
#include <asm/fsl_serdes.h>
diff --git a/arch/powerpc/cpu/mpc85xx/p1023_serdes.c b/arch/powerpc/cpu/mpc85xx/p1023_serdes.c
index 482172d4e0..bf5cac6199 100644
--- a/arch/powerpc/cpu/mpc85xx/p1023_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/p1023_serdes.c
@@ -6,6 +6,7 @@
#include <config.h>
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/immap_85xx.h>
#include <asm/fsl_serdes.h>
diff --git a/arch/powerpc/cpu/mpc85xx/p2020_serdes.c b/arch/powerpc/cpu/mpc85xx/p2020_serdes.c
index 1e7ed43957..f36b1b64ed 100644
--- a/arch/powerpc/cpu/mpc85xx/p2020_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/p2020_serdes.c
@@ -5,6 +5,7 @@
#include <config.h>
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/immap_85xx.h>
#include <asm/fsl_serdes.h>
diff --git a/arch/powerpc/cpu/mpc85xx/pci.c b/arch/powerpc/cpu/mpc85xx/pci.c
index 1d0213a513..9a6fc13b73 100644
--- a/arch/powerpc/cpu/mpc85xx/pci.c
+++ b/arch/powerpc/cpu/mpc85xx/pci.c
@@ -9,6 +9,7 @@
* PCI Configuration space access support for MPC85xx PCI Bridge
*/
#include <common.h>
+#include <asm/bitops.h>
#include <asm/cpm_85xx.h>
#include <pci.h>
diff --git a/arch/powerpc/cpu/mpc85xx/spl_minimal.c b/arch/powerpc/cpu/mpc85xx/spl_minimal.c
index 972049b8e9..21b35db08d 100644
--- a/arch/powerpc/cpu/mpc85xx/spl_minimal.c
+++ b/arch/powerpc/cpu/mpc85xx/spl_minimal.c
@@ -8,6 +8,7 @@
#include <asm/global_data.h>
#include <fsl_ifc.h>
#include <asm/io.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/powerpc/cpu/mpc85xx/tlb.c b/arch/powerpc/cpu/mpc85xx/tlb.c
index 808d953c52..4465ae7565 100644
--- a/arch/powerpc/cpu/mpc85xx/tlb.c
+++ b/arch/powerpc/cpu/mpc85xx/tlb.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <asm/bitops.h>
#include <asm/processor.h>
#include <asm/mmu.h>
#ifdef CONFIG_ADDR_MAP
diff --git a/arch/powerpc/cpu/mpc85xx/traps.c b/arch/powerpc/cpu/mpc85xx/traps.c
index bc2fc93e11..f37a45e269 100644
--- a/arch/powerpc/cpu/mpc85xx/traps.c
+++ b/arch/powerpc/cpu/mpc85xx/traps.c
@@ -20,6 +20,7 @@
*/
#include <common.h>
+#include <asm/ptrace.h>
#include <command.h>
#include <init.h>
#include <irq_func.h>
diff --git a/arch/powerpc/cpu/mpc86xx/cpu.c b/arch/powerpc/cpu/mpc86xx/cpu.c
index 97b93f0213..9f5bce3992 100644
--- a/arch/powerpc/cpu/mpc86xx/cpu.c
+++ b/arch/powerpc/cpu/mpc86xx/cpu.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <log.h>
#include <time.h>
#include <vsprintf.h>
#include <watchdog.h>
@@ -107,7 +108,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/cpu_init.c b/arch/powerpc/cpu/mpc86xx/cpu_init.c
index 89add62dc1..a17091d2ff 100644
--- a/arch/powerpc/cpu/mpc86xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc86xx/cpu_init.c
@@ -9,8 +9,10 @@
* cpu_init.c - low level cpu init
*/
+#include <asm-offsets.h>
#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/mpc86xx/interrupts.c b/arch/powerpc/cpu/mpc86xx/interrupts.c
index eb8e73e41c..5a916600ed 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>
@@ -23,6 +24,7 @@
#ifdef CONFIG_POST
#include <post.h>
#endif
+#include <asm/ptrace.h>
void interrupt_init_cpu(unsigned *decrementer_count)
{
@@ -100,7 +102,7 @@ void irq_free_handler(int vec)
/*
* irqinfo - print information about PCI devices,not implemented.
*/
-int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_irqinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
return 0;
}
diff --git a/arch/powerpc/cpu/mpc86xx/mp.c b/arch/powerpc/cpu/mpc86xx/mp.c
index 07c4c079df..08d11ad4f2 100644
--- a/arch/powerpc/cpu/mpc86xx/mp.c
+++ b/arch/powerpc/cpu/mpc86xx/mp.c
@@ -67,7 +67,7 @@ int is_core_disabled(int nr) {
return 0;
}
-int cpu_release(u32 nr, int argc, char * const argv[])
+int cpu_release(u32 nr, int argc, char *const argv[])
{
/* dummy function so common/cmd_mp.c will build
* should be implemented in the future */
diff --git a/arch/powerpc/cpu/mpc86xx/mpc8610_serdes.c b/arch/powerpc/cpu/mpc86xx/mpc8610_serdes.c
index 0e0a90eb7b..ecc88ba437 100644
--- a/arch/powerpc/cpu/mpc86xx/mpc8610_serdes.c
+++ b/arch/powerpc/cpu/mpc86xx/mpc8610_serdes.c
@@ -5,6 +5,7 @@
#include <config.h>
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/immap_86xx.h>
#include <asm/fsl_serdes.h>
diff --git a/arch/powerpc/cpu/mpc86xx/mpc8641_serdes.c b/arch/powerpc/cpu/mpc86xx/mpc8641_serdes.c
index d272d4ba29..4df446618c 100644
--- a/arch/powerpc/cpu/mpc86xx/mpc8641_serdes.c
+++ b/arch/powerpc/cpu/mpc86xx/mpc8641_serdes.c
@@ -5,6 +5,7 @@
#include <config.h>
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/immap_86xx.h>
#include <asm/fsl_serdes.h>
diff --git a/arch/powerpc/cpu/mpc86xx/traps.c b/arch/powerpc/cpu/mpc86xx/traps.c
index 79bab91367..c0161e3379 100644
--- a/arch/powerpc/cpu/mpc86xx/traps.c
+++ b/arch/powerpc/cpu/mpc86xx/traps.c
@@ -14,6 +14,7 @@
*/
#include <common.h>
+#include <asm/ptrace.h>
#include <command.h>
#include <init.h>
#include <kgdb.h>
diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c
index 4a1698d3bc..1b7c7fa01b 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>
@@ -194,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/cpu_init.c b/arch/powerpc/cpu/mpc8xx/cpu_init.c
index 8bd6d0fbcf..c8d06b0508 100644
--- a/arch/powerpc/cpu/mpc8xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc8xx/cpu_init.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <init.h>
#include <watchdog.h>
#include <mpc8xx.h>
diff --git a/arch/powerpc/cpu/mpc8xx/immap.c b/arch/powerpc/cpu/mpc8xx/immap.c
index 442c01ac6f..e5b62e9f4a 100644
--- a/arch/powerpc/cpu/mpc8xx/immap.c
+++ b/arch/powerpc/cpu/mpc8xx/immap.c
@@ -18,7 +18,8 @@
DECLARE_GLOBAL_DATA_PTR;
-static int do_siuinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_siuinfo(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
sysconf8xx_t __iomem *sc = &immap->im_siu_conf;
@@ -35,8 +36,8 @@ static int do_siuinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return 0;
}
-static int do_memcinfo(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_memcinfo(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
memctl8xx_t __iomem *memctl = &immap->im_memctl;
@@ -58,7 +59,8 @@ static int do_memcinfo(cmd_tbl_t *cmdtp, int flag, int argc,
return 0;
}
-static int do_carinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_carinfo(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
car8xx_t __iomem *car = &immap->im_clkrst;
@@ -119,7 +121,8 @@ static void binary(char *label, uint value, int nbits)
#define PC_NBITS 12
#define PD_NBITS 13
-static int do_iopinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_iopinfo(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
iop8xx_t __iomem *iop = &immap->im_ioport;
@@ -172,7 +175,8 @@ static int do_iopinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
* this needs a clean up for smaller tighter code
* use *uint and set the address based on cmd + port
*/
-static int do_iopset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_iopset(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
uint rcode = 0;
iopin_t iopin;
@@ -328,7 +332,8 @@ static void prbrg(int n, uint val)
putc('\n');
}
-static int do_brginfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_brginfo(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
cpm8xx_t __iomem *cp = &immap->im_cpm;
diff --git a/arch/powerpc/cpu/mpc8xx/interrupts.c b/arch/powerpc/cpu/mpc8xx/interrupts.c
index 3efe8956ec..eef1951f2f 100644
--- a/arch/powerpc/cpu/mpc8xx/interrupts.c
+++ b/arch/powerpc/cpu/mpc8xx/interrupts.c
@@ -12,6 +12,7 @@
#include <asm/cpm_8xx.h>
#include <asm/processor.h>
#include <asm/io.h>
+#include <asm/ptrace.h>
/************************************************************************/
diff --git a/arch/powerpc/cpu/mpc8xx/traps.c b/arch/powerpc/cpu/mpc8xx/traps.c
index 899bcd8618..56794b08a1 100644
--- a/arch/powerpc/cpu/mpc8xx/traps.c
+++ b/arch/powerpc/cpu/mpc8xx/traps.c
@@ -16,6 +16,7 @@
*/
#include <common.h>
+#include <asm/ptrace.h>
#include <command.h>
#include <asm/processor.h>
diff --git a/arch/powerpc/cpu/mpc8xxx/cpu.c b/arch/powerpc/cpu/mpc8xxx/cpu.c
index ed482a9c09..da0a80e6fc 100644
--- a/arch/powerpc/cpu/mpc8xxx/cpu.c
+++ b/arch/powerpc/cpu/mpc8xxx/cpu.c
@@ -11,6 +11,8 @@
#include <common.h>
#include <command.h>
#include <cpu_func.h>
+#include <init.h>
+#include <net.h>
#include <tsec.h>
#include <fm_eth.h>
#include <netdev.h>
diff --git a/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c b/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c
index afcb75ba17..29489b46e6 100644
--- a/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c
+++ b/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <hang.h>
+#include <init.h>
#include <asm/fsl_lbc.h>
#ifdef CONFIG_MPC83xx
diff --git a/arch/powerpc/cpu/mpc8xxx/fsl_pamu.c b/arch/powerpc/cpu/mpc8xxx/fsl_pamu.c
index d81af70f44..2c378b7615 100644
--- a/arch/powerpc/cpu/mpc8xxx/fsl_pamu.c
+++ b/arch/powerpc/cpu/mpc8xxx/fsl_pamu.c
@@ -6,6 +6,8 @@
*/
#include <common.h>
+#include <log.h>
+#include <linux/bitops.h>
#include <linux/log2.h>
#include <malloc.h>
#include <asm/fsl_pamu.h>
diff --git a/arch/powerpc/cpu/mpc8xxx/law.c b/arch/powerpc/cpu/mpc8xxx/law.c
index ca9e6aa8eb..e388386ad4 100644
--- a/arch/powerpc/cpu/mpc8xxx/law.c
+++ b/arch/powerpc/cpu/mpc8xxx/law.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <asm/bitops.h>
#include <linux/compiler.h>
#include <asm/fsl_law.h>
#include <asm/io.h>
diff --git a/arch/powerpc/cpu/mpc8xxx/pamu_table.c b/arch/powerpc/cpu/mpc8xxx/pamu_table.c
index 7b4690abc9..7dd71d2e0c 100644
--- a/arch/powerpc/cpu/mpc8xxx/pamu_table.c
+++ b/arch/powerpc/cpu/mpc8xxx/pamu_table.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/fsl_pamu.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/powerpc/cpu/mpc8xxx/srio.c b/arch/powerpc/cpu/mpc8xxx/srio.c
index a1f9403559..c73cf9319c 100644
--- a/arch/powerpc/cpu/mpc8xxx/srio.c
+++ b/arch/powerpc/cpu/mpc8xxx/srio.c
@@ -5,10 +5,12 @@
#include <common.h>
#include <config.h>
+#include <log.h>
#include <time.h>
#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/include/asm/fsl_i2c.h b/arch/powerpc/include/asm/fsl_i2c.h
index fbf32b9a07..73105fa8e4 100644
--- a/arch/powerpc/include/asm/fsl_i2c.h
+++ b/arch/powerpc/include/asm/fsl_i2c.h
@@ -14,6 +14,7 @@
#define _ASM_FSL_I2C_H_
#include <asm/types.h>
+#include <linux/compiler.h>
typedef struct fsl_i2c_base {
diff --git a/arch/powerpc/include/asm/mmu.h b/arch/powerpc/include/asm/mmu.h
index 82e5f9ffc7..353dc4e874 100644
--- a/arch/powerpc/include/asm/mmu.h
+++ b/arch/powerpc/include/asm/mmu.h
@@ -7,6 +7,7 @@
#ifndef __ASSEMBLY__
/* Hardware Page Table Entry */
+#include <linux/bitops.h>
typedef struct _PTE {
#ifdef CONFIG_PPC64BRIDGE
unsigned long long vsid:52;
diff --git a/arch/powerpc/include/asm/u-boot.h b/arch/powerpc/include/asm/u-boot.h
index 1841565d0a..19b3c0db5f 100644
--- a/arch/powerpc/include/asm/u-boot.h
+++ b/arch/powerpc/include/asm/u-boot.h
@@ -13,6 +13,8 @@
#ifndef __U_BOOT_H__
#define __U_BOOT_H__
+#include <config.h>
+
/* For image.h:image_check_target_arch() */
#define IH_ARCH_DEFAULT IH_ARCH_PPC
diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c
index 390e8c0673..cd92db0a92 100644
--- a/arch/powerpc/lib/bootm.c
+++ b/arch/powerpc/lib/bootm.c
@@ -8,9 +8,12 @@
#include <common.h>
+#include <bootstage.h>
#include <cpu_func.h>
#include <env.h>
#include <init.h>
+#include <lmb.h>
+#include <log.h>
#include <watchdog.h>
#include <command.h>
#include <image.h>
@@ -51,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);
@@ -79,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);
@@ -103,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);
@@ -147,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;
@@ -230,8 +233,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/extable.c b/arch/powerpc/lib/extable.c
index 683fd53b6a..7e9d4f22f3 100644
--- a/arch/powerpc/lib/extable.c
+++ b/arch/powerpc/lib/extable.c
@@ -6,6 +6,7 @@
* Wolfgang Denk, DENX Software Engineering, wd@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/interrupts.c b/arch/powerpc/lib/interrupts.c
index 64ee0cc210..73f270002c 100644
--- a/arch/powerpc/lib/interrupts.c
+++ b/arch/powerpc/lib/interrupts.c
@@ -14,6 +14,7 @@
#ifdef CONFIG_LED_STATUS
#include <status_led.h>
#endif
+#include <asm/ptrace.h>
#ifndef CONFIG_MPC83XX_TIMER
#ifndef CONFIG_SYS_WATCHDOG_FREQ
diff --git a/arch/powerpc/lib/kgdb.c b/arch/powerpc/lib/kgdb.c
index f580c023e5..8727d18884 100644
--- a/arch/powerpc/lib/kgdb.c
+++ b/arch/powerpc/lib/kgdb.c
@@ -1,6 +1,7 @@
#include <common.h>
#include <command.h>
#include <kgdb.h>
+#include <asm/ptrace.h>
#include <asm/signal.h>
#include <asm/processor.h>
@@ -252,7 +253,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/powerpc/lib/spl.c b/arch/powerpc/lib/spl.c
index d90a6e27b9..d4a6057527 100644
--- a/arch/powerpc/lib/spl.c
+++ b/arch/powerpc/lib/spl.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
#include <config.h>
+#include <log.h>
#include <spl.h>
#include <image.h>
#include <linux/compiler.h>
diff --git a/arch/powerpc/lib/stack.c b/arch/powerpc/lib/stack.c
index 9a956c221d..5840fe6349 100644
--- a/arch/powerpc/lib/stack.c
+++ b/arch/powerpc/lib/stack.c
@@ -11,6 +11,7 @@
* Marius Groeger <mgroeger@sysgo.de>
*/
#include <common.h>
+#include <init.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/powerpc/lib/time.c b/arch/powerpc/lib/time.c
index e1494fa129..8d6babfb83 100644
--- a/arch/powerpc/lib/time.c
+++ b/arch/powerpc/lib/time.c
@@ -5,8 +5,10 @@
*/
#include <common.h>
+#include <init.h>
#include <time.h>
#include <asm/io.h>
+#include <linux/delay.h>
/* ------------------------------------------------------------------------- */
diff --git a/arch/riscv/cpu/ax25/cache.c b/arch/riscv/cpu/ax25/cache.c
index 9df629d23c..35f23c748d 100644
--- a/arch/riscv/cpu/ax25/cache.c
+++ b/arch/riscv/cpu/ax25/cache.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <cpu_func.h>
#include <dm.h>
+#include <asm/cache.h>
#include <dm/uclass-internal.h>
#include <cache.h>
#include <asm/csr.h>
diff --git a/arch/riscv/cpu/cpu.c b/arch/riscv/cpu/cpu.c
index e457f6acbf..5804aa8e73 100644
--- a/arch/riscv/cpu/cpu.c
+++ b/arch/riscv/cpu/cpu.c
@@ -6,9 +6,11 @@
#include <common.h>
#include <cpu.h>
#include <dm.h>
+#include <init.h>
#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/cpu/generic/cpu.c b/arch/riscv/cpu/generic/cpu.c
index 13a69ef0cc..d78e1a3453 100644
--- a/arch/riscv/cpu/generic/cpu.c
+++ b/arch/riscv/cpu/generic/cpu.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <irq_func.h>
+#include <asm/cache.h>
/*
* cleanup_before_linux() is called just before we call linux
diff --git a/arch/riscv/include/asm/encoding.h b/arch/riscv/include/asm/encoding.h
index a0695da936..edafad36b3 100644
--- a/arch/riscv/include/asm/encoding.h
+++ b/arch/riscv/include/asm/encoding.h
@@ -8,6 +8,9 @@
#define RISCV_CSR_ENCODING_H
#include <asm/csr.h>
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
#if CONFIG_IS_ENABLED(RISCV_SMODE)
#define MODE_PREFIX(__suffix) s##__suffix
diff --git a/arch/riscv/lib/boot.c b/arch/riscv/lib/boot.c
index 42b15a13a2..778d011f7c 100644
--- a/arch/riscv/lib/boot.c
+++ b/arch/riscv/lib/boot.c
@@ -8,7 +8,7 @@
#include <command.h>
unsigned long do_go_exec(ulong (*entry)(int, char * const []),
- int argc, char * const argv[])
+ int argc, char *const argv[])
{
cleanup_before_linux();
diff --git a/arch/riscv/lib/bootm.c b/arch/riscv/lib/bootm.c
index 0d06095da1..c4137ded83 100644
--- a/arch/riscv/lib/bootm.c
+++ b/arch/riscv/lib/bootm.c
@@ -7,10 +7,12 @@
*/
#include <common.h>
+#include <bootstage.h>
#include <command.h>
#include <dm.h>
#include <fdt_support.h>
#include <hang.h>
+#include <log.h>
#include <dm/root.h>
#include <image.h>
#include <asm/byteorder.h>
@@ -105,7 +107,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 */
@@ -127,7 +129,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/fdt_fixup.c b/arch/riscv/lib/fdt_fixup.c
index 20e0759f13..6db48ad04a 100644
--- a/arch/riscv/lib/fdt_fixup.c
+++ b/arch/riscv/lib/fdt_fixup.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <fdt_support.h>
+#include <log.h>
#include <mapmem.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/riscv/lib/image.c b/arch/riscv/lib/image.c
index 7357d3b07d..91b7f1624e 100644
--- a/arch/riscv/lib/image.c
+++ b/arch/riscv/lib/image.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <image.h>
#include <mapmem.h>
#include <errno.h>
#include <linux/sizes.h>
diff --git a/arch/riscv/lib/reset.c b/arch/riscv/lib/reset.c
index ce3c1cf872..8779c619cc 100644
--- a/arch/riscv/lib/reset.c
+++ b/arch/riscv/lib/reset.c
@@ -7,7 +7,7 @@
#include <command.h>
#include <hang.h>
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
printf("resetting ...\n");
diff --git a/arch/riscv/lib/spl.c b/arch/riscv/lib/spl.c
index 4ca038b148..c47dcd46ce 100644
--- a/arch/riscv/lib/spl.c
+++ b/arch/riscv/lib/spl.c
@@ -6,6 +6,8 @@
#include <common.h>
#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 56ee3f5826..fb857e53d5 100644
--- a/arch/sandbox/cpu/cpu.c
+++ b/arch/sandbox/cpu/cpu.c
@@ -4,9 +4,12 @@
*/
#include <common.h>
+#include <bootstage.h>
#include <cpu_func.h>
#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/sandbox/cpu/spl.c b/arch/sandbox/cpu/spl.c
index d5f683bbaa..7ab8919eb9 100644
--- a/arch/sandbox/cpu/spl.c
+++ b/arch/sandbox/cpu/spl.c
@@ -6,6 +6,8 @@
#include <common.h>
#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/start.c b/arch/sandbox/cpu/start.c
index b6ff5c3d64..c6a2bbe468 100644
--- a/arch/sandbox/cpu/start.c
+++ b/arch/sandbox/cpu/start.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <command.h>
#include <errno.h>
+#include <init.h>
#include <os.h>
#include <cli.h>
#include <sort.h>
diff --git a/arch/sandbox/cpu/state.c b/arch/sandbox/cpu/state.c
index a347cec528..1f794123b3 100644
--- a/arch/sandbox/cpu/state.c
+++ b/arch/sandbox/cpu/state.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <errno.h>
#include <fdtdec.h>
+#include <log.h>
#include <os.h>
#include <asm/malloc.h>
#include <asm/state.h>
diff --git a/arch/sandbox/include/asm/eth.h b/arch/sandbox/include/asm/eth.h
index 477fa00fad..b313bf57c6 100644
--- a/arch/sandbox/include/asm/eth.h
+++ b/arch/sandbox/include/asm/eth.h
@@ -9,6 +9,8 @@
#ifndef __ETH_H
#define __ETH_H
+#include <net.h>
+
void sandbox_eth_disable_response(int index, bool disable);
void sandbox_eth_skip_timeout(void);
diff --git a/arch/sandbox/lib/bootm.c b/arch/sandbox/lib/bootm.c
index 2de03fb8e0..d1d460b84a 100644
--- a/arch/sandbox/lib/bootm.c
+++ b/arch/sandbox/lib/bootm.c
@@ -5,6 +5,8 @@
*/
#include <common.h>
+#include <bootstage.h>
+#include <image.h>
#include <asm/io.h>
#define LINUX_ARM_ZIMAGE_MAGIC 0x016f2818
diff --git a/arch/sandbox/lib/pci_io.c b/arch/sandbox/lib/pci_io.c
index f22e47c7f6..2038141947 100644
--- a/arch/sandbox/lib/pci_io.c
+++ b/arch/sandbox/lib/pci_io.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <command.h>
#include <dm.h>
+#include <log.h>
#include <asm/io.h>
int pci_map_physmem(phys_addr_t paddr, unsigned long *lenp,
diff --git a/arch/sh/cpu/sh4/cache.c b/arch/sh/cpu/sh4/cache.c
index 2f49ce8681..0f7dfdd3cf 100644
--- a/arch/sh/cpu/sh4/cache.c
+++ b/arch/sh/cpu/sh4/cache.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <command.h>
#include <cpu_func.h>
+#include <asm/cache.h>
#include <asm/io.h>
#include <asm/processor.h>
#include <asm/system.h>
diff --git a/arch/sh/cpu/sh4/cpu.c b/arch/sh/cpu/sh4/cpu.c
index a8d0590d51..f032d88159 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>
@@ -28,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 2896e45f0d..dc94f83785 100644
--- a/arch/sh/lib/bootm.c
+++ b/arch/sh/lib/bootm.c
@@ -9,6 +9,8 @@
#include <common.h>
#include <command.h>
+#include <env.h>
+#include <image.h>
#include <asm/byteorder.h>
#include <asm/zimage.h>
@@ -49,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/time.c b/arch/sh/lib/time.c
index 51e1cc1181..f951544728 100644
--- a/arch/sh/lib/time.c
+++ b/arch/sh/lib/time.c
@@ -11,8 +11,10 @@
*/
#include <common.h>
+#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/sh/lib/time_sh2.c b/arch/sh/lib/time_sh2.c
index d82c1d2feb..5484c543c6 100644
--- a/arch/sh/lib/time_sh2.c
+++ b/arch/sh/lib/time_sh2.c
@@ -8,9 +8,11 @@
*/
#include <common.h>
+#include <init.h>
#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/sh/lib/zimageboot.c b/arch/sh/lib/zimageboot.c
index 602776a474..c38f0933f8 100644
--- a/arch/sh/lib/zimageboot.c
+++ b/arch/sh/lib/zimageboot.c
@@ -10,11 +10,14 @@
*/
#include <common.h>
+#include <command.h>
+#include <env.h>
#include <irq_func.h>
#include <asm/io.h>
#include <asm/zimage.h>
-int do_sh_zimageboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_sh_zimageboot(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
ulong (*zboot_entry)(int, char * const []) = NULL;
char *s0, *s1;
diff --git a/arch/x86/cpu/acpi_gpe.c b/arch/x86/cpu/acpi_gpe.c
index 55005455c0..8aa2009bd6 100644
--- a/arch/x86/cpu/acpi_gpe.c
+++ b/arch/x86/cpu/acpi_gpe.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <irq.h>
+#include <log.h>
#include <asm/io.h>
/**
diff --git a/arch/x86/cpu/apollolake/cpu_spl.c b/arch/x86/cpu/apollolake/cpu_spl.c
index e2509e391f..707ceb3e64 100644
--- a/arch/x86/cpu/apollolake/cpu_spl.c
+++ b/arch/x86/cpu/apollolake/cpu_spl.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
#include <ec_commands.h>
+#include <init.h>
#include <log.h>
#include <spi_flash.h>
#include <spl.h>
diff --git a/arch/x86/cpu/apollolake/fsp_m.c b/arch/x86/cpu/apollolake/fsp_m.c
index 5308af8ed4..56ce59dc70 100644
--- a/arch/x86/cpu/apollolake/fsp_m.c
+++ b/arch/x86/cpu/apollolake/fsp_m.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <asm/arch/iomap.h>
#include <asm/arch/fsp/fsp_configs.h>
#include <asm/arch/fsp/fsp_m_upd.h>
diff --git a/arch/x86/cpu/apollolake/fsp_s.c b/arch/x86/cpu/apollolake/fsp_s.c
index 7ef169b147..3e303f8f32 100644
--- a/arch/x86/cpu/apollolake/fsp_s.c
+++ b/arch/x86/cpu/apollolake/fsp_s.c
@@ -6,8 +6,11 @@
#include <common.h>
#include <binman.h>
+#include <bootstage.h>
#include <dm.h>
+#include <init.h>
#include <irq.h>
+#include <log.h>
#include <malloc.h>
#include <acpi/acpi_s3.h>
#include <asm/intel_pinctrl.h>
@@ -20,6 +23,7 @@
#include <asm/arch/systemagent.h>
#include <asm/arch/fsp/fsp_configs.h>
#include <asm/arch/fsp/fsp_s_upd.h>
+#include <linux/bitops.h>
#define PCH_P2SB_E0 0xe0
#define HIDE_BIT BIT(0)
diff --git a/arch/x86/cpu/apollolake/hostbridge.c b/arch/x86/cpu/apollolake/hostbridge.c
index 793853d5b5..cb46ec6c0b 100644
--- a/arch/x86/cpu/apollolake/hostbridge.c
+++ b/arch/x86/cpu/apollolake/hostbridge.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <dt-structs.h>
+#include <log.h>
#include <spl.h>
#include <asm/intel_pinctrl.h>
#include <asm/intel_regs.h>
diff --git a/arch/x86/cpu/apollolake/lpc.c b/arch/x86/cpu/apollolake/lpc.c
index 45b2144fc6..b81a458f2e 100644
--- a/arch/x86/cpu/apollolake/lpc.c
+++ b/arch/x86/cpu/apollolake/lpc.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <spl.h>
#include <asm/lpc_common.h>
#include <asm/pci.h>
diff --git a/arch/x86/cpu/apollolake/pmc.c b/arch/x86/cpu/apollolake/pmc.c
index 4ea7c7447b..192dec7109 100644
--- a/arch/x86/cpu/apollolake/pmc.c
+++ b/arch/x86/cpu/apollolake/pmc.c
@@ -11,10 +11,12 @@
#include <common.h>
#include <dt-structs.h>
#include <dm.h>
+#include <log.h>
#include <spl.h>
#include <acpi/acpi_s3.h>
#include <asm/io.h>
#include <asm/pci.h>
+#include <linux/bitops.h>
#include <power/acpi_pmc.h>
#define GPIO_GPE_CFG 0x1050
diff --git a/arch/x86/cpu/apollolake/punit.c b/arch/x86/cpu/apollolake/punit.c
index 1a131fb0b1..e76f2805d7 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>
@@ -12,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/apollolake/spl.c b/arch/x86/cpu/apollolake/spl.c
index d32f2a9898..5a53831dc6 100644
--- a/arch/x86/cpu/apollolake/spl.c
+++ b/arch/x86/cpu/apollolake/spl.c
@@ -5,7 +5,10 @@
#include <common.h>
#include <binman_sym.h>
+#include <bootstage.h>
#include <dm.h>
+#include <image.h>
+#include <log.h>
#include <malloc.h>
#include <spi.h>
#include <spl.h>
diff --git a/arch/x86/cpu/baytrail/acpi.c b/arch/x86/cpu/baytrail/acpi.c
index 5772310979..65f2006a0a 100644
--- a/arch/x86/cpu/baytrail/acpi.c
+++ b/arch/x86/cpu/baytrail/acpi.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <cpu.h>
#include <dm.h>
+#include <log.h>
#include <acpi/acpi_s3.h>
#include <acpi/acpi_table.h>
#include <asm/io.h>
diff --git a/arch/x86/cpu/baytrail/cpu.c b/arch/x86/cpu/baytrail/cpu.c
index a9cfcedd81..18e48ffa53 100644
--- a/arch/x86/cpu/baytrail/cpu.c
+++ b/arch/x86/cpu/baytrail/cpu.c
@@ -9,6 +9,7 @@
#include <cpu.h>
#include <dm.h>
#include <init.h>
+#include <log.h>
#include <pci.h>
#include <asm/cpu.h>
#include <asm/cpu_x86.h>
diff --git a/arch/x86/cpu/baytrail/fsp_configs.c b/arch/x86/cpu/baytrail/fsp_configs.c
index 1d1948c91a..21816ce5b8 100644
--- a/arch/x86/cpu/baytrail/fsp_configs.c
+++ b/arch/x86/cpu/baytrail/fsp_configs.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <fdtdec.h>
+#include <log.h>
#include <asm/fsp1/fsp_support.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/baytrail/valleyview.c b/arch/x86/cpu/baytrail/valleyview.c
index f2e48f401f..f73738ce5c 100644
--- a/arch/x86/cpu/baytrail/valleyview.c
+++ b/arch/x86/cpu/baytrail/valleyview.c
@@ -11,6 +11,7 @@
#include <asm/mrccache.h>
#include <asm/post.h>
#include <asm/arch/iomap.h>
+#include <linux/bitops.h>
/* GPIO SUS */
#define GPIO_SUS_PAD_BASE (IO_BASE_ADDRESS + IO_BASE_OFFSET_GPSSUS)
diff --git a/arch/x86/cpu/braswell/braswell.c b/arch/x86/cpu/braswell/braswell.c
index 7a83b06005..3345049993 100644
--- a/arch/x86/cpu/braswell/braswell.c
+++ b/arch/x86/cpu/braswell/braswell.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/mrccache.h>
#include <asm/post.h>
diff --git a/arch/x86/cpu/braswell/fsp_configs.c b/arch/x86/cpu/braswell/fsp_configs.c
index 60101d742d..9e710a940c 100644
--- a/arch/x86/cpu/braswell/fsp_configs.c
+++ b/arch/x86/cpu/braswell/fsp_configs.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <fdtdec.h>
+#include <log.h>
#include <asm/fsp1/fsp_support.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/broadwell/adsp.c b/arch/x86/cpu/broadwell/adsp.c
index 2ac8cea7c3..41f7d5d4d1 100644
--- a/arch/x86/cpu/broadwell/adsp.c
+++ b/arch/x86/cpu/broadwell/adsp.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <pci.h>
#include <asm/io.h>
#include <asm/cpu.h>
diff --git a/arch/x86/cpu/broadwell/cpu.c b/arch/x86/cpu/broadwell/cpu.c
index 55a7439f1c..b77301118c 100644
--- a/arch/x86/cpu/broadwell/cpu.c
+++ b/arch/x86/cpu/broadwell/cpu.c
@@ -8,6 +8,8 @@
#include <common.h>
#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 2aa6f245e7..6567d50653 100644
--- a/arch/x86/cpu/broadwell/cpu_from_spl.c
+++ b/arch/x86/cpu/broadwell/cpu_from_spl.c
@@ -9,6 +9,8 @@
#include <cpu_func.h>
#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 895edeb4bc..64a1cd414f 100644
--- a/arch/x86/cpu/broadwell/cpu_full.c
+++ b/arch/x86/cpu/broadwell/cpu_full.c
@@ -8,6 +8,8 @@
#include <common.h>
#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>
@@ -18,6 +20,7 @@
#include <asm/arch/cpu.h>
#include <asm/arch/pch.h>
#include <asm/arch/rcb.h>
+#include <linux/delay.h>
struct cpu_broadwell_priv {
bool ht_disabled;
diff --git a/arch/x86/cpu/broadwell/iobp.c b/arch/x86/cpu/broadwell/iobp.c
index 8a3ca6cde7..cb5595c930 100644
--- a/arch/x86/cpu/broadwell/iobp.c
+++ b/arch/x86/cpu/broadwell/iobp.c
@@ -10,6 +10,7 @@
#include <asm/intel_regs.h>
#include <asm/io.h>
#include <asm/arch/pch.h>
+#include <linux/delay.h>
#define IOBP_RETRY 1000
diff --git a/arch/x86/cpu/broadwell/lpc.c b/arch/x86/cpu/broadwell/lpc.c
index 9dc9b63db6..5669a028cf 100644
--- a/arch/x86/cpu/broadwell/lpc.c
+++ b/arch/x86/cpu/broadwell/lpc.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <pch.h>
#include <asm/intel_regs.h>
#include <asm/io.h>
diff --git a/arch/x86/cpu/broadwell/me.c b/arch/x86/cpu/broadwell/me.c
index adc656c07a..ae16ce2649 100644
--- a/arch/x86/cpu/broadwell/me.c
+++ b/arch/x86/cpu/broadwell/me.c
@@ -7,7 +7,9 @@
#include <common.h>
#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 a48945adf1..9bcf211af9 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>
@@ -23,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/pinctrl_broadwell.c b/arch/x86/cpu/broadwell/pinctrl_broadwell.c
index aa83abbf85..0ead13af62 100644
--- a/arch/x86/cpu/broadwell/pinctrl_broadwell.c
+++ b/arch/x86/cpu/broadwell/pinctrl_broadwell.c
@@ -7,6 +7,7 @@
#include <dm.h>
#include <errno.h>
#include <fdtdec.h>
+#include <log.h>
#include <pch.h>
#include <pci.h>
#include <asm/cpu.h>
diff --git a/arch/x86/cpu/broadwell/power_state.c b/arch/x86/cpu/broadwell/power_state.c
index 09fda487d0..99d6f72cf6 100644
--- a/arch/x86/cpu/broadwell/power_state.c
+++ b/arch/x86/cpu/broadwell/power_state.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <log.h>
#include <pci.h>
#include <asm/io.h>
#include <asm/intel_regs.h>
diff --git a/arch/x86/cpu/broadwell/refcode.c b/arch/x86/cpu/broadwell/refcode.c
index f016489185..6c04dde992 100644
--- a/arch/x86/cpu/broadwell/refcode.c
+++ b/arch/x86/cpu/broadwell/refcode.c
@@ -8,6 +8,8 @@
#include <common.h>
#include <errno.h>
+#include <init.h>
+#include <log.h>
#include <asm/arch/pei_data.h>
#define RMODULE_MAGIC 0xf8fe
diff --git a/arch/x86/cpu/broadwell/sata.c b/arch/x86/cpu/broadwell/sata.c
index d89e0a1c9b..641da515c8 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>
@@ -14,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/broadwell/sdram.c b/arch/x86/cpu/broadwell/sdram.c
index 15bfc5811c..72f59a0a57 100644
--- a/arch/x86/cpu/broadwell/sdram.c
+++ b/arch/x86/cpu/broadwell/sdram.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
#include <init.h>
+#include <log.h>
#include <pci.h>
#include <syscon.h>
#include <asm/cpu.h>
diff --git a/arch/x86/cpu/coreboot/coreboot.c b/arch/x86/cpu/coreboot/coreboot.c
index 624caf67a6..d44db1347b 100644
--- a/arch/x86/cpu/coreboot/coreboot.c
+++ b/arch/x86/cpu/coreboot/coreboot.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <cpu_func.h>
#include <fdtdec.h>
+#include <init.h>
#include <usb.h>
#include <asm/io.h>
#include <asm/msr.h>
diff --git a/arch/x86/cpu/coreboot/timestamp.c b/arch/x86/cpu/coreboot/timestamp.c
index e8ccaf2212..0162597809 100644
--- a/arch/x86/cpu/coreboot/timestamp.c
+++ b/arch/x86/cpu/coreboot/timestamp.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <bootstage.h>
#include <asm/arch/timestamp.h>
#include <asm/arch/sysinfo.h>
#include <linux/compiler.h>
diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c
index 2e5d0ddd9f..a814e7d7a6 100644
--- a/arch/x86/cpu/cpu.c
+++ b/arch/x86/cpu/cpu.c
@@ -19,11 +19,13 @@
*/
#include <common.h>
+#include <bootstage.h>
#include <command.h>
#include <cpu_func.h>
#include <dm.h>
#include <errno.h>
#include <init.h>
+#include <log.h>
#include <malloc.h>
#include <syscon.h>
#include <acpi/acpi_s3.h>
diff --git a/arch/x86/cpu/efi/app.c b/arch/x86/cpu/efi/app.c
index 13077411dc..10677ecbc2 100644
--- a/arch/x86/cpu/efi/app.c
+++ b/arch/x86/cpu/efi/app.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <cpu_func.h>
#include <fdtdec.h>
+#include <init.h>
#include <netdev.h>
int arch_cpu_init(void)
diff --git a/arch/x86/cpu/efi/payload.c b/arch/x86/cpu/efi/payload.c
index 66df128787..71619f6f01 100644
--- a/arch/x86/cpu/efi/payload.c
+++ b/arch/x86/cpu/efi/payload.c
@@ -9,6 +9,7 @@
#include <efi.h>
#include <errno.h>
#include <init.h>
+#include <log.h>
#include <usb.h>
#include <asm/bootparam.h>
#include <asm/e820.h>
diff --git a/arch/x86/cpu/i386/interrupt.c b/arch/x86/cpu/i386/interrupt.c
index e67a116ac1..c0c4bc95fd 100644
--- a/arch/x86/cpu/i386/interrupt.c
+++ b/arch/x86/cpu/i386/interrupt.c
@@ -23,6 +23,7 @@
#include <asm/io.h>
#include <asm/lapic.h>
#include <asm/processor-flags.h>
+#include <asm/ptrace.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/intel_common/cpu.c b/arch/x86/cpu/intel_common/cpu.c
index 4d093a5391..509730aea9 100644
--- a/arch/x86/cpu/intel_common/cpu.c
+++ b/arch/x86/cpu/intel_common/cpu.c
@@ -11,6 +11,7 @@
#include <cpu.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <asm/cpu.h>
#include <asm/cpu_common.h>
#include <asm/intel_regs.h>
diff --git a/arch/x86/cpu/intel_common/cpu_from_spl.c b/arch/x86/cpu/intel_common/cpu_from_spl.c
index b7bb524162..e4157c5734 100644
--- a/arch/x86/cpu/intel_common/cpu_from_spl.c
+++ b/arch/x86/cpu/intel_common/cpu_from_spl.c
@@ -7,6 +7,7 @@
#include <dm.h>
#include <errno.h>
#include <handoff.h>
+#include <init.h>
#include <asm/cpu_common.h>
#include <asm/intel_regs.h>
#include <asm/lapic.h>
diff --git a/arch/x86/cpu/intel_common/itss.c b/arch/x86/cpu/intel_common/itss.c
index e4f785ce89..963afa8f5b 100644
--- a/arch/x86/cpu/intel_common/itss.c
+++ b/arch/x86/cpu/intel_common/itss.c
@@ -13,6 +13,7 @@
#include <dm.h>
#include <dt-structs.h>
#include <irq.h>
+#include <log.h>
#include <malloc.h>
#include <p2sb.h>
#include <spl.h>
diff --git a/arch/x86/cpu/intel_common/lpc.c b/arch/x86/cpu/intel_common/lpc.c
index 2a538cf12e..3420f03cca 100644
--- a/arch/x86/cpu/intel_common/lpc.c
+++ b/arch/x86/cpu/intel_common/lpc.c
@@ -12,6 +12,7 @@
#include <asm/intel_regs.h>
#include <asm/io.h>
#include <asm/lpc_common.h>
+#include <linux/bitops.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/intel_common/me_status.c b/arch/x86/cpu/intel_common/me_status.c
index fc9efbf3a9..abc5f6fbc7 100644
--- a/arch/x86/cpu/intel_common/me_status.c
+++ b/arch/x86/cpu/intel_common/me_status.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/arch/me.h>
/* HFS1[3:0] Current Working State Values */
diff --git a/arch/x86/cpu/intel_common/microcode.c b/arch/x86/cpu/intel_common/microcode.c
index c7a539d281..0355d3c1da 100644
--- a/arch/x86/cpu/intel_common/microcode.c
+++ b/arch/x86/cpu/intel_common/microcode.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <errno.h>
#include <fdtdec.h>
+#include <log.h>
#include <linux/libfdt.h>
#include <asm/cpu.h>
#include <asm/microcode.h>
diff --git a/arch/x86/cpu/intel_common/mrc.c b/arch/x86/cpu/intel_common/mrc.c
index 755670a847..73bfd12332 100644
--- a/arch/x86/cpu/intel_common/mrc.c
+++ b/arch/x86/cpu/intel_common/mrc.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <init.h>
+#include <log.h>
#include <syscon.h>
#include <asm/cpu.h>
#include <asm/gpio.h>
diff --git a/arch/x86/cpu/intel_common/p2sb.c b/arch/x86/cpu/intel_common/p2sb.c
index 6f3c441618..ec35d04ae5 100644
--- a/arch/x86/cpu/intel_common/p2sb.c
+++ b/arch/x86/cpu/intel_common/p2sb.c
@@ -10,9 +10,11 @@
#include <common.h>
#include <dm.h>
#include <dt-structs.h>
+#include <log.h>
#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/intel_common/report_platform.c b/arch/x86/cpu/intel_common/report_platform.c
index 0f217c1497..a3612817c4 100644
--- a/arch/x86/cpu/intel_common/report_platform.c
+++ b/arch/x86/cpu/intel_common/report_platform.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/cpu.h>
#include <asm/pci.h>
#include <asm/report_platform.h>
diff --git a/arch/x86/cpu/ioapic.c b/arch/x86/cpu/ioapic.c
index 01ade76a58..4f99de6ece 100644
--- a/arch/x86/cpu/ioapic.c
+++ b/arch/x86/cpu/ioapic.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/ioapic.h>
#include <asm/lapic.h>
diff --git a/arch/x86/cpu/irq.c b/arch/x86/cpu/irq.c
index bafa031082..836a0e8b86 100644
--- a/arch/x86/cpu/irq.c
+++ b/arch/x86/cpu/irq.c
@@ -8,6 +8,7 @@
#include <errno.h>
#include <fdtdec.h>
#include <irq.h>
+#include <log.h>
#include <malloc.h>
#include <asm/io.h>
#include <asm/irq.h>
diff --git a/arch/x86/cpu/ivybridge/bd82x6x.c b/arch/x86/cpu/ivybridge/bd82x6x.c
index 1cb6cecda9..5448f064fc 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>
@@ -17,6 +18,8 @@
#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/cpu/ivybridge/cpu.c b/arch/x86/cpu/ivybridge/cpu.c
index 8f30cdbe24..cb6eded9c9 100644
--- a/arch/x86/cpu/ivybridge/cpu.c
+++ b/arch/x86/cpu/ivybridge/cpu.c
@@ -15,6 +15,8 @@
#include <dm.h>
#include <errno.h>
#include <fdtdec.h>
+#include <init.h>
+#include <log.h>
#include <pch.h>
#include <asm/cpu.h>
#include <asm/cpu_common.h>
diff --git a/arch/x86/cpu/ivybridge/early_me.c b/arch/x86/cpu/ivybridge/early_me.c
index 219d5be399..bee1671baf 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>
@@ -15,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/fsp_configs.c b/arch/x86/cpu/ivybridge/fsp_configs.c
index 0e6453c847..41d7d2a2b4 100644
--- a/arch/x86/cpu/ivybridge/fsp_configs.c
+++ b/arch/x86/cpu/ivybridge/fsp_configs.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <fdtdec.h>
+#include <log.h>
#include <asm/fsp1/fsp_support.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/ivybridge/ivybridge.c b/arch/x86/cpu/ivybridge/ivybridge.c
index 8d10fd6c54..eb3f362e4e 100644
--- a/arch/x86/cpu/ivybridge/ivybridge.c
+++ b/arch/x86/cpu/ivybridge/ivybridge.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/post.h>
#include <asm/processor.h>
diff --git a/arch/x86/cpu/ivybridge/lpc.c b/arch/x86/cpu/ivybridge/lpc.c
index d9ddcdc840..85fd2a965a 100644
--- a/arch/x86/cpu/ivybridge/lpc.c
+++ b/arch/x86/cpu/ivybridge/lpc.c
@@ -9,6 +9,7 @@
#include <dm.h>
#include <errno.h>
#include <fdtdec.h>
+#include <log.h>
#include <rtc.h>
#include <pci.h>
#include <asm/intel_regs.h>
diff --git a/arch/x86/cpu/ivybridge/model_206ax.c b/arch/x86/cpu/ivybridge/model_206ax.c
index 56ab6bf4ac..5954a24873 100644
--- a/arch/x86/cpu/ivybridge/model_206ax.c
+++ b/arch/x86/cpu/ivybridge/model_206ax.c
@@ -10,6 +10,7 @@
#include <cpu.h>
#include <dm.h>
#include <fdtdec.h>
+#include <log.h>
#include <malloc.h>
#include <asm/cpu.h>
#include <asm/cpu_common.h>
diff --git a/arch/x86/cpu/ivybridge/northbridge.c b/arch/x86/cpu/ivybridge/northbridge.c
index 0f427afcb8..b713fcb1cf 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>
@@ -17,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/ivybridge/sata.c b/arch/x86/cpu/ivybridge/sata.c
index fc6c427430..025b20be31 100644
--- a/arch/x86/cpu/ivybridge/sata.c
+++ b/arch/x86/cpu/ivybridge/sata.c
@@ -8,6 +8,7 @@
#include <ahci.h>
#include <dm.h>
#include <fdtdec.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/pch_common.h>
#include <asm/pci.h>
diff --git a/arch/x86/cpu/ivybridge/sdram.c b/arch/x86/cpu/ivybridge/sdram.c
index cf34f94a91..99bc48021e 100644
--- a/arch/x86/cpu/ivybridge/sdram.c
+++ b/arch/x86/cpu/ivybridge/sdram.c
@@ -13,6 +13,7 @@
#include <errno.h>
#include <fdtdec.h>
#include <init.h>
+#include <log.h>
#include <malloc.h>
#include <net.h>
#include <rtc.h>
diff --git a/arch/x86/cpu/ivybridge/sdram_nop.c b/arch/x86/cpu/ivybridge/sdram_nop.c
index c55213ca2d..54e6acf262 100644
--- a/arch/x86/cpu/ivybridge/sdram_nop.c
+++ b/arch/x86/cpu/ivybridge/sdram_nop.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <init.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/lapic.c b/arch/x86/cpu/lapic.c
index 44ed446784..c0691454f1 100644
--- a/arch/x86/cpu/lapic.c
+++ b/arch/x86/cpu/lapic.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/lapic.h>
#include <asm/msr.h>
diff --git a/arch/x86/cpu/mp_init.c b/arch/x86/cpu/mp_init.c
index 7b09f90cd5..7fde4ff7e1 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>
@@ -25,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/mtrr.c b/arch/x86/cpu/mtrr.c
index a43cb7fc15..7ec0733337 100644
--- a/arch/x86/cpu/mtrr.c
+++ b/arch/x86/cpu/mtrr.c
@@ -18,6 +18,8 @@
#include <common.h>
#include <cpu_func.h>
+#include <log.h>
+#include <asm/cache.h>
#include <asm/io.h>
#include <asm/msr.h>
#include <asm/mtrr.h>
diff --git a/arch/x86/cpu/pci.c b/arch/x86/cpu/pci.c
index e1aae158ce..d4f9290ca7 100644
--- a/arch/x86/cpu/pci.c
+++ b/arch/x86/cpu/pci.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include <pci.h>
#include <asm/io.h>
diff --git a/arch/x86/cpu/qemu/qemu.c b/arch/x86/cpu/qemu/qemu.c
index 716351ad7f..044a429c13 100644
--- a/arch/x86/cpu/qemu/qemu.c
+++ b/arch/x86/cpu/qemu/qemu.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
#include <pci.h>
#include <qfw.h>
#include <asm/irq.h>
diff --git a/arch/x86/cpu/quark/dram.c b/arch/x86/cpu/quark/dram.c
index 2bf90dcfc6..72937139ed 100644
--- a/arch/x86/cpu/quark/dram.c
+++ b/arch/x86/cpu/quark/dram.c
@@ -8,7 +8,9 @@
#include <errno.h>
#include <fdtdec.h>
#include <init.h>
+#include <log.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/cpu/quark/mrc_util.h b/arch/x86/cpu/quark/mrc_util.h
index 4a760a9f59..e6e69c49d0 100644
--- a/arch/x86/cpu/quark/mrc_util.h
+++ b/arch/x86/cpu/quark/mrc_util.h
@@ -10,6 +10,8 @@
#ifndef _MRC_UTIL_H_
#define _MRC_UTIL_H_
+#include <log.h>
+
/* Turn on this macro to enable MRC debugging output */
#undef MRC_DEBUG
diff --git a/arch/x86/cpu/quark/quark.c b/arch/x86/cpu/quark/quark.c
index d6611eea5d..ddad02e375 100644
--- a/arch/x86/cpu/quark/quark.c
+++ b/arch/x86/cpu/quark/quark.c
@@ -5,7 +5,9 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
#include <mmc.h>
+#include <asm/cache.h>
#include <asm/io.h>
#include <asm/ioapic.h>
#include <asm/irq.h>
@@ -16,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/cpu/queensbay/tnc.c b/arch/x86/cpu/queensbay/tnc.c
index 66737e655b..782ed863fe 100644
--- a/arch/x86/cpu/queensbay/tnc.c
+++ b/arch/x86/cpu/queensbay/tnc.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <init.h>
#include <dm/device-internal.h>
#include <pci.h>
#include <asm/io.h>
diff --git a/arch/x86/cpu/slimbootloader/serial.c b/arch/x86/cpu/slimbootloader/serial.c
index bab54b18df..9813f7977b 100644
--- a/arch/x86/cpu/slimbootloader/serial.c
+++ b/arch/x86/cpu/slimbootloader/serial.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <ns16550.h>
#include <serial.h>
#include <asm/arch/slimbootloader.h>
diff --git a/arch/x86/cpu/slimbootloader/slimbootloader.c b/arch/x86/cpu/slimbootloader/slimbootloader.c
index 21dcfb2142..f61fe814e9 100644
--- a/arch/x86/cpu/slimbootloader/slimbootloader.c
+++ b/arch/x86/cpu/slimbootloader/slimbootloader.c
@@ -5,6 +5,8 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
+#include <log.h>
#include <asm/arch/slimbootloader.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/tangier/pinmux.c b/arch/x86/cpu/tangier/pinmux.c
index fdd653026b..5b0e106011 100644
--- a/arch/x86/cpu/tangier/pinmux.c
+++ b/arch/x86/cpu/tangier/pinmux.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <dm/pinctrl.h>
#include <dm/read.h>
#include <regmap.h>
diff --git a/arch/x86/cpu/tangier/sdram.c b/arch/x86/cpu/tangier/sdram.c
index 8c7e1c10c2..df3b9e4ec9 100644
--- a/arch/x86/cpu/tangier/sdram.c
+++ b/arch/x86/cpu/tangier/sdram.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <init.h>
+#include <log.h>
#include <asm/e820.h>
#include <asm/global_data.h>
#include <asm/sfi.h>
diff --git a/arch/x86/cpu/tangier/tangier.c b/arch/x86/cpu/tangier/tangier.c
index 43bee1fb70..1e2f6cc8b7 100644
--- a/arch/x86/cpu/tangier/tangier.c
+++ b/arch/x86/cpu/tangier/tangier.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
#include <asm/u-boot-x86.h>
/*
diff --git a/arch/x86/cpu/turbo.c b/arch/x86/cpu/turbo.c
index be468d2b2c..f8d85d5a33 100644
--- a/arch/x86/cpu/turbo.c
+++ b/arch/x86/cpu/turbo.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/cpu.h>
#include <asm/msr.h>
#include <asm/processor.h>
diff --git a/arch/x86/cpu/x86_64/cpu.c b/arch/x86/cpu/x86_64/cpu.c
index 4b64339f25..1b4d3971b0 100644
--- a/arch/x86/cpu/x86_64/cpu.c
+++ b/arch/x86/cpu/x86_64/cpu.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <cpu_func.h>
#include <debug_uart.h>
+#include <init.h>
/*
* Global declaration of gd.
diff --git a/arch/x86/include/asm/arch-apollolake/lpc.h b/arch/x86/include/asm/arch-apollolake/lpc.h
index 5d2adad319..977b7eccd8 100644
--- a/arch/x86/include/asm/arch-apollolake/lpc.h
+++ b/arch/x86/include/asm/arch-apollolake/lpc.h
@@ -7,6 +7,7 @@
#ifndef _ASM_ARCH_LPC_H
#define _ASM_ARCH_LPC_H
+#include <linux/bitops.h>
#define LPC_SERIRQ_CTL 0x64
#define LPC_SCNT_EN BIT(7)
#define LPC_SCNT_MODE BIT(6)
diff --git a/arch/x86/include/asm/arch-apollolake/systemagent.h b/arch/x86/include/asm/arch-apollolake/systemagent.h
index 206d8903fa..9e7bd62751 100644
--- a/arch/x86/include/asm/arch-apollolake/systemagent.h
+++ b/arch/x86/include/asm/arch-apollolake/systemagent.h
@@ -8,6 +8,7 @@
#define _ASM_ARCH_SYSTEMAGENT_H
/* Device 0:0.0 PCI configuration space */
+#include <linux/bitops.h>
#define MCHBAR 0x48
/* RAPL Package Power Limit register under MCHBAR */
diff --git a/arch/x86/include/asm/arch-braswell/fsp/fsp_vpd.h b/arch/x86/include/asm/arch-braswell/fsp/fsp_vpd.h
index a3bde3d8e7..f2260ae90e 100644
--- a/arch/x86/include/asm/arch-braswell/fsp/fsp_vpd.h
+++ b/arch/x86/include/asm/arch-braswell/fsp/fsp_vpd.h
@@ -7,6 +7,8 @@
#ifndef __FSP_VPD_H__
#define __FSP_VPD_H__
+#include <stddef.h>
+
struct __packed memory_upd {
u64 signature; /* Offset 0x0020 */
u8 revision; /* Offset 0x0028 */
diff --git a/arch/x86/include/asm/arch-broadwell/adsp.h b/arch/x86/include/asm/arch-broadwell/adsp.h
index eb825ce1c0..a5a1f73bf4 100644
--- a/arch/x86/include/asm/arch-broadwell/adsp.h
+++ b/arch/x86/include/asm/arch-broadwell/adsp.h
@@ -10,6 +10,7 @@
#ifndef __ASM_ARCH_BROADWELL_ADSP_H
#define __ASM_ARCH_BROADWELL_ADSP_H
+#include <linux/bitops.h>
#define ADSP_PCI_IRQ 23
#define ADSP_ACPI_IRQ 3
#define ADSP_ACPI_IRQEN BIT(3)
diff --git a/arch/x86/include/asm/arch-broadwell/serialio.h b/arch/x86/include/asm/arch-broadwell/serialio.h
index 5e98eaf53f..ff09278b96 100644
--- a/arch/x86/include/asm/arch-broadwell/serialio.h
+++ b/arch/x86/include/asm/arch-broadwell/serialio.h
@@ -9,6 +9,7 @@
#define __ARCH_BROADWELL_SERIALIO_H_
/* Serial IO IOBP Registers */
+#include <linux/bitops.h>
#define SIO_IOBP_PORTCTRL0 0xcb000000 /* SDIO D23:F0 */
#define SIO_IOBP_PORTCTRL0_ACPI_IRQ_EN BIT(5)
#define SIO_IOBP_PORTCTRL0_PCI_CONF_DIS BIT(4)
diff --git a/arch/x86/include/asm/atomic.h b/arch/x86/include/asm/atomic.h
index 806f787381..4ca0f79bff 100644
--- a/arch/x86/include/asm/atomic.h
+++ b/arch/x86/include/asm/atomic.h
@@ -1,6 +1,7 @@
#ifndef _ASM_X86_ATOMIC_H
#define _ASM_X86_ATOMIC_H
+#include <linux/bitops.h>
#include <linux/compiler.h>
#include <linux/types.h>
#include <asm/processor.h>
diff --git a/arch/x86/include/asm/fast_spi.h b/arch/x86/include/asm/fast_spi.h
index 6894298526..47c1da80d7 100644
--- a/arch/x86/include/asm/fast_spi.h
+++ b/arch/x86/include/asm/fast_spi.h
@@ -7,6 +7,7 @@
#define ASM_FAST_SPI_H
/* Register offsets from the MMIO region base (PCI_BASE_ADDRESS_0) */
+#include <linux/bitops.h>
struct fast_spi_regs {
u32 bfp;
u32 hsfsts_ctl;
diff --git a/arch/x86/include/asm/fsp/fsp_api.h b/arch/x86/include/asm/fsp/fsp_api.h
index e9ac86b2da..4941e2d74f 100644
--- a/arch/x86/include/asm/fsp/fsp_api.h
+++ b/arch/x86/include/asm/fsp/fsp_api.h
@@ -6,6 +6,8 @@
#ifndef __ASM_FSP_API_H
#define __ASM_FSP_API_H
+#include <linux/linkage.h>
+
enum fsp_phase {
/* Notification code for post PCI enuermation */
INIT_PHASE_PCI = 0x20,
diff --git a/arch/x86/include/asm/fsp/fsp_fv.h b/arch/x86/include/asm/fsp/fsp_fv.h
index 511dfb78b8..7492c87c34 100644
--- a/arch/x86/include/asm/fsp/fsp_fv.h
+++ b/arch/x86/include/asm/fsp/fsp_fv.h
@@ -7,6 +7,8 @@
#ifndef __FSP_FV___
#define __FSP_FV___
+#include <efi.h>
+
/* Value of EFI_FV_FILE_ATTRIBUTES */
#define EFI_FV_FILE_ATTR_ALIGNMENT 0x0000001F
#define EFI_FV_FILE_ATTR_FIXED 0x00000100
diff --git a/arch/x86/include/asm/intel_pinctrl.h b/arch/x86/include/asm/intel_pinctrl.h
index 72fd9246cb..e2524b089d 100644
--- a/arch/x86/include/asm/intel_pinctrl.h
+++ b/arch/x86/include/asm/intel_pinctrl.h
@@ -10,6 +10,7 @@
#define __ASM_INTEL_PINCTRL_H
#include <dm/pinctrl.h>
+#include <linux/bitops.h>
/**
* struct pad_config - config for a pad
diff --git a/arch/x86/include/asm/mp.h b/arch/x86/include/asm/mp.h
index fb59e2f67d..9dddf88b5a 100644
--- a/arch/x86/include/asm/mp.h
+++ b/arch/x86/include/asm/mp.h
@@ -9,6 +9,7 @@
#define _X86_MP_H_
#include <asm/atomic.h>
+#include <asm/cache.h>
typedef int (*mp_callback_t)(struct udevice *cpu, void *arg);
diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h
index 246c14f815..94e6b18e21 100644
--- a/arch/x86/include/asm/msr-index.h
+++ b/arch/x86/include/asm/msr-index.h
@@ -9,6 +9,10 @@
#ifndef _ASM_X86_MSR_INDEX_H
#define _ASM_X86_MSR_INDEX_H
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
/* CPU model specific register (MSR) numbers */
/* x86-64 specific MSRs */
diff --git a/arch/x86/include/asm/mtrr.h b/arch/x86/include/asm/mtrr.h
index 672617256e..212a699c1b 100644
--- a/arch/x86/include/asm/mtrr.h
+++ b/arch/x86/include/asm/mtrr.h
@@ -57,7 +57,7 @@
#define MTRR_FIX_TYPE(t) ((t << 24) | (t << 16) | (t << 8) | t)
-#if !defined(__ASSEMBLER__)
+#if !defined(__ASSEMBLY__)
/**
* Information about the previous MTRR state, set up by mtrr_open()
diff --git a/arch/x86/include/asm/sipi.h b/arch/x86/include/asm/sipi.h
index 1ab6c2874a..2483422528 100644
--- a/arch/x86/include/asm/sipi.h
+++ b/arch/x86/include/asm/sipi.h
@@ -10,7 +10,7 @@
#define AP_DEFAULT_BASE 0x30000
#define AP_DEFAULT_SIZE 0x10000
-#ifndef __ASSEMBLER__
+#ifndef __ASSEMBLY__
/**
* struct sipi_params_16bit - 16-bit SIPI entry-point parameters
@@ -81,6 +81,6 @@ void ap_start(void);
extern char sipi_params_16bit[];
extern char sipi_params[];
-#endif /* __ASSEMBLER__ */
+#endif /* __ASSEMBLY__ */
#endif
diff --git a/arch/x86/lib/acpi.c b/arch/x86/lib/acpi.c
index 7431458dcf..155fffabf0 100644
--- a/arch/x86/lib/acpi.c
+++ b/arch/x86/lib/acpi.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <log.h>
#include <acpi/acpi_table.h>
#include <asm/io.h>
#include <asm/tables.h>
diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c
index 13f1409de8..6985ef4ba5 100644
--- a/arch/x86/lib/acpi_table.c
+++ b/arch/x86/lib/acpi_table.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <cpu.h>
#include <dm.h>
+#include <log.h>
#include <dm/uclass-internal.h>
#include <mapmem.h>
#include <serial.h>
diff --git a/arch/x86/lib/bios.c b/arch/x86/lib/bios.c
index 30c0997fd0..3ab432e262 100644
--- a/arch/x86/lib/bios.c
+++ b/arch/x86/lib/bios.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <bios_emul.h>
#include <irq_func.h>
+#include <log.h>
#include <vbe.h>
#include <linux/linkage.h>
#include <asm/cache.h>
diff --git a/arch/x86/lib/bios_interrupts.c b/arch/x86/lib/bios_interrupts.c
index fdd966b2c8..d6b4da7e25 100644
--- a/arch/x86/lib/bios_interrupts.c
+++ b/arch/x86/lib/bios_interrupts.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/pci.h>
#include "bios_emul.h"
diff --git a/arch/x86/lib/bootm.c b/arch/x86/lib/bootm.c
index 07d8f1f279..acc15cf2e0 100644
--- a/arch/x86/lib/bootm.c
+++ b/arch/x86/lib/bootm.c
@@ -8,8 +8,10 @@
*/
#include <common.h>
+#include <bootstage.h>
#include <command.h>
#include <hang.h>
+#include <log.h>
#include <dm/device.h>
#include <dm/root.h>
#include <errno.h>
@@ -205,8 +207,8 @@ static int boot_jump_linux(bootm_headers_t *images)
images->os.arch == IH_ARCH_X86_64);
}
-int do_bootm_linux(int flag, int argc, char * const argv[],
- bootm_headers_t *images)
+int do_bootm_linux(int flag, int argc, char *const argv[],
+ bootm_headers_t *images)
{
/* No need for those on x86 */
if (flag & BOOTM_STATE_OS_BD_T || flag & BOOTM_STATE_OS_CMDLINE)
diff --git a/arch/x86/lib/cmd_boot.c b/arch/x86/lib/cmd_boot.c
index 9fce021c79..baaf3d13ad 100644
--- a/arch/x86/lib/cmd_boot.c
+++ b/arch/x86/lib/cmd_boot.c
@@ -22,7 +22,7 @@
DECLARE_GLOBAL_DATA_PTR;
unsigned long do_go_exec(ulong (*entry)(int, char * const []),
- int argc, char * const argv[])
+ int argc, char *const argv[])
{
unsigned long ret = 0;
char **argv_tmp;
diff --git a/arch/x86/lib/coreboot_table.c b/arch/x86/lib/coreboot_table.c
index c996fc588d..331c1b7e5a 100644
--- a/arch/x86/lib/coreboot_table.c
+++ b/arch/x86/lib/coreboot_table.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <malloc.h>
+#include <net.h>
#include <vbe.h>
#include <acpi/acpi_s3.h>
#include <asm/coreboot_tables.h>
diff --git a/arch/x86/lib/fsp/fsp_common.c b/arch/x86/lib/fsp/fsp_common.c
index 267527eb34..cf32b3e512 100644
--- a/arch/x86/lib/fsp/fsp_common.c
+++ b/arch/x86/lib/fsp/fsp_common.c
@@ -7,6 +7,8 @@
#include <cpu_func.h>
#include <dm.h>
#include <errno.h>
+#include <init.h>
+#include <log.h>
#include <rtc.h>
#include <acpi/acpi_s3.h>
#include <asm/cmos_layout.h>
diff --git a/arch/x86/lib/fsp/fsp_dram.c b/arch/x86/lib/fsp/fsp_dram.c
index 15e82de2fe..ad5a0f79ad 100644
--- a/arch/x86/lib/fsp/fsp_dram.c
+++ b/arch/x86/lib/fsp/fsp_dram.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <handoff.h>
#include <init.h>
+#include <log.h>
#include <asm/fsp/fsp_support.h>
#include <asm/e820.h>
#include <asm/mrccache.h>
diff --git a/arch/x86/lib/fsp/fsp_graphics.c b/arch/x86/lib/fsp/fsp_graphics.c
index 98b762209f..70224c1a48 100644
--- a/arch/x86/lib/fsp/fsp_graphics.c
+++ b/arch/x86/lib/fsp/fsp_graphics.c
@@ -5,6 +5,8 @@
#include <common.h>
#include <dm.h>
+#include <init.h>
+#include <log.h>
#include <vbe.h>
#include <video.h>
#include <asm/fsp/fsp_support.h>
diff --git a/arch/x86/lib/fsp/fsp_support.c b/arch/x86/lib/fsp/fsp_support.c
index ee228117d1..fd4d98ef62 100644
--- a/arch/x86/lib/fsp/fsp_support.c
+++ b/arch/x86/lib/fsp/fsp_support.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/fsp/fsp_support.h>
#include <asm/post.h>
diff --git a/arch/x86/lib/fsp1/fsp_common.c b/arch/x86/lib/fsp1/fsp_common.c
index 0a726807c2..43d32b7abe 100644
--- a/arch/x86/lib/fsp1/fsp_common.c
+++ b/arch/x86/lib/fsp1/fsp_common.c
@@ -6,6 +6,8 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <init.h>
+#include <log.h>
#include <malloc.h>
#include <rtc.h>
#include <acpi/acpi_s3.h>
diff --git a/arch/x86/lib/fsp1/fsp_dram.c b/arch/x86/lib/fsp1/fsp_dram.c
index 5ef89744b9..e3f9e30f6a 100644
--- a/arch/x86/lib/fsp1/fsp_dram.c
+++ b/arch/x86/lib/fsp1/fsp_dram.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/fsp/fsp_support.h>
int dram_init(void)
diff --git a/arch/x86/lib/fsp1/fsp_support.c b/arch/x86/lib/fsp1/fsp_support.c
index c7a2c73846..d84c632f14 100644
--- a/arch/x86/lib/fsp1/fsp_support.c
+++ b/arch/x86/lib/fsp1/fsp_support.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/fsp1/fsp_support.h>
#include <asm/post.h>
diff --git a/arch/x86/lib/fsp2/fsp_dram.c b/arch/x86/lib/fsp2/fsp_dram.c
index 3869c53c5f..1c82b81831 100644
--- a/arch/x86/lib/fsp2/fsp_dram.c
+++ b/arch/x86/lib/fsp2/fsp_dram.c
@@ -6,6 +6,8 @@
#include <common.h>
#include <handoff.h>
+#include <init.h>
+#include <log.h>
#include <spl.h>
#include <acpi/acpi_s3.h>
#include <asm/arch/cpu.h>
diff --git a/arch/x86/lib/fsp2/fsp_init.c b/arch/x86/lib/fsp2/fsp_init.c
index c7dc2ea257..8c577902b2 100644
--- a/arch/x86/lib/fsp2/fsp_init.c
+++ b/arch/x86/lib/fsp2/fsp_init.c
@@ -6,9 +6,11 @@
#include <common.h>
#include <binman.h>
#include <binman_sym.h>
+#include <bootstage.h>
#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 bf30c47989..1a758147b0 100644
--- a/arch/x86/lib/fsp2/fsp_meminit.c
+++ b/arch/x86/lib/fsp2/fsp_meminit.c
@@ -8,6 +8,8 @@
#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>
@@ -79,10 +81,10 @@ int fsp_memory_init(bool s3wake, bool use_spi_flash)
return log_msg_ret("Could not setup config", ret);
debug("SDRAM init...");
- bootstage_start(BOOTSTATE_ID_ACCUM_FSP_M, "fsp-m");
+ bootstage_start(BOOTSTAGE_ID_ACCUM_FSP_M, "fsp-m");
func = (fsp_memory_init_func)(hdr->img_base + hdr->fsp_mem_init);
ret = func(&upd, &hob);
- bootstage_accum(BOOTSTATE_ID_ACCUM_FSP_M);
+ bootstage_accum(BOOTSTAGE_ID_ACCUM_FSP_M);
if (ret)
return log_msg_ret("SDRAM init fail\n", ret);
diff --git a/arch/x86/lib/fsp2/fsp_silicon_init.c b/arch/x86/lib/fsp2/fsp_silicon_init.c
index d7ce43e1eb..45c0c7d90b 100644
--- a/arch/x86/lib/fsp2/fsp_silicon_init.c
+++ b/arch/x86/lib/fsp2/fsp_silicon_init.c
@@ -10,7 +10,9 @@
#include <common.h>
#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>
@@ -42,10 +44,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/arch/x86/lib/fsp2/fsp_support.c b/arch/x86/lib/fsp2/fsp_support.c
index 0a04b443f7..3f2ca840dc 100644
--- a/arch/x86/lib/fsp2/fsp_support.c
+++ b/arch/x86/lib/fsp2/fsp_support.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <spi_flash.h>
#include <asm/fsp/fsp_support.h>
#include <asm/fsp2/fsp_internal.h>
diff --git a/arch/x86/lib/i8259.c b/arch/x86/lib/i8259.c
index 358cd1e70d..a0e3c09257 100644
--- a/arch/x86/lib/i8259.c
+++ b/arch/x86/lib/i8259.c
@@ -14,6 +14,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/i8259.h>
#include <asm/ibmpc.h>
diff --git a/arch/x86/lib/interrupts.c b/arch/x86/lib/interrupts.c
index b23b8fd402..a81e429110 100644
--- a/arch/x86/lib/interrupts.c
+++ b/arch/x86/lib/interrupts.c
@@ -30,6 +30,7 @@
*/
#include <common.h>
+#include <command.h>
#include <irq_func.h>
#include <asm/interrupt.h>
@@ -127,7 +128,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/mpspec.c b/arch/x86/lib/mpspec.c
index b5ad1135a6..1c49c41b31 100644
--- a/arch/x86/lib/mpspec.c
+++ b/arch/x86/lib/mpspec.c
@@ -10,6 +10,7 @@
#include <dm.h>
#include <errno.h>
#include <fdtdec.h>
+#include <log.h>
#include <asm/cpu.h>
#include <asm/irq.h>
#include <asm/ioapic.h>
diff --git a/arch/x86/lib/mrccache.c b/arch/x86/lib/mrccache.c
index d1c44f290c..21c71e036e 100644
--- a/arch/x86/lib/mrccache.c
+++ b/arch/x86/lib/mrccache.c
@@ -10,6 +10,7 @@
#include <dm.h>
#include <errno.h>
#include <fdtdec.h>
+#include <log.h>
#include <malloc.h>
#include <net.h>
#include <spi.h>
diff --git a/arch/x86/lib/physmem.c b/arch/x86/lib/physmem.c
index c3c709ec07..4578046169 100644
--- a/arch/x86/lib/physmem.c
+++ b/arch/x86/lib/physmem.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <log.h>
#include <physmem.h>
#include <asm/cpu.h>
#include <linux/compiler.h>
diff --git a/arch/x86/lib/pinctrl_ich6.c b/arch/x86/lib/pinctrl_ich6.c
index 5868d5b60a..482599478b 100644
--- a/arch/x86/lib/pinctrl_ich6.c
+++ b/arch/x86/lib/pinctrl_ich6.c
@@ -7,6 +7,7 @@
#include <dm.h>
#include <errno.h>
#include <fdtdec.h>
+#include <log.h>
#include <pch.h>
#include <pci.h>
#include <asm/cpu.h>
diff --git a/arch/x86/lib/pirq_routing.c b/arch/x86/lib/pirq_routing.c
index 17bd2fcb9b..eb6a7d96de 100644
--- a/arch/x86/lib/pirq_routing.c
+++ b/arch/x86/lib/pirq_routing.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <log.h>
#include <pci.h>
#include <asm/pci.h>
#include <asm/pirq_routing.h>
diff --git a/arch/x86/lib/pmu.c b/arch/x86/lib/pmu.c
index 08fbe99039..3cd7b1f536 100644
--- a/arch/x86/lib/pmu.c
+++ b/arch/x86/lib/pmu.c
@@ -8,6 +8,7 @@
#include <syscon.h>
#include <asm/cpu.h>
#include <asm/pmu.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/io.h>
diff --git a/arch/x86/lib/relocate.c b/arch/x86/lib/relocate.c
index 4d09e4de42..ecbd0927e0 100644
--- a/arch/x86/lib/relocate.c
+++ b/arch/x86/lib/relocate.c
@@ -15,6 +15,7 @@
*/
#include <common.h>
+#include <log.h>
#include <relocate.h>
#include <asm/u-boot-x86.h>
#include <asm/sections.h>
diff --git a/arch/x86/lib/scu.c b/arch/x86/lib/scu.c
index a6f8297e72..d29d701631 100644
--- a/arch/x86/lib/scu.c
+++ b/arch/x86/lib/scu.c
@@ -15,6 +15,8 @@
#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>
#include <linux/kernel.h>
diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c
index 212b4d596d..b6f9a70ba7 100644
--- a/arch/x86/lib/spl.c
+++ b/arch/x86/lib/spl.c
@@ -8,7 +8,10 @@
#include <debug_uart.h>
#include <dm.h>
#include <hang.h>
+#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 34804b53cc..6f7eb43a17 100644
--- a/arch/x86/lib/tpl.c
+++ b/arch/x86/lib/tpl.c
@@ -7,6 +7,9 @@
#include <debug_uart.h>
#include <dm.h>
#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/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c
index ffc09630b7..64d14e8911 100644
--- a/arch/x86/lib/zimage.c
+++ b/arch/x86/lib/zimage.c
@@ -13,6 +13,7 @@
*/
#include <common.h>
+#include <command.h>
#include <env.h>
#include <irq_func.h>
#include <malloc.h>
@@ -310,7 +311,7 @@ void __setup_pcat_compatibility(void)
{
}
-int do_zboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_zboot(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
struct boot_params *base_ptr;
void *bzImage_addr = NULL;
diff --git a/arch/xtensa/cpu/cpu.c b/arch/xtensa/cpu/cpu.c
index 6f4b88f88e..85d3464607 100644
--- a/arch/xtensa/cpu/cpu.c
+++ b/arch/xtensa/cpu/cpu.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <command.h>
+#include <init.h>
#include <vsprintf.h>
#include <linux/stringify.h>
#include <asm/global_data.h>
diff --git a/arch/xtensa/cpu/exceptions.c b/arch/xtensa/cpu/exceptions.c
index 3b8f4a36d3..cf9af4326a 100644
--- a/arch/xtensa/cpu/exceptions.c
+++ b/arch/xtensa/cpu/exceptions.c
@@ -13,6 +13,7 @@
#include <common.h>
#include <command.h>
#include <irq_func.h>
+#include <asm/ptrace.h>
#include <asm/string.h>
#include <asm/regs.h>
diff --git a/arch/xtensa/lib/bootm.c b/arch/xtensa/lib/bootm.c
index 057b229433..458eaf95c0 100644
--- a/arch/xtensa/lib/bootm.c
+++ b/arch/xtensa/lib/bootm.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <bootstage.h>
#include <command.h>
#include <cpu_func.h>
#include <env.h>
diff --git a/arch/xtensa/lib/time.c b/arch/xtensa/lib/time.c
index 62bbe37b80..3a02c38493 100644
--- a/arch/xtensa/lib/time.c
+++ b/arch/xtensa/lib/time.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <time.h>
#include <asm/global_data.h>
+#include <linux/delay.h>
#include <linux/stringify.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/AndesTech/adp-ae3xx/adp-ae3xx.c b/board/AndesTech/adp-ae3xx/adp-ae3xx.c
index a04415deca..54f7178b36 100644
--- a/board/AndesTech/adp-ae3xx/adp-ae3xx.c
+++ b/board/AndesTech/adp-ae3xx/adp-ae3xx.c
@@ -6,8 +6,10 @@
*/
#include <init.h>
+#include <net.h>
#include <asm/mach-types.h>
#include <common.h>
+#include <flash.h>
#if defined(CONFIG_FTMAC100) && !defined(CONFIG_DM_ETH)
#include <netdev.h>
#endif
diff --git a/board/AndesTech/adp-ag101p/adp-ag101p.c b/board/AndesTech/adp-ag101p/adp-ag101p.c
index faf39b4ba6..23cdf4f578 100644
--- a/board/AndesTech/adp-ag101p/adp-ag101p.c
+++ b/board/AndesTech/adp-ag101p/adp-ag101p.c
@@ -6,7 +6,9 @@
*/
#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 f164073000..da5bc5b1f1 100644
--- a/board/AndesTech/ax25-ae350/ax25-ae350.c
+++ b/board/AndesTech/ax25-ae350/ax25-ae350.c
@@ -5,7 +5,10 @@
*/
#include <common.h>
+#include <flash.h>
+#include <image.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/cmd_arc.c b/board/Arcturus/ucp1020/cmd_arc.c
index b50de63c5e..4b30b66e20 100644
--- a/board/Arcturus/ucp1020/cmd_arc.c
+++ b/board/Arcturus/ucp1020/cmd_arc.c
@@ -9,14 +9,17 @@
*/
#include <common.h>
+#include <command.h>
#include <cpu_func.h>
#include <div64.h>
#include <env.h>
+#include <flash.h>
#include <malloc.h>
#include <spi_flash.h>
#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";
@@ -375,7 +378,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/Arcturus/ucp1020/ucp1020.c b/board/Arcturus/ucp1020/ucp1020.c
index b641b72aaa..240e804137 100644
--- a/board/Arcturus/ucp1020/ucp1020.c
+++ b/board/Arcturus/ucp1020/ucp1020.c
@@ -12,7 +12,9 @@
#include <command.h>
#include <env.h>
#include <hwconfig.h>
+#include <image.h>
#include <init.h>
+#include <net.h>
#include <pci.h>
#include <i2c.h>
#include <miiphy.h>
diff --git a/board/BuR/brppt2/board.c b/board/BuR/brppt2/board.c
index c91d2f9494..f156b552a7 100644
--- a/board/BuR/brppt2/board.c
+++ b/board/BuR/brppt2/board.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <cpu_func.h>
#include <hang.h>
+#include <init.h>
#include <spl.h>
#include <dm.h>
#include <miiphy.h>
diff --git a/board/BuR/common/br_resetc.c b/board/BuR/common/br_resetc.c
index 70ad8322ef..5006687fbf 100644
--- a/board/BuR/common/br_resetc.c
+++ b/board/BuR/common/br_resetc.c
@@ -10,6 +10,7 @@
#include <errno.h>
#include <i2c.h>
#include <dm/uclass.h>
+#include <linux/delay.h>
#include "br_resetc.h"
/* I2C Address of controller */
diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c
index de8d455c27..3bc1d064ca 100644
--- a/board/BuR/common/common.c
+++ b/board/BuR/common/common.c
@@ -8,12 +8,14 @@
* Bernecker & Rainer Industrieelektronik GmbH - http://www.br-automation.com
*
*/
+#include <log.h>
#include <version.h>
#include <common.h>
#include <env.h>
#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/BuS/eb_cpu5282/eb_cpu5282.c b/board/BuS/eb_cpu5282/eb_cpu5282.c
index a667413bfc..1d05e40c20 100644
--- a/board/BuS/eb_cpu5282/eb_cpu5282.c
+++ b/board/BuS/eb_cpu5282/eb_cpu5282.c
@@ -226,7 +226,7 @@ int drv_video_init(void)
/*---------------------------------------------------------------------------*/
#ifdef CONFIG_VIDEO
-int do_brightness(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_brightness(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
int rcode = 0;
ulong side;
diff --git a/board/CZ.NIC/turris_mox/mox_sp.c b/board/CZ.NIC/turris_mox/mox_sp.c
index 3c23471e65..cc57b9f095 100644
--- a/board/CZ.NIC/turris_mox/mox_sp.c
+++ b/board/CZ.NIC/turris_mox/mox_sp.c
@@ -6,6 +6,8 @@
#include <common.h>
#include <asm/arch/soc.h>
#include <asm/io.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#define RWTM_BASE (MVEBU_REGISTER(0xb0000))
#define RWTM_CMD_PARAM(i) (size_t)(RWTM_BASE + (i) * 4)
diff --git a/board/CZ.NIC/turris_mox/turris_mox.c b/board/CZ.NIC/turris_mox/turris_mox.c
index 470ea32f9c..f3c3996e32 100644
--- a/board/CZ.NIC/turris_mox/turris_mox.c
+++ b/board/CZ.NIC/turris_mox/turris_mox.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <asm/arch/cpu.h>
#include <asm/arch/soc.h>
+#include <net.h>
#include <asm/io.h>
#include <asm/gpio.h>
#include <clk.h>
@@ -13,6 +14,7 @@
#include <env.h>
#include <fdt_support.h>
#include <init.h>
+#include <linux/delay.h>
#include <linux/libfdt.h>
#include <linux/string.h>
#include <miiphy.h>
diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c
index e1775d3004..2da878d364 100644
--- a/board/CZ.NIC/turris_omnia/turris_omnia.c
+++ b/board/CZ.NIC/turris_omnia/turris_omnia.c
@@ -11,7 +11,9 @@
#include <env.h>
#include <i2c.h>
#include <init.h>
+#include <log.h>
#include <miiphy.h>
+#include <net.h>
#include <netdev.h>
#include <asm/io.h>
#include <asm/arch/cpu.h>
@@ -19,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/CarMediaLab/flea3/flea3.c b/board/CarMediaLab/flea3/flea3.c
index fb66c9ecc7..61d965f5f6 100644
--- a/board/CarMediaLab/flea3/flea3.c
+++ b/board/CarMediaLab/flea3/flea3.c
@@ -11,6 +11,7 @@
#include <init.h>
#include <asm/io.h>
#include <env.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/crm_regs.h>
diff --git a/board/LaCie/net2big_v2/net2big_v2.c b/board/LaCie/net2big_v2/net2big_v2.c
index 50305656e8..dbd8b5755d 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>
@@ -245,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 b7ae58c645..011cc563d1 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>
@@ -109,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/Marvell/aspenite/aspenite.c b/board/Marvell/aspenite/aspenite.c
index c4e506ff3b..c1406d7489 100644
--- a/board/Marvell/aspenite/aspenite.c
+++ b/board/Marvell/aspenite/aspenite.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <init.h>
#include <mvmfp.h>
#include <asm/mach-types.h>
#include <asm/arch/cpu.h>
diff --git a/board/Marvell/db-88f6281-bp/db-88f6281-bp.c b/board/Marvell/db-88f6281-bp/db-88f6281-bp.c
index 729516d9e1..62027bd638 100644
--- a/board/Marvell/db-88f6281-bp/db-88f6281-bp.c
+++ b/board/Marvell/db-88f6281-bp/db-88f6281-bp.c
@@ -1,7 +1,9 @@
// SPDX-License-Identifier: GPL-2.0+
#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 94306b3d8e..e9897b3976 100644
--- a/board/Marvell/db-88f6720/db-88f6720.c
+++ b/board/Marvell/db-88f6720/db-88f6720.c
@@ -4,11 +4,14 @@
*/
#include <common.h>
+#include <init.h>
#include <miiphy.h>
+#include <net.h>
#include <netdev.h>
#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 922576e9d5..60ce940e1d 100644
--- a/board/Marvell/db-88f6820-amc/db-88f6820-amc.c
+++ b/board/Marvell/db-88f6820-amc/db-88f6820-amc.c
@@ -5,11 +5,14 @@
#include <common.h>
#include <i2c.h>
+#include <init.h>
#include <miiphy.h>
+#include <net.h>
#include <netdev.h>
#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 1a0746b9d3..08a3c1cc80 100644
--- a/board/Marvell/db-88f6820-gp/db-88f6820-gp.c
+++ b/board/Marvell/db-88f6820-gp/db-88f6820-gp.c
@@ -5,11 +5,14 @@
#include <common.h>
#include <i2c.h>
+#include <init.h>
#include <miiphy.h>
+#include <net.h>
#include <netdev.h>
#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 604e8c1670..63bb771ab3 100644
--- a/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c
+++ b/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c
@@ -4,11 +4,14 @@
*/
#include <common.h>
+#include <init.h>
#include <miiphy.h>
+#include <net.h>
#include <netdev.h>
#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 cae428ffd0..5f12a27002 100644
--- a/board/Marvell/db-xc3-24g4xg/db-xc3-24g4xg.c
+++ b/board/Marvell/db-xc3-24g4xg/db-xc3-24g4xg.c
@@ -5,7 +5,9 @@
#include <common.h>
#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/Marvell/dreamplug/dreamplug.c b/board/Marvell/dreamplug/dreamplug.c
index 887dd1ed74..7d188c3279 100644
--- a/board/Marvell/dreamplug/dreamplug.c
+++ b/board/Marvell/dreamplug/dreamplug.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <init.h>
#include <miiphy.h>
#include <net.h>
#include <asm/arch/cpu.h>
diff --git a/board/Marvell/gplugd/gplugd.c b/board/Marvell/gplugd/gplugd.c
index fc2bc85f00..1e2f22735e 100644
--- a/board/Marvell/gplugd/gplugd.c
+++ b/board/Marvell/gplugd/gplugd.c
@@ -12,6 +12,8 @@
*/
#include <common.h>
+#include <init.h>
+#include <log.h>
#include <mvmfp.h>
#include <asm/arch/cpu.h>
#include <asm/arch/mfp.h>
@@ -19,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/guruplug/guruplug.c b/board/Marvell/guruplug/guruplug.c
index 71bee76bdc..f3981c66d2 100644
--- a/board/Marvell/guruplug/guruplug.c
+++ b/board/Marvell/guruplug/guruplug.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <init.h>
#include <miiphy.h>
#include <net.h>
#include <asm/mach-types.h>
diff --git a/board/Marvell/mvebu_armada-37xx/board.c b/board/Marvell/mvebu_armada-37xx/board.c
index bef4e1767c..9bea1986d4 100644
--- a/board/Marvell/mvebu_armada-37xx/board.c
+++ b/board/Marvell/mvebu_armada-37xx/board.c
@@ -6,10 +6,12 @@
#include <common.h>
#include <dm.h>
#include <i2c.h>
+#include <init.h>
#include <phy.h>
#include <asm/io.h>
#include <asm/arch/cpu.h>
#include <asm/arch/soc.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/Marvell/mvebu_armada-8k/board.c b/board/Marvell/mvebu_armada-8k/board.c
index 499e89367f..60b0024630 100644
--- a/board/Marvell/mvebu_armada-8k/board.c
+++ b/board/Marvell/mvebu_armada-8k/board.c
@@ -10,6 +10,7 @@
#include <asm/io.h>
#include <asm/arch/cpu.h>
#include <asm/arch/soc.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/Marvell/openrd/openrd.c b/board/Marvell/openrd/openrd.c
index ae9202895d..d9b5b213fe 100644
--- a/board/Marvell/openrd/openrd.c
+++ b/board/Marvell/openrd/openrd.c
@@ -11,6 +11,7 @@
*/
#include <common.h>
+#include <init.h>
#include <miiphy.h>
#include <net.h>
#include <asm/mach-types.h>
diff --git a/board/Marvell/sheevaplug/sheevaplug.c b/board/Marvell/sheevaplug/sheevaplug.c
index 6c6106c23c..6311ed3b2e 100644
--- a/board/Marvell/sheevaplug/sheevaplug.c
+++ b/board/Marvell/sheevaplug/sheevaplug.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <init.h>
#include <miiphy.h>
#include <net.h>
#include <asm/mach-types.h>
diff --git a/board/Seagate/dockstar/dockstar.c b/board/Seagate/dockstar/dockstar.c
index 5a8c6e282b..85dd10e55a 100644
--- a/board/Seagate/dockstar/dockstar.c
+++ b/board/Seagate/dockstar/dockstar.c
@@ -9,6 +9,8 @@
*/
#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 1e4477aa5f..de1ec54466 100644
--- a/board/Seagate/goflexhome/goflexhome.c
+++ b/board/Seagate/goflexhome/goflexhome.c
@@ -12,6 +12,8 @@
*/
#include <common.h>
+#include <bootstage.h>
+#include <init.h>
#include <miiphy.h>
#include <net.h>
#include <asm/mach-types.h>
diff --git a/board/Seagate/nas220/nas220.c b/board/Seagate/nas220/nas220.c
index 99462052f0..3a027d083a 100644
--- a/board/Seagate/nas220/nas220.c
+++ b/board/Seagate/nas220/nas220.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <init.h>
#include <miiphy.h>
#include <net.h>
#include <asm/mach-types.h>
diff --git a/board/Synology/ds109/ds109.c b/board/Synology/ds109/ds109.c
index f2031ef3bb..aa2987d924 100644
--- a/board/Synology/ds109/ds109.c
+++ b/board/Synology/ds109/ds109.c
@@ -6,12 +6,14 @@
*/
#include <common.h>
+#include <init.h>
#include <miiphy.h>
#include <net.h>
#include <asm/setup.h>
#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/Synology/ds414/cmd_syno.c b/board/Synology/ds414/cmd_syno.c
index 777948f90f..a120c3123f 100644
--- a/board/Synology/ds414/cmd_syno.c
+++ b/board/Synology/ds414/cmd_syno.c
@@ -6,8 +6,10 @@
*/
#include <common.h>
+#include <command.h>
#include <div64.h>
#include <env.h>
+#include <net.h>
#include <spi.h>
#include <spi_flash.h>
#include <linux/mtd/mtd.h>
@@ -20,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;
@@ -151,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;
@@ -194,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/Synology/ds414/ds414.c b/board/Synology/ds414/ds414.c
index d23e97c9b9..632205164e 100644
--- a/board/Synology/ds414/ds414.c
+++ b/board/Synology/ds414/ds414.c
@@ -5,10 +5,12 @@
*/
#include <common.h>
+#include <init.h>
#include <miiphy.h>
#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/abilis/tb100/tb100.c b/board/abilis/tb100/tb100.c
index e3fbbbaa8a..47eb64dd1f 100644
--- a/board/abilis/tb100/tb100.c
+++ b/board/abilis/tb100/tb100.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <net.h>
#include <netdev.h>
#include <asm/io.h>
diff --git a/board/advantech/dms-ba16/dms-ba16.c b/board/advantech/dms-ba16/dms-ba16.c
index 299f2f102d..28e505e6c5 100644
--- a/board/advantech/dms-ba16/dms-ba16.c
+++ b/board/advantech/dms-ba16/dms-ba16.c
@@ -6,10 +6,12 @@
*/
#include <init.h>
+#include <net.h>
#include <asm/arch/clock.h>
#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 bb7913025d..ea057d27cf 100644
--- a/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c
+++ b/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c
@@ -6,7 +6,10 @@
#include <common.h>
#include <cpu_func.h>
+#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/advantech/imx8qm_rom7720_a1/spl.c b/board/advantech/imx8qm_rom7720_a1/spl.c
index 3f31a8f9c3..54f48b9ba8 100644
--- a/board/advantech/imx8qm_rom7720_a1/spl.c
+++ b/board/advantech/imx8qm_rom7720_a1/spl.c
@@ -4,6 +4,9 @@
*/
#include <common.h>
#include <dm.h>
+#include <image.h>
+#include <init.h>
+#include <log.h>
#include <spl.h>
#include <fsl_esdhc.h>
diff --git a/board/advantech/som-db5800-som-6867/som-db5800-som-6867.c b/board/advantech/som-db5800-som-6867/som-db5800-som-6867.c
index 8f4c587371..8499fc541f 100644
--- a/board/advantech/som-db5800-som-6867/som-db5800-som-6867.c
+++ b/board/advantech/som-db5800-som-6867/som-db5800-som-6867.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/fsp1/fsp_support.h>
/* ALC262 Verb Table - 10EC0262 */
diff --git a/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c b/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c
index 1f3f293bd9..668484b71b 100644
--- a/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c
+++ b/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c
@@ -5,7 +5,10 @@
*/
#include <common.h>
+#include <init.h>
#include <net.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <linux/io.h>
#include <miiphy.h>
#include <netdev.h>
diff --git a/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c b/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c
index 889ce70d75..e4bf507cc3 100644
--- a/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c
+++ b/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c
@@ -5,10 +5,12 @@
*/
#include <common.h>
+#include <init.h>
#include <miiphy.h>
#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 04b053dc20..c7438aeaf1 100644
--- a/board/alliedtelesis/x530/x530.c
+++ b/board/alliedtelesis/x530/x530.c
@@ -8,8 +8,10 @@
#include <dm.h>
#include <env.h>
#include <i2c.h>
+#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/amazon/kc1/kc1.c b/board/amazon/kc1/kc1.c
index 9034c4fbff..fb1828ff44 100644
--- a/board/amazon/kc1/kc1.c
+++ b/board/amazon/kc1/kc1.c
@@ -8,6 +8,7 @@
#include <config.h>
#include <common.h>
#include <env.h>
+#include <init.h>
#include <linux/ctype.h>
#include <linux/usb/musb.h>
#include <asm/omap_musb.h>
diff --git a/board/amlogic/p200/p200.c b/board/amlogic/p200/p200.c
index 41d331dda2..8f1bf8bfda 100644
--- a/board/amlogic/p200/p200.c
+++ b/board/amlogic/p200/p200.c
@@ -6,6 +6,8 @@
#include <common.h>
#include <dm.h>
#include <env.h>
+#include <init.h>
+#include <net.h>
#include <asm/io.h>
#include <asm/arch/gx.h>
#include <asm/arch/sm.h>
diff --git a/board/amlogic/p201/p201.c b/board/amlogic/p201/p201.c
index e46fcaea6d..597bb71cbf 100644
--- a/board/amlogic/p201/p201.c
+++ b/board/amlogic/p201/p201.c
@@ -6,6 +6,8 @@
#include <common.h>
#include <dm.h>
#include <env.h>
+#include <init.h>
+#include <net.h>
#include <asm/io.h>
#include <asm/arch/gx.h>
#include <asm/arch/sm.h>
diff --git a/board/amlogic/p212/p212.c b/board/amlogic/p212/p212.c
index 094ab5478d..fbc49e9565 100644
--- a/board/amlogic/p212/p212.c
+++ b/board/amlogic/p212/p212.c
@@ -7,6 +7,8 @@
#include <common.h>
#include <dm.h>
#include <env.h>
+#include <init.h>
+#include <net.h>
#include <asm/io.h>
#include <asm/arch/gx.h>
#include <asm/arch/sm.h>
diff --git a/board/amlogic/q200/q200.c b/board/amlogic/q200/q200.c
index f1faa7418e..62e6fa3d19 100644
--- a/board/amlogic/q200/q200.c
+++ b/board/amlogic/q200/q200.c
@@ -7,6 +7,8 @@
#include <common.h>
#include <dm.h>
#include <env.h>
+#include <init.h>
+#include <net.h>
#include <asm/io.h>
#include <asm/arch/gx.h>
#include <asm/arch/mem.h>
diff --git a/board/amlogic/s400/s400.c b/board/amlogic/s400/s400.c
index bdb4eca883..7e2f0cdae3 100644
--- a/board/amlogic/s400/s400.c
+++ b/board/amlogic/s400/s400.c
@@ -6,6 +6,8 @@
#include <common.h>
#include <dm.h>
+#include <init.h>
+#include <net.h>
#include <asm/io.h>
#include <asm/arch/axg.h>
#include <asm/arch/sm.h>
diff --git a/board/amlogic/sei510/sei510.c b/board/amlogic/sei510/sei510.c
index 5de610d85f..5a5148ea68 100644
--- a/board/amlogic/sei510/sei510.c
+++ b/board/amlogic/sei510/sei510.c
@@ -6,7 +6,10 @@
#include <common.h>
#include <dm.h>
+#include <env.h>
#include <env_internal.h>
+#include <init.h>
+#include <net.h>
#include <asm/io.h>
#include <asm/arch/axg.h>
#include <asm/arch/sm.h>
diff --git a/board/amlogic/sei610/sei610.c b/board/amlogic/sei610/sei610.c
index b17eb9ef55..27dba93582 100644
--- a/board/amlogic/sei610/sei610.c
+++ b/board/amlogic/sei610/sei610.c
@@ -6,7 +6,10 @@
#include <common.h>
#include <dm.h>
+#include <env.h>
#include <env_internal.h>
+#include <init.h>
+#include <net.h>
#include <asm/io.h>
#include <asm/arch/axg.h>
#include <asm/arch/sm.h>
diff --git a/board/amlogic/u200/u200.c b/board/amlogic/u200/u200.c
index 69fd29d4fe..373235d77a 100644
--- a/board/amlogic/u200/u200.c
+++ b/board/amlogic/u200/u200.c
@@ -6,6 +6,8 @@
#include <common.h>
#include <dm.h>
+#include <init.h>
+#include <net.h>
#include <asm/io.h>
#include <asm/arch/axg.h>
#include <asm/arch/sm.h>
diff --git a/board/amlogic/w400/w400.c b/board/amlogic/w400/w400.c
index e60dc3a622..47a51710dc 100644
--- a/board/amlogic/w400/w400.c
+++ b/board/amlogic/w400/w400.c
@@ -7,6 +7,8 @@
#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 70671039c2..14931120f6 100644
--- a/board/aristainetos/aristainetos.c
+++ b/board/aristainetos/aristainetos.c
@@ -9,6 +9,9 @@
* Author: Fabio Estevam <fabio.estevam@freescale.com>
*/
+#include <command.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/armadeus/apf27/fpga.c b/board/armadeus/apf27/fpga.c
index e9af8ddd01..9e2f39f981 100644
--- a/board/armadeus/apf27/fpga.c
+++ b/board/armadeus/apf27/fpga.c
@@ -9,6 +9,8 @@
* Keith Outwater, keith_outwater@mvis.com
*/
#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/integrator.c b/board/armltd/integrator/integrator.c
index 1a472f50d3..ac6462d7ff 100644
--- a/board/armltd/integrator/integrator.c
+++ b/board/armltd/integrator/integrator.c
@@ -17,10 +17,12 @@
*/
#include <common.h>
+#include <bootstage.h>
#include <cpu_func.h>
#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/integrator/pci.c b/board/armltd/integrator/pci.c
index c189d23eec..28efc33f1f 100644
--- a/board/armltd/integrator/pci.c
+++ b/board/armltd/integrator/pci.c
@@ -21,8 +21,11 @@
*/
#include <common.h>
#include <init.h>
+#include <log.h>
#include <pci.h>
#include <asm/io.h>
+#include <linux/bug.h>
+#include <linux/delay.h>
#include "integrator-sc.h"
#include "pci_v3.h"
diff --git a/board/armltd/integrator/timer.c b/board/armltd/integrator/timer.c
index d701669be0..d220b877d6 100644
--- a/board/armltd/integrator/timer.c
+++ b/board/armltd/integrator/timer.c
@@ -19,6 +19,7 @@
#include <common.h>
#include <div64.h>
#include <time.h>
+#include <linux/delay.h>
#ifdef CONFIG_ARCH_CINTEGRATOR
#define DIV_CLOCK_INIT 1
@@ -124,7 +125,7 @@ ulong get_timer (ulong base_ticks)
}
/* delay usec useconds */
-void __udelay (unsigned long usec)
+void __udelay(unsigned long usec)
{
ulong tmo, tmp;
diff --git a/board/armltd/vexpress/vexpress_common.c b/board/armltd/vexpress/vexpress_common.c
index 14626c1f55..9dc26b949e 100644
--- a/board/armltd/vexpress/vexpress_common.c
+++ b/board/armltd/vexpress/vexpress_common.c
@@ -16,10 +16,12 @@
* Philippe Robin, <philippe.robin@arm.com>
*/
#include <common.h>
+#include <bootstage.h>
#include <cpu_func.h>
#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/pcie.c b/board/armltd/vexpress64/pcie.c
index 21156a4ca9..02de58b360 100644
--- a/board/armltd/vexpress64/pcie.c
+++ b/board/armltd/vexpress64/pcie.c
@@ -6,9 +6,12 @@
*/
#include <common.h>
+#include <init.h>
+#include <log.h>
#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/armltd/vexpress64/vexpress64.c b/board/armltd/vexpress64/vexpress64.c
index 5c7a8f55f0..fbfa7a18f1 100644
--- a/board/armltd/vexpress64/vexpress64.c
+++ b/board/armltd/vexpress64/vexpress64.c
@@ -7,8 +7,10 @@
#include <common.h>
#include <cpu_func.h>
#include <dm.h>
+#include <init.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/astro/mcf5373l/mcf5373l.c b/board/astro/mcf5373l/mcf5373l.c
index 9adf58eb8a..e7c2b90930 100644
--- a/board/astro/mcf5373l/mcf5373l.c
+++ b/board/astro/mcf5373l/mcf5373l.c
@@ -13,6 +13,7 @@
#include <asm/m5329.h>
#include <asm/immap_5329.h>
#include <asm/io.h>
+#include <linux/delay.h>
/* needed for astro bus: */
#include <asm/uart.h>
diff --git a/board/atmel/at91rm9200ek/at91rm9200ek.c b/board/atmel/at91rm9200ek/at91rm9200ek.c
index e75d5b182f..e4a6776f96 100644
--- a/board/atmel/at91rm9200ek/at91rm9200ek.c
+++ b/board/atmel/at91rm9200ek/at91rm9200ek.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <init.h>
+#include <net.h>
#include <netdev.h>
#include <asm/mach-types.h>
#include <asm/arch/hardware.h>
diff --git a/board/atmel/at91sam9260ek/led.c b/board/atmel/at91sam9260ek/led.c
index 2ea66b9b15..cc6d5d7a05 100644
--- a/board/atmel/at91sam9260ek/led.c
+++ b/board/atmel/at91sam9260ek/led.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/arch/gpio.h>
#include <status_led.h>
diff --git a/board/atmel/at91sam9263ek/at91sam9263ek.c b/board/atmel/at91sam9263ek/at91sam9263ek.c
index b811d931c4..be132bc185 100644
--- a/board/atmel/at91sam9263ek/at91sam9263ek.c
+++ b/board/atmel/at91sam9263ek/at91sam9263ek.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <debug_uart.h>
+#include <flash.h>
#include <init.h>
#include <net.h>
#include <vsprintf.h>
diff --git a/board/atmel/at91sam9n12ek/at91sam9n12ek.c b/board/atmel/at91sam9n12ek/at91sam9n12ek.c
index 90d32353e9..f16c137565 100644
--- a/board/atmel/at91sam9n12ek/at91sam9n12ek.c
+++ b/board/atmel/at91sam9n12ek/at91sam9n12ek.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <init.h>
+#include <net.h>
#include <vsprintf.h>
#include <asm/io.h>
#include <asm/arch/at91sam9x5_matrix.h>
diff --git a/board/atmel/common/mac-spi-nor.c b/board/atmel/common/mac-spi-nor.c
index 96343678e0..ced27b65e6 100644
--- a/board/atmel/common/mac-spi-nor.c
+++ b/board/atmel/common/mac-spi-nor.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
#include <env.h>
+#include <net.h>
#include <linux/mtd/spi-nor.h>
#include <netdev.h>
diff --git a/board/atmel/common/mac_eeprom.c b/board/atmel/common/mac_eeprom.c
index 050aa51ee1..2205dd30f8 100644
--- a/board/atmel/common/mac_eeprom.c
+++ b/board/atmel/common/mac_eeprom.c
@@ -9,6 +9,7 @@
#include <eeprom.h>
#include <env.h>
#include <i2c_eeprom.h>
+#include <net.h>
#include <netdev.h>
int at91_set_ethaddr(int offset)
diff --git a/board/atmel/common/video_display.c b/board/atmel/common/video_display.c
index 5cc52139a7..2666b0b3cd 100644
--- a/board/atmel/common/video_display.c
+++ b/board/atmel/common/video_display.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <atmel_lcd.h>
#include <dm.h>
+#include <init.h>
#include <nand.h>
#include <version.h>
#include <video.h>
diff --git a/board/avionic-design/common/tamonten-ng.c b/board/avionic-design/common/tamonten-ng.c
index 10278de3c7..29bde60228 100644
--- a/board/avionic-design/common/tamonten-ng.c
+++ b/board/avionic-design/common/tamonten-ng.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <asm/arch/pinmux.h>
#include <asm/arch/gp_padctrl.h>
#include <asm/arch/gpio.h>
diff --git a/board/bachmann/ot1200/ot1200.c b/board/bachmann/ot1200/ot1200.c
index 36f37084b3..db0da0ca2f 100644
--- a/board/bachmann/ot1200/ot1200.c
+++ b/board/bachmann/ot1200/ot1200.c
@@ -5,6 +5,8 @@
*/
#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/bachmann/ot1200/ot1200_spl.c b/board/bachmann/ot1200/ot1200_spl.c
index a3a822f65a..7fbd6f2c5d 100644
--- a/board/bachmann/ot1200/ot1200_spl.c
+++ b/board/bachmann/ot1200/ot1200_spl.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <init.h>
#include <spl.h>
#include <asm/arch/mx6-ddr.h>
diff --git a/board/barco/platinum/platinum.c b/board/barco/platinum/platinum.c
index c2c7c09553..7984647e3a 100644
--- a/board/barco/platinum/platinum.c
+++ b/board/barco/platinum/platinum.c
@@ -9,6 +9,7 @@
#include <mmc.h>
#include <fsl_esdhc_imx.h>
#include <miiphy.h>
+#include <net.h>
#include <netdev.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
diff --git a/board/barco/platinum/platinum_picon.c b/board/barco/platinum/platinum_picon.c
index 7d99b1694d..3fc29f9e08 100644
--- a/board/barco/platinum/platinum_picon.c
+++ b/board/barco/platinum/platinum_picon.c
@@ -14,6 +14,7 @@
#include <asm/mach-imx/mxc_i2c.h>
#include <i2c.h>
#include <miiphy.h>
+#include <linux/delay.h>
#include "platinum.h"
diff --git a/board/barco/platinum/platinum_titanium.c b/board/barco/platinum/platinum_titanium.c
index 5758c147ed..9f7c93b4d5 100644
--- a/board/barco/platinum/platinum_titanium.c
+++ b/board/barco/platinum/platinum_titanium.c
@@ -12,6 +12,7 @@
#include <asm/mach-imx/mxc_i2c.h>
#include <miiphy.h>
#include <micrel.h>
+#include <linux/delay.h>
#include "platinum.h"
diff --git a/board/barco/platinum/spl_picon.c b/board/barco/platinum/spl_picon.c
index ec6de460c1..253a64d28e 100644
--- a/board/barco/platinum/spl_picon.c
+++ b/board/barco/platinum/spl_picon.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <i2c.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/arch/iomux.h>
#include <asm/arch/mx6-ddr.h>
diff --git a/board/barco/platinum/spl_titanium.c b/board/barco/platinum/spl_titanium.c
index 263371a2b2..8c91b752ff 100644
--- a/board/barco/platinum/spl_titanium.c
+++ b/board/barco/platinum/spl_titanium.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <i2c.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/arch/iomux.h>
#include <asm/arch/mx6-ddr.h>
diff --git a/board/barco/titanium/titanium.c b/board/barco/titanium/titanium.c
index 6348f123ad..91c70a8473 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>
@@ -21,6 +22,7 @@
#include <micrel.h>
#include <miiphy.h>
#include <netdev.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/beacon/imx8mm/spl.c b/board/beacon/imx8mm/spl.c
index 35be2e89a9..4ee10cf855 100644
--- a/board/beacon/imx8mm/spl.c
+++ b/board/beacon/imx8mm/spl.c
@@ -3,6 +3,8 @@
#include <common.h>
#include <cpu_func.h>
#include <hang.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/beckhoff/mx53cx9020/mx53cx9020.c b/board/beckhoff/mx53cx9020/mx53cx9020.c
index 398e4ed720..617b545232 100644
--- a/board/beckhoff/mx53cx9020/mx53cx9020.c
+++ b/board/beckhoff/mx53cx9020/mx53cx9020.c
@@ -16,6 +16,7 @@
#include <asm/mach-imx/mx5_video.h>
#include <ACEX1K.h>
#include <asm/gpio.h>
+#include <linux/delay.h>
enum LED_GPIOS {
GPIO_SD1_CD = IMX_GPIO_NR(1, 1),
diff --git a/board/birdland/bav335x/board.c b/board/birdland/bav335x/board.c
index 9eb851c397..5900e65466 100644
--- a/board/birdland/bav335x/board.c
+++ b/board/birdland/bav335x/board.c
@@ -11,6 +11,7 @@
#include <env.h>
#include <errno.h>
#include <init.h>
+#include <net.h>
#include <serial.h>
#include <spl.h>
#include <asm/arch/cpu.h>
diff --git a/board/bluegiga/apx4devkit/apx4devkit.c b/board/bluegiga/apx4devkit/apx4devkit.c
index 9268aa0daa..be8eefb365 100644
--- a/board/bluegiga/apx4devkit/apx4devkit.c
+++ b/board/bluegiga/apx4devkit/apx4devkit.c
@@ -14,6 +14,8 @@
*/
#include <common.h>
+#include <init.h>
+#include <net.h>
#include <asm/gpio.h>
#include <asm/io.h>
#include <asm/setup.h>
diff --git a/board/bluewater/gurnard/gurnard.c b/board/bluewater/gurnard/gurnard.c
index 4ae70e1aa5..2bbb203548 100644
--- a/board/bluewater/gurnard/gurnard.c
+++ b/board/bluewater/gurnard/gurnard.c
@@ -33,6 +33,7 @@
#include <asm/arch/clk.h>
#include <asm/arch/gpio.h>
#include <dm/uclass-internal.h>
+#include <linux/delay.h>
#ifdef CONFIG_GURNARD_SPLASH
#include "splash_logo.h"
diff --git a/board/bluewater/snapper9260/snapper9260.c b/board/bluewater/snapper9260/snapper9260.c
index 47ce307880..8e2b7e000f 100644
--- a/board/bluewater/snapper9260/snapper9260.c
+++ b/board/bluewater/snapper9260/snapper9260.c
@@ -23,6 +23,7 @@
#include <netdev.h>
#include <i2c.h>
#include <pca953x.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/bosch/guardian/board.c b/board/bosch/guardian/board.c
index 03ba9e8c5e..1d8fa78154 100644
--- a/board/bosch/guardian/board.c
+++ b/board/bosch/guardian/board.c
@@ -11,9 +11,11 @@
#include <common.h>
#include <cpsw.h>
#include <dm.h>
+#include <env.h>
#include <env_internal.h>
#include <errno.h>
#include <i2c.h>
+#include <init.h>
#include <led.h>
#include <miiphy.h>
#include <panel.h>
diff --git a/board/bosch/shc/board.c b/board/bosch/shc/board.c
index d34f3ba007..6a102d3853 100644
--- a/board/bosch/shc/board.c
+++ b/board/bosch/shc/board.c
@@ -12,11 +12,13 @@
*/
#include <common.h>
+#include <bootstage.h>
#include <cpu_func.h>
#include <env.h>
#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>
@@ -33,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 5018167fcf..d49725daa8 100644
--- a/board/boundary/nitrogen6x/nitrogen6x.c
+++ b/board/boundary/nitrogen6x/nitrogen6x.c
@@ -5,7 +5,10 @@
*/
#include <common.h>
+#include <command.h>
#include <env.h>
+#include <init.h>
+#include <net.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
@@ -13,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>
@@ -986,7 +990,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/broadcom/bcm23550_w1d/bcm23550_w1d.c b/board/broadcom/bcm23550_w1d/bcm23550_w1d.c
index d83eb9bd52..cff9a6840c 100644
--- a/board/broadcom/bcm23550_w1d/bcm23550_w1d.c
+++ b/board/broadcom/bcm23550_w1d/bcm23550_w1d.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <init.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/mach-types.h>
#include <env.h>
diff --git a/board/broadcom/bcm28155_ap/bcm28155_ap.c b/board/broadcom/bcm28155_ap/bcm28155_ap.c
index 40ced1a87c..e3bf808d7e 100644
--- a/board/broadcom/bcm28155_ap/bcm28155_ap.c
+++ b/board/broadcom/bcm28155_ap/bcm28155_ap.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <init.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/mach-types.h>
#include <env.h>
diff --git a/board/broadcom/bcm963158/bcm963158.c b/board/broadcom/bcm963158/bcm963158.c
index db82cd570d..9feaee3c0f 100644
--- a/board/broadcom/bcm963158/bcm963158.c
+++ b/board/broadcom/bcm963158/bcm963158.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <fdtdec.h>
+#include <init.h>
#include <linux/io.h>
#ifdef CONFIG_ARM64
diff --git a/board/broadcom/bcm968360bg/bcm968360bg.c b/board/broadcom/bcm968360bg/bcm968360bg.c
index a5fbc1d297..90af6b88bd 100644
--- a/board/broadcom/bcm968360bg/bcm968360bg.c
+++ b/board/broadcom/bcm968360bg/bcm968360bg.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <fdtdec.h>
+#include <init.h>
#include <linux/io.h>
#ifdef CONFIG_ARM64
diff --git a/board/broadcom/bcm968580xref/bcm968580xref.c b/board/broadcom/bcm968580xref/bcm968580xref.c
index 2e547f5170..1bd723d49e 100644
--- a/board/broadcom/bcm968580xref/bcm968580xref.c
+++ b/board/broadcom/bcm968580xref/bcm968580xref.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <fdtdec.h>
+#include <init.h>
#include <linux/io.h>
#ifdef CONFIG_ARM64
diff --git a/board/broadcom/bcm_ep/board.c b/board/broadcom/bcm_ep/board.c
index e4dbe42649..31cae47028 100644
--- a/board/broadcom/bcm_ep/board.c
+++ b/board/broadcom/bcm_ep/board.c
@@ -6,6 +6,8 @@
#include <common.h>
#include <cpu_func.h>
#include <init.h>
+#include <net.h>
+#include <asm/cache.h>
#include <asm/io.h>
#include <config.h>
#include <netdev.h>
diff --git a/board/broadcom/bcmns2/northstar2.c b/board/broadcom/bcmns2/northstar2.c
index 6cbad9c1f0..91f489aad3 100644
--- a/board/broadcom/bcmns2/northstar2.c
+++ b/board/broadcom/bcmns2/northstar2.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <cpu_func.h>
#include <init.h>
+#include <asm/cache.h>
#include <asm/system.h>
#include <asm/armv8/mmu.h>
diff --git a/board/broadcom/bcmstb/bcmstb.c b/board/broadcom/bcmstb/bcmstb.c
index ee0cf8f9e2..add4285db3 100644
--- a/board/broadcom/bcmstb/bcmstb.c
+++ b/board/broadcom/bcmstb/bcmstb.c
@@ -8,6 +8,7 @@
#include <cpu_func.h>
#include <init.h>
+#include <log.h>
#include <time.h>
#include <linux/types.h>
#include <common.h>
diff --git a/board/bticino/mamoj/mamoj.c b/board/bticino/mamoj/mamoj.c
index 6ad7e31092..b7d37b7004 100644
--- a/board/bticino/mamoj/mamoj.c
+++ b/board/bticino/mamoj/mamoj.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/arch/sys_proto.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/bticino/mamoj/spl.c b/board/bticino/mamoj/spl.c
index 620e4d1de0..a9bb2a55e5 100644
--- a/board/bticino/mamoj/spl.c
+++ b/board/bticino/mamoj/spl.c
@@ -6,8 +6,10 @@
*/
#include <common.h>
+#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 95d3a5e1f5..64daa456b3 100644
--- a/board/buffalo/lsxl/lsxl.c
+++ b/board/buffalo/lsxl/lsxl.c
@@ -8,8 +8,12 @@
*/
#include <common.h>
+#include <bootstage.h>
+#include <command.h>
#include <env.h>
#include <env_internal.h>
+#include <flash.h>
+#include <init.h>
#include <net.h>
#include <malloc.h>
#include <netdev.h>
@@ -20,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/cavium/thunderx/atf.c b/board/cavium/thunderx/atf.c
index 2e7ba69d76..64aa198765 100644
--- a/board/cavium/thunderx/atf.c
+++ b/board/cavium/thunderx/atf.c
@@ -4,7 +4,10 @@
**/
#include <common.h>
+#include <command.h>
+#include <asm/cache.h>
#include <asm/io.h>
+#include <asm/ptrace.h>
#include <asm/system.h>
#include <cavium/thunderx_svc.h>
@@ -223,7 +226,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/cavium/thunderx/thunderx.c b/board/cavium/thunderx/thunderx.c
index 687ade544a..1b1b9d513c 100644
--- a/board/cavium/thunderx/thunderx.c
+++ b/board/cavium/thunderx/thunderx.c
@@ -9,6 +9,7 @@
#include <init.h>
#include <malloc.h>
#include <errno.h>
+#include <net.h>
#include <linux/compiler.h>
#include <cavium/atf.h>
diff --git a/board/ccv/xpress/spl.c b/board/ccv/xpress/spl.c
index 90f655ab2e..38bda8d184 100644
--- a/board/ccv/xpress/spl.c
+++ b/board/ccv/xpress/spl.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <init.h>
#include <spl.h>
#include <asm/io.h>
#include <asm/arch/mx6-ddr.h>
diff --git a/board/ccv/xpress/xpress.c b/board/ccv/xpress/xpress.c
index 0caeea5885..e41f0639ea 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>
@@ -24,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/cirrus/edb93xx/edb93xx.c b/board/cirrus/edb93xx/edb93xx.c
index dfebb7c1c1..0318bf18cf 100644
--- a/board/cirrus/edb93xx/edb93xx.c
+++ b/board/cirrus/edb93xx/edb93xx.c
@@ -16,7 +16,9 @@
#include <config.h>
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
#include <irq_func.h>
+#include <net.h>
#include <netdev.h>
#include <status_led.h>
#include <asm/io.h>
diff --git a/board/cloudengines/pogo_e02/pogo_e02.c b/board/cloudengines/pogo_e02/pogo_e02.c
index 835c3279be..8df039168c 100644
--- a/board/cloudengines/pogo_e02/pogo_e02.c
+++ b/board/cloudengines/pogo_e02/pogo_e02.c
@@ -10,6 +10,8 @@
*/
#include <common.h>
+#include <init.h>
+#include <log.h>
#include <miiphy.h>
#include <net.h>
#include <asm/arch/cpu.h>
diff --git a/board/cobra5272/flash.c b/board/cobra5272/flash.c
index 1d3c5acddf..4337f4879d 100644
--- a/board/cobra5272/flash.c
+++ b/board/cobra5272/flash.c
@@ -7,14 +7,17 @@
#include <common.h>
#include <console.h>
#include <cpu_func.h>
+#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
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 +58,7 @@ Done:
}
-unsigned long flash_init (void)
+unsigned long flash_init(void)
{
int i, j;
ulong size = 0;
@@ -98,9 +101,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 +130,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;
@@ -233,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();
@@ -244,7 +247,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 +314,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/compal/paz00/paz00.c b/board/compal/paz00/paz00.c
index a7a1be3c05..64d0860d21 100644
--- a/board/compal/paz00/paz00.c
+++ b/board/compal/paz00/paz00.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/arch/tegra.h>
#include <asm/arch/pinmux.h>
diff --git a/board/compulab/cl-som-imx7/cl-som-imx7.c b/board/compulab/cl-som-imx7/cl-som-imx7.c
index 9277094e44..8b3bd5e5f6 100644
--- a/board/compulab/cl-som-imx7/cl-som-imx7.c
+++ b/board/compulab/cl-som-imx7/cl-som-imx7.c
@@ -11,9 +11,11 @@
#include <env.h>
#include <init.h>
#include <mmc.h>
+#include <net.h>
#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 3e185ad82a..4d71bedfb9 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>
@@ -34,6 +35,7 @@
#include <dm/platform_data/serial_mxc.h>
#include <dm/device-internal.h>
#include <jffs2/load_kernel.h>
+#include <linux/delay.h>
#include "common.h"
#include "../common/eeprom.h"
#include "../common/common.h"
diff --git a/board/compulab/cm_fx6/spl.c b/board/compulab/cm_fx6/spl.c
index 592d741095..7d8243563a 100644
--- a/board/compulab/cm_fx6/spl.c
+++ b/board/compulab/cm_fx6/spl.c
@@ -20,6 +20,7 @@
#include <asm/arch/crm_regs.h>
#include <asm/mach-imx/iomux-v3.h>
#include <fsl_esdhc_imx.h>
+#include <linux/delay.h>
#include "common.h"
enum ddr_config {
diff --git a/board/compulab/cm_t335/cm_t335.c b/board/compulab/cm_t335/cm_t335.c
index 561f2f30bb..75b56f7eee 100644
--- a/board/compulab/cm_t335/cm_t335.c
+++ b/board/compulab/cm_t335/cm_t335.c
@@ -11,8 +11,10 @@
#include <env.h>
#include <errno.h>
#include <miiphy.h>
+#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_t335/spl.c b/board/compulab/cm_t335/spl.c
index 39ca535d11..8662632a7e 100644
--- a/board/compulab/cm_t335/spl.c
+++ b/board/compulab/cm_t335/spl.c
@@ -13,6 +13,7 @@
#include <cpu_func.h>
#include <errno.h>
#include <init.h>
+#include <log.h>
#include <asm/arch/ddr_defs.h>
#include <asm/arch/clock.h>
diff --git a/board/compulab/cm_t35/cm_t35.c b/board/compulab/cm_t35/cm_t35.c
index b52358baac..4b67df4f1a 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>
@@ -22,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 2aa453471d..f26e42b263 100644
--- a/board/compulab/cm_t43/cm_t43.c
+++ b/board/compulab/cm_t43/cm_t43.c
@@ -7,9 +7,11 @@
#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>
+#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 811bbb528a..413f3c9c8f 100644
--- a/board/compulab/cm_t54/cm_t54.c
+++ b/board/compulab/cm_t54/cm_t54.c
@@ -10,10 +10,12 @@
#include <common.h>
#include <env.h>
#include <fdt_support.h>
+#include <net.h>
#include <usb.h>
#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/cm_t54/mux.c b/board/compulab/cm_t54/mux.c
index 50d58217e4..ea90bc6e34 100644
--- a/board/compulab/cm_t54/mux.c
+++ b/board/compulab/cm_t54/mux.c
@@ -10,6 +10,7 @@
#ifndef _CM_T54_MUX_DATA_H
#define _CM_T54_MUX_DATA_H
+#include <common.h>
#include <asm/arch/mux_omap5.h>
#include <asm/arch/sys_proto.h>
diff --git a/board/compulab/common/common.c b/board/compulab/common/common.c
index 2f92c6564d..528c97df19 100644
--- a/board/compulab/common/common.c
+++ b/board/compulab/common/common.c
@@ -10,6 +10,7 @@
#include <asm/bootm.h>
#include <asm/gpio.h>
#include <asm/setup.h>
+#include <linux/delay.h>
#include "common.h"
#include "eeprom.h"
diff --git a/board/compulab/common/omap3_smc911x.c b/board/compulab/common/omap3_smc911x.c
index 4b869ec3af..f0d365272c 100644
--- a/board/compulab/common/omap3_smc911x.c
+++ b/board/compulab/common/omap3_smc911x.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <netdev.h>
+#include <linux/delay.h>
#include <asm/io.h>
#include <linux/errno.h>
diff --git a/board/congatec/cgtqmx6eval/cgtqmx6eval.c b/board/congatec/cgtqmx6eval/cgtqmx6eval.c
index 49c731f891..044cefd979 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>
@@ -26,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/corscience/tricorder/tricorder-eeprom.c b/board/corscience/tricorder/tricorder-eeprom.c
index 23c2ea9186..192af304d9 100644
--- a/board/corscience/tricorder/tricorder-eeprom.c
+++ b/board/corscience/tricorder/tricorder-eeprom.c
@@ -5,6 +5,7 @@
* Andreas Bießmann <andreas.biessmann@corscience.de>
*/
#include <common.h>
+#include <command.h>
#include <eeprom.h>
#include <i2c.h>
#include <u-boot/crc.h>
@@ -186,7 +187,7 @@ int tricorder_eeprom_write(unsigned devaddr, const char *name,
return ret;
}
-int do_tricorder_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_tricorder_eeprom(struct cmd_tbl *cmdtp, int flag, int argc, char *argv[])
{
if (argc == 3) {
ulong dev_addr = simple_strtoul(argv[2], NULL, 16);
diff --git a/board/corscience/tricorder/tricorder.c b/board/corscience/tricorder/tricorder.c
index cec819b36f..30974e8d92 100644
--- a/board/corscience/tricorder/tricorder.c
+++ b/board/corscience/tricorder/tricorder.c
@@ -10,6 +10,7 @@
* Frederik Kriewitz <frederik@kriewitz.eu>
*/
#include <common.h>
+#include <init.h>
#include <malloc.h>
#include <twl4030.h>
#include <status_led.h>
diff --git a/board/cortina/presidio-asic/presidio.c b/board/cortina/presidio-asic/presidio.c
index b4fa01f368..3c132f1271 100644
--- a/board/cortina/presidio-asic/presidio.c
+++ b/board/cortina/presidio-asic/presidio.c
@@ -4,10 +4,12 @@
*
*/
#include <common.h>
+#include <init.h>
#include <malloc.h>
#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/creative/xfi3/xfi3.c b/board/creative/xfi3/xfi3.c
index 228a3943c0..adc908143d 100644
--- a/board/creative/xfi3/xfi3.c
+++ b/board/creative/xfi3/xfi3.c
@@ -11,12 +11,15 @@
#include <common.h>
#include <errno.h>
+#include <init.h>
+#include <net.h>
#include <asm/gpio.h>
#include <asm/io.h>
#include <asm/arch/iomux-mx23.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/clock.h>
#include <asm/arch/sys_proto.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/cssi/MCR3000/MCR3000.c b/board/cssi/MCR3000/MCR3000.c
index 138d0c61f1..570e846a21 100644
--- a/board/cssi/MCR3000/MCR3000.c
+++ b/board/cssi/MCR3000/MCR3000.c
@@ -17,6 +17,7 @@
#include <asm/io.h>
#include <dm/uclass.h>
#include <wdt.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/d-link/dns325/dns325.c b/board/d-link/dns325/dns325.c
index dfdc683683..0ae2e7d88c 100644
--- a/board/d-link/dns325/dns325.c
+++ b/board/d-link/dns325/dns325.c
@@ -10,6 +10,8 @@
*/
#include <common.h>
+#include <init.h>
+#include <log.h>
#include <miiphy.h>
#include <net.h>
#include <netdev.h>
diff --git a/board/davinci/da8xxevm/da850evm.c b/board/davinci/da8xxevm/da850evm.c
index d9019de6e0..a3b0f8bf09 100644
--- a/board/davinci/da8xxevm/da850evm.c
+++ b/board/davinci/da8xxevm/da850evm.c
@@ -12,6 +12,7 @@
#include <dm.h>
#include <env.h>
#include <i2c.h>
+#include <init.h>
#include <net.h>
#include <spi.h>
#include <spi_flash.h>
diff --git a/board/davinci/da8xxevm/omapl138_lcdk.c b/board/davinci/da8xxevm/omapl138_lcdk.c
index 608a7f28eb..adb56c6c87 100644
--- a/board/davinci/da8xxevm/omapl138_lcdk.c
+++ b/board/davinci/da8xxevm/omapl138_lcdk.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <env.h>
#include <i2c.h>
+#include <init.h>
#include <net.h>
#include <asm/arch/hardware.h>
#include <asm/ti-common/davinci_nand.h>
diff --git a/board/dfi/dfi-bt700/dfi-bt700.c b/board/dfi/dfi-bt700/dfi-bt700.c
index f4c4b1d663..87506a77a1 100644
--- a/board/dfi/dfi-bt700/dfi-bt700.c
+++ b/board/dfi/dfi-bt700/dfi-bt700.c
@@ -5,10 +5,12 @@
#include <common.h>
#include <init.h>
+#include <log.h>
#include <nuvoton_nct6102d.h>
#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 b6f8b11a10..8f50433f17 100644
--- a/board/dhelectronics/dh_imx6/dh_imx6.c
+++ b/board/dhelectronics/dh_imx6/dh_imx6.c
@@ -8,7 +8,9 @@
#include <common.h>
#include <dm.h>
#include <eeprom.h>
+#include <image.h>
#include <init.h>
+#include <net.h>
#include <dm/device-internal.h>
#include <asm/arch/clock.h>
#include <asm/arch/crm_regs.h>
@@ -30,6 +32,7 @@
#include <i2c_eeprom.h>
#include <mmc.h>
#include <usb.h>
+#include <linux/delay.h>
#include <usb/ehci-ci.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/dhelectronics/dh_imx6/dh_imx6_spl.c b/board/dhelectronics/dh_imx6/dh_imx6_spl.c
index f2c3ac3e28..ed4dea45ea 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>
@@ -24,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 85d56f6082..26e827bc38 100644
--- a/board/dhelectronics/dh_stm32mp1/board.c
+++ b/board/dhelectronics/dh_stm32mp1/board.c
@@ -5,6 +5,8 @@
#include <common.h>
#include <adc.h>
+#include <log.h>
+#include <net.h>
#include <asm/arch/stm32.h>
#include <asm/arch/sys_proto.h>
#include <asm/gpio.h>
@@ -30,6 +32,8 @@
#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>
#include <reset.h>
diff --git a/board/ea/mx7ulp_com/mx7ulp_com.c b/board/ea/mx7ulp_com/mx7ulp_com.c
index 6fc1631bf7..a9b8a32108 100644
--- a/board/ea/mx7ulp_com/mx7ulp_com.c
+++ b/board/ea/mx7ulp_com/mx7ulp_com.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/arch/sys_proto.h>
#include <asm/arch/mx7ulp-pins.h>
diff --git a/board/eets/pdu001/board.c b/board/eets/pdu001/board.c
index fc4587ed0d..a602b623ad 100644
--- a/board/eets/pdu001/board.c
+++ b/board/eets/pdu001/board.c
@@ -13,6 +13,7 @@
#include <env.h>
#include <errno.h>
#include <init.h>
+#include <log.h>
#include <spl.h>
#include <i2c.h>
#include <watchdog.h>
diff --git a/board/egnite/ethernut5/ethernut5_pwrman.c b/board/egnite/ethernut5/ethernut5_pwrman.c
index aa99d29c21..81f1abf2fa 100644
--- a/board/egnite/ethernut5/ethernut5_pwrman.c
+++ b/board/egnite/ethernut5/ethernut5_pwrman.c
@@ -32,11 +32,13 @@
* 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>
#include <asm/io.h>
#include <i2c.h>
+#include <linux/delay.h>
#include "ethernut5_pwrman.h"
@@ -215,7 +217,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/el/el6x/el6x.c b/board/el/el6x/el6x.c
index 9aa71b9941..d3e2981fa8 100644
--- a/board/el/el6x/el6x.c
+++ b/board/el/el6x/el6x.c
@@ -5,12 +5,15 @@
* Based on other i.MX6 boards
*/
+#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>
#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/elgin/elgin_rv1108/elgin_rv1108.c b/board/elgin/elgin_rv1108/elgin_rv1108.c
index c5a1cc95e4..5d8f62244b 100644
--- a/board/elgin/elgin_rv1108/elgin_rv1108.c
+++ b/board/elgin/elgin_rv1108/elgin_rv1108.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <init.h>
#include <syscon.h>
#include <asm/io.h>
#include <asm/arch-rockchip/clock.h>
diff --git a/board/embest/mx6boards/mx6boards.c b/board/embest/mx6boards/mx6boards.c
index bf5c020af1..e0834f03c7 100644
--- a/board/embest/mx6boards/mx6boards.c
+++ b/board/embest/mx6boards/mx6boards.c
@@ -12,12 +12,15 @@
* Copyright (C) 2013 Jon Nettleton <jon.nettleton@gmail.com>.
*/
+#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>
#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/emulation/qemu-arm/qemu-arm.c b/board/emulation/qemu-arm/qemu-arm.c
index 4e18733001..69e8ef46f1 100644
--- a/board/emulation/qemu-arm/qemu-arm.c
+++ b/board/emulation/qemu-arm/qemu-arm.c
@@ -6,6 +6,8 @@
#include <common.h>
#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 c3f96988b1..dcfd3f20be 100644
--- a/board/emulation/qemu-riscv/qemu-riscv.c
+++ b/board/emulation/qemu-riscv/qemu-riscv.c
@@ -7,6 +7,8 @@
#include <dm.h>
#include <env.h>
#include <fdtdec.h>
+#include <image.h>
+#include <log.h>
#include <spl.h>
#include <init.h>
#include <virtio_types.h>
diff --git a/board/engicam/common/board.c b/board/engicam/common/board.c
index 9483516ca0..5a2003d509 100644
--- a/board/engicam/common/board.c
+++ b/board/engicam/common/board.c
@@ -10,6 +10,7 @@
#include <env.h>
#include <hang.h>
#include <init.h>
+#include <log.h>
#include <mmc.h>
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
diff --git a/board/engicam/common/spl.c b/board/engicam/common/spl.c
index a9820a9028..6a0612481a 100644
--- a/board/engicam/common/spl.c
+++ b/board/engicam/common/spl.c
@@ -6,8 +6,11 @@
*/
#include <common.h>
+#include <image.h>
+#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/meesc/meesc.c b/board/esd/meesc/meesc.c
index 6c5992733c..fd7d6db9bc 100644
--- a/board/esd/meesc/meesc.c
+++ b/board/esd/meesc/meesc.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <env.h>
#include <init.h>
+#include <net.h>
#include <serial.h>
#include <vsprintf.h>
#include <asm/io.h>
diff --git a/board/esd/vme8349/caddy.c b/board/esd/vme8349/caddy.c
index db8d7bfe9b..ba91f4b3c8 100644
--- a/board/esd/vme8349/caddy.c
+++ b/board/esd/vme8349/caddy.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <command.h>
#include <console.h>
#include <ioports.h>
#include <mpc83xx.h>
@@ -36,7 +37,7 @@ void generate_answer(struct caddy_cmd *cmd, uint32_t status, uint32_t *result)
caddy_interface->answer_in = ptr;
}
-int do_caddy(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_caddy(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
unsigned long base_addr;
uint32_t ptr;
diff --git a/board/esd/vme8349/pci.c b/board/esd/vme8349/pci.c
index 349e7b567c..bf51d39b67 100644
--- a/board/esd/vme8349/pci.c
+++ b/board/esd/vme8349/pci.c
@@ -18,6 +18,7 @@
#include <pci.h>
#include <i2c.h>
#include <asm/fsl_i2c.h>
+#include <linux/delay.h>
#include "vme8349pin.h"
static struct pci_region pci1_regions[] = {
diff --git a/board/esd/vme8349/vme8349.c b/board/esd/vme8349/vme8349.c
index ff811643a6..f54c89d154 100644
--- a/board/esd/vme8349/vme8349.c
+++ b/board/esd/vme8349/vme8349.c
@@ -16,6 +16,7 @@
#include <init.h>
#include <ioports.h>
#include <mpc83xx.h>
+#include <net.h>
#include <asm/mpc8349_pci.h>
#if defined(CONFIG_OF_LIBFDT)
#include <linux/libfdt.h>
diff --git a/board/firefly/firefly-rk3288/firefly-rk3288.c b/board/firefly/firefly-rk3288/firefly-rk3288.c
index a2b0eb5a99..1965985a0f 100644
--- a/board/firefly/firefly-rk3288/firefly-rk3288.c
+++ b/board/firefly/firefly-rk3288/firefly-rk3288.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <hang.h>
+#include <log.h>
#ifdef CONFIG_SPL_BUILD
static int setup_led(void)
diff --git a/board/firefly/firefly-rk3308/roc_cc_rk3308.c b/board/firefly/firefly-rk3308/roc_cc_rk3308.c
index 5f0a6594b6..28dcc2a690 100644
--- a/board/firefly/firefly-rk3308/roc_cc_rk3308.c
+++ b/board/firefly/firefly-rk3308/roc_cc_rk3308.c
@@ -8,6 +8,7 @@
#include <asm/io.h>
#include <asm/arch/grf_rk3308.h>
#include <asm/arch-rockchip/hardware.h>
+#include <linux/bitops.h>
#if defined(CONFIG_DEBUG_UART)
#define GRF_BASE 0xff000000
diff --git a/board/firefly/roc-pc-rk3399/roc-pc-rk3399.c b/board/firefly/roc-pc-rk3399/roc-pc-rk3399.c
index 0fe1914c0f..7c3a803654 100644
--- a/board/firefly/roc-pc-rk3399/roc-pc-rk3399.c
+++ b/board/firefly/roc-pc-rk3399/roc-pc-rk3399.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <asm/arch-rockchip/periph.h>
#include <power/regulator.h>
#include <spl_gpio.h>
diff --git a/board/freescale/b4860qds/b4860qds.c b/board/freescale/b4860qds/b4860qds.c
index e7f684bfb3..e10f948ae5 100644
--- a/board/freescale/b4860qds/b4860qds.c
+++ b/board/freescale/b4860qds/b4860qds.c
@@ -8,12 +8,15 @@
#include <env.h>
#include <fdt_support.h>
#include <i2c.h>
+#include <image.h>
#include <init.h>
#include <irq_func.h>
+#include <log.h>
#include <netdev.h>
#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/b4860qds/ddr.c b/board/freescale/b4860qds/ddr.c
index de9f5f5f8b..d3aa349ddf 100644
--- a/board/freescale/b4860qds/ddr.c
+++ b/board/freescale/b4860qds/ddr.c
@@ -7,6 +7,8 @@
#include <i2c.h>
#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 67fb1b9b2b..6d5f3d1fda 100644
--- a/board/freescale/b4860qds/eth_b4860qds.c
+++ b/board/freescale/b4860qds/eth_b4860qds.c
@@ -19,6 +19,8 @@
*/
#include <common.h>
+#include <log.h>
+#include <net.h>
#include <netdev.h>
#include <asm/fsl_serdes.h>
#include <fm_eth.h>
diff --git a/board/freescale/bsc9131rdb/bsc9131rdb.c b/board/freescale/bsc9131rdb/bsc9131rdb.c
index 30e7a1f7ed..75c2aec75d 100644
--- a/board/freescale/bsc9131rdb/bsc9131rdb.c
+++ b/board/freescale/bsc9131rdb/bsc9131rdb.c
@@ -4,6 +4,8 @@
*/
#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/bsc9131rdb/spl_minimal.c b/board/freescale/bsc9131rdb/spl_minimal.c
index 79df0f3cbd..4ae9ba06c8 100644
--- a/board/freescale/bsc9131rdb/spl_minimal.c
+++ b/board/freescale/bsc9131rdb/spl_minimal.c
@@ -12,6 +12,7 @@
#include <asm/fsl_law.h>
#include <fsl_ddr_sdram.h>
#include <asm/global_data.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/bsc9132qds/bsc9132qds.c b/board/freescale/bsc9132qds/bsc9132qds.c
index ab05d84190..6870674f7a 100644
--- a/board/freescale/bsc9132qds/bsc9132qds.c
+++ b/board/freescale/bsc9132qds/bsc9132qds.c
@@ -4,7 +4,9 @@
*/
#include <common.h>
+#include <image.h>
#include <init.h>
+#include <net.h>
#include <asm/processor.h>
#include <asm/mmu.h>
#include <asm/cache.h>
diff --git a/board/freescale/bsc9132qds/spl_minimal.c b/board/freescale/bsc9132qds/spl_minimal.c
index dc72b2e2f2..dd56ad6b2b 100644
--- a/board/freescale/bsc9132qds/spl_minimal.c
+++ b/board/freescale/bsc9132qds/spl_minimal.c
@@ -12,6 +12,7 @@
#include <asm/fsl_law.h>
#include <fsl_ddr_sdram.h>
#include <asm/global_data.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/c29xpcie/c29xpcie.c b/board/freescale/c29xpcie/c29xpcie.c
index a9ea986579..74502c6d18 100644
--- a/board/freescale/c29xpcie/c29xpcie.c
+++ b/board/freescale/c29xpcie/c29xpcie.c
@@ -4,7 +4,9 @@
*/
#include <common.h>
+#include <image.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/cpld.c b/board/freescale/c29xpcie/cpld.c
index f57047d1d3..826af428ce 100644
--- a/board/freescale/c29xpcie/cpld.c
+++ b/board/freescale/c29xpcie/cpld.c
@@ -17,6 +17,7 @@
#include <common.h>
#include <command.h>
#include <asm/io.h>
+#include <linux/delay.h>
#include "cpld.h"
/**
@@ -89,7 +90,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/arm_sleep.c b/board/freescale/common/arm_sleep.c
index d18b4fc24b..bb1ef99792 100644
--- a/board/freescale/common/arm_sleep.c
+++ b/board/freescale/common/arm_sleep.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#ifndef CONFIG_ARMV7_NONSEC
#error " Deep sleep needs non-secure mode support. "
diff --git a/board/freescale/common/cmd_esbc_validate.c b/board/freescale/common/cmd_esbc_validate.c
index 36b620ca23..638aa3c19a 100644
--- a/board/freescale/common/cmd_esbc_validate.c
+++ b/board/freescale/common/cmd_esbc_validate.c
@@ -8,8 +8,8 @@
#include <env.h>
#include <fsl_validate.h>
-int do_esbc_halt(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+int do_esbc_halt(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
if (fsl_check_boot_mode_secure() == 0) {
printf("Boot Mode is Non-Secure. Not entering spin loop.\n");
@@ -24,8 +24,8 @@ loop:
}
#ifndef CONFIG_SPL_BUILD
-static int do_esbc_validate(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_esbc_validate(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
char *hash_str = NULL;
uintptr_t haddr;
diff --git a/board/freescale/common/diu_ch7301.c b/board/freescale/common/diu_ch7301.c
index 7f11123e6f..02a271895b 100644
--- a/board/freescale/common/diu_ch7301.c
+++ b/board/freescale/common/diu_ch7301.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <stdio_dev.h>
#include <i2c.h>
+#include <linux/delay.h>
#define I2C_DVI_INPUT_DATA_FORMAT_REG 0x1F
#define I2C_DVI_PLL_CHARGE_CNTL_REG 0x33
diff --git a/board/freescale/common/fsl_chain_of_trust.c b/board/freescale/common/fsl_chain_of_trust.c
index a024e7239e..cafb24971b 100644
--- a/board/freescale/common/fsl_chain_of_trust.c
+++ b/board/freescale/common/fsl_chain_of_trust.c
@@ -9,6 +9,7 @@
#include <fsl_validate.h>
#include <fsl_secboot_err.h>
#include <fsl_sfp.h>
+#include <log.h>
#include <dm/root.h>
#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_FRAMEWORK)
diff --git a/board/freescale/common/fsl_validate.c b/board/freescale/common/fsl_validate.c
index 2bf9d58746..564a8b3b54 100644
--- a/board/freescale/common/fsl_validate.c
+++ b/board/freescale/common/fsl_validate.c
@@ -5,11 +5,13 @@
#include <common.h>
#include <dm.h>
+#include <flash.h>
#include <fsl_validate.h>
#include <fsl_secboot_err.h>
#include <fsl_sfp.h>
#include <fsl_sec.h>
#include <command.h>
+#include <log.h>
#include <malloc.h>
#include <u-boot/rsa-mod-exp.h>
#include <hash.h>
diff --git a/board/freescale/common/ics307_clk.c b/board/freescale/common/ics307_clk.c
index f1e60cf277..2143395781 100644
--- a/board/freescale/common/ics307_clk.c
+++ b/board/freescale/common/ics307_clk.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include "ics307_clk.h"
diff --git a/board/freescale/common/idt8t49n222a_serdes_clk.c b/board/freescale/common/idt8t49n222a_serdes_clk.c
index 4f8e8b7d42..bb3cdac841 100644
--- a/board/freescale/common/idt8t49n222a_serdes_clk.c
+++ b/board/freescale/common/idt8t49n222a_serdes_clk.c
@@ -5,6 +5,8 @@
*/
#include "idt8t49n222a_serdes_clk.h"
+#include <log.h>
+#include <linux/delay.h>
#define DEVICE_ID_REG 0x00
diff --git a/board/freescale/common/mc34vr500.c b/board/freescale/common/mc34vr500.c
index d4f0f0c652..d6b4c65a3c 100644
--- a/board/freescale/common/mc34vr500.c
+++ b/board/freescale/common/mc34vr500.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <errno.h>
#include <i2c.h>
+#include <log.h>
#include <power/pmic.h>
#include <power/mc34vr500_pmic.h>
diff --git a/board/freescale/common/mpc85xx_sleep.c b/board/freescale/common/mpc85xx_sleep.c
index 739a416730..6f6f4d40fc 100644
--- a/board/freescale/common/mpc85xx_sleep.c
+++ b/board/freescale/common/mpc85xx_sleep.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/immap_85xx.h>
#include "sleep.h"
#ifdef CONFIG_U_QE
diff --git a/board/freescale/common/ngpixis.c b/board/freescale/common/ngpixis.c
index d7254010bf..37a6f775a0 100644
--- a/board/freescale/common/ngpixis.c
+++ b/board/freescale/common/ngpixis.c
@@ -171,7 +171,8 @@ void pixis_sysclk_set(unsigned long sysclk)
PIXIS_WRITE(sclk[2], sclk2);
}
-int pixis_reset_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int pixis_reset_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
unsigned int i;
unsigned long sysclk;
diff --git a/board/freescale/common/ns_access.c b/board/freescale/common/ns_access.c
index 0e6f2135b4..ee8ed616cb 100644
--- a/board/freescale/common/ns_access.c
+++ b/board/freescale/common/ns_access.c
@@ -4,6 +4,8 @@
*/
#include <common.h>
+#include <log.h>
+#include <asm/cache.h>
#include <asm/io.h>
#include <fsl_csu.h>
#include <asm/arch/ns_access.h>
diff --git a/board/freescale/common/pixis.c b/board/freescale/common/pixis.c
index e9b7127833..4127fbc139 100644
--- a/board/freescale/common/pixis.c
+++ b/board/freescale/common/pixis.c
@@ -266,8 +266,8 @@ static void set_px_go_with_watchdog(void)
/* Disable the watchdog
*
*/
-static int pixis_disable_watchdog_cmd(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int pixis_disable_watchdog_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
/* Disable the VELA sequencer and the watchdog */
clrbits_8(pixis_base + PIXIS_VCTL, 9);
@@ -285,7 +285,8 @@ U_BOOT_CMD(
/* Enable or disable SGMII mode for a TSEC
*/
-static int pixis_set_sgmii(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int pixis_set_sgmii(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int which_tsec = -1;
unsigned char mask;
@@ -411,7 +412,8 @@ static unsigned long strfractoint(char *strptr)
return intval + decval;
}
-static int pixis_reset_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int pixis_reset_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
unsigned int i;
char *p_cf = NULL;
diff --git a/board/freescale/common/qixis.c b/board/freescale/common/qixis.c
index dd1ee90b3c..591203132f 100644
--- a/board/freescale/common/qixis.c
+++ b/board/freescale/common/qixis.c
@@ -233,7 +233,8 @@ void __weak qixis_dump_switch(void)
puts("Reverse engineering switch is not implemented for this board\n");
}
-static int qixis_reset_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int qixis_reset_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int i;
diff --git a/board/freescale/common/sgmii_riser.c b/board/freescale/common/sgmii_riser.c
index f3e0fb2cd5..2315793010 100644
--- a/board/freescale/common/sgmii_riser.c
+++ b/board/freescale/common/sgmii_riser.c
@@ -14,6 +14,7 @@
#include <config.h>
#include <common.h>
+#include <log.h>
#include <net.h>
#include <linux/libfdt.h>
#include <tsec.h>
diff --git a/board/freescale/common/sys_eeprom.c b/board/freescale/common/sys_eeprom.c
index c487e3a515..728245d81c 100644
--- a/board/freescale/common/sys_eeprom.c
+++ b/board/freescale/common/sys_eeprom.c
@@ -10,7 +10,9 @@
#include <command.h>
#include <env.h>
#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
@@ -382,7 +384,7 @@ static void set_mac_address(unsigned int index, const char *string)
update_crc();
}
-int do_mac(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_mac(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
char cmd;
diff --git a/board/freescale/common/vid.c b/board/freescale/common/vid.c
index 20852476dd..ed0d9b471c 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>
@@ -16,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)
@@ -925,9 +927,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 +943,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/common/vsc3316_3308.c b/board/freescale/common/vsc3316_3308.c
index f0d273ca20..8aceb8ef17 100644
--- a/board/freescale/common/vsc3316_3308.c
+++ b/board/freescale/common/vsc3316_3308.c
@@ -5,6 +5,7 @@
*/
#include "vsc3316_3308.h"
+#include <log.h>
#define REVISION_ID_REG 0x7E
#define INTERFACE_MODE_REG 0x79
diff --git a/board/freescale/common/zm7300.c b/board/freescale/common/zm7300.c
index acd5343b21..03679e723f 100644
--- a/board/freescale/common/zm7300.c
+++ b/board/freescale/common/zm7300.c
@@ -5,6 +5,7 @@
/* Power-One ZM7300 DPM */
#include "zm7300.h"
+#include <log.h>
#define DPM_WP 0x96
#define WRP_OPCODE 0x01
diff --git a/board/freescale/corenet_ds/corenet_ds.c b/board/freescale/corenet_ds/corenet_ds.c
index 66eea32e07..f0c7bed68f 100644
--- a/board/freescale/corenet_ds/corenet_ds.c
+++ b/board/freescale/corenet_ds/corenet_ds.c
@@ -7,6 +7,7 @@
#include <command.h>
#include <env.h>
#include <fdt_support.h>
+#include <image.h>
#include <init.h>
#include <netdev.h>
#include <linux/compiler.h>
diff --git a/board/freescale/corenet_ds/ddr.c b/board/freescale/corenet_ds/ddr.c
index 9c8731ce78..19f6e8700d 100644
--- a/board/freescale/corenet_ds/ddr.c
+++ b/board/freescale/corenet_ds/ddr.c
@@ -6,6 +6,8 @@
#include <common.h>
#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_hydra.c b/board/freescale/corenet_ds/eth_hydra.c
index 45c23df27e..a17ca7ac60 100644
--- a/board/freescale/corenet_ds/eth_hydra.c
+++ b/board/freescale/corenet_ds/eth_hydra.c
@@ -48,6 +48,7 @@
*/
#include <common.h>
+#include <net.h>
#include <netdev.h>
#include <asm/fsl_serdes.h>
#include <fm_eth.h>
diff --git a/board/freescale/corenet_ds/eth_p4080.c b/board/freescale/corenet_ds/eth_p4080.c
index 0979c5f489..801a6f44f0 100644
--- a/board/freescale/corenet_ds/eth_p4080.c
+++ b/board/freescale/corenet_ds/eth_p4080.c
@@ -5,6 +5,8 @@
#include <common.h>
#include <command.h>
+#include <fdt_support.h>
+#include <net.h>
#include <netdev.h>
#include <asm/mmu.h>
#include <asm/processor.h>
@@ -20,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/corenet_ds/eth_superhydra.c b/board/freescale/corenet_ds/eth_superhydra.c
index 1962b7e3c7..8ca220b840 100644
--- a/board/freescale/corenet_ds/eth_superhydra.c
+++ b/board/freescale/corenet_ds/eth_superhydra.c
@@ -48,6 +48,8 @@
*/
#include <common.h>
+#include <log.h>
+#include <net.h>
#include <netdev.h>
#include <asm/fsl_serdes.h>
#include <fm_eth.h>
diff --git a/board/freescale/imx8mm_evk/imx8mm_evk.c b/board/freescale/imx8mm_evk/imx8mm_evk.c
index 53ebb949df..c43af9bc48 100644
--- a/board/freescale/imx8mm_evk/imx8mm_evk.c
+++ b/board/freescale/imx8mm_evk/imx8mm_evk.c
@@ -4,6 +4,8 @@
*/
#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 4d34622465..19c8a5aa23 100644
--- a/board/freescale/imx8mm_evk/spl.c
+++ b/board/freescale/imx8mm_evk/spl.c
@@ -4,8 +4,12 @@
*/
#include <common.h>
+#include <command.h>
#include <cpu_func.h>
#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/imx8mn_evk.c b/board/freescale/imx8mn_evk/imx8mn_evk.c
index 4f33c0e7c9..ea02bb75f4 100644
--- a/board/freescale/imx8mn_evk/imx8mn_evk.c
+++ b/board/freescale/imx8mn_evk/imx8mn_evk.c
@@ -4,6 +4,8 @@
*/
#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 45417b2446..dd38c1015c 100644
--- a/board/freescale/imx8mn_evk/spl.c
+++ b/board/freescale/imx8mn_evk/spl.c
@@ -5,8 +5,12 @@
*/
#include <common.h>
+#include <command.h>
#include <cpu_func.h>
#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/imx8mp_evk.c b/board/freescale/imx8mp_evk/imx8mp_evk.c
index f004af681b..97ba15645a 100644
--- a/board/freescale/imx8mp_evk/imx8mp_evk.c
+++ b/board/freescale/imx8mp_evk/imx8mp_evk.c
@@ -4,7 +4,9 @@
*/
#include <common.h>
+#include <env.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 c5f640dc7b..cd5b32c3f8 100644
--- a/board/freescale/imx8mp_evk/spl.c
+++ b/board/freescale/imx8mp_evk/spl.c
@@ -5,8 +5,12 @@
*/
#include <common.h>
+#include <command.h>
#include <cpu_func.h>
#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/imx8mq_evk.c b/board/freescale/imx8mq_evk/imx8mq_evk.c
index b2f464abb1..ae3be5785c 100644
--- a/board/freescale/imx8mq_evk/imx8mq_evk.c
+++ b/board/freescale/imx8mq_evk/imx8mq_evk.c
@@ -21,6 +21,7 @@
#include <asm/mach-imx/mxc_i2c.h>
#include <asm/arch/clock.h>
#include <spl.h>
+#include <linux/bitops.h>
#include <power/pmic.h>
#include <power/pfuze100_pmic.h>
#include "../common/pfuze.h"
diff --git a/board/freescale/imx8mq_evk/spl.c b/board/freescale/imx8mq_evk/spl.c
index 6ba6a52ebb..2c6ae48da7 100644
--- a/board/freescale/imx8mq_evk/spl.c
+++ b/board/freescale/imx8mq_evk/spl.c
@@ -7,6 +7,9 @@
#include <common.h>
#include <hang.h>
+#include <image.h>
+#include <init.h>
+#include <log.h>
#include <asm/io.h>
#include <errno.h>
#include <asm/io.h>
@@ -19,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/imx8qm_mek/spl.c b/board/freescale/imx8qm_mek/spl.c
index ba99002cf2..9dee12a2c6 100644
--- a/board/freescale/imx8qm_mek/spl.c
+++ b/board/freescale/imx8qm_mek/spl.c
@@ -6,6 +6,9 @@
#include <common.h>
#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/imx8qxp_mek.c b/board/freescale/imx8qxp_mek/imx8qxp_mek.c
index dc9ffaabf2..8b8a3c6300 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/imx8qxp_mek/spl.c b/board/freescale/imx8qxp_mek/spl.c
index eefee64ab1..881d297cf1 100644
--- a/board/freescale/imx8qxp_mek/spl.c
+++ b/board/freescale/imx8qxp_mek/spl.c
@@ -6,6 +6,9 @@
#include <common.h>
#include <dm.h>
+#include <image.h>
+#include <init.h>
+#include <log.h>
#include <spl.h>
#include <dm/uclass.h>
#include <dm/device.h>
diff --git a/board/freescale/imxrt1020-evk/imxrt1020-evk.c b/board/freescale/imxrt1020-evk/imxrt1020-evk.c
index 06ad524d5d..0cef6071fe 100644
--- a/board/freescale/imxrt1020-evk/imxrt1020-evk.c
+++ b/board/freescale/imxrt1020-evk/imxrt1020-evk.c
@@ -6,6 +6,8 @@
#include <common.h>
#include <dm.h>
+#include <init.h>
+#include <log.h>
#include <ram.h>
#include <spl.h>
#include <asm/io.h>
diff --git a/board/freescale/imxrt1050-evk/imxrt1050-evk.c b/board/freescale/imxrt1050-evk/imxrt1050-evk.c
index bda03b5ea5..edc7fb176b 100644
--- a/board/freescale/imxrt1050-evk/imxrt1050-evk.c
+++ b/board/freescale/imxrt1050-evk/imxrt1050-evk.c
@@ -6,6 +6,8 @@
#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/ls1012afrdm/eth.c b/board/freescale/ls1012afrdm/eth.c
index bd1df092f9..eaea1c46e4 100644
--- a/board/freescale/ls1012afrdm/eth.c
+++ b/board/freescale/ls1012afrdm/eth.c
@@ -18,6 +18,7 @@
#include <asm/arch-fsl-layerscape/config.h>
#include <asm/arch-fsl-layerscape/immap_lsch2.h>
#include <asm/arch/fsl_serdes.h>
+#include <linux/delay.h>
#include <net/pfe_eth/pfe_eth.h>
#include <dm/platform_data/pfe_dm_eth.h>
diff --git a/board/freescale/ls1012afrdm/ls1012afrdm.c b/board/freescale/ls1012afrdm/ls1012afrdm.c
index d138c9384e..f63377fdd6 100644
--- a/board/freescale/ls1012afrdm/ls1012afrdm.c
+++ b/board/freescale/ls1012afrdm/ls1012afrdm.c
@@ -6,6 +6,8 @@
#include <common.h>
#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/eth.c b/board/freescale/ls1012aqds/eth.c
index b9018444aa..b4ef60738e 100644
--- a/board/freescale/ls1012aqds/eth.c
+++ b/board/freescale/ls1012aqds/eth.c
@@ -17,6 +17,7 @@
#include <asm/arch-fsl-layerscape/config.h>
#include <asm/arch-fsl-layerscape/immap_lsch2.h>
#include <asm/arch/fsl_serdes.h>
+#include <linux/delay.h>
#include "../common/qixis.h"
#include <net/pfe_eth/pfe_eth.h>
#include <dm/platform_data/pfe_dm_eth.h>
diff --git a/board/freescale/ls1012aqds/ls1012aqds.c b/board/freescale/ls1012aqds/ls1012aqds.c
index 30bf1047d5..24978314a1 100644
--- a/board/freescale/ls1012aqds/ls1012aqds.c
+++ b/board/freescale/ls1012aqds/ls1012aqds.c
@@ -6,6 +6,8 @@
#include <common.h>
#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/eth.c b/board/freescale/ls1012ardb/eth.c
index 5edcfcf1ce..63d40de2a3 100644
--- a/board/freescale/ls1012ardb/eth.c
+++ b/board/freescale/ls1012ardb/eth.c
@@ -18,6 +18,7 @@
#include <asm/arch-fsl-layerscape/config.h>
#include <asm/arch-fsl-layerscape/immap_lsch2.h>
#include <asm/arch/fsl_serdes.h>
+#include <linux/delay.h>
#include <net/pfe_eth/pfe_eth.h>
#include <dm/platform_data/pfe_dm_eth.h>
#include <i2c.h>
diff --git a/board/freescale/ls1012ardb/ls1012ardb.c b/board/freescale/ls1012ardb/ls1012ardb.c
index ab83ef11a0..5b814f7abf 100644
--- a/board/freescale/ls1012ardb/ls1012ardb.c
+++ b/board/freescale/ls1012ardb/ls1012ardb.c
@@ -4,9 +4,12 @@
*/
#include <common.h>
+#include <command.h>
#include <fdt_support.h>
#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>
@@ -392,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/ls1021aiot/ls1021aiot.c b/board/freescale/ls1021aiot/ls1021aiot.c
index b4201e76d1..fe97b82983 100644
--- a/board/freescale/ls1021aiot/ls1021aiot.c
+++ b/board/freescale/ls1021aiot/ls1021aiot.c
@@ -7,10 +7,12 @@
#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>
#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 d3e2e53321..f84bce95a8 100644
--- a/board/freescale/ls1021aqds/ddr.c
+++ b/board/freescale/ls1021aqds/ddr.c
@@ -6,8 +6,11 @@
#include <common.h>
#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 <linux/delay.h>
#include "ddr.h"
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/ls1021aqds/eth.c b/board/freescale/ls1021aqds/eth.c
index d0a98836e2..2de62cf095 100644
--- a/board/freescale/ls1021aqds/eth.c
+++ b/board/freescale/ls1021aqds/eth.c
@@ -14,6 +14,7 @@
*/
#include <common.h>
+#include <net.h>
#include <netdev.h>
#include <asm/arch/fsl_serdes.h>
#include <fsl_mdio.h>
diff --git a/board/freescale/ls1021aqds/ls1021aqds.c b/board/freescale/ls1021aqds/ls1021aqds.c
index 1ae822e510..c03e96b493 100644
--- a/board/freescale/ls1021aqds/ls1021aqds.c
+++ b/board/freescale/ls1021aqds/ls1021aqds.c
@@ -9,6 +9,7 @@
#include <fdt_support.h>
#include <i2c.h>
#include <init.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/arch/immap_ls102xa.h>
#include <asm/arch/clock.h>
diff --git a/board/freescale/ls1021atsn/ls1021atsn.c b/board/freescale/ls1021atsn/ls1021atsn.c
index 3876910cbb..b05037d023 100644
--- a/board/freescale/ls1021atsn/ls1021atsn.c
+++ b/board/freescale/ls1021atsn/ls1021atsn.c
@@ -5,11 +5,13 @@
#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>
#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 d1ff7b8ba6..6208a38f16 100644
--- a/board/freescale/ls1021atwr/ls1021atwr.c
+++ b/board/freescale/ls1021atwr/ls1021atwr.c
@@ -6,9 +6,11 @@
#include <common.h>
#include <clock_legacy.h>
+#include <command.h>
#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>
@@ -26,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>
@@ -611,8 +614,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;
@@ -632,8 +635,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);
@@ -691,8 +694,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/ls1028a/ls1028a.c b/board/freescale/ls1028a/ls1028a.c
index 1e2973f0c8..fd7815e128 100644
--- a/board/freescale/ls1028a/ls1028a.c
+++ b/board/freescale/ls1028a/ls1028a.c
@@ -4,9 +4,11 @@
*/
#include <common.h>
+#include <init.h>
#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/ddr.c b/board/freescale/ls1043aqds/ddr.c
index d29a3ad797..c0fc9aadf0 100644
--- a/board/freescale/ls1043aqds/ddr.c
+++ b/board/freescale/ls1043aqds/ddr.c
@@ -9,6 +9,7 @@
#ifdef CONFIG_FSL_DEEP_SLEEP
#include <fsl_sleep.h>
#endif
+#include <log.h>
#include <asm/arch/clock.h>
#include "ddr.h"
diff --git a/board/freescale/ls1043aqds/eth.c b/board/freescale/ls1043aqds/eth.c
index e1919d2988..0012572862 100644
--- a/board/freescale/ls1043aqds/eth.c
+++ b/board/freescale/ls1043aqds/eth.c
@@ -5,6 +5,8 @@
*/
#include <common.h>
+#include <log.h>
+#include <net.h>
#include <asm/io.h>
#include <netdev.h>
#include <fdt_support.h>
diff --git a/board/freescale/ls1043aqds/ls1043aqds.c b/board/freescale/ls1043aqds/ls1043aqds.c
index 2d4b18cdbc..6d923cc6e8 100644
--- a/board/freescale/ls1043aqds/ls1043aqds.c
+++ b/board/freescale/ls1043aqds/ls1043aqds.c
@@ -8,6 +8,8 @@
#include <i2c.h>
#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/cpld.c b/board/freescale/ls1043ardb/cpld.c
index 00c70b1e49..5d2e8015a0 100644
--- a/board/freescale/ls1043ardb/cpld.c
+++ b/board/freescale/ls1043ardb/cpld.c
@@ -133,7 +133,7 @@ void cpld_rev_bit(unsigned char *value)
*value = rev_val;
}
-int do_cpld(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_cpld(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
int rc = 0;
diff --git a/board/freescale/ls1043ardb/ddr.c b/board/freescale/ls1043ardb/ddr.c
index 2677b7928f..f16e036d0e 100644
--- a/board/freescale/ls1043ardb/ddr.c
+++ b/board/freescale/ls1043ardb/ddr.c
@@ -7,6 +7,7 @@
#include <fsl_ddr_sdram.h>
#include <fsl_ddr_dimm_params.h>
#include "ddr.h"
+#include <log.h>
#include <vsprintf.h>
#ifdef CONFIG_FSL_DEEP_SLEEP
#include <fsl_sleep.h>
diff --git a/board/freescale/ls1043ardb/eth.c b/board/freescale/ls1043ardb/eth.c
index a8d0c1109b..4b9f94a0a5 100644
--- a/board/freescale/ls1043ardb/eth.c
+++ b/board/freescale/ls1043ardb/eth.c
@@ -3,6 +3,7 @@
* Copyright 2015 Freescale Semiconductor, Inc.
*/
#include <common.h>
+#include <net.h>
#include <asm/io.h>
#include <netdev.h>
#include <fm_eth.h>
diff --git a/board/freescale/ls1043ardb/ls1043ardb.c b/board/freescale/ls1043ardb/ls1043ardb.c
index 26a192957b..0b5f26515a 100644
--- a/board/freescale/ls1043ardb/ls1043ardb.c
+++ b/board/freescale/ls1043ardb/ls1043ardb.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <i2c.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
#include <asm/arch/fsl_serdes.h>
diff --git a/board/freescale/ls1046afrwy/eth.c b/board/freescale/ls1046afrwy/eth.c
index d38e4d7ac7..09a692be1d 100644
--- a/board/freescale/ls1046afrwy/eth.c
+++ b/board/freescale/ls1046afrwy/eth.c
@@ -3,6 +3,8 @@
* Copyright 2019 NXP
*/
#include <common.h>
+#include <fdt_support.h>
+#include <net.h>
#include <asm/io.h>
#include <netdev.h>
#include <fm_eth.h>
diff --git a/board/freescale/ls1046afrwy/ls1046afrwy.c b/board/freescale/ls1046afrwy/ls1046afrwy.c
index 71ace192e2..e815bf84fb 100644
--- a/board/freescale/ls1046afrwy/ls1046afrwy.c
+++ b/board/freescale/ls1046afrwy/ls1046afrwy.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <i2c.h>
#include <fdt_support.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
#include <asm/arch/fsl_serdes.h>
diff --git a/board/freescale/ls1046aqds/ddr.c b/board/freescale/ls1046aqds/ddr.c
index 45b1f373a7..f3cfbc4c39 100644
--- a/board/freescale/ls1046aqds/ddr.c
+++ b/board/freescale/ls1046aqds/ddr.c
@@ -9,6 +9,7 @@
#ifdef CONFIG_FSL_DEEP_SLEEP
#include <fsl_sleep.h>
#endif
+#include <log.h>
#include <asm/arch/clock.h>
#include "ddr.h"
diff --git a/board/freescale/ls1046aqds/eth.c b/board/freescale/ls1046aqds/eth.c
index 1d40e8bd17..579e2da6d8 100644
--- a/board/freescale/ls1046aqds/eth.c
+++ b/board/freescale/ls1046aqds/eth.c
@@ -5,6 +5,8 @@
*/
#include <common.h>
+#include <log.h>
+#include <net.h>
#include <asm/io.h>
#include <netdev.h>
#include <fdt_support.h>
diff --git a/board/freescale/ls1046aqds/ls1046aqds.c b/board/freescale/ls1046aqds/ls1046aqds.c
index e6648e9d70..b77b2ed40e 100644
--- a/board/freescale/ls1046aqds/ls1046aqds.c
+++ b/board/freescale/ls1046aqds/ls1046aqds.c
@@ -8,6 +8,7 @@
#include <i2c.h>
#include <fdt_support.h>
#include <fsl_ddr_sdram.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
#include <asm/arch/fsl_serdes.h>
diff --git a/board/freescale/ls1046ardb/cpld.c b/board/freescale/ls1046ardb/cpld.c
index a65751986a..548601a5ae 100644
--- a/board/freescale/ls1046ardb/cpld.c
+++ b/board/freescale/ls1046ardb/cpld.c
@@ -129,7 +129,7 @@ void cpld_rev_bit(unsigned char *value)
*value = rev_val;
}
-int do_cpld(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_cpld(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
int rc = 0;
diff --git a/board/freescale/ls1046ardb/ddr.c b/board/freescale/ls1046ardb/ddr.c
index 321222d68d..0e07df5211 100644
--- a/board/freescale/ls1046ardb/ddr.c
+++ b/board/freescale/ls1046ardb/ddr.c
@@ -10,6 +10,7 @@
#ifdef CONFIG_FSL_DEEP_SLEEP
#include <fsl_sleep.h>
#endif
+#include <log.h>
#include <asm/arch/clock.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/ls1046ardb/eth.c b/board/freescale/ls1046ardb/eth.c
index 7dbfcac307..f3b1dcd306 100644
--- a/board/freescale/ls1046ardb/eth.c
+++ b/board/freescale/ls1046ardb/eth.c
@@ -3,6 +3,8 @@
* Copyright 2016 Freescale Semiconductor, Inc.
*/
#include <common.h>
+#include <fdt_support.h>
+#include <net.h>
#include <asm/io.h>
#include <netdev.h>
#include <fm_eth.h>
diff --git a/board/freescale/ls1046ardb/ls1046ardb.c b/board/freescale/ls1046ardb/ls1046ardb.c
index 5308cb2e1c..27e213f796 100644
--- a/board/freescale/ls1046ardb/ls1046ardb.c
+++ b/board/freescale/ls1046ardb/ls1046ardb.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <i2c.h>
#include <fdt_support.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
#include <asm/arch/fsl_serdes.h>
diff --git a/board/freescale/ls1088a/ddr.c b/board/freescale/ls1088a/ddr.c
index c21a2ce059..fd9549bfbc 100644
--- a/board/freescale/ls1088a/ddr.c
+++ b/board/freescale/ls1088a/ddr.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <fsl_ddr_sdram.h>
#include <fsl_ddr_dimm_params.h>
+#include <log.h>
#include <asm/arch/soc.h>
#include <asm/arch/clock.h>
#include "ddr.h"
diff --git a/board/freescale/ls1088a/eth_ls1088aqds.c b/board/freescale/ls1088a/eth_ls1088aqds.c
index 54ef75347f..8371c1c9c2 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>
@@ -19,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 225e787c75..3f758cef2f 100644
--- a/board/freescale/ls1088a/ls1088a.c
+++ b/board/freescale/ls1088a/ls1088a.c
@@ -5,6 +5,8 @@
#include <common.h>
#include <env.h>
#include <i2c.h>
+#include <init.h>
+#include <log.h>
#include <malloc.h>
#include <errno.h>
#include <netdev.h>
@@ -13,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/ls2080a/ddr.c b/board/freescale/ls2080a/ddr.c
index 26eada9b49..229fc9cc30 100644
--- a/board/freescale/ls2080a/ddr.c
+++ b/board/freescale/ls2080a/ddr.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <fsl_ddr_sdram.h>
#include <fsl_ddr_dimm_params.h>
+#include <log.h>
#include <asm/arch/soc.h>
#include <asm/arch/clock.h>
#include "ddr.h"
diff --git a/board/freescale/ls2080a/ls2080a.c b/board/freescale/ls2080a/ls2080a.c
index f144bf6b37..95e99eabd7 100644
--- a/board/freescale/ls2080a/ls2080a.c
+++ b/board/freescale/ls2080a/ls2080a.c
@@ -3,6 +3,7 @@
* Copyright 2014 Freescale Semiconductor
*/
#include <common.h>
+#include <init.h>
#include <malloc.h>
#include <errno.h>
#include <net.h>
diff --git a/board/freescale/ls2080aqds/ddr.c b/board/freescale/ls2080aqds/ddr.c
index fffe78c301..3fb2c4448c 100644
--- a/board/freescale/ls2080aqds/ddr.c
+++ b/board/freescale/ls2080aqds/ddr.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <fsl_ddr_sdram.h>
#include <fsl_ddr_dimm_params.h>
+#include <log.h>
#include <asm/arch/soc.h>
#include <asm/arch/clock.h>
#include "ddr.h"
diff --git a/board/freescale/ls2080aqds/eth.c b/board/freescale/ls2080aqds/eth.c
index bbb70a859a..81b5b9eaf7 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>
@@ -17,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/ls2080aqds/ls2080aqds.c b/board/freescale/ls2080aqds/ls2080aqds.c
index 4034bdee28..5f95f3c301 100644
--- a/board/freescale/ls2080aqds/ls2080aqds.c
+++ b/board/freescale/ls2080aqds/ls2080aqds.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
#include <env.h>
+#include <init.h>
#include <malloc.h>
#include <errno.h>
#include <netdev.h>
diff --git a/board/freescale/ls2080ardb/ddr.c b/board/freescale/ls2080ardb/ddr.c
index 72ce872c75..4571a228c5 100644
--- a/board/freescale/ls2080ardb/ddr.c
+++ b/board/freescale/ls2080ardb/ddr.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <fsl_ddr_sdram.h>
#include <fsl_ddr_dimm_params.h>
+#include <log.h>
#include <asm/arch/soc.h>
#include <asm/arch/clock.h>
#include "ddr.h"
diff --git a/board/freescale/ls2080ardb/ls2080ardb.c b/board/freescale/ls2080ardb/ls2080ardb.c
index 5e2fc7cc98..b1fa3297a3 100644
--- a/board/freescale/ls2080ardb/ls2080ardb.c
+++ b/board/freescale/ls2080ardb/ls2080ardb.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
#include <env.h>
+#include <init.h>
#include <malloc.h>
#include <errno.h>
#include <netdev.h>
diff --git a/board/freescale/lx2160a/eth_lx2160aqds.c b/board/freescale/lx2160a/eth_lx2160aqds.c
index 0e928ebd86..8240eaae82 100644
--- a/board/freescale/lx2160a/eth_lx2160aqds.c
+++ b/board/freescale/lx2160a/eth_lx2160aqds.c
@@ -6,8 +6,10 @@
#include <common.h>
#include <env.h>
+#include <fdt_support.h>
#include <hwconfig.h>
#include <command.h>
+#include <log.h>
#include <net.h>
#include <netdev.h>
#include <malloc.h>
@@ -20,6 +22,7 @@
#include <asm/arch/fsl_serdes.h>
#include <fsl-mc/fsl_mc.h>
#include <fsl-mc/ldpaa_wriop.h>
+#include <linux/libfdt.h>
#include "../common/qixis.h"
diff --git a/board/freescale/lx2160a/eth_lx2160ardb.c b/board/freescale/lx2160a/eth_lx2160ardb.c
index aeb989a638..21fb559250 100644
--- a/board/freescale/lx2160a/eth_lx2160ardb.c
+++ b/board/freescale/lx2160a/eth_lx2160ardb.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <command.h>
+#include <fdt_support.h>
#include <net.h>
#include <netdev.h>
#include <malloc.h>
diff --git a/board/freescale/lx2160a/lx2160a.c b/board/freescale/lx2160a/lx2160a.c
index 0d94107def..88eb66b03b 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>
@@ -15,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/m5208evbe/m5208evbe.c b/board/freescale/m5208evbe/m5208evbe.c
index e448a64abc..a950030eb3 100644
--- a/board/freescale/m5208evbe/m5208evbe.c
+++ b/board/freescale/m5208evbe/m5208evbe.c
@@ -12,6 +12,7 @@
#include <init.h>
#include <asm/immap.h>
#include <asm/io.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/m52277evb/m52277evb.c b/board/freescale/m52277evb/m52277evb.c
index a4b795fc39..144e490479 100644
--- a/board/freescale/m52277evb/m52277evb.c
+++ b/board/freescale/m52277evb/m52277evb.c
@@ -11,6 +11,7 @@
#include <init.h>
#include <asm/immap.h>
#include <asm/io.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/m5249evb/m5249evb.c b/board/freescale/m5249evb/m5249evb.c
index da3adc5954..a89d510058 100644
--- a/board/freescale/m5249evb/m5249evb.c
+++ b/board/freescale/m5249evb/m5249evb.c
@@ -9,6 +9,7 @@
#include <init.h>
#include <malloc.h>
#include <asm/immap.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/m5253demo/flash.c b/board/freescale/m5253demo/flash.c
index a5223ecee6..3197421781 100644
--- a/board/freescale/m5253demo/flash.c
+++ b/board/freescale/m5253demo/flash.c
@@ -8,6 +8,8 @@
*/
#include <common.h>
+#include <flash.h>
+#include <init.h>
#include <irq_func.h>
#include <asm/immap.h>
diff --git a/board/freescale/m5253demo/m5253demo.c b/board/freescale/m5253demo/m5253demo.c
index 76c18b8504..50eb18ba94 100644
--- a/board/freescale/m5253demo/m5253demo.c
+++ b/board/freescale/m5253demo/m5253demo.c
@@ -9,9 +9,11 @@
#include <common.h>
#include <init.h>
+#include <net.h>
#include <asm/immap.h>
#include <netdev.h>
#include <asm/io.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/m5282evb/m5282evb.c b/board/freescale/m5282evb/m5282evb.c
index 065e3e71f5..251be667d4 100644
--- a/board/freescale/m5282evb/m5282evb.c
+++ b/board/freescale/m5282evb/m5282evb.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/immap.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/m53017evb/m53017evb.c b/board/freescale/m53017evb/m53017evb.c
index 8bdb4ad127..f13b6931ea 100644
--- a/board/freescale/m53017evb/m53017evb.c
+++ b/board/freescale/m53017evb/m53017evb.c
@@ -12,6 +12,7 @@
#include <init.h>
#include <asm/immap.h>
#include <asm/io.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/m5329evb/m5329evb.c b/board/freescale/m5329evb/m5329evb.c
index d93800b364..531894f651 100644
--- a/board/freescale/m5329evb/m5329evb.c
+++ b/board/freescale/m5329evb/m5329evb.c
@@ -12,6 +12,7 @@
#include <init.h>
#include <asm/immap.h>
#include <asm/io.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/m5373evb/m5373evb.c b/board/freescale/m5373evb/m5373evb.c
index 1d52ce047f..29ff55f159 100644
--- a/board/freescale/m5373evb/m5373evb.c
+++ b/board/freescale/m5373evb/m5373evb.c
@@ -12,6 +12,7 @@
#include <init.h>
#include <asm/immap.h>
#include <asm/io.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/m54418twr/m54418twr.c b/board/freescale/m54418twr/m54418twr.c
index 8c90cfe537..a418fba140 100644
--- a/board/freescale/m54418twr/m54418twr.c
+++ b/board/freescale/m54418twr/m54418twr.c
@@ -11,6 +11,7 @@
#include <asm/immap.h>
#include <mmc.h>
#include <fsl_esdhc_imx.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/m54451evb/m54451evb.c b/board/freescale/m54451evb/m54451evb.c
index 82a2b9093b..1298bd324e 100644
--- a/board/freescale/m54451evb/m54451evb.c
+++ b/board/freescale/m54451evb/m54451evb.c
@@ -12,6 +12,7 @@
#include <spi.h>
#include <asm/immap.h>
#include <asm/io.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/m54455evb/m54455evb.c b/board/freescale/m54455evb/m54455evb.c
index 146cd918c4..286300645b 100644
--- a/board/freescale/m54455evb/m54455evb.c
+++ b/board/freescale/m54455evb/m54455evb.c
@@ -12,6 +12,7 @@
#include <pci.h>
#include <asm/immap.h>
#include <asm/io.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/m547xevb/m547xevb.c b/board/freescale/m547xevb/m547xevb.c
index e8d86113d6..908a500f4b 100644
--- a/board/freescale/m547xevb/m547xevb.c
+++ b/board/freescale/m547xevb/m547xevb.c
@@ -13,6 +13,7 @@
#include <pci.h>
#include <asm/immap.h>
#include <asm/io.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/m548xevb/m548xevb.c b/board/freescale/m548xevb/m548xevb.c
index 40e01c6f24..796b808e6f 100644
--- a/board/freescale/m548xevb/m548xevb.c
+++ b/board/freescale/m548xevb/m548xevb.c
@@ -13,6 +13,7 @@
#include <pci.h>
#include <asm/immap.h>
#include <asm/io.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/mpc8308rdb/mpc8308rdb.c b/board/freescale/mpc8308rdb/mpc8308rdb.c
index ae73246e5b..259d6aa1c2 100644
--- a/board/freescale/mpc8308rdb/mpc8308rdb.c
+++ b/board/freescale/mpc8308rdb/mpc8308rdb.c
@@ -8,7 +8,9 @@
#include <hwconfig.h>
#include <i2c.h>
#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 c8e30a0947..99f6bcd5a9 100644
--- a/board/freescale/mpc8313erdb/sdram.c
+++ b/board/freescale/mpc8313erdb/sdram.c
@@ -8,8 +8,10 @@
*/
#include <common.h>
+#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 93e0fca083..aa2e7fe206 100644
--- a/board/freescale/mpc8315erdb/mpc8315erdb.c
+++ b/board/freescale/mpc8315erdb/mpc8315erdb.c
@@ -10,6 +10,8 @@
#include <hwconfig.h>
#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 2f0f29a0e5..8a828207f9 100644
--- a/board/freescale/mpc8315erdb/sdram.c
+++ b/board/freescale/mpc8315erdb/sdram.c
@@ -8,8 +8,10 @@
*/
#include <common.h>
+#include <init.h>
#include <mpc83xx.h>
#include <spd_sdram.h>
+#include <linux/delay.h>
#include <asm/bitops.h>
#include <asm/io.h>
diff --git a/board/freescale/mpc8323erdb/mpc8323erdb.c b/board/freescale/mpc8323erdb/mpc8323erdb.c
index e513d0bfd5..1dc1c98ad6 100644
--- a/board/freescale/mpc8323erdb/mpc8323erdb.c
+++ b/board/freescale/mpc8323erdb/mpc8323erdb.c
@@ -19,6 +19,7 @@
#include <i2c.h>
#include <miiphy.h>
#include <command.h>
+#include <linux/delay.h>
#include <linux/libfdt.h>
#include <u-boot/crc.h>
#if defined(CONFIG_PCI)
diff --git a/board/freescale/mpc832xemds/mpc832xemds.c b/board/freescale/mpc832xemds/mpc832xemds.c
index d4922fe1e1..afcd45769c 100644
--- a/board/freescale/mpc832xemds/mpc832xemds.c
+++ b/board/freescale/mpc832xemds/mpc832xemds.c
@@ -23,6 +23,7 @@
#if defined(CONFIG_PQ_MDS_PIB)
#include "../common/pq-mds-pib.h"
#endif
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/mpc832xemds/pci.c b/board/freescale/mpc832xemds/pci.c
index 45c7294832..944108f631 100644
--- a/board/freescale/mpc832xemds/pci.c
+++ b/board/freescale/mpc832xemds/pci.c
@@ -14,6 +14,7 @@
#include <pci.h>
#include <i2c.h>
#include <asm/fsl_i2c.h>
+#include <linux/delay.h>
#include "../common/pq-mds-pib.h"
static struct pci_region pci1_regions[] = {
diff --git a/board/freescale/mpc8349emds/mpc8349emds.c b/board/freescale/mpc8349emds/mpc8349emds.c
index 0996b87c0f..576f04c144 100644
--- a/board/freescale/mpc8349emds/mpc8349emds.c
+++ b/board/freescale/mpc8349emds/mpc8349emds.c
@@ -6,8 +6,10 @@
#include <common.h>
#include <fdt_support.h>
+#include <init.h>
#include <ioports.h>
#include <mpc83xx.h>
+#include <asm/bitops.h>
#include <asm/mpc8349_pci.h>
#include <i2c.h>
#include <spi.h>
@@ -17,6 +19,7 @@
#else
#include <spd_sdram.h>
#endif
+#include <linux/delay.h>
#if defined(CONFIG_OF_LIBFDT)
#include <linux/libfdt.h>
diff --git a/board/freescale/mpc8349emds/pci.c b/board/freescale/mpc8349emds/pci.c
index 7615a1dfaa..3ddbe71775 100644
--- a/board/freescale/mpc8349emds/pci.c
+++ b/board/freescale/mpc8349emds/pci.c
@@ -11,6 +11,7 @@
#include <pci.h>
#include <i2c.h>
#include <asm/fsl_i2c.h>
+#include <linux/delay.h>
static struct pci_region pci1_regions[] = {
{
diff --git a/board/freescale/mpc8349itx/mpc8349itx.c b/board/freescale/mpc8349itx/mpc8349itx.c
index a2e284f1a2..3993d58515 100644
--- a/board/freescale/mpc8349itx/mpc8349itx.c
+++ b/board/freescale/mpc8349itx/mpc8349itx.c
@@ -5,7 +5,9 @@
#include <common.h>
#include <fdt_support.h>
+#include <init.h>
#include <ioports.h>
+#include <log.h>
#include <mpc83xx.h>
#include <i2c.h>
#include <miiphy.h>
@@ -15,10 +17,12 @@
#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>
#endif
+#include <linux/delay.h>
#include "../../../arch/powerpc/cpu/mpc83xx/hrcw/hrcw.h"
#include "../../../arch/powerpc/cpu/mpc83xx/elbc/elbc.h"
diff --git a/board/freescale/mpc8349itx/pci.c b/board/freescale/mpc8349itx/pci.c
index 550a2afcb7..a09b658688 100644
--- a/board/freescale/mpc8349itx/pci.c
+++ b/board/freescale/mpc8349itx/pci.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <init.h>
+#include <linux/delay.h>
#include <asm/mmu.h>
#include <asm/io.h>
diff --git a/board/freescale/mpc837xemds/mpc837xemds.c b/board/freescale/mpc837xemds/mpc837xemds.c
index 1ae2308e9b..182391ca9c 100644
--- a/board/freescale/mpc837xemds/mpc837xemds.c
+++ b/board/freescale/mpc837xemds/mpc837xemds.c
@@ -8,10 +8,13 @@
#include <hwconfig.h>
#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>
#include <tsec.h>
+#include <linux/delay.h>
#include <linux/libfdt.h>
#include <fdt_support.h>
#include <fsl_esdhc.h>
diff --git a/board/freescale/mpc837xemds/pci.c b/board/freescale/mpc837xemds/pci.c
index c72e49fbe1..30e8b2585e 100644
--- a/board/freescale/mpc837xemds/pci.c
+++ b/board/freescale/mpc837xemds/pci.c
@@ -14,6 +14,7 @@
#include <fdt_support.h>
#include <asm/fsl_i2c.h>
#include <asm/fsl_mpc83xx_serdes.h>
+#include <linux/delay.h>
static struct pci_region pci_regions[] = {
{
diff --git a/board/freescale/mpc837xerdb/mpc837xerdb.c b/board/freescale/mpc837xerdb/mpc837xerdb.c
index 45038acf32..94cb93a42d 100644
--- a/board/freescale/mpc837xerdb/mpc837xerdb.c
+++ b/board/freescale/mpc837xerdb/mpc837xerdb.c
@@ -10,12 +10,14 @@
#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>
#include <spd_sdram.h>
#include <vsc7385.h>
#include <fsl_esdhc.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/mpc837xerdb/pci.c b/board/freescale/mpc837xerdb/pci.c
index 07471e0ae5..dccf8c5551 100644
--- a/board/freescale/mpc837xerdb/pci.c
+++ b/board/freescale/mpc837xerdb/pci.c
@@ -8,6 +8,7 @@
#include <mpc83xx.h>
#include <pci.h>
#include <asm/io.h>
+#include <linux/delay.h>
static struct pci_region pci_regions[] = {
{
diff --git a/board/freescale/mpc8536ds/mpc8536ds.c b/board/freescale/mpc8536ds/mpc8536ds.c
index e55ee40026..5907a7b428 100644
--- a/board/freescale/mpc8536ds/mpc8536ds.c
+++ b/board/freescale/mpc8536ds/mpc8536ds.c
@@ -6,6 +6,8 @@
#include <common.h>
#include <command.h>
#include <init.h>
+#include <log.h>
+#include <net.h>
#include <pci.h>
#include <asm/processor.h>
#include <asm/mmu.h>
@@ -17,6 +19,7 @@
#include <asm/fsl_serdes.h>
#include <spd.h>
#include <miiphy.h>
+#include <linux/delay.h>
#include <linux/libfdt.h>
#include <spd_sdram.h>
#include <fdt_support.h>
diff --git a/board/freescale/mpc8541cds/mpc8541cds.c b/board/freescale/mpc8541cds/mpc8541cds.c
index cb130b4a86..d470fd1cf6 100644
--- a/board/freescale/mpc8541cds/mpc8541cds.c
+++ b/board/freescale/mpc8541cds/mpc8541cds.c
@@ -15,6 +15,7 @@
#include <fsl_ddr_sdram.h>
#include <ioports.h>
#include <spd_sdram.h>
+#include <linux/delay.h>
#include <linux/libfdt.h>
#include <fdt_support.h>
diff --git a/board/freescale/mpc8544ds/mpc8544ds.c b/board/freescale/mpc8544ds/mpc8544ds.c
index 2d4aace98d..85d370f628 100644
--- a/board/freescale/mpc8544ds/mpc8544ds.c
+++ b/board/freescale/mpc8544ds/mpc8544ds.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <command.h>
#include <init.h>
+#include <net.h>
#include <pci.h>
#include <asm/processor.h>
#include <asm/mmu.h>
diff --git a/board/freescale/mpc8548cds/mpc8548cds.c b/board/freescale/mpc8548cds/mpc8548cds.c
index a4455d3f61..e11ed2e3be 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>
@@ -16,6 +17,7 @@
#include <fsl_ddr_sdram.h>
#include <asm/fsl_serdes.h>
#include <miiphy.h>
+#include <linux/delay.h>
#include <linux/libfdt.h>
#include <fdt_support.h>
#include <tsec.h>
diff --git a/board/freescale/mpc8555cds/mpc8555cds.c b/board/freescale/mpc8555cds/mpc8555cds.c
index 47193dd20e..8e27e73c25 100644
--- a/board/freescale/mpc8555cds/mpc8555cds.c
+++ b/board/freescale/mpc8555cds/mpc8555cds.c
@@ -13,6 +13,7 @@
#include <fsl_ddr_sdram.h>
#include <ioports.h>
#include <spd_sdram.h>
+#include <linux/delay.h>
#include <linux/libfdt.h>
#include <fdt_support.h>
diff --git a/board/freescale/mpc8568mds/bcsr.c b/board/freescale/mpc8568mds/bcsr.c
index 28e2a9435c..b1e638af5a 100644
--- a/board/freescale/mpc8568mds/bcsr.c
+++ b/board/freescale/mpc8568mds/bcsr.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <flash.h>
#include <asm/io.h>
#include "bcsr.h"
diff --git a/board/freescale/mpc8568mds/mpc8568mds.c b/board/freescale/mpc8568mds/mpc8568mds.c
index 5167f81be7..2871636165 100644
--- a/board/freescale/mpc8568mds/mpc8568mds.c
+++ b/board/freescale/mpc8568mds/mpc8568mds.c
@@ -6,7 +6,9 @@
*/
#include <common.h>
+#include <flash.h>
#include <init.h>
+#include <log.h>
#include <pci.h>
#include <asm/processor.h>
#include <asm/mmu.h>
@@ -17,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>
@@ -302,7 +305,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/bcsr.c b/board/freescale/mpc8569mds/bcsr.c
index 57cea0af68..9ed00f6e5b 100644
--- a/board/freescale/mpc8569mds/bcsr.c
+++ b/board/freescale/mpc8569mds/bcsr.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <flash.h>
#include <asm/io.h>
#include "bcsr.h"
diff --git a/board/freescale/mpc8569mds/mpc8569mds.c b/board/freescale/mpc8569mds/mpc8569mds.c
index cf5d8a5244..90b9c72bab 100644
--- a/board/freescale/mpc8569mds/mpc8569mds.c
+++ b/board/freescale/mpc8569mds/mpc8569mds.c
@@ -7,8 +7,10 @@
#include <common.h>
#include <console.h>
+#include <flash.h>
#include <hwconfig.h>
#include <init.h>
+#include <log.h>
#include <pci.h>
#include <asm/processor.h>
#include <asm/mmu.h>
@@ -21,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 4111d69b4b..b43032cee8 100644
--- a/board/freescale/mpc8572ds/mpc8572ds.c
+++ b/board/freescale/mpc8572ds/mpc8572ds.c
@@ -6,7 +6,10 @@
#include <common.h>
#include <command.h>
#include <env.h>
+#include <image.h>
#include <init.h>
+#include <log.h>
+#include <net.h>
#include <pci.h>
#include <asm/processor.h>
#include <asm/mmu.h>
@@ -17,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 86edd66bca..c060fd9a3f 100644
--- a/board/freescale/mpc8610hpcd/mpc8610hpcd.c
+++ b/board/freescale/mpc8610hpcd/mpc8610hpcd.c
@@ -6,6 +6,8 @@
#include <common.h>
#include <command.h>
#include <init.h>
+#include <log.h>
+#include <net.h>
#include <pci.h>
#include <asm/processor.h>
#include <asm/immap_86xx.h>
@@ -14,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/mpc8610hpcd/mpc8610hpcd_diu.c b/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c
index 42b8cab362..9b96d0d33f 100644
--- a/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c
+++ b/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <clock_legacy.h>
#include <command.h>
+#include <log.h>
#include <asm/io.h>
#include <fsl_diu_fb.h>
#include "../common/pixis.h"
diff --git a/board/freescale/mpc8641hpcn/mpc8641hpcn.c b/board/freescale/mpc8641hpcn/mpc8641hpcn.c
index d9e538b868..cd505dfc0a 100644
--- a/board/freescale/mpc8641hpcn/mpc8641hpcn.c
+++ b/board/freescale/mpc8641hpcn/mpc8641hpcn.c
@@ -5,6 +5,8 @@
#include <common.h>
#include <init.h>
+#include <log.h>
+#include <net.h>
#include <pci.h>
#include <asm/processor.h>
#include <asm/immap_86xx.h>
@@ -12,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/mx23evk/mx23evk.c b/board/freescale/mx23evk/mx23evk.c
index 6f4d34b9ed..6cfff04966 100644
--- a/board/freescale/mx23evk/mx23evk.c
+++ b/board/freescale/mx23evk/mx23evk.c
@@ -12,6 +12,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/gpio.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/clock.h>
diff --git a/board/freescale/mx25pdk/mx25pdk.c b/board/freescale/mx25pdk/mx25pdk.c
index 6898e9c4d6..ec56acb307 100644
--- a/board/freescale/mx25pdk/mx25pdk.c
+++ b/board/freescale/mx25pdk/mx25pdk.c
@@ -15,6 +15,7 @@
#include <mmc.h>
#include <fsl_esdhc_imx.h>
#include <i2c.h>
+#include <linux/delay.h>
#include <power/pmic.h>
#include <fsl_pmic.h>
#include <mc34704.h>
diff --git a/board/freescale/mx28evk/mx28evk.c b/board/freescale/mx28evk/mx28evk.c
index cfbe89ebfe..e50b7db210 100644
--- a/board/freescale/mx28evk/mx28evk.c
+++ b/board/freescale/mx28evk/mx28evk.c
@@ -12,12 +12,15 @@
*/
#include <common.h>
+#include <init.h>
+#include <net.h>
#include <asm/gpio.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
#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/mx31pdk/mx31pdk.c b/board/freescale/mx31pdk/mx31pdk.c
index fb57f26357..06fe51db71 100644
--- a/board/freescale/mx31pdk/mx31pdk.c
+++ b/board/freescale/mx31pdk/mx31pdk.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <init.h>
+#include <net.h>
#include <netdev.h>
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
diff --git a/board/freescale/mx35pdk/mx35pdk.c b/board/freescale/mx35pdk/mx35pdk.c
index d0f7f045a5..63fea37d5d 100644
--- a/board/freescale/mx35pdk/mx35pdk.c
+++ b/board/freescale/mx35pdk/mx35pdk.c
@@ -7,7 +7,9 @@
#include <common.h>
#include <init.h>
+#include <net.h>
#include <asm/io.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/crm_regs.h>
diff --git a/board/freescale/mx51evk/mx51evk.c b/board/freescale/mx51evk/mx51evk.c
index 3314badf9e..46037acc0e 100644
--- a/board/freescale/mx51evk/mx51evk.c
+++ b/board/freescale/mx51evk/mx51evk.c
@@ -9,6 +9,7 @@
#include <asm/gpio.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/iomux-mx51.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <asm/arch/sys_proto.h>
#include <asm/arch/crm_regs.h>
diff --git a/board/freescale/mx53ard/mx53ard.c b/board/freescale/mx53ard/mx53ard.c
index 33d056b47d..fabcb03ac8 100644
--- a/board/freescale/mx53ard/mx53ard.c
+++ b/board/freescale/mx53ard/mx53ard.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <init.h>
+#include <net.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/sys_proto.h>
diff --git a/board/freescale/mx53loco/mx53loco.c b/board/freescale/mx53loco/mx53loco.c
index 381c1ca808..ba74592e4e 100644
--- a/board/freescale/mx53loco/mx53loco.c
+++ b/board/freescale/mx53loco/mx53loco.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <init.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/sys_proto.h>
diff --git a/board/freescale/mx6memcal/mx6memcal.c b/board/freescale/mx6memcal/mx6memcal.c
index d01127eccc..ea7a56369d 100644
--- a/board/freescale/mx6memcal/mx6memcal.c
+++ b/board/freescale/mx6memcal/mx6memcal.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/arch/sys_proto.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/mx6memcal/spl.c b/board/freescale/mx6memcal/spl.c
index be551bc375..c11eee51b6 100644
--- a/board/freescale/mx6memcal/spl.c
+++ b/board/freescale/mx6memcal/spl.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/arch/iomux.h>
#include <asm/arch/clock.h>
diff --git a/board/freescale/mx6qarm2/mx6qarm2.c b/board/freescale/mx6qarm2/mx6qarm2.c
index 3957c09ac0..5c08ecbb96 100644
--- a/board/freescale/mx6qarm2/mx6qarm2.c
+++ b/board/freescale/mx6qarm2/mx6qarm2.c
@@ -4,6 +4,8 @@
*/
#include <common.h>
+#include <init.h>
+#include <net.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/mx6-pins.h>
diff --git a/board/freescale/mx6sabreauto/mx6sabreauto.c b/board/freescale/mx6sabreauto/mx6sabreauto.c
index de19a562eb..829e42f677 100644
--- a/board/freescale/mx6sabreauto/mx6sabreauto.c
+++ b/board/freescale/mx6sabreauto/mx6sabreauto.c
@@ -6,7 +6,9 @@
*/
#include <common.h>
+#include <image.h>
#include <init.h>
+#include <net.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c
index 07d3b0edb3..8d24af0a99 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -5,7 +5,9 @@
* Author: Fabio Estevam <fabio.estevam@freescale.com>
*/
+#include <image.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/freescale/mx6slevk/mx6slevk.c b/board/freescale/mx6slevk/mx6slevk.c
index 43029e4245..7dd00bda38 100644
--- a/board/freescale/mx6slevk/mx6slevk.c
+++ b/board/freescale/mx6slevk/mx6slevk.c
@@ -5,6 +5,8 @@
* Author: Fabio Estevam <fabio.estevam@freescale.com>
*/
+#include <init.h>
+#include <net.h>
#include <asm/arch/clock.h>
#include <asm/arch/iomux.h>
#include <asm/arch/crm_regs.h>
diff --git a/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c b/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c
index 0c7904204f..522b840275 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>
@@ -16,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 4f1d6602e5..b092ea8053 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>
@@ -17,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 07941fb156..b03c9c97a7 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>
@@ -21,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 41c620795c..f12e9d4cfe 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>
@@ -11,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/mx7ulp_evk/mx7ulp_evk.c b/board/freescale/mx7ulp_evk/mx7ulp_evk.c
index c939514a5f..1594285860 100644
--- a/board/freescale/mx7ulp_evk/mx7ulp_evk.c
+++ b/board/freescale/mx7ulp_evk/mx7ulp_evk.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <fdt_support.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/arch/sys_proto.h>
#include <asm/arch/mx7ulp-pins.h>
diff --git a/board/freescale/p1010rdb/p1010rdb.c b/board/freescale/p1010rdb/p1010rdb.c
index 314646d4ff..66ccc0bd1e 100644
--- a/board/freescale/p1010rdb/p1010rdb.c
+++ b/board/freescale/p1010rdb/p1010rdb.c
@@ -5,7 +5,10 @@
*/
#include <common.h>
+#include <command.h>
+#include <image.h>
#include <init.h>
+#include <net.h>
#include <asm/processor.h>
#include <asm/mmu.h>
#include <asm/cache.h>
@@ -706,8 +709,8 @@ int misc_init_r(void)
}
#ifndef CONFIG_SPL_BUILD
-static int pin_mux_cmd(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int pin_mux_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
if (argc < 2)
return CMD_RET_USAGE;
diff --git a/board/freescale/p1022ds/diu.c b/board/freescale/p1022ds/diu.c
index 7f7251009c..918b4b9f6a 100644
--- a/board/freescale/p1022ds/diu.c
+++ b/board/freescale/p1022ds/diu.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <clock_legacy.h>
#include <command.h>
+#include <log.h>
#include <linux/ctype.h>
#include <asm/io.h>
#include <stdio_dev.h>
diff --git a/board/freescale/p1022ds/p1022ds.c b/board/freescale/p1022ds/p1022ds.c
index ebf822acb5..d10160d17a 100644
--- a/board/freescale/p1022ds/p1022ds.c
+++ b/board/freescale/p1022ds/p1022ds.c
@@ -8,7 +8,10 @@
#include <common.h>
#include <command.h>
#include <env.h>
+#include <image.h>
#include <init.h>
+#include <log.h>
+#include <net.h>
#include <pci.h>
#include <asm/processor.h>
#include <asm/mmu.h>
diff --git a/board/freescale/p1023rdb/p1023rdb.c b/board/freescale/p1023rdb/p1023rdb.c
index eeb13ccc9b..13df3e8637 100644
--- a/board/freescale/p1023rdb/p1023rdb.c
+++ b/board/freescale/p1023rdb/p1023rdb.c
@@ -9,7 +9,9 @@
#include <common.h>
#include <command.h>
#include <env.h>
+#include <image.h>
#include <init.h>
+#include <net.h>
#include <pci.h>
#include <asm/io.h>
#include <asm/cache.h>
diff --git a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
index f668d7efb1..1353debc0e 100644
--- a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
+++ b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
@@ -9,7 +9,9 @@
#include <env.h>
#include <hang.h>
#include <hwconfig.h>
+#include <image.h>
#include <init.h>
+#include <net.h>
#include <pci.h>
#include <i2c.h>
#include <asm/processor.h>
@@ -23,6 +25,7 @@
#include <asm/fsl_lbc.h>
#include <asm/mp.h>
#include <miiphy.h>
+#include <linux/delay.h>
#include <linux/libfdt.h>
#include <fdt_support.h>
#include <fsl_mdio.h>
diff --git a/board/freescale/p1_twr/p1_twr.c b/board/freescale/p1_twr/p1_twr.c
index 72fe1b4166..8e1522a604 100644
--- a/board/freescale/p1_twr/p1_twr.c
+++ b/board/freescale/p1_twr/p1_twr.c
@@ -7,7 +7,9 @@
#include <command.h>
#include <env.h>
#include <hwconfig.h>
+#include <image.h>
#include <init.h>
+#include <net.h>
#include <pci.h>
#include <i2c.h>
#include <asm/processor.h>
diff --git a/board/freescale/p2041rdb/cpld.c b/board/freescale/p2041rdb/cpld.c
index 3037ef89f1..b042fe3bcb 100644
--- a/board/freescale/p2041rdb/cpld.c
+++ b/board/freescale/p2041rdb/cpld.c
@@ -87,7 +87,7 @@ static void cpld_dump_regs(void)
}
#endif
-int cpld_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int cpld_cmd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
int rc = 0;
diff --git a/board/freescale/p2041rdb/ddr.c b/board/freescale/p2041rdb/ddr.c
index 8bcd2fb5a7..7a06c7af3d 100644
--- a/board/freescale/p2041rdb/ddr.c
+++ b/board/freescale/p2041rdb/ddr.c
@@ -6,6 +6,8 @@
#include <common.h>
#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/p2041rdb/eth.c b/board/freescale/p2041rdb/eth.c
index 854a839b8c..32c68f2a71 100644
--- a/board/freescale/p2041rdb/eth.c
+++ b/board/freescale/p2041rdb/eth.c
@@ -13,6 +13,7 @@
*/
#include <common.h>
+#include <net.h>
#include <netdev.h>
#include <asm/fsl_serdes.h>
#include <fm_eth.h>
diff --git a/board/freescale/p2041rdb/p2041rdb.c b/board/freescale/p2041rdb/p2041rdb.c
index 95ed0ef429..076e63a357 100644
--- a/board/freescale/p2041rdb/p2041rdb.c
+++ b/board/freescale/p2041rdb/p2041rdb.c
@@ -7,6 +7,7 @@
#include <command.h>
#include <env.h>
#include <fdt_support.h>
+#include <image.h>
#include <init.h>
#include <netdev.h>
#include <linux/compiler.h>
diff --git a/board/freescale/qemu-ppce500/qemu-ppce500.c b/board/freescale/qemu-ppce500/qemu-ppce500.c
index e804cfe986..61a9226eb3 100644
--- a/board/freescale/qemu-ppce500/qemu-ppce500.c
+++ b/board/freescale/qemu-ppce500/qemu-ppce500.c
@@ -8,6 +8,8 @@
#include <cpu_func.h>
#include <env.h>
#include <init.h>
+#include <log.h>
+#include <net.h>
#include <pci.h>
#include <time.h>
#include <asm/processor.h>
diff --git a/board/freescale/t102xqds/ddr.c b/board/freescale/t102xqds/ddr.c
index 998a2a5d3f..c27cecd5aa 100644
--- a/board/freescale/t102xqds/ddr.c
+++ b/board/freescale/t102xqds/ddr.c
@@ -6,11 +6,14 @@
#include <common.h>
#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>
#include <asm/fsl_law.h>
#include <asm/mpc85xx_gpio.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/t102xqds/eth_t102xqds.c b/board/freescale/t102xqds/eth_t102xqds.c
index 5b65818eed..49ea21a83a 100644
--- a/board/freescale/t102xqds/eth_t102xqds.c
+++ b/board/freescale/t102xqds/eth_t102xqds.c
@@ -7,6 +7,9 @@
#include <common.h>
#include <command.h>
+#include <fdt_support.h>
+#include <log.h>
+#include <net.h>
#include <netdev.h>
#include <asm/mmu.h>
#include <asm/processor.h>
diff --git a/board/freescale/t102xqds/t102xqds.c b/board/freescale/t102xqds/t102xqds.c
index 32b4780376..84db2fa9bc 100644
--- a/board/freescale/t102xqds/t102xqds.c
+++ b/board/freescale/t102xqds/t102xqds.c
@@ -9,7 +9,9 @@
#include <env.h>
#include <fdt_support.h>
#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/cpld.c b/board/freescale/t102xrdb/cpld.c
index 2b640e0450..47c3b1627e 100644
--- a/board/freescale/t102xrdb/cpld.c
+++ b/board/freescale/t102xrdb/cpld.c
@@ -72,7 +72,7 @@ static void cpld_dump_regs(void)
putc('\n');
}
-int do_cpld(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_cpld(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
int rc = 0;
diff --git a/board/freescale/t102xrdb/ddr.c b/board/freescale/t102xrdb/ddr.c
index 043f0b5b84..3640a47957 100644
--- a/board/freescale/t102xrdb/ddr.c
+++ b/board/freescale/t102xrdb/ddr.c
@@ -6,11 +6,14 @@
#include <common.h>
#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>
#include <asm/fsl_law.h>
#include <asm/mpc85xx_gpio.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/t102xrdb/eth_t102xrdb.c b/board/freescale/t102xrdb/eth_t102xrdb.c
index 299b859cb6..dbf25a237d 100644
--- a/board/freescale/t102xrdb/eth_t102xrdb.c
+++ b/board/freescale/t102xrdb/eth_t102xrdb.c
@@ -7,6 +7,8 @@
#include <common.h>
#include <command.h>
+#include <fdt_support.h>
+#include <net.h>
#include <netdev.h>
#include <asm/mmu.h>
#include <asm/processor.h>
diff --git a/board/freescale/t102xrdb/t102xrdb.c b/board/freescale/t102xrdb/t102xrdb.c
index a34490c8bd..754fcb0ad5 100644
--- a/board/freescale/t102xrdb/t102xrdb.c
+++ b/board/freescale/t102xrdb/t102xrdb.c
@@ -9,6 +9,7 @@
#include <env.h>
#include <fdt_support.h>
#include <i2c.h>
+#include <image.h>
#include <init.h>
#include <netdev.h>
#include <linux/compiler.h>
@@ -367,8 +368,8 @@ static u32 t1023rdb_ctrl(u32 ctrl_type)
return 0;
}
-static int switch_cmd(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int switch_cmd(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
if (argc < 2)
return CMD_RET_USAGE;
diff --git a/board/freescale/t1040qds/ddr.c b/board/freescale/t1040qds/ddr.c
index 2b1d768f1b..0a817d0ee8 100644
--- a/board/freescale/t1040qds/ddr.c
+++ b/board/freescale/t1040qds/ddr.c
@@ -6,11 +6,14 @@
#include <common.h>
#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>
#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/t1040qds/eth.c b/board/freescale/t1040qds/eth.c
index 4185cfac12..b349b77951 100644
--- a/board/freescale/t1040qds/eth.c
+++ b/board/freescale/t1040qds/eth.c
@@ -10,6 +10,8 @@
*/
#include <common.h>
+#include <fdt_support.h>
+#include <net.h>
#include <netdev.h>
#include <asm/fsl_serdes.h>
#include <asm/immap_85xx.h>
diff --git a/board/freescale/t1040qds/t1040qds.c b/board/freescale/t1040qds/t1040qds.c
index 9e253fdec2..c166403ba4 100644
--- a/board/freescale/t1040qds/t1040qds.c
+++ b/board/freescale/t1040qds/t1040qds.c
@@ -9,6 +9,7 @@
#include <env.h>
#include <fdt_support.h>
#include <i2c.h>
+#include <image.h>
#include <init.h>
#include <netdev.h>
#include <linux/compiler.h>
diff --git a/board/freescale/t104xrdb/cpld.c b/board/freescale/t104xrdb/cpld.c
index f9c8ab3752..ac34095f3b 100644
--- a/board/freescale/t104xrdb/cpld.c
+++ b/board/freescale/t104xrdb/cpld.c
@@ -82,7 +82,7 @@ static void cpld_dump_regs(void)
}
#endif
-int do_cpld(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_cpld(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
int rc = 0;
diff --git a/board/freescale/t104xrdb/ddr.c b/board/freescale/t104xrdb/ddr.c
index 2b1b28da88..e313bf99cf 100644
--- a/board/freescale/t104xrdb/ddr.c
+++ b/board/freescale/t104xrdb/ddr.c
@@ -6,11 +6,14 @@
#include <common.h>
#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>
#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/eth.c b/board/freescale/t104xrdb/eth.c
index 107d28da33..9cbc8754dc 100644
--- a/board/freescale/t104xrdb/eth.c
+++ b/board/freescale/t104xrdb/eth.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <net.h>
#include <netdev.h>
#include <asm/fsl_serdes.h>
#include <asm/immap_85xx.h>
diff --git a/board/freescale/t104xrdb/t104xrdb.c b/board/freescale/t104xrdb/t104xrdb.c
index dc3b59d26f..6a4b351068 100644
--- a/board/freescale/t104xrdb/t104xrdb.c
+++ b/board/freescale/t104xrdb/t104xrdb.c
@@ -8,7 +8,9 @@
#include <env.h>
#include <fdt_support.h>
#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 a2a56540b5..3317f99c81 100644
--- a/board/freescale/t208xqds/ddr.c
+++ b/board/freescale/t208xqds/ddr.c
@@ -6,6 +6,8 @@
#include <common.h>
#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 697c23b038..938e606641 100644
--- a/board/freescale/t208xqds/eth_t208xqds.c
+++ b/board/freescale/t208xqds/eth_t208xqds.c
@@ -8,6 +8,9 @@
#include <common.h>
#include <command.h>
+#include <fdt_support.h>
+#include <log.h>
+#include <net.h>
#include <netdev.h>
#include <asm/mmu.h>
#include <asm/processor.h>
@@ -27,6 +30,7 @@
#include "../common/qixis.h"
#include "../common/fman.h"
#include "t208xqds_qixis.h"
+#include <linux/libfdt.h>
#define EMI_NONE 0xFFFFFFFF
#define EMI1_RGMII1 0
diff --git a/board/freescale/t208xqds/t208xqds.c b/board/freescale/t208xqds/t208xqds.c
index 9100401022..4979085e19 100644
--- a/board/freescale/t208xqds/t208xqds.c
+++ b/board/freescale/t208xqds/t208xqds.c
@@ -9,7 +9,9 @@
#include <env.h>
#include <fdt_support.h>
#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/cpld.c b/board/freescale/t208xrdb/cpld.c
index 9a9b9d8e77..b9ba62adff 100644
--- a/board/freescale/t208xrdb/cpld.c
+++ b/board/freescale/t208xrdb/cpld.c
@@ -43,7 +43,7 @@ void cpld_set_defbank(void)
CPLD_WRITE(reset_ctl, CPLD_LBMAP_RESET);
}
-int do_cpld(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_cpld(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
int rc = 0;
diff --git a/board/freescale/t208xrdb/ddr.c b/board/freescale/t208xrdb/ddr.c
index 0b16982f06..6a09d1cd22 100644
--- a/board/freescale/t208xrdb/ddr.c
+++ b/board/freescale/t208xrdb/ddr.c
@@ -6,6 +6,8 @@
#include <common.h>
#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/t208xrdb/eth_t208xrdb.c b/board/freescale/t208xrdb/eth_t208xrdb.c
index 6894947304..db4718128d 100644
--- a/board/freescale/t208xrdb/eth_t208xrdb.c
+++ b/board/freescale/t208xrdb/eth_t208xrdb.c
@@ -7,6 +7,8 @@
#include <common.h>
#include <command.h>
+#include <fdt_support.h>
+#include <net.h>
#include <netdev.h>
#include <asm/mmu.h>
#include <asm/processor.h>
diff --git a/board/freescale/t208xrdb/t208xrdb.c b/board/freescale/t208xrdb/t208xrdb.c
index b5c20112d0..24f0d0764c 100644
--- a/board/freescale/t208xrdb/t208xrdb.c
+++ b/board/freescale/t208xrdb/t208xrdb.c
@@ -8,6 +8,7 @@
#include <env.h>
#include <fdt_support.h>
#include <i2c.h>
+#include <image.h>
#include <init.h>
#include <netdev.h>
#include <linux/compiler.h>
diff --git a/board/freescale/t4qds/ddr.c b/board/freescale/t4qds/ddr.c
index 08656b4e30..4fdd69d424 100644
--- a/board/freescale/t4qds/ddr.c
+++ b/board/freescale/t4qds/ddr.c
@@ -6,6 +6,8 @@
#include <common.h>
#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 b341c82e67..810868ff39 100644
--- a/board/freescale/t4qds/eth.c
+++ b/board/freescale/t4qds/eth.c
@@ -5,6 +5,9 @@
#include <common.h>
#include <command.h>
+#include <fdt_support.h>
+#include <log.h>
+#include <net.h>
#include <netdev.h>
#include <asm/mmu.h>
#include <asm/processor.h>
@@ -25,6 +28,7 @@
#include <hwconfig.h>
#include "../common/qixis.h"
#include "../common/fman.h"
+#include <linux/libfdt.h>
#include "t4240qds_qixis.h"
diff --git a/board/freescale/t4qds/t4240emu.c b/board/freescale/t4qds/t4240emu.c
index 104b40a110..8f2032acc7 100644
--- a/board/freescale/t4qds/t4240emu.c
+++ b/board/freescale/t4qds/t4240emu.c
@@ -8,6 +8,7 @@
#include <env.h>
#include <fdt_support.h>
#include <i2c.h>
+#include <image.h>
#include <init.h>
#include <netdev.h>
#include <linux/compiler.h>
diff --git a/board/freescale/t4qds/t4240qds.c b/board/freescale/t4qds/t4240qds.c
index 869c01de92..8d1a66f223 100644
--- a/board/freescale/t4qds/t4240qds.c
+++ b/board/freescale/t4qds/t4240qds.c
@@ -9,8 +9,10 @@
#include <env.h>
#include <fdt_support.h>
#include <i2c.h>
+#include <image.h>
#include <init.h>
#include <irq_func.h>
+#include <log.h>
#include <netdev.h>
#include <linux/compiler.h>
#include <asm/mmu.h>
@@ -21,6 +23,7 @@
#include <asm/fsl_serdes.h>
#include <asm/fsl_liodn.h>
#include <fm_eth.h>
+#include <linux/delay.h>
#include "../common/qixis.h"
#include "../common/vsc3316_3308.h"
@@ -901,9 +904,9 @@ void qixis_dump_switch(void)
}
}
-static int do_vdd_adjust(cmd_tbl_t *cmdtp,
+static int do_vdd_adjust(struct cmd_tbl *cmdtp,
int flag, int argc,
- char * const argv[])
+ char *const argv[])
{
ulong override;
diff --git a/board/freescale/t4rdb/cpld.c b/board/freescale/t4rdb/cpld.c
index 470b5f9154..d484509bc2 100644
--- a/board/freescale/t4rdb/cpld.c
+++ b/board/freescale/t4rdb/cpld.c
@@ -95,7 +95,7 @@ static void cpld_dump_regs(void)
#endif
#ifndef CONFIG_SPL_BUILD
-int do_cpld(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_cpld(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
int rc = 0;
diff --git a/board/freescale/t4rdb/ddr.c b/board/freescale/t4rdb/ddr.c
index 787de6d7ad..5b7d10c979 100644
--- a/board/freescale/t4rdb/ddr.c
+++ b/board/freescale/t4rdb/ddr.c
@@ -6,6 +6,8 @@
#include <common.h>
#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/t4rdb/eth.c b/board/freescale/t4rdb/eth.c
index 2ef192c452..4c896c8a90 100644
--- a/board/freescale/t4rdb/eth.c
+++ b/board/freescale/t4rdb/eth.c
@@ -7,6 +7,8 @@
#include <common.h>
#include <command.h>
+#include <fdt_support.h>
+#include <net.h>
#include <netdev.h>
#include <asm/mmu.h>
#include <asm/processor.h>
diff --git a/board/freescale/t4rdb/t4240rdb.c b/board/freescale/t4rdb/t4240rdb.c
index 8015666ecc..d801f2c7a1 100644
--- a/board/freescale/t4rdb/t4240rdb.c
+++ b/board/freescale/t4rdb/t4240rdb.c
@@ -8,6 +8,7 @@
#include <env.h>
#include <fdt_support.h>
#include <i2c.h>
+#include <image.h>
#include <init.h>
#include <netdev.h>
#include <linux/compiler.h>
diff --git a/board/gardena/smart-gateway-mt7688/board.c b/board/gardena/smart-gateway-mt7688/board.c
index 776afa43a6..8a3a6e3482 100644
--- a/board/gardena/smart-gateway-mt7688/board.c
+++ b/board/gardena/smart-gateway-mt7688/board.c
@@ -4,14 +4,19 @@
*/
#include <common.h>
+#include <command.h>
#include <env.h>
#include <env_internal.h>
+#include <flash.h>
#include <init.h>
#include <led.h>
+#include <log.h>
#include <malloc.h>
#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>
#include <linux/ctype.h>
@@ -205,7 +210,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/common.c b/board/gateworks/gw_ventana/common.c
index 1240a9da17..1a35249724 100644
--- a/board/gateworks/gw_ventana/common.c
+++ b/board/gateworks/gw_ventana/common.c
@@ -5,6 +5,8 @@
* Author: Tim Harvey <tharvey@gateworks.com>
*/
+#include <common.h>
+#include <log.h>
#include <asm/arch/clock.h>
#include <asm/arch/mx6-pins.h>
#include <asm/arch/sys_proto.h>
@@ -13,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 5e9cf11575..a5a151d85b 100644
--- a/board/gateworks/gw_ventana/eeprom.c
+++ b/board/gateworks/gw_ventana/eeprom.c
@@ -5,11 +5,14 @@
*/
#include <common.h>
+#include <command.h>
#include <errno.h>
#include <hexdump.h>
#include <i2c.h>
+#include <log.h>
#include <malloc.h>
#include <asm/bitops.h>
+#include <linux/delay.h>
#include "gsc.h"
#include "ventana_eeprom.h"
@@ -158,7 +161,8 @@ static struct ventana_eeprom_config *get_config(const char *name)
static u8 econfig_bytes[sizeof(ventana_info.config)];
static int econfig_init = -1;
-static int do_econfig(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_econfig(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct ventana_eeprom_config *cfg;
struct ventana_board_info *info = &ventana_info;
diff --git a/board/gateworks/gw_ventana/gsc.c b/board/gateworks/gw_ventana/gsc.c
index 068f8cd9e7..bcb6bca346 100644
--- a/board/gateworks/gw_ventana/gsc.c
+++ b/board/gateworks/gw_ventana/gsc.c
@@ -5,6 +5,10 @@
* Author: Tim Harvey <tharvey@gateworks.com>
*/
+#include <common.h>
+#include <command.h>
+#include <log.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <common.h>
#include <i2c.h>
@@ -176,8 +180,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 +222,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 +262,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/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c
index 8a694a71c9..649e622944 100644
--- a/board/gateworks/gw_ventana/gw_ventana.c
+++ b/board/gateworks/gw_ventana/gw_ventana.c
@@ -6,6 +6,9 @@
*/
#include <common.h>
+#include <init.h>
+#include <log.h>
+#include <net.h>
#include <asm/arch/clock.h>
#include <asm/arch/crm_regs.h>
#include <asm/arch/iomux.h>
@@ -32,6 +35,8 @@
#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>
#include <power/pfuze100_pmic.h>
diff --git a/board/gateworks/gw_ventana/gw_ventana_spl.c b/board/gateworks/gw_ventana/gw_ventana_spl.c
index 80fec5f9cf..e0e4bac161 100644
--- a/board/gateworks/gw_ventana/gw_ventana_spl.c
+++ b/board/gateworks/gw_ventana/gw_ventana_spl.c
@@ -7,6 +7,8 @@
#include <common.h>
#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/controlcenterdc.c b/board/gdsys/a38x/controlcenterdc.c
index 4eb7d76660..a2287f9deb 100644
--- a/board/gdsys/a38x/controlcenterdc.c
+++ b/board/gdsys/a38x/controlcenterdc.c
@@ -5,13 +5,16 @@
*/
#include <common.h>
+#include <command.h>
#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>
#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/hre.c b/board/gdsys/a38x/hre.c
index 027ad1f57e..699241b3e6 100644
--- a/board/gdsys/a38x/hre.c
+++ b/board/gdsys/a38x/hre.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <log.h>
#include <malloc.h>
#include <fs.h>
#include <i2c.h>
diff --git a/board/gdsys/a38x/hydra.c b/board/gdsys/a38x/hydra.c
index fa50ad2830..daade6da0a 100644
--- a/board/gdsys/a38x/hydra.c
+++ b/board/gdsys/a38x/hydra.c
@@ -1,4 +1,5 @@
#include <common.h>
+#include <command.h>
#include <console.h> /* ctrlc */
#include <asm/io.h>
@@ -89,7 +90,7 @@ void hydra_initialize(void)
#define REFL_PATTERN (0xdededede)
#define REFL_PATTERN_INV (~REFL_PATTERN)
-int do_hydrate(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_hydrate(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
uint k = 0;
void __iomem *pcie2_base = (void __iomem *)(MVEBU_REG_PCIE_BASE +
diff --git a/board/gdsys/a38x/ihs_phys.c b/board/gdsys/a38x/ihs_phys.c
index 494de18f86..c23d150921 100644
--- a/board/gdsys/a38x/ihs_phys.c
+++ b/board/gdsys/a38x/ihs_phys.c
@@ -2,6 +2,8 @@
#include <dm.h>
#include <miiphy.h>
#include <asm-generic/gpio.h>
+#include <linux/bitops.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 05a14ff103..3ea2bec8eb 100644
--- a/board/gdsys/common/cmd_ioloop.c
+++ b/board/gdsys/common/cmd_ioloop.c
@@ -7,6 +7,8 @@
#include <common.h>
#include <command.h>
#include <console.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <gdsys_fpga.h>
@@ -264,7 +266,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 +323,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 +376,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 +442,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 +503,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/ihs_mdio.c b/board/gdsys/common/ihs_mdio.c
index f160a57cc2..5f1215e9e8 100644
--- a/board/gdsys/common/ihs_mdio.c
+++ b/board/gdsys/common/ihs_mdio.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <linux/delay.h>
#include <miiphy.h>
#ifdef CONFIG_GDSYS_LEGACY_DRIVERS
diff --git a/board/gdsys/common/ioep-fpga.c b/board/gdsys/common/ioep-fpga.c
index 066222c563..7292d7ab5a 100644
--- a/board/gdsys/common/ioep-fpga.c
+++ b/board/gdsys/common/ioep-fpga.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <gdsys_fpga.h>
+#include <linux/bitops.h>
enum pcb_video_type {
PCB_DVI_SL,
@@ -443,6 +444,7 @@ static int get_features(unsigned int fpga, struct fpga_features *features)
return 0;
}
+#include <linux/bitops.h>
#endif
bool ioep_fpga_has_osd(unsigned int fpga)
diff --git a/board/gdsys/common/mclink.c b/board/gdsys/common/mclink.c
index c43d24b26d..6147fbfc87 100644
--- a/board/gdsys/common/mclink.c
+++ b/board/gdsys/common/mclink.c
@@ -11,6 +11,7 @@
#include <errno.h>
#include <gdsys_fpga.h>
+#include <linux/delay.h>
enum {
MCINT_SLAVE_LINK_CHANGED_EV = 1 << 7,
diff --git a/board/gdsys/common/osd.c b/board/gdsys/common/osd.c
index 10c4329146..679f8f3019 100644
--- a/board/gdsys/common/osd.c
+++ b/board/gdsys/common/osd.c
@@ -7,8 +7,10 @@
#ifdef CONFIG_GDSYS_LEGACY_DRIVERS
#include <common.h>
+#include <command.h>
#include <i2c.h>
#include <malloc.h>
+#include <linux/stringify.h>
#include "ch7301.h"
#include "dp501.h"
@@ -259,7 +261,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 +399,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 +452,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 +503,4 @@ U_BOOT_CMD(
") size_y(max. " __stringify(MAX_Y_CHARS) ")\n"
);
-#endif /* CONFIG_GDSYS_LEGACY_DRIVERS */ \ No newline at end of file
+#endif /* CONFIG_GDSYS_LEGACY_DRIVERS */
diff --git a/board/gdsys/common/osd_cmd.c b/board/gdsys/common/osd_cmd.c
index 53179b9811..fe6249794e 100644
--- a/board/gdsys/common/osd_cmd.c
+++ b/board/gdsys/common/osd_cmd.c
@@ -10,13 +10,14 @@
*/
#include <common.h>
+#include <command.h>
#include <dm.h>
#include <hexdump.h>
#include <video_osd.h>
#include <malloc.h>
-static int do_osd_write(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_osd_write(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct udevice *dev;
uint x, y;
@@ -68,8 +69,8 @@ static int do_osd_write(cmd_tbl_t *cmdtp, int flag, int argc,
return CMD_RET_SUCCESS;
}
-static int do_osd_print(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_osd_print(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct udevice *dev;
uint x, y;
@@ -99,8 +100,8 @@ static int do_osd_print(cmd_tbl_t *cmdtp, int flag, int argc,
return CMD_RET_SUCCESS;
}
-static int do_osd_size(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_osd_size(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct udevice *dev;
uint x, y;
diff --git a/board/gdsys/common/phy.c b/board/gdsys/common/phy.c
index d40c08d9e9..516f4e8edc 100644
--- a/board/gdsys/common/phy.c
+++ b/board/gdsys/common/phy.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <log.h>
#include <miiphy.h>
diff --git a/board/gdsys/mpc8308/gazerbeam.c b/board/gdsys/mpc8308/gazerbeam.c
index 8c9636d292..b64a6d992d 100644
--- a/board/gdsys/mpc8308/gazerbeam.c
+++ b/board/gdsys/mpc8308/gazerbeam.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <board.h>
+#include <command.h>
#include <dm.h>
#include <env.h>
#include <fdt_support.h>
diff --git a/board/gdsys/mpc8308/hrcon.c b/board/gdsys/mpc8308/hrcon.c
index d1110157a2..d206f8f0c5 100644
--- a/board/gdsys/mpc8308/hrcon.c
+++ b/board/gdsys/mpc8308/hrcon.c
@@ -6,10 +6,13 @@
#include <common.h>
#include <env.h>
+#include <flash.h>
#include <hwconfig.h>
#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>
#include <pci.h>
diff --git a/board/gdsys/mpc8308/mpc8308.c b/board/gdsys/mpc8308/mpc8308.c
index d4108457d9..0f90f8ad32 100644
--- a/board/gdsys/mpc8308/mpc8308.c
+++ b/board/gdsys/mpc8308/mpc8308.c
@@ -10,6 +10,7 @@
#include <asm/processor.h>
#include <asm/io.h>
#include <asm/global_data.h>
+#include <linux/delay.h>
#include "mpc8308.h"
#include <gdsys_fpga.h>
diff --git a/board/gdsys/mpc8308/strider.c b/board/gdsys/mpc8308/strider.c
index 9ba9e4278a..b3af8fec91 100644
--- a/board/gdsys/mpc8308/strider.c
+++ b/board/gdsys/mpc8308/strider.c
@@ -6,10 +6,13 @@
#include <common.h>
#include <env.h>
+#include <flash.h>
#include <hwconfig.h>
#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>
#include <pci.h>
diff --git a/board/gdsys/p1022/controlcenterd-id.c b/board/gdsys/p1022/controlcenterd-id.c
index ad56dd7d01..1b5aa9042f 100644
--- a/board/gdsys/p1022/controlcenterd-id.c
+++ b/board/gdsys/p1022/controlcenterd-id.c
@@ -11,15 +11,18 @@
#endif
#include <common.h>
+#include <bootstage.h>
#include <command.h>
#include <dm.h>
#include <env.h>
#include <hang.h>
+#include <log.h>
#include <malloc.h>
#include <fs.h>
#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 8e868165ed..73ce985d1a 100644
--- a/board/gdsys/p1022/controlcenterd.c
+++ b/board/gdsys/p1022/controlcenterd.c
@@ -24,7 +24,9 @@
#include <common.h>
#include <command.h>
#include <env.h>
+#include <image.h>
#include <init.h>
+#include <net.h>
#include <pci.h>
#include <asm/processor.h>
#include <asm/mmu.h>
@@ -34,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>
@@ -221,7 +224,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/gdsys/p1022/ddr.c b/board/gdsys/p1022/ddr.c
index 591e08f037..eb06d22471 100644
--- a/board/gdsys/p1022/ddr.c
+++ b/board/gdsys/p1022/ddr.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <i2c.h>
+#include <log.h>
#include <fsl_ddr_sdram.h>
#include <fsl_ddr_dimm_params.h>
diff --git a/board/gdsys/p1022/diu.c b/board/gdsys/p1022/diu.c
index 7e1e6ce85c..9a5d3c11e1 100644
--- a/board/gdsys/p1022/diu.c
+++ b/board/gdsys/p1022/diu.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <clock_legacy.h>
#include <command.h>
+#include <log.h>
#include <linux/ctype.h>
#include <asm/io.h>
#include <stdio_dev.h>
diff --git a/board/ge/bx50v3/bx50v3.c b/board/ge/bx50v3/bx50v3.c
index 69cd0a1bc7..edccfd03b3 100644
--- a/board/ge/bx50v3/bx50v3.c
+++ b/board/ge/bx50v3/bx50v3.c
@@ -5,12 +5,14 @@
* Copyright 2012 Freescale Semiconductor, Inc.
*/
+#include <image.h>
#include <init.h>
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
#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/chromebook_coral/coral.c b/board/google/chromebook_coral/coral.c
index 4e34710b97..12d4fe63cb 100644
--- a/board/google/chromebook_coral/coral.c
+++ b/board/google/chromebook_coral/coral.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <command.h>
int arch_misc_init(void)
{
diff --git a/board/google/gru/gru.c b/board/google/gru/gru.c
index b6b4f19d84..7dfbc3ac86 100644
--- a/board/google/gru/gru.c
+++ b/board/google/gru/gru.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <init.h>
#ifdef CONFIG_SPL_BUILD
/* provided to defeat compiler optimisation in board_init_f() */
diff --git a/board/google/imx8mq_phanbell/spl.c b/board/google/imx8mq_phanbell/spl.c
index b6afdfc913..6f39599316 100644
--- a/board/google/imx8mq_phanbell/spl.c
+++ b/board/google/imx8mq_phanbell/spl.c
@@ -8,6 +8,8 @@
#include <hang.h>
#include <asm/io.h>
#include <errno.h>
+#include <init.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/arch/ddr.h>
#include <asm/arch/imx8mq_pins.h>
@@ -17,6 +19,7 @@
#include <asm/mach-imx/gpio.h>
#include <asm/mach-imx/mxc_i2c.h>
#include <asm/sections.h>
+#include <linux/delay.h>
#include <fsl_esdhc_imx.h>
#include <mmc.h>
#include <spl.h>
diff --git a/board/google/veyron/veyron.c b/board/google/veyron/veyron.c
index 6b9c34818b..6d84a326a3 100644
--- a/board/google/veyron/veyron.c
+++ b/board/google/veyron/veyron.c
@@ -6,8 +6,11 @@
#include <clk.h>
#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/delay.h>
#include <linux/err.h>
#include <power/regulator.h>
diff --git a/board/grinn/chiliboard/board.c b/board/grinn/chiliboard/board.c
index 7f0de5e42b..8cc9278287 100644
--- a/board/grinn/chiliboard/board.c
+++ b/board/grinn/chiliboard/board.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <init.h>
+#include <net.h>
#include <asm/arch/chilisom.h>
#include <asm/arch/cpu.h>
#include <asm/arch/hardware.h>
diff --git a/board/grinn/liteboard/board.c b/board/grinn/liteboard/board.c
index 5d71b639df..df32e12037 100644
--- a/board/grinn/liteboard/board.c
+++ b/board/grinn/liteboard/board.c
@@ -4,6 +4,7 @@
* Copyright (C) 2016 Grinn
*/
+#include <common.h>
#include <command.h>
#include <init.h>
#include <asm/arch/clock.h>
diff --git a/board/gumstix/duovero/duovero.c b/board/gumstix/duovero/duovero.c
index 78fb98ef64..0df03a5a61 100644
--- a/board/gumstix/duovero/duovero.c
+++ b/board/gumstix/duovero/duovero.c
@@ -5,6 +5,8 @@
* Maintainer: Ash Charles <ash@gumstix.com>
*/
#include <common.h>
+#include <init.h>
+#include <net.h>
#include <netdev.h>
#include <asm/arch/sys_proto.h>
#include <asm/arch/mmc_host_def.h>
@@ -14,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/gumstix/pepper/board.c b/board/gumstix/pepper/board.c
index 65e5e1e60f..ebb5a560c3 100644
--- a/board/gumstix/pepper/board.c
+++ b/board/gumstix/pepper/board.c
@@ -9,6 +9,8 @@
#include <common.h>
#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/highbank/ahci.c b/board/highbank/ahci.c
index 49cd117e3c..9c057278ac 100644
--- a/board/highbank/ahci.c
+++ b/board/highbank/ahci.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <ahci.h>
#include <asm/io.h>
+#include <linux/delay.h>
#define CPHY_MAP(dev, addr) ((((dev) & 0x1f) << 7) | (((addr) >> 9) & 0x7f))
#define CPHY_ADDR(base, dev, addr) ((base) | (((addr) & 0x1ff) << 2))
diff --git a/board/highbank/highbank.c b/board/highbank/highbank.c
index 3e0edd48f5..063831dfe8 100644
--- a/board/highbank/highbank.c
+++ b/board/highbank/highbank.c
@@ -7,6 +7,9 @@
#include <ahci.h>
#include <cpu_func.h>
#include <env.h>
+#include <fdt_support.h>
+#include <init.h>
+#include <net.h>
#include <netdev.h>
#include <scsi.h>
diff --git a/board/hisilicon/hikey/hikey.c b/board/hisilicon/hikey/hikey.c
index 84400090b3..6eea939b91 100644
--- a/board/hisilicon/hikey/hikey.c
+++ b/board/hisilicon/hikey/hikey.c
@@ -7,12 +7,15 @@
#include <cpu_func.h>
#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>
#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 84c26e0c14..db485db10a 100644
--- a/board/hisilicon/hikey960/hikey960.c
+++ b/board/hisilicon/hikey960/hikey960.c
@@ -8,11 +8,14 @@
#include <cpu_func.h>
#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>
#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 4937dc374c..371c3c33fc 100644
--- a/board/hisilicon/poplar/poplar.c
+++ b/board/hisilicon/poplar/poplar.c
@@ -8,10 +8,13 @@
#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>
#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 6e74e939c3..d0d34012d7 100644
--- a/board/ids/ids8313/ids8313.c
+++ b/board/ids/ids8313/ids8313.c
@@ -16,6 +16,8 @@
#include <init.h>
#include <mpc83xx.h>
#include <spi.h>
+#include <asm/bitops.h>
+#include <linux/delay.h>
#include <linux/libfdt.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/imgtec/boston/checkboard.c b/board/imgtec/boston/checkboard.c
index 46ec1e8d9c..1b8a47d254 100644
--- a/board/imgtec/boston/checkboard.c
+++ b/board/imgtec/boston/checkboard.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/mipsregs.h>
diff --git a/board/imgtec/ci20/ci20.c b/board/imgtec/ci20/ci20.c
index 170ea12c93..5339b9e9f9 100644
--- a/board/imgtec/ci20/ci20.c
+++ b/board/imgtec/ci20/ci20.c
@@ -8,10 +8,13 @@
#include <common.h>
#include <env.h>
+#include <init.h>
#include <net.h>
#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>
#include <mach/jz4780_gpio.h>
diff --git a/board/imgtec/malta/malta.c b/board/imgtec/malta/malta.c
index 77ce75ecf2..88a1a63bf4 100644
--- a/board/imgtec/malta/malta.c
+++ b/board/imgtec/malta/malta.c
@@ -7,11 +7,13 @@
#include <common.h>
#include <ide.h>
#include <init.h>
+#include <net.h>
#include <netdev.h>
#include <pci.h>
#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/imgtec/xilfpga/xilfpga.c b/board/imgtec/xilfpga/xilfpga.c
index 86645155e6..0b68bbde50 100644
--- a/board/imgtec/xilfpga/xilfpga.c
+++ b/board/imgtec/xilfpga/xilfpga.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <init.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/intel/cougarcanyon2/cougarcanyon2.c b/board/intel/cougarcanyon2/cougarcanyon2.c
index 7aadd9e477..ce11eae59d 100644
--- a/board/intel/cougarcanyon2/cougarcanyon2.c
+++ b/board/intel/cougarcanyon2/cougarcanyon2.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <init.h>
#include <pci.h>
#include <smsc_sio1007.h>
#include <asm/ibmpc.h>
diff --git a/board/intel/crownbay/crownbay.c b/board/intel/crownbay/crownbay.c
index 57dce4185d..55095deead 100644
--- a/board/intel/crownbay/crownbay.c
+++ b/board/intel/crownbay/crownbay.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/ibmpc.h>
#include <asm/pnp_def.h>
#include <smsc_lpc47m.h>
diff --git a/board/intel/minnowmax/minnowmax.c b/board/intel/minnowmax/minnowmax.c
index e5fc939793..b02e3f0d4e 100644
--- a/board/intel/minnowmax/minnowmax.c
+++ b/board/intel/minnowmax/minnowmax.c
@@ -5,6 +5,8 @@
#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/inversepath/usbarmory/usbarmory.c b/board/inversepath/usbarmory/usbarmory.c
index 4fa34e1b51..02a514809f 100644
--- a/board/inversepath/usbarmory/usbarmory.c
+++ b/board/inversepath/usbarmory/usbarmory.c
@@ -17,6 +17,7 @@
#include <asm/arch/crm_regs.h>
#include <asm/arch/clock.h>
#include <asm/arch/iomux-mx53.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <i2c.h>
#include <mmc.h>
diff --git a/board/iomega/iconnect/iconnect.c b/board/iomega/iconnect/iconnect.c
index fc7847bd1d..79c794bfc8 100644
--- a/board/iomega/iconnect/iconnect.c
+++ b/board/iomega/iconnect/iconnect.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <init.h>
#include <miiphy.h>
#include <asm/arch/cpu.h>
#include <asm/arch/soc.h>
diff --git a/board/isee/igep003x/board.c b/board/isee/igep003x/board.c
index b0f8d8a314..a28d447825 100644
--- a/board/isee/igep003x/board.c
+++ b/board/isee/igep003x/board.c
@@ -10,6 +10,7 @@
#include <errno.h>
#include <init.h>
#include <malloc.h>
+#include <net.h>
#include <serial.h>
#include <spl.h>
#include <asm/arch/cpu.h>
diff --git a/board/isee/igep00x0/common.c b/board/isee/igep00x0/common.c
index f5d62ffc2e..2c269773a8 100644
--- a/board/isee/igep00x0/common.c
+++ b/board/isee/igep00x0/common.c
@@ -7,6 +7,7 @@
#include <asm/arch/mux.h>
#include <asm/arch/sys_proto.h>
#include <jffs2/load_kernel.h>
+#include <linux/delay.h>
#include <linux/mtd/rawnand.h>
#include "igep00x0.h"
diff --git a/board/isee/igep00x0/igep00x0.c b/board/isee/igep00x0/igep00x0.c
index 1b871fdcc5..af0bce6426 100644
--- a/board/isee/igep00x0/igep00x0.c
+++ b/board/isee/igep00x0/igep00x0.c
@@ -5,7 +5,9 @@
*/
#include <common.h>
#include <env.h>
+#include <init.h>
#include <malloc.h>
+#include <net.h>
#include <status_led.h>
#include <dm.h>
#include <ns16550.h>
@@ -18,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_imx53/kp_id_rev.c b/board/k+p/kp_imx53/kp_id_rev.c
index 9dae54dda5..7103a3e0f2 100644
--- a/board/k+p/kp_imx53/kp_id_rev.c
+++ b/board/k+p/kp_imx53/kp_id_rev.c
@@ -13,6 +13,7 @@
#include <env.h>
#include <i2c.h>
#include "kp_id_rev.h"
+#include <net.h>
static int eeprom_has_been_read;
static struct id_eeprom eeprom;
diff --git a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c
index 25a5e4b9ba..75fb6acfb3 100644
--- a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c
+++ b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c
@@ -6,6 +6,8 @@
*/
#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>
@@ -14,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 08f7f8d884..9c9e1598f8 100644
--- a/board/keymile/common/common.c
+++ b/board/keymile/common/common.c
@@ -17,6 +17,7 @@
#include <netdev.h>
#include <asm/io.h>
#include <linux/ctype.h>
+#include <linux/delay.h>
#if defined(CONFIG_POST)
#include "post.h"
@@ -157,8 +158,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 +204,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 +345,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/keymile/common/qrio.c b/board/keymile/common/qrio.c
index 0cb33663aa..06a4e67881 100644
--- a/board/keymile/common/qrio.c
+++ b/board/keymile/common/qrio.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <linux/bitops.h>
#include "common.h"
#include "qrio.h"
diff --git a/board/keymile/km83xx/km83xx.c b/board/keymile/km83xx/km83xx.c
index 8f7e7f05d8..29514d8363 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>
@@ -25,6 +26,7 @@
#include <asm/mmu.h>
#include <asm/processor.h>
#include <pci.h>
+#include <linux/delay.h>
#include <linux/libfdt.h>
#include <post.h>
diff --git a/board/keymile/km83xx/km83xx_i2c.c b/board/keymile/km83xx/km83xx_i2c.c
index 113ca70a1a..62100b1949 100644
--- a/board/keymile/km83xx/km83xx_i2c.c
+++ b/board/keymile/km83xx/km83xx_i2c.c
@@ -8,6 +8,7 @@
#include <i2c.h>
#include <asm/io.h>
#include <linux/ctype.h>
+#include <linux/delay.h>
#include "../common/common.h"
static void i2c_write_start_seq(void)
diff --git a/board/keymile/km_arm/fpga_config.c b/board/keymile/km_arm/fpga_config.c
index 8bb0470bc3..abb5b7d60d 100644
--- a/board/keymile/km_arm/fpga_config.c
+++ b/board/keymile/km_arm/fpga_config.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <i2c.h>
+#include <linux/delay.h>
#include <linux/errno.h>
/* GPIO Pin from kirkwood connected to PROGRAM_B pin of the xilinx FPGA */
diff --git a/board/keymile/kmp204x/ddr.c b/board/keymile/kmp204x/ddr.c
index ee2e3d6b9a..d9c9ddf2ba 100644
--- a/board/keymile/kmp204x/ddr.c
+++ b/board/keymile/kmp204x/ddr.c
@@ -9,6 +9,8 @@
#include <common.h>
#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/keymile/kmp204x/eth.c b/board/keymile/kmp204x/eth.c
index 7499d2078b..8635a5448b 100644
--- a/board/keymile/kmp204x/eth.c
+++ b/board/keymile/kmp204x/eth.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <net.h>
#include <netdev.h>
#include <fm_eth.h>
#include <fsl_mdio.h>
diff --git a/board/keymile/kmp204x/kmp204x.c b/board/keymile/kmp204x/kmp204x.c
index 0a6cf1fd29..21afbc7f39 100644
--- a/board/keymile/kmp204x/kmp204x.c
+++ b/board/keymile/kmp204x/kmp204x.c
@@ -10,6 +10,7 @@
#include <command.h>
#include <env.h>
#include <fdt_support.h>
+#include <image.h>
#include <init.h>
#include <netdev.h>
#include <linux/compiler.h>
diff --git a/board/keymile/kmp204x/pci.c b/board/keymile/kmp204x/pci.c
index 15bbc810a1..87bf16886a 100644
--- a/board/keymile/kmp204x/pci.c
+++ b/board/keymile/kmp204x/pci.c
@@ -11,6 +11,7 @@
#include <init.h>
#include <pci.h>
#include <asm/fsl_pci.h>
+#include <linux/delay.h>
#include <linux/libfdt.h>
#include <fdt_support.h>
#include <asm/fsl_serdes.h>
diff --git a/board/kmc/kzm9g/kzm9g.c b/board/kmc/kzm9g/kzm9g.c
index 6ef960b06b..7bc66af193 100644
--- a/board/kmc/kzm9g/kzm9g.c
+++ b/board/kmc/kzm9g/kzm9g.c
@@ -6,6 +6,8 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
+#include <net.h>
#include <asm/io.h>
#include <asm/arch/sys_proto.h>
#include <asm/gpio.h>
diff --git a/board/kobol/helios4/helios4.c b/board/kobol/helios4/helios4.c
index 3c3592ecf5..97b152664a 100644
--- a/board/kobol/helios4/helios4.c
+++ b/board/kobol/helios4/helios4.c
@@ -6,7 +6,9 @@
#include <common.h>
#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/kosagi/novena/novena.c b/board/kosagi/novena/novena.c
index 4bec2be43f..b1939f8a56 100644
--- a/board/kosagi/novena/novena.c
+++ b/board/kosagi/novena/novena.c
@@ -9,6 +9,7 @@
#include <dm.h>
#include <eeprom.h>
#include <init.h>
+#include <log.h>
#include <dm/device-internal.h>
#include <ahci.h>
#include <env.h>
diff --git a/board/kosagi/novena/novena_spl.c b/board/kosagi/novena/novena_spl.c
index bc52b91b2f..9926285675 100644
--- a/board/kosagi/novena/novena_spl.c
+++ b/board/kosagi/novena/novena_spl.c
@@ -23,6 +23,7 @@
#include <mmc.h>
#include <fsl_esdhc_imx.h>
#include <spl.h>
+#include <linux/delay.h>
#include <asm/arch/mx6-ddr.h>
diff --git a/board/kosagi/novena/video.c b/board/kosagi/novena/video.c
index 7083b6e103..a96a877f5f 100644
--- a/board/kosagi/novena/video.c
+++ b/board/kosagi/novena/video.c
@@ -10,6 +10,8 @@
*/
#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/lego/ev3/legoev3.c b/board/lego/ev3/legoev3.c
index fa099e95f5..51b669a891 100644
--- a/board/lego/ev3/legoev3.c
+++ b/board/lego/ev3/legoev3.c
@@ -14,6 +14,7 @@
#include <common.h>
#include <i2c.h>
+#include <init.h>
#include <spi.h>
#include <spi_flash.h>
#include <asm/arch/hardware.h>
diff --git a/board/lg/sniper/sniper.c b/board/lg/sniper/sniper.c
index b4205d6ed4..2825eccc03 100644
--- a/board/lg/sniper/sniper.c
+++ b/board/lg/sniper/sniper.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <dm.h>
#include <env.h>
+#include <init.h>
#include <linux/ctype.h>
#include <linux/usb/musb.h>
#include <asm/omap_musb.h>
diff --git a/board/liebherr/display5/display5.c b/board/liebherr/display5/display5.c
index 85ca777c1d..ec55fdf0aa 100644
--- a/board/liebherr/display5/display5.c
+++ b/board/liebherr/display5/display5.c
@@ -6,6 +6,9 @@
#include <common.h>
#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>
@@ -22,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 765463e370..ac4f23f4d6 100644
--- a/board/liebherr/display5/spl.c
+++ b/board/liebherr/display5/spl.c
@@ -7,8 +7,12 @@
#include <common.h>
#include <cpu_func.h>
#include <env.h>
+#include <image.h>
+#include <init.h>
+#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 08d2b56d54..b234f06220 100644
--- a/board/liebherr/mccmon6/spl.c
+++ b/board/liebherr/mccmon6/spl.c
@@ -5,6 +5,8 @@
* Richard Hu <hakahu@gmail.com>
*/
+#include <image.h>
+#include <init.h>
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/iomux.h>
@@ -20,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 df5d316717..8159f3a2d9 100644
--- a/board/liebherr/xea/xea.c
+++ b/board/liebherr/xea/xea.c
@@ -14,12 +14,17 @@
*/
#include <common.h>
+#include <fdt_support.h>
+#include <init.h>
+#include <log.h>
+#include <net.h>
#include <asm/gpio.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
#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/logicpd/am3517evm/am3517evm.c b/board/logicpd/am3517evm/am3517evm.c
index 18f3c3f9d9..b25b02b641 100644
--- a/board/logicpd/am3517evm/am3517evm.c
+++ b/board/logicpd/am3517evm/am3517evm.c
@@ -12,6 +12,8 @@
#include <common.h>
#include <dm.h>
+#include <init.h>
+#include <net.h>
#include <ns16550.h>
#include <serial.h>
#include <asm/io.h>
diff --git a/board/logicpd/omap3som/omap3logic.c b/board/logicpd/omap3som/omap3logic.c
index 21d8a21010..5c178a27e7 100644
--- a/board/logicpd/omap3som/omap3logic.c
+++ b/board/logicpd/omap3som/omap3logic.c
@@ -13,6 +13,7 @@
#include <common.h>
#include <dm.h>
#include <init.h>
+#include <net.h>
#include <ns16550.h>
#include <netdev.h>
#include <flash.h>
diff --git a/board/logicpd/zoom1/zoom1.c b/board/logicpd/zoom1/zoom1.c
index 6bfa41737f..53dc9762f8 100644
--- a/board/logicpd/zoom1/zoom1.c
+++ b/board/logicpd/zoom1/zoom1.c
@@ -16,6 +16,8 @@
#include <common.h>
#include <dm.h>
#include <env.h>
+#include <init.h>
+#include <net.h>
#include <ns16550.h>
#include <netdev.h>
#include <twl4030.h>
diff --git a/board/maxbcm/maxbcm.c b/board/maxbcm/maxbcm.c
index 395904f8c8..3c6422214f 100644
--- a/board/maxbcm/maxbcm.c
+++ b/board/maxbcm/maxbcm.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <init.h>
#include <miiphy.h>
#include <asm/io.h>
#include <asm/arch/cpu.h>
diff --git a/board/mediatek/mt7622/mt7622_rfb.c b/board/mediatek/mt7622/mt7622_rfb.c
index b9296bede2..6a5f936635 100644
--- a/board/mediatek/mt7622/mt7622_rfb.c
+++ b/board/mediatek/mt7622/mt7622_rfb.c
@@ -6,6 +6,8 @@
#include <common.h>
#include <config.h>
+#include <env.h>
+#include <init.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/mediatek/mt8512/mt8512.c b/board/mediatek/mt8512/mt8512.c
index 726111d7d3..4ad62b73a6 100644
--- a/board/mediatek/mt8512/mt8512.c
+++ b/board/mediatek/mt8512/mt8512.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <wdt.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/mediatek/mt8518/mt8518_ap1.c b/board/mediatek/mt8518/mt8518_ap1.c
index 2ac7c6cd18..c9acfcb1a5 100644
--- a/board/mediatek/mt8518/mt8518_ap1.c
+++ b/board/mediatek/mt8518/mt8518_ap1.c
@@ -5,6 +5,8 @@
#include <common.h>
#include <dm.h>
+#include <init.h>
+#include <log.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/menlo/m53menlo/m53menlo.c b/board/menlo/m53menlo/m53menlo.c
index 70a13aa17b..58a564ac31 100644
--- a/board/menlo/m53menlo/m53menlo.c
+++ b/board/menlo/m53menlo/m53menlo.c
@@ -26,6 +26,7 @@
#include <gzip.h>
#include <i2c.h>
#include <ipu_pixfmt.h>
+#include <linux/bitops.h>
#include <linux/errno.h>
#include <linux/fb.h>
#include <mmc.h>
diff --git a/board/microchip/mpfs_icicle/mpfs_icicle.c b/board/microchip/mpfs_icicle/mpfs_icicle.c
index 0ef243186d..8381361ec3 100644
--- a/board/microchip/mpfs_icicle/mpfs_icicle.c
+++ b/board/microchip/mpfs_icicle/mpfs_icicle.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
+#include <init.h>
#include <asm/io.h>
#define MPFS_SYSREG_SOFT_RESET ((unsigned int *)0x20002088)
diff --git a/board/microchip/pic32mzda/pic32mzda.c b/board/microchip/pic32mzda/pic32mzda.c
index aa8aab39ce..e7337deea7 100644
--- a/board/microchip/pic32mzda/pic32mzda.c
+++ b/board/microchip/pic32mzda/pic32mzda.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <dm.h>
#include <clk.h>
+#include <init.h>
#include <malloc.h>
#include <dt-bindings/clock/microchip,clock.h>
#include <mach/pic32.h>
diff --git a/board/mikrotik/crs305-1g-4s/crs305-1g-4s.c b/board/mikrotik/crs305-1g-4s/crs305-1g-4s.c
index d1d1f40092..8b419ef6f7 100644
--- a/board/mikrotik/crs305-1g-4s/crs305-1g-4s.c
+++ b/board/mikrotik/crs305-1g-4s/crs305-1g-4s.c
@@ -5,7 +5,9 @@
#include <common.h>
#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/mpc8308_p1m/mpc8308_p1m.c b/board/mpc8308_p1m/mpc8308_p1m.c
index 5b2fd9c23f..601442055d 100644
--- a/board/mpc8308_p1m/mpc8308_p1m.c
+++ b/board/mpc8308_p1m/mpc8308_p1m.c
@@ -7,6 +7,8 @@
#include <common.h>
#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/common/spi.c b/board/mscc/common/spi.c
index 0566fcba5c..45b9649336 100644
--- a/board/mscc/common/spi.c
+++ b/board/mscc/common/spi.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <asm/io.h>
#include <spi.h>
+#include <linux/bitops.h>
void external_cs_manage(struct udevice *dev, bool enable)
{
diff --git a/board/mscc/jr2/jr2.c b/board/mscc/jr2/jr2.c
index 067907ba52..51700f4acf 100644
--- a/board/mscc/jr2/jr2.c
+++ b/board/mscc/jr2/jr2.c
@@ -4,10 +4,13 @@
*/
#include <common.h>
+#include <image.h>
#include <init.h>
#include <asm/io.h>
#include <led.h>
#include <miiphy.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
enum {
BOARD_TYPE_PCB110 = 0xAABBCE00,
diff --git a/board/mscc/luton/luton.c b/board/mscc/luton/luton.c
index e614058d10..acc26157c7 100644
--- a/board/mscc/luton/luton.c
+++ b/board/mscc/luton/luton.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <image.h>
#include <init.h>
#include <asm/io.h>
#include <led.h>
diff --git a/board/mscc/ocelot/ocelot.c b/board/mscc/ocelot/ocelot.c
index ad227a4169..74e8bfc431 100644
--- a/board/mscc/ocelot/ocelot.c
+++ b/board/mscc/ocelot/ocelot.c
@@ -4,7 +4,9 @@
*/
#include <common.h>
+#include <image.h>
#include <init.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/addrspace.h>
#include <asm/types.h>
@@ -12,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/mscc/serval/serval.c b/board/mscc/serval/serval.c
index 6c6dbf2bff..ed1aea55cc 100644
--- a/board/mscc/serval/serval.c
+++ b/board/mscc/serval/serval.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <image.h>
#include <init.h>
#include <asm/io.h>
#include <led.h>
diff --git a/board/mscc/servalt/servalt.c b/board/mscc/servalt/servalt.c
index 71891f6fe3..d0e6016b9a 100644
--- a/board/mscc/servalt/servalt.c
+++ b/board/mscc/servalt/servalt.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <image.h>
#include <init.h>
#include <asm/io.h>
#include <led.h>
diff --git a/board/netgear/dgnd3700v2/dgnd3700v2.c b/board/netgear/dgnd3700v2/dgnd3700v2.c
index 6840a21001..cfc3529c34 100644
--- a/board/netgear/dgnd3700v2/dgnd3700v2.c
+++ b/board/netgear/dgnd3700v2/dgnd3700v2.c
@@ -4,7 +4,9 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/io.h>
+#include <linux/bitops.h>
#define GPIO_BASE_6362 0x10000080
diff --git a/board/nokia/rx51/rx51.c b/board/nokia/rx51/rx51.c
index a282fe68a6..60a2e3619c 100644
--- a/board/nokia/rx51/rx51.c
+++ b/board/nokia/rx51/rx51.c
@@ -23,6 +23,7 @@
#include <common.h>
#include <env.h>
+#include <init.h>
#include <watchdog.h>
#include <malloc.h>
#include <twl4030.h>
diff --git a/board/novtech/meerkat96/meerkat96.c b/board/novtech/meerkat96/meerkat96.c
index 5fb4d43997..b13e7ce3b1 100644
--- a/board/novtech/meerkat96/meerkat96.c
+++ b/board/novtech/meerkat96/meerkat96.c
@@ -4,6 +4,7 @@
* Copyright (C) 2016 NXP Semiconductors
*/
+#include <init.h>
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/mx7-pins.h>
diff --git a/board/nvidia/cardhu/cardhu.c b/board/nvidia/cardhu/cardhu.c
index 2ae64b1c33..6848e34004 100644
--- a/board/nvidia/cardhu/cardhu.c
+++ b/board/nvidia/cardhu/cardhu.c
@@ -6,10 +6,12 @@
#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>
#include <asm/gpio.h>
+#include <linux/delay.h>
#include "pinmux-config-cardhu.h"
#include <i2c.h>
diff --git a/board/nvidia/dalmore/dalmore.c b/board/nvidia/dalmore/dalmore.c
index fcee21713f..72511e401e 100644
--- a/board/nvidia/dalmore/dalmore.c
+++ b/board/nvidia/dalmore/dalmore.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <asm/arch/pinmux.h>
#include <asm/arch/gp_padctrl.h>
#include "pinmux-config-dalmore.h"
diff --git a/board/nvidia/e2220-1170/e2220-1170.c b/board/nvidia/e2220-1170/e2220-1170.c
index 5aac0404bf..b819b049f4 100644
--- a/board/nvidia/e2220-1170/e2220-1170.c
+++ b/board/nvidia/e2220-1170/e2220-1170.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <i2c.h>
+#include <log.h>
#include <asm/arch/gpio.h>
#include <asm/arch/pinmux.h>
#include "../p2571/max77620_init.h"
diff --git a/board/nvidia/jetson-tk1/jetson-tk1.c b/board/nvidia/jetson-tk1/jetson-tk1.c
index aed08b4232..9eccdc4a83 100644
--- a/board/nvidia/jetson-tk1/jetson-tk1.c
+++ b/board/nvidia/jetson-tk1/jetson-tk1.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <power/as3722.h>
#include <power/pmic.h>
diff --git a/board/nvidia/nyan-big/nyan-big.c b/board/nvidia/nyan-big/nyan-big.c
index 3c7bfead24..71c71ed6ec 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>
@@ -14,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/p2371-0000/p2371-0000.c b/board/nvidia/p2371-0000/p2371-0000.c
index 5aac0404bf..b819b049f4 100644
--- a/board/nvidia/p2371-0000/p2371-0000.c
+++ b/board/nvidia/p2371-0000/p2371-0000.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <i2c.h>
+#include <log.h>
#include <asm/arch/gpio.h>
#include <asm/arch/pinmux.h>
#include "../p2571/max77620_init.h"
diff --git a/board/nvidia/p2371-2180/p2371-2180.c b/board/nvidia/p2371-2180/p2371-2180.c
index 1756bbca98..4aeec473b1 100644
--- a/board/nvidia/p2371-2180/p2371-2180.c
+++ b/board/nvidia/p2371-2180/p2371-2180.c
@@ -8,6 +8,9 @@
#include <env.h>
#include <fdtdec.h>
#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/p2571/p2571.c b/board/nvidia/p2571/p2571.c
index a9e4d21e7b..a4c4259eea 100644
--- a/board/nvidia/p2571/p2571.c
+++ b/board/nvidia/p2571/p2571.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <i2c.h>
+#include <log.h>
#include <asm/arch/gpio.h>
#include <asm/arch/pinmux.h>
#include <asm/gpio.h>
diff --git a/board/nvidia/p2771-0000/p2771-0000.c b/board/nvidia/p2771-0000/p2771-0000.c
index 63cdb3a604..3f0e594b9c 100644
--- a/board/nvidia/p2771-0000/p2771-0000.c
+++ b/board/nvidia/p2771-0000/p2771-0000.c
@@ -7,6 +7,8 @@
#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>
#include "../p2571/max77620_init.h"
diff --git a/board/nvidia/p3450-0000/p3450-0000.c b/board/nvidia/p3450-0000/p3450-0000.c
index f4212ab822..45f9bacc71 100644
--- a/board/nvidia/p3450-0000/p3450-0000.c
+++ b/board/nvidia/p3450-0000/p3450-0000.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <fdtdec.h>
#include <i2c.h>
+#include <linux/bitops.h>
#include <linux/libfdt.h>
#include <pca953x.h>
#include <asm/arch-tegra/cboot.h>
diff --git a/board/nvidia/venice2/as3722_init.c b/board/nvidia/venice2/as3722_init.c
index 5ebd6a0c09..ba676547d3 100644
--- a/board/nvidia/venice2/as3722_init.c
+++ b/board/nvidia/venice2/as3722_init.c
@@ -5,8 +5,10 @@
*/
#include <common.h>
+#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 f1d7cb8c93..808d221036 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>
@@ -15,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 baa7997477..5450f5d11c 100644
--- a/board/overo/overo.c
+++ b/board/overo/overo.c
@@ -14,10 +14,13 @@
#include <common.h>
#include <dm.h>
#include <env.h>
+#include <init.h>
#include <malloc.h>
+#include <net.h>
#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/overo/spl.c b/board/overo/spl.c
index d577e00fbc..91d8091d25 100644
--- a/board/overo/spl.c
+++ b/board/overo/spl.c
@@ -11,6 +11,8 @@
* (C) Copyright 2004-2008
* Texas Instruments, <www.ti.com>
*/
+
+#include <common.h>
#include <asm/io.h>
#include <asm/arch/mem.h>
#include <asm/arch/sys_proto.h>
diff --git a/board/pandora/pandora.c b/board/pandora/pandora.c
index a9aae7951d..a93848666f 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>
@@ -23,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/pcl063/spl.c b/board/phytec/pcl063/spl.c
index b5e080c072..48cb2e267c 100644
--- a/board/phytec/pcl063/spl.c
+++ b/board/phytec/pcl063/spl.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <init.h>
#include <spl.h>
#include <asm/arch/clock.h>
#include <asm/io.h>
diff --git a/board/phytec/pcm051/board.c b/board/phytec/pcm051/board.c
index 43f6c5afcb..6f1ada82c4 100644
--- a/board/phytec/pcm051/board.c
+++ b/board/phytec/pcm051/board.c
@@ -11,6 +11,8 @@
#include <common.h>
#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/phytec/pcm052/pcm052.c b/board/phytec/pcm052/pcm052.c
index c40dc052b5..b0c56a29f1 100644
--- a/board/phytec/pcm052/pcm052.c
+++ b/board/phytec/pcm052/pcm052.c
@@ -17,6 +17,7 @@
#include <env.h>
#include <led.h>
#include <miiphy.h>
+#include <linux/bitops.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/phytec/pcm058/pcm058.c b/board/phytec/pcm058/pcm058.c
index 820b5fde14..096425c5df 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>
@@ -22,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 a3af823ef6..fed8f52e3e 100644
--- a/board/phytec/pfla02/pfla02.c
+++ b/board/phytec/pfla02/pfla02.c
@@ -6,6 +6,8 @@
#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>
#include <asm/arch/imx-regs.h>
@@ -18,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/phytec/phycore_rk3288/phycore-rk3288.c b/board/phytec/phycore_rk3288/phycore-rk3288.c
index 039ed0f1bc..ecc73227a0 100644
--- a/board/phytec/phycore_rk3288/phycore-rk3288.c
+++ b/board/phytec/phycore_rk3288/phycore-rk3288.c
@@ -6,6 +6,8 @@
#include <eeprom.h>
#include <init.h>
+#include <log.h>
+#include <net.h>
#include <asm/io.h>
#include <common.h>
#include <dm.h>
@@ -14,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/phytium/durian/durian.c b/board/phytium/durian/durian.c
index 40dd27a7b0..b80688ae86 100644
--- a/board/phytium/durian/durian.c
+++ b/board/phytium/durian/durian.c
@@ -6,8 +6,12 @@
*/
#include <common.h>
+#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>
#include <asm/io.h>
#include <linux/arm-smccc.h>
diff --git a/board/pine64/rockpro64_rk3399/rockpro64-rk3399.c b/board/pine64/rockpro64_rk3399/rockpro64-rk3399.c
index 3f60235771..d79084614f 100644
--- a/board/pine64/rockpro64_rk3399/rockpro64-rk3399.c
+++ b/board/pine64/rockpro64_rk3399/rockpro64-rk3399.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <init.h>
#include <syscon.h>
#include <asm/io.h>
#include <asm/arch-rockchip/clock.h>
diff --git a/board/ppcag/bg0900/bg0900.c b/board/ppcag/bg0900/bg0900.c
index e3e8e74220..9150748654 100644
--- a/board/ppcag/bg0900/bg0900.c
+++ b/board/ppcag/bg0900/bg0900.c
@@ -6,12 +6,15 @@
*/
#include <common.h>
+#include <init.h>
+#include <net.h>
#include <asm/gpio.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
#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/qca/ap121/ap121.c b/board/qca/ap121/ap121.c
index 24acdcb2e6..60a2e19143 100644
--- a/board/qca/ap121/ap121.c
+++ b/board/qca/ap121/ap121.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/addrspace.h>
#include <asm/types.h>
diff --git a/board/qca/ap143/ap143.c b/board/qca/ap143/ap143.c
index 8ee26ababa..ac65054136 100644
--- a/board/qca/ap143/ap143.c
+++ b/board/qca/ap143/ap143.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/addrspace.h>
#include <asm/types.h>
diff --git a/board/qca/ap152/ap152.c b/board/qca/ap152/ap152.c
index 30cd56563b..1064705d26 100644
--- a/board/qca/ap152/ap152.c
+++ b/board/qca/ap152/ap152.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/addrspace.h>
#include <asm/types.h>
diff --git a/board/qemu-mips/qemu-mips.c b/board/qemu-mips/qemu-mips.c
index 414a9c001d..cf22ed5627 100644
--- a/board/qemu-mips/qemu-mips.c
+++ b/board/qemu-mips/qemu-mips.c
@@ -6,6 +6,8 @@
#include <common.h>
#include <command.h>
+#include <init.h>
+#include <net.h>
#include <asm/mipsregs.h>
#include <asm/io.h>
#include <netdev.h>
diff --git a/board/qualcomm/dragonboard410c/dragonboard410c.c b/board/qualcomm/dragonboard410c/dragonboard410c.c
index 81bd8bd95b..672bd465a5 100644
--- a/board/qualcomm/dragonboard410c/dragonboard410c.c
+++ b/board/qualcomm/dragonboard410c/dragonboard410c.c
@@ -10,11 +10,14 @@
#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>
#include <asm/arch/misc.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/qualcomm/dragonboard820c/dragonboard820c.c b/board/qualcomm/dragonboard820c/dragonboard820c.c
index 6c096b49a1..c1ade5ce43 100644
--- a/board/qualcomm/dragonboard820c/dragonboard820c.c
+++ b/board/qualcomm/dragonboard820c/dragonboard820c.c
@@ -6,8 +6,10 @@
*/
#include <cpu_func.h>
+#include <init.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/raidsonic/ib62x0/ib62x0.c b/board/raidsonic/ib62x0/ib62x0.c
index e8aae4cb81..db1b0adc38 100644
--- a/board/raidsonic/ib62x0/ib62x0.c
+++ b/board/raidsonic/ib62x0/ib62x0.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <init.h>
#include <miiphy.h>
#include <asm/io.h>
#include <asm/arch/cpu.h>
diff --git a/board/renesas/MigoR/migo_r.c b/board/renesas/MigoR/migo_r.c
index 767c45cc9c..f8bdb4d48a 100644
--- a/board/renesas/MigoR/migo_r.c
+++ b/board/renesas/MigoR/migo_r.c
@@ -10,6 +10,8 @@
*/
#include <common.h>
+#include <init.h>
+#include <net.h>
#include <netdev.h>
#include <asm/io.h>
#include <asm/processor.h>
diff --git a/board/renesas/alt/alt.c b/board/renesas/alt/alt.c
index a6d7cb48a2..279ed48721 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>
@@ -16,6 +17,8 @@
#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>
#include <asm/gpio.h>
diff --git a/board/renesas/alt/alt_spl.c b/board/renesas/alt/alt_spl.c
index dbb210584d..2de236fc29 100644
--- a/board/renesas/alt/alt_spl.c
+++ b/board/renesas/alt/alt_spl.c
@@ -7,11 +7,13 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
#include <malloc.h>
#include <dm/platform_data/serial_sh.h>
#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 c15387366c..5fa10878d2 100644
--- a/board/renesas/blanche/blanche.c
+++ b/board/renesas/blanche/blanche.c
@@ -8,6 +8,8 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
+#include <net.h>
#include <asm/arch/mmc.h>
#include <asm/arch/rcar-mstp.h>
#include <asm/arch/rmobile.h>
@@ -22,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/condor/condor.c b/board/renesas/condor/condor.c
index 6505beda81..91afcdd85a 100644
--- a/board/renesas/condor/condor.c
+++ b/board/renesas/condor/condor.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <cpu_func.h>
#include <hang.h>
+#include <init.h>
#include <asm/processor.h>
#include <asm/mach-types.h>
#include <asm/io.h>
diff --git a/board/renesas/draak/draak.c b/board/renesas/draak/draak.c
index 2f9364c484..c8f4b214a2 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>
@@ -16,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/eagle/eagle.c b/board/renesas/eagle/eagle.c
index cf06a173e4..6228f22e01 100644
--- a/board/renesas/eagle/eagle.c
+++ b/board/renesas/eagle/eagle.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <cpu_func.h>
#include <hang.h>
+#include <init.h>
#include <malloc.h>
#include <netdev.h>
#include <dm.h>
diff --git a/board/renesas/ebisu/ebisu.c b/board/renesas/ebisu/ebisu.c
index 81d7f8eafa..d164a36361 100644
--- a/board/renesas/ebisu/ebisu.c
+++ b/board/renesas/ebisu/ebisu.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <cpu_func.h>
#include <hang.h>
+#include <init.h>
#include <malloc.h>
#include <netdev.h>
#include <dm.h>
diff --git a/board/renesas/gose/gose.c b/board/renesas/gose/gose.c
index eb6ee6f6a4..c6a93c25e6 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>
@@ -16,6 +17,8 @@
#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>
#include <asm/gpio.h>
diff --git a/board/renesas/gose/gose_spl.c b/board/renesas/gose/gose_spl.c
index 42a6758148..624ba5db04 100644
--- a/board/renesas/gose/gose_spl.c
+++ b/board/renesas/gose/gose_spl.c
@@ -7,11 +7,13 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
#include <malloc.h>
#include <dm/platform_data/serial_sh.h>
#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/grpeach/grpeach.c b/board/renesas/grpeach/grpeach.c
index ba904609ae..b92e01ca98 100644
--- a/board/renesas/grpeach/grpeach.c
+++ b/board/renesas/grpeach/grpeach.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/arch/sys_proto.h>
diff --git a/board/renesas/koelsch/koelsch.c b/board/renesas/koelsch/koelsch.c
index e09d3d0a63..1b3acc8fd1 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>
@@ -17,6 +18,8 @@
#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>
#include <asm/gpio.h>
diff --git a/board/renesas/koelsch/koelsch_spl.c b/board/renesas/koelsch/koelsch_spl.c
index b3530d7ce7..449bbfa7b8 100644
--- a/board/renesas/koelsch/koelsch_spl.c
+++ b/board/renesas/koelsch/koelsch_spl.c
@@ -7,11 +7,13 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
#include <malloc.h>
#include <dm/platform_data/serial_sh.h>
#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 9ac9515925..36a35a9a9c 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>
@@ -19,6 +20,8 @@
#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>
#include <asm/gpio.h>
diff --git a/board/renesas/lager/lager_spl.c b/board/renesas/lager/lager_spl.c
index d7db361b12..1ca857c2c3 100644
--- a/board/renesas/lager/lager_spl.c
+++ b/board/renesas/lager/lager_spl.c
@@ -7,11 +7,13 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
#include <malloc.h>
#include <dm/platform_data/serial_sh.h>
#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 097710b479..793e02cb44 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>
@@ -17,6 +18,8 @@
#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>
#include <asm/gpio.h>
diff --git a/board/renesas/porter/porter_spl.c b/board/renesas/porter/porter_spl.c
index 026220d9e2..f10c6cffc2 100644
--- a/board/renesas/porter/porter_spl.c
+++ b/board/renesas/porter/porter_spl.c
@@ -7,11 +7,13 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
#include <malloc.h>
#include <dm/platform_data/serial_sh.h>
#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/r2dplus/r2dplus.c b/board/renesas/r2dplus/r2dplus.c
index f2da4686c3..e4d0967c14 100644
--- a/board/renesas/r2dplus/r2dplus.c
+++ b/board/renesas/r2dplus/r2dplus.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <ide.h>
#include <init.h>
+#include <net.h>
#include <netdev.h>
#include <asm/processor.h>
#include <asm/io.h>
diff --git a/board/renesas/r7780mp/r7780mp.c b/board/renesas/r7780mp/r7780mp.c
index 8dbeeb6e68..120464ced4 100644
--- a/board/renesas/r7780mp/r7780mp.c
+++ b/board/renesas/r7780mp/r7780mp.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <ide.h>
#include <init.h>
+#include <net.h>
#include <asm/processor.h>
#include <asm/io.h>
#include <asm/pci.h>
diff --git a/board/renesas/rcar-common/common.c b/board/renesas/rcar-common/common.c
index 37f8a46d7e..b9e8cb4ce7 100644
--- a/board/renesas/rcar-common/common.c
+++ b/board/renesas/rcar-common/common.c
@@ -9,8 +9,10 @@
#include <common.h>
#include <dm.h>
+#include <init.h>
#include <dm/uclass-internal.h>
#include <asm/arch/rmobile.h>
+#include <linux/libfdt.h>
#ifdef CONFIG_RCAR_GEN3
diff --git a/board/renesas/rcar-common/gen3-spl.c b/board/renesas/rcar-common/gen3-spl.c
index d9741c1939..fd6e5054a6 100644
--- a/board/renesas/rcar-common/gen3-spl.c
+++ b/board/renesas/rcar-common/gen3-spl.c
@@ -7,8 +7,12 @@
#include <common.h>
#include <cpu_func.h>
+#include <image.h>
+#include <init.h>
+#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 91c3728571..947bdaefa8 100644
--- a/board/renesas/salvator-x/salvator-x.c
+++ b/board/renesas/salvator-x/salvator-x.c
@@ -9,6 +9,8 @@
#include <common.h>
#include <cpu_func.h>
+#include <image.h>
+#include <init.h>
#include <malloc.h>
#include <netdev.h>
#include <dm.h>
@@ -16,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/sh7752evb/sh7752evb.c b/board/renesas/sh7752evb/sh7752evb.c
index 203eecf3d6..a005029b61 100644
--- a/board/renesas/sh7752evb/sh7752evb.c
+++ b/board/renesas/sh7752evb/sh7752evb.c
@@ -4,14 +4,18 @@
*/
#include <common.h>
+#include <command.h>
#include <env.h>
+#include <flash.h>
#include <init.h>
#include <malloc.h>
+#include <net.h>
#include <asm/processor.h>
#include <asm/io.h>
#include <asm/mmc.h>
#include <spi.h>
#include <spi_flash.h>
+#include <linux/delay.h>
int checkboard(void)
{
@@ -243,7 +247,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 0b118b2f65..3b4a3ce26a 100644
--- a/board/renesas/sh7753evb/sh7753evb.c
+++ b/board/renesas/sh7753evb/sh7753evb.c
@@ -4,14 +4,18 @@
*/
#include <common.h>
+#include <command.h>
#include <env.h>
+#include <flash.h>
#include <init.h>
#include <malloc.h>
+#include <net.h>
#include <asm/processor.h>
#include <asm/io.h>
#include <asm/mmc.h>
#include <spi.h>
#include <spi_flash.h>
+#include <linux/delay.h>
int checkboard(void)
{
@@ -259,7 +263,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 e8d1fdd03f..5e76b9e7b4 100644
--- a/board/renesas/sh7757lcr/sh7757lcr.c
+++ b/board/renesas/sh7757lcr/sh7757lcr.c
@@ -4,9 +4,12 @@
*/
#include <common.h>
+#include <command.h>
#include <env.h>
+#include <flash.h>
#include <init.h>
#include <malloc.h>
+#include <net.h>
#include <asm/processor.h>
#include <asm/io.h>
#include <asm/mmc.h>
@@ -342,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;
@@ -361,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/sh7763rdp/sh7763rdp.c b/board/renesas/sh7763rdp/sh7763rdp.c
index 9bc2c55986..73a53c1e5a 100644
--- a/board/renesas/sh7763rdp/sh7763rdp.c
+++ b/board/renesas/sh7763rdp/sh7763rdp.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/processor.h>
diff --git a/board/renesas/silk/silk.c b/board/renesas/silk/silk.c
index e7cbd75776..171d06f317 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>
@@ -17,6 +18,8 @@
#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>
#include <asm/gpio.h>
diff --git a/board/renesas/silk/silk_spl.c b/board/renesas/silk/silk_spl.c
index a2c397f935..f10f84a3cc 100644
--- a/board/renesas/silk/silk_spl.c
+++ b/board/renesas/silk/silk_spl.c
@@ -7,11 +7,13 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
#include <malloc.h>
#include <dm/platform_data/serial_sh.h>
#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/cpld.c b/board/renesas/stout/cpld.c
index e6c2051bd4..b56ed1703f 100644
--- a/board/renesas/stout/cpld.c
+++ b/board/renesas/stout/cpld.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <command.h>
#include <cpu_func.h>
#include <asm/io.h>
#include <asm/gpio.h>
@@ -124,7 +125,8 @@ void cpld_init(void)
#endif
}
-static int do_cpld(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_cpld(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
u32 addr, val;
diff --git a/board/renesas/stout/stout.c b/board/renesas/stout/stout.c
index 0a0ff5ff76..babcce9aa1 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>
@@ -18,6 +19,8 @@
#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>
#include <asm/gpio.h>
diff --git a/board/renesas/stout/stout_spl.c b/board/renesas/stout/stout_spl.c
index 8d01efce56..57c1fabaf3 100644
--- a/board/renesas/stout/stout_spl.c
+++ b/board/renesas/stout/stout_spl.c
@@ -7,11 +7,13 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
#include <malloc.h>
#include <dm/platform_data/serial_sh.h>
#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/cpld.c b/board/renesas/ulcb/cpld.c
index 528675651d..a20a34a92a 100644
--- a/board/renesas/ulcb/cpld.c
+++ b/board/renesas/ulcb/cpld.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <command.h>
#include <asm/gpio.h>
#include <asm/io.h>
#include <dm.h>
@@ -82,7 +83,8 @@ static void cpld_write(struct udevice *dev, u8 addr, u32 data)
dm_gpio_set_value(&priv->sstbz, 1);
}
-static int do_cpld(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_cpld(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct udevice *dev;
u32 addr, val;
diff --git a/board/renesas/ulcb/ulcb.c b/board/renesas/ulcb/ulcb.c
index b91f940b48..07bc1ec719 100644
--- a/board/renesas/ulcb/ulcb.c
+++ b/board/renesas/ulcb/ulcb.c
@@ -7,6 +7,8 @@
*/
#include <common.h>
+#include <image.h>
+#include <init.h>
#include <malloc.h>
#include <netdev.h>
#include <dm.h>
@@ -14,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/rockchip/evb_rk3399/evb-rk3399.c b/board/rockchip/evb_rk3399/evb-rk3399.c
index b9049abcc7..abb76585cf 100644
--- a/board/rockchip/evb_rk3399/evb-rk3399.c
+++ b/board/rockchip/evb_rk3399/evb-rk3399.c
@@ -5,6 +5,8 @@
#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/rockchip/evb_rv1108/evb_rv1108.c b/board/rockchip/evb_rv1108/evb_rv1108.c
index 5d622c3737..c57913828d 100644
--- a/board/rockchip/evb_rv1108/evb_rv1108.c
+++ b/board/rockchip/evb_rv1108/evb_rv1108.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <init.h>
#include <syscon.h>
#include <asm/io.h>
#include <asm/arch-rockchip/clock.h>
diff --git a/board/rockchip/kylin_rk3036/kylin_rk3036.c b/board/rockchip/kylin_rk3036/kylin_rk3036.c
index c5e28df258..0ca91cdeb0 100644
--- a/board/rockchip/kylin_rk3036/kylin_rk3036.c
+++ b/board/rockchip/kylin_rk3036/kylin_rk3036.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <env.h>
#include <init.h>
#include <asm/io.h>
#include <asm/arch-rockchip/uart.h>
diff --git a/board/rockchip/tinker_rk3288/tinker-rk3288.c b/board/rockchip/tinker_rk3288/tinker-rk3288.c
index 7af39e10cd..f85209c649 100644
--- a/board/rockchip/tinker_rk3288/tinker-rk3288.c
+++ b/board/rockchip/tinker_rk3288/tinker-rk3288.c
@@ -9,6 +9,7 @@
#include <env.h>
#include <i2c_eeprom.h>
#include <init.h>
+#include <net.h>
#include <netdev.h>
#include <asm/arch-rockchip/bootrom.h>
#include <asm/io.h>
diff --git a/board/samsung/arndale/arndale.c b/board/samsung/arndale/arndale.c
index 9abad3f824..7a8e57b6cc 100644
--- a/board/samsung/arndale/arndale.c
+++ b/board/samsung/arndale/arndale.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <cpu_func.h>
#include <init.h>
+#include <log.h>
#include <usb.h>
#include <asm/gpio.h>
#include <asm/arch/pinmux.h>
diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c
index 390060e51f..029a0cc6cd 100644
--- a/board/samsung/common/board.c
+++ b/board/samsung/common/board.c
@@ -6,10 +6,13 @@
#include <common.h>
#include <cros_ec.h>
+#include <env.h>
#include <errno.h>
#include <fdtdec.h>
#include <hang.h>
#include <init.h>
+#include <log.h>
+#include <net.h>
#include <spi.h>
#include <tmu.h>
#include <netdev.h>
@@ -29,6 +32,7 @@
#include <stdio_dev.h>
#include <usb.h>
#include <dwc3-uboot.h>
+#include <linux/delay.h>
#include <samsung/misc.h>
#include <dm/pinctrl.h>
#include <dm.h>
diff --git a/board/samsung/common/exynos5-dt-types.c b/board/samsung/common/exynos5-dt-types.c
index 1413dc8978..f1ecb7d2c3 100644
--- a/board/samsung/common/exynos5-dt-types.c
+++ b/board/samsung/common/exynos5-dt-types.c
@@ -9,6 +9,7 @@
#include <dm.h>
#include <errno.h>
#include <fdtdec.h>
+#include <linux/delay.h>
#include <power/pmic.h>
#include <power/regulator.h>
#include <power/s2mps11.h>
diff --git a/board/samsung/common/exynos5-dt.c b/board/samsung/common/exynos5-dt.c
index eef46b0dc4..69aa2120e1 100644
--- a/board/samsung/common/exynos5-dt.c
+++ b/board/samsung/common/exynos5-dt.c
@@ -8,6 +8,7 @@
#include <dwc3-uboot.h>
#include <env.h>
#include <fdtdec.h>
+#include <log.h>
#include <asm/io.h>
#include <errno.h>
#include <i2c.h>
diff --git a/board/samsung/common/misc.c b/board/samsung/common/misc.c
index 9117669f71..837463ba78 100644
--- a/board/samsung/common/misc.c
+++ b/board/samsung/common/misc.c
@@ -9,6 +9,7 @@
#include <env.h>
#include <lcd.h>
#include <libtizen.h>
+#include <linux/delay.h>
#include <samsung/misc.h>
#include <errno.h>
#include <version.h>
@@ -262,7 +263,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/samsung/goni/goni.c b/board/samsung/goni/goni.c
index 623e4abc21..40a94d547f 100644
--- a/board/samsung/goni/goni.c
+++ b/board/samsung/goni/goni.c
@@ -6,9 +6,12 @@
*/
#include <common.h>
+#include <init.h>
+#include <log.h>
#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/odroid/odroid.c b/board/samsung/odroid/odroid.c
index 9aa97f0f2c..7d7e722892 100644
--- a/board/samsung/odroid/odroid.c
+++ b/board/samsung/odroid/odroid.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/arch/pinmux.h>
#include <asm/arch/power.h>
#include <asm/arch/clock.h>
diff --git a/board/samsung/smdkc100/smdkc100.c b/board/samsung/smdkc100/smdkc100.c
index a80300b0c0..fc2c2a94dc 100644
--- a/board/samsung/smdkc100/smdkc100.c
+++ b/board/samsung/smdkc100/smdkc100.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <init.h>
+#include <net.h>
#include <asm/gpio.h>
#include <asm/io.h>
#include <asm/arch/sromc.h>
diff --git a/board/samsung/smdkv310/smdkv310.c b/board/samsung/smdkv310/smdkv310.c
index 05369d2227..0a5773676d 100644
--- a/board/samsung/smdkv310/smdkv310.c
+++ b/board/samsung/smdkv310/smdkv310.c
@@ -5,6 +5,8 @@
#include <common.h>
#include <init.h>
+#include <log.h>
+#include <net.h>
#include <asm/gpio.h>
#include <asm/io.h>
#include <netdev.h>
diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
index ec85f707c1..2e80dbbc84 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>
@@ -17,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 84ff936e4b..69e0ef192d 100644
--- a/board/samsung/trats2/trats2.c
+++ b/board/samsung/trats2/trats2.c
@@ -7,10 +7,12 @@
#include <common.h>
#include <lcd.h>
+#include <log.h>
#include <asm/gpio.h>
#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 ed9c5b50d9..f50da6be72 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>
@@ -15,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 663eddac11..04f8678704 100644
--- a/board/sandisk/sansa_fuze_plus/sfp.c
+++ b/board/sandisk/sansa_fuze_plus/sfp.c
@@ -11,12 +11,15 @@
#include <common.h>
#include <errno.h>
+#include <init.h>
+#include <net.h>
#include <asm/gpio.h>
#include <asm/io.h>
#include <asm/arch/iomux-mx23.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/clock.h>
#include <asm/arch/sys_proto.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/sbc8349/pci.c b/board/sbc8349/pci.c
index b6435f34f2..26c4f24e4f 100644
--- a/board/sbc8349/pci.c
+++ b/board/sbc8349/pci.c
@@ -15,6 +15,7 @@
#include <pci.h>
#include <i2c.h>
#include <asm/fsl_i2c.h>
+#include <linux/delay.h>
static struct pci_region pci1_regions[] = {
{
diff --git a/board/sbc8349/sbc8349.c b/board/sbc8349/sbc8349.c
index 9051392cd0..1e3529f334 100644
--- a/board/sbc8349/sbc8349.c
+++ b/board/sbc8349/sbc8349.c
@@ -9,8 +9,10 @@
#include <common.h>
#include <fdt_support.h>
+#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>
@@ -18,6 +20,7 @@
#if defined(CONFIG_OF_LIBFDT)
#include <linux/libfdt.h>
#endif
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/sbc8548/ddr.c b/board/sbc8548/ddr.c
index f7af1e3ded..61bc77c418 100644
--- a/board/sbc8548/ddr.c
+++ b/board/sbc8548/ddr.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <i2c.h>
+#include <linux/delay.h>
#include <fsl_ddr_sdram.h>
#include <fsl_ddr_dimm_params.h>
diff --git a/board/sbc8548/sbc8548.c b/board/sbc8548/sbc8548.c
index d246dce36d..24782c7e6d 100644
--- a/board/sbc8548/sbc8548.c
+++ b/board/sbc8548/sbc8548.c
@@ -11,6 +11,8 @@
#include <common.h>
#include <init.h>
+#include <log.h>
+#include <net.h>
#include <pci.h>
#include <asm/processor.h>
#include <asm/immap_85xx.h>
@@ -21,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 d053eaeec3..3375cd621c 100644
--- a/board/sbc8641d/sbc8641d.c
+++ b/board/sbc8641d/sbc8641d.c
@@ -14,12 +14,14 @@
#include <common.h>
#include <command.h>
#include <init.h>
+#include <log.h>
#include <pci.h>
#include <asm/processor.h>
#include <asm/immap_86xx.h>
#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>
@@ -49,7 +51,7 @@ int dram_init(void)
dram_size = fixed_sdram ();
#endif
- debug (" DDR: ");
+ debug(" DDR: ");
gd->ram_size = dram_size;
return 0;
@@ -122,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;
@@ -153,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/schulercontrol/sc_sps_1/sc_sps_1.c b/board/schulercontrol/sc_sps_1/sc_sps_1.c
index 41090dda10..d2c5f807ad 100644
--- a/board/schulercontrol/sc_sps_1/sc_sps_1.c
+++ b/board/schulercontrol/sc_sps_1/sc_sps_1.c
@@ -7,6 +7,8 @@
*/
#include <common.h>
+#include <init.h>
+#include <net.h>
#include <asm/gpio.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
diff --git a/board/seco/mx6quq7/mx6quq7.c b/board/seco/mx6quq7/mx6quq7.c
index fabc348440..4fa0daba46 100644
--- a/board/seco/mx6quq7/mx6quq7.c
+++ b/board/seco/mx6quq7/mx6quq7.c
@@ -8,10 +8,12 @@
*/
#include <init.h>
+#include <net.h>
#include <asm/arch/clock.h>
#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/seeed/linkit-smart-7688/board.c b/board/seeed/linkit-smart-7688/board.c
index d3d3d50c2c..bf7c69ea83 100644
--- a/board/seeed/linkit-smart-7688/board.c
+++ b/board/seeed/linkit-smart-7688/board.c
@@ -4,7 +4,9 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/io.h>
+#include <linux/bitops.h>
#define MT76XX_GPIO1_MODE 0x10000060
diff --git a/board/siemens/capricorn/board.c b/board/siemens/capricorn/board.c
index 00fd4b9658..c46e4ff736 100644
--- a/board/siemens/capricorn/board.c
+++ b/board/siemens/capricorn/board.c
@@ -6,8 +6,12 @@
*
*/
#include <common.h>
+#include <command.h>
#include <dm.h>
+#include <env.h>
#include <errno.h>
+#include <init.h>
+#include <log.h>
#include <netdev.h>
#include <env_internal.h>
#include <fsl_esdhc_imx.h>
@@ -23,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 \
@@ -410,7 +415,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;
@@ -431,7 +436,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/capricorn/spl.c b/board/siemens/capricorn/spl.c
index 47fe86ccc0..8435bd3863 100644
--- a/board/siemens/capricorn/spl.c
+++ b/board/siemens/capricorn/spl.c
@@ -6,6 +6,7 @@
*
*/
#include <common.h>
+#include <init.h>
#include <spl.h>
#include <dm.h>
#include <dm/uclass.h>
diff --git a/board/siemens/common/board.c b/board/siemens/common/board.c
index 24429d2837..e0bd8590bc 100644
--- a/board/siemens/common/board.c
+++ b/board/siemens/common/board.c
@@ -10,8 +10,10 @@
*/
#include <common.h>
+#include <command.h>
#include <env.h>
#include <errno.h>
+#include <init.h>
#include <malloc.h>
#include <serial.h>
#include <spl.h>
@@ -150,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);
@@ -166,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)
@@ -250,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/common/factoryset.c b/board/siemens/common/factoryset.c
index 0d3701c03c..2e3ae1a54d 100644
--- a/board/siemens/common/factoryset.c
+++ b/board/siemens/common/factoryset.c
@@ -12,6 +12,7 @@
#include <dm.h>
#include <env_internal.h>
#include <i2c.h>
+#include <log.h>
#include <asm/io.h>
#if !CONFIG_IS_ENABLED(TARGET_GIEDI) && !CONFIG_IS_ENABLED(TARGET_DENEB)
#include <asm/arch/cpu.h>
diff --git a/board/siemens/corvus/board.c b/board/siemens/corvus/board.c
index 03768201c3..28a974d978 100644
--- a/board/siemens/corvus/board.c
+++ b/board/siemens/corvus/board.c
@@ -13,6 +13,7 @@
#include <common.h>
#include <dm.h>
#include <init.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/arch/at91sam9g45_matrix.h>
#include <asm/arch/at91sam9_smc.h>
diff --git a/board/siemens/draco/board.c b/board/siemens/draco/board.c
index 94bd71ad09..5ac73c0ef4 100644
--- a/board/siemens/draco/board.c
+++ b/board/siemens/draco/board.c
@@ -13,9 +13,11 @@
*/
#include <common.h>
+#include <command.h>
#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>
@@ -33,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>
@@ -342,8 +345,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/pxm2/board.c b/board/siemens/pxm2/board.c
index 58bb5bab1a..d86a913e5f 100644
--- a/board/siemens/pxm2/board.c
+++ b/board/siemens/pxm2/board.c
@@ -16,7 +16,9 @@
#include <env.h>
#include <errno.h>
#include <init.h>
+#include <log.h>
#include <malloc.h>
+#include <net.h>
#include <spl.h>
#include <asm/arch/cpu.h>
#include <asm/arch/hardware.h>
diff --git a/board/siemens/rut/board.c b/board/siemens/rut/board.c
index bd4eaa4f3a..3b109e9818 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>
@@ -33,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/siemens/smartweb/smartweb.c b/board/siemens/smartweb/smartweb.c
index cb7206a561..40c9c7e21d 100644
--- a/board/siemens/smartweb/smartweb.c
+++ b/board/siemens/smartweb/smartweb.c
@@ -18,6 +18,7 @@
#include <common.h>
#include <dm.h>
#include <init.h>
+#include <net.h>
#include <asm/io.h>
#include <asm/arch/at91sam9_sdramc.h>
#include <asm/arch/at91sam9260_matrix.h>
diff --git a/board/siemens/taurus/taurus.c b/board/siemens/taurus/taurus.c
index 0979df563a..927ef59650 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>
@@ -385,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 47a2090251..df57b6ecc2 100644
--- a/board/sifive/fu540/fu540.c
+++ b/board/sifive/fu540/fu540.c
@@ -8,6 +8,9 @@
#include <common.h>
#include <dm.h>
+#include <env.h>
+#include <init.h>
+#include <linux/bug.h>
#include <linux/delay.h>
#include <linux/io.h>
diff --git a/board/silica/pengwyn/board.c b/board/silica/pengwyn/board.c
index c0496c549a..e3c9d9e755 100644
--- a/board/silica/pengwyn/board.c
+++ b/board/silica/pengwyn/board.c
@@ -7,6 +7,8 @@
#include <common.h>
#include <env.h>
+#include <init.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 59a07a9ffd..772c17979b 100644
--- a/board/sks-kinkel/sksimx6/sksimx6.c
+++ b/board/sks-kinkel/sksimx6/sksimx6.c
@@ -3,10 +3,15 @@
* Copyright (C) 2016 Stefano Babic <sbabic@denx.de>
*/
+#include <common.h>
+#include <command.h>
+#include <init.h>
+#include <net.h>
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/iomux.h>
#include <asm/arch/mx6-pins.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <asm/gpio.h>
#include <asm/mach-imx/iomux-v3.h>
diff --git a/board/socrates/sdram.c b/board/socrates/sdram.c
index 8eb4f8fc95..d358a209a4 100644
--- a/board/socrates/sdram.c
+++ b/board/socrates/sdram.c
@@ -12,6 +12,7 @@
#include <asm/processor.h>
#include <asm/mmu.h>
#include <spd_sdram.h>
+#include <linux/delay.h>
#if !defined(CONFIG_SPD_EEPROM)
diff --git a/board/socrates/socrates.c b/board/socrates/socrates.c
index b0ddee7906..58c5f7527b 100644
--- a/board/socrates/socrates.c
+++ b/board/socrates/socrates.c
@@ -13,11 +13,14 @@
#include <common.h>
#include <clock_legacy.h>
#include <env.h>
+#include <init.h>
#include <pci.h>
+#include <uuid.h>
#include <asm/processor.h>
#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>
@@ -105,25 +108,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/softing/vining_2000/vining_2000.c b/board/softing/vining_2000/vining_2000.c
index c74c06eaee..e5e33dcf15 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>
@@ -18,6 +19,8 @@
#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>
#include <fsl_esdhc_imx.h>
diff --git a/board/softing/vining_fpga/socfpga.c b/board/softing/vining_fpga/socfpga.c
index 5a88b6c8ad..7e311b7a1c 100644
--- a/board/softing/vining_fpga/socfpga.c
+++ b/board/softing/vining_fpga/socfpga.c
@@ -7,11 +7,13 @@
#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>
#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 443751ba8f..4184754a9a 100644
--- a/board/solidrun/clearfog/clearfog.c
+++ b/board/solidrun/clearfog/clearfog.c
@@ -4,12 +4,17 @@
*/
#include <common.h>
+#include <env.h>
#include <i2c.h>
+#include <init.h>
#include <miiphy.h>
+#include <net.h>
#include <netdev.h>
#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"
#include "../drivers/ddr/marvell/a38x/ddr3_init.h"
diff --git a/board/solidrun/mx6cuboxi/mx6cuboxi.c b/board/solidrun/mx6cuboxi/mx6cuboxi.c
index 6a96f9ecdb..94707bccb2 100644
--- a/board/solidrun/mx6cuboxi/mx6cuboxi.c
+++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c
@@ -13,13 +13,18 @@
* Ported to SolidRun microSOM by Rabeeh Khoury <rabeeh@solid-run.com>
*/
+#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>
#include <asm/arch/iomux.h>
#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/spear300/spear300.c b/board/spear/spear300/spear300.c
index 83fdf027e9..c531eb3fc6 100644
--- a/board/spear/spear300/spear300.c
+++ b/board/spear/spear300/spear300.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <miiphy.h>
+#include <net.h>
#include <netdev.h>
#include <nand.h>
#include <asm/io.h>
diff --git a/board/spear/spear310/spear310.c b/board/spear/spear310/spear310.c
index 1b3478a9fb..6e88547e1c 100644
--- a/board/spear/spear310/spear310.c
+++ b/board/spear/spear310/spear310.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <miiphy.h>
+#include <net.h>
#include <netdev.h>
#include <nand.h>
#include <asm/io.h>
diff --git a/board/spear/spear320/spear320.c b/board/spear/spear320/spear320.c
index 640242e718..d8b1e7de4e 100644
--- a/board/spear/spear320/spear320.c
+++ b/board/spear/spear320/spear320.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <miiphy.h>
+#include <net.h>
#include <netdev.h>
#include <nand.h>
#include <asm/io.h>
diff --git a/board/spear/spear600/spear600.c b/board/spear/spear600/spear600.c
index 91c2691b86..241f123ae1 100644
--- a/board/spear/spear600/spear600.c
+++ b/board/spear/spear600/spear600.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <miiphy.h>
+#include <net.h>
#include <netdev.h>
#include <nand.h>
#include <asm/io.h>
diff --git a/board/spear/x600/fpga.c b/board/spear/x600/fpga.c
index d124d96b14..5140694b9e 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>
@@ -11,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/spear/x600/x600.c b/board/spear/x600/x600.c
index e1232edd14..e6f8dc9083 100644
--- a/board/spear/x600/x600.c
+++ b/board/spear/x600/x600.c
@@ -7,9 +7,11 @@
*/
#include <common.h>
+#include <flash.h>
#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/sr1500/socfpga.c b/board/sr1500/socfpga.c
index c9e32e3960..d9125a76bf 100644
--- a/board/sr1500/socfpga.c
+++ b/board/sr1500/socfpga.c
@@ -4,9 +4,11 @@
*/
#include <common.h>
+#include <init.h>
#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/common/cmd_stboard.c b/board/st/common/cmd_stboard.c
index 915164aa0b..e1038619f0 100644
--- a/board/st/common/cmd_stboard.c
+++ b/board/st/common/cmd_stboard.c
@@ -31,6 +31,7 @@
#ifndef CONFIG_SPL_BUILD
#include <common.h>
+#include <command.h>
#include <console.h>
#include <misc.h>
#include <dm/device.h>
@@ -67,8 +68,8 @@ static void display_stboard(u32 otp)
otp & 0xF);
}
-static int do_stboard(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_stboard(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int ret;
u32 otp, lock;
diff --git a/board/st/common/stm32mp_dfu.c b/board/st/common/stm32mp_dfu.c
index 3bd005bb04..0cda9196f9 100644
--- a/board/st/common/stm32mp_dfu.c
+++ b/board/st/common/stm32mp_dfu.c
@@ -17,7 +17,7 @@
static void board_get_alt_info_mmc(struct udevice *dev, char *buf)
{
- disk_partition_t info;
+ struct disk_partition info;
int p, len, devnum;
bool first = true;
const char *name;
diff --git a/board/st/stih410-b2260/board.c b/board/st/stih410-b2260/board.c
index 5d9fdf27b2..b1147f2e1a 100644
--- a/board/st/stih410-b2260/board.c
+++ b/board/st/stih410-b2260/board.c
@@ -6,6 +6,8 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
+#include <asm/cache.h>
#include <linux/usb/otg.h>
#include <dwc3-sti-glue.h>
#include <dwc3-uboot.h>
diff --git a/board/st/stm32f429-discovery/stm32f429-discovery.c b/board/st/stm32f429-discovery/stm32f429-discovery.c
index 500dc5fe3a..ee6a90c9fd 100644
--- a/board/st/stm32f429-discovery/stm32f429-discovery.c
+++ b/board/st/stm32f429-discovery/stm32f429-discovery.c
@@ -12,6 +12,9 @@
#include <common.h>
#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 8ab2fa5d59..92e3d40a1b 100644
--- a/board/st/stm32f429-evaluation/stm32f429-evaluation.c
+++ b/board/st/stm32f429-evaluation/stm32f429-evaluation.c
@@ -6,6 +6,9 @@
#include <common.h>
#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 70d23d90f4..85988acb24 100644
--- a/board/st/stm32f469-discovery/stm32f469-discovery.c
+++ b/board/st/stm32f469-discovery/stm32f469-discovery.c
@@ -6,6 +6,9 @@
#include <common.h>
#include <dm.h>
+#include <env.h>
+#include <init.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/arch/stm32.h>
diff --git a/board/st/stm32f746-disco/stm32f746-disco.c b/board/st/stm32f746-disco/stm32f746-disco.c
index df907426d2..0f728fd9f9 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>
@@ -22,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/stm32h743-disco/stm32h743-disco.c b/board/st/stm32h743-disco/stm32h743-disco.c
index 6aab2e243e..0484c3c250 100644
--- a/board/st/stm32h743-disco/stm32h743-disco.c
+++ b/board/st/stm32h743-disco/stm32h743-disco.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <init.h>
+#include <log.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/st/stm32h743-eval/stm32h743-eval.c b/board/st/stm32h743-eval/stm32h743-eval.c
index 6aab2e243e..0484c3c250 100644
--- a/board/st/stm32h743-eval/stm32h743-eval.c
+++ b/board/st/stm32h743-eval/stm32h743-eval.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <init.h>
+#include <log.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/st/stm32mp1/board.c b/board/st/stm32mp1/board.c
index 4e35d36c76..c218d37ecc 100644
--- a/board/st/stm32mp1/board.c
+++ b/board/st/stm32mp1/board.c
@@ -7,6 +7,8 @@
#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 33cb7f6c4d..4553329b25 100644
--- a/board/st/stm32mp1/stm32mp1.c
+++ b/board/st/stm32mp1/stm32mp1.c
@@ -10,15 +10,18 @@
#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>
#include <i2c.h>
#include <init.h>
#include <led.h>
+#include <log.h>
#include <malloc.h>
#include <misc.h>
#include <mtd_node.h>
+#include <net.h>
#include <netdev.h>
#include <phy.h>
#include <remoteproc.h>
@@ -31,6 +34,8 @@
#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 <linux/iopoll.h>
#include <power/regulator.h>
diff --git a/board/st/stv0991/stv0991.c b/board/st/stv0991/stv0991.c
index 33b29e647e..d5a9f1386e 100644
--- a/board/st/stv0991/stv0991.c
+++ b/board/st/stv0991/stv0991.c
@@ -5,8 +5,11 @@
*/
#include <common.h>
+#include <bootstage.h>
#include <dm.h>
+#include <init.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/ste/stemmy/stemmy.c b/board/ste/stemmy/stemmy.c
index 8cf6f18755..f7834c08fc 100644
--- a/board/ste/stemmy/stemmy.c
+++ b/board/ste/stemmy/stemmy.c
@@ -3,6 +3,7 @@
* Copyright (C) 2019 Stephan Gerhold <stephan@gerhold.net>
*/
#include <common.h>
+#include <init.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 6afea6ef42..f32e8f582f 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -14,7 +14,9 @@
#include <dm.h>
#include <env.h>
#include <hang.h>
+#include <image.h>
#include <init.h>
+#include <log.h>
#include <mmc.h>
#include <axp_pmic.h>
#include <generic-phy.h>
@@ -26,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/sunxi/dram_sun4i_auto.c b/board/sunxi/dram_sun4i_auto.c
index 7d4409b51e..e8bbee4ee5 100644
--- a/board/sunxi/dram_sun4i_auto.c
+++ b/board/sunxi/dram_sun4i_auto.c
@@ -1,4 +1,5 @@
#include <common.h>
+#include <init.h>
#include <asm/arch/dram.h>
static struct dram_para dram_para = {
diff --git a/board/sunxi/dram_sun5i_auto.c b/board/sunxi/dram_sun5i_auto.c
index e3fa243267..a5f4f8b743 100644
--- a/board/sunxi/dram_sun5i_auto.c
+++ b/board/sunxi/dram_sun5i_auto.c
@@ -1,6 +1,7 @@
/* DRAM parameters for auto dram configuration on sun5i and sun7i */
#include <common.h>
+#include <init.h>
#include <asm/arch/dram.h>
static struct dram_para dram_para = {
diff --git a/board/synopsys/axs10x/axs10x.c b/board/synopsys/axs10x/axs10x.c
index fa982bda5c..b4a1d4c5df 100644
--- a/board/synopsys/axs10x/axs10x.c
+++ b/board/synopsys/axs10x/axs10x.c
@@ -6,9 +6,11 @@
#include <common.h>
#include <cpu_func.h>
#include <dwmmc.h>
+#include <init.h>
#include <malloc.h>
#include <asm/arcregs.h>
#include "axs10x.h"
+#include <asm/cache.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/synopsys/emsdp/emsdp.c b/board/synopsys/emsdp/emsdp.c
index c09ed8cff8..91fa94a638 100644
--- a/board/synopsys/emsdp/emsdp.c
+++ b/board/synopsys/emsdp/emsdp.c
@@ -4,9 +4,12 @@
*/
#include <common.h>
+#include <command.h>
#include <cpu_func.h>
#include <dwmmc.h>
+#include <init.h>
#include <malloc.h>
+#include <linux/bitops.h>
#include <asm/arcregs.h>
@@ -101,7 +104,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);
@@ -117,13 +121,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/clk-lib.c b/board/synopsys/hsdk/clk-lib.c
index 6b6bb70e3c..1c74bfb93a 100644
--- a/board/synopsys/hsdk/clk-lib.c
+++ b/board/synopsys/hsdk/clk-lib.c
@@ -5,6 +5,7 @@
*/
#include <clk.h>
+#include <log.h>
#include <malloc.h>
#include <dm/device.h>
diff --git a/board/synopsys/hsdk/clk-lib.h b/board/synopsys/hsdk/clk-lib.h
index c1c105a8fd..970bcd4a17 100644
--- a/board/synopsys/hsdk/clk-lib.h
+++ b/board/synopsys/hsdk/clk-lib.h
@@ -8,6 +8,7 @@
#define __BOARD_CLK_LIB_H
#include <common.h>
+#include <linux/bitops.h>
enum clk_ctl_ops {
CLK_SET = BIT(0), /* set frequency */
diff --git a/board/synopsys/hsdk/env-lib.c b/board/synopsys/hsdk/env-lib.c
index f443c21e6d..235f29565f 100644
--- a/board/synopsys/hsdk/env-lib.c
+++ b/board/synopsys/hsdk/env-lib.c
@@ -6,6 +6,7 @@
#include "env-lib.h"
#include <env.h>
+#include <log.h>
#define MAX_CMD_LEN 25
diff --git a/board/synopsys/hsdk/hsdk.c b/board/synopsys/hsdk/hsdk.c
index 8ccd84ca60..cd11f9dac0 100644
--- a/board/synopsys/hsdk/hsdk.c
+++ b/board/synopsys/hsdk/hsdk.c
@@ -5,11 +5,17 @@
*/
#include <common.h>
+#include <command.h>
#include <config.h>
#include <cpu_func.h>
#include <env.h>
+#include <image.h>
#include <init.h>
#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>
#include <linux/io.h>
@@ -929,7 +935,8 @@ static int hsdk_go_prepare_and_run(void)
return hsdk_go_run(reg);
}
-static int do_hsdk_go(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_hsdk_go(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int ret;
@@ -994,7 +1001,8 @@ static void init_mark_done(void)
writel(~INIT_MARKER_PENDING, INIT_MARKER_REGISTER);
}
-static int do_hsdk_init(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_hsdk_init(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int ret;
@@ -1022,7 +1030,7 @@ U_BOOT_CMD(
"- Init HSDK HW\n"
);
-static int do_hsdk_clock_set(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_hsdk_clock_set(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
int ret = 0;
@@ -1054,7 +1062,7 @@ static int do_hsdk_clock_set(cmd_tbl_t *cmdtp, int flag, int argc,
return CMD_RET_SUCCESS;
}
-static int do_hsdk_clock_get(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_hsdk_clock_get(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
ulong rate;
@@ -1082,7 +1090,7 @@ static int do_hsdk_clock_get(cmd_tbl_t *cmdtp, int flag, int argc,
return CMD_RET_SUCCESS;
}
-static int do_hsdk_clock_print(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_hsdk_clock_print(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
/* Main clocks */
@@ -1094,7 +1102,7 @@ static int do_hsdk_clock_print(cmd_tbl_t *cmdtp, int flag, int argc,
return CMD_RET_SUCCESS;
}
-static int do_hsdk_clock_print_all(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_hsdk_clock_print_all(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
/*
@@ -1155,16 +1163,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/synopsys/iot_devkit/iot_devkit.c b/board/synopsys/iot_devkit/iot_devkit.c
index 36aa8f6ae5..497ea186d3 100644
--- a/board/synopsys/iot_devkit/iot_devkit.c
+++ b/board/synopsys/iot_devkit/iot_devkit.c
@@ -5,8 +5,10 @@
#include <common.h>
#include <cpu_func.h>
+#include <init.h>
#include <malloc.h>
#include <dwmmc.h>
+#include <linux/bitops.h>
#include <linux/libfdt.h>
#include <fdtdec.h>
diff --git a/board/synopsys/nsim/nsim.c b/board/synopsys/nsim/nsim.c
index f384f707f6..00e5cc3641 100644
--- a/board/synopsys/nsim/nsim.c
+++ b/board/synopsys/nsim/nsim.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <init.h>
#include <dm/device.h>
#include <virtio_types.h>
#include <virtio.h>
diff --git a/board/syteco/zmx25/zmx25.c b/board/syteco/zmx25/zmx25.c
index 715e20dbd0..d5393d7059 100644
--- a/board/syteco/zmx25/zmx25.c
+++ b/board/syteco/zmx25/zmx25.c
@@ -15,11 +15,13 @@
*/
#include <common.h>
#include <cpu_func.h>
+#include <env.h>
#include <init.h>
#include <asm/gpio.h>
#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/tbs/tbs2910/tbs2910.c b/board/tbs/tbs2910/tbs2910.c
index b4fd183394..d32517f998 100644
--- a/board/tbs/tbs2910/tbs2910.c
+++ b/board/tbs/tbs2910/tbs2910.c
@@ -3,6 +3,7 @@
* Copyright (C) 2014 Soeren Moch <smoch@web.de>
*/
+#include <init.h>
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/iomux.h>
diff --git a/board/tcl/sl50/board.c b/board/tcl/sl50/board.c
index 7537fa213a..afa6290a2a 100644
--- a/board/tcl/sl50/board.c
+++ b/board/tcl/sl50/board.c
@@ -11,6 +11,7 @@
#include <env.h>
#include <errno.h>
#include <init.h>
+#include <net.h>
#include <serial.h>
#include <spl.h>
#include <asm/arch/cpu.h>
diff --git a/board/technexion/pico-imx6/pico-imx6.c b/board/technexion/pico-imx6/pico-imx6.c
index f8eeb40555..b5a02eb832 100644
--- a/board/technexion/pico-imx6/pico-imx6.c
+++ b/board/technexion/pico-imx6/pico-imx6.c
@@ -6,6 +6,9 @@
* Author: Fabio Estevam <festevam@gmail.com>
*/
+#include <env.h>
+#include <init.h>
+#include <net.h>
#include <asm/arch/clock.h>
#include <asm/arch/crm_regs.h>
#include <asm/arch/iomux.h>
@@ -17,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 06ad0a8c32..f9ae09607f 100644
--- a/board/technexion/pico-imx6/spl.c
+++ b/board/technexion/pico-imx6/spl.c
@@ -6,10 +6,14 @@
* Fabio Estevam <festevam@gmail.com>
*/
+#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>
#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 e27a03c212..1d24096df5 100644
--- a/board/technexion/pico-imx6ul/pico-imx6ul.c
+++ b/board/technexion/pico-imx6ul/pico-imx6ul.c
@@ -5,6 +5,8 @@
* Author: Richard Hu <richard.hu@technexion.com>
*/
+#include <init.h>
+#include <net.h>
#include <asm/arch/clock.h>
#include <asm/arch/iomux.h>
#include <asm/arch/imx-regs.h>
@@ -17,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/technexion/pico-imx7d/pico-imx7d.c b/board/technexion/pico-imx7d/pico-imx7d.c
index b7ca2e1315..a6fd49d729 100644
--- a/board/technexion/pico-imx7d/pico-imx7d.c
+++ b/board/technexion/pico-imx7d/pico-imx7d.c
@@ -4,6 +4,7 @@
*/
#include <init.h>
+#include <net.h>
#include <asm/arch/clock.h>
#include <asm/arch/crm_regs.h>
#include <asm/arch/imx-regs.h>
diff --git a/board/technexion/pico-imx7d/spl.c b/board/technexion/pico-imx7d/spl.c
index 6c432ca5a6..a651a00c1a 100644
--- a/board/technexion/pico-imx7d/spl.c
+++ b/board/technexion/pico-imx7d/spl.c
@@ -5,7 +5,9 @@
* Author: Richard Hu <richard.hu@technexion.com>
*/
+#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/pico-imx8mq/pico-imx8mq.c b/board/technexion/pico-imx8mq/pico-imx8mq.c
index 822357bb12..2a3e6e7e26 100644
--- a/board/technexion/pico-imx8mq/pico-imx8mq.c
+++ b/board/technexion/pico-imx8mq/pico-imx8mq.c
@@ -20,6 +20,7 @@
#include <asm/mach-imx/gpio.h>
#include <asm/mach-imx/mxc_i2c.h>
#include <asm/arch/clock.h>
+#include <linux/delay.h>
#include <spl.h>
#include <power/pmic.h>
diff --git a/board/technexion/pico-imx8mq/spl.c b/board/technexion/pico-imx8mq/spl.c
index 1588f17821..1677e033c7 100644
--- a/board/technexion/pico-imx8mq/spl.c
+++ b/board/technexion/pico-imx8mq/spl.c
@@ -5,6 +5,8 @@
#include <common.h>
#include <hang.h>
+#include <init.h>
+#include <log.h>
#include <asm/arch/clock.h>
#include <asm/arch/ddr.h>
#include <asm/arch/imx8mq_pins.h>
@@ -13,6 +15,7 @@
#include <asm/mach-imx/gpio.h>
#include <asm/mach-imx/iomux-v3.h>
#include <asm/mach-imx/mxc_i2c.h>
+#include <linux/delay.h>
#include <errno.h>
#include <fsl_esdhc_imx.h>
#include <mmc.h>
diff --git a/board/technexion/tao3530/tao3530.c b/board/technexion/tao3530/tao3530.c
index 7d7c427392..8ce3637731 100644
--- a/board/technexion/tao3530/tao3530.c
+++ b/board/technexion/tao3530/tao3530.c
@@ -4,6 +4,8 @@
* Tapani Utriainen <linuxfae@technexion.com>
*/
#include <common.h>
+#include <bootstage.h>
+#include <init.h>
#include <malloc.h>
#include <netdev.h>
#include <twl4030.h>
diff --git a/board/technologic/ts4600/ts4600.c b/board/technologic/ts4600/ts4600.c
index f9cc2e8f10..54508cd864 100644
--- a/board/technologic/ts4600/ts4600.c
+++ b/board/technologic/ts4600/ts4600.c
@@ -14,12 +14,14 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/gpio.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
#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 ff1a189c7e..28918de547 100644
--- a/board/technologic/ts4800/ts4800.c
+++ b/board/technologic/ts4800/ts4800.c
@@ -8,11 +8,14 @@
#include <common.h>
#include <init.h>
+#include <log.h>
+#include <net.h>
#include <asm/io.h>
#include <asm/gpio.h>
#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/fpga.c b/board/theadorable/fpga.c
index 4f8bf5e778..bc8379cccf 100644
--- a/board/theadorable/fpga.c
+++ b/board/theadorable/fpga.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <altera.h>
#include <errno.h>
+#include <log.h>
#include <asm/gpio.h>
#include <asm/io.h>
#include <asm/arch/cpu.h>
diff --git a/board/theadorable/theadorable.c b/board/theadorable/theadorable.c
index 621e26905b..53ef9916a2 100644
--- a/board/theadorable/theadorable.c
+++ b/board/theadorable/theadorable.c
@@ -4,9 +4,11 @@
*/
#include <common.h>
+#include <command.h>
#include <console.h>
#include <i2c.h>
#include <init.h>
+#include <net.h>
#include <pci.h>
#if !defined(CONFIG_SPL_BUILD)
#include <bootcount.h>
@@ -15,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>
@@ -308,7 +311,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/theobroma-systems/puma_rk3399/puma-rk3399.c b/board/theobroma-systems/puma_rk3399/puma-rk3399.c
index 7ff4766947..561579d056 100644
--- a/board/theobroma-systems/puma_rk3399/puma-rk3399.c
+++ b/board/theobroma-systems/puma_rk3399/puma-rk3399.c
@@ -6,6 +6,8 @@
#include <common.h>
#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/am335x/board.c b/board/ti/am335x/board.c
index 01b28e8da4..4199bee2e6 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -11,8 +11,10 @@
#include <dm.h>
#include <env.h>
#include <errno.h>
+#include <image.h>
#include <init.h>
#include <malloc.h>
+#include <net.h>
#include <spl.h>
#include <serial.h>
#include <asm/arch/cpu.h>
@@ -34,6 +36,8 @@
#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>
#include <env_internal.h>
diff --git a/board/ti/am3517crane/am3517crane.c b/board/ti/am3517crane/am3517crane.c
index 5d4e57ffc5..888aa5b9ca 100644
--- a/board/ti/am3517crane/am3517crane.c
+++ b/board/ti/am3517crane/am3517crane.c
@@ -10,6 +10,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/io.h>
#include <asm/arch/mmc_host_def.h>
#include <asm/arch/mem.h>
diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c
index 21fc5ed1d3..923b224e4c 100644
--- a/board/ti/am43xx/board.c
+++ b/board/ti/am43xx/board.c
@@ -9,11 +9,13 @@
#include <common.h>
#include <eeprom.h>
+#include <image.h>
#include <dm/uclass.h>
#include <env.h>
#include <fdt_support.h>
#include <i2c.h>
#include <init.h>
+#include <net.h>
#include <linux/errno.h>
#include <spl.h>
#include <usb.h>
diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c
index 34ca3ec9b0..8720eb87a5 100644
--- a/board/ti/am57xx/board.c
+++ b/board/ti/am57xx/board.c
@@ -10,8 +10,10 @@
#include <common.h>
#include <env.h>
#include <fdt_support.h>
+#include <image.h>
#include <init.h>
#include <malloc.h>
+#include <net.h>
#include <palmas.h>
#include <sata.h>
#include <serial.h>
diff --git a/board/ti/am65x/evm.c b/board/ti/am65x/evm.c
index a610879424..346f745bb0 100644
--- a/board/ti/am65x/evm.c
+++ b/board/ti/am65x/evm.c
@@ -9,7 +9,10 @@
#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>
#include <asm/arch/hardware.h>
#include <asm/gpio.h>
diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
index 12e657c9c6..9139ad87d4 100644
--- a/board/ti/beagle/beagle.c
+++ b/board/ti/beagle/beagle.c
@@ -13,8 +13,11 @@
*
*/
#include <common.h>
+#include <bootstage.h>
#include <dm.h>
#include <env.h>
+#include <init.h>
+#include <net.h>
#include <ns16550.h>
#include <serial.h>
#ifdef CONFIG_LED_STATUS
diff --git a/board/ti/common/board_detect.c b/board/ti/common/board_detect.c
index cbd35f2434..429668404a 100644
--- a/board/ti/common/board_detect.c
+++ b/board/ti/common/board_detect.c
@@ -9,6 +9,8 @@
#include <common.h>
#include <eeprom.h>
+#include <log.h>
+#include <net.h>
#include <asm/arch/hardware.h>
#include <asm/omap_common.h>
#include <dm/uclass.h>
diff --git a/board/ti/common/board_detect.h b/board/ti/common/board_detect.h
index 5835af5344..9f75b5c004 100644
--- a/board/ti/common/board_detect.h
+++ b/board/ti/common/board_detect.h
@@ -9,6 +9,7 @@
#define __BOARD_DETECT_H
/* TI EEPROM MAGIC Header identifier */
+#include <linux/bitops.h>
#define TI_EEPROM_HEADER_MAGIC 0xEE3355AA
#define TI_DEAD_EEPROM_MAGIC 0xADEAD12C
diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c
index 8132cdfbf2..acf7ff1691 100644
--- a/board/ti/dra7xx/evm.c
+++ b/board/ti/dra7xx/evm.c
@@ -12,8 +12,10 @@
#include <common.h>
#include <env.h>
#include <fdt_support.h>
+#include <image.h>
#include <init.h>
#include <spl.h>
+#include <net.h>
#include <palmas.h>
#include <sata.h>
#include <serial.h>
diff --git a/board/ti/evm/evm.c b/board/ti/evm/evm.c
index d26dd5ba84..aba74fce77 100644
--- a/board/ti/evm/evm.c
+++ b/board/ti/evm/evm.c
@@ -13,6 +13,8 @@
#include <common.h>
#include <dm.h>
#include <env.h>
+#include <init.h>
+#include <net.h>
#include <ns16550.h>
#include <netdev.h>
#include <serial.h>
@@ -26,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/j721e/evm.c b/board/ti/j721e/evm.c
index c068bb86b5..ff939c8ca6 100644
--- a/board/ti/j721e/evm.c
+++ b/board/ti/j721e/evm.c
@@ -8,7 +8,12 @@
*/
#include <common.h>
+#include <env.h>
+#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>
#include <asm/gpio.h>
diff --git a/board/ti/ks2_evm/board.c b/board/ti/ks2_evm/board.c
index 6554c0eb11..8595b20e87 100644
--- a/board/ti/ks2_evm/board.c
+++ b/board/ti/ks2_evm/board.c
@@ -10,6 +10,7 @@
#include "board.h"
#include <env.h>
#include <hang.h>
+#include <image.h>
#include <init.h>
#include <spl.h>
#include <exports.h>
diff --git a/board/ti/ks2_evm/board_k2e.c b/board/ti/ks2_evm/board_k2e.c
index ecd4a42df4..39abb24e15 100644
--- a/board/ti/ks2_evm/board_k2e.c
+++ b/board/ti/ks2_evm/board_k2e.c
@@ -7,6 +7,8 @@
*/
#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_k2g.c b/board/ti/ks2_evm/board_k2g.c
index c6a14a0554..ece75326a5 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>
@@ -17,6 +18,8 @@
#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/ti/ks2_evm/board_k2hk.c b/board/ti/ks2_evm/board_k2hk.c
index 4c0acd627f..12c4649c3c 100644
--- a/board/ti/ks2_evm/board_k2hk.c
+++ b/board/ti/ks2_evm/board_k2hk.c
@@ -7,6 +7,8 @@
*/
#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 e49d8b3482..f759ee3646 100644
--- a/board/ti/ks2_evm/board_k2l.c
+++ b/board/ti/ks2_evm/board_k2l.c
@@ -7,6 +7,8 @@
*/
#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 ee7efcbfa7..e35f319b46 100644
--- a/board/ti/omap5_uevm/evm.c
+++ b/board/ti/omap5_uevm/evm.c
@@ -6,12 +6,15 @@
* Steve Sakoman <steve@sakoman.com>
*/
#include <common.h>
+#include <init.h>
+#include <net.h>
#include <palmas.h>
#include <asm/arch/omap.h>
#include <asm/arch/sys_proto.h>
#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/ti/panda/panda.c b/board/ti/panda/panda.c
index 20199da390..9ebecfdbf5 100644
--- a/board/ti/panda/panda.c
+++ b/board/ti/panda/panda.c
@@ -5,6 +5,9 @@
* Steve Sakoman <steve@sakoman.com>
*/
#include <common.h>
+#include <init.h>
+#include <log.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/cmd_bat.c b/board/ti/sdp4430/cmd_bat.c
index c820435386..6c1e6ca393 100644
--- a/board/ti/sdp4430/cmd_bat.c
+++ b/board/ti/sdp4430/cmd_bat.c
@@ -9,7 +9,7 @@
#ifdef CONFIG_CMD_BAT
#include <twl6030.h>
-int do_vbat(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_vbat(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
if (argc == 2) {
if (strncmp(argv[1], "startcharge", 12) == 0)
diff --git a/board/ti/sdp4430/sdp.c b/board/ti/sdp4430/sdp.c
index e71c53e5ee..a5b3504045 100644
--- a/board/ti/sdp4430/sdp.c
+++ b/board/ti/sdp4430/sdp.c
@@ -6,6 +6,8 @@
* Steve Sakoman <steve@sakoman.com>
*/
#include <common.h>
+#include <init.h>
+#include <net.h>
#include <twl6030.h>
#include <asm/arch/sys_proto.h>
#include <asm/arch/mmc_host_def.h>
diff --git a/board/ti/ti814x/evm.c b/board/ti/ti814x/evm.c
index 2b9385d14b..8ed80d2f46 100644
--- a/board/ti/ti814x/evm.c
+++ b/board/ti/ti814x/evm.c
@@ -11,6 +11,8 @@
#include <cpsw.h>
#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/ti/ti816x/evm.c b/board/ti/ti816x/evm.c
index 3896ebbfda..590c15676a 100644
--- a/board/ti/ti816x/evm.c
+++ b/board/ti/ti816x/evm.c
@@ -8,6 +8,8 @@
#include <common.h>
#include <env.h>
+#include <init.h>
+#include <net.h>
#include <spl.h>
#include <asm/cache.h>
#include <asm/io.h>
diff --git a/board/timll/devkit3250/devkit3250.c b/board/timll/devkit3250/devkit3250.c
index b455844c89..f4eaf15970 100644
--- a/board/timll/devkit3250/devkit3250.c
+++ b/board/timll/devkit3250/devkit3250.c
@@ -13,6 +13,7 @@
#include <asm/arch/emc.h>
#include <asm/arch/wdt.h>
#include <asm/io.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/timll/devkit8000/devkit8000.c b/board/timll/devkit8000/devkit8000.c
index b037d725c3..cbb219931d 100644
--- a/board/timll/devkit8000/devkit8000.c
+++ b/board/timll/devkit8000/devkit8000.c
@@ -18,6 +18,7 @@
#include <common.h>
#include <dm.h>
#include <env.h>
+#include <init.h>
#include <malloc.h>
#include <ns16550.h>
#include <twl4030.h>
diff --git a/board/toradex/apalis-tk1/apalis-tk1.c b/board/toradex/apalis-tk1/apalis-tk1.c
index bc98858ae0..d77b4c4ab9 100644
--- a/board/toradex/apalis-tk1/apalis-tk1.c
+++ b/board/toradex/apalis-tk1/apalis-tk1.c
@@ -5,6 +5,9 @@
#include <common.h>
#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>
@@ -12,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 15f8dce2f1..68169f5548 100644
--- a/board/toradex/apalis-tk1/as3722_init.c
+++ b/board/toradex/apalis-tk1/as3722_init.c
@@ -4,8 +4,10 @@
*/
#include <common.h>
+#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 8c4a359c75..40c71adf51 100644
--- a/board/toradex/apalis_imx6/apalis_imx6.c
+++ b/board/toradex/apalis_imx6/apalis_imx6.c
@@ -9,7 +9,11 @@
#include <common.h>
#include <cpu_func.h>
#include <dm.h>
+#include <image.h>
#include <init.h>
+#include <net.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <ahci.h>
#include <asm/arch/clock.h>
diff --git a/board/toradex/apalis_imx6/do_fuse.c b/board/toradex/apalis_imx6/do_fuse.c
index 22d191f52a..6991b1bc13 100644
--- a/board/toradex/apalis_imx6/do_fuse.c
+++ b/board/toradex/apalis_imx6/do_fuse.c
@@ -9,6 +9,7 @@
#include <common.h>
#ifndef CONFIG_SPL_BUILD
+#include <command.h>
#include <console.h>
#include <fuse.h>
@@ -35,8 +36,8 @@ static int mfgr_fuse(void)
return CMD_RET_SUCCESS;
}
-int do_mfgr_fuse(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+int do_mfgr_fuse(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int ret;
puts("Fusing...\n");
@@ -48,8 +49,8 @@ int do_mfgr_fuse(cmd_tbl_t *cmdtp, int flag, int argc,
return ret;
}
-int do_updt_fuse(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+int do_updt_fuse(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
unsigned val;
int ret;
diff --git a/board/toradex/apalis_imx6/pf0100.c b/board/toradex/apalis_imx6/pf0100.c
index ebd6418fd4..c89052ff5d 100644
--- a/board/toradex/apalis_imx6/pf0100.c
+++ b/board/toradex/apalis_imx6/pf0100.c
@@ -8,12 +8,14 @@
*/
#include <common.h>
+#include <command.h>
#include <i2c.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/iomux.h>
#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"
@@ -261,8 +263,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/apalis_t30/apalis_t30.c b/board/toradex/apalis_t30/apalis_t30.c
index df9bc8e707..3e8b8b1fe3 100644
--- a/board/toradex/apalis_t30/apalis_t30.c
+++ b/board/toradex/apalis_t30/apalis_t30.c
@@ -5,6 +5,8 @@
*/
#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>
@@ -14,6 +16,7 @@
#include <dm.h>
#include <i2c.h>
#include <pci_tegra.h>
+#include <linux/delay.h>
#include "../common/tdx-common.h"
#include "pinmux-config-apalis_t30.h"
diff --git a/board/toradex/colibri-imx6ull/colibri-imx6ull.c b/board/toradex/colibri-imx6ull/colibri-imx6ull.c
index 7dfe8aec88..c67d02f7c2 100644
--- a/board/toradex/colibri-imx6ull/colibri-imx6ull.c
+++ b/board/toradex/colibri-imx6ull/colibri-imx6ull.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
#include <init.h>
+#include <linux/delay.h>
#include <asm/arch/clock.h>
#include <asm/arch/crm_regs.h>
diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c
index d11401ecab..6522af416a 100644
--- a/board/toradex/colibri_imx6/colibri_imx6.c
+++ b/board/toradex/colibri_imx6/colibri_imx6.c
@@ -11,6 +11,9 @@
#include <dm.h>
#include <env.h>
#include <init.h>
+#include <net.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <asm/arch/clock.h>
#include <asm/arch/crm_regs.h>
diff --git a/board/toradex/colibri_imx6/do_fuse.c b/board/toradex/colibri_imx6/do_fuse.c
index 22d191f52a..6991b1bc13 100644
--- a/board/toradex/colibri_imx6/do_fuse.c
+++ b/board/toradex/colibri_imx6/do_fuse.c
@@ -9,6 +9,7 @@
#include <common.h>
#ifndef CONFIG_SPL_BUILD
+#include <command.h>
#include <console.h>
#include <fuse.h>
@@ -35,8 +36,8 @@ static int mfgr_fuse(void)
return CMD_RET_SUCCESS;
}
-int do_mfgr_fuse(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+int do_mfgr_fuse(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int ret;
puts("Fusing...\n");
@@ -48,8 +49,8 @@ int do_mfgr_fuse(cmd_tbl_t *cmdtp, int flag, int argc,
return ret;
}
-int do_updt_fuse(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+int do_updt_fuse(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
unsigned val;
int ret;
diff --git a/board/toradex/colibri_imx6/pf0100.c b/board/toradex/colibri_imx6/pf0100.c
index e744243297..8f08d8c733 100644
--- a/board/toradex/colibri_imx6/pf0100.c
+++ b/board/toradex/colibri_imx6/pf0100.c
@@ -8,12 +8,14 @@
*/
#include <common.h>
+#include <command.h>
#include <i2c.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/iomux.h>
#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"
@@ -246,8 +248,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_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c
index 8727101aa3..8df925dacf 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>
@@ -20,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 c4db516b07..18b3d3f542 100644
--- a/board/toradex/colibri_pxa270/colibri_pxa270.c
+++ b/board/toradex/colibri_pxa270/colibri_pxa270.c
@@ -9,6 +9,8 @@
#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>
#include <asm/arch/regs-mmc.h>
@@ -20,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 e0b27e92f8..cb0aed872f 100644
--- a/board/toradex/colibri_t20/colibri_t20.c
+++ b/board/toradex/colibri_t20/colibri_t20.c
@@ -4,6 +4,8 @@
*/
#include <common.h>
+#include <init.h>
+#include <log.h>
#include <asm/arch/clock.h>
#include <asm/arch/funcmux.h>
#include <asm/arch/pinmux.h>
@@ -14,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 b6b00e3860..0bbe81e44d 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>
@@ -12,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/toradex/common/tdx-cfg-block.c b/board/toradex/common/tdx-cfg-block.c
index 1b6c911418..75216ecf6d 100644
--- a/board/toradex/common/tdx-cfg-block.c
+++ b/board/toradex/common/tdx-cfg-block.c
@@ -5,6 +5,8 @@
#include <common.h>
#include "tdx-cfg-block.h"
+#include <command.h>
+#include <asm/cache.h>
#if defined(CONFIG_TARGET_APALIS_IMX6) || \
defined(CONFIG_TARGET_APALIS_IMX8) || \
@@ -513,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;
@@ -642,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/common/tdx-common.c b/board/toradex/common/tdx-common.c
index e9441a7979..e8de923f3e 100644
--- a/board/toradex/common/tdx-common.c
+++ b/board/toradex/common/tdx-common.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <env.h>
#include <g_dnl.h>
+#include <init.h>
#include <linux/libfdt.h>
#include "tdx-cfg-block.h"
diff --git a/board/toradex/verdin-imx8mm/spl.c b/board/toradex/verdin-imx8mm/spl.c
index dc5bd84f33..cc78c5666b 100644
--- a/board/toradex/verdin-imx8mm/spl.c
+++ b/board/toradex/verdin-imx8mm/spl.c
@@ -4,6 +4,10 @@
*/
#include <common.h>
+#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/toradex/verdin-imx8mm/verdin-imx8mm.c b/board/toradex/verdin-imx8mm/verdin-imx8mm.c
index 35866e096a..ff05c7d552 100644
--- a/board/toradex/verdin-imx8mm/verdin-imx8mm.c
+++ b/board/toradex/verdin-imx8mm/verdin-imx8mm.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/arch/clock.h>
#include <asm/arch/sys_proto.h>
#include <asm/io.h>
diff --git a/board/tplink/wdr4300/wdr4300.c b/board/tplink/wdr4300/wdr4300.c
index 4dacaa4285..9134d6bf6d 100644
--- a/board/tplink/wdr4300/wdr4300.c
+++ b/board/tplink/wdr4300/wdr4300.c
@@ -4,9 +4,12 @@
*/
#include <common.h>
+#include <init.h>
#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>
#include <mach/ddr.h>
diff --git a/board/tqc/tqm834x/pci.c b/board/tqc/tqm834x/pci.c
index 0834207766..92bda60765 100644
--- a/board/tqc/tqm834x/pci.c
+++ b/board/tqc/tqm834x/pci.c
@@ -13,6 +13,7 @@
#include <pci.h>
#include <i2c.h>
#include <asm/fsl_i2c.h>
+#include <linux/delay.h>
static struct pci_region pci1_regions[] = {
{
diff --git a/board/tqc/tqm834x/tqm834x.c b/board/tqc/tqm834x/tqm834x.c
index 02b3d2dea1..165a5433e7 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>
@@ -15,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.c b/board/tqc/tqma6/tqma6.c
index 675341abdd..d7df4f976a 100644
--- a/board/tqc/tqma6/tqma6.c
+++ b/board/tqc/tqma6/tqma6.c
@@ -14,6 +14,7 @@
#include <asm/arch/iomux.h>
#include <asm/arch/sys_proto.h>
#include <env.h>
+#include <fdt_support.h>
#include <linux/errno.h>
#include <asm/gpio.h>
#include <asm/io.h>
diff --git a/board/tqc/tqma6/tqma6_mba6.c b/board/tqc/tqma6/tqma6_mba6.c
index a5b7587737..84d0e386a3 100644
--- a/board/tqc/tqma6/tqma6_mba6.c
+++ b/board/tqc/tqma6/tqma6_mba6.c
@@ -8,12 +8,14 @@
*/
#include <init.h>
+#include <net.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
#include <asm/arch/mx6-pins.h>
#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 1320f8ad78..0488cbaaa8 100644
--- a/board/tqc/tqma6/tqma6_wru4.c
+++ b/board/tqc/tqma6/tqma6_wru4.c
@@ -10,12 +10,14 @@
*/
#include <init.h>
+#include <net.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
#include <asm/arch/mx6-pins.h>
#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 2ba98c7b52..5e49180c76 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>
@@ -24,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 2a4e790d88..4c85d99c13 100644
--- a/board/udoo/udoo.c
+++ b/board/udoo/udoo.c
@@ -6,12 +6,14 @@
*/
#include <init.h>
+#include <net.h>
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/iomux.h>
#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 b287fbf410..d9afbbb741 100644
--- a/board/udoo/udoo_spl.c
+++ b/board/udoo/udoo_spl.c
@@ -6,10 +6,13 @@
* Based on board/wandboard/spl.c
*/
+#include <common.h>
+#include <init.h>
#include <asm/arch/clock.h>
#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/variscite/dart_6ul/dart_6ul.c b/board/variscite/dart_6ul/dart_6ul.c
index 2d0b760c39..a4f449d2e2 100644
--- a/board/variscite/dart_6ul/dart_6ul.c
+++ b/board/variscite/dart_6ul/dart_6ul.c
@@ -4,6 +4,8 @@
* 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>
#include <asm/arch/mx6-pins.h>
diff --git a/board/variscite/dart_6ul/spl.c b/board/variscite/dart_6ul/spl.c
index 798523d0d0..1b06a66060 100644
--- a/board/variscite/dart_6ul/spl.c
+++ b/board/variscite/dart_6ul/spl.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <init.h>
#include <spl.h>
#include <asm/arch/clock.h>
#include <asm/io.h>
diff --git a/board/varisys/common/sys_eeprom.c b/board/varisys/common/sys_eeprom.c
index 4c025087db..251d9fd73e 100644
--- a/board/varisys/common/sys_eeprom.c
+++ b/board/varisys/common/sys_eeprom.c
@@ -15,6 +15,7 @@
#include <env.h>
#include <i2c.h>
#include <linux/ctype.h>
+#include <linux/delay.h>
#include <u-boot/crc.h>
#include "eeprom.h"
@@ -306,7 +307,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/varisys/cyrus/cyrus.c b/board/varisys/cyrus/cyrus.c
index 13429072c7..a42910f600 100644
--- a/board/varisys/cyrus/cyrus.c
+++ b/board/varisys/cyrus/cyrus.c
@@ -7,6 +7,7 @@
#include <command.h>
#include <env.h>
#include <fdt_support.h>
+#include <image.h>
#include <init.h>
#include <netdev.h>
#include <linux/compiler.h>
diff --git a/board/varisys/cyrus/ddr.c b/board/varisys/cyrus/ddr.c
index cac00e0467..7949eb88c0 100644
--- a/board/varisys/cyrus/ddr.c
+++ b/board/varisys/cyrus/ddr.c
@@ -6,6 +6,8 @@
#include <common.h>
#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/varisys/cyrus/eth.c b/board/varisys/cyrus/eth.c
index 9783abd659..45b21fba32 100644
--- a/board/varisys/cyrus/eth.c
+++ b/board/varisys/cyrus/eth.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <net.h>
#include <netdev.h>
#include <asm/fsl_serdes.h>
#include <fm_eth.h>
diff --git a/board/ve8313/ve8313.c b/board/ve8313/ve8313.c
index d1c9535f46..ceb3d75552 100644
--- a/board/ve8313/ve8313.c
+++ b/board/ve8313/ve8313.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <fdt_support.h>
#include <init.h>
+#include <linux/delay.h>
#include <linux/libfdt.h>
#include <pci.h>
#include <mpc83xx.h>
diff --git a/board/vscom/baltos/board.c b/board/vscom/baltos/board.c
index c76502c964..197405e555 100644
--- a/board/vscom/baltos/board.c
+++ b/board/vscom/baltos/board.c
@@ -11,6 +11,7 @@
#include <env.h>
#include <errno.h>
#include <init.h>
+#include <net.h>
#include <serial.h>
#include <linux/libfdt.h>
#include <spl.h>
diff --git a/board/wandboard/spl.c b/board/wandboard/spl.c
index dbd9d0286f..04c351fff9 100644
--- a/board/wandboard/spl.c
+++ b/board/wandboard/spl.c
@@ -5,10 +5,13 @@
* Richard Hu <hakahu@gmail.com>
*/
+#include <common.h>
+#include <init.h>
#include <asm/arch/clock.h>
#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 fb2f3c1fd2..e0e01b1a4a 100644
--- a/board/wandboard/wandboard.c
+++ b/board/wandboard/wandboard.c
@@ -6,7 +6,10 @@
* Author: Fabio Estevam <fabio.estevam@freescale.com>
*/
+#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>
@@ -22,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/warp7/warp7.c b/board/warp7/warp7.c
index 1ebec93916..50630574fd 100644
--- a/board/warp7/warp7.c
+++ b/board/warp7/warp7.c
@@ -5,6 +5,7 @@
*/
#include <init.h>
+#include <net.h>
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/mx7-pins.h>
diff --git a/board/work-microwave/work_92105/work_92105.c b/board/work-microwave/work_92105/work_92105.c
index 5cc2566e2a..2e0def5b64 100644
--- a/board/work-microwave/work_92105/work_92105.c
+++ b/board/work-microwave/work_92105/work_92105.c
@@ -16,6 +16,7 @@
#include <asm/arch/wdt.h>
#include <asm/gpio.h>
#include <spl.h>
+#include <linux/delay.h>
#include "work_92105_display.h"
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/work-microwave/work_92105/work_92105_display.c b/board/work-microwave/work_92105/work_92105_display.c
index db04dcabc7..fecbbbdb58 100644
--- a/board/work-microwave/work_92105/work_92105_display.c
+++ b/board/work-microwave/work_92105/work_92105_display.c
@@ -11,6 +11,8 @@
*/
#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>
@@ -20,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
@@ -266,7 +269,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 +318,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/xes/common/board.c b/board/xes/common/board.c
index 43575bc302..053b07a0b7 100644
--- a/board/xes/common/board.c
+++ b/board/xes/common/board.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <env.h>
#include "fsl_8xxx_misc.h"
+#include <init.h>
int checkboard(void)
{
diff --git a/board/xes/xpedite517x/ddr.c b/board/xes/xpedite517x/ddr.c
index 604faf2131..a3fd2fc8ca 100644
--- a/board/xes/xpedite517x/ddr.c
+++ b/board/xes/xpedite517x/ddr.c
@@ -8,6 +8,7 @@
#include <i2c.h>
#include <fsl_ddr_sdram.h>
#include <fsl_ddr_dimm_params.h>
+#include <log.h>
void get_spd(ddr2_spd_eeprom_t *spd, u8 i2c_address)
{
diff --git a/board/xes/xpedite537x/ddr.c b/board/xes/xpedite537x/ddr.c
index 65e69c8013..f55102a072 100644
--- a/board/xes/xpedite537x/ddr.c
+++ b/board/xes/xpedite537x/ddr.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <i2c.h>
+#include <log.h>
#include <fsl_ddr_sdram.h>
#include <fsl_ddr_dimm_params.h>
diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c
index 294a59df77..0469e2e7ac 100644
--- a/board/xilinx/common/board.c
+++ b/board/xilinx/common/board.c
@@ -5,6 +5,8 @@
*/
#include <common.h>
+#include <env.h>
+#include <log.h>
#include <asm/sections.h>
#include <dm/uclass.h>
#include <i2c.h>
diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c
index 0e33f6af0b..4e569e910d 100644
--- a/board/xilinx/microblaze-generic/microblaze-generic.c
+++ b/board/xilinx/microblaze-generic/microblaze-generic.c
@@ -12,7 +12,9 @@
#include <common.h>
#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 483e3ce2f7..45cf1d2d0c 100644
--- a/board/xilinx/versal/board.c
+++ b/board/xilinx/versal/board.c
@@ -6,10 +6,13 @@
#include <common.h>
#include <cpu_func.h>
+#include <env.h>
#include <fdtdec.h>
#include <init.h>
+#include <log.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/zynq/bootimg.c b/board/xilinx/zynq/bootimg.c
index 56d69cddac..481f012c28 100644
--- a/board/xilinx/zynq/bootimg.c
+++ b/board/xilinx/zynq/bootimg.c
@@ -4,6 +4,8 @@
*/
#include <common.h>
+#include <log.h>
+#include <part.h>
#include <asm/io.h>
#include <asm/arch/hardware.h>
#include <asm/arch/sys_proto.h>
diff --git a/board/xilinx/zynq/cmds.c b/board/xilinx/zynq/cmds.c
index 27d44b760d..0c46de7599 100644
--- a/board/xilinx/zynq/cmds.c
+++ b/board/xilinx/zynq/cmds.c
@@ -4,10 +4,13 @@
*/
#include <common.h>
+#include <command.h>
+#include <log.h>
#include <asm/io.h>
#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>
@@ -408,8 +411,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 +432,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 +472,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 +481,10 @@ static cmd_tbl_t zynq_commands[] = {
#endif
};
-static int do_zynq(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_zynq(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
- cmd_tbl_t *zynq_cmd;
+ struct cmd_tbl *zynq_cmd;
int ret;
if (!ARRAY_SIZE(zynq_commands)) {
diff --git a/board/xilinx/zynqmp/cmds.c b/board/xilinx/zynqmp/cmds.c
index 893616b6a1..0f1f26986f 100644
--- a/board/xilinx/zynqmp/cmds.c
+++ b/board/xilinx/zynqmp/cmds.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <command.h>
#include <cpu_func.h>
#include <env.h>
#include <malloc.h>
@@ -13,8 +14,8 @@
#include <asm/arch/sys_proto.h>
#include <asm/io.h>
-static int do_zynqmp_verify_secure(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_zynqmp_verify_secure(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
u64 src_addr, addr;
u32 len, src_lo, src_hi;
@@ -65,8 +66,8 @@ static int do_zynqmp_verify_secure(cmd_tbl_t *cmdtp, int flag, int argc,
return ret;
}
-static int do_zynqmp_mmio_read(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_zynqmp_mmio_read(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
u32 read_val, addr;
int ret;
@@ -86,8 +87,8 @@ static int do_zynqmp_mmio_read(cmd_tbl_t *cmdtp, int flag, int argc,
return ret;
}
-static int do_zynqmp_mmio_write(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_zynqmp_mmio_write(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
u32 addr, mask, val;
int ret;
@@ -107,8 +108,8 @@ static int do_zynqmp_mmio_write(cmd_tbl_t *cmdtp, int flag, int argc,
}
#ifdef CONFIG_DEFINE_TCM_OCM_MMAP
-static int do_zynqmp_tcm_init(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_zynqmp_tcm_init(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
u8 mode;
@@ -129,7 +130,7 @@ static int do_zynqmp_tcm_init(cmd_tbl_t *cmdtp, int flag, int argc,
}
#endif
-static cmd_tbl_t cmd_zynqmp_sub[] = {
+static struct cmd_tbl cmd_zynqmp_sub[] = {
U_BOOT_CMD_MKENT(secure, 5, 0, do_zynqmp_verify_secure, "", ""),
U_BOOT_CMD_MKENT(mmio_read, 3, 0, do_zynqmp_mmio_read, "", ""),
U_BOOT_CMD_MKENT(mmio_write, 5, 0, do_zynqmp_mmio_write, "", ""),
@@ -149,10 +150,10 @@ static cmd_tbl_t cmd_zynqmp_sub[] = {
*
* Return: return 0 on success and CMD_RET_USAGE incase of misuse and error
*/
-static int do_zynqmp(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_zynqmp(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
- cmd_tbl_t *c;
+ struct cmd_tbl *c;
if (argc < 2)
return CMD_RET_USAGE;
diff --git a/board/xilinx/zynqmp/tap_delays.c b/board/xilinx/zynqmp/tap_delays.c
index c3ae357bbd..5fde0aed7d 100644
--- a/board/xilinx/zynqmp/tap_delays.c
+++ b/board/xilinx/zynqmp/tap_delays.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <asm/arch/sys_proto.h>
+#include <linux/delay.h>
#define SD_DLL_CTRL 0xFF180358
#define SD_ITAP_DLY 0xFF180314
diff --git a/board/xilinx/zynqmp/xil_io.h b/board/xilinx/zynqmp/xil_io.h
index 1c1bf32ada..e6caa7c850 100644
--- a/board/xilinx/zynqmp/xil_io.h
+++ b/board/xilinx/zynqmp/xil_io.h
@@ -6,6 +6,7 @@
/* FIXME remove this when vivado is fixed */
#include <asm/io.h>
#include <common.h>
+#include <linux/delay.h>
#define xil_printf(...)
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index a2a0d56331..cb72914adb 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -5,10 +5,13 @@
*/
#include <common.h>
+#include <command.h>
#include <cpu_func.h>
#include <debug_uart.h>
#include <env.h>
#include <init.h>
+#include <log.h>
+#include <net.h>
#include <sata.h>
#include <ahci.h>
#include <scsi.h>
@@ -18,7 +21,9 @@
#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 <asm/ptrace.h>
#include <dm/device.h>
#include <dm/uclass.h>
#include <usb.h>
@@ -26,6 +31,9 @@
#include <zynqmppl.h>
#include <zynqmp_firmware.h>
#include <g_dnl.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
+#include <linux/sizes.h>
#include "../common/board.h"
#include "pm_cfg_obj.h"
@@ -413,7 +421,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/board/xilinx/zynqmp_r5/board.c b/board/xilinx/zynqmp_r5/board.c
index 1c45ee7196..5c5a2e9386 100644
--- a/board/xilinx/zynqmp_r5/board.c
+++ b/board/xilinx/zynqmp_r5/board.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <fdtdec.h>
+#include <init.h>
int board_init(void)
{
diff --git a/board/zyxel/nsa310s/nsa310s.c b/board/zyxel/nsa310s/nsa310s.c
index 82a3feee69..3f71e3da44 100644
--- a/board/zyxel/nsa310s/nsa310s.c
+++ b/board/zyxel/nsa310s/nsa310s.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <init.h>
#include <miiphy.h>
#include <net.h>
#include <asm/arch/cpu.h>
diff --git a/cmd/ab_select.c b/cmd/ab_select.c
index 7c8f2ee8eb..6298fcfb60 100644
--- a/cmd/ab_select.c
+++ b/cmd/ab_select.c
@@ -3,15 +3,18 @@
* Copyright (C) 2017 The Android Open Source Project
*/
+#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;
- disk_partition_t part_info;
+ struct disk_partition part_info;
char slot[2];
if (argc != 4)
diff --git a/cmd/abootimg.c b/cmd/abootimg.c
index 670bcb3aaa..40e8978f15 100644
--- a/cmd/abootimg.c
+++ b/cmd/abootimg.c
@@ -6,6 +6,8 @@
#include <android_image.h>
#include <common.h>
+#include <command.h>
+#include <image.h>
#include <mapmem.h>
#define abootimg_addr() \
@@ -14,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;
@@ -39,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;
@@ -61,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;
@@ -92,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;
@@ -139,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;
@@ -150,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;
@@ -169,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;
@@ -192,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;
@@ -208,16 +210,16 @@ static int do_abootimg_dump(cmd_tbl_t *cmdtp, int flag, int argc,
return CMD_RET_SUCCESS;
}
-static cmd_tbl_t cmd_abootimg_sub[] = {
+static struct cmd_tbl cmd_abootimg_sub[] = {
U_BOOT_CMD_MKENT(addr, 2, 1, do_abootimg_addr, "", ""),
U_BOOT_CMD_MKENT(dump, 2, 1, do_abootimg_dump, "", ""),
U_BOOT_CMD_MKENT(get, 5, 1, do_abootimg_get, "", ""),
};
-static int do_abootimg(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_abootimg(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
- cmd_tbl_t *cp;
+ struct cmd_tbl *cp;
cp = find_cmd_tbl(argv[1], cmd_abootimg_sub,
ARRAY_SIZE(cmd_abootimg_sub));
diff --git a/cmd/acpi.c b/cmd/acpi.c
index 203bd93bd5..e9a9161a91 100644
--- a/cmd/acpi.c
+++ b/cmd/acpi.c
@@ -137,7 +137,7 @@ static int list_rsdp(struct acpi_rsdp *rsdp)
return 0;
}
-static int do_acpi_list(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_acpi_list(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
struct acpi_rsdp *rsdp;
@@ -153,7 +153,7 @@ static int do_acpi_list(cmd_tbl_t *cmdtp, int flag, int argc,
return 0;
}
-static int do_acpi_dump(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_acpi_dump(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
const char *name;
diff --git a/cmd/adc.c b/cmd/adc.c
index 381961cf51..16f914a030 100644
--- a/cmd/adc.c
+++ b/cmd/adc.c
@@ -8,7 +8,7 @@
#include <dm.h>
#include <adc.h>
-static int do_adc_list(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_adc_list(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
struct udevice *dev;
@@ -31,7 +31,7 @@ static int do_adc_list(cmd_tbl_t *cmdtp, int flag, int argc,
return CMD_RET_SUCCESS;
}
-static int do_adc_info(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_adc_info(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
struct udevice *dev;
@@ -68,7 +68,7 @@ static int do_adc_info(cmd_tbl_t *cmdtp, int flag, int argc,
return CMD_RET_SUCCESS;
}
-static int do_adc_single(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_adc_single(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
struct udevice *dev;
@@ -95,7 +95,7 @@ static int do_adc_single(cmd_tbl_t *cmdtp, int flag, int argc,
return CMD_RET_SUCCESS;
}
-static int do_adc_scan(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_adc_scan(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
struct adc_channel ch[ADC_MAX_CHANNEL];
diff --git a/cmd/adtimg.c b/cmd/adtimg.c
index 60bb01c349..aa943007f3 100644
--- a/cmd/adtimg.c
+++ b/cmd/adtimg.c
@@ -5,6 +5,7 @@
* Eugeniu Rosca <rosca.eugeniu@gmail.com>
*/
+#include <command.h>
#include <env.h>
#include <image-android-dt.h>
#include <common.h>
@@ -17,8 +18,8 @@
*/
static ulong working_img;
-static int do_adtimg_addr(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_adtimg_addr(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
char *endp;
ulong hdr_addr;
@@ -56,8 +57,8 @@ static int adtimg_check_working_img(void)
return CMD_RET_SUCCESS;
}
-static int do_adtimg_dump(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_adtimg_dump(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
if (argc != 1)
return CMD_RET_USAGE;
@@ -99,7 +100,7 @@ static int adtimg_getopt_u32(char * const opt, char * const name, u32 *optval)
return CMD_RET_SUCCESS;
}
-static int adtimg_getopt_index(int argc, char * const argv[], u32 *index,
+static int adtimg_getopt_index(int argc, char *const argv[], u32 *index,
char **avar, char **svar)
{
int ret;
@@ -124,7 +125,7 @@ static int adtimg_getopt_index(int argc, char * const argv[], u32 *index,
return CMD_RET_SUCCESS;
}
-static int adtimg_get_dt_by_index(int argc, char * const argv[])
+static int adtimg_get_dt_by_index(int argc, char *const argv[])
{
ulong addr;
u32 index, size;
@@ -163,7 +164,7 @@ static int adtimg_get_dt_by_index(int argc, char * const argv[])
return CMD_RET_SUCCESS;
}
-static int adtimg_get_dt(int argc, char * const argv[])
+static int adtimg_get_dt(int argc, char *const argv[])
{
if (argc < 2) {
printf("Error: No options passed to '%s'\n", argv[0]);
@@ -181,8 +182,8 @@ static int adtimg_get_dt(int argc, char * const argv[])
return CMD_RET_FAILURE;
}
-static int do_adtimg_get(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_adtimg_get(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
if (argc < 2) {
printf("Error: No arguments passed to '%s'\n", argv[0]);
@@ -203,15 +204,16 @@ static int do_adtimg_get(cmd_tbl_t *cmdtp, int flag, int argc,
return CMD_RET_FAILURE;
}
-static cmd_tbl_t cmd_adtimg_sub[] = {
+static struct cmd_tbl cmd_adtimg_sub[] = {
U_BOOT_CMD_MKENT(addr, CONFIG_SYS_MAXARGS, 1, do_adtimg_addr, "", ""),
U_BOOT_CMD_MKENT(dump, CONFIG_SYS_MAXARGS, 1, do_adtimg_dump, "", ""),
U_BOOT_CMD_MKENT(get, CONFIG_SYS_MAXARGS, 1, do_adtimg_get, "", ""),
};
-static int do_adtimg(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_adtimg(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
- cmd_tbl_t *cp;
+ struct cmd_tbl *cp;
cp = find_cmd_tbl(argv[1], cmd_adtimg_sub, ARRAY_SIZE(cmd_adtimg_sub));
diff --git a/cmd/aes.c b/cmd/aes.c
index 8c5b42fd2c..4c0dad9932 100644
--- a/cmd/aes.c
+++ b/cmd/aes.c
@@ -35,7 +35,7 @@ u32 aes_get_key_len(char *command)
* Returns zero on success, CMD_RET_USAGE in case of misuse and negative
* on error.
*/
-static int do_aes(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_aes(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
uint32_t key_addr, iv_addr, src_addr, dst_addr, len;
uint8_t *key_ptr, *iv_ptr, *src_ptr, *dst_ptr;
diff --git a/cmd/arm/exception.c b/cmd/arm/exception.c
index 33bc75976f..522f6dff53 100644
--- a/cmd/arm/exception.c
+++ b/cmd/arm/exception.c
@@ -8,8 +8,8 @@
#include <common.h>
#include <command.h>
-static int do_unaligned(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_unaligned(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
/*
* The LDRD instruction requires the data source to be four byte aligned
@@ -23,15 +23,15 @@ static int do_unaligned(cmd_tbl_t *cmdtp, int flag, int argc,
return CMD_RET_FAILURE;
}
-static int do_breakpoint(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_breakpoint(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
asm volatile ("BKPT #123\n");
return CMD_RET_FAILURE;
}
-static int do_undefined(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_undefined(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
/*
* 0xe7f...f. is undefined in ARM mode
@@ -41,7 +41,7 @@ static int do_undefined(cmd_tbl_t *cmdtp, int flag, int argc,
return CMD_RET_FAILURE;
}
-static cmd_tbl_t cmd_sub[] = {
+static struct cmd_tbl cmd_sub[] = {
U_BOOT_CMD_MKENT(breakpoint, CONFIG_SYS_MAXARGS, 1, do_breakpoint,
"", ""),
U_BOOT_CMD_MKENT(unaligned, CONFIG_SYS_MAXARGS, 1, do_unaligned,
diff --git a/cmd/arm/exception64.c b/cmd/arm/exception64.c
index a363818532..d5de50a080 100644
--- a/cmd/arm/exception64.c
+++ b/cmd/arm/exception64.c
@@ -8,8 +8,8 @@
#include <common.h>
#include <command.h>
-static int do_undefined(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_undefined(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
/*
* 0xe7f...f. is undefined in ARM mode
@@ -19,7 +19,7 @@ static int do_undefined(cmd_tbl_t *cmdtp, int flag, int argc,
return CMD_RET_FAILURE;
}
-static cmd_tbl_t cmd_sub[] = {
+static struct cmd_tbl cmd_sub[] = {
U_BOOT_CMD_MKENT(undefined, CONFIG_SYS_MAXARGS, 1, do_undefined,
"", ""),
};
diff --git a/cmd/armflash.c b/cmd/armflash.c
index 6872b0dde3..5e7315eb7c 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
@@ -266,7 +267,7 @@ static int exists(const char * const name)
return CMD_RET_FAILURE;
}
-static int do_afs(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_afs(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
int ret = CMD_RET_SUCCESS;
diff --git a/cmd/avb.c b/cmd/avb.c
index a4de5c40a2..398ad3ba97 100644
--- a/cmd/avb.c
+++ b/cmd/avb.c
@@ -15,7 +15,7 @@
#define AVB_BOOTARGS "avb_bootargs"
static struct AvbOps *avb_ops;
-int do_avb_init(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_avb_init(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
unsigned long mmc_dev;
@@ -36,7 +36,8 @@ int do_avb_init(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return CMD_RET_FAILURE;
}
-int do_avb_read_part(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_avb_read_part(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
const char *part;
s64 offset;
@@ -68,7 +69,7 @@ int do_avb_read_part(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return CMD_RET_FAILURE;
}
-int do_avb_read_part_hex(cmd_tbl_t *cmdtp, int flag, int argc,
+int do_avb_read_part_hex(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
const char *part;
@@ -114,7 +115,8 @@ int do_avb_read_part_hex(cmd_tbl_t *cmdtp, int flag, int argc,
return CMD_RET_FAILURE;
}
-int do_avb_write_part(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_avb_write_part(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
const char *part;
s64 offset;
@@ -145,7 +147,8 @@ int do_avb_write_part(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return CMD_RET_FAILURE;
}
-int do_avb_read_rb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_avb_read_rb(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
size_t index;
u64 rb_idx;
@@ -171,7 +174,8 @@ int do_avb_read_rb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return CMD_RET_FAILURE;
}
-int do_avb_write_rb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_avb_write_rb(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
size_t index;
u64 rb_idx;
@@ -196,8 +200,8 @@ int do_avb_write_rb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return CMD_RET_FAILURE;
}
-int do_avb_get_uuid(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+int do_avb_get_uuid(struct cmd_tbl *cmdtp, int flag,
+ int argc, char *const argv[])
{
const char *part;
char buffer[UUID_STR_LEN + 1];
@@ -224,7 +228,7 @@ int do_avb_get_uuid(cmd_tbl_t *cmdtp, int flag,
return CMD_RET_FAILURE;
}
-int do_avb_verify_part(cmd_tbl_t *cmdtp, int flag,
+int do_avb_verify_part(struct cmd_tbl *cmdtp, int flag,
int argc, char *const argv[])
{
const char * const requested_partitions[] = {"boot", NULL};
@@ -315,8 +319,8 @@ int do_avb_verify_part(cmd_tbl_t *cmdtp, int flag,
return res;
}
-int do_avb_is_unlocked(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+int do_avb_is_unlocked(struct cmd_tbl *cmdtp, int flag,
+ int argc, char *const argv[])
{
bool unlock;
@@ -341,8 +345,8 @@ int do_avb_is_unlocked(cmd_tbl_t *cmdtp, int flag,
return CMD_RET_FAILURE;
}
-int do_avb_read_pvalue(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+int do_avb_read_pvalue(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
const char *name;
size_t bytes;
@@ -382,8 +386,8 @@ int do_avb_read_pvalue(cmd_tbl_t *cmdtp, int flag, int argc,
return CMD_RET_FAILURE;
}
-int do_avb_write_pvalue(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+int do_avb_write_pvalue(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
const char *name;
const char *value;
@@ -411,7 +415,7 @@ int do_avb_write_pvalue(cmd_tbl_t *cmdtp, int flag, int argc,
return CMD_RET_FAILURE;
}
-static cmd_tbl_t cmd_avb[] = {
+static struct cmd_tbl cmd_avb[] = {
U_BOOT_CMD_MKENT(init, 2, 0, do_avb_init, "", ""),
U_BOOT_CMD_MKENT(read_rb, 2, 0, do_avb_read_rb, "", ""),
U_BOOT_CMD_MKENT(write_rb, 3, 0, do_avb_write_rb, "", ""),
@@ -427,9 +431,9 @@ static cmd_tbl_t cmd_avb[] = {
#endif
};
-static int do_avb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_avb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
- cmd_tbl_t *cp;
+ struct cmd_tbl *cp;
cp = find_cmd_tbl(argv[1], cmd_avb, ARRAY_SIZE(cmd_avb));
diff --git a/cmd/axi.c b/cmd/axi.c
index 588098fddd..c9d53c049e 100644
--- a/cmd/axi.c
+++ b/cmd/axi.c
@@ -14,6 +14,7 @@
#include <command.h>
#include <console.h>
#include <dm.h>
+#include <log.h>
/* Currently selected AXI bus device */
static struct udevice *axi_cur_bus;
@@ -96,8 +97,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 +136,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 +164,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 +263,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 +315,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 9626f2c69e..e03218066b 100644
--- a/cmd/bcb.c
+++ b/cmd/bcb.c
@@ -8,6 +8,8 @@
#include <android_bootloader_message.h>
#include <command.h>
#include <common.h>
+#include <log.h>
+#include <part.h>
enum bcb_cmd {
BCB_CMD_LOAD,
@@ -108,11 +110,11 @@ 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;
- disk_partition_t info;
+ struct disk_partition info;
u64 cnt;
char *endp;
int part, ret;
@@ -161,8 +163,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;
@@ -188,8 +190,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;
@@ -207,8 +209,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;
@@ -234,8 +236,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;
@@ -248,11 +250,11 @@ 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;
- disk_partition_t info;
+ struct disk_partition info;
u64 cnt;
int ret;
@@ -280,7 +282,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, "", ""),
@@ -289,9 +291,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 9edcf8d74e..dba552b03f 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;
@@ -175,7 +177,7 @@ void __weak board_detail(void)
/* Please define board_detail() for your platform */
}
-int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
bd_t *bd = gd->bd;
@@ -220,7 +222,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#elif defined(CONFIG_NIOS2)
-int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
bd_t *bd = gd->bd;
@@ -241,7 +243,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#elif defined(CONFIG_MICROBLAZE)
-int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
bd_t *bd = gd->bd;
@@ -267,7 +269,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#elif defined(CONFIG_M68K)
-int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
bd_t *bd = gd->bd;
@@ -299,7 +301,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#elif defined(CONFIG_MIPS)
-int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
print_std_bdinfo(gd->bd);
print_num("relocaddr", gd->relocaddr);
@@ -311,8 +313,8 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#elif defined(CONFIG_ARM)
-static int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
bd_t *bd = gd->bd;
@@ -372,7 +374,7 @@ static int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc,
#elif defined(CONFIG_SH)
-int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
bd_t *bd = gd->bd;
@@ -387,7 +389,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#elif defined(CONFIG_X86)
-int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
bd_t *bd = gd->bd;
@@ -409,7 +411,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#elif defined(CONFIG_SANDBOX)
-int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
bd_t *bd = gd->bd;
@@ -427,7 +429,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#elif defined(CONFIG_NDS32)
-int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
bd_t *bd = gd->bd;
@@ -443,7 +445,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#elif defined(CONFIG_RISCV)
-int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
bd_t *bd = gd->bd;
@@ -460,7 +462,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#elif defined(CONFIG_ARC)
-int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
bd_t *bd = gd->bd;
@@ -474,7 +476,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#elif defined(CONFIG_XTENSA)
-int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
print_std_bdinfo(gd->bd);
return 0;
diff --git a/cmd/bedbug.c b/cmd/bedbug.c
index d3e31212ea..81ce256480 100644
--- a/cmd/bedbug.c
+++ b/cmd/bedbug.c
@@ -6,6 +6,7 @@
#include <cli.h>
#include <command.h>
#include <console.h>
+#include <asm/ptrace.h>
#include <linux/ctype.h>
#include <net.h>
#include <bedbug/type.h>
@@ -56,7 +57,8 @@ int bedbug_init(void)
* Entry point from the interpreter to the disassembler. Repeated calls
* will resume from the last disassembled address.
* ====================================================================== */
-int do_bedbug_dis (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+int do_bedbug_dis(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
ulong addr; /* Address to start disassembly from */
ulong len; /* # of instructions to disassemble */
@@ -96,7 +98,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 +149,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 +246,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 +270,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 +302,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 +332,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 +378,8 @@ U_BOOT_CMD (where, 1, 1, do_bedbug_stack,
* Interpreter command to dump the registers. Calls the CPU-specific
* show registers routine.
* ====================================================================== */
-int do_bedbug_rdump (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+int do_bedbug_rdump(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
/* -------------------------------------------------- */
diff --git a/cmd/bind.c b/cmd/bind.c
index 44a5f17f0d..068b1399ab 100644
--- a/cmd/bind.c
+++ b/cmd/bind.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <command.h>
#include <dm.h>
#include <dm/device-internal.h>
#include <dm/lists.h>
@@ -194,8 +195,8 @@ static int unbind_by_node_path(const char *path)
return 0;
}
-static int do_bind_unbind(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_bind_unbind(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int ret = 0;
bool bind;
diff --git a/cmd/binop.c b/cmd/binop.c
index 6d2df5f3dd..c85cb51568 100644
--- a/cmd/binop.c
+++ b/cmd/binop.c
@@ -64,7 +64,8 @@ void write_to_mem(char *varname, u8 *result, ulong len)
unmap_sysmem(buf);
}
-static int do_binop(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_binop(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
ulong len;
u8 *result, *src1, *src2;
diff --git a/cmd/blk_common.c b/cmd/blk_common.c
index cc6e161ba0..87f94b5abb 100644
--- a/cmd/blk_common.c
+++ b/cmd/blk_common.c
@@ -10,8 +10,9 @@
#include <common.h>
#include <blk.h>
+#include <command.h>
-int blk_common_cmd(int argc, char * const argv[], enum if_type if_type,
+int blk_common_cmd(int argc, char *const argv[], enum if_type if_type,
int *cur_devnump)
{
const char *if_name = blk_get_if_type_name(if_type);
diff --git a/cmd/blkcache.c b/cmd/blkcache.c
index 2cc65a9ee7..25f252e455 100644
--- a/cmd/blkcache.c
+++ b/cmd/blkcache.c
@@ -4,13 +4,14 @@
* Author: Eric Nelson<eric@nelint.com>
*
*/
+#include <command.h>
#include <config.h>
#include <common.h>
#include <malloc.h>
#include <part.h>
-static int blkc_show(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+static int blkc_show(struct cmd_tbl *cmdtp, int flag,
+ int argc, char *const argv[])
{
struct block_cache_stats stats;
blkcache_stats(&stats);
@@ -25,8 +26,8 @@ static int blkc_show(cmd_tbl_t *cmdtp, int flag,
return 0;
}
-static int blkc_configure(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+static int blkc_configure(struct cmd_tbl *cmdtp, int flag,
+ int argc, char *const argv[])
{
unsigned blocks_per_entry, max_entries;
if (argc != 3)
@@ -40,7 +41,7 @@ static int blkc_configure(cmd_tbl_t *cmdtp, int flag,
return 0;
}
-static cmd_tbl_t cmd_blkc_sub[] = {
+static struct cmd_tbl cmd_blkc_sub[] = {
U_BOOT_CMD_MKENT(show, 0, 0, blkc_show, "", ""),
U_BOOT_CMD_MKENT(configure, 3, 0, blkc_configure, "", ""),
};
@@ -55,10 +56,10 @@ static __maybe_unused void blkc_reloc(void)
};
}
-static int do_blkcache(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+static int do_blkcache(struct cmd_tbl *cmdtp, int flag,
+ int argc, char *const argv[])
{
- cmd_tbl_t *c;
+ struct cmd_tbl *c;
#ifdef CONFIG_NEEDS_MANUAL_RELOC
blkc_reloc();
diff --git a/cmd/blob.c b/cmd/blob.c
index 80478b8802..c80e6977b4 100644
--- a/cmd/blob.c
+++ b/cmd/blob.c
@@ -48,7 +48,8 @@ __weak int blob_encap(u8 *key_mod, u8 *src, u8 *dst, u32 len)
* Returns zero on success, CMD_RET_USAGE in case of misuse and negative
* on error.
*/
-static int do_blob(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_blob(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
ulong key_addr, src_addr, dst_addr, len;
uint8_t *km_ptr, *src_ptr, *dst_ptr;
diff --git a/cmd/bmp.c b/cmd/bmp.c
index edf4f56426..6040fa5d95 100644
--- a/cmd/bmp.c
+++ b/cmd/bmp.c
@@ -15,6 +15,7 @@
#include <gzip.h>
#include <image.h>
#include <lcd.h>
+#include <log.h>
#include <malloc.h>
#include <mapmem.h>
#include <splash.h>
@@ -91,7 +92,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 +111,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 +144,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 +165,9 @@ void bmp_reloc(void) {
* Return: None
*
*/
-static int do_bmp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_bmp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
- cmd_tbl_t *c;
+ struct cmd_tbl *c;
/* Strip off leading 'bmp' command argument */
argc--;
diff --git a/cmd/boot.c b/cmd/boot.c
index 9150fce80b..36aba22b30 100644
--- a/cmd/boot.c
+++ b/cmd/boot.c
@@ -16,12 +16,12 @@
/* Allow ports to override the default behavior */
__attribute__((weak))
unsigned long do_go_exec(ulong (*entry)(int, char * const []), int argc,
- char * const argv[])
+ char *const argv[])
{
return entry (argc, argv);
}
-static int do_go(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_go(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
ulong addr, rc;
int rcode = 0;
diff --git a/cmd/bootcount.c b/cmd/bootcount.c
index c358418ebe..654bbb805c 100644
--- a/cmd/bootcount.c
+++ b/cmd/bootcount.c
@@ -4,15 +4,15 @@
#include <command.h>
#include <bootcount.h>
-static int do_bootcount_print(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_bootcount_print(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
printf("%lu\n", bootcount_load());
return CMD_RET_SUCCESS;
}
-static int do_bootcount_reset(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_bootcount_reset(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
/*
* note that we're explicitly not resetting the environment
@@ -22,15 +22,15 @@ static int do_bootcount_reset(cmd_tbl_t *cmdtp, int flag, int argc,
return CMD_RET_SUCCESS;
}
-static cmd_tbl_t bootcount_sub[] = {
+static struct cmd_tbl bootcount_sub[] = {
U_BOOT_CMD_MKENT(print, 1, 1, do_bootcount_print, "", ""),
U_BOOT_CMD_MKENT(reset, 1, 1, do_bootcount_reset, "", ""),
};
-static int do_bootcount(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_bootcount(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
- cmd_tbl_t *cp;
+ struct cmd_tbl *cp;
if (argc < 2)
return CMD_RET_USAGE;
diff --git a/cmd/bootefi.c b/cmd/bootefi.c
index 9849eb4f99..0f6d0f7750 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>
@@ -594,7 +595,8 @@ static int do_efi_selftest(void)
* @argv: command line arguments
* Return: status code
*/
-static int do_bootefi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_bootefi(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
efi_status_t ret;
void *fdt;
diff --git a/cmd/booti.c b/cmd/booti.c
index 4fff8cfcf6..ae37975494 100644
--- a/cmd/booti.c
+++ b/cmd/booti.c
@@ -10,6 +10,7 @@
#include <image.h>
#include <irq_func.h>
#include <lmb.h>
+#include <log.h>
#include <mapmem.h>
#include <linux/kernel.h>
#include <linux/sizes.h>
@@ -18,8 +19,8 @@ DECLARE_GLOBAL_DATA_PTR;
/*
* Image booting support
*/
-static int booti_start(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[], bootm_headers_t *images)
+static int booti_start(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[], bootm_headers_t *images)
{
int ret;
ulong ld;
@@ -98,7 +99,7 @@ static int booti_start(cmd_tbl_t *cmdtp, int flag, int argc,
return 0;
}
-int do_booti(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_booti(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
int ret;
diff --git a/cmd/bootm.c b/cmd/bootm.c
index 931d53f0c7..d5f877cb54 100644
--- a/cmd/bootm.c
+++ b/cmd/bootm.c
@@ -34,12 +34,13 @@ extern flash_info_t flash_info[]; /* info for FLASH chips */
#endif
#if defined(CONFIG_CMD_IMLS) || defined(CONFIG_CMD_IMLS_NAND)
-static int do_imls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+static int do_imls(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[]);
#endif
/* we overload the cmd field with our state machine info instead of a
* function pointer */
-static cmd_tbl_t cmd_bootm_sub[] = {
+static struct cmd_tbl cmd_bootm_sub[] = {
U_BOOT_CMD_MKENT(start, 0, 1, (void *)BOOTM_STATE_START, "", ""),
U_BOOT_CMD_MKENT(loados, 0, 1, (void *)BOOTM_STATE_LOADOS, "", ""),
#ifdef CONFIG_SYS_BOOT_RAMDISK_HIGH
@@ -55,12 +56,12 @@ static cmd_tbl_t cmd_bootm_sub[] = {
U_BOOT_CMD_MKENT(go, 0, 1, (void *)BOOTM_STATE_OS_GO, "", ""),
};
-static int do_bootm_subcommand(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_bootm_subcommand(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int ret = 0;
long state;
- cmd_tbl_t *c;
+ struct cmd_tbl *c;
c = find_cmd_tbl(argv[0], &cmd_bootm_sub[0], ARRAY_SIZE(cmd_bootm_sub));
argc--; argv++;
@@ -89,7 +90,7 @@ static int do_bootm_subcommand(cmd_tbl_t *cmdtp, int flag, int argc,
/* bootm - boot application image from image in memory */
/*******************************************************************/
-int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bootm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
#ifdef CONFIG_NEEDS_MANUAL_RELOC
static int relocated = 0;
@@ -136,7 +137,7 @@ int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
BOOTM_STATE_OS_GO, &images, 1);
}
-int bootm_maybe_autostart(cmd_tbl_t *cmdtp, const char *cmd)
+int bootm_maybe_autostart(struct cmd_tbl *cmdtp, const char *cmd)
{
const char *ep = env_get("autostart");
@@ -201,7 +202,7 @@ U_BOOT_CMD(
/* bootd - boot default image */
/*******************************************************************/
#if defined(CONFIG_CMD_BOOTD)
-int do_bootd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bootd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
return run_command(env_get("bootcmd"), flag);
}
@@ -226,7 +227,8 @@ U_BOOT_CMD(
/* iminfo - print header info for a requested image */
/*******************************************************************/
#if defined(CONFIG_CMD_IMI)
-static int do_iminfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_iminfo(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int arg;
ulong addr;
@@ -519,7 +521,8 @@ static int do_imls_nand(void)
#endif
#if defined(CONFIG_CMD_IMLS) || defined(CONFIG_CMD_IMLS_NAND)
-static int do_imls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_imls(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int ret_nor = 0, ret_nand = 0;
diff --git a/cmd/bootmenu.c b/cmd/bootmenu.c
index 6af0617e65..18efe25751 100644
--- a/cmd/bootmenu.c
+++ b/cmd/bootmenu.c
@@ -7,9 +7,11 @@
#include <command.h>
#include <ansi.h>
#include <env.h>
+#include <log.h>
#include <menu.h>
#include <watchdog.h>
#include <malloc.h>
+#include <linux/delay.h>
#include <linux/string.h>
/* maximum bootmenu entries */
@@ -482,7 +484,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 ed0b0ff1fc..0e623f216b 100644
--- a/cmd/bootstage.c
+++ b/cmd/bootstage.c
@@ -4,16 +4,18 @@
*/
#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;
@@ -34,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;
@@ -57,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, "", ""),
@@ -66,10 +68,10 @@ static cmd_tbl_t cmd_bootstage_sub[] = {
/*
* Process a bootstage sub-command
*/
-static int do_boostage(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_boostage(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
- cmd_tbl_t *c;
+ struct cmd_tbl *c;
/* Strip off leading 'bootstage' command argument */
argc--;
diff --git a/cmd/bootz.c b/cmd/bootz.c
index f14a5fefbf..bc15fd8ec4 100644
--- a/cmd/bootz.c
+++ b/cmd/bootz.c
@@ -10,6 +10,7 @@
#include <image.h>
#include <irq_func.h>
#include <lmb.h>
+#include <log.h>
#include <linux/compiler.h>
int __weak bootz_setup(ulong image, ulong *start, ulong *end)
@@ -23,8 +24,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 +60,7 @@ static int bootz_start(cmd_tbl_t *cmdtp, int flag, int argc,
return 0;
}
-int do_bootz(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bootz(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
int ret;
diff --git a/cmd/btrfs.c b/cmd/btrfs.c
index faa1239cc8..7e3cbe12ce 100644
--- a/cmd/btrfs.c
+++ b/cmd/btrfs.c
@@ -8,7 +8,7 @@
#include <btrfs.h>
#include <fs.h>
-int do_btrsubvol(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_btrsubvol(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
if (argc != 3)
return CMD_RET_USAGE;
diff --git a/cmd/cache.c b/cmd/cache.c
index 7678615dd8..b68d45b98b 100644
--- a/cmd/cache.c
+++ b/cmd/cache.c
@@ -24,7 +24,8 @@ __weak void noncached_set_region(void)
{
}
-static int do_icache(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_icache(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
switch (argc) {
case 2: /* on / off / flush */
@@ -58,7 +59,8 @@ void __weak flush_dcache_all(void)
/* please define arch specific flush_dcache_all */
}
-static int do_dcache(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_dcache(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
switch (argc) {
case 2: /* on / off / flush */
diff --git a/cmd/cbfs.c b/cmd/cbfs.c
index 98e652a4e7..8e91d4bb8c 100644
--- a/cmd/cbfs.c
+++ b/cmd/cbfs.c
@@ -11,7 +11,7 @@
#include <env.h>
#include <cbfs.h>
-static int do_cbfs_init(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_cbfs_init(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
uintptr_t end_of_rom = 0xffffffff;
@@ -45,7 +45,7 @@ U_BOOT_CMD(
" CBFS is in. It defaults to 0xFFFFFFFF\n"
);
-static int do_cbfs_fsload(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_cbfs_fsload(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
const struct cbfs_cachenode *file;
@@ -92,7 +92,7 @@ U_BOOT_CMD(
" - load binary file 'filename' from the cbfs to address 'addr'\n"
);
-static int do_cbfs_ls(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_cbfs_ls(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
const struct cbfs_cachenode *file = file_cbfs_get_first();
@@ -201,7 +201,7 @@ U_BOOT_CMD(
" - list the files in the cbfs\n"
);
-static int do_cbfs_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_cbfs_fsinfo(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
const struct cbfs_header *header = file_cbfs_get_header();
diff --git a/cmd/clk.c b/cmd/clk.c
index 74ad868500..439736d072 100644
--- a/cmd/clk.c
+++ b/cmd/clk.c
@@ -72,7 +72,7 @@ int __weak soc_clk_dump(void)
}
#endif
-static int do_clk_dump(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_clk_dump(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
int ret;
@@ -86,14 +86,14 @@ static int do_clk_dump(cmd_tbl_t *cmdtp, int flag, int argc,
return ret;
}
-static cmd_tbl_t cmd_clk_sub[] = {
+static struct cmd_tbl cmd_clk_sub[] = {
U_BOOT_CMD_MKENT(dump, 1, 1, do_clk_dump, "", ""),
};
-static int do_clk(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_clk(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
- cmd_tbl_t *c;
+ struct cmd_tbl *c;
if (argc < 2)
return CMD_RET_USAGE;
diff --git a/cmd/cls.c b/cmd/cls.c
index f1ce6e8df1..eab4e6993b 100644
--- a/cmd/cls.c
+++ b/cmd/cls.c
@@ -11,7 +11,7 @@
#include <lcd.h>
#include <video.h>
-static int do_video_clear(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_video_clear(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
#if defined(CONFIG_DM_VIDEO)
diff --git a/cmd/config.c b/cmd/config.c
index d2810d573b..cf30841a35 100644
--- a/cmd/config.c
+++ b/cmd/config.c
@@ -11,7 +11,8 @@
#include "config_data_gz.h"
#include "config_data_size.h"
-static int do_config(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_config(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
char *dst;
unsigned long len = data_size;
diff --git a/cmd/conitrace.c b/cmd/conitrace.c
index 85c5422b7e..88850db541 100644
--- a/cmd/conitrace.c
+++ b/cmd/conitrace.c
@@ -7,9 +7,10 @@
*/
#include <common.h>
#include <command.h>
+#include <linux/delay.h>
-static int do_conitrace(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_conitrace(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
bool first = true;
diff --git a/cmd/console.c b/cmd/console.c
index 3f1d98b17b..9a1db83c7c 100644
--- a/cmd/console.c
+++ b/cmd/console.c
@@ -12,7 +12,8 @@
#include <stdio_dev.h>
extern void _do_coninfo (void);
-static int do_coninfo(cmd_tbl_t *cmd, int flag, int argc, char * const argv[])
+static int do_coninfo(struct cmd_tbl *cmd, int flag, int argc,
+ char *const argv[])
{
int l;
struct list_head *list = stdio_get_list();
diff --git a/cmd/cpu.c b/cmd/cpu.c
index 8c0abc1756..ff553c16c4 100644
--- a/cmd/cpu.c
+++ b/cmd/cpu.c
@@ -64,7 +64,7 @@ static int print_cpu_list(bool detail)
return 0;
}
-static int do_cpu_list(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_cpu_list(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
if (print_cpu_list(false))
@@ -73,7 +73,7 @@ static int do_cpu_list(cmd_tbl_t *cmdtp, int flag, int argc,
return 0;
}
-static int do_cpu_detail(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_cpu_detail(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
if (print_cpu_list(true))
@@ -82,7 +82,7 @@ static int do_cpu_detail(cmd_tbl_t *cmdtp, int flag, int argc,
return 0;
}
-static cmd_tbl_t cmd_cpu_sub[] = {
+static struct cmd_tbl cmd_cpu_sub[] = {
U_BOOT_CMD_MKENT(list, 2, 1, do_cpu_list, "", ""),
U_BOOT_CMD_MKENT(detail, 4, 0, do_cpu_detail, "", ""),
};
@@ -90,10 +90,10 @@ static cmd_tbl_t cmd_cpu_sub[] = {
/*
* Process a cpu sub-command
*/
-static int do_cpu(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_cpu(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
- cmd_tbl_t *c = NULL;
+ struct cmd_tbl *c = NULL;
/* Strip off leading 'cpu' command argument */
argc--;
diff --git a/cmd/cramfs.c b/cmd/cramfs.c
index ad232deae0..1aeb56702c 100644
--- a/cmd/cramfs.c
+++ b/cmd/cramfs.c
@@ -94,7 +94,8 @@ extern int cramfs_info (struct part_info *info);
* @param argv arguments list
* @return 0 on success, 1 otherwise
*/
-int do_cramfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_cramfs_load(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
char *filename;
int size;
@@ -162,7 +163,7 @@ int do_cramfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
* @param argv arguments list
* @return 0 on success, 1 otherwise
*/
-int do_cramfs_ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_cramfs_ls(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
char *filename = "/";
int ret;
diff --git a/cmd/cros_ec.c b/cmd/cros_ec.c
index 9e2f1b06f3..ce1f59a740 100644
--- a/cmd/cros_ec.c
+++ b/cmd/cros_ec.c
@@ -10,6 +10,8 @@
#include <command.h>
#include <cros_ec.h>
#include <dm.h>
+#include <flash.h>
+#include <log.h>
#include <dm/device-internal.h>
#include <dm/uclass-internal.h>
@@ -23,7 +25,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"))
@@ -50,7 +52,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;
@@ -92,7 +94,8 @@ static int do_read_write(struct udevice *dev, int is_write, int argc,
return 0;
}
-static int do_cros_ec(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_cros_ec(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct udevice *dev;
const char *cmd;
diff --git a/cmd/dataflash_mmc_mux.c b/cmd/dataflash_mmc_mux.c
index 9f271b6f61..73876e9464 100644
--- a/cmd/dataflash_mmc_mux.c
+++ b/cmd/dataflash_mmc_mux.c
@@ -9,7 +9,8 @@
static int mmc_nspi (const char *);
-int do_dataflash_mmc_mux (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_dataflash_mmc_mux(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
switch (argc) {
case 2: /* on / off */
diff --git a/cmd/date.c b/cmd/date.c
index 7fa950a902..75a032cd27 100644
--- a/cmd/date.c
+++ b/cmd/date.c
@@ -29,7 +29,8 @@ int mk_date (const char *, struct rtc_time *);
static struct rtc_time default_tm = { 0, 0, 0, 1, 1, 2000, 6, 0, 0 };
-static int do_date(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_date(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct rtc_time tm;
int rcode = 0;
diff --git a/cmd/demo.c b/cmd/demo.c
index 52c6e7ec15..9da06f5e4d 100644
--- a/cmd/demo.c
+++ b/cmd/demo.c
@@ -7,14 +7,15 @@
*/
#include <common.h>
+#include <command.h>
#include <dm-demo.h>
#include <mapmem.h>
#include <asm/io.h>
struct udevice *demo_dev;
-static int do_demo_hello(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_demo_hello(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int ch = 0;
@@ -24,8 +25,8 @@ static int do_demo_hello(cmd_tbl_t *cmdtp, int flag, int argc,
return demo_hello(demo_dev, ch);
}
-static int do_demo_status(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_demo_status(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int status;
int ret;
@@ -39,8 +40,8 @@ static int do_demo_status(cmd_tbl_t *cmdtp, int flag, int argc,
return 0;
}
-static int do_demo_light(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_demo_light(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int light;
int ret;
@@ -59,7 +60,7 @@ static int do_demo_light(cmd_tbl_t *cmdtp, int flag, int argc,
return ret;
}
-int do_demo_list(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_demo_list(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
struct udevice *dev;
int i, ret;
@@ -78,16 +79,17 @@ int do_demo_list(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return cmd_process_error(cmdtp, ret);
}
-static cmd_tbl_t demo_commands[] = {
+static struct cmd_tbl demo_commands[] = {
U_BOOT_CMD_MKENT(list, 0, 1, do_demo_list, "", ""),
U_BOOT_CMD_MKENT(hello, 2, 1, do_demo_hello, "", ""),
U_BOOT_CMD_MKENT(light, 2, 1, do_demo_light, "", ""),
U_BOOT_CMD_MKENT(status, 1, 1, do_demo_status, "", ""),
};
-static int do_demo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_demo(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
- cmd_tbl_t *demo_cmd;
+ struct cmd_tbl *demo_cmd;
int devnum = 0;
int ret;
diff --git a/cmd/dfu.c b/cmd/dfu.c
index b30f8a5667..7310595a02 100644
--- a/cmd/dfu.c
+++ b/cmd/dfu.c
@@ -11,6 +11,7 @@
*/
#include <common.h>
+#include <command.h>
#include <watchdog.h>
#include <dfu.h>
#include <console.h>
@@ -18,7 +19,7 @@
#include <usb.h>
#include <net.h>
-static int do_dfu(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_dfu(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
if (argc < 2)
diff --git a/cmd/diag.c b/cmd/diag.c
index 8d21c7dde8..f51536dbfa 100644
--- a/cmd/diag.c
+++ b/cmd/diag.c
@@ -11,7 +11,7 @@
#include <command.h>
#include <post.h>
-int do_diag (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+int do_diag(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
unsigned int i;
diff --git a/cmd/disk.c b/cmd/disk.c
index 15973b7d13..8060e753eb 100644
--- a/cmd/disk.c
+++ b/cmd/disk.c
@@ -4,19 +4,21 @@
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*/
#include <common.h>
+#include <bootstage.h>
#include <command.h>
#include <cpu_func.h>
#include <image.h>
+#include <log.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;
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/dm.c b/cmd/dm.c
index 7a90685f8b..4e307ac524 100644
--- a/cmd/dm.c
+++ b/cmd/dm.c
@@ -16,39 +16,39 @@
#include <dm/root.h>
#include <dm/util.h>
-static int do_dm_dump_all(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_dm_dump_all(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
dm_dump_all();
return 0;
}
-static int do_dm_dump_uclass(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_dm_dump_uclass(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
dm_dump_uclass();
return 0;
}
-static int do_dm_dump_devres(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_dm_dump_devres(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
dm_dump_devres();
return 0;
}
-static int do_dm_dump_drivers(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_dm_dump_drivers(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
dm_dump_drivers();
return 0;
}
-static cmd_tbl_t test_commands[] = {
+static struct cmd_tbl test_commands[] = {
U_BOOT_CMD_MKENT(tree, 0, 1, do_dm_dump_all, "", ""),
U_BOOT_CMD_MKENT(uclass, 1, 1, do_dm_dump_uclass, "", ""),
U_BOOT_CMD_MKENT(devres, 1, 1, do_dm_dump_devres, "", ""),
@@ -65,9 +65,9 @@ static __maybe_unused void dm_reloc(void)
}
}
-static int do_dm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_dm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
- cmd_tbl_t *test_cmd;
+ struct cmd_tbl *test_cmd;
int ret;
#ifdef CONFIG_NEEDS_MANUAL_RELOC
diff --git a/cmd/echo.c b/cmd/echo.c
index 5b018d9349..d02a4cfd58 100644
--- a/cmd/echo.c
+++ b/cmd/echo.c
@@ -7,7 +7,8 @@
#include <common.h>
#include <command.h>
-static int do_echo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_echo(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int i;
int putnl = 1;
diff --git a/cmd/eeprom.c b/cmd/eeprom.c
index 792415ef93..7fa62bba8f 100644
--- a/cmd/eeprom.c
+++ b/cmd/eeprom.c
@@ -25,6 +25,7 @@
#include <eeprom.h>
#include <i2c.h>
#include <eeprom_layout.h>
+#include <linux/delay.h>
#ifndef CONFIG_SYS_I2C_SPEED
#define CONFIG_SYS_I2C_SPEED 50000
@@ -237,7 +238,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 +356,7 @@ static int eeprom_execute_command(enum eeprom_action action, int i2c_bus,
}
#define NEXT_PARAM(argc, index) { (argc)--; (index)++; }
-int do_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_eeprom(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
int layout_ver = LAYOUT_VERSION_AUTODETECT;
enum eeprom_action action = EEPROM_ACTION_INVALID;
diff --git a/cmd/efi.c b/cmd/efi.c
index ea239a01f0..9aeb913ff3 100644
--- a/cmd/efi.c
+++ b/cmd/efi.c
@@ -8,6 +8,7 @@
#include <command.h>
#include <efi.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include <sort.h>
@@ -191,7 +192,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 +233,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 f020d95dbb..703dab0c20 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>
@@ -60,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;
@@ -139,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;
@@ -311,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;
@@ -371,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 +454,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;
@@ -521,8 +522,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;
@@ -551,8 +552,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;
@@ -650,8 +651,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;
@@ -787,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;
@@ -956,8 +957,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;
@@ -1005,8 +1006,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;
@@ -1054,7 +1055,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, "", ""),
@@ -1075,10 +1076,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;
@@ -1108,7 +1109,7 @@ static int do_efi_boot_opt(cmd_tbl_t *cmdtp, int flag,
*
* efidebug test bootmgr
*/
-static int do_efi_test_bootmgr(cmd_tbl_t *cmdtp, int flag,
+static int do_efi_test_bootmgr(struct cmd_tbl *cmdtp, int flag,
int argc, char * const argv[])
{
efi_handle_t image;
@@ -1130,7 +1131,7 @@ static int do_efi_test_bootmgr(cmd_tbl_t *cmdtp, int flag,
return CMD_RET_SUCCESS;
}
-static cmd_tbl_t cmd_efidebug_test_sub[] = {
+static struct cmd_tbl cmd_efidebug_test_sub[] = {
U_BOOT_CMD_MKENT(bootmgr, CONFIG_SYS_MAXARGS, 1, do_efi_test_bootmgr,
"", ""),
};
@@ -1147,10 +1148,10 @@ static cmd_tbl_t cmd_efidebug_test_sub[] = {
*
* Implement efidebug "test" sub-command.
*/
-static int do_efi_test(cmd_tbl_t *cmdtp, int flag,
+static int do_efi_test(struct cmd_tbl *cmdtp, int flag,
int argc, char * const argv[])
{
- cmd_tbl_t *cp;
+ struct cmd_tbl *cp;
if (argc < 2)
return CMD_RET_USAGE;
@@ -1178,7 +1179,7 @@ static int do_efi_test(cmd_tbl_t *cmdtp, int flag,
* Implement efidebug "test" sub-command.
*/
-static int do_efi_query_info(cmd_tbl_t *cmdtp, int flag,
+static int do_efi_query_info(struct cmd_tbl *cmdtp, int flag,
int argc, char * const argv[])
{
efi_status_t ret;
@@ -1217,7 +1218,7 @@ static int do_efi_query_info(cmd_tbl_t *cmdtp, int flag,
return CMD_RET_SUCCESS;
}
-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,
"", ""),
@@ -1250,10 +1251,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 10e8264d3c..d44b95d903 100644
--- a/cmd/elf.c
+++ b/cmd/elf.c
@@ -10,17 +10,19 @@
#include <elf.h>
#include <env.h>
#include <image.h>
+#include <log.h>
#include <net.h>
#include <vxworks.h>
#ifdef CONFIG_X86
#include <vbe.h>
+#include <asm/cache.h>
#include <asm/e820.h>
#include <linux/linkage.h>
#endif
/* 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;
@@ -34,7 +36,7 @@ static unsigned long do_bootelf_exec(ulong (*entry)(int, char * const[]),
}
/* Interpreter command to boot an arbitrary ELF image from memory */
-int do_bootelf(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bootelf(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
unsigned long addr; /* Address of the ELF image */
unsigned long rc; /* Return value from user code */
@@ -90,7 +92,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 8d271ce1f3..f8b8a798bf 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;
@@ -999,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;
@@ -1064,7 +1065,8 @@ static void command_def_init(struct ethsw_command_def *parsed_cmd)
}
/* function to interpret commands starting with "ethsw " */
-static int do_ethsw(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_ethsw(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct ethsw_command_def parsed_cmd;
int rc = CMD_RET_SUCCESS;
diff --git a/cmd/exit.c b/cmd/exit.c
index f40d0686e1..7bf241ec73 100644
--- a/cmd/exit.c
+++ b/cmd/exit.c
@@ -7,7 +7,8 @@
#include <common.h>
#include <command.h>
-static int do_exit(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_exit(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int r;
diff --git a/cmd/ext2.c b/cmd/ext2.c
index dc56ab25ff..57a99516a6 100644
--- a/cmd/ext2.c
+++ b/cmd/ext2.c
@@ -19,9 +19,12 @@
/*
* Ext2fs support
*/
+#include <common.h>
+#include <command.h>
#include <fs.h>
-static int do_ext2ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_ext2ls(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
return do_ls(cmdtp, flag, argc, argv, FS_TYPE_EXT);
}
@@ -29,7 +32,7 @@ static int do_ext2ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
/******************************************************************************
* Ext2fs boot command intepreter. Derived from diskboot
*/
-int do_ext2load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_ext2load(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
return do_load(cmdtp, flag, argc, argv, FS_TYPE_EXT);
}
diff --git a/cmd/ext4.c b/cmd/ext4.c
index d2fa7f1db1..4791b69fd9 100644
--- a/cmd/ext4.c
+++ b/cmd/ext4.c
@@ -41,25 +41,23 @@
#include <usb.h>
#endif
-int do_ext4_size(cmd_tbl_t *cmdtp, int flag, int argc,
- char *const argv[])
+int do_ext4_size(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
return do_size(cmdtp, flag, argc, argv, FS_TYPE_EXT);
}
-int do_ext4_load(cmd_tbl_t *cmdtp, int flag, int argc,
- char *const argv[])
+int do_ext4_load(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
return do_load(cmdtp, flag, argc, argv, FS_TYPE_EXT);
}
-int do_ext4_ls(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_ext4_ls(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
return do_ls(cmdtp, flag, argc, argv, FS_TYPE_EXT);
}
#if defined(CONFIG_CMD_EXT4_WRITE)
-int do_ext4_write(cmd_tbl_t *cmdtp, int flag, int argc,
+int do_ext4_write(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
return do_save(cmdtp, flag, argc, argv, FS_TYPE_EXT);
diff --git a/cmd/fastboot.c b/cmd/fastboot.c
index 1b4215114d..ad5c064911 100644
--- a/cmd/fastboot.c
+++ b/cmd/fastboot.c
@@ -14,6 +14,7 @@
#include <net.h>
#include <usb.h>
#include <watchdog.h>
+#include <linux/stringify.h>
static int do_fastboot_udp(int argc, char *const argv[],
uintptr_t buf_addr, size_t buf_size)
@@ -93,7 +94,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 abce2f1e0c..b438ce16c9 100644
--- a/cmd/fat.c
+++ b/cmd/fat.c
@@ -8,11 +8,14 @@
* Boot support
*/
#include <common.h>
+#include <command.h>
#include <mapmem.h>
#include <fat.h>
#include <fs.h>
+#include <part.h>
+#include <asm/cache.h>
-int do_fat_size(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_fat_size(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
return do_size(cmdtp, flag, argc, argv, FS_TYPE_FAT);
}
@@ -25,7 +28,7 @@ U_BOOT_CMD(
" and determine its size."
);
-int do_fat_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_fat_fsload(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
return do_load(cmdtp, flag, argc, argv, FS_TYPE_FAT);
}
@@ -46,7 +49,8 @@ U_BOOT_CMD(
" be printed and performance will suffer for the load."
);
-static int do_fat_ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_fat_ls(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
return do_ls(cmdtp, flag, argc, argv, FS_TYPE_FAT);
}
@@ -58,12 +62,12 @@ 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;
- disk_partition_t info;
+ struct disk_partition info;
if (argc < 2) {
printf("usage: fatinfo <interface> [<dev[:part]>]\n");
@@ -91,8 +95,8 @@ U_BOOT_CMD(
);
#ifdef CONFIG_FAT_WRITE
-static int do_fat_fswrite(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+static int do_fat_fswrite(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
loff_t size;
int ret;
@@ -100,7 +104,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;
@@ -146,7 +150,8 @@ U_BOOT_CMD(
" to 'dev' on 'interface'"
);
-static int do_fat_rm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_fat_rm(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
return do_rm(cmdtp, flag, argc, argv, FS_TYPE_FAT);
}
@@ -158,8 +163,8 @@ U_BOOT_CMD(
" - delete a file from 'dev' on 'interface'"
);
-static int do_fat_mkdir(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_fat_mkdir(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
return do_mkdir(cmdtp, flag, argc, argv, FS_TYPE_FAT);
}
diff --git a/cmd/fdt.c b/cmd/fdt.c
index 36cc726540..99b1b5b3fc 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>
@@ -87,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;
@@ -111,7 +112,7 @@ static int fdt_get_header_value(int argc, char * const argv[])
/*
* Flattened Device Tree command, see the help for parameter definitions.
*/
-static int do_fdt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_fdt(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
if (argc < 2)
return CMD_RET_USAGE;
diff --git a/cmd/fitupd.c b/cmd/fitupd.c
index 1e5edd9f9b..f6270d9c15 100644
--- a/cmd/fitupd.c
+++ b/cmd/fitupd.c
@@ -12,7 +12,8 @@
#error "CONFIG_UPDATE_TFTP required"
#endif
-static int do_fitupd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_fitupd(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
ulong addr = 0UL;
diff --git a/cmd/flash.c b/cmd/flash.c
index cd1758d7e2..240871e808 100644
--- a/cmd/flash.c
+++ b/cmd/flash.c
@@ -9,6 +9,8 @@
*/
#include <common.h>
#include <command.h>
+#include <log.h>
+#include <uuid.h>
#if defined(CONFIG_CMD_MTDPARTS)
#include <jffs2/jffs2.h>
@@ -88,7 +90,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;
@@ -268,7 +270,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;
@@ -279,7 +282,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,12 +294,13 @@ 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;
}
-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;
@@ -316,7 +320,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 +374,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 +394,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;
@@ -408,14 +412,14 @@ 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);
- rcode = flash_erase (info, s_first[bank], s_last[bank]);
+ 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]);
}
}
if (rcode == 0)
@@ -429,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
@@ -526,7 +531,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 +586,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;
@@ -606,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 b1c7b5453b..8ae1c936fb 100644
--- a/cmd/fpga.c
+++ b/cmd/fpga.c
@@ -13,6 +13,8 @@
#include <fpga.h>
#include <fs.h>
#include <gzip.h>
+#include <image.h>
+#include <log.h>
#include <malloc.h>
static long do_fpga_get_device(char *arg)
@@ -33,7 +35,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;
@@ -65,7 +68,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;
@@ -117,7 +120,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;
@@ -140,16 +143,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;
@@ -163,8 +166,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;
@@ -178,8 +181,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;
@@ -194,8 +197,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;
@@ -211,8 +214,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;
@@ -229,8 +232,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;
@@ -362,7 +365,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, "", ""),
@@ -384,10 +387,10 @@ static cmd_tbl_t fpga_commands[] = {
#endif
};
-static int do_fpga_wrapper(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_fpga_wrapper(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
- cmd_tbl_t *fpga_cmd;
+ struct cmd_tbl *fpga_cmd;
int ret;
if (argc < 2)
diff --git a/cmd/fpgad.c b/cmd/fpgad.c
index 0d55453eaa..fb2fe63e78 100644
--- a/cmd/fpgad.c
+++ b/cmd/fpgad.c
@@ -25,7 +25,7 @@ static uint dp_last_length = 0x40;
* fpgad {fpga} {addr} {len}
*/
#define DISP_LINE_LEN 16
-int do_fpga_md(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_fpga_md(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
unsigned int k;
unsigned int fpga;
diff --git a/cmd/fs.c b/cmd/fs.c
index db74767b7b..3a0c465c15 100644
--- a/cmd/fs.c
+++ b/cmd/fs.c
@@ -9,7 +9,8 @@
#include <command.h>
#include <fs.h>
-static int do_size_wrapper(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_size_wrapper(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
return do_size(cmdtp, flag, argc, argv, FS_TYPE_ANY);
}
@@ -22,8 +23,8 @@ U_BOOT_CMD(
" and determine its size."
);
-static int do_load_wrapper(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_load_wrapper(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
return do_load(cmdtp, flag, argc, argv, FS_TYPE_ANY);
}
@@ -40,8 +41,8 @@ U_BOOT_CMD(
" If 'pos' is 0 or omitted, the file is read from the start."
)
-static int do_save_wrapper(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_save_wrapper(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
return do_save(cmdtp, flag, argc, argv, FS_TYPE_ANY);
}
@@ -57,8 +58,8 @@ U_BOOT_CMD(
" If 'pos' is 0 or omitted, the file is written from the start."
)
-static int do_ls_wrapper(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_ls_wrapper(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
return do_ls(cmdtp, flag, argc, argv, FS_TYPE_ANY);
}
@@ -71,8 +72,8 @@ U_BOOT_CMD(
" device type 'interface' instance 'dev'."
)
-static int do_ln_wrapper(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_ln_wrapper(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
return do_ln(cmdtp, flag, argc, argv, FS_TYPE_ANY);
}
@@ -85,8 +86,8 @@ U_BOOT_CMD(
" device type 'interface' instance 'dev'."
)
-static int do_fstype_wrapper(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_fstype_wrapper(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
return do_fs_type(cmdtp, flag, argc, argv);
}
diff --git a/cmd/fs_uuid.c b/cmd/fs_uuid.c
index 02ae9b7f3c..5dc94aa640 100644
--- a/cmd/fs_uuid.c
+++ b/cmd/fs_uuid.c
@@ -9,8 +9,8 @@
#include <command.h>
#include <fs.h>
-static int do_fs_uuid_wrapper(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+static int do_fs_uuid_wrapper(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
return do_fs_uuid(cmdtp, flag, argc, argv, FS_TYPE_ANY);
}
diff --git a/cmd/fuse.c b/cmd/fuse.c
index 42d74fa883..e001619d17 100644
--- a/cmd/fuse.c
+++ b/cmd/fuse.c
@@ -40,7 +40,8 @@ static int confirm_prog(void)
return 0;
}
-static int do_fuse(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_fuse(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
const char *op = argc >= 2 ? argv[1] : NULL;
int confirmed = argc >= 3 && !strcmp(argv[2], "-y");
diff --git a/cmd/gettime.c b/cmd/gettime.c
index 863bd87590..2e74e02b49 100644
--- a/cmd/gettime.c
+++ b/cmd/gettime.c
@@ -14,8 +14,8 @@
#include <common.h>
#include <command.h>
-static int do_gettime(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_gettime(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
unsigned long int val = get_timer(0);
diff --git a/cmd/gpio.c b/cmd/gpio.c
index 408a942455..4fdb3135fc 100644
--- a/cmd/gpio.c
+++ b/cmd/gpio.c
@@ -10,6 +10,7 @@
#include <command.h>
#include <errno.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <asm/gpio.h>
#include <linux/err.h>
@@ -117,7 +118,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 b8d11c167d..df759416c8 100644
--- a/cmd/gpt.c
+++ b/cmd/gpt.c
@@ -11,11 +11,15 @@
*/
#include <common.h>
+#include <blk.h>
#include <env.h>
+#include <log.h>
#include <malloc.h>
#include <command.h>
+#include <part.h>
#include <part_efi.h>
#include <exports.h>
+#include <uuid.h>
#include <linux/ctype.h>
#include <div64.h>
#include <memalign.h>
@@ -188,7 +192,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));
@@ -309,7 +314,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;
/*
@@ -374,14 +379,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;
@@ -439,7 +444,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;
@@ -556,7 +561,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,
@@ -583,7 +588,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;
@@ -639,7 +644,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;
@@ -790,7 +795,7 @@ static int do_rename_gpt_parts(struct blk_desc *dev_desc, char *subcomm,
*
* @return zero on success; otherwise error
*/
-static int do_gpt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_gpt(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
int ret = CMD_RET_SUCCESS;
int dev = 0;
diff --git a/cmd/hash.c b/cmd/hash.c
index dff943ac9f..e163cd6774 100644
--- a/cmd/hash.c
+++ b/cmd/hash.c
@@ -14,7 +14,8 @@
#include <hash.h>
#include <linux/ctype.h>
-static int do_hash(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_hash(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
char *s;
int flags = HASH_FLAG_ENV;
diff --git a/cmd/help.c b/cmd/help.c
index a1a0b99b6f..8d67d977bf 100644
--- a/cmd/help.c
+++ b/cmd/help.c
@@ -7,11 +7,12 @@
#include <common.h>
#include <command.h>
-static int do_help(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_help(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
#ifdef CONFIG_CMDLINE
- cmd_tbl_t *start = ll_entry_start(cmd_tbl_t, cmd);
- const int len = ll_entry_count(cmd_tbl_t, cmd);
+ struct cmd_tbl *start = ll_entry_start(struct cmd_tbl, cmd);
+ const int len = ll_entry_count(struct cmd_tbl, cmd);
return _do_help(start, len, cmdtp, flag, argc, argv);
#else
return 0;
@@ -29,7 +30,7 @@ U_BOOT_CMD(
#ifdef CONFIG_CMDLINE
/* This does not use the U_BOOT_CMD macro as ? can't be used in symbol names */
-ll_entry_declare(cmd_tbl_t, question_mark, cmd) = {
+ll_entry_declare(struct cmd_tbl, question_mark, cmd) = {
"?", CONFIG_SYS_MAXARGS, cmd_always_repeatable, do_help,
"alias for 'help'",
#ifdef CONFIG_SYS_LONGHELP
diff --git a/cmd/host.c b/cmd/host.c
index eefc4f255e..cd9c9677f0 100644
--- a/cmd/host.c
+++ b/cmd/host.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <command.h>
#include <dm.h>
#include <fs.h>
#include <part.h>
@@ -13,32 +14,32 @@
static int host_curr_device = -1;
-static int do_host_load(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_host_load(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
return do_load(cmdtp, flag, argc, argv, FS_TYPE_SANDBOX);
}
-static int do_host_ls(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_host_ls(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
return do_ls(cmdtp, flag, argc, argv, FS_TYPE_SANDBOX);
}
-static int do_host_size(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_host_size(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
return do_size(cmdtp, flag, argc, argv, FS_TYPE_SANDBOX);
}
-static int do_host_save(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_host_save(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
return do_save(cmdtp, flag, argc, argv, FS_TYPE_SANDBOX);
}
-static int do_host_bind(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_host_bind(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
if (argc < 2 || argc > 3)
return CMD_RET_USAGE;
@@ -53,8 +54,8 @@ static int do_host_bind(cmd_tbl_t *cmdtp, int flag, int argc,
return host_dev_bind(dev, file);
}
-static int do_host_info(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_host_info(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
if (argc < 1 || argc > 2)
return CMD_RET_USAGE;
@@ -100,8 +101,8 @@ static int do_host_info(cmd_tbl_t *cmdtp, int flag, int argc,
return 0;
}
-static int do_host_dev(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_host_dev(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int dev;
char *ep;
@@ -140,7 +141,7 @@ static int do_host_dev(cmd_tbl_t *cmdtp, int flag, int argc,
return 0;
}
-static cmd_tbl_t cmd_host_sub[] = {
+static struct cmd_tbl cmd_host_sub[] = {
U_BOOT_CMD_MKENT(load, 7, 0, do_host_load, "", ""),
U_BOOT_CMD_MKENT(ls, 3, 0, do_host_ls, "", ""),
U_BOOT_CMD_MKENT(save, 6, 0, do_host_save, "", ""),
@@ -150,10 +151,10 @@ static cmd_tbl_t cmd_host_sub[] = {
U_BOOT_CMD_MKENT(dev, 0, 1, do_host_dev, "", ""),
};
-static int do_host(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_host(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
- cmd_tbl_t *c;
+ struct cmd_tbl *c;
/* Skip past 'host' */
argc--;
diff --git a/cmd/i2c.c b/cmd/i2c.c
index 43a76299b3..cc01119b21 100644
--- a/cmd/i2c.c
+++ b/cmd/i2c.c
@@ -73,9 +73,11 @@
#include <edid.h>
#include <errno.h>
#include <i2c.h>
+#include <log.h>
#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.
@@ -288,7 +290,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 +344,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 +436,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 +466,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 +512,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 +632,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 +719,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 +804,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 +953,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 +1029,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 +1156,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 +1659,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 +1726,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 +1813,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 +1864,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 +1908,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 +1924,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 +1939,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 +1959,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 +2010,9 @@ static __maybe_unused void i2c_reloc(void)
* Returns zero on success, CMD_RET_USAGE in case of misuse and negative
* on error.
*/
-static int do_i2c(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+static int do_i2c(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
- cmd_tbl_t *c;
+ struct cmd_tbl *c;
#ifdef CONFIG_NEEDS_MANUAL_RELOC
i2c_reloc();
diff --git a/cmd/ide.c b/cmd/ide.c
index 2f93ba7904..b78c38e159 100644
--- a/cmd/ide.c
+++ b/cmd/ide.c
@@ -27,7 +27,7 @@
/* Current I/O Device */
static int curr_device;
-int do_ide(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_ide(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
if (argc == 2) {
if (strncmp(argv[1], "res", 3) == 0) {
@@ -40,7 +40,7 @@ int do_ide(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
return blk_common_cmd(argc, argv, IF_TYPE_IDE, &curr_device);
}
-int do_diskboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_diskboot(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
return common_diskboot(cmdtp, "ide", argc, argv);
}
diff --git a/cmd/ini.c b/cmd/ini.c
index 0c425262d0..c075be623c 100644
--- a/cmd/ini.c
+++ b/cmd/ini.c
@@ -226,7 +226,7 @@ static int ini_handler(void *user, char *section, char *name, char *value)
return 1;
}
-static int do_ini(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_ini(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
const char *section;
char *file_address;
diff --git a/cmd/io.c b/cmd/io.c
index 7fee9674a2..c7e964153b 100644
--- a/cmd/io.c
+++ b/cmd/io.c
@@ -24,7 +24,7 @@ static ulong base_address;
* Syntax:
* iod{.b, .w, .l} {addr}
*/
-int do_io_iod(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_io_iod(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
ulong addr, length, bytes;
u8 buf[DISP_LINE_LEN];
@@ -90,7 +90,7 @@ int do_io_iod(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
return 0;
}
-int do_io_iow(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_io_iow(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
ulong addr, val;
int size;
diff --git a/cmd/iotrace.c b/cmd/iotrace.c
index fa6c68b198..652ebefb89 100644
--- a/cmd/iotrace.c
+++ b/cmd/iotrace.c
@@ -55,7 +55,7 @@ static void do_print_trace(void)
}
}
-static int do_set_buffer(int argc, char * const argv[])
+static int do_set_buffer(int argc, char *const argv[])
{
ulong addr = 0, size = 0;
@@ -71,7 +71,7 @@ static int do_set_buffer(int argc, char * const argv[])
return 0;
}
-static int do_set_region(int argc, char * const argv[])
+static int do_set_region(int argc, char *const argv[])
{
ulong addr = 0, size = 0;
@@ -87,7 +87,7 @@ static int do_set_region(int argc, char * const argv[])
return 0;
}
-int do_iotrace(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_iotrace(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
const char *cmd = argc < 2 ? NULL : argv[1];
diff --git a/cmd/irq.c b/cmd/irq.c
index 52d06b3eed..1d3e28cb3c 100644
--- a/cmd/irq.c
+++ b/cmd/irq.c
@@ -8,8 +8,8 @@
#include <command.h>
#include <irq_func.h>
-static int do_interrupts(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_interrupts(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
if (argc != 2)
@@ -31,7 +31,7 @@ U_BOOT_CMD(
);
/* Implemented in $(CPU)/interrupts.c */
-int do_irqinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+int do_irqinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
U_BOOT_CMD(
irqinfo, 1, 1, do_irqinfo,
diff --git a/cmd/itest.c b/cmd/itest.c
index e21e1f1b1b..a0cf4bee04 100644
--- a/cmd/itest.c
+++ b/cmd/itest.c
@@ -175,7 +175,8 @@ static int binary_test(char *op, char *arg1, char *arg2, int w)
}
/* command line interface to the shell test */
-static int do_itest(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_itest(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int value, w;
diff --git a/cmd/jffs2.c b/cmd/jffs2.c
index da2580d85d..9540988e33 100644
--- a/cmd/jffs2.c
+++ b/cmd/jffs2.c
@@ -73,9 +73,11 @@
#include <common.h>
#include <command.h>
#include <env.h>
+#include <flash.h>
#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>
@@ -471,7 +473,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;
@@ -533,7 +536,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;
@@ -571,7 +574,8 @@ int do_jffs2_ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
* @param argv arguments list
* @return 0 on success, 1 otherwise
*/
-int do_jffs2_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_jffs2_fsinfo(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct part_info *part;
char *fsname;
diff --git a/cmd/led.c b/cmd/led.c
index 50ffa509ab..9433fa886c 100644
--- a/cmd/led.c
+++ b/cmd/led.c
@@ -71,7 +71,7 @@ static int list_leds(void)
return 0;
}
-int do_led(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_led(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
enum led_state_t cmd;
const char *led_label;
diff --git a/cmd/legacy_led.c b/cmd/legacy_led.c
index 7d40d8db58..86cd969e40 100644
--- a/cmd/legacy_led.c
+++ b/cmd/legacy_led.c
@@ -85,7 +85,7 @@ void __weak __led_blink(led_id_t mask, int freq)
{
}
-int do_legacy_led(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_legacy_led(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
int i, match = 0;
enum led_cmd cmd;
diff --git a/cmd/license.c b/cmd/license.c
index c5b04c331b..15411b5a92 100644
--- a/cmd/license.c
+++ b/cmd/license.c
@@ -12,7 +12,8 @@
#include "license_data_gz.h"
#include "license_data_size.h"
-static int do_license(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_license(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
char *dst;
unsigned long len = data_size;
diff --git a/cmd/load.c b/cmd/load.c
index fab30fe894..63a9414543 100644
--- a/cmd/load.c
+++ b/cmd/load.c
@@ -19,6 +19,8 @@
#include <exports.h>
#include <serial.h>
#include <xyzModem.h>
+#include <asm/cache.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -40,8 +42,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;
@@ -241,7 +243,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;
@@ -418,8 +421,8 @@ static int his_pad_count; /* number of pad chars he needs */
static char his_pad_char; /* pad chars he needs */
static char his_quote; /* quote chars he'll use */
-static int do_load_serial_bin(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_load_serial_bin(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
ulong offset = 0;
ulong addr;
diff --git a/cmd/log.c b/cmd/log.c
index 1e3936aeeb..664f7bd7ac 100644
--- a/cmd/log.c
+++ b/cmd/log.c
@@ -11,8 +11,8 @@
static char log_fmt_chars[LOGF_COUNT] = "clFLfm";
-static int do_log_level(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_log_level(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
if (argc > 1)
gd->default_log_level = simple_strtol(argv[1], NULL, 10);
@@ -22,8 +22,8 @@ static int do_log_level(cmd_tbl_t *cmdtp, int flag, int argc,
return 0;
}
-static int do_log_format(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_log_format(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int i;
@@ -58,7 +58,8 @@ static int do_log_format(cmd_tbl_t *cmdtp, int flag, int argc,
return 0;
}
-static int do_log_rec(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_log_rec(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
enum log_category_t cat;
enum log_level_t level;
@@ -94,7 +95,7 @@ static int do_log_rec(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return 0;
}
-static cmd_tbl_t log_sub[] = {
+static struct cmd_tbl log_sub[] = {
U_BOOT_CMD_MKENT(level, CONFIG_SYS_MAXARGS, 1, do_log_level, "", ""),
#ifdef CONFIG_LOG_TEST
U_BOOT_CMD_MKENT(test, 2, 1, do_log_test, "", ""),
@@ -103,9 +104,9 @@ static cmd_tbl_t log_sub[] = {
U_BOOT_CMD_MKENT(rec, CONFIG_SYS_MAXARGS, 1, do_log_rec, "", ""),
};
-static int do_log(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_log(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
- cmd_tbl_t *cp;
+ struct cmd_tbl *cp;
if (argc < 2)
return CMD_RET_USAGE;
diff --git a/cmd/lzmadec.c b/cmd/lzmadec.c
index e3b9cc75ac..3b8db0a853 100644
--- a/cmd/lzmadec.c
+++ b/cmd/lzmadec.c
@@ -17,7 +17,8 @@
#include <lzma/LzmaTools.h>
-static int do_lzmadec(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_lzmadec(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
unsigned long src, dst;
SizeT src_len = ~0UL, dst_len = ~0UL;
diff --git a/cmd/mac.c b/cmd/mac.c
index 4227d10936..a39e1168a5 100644
--- a/cmd/mac.c
+++ b/cmd/mac.c
@@ -7,7 +7,8 @@
#include <common.h>
#include <command.h>
-extern int do_mac(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+extern int do_mac(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[]);
U_BOOT_CMD(
mac, 3, 1, do_mac,
diff --git a/cmd/md5sum.c b/cmd/md5sum.c
index 63cbae0364..5ae3ddf85f 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>
@@ -72,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;
@@ -135,7 +136,8 @@ int do_md5sum(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return 0;
}
#else
-static int do_md5sum(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_md5sum(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
unsigned long addr, len;
unsigned int i;
diff --git a/cmd/mdio.c b/cmd/mdio.c
index 22c8fbe856..c48bb51237 100644
--- a/cmd/mdio.c
+++ b/cmd/mdio.c
@@ -190,7 +190,8 @@ static int extract_phy_range(char *const argv[], int argc, struct mii_dev **bus,
}
/* ---------------------------------------------------------------- */
-static int do_mdio(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_mdio(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
char op[2];
int addrlo, addrhi, reglo, reghi, devadlo, devadhi;
diff --git a/cmd/mem.c b/cmd/mem.c
index 18f0510098..9b97f7bf69 100644
--- a/cmd/mem.c
+++ b/cmd/mem.c
@@ -18,14 +18,22 @@
#include <console.h>
#include <flash.h>
#include <hash.h>
+#include <log.h>
#include <mapmem.h>
+#include <rand.h>
#include <watchdog.h>
#include <asm/io.h>
+#include <linux/bitops.h>
#include <linux/compiler.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
-static int mod_mem(cmd_tbl_t *, int, int, int, char * const []);
+#ifndef CONFIG_SYS_MEMTEST_SCRATCH
+#define CONFIG_SYS_MEMTEST_SCRATCH 0
+#endif
+
+static int mod_mem(struct cmd_tbl *, int, int, int, char * const []);
/* Display values from last command.
* Memory modify remembered values are different from display memory.
@@ -42,7 +50,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;
@@ -92,16 +101,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;
@@ -162,7 +175,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;
@@ -177,7 +191,7 @@ static int do_mem_mdc(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
/* delay for <count> ms... */
for (i=0; i<count; i++)
- udelay (1000);
+ udelay(1000);
/* check for ctrl-c to abort... */
if (ctrlc()) {
@@ -189,7 +203,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;
@@ -204,7 +219,7 @@ static int do_mem_mwc(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
/* delay for <count> ms... */
for (i=0; i<count; i++)
- udelay (1000);
+ udelay(1000);
/* check for ctrl-c to abort... */
if (ctrlc()) {
@@ -217,7 +232,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;
@@ -297,7 +313,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;
@@ -355,8 +372,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.
@@ -369,8 +386,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;
@@ -467,8 +484,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;
@@ -914,8 +931,8 @@ static ulong mem_test_quick(vu_long *buf, ulong start_addr, ulong end_addr,
* configured using CONFIG_SYS_ALT_MEMTEST. The complete test loops until
* interrupted by ctrl-c or by a failure of one of the sub-tests.
*/
-static int do_mem_mtest(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_mem_mtest(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
ulong start, end;
vu_long scratch_space;
@@ -1002,7 +1019,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
@@ -1106,7 +1124,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;
@@ -1131,7 +1150,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
@@ -1259,8 +1279,8 @@ U_BOOT_CMD(
#endif
#ifdef CONFIG_CMD_MEMINFO
-static int do_mem_info(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_mem_info(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
puts("DRAM: ");
print_size(gd->ram_size, "\n");
diff --git a/cmd/mfsl.c b/cmd/mfsl.c
index 583762a345..31f5b36ade 100644
--- a/cmd/mfsl.c
+++ b/cmd/mfsl.c
@@ -14,7 +14,7 @@
#include <command.h>
#include <asm/asm.h>
-int do_frd (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+int do_frd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
unsigned int fslnum;
unsigned int num;
@@ -169,7 +169,7 @@ int do_frd (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
return 0;
}
-int do_fwr (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+int do_fwr(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
unsigned int fslnum;
unsigned int num;
@@ -324,7 +324,7 @@ int do_fwr (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
}
-int do_rspr (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+int do_rspr(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
unsigned int reg = 0;
unsigned int val = 0;
diff --git a/cmd/mii.c b/cmd/mii.c
index 23ee1e6cfa..b52a55dc33 100644
--- a/cmd/mii.c
+++ b/cmd/mii.c
@@ -277,7 +277,7 @@ static void extract_range(
}
/* ---------------------------------------------------------------- */
-static int do_mii(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_mii(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
char op[2];
unsigned char addrlo, addrhi, reglo, reghi;
diff --git a/cmd/misc.c b/cmd/misc.c
index a1eef72a6c..20ab943494 100644
--- a/cmd/misc.c
+++ b/cmd/misc.c
@@ -10,8 +10,10 @@
#include <common.h>
#include <command.h>
#include <console.h>
+#include <linux/delay.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 +60,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 6142ec8e20..97e5d91859 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>
@@ -140,7 +142,9 @@ static struct mmc *init_mmc_device(int dev, bool force_init)
return mmc;
}
-static int do_mmcinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+
+static int do_mmcinfo(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct mmc *mmc;
@@ -173,8 +177,9 @@ static int confirm_key_prog(void)
puts("Authentication key programming aborted\n");
return 0;
}
-static int do_mmcrpmb_key(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+
+static int do_mmcrpmb_key(struct cmd_tbl *cmdtp, int flag,
+ int argc, char *const argv[])
{
void *key_addr;
struct mmc *mmc = find_mmc_device(curr_device);
@@ -191,8 +196,9 @@ static int do_mmcrpmb_key(cmd_tbl_t *cmdtp, int flag,
}
return CMD_RET_SUCCESS;
}
-static int do_mmcrpmb_read(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+
+static int do_mmcrpmb_read(struct cmd_tbl *cmdtp, int flag,
+ int argc, char *const argv[])
{
u16 blk, cnt;
void *addr;
@@ -219,8 +225,9 @@ static int do_mmcrpmb_read(cmd_tbl_t *cmdtp, int flag,
return CMD_RET_FAILURE;
return CMD_RET_SUCCESS;
}
-static int do_mmcrpmb_write(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+
+static int do_mmcrpmb_write(struct cmd_tbl *cmdtp, int flag,
+ int argc, char *const argv[])
{
u16 blk, cnt;
void *addr;
@@ -245,8 +252,9 @@ static int do_mmcrpmb_write(cmd_tbl_t *cmdtp, int flag,
return CMD_RET_FAILURE;
return CMD_RET_SUCCESS;
}
-static int do_mmcrpmb_counter(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+
+static int do_mmcrpmb_counter(struct cmd_tbl *cmdtp, int flag,
+ int argc, char *const argv[])
{
unsigned long counter;
struct mmc *mmc = find_mmc_device(curr_device);
@@ -257,17 +265,17 @@ static int do_mmcrpmb_counter(cmd_tbl_t *cmdtp, int flag,
return CMD_RET_SUCCESS;
}
-static cmd_tbl_t cmd_rpmb[] = {
+static struct cmd_tbl cmd_rpmb[] = {
U_BOOT_CMD_MKENT(key, 2, 0, do_mmcrpmb_key, "", ""),
U_BOOT_CMD_MKENT(read, 5, 1, do_mmcrpmb_read, "", ""),
U_BOOT_CMD_MKENT(write, 5, 0, do_mmcrpmb_write, "", ""),
U_BOOT_CMD_MKENT(counter, 1, 1, do_mmcrpmb_counter, "", ""),
};
-static int do_mmcrpmb(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+static int do_mmcrpmb(struct cmd_tbl *cmdtp, int flag,
+ int argc, char *const argv[])
{
- cmd_tbl_t *cp;
+ struct cmd_tbl *cp;
struct mmc *mmc;
char original_part;
int ret;
@@ -314,8 +322,8 @@ static int do_mmcrpmb(cmd_tbl_t *cmdtp, int flag,
}
#endif
-static int do_mmc_read(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+static int do_mmc_read(struct cmd_tbl *cmdtp, int flag,
+ int argc, char *const argv[])
{
struct mmc *mmc;
u32 blk, cnt, n;
@@ -356,8 +364,8 @@ static lbaint_t mmc_sparse_reserve(struct sparse_storage *info,
return blkcnt;
}
-static int do_mmc_sparse_write(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+static int do_mmc_sparse_write(struct cmd_tbl *cmdtp, int flag,
+ int argc, char *const argv[])
{
struct sparse_storage sparse;
struct blk_desc *dev_desc;
@@ -407,8 +415,8 @@ static int do_mmc_sparse_write(cmd_tbl_t *cmdtp, int flag,
#endif
#if CONFIG_IS_ENABLED(MMC_WRITE)
-static int do_mmc_write(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+static int do_mmc_write(struct cmd_tbl *cmdtp, int flag,
+ int argc, char *const argv[])
{
struct mmc *mmc;
u32 blk, cnt, n;
@@ -437,8 +445,9 @@ static int do_mmc_write(cmd_tbl_t *cmdtp, int flag,
return (n == cnt) ? CMD_RET_SUCCESS : CMD_RET_FAILURE;
}
-static int do_mmc_erase(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+
+static int do_mmc_erase(struct cmd_tbl *cmdtp, int flag,
+ int argc, char *const argv[])
{
struct mmc *mmc;
u32 blk, cnt, n;
@@ -467,8 +476,8 @@ static int do_mmc_erase(cmd_tbl_t *cmdtp, int flag,
}
#endif
-static int do_mmc_rescan(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+static int do_mmc_rescan(struct cmd_tbl *cmdtp, int flag,
+ int argc, char *const argv[])
{
struct mmc *mmc;
@@ -478,8 +487,9 @@ static int do_mmc_rescan(cmd_tbl_t *cmdtp, int flag,
return CMD_RET_SUCCESS;
}
-static int do_mmc_part(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+
+static int do_mmc_part(struct cmd_tbl *cmdtp, int flag,
+ int argc, char *const argv[])
{
struct blk_desc *mmc_dev;
struct mmc *mmc;
@@ -497,8 +507,9 @@ static int do_mmc_part(cmd_tbl_t *cmdtp, int flag,
puts("get mmc type error!\n");
return CMD_RET_FAILURE;
}
-static int do_mmc_dev(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+
+static int do_mmc_dev(struct cmd_tbl *cmdtp, int flag,
+ int argc, char *const argv[])
{
int dev, part = 0, ret;
struct mmc *mmc;
@@ -538,8 +549,9 @@ static int do_mmc_dev(cmd_tbl_t *cmdtp, int flag,
return CMD_RET_SUCCESS;
}
-static int do_mmc_list(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+
+static int do_mmc_list(struct cmd_tbl *cmdtp, int flag,
+ int argc, char *const argv[])
{
print_mmc_devices('\n');
return CMD_RET_SUCCESS;
@@ -547,7 +559,7 @@ static int do_mmc_list(cmd_tbl_t *cmdtp, int flag,
#if CONFIG_IS_ENABLED(MMC_HW_PARTITIONING)
static int parse_hwpart_user(struct mmc_hwpart_conf *pconf,
- int argc, char * const argv[])
+ int argc, char *const argv[])
{
int i = 0;
@@ -581,7 +593,7 @@ static int parse_hwpart_user(struct mmc_hwpart_conf *pconf,
}
static int parse_hwpart_gp(struct mmc_hwpart_conf *pconf, int pidx,
- int argc, char * const argv[])
+ int argc, char *const argv[])
{
int i;
@@ -614,8 +626,8 @@ static int parse_hwpart_gp(struct mmc_hwpart_conf *pconf, int pidx,
return i;
}
-static int do_mmc_hwpartition(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+static int do_mmc_hwpartition(struct cmd_tbl *cmdtp, int flag,
+ int argc, char *const argv[])
{
struct mmc *mmc;
struct mmc_hwpart_conf pconf = { };
@@ -698,8 +710,8 @@ static int do_mmc_hwpartition(cmd_tbl_t *cmdtp, int flag,
#endif
#ifdef CONFIG_SUPPORT_EMMC_BOOT
-static int do_mmc_bootbus(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+static int do_mmc_bootbus(struct cmd_tbl *cmdtp, int flag,
+ int argc, char *const argv[])
{
int dev;
struct mmc *mmc;
@@ -724,8 +736,9 @@ static int do_mmc_bootbus(cmd_tbl_t *cmdtp, int flag,
/* acknowledge to be sent during boot operation */
return mmc_set_boot_bus_width(mmc, width, reset, mode);
}
-static int do_mmc_boot_resize(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+
+static int do_mmc_boot_resize(struct cmd_tbl *cmdtp, int flag,
+ int argc, char *const argv[])
{
int dev;
struct mmc *mmc;
@@ -777,8 +790,8 @@ static int mmc_partconf_print(struct mmc *mmc)
return CMD_RET_SUCCESS;
}
-static int do_mmc_partconf(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+static int do_mmc_partconf(struct cmd_tbl *cmdtp, int flag,
+ int argc, char *const argv[])
{
int dev;
struct mmc *mmc;
@@ -808,8 +821,9 @@ static int do_mmc_partconf(cmd_tbl_t *cmdtp, int flag,
/* acknowledge to be sent during boot operation */
return mmc_set_part_conf(mmc, ack, part_num, access);
}
-static int do_mmc_rst_func(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+
+static int do_mmc_rst_func(struct cmd_tbl *cmdtp, int flag,
+ int argc, char *const argv[])
{
int dev;
struct mmc *mmc;
@@ -843,8 +857,8 @@ static int do_mmc_rst_func(cmd_tbl_t *cmdtp, int flag,
return mmc_set_rst_n_function(mmc, enable);
}
#endif
-static int do_mmc_setdsr(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+static int do_mmc_setdsr(struct cmd_tbl *cmdtp, int flag,
+ int argc, char *const argv[])
{
struct mmc *mmc;
u32 val;
@@ -872,8 +886,8 @@ static int do_mmc_setdsr(cmd_tbl_t *cmdtp, int flag,
}
#ifdef CONFIG_CMD_BKOPS_ENABLE
-static int do_mmc_bkops_enable(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+static int do_mmc_bkops_enable(struct cmd_tbl *cmdtp, int flag,
+ int argc, char *const argv[])
{
int dev;
struct mmc *mmc;
@@ -896,7 +910,7 @@ static int do_mmc_bkops_enable(cmd_tbl_t *cmdtp, int flag,
}
#endif
-static int do_mmc_boot_wp(cmd_tbl_t *cmdtp, int flag,
+static int do_mmc_boot_wp(struct cmd_tbl *cmdtp, int flag,
int argc, char * const argv[])
{
int err;
@@ -916,7 +930,7 @@ static int do_mmc_boot_wp(cmd_tbl_t *cmdtp, int flag,
return CMD_RET_SUCCESS;
}
-static cmd_tbl_t cmd_mmc[] = {
+static struct cmd_tbl cmd_mmc[] = {
U_BOOT_CMD_MKENT(info, 1, 0, do_mmcinfo, "", ""),
U_BOOT_CMD_MKENT(read, 4, 1, do_mmc_read, "", ""),
U_BOOT_CMD_MKENT(wp, 1, 0, do_mmc_boot_wp, "", ""),
@@ -949,9 +963,10 @@ static cmd_tbl_t cmd_mmc[] = {
#endif
};
-static int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_mmcops(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
- cmd_tbl_t *cp;
+ struct cmd_tbl *cp;
cp = find_cmd_tbl(argv[1], cmd_mmc, ARRAY_SIZE(cmd_mmc));
diff --git a/cmd/mp.c b/cmd/mp.c
index 4c8f5fc3fa..c2b5235a37 100644
--- a/cmd/mp.c
+++ b/cmd/mp.c
@@ -26,7 +26,7 @@ static int cpu_status_all(void)
}
static int
-cpu_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+cpu_cmd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
unsigned long cpuid;
diff --git a/cmd/mtd.c b/cmd/mtd.c
index f407c5e445..485a963bdd 100644
--- a/cmd/mtd.c
+++ b/cmd/mtd.c
@@ -195,8 +195,8 @@ static bool mtd_oob_write_is_empty(struct mtd_oob_ops *op)
return true;
}
-static int do_mtd_list(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_mtd_list(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct mtd_info *mtd;
int dev_nb = 0;
@@ -240,7 +240,8 @@ static int mtd_special_write_oob(struct mtd_info *mtd, u64 off,
return ret;
}
-static int do_mtd_io(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_mtd_io(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
bool dump, read, raw, woob, write_empty_pages, has_pages = false;
u64 start_off, off, len, remaining, default_len;
@@ -382,8 +383,8 @@ out_put_mtd:
return ret;
}
-static int do_mtd_erase(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_mtd_erase(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct erase_info erase_op = {};
struct mtd_info *mtd;
@@ -454,8 +455,8 @@ out_put_mtd:
return ret;
}
-static int do_mtd_bad(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_mtd_bad(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct mtd_info *mtd;
loff_t off;
@@ -485,7 +486,7 @@ out_put_mtd:
}
#ifdef CONFIG_AUTO_COMPLETE
-static int mtd_name_complete(int argc, char * const argv[], char last_char,
+static int mtd_name_complete(int argc, char *const argv[], char last_char,
int maxv, char *cmdv[])
{
int len = 0, n_found = 0;
diff --git a/cmd/mtdparts.c b/cmd/mtdparts.c
index b40c2afadd..5220142b9a 100644
--- a/cmd/mtdparts.c
+++ b/cmd/mtdparts.c
@@ -73,6 +73,7 @@
#include <common.h>
#include <command.h>
#include <env.h>
+#include <log.h>
#include <malloc.h>
#include <jffs2/load_kernel.h>
#include <linux/list.h>
@@ -1915,7 +1916,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 +1955,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 ef53153c46..a27b0df8ae 100644
--- a/cmd/mvebu/bubt.c
+++ b/cmd/mvebu/bubt.c
@@ -8,7 +8,9 @@
#include <common.h>
#include <command.h>
#include <env.h>
+#include <flash.h>
#include <image.h>
+#include <net.h>
#include <vsprintf.h>
#include <errno.h>
#include <dm.h>
@@ -827,7 +829,7 @@ else
#endif
#endif /* DEFAULT_BUBT_DST */
-int do_bubt_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bubt_cmd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
struct bubt_dev *src, *dst;
size_t image_size;
diff --git a/cmd/nand.c b/cmd/nand.c
index 4de6892a01..92d039af8f 100644
--- a/cmd/nand.c
+++ b/cmd/nand.c
@@ -20,7 +20,9 @@
*/
#include <common.h>
+#include <bootstage.h>
#include <image.h>
+#include <asm/cache.h>
#include <linux/mtd/mtd.h>
#include <command.h>
#include <console.h>
@@ -187,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)];
@@ -374,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;
@@ -843,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;
@@ -931,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 1b724cc570..25390b0474 100644
--- a/cmd/net.c
+++ b/cmd/net.c
@@ -8,15 +8,17 @@
* Boot support
*/
#include <common.h>
+#include <bootstage.h>
#include <command.h>
#include <env.h>
#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);
}
@@ -29,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;
@@ -47,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);
}
@@ -60,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);
}
@@ -77,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);
}
@@ -90,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);
}
@@ -103,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);
}
@@ -176,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;
@@ -272,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;
@@ -320,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;
@@ -343,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;
@@ -384,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;
@@ -430,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 966c134059..08d49df220 100644
--- a/cmd/nvedit.c
+++ b/cmd/nvedit.c
@@ -29,10 +29,13 @@
#include <console.h>
#include <env.h>
#include <env_internal.h>
+#include <log.h>
+#include <net.h>
#include <search.h>
#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>
@@ -120,8 +123,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;
@@ -162,8 +165,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;
@@ -222,7 +225,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;
@@ -378,7 +381,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;
@@ -390,7 +394,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;
@@ -508,7 +512,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;
@@ -576,7 +581,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",
@@ -618,8 +623,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;
@@ -763,8 +768,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;
}
@@ -776,8 +781,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;
}
@@ -807,8 +812,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;
@@ -845,8 +850,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;
@@ -926,8 +931,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;
@@ -1059,8 +1064,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;
@@ -1220,8 +1225,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;
@@ -1277,8 +1282,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;
@@ -1296,7 +1301,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
@@ -1346,9 +1351,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 6f69a84fea..29cad38e19 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>
/*
@@ -137,7 +138,7 @@ out:
*
* Show information encoded in named UEFI variables
*/
-static int efi_dump_vars(int argc, char * const argv[],
+static int efi_dump_vars(int argc, char *const argv[],
const efi_guid_t *guid, bool verbose)
{
u16 *var_name16, *p;
@@ -171,7 +172,7 @@ static int efi_dump_vars(int argc, char * const argv[],
return CMD_RET_SUCCESS;
}
-static bool match_name(int argc, char * const argv[], u16 *var_name16)
+static bool match_name(int argc, char *const argv[], u16 *var_name16)
{
char *buf, *p;
size_t buflen;
@@ -209,7 +210,7 @@ out:
*
* Show information encoded in all the UEFI variables
*/
-static int efi_dump_var_all(int argc, char * const argv[],
+static int efi_dump_var_all(int argc, char *const argv[],
const efi_guid_t *guid_p, bool verbose)
{
u16 *var_name16, *p;
@@ -274,7 +275,8 @@ static int efi_dump_var_all(int argc, char * const argv[],
* If one or more variable names are specified, show information
* named UEFI variables, otherwise show all the UEFI variables.
*/
-int do_env_print_efi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_env_print_efi(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
efi_guid_t guid;
const efi_guid_t *guid_p;
@@ -464,7 +466,8 @@ out:
* Encode values specified and set given UEFI variable.
* If no value is specified, delete the variable.
*/
-int do_env_set_efi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_env_set_efi(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
char *var_name, *value, *ep;
ulong addr;
diff --git a/cmd/nvme.c b/cmd/nvme.c
index 5da903bd52..e715c570a3 100644
--- a/cmd/nvme.c
+++ b/cmd/nvme.c
@@ -5,13 +5,15 @@
*/
#include <common.h>
+#include <blk.h>
#include <command.h>
#include <dm.h>
#include <nvme.h>
static int nvme_curr_dev;
-static int do_nvme(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_nvme(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int ret;
diff --git a/cmd/onenand.c b/cmd/onenand.c
index d97844fa7a..216458bb47 100644
--- a/cmd/onenand.c
+++ b/cmd/onenand.c
@@ -24,7 +24,7 @@ static struct mtd_info *mtd;
static loff_t next_ofs;
static loff_t skip_ofs;
-static int arg_off_size_onenand(int argc, char * const argv[], ulong *off,
+static int arg_off_size_onenand(int argc, char *const argv[], ulong *off,
size_t *size)
{
if (argc >= 1) {
@@ -358,13 +358,15 @@ static int onenand_dump(struct mtd_info *mtd, ulong off, int only_oob)
return 0;
}
-static int do_onenand_info(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+static int do_onenand_info(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
printf("%s\n", mtd->name);
return 0;
}
-static int do_onenand_bad(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+static int do_onenand_bad(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
ulong ofs;
@@ -379,7 +381,8 @@ static int do_onenand_bad(cmd_tbl_t * cmdtp, int flag, int argc, char * const ar
return 0;
}
-static int do_onenand_read(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+static int do_onenand_read(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
char *s;
int oob = 0;
@@ -408,7 +411,8 @@ static int do_onenand_read(cmd_tbl_t * cmdtp, int flag, int argc, char * const a
return ret == 0 ? 0 : 1;
}
-static int do_onenand_write(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+static int do_onenand_write(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
ulong addr, ofs;
size_t len;
@@ -434,7 +438,8 @@ static int do_onenand_write(cmd_tbl_t * cmdtp, int flag, int argc, char * const
return ret == 0 ? 0 : 1;
}
-static int do_onenand_erase(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+static int do_onenand_erase(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
ulong ofs;
int ret = 0;
@@ -470,7 +475,8 @@ static int do_onenand_erase(cmd_tbl_t * cmdtp, int flag, int argc, char * const
return ret == 0 ? 0 : 1;
}
-static int do_onenand_test(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+static int do_onenand_test(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
ulong ofs;
int ret = 0;
@@ -495,7 +501,8 @@ static int do_onenand_test(cmd_tbl_t * cmdtp, int flag, int argc, char * const a
return ret == 0 ? 0 : 1;
}
-static int do_onenand_dump(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+static int do_onenand_dump(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
ulong ofs;
int ret = 0;
@@ -515,7 +522,8 @@ static int do_onenand_dump(cmd_tbl_t * cmdtp, int flag, int argc, char * const a
return ret == 0 ? 1 : 0;
}
-static int do_onenand_markbad(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+static int do_onenand_markbad(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int ret = 0;
ulong addr;
@@ -545,7 +553,7 @@ static int do_onenand_markbad(cmd_tbl_t * cmdtp, int flag, int argc, char * cons
return ret;
}
-static cmd_tbl_t cmd_onenand_sub[] = {
+static struct cmd_tbl cmd_onenand_sub[] = {
U_BOOT_CMD_MKENT(info, 1, 0, do_onenand_info, "", ""),
U_BOOT_CMD_MKENT(bad, 1, 0, do_onenand_bad, "", ""),
U_BOOT_CMD_MKENT(read, 4, 0, do_onenand_read, "", ""),
@@ -563,9 +571,10 @@ void onenand_reloc(void) {
}
#endif
-static int do_onenand(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+static int do_onenand(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
- cmd_tbl_t *c;
+ struct cmd_tbl *c;
if (argc < 2)
return CMD_RET_USAGE;
diff --git a/cmd/osd.c b/cmd/osd.c
index 0b1fa49936..bdad5d8e96 100644
--- a/cmd/osd.c
+++ b/cmd/osd.c
@@ -10,6 +10,7 @@
*/
#include <common.h>
+#include <command.h>
#include <dm.h>
#include <hexdump.h>
#include <video_osd.h>
@@ -80,8 +81,8 @@ static void show_osd(struct udevice *osd)
printf("\n");
}
-static int do_osd_write(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_osd_write(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
uint x, y;
uint count;
@@ -131,8 +132,8 @@ static int do_osd_write(cmd_tbl_t *cmdtp, int flag, int argc,
return CMD_RET_SUCCESS;
}
-static int do_osd_print(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_osd_print(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
uint x, y;
u8 color;
@@ -161,8 +162,8 @@ static int do_osd_print(cmd_tbl_t *cmdtp, int flag, int argc,
return CMD_RET_SUCCESS;
}
-static int do_osd_size(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_osd_size(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
uint x, y;
int res;
@@ -187,8 +188,8 @@ static int do_osd_size(cmd_tbl_t *cmdtp, int flag, int argc,
return CMD_RET_SUCCESS;
}
-static int do_show_osd(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_show_osd(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct udevice *osd;
@@ -223,8 +224,8 @@ static int do_show_osd(cmd_tbl_t *cmdtp, int flag, int argc,
return CMD_RET_SUCCESS;
}
-static int do_osd_num(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_osd_num(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int osd_no;
int res = 0;
@@ -250,7 +251,7 @@ static int do_osd_num(cmd_tbl_t *cmdtp, int flag, int argc,
return res ? CMD_RET_FAILURE : CMD_RET_SUCCESS;
}
-static cmd_tbl_t cmd_osd_sub[] = {
+static struct cmd_tbl cmd_osd_sub[] = {
U_BOOT_CMD_MKENT(show, 1, 1, do_show_osd, "", ""),
U_BOOT_CMD_MKENT(dev, 1, 1, do_osd_num, "", ""),
U_BOOT_CMD_MKENT(write, 4, 1, do_osd_write, "", ""),
@@ -258,9 +259,9 @@ static cmd_tbl_t cmd_osd_sub[] = {
U_BOOT_CMD_MKENT(size, 2, 1, do_osd_size, "", ""),
};
-static int do_osd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_osd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
- cmd_tbl_t *c;
+ struct cmd_tbl *c;
if (argc < 2)
return CMD_RET_USAGE;
diff --git a/cmd/part.c b/cmd/part.c
index 5e4e45ca6d..216f14bf5d 100644
--- a/cmd/part.c
+++ b/cmd/part.c
@@ -28,11 +28,11 @@ 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;
- disk_partition_t info;
+ struct disk_partition info;
if (argc < 2)
return CMD_RET_USAGE;
@@ -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;
@@ -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];
@@ -114,10 +114,10 @@ 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;
- disk_partition_t info;
+ struct disk_partition info;
char buf[512] = { 0 };
char *endp;
int part;
@@ -167,22 +167,23 @@ static int do_part_info(int argc, char * const argv[], enum cmd_part_info param)
return 0;
}
-static int do_part_start(int argc, char * const argv[])
+static int do_part_start(int argc, char *const argv[])
{
return do_part_info(argc, argv, CMD_PART_INFO_START);
}
-static int do_part_size(int argc, char * const argv[])
+static int do_part_size(int argc, char *const argv[])
{
return do_part_info(argc, argv, CMD_PART_INFO_SIZE);
}
-static int do_part_number(int argc, char * const argv[])
+static int do_part_number(int argc, char *const argv[])
{
return do_part_info(argc, argv, CMD_PART_INFO_NUMBER);
}
-static int do_part(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_part(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
if (argc < 2)
return CMD_RET_USAGE;
diff --git a/cmd/pcap.c b/cmd/pcap.c
index 980603f7bd..d0172f3fff 100644
--- a/cmd/pcap.c
+++ b/cmd/pcap.c
@@ -9,8 +9,8 @@
#include <net.h>
#include <net/pcap.h>
-static int do_pcap_init(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_pcap_init(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
phys_addr_t addr;
unsigned int size;
@@ -24,26 +24,26 @@ static int do_pcap_init(cmd_tbl_t *cmdtp, int flag, int argc,
return pcap_init(addr, size) ? CMD_RET_FAILURE : CMD_RET_SUCCESS;
}
-static int do_pcap_start(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_pcap_start(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
return pcap_start_stop(true) ? CMD_RET_FAILURE : CMD_RET_SUCCESS;
}
-static int do_pcap_stop(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_pcap_stop(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
return pcap_start_stop(false) ? CMD_RET_FAILURE : CMD_RET_SUCCESS;
}
-static int do_pcap_status(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_pcap_status(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
return pcap_print_status() ? CMD_RET_FAILURE : CMD_RET_SUCCESS;
}
-static int do_pcap_clear(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_pcap_clear(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
return pcap_clear() ? CMD_RET_FAILURE : CMD_RET_SUCCESS;
}
diff --git a/cmd/pci.c b/cmd/pci.c
index 0043471fc7..f91a4eb8ed 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>
@@ -655,7 +656,7 @@ static void pci_show_regions(struct udevice *bus)
* pci modify[.b, .w, .l] bus.device.function [addr]
* pci write[.b, .w, .l] bus.device.function addr value
*/
-static int do_pci(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_pci(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
ulong addr = 0, value = 0, cmd_size = 0;
enum pci_size_t size = PCI_SIZE_32;
diff --git a/cmd/pinmux.c b/cmd/pinmux.c
index de909a163d..9942b15419 100644
--- a/cmd/pinmux.c
+++ b/cmd/pinmux.c
@@ -14,7 +14,8 @@
static struct udevice *currdev;
-static int do_dev(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_dev(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
const char *name;
int ret;
@@ -75,7 +76,8 @@ static int show_pinmux(struct udevice *dev)
return 0;
}
-static int do_status(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_status(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct udevice *dev;
int ret = CMD_RET_USAGE;
@@ -99,7 +101,8 @@ static int do_status(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return ret;
}
-static int do_list(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_list(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct udevice *dev;
@@ -118,16 +121,16 @@ static int do_list(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return CMD_RET_SUCCESS;
}
-static cmd_tbl_t pinmux_subcmd[] = {
+static struct cmd_tbl pinmux_subcmd[] = {
U_BOOT_CMD_MKENT(dev, 2, 1, do_dev, "", ""),
U_BOOT_CMD_MKENT(list, 1, 1, do_list, "", ""),
U_BOOT_CMD_MKENT(status, 2, 1, do_status, "", ""),
};
-static int do_pinmux(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_pinmux(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
- cmd_tbl_t *cmd;
+ struct cmd_tbl *cmd;
argc--;
argv++;
diff --git a/cmd/pmc.c b/cmd/pmc.c
index cafeba9fcc..9a3ba2bffc 100644
--- a/cmd/pmc.c
+++ b/cmd/pmc.c
@@ -30,7 +30,8 @@ static int get_pmc_dev(struct udevice **devp)
return 0;
}
-static int do_pmc_init(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_pmc_init(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct udevice *dev;
int ret;
@@ -42,7 +43,8 @@ static int do_pmc_init(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
return 0;
}
-static int do_pmc_info(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_pmc_info(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct udevice *dev;
int ret;
@@ -55,14 +57,14 @@ static int do_pmc_info(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
return 0;
}
-static cmd_tbl_t cmd_pmc_sub[] = {
+static struct cmd_tbl cmd_pmc_sub[] = {
U_BOOT_CMD_MKENT(init, 0, 1, do_pmc_init, "", ""),
U_BOOT_CMD_MKENT(info, 0, 1, do_pmc_info, "", ""),
};
-static int do_pmc(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_pmc(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
- const cmd_tbl_t *cp;
+ const struct cmd_tbl *cp;
if (argc < 2) /* no subcommand */
return cmd_usage(cmdtp);
diff --git a/cmd/pmic.c b/cmd/pmic.c
index 2400bfb601..3bda0534a3 100644
--- a/cmd/pmic.c
+++ b/cmd/pmic.c
@@ -4,6 +4,7 @@
* Przemyslaw Marczak <p.marczak@samsung.com>
*/
#include <common.h>
+#include <command.h>
#include <errno.h>
#include <dm.h>
#include <dm/uclass-internal.h>
@@ -21,7 +22,7 @@ static int failure(int ret)
return CMD_RET_FAILURE;
}
-static int do_dev(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_dev(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
char *name;
int ret = -ENODEV;
@@ -46,7 +47,8 @@ static int do_dev(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return CMD_RET_SUCCESS;
}
-static int do_list(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_list(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct udevice *dev;
int ret;
@@ -73,7 +75,8 @@ static int do_list(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return CMD_RET_SUCCESS;
}
-static int do_dump(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_dump(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct uc_pmic_priv *priv;
struct udevice *dev;
@@ -118,7 +121,8 @@ static int do_dump(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return CMD_RET_SUCCESS;
}
-static int do_read(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_read(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct uc_pmic_priv *priv;
struct udevice *dev;
@@ -157,7 +161,8 @@ static int do_read(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return CMD_RET_SUCCESS;
}
-static int do_write(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_write(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct udevice *dev;
uint reg, value;
@@ -191,7 +196,7 @@ static int do_write(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return CMD_RET_SUCCESS;
}
-static cmd_tbl_t subcmd[] = {
+static struct cmd_tbl subcmd[] = {
U_BOOT_CMD_MKENT(dev, 2, 1, do_dev, "", ""),
U_BOOT_CMD_MKENT(list, 1, 1, do_list, "", ""),
U_BOOT_CMD_MKENT(dump, 1, 1, do_dump, "", ""),
@@ -199,10 +204,10 @@ static cmd_tbl_t subcmd[] = {
U_BOOT_CMD_MKENT(write, 3, 1, do_write, "", ""),
};
-static int do_pmic(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_pmic(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
- cmd_tbl_t *cmd;
+ struct cmd_tbl *cmd;
argc--;
argv++;
diff --git a/cmd/pxe.c b/cmd/pxe.c
index bce6728875..6372fc9871 100644
--- a/cmd/pxe.c
+++ b/cmd/pxe.c
@@ -24,7 +24,8 @@ const char *pxe_default_paths[] = {
NULL
};
-static int do_get_tftp(cmd_tbl_t *cmdtp, const char *file_path, char *file_addr)
+static int do_get_tftp(struct cmd_tbl *cmdtp, const char *file_path,
+ char *file_addr)
{
char *tftp_argv[] = {"tftp", NULL, NULL, NULL};
@@ -42,7 +43,7 @@ static int do_get_tftp(cmd_tbl_t *cmdtp, const char *file_path, char *file_addr)
*
* Returns 1 on success or < 0 on error.
*/
-static int pxe_uuid_path(cmd_tbl_t *cmdtp, unsigned long pxefile_addr_r)
+static int pxe_uuid_path(struct cmd_tbl *cmdtp, unsigned long pxefile_addr_r)
{
char *uuid_str;
@@ -60,7 +61,7 @@ static int pxe_uuid_path(cmd_tbl_t *cmdtp, unsigned long pxefile_addr_r)
*
* Returns 1 on success or < 0 on error.
*/
-static int pxe_mac_path(cmd_tbl_t *cmdtp, unsigned long pxefile_addr_r)
+static int pxe_mac_path(struct cmd_tbl *cmdtp, unsigned long pxefile_addr_r)
{
char mac_str[21];
int err;
@@ -80,7 +81,7 @@ static int pxe_mac_path(cmd_tbl_t *cmdtp, unsigned long pxefile_addr_r)
*
* Returns 1 on success or < 0 on error.
*/
-static int pxe_ipaddr_paths(cmd_tbl_t *cmdtp, unsigned long pxefile_addr_r)
+static int pxe_ipaddr_paths(struct cmd_tbl *cmdtp, unsigned long pxefile_addr_r)
{
char ip_addr[9];
int mask_pos, err;
@@ -113,7 +114,7 @@ static int pxe_ipaddr_paths(cmd_tbl_t *cmdtp, unsigned long pxefile_addr_r)
* Returns 0 on success or 1 on error.
*/
static int
-do_pxe_get(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+do_pxe_get(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
char *pxefile_addr_str;
unsigned long pxefile_addr_r;
@@ -166,7 +167,7 @@ do_pxe_get(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
* Returns 0 on success, 1 on error.
*/
static int
-do_pxe_boot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+do_pxe_boot(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
unsigned long pxefile_addr_r;
struct pxe_menu *cfg;
@@ -206,14 +207,14 @@ do_pxe_boot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return 0;
}
-static cmd_tbl_t cmd_pxe_sub[] = {
+static struct cmd_tbl cmd_pxe_sub[] = {
U_BOOT_CMD_MKENT(get, 1, 1, do_pxe_get, "", ""),
U_BOOT_CMD_MKENT(boot, 2, 1, do_pxe_boot, "", "")
};
-static int do_pxe(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_pxe(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
- cmd_tbl_t *cp;
+ struct cmd_tbl *cp;
if (argc < 2)
return CMD_RET_USAGE;
diff --git a/cmd/pxe_utils.c b/cmd/pxe_utils.c
index c244bfb10d..8716e782f6 100644
--- a/cmd/pxe_utils.c
+++ b/cmd/pxe_utils.c
@@ -5,11 +5,14 @@
*/
#include <common.h>
+#include <command.h>
#include <env.h>
#include <image.h>
+#include <log.h>
#include <malloc.h>
#include <mapmem.h>
#include <lcd.h>
+#include <net.h>
#include <linux/string.h>
#include <linux/ctype.h>
#include <errno.h>
@@ -99,7 +102,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
@@ -109,7 +113,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;
@@ -147,7 +151,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;
@@ -188,7 +192,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);
@@ -212,7 +216,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;
@@ -342,7 +346,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];
@@ -821,7 +825,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);
/*
@@ -832,7 +836,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;
@@ -872,7 +876,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;
@@ -1085,7 +1089,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;
@@ -1193,7 +1197,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;
@@ -1277,7 +1281,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;
@@ -1302,7 +1306,7 @@ static void boot_unattempted_labels(cmd_tbl_t *cmdtp, struct pxe_menu *cfg)
* If this function returns, there weren't any labels that successfully
* booted, or the user interrupted the menu selection via ctrl+c.
*/
-void handle_pxe_menu(cmd_tbl_t *cmdtp, struct pxe_menu *cfg)
+void handle_pxe_menu(struct cmd_tbl *cmdtp, struct pxe_menu *cfg)
{
void *choice;
struct menu *m;
diff --git a/cmd/pxe_utils.h b/cmd/pxe_utils.h
index a38ac81a47..77d2588875 100644
--- a/cmd/pxe_utils.h
+++ b/cmd/pxe_utils.h
@@ -74,15 +74,15 @@ struct pxe_menu {
extern bool is_pxe;
-extern int (*do_getfile)(cmd_tbl_t *cmdtp, const char *file_path,
+extern int (*do_getfile)(struct cmd_tbl *cmdtp, const char *file_path,
char *file_addr);
void destroy_pxe_menu(struct pxe_menu *cfg);
-int get_pxe_file(cmd_tbl_t *cmdtp, const char *file_path,
+int get_pxe_file(struct cmd_tbl *cmdtp, const char *file_path,
unsigned long file_addr);
-int get_pxelinux_path(cmd_tbl_t *cmdtp, const char *file,
+int get_pxelinux_path(struct cmd_tbl *cmdtp, const char *file,
unsigned long pxefile_addr_r);
-void handle_pxe_menu(cmd_tbl_t *cmdtp, struct pxe_menu *cfg);
-struct pxe_menu *parse_pxefile(cmd_tbl_t *cmdtp, unsigned long menucfg);
+void handle_pxe_menu(struct cmd_tbl *cmdtp, struct pxe_menu *cfg);
+struct pxe_menu *parse_pxefile(struct cmd_tbl *cmdtp, unsigned long menucfg);
int format_mac_pxe(char *outbuf, size_t outbuf_len);
#endif /* __PXE_UTILS_H */
diff --git a/cmd/qfw.c b/cmd/qfw.c
index af826627a2..bb571487f0 100644
--- a/cmd/qfw.c
+++ b/cmd/qfw.c
@@ -93,8 +93,8 @@ static int qemu_fwcfg_list_firmware(void)
return 0;
}
-static int qemu_fwcfg_do_list(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+static int qemu_fwcfg_do_list(struct cmd_tbl *cmdtp, int flag,
+ int argc, char *const argv[])
{
if (qemu_fwcfg_list_firmware() < 0)
return CMD_RET_FAILURE;
@@ -102,8 +102,8 @@ static int qemu_fwcfg_do_list(cmd_tbl_t *cmdtp, int flag,
return 0;
}
-static int qemu_fwcfg_do_cpus(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+static int qemu_fwcfg_do_cpus(struct cmd_tbl *cmdtp, int flag,
+ int argc, char *const argv[])
{
int ret = qemu_fwcfg_online_cpus();
if (ret < 0) {
@@ -116,8 +116,8 @@ static int qemu_fwcfg_do_cpus(cmd_tbl_t *cmdtp, int flag,
return 0;
}
-static int qemu_fwcfg_do_load(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+static int qemu_fwcfg_do_load(struct cmd_tbl *cmdtp, int flag,
+ int argc, char *const argv[])
{
char *env;
void *load_addr;
@@ -156,16 +156,17 @@ static int qemu_fwcfg_do_load(cmd_tbl_t *cmdtp, int flag,
return qemu_fwcfg_setup_kernel(load_addr, initrd_addr);
}
-static cmd_tbl_t fwcfg_commands[] = {
+static struct cmd_tbl fwcfg_commands[] = {
U_BOOT_CMD_MKENT(list, 0, 1, qemu_fwcfg_do_list, "", ""),
U_BOOT_CMD_MKENT(cpus, 0, 1, qemu_fwcfg_do_cpus, "", ""),
U_BOOT_CMD_MKENT(load, 2, 1, qemu_fwcfg_do_load, "", ""),
};
-static int do_qemu_fw(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_qemu_fw(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int ret;
- cmd_tbl_t *fwcfg_cmd;
+ struct cmd_tbl *fwcfg_cmd;
if (!qemu_fwcfg_present()) {
printf("QEMU fw_cfg interface not found\n");
diff --git a/cmd/read.c b/cmd/read.c
index 82c2d9ad99..34f53f9a29 100644
--- a/cmd/read.c
+++ b/cmd/read.c
@@ -12,13 +12,13 @@
#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;
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/reginfo.c b/cmd/reginfo.c
index de94dd8071..c8a04b1754 100644
--- a/cmd/reginfo.c
+++ b/cmd/reginfo.c
@@ -8,8 +8,8 @@
#include <command.h>
#include <asm/ppc.h>
-static int do_reginfo(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_reginfo(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
print_reginfo();
diff --git a/cmd/regulator.c b/cmd/regulator.c
index ed8d778c82..aa06c9a9fc 100644
--- a/cmd/regulator.c
+++ b/cmd/regulator.c
@@ -4,6 +4,7 @@
* Przemyslaw Marczak <p.marczak@samsung.com>
*/
#include <common.h>
+#include <command.h>
#include <errno.h>
#include <dm.h>
#include <dm/uclass-internal.h>
@@ -22,7 +23,7 @@ static int failure(int ret)
return CMD_RET_FAILURE;
}
-static int do_dev(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_dev(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
struct dm_regulator_uclass_platdata *uc_pdata;
const char *name;
@@ -82,7 +83,8 @@ static int curr_dev_and_platdata(struct udevice **devp,
return CMD_RET_SUCCESS;
}
-static int do_list(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_list(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct dm_regulator_uclass_platdata *uc_pdata;
struct udevice *dev;
@@ -137,7 +139,8 @@ static const char *get_mode_name(struct dm_regulator_mode *mode,
return NULL;
}
-static int do_info(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_info(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct udevice *dev;
struct dm_regulator_uclass_platdata *uc_pdata;
@@ -231,7 +234,8 @@ static void do_status_line(struct udevice *dev)
printf("\n");
}
-static int do_status(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_status(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct dm_regulator_uclass_platdata *uc_pdata;
struct udevice *dev;
@@ -255,7 +259,8 @@ static int do_status(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return CMD_RET_SUCCESS;
}
-static int do_value(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_value(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct udevice *dev;
struct dm_regulator_uclass_platdata *uc_pdata;
@@ -304,7 +309,8 @@ static int do_value(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return CMD_RET_SUCCESS;
}
-static int do_current(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_current(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct udevice *dev;
struct dm_regulator_uclass_platdata *uc_pdata;
@@ -343,7 +349,8 @@ static int do_current(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return CMD_RET_SUCCESS;
}
-static int do_mode(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_mode(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct udevice *dev;
struct dm_regulator_uclass_platdata *uc_pdata;
@@ -378,7 +385,8 @@ static int do_mode(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return CMD_RET_SUCCESS;
}
-static int do_enable(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_enable(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct udevice *dev;
struct dm_regulator_uclass_platdata *uc_pdata;
@@ -397,7 +405,8 @@ static int do_enable(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return CMD_RET_SUCCESS;
}
-static int do_disable(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_disable(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct udevice *dev;
struct dm_regulator_uclass_platdata *uc_pdata;
@@ -416,7 +425,7 @@ static int do_disable(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return CMD_RET_SUCCESS;
}
-static cmd_tbl_t subcmd[] = {
+static struct cmd_tbl subcmd[] = {
U_BOOT_CMD_MKENT(dev, 2, 1, do_dev, "", ""),
U_BOOT_CMD_MKENT(list, 1, 1, do_list, "", ""),
U_BOOT_CMD_MKENT(info, 2, 1, do_info, "", ""),
@@ -428,10 +437,10 @@ static cmd_tbl_t subcmd[] = {
U_BOOT_CMD_MKENT(disable, 1, 1, do_disable, "", ""),
};
-static int do_regulator(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_regulator(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
- cmd_tbl_t *cmd;
+ struct cmd_tbl *cmd;
argc--;
argv++;
diff --git a/cmd/reiser.c b/cmd/reiser.c
index 598fab48b3..3db926f806 100644
--- a/cmd/reiser.c
+++ b/cmd/reiser.c
@@ -30,12 +30,12 @@
#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;
struct blk_desc *dev_desc = NULL;
- disk_partition_t info;
+ struct disk_partition info;
if (argc < 3)
return CMD_RET_USAGE;
@@ -76,12 +76,12 @@ 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;
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/remoteproc.c b/cmd/remoteproc.c
index da6f3fc8cc..e8b9178e74 100644
--- a/cmd/remoteproc.c
+++ b/cmd/remoteproc.c
@@ -69,7 +69,7 @@ static int print_remoteproc_list(void)
*
* Return: 0 if no error, else returns appropriate error value.
*/
-static int do_rproc_init(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_rproc_init(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
int id;
@@ -102,7 +102,7 @@ static int do_rproc_init(cmd_tbl_t *cmdtp, int flag, int argc,
*
* Return: 0 if no error, else returns appropriate error value.
*/
-static int do_remoteproc_list(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_remoteproc_list(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
if (print_remoteproc_list())
@@ -120,7 +120,7 @@ static int do_remoteproc_list(cmd_tbl_t *cmdtp, int flag, int argc,
*
* Return: 0 if no error, else returns appropriate error value.
*/
-static int do_remoteproc_load(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_remoteproc_load(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
ulong addr, size;
@@ -159,7 +159,7 @@ static int do_remoteproc_load(cmd_tbl_t *cmdtp, int flag, int argc,
*
* Return: 0 if no error, else returns appropriate error value.
*/
-static int do_remoteproc_wrapper(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_remoteproc_wrapper(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
int id, ret = CMD_RET_USAGE;
@@ -201,7 +201,7 @@ static int do_remoteproc_wrapper(cmd_tbl_t *cmdtp, int flag, int argc,
return ret ? CMD_RET_FAILURE : 0;
}
-static cmd_tbl_t cmd_remoteproc_sub[] = {
+static struct cmd_tbl cmd_remoteproc_sub[] = {
U_BOOT_CMD_MKENT(init, 1, 1, do_rproc_init,
"Enumerate and initialize the remote processor(s)",
"id - ID of the remote processor\n"
@@ -242,10 +242,10 @@ static cmd_tbl_t cmd_remoteproc_sub[] = {
*
* Return: 0 if no error, else returns appropriate error value.
*/
-static int do_remoteproc(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_remoteproc(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
- cmd_tbl_t *c = NULL;
+ struct cmd_tbl *c = NULL;
/* Strip off leading 'rproc' command argument */
argc--;
diff --git a/cmd/riscv/exception.c b/cmd/riscv/exception.c
index 547fb7d132..3c8dbbec0e 100644
--- a/cmd/riscv/exception.c
+++ b/cmd/riscv/exception.c
@@ -8,14 +8,14 @@
#include <common.h>
#include <command.h>
-static int do_undefined(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_undefined(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
asm volatile (".word 0xffffffff\n");
return CMD_RET_FAILURE;
}
-static cmd_tbl_t cmd_sub[] = {
+static struct cmd_tbl cmd_sub[] = {
U_BOOT_CMD_MKENT(undefined, CONFIG_SYS_MAXARGS, 1, do_undefined,
"", ""),
};
diff --git a/cmd/rng.c b/cmd/rng.c
index 76367fed94..9747c11be4 100644
--- a/cmd/rng.c
+++ b/cmd/rng.c
@@ -11,7 +11,7 @@
#include <malloc.h>
#include <rng.h>
-static int do_rng(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_rng(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
size_t n = 0x40;
struct udevice *dev;
diff --git a/cmd/rockusb.c b/cmd/rockusb.c
index 9b70c6a6af..f181ec6111 100644
--- a/cmd/rockusb.c
+++ b/cmd/rockusb.c
@@ -10,7 +10,8 @@
#include <usb.h>
#include <asm/arch-rockchip/f_rockusb.h>
-static int do_rockusb(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_rockusb(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int controller_index, dev_index;
char *usb_controller;
diff --git a/cmd/sata.c b/cmd/sata.c
index 6bdb516cb5..aa396c1bbd 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>
@@ -78,7 +79,8 @@ int sata_probe(int devnum)
#endif
}
-static int do_sata(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_sata(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int rc = 0;
diff --git a/cmd/sb.c b/cmd/sb.c
index 5701e03797..f7eb921f43 100644
--- a/cmd/sb.c
+++ b/cmd/sb.c
@@ -5,11 +5,12 @@
*/
#include <common.h>
+#include <command.h>
#include <dm.h>
#include <spl.h>
#include <asm/state.h>
-static int do_sb_handoff(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_sb_handoff(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
#if CONFIG_IS_ENABLED(HANDOFF)
@@ -26,8 +27,8 @@ static int do_sb_handoff(cmd_tbl_t *cmdtp, int flag, int argc,
#endif
}
-static int do_sb_state(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_sb_state(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct sandbox_state *state;
@@ -37,14 +38,14 @@ static int do_sb_state(cmd_tbl_t *cmdtp, int flag, int argc,
return 0;
}
-static cmd_tbl_t cmd_sb_sub[] = {
+static struct cmd_tbl cmd_sb_sub[] = {
U_BOOT_CMD_MKENT(handoff, 1, 0, do_sb_handoff, "", ""),
U_BOOT_CMD_MKENT(state, 1, 0, do_sb_state, "", ""),
};
-static int do_sb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_sb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
- cmd_tbl_t *c;
+ struct cmd_tbl *c;
/* Skip past 'sb' */
argc--;
diff --git a/cmd/scsi.c b/cmd/scsi.c
index 67de1a3bdc..5f710d2895 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>
@@ -16,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);
}
@@ -24,7 +26,8 @@ static int do_scsiboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
/*
* scsi command intepreter
*/
-static int do_scsi(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_scsi(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int ret;
diff --git a/cmd/setexpr.c b/cmd/setexpr.c
index 0182f19938..770dc24d2b 100644
--- a/cmd/setexpr.c
+++ b/cmd/setexpr.c
@@ -12,6 +12,7 @@
#include <config.h>
#include <command.h>
#include <env.h>
+#include <log.h>
#include <mapmem.h>
static ulong get_arg(char *s, int w)
@@ -290,7 +291,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 e993b3e5ad..727837d9cd 100644
--- a/cmd/sf.c
+++ b/cmd/sf.c
@@ -6,12 +6,16 @@
*/
#include <common.h>
+#include <command.h>
#include <div64.h>
#include <dm.h>
+#include <flash.h>
+#include <log.h>
#include <malloc.h>
#include <mapmem.h>
#include <spi.h>
#include <spi_flash.h>
+#include <asm/cache.h>
#include <jffs2/jffs2.h>
#include <linux/mtd/mtd.h>
@@ -79,7 +83,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;
@@ -259,7 +263,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;
@@ -317,7 +321,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;
@@ -349,7 +353,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;
@@ -498,7 +502,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;
@@ -542,8 +546,8 @@ static int do_spi_flash_test(int argc, char * const argv[])
}
#endif /* CONFIG_CMD_SF_TEST */
-static int do_spi_flash(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_spi_flash(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
const char *cmd;
int ret;
diff --git a/cmd/sha1sum.c b/cmd/sha1sum.c
index 3c50fc27ce..bcc665a5a6 100644
--- a/cmd/sha1sum.c
+++ b/cmd/sha1sum.c
@@ -12,7 +12,7 @@
#include <hash.h>
#include <u-boot/sha1.h>
-int do_sha1sum(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_sha1sum(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
int flags = HASH_FLAG_ENV;
int ac;
diff --git a/cmd/smccc.c b/cmd/smccc.c
index 8b1475c2fe..0b19f6c68c 100644
--- a/cmd/smccc.c
+++ b/cmd/smccc.c
@@ -10,7 +10,8 @@
#include <linux/compiler.h>
#include <linux/psci.h>
-static int do_call(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_call(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct arm_smccc_res res;
diff --git a/cmd/sound.c b/cmd/sound.c
index 638f29df21..7fc19678ea 100644
--- a/cmd/sound.c
+++ b/cmd/sound.c
@@ -13,7 +13,8 @@
DECLARE_GLOBAL_DATA_PTR;
/* Initilaise sound subsystem */
-static int do_init(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_init(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct udevice *dev;
int ret;
@@ -30,7 +31,8 @@ static int do_init(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
}
/* play sound from buffer */
-static int do_play(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_play(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct udevice *dev;
int ret = 0;
@@ -53,15 +55,16 @@ static int do_play(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
return 0;
}
-static cmd_tbl_t cmd_sound_sub[] = {
+static struct cmd_tbl cmd_sound_sub[] = {
U_BOOT_CMD_MKENT(init, 0, 1, do_init, "", ""),
U_BOOT_CMD_MKENT(play, 2, 1, do_play, "", ""),
};
/* process sound command */
-static int do_sound(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+static int do_sound(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
- cmd_tbl_t *c;
+ struct cmd_tbl *c;
if (argc < 1)
return CMD_RET_USAGE;
diff --git a/cmd/source.c b/cmd/source.c
index 92f8f77ee6..b6c709a3d2 100644
--- a/cmd/source.c
+++ b/cmd/source.c
@@ -18,6 +18,7 @@
#include <command.h>
#include <env.h>
#include <image.h>
+#include <log.h>
#include <malloc.h>
#include <mapmem.h>
#include <asm/byteorder.h>
@@ -154,13 +155,14 @@ 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);
}
/**************************************************/
#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;
@@ -169,16 +171,16 @@ static int do_source(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
/* 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 at %08lx\n", addr);
diff --git a/cmd/spi.c b/cmd/spi.c
index bfa185b6ae..aec912167c 100644
--- a/cmd/spi.c
+++ b/cmd/spi.c
@@ -97,7 +97,7 @@ done:
* The command prints out the hexadecimal string received via SPI.
*/
-int do_spi (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_spi(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
char *cp = 0;
uchar tmp;
diff --git a/cmd/spl.c b/cmd/spl.c
index 56051b8a4b..28b40dd31e 100644
--- a/cmd/spl.c
+++ b/cmd/spl.c
@@ -8,6 +8,8 @@
#include <command.h>
#include <cmd_spl.h>
#include <env.h>
+#include <image.h>
+#include <log.h>
#include <linux/libfdt.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -49,7 +51,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];
@@ -95,14 +97,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);
@@ -141,13 +144,13 @@ static int spl_export(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return 0;
}
-static cmd_tbl_t cmd_spl_sub[] = {
+static struct cmd_tbl cmd_spl_sub[] = {
U_BOOT_CMD_MKENT(export, 0, 1, (void *)SPL_EXPORT, "", ""),
};
-static int do_spl(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_spl(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
- const cmd_tbl_t *c;
+ const struct cmd_tbl *c;
int cmd;
if (argc < 2) /* no subcommand */
diff --git a/cmd/strings.c b/cmd/strings.c
index 41b1665926..85fdc34f08 100644
--- a/cmd/strings.c
+++ b/cmd/strings.c
@@ -12,7 +12,7 @@
static char *start_addr, *last_addr;
-int do_strings(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_strings(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
if (argc == 1)
return CMD_RET_USAGE;
diff --git a/cmd/sysboot.c b/cmd/sysboot.c
index 793d67d2f5..af6a2f1b7f 100644
--- a/cmd/sysboot.c
+++ b/cmd/sysboot.c
@@ -8,7 +8,8 @@
static char *fs_argv[5];
-static int do_get_ext2(cmd_tbl_t *cmdtp, const char *file_path, char *file_addr)
+static int do_get_ext2(struct cmd_tbl *cmdtp, const char *file_path,
+ char *file_addr)
{
#ifdef CONFIG_CMD_EXT2
fs_argv[0] = "ext2load";
@@ -21,7 +22,8 @@ static int do_get_ext2(cmd_tbl_t *cmdtp, const char *file_path, char *file_addr)
return -ENOENT;
}
-static int do_get_fat(cmd_tbl_t *cmdtp, const char *file_path, char *file_addr)
+static int do_get_fat(struct cmd_tbl *cmdtp, const char *file_path,
+ char *file_addr)
{
#ifdef CONFIG_CMD_FAT
fs_argv[0] = "fatload";
@@ -34,7 +36,8 @@ static int do_get_fat(cmd_tbl_t *cmdtp, const char *file_path, char *file_addr)
return -ENOENT;
}
-static int do_get_any(cmd_tbl_t *cmdtp, const char *file_path, char *file_addr)
+static int do_get_any(struct cmd_tbl *cmdtp, const char *file_path,
+ char *file_addr)
{
#ifdef CONFIG_CMD_FS_GENERIC
fs_argv[0] = "load";
@@ -52,7 +55,8 @@ static int do_get_any(cmd_tbl_t *cmdtp, const char *file_path, char *file_addr)
*
* Returns 0 on success, 1 on error.
*/
-static int do_sysboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_sysboot(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
unsigned long pxefile_addr_r;
struct pxe_menu *cfg;
diff --git a/cmd/terminal.c b/cmd/terminal.c
index e1ec66ed71..f6e4d2539e 100644
--- a/cmd/terminal.c
+++ b/cmd/terminal.c
@@ -12,7 +12,7 @@
#include <stdio_dev.h>
#include <serial.h>
-int do_terminal(cmd_tbl_t * cmd, int flag, int argc, char * const argv[])
+int do_terminal(struct cmd_tbl *cmd, int flag, int argc, char *const argv[])
{
int last_tilde = 0;
struct stdio_dev *dev = NULL;
diff --git a/cmd/test.c b/cmd/test.c
index 258bfd8806..fa7c48fb9f 100644
--- a/cmd/test.c
+++ b/cmd/test.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <command.h>
#include <fs.h>
+#include <log.h>
#define OP_INVALID 0
#define OP_NOT 1
@@ -50,7 +51,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 +192,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 +204,8 @@ U_BOOT_CMD(
NULL
);
-static int do_true(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_true(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
return 0;
}
diff --git a/cmd/thordown.c b/cmd/thordown.c
index 8dae024e31..ae20dddfdd 100644
--- a/cmd/thordown.c
+++ b/cmd/thordown.c
@@ -7,12 +7,13 @@
*/
#include <common.h>
+#include <command.h>
#include <thor.h>
#include <dfu.h>
#include <g_dnl.h>
#include <usb.h>
-int do_thor_down(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_thor_down(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
if (argc < 4)
return CMD_RET_USAGE;
diff --git a/cmd/ti/ddr3.c b/cmd/ti/ddr3.c
index a452fe7876..623b63b0f9 100644
--- a/cmd/ti/ddr3.c
+++ b/cmd/ti/ddr3.c
@@ -6,7 +6,9 @@
*/
#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>
@@ -276,8 +278,8 @@ static int is_ecc_enabled(void)
(ecc_ctrl & EMIF_ECC_REG_RMW_EN_MASK);
}
-static int do_ddr_test(cmd_tbl_t *cmdtp,
- int flag, int argc, char * const argv[])
+static int do_ddr_test(struct cmd_tbl *cmdtp,
+ int flag, int argc, char *const argv[])
{
u32 start_addr, end_addr, size, ecc_err;
diff --git a/cmd/time.c b/cmd/time.c
index 51cde9749f..db8c1892df 100644
--- a/cmd/time.c
+++ b/cmd/time.c
@@ -24,7 +24,8 @@ static void report_time(ulong cycles)
printf(" %lu.%03lu seconds\n", seconds, milliseconds);
}
-static int do_time(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_time(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
ulong cycles = 0;
int retval = 0;
diff --git a/cmd/tlv_eeprom.c b/cmd/tlv_eeprom.c
index 211ab2680f..eab0531c96 100644
--- a/cmd/tlv_eeprom.c
+++ b/cmd/tlv_eeprom.c
@@ -15,6 +15,8 @@
#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>
@@ -423,7 +425,7 @@ void show_tlv_code_list(void)
*
* This function implements the tlv_eeprom command.
*/
-int do_tlv_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_tlv_eeprom(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
char cmd;
struct tlvinfo_header *eeprom_hdr = to_header(eeprom);
diff --git a/cmd/tpm-common.c b/cmd/tpm-common.c
index 3014255229..88c9e08e31 100644
--- a/cmd/tpm-common.c
+++ b/cmd/tpm-common.c
@@ -296,7 +296,7 @@ int get_tpm(struct udevice **devp)
return 0;
}
-int do_tpm_device(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_tpm_device(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
unsigned long num;
int rc;
@@ -314,7 +314,7 @@ int do_tpm_device(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
return rc;
}
-int do_tpm_info(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_tpm_info(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
struct udevice *dev;
char buf[80];
@@ -333,7 +333,7 @@ int do_tpm_info(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
return 0;
}
-int do_tpm_init(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_tpm_init(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
struct udevice *dev;
int rc;
@@ -347,9 +347,9 @@ int do_tpm_init(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return report_return_code(tpm_init(dev));
}
-int do_tpm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_tpm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
- cmd_tbl_t *tpm_commands, *cmd;
+ struct cmd_tbl *tpm_commands, *cmd;
struct tpm_chip_priv *priv;
struct udevice *dev;
unsigned int size;
diff --git a/cmd/tpm-user-utils.h b/cmd/tpm-user-utils.h
index a851d9c4af..358ddff576 100644
--- a/cmd/tpm-user-utils.h
+++ b/cmd/tpm-user-utils.h
@@ -17,9 +17,10 @@ int type_string_pack(const char *type_str, char * const values[], u8 *data);
int type_string_write_vars(const char *type_str, u8 *data, char * const vars[]);
int get_tpm(struct udevice **devp);
-int do_tpm_device(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]);
-int do_tpm_init(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]);
-int do_tpm_info(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]);
-int do_tpm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+int do_tpm_device(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[]);
+int do_tpm_init(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
+int do_tpm_info(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
+int do_tpm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
#endif /* __TPM_USER_UTILS_H */
diff --git a/cmd/tpm-v1.c b/cmd/tpm-v1.c
index bc34e0654f..0e2168aea6 100644
--- a/cmd/tpm-v1.c
+++ b/cmd/tpm-v1.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <command.h>
#include <env.h>
#include <malloc.h>
#include <asm/unaligned.h>
@@ -11,8 +12,8 @@
#include <tpm-v1.h>
#include "tpm-user-utils.h"
-static int do_tpm_startup(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_tpm_startup(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
enum tpm_startup_type mode;
struct udevice *dev;
@@ -37,8 +38,8 @@ static int do_tpm_startup(cmd_tbl_t *cmdtp, int flag, int argc,
return report_return_code(tpm_startup(dev, mode));
}
-static int do_tpm_nv_define_space(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_tpm_nv_define_space(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
u32 index, perm, size;
struct udevice *dev;
@@ -57,8 +58,8 @@ static int do_tpm_nv_define_space(cmd_tbl_t *cmdtp, int flag, int argc,
return report_return_code(tpm_nv_define_space(dev, index, perm, size));
}
-static int do_tpm_nv_read_value(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_tpm_nv_read_value(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
u32 index, count, rc;
struct udevice *dev;
@@ -83,8 +84,8 @@ static int do_tpm_nv_read_value(cmd_tbl_t *cmdtp, int flag, int argc,
return report_return_code(rc);
}
-static int do_tpm_nv_write_value(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_tpm_nv_write_value(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct udevice *dev;
u32 index, rc;
@@ -110,8 +111,8 @@ static int do_tpm_nv_write_value(cmd_tbl_t *cmdtp, int flag, int argc,
return report_return_code(rc);
}
-static int do_tpm_extend(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_tpm_extend(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
u8 in_digest[20], out_digest[20];
struct udevice *dev;
@@ -138,8 +139,8 @@ static int do_tpm_extend(cmd_tbl_t *cmdtp, int flag, int argc,
return report_return_code(rc);
}
-static int do_tpm_pcr_read(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_tpm_pcr_read(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
u32 index, count, rc;
struct udevice *dev;
@@ -164,8 +165,8 @@ static int do_tpm_pcr_read(cmd_tbl_t *cmdtp, int flag, int argc,
return report_return_code(rc);
}
-static int do_tpm_tsc_physical_presence(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_tpm_tsc_physical_presence(struct cmd_tbl *cmdtp, int flag,
+ int argc, char *const argv[])
{
struct udevice *dev;
u16 presence;
@@ -182,8 +183,8 @@ static int do_tpm_tsc_physical_presence(cmd_tbl_t *cmdtp, int flag, int argc,
return report_return_code(tpm_tsc_physical_presence(dev, presence));
}
-static int do_tpm_read_pubek(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_tpm_read_pubek(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct udevice *dev;
u32 count, rc;
@@ -207,8 +208,8 @@ static int do_tpm_read_pubek(cmd_tbl_t *cmdtp, int flag, int argc,
return report_return_code(rc);
}
-static int do_tpm_physical_set_deactivated(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_tpm_physical_set_deactivated(struct cmd_tbl *cmdtp, int flag,
+ int argc, char *const argv[])
{
struct udevice *dev;
u8 state;
@@ -225,8 +226,8 @@ static int do_tpm_physical_set_deactivated(cmd_tbl_t *cmdtp, int flag, int argc,
return report_return_code(tpm_physical_set_deactivated(dev, state));
}
-static int do_tpm_get_capability(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_tpm_get_capability(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
u32 cap_area, sub_cap, rc;
void *cap;
@@ -253,8 +254,8 @@ static int do_tpm_get_capability(cmd_tbl_t *cmdtp, int flag, int argc,
return report_return_code(rc);
}
-static int do_tpm_raw_transfer(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_tpm_raw_transfer(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct udevice *dev;
void *command;
@@ -282,8 +283,8 @@ static int do_tpm_raw_transfer(cmd_tbl_t *cmdtp, int flag, int argc,
return report_return_code(rc);
}
-static int do_tpm_nv_define(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_tpm_nv_define(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
u32 index, perm, size;
struct udevice *dev;
@@ -306,8 +307,8 @@ static int do_tpm_nv_define(cmd_tbl_t *cmdtp, int flag, int argc,
return report_return_code(tpm_nv_define_space(dev, index, perm, size));
}
-static int do_tpm_nv_read(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_tpm_nv_read(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
u32 index, count, err;
struct udevice *dev;
@@ -341,8 +342,8 @@ static int do_tpm_nv_read(cmd_tbl_t *cmdtp, int flag, int argc,
return report_return_code(err);
}
-static int do_tpm_nv_write(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_tpm_nv_write(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
u32 index, count, err;
struct udevice *dev;
@@ -377,8 +378,8 @@ static int do_tpm_nv_write(cmd_tbl_t *cmdtp, int flag, int argc,
#ifdef CONFIG_TPM_AUTH_SESSIONS
-static int do_tpm_oiap(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_tpm_oiap(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
u32 auth_handle, err;
struct udevice *dev;
@@ -394,8 +395,8 @@ static int do_tpm_oiap(cmd_tbl_t *cmdtp, int flag, int argc,
}
#ifdef CONFIG_TPM_LOAD_KEY_BY_SHA1
-static int do_tpm_load_key_by_sha1(cmd_tbl_t *cmdtp, int flag, int argc, char *
- const argv[])
+static int do_tpm_load_key_by_sha1(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
u32 parent_handle = 0;
u32 key_len, key_handle, err;
@@ -437,8 +438,8 @@ static int do_tpm_load_key_by_sha1(cmd_tbl_t *cmdtp, int flag, int argc, char *
}
#endif /* CONFIG_TPM_LOAD_KEY_BY_SHA1 */
-static int do_tpm_load_key2_oiap(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_tpm_load_key2_oiap(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
u32 parent_handle, key_len, key_handle, err;
u8 usage_auth[DIGEST_LENGTH];
@@ -468,8 +469,8 @@ static int do_tpm_load_key2_oiap(cmd_tbl_t *cmdtp, int flag, int argc,
return report_return_code(err);
}
-static int do_tpm_get_pub_key_oiap(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_tpm_get_pub_key_oiap(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
u32 key_handle, err;
u8 usage_auth[DIGEST_LENGTH];
@@ -504,8 +505,8 @@ TPM_COMMAND_NO_ARG(tpm_end_oiap)
#endif /* CONFIG_TPM_AUTH_SESSIONS */
#ifdef CONFIG_TPM_FLUSH_RESOURCES
-static int do_tpm_flush(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_tpm_flush(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct udevice *dev;
int type = 0;
@@ -577,8 +578,8 @@ static int do_tpm_flush(cmd_tbl_t *cmdtp, int flag, int argc,
#endif /* CONFIG_TPM_FLUSH_RESOURCES */
#ifdef CONFIG_TPM_LIST_RESOURCES
-static int do_tpm_list(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_tpm_list(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int type = 0;
u16 res_count;
@@ -644,7 +645,7 @@ TPM_COMMAND_NO_ARG(tpm_force_clear)
TPM_COMMAND_NO_ARG(tpm_physical_enable)
TPM_COMMAND_NO_ARG(tpm_physical_disable)
-static cmd_tbl_t tpm1_commands[] = {
+static struct cmd_tbl tpm1_commands[] = {
U_BOOT_CMD_MKENT(device, 0, 1, do_tpm_device, "", ""),
U_BOOT_CMD_MKENT(info, 0, 1, do_tpm_info, "", ""),
U_BOOT_CMD_MKENT(init, 0, 1, do_tpm_init, "", ""),
@@ -710,7 +711,7 @@ static cmd_tbl_t tpm1_commands[] = {
#endif /* CONFIG_TPM_LIST_RESOURCES */
};
-cmd_tbl_t *get_tpm1_commands(unsigned int *size)
+struct cmd_tbl *get_tpm1_commands(unsigned int *size)
{
*size = ARRAY_SIZE(tpm1_commands);
diff --git a/cmd/tpm-v2.c b/cmd/tpm-v2.c
index 0cd39821bf..e6742656f5 100644
--- a/cmd/tpm-v2.c
+++ b/cmd/tpm-v2.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <command.h>
#include <dm.h>
#include <log.h>
#include <mapmem.h>
@@ -12,8 +13,8 @@
#include <tpm-v2.h>
#include "tpm-user-utils.h"
-static int do_tpm2_startup(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_tpm2_startup(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
enum tpm2_startup_types mode;
struct udevice *dev;
@@ -37,8 +38,8 @@ static int do_tpm2_startup(cmd_tbl_t *cmdtp, int flag, int argc,
return report_return_code(tpm2_startup(dev, mode));
}
-static int do_tpm2_self_test(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_tpm2_self_test(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
enum tpm2_yes_no full_test;
struct udevice *dev;
@@ -62,8 +63,8 @@ static int do_tpm2_self_test(cmd_tbl_t *cmdtp, int flag, int argc,
return report_return_code(tpm2_self_test(dev, full_test));
}
-static int do_tpm2_clear(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_tpm2_clear(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
u32 handle = 0;
const char *pw = (argc < 3) ? NULL : argv[2];
@@ -91,8 +92,8 @@ static int do_tpm2_clear(cmd_tbl_t *cmdtp, int flag, int argc,
return report_return_code(tpm2_clear(dev, handle, pw, pw_sz));
}
-static int do_tpm2_pcr_extend(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_tpm2_pcr_extend(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct udevice *dev;
struct tpm_chip_priv *priv;
@@ -122,8 +123,8 @@ static int do_tpm2_pcr_extend(cmd_tbl_t *cmdtp, int flag, int argc,
return report_return_code(rc);
}
-static int do_tpm_pcr_read(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_tpm_pcr_read(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct udevice *dev;
struct tpm_chip_priv *priv;
@@ -160,8 +161,8 @@ static int do_tpm_pcr_read(cmd_tbl_t *cmdtp, int flag, int argc,
return report_return_code(rc);
}
-static int do_tpm_get_capability(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_tpm_get_capability(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
u32 capability, property, rc;
u8 *data;
@@ -203,7 +204,7 @@ unmap_data:
return report_return_code(rc);
}
-static int do_tpm_dam_reset(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_tpm_dam_reset(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
const char *pw = (argc < 2) ? NULL : argv[1];
@@ -224,7 +225,7 @@ static int do_tpm_dam_reset(cmd_tbl_t *cmdtp, int flag, int argc,
return report_return_code(tpm2_dam_reset(dev, pw, pw_sz));
}
-static int do_tpm_dam_parameters(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_tpm_dam_parameters(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
const char *pw = (argc < 5) ? NULL : argv[4];
@@ -268,7 +269,7 @@ static int do_tpm_dam_parameters(cmd_tbl_t *cmdtp, int flag, int argc,
lockout_recovery));
}
-static int do_tpm_change_auth(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_tpm_change_auth(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
u32 handle;
@@ -304,8 +305,8 @@ static int do_tpm_change_auth(cmd_tbl_t *cmdtp, int flag, int argc,
oldpw, oldpw_sz));
}
-static int do_tpm_pcr_setauthpolicy(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_tpm_pcr_setauthpolicy(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
u32 index = simple_strtoul(argv[1], NULL, 0);
char *key = argv[2];
@@ -328,8 +329,8 @@ static int do_tpm_pcr_setauthpolicy(cmd_tbl_t *cmdtp, int flag, int argc,
key));
}
-static int do_tpm_pcr_setauthvalue(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+static int do_tpm_pcr_setauthvalue(struct cmd_tbl *cmdtp, int flag,
+ int argc, char *const argv[])
{
u32 index = simple_strtoul(argv[1], NULL, 0);
char *key = argv[2];
@@ -353,7 +354,7 @@ static int do_tpm_pcr_setauthvalue(cmd_tbl_t *cmdtp, int flag,
key, key_sz));
}
-static cmd_tbl_t tpm2_commands[] = {
+static struct cmd_tbl tpm2_commands[] = {
U_BOOT_CMD_MKENT(device, 0, 1, do_tpm_device, "", ""),
U_BOOT_CMD_MKENT(info, 0, 1, do_tpm_info, "", ""),
U_BOOT_CMD_MKENT(init, 0, 1, do_tpm_init, "", ""),
@@ -372,7 +373,7 @@ static cmd_tbl_t tpm2_commands[] = {
do_tpm_pcr_setauthvalue, "", ""),
};
-cmd_tbl_t *get_tpm2_commands(unsigned int *size)
+struct cmd_tbl *get_tpm2_commands(unsigned int *size)
{
*size = ARRAY_SIZE(tpm2_commands);
diff --git a/cmd/tpm_test.c b/cmd/tpm_test.c
index 2cde517d7a..ebfb25cab0 100644
--- a/cmd/tpm_test.c
+++ b/cmd/tpm_test.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <command.h>
#include <cpu_func.h>
+#include <log.h>
#include <tpm-v1.h>
#include "tpm-user-utils.h"
@@ -483,8 +484,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 +514,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 +531,10 @@ static cmd_tbl_t cmd_cros_tpm_sub[] = {
VOIDENT(timer)
};
-static int do_tpmtest(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_tpmtest(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
- cmd_tbl_t *c;
+ struct cmd_tbl *c;
int i;
printf("argc = %d, argv = ", argc);
diff --git a/cmd/trace.c b/cmd/trace.c
index 392b129536..4ce47c7627 100644
--- a/cmd/trace.c
+++ b/cmd/trace.c
@@ -10,7 +10,7 @@
#include <trace.h>
#include <asm/io.h>
-static int get_args(int argc, char * const argv[], char **buff,
+static int get_args(int argc, char *const argv[], char **buff,
size_t *buff_ptr, size_t *buff_size)
{
if (argc < 2)
@@ -29,7 +29,7 @@ static int get_args(int argc, char * const argv[], char **buff,
return 0;
}
-static int create_func_list(int argc, char * const argv[])
+static int create_func_list(int argc, char *const argv[])
{
size_t buff_size, avail, buff_ptr, needed, used;
char *buff;
@@ -52,7 +52,7 @@ static int create_func_list(int argc, char * const argv[])
return 0;
}
-static int create_call_list(int argc, char * const argv[])
+static int create_call_list(int argc, char *const argv[])
{
size_t buff_size, avail, buff_ptr, needed, used;
char *buff;
@@ -76,7 +76,7 @@ static int create_call_list(int argc, char * const argv[])
return 0;
}
-int do_trace(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_trace(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
const char *cmd = argc < 2 ? NULL : argv[1];
diff --git a/cmd/tsi148.c b/cmd/tsi148.c
index 369a2b5ab3..2eae14f87f 100644
--- a/cmd/tsi148.c
+++ b/cmd/tsi148.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <command.h>
+#include <log.h>
#include <malloc.h>
#include <asm/io.h>
#include <pci.h>
@@ -382,7 +383,7 @@ int tsi148_vme_crg_window(unsigned int vmeAddr, int vam)
/*
* Tundra Tsi148 configuration
*/
-int do_tsi148(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_tsi148(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
ulong addr1 = 0, addr2 = 0, size = 0, vam = 0, vdw = 0;
char cmd = 'x';
diff --git a/cmd/ubi.c b/cmd/ubi.c
index 54d128dbc5..171377cc66 100644
--- a/cmd/ubi.c
+++ b/cmd/ubi.c
@@ -528,7 +528,7 @@ int ubi_part(char *part_name, const char *vid_header_offset)
return 0;
}
-static int do_ubi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_ubi(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
int64_t size = 0;
ulong addr = 0;
diff --git a/cmd/ubifs.c b/cmd/ubifs.c
index e4000b7ad1..a26b653d61 100644
--- a/cmd/ubifs.c
+++ b/cmd/ubifs.c
@@ -14,6 +14,7 @@
#include <common.h>
#include <config.h>
#include <command.h>
+#include <log.h>
#include <ubifs_uboot.h>
static int ubifs_initialized;
@@ -38,8 +39,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 +72,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 +81,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 +105,8 @@ static int do_ubifs_ls(cmd_tbl_t *cmdtp, int flag, int argc,
return ret;
}
-static int do_ubifs_load(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_ubifs_load(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
char *filename;
char *endp;
diff --git a/cmd/ufs.c b/cmd/ufs.c
index 5b25788656..858cd49b59 100644
--- a/cmd/ufs.c
+++ b/cmd/ufs.c
@@ -9,7 +9,7 @@
#include <command.h>
#include <ufs.h>
-static int do_ufs(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_ufs(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
int dev, ret;
diff --git a/cmd/universe.c b/cmd/universe.c
index dc9a8b5617..5ff47dde4f 100644
--- a/cmd/universe.c
+++ b/cmd/universe.c
@@ -298,7 +298,7 @@ int universe_vme_slave_window(unsigned int vmeAddr, unsigned int pciAddr, int si
/*
* Tundra Universe configuration
*/
-int do_universe(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_universe(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
ulong addr1 = 0, addr2 = 0, size = 0, vam = 0, pms = 0, vdw = 0;
char cmd = 'x';
diff --git a/cmd/unlz4.c b/cmd/unlz4.c
index 5320b378d3..4ae7f34d36 100644
--- a/cmd/unlz4.c
+++ b/cmd/unlz4.c
@@ -9,7 +9,8 @@
#include <env.h>
#include <lz4.h>
-static int do_unlz4(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_unlz4(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
unsigned long src, dst;
size_t src_len = ~0UL, dst_len = ~0UL;
diff --git a/cmd/unzip.c b/cmd/unzip.c
index afd58e7cdb..9b28328a1d 100644
--- a/cmd/unzip.c
+++ b/cmd/unzip.c
@@ -8,8 +8,10 @@
#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[])
+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;
@@ -41,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 dd9ac0bc97..b9ec29a845 100644
--- a/cmd/usb.c
+++ b/cmd/usb.c
@@ -11,6 +11,8 @@
*/
#include <common.h>
+#include <blk.h>
+#include <bootstage.h>
#include <command.h>
#include <console.h>
#include <dm.h>
@@ -554,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);
}
@@ -623,7 +626,7 @@ static void usb_show_info(struct usb_device *udev)
/******************************************************************************
* usb command intepreter
*/
-static int do_usb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_usb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
struct usb_device *udev = NULL;
int i;
diff --git a/cmd/usb_gadget_sdp.c b/cmd/usb_gadget_sdp.c
index 2ead06be9f..1af82e1136 100644
--- a/cmd/usb_gadget_sdp.c
+++ b/cmd/usb_gadget_sdp.c
@@ -7,11 +7,12 @@
*/
#include <common.h>
+#include <command.h>
#include <g_dnl.h>
#include <sdp.h>
#include <usb.h>
-static int do_sdp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_sdp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
int ret;
diff --git a/cmd/usb_mass_storage.c b/cmd/usb_mass_storage.c
index c5c6899787..d565635c6c 100644
--- a/cmd/usb_mass_storage.c
+++ b/cmd/usb_mass_storage.c
@@ -6,16 +6,18 @@
* 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>
#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)
@@ -55,7 +57,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;
@@ -134,8 +136,8 @@ cleanup:
return ret;
}
-static int do_usb_mass_storage(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+static int do_usb_mass_storage(struct cmd_tbl *cmdtp, int flag,
+ int argc, char *const argv[])
{
const char *usb_controller;
const char *devtype;
diff --git a/cmd/version.c b/cmd/version.c
index b2fffe9977..3686b87332 100644
--- a/cmd/version.c
+++ b/cmd/version.c
@@ -14,7 +14,8 @@
const char __weak version_string[] = U_BOOT_VERSION_STRING;
-static int do_version(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_version(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
char buf[DISPLAY_OPTIONS_BANNER_LENGTH];
diff --git a/cmd/virtio.c b/cmd/virtio.c
index b7082bc63a..3dace5344f 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>
@@ -12,7 +13,8 @@
static int virtio_curr_dev;
-static int do_virtio(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_virtio(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
if (argc == 2 && !strcmp(argv[1], "scan")) {
/* make sure all virtio devices are enumerated */
diff --git a/cmd/w1.c b/cmd/w1.c
index 9c95fcf9cd..92be1f2531 100644
--- a/cmd/w1.c
+++ b/cmd/w1.c
@@ -103,7 +103,7 @@ static int w1_read(int argc, char *const argv[])
return CMD_RET_SUCCESS;
}
-int do_w1(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_w1(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
if (argc < 2)
return CMD_RET_USAGE;
diff --git a/cmd/wdt.c b/cmd/wdt.c
index 647d9899b4..27410981e7 100644
--- a/cmd/wdt.c
+++ b/cmd/wdt.c
@@ -12,7 +12,7 @@
static struct udevice *currdev;
-static int do_wdt_list(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_wdt_list(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
struct udevice *dev;
@@ -29,7 +29,7 @@ static int do_wdt_list(cmd_tbl_t *cmdtp, int flag, int argc,
return CMD_RET_SUCCESS;
}
-static int do_wdt_dev(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_wdt_dev(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
int ret;
@@ -60,7 +60,7 @@ static int check_currdev(void)
return 0;
}
-static int do_wdt_start(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_wdt_start(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
int ret;
@@ -90,7 +90,7 @@ static int do_wdt_start(cmd_tbl_t *cmdtp, int flag, int argc,
return CMD_RET_SUCCESS;
}
-static int do_wdt_stop(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_wdt_stop(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
int ret;
@@ -111,7 +111,7 @@ static int do_wdt_stop(cmd_tbl_t *cmdtp, int flag, int argc,
return CMD_RET_SUCCESS;
}
-static int do_wdt_reset(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_wdt_reset(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
int ret;
@@ -132,7 +132,7 @@ static int do_wdt_reset(cmd_tbl_t *cmdtp, int flag, int argc,
return CMD_RET_SUCCESS;
}
-static int do_wdt_expire(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_wdt_expire(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
int ret;
diff --git a/cmd/wol.c b/cmd/wol.c
index 8a756f373c..f0d6343227 100644
--- a/cmd/wol.c
+++ b/cmd/wol.c
@@ -14,7 +14,7 @@
#if defined(CONFIG_CMD_WOL)
void wol_set_timeout(ulong);
-int do_wol(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_wol(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
/* Validate arguments */
if (argc < 2)
diff --git a/cmd/x86/exception.c b/cmd/x86/exception.c
index ade1e2ea92..82faaa913e 100644
--- a/cmd/x86/exception.c
+++ b/cmd/x86/exception.c
@@ -8,14 +8,14 @@
#include <common.h>
#include <command.h>
-static int do_undefined(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_undefined(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
asm volatile (".word 0xffff\n");
return CMD_RET_FAILURE;
}
-static cmd_tbl_t cmd_sub[] = {
+static struct cmd_tbl cmd_sub[] = {
U_BOOT_CMD_MKENT(undefined, CONFIG_SYS_MAXARGS, 1, do_undefined,
"", ""),
};
diff --git a/cmd/x86/fsp.c b/cmd/x86/fsp.c
index 6e485fb144..8017eda387 100644
--- a/cmd/x86/fsp.c
+++ b/cmd/x86/fsp.c
@@ -9,7 +9,7 @@
DECLARE_GLOBAL_DATA_PTR;
-static int do_hdr(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_hdr(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
struct fsp_header *hdr;
u32 img_addr;
@@ -80,13 +80,13 @@ static int do_hdr(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return 0;
}
-static cmd_tbl_t fsp_commands[] = {
+static struct cmd_tbl fsp_commands[] = {
U_BOOT_CMD_MKENT(hdr, 0, 1, do_hdr, "", ""),
};
-static int do_fsp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_fsp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
- cmd_tbl_t *fsp_cmd;
+ struct cmd_tbl *fsp_cmd;
int ret;
if (argc < 2)
diff --git a/cmd/x86/hob.c b/cmd/x86/hob.c
index 3967a7ca5a..6b1f7bda5b 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;
@@ -25,7 +26,7 @@ static char *hob_type[] = {
"Capsule",
};
-static int do_hob(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_hob(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
const struct hob_header *hdr;
uint type;
diff --git a/cmd/x86/mtrr.c b/cmd/x86/mtrr.c
index d3fd959235..2c40e711a1 100644
--- a/cmd/x86/mtrr.c
+++ b/cmd/x86/mtrr.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <command.h>
#include <asm/msr.h>
#include <asm/mtrr.h>
@@ -43,7 +44,7 @@ static int do_mtrr_list(void)
return 0;
}
-static int do_mtrr_set(uint reg, int argc, char * const argv[])
+static int do_mtrr_set(uint reg, int argc, char *const argv[])
{
const char *typename = argv[0];
struct mtrr_state state;
@@ -98,7 +99,8 @@ static int mtrr_set_valid(int reg, bool valid)
return 0;
}
-static int do_mtrr(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_mtrr(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
const char *cmd;
uint reg;
diff --git a/cmd/ximg.c b/cmd/ximg.c
index 770f6a3eed..159ba51648 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
@@ -32,7 +33,7 @@
#endif
static int
-do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+do_imgextract(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
ulong addr = image_load_addr;
ulong dest = 0;
diff --git a/cmd/yaffs2.c b/cmd/yaffs2.c
index 9244606bda..f29ebcc026 100644
--- a/cmd/yaffs2.c
+++ b/cmd/yaffs2.c
@@ -43,7 +43,7 @@ extern void cmd_yaffs_mv(const char *oldPath, const char *newPath);
extern int yaffs_dump_dev(const char *path);
/* ytrace - show/set yaffs trace mask */
-int do_ytrace(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_ytrace(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
if (argc > 1)
cmd_yaffs_tracemask(1, simple_strtol(argv[1], NULL, 16));
@@ -54,7 +54,7 @@ int do_ytrace(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
}
/* ydevls - lists yaffs mount points. */
-int do_ydevls(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_ydevls(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
cmd_yaffs_dev_ls();
@@ -62,7 +62,7 @@ int do_ydevls(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
}
/* ydevconfig mount_pt mtd_dev_num start_block end_block */
-int do_ydevconfig(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_ydevconfig(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
char *mtpoint;
int mtd_dev;
@@ -85,7 +85,7 @@ int do_ydevconfig(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
return 0;
}
-int do_ymount(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_ymount(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
char *mtpoint;
@@ -102,7 +102,7 @@ int do_ymount(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
return 0;
}
-int do_yumount(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_yumount(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
char *mtpoint;
@@ -118,7 +118,7 @@ int do_yumount(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
return 0;
}
-int do_yls(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_yls(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
char *dirname;
@@ -134,7 +134,7 @@ int do_yls(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
return 0;
}
-int do_yrd(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_yrd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
char *filename;
@@ -153,7 +153,7 @@ int do_yrd(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
return 0;
}
-int do_ywr(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_ywr(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
char *filename;
ulong value;
@@ -177,7 +177,7 @@ int do_ywr(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
return 0;
}
-int do_yrdm(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_yrdm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
char *filename;
ulong addr;
@@ -195,7 +195,7 @@ int do_yrdm(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
return 0;
}
-int do_ywrm(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_ywrm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
char *filename;
ulong addr;
@@ -215,7 +215,7 @@ int do_ywrm(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
return 0;
}
-int do_ymkdir(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_ymkdir(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
char *dirname;
@@ -230,7 +230,7 @@ int do_ymkdir(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
return 0;
}
-int do_yrmdir(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_yrmdir(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
char *dirname;
@@ -245,7 +245,7 @@ int do_yrmdir(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
return 0;
}
-int do_yrm(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_yrm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
char *name;
@@ -261,7 +261,7 @@ int do_yrm(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
return 0;
}
-int do_ymv(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_ymv(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
char *oldPath;
char *newPath;
diff --git a/cmd/zfs.c b/cmd/zfs.c
index 9c237a5758..e429ac88d7 100644
--- a/cmd/zfs.c
+++ b/cmd/zfs.c
@@ -32,13 +32,14 @@
#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;
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;
@@ -129,13 +130,13 @@ 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;
struct blk_desc *dev_desc;
- disk_partition_t info;
+ struct disk_partition info;
struct device_s vdev;
if (argc < 2)
diff --git a/cmd/zip.c b/cmd/zip.c
index 8ef46e9815..b433f1889f 100644
--- a/cmd/zip.c
+++ b/cmd/zip.c
@@ -8,7 +8,7 @@
#include <command.h>
#include <env.h>
-static int do_zip(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_zip(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
unsigned long src, dst;
unsigned long src_len, dst_len = ~0UL;
diff --git a/common/android_ab.c b/common/android_ab.c
index e0fe32d24d..4943f26d53 100644
--- a/common/android_ab.c
+++ b/common/android_ab.c
@@ -5,9 +5,12 @@
#include <common.h>
#include <android_ab.h>
#include <android_bootloader_message.h>
+#include <blk.h>
+#include <log.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>
@@ -81,7 +84,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 +134,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 +181,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/autoboot.c b/common/autoboot.c
index 4ea9be6da9..6d78716a26 100644
--- a/common/autoboot.c
+++ b/common/autoboot.c
@@ -13,11 +13,13 @@
#include <env.h>
#include <fdtdec.h>
#include <hash.h>
+#include <log.h>
#include <malloc.h>
#include <memalign.h>
#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/bedbug.c b/common/bedbug.c
index 42ecf61eff..18a35ca23e 100644
--- a/common/bedbug.c
+++ b/common/bedbug.c
@@ -1,6 +1,7 @@
/* $Id$ */
#include <common.h>
+#include <asm/ptrace.h>
#include <linux/ctype.h>
#include <bedbug/bedbug.h>
diff --git a/common/board_f.c b/common/board_f.c
index a5ead31ca7..01194eaa0e 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>
@@ -25,6 +26,7 @@
#include <init.h>
#include <initcall.h>
#include <lcd.h>
+#include <log.h>
#include <malloc.h>
#include <mapmem.h>
#include <os.h>
@@ -40,6 +42,7 @@
#include <trace.h>
#include <video.h>
#include <watchdog.h>
+#include <asm/cache.h>
#ifdef CONFIG_MACH_TYPE
#include <asm/mach-types.h>
#endif
@@ -822,9 +825,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_info.c b/common/board_info.c
index a392bece62..a6db087f96 100644
--- a/common/board_info.c
+++ b/common/board_info.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0+
#include <common.h>
+#include <init.h>
#include <linux/libfdt.h>
#include <linux/compiler.h>
diff --git a/common/board_r.c b/common/board_r.c
index 96034b874e..bce87cbf01 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -11,12 +11,16 @@
#include <common.h>
#include <api.h>
+#include <bootstage.h>
#include <cpu_func.h>
#include <exports.h>
+#include <flash.h>
#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>
/* TODO: can we just include all these headers whether needed or not? */
#if defined(CONFIG_CMD_BEDBUG)
@@ -310,9 +314,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;
@@ -354,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/boot_fit.c b/common/boot_fit.c
index ffa4d740eb..dfc2a3117d 100644
--- a/common/boot_fit.c
+++ b/common/boot_fit.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <errno.h>
#include <image.h>
+#include <log.h>
#include <linux/libfdt.h>
static int fdt_offset(const void *fit)
diff --git a/common/bootm.c b/common/bootm.c
index db4362a643..2ed7521520 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -13,8 +13,11 @@
#include <fdt_support.h>
#include <irq_func.h>
#include <lmb.h>
+#include <log.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>
@@ -40,8 +43,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)
@@ -65,8 +68,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");
@@ -79,8 +82,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;
@@ -236,7 +239,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;
@@ -283,8 +286,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) ||
@@ -518,8 +521,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;
@@ -702,8 +706,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 1d58462509..55296483f7 100644
--- a/common/bootm_os.c
+++ b/common/bootm_os.c
@@ -6,10 +6,14 @@
#include <common.h>
#include <bootm.h>
+#include <bootstage.h>
#include <cpu_func.h>
#include <efi_loader.h>
#include <env.h>
#include <fdt_support.h>
+#include <image.h>
+#include <lmb.h>
+#include <log.h>
#include <linux/libfdt.h>
#include <malloc.h>
#include <mapmem.h>
@@ -18,7 +22,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;
@@ -40,7 +44,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;
@@ -54,8 +58,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;
@@ -126,8 +130,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;
@@ -148,8 +152,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 *);
@@ -181,8 +185,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);
@@ -214,8 +218,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;
@@ -321,7 +325,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)
@@ -339,7 +343,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;
@@ -376,8 +380,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];
@@ -414,8 +418,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);
@@ -447,8 +451,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);
@@ -473,7 +477,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;
@@ -501,7 +505,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;
@@ -604,7 +608,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/bootstage.c b/common/bootstage.c
index d2ed33663b..5f87358fd8 100644
--- a/common/bootstage.c
+++ b/common/bootstage.c
@@ -10,7 +10,9 @@
*/
#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 0ace152b98..6d98920de6 100644
--- a/common/bouncebuf.c
+++ b/common/bouncebuf.c
@@ -7,9 +7,11 @@
#include <common.h>
#include <cpu_func.h>
+#include <log.h>
#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/cli.c b/common/cli.c
index 38bba17585..6635ab2bcf 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>
@@ -128,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;
@@ -182,7 +183,7 @@ bool cli_process_fdt(const char **cmdp)
void cli_secure_boot_cmd(const char *cmd)
{
#ifdef CONFIG_CMDLINE
- cmd_tbl_t *cmdtp;
+ struct cmd_tbl *cmdtp;
#endif
int rc;
diff --git a/common/cli_hush.c b/common/cli_hush.c
index a62af07cc5..5b1f119074 100644
--- a/common/cli_hush.c
+++ b/common/cli_hush.c
@@ -3664,8 +3664,8 @@ static char *make_string(char **inp, int *nonnull)
}
#ifdef __U_BOOT__
-static int do_showvar(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_showvar(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int i, k;
int rcode = 0;
diff --git a/common/cli_readline.c b/common/cli_readline.c
index 6ef7a3e564..1f1e28c6d8 100644
--- a/common/cli_readline.c
+++ b/common/cli_readline.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <bootretry.h>
#include <cli.h>
+#include <command.h>
#include <time.h>
#include <watchdog.h>
diff --git a/common/cli_simple.c b/common/cli_simple.c
index 358e9b7fe1..7d91316a0f 100644
--- a/common/cli_simple.c
+++ b/common/cli_simple.c
@@ -14,6 +14,7 @@
#include <command.h>
#include <console.h>
#include <env.h>
+#include <log.h>
#include <linux/ctype.h>
#define DEBUG_PARSER 0 /* set to 1 to debug */
diff --git a/common/command.c b/common/command.c
index 0d8bf244be..4f49f15bfd 100644
--- a/common/command.c
+++ b/common/command.c
@@ -12,6 +12,7 @@
#include <command.h>
#include <console.h>
#include <env.h>
+#include <log.h>
#include <linux/ctype.h>
/*
@@ -19,14 +20,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 +42,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 +84,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 +119,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 +147,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 +166,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 +180,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 +257,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 +299,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 +327,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 +490,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 +502,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 +510,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 +536,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 +572,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 +583,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 +642,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/common_fit.c b/common/common_fit.c
index 41305d8aa6..a993308100 100644
--- a/common/common_fit.c
+++ b/common/common_fit.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <errno.h>
#include <image.h>
+#include <log.h>
#include <linux/libfdt.h>
ulong fdt_getprop_u32(const void *fdt, int node, const char *prop)
diff --git a/common/console.c b/common/console.c
index e398530a13..1deca3cb78 100644
--- a/common/console.c
+++ b/common/console.c
@@ -19,6 +19,7 @@
#include <exports.h>
#include <env_internal.h>
#include <watchdog.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/common/cros_ec.c b/common/cros_ec.c
index e66471ebd1..249d1f1941 100644
--- a/common/cros_ec.c
+++ b/common/cros_ec.c
@@ -12,6 +12,7 @@
#include <cros_ec.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
struct udevice *board_get_cros_ec_dev(void)
{
diff --git a/common/dfu.c b/common/dfu.c
index da6289b218..d23cf67f19 100644
--- a/common/dfu.c
+++ b/common/dfu.c
@@ -11,6 +11,8 @@
*/
#include <common.h>
+#include <command.h>
+#include <log.h>
#include <watchdog.h>
#include <dfu.h>
#include <console.h>
diff --git a/common/dlmalloc.c b/common/dlmalloc.c
index e8f07f14f9..b29a7cfd93 100644
--- a/common/dlmalloc.c
+++ b/common/dlmalloc.c
@@ -1,4 +1,5 @@
#include <common.h>
+#include <log.h>
#if CONFIG_IS_ENABLED(UNIT_TEST)
#define DEBUG
diff --git a/common/edid.c b/common/edid.c
index f99f42dc40..553ab8fd01 100644
--- a/common/edid.c
+++ b/common/edid.c
@@ -13,6 +13,7 @@
#include <edid.h>
#include <errno.h>
#include <fdtdec.h>
+#include <log.h>
#include <linux/ctype.h>
#include <linux/string.h>
diff --git a/common/exports.c b/common/exports.c
index 18af38a5f6..6253b55694 100644
--- a/common/exports.c
+++ b/common/exports.c
@@ -1,4 +1,5 @@
#include <common.h>
+#include <command.h>
#include <exports.h>
#include <malloc.h>
#include <spi.h>
diff --git a/common/fdt_region.c b/common/fdt_region.c
index bf0a9be730..667659054a 100644
--- a/common/fdt_region.c
+++ b/common/fdt_region.c
@@ -5,6 +5,7 @@
* Written by Simon Glass <sjg@chromium.org>
*/
+#include <fdt_support.h>
#include <linux/libfdt_env.h>
#include <fdt_region.h>
diff --git a/common/fdt_support.c b/common/fdt_support.c
index 02cf5c6241..3778de5368 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -8,7 +8,9 @@
#include <common.h>
#include <env.h>
+#include <log.h>
#include <mapmem.h>
+#include <net.h>
#include <stdio_dev.h>
#include <linux/ctype.h>
#include <linux/types.h>
diff --git a/common/flash.c b/common/flash.c
index 5f155aefd1..bb82385c1f 100644
--- a/common/flash.c
+++ b/common/flash.c
@@ -8,6 +8,8 @@
#include <common.h>
#include <flash.h>
+#include <log.h>
+#include <uuid.h>
#include <mtd/cfi_flash.h>
@@ -24,7 +26,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;
@@ -38,10 +40,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.
@@ -66,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)
@@ -74,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);
}
}
}
@@ -84,7 +86,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 +121,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/common/hash.c b/common/hash.c
index ff4986a619..8c00659d25 100644
--- a/common/hash.c
+++ b/common/hash.c
@@ -13,19 +13,21 @@
#include <common.h>
#include <command.h>
#include <env.h>
+#include <log.h>
#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>
#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>
@@ -443,8 +445,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/hwconfig.c b/common/hwconfig.c
index 72f3c4e0fa..daf3eea5f9 100644
--- a/common/hwconfig.c
+++ b/common/hwconfig.c
@@ -14,6 +14,7 @@
#include <env.h>
#include <exports.h>
#include <hwconfig.h>
+#include <log.h>
#include <linux/types.h>
#include <linux/string.h>
#else
diff --git a/common/image-cipher.c b/common/image-cipher.c
index f50c3d31bd..09869f7846 100644
--- a/common/image-cipher.c
+++ b/common/image-cipher.c
@@ -10,7 +10,7 @@
#include <common.h>
#include <malloc.h>
DECLARE_GLOBAL_DATA_PTR;
-#endif /* !USE_HOSTCC*/
+#endif /* !USE_HOSdTCC*/
#include <image.h>
#include <uboot_aes.h>
#include <u-boot/aes.h>
diff --git a/common/image-fdt.c b/common/image-fdt.c
index 3002948b6b..b63e772bd6 100644
--- a/common/image-fdt.c
+++ b/common/image-fdt.c
@@ -14,6 +14,8 @@
#include <env.h>
#include <errno.h>
#include <image.h>
+#include <lmb.h>
+#include <log.h>
#include <malloc.h>
#include <linux/libfdt.h>
#include <mapmem.h>
@@ -263,8 +265,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-fit-sig.c b/common/image-fit-sig.c
index a3a0c61bcb..cc1967109e 100644
--- a/common/image-fit-sig.c
+++ b/common/image-fit-sig.c
@@ -8,6 +8,7 @@
#include <time.h>
#else
#include <common.h>
+#include <log.h>
#include <malloc.h>
DECLARE_GLOBAL_DATA_PTR;
#endif /* !USE_HOSTCC*/
diff --git a/common/image-fit.c b/common/image-fit.c
index 368b73088a..1ece100a21 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -11,12 +11,14 @@
#ifdef USE_HOSTCC
#include "mkimage.h"
#include <time.h>
+#include <linux/libfdt.h>
#include <u-boot/crc.h>
#else
#include <linux/compiler.h>
#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 84b2c0439c..498969d641 100644
--- a/common/image-sig.c
+++ b/common/image-sig.c
@@ -5,9 +5,12 @@
#ifdef USE_HOSTCC
#include "mkimage.h"
+#include <fdt_support.h>
#include <time.h>
+#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 d8d14e871c..e1ca1a7905 100644
--- a/common/image.c
+++ b/common/image.c
@@ -8,9 +8,13 @@
#ifndef USE_HOSTCC
#include <common.h>
+#include <bootstage.h>
#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>
#include <watchdog.h>
@@ -44,7 +48,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;
@@ -1072,8 +1077,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;
@@ -1368,7 +1373,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;
@@ -1469,8 +1474,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/init/board_init.c b/common/init/board_init.c
index f7c8a173ff..8c8a5eac05 100644
--- a/common/init/board_init.c
+++ b/common/init/board_init.c
@@ -7,6 +7,8 @@
*/
#include <common.h>
+#include <bootstage.h>
+#include <init.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/common/iotrace.c b/common/iotrace.c
index 295ee07b72..7225ee4404 100644
--- a/common/iotrace.c
+++ b/common/iotrace.c
@@ -9,6 +9,7 @@
#include <mapmem.h>
#include <time.h>
#include <asm/io.h>
+#include <linux/bug.h>
#include <u-boot/crc.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/common/kgdb.c b/common/kgdb.c
index daf53bed7a..4493a15919 100644
--- a/common/kgdb.c
+++ b/common/kgdb.c
@@ -88,6 +88,7 @@
****************************************************************************/
#include <common.h>
+#include <asm/ptrace.h>
#include <kgdb.h>
#include <command.h>
@@ -574,7 +575,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/kgdb_stubs.c b/common/kgdb_stubs.c
index c061126bed..66aed7cea1 100644
--- a/common/kgdb_stubs.c
+++ b/common/kgdb_stubs.c
@@ -11,6 +11,7 @@
#include <cpu_func.h>
#include <kgdb.h>
#include <serial.h>
+#include <asm/ptrace.h>
int (*debugger_exception_handler)(struct pt_regs *);
diff --git a/common/lcd.c b/common/lcd.c
index f8bc1ceba7..02f2db3a99 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -12,6 +12,9 @@
#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>
#include <stdio_dev.h>
#include <lcd.h>
diff --git a/common/lcd_console.c b/common/lcd_console.c
index d34bc2fa83..1a246c492c 100644
--- a/common/lcd_console.c
+++ b/common/lcd_console.c
@@ -7,7 +7,9 @@
*/
#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)
@@ -219,7 +221,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 +236,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/common/log_syslog.c b/common/log_syslog.c
index 5e3e20e8a4..698c585fa1 100644
--- a/common/log_syslog.c
+++ b/common/log_syslog.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <log.h>
+#include <net.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/common/main.c b/common/main.c
index 06d7ff56d6..4b3cd302c3 100644
--- a/common/main.c
+++ b/common/main.c
@@ -8,11 +8,13 @@
#include <common.h>
#include <autoboot.h>
+#include <bootstage.h>
#include <cli.h>
#include <command.h>
#include <console.h>
#include <env.h>
#include <init.h>
+#include <net.h>
#include <version.h>
static void run_preboot_environment_command(void)
diff --git a/common/malloc_simple.c b/common/malloc_simple.c
index eabbb70128..34f0b49093 100644
--- a/common/malloc_simple.c
+++ b/common/malloc_simple.c
@@ -8,6 +8,7 @@
#define LOG_CATEGORY LOGC_ALLOC
#include <common.h>
+#include <log.h>
#include <malloc.h>
#include <mapmem.h>
#include <asm/io.h>
diff --git a/common/miiphyutil.c b/common/miiphyutil.c
index 2db067876e..7d4d15ed91 100644
--- a/common/miiphyutil.c
+++ b/common/miiphyutil.c
@@ -11,8 +11,10 @@
#include <common.h>
#include <dm.h>
+#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/spl/spl.c b/common/spl/spl.c
index fc5cbbbeba..7ea0b06a80 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -9,10 +9,13 @@
#include <common.h>
#include <bloblist.h>
#include <binman_sym.h>
+#include <bootstage.h>
#include <dm.h>
#include <handoff.h>
#include <hang.h>
+#include <init.h>
#include <irq_func.h>
+#include <log.h>
#include <serial.h>
#include <spl.h>
#include <asm/u-boot.h>
@@ -423,11 +426,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/common/spl/spl_atf.c b/common/spl/spl_atf.c
index 702367b2a2..b54b4f0d22 100644
--- a/common/spl/spl_atf.c
+++ b/common/spl/spl_atf.c
@@ -13,7 +13,10 @@
#include <atf_common.h>
#include <cpu_func.h>
#include <errno.h>
+#include <image.h>
+#include <log.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_ext.c b/common/spl/spl_ext.c
index 2a6252229c..3898041d10 100644
--- a/common/spl/spl_ext.c
+++ b/common/spl/spl_ext.c
@@ -2,6 +2,7 @@
#include <common.h>
#include <env.h>
+#include <part.h>
#include <spl.h>
#include <asm/u-boot.h>
#include <ext4fs.h>
@@ -15,7 +16,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 +70,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_fat.c b/common/spl/spl_fat.c
index aa371ab52c..c2eb097365 100644
--- a/common/spl/spl_fat.c
+++ b/common/spl/spl_fat.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <env.h>
+#include <log.h>
#include <spl.h>
#include <asm/u-boot.h>
#include <fat.h>
diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
index c51e4beb1c..f581a22421 100644
--- a/common/spl/spl_fit.c
+++ b/common/spl/spl_fit.c
@@ -10,8 +10,10 @@
#include <fpga.h>
#include <gzip.h>
#include <image.h>
+#include <log.h>
#include <malloc.h>
#include <spl.h>
+#include <asm/cache.h>
#include <linux/libfdt.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/common/spl/spl_legacy.c b/common/spl/spl_legacy.c
index 29d3ec7073..82d0326806 100644
--- a/common/spl/spl_legacy.c
+++ b/common/spl/spl_legacy.c
@@ -4,6 +4,8 @@
*/
#include <common.h>
+#include <image.h>
+#include <log.h>
#include <malloc.h>
#include <spl.h>
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index a68cdec8dc..add2785b4e 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -7,6 +7,8 @@
*/
#include <common.h>
#include <dm.h>
+#include <log.h>
+#include <part.h>
#include <spl.h>
#include <linux/compiler.h>
#include <errno.h>
@@ -168,7 +170,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/common/spl/spl_nand.c b/common/spl/spl_nand.c
index 5f8a111a2f..48c97549eb 100644
--- a/common/spl/spl_nand.c
+++ b/common/spl/spl_nand.c
@@ -5,6 +5,9 @@
*/
#include <common.h>
#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 30c050c0b3..e140a6306f 100644
--- a/common/spl/spl_net.c
+++ b/common/spl/spl_net.c
@@ -9,6 +9,8 @@
#include <common.h>
#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 3f03ffe6a3..5270401db0 100644
--- a/common/spl/spl_nor.c
+++ b/common/spl/spl_nor.c
@@ -4,6 +4,8 @@
*/
#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 ee30f328e6..93cbf47e82 100644
--- a/common/spl/spl_onenand.c
+++ b/common/spl/spl_onenand.c
@@ -9,6 +9,8 @@
*/
#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_opensbi.c b/common/spl/spl_opensbi.c
index 3519c34299..e88136e6f3 100644
--- a/common/spl/spl_opensbi.c
+++ b/common/spl/spl_opensbi.c
@@ -9,9 +9,11 @@
#include <cpu_func.h>
#include <errno.h>
#include <hang.h>
+#include <image.h>
#include <spl.h>
#include <asm/smp.h>
#include <opensbi.h>
+#include <linux/libfdt.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/common/spl/spl_ram.c b/common/spl/spl_ram.c
index 954e91a004..df1d5b43d8 100644
--- a/common/spl/spl_ram.c
+++ b/common/spl/spl_ram.c
@@ -11,6 +11,8 @@
*/
#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 644dfa8cc3..e7f7b68411 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 288dbb5fa9..2744fb5d52 100644
--- a/common/spl/spl_spi.c
+++ b/common/spl/spl_spi.c
@@ -9,6 +9,8 @@
*/
#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_ubi.c b/common/spl/spl_ubi.c
index 0cb5080882..de6a63bd2d 100644
--- a/common/spl/spl_ubi.c
+++ b/common/spl/spl_ubi.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <config.h>
+#include <image.h>
#include <nand.h>
#include <onenand_uboot.h>
#include <ubispl.h>
diff --git a/common/spl/spl_usb.c b/common/spl/spl_usb.c
index e29d579b0d..08837b38fc 100644
--- a/common/spl/spl_usb.c
+++ b/common/spl/spl_usb.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <log.h>
#include <spl.h>
#include <asm/u-boot.h>
#include <errno.h>
diff --git a/common/spl/spl_xip.c b/common/spl/spl_xip.c
index 1af4da8725..8ce0a09ef3 100644
--- a/common/spl/spl_xip.c
+++ b/common/spl/spl_xip.c
@@ -5,6 +5,8 @@
*/
#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 8500ee8ba5..284512478f 100644
--- a/common/spl/spl_ymodem.c
+++ b/common/spl/spl_ymodem.c
@@ -10,6 +10,8 @@
*/
#include <common.h>
#include <gzip.h>
+#include <image.h>
+#include <log.h>
#include <spl.h>
#include <xyzModem.h>
#include <asm/u-boot.h>
diff --git a/common/splash_source.c b/common/splash_source.c
index 2ff15208a7..f51ca5ddf3 100644
--- a/common/splash_source.c
+++ b/common/splash_source.c
@@ -13,6 +13,7 @@
#include <fs.h>
#include <fdt_support.h>
#include <image.h>
+#include <log.h>
#include <nand.h>
#include <sata.h>
#include <spi.h>
diff --git a/common/stdio.c b/common/stdio.c
index 54ecc9b53d..2119204b98 100644
--- a/common/stdio.c
+++ b/common/stdio.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <stdarg.h>
#include <malloc.h>
#include <stdio_dev.h>
diff --git a/common/usb.c b/common/usb.c
index 686f09a77d..aad13fd9c5 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>
@@ -37,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 c642b683e7..e578f0be28 100644
--- a/common/usb_hub.c
+++ b/common/usb_hub.c
@@ -26,11 +26,13 @@
#include <dm.h>
#include <env.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include <memalign.h>
#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_kbd.c b/common/usb_kbd.c
index a6221ef716..b316807844 100644
--- a/common/usb_kbd.c
+++ b/common/usb_kbd.c
@@ -11,6 +11,7 @@
#include <dm.h>
#include <env.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include <memalign.h>
#include <stdio_dev.h>
diff --git a/common/usb_storage.c b/common/usb_storage.c
index b291ac55d1..ff25441995 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -33,15 +33,19 @@
#include <common.h>
+#include <blk.h>
#include <command.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#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>
+#include <linux/delay.h>
#include <part.h>
#include <usb.h>
diff --git a/disk/part.c b/disk/part.c
index 4cc2fc19f7..f6a31025dc 100644
--- a/disk/part.c
+++ b/disk/part.c
@@ -5,10 +5,12 @@
*/
#include <common.h>
+#include <blk.h>
#include <command.h>
#include <env.h>
#include <errno.h>
#include <ide.h>
+#include <log.h>
#include <malloc.h>
#include <part.h>
#include <ubifs_uboot.h>
@@ -318,7 +320,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 +353,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 +434,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 +444,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 +649,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 +674,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 +696,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 +728,7 @@ static int part_get_info_by_dev_and_name(const char *dev_iface,
int part_get_info_by_dev_and_name_or_num(const char *dev_iface,
const char *dev_part_str,
struct blk_desc **dev_desc,
- disk_partition_t *part_info)
+ struct disk_partition *part_info)
{
/* Split the part_name if passed as "$dev_num#part_name". */
if (!part_get_info_by_dev_and_name(dev_iface, dev_part_str,
diff --git a/disk/part_amiga.c b/disk/part_amiga.c
index 5a2bb718b5..7eea60b564 100644
--- a/disk/part_amiga.c
+++ b/disk/part_amiga.c
@@ -9,6 +9,7 @@
#include <env.h>
#include <ide.h>
#include "part_amiga.h"
+#include <part.h>
#ifdef CONFIG_HAVE_BLOCK_DEVICE
@@ -291,7 +292,7 @@ static struct partition_block *find_partition(struct blk_desc *dev_desc,
* Get info about a partition
*/
static int part_get_info_amiga(struct blk_desc *dev_desc, int part,
- disk_partition_t *info)
+ struct disk_partition *info)
{
struct partition_block *p = find_partition(dev_desc, part-1);
struct amiga_part_geometry *g;
diff --git a/disk/part_dos.c b/disk/part_dos.c
index 813379f851..04f53106f7 100644
--- a/disk/part_dos.c
+++ b/disk/part_dos.c
@@ -14,10 +14,12 @@
*/
#include <common.h>
+#include <blk.h>
#include <command.h>
#include <ide.h>
#include <memalign.h>
#include "part_dos.h"
+#include <part.h>
#ifdef CONFIG_HAVE_BLOCK_DEVICE
@@ -213,7 +215,7 @@ static void print_partition_extended(struct blk_desc *dev_desc,
static int part_get_info_extended(struct blk_desc *dev_desc,
lbaint_t ext_part_sector, lbaint_t relative,
int part_num, int which_part,
- disk_partition_t *info, unsigned int disksig)
+ struct disk_partition *info, uint disksig)
{
ALLOC_CACHE_ALIGN_BUFFER(unsigned char, buffer, dev_desc->blksz);
dos_partition_t *pt;
@@ -317,7 +319,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 83876a7bd9..de3491821f 100644
--- a/disk/part_efi.c
+++ b/disk/part_efi.c
@@ -9,8 +9,13 @@
* 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 <asm/unaligned.h>
#include <common.h>
+#include <blk.h>
+#include <log.h>
+#include <part.h>
+#include <uuid.h>
+#include <asm/cache.h>
+#include <asm/unaligned.h>
#include <command.h>
#include <fdtdec.h>
#include <ide.h>
@@ -257,7 +262,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;
@@ -411,7 +416,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)
@@ -601,7 +606,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;
@@ -696,7 +701,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 e733227f59..822f2c4d9f 100644
--- a/disk/part_iso.c
+++ b/disk/part_iso.c
@@ -5,7 +5,10 @@
*/
#include <common.h>
+#include <blk.h>
#include <command.h>
+#include <part.h>
+#include <asm/cache.h>
#include <asm/unaligned.h>
#include "part_iso.h"
@@ -46,7 +49,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;
@@ -199,14 +202,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) {
@@ -225,7 +228,7 @@ static void part_print_iso(struct blk_desc *dev_desc)
static int part_test_iso(struct blk_desc *dev_desc)
{
- disk_partition_t info;
+ struct disk_partition info;
return part_get_info_iso_verb(dev_desc, 1, &info, 0);
}
diff --git a/disk/part_mac.c b/disk/part_mac.c
index 8b2c004027..e01ae74566 100644
--- a/disk/part_mac.c
+++ b/disk/part_mac.c
@@ -14,9 +14,11 @@
#include <common.h>
#include <command.h>
+#include <log.h>
#include <memalign.h>
#include <ide.h>
#include "part_mac.h"
+#include <part.h>
#ifdef CONFIG_HAVE_BLOCK_DEVICE
@@ -214,7 +216,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/doc/README.commands b/doc/README.commands
index 4e9e8098fa..716ad227aa 100644
--- a/doc/README.commands
+++ b/doc/README.commands
@@ -3,7 +3,7 @@ Command definition
Commands are added to U-Boot by creating a new command structure.
This is done by first including command.h, then using the U_BOOT_CMD() or the
-U_BOOT_CMD_COMPLETE macro to fill in a cmd_tbl_t struct.
+U_BOOT_CMD_COMPLETE macro to fill in a struct cmd_tbl struct.
U_BOOT_CMD(name, maxargs, repeatable, command, "usage", "help")
U_BOOT_CMD_COMPLETE(name, maxargs, repeatable, command, "usage, "help", comp)
@@ -31,7 +31,7 @@ comp: Pointer to the completion function. May be NULL.
Sub-command definition
----------------------
-Likewise an array of cmd_tbl_t holding sub-commands can be created using either
+Likewise an array of struct cmd_tbl holding sub-commands can be created using either
of the following macros:
* U_BOOT_CMD_MKENT(name, maxargs, repeatable, command, "usage", "help")
@@ -40,14 +40,14 @@ of the following macros:
This table has to be evaluated in the command function of the main command, e.g.
- static cmd_tbl_t cmd_sub[] = {
+ static struct cmd_tbl cmd_sub[] = {
U_BOOT_CMD_MKENT(foo, CONFIG_SYS_MAXARGS, 1, do_foo, "", ""),
U_BOOT_CMD_MKENT(bar, CONFIG_SYS_MAXARGS, 1, do_bar, "", ""),
};
- static int do_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+ static int do_cmd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
- cmd_tbl_t *cp;
+ struct cmd_tbl *cp;
if (argc < 2)
return CMD_RET_USAGE;
@@ -68,7 +68,7 @@ Command function
----------------
The command function pointer has to be of type
-int (*cmd)(struct cmd_tbl_s *cmdtp, int flag, int argc, const char *argv[]);
+int (*cmd)(struct cmd_tbl *cmdtp, int flag, int argc, const char *argv[]);
cmdtp: Table entry describing the command (see above).
diff --git a/doc/README.standalone b/doc/README.standalone
index 28ebde1dec..874ca2f7c6 100644
--- a/doc/README.standalone
+++ b/doc/README.standalone
@@ -40,7 +40,7 @@ Design Notes on Exporting U-Boot Functions to Standalone Applications:
that returns the ABI version of the running U-Boot. I.e., a
typical application startup may look like this:
- int my_app (int argc, char * const argv[])
+ int my_app (int argc, char *const argv[])
{
app_startup (argv);
if (get_version () != XF_VERSION)
diff --git a/drivers/adc/adc-uclass.c b/drivers/adc/adc-uclass.c
index 0a492eba54..d435667258 100644
--- a/drivers/adc/adc-uclass.c
+++ b/drivers/adc/adc-uclass.c
@@ -12,6 +12,7 @@
#include <dm/device-internal.h>
#include <dm/uclass-internal.h>
#include <adc.h>
+#include <linux/delay.h>
#include <power/regulator.h>
#define ADC_UCLASS_PLATDATA_SIZE sizeof(struct adc_uclass_platdata)
diff --git a/drivers/adc/meson-saradc.c b/drivers/adc/meson-saradc.c
index f7c919d3b0..72b0cc4e5b 100644
--- a/drivers/adc/meson-saradc.c
+++ b/drivers/adc/meson-saradc.c
@@ -14,6 +14,8 @@
#include <regmap.h>
#include <errno.h>
#include <asm/io.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <linux/math64.h>
#include <linux/bitfield.h>
diff --git a/drivers/adc/rockchip-saradc.c b/drivers/adc/rockchip-saradc.c
index 850142cce3..561740f63b 100644
--- a/drivers/adc/rockchip-saradc.c
+++ b/drivers/adc/rockchip-saradc.c
@@ -11,6 +11,7 @@
#include <dm.h>
#include <errno.h>
#include <asm/io.h>
+#include <linux/bitops.h>
#include <linux/err.h>
#define SARADC_CTRL_CHN_MASK GENMASK(2, 0)
diff --git a/drivers/adc/stm32-adc-core.c b/drivers/adc/stm32-adc-core.c
index 2ca0fb4f10..31bbb6f9d6 100644
--- a/drivers/adc/stm32-adc-core.c
+++ b/drivers/adc/stm32-adc-core.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <asm/io.h>
#include <dm/device_compat.h>
+#include <linux/bitops.h>
#include <power/regulator.h>
#include "stm32-adc-core.h"
diff --git a/drivers/adc/stm32-adc.c b/drivers/adc/stm32-adc.c
index ca1ac3e757..b12f894a9b 100644
--- a/drivers/adc/stm32-adc.c
+++ b/drivers/adc/stm32-adc.c
@@ -10,6 +10,8 @@
#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 4cd7420c3c..47cdea1f58 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -9,7 +9,11 @@
* This driver provides a SCSI interface to SATA.
*/
#include <common.h>
+#include <blk.h>
#include <cpu_func.h>
+#include <log.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <command.h>
#include <dm.h>
diff --git a/drivers/ata/ahci_mvebu.c b/drivers/ata/ahci_mvebu.c
index 48a9d00d14..8be1826d40 100644
--- a/drivers/ata/ahci_mvebu.c
+++ b/drivers/ata/ahci_mvebu.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <ahci.h>
#include <dm.h>
+#include <log.h>
/*
* Dummy implementation that can be overwritten by a board
diff --git a/drivers/ata/ahci_sunxi.c b/drivers/ata/ahci_sunxi.c
index 77b932aa03..58e345d998 100644
--- a/drivers/ata/ahci_sunxi.c
+++ b/drivers/ata/ahci_sunxi.c
@@ -1,10 +1,12 @@
#include <common.h>
#include <ahci.h>
#include <dm.h>
+#include <log.h>
#include <scsi.h>
#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 2bc1de8b98..562e982e32 100644
--- a/drivers/ata/dwc_ahsata.c
+++ b/drivers/ata/dwc_ahsata.c
@@ -6,20 +6,25 @@
#include <common.h>
#include <ahci.h>
+#include <blk.h>
#include <cpu_func.h>
#include <dm.h>
#include <dwc_ahsata.h>
#include <fis.h>
#include <libata.h>
+#include <log.h>
#include <malloc.h>
#include <memalign.h>
+#include <part.h>
#include <sata.h>
+#include <asm/cache.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
#include <asm/arch/sys_proto.h>
#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 c6680dc1c9..8c6726a621 100644
--- a/drivers/ata/fsl_sata.c
+++ b/drivers/ata/fsl_sata.c
@@ -6,9 +6,11 @@
*/
#include <common.h>
+#include <blk.h>
#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>
@@ -16,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 6bbb345f6e..41f9a91617 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_ARCH_ORION5X)
#include <asm/arch/orion5x.h>
diff --git a/drivers/ata/sata.c b/drivers/ata/sata.c
index e384b805b2..6a38d50024 100644
--- a/drivers/ata/sata.c
+++ b/drivers/ata/sata.c
@@ -11,7 +11,9 @@
#include <common.h>
#include <ahci.h>
+#include <blk.h>
#include <dm.h>
+#include <part.h>
#include <sata.h>
#ifndef CONFIG_AHCI
diff --git a/drivers/ata/sata_ceva.c b/drivers/ata/sata_ceva.c
index 2d496305d0..77508aa5bc 100644
--- a/drivers/ata/sata_ceva.c
+++ b/drivers/ata/sata_ceva.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <ahci.h>
+#include <log.h>
#include <scsi.h>
#include <asm/io.h>
#include <linux/ioport.h>
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 9ced9c0fa8..b2b5c699ad 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -33,14 +33,19 @@
#include <common.h>
#include <ahci.h>
+#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>
#include <fis.h>
#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>
#include <linux/mbus.h>
diff --git a/drivers/ata/sata_sandbox.c b/drivers/ata/sata_sandbox.c
index a28ac56ccd..e64cc4a5c1 100644
--- a/drivers/ata/sata_sandbox.c
+++ b/drivers/ata/sata_sandbox.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <blk.h>
int init_sata(int dev)
{
diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c
index 71ee0c04ef..6896fa8771 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>
@@ -16,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 41635742a8..4d3a680f17 100644
--- a/drivers/ata/sata_sil3114.c
+++ b/drivers/ata/sata_sil3114.c
@@ -8,6 +8,9 @@
*/
#include <common.h>
+#include <blk.h>
+#include <log.h>
+#include <part.h>
#include <pci.h>
#include <command.h>
#include <config.h>
@@ -16,6 +19,7 @@
#include <ide.h>
#include <sata.h>
#include <libata.h>
+#include <linux/delay.h>
#include "sata_sil3114.h"
/* Convert sectorsize to wordsize */
@@ -61,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.
@@ -118,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) {
@@ -191,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);
@@ -389,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));
@@ -405,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));
@@ -426,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
@@ -613,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/axi-emul-uclass.c b/drivers/axi/axi-emul-uclass.c
index 06c42006ee..b28351f1ad 100644
--- a/drivers/axi/axi-emul-uclass.c
+++ b/drivers/axi/axi-emul-uclass.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <axi.h>
#include <dm.h>
+#include <log.h>
#include <dm/device-internal.h>
#include <asm/axi.h>
diff --git a/drivers/axi/ihs_axi.c b/drivers/axi/ihs_axi.c
index 690aa7796b..3945511090 100644
--- a/drivers/axi/ihs_axi.c
+++ b/drivers/axi/ihs_axi.c
@@ -10,7 +10,10 @@
#include <common.h>
#include <axi.h>
#include <dm.h>
+#include <log.h>
#include <regmap.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
/**
* struct ihs_axi_regs - Structure for the register map of a IHS AXI device
diff --git a/drivers/axi/sandbox_store.c b/drivers/axi/sandbox_store.c
index a6f483ed25..42bcae6af2 100644
--- a/drivers/axi/sandbox_store.c
+++ b/drivers/axi/sandbox_store.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <axi.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
/**
diff --git a/drivers/bios_emulator/atibios.c b/drivers/bios_emulator/atibios.c
index fb806b53d4..9c7f14e98f 100644
--- a/drivers/bios_emulator/atibios.c
+++ b/drivers/bios_emulator/atibios.c
@@ -48,8 +48,10 @@
#include <common.h>
#include <bios_emul.h>
#include <errno.h>
+#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/blk-uclass.c b/drivers/block/blk-uclass.c
index 7c39aa5f2f..b19375cbc8 100644
--- a/drivers/block/blk-uclass.c
+++ b/drivers/block/blk-uclass.c
@@ -7,7 +7,9 @@
#include <common.h>
#include <blk.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
+#include <part.h>
#include <dm/device-internal.h>
#include <dm/lists.h>
#include <dm/uclass-internal.h>
diff --git a/drivers/block/blk_legacy.c b/drivers/block/blk_legacy.c
index 0c343f7b64..e3ee778c29 100644
--- a/drivers/block/blk_legacy.c
+++ b/drivers/block/blk_legacy.c
@@ -5,6 +5,8 @@
*/
#include <common.h>
+#include <blk.h>
+#include <part.h>
#include <linux/err.h>
struct blk_driver *blk_driver_lookup_type(int if_type)
diff --git a/drivers/block/blkcache.c b/drivers/block/blkcache.c
index ea40929e3e..b6fc72fe98 100644
--- a/drivers/block/blkcache.c
+++ b/drivers/block/blkcache.c
@@ -4,8 +4,9 @@
* Author: Eric Nelson<eric@nelint.com>
*
*/
-#include <config.h>
#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 67cc4fbc02..a766b5cf03 100644
--- a/drivers/block/ide.c
+++ b/drivers/block/ide.c
@@ -6,10 +6,14 @@
#include <common.h>
#include <ata.h>
+#include <blk.h>
#include <dm.h>
#include <ide.h>
+#include <log.h>
+#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/board/gazerbeam.c b/drivers/board/gazerbeam.c
index 85de4e440c..ed50fc530c 100644
--- a/drivers/board/gazerbeam.c
+++ b/drivers/board/gazerbeam.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <board.h>
#include <i2c.h>
+#include <log.h>
#include <asm/gpio.h>
#include "gazerbeam.h"
diff --git a/drivers/bootcount/bootcount-uclass.c b/drivers/bootcount/bootcount-uclass.c
index 0689db7a5b..34ac08d59a 100644
--- a/drivers/bootcount/bootcount-uclass.c
+++ b/drivers/bootcount/bootcount-uclass.c
@@ -7,6 +7,7 @@
#include <dm.h>
#include <errno.h>
#include <bootcount.h>
+#include <log.h>
int dm_bootcount_get(struct udevice *dev, u32 *bootcount)
{
diff --git a/drivers/bootcount/bootcount.c b/drivers/bootcount/bootcount.c
index 655dfaf59c..e8db8542f9 100644
--- a/drivers/bootcount/bootcount.c
+++ b/drivers/bootcount/bootcount.c
@@ -6,6 +6,7 @@
#include <bootcount.h>
#include <cpu_func.h>
+#include <asm/cache.h>
#include <linux/compiler.h>
#if !defined(CONFIG_DM_BOOTCOUNT)
diff --git a/drivers/bootcount/bootcount_ram.c b/drivers/bootcount/bootcount_ram.c
index 9c678e25f4..078c84d5ec 100644
--- a/drivers/bootcount/bootcount_ram.c
+++ b/drivers/bootcount/bootcount_ram.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <asm/cache.h>
#include <asm/io.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/bootcount/i2c-eeprom.c b/drivers/bootcount/i2c-eeprom.c
index ee760a2742..a3aa0cf559 100644
--- a/drivers/bootcount/i2c-eeprom.c
+++ b/drivers/bootcount/i2c-eeprom.c
@@ -8,6 +8,7 @@
#include <bootcount.h>
#include <dm.h>
#include <i2c_eeprom.h>
+#include <log.h>
static const u8 bootcount_magic = 0xbc;
diff --git a/drivers/bootcount/rtc.c b/drivers/bootcount/rtc.c
index db89fa3a35..076a8bb2be 100644
--- a/drivers/bootcount/rtc.c
+++ b/drivers/bootcount/rtc.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <bootcount.h>
#include <dm.h>
+#include <log.h>
#include <rtc.h>
static const u8 bootcount_magic = 0xbc;
diff --git a/drivers/cache/cache-ncore.c b/drivers/cache/cache-ncore.c
index 0aab7ee191..3beff780de 100644
--- a/drivers/cache/cache-ncore.c
+++ b/drivers/cache/cache-ncore.c
@@ -8,6 +8,7 @@
#include <wait_bit.h>
#include <asm/io.h>
+#include <linux/bitops.h>
/* Directory */
#define DIRUSFER 0x80010
diff --git a/drivers/cache/cache-v5l2.c b/drivers/cache/cache-v5l2.c
index 1373e7c387..51c074bfe2 100644
--- a/drivers/cache/cache-v5l2.c
+++ b/drivers/cache/cache-v5l2.c
@@ -11,6 +11,7 @@
#include <hang.h>
#include <asm/io.h>
#include <dm/ofnode.h>
+#include <linux/bitops.h>
struct l2cache {
volatile u64 configure;
diff --git a/drivers/clk/altera/clk-agilex.c b/drivers/clk/altera/clk-agilex.c
index 5fedec549d..0042958f4c 100644
--- a/drivers/clk/altera/clk-agilex.c
+++ b/drivers/clk/altera/clk-agilex.c
@@ -4,12 +4,14 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <clk-uclass.h>
#include <dm.h>
#include <dm/lists.h>
#include <dm/util.h>
#include <dt-bindings/clock/agilex-clock.h>
+#include <linux/bitops.h>
#include <asm/arch/clock_manager.h>
diff --git a/drivers/clk/altera/clk-agilex.h b/drivers/clk/altera/clk-agilex.h
index d93328ef29..cd68ebc438 100644
--- a/drivers/clk/altera/clk-agilex.h
+++ b/drivers/clk/altera/clk-agilex.h
@@ -6,6 +6,10 @@
#ifndef _CLK_AGILEX_
#define _CLK_AGILEX_
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
#define CM_REG_READL(plat, reg) \
readl((plat)->regs + (reg))
diff --git a/drivers/clk/altera/clk-arria10.c b/drivers/clk/altera/clk-arria10.c
index 694a9427e1..ede0be299d 100644
--- a/drivers/clk/altera/clk-arria10.c
+++ b/drivers/clk/altera/clk-arria10.c
@@ -12,6 +12,7 @@
#include <dm/devres.h>
#include <dm/lists.h>
#include <dm/util.h>
+#include <linux/bitops.h>
#include <asm/arch/clock_manager.h>
diff --git a/drivers/clk/aspeed/clk_ast2500.c b/drivers/clk/aspeed/clk_ast2500.c
index f4a441ad68..ccfeded30c 100644
--- a/drivers/clk/aspeed/clk_ast2500.c
+++ b/drivers/clk/aspeed/clk_ast2500.c
@@ -6,10 +6,12 @@
#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>
#include <dt-bindings/clock/ast2500-scu.h>
+#include <linux/delay.h>
#include <linux/err.h>
/*
diff --git a/drivers/clk/at91/clk-generated.c b/drivers/clk/at91/clk-generated.c
index a80f259a72..c0610940c3 100644
--- a/drivers/clk/at91/clk-generated.c
+++ b/drivers/clk/at91/clk-generated.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <linux/err.h>
#include <linux/io.h>
diff --git a/drivers/clk/at91/clk-system.c b/drivers/clk/at91/clk-system.c
index f9adef2eaa..76b1958670 100644
--- a/drivers/clk/at91/clk-system.c
+++ b/drivers/clk/at91/clk-system.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <linux/bitops.h>
#include <linux/io.h>
#include <mach/at91_pmc.h>
#include "pmc.h"
diff --git a/drivers/clk/at91/clk-usb.c b/drivers/clk/at91/clk-usb.c
index c3cb2ba014..af9d724369 100644
--- a/drivers/clk/at91/clk-usb.c
+++ b/drivers/clk/at91/clk-usb.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <clk-uclass.h>
+#include <log.h>
#include <dm/device.h>
#include <linux/err.h>
#include <linux/io.h>
diff --git a/drivers/clk/at91/pmc.c b/drivers/clk/at91/pmc.c
index f5808449a6..9d9d77d861 100644
--- a/drivers/clk/at91/pmc.c
+++ b/drivers/clk/at91/pmc.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <log.h>
#include <dm/lists.h>
#include <dm/util.h>
#include "pmc.h"
diff --git a/drivers/clk/clk-cdce9xx.c b/drivers/clk/clk-cdce9xx.c
index f1f76b0a4d..fd47872ab9 100644
--- a/drivers/clk/clk-cdce9xx.c
+++ b/drivers/clk/clk-cdce9xx.c
@@ -14,6 +14,7 @@
#include <clk-uclass.h>
#include <i2c.h>
#include <dm/device_compat.h>
+#include <linux/bitops.h>
#define MAX_NUMBER_OF_PLLS 4
#define MAX_NUMER_OF_OUTPUTS 9
diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c
index d79ae367b8..2a68719eb6 100644
--- a/drivers/clk/clk-divider.c
+++ b/drivers/clk/clk-divider.c
@@ -18,6 +18,7 @@
#include <dm/uclass.h>
#include <dm/lists.h>
#include <dm/device-internal.h>
+#include <linux/bug.h>
#include <linux/clk-provider.h>
#include <linux/err.h>
#include <linux/log2.h>
diff --git a/drivers/clk/clk-gate.c b/drivers/clk/clk-gate.c
index 6415c2f1b9..23c1f2c4ba 100644
--- a/drivers/clk/clk-gate.c
+++ b/drivers/clk/clk-gate.c
@@ -13,6 +13,7 @@
#include <clk-uclass.h>
#include <dm/device.h>
#include <dm/devres.h>
+#include <linux/bitops.h>
#include <linux/clk-provider.h>
#include <clk.h>
#include "clk.h"
diff --git a/drivers/clk/clk-hsdk-cgu.c b/drivers/clk/clk-hsdk-cgu.c
index 2de3a6a30b..3eb93a55fc 100644
--- a/drivers/clk/clk-hsdk-cgu.c
+++ b/drivers/clk/clk-hsdk-cgu.c
@@ -13,6 +13,10 @@
#include <clk-uclass.h>
#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>
#include <asm/arcregs.h>
diff --git a/drivers/clk/clk-mux.c b/drivers/clk/clk-mux.c
index b9d2ae6778..c69cce0565 100644
--- a/drivers/clk/clk-mux.c
+++ b/drivers/clk/clk-mux.c
@@ -27,6 +27,7 @@
#include <clk-uclass.h>
#include <dm/device.h>
#include <dm/devres.h>
+#include <linux/bitops.h>
#include <linux/clk-provider.h>
#include <clk.h>
#include "clk.h"
diff --git a/drivers/clk/clk-ti-sci.c b/drivers/clk/clk-ti-sci.c
index 82241d9f3f..7a9a645137 100644
--- a/drivers/clk/clk-ti-sci.c
+++ b/drivers/clk/clk-ti-sci.c
@@ -12,6 +12,7 @@
#include <dm.h>
#include <errno.h>
#include <clk-uclass.h>
+#include <log.h>
#include <malloc.h>
#include <dm/device_compat.h>
#include <linux/err.h>
diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c
index 71878474eb..9ffc2243cb 100644
--- a/drivers/clk/clk-uclass.c
+++ b/drivers/clk/clk-uclass.c
@@ -12,9 +12,11 @@
#include <dm.h>
#include <dt-structs.h>
#include <errno.h>
+#include <log.h>
#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.c b/drivers/clk/clk.c
index 4c477a488e..0f55ba751c 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <clk-uclass.h>
+#include <log.h>
#include <dm/device.h>
#include <dm/uclass.h>
#include <dm/lists.h>
diff --git a/drivers/clk/clk_bcm6345.c b/drivers/clk/clk_bcm6345.c
index f01ec9a859..b850b9fc06 100644
--- a/drivers/clk/clk_bcm6345.c
+++ b/drivers/clk/clk_bcm6345.c
@@ -11,6 +11,7 @@
#include <dm.h>
#include <errno.h>
#include <asm/io.h>
+#include <linux/bitops.h>
#define MAX_CLKS 32
diff --git a/drivers/clk/clk_boston.c b/drivers/clk/clk_boston.c
index 0c49ee0798..2318dcf6a4 100644
--- a/drivers/clk/clk_boston.c
+++ b/drivers/clk/clk_boston.c
@@ -9,6 +9,7 @@
#include <dt-bindings/clock/boston-clock.h>
#include <regmap.h>
#include <syscon.h>
+#include <linux/bitops.h>
struct clk_boston {
struct regmap *regmap;
diff --git a/drivers/clk/clk_pic32.c b/drivers/clk/clk_pic32.c
index 79469c454f..dc46de2a7c 100644
--- a/drivers/clk/clk_pic32.c
+++ b/drivers/clk/clk_pic32.c
@@ -12,6 +12,8 @@
#include <wait_bit.h>
#include <dm/lists.h>
#include <asm/io.h>
+#include <linux/bitops.h>
+#include <linux/bug.h>
#include <mach/pic32.h>
#include <dt-bindings/clock/microchip,clock.h>
diff --git a/drivers/clk/clk_sandbox_ccf.c b/drivers/clk/clk_sandbox_ccf.c
index 3543bea70d..0619d04f0e 100644
--- a/drivers/clk/clk_sandbox_ccf.c
+++ b/drivers/clk/clk_sandbox_ccf.c
@@ -13,6 +13,7 @@
#include <asm/clk.h>
#include <clk-uclass.h>
#include <dm/devres.h>
+#include <linux/bitops.h>
#include <linux/clk-provider.h>
#include <sandbox-clk.h>
#include <linux/err.h>
diff --git a/drivers/clk/clk_stm32f.c b/drivers/clk/clk_stm32f.c
index cbcfe3a89d..93722f74ae 100644
--- a/drivers/clk/clk_stm32f.c
+++ b/drivers/clk/clk_stm32f.c
@@ -7,7 +7,9 @@
#include <common.h>
#include <clk-uclass.h>
#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 18d06b333d..5e6abca56f 100644
--- a/drivers/clk/clk_stm32h7.c
+++ b/drivers/clk/clk_stm32h7.c
@@ -7,10 +7,12 @@
#include <common.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <log.h>
#include <regmap.h>
#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 0d0ea43fd2..6c5eddbd9a 100644
--- a/drivers/clk/clk_stm32mp1.c
+++ b/drivers/clk/clk_stm32mp1.c
@@ -7,11 +7,14 @@
#include <clk-uclass.h>
#include <div64.h>
#include <dm.h>
+#include <init.h>
+#include <log.h>
#include <regmap.h>
#include <spl.h>
#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_versal.c b/drivers/clk/clk_versal.c
index 075a08380d..2fb3171d71 100644
--- a/drivers/clk/clk_versal.c
+++ b/drivers/clk/clk_versal.c
@@ -5,6 +5,9 @@
*/
#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/clk/clk_vexpress_osc.c b/drivers/clk/clk_vexpress_osc.c
index 82e589e239..b48319bba6 100644
--- a/drivers/clk/clk_vexpress_osc.c
+++ b/drivers/clk/clk_vexpress_osc.c
@@ -8,10 +8,12 @@
#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>
#include <misc.h>
+#include <linux/bitops.h>
#define CLK_FUNCTION BIT(20)
diff --git a/drivers/clk/clk_zynq.c b/drivers/clk/clk_zynq.c
index 4ca1cc0d52..a699a3664c 100644
--- a/drivers/clk/clk_zynq.c
+++ b/drivers/clk/clk_zynq.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <log.h>
#include <dm/device_compat.h>
#include <dm/lists.h>
#include <errno.h>
diff --git a/drivers/clk/clk_zynqmp.c b/drivers/clk/clk_zynqmp.c
index e0eb897da8..2313ac0bc0 100644
--- a/drivers/clk/clk_zynqmp.c
+++ b/drivers/clk/clk_zynqmp.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <log.h>
#include <malloc.h>
#include <dm/device_compat.h>
#include <linux/bitops.h>
diff --git a/drivers/clk/ics8n3qv01.c b/drivers/clk/ics8n3qv01.c
index e85ab1f9a0..4f80bf6e52 100644
--- a/drivers/clk/ics8n3qv01.c
+++ b/drivers/clk/ics8n3qv01.c
@@ -13,6 +13,7 @@
#include <dm.h>
#include <clk-uclass.h>
#include <i2c.h>
+#include <log.h>
const long long ICS8N3QV01_FREF = 114285000;
const long long ICS8N3QV01_FREF_LL = 114285000LL;
diff --git a/drivers/clk/imx/clk-composite-8m.c b/drivers/clk/imx/clk-composite-8m.c
index 3e99c528de..494156751d 100644
--- a/drivers/clk/imx/clk-composite-8m.c
+++ b/drivers/clk/imx/clk-composite-8m.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <malloc.h>
#include <clk-uclass.h>
diff --git a/drivers/clk/imx/clk-imx6q.c b/drivers/clk/imx/clk-imx6q.c
index bd0d3e4f47..11d194363d 100644
--- a/drivers/clk/imx/clk-imx6q.c
+++ b/drivers/clk/imx/clk-imx6q.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <log.h>
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
#include <dt-bindings/clock/imx6qdl-clock.h>
diff --git a/drivers/clk/imx/clk-imx8.c b/drivers/clk/imx/clk-imx8.c
index 671054d9be..27a652a625 100644
--- a/drivers/clk/imx/clk-imx8.c
+++ b/drivers/clk/imx/clk-imx8.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <asm/arch/sci/sci.h>
#include <asm/arch/clock.h>
diff --git a/drivers/clk/imx/clk-imx8mm.c b/drivers/clk/imx/clk-imx8mm.c
index fc41a028f6..66c9601b0c 100644
--- a/drivers/clk/imx/clk-imx8mm.c
+++ b/drivers/clk/imx/clk-imx8mm.c
@@ -8,6 +8,7 @@
#include <clk.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <log.h>
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
#include <dt-bindings/clock/imx8mm-clock.h>
diff --git a/drivers/clk/imx/clk-imx8mn.c b/drivers/clk/imx/clk-imx8mn.c
index eb43971ae6..2d8e373131 100644
--- a/drivers/clk/imx/clk-imx8mn.c
+++ b/drivers/clk/imx/clk-imx8mn.c
@@ -8,6 +8,7 @@
#include <clk.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <log.h>
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
#include <dt-bindings/clock/imx8mn-clock.h>
diff --git a/drivers/clk/imx/clk-imx8mp.c b/drivers/clk/imx/clk-imx8mp.c
index a2693d2f7a..3d7aebb8e5 100644
--- a/drivers/clk/imx/clk-imx8mp.c
+++ b/drivers/clk/imx/clk-imx8mp.c
@@ -8,6 +8,7 @@
#include <clk.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <log.h>
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
#include <dt-bindings/clock/imx8mp-clock.h>
diff --git a/drivers/clk/imx/clk-imx8qm.c b/drivers/clk/imx/clk-imx8qm.c
index a6b09d2109..54fb09fda4 100644
--- a/drivers/clk/imx/clk-imx8qm.c
+++ b/drivers/clk/imx/clk-imx8qm.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <log.h>
#include <asm/arch/sci/sci.h>
#include <asm/arch/clock.h>
#include <dt-bindings/clock/imx8qm-clock.h>
diff --git a/drivers/clk/imx/clk-imx8qxp.c b/drivers/clk/imx/clk-imx8qxp.c
index 0db4539a1f..e6b2fb40da 100644
--- a/drivers/clk/imx/clk-imx8qxp.c
+++ b/drivers/clk/imx/clk-imx8qxp.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <log.h>
#include <asm/arch/sci/sci.h>
#include <asm/arch/clock.h>
#include <dt-bindings/clock/imx8qxp-clock.h>
diff --git a/drivers/clk/imx/clk-imxrt1050.c b/drivers/clk/imx/clk-imxrt1050.c
index 8279e784fe..594093ee5f 100644
--- a/drivers/clk/imx/clk-imxrt1050.c
+++ b/drivers/clk/imx/clk-imxrt1050.c
@@ -8,6 +8,7 @@
#include <clk.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <log.h>
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
#include <dt-bindings/clock/imxrt1050-clock.h>
diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/clk-pll14xx.c
index 1673eb26b2..b0ccb6c8ed 100644
--- a/drivers/clk/imx/clk-pll14xx.c
+++ b/drivers/clk/imx/clk-pll14xx.c
@@ -11,7 +11,9 @@
#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>
#include <linux/iopoll.h>
#include <clk.h>
diff --git a/drivers/clk/mediatek/clk-mt7622.c b/drivers/clk/mediatek/clk-mt7622.c
index a5b61a190b..dc0ba71f10 100644
--- a/drivers/clk/mediatek/clk-mt7622.c
+++ b/drivers/clk/mediatek/clk-mt7622.c
@@ -8,9 +8,11 @@
#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>
+#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 dfce32e283..a15fb45e8e 100644
--- a/drivers/clk/mediatek/clk-mt7623.c
+++ b/drivers/clk/mediatek/clk-mt7623.c
@@ -8,9 +8,11 @@
#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>
+#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 858be85d15..5b2aa5f200 100644
--- a/drivers/clk/mediatek/clk-mt7629.c
+++ b/drivers/clk/mediatek/clk-mt7629.c
@@ -8,9 +8,11 @@
#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>
+#include <linux/bitops.h>
#include "clk-mtk.h"
diff --git a/drivers/clk/mediatek/clk-mt8512.c b/drivers/clk/mediatek/clk-mt8512.c
index cb168f146b..ad254d1cce 100644
--- a/drivers/clk/mediatek/clk-mt8512.c
+++ b/drivers/clk/mediatek/clk-mt8512.c
@@ -10,6 +10,7 @@
#include <dm.h>
#include <asm/io.h>
#include <dt-bindings/clock/mt8512-clk.h>
+#include <linux/bitops.h>
#include "clk-mtk.h"
diff --git a/drivers/clk/mediatek/clk-mt8516.c b/drivers/clk/mediatek/clk-mt8516.c
index 071bf69b19..cd1db25783 100644
--- a/drivers/clk/mediatek/clk-mt8516.c
+++ b/drivers/clk/mediatek/clk-mt8516.c
@@ -10,6 +10,7 @@
#include <dm.h>
#include <asm/io.h>
#include <dt-bindings/clock/mt8516-clk.h>
+#include <linux/bitops.h>
#include "clk-mtk.h"
diff --git a/drivers/clk/mediatek/clk-mt8518.c b/drivers/clk/mediatek/clk-mt8518.c
index 76f7b3b361..985a0c1de5 100644
--- a/drivers/clk/mediatek/clk-mt8518.c
+++ b/drivers/clk/mediatek/clk-mt8518.c
@@ -10,6 +10,7 @@
#include <dm.h>
#include <asm/io.h>
#include <dt-bindings/clock/mt8518-clk.h>
+#include <linux/bitops.h>
#include "clk-mtk.h"
diff --git a/drivers/clk/mediatek/clk-mtk.c b/drivers/clk/mediatek/clk-mtk.c
index c52537cedf..388471b03a 100644
--- a/drivers/clk/mediatek/clk-mtk.c
+++ b/drivers/clk/mediatek/clk-mtk.c
@@ -11,6 +11,8 @@
#include <div64.h>
#include <dm.h>
#include <asm/io.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include "clk-mtk.h"
diff --git a/drivers/clk/mediatek/clk-mtk.h b/drivers/clk/mediatek/clk-mtk.h
index c7dc980861..95a23d14a8 100644
--- a/drivers/clk/mediatek/clk-mtk.h
+++ b/drivers/clk/mediatek/clk-mtk.h
@@ -7,6 +7,7 @@
#ifndef __DRV_CLK_MTK_H
#define __DRV_CLK_MTK_H
+#include <linux/bitops.h>
#define CLK_XTAL 0
#define MHZ (1000 * 1000)
diff --git a/drivers/clk/meson/axg.c b/drivers/clk/meson/axg.c
index 4b0028d04b..6ef8b418d7 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>
@@ -14,6 +15,7 @@
#include <syscon.h>
#include <div64.h>
#include <dt-bindings/clock/axg-clkc.h>
+#include <linux/bitops.h>
#include "clk_meson.h"
#include <linux/err.h>
diff --git a/drivers/clk/meson/clk_meson.h b/drivers/clk/meson/clk_meson.h
index 7adc55a980..ef72a416c1 100644
--- a/drivers/clk/meson/clk_meson.h
+++ b/drivers/clk/meson/clk_meson.h
@@ -10,6 +10,7 @@
/* Gate Structure */
+#include <linux/bitops.h>
struct meson_gate {
unsigned int reg;
unsigned int bit;
diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c
index 6089f8474e..bf2f357435 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>
@@ -14,6 +15,8 @@
#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>
#include "clk_meson.h"
diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c
index 5ef4dd794d..b9353c053e 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>
@@ -14,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 4183db2845..8d96ec767a 100644
--- a/drivers/clk/mpc83xx_clk.c
+++ b/drivers/clk/mpc83xx_clk.c
@@ -7,11 +7,14 @@
#include <common.h>
#include <clk-uclass.h>
#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>
#include <asm/arch/soc.h>
+#include <linux/bitops.h>
#include "mpc83xx_clk.h"
@@ -390,7 +393,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/clk/mpc83xx_clk.h b/drivers/clk/mpc83xx_clk.h
index 7fb8802920..8a31a4c868 100644
--- a/drivers/clk/mpc83xx_clk.h
+++ b/drivers/clk/mpc83xx_clk.h
@@ -17,6 +17,7 @@
* @RAT_2_5_TO_1: Ratio 2.5:1
* @RAT_3_TO_1: Ratio 3:1
*/
+#include <linux/bitops.h>
enum ratio {
RAT_UNK,
RAT_BYP,
diff --git a/drivers/clk/mvebu/armada-37xx-periph.c b/drivers/clk/mvebu/armada-37xx-periph.c
index 855f979b4f..223da22c1b 100644
--- a/drivers/clk/mvebu/armada-37xx-periph.c
+++ b/drivers/clk/mvebu/armada-37xx-periph.c
@@ -16,6 +16,7 @@
#include <asm/io.h>
#include <asm/arch/cpu.h>
#include <dm/device_compat.h>
+#include <linux/bitops.h>
#define TBG_SEL 0x0
#define DIV_SEL0 0x4
diff --git a/drivers/clk/owl/clk_owl.c b/drivers/clk/owl/clk_owl.c
index 5607b2b7b5..9715fce162 100644
--- a/drivers/clk/owl/clk_owl.c
+++ b/drivers/clk/owl/clk_owl.c
@@ -17,6 +17,8 @@
#include <asm/arch-owl/regs_s700.h>
#include <dt-bindings/clock/actions,s700-cmu.h>
#endif
+#include <linux/bitops.h>
+#include <linux/delay.h>
void owl_clk_init(struct owl_clk_priv *priv)
{
diff --git a/drivers/clk/owl/clk_owl.h b/drivers/clk/owl/clk_owl.h
index b8d33624c5..cf896bdb98 100644
--- a/drivers/clk/owl/clk_owl.h
+++ b/drivers/clk/owl/clk_owl.h
@@ -11,6 +11,9 @@
#define _OWL_CLK_H_
#include <clk-uclass.h>
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
enum owl_soc {
S700,
diff --git a/drivers/clk/renesas/clk-rcar-gen2.c b/drivers/clk/renesas/clk-rcar-gen2.c
index bfd7620dae..3ed0aa92cb 100644
--- a/drivers/clk/renesas/clk-rcar-gen2.c
+++ b/drivers/clk/renesas/clk-rcar-gen2.c
@@ -14,6 +14,7 @@
#include <clk-uclass.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <asm/io.h>
#include <dt-bindings/clock/renesas-cpg-mssr.h>
diff --git a/drivers/clk/renesas/clk-rcar-gen3.c b/drivers/clk/renesas/clk-rcar-gen3.c
index a2011dd37c..15e3833756 100644
--- a/drivers/clk/renesas/clk-rcar-gen3.c
+++ b/drivers/clk/renesas/clk-rcar-gen3.c
@@ -14,8 +14,10 @@
#include <clk-uclass.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <wait_bit.h>
#include <asm/io.h>
+#include <linux/bitops.h>
#include <dt-bindings/clock/renesas-cpg-mssr.h>
diff --git a/drivers/clk/renesas/r8a7790-cpg-mssr.c b/drivers/clk/renesas/r8a7790-cpg-mssr.c
index b62b8753cd..7451f53ba3 100644
--- a/drivers/clk/renesas/r8a7790-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7790-cpg-mssr.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <linux/bitops.h>
#include <dt-bindings/clock/r8a7790-cpg-mssr.h>
diff --git a/drivers/clk/renesas/r8a7791-cpg-mssr.c b/drivers/clk/renesas/r8a7791-cpg-mssr.c
index e11c02e6e8..25fd489609 100644
--- a/drivers/clk/renesas/r8a7791-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7791-cpg-mssr.c
@@ -17,6 +17,7 @@
#include <common.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <linux/bitops.h>
#include <dt-bindings/clock/r8a7791-cpg-mssr.h>
diff --git a/drivers/clk/renesas/r8a7792-cpg-mssr.c b/drivers/clk/renesas/r8a7792-cpg-mssr.c
index fb18ee7aed..d47ab99e88 100644
--- a/drivers/clk/renesas/r8a7792-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7792-cpg-mssr.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <linux/bitops.h>
#include <dt-bindings/clock/r8a7792-cpg-mssr.h>
diff --git a/drivers/clk/renesas/r8a7794-cpg-mssr.c b/drivers/clk/renesas/r8a7794-cpg-mssr.c
index b6be1bc032..7093e0d42c 100644
--- a/drivers/clk/renesas/r8a7794-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7794-cpg-mssr.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <linux/bitops.h>
#include <dt-bindings/clock/r8a7794-cpg-mssr.h>
diff --git a/drivers/clk/renesas/r8a7795-cpg-mssr.c b/drivers/clk/renesas/r8a7795-cpg-mssr.c
index ab4747ee14..dcd96ad017 100644
--- a/drivers/clk/renesas/r8a7795-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7795-cpg-mssr.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <linux/bitops.h>
#include <dt-bindings/clock/r8a7795-cpg-mssr.h>
diff --git a/drivers/clk/renesas/r8a7796-cpg-mssr.c b/drivers/clk/renesas/r8a7796-cpg-mssr.c
index 253a9143b7..89dc141239 100644
--- a/drivers/clk/renesas/r8a7796-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7796-cpg-mssr.c
@@ -18,6 +18,7 @@
#include <common.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <linux/bitops.h>
#include <dt-bindings/clock/r8a7796-cpg-mssr.h>
diff --git a/drivers/clk/renesas/r8a77965-cpg-mssr.c b/drivers/clk/renesas/r8a77965-cpg-mssr.c
index bd36ea3b6d..6ed88295c9 100644
--- a/drivers/clk/renesas/r8a77965-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a77965-cpg-mssr.c
@@ -13,6 +13,7 @@
#include <common.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <linux/bitops.h>
#include <dt-bindings/clock/r8a77965-cpg-mssr.h>
diff --git a/drivers/clk/renesas/r8a77970-cpg-mssr.c b/drivers/clk/renesas/r8a77970-cpg-mssr.c
index 961eb7fb60..df07120171 100644
--- a/drivers/clk/renesas/r8a77970-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a77970-cpg-mssr.c
@@ -13,6 +13,7 @@
#include <common.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <linux/bitops.h>
#include <dt-bindings/clock/r8a77970-cpg-mssr.h>
diff --git a/drivers/clk/renesas/r8a77980-cpg-mssr.c b/drivers/clk/renesas/r8a77980-cpg-mssr.c
index c076ac771f..c8d7a9469b 100644
--- a/drivers/clk/renesas/r8a77980-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a77980-cpg-mssr.c
@@ -13,6 +13,7 @@
#include <common.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <linux/bitops.h>
#include <dt-bindings/clock/r8a77980-cpg-mssr.h>
diff --git a/drivers/clk/renesas/r8a77990-cpg-mssr.c b/drivers/clk/renesas/r8a77990-cpg-mssr.c
index 3168de20f9..357e7b534d 100644
--- a/drivers/clk/renesas/r8a77990-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a77990-cpg-mssr.c
@@ -13,6 +13,7 @@
#include <common.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <linux/bitops.h>
#include <dt-bindings/clock/r8a77990-cpg-mssr.h>
diff --git a/drivers/clk/renesas/r8a77995-cpg-mssr.c b/drivers/clk/renesas/r8a77995-cpg-mssr.c
index 1c79370982..d62aeba635 100644
--- a/drivers/clk/renesas/r8a77995-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a77995-cpg-mssr.c
@@ -13,6 +13,7 @@
#include <common.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <linux/bitops.h>
#include <dt-bindings/clock/r8a77995-cpg-mssr.h>
diff --git a/drivers/clk/renesas/renesas-cpg-mssr.c b/drivers/clk/renesas/renesas-cpg-mssr.c
index 7698613877..7c1222f6c8 100644
--- a/drivers/clk/renesas/renesas-cpg-mssr.c
+++ b/drivers/clk/renesas/renesas-cpg-mssr.c
@@ -13,8 +13,10 @@
#include <clk-uclass.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <wait_bit.h>
#include <asm/io.h>
+#include <linux/bitops.h>
#include <dt-bindings/clock/renesas-cpg-mssr.h>
diff --git a/drivers/clk/renesas/renesas-cpg-mssr.h b/drivers/clk/renesas/renesas-cpg-mssr.h
index 5b7012d37c..b669dec594 100644
--- a/drivers/clk/renesas/renesas-cpg-mssr.h
+++ b/drivers/clk/renesas/renesas-cpg-mssr.h
@@ -13,6 +13,7 @@
#ifndef __DRIVERS_CLK_RENESAS_CPG_MSSR__
#define __DRIVERS_CLK_RENESAS_CPG_MSSR__
+#include <linux/bitops.h>
struct cpg_mssr_info {
const struct cpg_core_clk *core_clk;
unsigned int core_clk_size;
diff --git a/drivers/clk/rockchip/clk_pll.c b/drivers/clk/rockchip/clk_pll.c
index c4b45314ec..83d45c75ee 100644
--- a/drivers/clk/rockchip/clk_pll.c
+++ b/drivers/clk/rockchip/clk_pll.c
@@ -7,10 +7,12 @@
#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>
#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 b88534145e..71916dbf3b 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>
@@ -16,6 +17,8 @@
#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_rk3036.c b/drivers/clk/rockchip/clk_rk3036.c
index 6e085c4136..274572f70c 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>
@@ -15,7 +16,9 @@
#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>
enum {
VCO_MAX_HZ = 2400U * 1000000,
diff --git a/drivers/clk/rockchip/clk_rk3128.c b/drivers/clk/rockchip/clk_rk3128.c
index a6f7902941..61f823e254 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>
@@ -16,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 2b82a40d28..11e3bd33cb 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>
@@ -21,8 +22,10 @@
#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>
enum rk3188_clk_type {
RK3188_CRU,
diff --git a/drivers/clk/rockchip/clk_rk322x.c b/drivers/clk/rockchip/clk_rk322x.c
index ef33adbf29..054b2fd349 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>
@@ -15,7 +16,10 @@
#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>
enum {
VCO_MAX_HZ = 3200U * 1000000,
diff --git a/drivers/clk/rockchip/clk_rk3288.c b/drivers/clk/rockchip/clk_rk3288.c
index 81cdb8ee9c..a1dd642eef 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>
@@ -22,8 +23,11 @@
#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>
+#include <linux/stringify.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/clk/rockchip/clk_rk3308.c b/drivers/clk/rockchip/clk_rk3308.c
index c0f1285e4c..d3633b6979 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>
@@ -16,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 8e867c58df..02d3b08efa 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>
@@ -17,6 +18,8 @@
#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 {
u32 refdiv;
diff --git a/drivers/clk/rockchip/clk_rk3368.c b/drivers/clk/rockchip/clk_rk3368.c
index 2cce1b967d..d1804c6e16 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>
@@ -20,6 +21,8 @@
#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)
struct rk3368_clk_plat {
diff --git a/drivers/clk/rockchip/clk_rk3399.c b/drivers/clk/rockchip/clk_rk3399.c
index d822acace1..e009f1cf6c 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>
@@ -19,6 +20,8 @@
#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)
struct rk3399_clk_plat {
diff --git a/drivers/clk/rockchip/clk_rv1108.c b/drivers/clk/rockchip/clk_rv1108.c
index da9c48b962..aa1d98ca2a 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>
@@ -17,6 +18,8 @@
#include <asm/arch-rockchip/hardware.h>
#include <dm/lists.h>
#include <dt-bindings/clock/rv1108-cru.h>
+#include <linux/delay.h>
+#include <linux/stringify.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/clk/sifive/fu540-prci.c b/drivers/clk/sifive/fu540-prci.c
index 8847178001..67e21b6746 100644
--- a/drivers/clk/sifive/fu540-prci.c
+++ b/drivers/clk/sifive/fu540-prci.c
@@ -35,6 +35,7 @@
#include <div64.h>
#include <dm.h>
#include <errno.h>
+#include <linux/delay.h>
#include <linux/err.h>
#include <linux/math64.h>
diff --git a/drivers/clk/sunxi/clk_a10.c b/drivers/clk/sunxi/clk_a10.c
index 7a96d1708e..67507c5ab1 100644
--- a/drivers/clk/sunxi/clk_a10.c
+++ b/drivers/clk/sunxi/clk_a10.c
@@ -11,6 +11,7 @@
#include <asm/arch/ccu.h>
#include <dt-bindings/clock/sun4i-a10-ccu.h>
#include <dt-bindings/reset/sun4i-a10-ccu.h>
+#include <linux/bitops.h>
static struct ccu_clk_gate a10_gates[] = {
[CLK_AHB_OTG] = GATE(0x060, BIT(0)),
diff --git a/drivers/clk/sunxi/clk_a10s.c b/drivers/clk/sunxi/clk_a10s.c
index 33d41d47b0..d11a4b5f03 100644
--- a/drivers/clk/sunxi/clk_a10s.c
+++ b/drivers/clk/sunxi/clk_a10s.c
@@ -11,6 +11,7 @@
#include <asm/arch/ccu.h>
#include <dt-bindings/clock/sun5i-ccu.h>
#include <dt-bindings/reset/sun5i-ccu.h>
+#include <linux/bitops.h>
static struct ccu_clk_gate a10s_gates[] = {
[CLK_AHB_OTG] = GATE(0x060, BIT(0)),
diff --git a/drivers/clk/sunxi/clk_a23.c b/drivers/clk/sunxi/clk_a23.c
index c16019215e..4d562bfe42 100644
--- a/drivers/clk/sunxi/clk_a23.c
+++ b/drivers/clk/sunxi/clk_a23.c
@@ -11,6 +11,7 @@
#include <asm/arch/ccu.h>
#include <dt-bindings/clock/sun8i-a23-a33-ccu.h>
#include <dt-bindings/reset/sun8i-a23-a33-ccu.h>
+#include <linux/bitops.h>
static struct ccu_clk_gate a23_gates[] = {
[CLK_BUS_MMC0] = GATE(0x060, BIT(8)),
diff --git a/drivers/clk/sunxi/clk_a31.c b/drivers/clk/sunxi/clk_a31.c
index 4ec3c2ae89..4a9454eebe 100644
--- a/drivers/clk/sunxi/clk_a31.c
+++ b/drivers/clk/sunxi/clk_a31.c
@@ -11,6 +11,7 @@
#include <asm/arch/ccu.h>
#include <dt-bindings/clock/sun6i-a31-ccu.h>
#include <dt-bindings/reset/sun6i-a31-ccu.h>
+#include <linux/bitops.h>
static struct ccu_clk_gate a31_gates[] = {
[CLK_AHB1_MMC0] = GATE(0x060, BIT(8)),
diff --git a/drivers/clk/sunxi/clk_a64.c b/drivers/clk/sunxi/clk_a64.c
index f94e8aa754..d96cb1aac1 100644
--- a/drivers/clk/sunxi/clk_a64.c
+++ b/drivers/clk/sunxi/clk_a64.c
@@ -11,6 +11,7 @@
#include <asm/arch/ccu.h>
#include <dt-bindings/clock/sun50i-a64-ccu.h>
#include <dt-bindings/reset/sun50i-a64-ccu.h>
+#include <linux/bitops.h>
static const struct ccu_clk_gate a64_gates[] = {
[CLK_BUS_MMC0] = GATE(0x060, BIT(8)),
diff --git a/drivers/clk/sunxi/clk_a80.c b/drivers/clk/sunxi/clk_a80.c
index fb76aad528..80d7407037 100644
--- a/drivers/clk/sunxi/clk_a80.c
+++ b/drivers/clk/sunxi/clk_a80.c
@@ -11,6 +11,7 @@
#include <asm/arch/ccu.h>
#include <dt-bindings/clock/sun9i-a80-ccu.h>
#include <dt-bindings/reset/sun9i-a80-ccu.h>
+#include <linux/bitops.h>
static const struct ccu_clk_gate a80_gates[] = {
[CLK_SPI0] = GATE(0x430, BIT(31)),
diff --git a/drivers/clk/sunxi/clk_a83t.c b/drivers/clk/sunxi/clk_a83t.c
index 2be87a31fd..d6f23ddc77 100644
--- a/drivers/clk/sunxi/clk_a83t.c
+++ b/drivers/clk/sunxi/clk_a83t.c
@@ -11,6 +11,7 @@
#include <asm/arch/ccu.h>
#include <dt-bindings/clock/sun8i-a83t-ccu.h>
#include <dt-bindings/reset/sun8i-a83t-ccu.h>
+#include <linux/bitops.h>
static struct ccu_clk_gate a83t_gates[] = {
[CLK_BUS_MMC0] = GATE(0x060, BIT(8)),
diff --git a/drivers/clk/sunxi/clk_h3.c b/drivers/clk/sunxi/clk_h3.c
index 6111a13f1c..7e844f4ff1 100644
--- a/drivers/clk/sunxi/clk_h3.c
+++ b/drivers/clk/sunxi/clk_h3.c
@@ -11,6 +11,7 @@
#include <asm/arch/ccu.h>
#include <dt-bindings/clock/sun8i-h3-ccu.h>
#include <dt-bindings/reset/sun8i-h3-ccu.h>
+#include <linux/bitops.h>
static struct ccu_clk_gate h3_gates[] = {
[CLK_BUS_MMC0] = GATE(0x060, BIT(8)),
diff --git a/drivers/clk/sunxi/clk_h6.c b/drivers/clk/sunxi/clk_h6.c
index 105c15d869..a1cb8952d3 100644
--- a/drivers/clk/sunxi/clk_h6.c
+++ b/drivers/clk/sunxi/clk_h6.c
@@ -11,6 +11,7 @@
#include <asm/arch/ccu.h>
#include <dt-bindings/clock/sun50i-h6-ccu.h>
#include <dt-bindings/reset/sun50i-h6-ccu.h>
+#include <linux/bitops.h>
static struct ccu_clk_gate h6_gates[] = {
[CLK_BUS_MMC0] = GATE(0x84c, BIT(0)),
diff --git a/drivers/clk/sunxi/clk_r40.c b/drivers/clk/sunxi/clk_r40.c
index 44abc4f536..ac360b2beb 100644
--- a/drivers/clk/sunxi/clk_r40.c
+++ b/drivers/clk/sunxi/clk_r40.c
@@ -11,6 +11,7 @@
#include <asm/arch/ccu.h>
#include <dt-bindings/clock/sun8i-r40-ccu.h>
#include <dt-bindings/reset/sun8i-r40-ccu.h>
+#include <linux/bitops.h>
static struct ccu_clk_gate r40_gates[] = {
[CLK_BUS_MMC0] = GATE(0x060, BIT(8)),
diff --git a/drivers/clk/sunxi/clk_sunxi.c b/drivers/clk/sunxi/clk_sunxi.c
index 6d4aeb5315..41934cd826 100644
--- a/drivers/clk/sunxi/clk_sunxi.c
+++ b/drivers/clk/sunxi/clk_sunxi.c
@@ -8,9 +8,11 @@
#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>
+#include <linux/bitops.h>
#include <linux/log2.h>
static const struct ccu_clk_gate *priv_to_gate(struct ccu_priv *priv,
diff --git a/drivers/clk/sunxi/clk_v3s.c b/drivers/clk/sunxi/clk_v3s.c
index 789ac72026..b79446cc4f 100644
--- a/drivers/clk/sunxi/clk_v3s.c
+++ b/drivers/clk/sunxi/clk_v3s.c
@@ -11,6 +11,7 @@
#include <asm/arch/ccu.h>
#include <dt-bindings/clock/sun8i-v3s-ccu.h>
#include <dt-bindings/reset/sun8i-v3s-ccu.h>
+#include <linux/bitops.h>
static struct ccu_clk_gate v3s_gates[] = {
[CLK_BUS_MMC0] = GATE(0x060, BIT(8)),
diff --git a/drivers/clk/tegra/tegra-car-clk.c b/drivers/clk/tegra/tegra-car-clk.c
index 6083f14e75..09a7cf470c 100644
--- a/drivers/clk/tegra/tegra-car-clk.c
+++ b/drivers/clk/tegra/tegra-car-clk.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <asm/arch/clock.h>
#include <asm/arch-tegra/clk_rst.h>
diff --git a/drivers/clk/tegra/tegra186-clk.c b/drivers/clk/tegra/tegra186-clk.c
index 612fb1b972..5a98a3f3f0 100644
--- a/drivers/clk/tegra/tegra186-clk.c
+++ b/drivers/clk/tegra/tegra186-clk.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <clk-uclass.h>
#include <dm.h>
+#include <log.h>
#include <misc.h>
#include <asm/arch-tegra/bpmp_abi.h>
diff --git a/drivers/clk/uniphier/clk-uniphier-core.c b/drivers/clk/uniphier/clk-uniphier-core.c
index 9f24050992..c9ec523080 100644
--- a/drivers/clk/uniphier/clk-uniphier-core.c
+++ b/drivers/clk/uniphier/clk-uniphier-core.c
@@ -9,6 +9,7 @@
#include <dm.h>
#include <dm/device_compat.h>
#include <linux/bitops.h>
+#include <linux/bug.h>
#include <linux/io.h>
#include <linux/sizes.h>
diff --git a/drivers/core/acpi.c b/drivers/core/acpi.c
index e09905cf2a..8ae61575dd 100644
--- a/drivers/core/acpi.c
+++ b/drivers/core/acpi.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <dm/acpi.h>
#include <dm/device-internal.h>
#include <dm/root.h>
diff --git a/drivers/core/device.c b/drivers/core/device.c
index 0157bb1fe0..a7408d9c76 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -10,11 +10,13 @@
#include <common.h>
#include <cpu_func.h>
+#include <log.h>
#include <asm/io.h>
#include <clk.h>
#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/core/devres.c b/drivers/core/devres.c
index 457e1309c5..88244698b0 100644
--- a/drivers/core/devres.c
+++ b/drivers/core/devres.c
@@ -10,6 +10,7 @@
#define LOG_CATEGORY LOGC_DEVRES
#include <common.h>
+#include <log.h>
#include <malloc.h>
#include <linux/compat.h>
#include <linux/kernel.h>
diff --git a/drivers/core/fdtaddr.c b/drivers/core/fdtaddr.c
index 33811e62f7..dfcb868f65 100644
--- a/drivers/core/fdtaddr.c
+++ b/drivers/core/fdtaddr.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <dm.h>
#include <fdt_support.h>
+#include <log.h>
#include <asm/io.h>
#include <dm/device-internal.h>
diff --git a/drivers/core/lists.c b/drivers/core/lists.c
index c7db14ed56..5beba9181c 100644
--- a/drivers/core/lists.c
+++ b/drivers/core/lists.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <errno.h>
+#include <log.h>
#include <dm/device.h>
#include <dm/device-internal.h>
#include <dm/lists.h>
diff --git a/drivers/core/of_access.c b/drivers/core/of_access.c
index ea3ee8bd63..922e78f99b 100644
--- a/drivers/core/of_access.c
+++ b/drivers/core/of_access.c
@@ -20,7 +20,9 @@
*/
#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 4e256d9926..ca34d84922 100644
--- a/drivers/core/of_addr.c
+++ b/drivers/core/of_addr.c
@@ -7,6 +7,8 @@
*/
#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/core/of_extra.c b/drivers/core/of_extra.c
index f1f393c359..6420e6ec44 100644
--- a/drivers/core/of_extra.c
+++ b/drivers/core/of_extra.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <log.h>
#include <linux/libfdt.h>
#include <dm/of_access.h>
#include <dm/of_extra.h>
diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c
index e3c42dae5c..c37afa1fe6 100644
--- a/drivers/core/ofnode.c
+++ b/drivers/core/ofnode.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <fdtdec.h>
#include <fdt_support.h>
+#include <log.h>
#include <malloc.h>
#include <linux/libfdt.h>
#include <dm/of_access.h>
diff --git a/drivers/core/regmap.c b/drivers/core/regmap.c
index a974744a61..4a214eff7c 100644
--- a/drivers/core/regmap.c
+++ b/drivers/core/regmap.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <linux/libfdt.h>
#include <malloc.h>
#include <mapmem.h>
diff --git a/drivers/core/root.c b/drivers/core/root.c
index 14df16c280..7d257ea887 100644
--- a/drivers/core/root.c
+++ b/drivers/core/root.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <errno.h>
#include <fdtdec.h>
+#include <log.h>
#include <malloc.h>
#include <linux/libfdt.h>
#include <dm/device.h>
diff --git a/drivers/core/syscon-uclass.c b/drivers/core/syscon-uclass.c
index 15f0e42a85..b5cd763b6b 100644
--- a/drivers/core/syscon-uclass.c
+++ b/drivers/core/syscon-uclass.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <log.h>
#include <syscon.h>
#include <dm.h>
#include <errno.h>
diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c
index 6849302936..2ab419cfe4 100644
--- a/drivers/core/uclass.c
+++ b/drivers/core/uclass.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include <dm/device.h>
#include <dm/device-internal.h>
diff --git a/drivers/cpu/bmips_cpu.c b/drivers/cpu/bmips_cpu.c
index fc047473f5..2649c5c6e9 100644
--- a/drivers/cpu/bmips_cpu.c
+++ b/drivers/cpu/bmips_cpu.c
@@ -11,7 +11,9 @@
#include <cpu.h>
#include <dm.h>
#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/cpu-uclass.c b/drivers/cpu/cpu-uclass.c
index 8352e2eb0b..7418c26ed8 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>
#include <linux/err.h>
diff --git a/drivers/cpu/imx8_cpu.c b/drivers/cpu/imx8_cpu.c
index 95c14c98d8..dddd12d1e4 100644
--- a/drivers/cpu/imx8_cpu.c
+++ b/drivers/cpu/imx8_cpu.c
@@ -7,10 +7,12 @@
#include <cpu.h>
#include <dm.h>
#include <thermal.h>
+#include <asm/system.h>
#include <asm/arch/sci/sci.h>
#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 1e58457742..f8a84bae9d 100644
--- a/drivers/cpu/mpc83xx_cpu.c
+++ b/drivers/cpu/mpc83xx_cpu.c
@@ -9,7 +9,9 @@
#include <clk.h>
#include <cpu.h>
#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 28ad0aa30f..cb04f5638d 100644
--- a/drivers/cpu/riscv_cpu.c
+++ b/drivers/cpu/riscv_cpu.c
@@ -7,8 +7,10 @@
#include <cpu.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <dm/device-internal.h>
#include <dm/lists.h>
+#include <linux/bitops.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/crypto/ace_sha.c b/drivers/crypto/ace_sha.c
index 34611056ec..261d3efe84 100644
--- a/drivers/crypto/ace_sha.c
+++ b/drivers/crypto/ace_sha.c
@@ -5,6 +5,8 @@
*/
#include <common.h>
#include "ace_sha.h"
+#include <log.h>
+#include <rand.h>
#ifdef CONFIG_SHA_HW_ACCEL
#include <u-boot/sha256.h>
diff --git a/drivers/crypto/fsl/error.c b/drivers/crypto/fsl/error.c
index 731c748443..c76574919c 100644
--- a/drivers/crypto/fsl/error.c
+++ b/drivers/crypto/fsl/error.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <log.h>
#include <malloc.h>
#include "desc.h"
#include "jr.h"
diff --git a/drivers/crypto/fsl/fsl_blob.c b/drivers/crypto/fsl/fsl_blob.c
index 0531b1b735..d6bd861251 100644
--- a/drivers/crypto/fsl/fsl_blob.c
+++ b/drivers/crypto/fsl/fsl_blob.c
@@ -6,9 +6,11 @@
#include <common.h>
#include <cpu_func.h>
+#include <log.h>
#include <malloc.h>
#include <memalign.h>
#include <fsl_sec.h>
+#include <asm/cache.h>
#include <linux/errno.h>
#include "jobdesc.h"
#include "desc.h"
diff --git a/drivers/crypto/fsl/fsl_hash.c b/drivers/crypto/fsl/fsl_hash.c
index 74e38ca759..953deec9ff 100644
--- a/drivers/crypto/fsl/fsl_hash.c
+++ b/drivers/crypto/fsl/fsl_hash.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <log.h>
#include <malloc.h>
#include <memalign.h>
#include "jobdesc.h"
@@ -13,6 +14,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/fsl_rsa.c b/drivers/crypto/fsl/fsl_rsa.c
index 0cb3c6b5f2..ed2a54f6ec 100644
--- a/drivers/crypto/fsl/fsl_rsa.c
+++ b/drivers/crypto/fsl/fsl_rsa.c
@@ -7,6 +7,7 @@
#include <config.h>
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <asm/types.h>
#include <malloc.h>
#include "jobdesc.h"
diff --git a/drivers/crypto/fsl/jobdesc.c b/drivers/crypto/fsl/jobdesc.c
index 637ef29f15..2f35e0c90b 100644
--- a/drivers/crypto/fsl/jobdesc.c
+++ b/drivers/crypto/fsl/jobdesc.c
@@ -13,6 +13,7 @@
#include "desc_constr.h"
#include "jobdesc.h"
#include "rsa_caam.h"
+#include <asm/cache.h>
#if defined(CONFIG_MX6) || defined(CONFIG_MX7)
/*!
diff --git a/drivers/crypto/fsl/jr.c b/drivers/crypto/fsl/jr.c
index aa84f2cee0..e2d9216cfc 100644
--- a/drivers/crypto/fsl/jr.c
+++ b/drivers/crypto/fsl/jr.c
@@ -7,13 +7,16 @@
#include <common.h>
#include <cpu_func.h>
+#include <log.h>
#include <malloc.h>
#include "fsl_sec.h"
#include "jr.h"
#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/crypto/rsa_mod_exp/mod_exp_sw.c b/drivers/crypto/rsa_mod_exp/mod_exp_sw.c
index c9b571a461..03b3d61403 100644
--- a/drivers/crypto/rsa_mod_exp/mod_exp_sw.c
+++ b/drivers/crypto/rsa_mod_exp/mod_exp_sw.c
@@ -7,6 +7,7 @@
#include <config.h>
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <u-boot/rsa-mod-exp.h>
static int mod_exp_sw(struct udevice *dev, const uint8_t *sig, uint32_t sig_len,
diff --git a/drivers/ddr/altera/sdram_agilex.c b/drivers/ddr/altera/sdram_agilex.c
index 626fb724d4..a0f25d1179 100644
--- a/drivers/ddr/altera/sdram_agilex.c
+++ b/drivers/ddr/altera/sdram_agilex.c
@@ -10,6 +10,7 @@
#include <div64.h>
#include <fdtdec.h>
#include <hang.h>
+#include <log.h>
#include <ram.h>
#include <reset.h>
#include "sdram_soc64.h"
diff --git a/drivers/ddr/altera/sdram_arria10.c b/drivers/ddr/altera/sdram_arria10.c
index 2fd50b7ae5..3c58f59f3a 100644
--- a/drivers/ddr/altera/sdram_arria10.c
+++ b/drivers/ddr/altera/sdram_arria10.c
@@ -7,14 +7,19 @@
#include <cpu_func.h>
#include <errno.h>
#include <fdtdec.h>
+#include <init.h>
+#include <log.h>
#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>
#include <asm/arch/reset_manager.h>
#include <asm/arch/sdram.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <linux/kernel.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/ddr/altera/sdram_gen5.c b/drivers/ddr/altera/sdram_gen5.c
index 314c7aea00..1360bd0a3b 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>
@@ -14,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/altera/sdram_s10.c b/drivers/ddr/altera/sdram_s10.c
index 0b36d6c027..91f76e03c2 100644
--- a/drivers/ddr/altera/sdram_s10.c
+++ b/drivers/ddr/altera/sdram_s10.c
@@ -12,6 +12,7 @@
#include <fdtdec.h>
#include <hang.h>
#include <init.h>
+#include <log.h>
#include <ram.h>
#include <reset.h>
#include "sdram_s10.h"
diff --git a/drivers/ddr/altera/sdram_soc64.c b/drivers/ddr/altera/sdram_soc64.c
index 1f7ead0c67..491f689c44 100644
--- a/drivers/ddr/altera/sdram_soc64.c
+++ b/drivers/ddr/altera/sdram_soc64.c
@@ -11,6 +11,8 @@
#include <div64.h>
#include <fdtdec.h>
#include <hang.h>
+#include <init.h>
+#include <log.h>
#include <ram.h>
#include <reset.h>
#include "sdram_soc64.h"
@@ -18,6 +20,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/ddr/altera/sequencer.c b/drivers/ddr/altera/sequencer.c
index 35bda9b34c..2dbde49a9c 100644
--- a/drivers/ddr/altera/sequencer.c
+++ b/drivers/ddr/altera/sequencer.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/arch/sdram.h>
#include <errno.h>
diff --git a/drivers/ddr/fsl/arm_ddr_gen3.c b/drivers/ddr/fsl/arm_ddr_gen3.c
index e9eaa1e0af..629ba6784e 100644
--- a/drivers/ddr/fsl/arm_ddr_gen3.c
+++ b/drivers/ddr/fsl/arm_ddr_gen3.c
@@ -6,12 +6,14 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <fsl_ddr_sdram.h>
#include <asm/processor.h>
#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/ctrl_regs.c b/drivers/ddr/fsl/ctrl_regs.c
index 98ccbb70de..2d3fb1953b 100644
--- a/drivers/ddr/fsl/ctrl_regs.c
+++ b/drivers/ddr/fsl/ctrl_regs.c
@@ -15,6 +15,8 @@
#include <fsl_errata.h>
#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 50fd998425..e5481eaa0d 100644
--- a/drivers/ddr/fsl/ddr1_dimm_params.c
+++ b/drivers/ddr/fsl/ddr1_dimm_params.c
@@ -5,6 +5,8 @@
#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 ad91ba63a8..3b78118a9d 100644
--- a/drivers/ddr/fsl/ddr2_dimm_params.c
+++ b/drivers/ddr/fsl/ddr2_dimm_params.c
@@ -5,6 +5,8 @@
#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/ddr3_dimm_params.c b/drivers/ddr/fsl/ddr3_dimm_params.c
index 47b4d7663f..8464438c54 100644
--- a/drivers/ddr/fsl/ddr3_dimm_params.c
+++ b/drivers/ddr/fsl/ddr3_dimm_params.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <fsl_ddr_sdram.h>
+#include <log.h>
#include <fsl_ddr.h>
diff --git a/drivers/ddr/fsl/ddr4_dimm_params.c b/drivers/ddr/fsl/ddr4_dimm_params.c
index 2aa53d116f..e2bdc12ef2 100644
--- a/drivers/ddr/fsl/ddr4_dimm_params.c
+++ b/drivers/ddr/fsl/ddr4_dimm_params.c
@@ -12,6 +12,8 @@
#include <common.h>
#include <fsl_ddr_sdram.h>
+#include <log.h>
+#include <linux/bug.h>
#include <fsl_ddr.h>
diff --git a/drivers/ddr/fsl/fsl_ddr_gen4.c b/drivers/ddr/fsl/fsl_ddr_gen4.c
index 17a4a8282b..eab5b82b23 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>
@@ -15,6 +16,7 @@
defined(CONFIG_ARM)
#include <asm/arch/clock.h>
#endif
+#include <linux/delay.h>
#define CTLR_INTLV_MASK 0x20000000
diff --git a/drivers/ddr/fsl/fsl_mmdc.c b/drivers/ddr/fsl/fsl_mmdc.c
index 08285120ca..cbd625b7ee 100644
--- a/drivers/ddr/fsl/fsl_mmdc.c
+++ b/drivers/ddr/fsl/fsl_mmdc.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <fsl_mmdc.h>
#include <asm/io.h>
+#include <linux/delay.h>
static void set_wait_for_bits_clear(void *ptr, u32 value, u32 bits)
{
diff --git a/drivers/ddr/fsl/interactive.c b/drivers/ddr/fsl/interactive.c
index 8e171e67fe..2f76beb2db 100644
--- a/drivers/ddr/fsl/interactive.c
+++ b/drivers/ddr/fsl/interactive.c
@@ -13,7 +13,10 @@
#include <common.h>
#include <cli.h>
+#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 df5bdb6e08..d299d763db 100644
--- a/drivers/ddr/fsl/lc_common_dimm_params.c
+++ b/drivers/ddr/fsl/lc_common_dimm_params.c
@@ -6,6 +6,8 @@
#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 0aa6aedae7..84139b85c3 100644
--- a/drivers/ddr/fsl/main.c
+++ b/drivers/ddr/fsl/main.c
@@ -14,6 +14,9 @@
#include <i2c.h>
#include <fsl_ddr_sdram.h>
#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/ddr/fsl/mpc85xx_ddr_gen1.c b/drivers/ddr/fsl/mpc85xx_ddr_gen1.c
index 1ab15c98f1..572f3703d5 100644
--- a/drivers/ddr/fsl/mpc85xx_ddr_gen1.c
+++ b/drivers/ddr/fsl/mpc85xx_ddr_gen1.c
@@ -4,8 +4,10 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <fsl_ddr_sdram.h>
+#include <linux/delay.h>
#if (CONFIG_CHIP_SELECTS_PER_CTRL > 4)
#error Invalid setting for CONFIG_CHIP_SELECTS_PER_CTRL
diff --git a/drivers/ddr/fsl/mpc85xx_ddr_gen2.c b/drivers/ddr/fsl/mpc85xx_ddr_gen2.c
index 54c10a860a..d7b8064e5f 100644
--- a/drivers/ddr/fsl/mpc85xx_ddr_gen2.c
+++ b/drivers/ddr/fsl/mpc85xx_ddr_gen2.c
@@ -7,6 +7,7 @@
#include <asm/io.h>
#include <asm/processor.h>
#include <fsl_ddr_sdram.h>
+#include <linux/delay.h>
#if (CONFIG_CHIP_SELECTS_PER_CTRL > 4)
#error Invalid setting for CONFIG_CHIP_SELECTS_PER_CTRL
diff --git a/drivers/ddr/fsl/mpc85xx_ddr_gen3.c b/drivers/ddr/fsl/mpc85xx_ddr_gen3.c
index a9b085db8c..ab8d2deaf9 100644
--- a/drivers/ddr/fsl/mpc85xx_ddr_gen3.c
+++ b/drivers/ddr/fsl/mpc85xx_ddr_gen3.c
@@ -4,9 +4,11 @@
*/
#include <common.h>
+#include <log.h>
#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 934b72b08c..43ed1ba432 100644
--- a/drivers/ddr/fsl/mpc86xx_ddr.c
+++ b/drivers/ddr/fsl/mpc86xx_ddr.c
@@ -4,8 +4,10 @@
*/
#include <common.h>
+#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/options.c b/drivers/ddr/fsl/options.c
index b9179315f2..c000a45f8e 100644
--- a/drivers/ddr/fsl/options.c
+++ b/drivers/ddr/fsl/options.c
@@ -8,6 +8,7 @@
#include <env.h>
#include <hwconfig.h>
#include <fsl_ddr_sdram.h>
+#include <log.h>
#include <fsl_ddr.h>
#if defined(CONFIG_FSL_LSCH2) || defined(CONFIG_FSL_LSCH3) || \
diff --git a/drivers/ddr/fsl/util.c b/drivers/ddr/fsl/util.c
index b27079670d..ac4f8d2732 100644
--- a/drivers/ddr/fsl/util.c
+++ b/drivers/ddr/fsl/util.c
@@ -8,9 +8,11 @@
#include <asm/fsl_law.h>
#endif
#include <div64.h>
+#include <linux/delay.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/imx/imx8m/ddr_init.c b/drivers/ddr/imx/imx8m/ddr_init.c
index af8c1427d2..bbddee6ca8 100644
--- a/drivers/ddr/imx/imx8m/ddr_init.c
+++ b/drivers/ddr/imx/imx8m/ddr_init.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <errno.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/arch/ddr.h>
#include <asm/arch/clock.h>
diff --git a/drivers/ddr/imx/imx8m/ddrphy_train.c b/drivers/ddr/imx/imx8m/ddrphy_train.c
index 306af82504..f2a997b50a 100644
--- a/drivers/ddr/imx/imx8m/ddrphy_train.c
+++ b/drivers/ddr/imx/imx8m/ddrphy_train.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <log.h>
#include <linux/kernel.h>
#include <asm/arch/ddr.h>
#include <asm/arch/lpddr4_define.h>
diff --git a/drivers/ddr/imx/imx8m/ddrphy_utils.c b/drivers/ddr/imx/imx8m/ddrphy_utils.c
index 9ac7ca923c..d5eef53573 100644
--- a/drivers/ddr/imx/imx8m/ddrphy_utils.c
+++ b/drivers/ddr/imx/imx8m/ddrphy_utils.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <errno.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/arch/ddr.h>
#include <asm/arch/clock.h>
diff --git a/drivers/ddr/imx/imx8m/helper.c b/drivers/ddr/imx/imx8m/helper.c
index b3e63834ca..5ebf54f5f4 100644
--- a/drivers/ddr/imx/imx8m/helper.c
+++ b/drivers/ddr/imx/imx8m/helper.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <log.h>
#include <spl.h>
#include <asm/io.h>
#include <errno.h>
diff --git a/drivers/ddr/marvell/a38x/ddr3_debug.c b/drivers/ddr/marvell/a38x/ddr3_debug.c
index f5fc964d6f..22e0cc4d91 100644
--- a/drivers/ddr/marvell/a38x/ddr3_debug.c
+++ b/drivers/ddr/marvell/a38x/ddr3_debug.c
@@ -6,6 +6,7 @@
#include "ddr3_init.h"
#include "mv_ddr_training_db.h"
#include "mv_ddr_regs.h"
+#include <log.h>
u8 is_reg_dump = 0;
u8 debug_pbs = DEBUG_LEVEL_ERROR;
diff --git a/drivers/ddr/marvell/a38x/ddr3_training.c b/drivers/ddr/marvell/a38x/ddr3_training.c
index 9718f18c30..34cc170910 100644
--- a/drivers/ddr/marvell/a38x/ddr3_training.c
+++ b/drivers/ddr/marvell/a38x/ddr3_training.c
@@ -7,6 +7,8 @@
#include "mv_ddr_common.h"
#include "mv_ddr_training_db.h"
#include "mv_ddr_regs.h"
+#include <log.h>
+#include <linux/delay.h>
#define GET_CS_FROM_MASK(mask) (cs_mask2_num[mask])
#define CS_CBE_VALUE(cs_num) (cs_cbe_reg[cs_num])
diff --git a/drivers/ddr/marvell/a38x/ddr3_training_ip_engine.c b/drivers/ddr/marvell/a38x/ddr3_training_ip_engine.c
index 1eababeebd..979f3530b7 100644
--- a/drivers/ddr/marvell/a38x/ddr3_training_ip_engine.c
+++ b/drivers/ddr/marvell/a38x/ddr3_training_ip_engine.c
@@ -7,6 +7,7 @@
#include "mv_ddr_regs.h"
#include "ddr_training_ip_db.h"
#include <image.h>
+#include <linux/delay.h>
#define PATTERN_1 0x55555555
#define PATTERN_2 0xaaaaaaaa
diff --git a/drivers/ddr/marvell/a38x/ddr3_training_leveling.c b/drivers/ddr/marvell/a38x/ddr3_training_leveling.c
index 7f7df6794a..dadb06b318 100644
--- a/drivers/ddr/marvell/a38x/ddr3_training_leveling.c
+++ b/drivers/ddr/marvell/a38x/ddr3_training_leveling.c
@@ -7,6 +7,7 @@
#include "mv_ddr_training_db.h"
#include "ddr_training_ip_db.h"
#include "mv_ddr_regs.h"
+#include <linux/delay.h>
#define WL_ITERATION_NUM 10
diff --git a/drivers/ddr/marvell/a38x/mv_ddr_plat.c b/drivers/ddr/marvell/a38x/mv_ddr_plat.c
index cc7942d0ba..72f0dfbbbb 100644
--- a/drivers/ddr/marvell/a38x/mv_ddr_plat.c
+++ b/drivers/ddr/marvell/a38x/mv_ddr_plat.c
@@ -7,6 +7,7 @@
#include "mv_ddr_training_db.h"
#include "mv_ddr_regs.h"
#include "mv_ddr_sys_env_lib.h"
+#include <linux/delay.h>
#define DDR_INTERFACES_NUM 1
#define DDR_INTERFACE_OCTETS_NUM 5
diff --git a/drivers/ddr/marvell/axp/ddr3_dfs.c b/drivers/ddr/marvell/axp/ddr3_dfs.c
index ba899592f8..b58c0fe01e 100644
--- a/drivers/ddr/marvell/axp/ddr3_dfs.c
+++ b/drivers/ddr/marvell/axp/ddr3_dfs.c
@@ -9,6 +9,7 @@
#include <asm/io.h>
#include <asm/arch/cpu.h>
#include <asm/arch/soc.h>
+#include <linux/delay.h>
#include "ddr3_hw_training.h"
diff --git a/drivers/ddr/marvell/axp/ddr3_dqs.c b/drivers/ddr/marvell/axp/ddr3_dqs.c
index 0a64dde884..0db94212b9 100644
--- a/drivers/ddr/marvell/axp/ddr3_dqs.c
+++ b/drivers/ddr/marvell/axp/ddr3_dqs.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <i2c.h>
+#include <log.h>
#include <spl.h>
#include <asm/io.h>
#include <asm/arch/cpu.h>
diff --git a/drivers/ddr/marvell/axp/ddr3_hw_training.c b/drivers/ddr/marvell/axp/ddr3_hw_training.c
index cc3a77c850..35d98faf58 100644
--- a/drivers/ddr/marvell/axp/ddr3_hw_training.c
+++ b/drivers/ddr/marvell/axp/ddr3_hw_training.c
@@ -5,10 +5,12 @@
#include <common.h>
#include <i2c.h>
+#include <log.h>
#include <spl.h>
#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 30ad5d4151..607f3e12c3 100644
--- a/drivers/ddr/marvell/axp/ddr3_init.c
+++ b/drivers/ddr/marvell/axp/ddr3_init.c
@@ -5,10 +5,12 @@
#include <common.h>
#include <i2c.h>
+#include <log.h>
#include <spl.h>
#include <asm/io.h>
#include <asm/arch/cpu.h>
#include <asm/arch/soc.h>
+#include <linux/delay.h>
#include "ddr3_init.h"
diff --git a/drivers/ddr/marvell/axp/ddr3_pbs.c b/drivers/ddr/marvell/axp/ddr3_pbs.c
index e44f08d26a..069a42fbf5 100644
--- a/drivers/ddr/marvell/axp/ddr3_pbs.c
+++ b/drivers/ddr/marvell/axp/ddr3_pbs.c
@@ -9,6 +9,7 @@
#include <asm/io.h>
#include <asm/arch/cpu.h>
#include <asm/arch/soc.h>
+#include <linux/delay.h>
#include "ddr3_hw_training.h"
diff --git a/drivers/ddr/marvell/axp/ddr3_read_leveling.c b/drivers/ddr/marvell/axp/ddr3_read_leveling.c
index bf8d67616a..30a5c35488 100644
--- a/drivers/ddr/marvell/axp/ddr3_read_leveling.c
+++ b/drivers/ddr/marvell/axp/ddr3_read_leveling.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <i2c.h>
+#include <log.h>
#include <spl.h>
#include <asm/io.h>
#include <asm/arch/cpu.h>
diff --git a/drivers/ddr/marvell/axp/ddr3_write_leveling.c b/drivers/ddr/marvell/axp/ddr3_write_leveling.c
index cd364edabb..d4add44777 100644
--- a/drivers/ddr/marvell/axp/ddr3_write_leveling.c
+++ b/drivers/ddr/marvell/axp/ddr3_write_leveling.c
@@ -5,10 +5,12 @@
#include <common.h>
#include <i2c.h>
+#include <log.h>
#include <spl.h>
#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/xor.c b/drivers/ddr/marvell/axp/xor.c
index 31e6582655..17bfe6a7bf 100644
--- a/drivers/ddr/marvell/axp/xor.c
+++ b/drivers/ddr/marvell/axp/xor.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <i2c.h>
+#include <log.h>
#include <spl.h>
#include <asm/io.h>
#include <asm/arch/cpu.h>
diff --git a/drivers/demo/demo-shape.c b/drivers/demo/demo-shape.c
index 98b644680c..8686c99845 100644
--- a/drivers/demo/demo-shape.c
+++ b/drivers/demo/demo-shape.c
@@ -7,6 +7,7 @@
#include <dm.h>
#include <errno.h>
#include <fdtdec.h>
+#include <log.h>
#include <malloc.h>
#include <dm-demo.h>
#include <asm/io.h>
diff --git a/drivers/demo/demo-uclass.c b/drivers/demo/demo-uclass.c
index 3b8439b836..6c36f03254 100644
--- a/drivers/demo/demo-uclass.c
+++ b/drivers/demo/demo-uclass.c
@@ -11,6 +11,7 @@
#include <dm-demo.h>
#include <errno.h>
#include <fdtdec.h>
+#include <log.h>
#include <malloc.h>
#include <asm/io.h>
#include <linux/list.h>
diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c
index df50196dfd..a298c2c439 100644
--- a/drivers/dfu/dfu.c
+++ b/drivers/dfu/dfu.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <env.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include <mmc.h>
#include <fat.h>
diff --git a/drivers/dfu/dfu_mmc.c b/drivers/dfu/dfu_mmc.c
index 0d495a785b..691d01c7eb 100644
--- a/drivers/dfu/dfu_mmc.c
+++ b/drivers/dfu/dfu_mmc.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <log.h>
#include <malloc.h>
#include <errno.h>
#include <div64.h>
@@ -14,6 +15,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;
@@ -369,7 +371,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/dfu/dfu_nand.c b/drivers/dfu/dfu_nand.c
index 58b94348c9..b8d24d203b 100644
--- a/drivers/dfu/dfu_nand.c
+++ b/drivers/dfu/dfu_nand.c
@@ -10,6 +10,7 @@
*/
#include <common.h>
+#include <log.h>
#include <malloc.h>
#include <errno.h>
#include <div64.h>
diff --git a/drivers/dfu/dfu_sf.c b/drivers/dfu/dfu_sf.c
index 0fdbfae434..318e43c179 100644
--- a/drivers/dfu/dfu_sf.c
+++ b/drivers/dfu/dfu_sf.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <flash.h>
#include <malloc.h>
#include <errno.h>
#include <div64.h>
diff --git a/drivers/dfu/dfu_tftp.c b/drivers/dfu/dfu_tftp.c
index e5b35bfd5f..ffae4bb54f 100644
--- a/drivers/dfu/dfu_tftp.c
+++ b/drivers/dfu/dfu_tftp.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <log.h>
#include <malloc.h>
#include <errno.h>
#include <dfu.h>
diff --git a/drivers/dfu/dfu_virt.c b/drivers/dfu/dfu_virt.c
index ea8c71f100..62605bcde5 100644
--- a/drivers/dfu/dfu_virt.c
+++ b/drivers/dfu/dfu_virt.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dfu.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
int __weak dfu_write_medium_virt(struct dfu_entity *dfu, u64 offset,
diff --git a/drivers/dma/apbh_dma.c b/drivers/dma/apbh_dma.c
index 69eb040d32..da988f6bb6 100644
--- a/drivers/dma/apbh_dma.c
+++ b/drivers/dma/apbh_dma.c
@@ -12,6 +12,7 @@
*/
#include <cpu_func.h>
+#include <asm/cache.h>
#include <linux/list.h>
#include <common.h>
diff --git a/drivers/dma/bcm6348-iudma.c b/drivers/dma/bcm6348-iudma.c
index d99460f2fb..91172d483c 100644
--- a/drivers/dma/bcm6348-iudma.c
+++ b/drivers/dma/bcm6348-iudma.c
@@ -20,10 +20,14 @@
#include <cpu_func.h>
#include <dm.h>
#include <dma-uclass.h>
+#include <log.h>
#include <malloc.h>
#include <memalign.h>
+#include <net.h>
#include <reset.h>
#include <asm/io.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#define DMA_RX_DESC 6
#define DMA_TX_DESC 1
diff --git a/drivers/dma/dma-uclass.c b/drivers/dma/dma-uclass.c
index 9d5a7fc796..8cbb364042 100644
--- a/drivers/dma/dma-uclass.c
+++ b/drivers/dma/dma-uclass.c
@@ -12,7 +12,9 @@
#include <common.h>
#include <cpu_func.h>
#include <dm.h>
+#include <log.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/keystone_nav.c b/drivers/dma/keystone_nav.c
index 3a15121200..443e4b2366 100644
--- a/drivers/dma/keystone_nav.c
+++ b/drivers/dma/keystone_nav.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <asm/io.h>
#include <asm/ti-common/keystone_nav.h>
+#include <linux/delay.h>
struct qm_config qm_memmap = {
.stat_cfg = CONFIG_KSNAV_QM_QUEUE_STATUS_BASE,
diff --git a/drivers/dma/lpc32xx_dma.c b/drivers/dma/lpc32xx_dma.c
index d3ce141eef..ab58e97bfe 100644
--- a/drivers/dma/lpc32xx_dma.c
+++ b/drivers/dma/lpc32xx_dma.c
@@ -9,11 +9,14 @@
#include <common.h>
#include <errno.h>
+#include <init.h>
#include <asm/arch/dma.h>
#include <asm/arch/cpu.h>
#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 */
struct dmac_chan_reg {
diff --git a/drivers/dma/sandbox-dma-test.c b/drivers/dma/sandbox-dma-test.c
index 234a7d2134..838596b24b 100644
--- a/drivers/dma/sandbox-dma-test.c
+++ b/drivers/dma/sandbox-dma-test.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <dm/read.h>
#include <dma-uclass.h>
diff --git a/drivers/dma/ti-edma3.c b/drivers/dma/ti-edma3.c
index 7e11b13e45..77c4ba9530 100644
--- a/drivers/dma/ti-edma3.c
+++ b/drivers/dma/ti-edma3.c
@@ -8,6 +8,7 @@
* Author: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
*/
+#include <asm/cache.h>
#include <asm/io.h>
#include <common.h>
#include <dm.h>
diff --git a/drivers/dma/ti/k3-udma-hwdef.h b/drivers/dma/ti/k3-udma-hwdef.h
index c88399a815..5d50bbcb03 100644
--- a/drivers/dma/ti/k3-udma-hwdef.h
+++ b/drivers/dma/ti/k3-udma-hwdef.h
@@ -12,6 +12,7 @@
#ifndef K3_NAVSS_UDMA_HWDEF_H_
#define K3_NAVSS_UDMA_HWDEF_H_
+#include <linux/bitops.h>
#define UDMA_PSIL_DST_THREAD_ID_OFFSET 0x8000
/* Global registers */
diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
index a0e536ae5e..2ce16c8e27 100644
--- a/drivers/dma/ti/k3-udma.c
+++ b/drivers/dma/ti/k3-udma.c
@@ -7,9 +7,12 @@
#include <common.h>
#include <cpu_func.h>
+#include <log.h>
+#include <asm/cache.h>
#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/fastboot/fb_command.c b/drivers/fastboot/fb_command.c
index 3c4acfecf6..49f6a61c37 100644
--- a/drivers/fastboot/fb_command.c
+++ b/drivers/fastboot/fb_command.c
@@ -10,6 +10,7 @@
#include <fastboot-internal.h>
#include <fb_mmc.h>
#include <fb_nand.h>
+#include <flash.h>
#include <part.h>
#include <stdlib.h>
diff --git a/drivers/fastboot/fb_getvar.c b/drivers/fastboot/fb_getvar.c
index 95cb434189..52da34b1e3 100644
--- a/drivers/fastboot/fb_getvar.c
+++ b/drivers/fastboot/fb_getvar.c
@@ -10,6 +10,7 @@
#include <fb_mmc.h>
#include <fb_nand.h>
#include <fs.h>
+#include <part.h>
#include <version.h>
static void getvar_version(char *var_parameter, char *response);
@@ -103,7 +104,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 +220,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 d7cf9f4aac..b2f8932e1c 100644
--- a/drivers/fastboot/fb_mmc.c
+++ b/drivers/fastboot/fb_mmc.c
@@ -10,7 +10,10 @@
#include <fastboot.h>
#include <fastboot-internal.h>
#include <fb_mmc.h>
+#include <flash.h>
#include <image-sparse.h>
+#include <image.h>
+#include <log.h>
#include <part.h>
#include <mmc.h>
#include <div64.h>
@@ -26,7 +29,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;
@@ -97,9 +100,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;
@@ -210,7 +213,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)
{
@@ -270,7 +273,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");
@@ -366,12 +369,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;
@@ -406,7 +409,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) {
@@ -523,7 +526,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/drivers/fastboot/fb_nand.c b/drivers/fastboot/fb_nand.c
index 6756ea769f..eb8a36f292 100644
--- a/drivers/fastboot/fb_nand.c
+++ b/drivers/fastboot/fb_nand.c
@@ -6,6 +6,8 @@
#include <config.h>
#include <common.h>
+#include <blk.h>
+#include <flash.h>
#include <fastboot.h>
#include <image-sparse.h>
diff --git a/drivers/firmware/firmware-zynqmp.c b/drivers/firmware/firmware-zynqmp.c
index c37642569d..2bdf7771f6 100644
--- a/drivers/firmware/firmware-zynqmp.c
+++ b/drivers/firmware/firmware-zynqmp.c
@@ -7,7 +7,10 @@
#include <common.h>
#include <dm.h>
+#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/firmware/psci.c b/drivers/firmware/psci.c
index 394f30fa88..e0d66d74f5 100644
--- a/drivers/firmware/psci.c
+++ b/drivers/firmware/psci.c
@@ -7,10 +7,13 @@
*/
#include <common.h>
+#include <command.h>
#include <dm.h>
#include <irq_func.h>
+#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>
@@ -131,7 +134,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/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
index c3f95b252f..15f5b0b14c 100644
--- a/drivers/firmware/ti_sci.c
+++ b/drivers/firmware/ti_sci.c
@@ -10,11 +10,13 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <mailbox.h>
#include <malloc.h>
#include <dm/device.h>
#include <dm/device_compat.h>
#include <dm/devres.h>
+#include <linux/bitops.h>
#include <linux/compat.h>
#include <linux/err.h>
#include <linux/soc/ti/k3-sec-proxy.h>
diff --git a/drivers/firmware/ti_sci.h b/drivers/firmware/ti_sci.h
index 24b4d1c794..327bb820f3 100644
--- a/drivers/firmware/ti_sci.h
+++ b/drivers/firmware/ti_sci.h
@@ -15,6 +15,7 @@
#define __TI_SCI_H
/* Generic Messages */
+#include <linux/bitops.h>
#define TI_SCI_MSG_ENABLE_WDT 0x0000
#define TI_SCI_MSG_WAKE_RESET 0x0001
#define TI_SCI_MSG_VERSION 0x0002
diff --git a/drivers/fpga/ACEX1K.c b/drivers/fpga/ACEX1K.c
index 5afd42a97b..aca8049c56 100644
--- a/drivers/fpga/ACEX1K.c
+++ b/drivers/fpga/ACEX1K.c
@@ -10,6 +10,7 @@
#include <common.h> /* core U-Boot definitions */
#include <console.h>
#include <ACEX1K.h> /* ACEX device family */
+#include <linux/delay.h>
/* Define FPGA_DEBUG to get debug printf's */
#ifdef FPGA_DEBUG
diff --git a/drivers/fpga/altera.c b/drivers/fpga/altera.c
index 7c8f518509..bb27b3778f 100644
--- a/drivers/fpga/altera.c
+++ b/drivers/fpga/altera.c
@@ -13,6 +13,7 @@
#include <common.h>
#include <errno.h>
#include <ACEX1K.h>
+#include <log.h>
#include <stratixII.h>
/* Define FPGA_DEBUG to 1 to get debug printf's */
diff --git a/drivers/fpga/cyclon2.c b/drivers/fpga/cyclon2.c
index c929cd2cc5..3b008facb8 100644
--- a/drivers/fpga/cyclon2.c
+++ b/drivers/fpga/cyclon2.c
@@ -8,6 +8,7 @@
#include <common.h> /* core U-Boot definitions */
#include <altera.h>
#include <ACEX1K.h> /* ACEX device family */
+#include <linux/delay.h>
/* Define FPGA_DEBUG to get debug printf's */
#ifdef FPGA_DEBUG
diff --git a/drivers/fpga/fpga.c b/drivers/fpga/fpga.c
index 0917871d49..fe3dfa1233 100644
--- a/drivers/fpga/fpga.c
+++ b/drivers/fpga/fpga.c
@@ -6,6 +6,8 @@
/* Generic FPGA support */
#include <common.h> /* core U-Boot definitions */
+#include <init.h>
+#include <log.h>
#include <xilinx.h> /* xilinx specific definitions */
#include <altera.h> /* altera specific definitions */
#include <lattice.h>
diff --git a/drivers/fpga/ivm_core.c b/drivers/fpga/ivm_core.c
index 6c6e5c385a..adc60919f3 100644
--- a/drivers/fpga/ivm_core.c
+++ b/drivers/fpga/ivm_core.c
@@ -30,6 +30,7 @@
*/
#include <common.h>
+#include <log.h>
#include <linux/string.h>
#include <malloc.h>
#include <lattice.h>
diff --git a/drivers/fpga/lattice.c b/drivers/fpga/lattice.c
index 30bec7feef..e292d991cd 100644
--- a/drivers/fpga/lattice.c
+++ b/drivers/fpga/lattice.c
@@ -11,9 +11,11 @@
*/
#include <common.h>
+#include <log.h>
#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 2853581b97..dfd3cbb461 100644
--- a/drivers/fpga/socfpga_arria10.c
+++ b/drivers/fpga/socfpga_arria10.c
@@ -2,6 +2,8 @@
/*
* 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>
@@ -16,6 +18,8 @@
#include <fs_loader.h>
#include <wait_bit.h>
#include <watchdog.h>
+#include <linux/bitops.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 d8e32508d4..da8fa315e3 100644
--- a/drivers/fpga/stratix10.c
+++ b/drivers/fpga/stratix10.c
@@ -5,7 +5,9 @@
#include <common.h>
#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 12d8dd19bf..b450a81072 100644
--- a/drivers/fpga/stratixII.c
+++ b/drivers/fpga/stratixII.c
@@ -6,6 +6,7 @@
#include <common.h> /* core U-Boot definitions */
#include <altera.h>
+#include <linux/delay.h>
int StratixII_ps_fpp_load (Altera_desc * desc, void *buf, size_t bsize,
int isSerial, int isSecure);
@@ -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 236a730804..abae3b5b75 100644
--- a/drivers/fpga/stratixv.c
+++ b/drivers/fpga/stratixv.c
@@ -5,8 +5,10 @@
#include <common.h>
#include <altera.h>
+#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/versalpl.c b/drivers/fpga/versalpl.c
index 6c69ab7802..b96519e1a4 100644
--- a/drivers/fpga/versalpl.c
+++ b/drivers/fpga/versalpl.c
@@ -6,10 +6,12 @@
#include <common.h>
#include <cpu_func.h>
+#include <log.h>
#include <asm/arch/sys_proto.h>
#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/virtex2.c b/drivers/fpga/virtex2.c
index 395736875f..b3e0537bab 100644
--- a/drivers/fpga/virtex2.c
+++ b/drivers/fpga/virtex2.c
@@ -15,6 +15,7 @@
#include <common.h>
#include <console.h>
#include <virtex2.h>
+#include <linux/delay.h>
#if 0
#define FPGA_DEBUG
diff --git a/drivers/fpga/xilinx.c b/drivers/fpga/xilinx.c
index 4b0334b6be..cbebefb55f 100644
--- a/drivers/fpga/xilinx.c
+++ b/drivers/fpga/xilinx.c
@@ -13,6 +13,7 @@
#include <common.h>
#include <fpga.h>
+#include <log.h>
#include <virtex2.h>
#include <spartan2.h>
#include <spartan3.h>
diff --git a/drivers/fpga/zynqmppl.c b/drivers/fpga/zynqmppl.c
index 4a826e4a71..2ac4e38952 100644
--- a/drivers/fpga/zynqmppl.c
+++ b/drivers/fpga/zynqmppl.c
@@ -8,8 +8,11 @@
#include <console.h>
#include <common.h>
#include <cpu_func.h>
+#include <log.h>
#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/fpga/zynqpl.c b/drivers/fpga/zynqpl.c
index 21624f715b..dcfe513eeb 100644
--- a/drivers/fpga/zynqpl.c
+++ b/drivers/fpga/zynqpl.c
@@ -9,9 +9,12 @@
#include <common.h>
#include <console.h>
#include <cpu_func.h>
+#include <log.h>
+#include <asm/cache.h>
#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/gpio/adi_gpio2.c b/drivers/gpio/adi_gpio2.c
index 9d293b6994..d0849c85c3 100644
--- a/drivers/gpio/adi_gpio2.c
+++ b/drivers/gpio/adi_gpio2.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <malloc.h>
+#include <linux/bug.h>
#include <linux/errno.h>
#include <asm/gpio.h>
diff --git a/drivers/gpio/atmel_pio4.c b/drivers/gpio/atmel_pio4.c
index a3f5e7a2e0..455944d547 100644
--- a/drivers/gpio/atmel_pio4.c
+++ b/drivers/gpio/atmel_pio4.c
@@ -12,6 +12,7 @@
#include <malloc.h>
#include <asm/arch/hardware.h>
#include <asm/gpio.h>
+#include <linux/bitops.h>
#include <mach/gpio.h>
#include <mach/atmel_pio4.h>
diff --git a/drivers/gpio/bcm6345_gpio.c b/drivers/gpio/bcm6345_gpio.c
index 71a978cf40..5da11d988e 100644
--- a/drivers/gpio/bcm6345_gpio.c
+++ b/drivers/gpio/bcm6345_gpio.c
@@ -12,6 +12,7 @@
#include <errno.h>
#include <asm/gpio.h>
#include <asm/io.h>
+#include <linux/bitops.h>
struct bcm6345_gpio_priv {
void __iomem *reg_dirout;
diff --git a/drivers/gpio/cortina_gpio.c b/drivers/gpio/cortina_gpio.c
index e2374ce1e7..055907c1a1 100644
--- a/drivers/gpio/cortina_gpio.c
+++ b/drivers/gpio/cortina_gpio.c
@@ -7,8 +7,10 @@
#include <common.h>
#include <dm.h>
+#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 e3439eebb5..e5e3518194 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>
@@ -18,6 +19,7 @@
#include <dm/root.h>
#include <errno.h>
#include <reset.h>
+#include <linux/bitops.h>
#define GPIO_SWPORT_DR(p) (0x00 + (p) * 0xc)
#define GPIO_SWPORT_DDR(p) (0x04 + (p) * 0xc)
diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
index 9dc4cd6042..c49a041059 100644
--- a/drivers/gpio/gpio-rcar.c
+++ b/drivers/gpio/gpio-rcar.c
@@ -12,6 +12,7 @@
#include <errno.h>
#include <asm/gpio.h>
#include <asm/io.h>
+#include <linux/bitops.h>
#include "../pinctrl/renesas/sh_pfc.h"
#define GPIO_IOINTSEL 0x00 /* General IO/Interrupt Switching Register */
diff --git a/drivers/gpio/gpio-rza1.c b/drivers/gpio/gpio-rza1.c
index ce2453e2ba..21a87d645c 100644
--- a/drivers/gpio/gpio-rza1.c
+++ b/drivers/gpio/gpio-rza1.c
@@ -9,6 +9,7 @@
#include <errno.h>
#include <asm/gpio.h>
#include <asm/io.h>
+#include <linux/bitops.h>
#define P(bank) (0x0000 + (bank) * 4)
#define PSR(bank) (0x0100 + (bank) * 4)
diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c
index d3cea11f76..9eeab22eef 100644
--- a/drivers/gpio/gpio-uclass.c
+++ b/drivers/gpio/gpio-uclass.c
@@ -5,7 +5,7 @@
#include <common.h>
#include <dm.h>
-#include <dm/device_compat.h>
+#include <log.h>
#include <dm/device-internal.h>
#include <dm/lists.h>
#include <dm/uclass-internal.h>
@@ -14,6 +14,7 @@
#include <fdtdec.h>
#include <malloc.h>
#include <asm/gpio.h>
+#include <dm/device_compat.h>
#include <linux/bug.h>
#include <linux/ctype.h>
diff --git a/drivers/gpio/hi6220_gpio.c b/drivers/gpio/hi6220_gpio.c
index 97a0417891..95de2ae366 100644
--- a/drivers/gpio/hi6220_gpio.c
+++ b/drivers/gpio/hi6220_gpio.c
@@ -9,6 +9,7 @@
#include <asm/gpio.h>
#include <asm/io.h>
#include <errno.h>
+#include <linux/bitops.h>
static int hi6220_gpio_direction_input(struct udevice *dev, unsigned int gpio)
{
diff --git a/drivers/gpio/hsdk-creg-gpio.c b/drivers/gpio/hsdk-creg-gpio.c
index 800027f18e..d9df804f63 100644
--- a/drivers/gpio/hsdk-creg-gpio.c
+++ b/drivers/gpio/hsdk-creg-gpio.c
@@ -9,11 +9,13 @@
* warranty of any kind, whether express or implied.
*/
+#include <log.h>
#include <asm-generic/gpio.h>
#include <asm/io.h>
#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/intel_broadwell_gpio.c b/drivers/gpio/intel_broadwell_gpio.c
index 37299ecd0d..95f8b2ba6c 100644
--- a/drivers/gpio/intel_broadwell_gpio.c
+++ b/drivers/gpio/intel_broadwell_gpio.c
@@ -7,6 +7,7 @@
#include <dm.h>
#include <errno.h>
#include <fdtdec.h>
+#include <log.h>
#include <pch.h>
#include <pci.h>
#include <syscon.h>
diff --git a/drivers/gpio/intel_gpio.c b/drivers/gpio/intel_gpio.c
index 67b8b80b9d..711fea1b58 100644
--- a/drivers/gpio/intel_gpio.c
+++ b/drivers/gpio/intel_gpio.c
@@ -7,6 +7,7 @@
#include <dm.h>
#include <errno.h>
#include <fdtdec.h>
+#include <log.h>
#include <p2sb.h>
#include <pch.h>
#include <pci.h>
diff --git a/drivers/gpio/intel_ich6_gpio.c b/drivers/gpio/intel_ich6_gpio.c
index ad08b3aa79..73d98fde55 100644
--- a/drivers/gpio/intel_ich6_gpio.c
+++ b/drivers/gpio/intel_ich6_gpio.c
@@ -30,6 +30,7 @@
#include <dm.h>
#include <errno.h>
#include <fdtdec.h>
+#include <log.h>
#include <pch.h>
#include <pci.h>
#include <asm/cpu.h>
diff --git a/drivers/gpio/mscc_sgpio.c b/drivers/gpio/mscc_sgpio.c
index c65ca81728..780d77b2f8 100644
--- a/drivers/gpio/mscc_sgpio.c
+++ b/drivers/gpio/mscc_sgpio.c
@@ -9,11 +9,13 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <asm/gpio.h>
#include <asm/io.h>
#include <errno.h>
#include <clk.h>
#include <dm/device_compat.h>
+#include <linux/bitops.h>
#include <linux/err.h>
#define MSCC_SGPIOS_PER_BANK 32
diff --git a/drivers/gpio/mt7621_gpio.c b/drivers/gpio/mt7621_gpio.c
index 54d313d6f1..612413e17b 100644
--- a/drivers/gpio/mt7621_gpio.c
+++ b/drivers/gpio/mt7621_gpio.c
@@ -12,6 +12,7 @@
#include <errno.h>
#include <fdtdec.h>
#include <malloc.h>
+#include <linux/bitops.h>
#include <linux/io.h>
#include <asm/io.h>
#include <asm/gpio.h>
diff --git a/drivers/gpio/mvebu_gpio.c b/drivers/gpio/mvebu_gpio.c
index e8b1c5965c..770cbf6b60 100644
--- a/drivers/gpio/mvebu_gpio.c
+++ b/drivers/gpio/mvebu_gpio.c
@@ -8,6 +8,7 @@
#include <asm/gpio.h>
#include <asm/io.h>
#include <errno.h>
+#include <linux/bitops.h>
#define MVEBU_GPIOS_PER_BANK 32
diff --git a/drivers/gpio/mxs_gpio.c b/drivers/gpio/mxs_gpio.c
index 405e9ac135..815339a156 100644
--- a/drivers/gpio/mxs_gpio.c
+++ b/drivers/gpio/mxs_gpio.c
@@ -7,7 +7,9 @@
*/
#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.c b/drivers/gpio/pca953x.c
index fda8054d53..4ab8cee2d1 100644
--- a/drivers/gpio/pca953x.c
+++ b/drivers/gpio/pca953x.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <command.h>
#include <i2c.h>
#include <pca953x.h>
@@ -192,7 +193,7 @@ static int pca953x_info(uint8_t chip)
return 0;
}
-static cmd_tbl_t cmd_pca953x[] = {
+static struct cmd_tbl cmd_pca953x[] = {
U_BOOT_CMD_MKENT(device, 3, 0, (void *)PCA953X_CMD_DEVICE, "", ""),
U_BOOT_CMD_MKENT(output, 4, 0, (void *)PCA953X_CMD_OUTPUT, "", ""),
U_BOOT_CMD_MKENT(input, 3, 0, (void *)PCA953X_CMD_INPUT, "", ""),
@@ -200,13 +201,14 @@ static cmd_tbl_t cmd_pca953x[] = {
U_BOOT_CMD_MKENT(info, 2, 0, (void *)PCA953X_CMD_INFO, "", ""),
};
-static int do_pca953x(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_pca953x(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
static uint8_t chip = CONFIG_SYS_I2C_PCA953X_ADDR;
int ret = CMD_RET_USAGE, val;
ulong ul_arg2 = 0;
ulong ul_arg3 = 0;
- cmd_tbl_t *c;
+ struct cmd_tbl *c;
c = find_cmd_tbl(argv[1], cmd_pca953x, ARRAY_SIZE(cmd_pca953x));
diff --git a/drivers/gpio/pca953x_gpio.c b/drivers/gpio/pca953x_gpio.c
index d06b834a3b..fd17d1a591 100644
--- a/drivers/gpio/pca953x_gpio.c
+++ b/drivers/gpio/pca953x_gpio.c
@@ -28,6 +28,7 @@
#include <asm/io.h>
#include <dm/device_compat.h>
#include <dt-bindings/gpio/gpio.h>
+#include <linux/bitops.h>
#define PCA953X_INPUT 0
#define PCA953X_OUTPUT 1
diff --git a/drivers/gpio/pcf8575_gpio.c b/drivers/gpio/pcf8575_gpio.c
index e93f640488..1b9a18fe5d 100644
--- a/drivers/gpio/pcf8575_gpio.c
+++ b/drivers/gpio/pcf8575_gpio.c
@@ -26,7 +26,9 @@
#include <common.h>
#include <dm.h>
#include <i2c.h>
+#include <log.h>
#include <asm-generic/gpio.h>
+#include <linux/bitops.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/gpio/pic32_gpio.c b/drivers/gpio/pic32_gpio.c
index d8789e7607..bb1ad256fa 100644
--- a/drivers/gpio/pic32_gpio.c
+++ b/drivers/gpio/pic32_gpio.c
@@ -10,6 +10,7 @@
#include <malloc.h>
#include <asm/io.h>
#include <asm/gpio.h>
+#include <linux/bitops.h>
#include <linux/compat.h>
#include <mach/pic32.h>
diff --git a/drivers/gpio/pm8916_gpio.c b/drivers/gpio/pm8916_gpio.c
index 74a773c099..51df5367ea 100644
--- a/drivers/gpio/pm8916_gpio.c
+++ b/drivers/gpio/pm8916_gpio.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <power/pmic.h>
#include <spmi/spmi.h>
#include <asm/io.h>
diff --git a/drivers/gpio/s5p_gpio.c b/drivers/gpio/s5p_gpio.c
index e4b5383d0f..258f13395d 100644
--- a/drivers/gpio/s5p_gpio.c
+++ b/drivers/gpio/s5p_gpio.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <errno.h>
#include <fdtdec.h>
+#include <log.h>
#include <malloc.h>
#include <asm/io.h>
#include <asm/gpio.h>
diff --git a/drivers/gpio/sandbox.c b/drivers/gpio/sandbox.c
index 9549c74c2b..98b7fa4bb3 100644
--- a/drivers/gpio/sandbox.c
+++ b/drivers/gpio/sandbox.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <fdtdec.h>
+#include <log.h>
#include <malloc.h>
#include <asm/gpio.h>
#include <dm/device_compat.h>
diff --git a/drivers/gpio/sh_pfc.c b/drivers/gpio/sh_pfc.c
index 6320a6280d..0653171af4 100644
--- a/drivers/gpio/sh_pfc.c
+++ b/drivers/gpio/sh_pfc.c
@@ -10,10 +10,13 @@
*/
#include <common.h>
+#include <log.h>
#include <malloc.h>
#include <asm/bitops.h>
#include <asm/io.h>
#include <sh_pfc.h>
+#include <linux/bitops.h>
+#include <linux/bug.h>
static struct pinmux_info *gpioc;
diff --git a/drivers/gpio/sifive-gpio.c b/drivers/gpio/sifive-gpio.c
index 76d5a1d34e..24da3b3c23 100644
--- a/drivers/gpio/sifive-gpio.c
+++ b/drivers/gpio/sifive-gpio.c
@@ -11,6 +11,7 @@
#include <asm/io.h>
#include <errno.h>
#include <asm/gpio.h>
+#include <linux/bitops.h>
static int sifive_gpio_probe(struct udevice *dev)
{
diff --git a/drivers/gpio/stm32_gpio.c b/drivers/gpio/stm32_gpio.c
index 37a8cfa47a..4f710b6b6a 100644
--- a/drivers/gpio/stm32_gpio.c
+++ b/drivers/gpio/stm32_gpio.c
@@ -8,11 +8,13 @@
#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>
#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/tca642x.c b/drivers/gpio/tca642x.c
index 730460a999..463cfe879a 100644
--- a/drivers/gpio/tca642x.c
+++ b/drivers/gpio/tca642x.c
@@ -21,6 +21,7 @@
*/
#include <common.h>
+#include <command.h>
#include <i2c.h>
#include <tca642x.h>
@@ -212,7 +213,7 @@ static int tca642x_info(uchar chip)
return 0;
}
-static cmd_tbl_t cmd_tca642x[] = {
+static struct cmd_tbl cmd_tca642x[] = {
U_BOOT_CMD_MKENT(device, 3, 0, (void *)TCA642X_CMD_DEVICE, "", ""),
U_BOOT_CMD_MKENT(output, 4, 0, (void *)TCA642X_CMD_OUTPUT, "", ""),
U_BOOT_CMD_MKENT(input, 3, 0, (void *)TCA642X_CMD_INPUT, "", ""),
@@ -220,7 +221,8 @@ static cmd_tbl_t cmd_tca642x[] = {
U_BOOT_CMD_MKENT(info, 2, 0, (void *)TCA642X_CMD_INFO, "", ""),
};
-static int do_tca642x(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_tca642x(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
static uchar chip = CONFIG_SYS_I2C_TCA642X_ADDR;
int ret = CMD_RET_USAGE, val;
@@ -228,7 +230,7 @@ static int do_tca642x(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
uint8_t bank_shift;
ulong ul_arg2 = 0;
ulong ul_arg3 = 0;
- cmd_tbl_t *c;
+ struct cmd_tbl *c;
c = find_cmd_tbl(argv[1], cmd_tca642x, ARRAY_SIZE(cmd_tca642x));
diff --git a/drivers/gpio/tegra186_gpio_priv.h b/drivers/gpio/tegra186_gpio_priv.h
index ac8df27c46..3e686beedc 100644
--- a/drivers/gpio/tegra186_gpio_priv.h
+++ b/drivers/gpio/tegra186_gpio_priv.h
@@ -10,6 +10,7 @@
* For each GPIO, there are a set of registers than affect it, all packed
* back-to-back.
*/
+#include <linux/bitops.h>
#define TEGRA186_GPIO_ENABLE_CONFIG 0x00
#define TEGRA186_GPIO_ENABLE_CONFIG_ENABLE BIT(0)
#define TEGRA186_GPIO_ENABLE_CONFIG_OUT BIT(1)
diff --git a/drivers/gpio/tegra_gpio.c b/drivers/gpio/tegra_gpio.c
index a730f5c4fe..912577a571 100644
--- a/drivers/gpio/tegra_gpio.c
+++ b/drivers/gpio/tegra_gpio.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <errno.h>
#include <fdtdec.h>
diff --git a/drivers/gpio/xilinx_gpio.c b/drivers/gpio/xilinx_gpio.c
index 2389abee37..014f120d60 100644
--- a/drivers/gpio/xilinx_gpio.c
+++ b/drivers/gpio/xilinx_gpio.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include <linux/list.h>
#include <asm/io.h>
diff --git a/drivers/gpio/zynq_gpio.c b/drivers/gpio/zynq_gpio.c
index fe3b2c3b1a..d0e90b8d63 100644
--- a/drivers/gpio/zynq_gpio.c
+++ b/drivers/gpio/zynq_gpio.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <asm/gpio.h>
#include <asm/io.h>
+#include <linux/bitops.h>
#include <linux/errno.h>
#include <dm.h>
#include <fdtdec.h>
diff --git a/drivers/hwspinlock/hwspinlock-uclass.c b/drivers/hwspinlock/hwspinlock-uclass.c
index 61d226bcbb..9da79455ed 100644
--- a/drivers/hwspinlock/hwspinlock-uclass.c
+++ b/drivers/hwspinlock/hwspinlock-uclass.c
@@ -7,6 +7,7 @@
#include <dm.h>
#include <errno.h>
#include <hwspinlock.h>
+#include <log.h>
#include <dm/device-internal.h>
#include <dm/device_compat.h>
#include <linux/compat.h>
diff --git a/drivers/hwspinlock/stm32_hwspinlock.c b/drivers/hwspinlock/stm32_hwspinlock.c
index 74afb4aec2..8be585a0c8 100644
--- a/drivers/hwspinlock/stm32_hwspinlock.c
+++ b/drivers/hwspinlock/stm32_hwspinlock.c
@@ -9,6 +9,7 @@
#include <hwspinlock.h>
#include <malloc.h>
#include <asm/io.h>
+#include <linux/bitops.h>
#define STM32_MUTEX_COREID BIT(8)
#define STM32_MUTEX_LOCK_BIT BIT(31)
diff --git a/drivers/i2c/ast_i2c.c b/drivers/i2c/ast_i2c.c
index c84d75ac92..214362d04b 100644
--- a/drivers/i2c/ast_i2c.c
+++ b/drivers/i2c/ast_i2c.c
@@ -11,8 +11,10 @@
#include <errno.h>
#include <fdtdec.h>
#include <i2c.h>
+#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/at91_i2c.h b/drivers/i2c/at91_i2c.h
index 87f02bfaf3..3915af8372 100644
--- a/drivers/i2c/at91_i2c.h
+++ b/drivers/i2c/at91_i2c.h
@@ -1,6 +1,7 @@
#ifndef _AT91_I2C_H
#define _AT91_I2C_H
+#include <linux/bitops.h>
#define TWI_CR_START BIT(0) /* Send a Start Condition */
#define TWI_CR_MSEN BIT(2) /* Master Transfer Enable */
#define TWI_CR_STOP BIT(1) /* Send a Stop Condition */
diff --git a/drivers/i2c/cros_ec_ldo.c b/drivers/i2c/cros_ec_ldo.c
index 501e602b27..c593540ac1 100644
--- a/drivers/i2c/cros_ec_ldo.c
+++ b/drivers/i2c/cros_ec_ldo.c
@@ -9,6 +9,7 @@
#include <cros_ec.h>
#include <errno.h>
#include <i2c.h>
+#include <log.h>
#include <power/tps65090.h>
static int cros_ec_ldo_set_bus_speed(struct udevice *dev, unsigned int speed)
diff --git a/drivers/i2c/davinci_i2c.c b/drivers/i2c/davinci_i2c.c
index edc40f706c..f8e9d003e6 100644
--- a/drivers/i2c/davinci_i2c.c
+++ b/drivers/i2c/davinci_i2c.c
@@ -14,9 +14,11 @@
#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>
+#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 088a6f3efb..42ee7d523e 100644
--- a/drivers/i2c/designware_i2c.c
+++ b/drivers/i2c/designware_i2c.c
@@ -8,10 +8,12 @@
#include <clk.h>
#include <dm.h>
#include <i2c.h>
+#include <log.h>
#include <malloc.h>
#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/designware_i2c.h b/drivers/i2c/designware_i2c.h
index 7ee236193d..dc9a6ccb63 100644
--- a/drivers/i2c/designware_i2c.h
+++ b/drivers/i2c/designware_i2c.h
@@ -10,6 +10,7 @@
#include <clk.h>
#include <i2c.h>
#include <reset.h>
+#include <linux/bitops.h>
struct i2c_regs {
u32 ic_con; /* 0x00 */
diff --git a/drivers/i2c/designware_i2c_pci.c b/drivers/i2c/designware_i2c_pci.c
index 50f03e3d90..bd34ec0b47 100644
--- a/drivers/i2c/designware_i2c_pci.c
+++ b/drivers/i2c/designware_i2c_pci.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <spl.h>
#include <asm/lpss.h>
#include "designware_i2c.h"
diff --git a/drivers/i2c/exynos_hs_i2c.c b/drivers/i2c/exynos_hs_i2c.c
index 9f201c66d0..4fc9d90580 100644
--- a/drivers/i2c/exynos_hs_i2c.c
+++ b/drivers/i2c/exynos_hs_i2c.c
@@ -9,9 +9,11 @@
#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>
+#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 097c54388f..da933452f5 100644
--- a/drivers/i2c/fsl_i2c.c
+++ b/drivers/i2c/fsl_i2c.c
@@ -9,12 +9,14 @@
#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 */
#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 ac15da2c67..024c63c4ea 100644
--- a/drivers/i2c/i2c-cdns.c
+++ b/drivers/i2c/i2c-cdns.c
@@ -9,6 +9,9 @@
#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>
#include <linux/errno.h>
diff --git a/drivers/i2c/i2c-emul-uclass.c b/drivers/i2c/i2c-emul-uclass.c
index ae5aae03e7..1b70e14054 100644
--- a/drivers/i2c/i2c-emul-uclass.c
+++ b/drivers/i2c/i2c-emul-uclass.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <i2c.h>
+#include <log.h>
#include <dm/device-internal.h>
#include <dm/uclass-internal.h>
diff --git a/drivers/i2c/i2c-gpio.c b/drivers/i2c/i2c-gpio.c
index 07fdd343f2..cfdeadc752 100644
--- a/drivers/i2c/i2c-gpio.c
+++ b/drivers/i2c/i2c-gpio.c
@@ -9,7 +9,9 @@
#include <errno.h>
#include <dm.h>
#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 e9ec388576..8166df7ba6 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>
@@ -14,6 +15,7 @@
#if CONFIG_IS_ENABLED(DM_GPIO)
#include <asm/gpio.h>
#endif
+#include <linux/delay.h>
#define I2C_MAX_OFFSET_LEN 4
diff --git a/drivers/i2c/i2c-versatile.c b/drivers/i2c/i2c-versatile.c
index f523844204..62831522bd 100644
--- a/drivers/i2c/i2c-versatile.c
+++ b/drivers/i2c/i2c-versatile.c
@@ -11,6 +11,8 @@
#include <i2c.h>
#include <asm/io.h>
#include <clk.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <linux/io.h>
#define I2C_CONTROL_REG 0x00
diff --git a/drivers/i2c/i2c_core.c b/drivers/i2c/i2c_core.c
index 234277a299..da50d86cc8 100644
--- a/drivers/i2c/i2c_core.c
+++ b/drivers/i2c/i2c_core.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
#include <i2c.h>
+#include <linker_lists.h>
struct i2c_adapter *i2c_get_adapter(int index)
{
diff --git a/drivers/i2c/ihs_i2c.c b/drivers/i2c/ihs_i2c.c
index f7b59d36f9..cec38538da 100644
--- a/drivers/i2c/ihs_i2c.c
+++ b/drivers/i2c/ihs_i2c.c
@@ -12,7 +12,10 @@
#else
#include <gdsys_fpga.h>
#endif
+#include <log.h>
#include <asm/unaligned.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#ifdef CONFIG_DM_I2C
struct ihs_i2c_priv {
diff --git a/drivers/i2c/imx_lpi2c.c b/drivers/i2c/imx_lpi2c.c
index 62e68046d6..c8e42e05f5 100644
--- a/drivers/i2c/imx_lpi2c.c
+++ b/drivers/i2c/imx_lpi2c.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <errno.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
diff --git a/drivers/i2c/intel_i2c.c b/drivers/i2c/intel_i2c.c
index f5509fef16..3b79cb40cd 100644
--- a/drivers/i2c/intel_i2c.c
+++ b/drivers/i2c/intel_i2c.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <dm.h>
#include <i2c.h>
+#include <log.h>
#include <pci.h>
#include <asm/io.h>
diff --git a/drivers/i2c/kona_i2c.c b/drivers/i2c/kona_i2c.c
index 8e31481c0f..4edcba2911 100644
--- a/drivers/i2c/kona_i2c.c
+++ b/drivers/i2c/kona_i2c.c
@@ -7,7 +7,9 @@
*/
#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/lpc32xx_i2c.c b/drivers/i2c/lpc32xx_i2c.c
index a95b5cc902..6af2e975cf 100644
--- a/drivers/i2c/lpc32xx_i2c.c
+++ b/drivers/i2c/lpc32xx_i2c.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <i2c.h>
#include <linux/errno.h>
diff --git a/drivers/i2c/meson_i2c.c b/drivers/i2c/meson_i2c.c
index bcf45160d8..e070caf43f 100644
--- a/drivers/i2c/meson_i2c.c
+++ b/drivers/i2c/meson_i2c.c
@@ -3,10 +3,13 @@
* (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>
#include <i2c.h>
+#include <linux/bitops.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 5029c71adc..584d0a4fef 100644
--- a/drivers/i2c/muxes/i2c-arb-gpio-challenge.c
+++ b/drivers/i2c/muxes/i2c-arb-gpio-challenge.c
@@ -8,8 +8,10 @@
#include <dm.h>
#include <errno.h>
#include <i2c.h>
+#include <log.h>
#include <malloc.h>
#include <asm/gpio.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/i2c/muxes/i2c-mux-gpio.c b/drivers/i2c/muxes/i2c-mux-gpio.c
index 0575bd8937..83dcb40213 100644
--- a/drivers/i2c/muxes/i2c-mux-gpio.c
+++ b/drivers/i2c/muxes/i2c-mux-gpio.c
@@ -17,6 +17,7 @@
#include <fdtdec.h>
#include <i2c.h>
#include <linux/errno.h>
+#include <linux/libfdt.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/i2c/muxes/i2c-mux-uclass.c b/drivers/i2c/muxes/i2c-mux-uclass.c
index 9a3dd7ec4a..26897554b0 100644
--- a/drivers/i2c/muxes/i2c-mux-uclass.c
+++ b/drivers/i2c/muxes/i2c-mux-uclass.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <errno.h>
#include <i2c.h>
+#include <log.h>
#include <malloc.h>
#include <dm/lists.h>
#include <dm/root.h>
diff --git a/drivers/i2c/muxes/pca954x.c b/drivers/i2c/muxes/pca954x.c
index cc8afc93b5..7360e162ee 100644
--- a/drivers/i2c/muxes/pca954x.c
+++ b/drivers/i2c/muxes/pca954x.c
@@ -9,6 +9,7 @@
#include <dm.h>
#include <errno.h>
#include <i2c.h>
+#include <log.h>
#include <malloc.h>
#include <asm-generic/gpio.h>
diff --git a/drivers/i2c/mv_i2c.c b/drivers/i2c/mv_i2c.c
index 63665f0952..59675d8d57 100644
--- a/drivers/i2c/mv_i2c.c
+++ b/drivers/i2c/mv_i2c.c
@@ -19,7 +19,9 @@
#include <common.h>
#include <dm.h>
#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 d4b2031249..d3cc9b9d83 100644
--- a/drivers/i2c/mvtwsi.c
+++ b/drivers/i2c/mvtwsi.c
@@ -9,6 +9,8 @@
#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 4d6e0e3e75..3b0d27e6cd 100644
--- a/drivers/i2c/mxc_i2c.c
+++ b/drivers/i2c/mxc_i2c.c
@@ -14,9 +14,11 @@
*/
#include <common.h>
+#include <log.h>
#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/mach-imx/sys_proto.h>
diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c
index 6e7d24d727..8592a819c4 100644
--- a/drivers/i2c/omap24xx_i2c.c
+++ b/drivers/i2c/omap24xx_i2c.c
@@ -41,6 +41,8 @@
#include <common.h>
#include <dm.h>
#include <i2c.h>
+#include <log.h>
+#include <linux/delay.h>
#include <asm/io.h>
#include <asm/omap_i2c.h>
diff --git a/drivers/i2c/rcar_i2c.c b/drivers/i2c/rcar_i2c.c
index b877602aab..4267bbfa5a 100644
--- a/drivers/i2c/rcar_i2c.c
+++ b/drivers/i2c/rcar_i2c.c
@@ -18,6 +18,8 @@
#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 */
#define RCAR_I2C_ICMCR 0x04 /* master ctrl */
diff --git a/drivers/i2c/rcar_iic.c b/drivers/i2c/rcar_iic.c
index 2a82eb0b76..cad0a623d3 100644
--- a/drivers/i2c/rcar_iic.c
+++ b/drivers/i2c/rcar_iic.c
@@ -14,6 +14,8 @@
#include <dm.h>
#include <i2c.h>
#include <asm/io.h>
+#include <linux/bitops.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 32b2ee8578..fa6f69f400 100644
--- a/drivers/i2c/rk_i2c.c
+++ b/drivers/i2c/rk_i2c.c
@@ -11,11 +11,13 @@
#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>
#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/s3c24x0_i2c.c b/drivers/i2c/s3c24x0_i2c.c
index 68bf93b324..5907217981 100644
--- a/drivers/i2c/s3c24x0_i2c.c
+++ b/drivers/i2c/s3c24x0_i2c.c
@@ -9,6 +9,7 @@
#include <dm.h>
#include <fdtdec.h>
#if (defined CONFIG_EXYNOS4 || defined CONFIG_EXYNOS5)
+#include <log.h>
#include <asm/arch/clk.h>
#include <asm/arch/cpu.h>
#include <asm/arch/pinmux.h>
diff --git a/drivers/i2c/sandbox_i2c.c b/drivers/i2c/sandbox_i2c.c
index 1a4521d5b8..f4ae2397a0 100644
--- a/drivers/i2c/sandbox_i2c.c
+++ b/drivers/i2c/sandbox_i2c.c
@@ -9,6 +9,7 @@
#include <dm.h>
#include <errno.h>
#include <i2c.h>
+#include <log.h>
#include <asm/test.h>
#include <dm/lists.h>
#include <dm/device-internal.h>
diff --git a/drivers/i2c/sh_i2c.c b/drivers/i2c/sh_i2c.c
index 834f1f2179..f857307e6a 100644
--- a/drivers/i2c/sh_i2c.c
+++ b/drivers/i2c/sh_i2c.c
@@ -9,7 +9,9 @@
#include <common.h>
#include <i2c.h>
+#include <log.h>
#include <asm/io.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/i2c/soft_i2c.c b/drivers/i2c/soft_i2c.c
index 9ad1c281ff..1031066b8c 100644
--- a/drivers/i2c/soft_i2c.c
+++ b/drivers/i2c/soft_i2c.c
@@ -25,6 +25,7 @@
#endif
#endif
#include <i2c.h>
+#include <linux/delay.h>
#if defined(CONFIG_SOFT_I2C_GPIO_SCL)
# include <asm/gpio.h>
diff --git a/drivers/i2c/stm32f7_i2c.c b/drivers/i2c/stm32f7_i2c.c
index fc5c1221e1..ada8f4095e 100644
--- a/drivers/i2c/stm32f7_i2c.c
+++ b/drivers/i2c/stm32f7_i2c.c
@@ -7,7 +7,10 @@
#include <clk.h>
#include <dm.h>
#include <i2c.h>
+#include <log.h>
#include <reset.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <dm/device.h>
#include <linux/err.h>
diff --git a/drivers/i2c/tegra186_bpmp_i2c.c b/drivers/i2c/tegra186_bpmp_i2c.c
index 793f3f59b5..37204718ca 100644
--- a/drivers/i2c/tegra186_bpmp_i2c.c
+++ b/drivers/i2c/tegra186_bpmp_i2c.c
@@ -6,8 +6,10 @@
#include <common.h>
#include <dm.h>
#include <i2c.h>
+#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/i2c/tegra_i2c.c b/drivers/i2c/tegra_i2c.c
index 66a0148254..65b3734348 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>
@@ -18,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/cros_ec_keyb.c b/drivers/input/cros_ec_keyb.c
index 8c1a25c73f..6f12ec8b0a 100644
--- a/drivers/input/cros_ec_keyb.c
+++ b/drivers/input/cros_ec_keyb.c
@@ -12,6 +12,7 @@
#include <input.h>
#include <keyboard.h>
#include <key_matrix.h>
+#include <log.h>
#include <stdio_dev.h>
enum {
diff --git a/drivers/input/i8042.c b/drivers/input/i8042.c
index 98015899f2..7beaccca2c 100644
--- a/drivers/input/i8042.c
+++ b/drivers/input/i8042.c
@@ -13,7 +13,9 @@
#include <i8042.h>
#include <input.h>
#include <keyboard.h>
+#include <log.h>
#include <asm/io.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/input/input.c b/drivers/input/input.c
index 6ab378b979..da264f4166 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -11,6 +11,7 @@
#include <dm.h>
#include <env.h>
#include <errno.h>
+#include <log.h>
#include <stdio_dev.h>
#include <input.h>
#ifdef CONFIG_DM_KEYBOARD
diff --git a/drivers/input/key_matrix.c b/drivers/input/key_matrix.c
index 8951e128ec..4631728b8b 100644
--- a/drivers/input/key_matrix.c
+++ b/drivers/input/key_matrix.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <dm.h>
#include <key_matrix.h>
+#include <log.h>
#include <malloc.h>
#include <linux/input.h>
diff --git a/drivers/input/keyboard-uclass.c b/drivers/input/keyboard-uclass.c
index db1a515036..f19934e6bb 100644
--- a/drivers/input/keyboard-uclass.c
+++ b/drivers/input/keyboard-uclass.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <keyboard.h>
+#include <log.h>
static int keyboard_start(struct stdio_dev *sdev)
{
diff --git a/drivers/input/tegra-kbc.c b/drivers/input/tegra-kbc.c
index 70429b94a4..3409bb61d5 100644
--- a/drivers/input/tegra-kbc.c
+++ b/drivers/input/tegra-kbc.c
@@ -10,12 +10,14 @@
#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>
#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_bcm6328.c b/drivers/led/led_bcm6328.c
index 7be4badbac..52946835de 100644
--- a/drivers/led/led_bcm6328.c
+++ b/drivers/led/led_bcm6328.c
@@ -7,6 +7,7 @@
#include <dm.h>
#include <errno.h>
#include <led.h>
+#include <log.h>
#include <asm/io.h>
#include <dm/lists.h>
diff --git a/drivers/led/led_bcm6358.c b/drivers/led/led_bcm6358.c
index 01b86b756e..307d418a17 100644
--- a/drivers/led/led_bcm6358.c
+++ b/drivers/led/led_bcm6358.c
@@ -7,8 +7,10 @@
#include <dm.h>
#include <errno.h>
#include <led.h>
+#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/led/led_bcm6858.c b/drivers/led/led_bcm6858.c
index 27a76fcaf0..b415d8b2b4 100644
--- a/drivers/led/led_bcm6858.c
+++ b/drivers/led/led_bcm6858.c
@@ -11,8 +11,10 @@
#include <dm.h>
#include <errno.h>
#include <led.h>
+#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/led/led_gpio.c b/drivers/led/led_gpio.c
index af6b8245c9..ef9b61ee62 100644
--- a/drivers/led/led_gpio.c
+++ b/drivers/led/led_gpio.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <errno.h>
#include <led.h>
+#include <log.h>
#include <malloc.h>
#include <asm/gpio.h>
#include <dm/lists.h>
diff --git a/drivers/mailbox/k3-sec-proxy.c b/drivers/mailbox/k3-sec-proxy.c
index a560209f03..3f9afaed32 100644
--- a/drivers/mailbox/k3-sec-proxy.c
+++ b/drivers/mailbox/k3-sec-proxy.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <log.h>
#include <malloc.h>
#include <asm/io.h>
#include <dm/device_compat.h>
diff --git a/drivers/mailbox/mailbox-uclass.c b/drivers/mailbox/mailbox-uclass.c
index 291f5c218e..c972d84608 100644
--- a/drivers/mailbox/mailbox-uclass.c
+++ b/drivers/mailbox/mailbox-uclass.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <mailbox.h>
#include <mailbox-uclass.h>
#include <malloc.h>
diff --git a/drivers/mailbox/sandbox-mbox.c b/drivers/mailbox/sandbox-mbox.c
index 25e23eb05b..19704dd5da 100644
--- a/drivers/mailbox/sandbox-mbox.c
+++ b/drivers/mailbox/sandbox-mbox.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <mailbox-uclass.h>
#include <malloc.h>
#include <asm/io.h>
diff --git a/drivers/mailbox/stm32-ipcc.c b/drivers/mailbox/stm32-ipcc.c
index 13e642ab70..b8bf356b4a 100644
--- a/drivers/mailbox/stm32-ipcc.c
+++ b/drivers/mailbox/stm32-ipcc.c
@@ -6,10 +6,12 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#include <log.h>
#include <mailbox-uclass.h>
#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 60f6a38321..f82e6d3d16 100644
--- a/drivers/mailbox/tegra-hsp.c
+++ b/drivers/mailbox/tegra-hsp.c
@@ -4,11 +4,13 @@
*/
#include <common.h>
+#include <log.h>
#include <malloc.h>
#include <asm/io.h>
#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/mailbox/zynqmp-ipi.c b/drivers/mailbox/zynqmp-ipi.c
index 17b46545f5..f206a27a79 100644
--- a/drivers/mailbox/zynqmp-ipi.c
+++ b/drivers/mailbox/zynqmp-ipi.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <dm.h>
#include <mailbox-uclass.h>
diff --git a/drivers/misc/altera_sysid.c b/drivers/misc/altera_sysid.c
index eff33f7343..387c70b070 100644
--- a/drivers/misc/altera_sysid.c
+++ b/drivers/misc/altera_sysid.c
@@ -44,7 +44,7 @@ void display_sysid(void)
printf("SYSID: %08x, %s", sysid[0], asc);
}
-int do_sysid(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_sysid(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
display_sysid();
return 0;
diff --git a/drivers/misc/atsha204a-i2c.c b/drivers/misc/atsha204a-i2c.c
index 116c0661e7..422ea6f3e5 100644
--- a/drivers/misc/atsha204a-i2c.c
+++ b/drivers/misc/atsha204a-i2c.c
@@ -15,6 +15,8 @@
#include <i2c.h>
#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 fa9984f6bd..a5534b1667 100644
--- a/drivers/misc/cros_ec.c
+++ b/drivers/misc/cros_ec.c
@@ -18,11 +18,14 @@
#include <common.h>
#include <command.h>
#include <dm.h>
+#include <flash.h>
#include <i2c.h>
#include <cros_ec.h>
#include <fdtdec.h>
+#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/cros_ec_i2c.c b/drivers/misc/cros_ec_i2c.c
index cdd55f5aa8..c00f5f764a 100644
--- a/drivers/misc/cros_ec_i2c.c
+++ b/drivers/misc/cros_ec_i2c.c
@@ -16,6 +16,7 @@
#include <dm.h>
#include <i2c.h>
#include <cros_ec.h>
+#include <log.h>
#ifdef DEBUG_TRACE
#define debug_trace(fmt, b...) debug(fmt, #b)
diff --git a/drivers/misc/cros_ec_lpc.c b/drivers/misc/cros_ec_lpc.c
index 71d03bfba2..4ad6c8ca66 100644
--- a/drivers/misc/cros_ec_lpc.c
+++ b/drivers/misc/cros_ec_lpc.c
@@ -16,6 +16,7 @@
#include <dm.h>
#include <command.h>
#include <cros_ec.h>
+#include <log.h>
#include <asm/io.h>
#ifdef DEBUG_TRACE
diff --git a/drivers/misc/cros_ec_sandbox.c b/drivers/misc/cros_ec_sandbox.c
index 9dd6a18b2b..c9fa7abd71 100644
--- a/drivers/misc/cros_ec_sandbox.c
+++ b/drivers/misc/cros_ec_sandbox.c
@@ -11,6 +11,7 @@
#include <ec_commands.h>
#include <errno.h>
#include <hash.h>
+#include <log.h>
#include <os.h>
#include <u-boot/sha256.h>
#include <spi.h>
diff --git a/drivers/misc/cros_ec_spi.c b/drivers/misc/cros_ec_spi.c
index be510704c4..153f971bde 100644
--- a/drivers/misc/cros_ec_spi.c
+++ b/drivers/misc/cros_ec_spi.c
@@ -16,6 +16,7 @@
#include <cros_ec.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <spi.h>
int cros_ec_spi_packet(struct udevice *udev, int out_bytes, int in_bytes)
diff --git a/drivers/misc/ds4510.c b/drivers/misc/ds4510.c
index bf20a833ec..a2a5291565 100644
--- a/drivers/misc/ds4510.c
+++ b/drivers/misc/ds4510.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <i2c.h>
#include <command.h>
+#include <linux/delay.h>
#include "ds4510.h"
enum {
@@ -233,7 +234,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 +247,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/esm_pmic.c b/drivers/misc/esm_pmic.c
index 92c8d68f7c..a195dc5eb1 100644
--- a/drivers/misc/esm_pmic.c
+++ b/drivers/misc/esm_pmic.c
@@ -12,6 +12,7 @@
#include <errno.h>
#include <power/pmic.h>
#include <dm/device_compat.h>
+#include <linux/bitops.h>
#define INT_ESM_REG 0x6c
#define INT_ESM_MASK 0x3f
diff --git a/drivers/misc/fs_loader.c b/drivers/misc/fs_loader.c
index 88e486e9d5..56406aa1dd 100644
--- a/drivers/misc/fs_loader.c
+++ b/drivers/misc/fs_loader.c
@@ -10,6 +10,7 @@
#include <blk.h>
#include <fs.h>
#include <fs_loader.h>
+#include <log.h>
#include <linux/string.h>
#include <mapmem.h>
#include <malloc.h>
diff --git a/drivers/misc/fsl_ifc.c b/drivers/misc/fsl_ifc.c
index 0dbf304487..8fdaacd5e0 100644
--- a/drivers/misc/fsl_ifc.c
+++ b/drivers/misc/fsl_ifc.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <fsl_ifc.h>
+#include <part.h>
#ifdef CONFIG_TFABOOT
struct ifc_regs ifc_cfg_default_boot[CONFIG_SYS_FSL_IFC_BANK_COUNT] = {
diff --git a/drivers/misc/fsl_iim.c b/drivers/misc/fsl_iim.c
index f8075db8d5..85cc3c26b2 100644
--- a/drivers/misc/fsl_iim.c
+++ b/drivers/misc/fsl_iim.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <fuse.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
diff --git a/drivers/misc/fsl_portals.c b/drivers/misc/fsl_portals.c
index 45eed22f6e..632430e420 100644
--- a/drivers/misc/fsl_portals.c
+++ b/drivers/misc/fsl_portals.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <log.h>
#include <linux/libfdt.h>
#include <fdt_support.h>
diff --git a/drivers/misc/fsl_sec_mon.c b/drivers/misc/fsl_sec_mon.c
index e9f351dc3a..321bd27fd3 100644
--- a/drivers/misc/fsl_sec_mon.c
+++ b/drivers/misc/fsl_sec_mon.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <fsl_sec_mon.h>
+#include <linux/delay.h>
static u32 get_sec_mon_state(void)
{
diff --git a/drivers/misc/gdsys_ioep.c b/drivers/misc/gdsys_ioep.c
index 7f17095cc5..69e16a06a0 100644
--- a/drivers/misc/gdsys_ioep.c
+++ b/drivers/misc/gdsys_ioep.c
@@ -13,6 +13,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <misc.h>
#include <regmap.h>
diff --git a/drivers/misc/gdsys_ioep.h b/drivers/misc/gdsys_ioep.h
index 4d9524b6b6..f195388eda 100644
--- a/drivers/misc/gdsys_ioep.h
+++ b/drivers/misc/gdsys_ioep.h
@@ -15,6 +15,7 @@
* @bc: Block counter (filled in by FPGA).
* @packet_length: Length of the packet's payload bytes.
*/
+#include <linux/bitops.h>
struct io_generic_packet {
u16 target_address;
u16 source_address;
diff --git a/drivers/misc/gdsys_soc.c b/drivers/misc/gdsys_soc.c
index 94a21e08af..b4c721c6fe 100644
--- a/drivers/misc/gdsys_soc.c
+++ b/drivers/misc/gdsys_soc.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <dm/lists.h>
#include "gdsys_soc.h"
diff --git a/drivers/misc/i2c_eeprom.c b/drivers/misc/i2c_eeprom.c
index ef5f103c98..ed23a62384 100644
--- a/drivers/misc/i2c_eeprom.c
+++ b/drivers/misc/i2c_eeprom.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <eeprom.h>
+#include <linux/delay.h>
#include <linux/err.h>
#include <linux/kernel.h>
#include <dm.h>
diff --git a/drivers/misc/i2c_eeprom_emul.c b/drivers/misc/i2c_eeprom_emul.c
index 16758a0ef9..6be76ad02e 100644
--- a/drivers/misc/i2c_eeprom_emul.c
+++ b/drivers/misc/i2c_eeprom_emul.c
@@ -9,6 +9,7 @@
#include <dm.h>
#include <errno.h>
#include <i2c.h>
+#include <log.h>
#include <malloc.h>
#include <asm/test.h>
diff --git a/drivers/misc/ihs_fpga.c b/drivers/misc/ihs_fpga.c
index f9e4b27a27..00d34a3adc 100644
--- a/drivers/misc/ihs_fpga.c
+++ b/drivers/misc/ihs_fpga.c
@@ -11,8 +11,11 @@
#include <common.h>
#include <dm.h>
+#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 6916b754f6..ee635eb947 100644
--- a/drivers/misc/imx8/scu.c
+++ b/drivers/misc/imx8/scu.c
@@ -6,12 +6,14 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <dm.h>
#include <dm/lists.h>
#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/irq-uclass.c b/drivers/misc/irq-uclass.c
index 61aa10e465..16dc0be75c 100644
--- a/drivers/misc/irq-uclass.c
+++ b/drivers/misc/irq-uclass.c
@@ -10,6 +10,7 @@
#include <dm.h>
#include <dt-structs.h>
#include <irq.h>
+#include <log.h>
#include <dm/device-internal.h>
int irq_route_pmc_gpio_gpe(struct udevice *dev, uint pmc_gpe_num)
diff --git a/drivers/misc/jz4780_efuse.c b/drivers/misc/jz4780_efuse.c
index bc3dc93af2..1fba3271db 100644
--- a/drivers/misc/jz4780_efuse.c
+++ b/drivers/misc/jz4780_efuse.c
@@ -10,6 +10,7 @@
#include <asm/io.h>
#include <asm/unaligned.h>
#include <errno.h>
+#include <linux/bitops.h>
#include <mach/jz4780.h>
#include <wait_bit.h>
diff --git a/drivers/misc/k3_avs.c b/drivers/misc/k3_avs.c
index d8048e1b70..408c89315a 100644
--- a/drivers/misc/k3_avs.c
+++ b/drivers/misc/k3_avs.c
@@ -14,6 +14,7 @@
#include <i2c.h>
#include <k3-avs.h>
#include <dm/device_compat.h>
+#include <linux/bitops.h>
#include <power/regulator.h>
#define AM6_VTM_DEVINFO(i) (priv->base + 0x100 + 0x20 * (i))
diff --git a/drivers/misc/k3_esm.c b/drivers/misc/k3_esm.c
index 8f270f3b5c..cc2a23dd66 100644
--- a/drivers/misc/k3_esm.c
+++ b/drivers/misc/k3_esm.c
@@ -12,6 +12,7 @@
#include <errno.h>
#include <asm/io.h>
#include <dm/device_compat.h>
+#include <linux/bitops.h>
#define ESM_SFT_RST 0x0c
#define ESM_SFT_RST_KEY 0x0f
diff --git a/drivers/misc/microchip_flexcom.c b/drivers/misc/microchip_flexcom.c
index 4cff160d88..44a8b180a4 100644
--- a/drivers/misc/microchip_flexcom.c
+++ b/drivers/misc/microchip_flexcom.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <misc.h>
#include <asm/io.h>
#include <linux/err.h>
diff --git a/drivers/misc/mpc83xx_serdes.c b/drivers/misc/mpc83xx_serdes.c
index d572dda3c1..ab1e34e6f4 100644
--- a/drivers/misc/mpc83xx_serdes.c
+++ b/drivers/misc/mpc83xx_serdes.c
@@ -11,8 +11,10 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <mapmem.h>
#include <misc.h>
+#include <linux/delay.h>
#include "mpc83xx_serdes.h"
diff --git a/drivers/misc/mpc83xx_serdes.h b/drivers/misc/mpc83xx_serdes.h
index 89ea1dbab7..2a13c5892b 100644
--- a/drivers/misc/mpc83xx_serdes.h
+++ b/drivers/misc/mpc83xx_serdes.h
@@ -18,6 +18,7 @@
* lane E) field of the SRCSCR0
* @SRDSCR0_TXEQE_SATA: Bitmask to set the TXEQE to the value used for SATA
*/
+#include <linux/bitops.h>
enum srdscr0_mask {
SRDSCR0_DPPA = BIT(31 - 16),
SRDSCR0_DPPE = BIT(31 - 20),
diff --git a/drivers/misc/mxc_ocotp.c b/drivers/misc/mxc_ocotp.c
index 80cd8dceda..926c62c8a1 100644
--- a/drivers/misc/mxc_ocotp.c
+++ b/drivers/misc/mxc_ocotp.c
@@ -13,6 +13,7 @@
#include <common.h>
#include <fuse.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
diff --git a/drivers/misc/mxs_ocotp.c b/drivers/misc/mxs_ocotp.c
index 21cae02118..facc720c8e 100644
--- a/drivers/misc/mxs_ocotp.c
+++ b/drivers/misc/mxs_ocotp.c
@@ -13,6 +13,7 @@
#include <common.h>
#include <fuse.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
diff --git a/drivers/misc/p2sb-uclass.c b/drivers/misc/p2sb-uclass.c
index 9fe0aca342..06b1e8d9ad 100644
--- a/drivers/misc/p2sb-uclass.c
+++ b/drivers/misc/p2sb-uclass.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <mapmem.h>
#include <p2sb.h>
diff --git a/drivers/misc/p2sb_emul.c b/drivers/misc/p2sb_emul.c
index 02f7a7ea67..a4b6dba516 100644
--- a/drivers/misc/p2sb_emul.c
+++ b/drivers/misc/p2sb_emul.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <axi.h>
#include <dm.h>
+#include <log.h>
#include <pci.h>
#include <asm/test.h>
#include <p2sb.h>
diff --git a/drivers/misc/qfw.c b/drivers/misc/qfw.c
index 81e26614d3..f6eb6583ed 100644
--- a/drivers/misc/qfw.c
+++ b/drivers/misc/qfw.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <command.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include <qfw.h>
#include <asm/io.h>
diff --git a/drivers/misc/rockchip-efuse.c b/drivers/misc/rockchip-efuse.c
index 2520c6a38e..46ce6305fe 100644
--- a/drivers/misc/rockchip-efuse.c
+++ b/drivers/misc/rockchip-efuse.c
@@ -43,8 +43,8 @@ struct rockchip_efuse_platdata {
};
#if defined(DEBUG)
-static int dump_efuses(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+static int dump_efuses(struct cmd_tbl *cmdtp, int flag,
+ int argc, char *const argv[])
{
/*
* N.B.: This function is tailored towards the RK3399 and assumes that
diff --git a/drivers/misc/stm32_rcc.c b/drivers/misc/stm32_rcc.c
index 980b84453e..b82fe54c60 100644
--- a/drivers/misc/stm32_rcc.c
+++ b/drivers/misc/stm32_rcc.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <misc.h>
#include <stm32_rcc.h>
#include <dm/device-internal.h>
diff --git a/drivers/misc/swap_case.c b/drivers/misc/swap_case.c
index 97e2afa676..07c67577d5 100644
--- a/drivers/misc/swap_case.c
+++ b/drivers/misc/swap_case.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <pci.h>
#include <asm/test.h>
#include <linux/ctype.h>
diff --git a/drivers/misc/tegra186_bpmp.c b/drivers/misc/tegra186_bpmp.c
index ce2b925173..18da138507 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>
@@ -13,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/tegra_car.c b/drivers/misc/tegra_car.c
index db05c8917f..0ddbb3c619 100644
--- a/drivers/misc/tegra_car.c
+++ b/drivers/misc/tegra_car.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <dm/lists.h>
#include <dm/root.h>
diff --git a/drivers/misc/vexpress_config.c b/drivers/misc/vexpress_config.c
index 53d7e1d154..02e5b586e2 100644
--- a/drivers/misc/vexpress_config.c
+++ b/drivers/misc/vexpress_config.c
@@ -9,6 +9,7 @@
#include <malloc.h>
#include <dm/read.h>
#include <asm/io.h>
+#include <linux/bitops.h>
#include <linux/delay.h>
#include <misc.h>
diff --git a/drivers/mmc/am654_sdhci.c b/drivers/mmc/am654_sdhci.c
index ca76e1f559..cbc531dc53 100644
--- a/drivers/mmc/am654_sdhci.c
+++ b/drivers/mmc/am654_sdhci.c
@@ -13,6 +13,7 @@
#include <regmap.h>
#include <sdhci.h>
#include <dm/device_compat.h>
+#include <linux/bitops.h>
#include <linux/err.h>
/* CTL_CFG Registers */
diff --git a/drivers/mmc/arm_pl180_mmci.c b/drivers/mmc/arm_pl180_mmci.c
index d396afc14c..846622892a 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>
@@ -22,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_sdhci.c b/drivers/mmc/bcm2835_sdhci.c
index 39c93db275..dc3dffb657 100644
--- a/drivers/mmc/bcm2835_sdhci.c
+++ b/drivers/mmc/bcm2835_sdhci.c
@@ -38,6 +38,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <memalign.h>
#include <sdhci.h>
diff --git a/drivers/mmc/bcm2835_sdhost.c b/drivers/mmc/bcm2835_sdhost.c
index 8cebf99c58..c4876e81f8 100644
--- a/drivers/mmc/bcm2835_sdhost.c
+++ b/drivers/mmc/bcm2835_sdhost.c
@@ -37,7 +37,10 @@
#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>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/sizes.h>
diff --git a/drivers/mmc/davinci_mmc.c b/drivers/mmc/davinci_mmc.c
index ef5cd4e723..2408a687d2 100644
--- a/drivers/mmc/davinci_mmc.c
+++ b/drivers/mmc/davinci_mmc.c
@@ -16,6 +16,7 @@
#include <asm/io.h>
#include <asm/arch/sdmmc_defs.h>
#include <asm-generic/gpio.h>
+#include <linux/delay.h>
#define DAVINCI_MAX_BLOCKS (32)
#define WATCHDOG_COUNT (100000)
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
index 1224540811..7702f4be3f 100644
--- a/drivers/mmc/dw_mmc.c
+++ b/drivers/mmc/dw_mmc.c
@@ -9,11 +9,14 @@
#include <common.h>
#include <cpu_func.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include <memalign.h>
#include <mmc.h>
#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 386781da03..d5d955846c 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -20,9 +20,12 @@
#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>
+#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 6bca2a9c82..588d6a9d76 100644
--- a/drivers/mmc/fsl_esdhc_imx.c
+++ b/drivers/mmc/fsl_esdhc_imx.c
@@ -17,9 +17,13 @@
#include <cpu_func.h>
#include <errno.h>
#include <hwconfig.h>
+#include <log.h>
#include <mmc.h>
#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>
#include <malloc.h>
diff --git a/drivers/mmc/ftsdc010_mci.c b/drivers/mmc/ftsdc010_mci.c
index 9c15eb36d6..b37523e26f 100644
--- a/drivers/mmc/ftsdc010_mci.c
+++ b/drivers/mmc/ftsdc010_mci.c
@@ -11,9 +11,11 @@
#include <common.h>
#include <clk.h>
+#include <log.h>
#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/gen_atmel_mci.c b/drivers/mmc/gen_atmel_mci.c
index 93b88d17d4..9d20e28383 100644
--- a/drivers/mmc/gen_atmel_mci.c
+++ b/drivers/mmc/gen_atmel_mci.c
@@ -11,10 +11,12 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#include <log.h>
#include <mmc.h>
#include <part.h>
#include <malloc.h>
#include <asm/io.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <asm/byteorder.h>
#include <asm/arch/clk.h>
diff --git a/drivers/mmc/iproc_sdhci.c b/drivers/mmc/iproc_sdhci.c
index c2319b4134..91e2e3f0b8 100644
--- a/drivers/mmc/iproc_sdhci.c
+++ b/drivers/mmc/iproc_sdhci.c
@@ -9,6 +9,7 @@
#include <errno.h>
#include <malloc.h>
#include <sdhci.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/mmc/jz_mmc.c b/drivers/mmc/jz_mmc.c
index 8d4f886cb4..d3f1eddf45 100644
--- a/drivers/mmc/jz_mmc.c
+++ b/drivers/mmc/jz_mmc.c
@@ -13,6 +13,8 @@
#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/kona_sdhci.c b/drivers/mmc/kona_sdhci.c
index f5e1f2cbbd..2bbe673b91 100644
--- a/drivers/mmc/kona_sdhci.c
+++ b/drivers/mmc/kona_sdhci.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <malloc.h>
#include <sdhci.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <asm/kona-common/clk.h>
diff --git a/drivers/mmc/meson_gx_mmc.c b/drivers/mmc/meson_gx_mmc.c
index 86c1a7164a..b7f793cd04 100644
--- a/drivers/mmc/meson_gx_mmc.c
+++ b/drivers/mmc/meson_gx_mmc.c
@@ -14,6 +14,7 @@
#include <asm/io.h>
#include <asm/gpio.h>
#include <asm/arch/sd_emmc.h>
+#include <linux/delay.h>
#include <linux/log2.h>
static inline void *get_regbase(const struct mmc *mmc)
diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c
index f313bc1734..c5b7872900 100644
--- a/drivers/mmc/mmc-uclass.c
+++ b/drivers/mmc/mmc-uclass.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <log.h>
#include <mmc.h>
#include <dm.h>
#include <dm/device-internal.h>
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 523c055967..620bb93064 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -8,12 +8,16 @@
#include <config.h>
#include <common.h>
+#include <blk.h>
#include <command.h>
#include <dm.h>
+#include <log.h>
#include <dm/device-internal.h>
#include <errno.h>
#include <mmc.h>
#include <part.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <power/regulator.h>
#include <malloc.h>
#include <memalign.h>
diff --git a/drivers/mmc/mmc_boot.c b/drivers/mmc/mmc_boot.c
index 64dc147a47..0a74b1fb77 100644
--- a/drivers/mmc/mmc_boot.c
+++ b/drivers/mmc/mmc_boot.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <log.h>
#include <mmc.h>
#include "mmc_private.h"
diff --git a/drivers/mmc/mmc_legacy.c b/drivers/mmc/mmc_legacy.c
index b0f5cf58a2..2bb12ceeaf 100644
--- a/drivers/mmc/mmc_legacy.c
+++ b/drivers/mmc/mmc_legacy.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <log.h>
#include <malloc.h>
#include <mmc.h>
#include "mmc_private.h"
diff --git a/drivers/mmc/mmc_spi.c b/drivers/mmc/mmc_spi.c
index c693fb2d17..e76ab54838 100644
--- a/drivers/mmc/mmc_spi.c
+++ b/drivers/mmc/mmc_spi.c
@@ -8,10 +8,12 @@
*/
#include <common.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#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/mmc_write.c b/drivers/mmc/mmc_write.c
index b52ff9f3bc..6a4453ca02 100644
--- a/drivers/mmc/mmc_write.c
+++ b/drivers/mmc/mmc_write.c
@@ -8,6 +8,7 @@
#include <config.h>
#include <common.h>
+#include <blk.h>
#include <dm.h>
#include <part.h>
#include <div64.h>
diff --git a/drivers/mmc/mvebu_mmc.c b/drivers/mmc/mvebu_mmc.c
index 958ac17954..8e7745e233 100644
--- a/drivers/mmc/mvebu_mmc.c
+++ b/drivers/mmc/mvebu_mmc.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include <part.h>
#include <mmc.h>
diff --git a/drivers/mmc/mxsmmc.c b/drivers/mmc/mxsmmc.c
index 9414eff42b..e3c352b44a 100644
--- a/drivers/mmc/mxsmmc.c
+++ b/drivers/mmc/mxsmmc.c
@@ -21,8 +21,11 @@
*/
#include <common.h>
+#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>
#include <asm/arch/clock.h>
diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
index 4d0dc33936..8636cd713a 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>
@@ -33,6 +34,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
@@ -48,6 +50,8 @@
#endif
#include <dm.h>
#include <dm/devres.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <linux/err.h>
#include <power/regulator.h>
#include <thermal.h>
diff --git a/drivers/mmc/pxa_mmc_gen.c b/drivers/mmc/pxa_mmc_gen.c
index a4dcdb5cff..cc6014703c 100644
--- a/drivers/mmc/pxa_mmc_gen.c
+++ b/drivers/mmc/pxa_mmc_gen.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <asm/arch/hardware.h>
#include <asm/arch/regs-mmc.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <asm/io.h>
#include <malloc.h>
diff --git a/drivers/mmc/renesas-sdhi.c b/drivers/mmc/renesas-sdhi.c
index 88a7160b0a..d6ea99d2ce 100644
--- a/drivers/mmc/renesas-sdhi.c
+++ b/drivers/mmc/renesas-sdhi.c
@@ -7,11 +7,14 @@
#include <bouncebuf.h>
#include <clk.h>
#include <fdtdec.h>
+#include <log.h>
#include <malloc.h>
#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>
#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 a0e1be8794..638107a7ff 100644
--- a/drivers/mmc/rockchip_dw_mmc.c
+++ b/drivers/mmc/rockchip_dw_mmc.c
@@ -9,12 +9,14 @@
#include <dt-structs.h>
#include <dwmmc.h>
#include <errno.h>
+#include <log.h>
#include <mapmem.h>
#include <pwrseq.h>
#include <syscon.h>
#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/rpmb.c b/drivers/mmc/rpmb.c
index ee6dbe30db..ea7e506666 100644
--- a/drivers/mmc/rpmb.c
+++ b/drivers/mmc/rpmb.c
@@ -9,6 +9,7 @@
#include <config.h>
#include <common.h>
+#include <log.h>
#include <memalign.h>
#include <mmc.h>
#include <sdhci.h>
diff --git a/drivers/mmc/s5p_sdhci.c b/drivers/mmc/s5p_sdhci.c
index b5fe828dd6..24f599e868 100644
--- a/drivers/mmc/s5p_sdhci.c
+++ b/drivers/mmc/s5p_sdhci.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <sdhci.h>
#include <fdtdec.h>
diff --git a/drivers/mmc/sandbox_mmc.c b/drivers/mmc/sandbox_mmc.c
index 899952d773..e86ea8fe09 100644
--- a/drivers/mmc/sandbox_mmc.c
+++ b/drivers/mmc/sandbox_mmc.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <errno.h>
#include <fdtdec.h>
+#include <log.h>
#include <mmc.h>
#include <asm/test.h>
diff --git a/drivers/mmc/sdhci-cadence.c b/drivers/mmc/sdhci-cadence.c
index 2d38c2270e..7b5010b655 100644
--- a/drivers/mmc/sdhci-cadence.c
+++ b/drivers/mmc/sdhci-cadence.c
@@ -8,6 +8,8 @@
#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>
#include <linux/sizes.h>
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index 8bb4393ce1..92cc8434af 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -11,10 +11,14 @@
#include <cpu_func.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include <mmc.h>
#include <sdhci.h>
#include <dm.h>
+#include <asm/cache.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <phys2bus.h>
diff --git a/drivers/mmc/sh_mmcif.c b/drivers/mmc/sh_mmcif.c
index 29bbb4b3a6..2e994d0178 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>
@@ -14,6 +15,8 @@
#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>
#include <linux/io.h>
diff --git a/drivers/mmc/sh_sdhi.c b/drivers/mmc/sh_sdhi.c
index 2202158c88..772fe943e4 100644
--- a/drivers/mmc/sh_sdhi.c
+++ b/drivers/mmc/sh_sdhi.c
@@ -10,10 +10,14 @@
*/
#include <common.h>
+#include <log.h>
#include <malloc.h>
#include <mmc.h>
#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>
#include <linux/io.h>
diff --git a/drivers/mmc/socfpga_dw_mmc.c b/drivers/mmc/socfpga_dw_mmc.c
index 786cdc700a..892222d27d 100644
--- a/drivers/mmc/socfpga_dw_mmc.c
+++ b/drivers/mmc/socfpga_dw_mmc.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/arch/clock_manager.h>
#include <asm/arch/system_manager.h>
#include <clk.h>
diff --git a/drivers/mmc/sti_sdhci.c b/drivers/mmc/sti_sdhci.c
index d6c75ea601..9bcd8ce5f6 100644
--- a/drivers/mmc/sti_sdhci.c
+++ b/drivers/mmc/sti_sdhci.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <mmc.h>
#include <reset-uclass.h>
#include <sdhci.h>
diff --git a/drivers/mmc/stm32_sdmmc2.c b/drivers/mmc/stm32_sdmmc2.c
index fa6fc94ad9..6d50356217 100644
--- a/drivers/mmc/stm32_sdmmc2.c
+++ b/drivers/mmc/stm32_sdmmc2.c
@@ -9,7 +9,12 @@
#include <cpu_func.h>
#include <dm.h>
#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>
#include <reset.h>
diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c
index 9f426661c4..0e03b07ce5 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>
@@ -20,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 2b041562a6..cc78a2f2f0 100644
--- a/drivers/mmc/tegra_mmc.c
+++ b/drivers/mmc/tegra_mmc.c
@@ -10,10 +10,13 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <mmc.h>
#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)
#include <asm/arch/clock.h>
diff --git a/drivers/mmc/tmio-common.c b/drivers/mmc/tmio-common.c
index 1dc13db9ea..20cd237ef0 100644
--- a/drivers/mmc/tmio-common.c
+++ b/drivers/mmc/tmio-common.c
@@ -13,6 +13,7 @@
#include <dm/device_compat.h>
#include <dm/pinctrl.h>
#include <linux/compat.h>
+#include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <linux/io.h>
#include <linux/sizes.h>
diff --git a/drivers/mmc/tmio-common.h b/drivers/mmc/tmio-common.h
index 2f671df4bc..9062300c64 100644
--- a/drivers/mmc/tmio-common.h
+++ b/drivers/mmc/tmio-common.h
@@ -7,6 +7,7 @@
#ifndef __TMIO_COMMON_H__
#define __TMIO_COMMON_H__
+#include <linux/bitops.h>
#define TMIO_SD_CMD 0x000 /* command */
#define TMIO_SD_CMD_NOSTOP BIT(14) /* No automatic CMD12 issue */
#define TMIO_SD_CMD_MULTI BIT(13) /* multiple block transfer */
diff --git a/drivers/mmc/xenon_sdhci.c b/drivers/mmc/xenon_sdhci.c
index 829b75683b..e765dd384a 100644
--- a/drivers/mmc/xenon_sdhci.c
+++ b/drivers/mmc/xenon_sdhci.c
@@ -17,6 +17,8 @@
#include <common.h>
#include <dm.h>
#include <fdtdec.h>
+#include <linux/bitops.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 18925d01fa..de404aa956 100644
--- a/drivers/mmc/zynq_sdhci.c
+++ b/drivers/mmc/zynq_sdhci.c
@@ -9,7 +9,9 @@
#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>
#include <linux/err.h>
#include <linux/libfdt.h>
diff --git a/drivers/mtd/altera_qspi.c b/drivers/mtd/altera_qspi.c
index 1d32febe07..cd4d32959a 100644
--- a/drivers/mtd/altera_qspi.c
+++ b/drivers/mtd/altera_qspi.c
@@ -9,8 +9,10 @@
#include <errno.h>
#include <fdt_support.h>
#include <flash.h>
+#include <log.h>
#include <mtd.h>
#include <asm/io.h>
+#include <linux/bitops.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index 4ce183b6f3..b7289ba539 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -22,12 +22,16 @@
#include <env.h>
#include <errno.h>
#include <fdt_support.h>
+#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>
#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/jedec_flash.c b/drivers/mtd/jedec_flash.c
index f59b2bc62f..859c7fd4ec 100644
--- a/drivers/mtd/jedec_flash.c
+++ b/drivers/mtd/jedec_flash.c
@@ -12,6 +12,8 @@
/*#define DEBUG*/
#include <common.h>
+#include <flash.h>
+#include <log.h>
#include <asm/processor.h>
#include <asm/io.h>
#include <asm/byteorder.h>
diff --git a/drivers/mtd/mtd_uboot.c b/drivers/mtd/mtd_uboot.c
index db20a6b0b2..9360d4ed17 100644
--- a/drivers/mtd/mtd_uboot.c
+++ b/drivers/mtd/mtd_uboot.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
#include <env.h>
+#include <log.h>
#include <malloc.h>
#include <dm/device.h>
#include <dm/uclass-internal.h>
diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c
index 5621c3fd26..684bc94998 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>
@@ -20,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 f8d3f4d246..1a4dec34d9 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>
@@ -27,6 +28,8 @@
#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>
#endif
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index 56acdbf65b..d1f6029b2b 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>
@@ -20,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/mw_eeprom.c b/drivers/mtd/mw_eeprom.c
index 6a3a6f6751..9837733bee 100644
--- a/drivers/mtd/mw_eeprom.c
+++ b/drivers/mtd/mw_eeprom.c
@@ -3,6 +3,7 @@
#include <common.h>
#include <eeprom.h>
#include <asm/ic/ssi.h>
+#include <linux/delay.h>
/*
* Serial EEPROM opcodes, including start bit
diff --git a/drivers/mtd/nand/bbt.c b/drivers/mtd/nand/bbt.c
index 133670cb19..84d60b8652 100644
--- a/drivers/mtd/nand/bbt.c
+++ b/drivers/mtd/nand/bbt.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <dm/devres.h>
+#include <linux/bitops.h>
#include <linux/mtd/nand.h>
#ifndef __UBOOT__
#include <linux/slab.h>
diff --git a/drivers/mtd/nand/core.c b/drivers/mtd/nand/core.c
index bc0accf8c6..6fbd24ba74 100644
--- a/drivers/mtd/nand/core.c
+++ b/drivers/mtd/nand/core.c
@@ -14,6 +14,7 @@
#include <linux/compat.h>
#include <linux/module.h>
#endif
+#include <linux/bitops.h>
#include <linux/mtd/nand.h>
/**
diff --git a/drivers/mtd/nand/raw/am335x_spl_bch.c b/drivers/mtd/nand/raw/am335x_spl_bch.c
index ba2f33a96e..b6fc5f29c7 100644
--- a/drivers/mtd/nand/raw/am335x_spl_bch.c
+++ b/drivers/mtd/nand/raw/am335x_spl_bch.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <nand.h>
#include <asm/io.h>
+#include <linux/delay.h>
#include <linux/mtd/nand_ecc.h>
static int nand_ecc_pos[] = CONFIG_SYS_NAND_ECCPOS;
diff --git a/drivers/mtd/nand/raw/arasan_nfc.c b/drivers/mtd/nand/raw/arasan_nfc.c
index 110c32b396..6c1d64054c 100644
--- a/drivers/mtd/nand/raw/arasan_nfc.c
+++ b/drivers/mtd/nand/raw/arasan_nfc.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <malloc.h>
#include <asm/io.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/rawnand.h>
diff --git a/drivers/mtd/nand/raw/atmel_nand.c b/drivers/mtd/nand/raw/atmel_nand.c
index 996d3dbb71..5e95901e27 100644
--- a/drivers/mtd/nand/raw/atmel_nand.c
+++ b/drivers/mtd/nand/raw/atmel_nand.c
@@ -11,10 +11,14 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/gpio.h>
#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>
#include <malloc.h>
#include <nand.h>
diff --git a/drivers/mtd/nand/raw/brcmnand/bcm63158_nand.c b/drivers/mtd/nand/raw/brcmnand/bcm63158_nand.c
index ea7c65a1f6..6313403cd6 100644
--- a/drivers/mtd/nand/raw/brcmnand/bcm63158_nand.c
+++ b/drivers/mtd/nand/raw/brcmnand/bcm63158_nand.c
@@ -4,6 +4,7 @@
#include <asm/io.h>
#include <memalign.h>
#include <nand.h>
+#include <linux/bitops.h>
#include <linux/err.h>
#include <linux/errno.h>
#include <linux/io.h>
diff --git a/drivers/mtd/nand/raw/brcmnand/bcm6368_nand.c b/drivers/mtd/nand/raw/brcmnand/bcm6368_nand.c
index e2f5452c27..cd4b24a51a 100644
--- a/drivers/mtd/nand/raw/brcmnand/bcm6368_nand.c
+++ b/drivers/mtd/nand/raw/brcmnand/bcm6368_nand.c
@@ -4,6 +4,7 @@
#include <asm/io.h>
#include <memalign.h>
#include <nand.h>
+#include <linux/bitops.h>
#include <linux/errno.h>
#include <linux/io.h>
#include <linux/ioport.h>
diff --git a/drivers/mtd/nand/raw/brcmnand/bcm68360_nand.c b/drivers/mtd/nand/raw/brcmnand/bcm68360_nand.c
index 0f1a28e476..aa042bef15 100644
--- a/drivers/mtd/nand/raw/brcmnand/bcm68360_nand.c
+++ b/drivers/mtd/nand/raw/brcmnand/bcm68360_nand.c
@@ -4,6 +4,7 @@
#include <asm/io.h>
#include <memalign.h>
#include <nand.h>
+#include <linux/bitops.h>
#include <linux/errno.h>
#include <linux/io.h>
#include <linux/ioport.h>
diff --git a/drivers/mtd/nand/raw/brcmnand/bcm6838_nand.c b/drivers/mtd/nand/raw/brcmnand/bcm6838_nand.c
index 3a136155dd..0788455090 100644
--- a/drivers/mtd/nand/raw/brcmnand/bcm6838_nand.c
+++ b/drivers/mtd/nand/raw/brcmnand/bcm6838_nand.c
@@ -4,6 +4,7 @@
#include <asm/io.h>
#include <memalign.h>
#include <nand.h>
+#include <linux/bitops.h>
#include <linux/err.h>
#include <linux/errno.h>
#include <linux/io.h>
diff --git a/drivers/mtd/nand/raw/brcmnand/bcm6858_nand.c b/drivers/mtd/nand/raw/brcmnand/bcm6858_nand.c
index 6aca011db2..818eae8a7c 100644
--- a/drivers/mtd/nand/raw/brcmnand/bcm6858_nand.c
+++ b/drivers/mtd/nand/raw/brcmnand/bcm6858_nand.c
@@ -4,6 +4,7 @@
#include <asm/io.h>
#include <memalign.h>
#include <nand.h>
+#include <linux/bitops.h>
#include <linux/err.h>
#include <linux/errno.h>
#include <linux/io.h>
diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
index 7bdebf5869..48c0ca69de 100644
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
@@ -19,6 +19,8 @@
#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>
#include <linux/completion.h>
diff --git a/drivers/mtd/nand/raw/davinci_nand.c b/drivers/mtd/nand/raw/davinci_nand.c
index 724bbee752..4416b8fa1e 100644
--- a/drivers/mtd/nand/raw/davinci_nand.c
+++ b/drivers/mtd/nand/raw/davinci_nand.c
@@ -29,6 +29,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <nand.h>
#include <dm/uclass.h>
diff --git a/drivers/mtd/nand/raw/denali.c b/drivers/mtd/nand/raw/denali.c
index b525b1be54..5bae7f1197 100644
--- a/drivers/mtd/nand/raw/denali.c
+++ b/drivers/mtd/nand/raw/denali.c
@@ -5,12 +5,18 @@
* 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>
+#include <linux/bitops.h>
+#include <linux/delay.h>
+#include <linux/dma-direction.h>
#include <linux/dma-mapping.h>
#include <linux/err.h>
#include <linux/errno.h>
diff --git a/drivers/mtd/nand/raw/denali_dt.c b/drivers/mtd/nand/raw/denali_dt.c
index 41b93e660a..2728e8098f 100644
--- a/drivers/mtd/nand/raw/denali_dt.c
+++ b/drivers/mtd/nand/raw/denali_dt.c
@@ -7,6 +7,8 @@
#include <clk.h>
#include <dm.h>
#include <dm/device_compat.h>
+#include <linux/bug.h>
+#include <linux/delay.h>
#include <linux/io.h>
#include <linux/ioport.h>
#include <linux/printk.h>
diff --git a/drivers/mtd/nand/raw/denali_spl.c b/drivers/mtd/nand/raw/denali_spl.c
index b8b29812aa..f72142817e 100644
--- a/drivers/mtd/nand/raw/denali_spl.c
+++ b/drivers/mtd/nand/raw/denali_spl.c
@@ -5,8 +5,10 @@
*/
#include <common.h>
+#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_ifc_spl.c b/drivers/mtd/nand/raw/fsl_ifc_spl.c
index 0983fbced3..b7e37416a4 100644
--- a/drivers/mtd/nand/raw/fsl_ifc_spl.c
+++ b/drivers/mtd/nand/raw/fsl_ifc_spl.c
@@ -10,6 +10,7 @@
#include <cpu_func.h>
#include <asm/io.h>
#include <fsl_ifc.h>
+#include <part.h>
#include <linux/mtd/rawnand.h>
#ifdef CONFIG_CHAIN_OF_TRUST
#include <fsl_validate.h>
diff --git a/drivers/mtd/nand/raw/fsl_upm.c b/drivers/mtd/nand/raw/fsl_upm.c
index dfbdbca3ae..6c86a7e767 100644
--- a/drivers/mtd/nand/raw/fsl_upm.c
+++ b/drivers/mtd/nand/raw/fsl_upm.c
@@ -8,7 +8,9 @@
#include <config.h>
#include <common.h>
+#include <log.h>
#include <asm/io.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/fsl_upm.h>
diff --git a/drivers/mtd/nand/raw/kmeter1_nand.c b/drivers/mtd/nand/raw/kmeter1_nand.c
index 7103300060..cf33f2863e 100644
--- a/drivers/mtd/nand/raw/kmeter1_nand.c
+++ b/drivers/mtd/nand/raw/kmeter1_nand.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <nand.h>
#include <asm/io.h>
+#include <linux/delay.h>
#define CONFIG_NAND_MODE_REG (void *)(CONFIG_SYS_NAND_BASE + 0x20000)
#define CONFIG_NAND_DATA_REG (void *)(CONFIG_SYS_NAND_BASE + 0x30000)
diff --git a/drivers/mtd/nand/raw/lpc32xx_nand_mlc.c b/drivers/mtd/nand/raw/lpc32xx_nand_mlc.c
index 79d1489dc7..b3232ed59d 100644
--- a/drivers/mtd/nand/raw/lpc32xx_nand_mlc.c
+++ b/drivers/mtd/nand/raw/lpc32xx_nand_mlc.c
@@ -21,6 +21,7 @@
#include <common.h>
#include <nand.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <asm/io.h>
#include <nand.h>
diff --git a/drivers/mtd/nand/raw/lpc32xx_nand_slc.c b/drivers/mtd/nand/raw/lpc32xx_nand_slc.c
index 8615b112a2..9cca3c55cc 100644
--- a/drivers/mtd/nand/raw/lpc32xx_nand_slc.c
+++ b/drivers/mtd/nand/raw/lpc32xx_nand_slc.c
@@ -11,7 +11,9 @@
*/
#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/mxc_nand.c b/drivers/mtd/nand/raw/mxc_nand.c
index cf97e0f74f..59cef20575 100644
--- a/drivers/mtd/nand/raw/mxc_nand.c
+++ b/drivers/mtd/nand/raw/mxc_nand.c
@@ -6,7 +6,9 @@
*/
#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.c b/drivers/mtd/nand/raw/mxs_nand.c
index e3516cd141..a7852a841c 100644
--- a/drivers/mtd/nand/raw/mxs_nand.c
+++ b/drivers/mtd/nand/raw/mxs_nand.c
@@ -16,6 +16,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 ae50cc37b5..46dc29df36 100644
--- a/drivers/mtd/nand/raw/mxs_nand_spl.c
+++ b/drivers/mtd/nand/raw/mxs_nand_spl.c
@@ -5,9 +5,13 @@
* Author: Tim Harvey <tharvey@gateworks.com>
*/
#include <common.h>
+#include <log.h>
#include <nand.h>
#include <malloc.h>
#include <mxs_nand.h>
+#include <asm/cache.h>
+#include <linux/bitops.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 49d5e261b5..698968bc11 100644
--- a/drivers/mtd/nand/raw/nand_base.c
+++ b/drivers/mtd/nand/raw/nand_base.c
@@ -32,9 +32,13 @@
#if CONFIG_IS_ENABLED(OF_CONTROL)
#include <fdtdec.h>
#endif
+#include <log.h>
#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>
#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 a6e6e0ef6d..911472e91e 100644
--- a/drivers/mtd/nand/raw/nand_bbt.c
+++ b/drivers/mtd/nand/raw/nand_bbt.c
@@ -58,8 +58,10 @@
*/
#include <common.h>
+#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/nand_bch.c b/drivers/mtd/nand/raw/nand_bch.c
index 11a22e021d..734d1c6204 100644
--- a/drivers/mtd/nand/raw/nand_bch.c
+++ b/drivers/mtd/nand/raw/nand_bch.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <log.h>
#include <dm/devres.h>
/*#include <asm/io.h>*/
#include <linux/types.h>
diff --git a/drivers/mtd/nand/raw/nand_util.c b/drivers/mtd/nand/raw/nand_util.c
index f3c8f7f2cb..5b74ef0dfd 100644
--- a/drivers/mtd/nand/raw/nand_util.c
+++ b/drivers/mtd/nand/raw/nand_util.c
@@ -20,10 +20,12 @@
#include <common.h>
#include <command.h>
+#include <log.h>
#include <watchdog.h>
#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/mtd/nand/raw/omap_gpmc.c b/drivers/mtd/nand/raw/omap_gpmc.c
index 6a050501b0..97fd5690f5 100644
--- a/drivers/mtd/nand/raw/omap_gpmc.c
+++ b/drivers/mtd/nand/raw/omap_gpmc.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <linux/errno.h>
#include <asm/arch/mem.h>
diff --git a/drivers/mtd/nand/raw/pxa3xx_nand.c b/drivers/mtd/nand/raw/pxa3xx_nand.c
index 7e3346dfcc..a30e82166b 100644
--- a/drivers/mtd/nand/raw/pxa3xx_nand.c
+++ b/drivers/mtd/nand/raw/pxa3xx_nand.c
@@ -12,6 +12,9 @@
#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>
#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 1c212daa1d..3306bd8ac9 100644
--- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
+++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
@@ -7,8 +7,11 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#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>
#include <linux/ioport.h>
diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c
index 9b99be10e6..004b6f17a5 100644
--- a/drivers/mtd/nand/raw/sunxi_nand.c
+++ b/drivers/mtd/nand/raw/sunxi_nand.c
@@ -31,6 +31,8 @@
#include <nand.h>
#include <dm/device_compat.h>
#include <dm/devres.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <linux/err.h>
#include <linux/kernel.h>
diff --git a/drivers/mtd/nand/raw/sunxi_nand_spl.c b/drivers/mtd/nand/raw/sunxi_nand_spl.c
index 6cde9814c4..85d8013b1a 100644
--- a/drivers/mtd/nand/raw/sunxi_nand_spl.c
+++ b/drivers/mtd/nand/raw/sunxi_nand_spl.c
@@ -9,7 +9,9 @@
#include <common.h>
#include <config.h>
#include <nand.h>
+#include <linux/bitops.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 ae699d1da5..b9f5bdd953 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>
@@ -14,6 +15,8 @@
#include <asm/arch/funcmux.h>
#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 3941297418..fa59455210 100644
--- a/drivers/mtd/nand/raw/zynq_nand.c
+++ b/drivers/mtd/nand/raw/zynq_nand.c
@@ -7,8 +7,10 @@
*/
#include <common.h>
+#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/nand/spi/core.c b/drivers/mtd/nand/spi/core.c
index 397dfa4178..93371fdde0 100644
--- a/drivers/mtd/nand/spi/core.c
+++ b/drivers/mtd/nand/spi/core.c
@@ -26,6 +26,8 @@
#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/macronix.c b/drivers/mtd/nand/spi/macronix.c
index 67d092be2c..215f09acc3 100644
--- a/drivers/mtd/nand/spi/macronix.c
+++ b/drivers/mtd/nand/spi/macronix.c
@@ -10,6 +10,7 @@
#include <linux/device.h>
#include <linux/kernel.h>
#endif
+#include <linux/bug.h>
#include <linux/mtd/spinand.h>
#define SPINAND_MFR_MACRONIX 0xC2
diff --git a/drivers/mtd/nand/spi/micron.c b/drivers/mtd/nand/spi/micron.c
index 687306e33e..04de51cb46 100644
--- a/drivers/mtd/nand/spi/micron.c
+++ b/drivers/mtd/nand/spi/micron.c
@@ -11,6 +11,7 @@
#include <linux/device.h>
#include <linux/kernel.h>
#endif
+#include <linux/bitops.h>
#include <linux/mtd/spinand.h>
#define SPINAND_MFR_MICRON 0x2c
diff --git a/drivers/mtd/nand/spi/toshiba.c b/drivers/mtd/nand/spi/toshiba.c
index 77c25398fc..c4beefa617 100644
--- a/drivers/mtd/nand/spi/toshiba.c
+++ b/drivers/mtd/nand/spi/toshiba.c
@@ -11,6 +11,7 @@
#include <linux/device.h>
#include <linux/kernel.h>
#endif
+#include <linux/bug.h>
#include <linux/mtd/spinand.h>
#define SPINAND_MFR_TOSHIBA 0x98
diff --git a/drivers/mtd/nand/spi/winbond.c b/drivers/mtd/nand/spi/winbond.c
index 6ede98c85d..c119486efb 100644
--- a/drivers/mtd/nand/spi/winbond.c
+++ b/drivers/mtd/nand/spi/winbond.c
@@ -12,6 +12,7 @@
#include <linux/device.h>
#include <linux/kernel.h>
#endif
+#include <linux/bitops.h>
#include <linux/mtd/spinand.h>
#define SPINAND_MFR_WINBOND 0xEF
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index 693bb78b87..36daef01ae 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -20,8 +20,10 @@
*/
#include <common.h>
+#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_bbt.c b/drivers/mtd/onenand/onenand_bbt.c
index cde342aaec..eca9edff60 100644
--- a/drivers/mtd/onenand/onenand_bbt.c
+++ b/drivers/mtd/onenand/onenand_bbt.c
@@ -15,6 +15,7 @@
*/
#include <common.h>
+#include <log.h>
#include <linux/compat.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/onenand.h>
diff --git a/drivers/mtd/onenand/onenand_spl.c b/drivers/mtd/onenand/onenand_spl.c
index c4983d15d5..ab6f1a8be3 100644
--- a/drivers/mtd/onenand/onenand_spl.c
+++ b/drivers/mtd/onenand/onenand_spl.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <asm/io.h>
+#include <linux/bitops.h>
#include <linux/mtd/onenand_regs.h>
#include <onenand_uboot.h>
diff --git a/drivers/mtd/pic32_flash.c b/drivers/mtd/pic32_flash.c
index 8fff818e42..a58a2c4b6c 100644
--- a/drivers/mtd/pic32_flash.c
+++ b/drivers/mtd/pic32_flash.c
@@ -10,7 +10,9 @@
#include <dm.h>
#include <fdt_support.h>
#include <flash.h>
+#include <init.h>
#include <irq_func.h>
+#include <linux/bitops.h>
#include <mach/pic32.h>
#include <wait_bit.h>
diff --git a/drivers/mtd/renesas_rpc_hf.c b/drivers/mtd/renesas_rpc_hf.c
index fc2aa22d7f..65320c7ed9 100644
--- a/drivers/mtd/renesas_rpc_hf.c
+++ b/drivers/mtd/renesas_rpc_hf.c
@@ -19,6 +19,7 @@
#include <flash.h>
#include <mtd.h>
#include <wait_bit.h>
+#include <linux/bitops.h>
#include <mtd/cfi_flash.h>
#define RPC_CMNCR 0x0000 /* R/W */
diff --git a/drivers/mtd/spi/sandbox.c b/drivers/mtd/spi/sandbox.c
index 084c66e984..8cbe97ee20 100644
--- a/drivers/mtd/spi/sandbox.c
+++ b/drivers/mtd/spi/sandbox.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <spi.h>
#include <os.h>
diff --git a/drivers/mtd/spi/sf-uclass.c b/drivers/mtd/spi/sf-uclass.c
index 5ebcca590a..de369aa001 100644
--- a/drivers/mtd/spi/sf-uclass.c
+++ b/drivers/mtd/spi/sf-uclass.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <spi.h>
#include <spi_flash.h>
diff --git a/drivers/mtd/spi/sf_dataflash.c b/drivers/mtd/spi/sf_dataflash.c
index 55fb4bd31a..27d847d421 100644
--- a/drivers/mtd/spi/sf_dataflash.c
+++ b/drivers/mtd/spi/sf_dataflash.c
@@ -10,9 +10,12 @@
#include <dm.h>
#include <errno.h>
#include <fdtdec.h>
+#include <flash.h>
+#include <log.h>
#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/spi/sf_internal.h b/drivers/mtd/spi/sf_internal.h
index 940b2e4c9e..ce0cf4c428 100644
--- a/drivers/mtd/spi/sf_internal.h
+++ b/drivers/mtd/spi/sf_internal.h
@@ -9,6 +9,7 @@
#ifndef _SF_INTERNAL_H_
#define _SF_INTERNAL_H_
+#include <linux/bitops.h>
#include <linux/types.h>
#include <linux/compiler.h>
diff --git a/drivers/mtd/spi/sf_mtd.c b/drivers/mtd/spi/sf_mtd.c
index 68c36002be..987fac2501 100644
--- a/drivers/mtd/spi/sf_mtd.c
+++ b/drivers/mtd/spi/sf_mtd.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <flash.h>
#include <malloc.h>
#include <linux/errno.h>
#include <linux/mtd/mtd.h>
diff --git a/drivers/mtd/spi/sf_probe.c b/drivers/mtd/spi/sf_probe.c
index 72b6ee702d..c2e51f9c68 100644
--- a/drivers/mtd/spi/sf_probe.c
+++ b/drivers/mtd/spi/sf_probe.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include <spi.h>
#include <spi_flash.h>
diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c
index 3d4361493e..56b44ebbe8 100644
--- a/drivers/mtd/spi/spi-nor-core.c
+++ b/drivers/mtd/spi/spi-nor-core.c
@@ -10,8 +10,10 @@
*/
#include <common.h>
+#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/spi/spi-nor-tiny.c b/drivers/mtd/spi/spi-nor-tiny.c
index ccc0ab07af..55f86d5155 100644
--- a/drivers/mtd/spi/spi-nor-tiny.c
+++ b/drivers/mtd/spi/spi-nor-tiny.c
@@ -10,6 +10,7 @@
*/
#include <common.h>
+#include <log.h>
#include <dm/device_compat.h>
#include <linux/err.h>
#include <linux/errno.h>
diff --git a/drivers/mtd/st_smi.c b/drivers/mtd/st_smi.c
index d29a71595d..7c652e6c53 100644
--- a/drivers/mtd/st_smi.c
+++ b/drivers/mtd/st_smi.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <flash.h>
+#include <linux/delay.h>
#include <linux/err.h>
#include <linux/mtd/st_smi.h>
diff --git a/drivers/mtd/stm32_flash.c b/drivers/mtd/stm32_flash.c
index fd0d5506e8..95afa2d6bc 100644
--- a/drivers/mtd/stm32_flash.c
+++ b/drivers/mtd/stm32_flash.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <flash.h>
#include <asm/io.h>
#include <asm/arch/stm32.h>
#include "stm32_flash.h"
diff --git a/drivers/mtd/ubi/attach.c b/drivers/mtd/ubi/attach.c
index f02a06fc35..e488caa554 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>
@@ -78,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/build.c b/drivers/mtd/ubi/build.c
index 7de65bc7c3..61e38ba1ab 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -17,6 +17,7 @@
*/
#ifndef __UBOOT__
+#include <log.h>
#include <dm/devres.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c
index 8428278e21..9d4337bcff 100644
--- a/drivers/mtd/ubi/eba.c
+++ b/drivers/mtd/ubi/eba.c
@@ -29,6 +29,7 @@
*/
#ifndef __UBOOT__
+#include <log.h>
#include <dm/devres.h>
#include <linux/slab.h>
#include <linux/crc32.h>
diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c
index a3f5e3e1a9..b54b56375b 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>
@@ -15,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/io.c b/drivers/mtd/ubi/io.c
index 8ba22d8142..b8b878b918 100644
--- a/drivers/mtd/ubi/io.c
+++ b/drivers/mtd/ubi/io.c
@@ -74,6 +74,7 @@
*/
#ifndef __UBOOT__
+#include <log.h>
#include <dm/devres.h>
#include <linux/crc32.h>
#include <linux/err.h>
diff --git a/drivers/mtd/ubi/misc.c b/drivers/mtd/ubi/misc.c
index 3f7ee59c94..81275deaeb 100644
--- a/drivers/mtd/ubi/misc.c
+++ b/drivers/mtd/ubi/misc.c
@@ -7,6 +7,7 @@
/* Here we keep miscellaneous functions which are used all over the UBI code */
+#include <log.h>
#include <malloc.h>
#include <ubi_uboot.h>
#include "ubi.h"
diff --git a/drivers/mtd/ubi/upd.c b/drivers/mtd/ubi/upd.c
index 0f7951c859..28a362aa14 100644
--- a/drivers/mtd/ubi/upd.c
+++ b/drivers/mtd/ubi/upd.c
@@ -26,6 +26,7 @@
*/
#ifndef __UBOOT__
+#include <log.h>
#include <malloc.h>
#include <linux/uaccess.h>
#else
diff --git a/drivers/mtd/ubi/vmt.c b/drivers/mtd/ubi/vmt.c
index 2114abbe7c..0bfedd0deb 100644
--- a/drivers/mtd/ubi/vmt.c
+++ b/drivers/mtd/ubi/vmt.c
@@ -11,6 +11,7 @@
*/
#ifndef __UBOOT__
+#include <log.h>
#include <dm/devres.h>
#include <linux/err.h>
#include <linux/slab.h>
diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c
index 123c2f344d..a2b5352cb2 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>
@@ -54,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/ubi/wl.c b/drivers/mtd/ubi/wl.c
index 4038b7f04e..bae402418f 100644
--- a/drivers/mtd/ubi/wl.c
+++ b/drivers/mtd/ubi/wl.c
@@ -86,6 +86,7 @@
*/
#ifndef __UBOOT__
+#include <log.h>
#include <dm/devres.h>
#include <linux/slab.h>
#include <linux/crc32.h>
diff --git a/drivers/mtd/ubispl/ubispl.c b/drivers/mtd/ubispl/ubispl.c
index 00102fcf74..03b31f002b 100644
--- a/drivers/mtd/ubispl/ubispl.c
+++ b/drivers/mtd/ubispl/ubispl.c
@@ -9,9 +9,11 @@
#include <common.h>
#include <errno.h>
+#include <linux/bug.h>
#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 e3a7222efb..3b5d11f956 100644
--- a/drivers/net/ag7xxx.c
+++ b/drivers/net/ag7xxx.c
@@ -11,9 +11,14 @@
#include <cpu_func.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <miiphy.h>
#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>
#include <linux/mii.h>
#include <wait_bit.h>
diff --git a/drivers/net/altera_tse.c b/drivers/net/altera_tse.c
index a511068d9a..93b26da392 100644
--- a/drivers/net/altera_tse.c
+++ b/drivers/net/altera_tse.c
@@ -13,6 +13,7 @@
#include <dm.h>
#include <errno.h>
#include <fdt_support.h>
+#include <log.h>
#include <memalign.h>
#include <miiphy.h>
#include <net.h>
diff --git a/drivers/net/altera_tse.h b/drivers/net/altera_tse.h
index 2b1af81429..79509b8084 100644
--- a/drivers/net/altera_tse.h
+++ b/drivers/net/altera_tse.h
@@ -11,6 +11,7 @@
#ifndef _ALTERA_TSE_H_
#define _ALTERA_TSE_H_
+#include <linux/bitops.h>
#define __packed_1_ __packed __aligned(1)
/* dma type */
diff --git a/drivers/net/armada100_fec.c b/drivers/net/armada100_fec.c
index da6662c7ee..3ee119bcbc 100644
--- a/drivers/net/armada100_fec.c
+++ b/drivers/net/armada100_fec.c
@@ -10,12 +10,14 @@
*/
#include <common.h>
+#include <log.h>
#include <net.h>
#include <malloc.h>
#include <miiphy.h>
#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 3233478571..4e4ad61da4 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>
@@ -17,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 261fde00c1..28cb41272a 100644
--- a/drivers/net/ax88180.c
+++ b/drivers/net/ax88180.c
@@ -39,8 +39,10 @@
*/
#include <common.h>
#include <command.h>
+#include <log.h>
#include <net.h>
#include <malloc.h>
+#include <linux/delay.h>
#include <linux/mii.h>
#include "ax88180.h"
@@ -117,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;
@@ -176,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)
@@ -341,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);
@@ -363,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");
@@ -679,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 01c1ae2729..d161f0e09c 100644
--- a/drivers/net/ax88796.c
+++ b/drivers/net/ax88796.c
@@ -3,6 +3,7 @@
* (c) 2007 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
*/
#include <common.h>
+#include <linux/delay.h>
#include "ax88796.h"
/*
diff --git a/drivers/net/bcm-sf2-eth-gmac.c b/drivers/net/bcm-sf2-eth-gmac.c
index 6a25f67c30..3caf0f3310 100644
--- a/drivers/net/bcm-sf2-eth-gmac.c
+++ b/drivers/net/bcm-sf2-eth-gmac.c
@@ -12,10 +12,14 @@
#include <config.h>
#include <common.h>
#include <cpu_func.h>
+#include <log.h>
#include <malloc.h>
#include <net.h>
+#include <asm/cache.h>
#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/bcm-sf2-eth.c b/drivers/net/bcm-sf2-eth.c
index 11f937032f..2998d57c72 100644
--- a/drivers/net/bcm-sf2-eth.c
+++ b/drivers/net/bcm-sf2-eth.c
@@ -4,9 +4,11 @@
*/
#include <common.h>
+#include <log.h>
#include <malloc.h>
#include <net.h>
#include <config.h>
+#include <linux/delay.h>
#include <phy.h>
#include <miiphy.h>
diff --git a/drivers/net/bcm6348-eth.c b/drivers/net/bcm6348-eth.c
index fe3532930a..9ddc0f938f 100644
--- a/drivers/net/bcm6348-eth.c
+++ b/drivers/net/bcm6348-eth.c
@@ -10,6 +10,7 @@
#include <clk.h>
#include <dm.h>
#include <dma.h>
+#include <log.h>
#include <malloc.h>
#include <miiphy.h>
#include <net.h>
diff --git a/drivers/net/bcm6368-eth.c b/drivers/net/bcm6368-eth.c
index 1200049007..648fafd3e0 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>
@@ -17,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 e971b556ac..11b6148ab6 100644
--- a/drivers/net/bcmgenet.c
+++ b/drivers/net/bcmgenet.c
@@ -16,11 +16,15 @@
* 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>
#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>
#include <miiphy.h>
diff --git a/drivers/net/calxedaxgmac.c b/drivers/net/calxedaxgmac.c
index 1b7c94f654..5dad69c0b7 100644
--- a/drivers/net/calxedaxgmac.c
+++ b/drivers/net/calxedaxgmac.c
@@ -5,7 +5,9 @@
#include <common.h>
#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 9331cdf938..7ec95be6fc 100644
--- a/drivers/net/cs8900.c
+++ b/drivers/net/cs8900.c
@@ -25,9 +25,11 @@
#include <common.h>
#include <command.h>
+#include <log.h>
#include <asm/io.h>
#include <net.h>
#include <malloc.h>
+#include <linux/delay.h>
#include "cs8900.h"
#undef DEBUG
diff --git a/drivers/net/dc2114x.c b/drivers/net/dc2114x.c
index d008696b0f..c55358ef83 100644
--- a/drivers/net/dc2114x.c
+++ b/drivers/net/dc2114x.c
@@ -6,6 +6,8 @@
#include <net.h>
#include <netdev.h>
#include <pci.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#define SROM_DLEVEL 0
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index baac277a84..b89a68afe4 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -13,13 +13,17 @@
#include <cpu_func.h>
#include <dm.h>
#include <errno.h>
+#include <log.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>
+#include <linux/delay.h>
#include <linux/err.h>
#include <linux/kernel.h>
#include <asm/io.h>
diff --git a/drivers/net/designware.h b/drivers/net/designware.h
index 3519a4167a..ffaf5a14d0 100644
--- a/drivers/net/designware.h
+++ b/drivers/net/designware.h
@@ -7,6 +7,9 @@
#ifndef _DW_ETH_H
#define _DW_ETH_H
+#include <asm/cache.h>
+#include <net.h>
+
#if CONFIG_IS_ENABLED(DM_GPIO)
#include <asm-generic/gpio.h>
#endif
diff --git a/drivers/net/dm9000x.c b/drivers/net/dm9000x.c
index a6c0a2452f..d575a62592 100644
--- a/drivers/net/dm9000x.c
+++ b/drivers/net/dm9000x.c
@@ -54,6 +54,7 @@ TODO: external MII is not functional, only internal at the moment.
#include <net.h>
#include <asm/io.h>
#include <dm9000.h>
+#include <linux/delay.h>
#include "dm9000x.h"
diff --git a/drivers/net/dnet.c b/drivers/net/dnet.c
index 933d1fc2f1..98e9b2c663 100644
--- a/drivers/net/dnet.c
+++ b/drivers/net/dnet.c
@@ -9,6 +9,8 @@
*/
#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 f67c5f4570..3f4437069b 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>
@@ -39,6 +40,7 @@
#include <phy.h>
#include <reset.h>
#include <wait_bit.h>
+#include <asm/cache.h>
#include <asm/gpio.h>
#include <asm/io.h>
#include <eth_phy.h>
@@ -46,6 +48,8 @@
#include <asm/arch/clock.h>
#include <asm/mach-imx/sys_proto.h>
#endif
+#include <linux/bitops.h>
+#include <linux/delay.h>
/* Core registers */
diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c
index 9212920549..008da4ab3e 100644
--- a/drivers/net/e1000.c
+++ b/drivers/net/e1000.c
@@ -30,13 +30,18 @@ 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>
+#include <log.h>
#include <malloc.h>
#include <memalign.h>
+#include <net.h>
#include <pci.h>
+#include <linux/delay.h>
#include "e1000.h"
+#include <asm/cache.h>
#define TOUT_LOOP 100000
@@ -5759,8 +5764,8 @@ struct e1000_hw *e1000_find_card(unsigned int cardnum)
#endif /* !CONFIG_DM_ETH */
#ifdef CONFIG_CMD_E1000
-static int do_e1000(cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[])
+static int do_e1000(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
unsigned char *mac = NULL;
#ifdef CONFIG_DM_ETH
diff --git a/drivers/net/e1000.h b/drivers/net/e1000.h
index 2ae3085515..19ed4777d9 100644
--- a/drivers/net/e1000.h
+++ b/drivers/net/e1000.h
@@ -74,8 +74,8 @@ void e1000_lower_ee_clk(struct e1000_hw *hw, uint32_t *eecd);
#endif
#ifdef CONFIG_E1000_SPI
-int do_e1000_spi(cmd_tbl_t *cmdtp, struct e1000_hw *hw,
- int argc, char * const argv[]);
+int do_e1000_spi(struct cmd_tbl *cmdtp, struct e1000_hw *hw,
+ int argc, char *const argv[]);
#endif
/* Enumerated types specific to the e1000 hardware */
diff --git a/drivers/net/e1000_spi.c b/drivers/net/e1000_spi.c
index 52b3c79794..4fcc65d978 100644
--- a/drivers/net/e1000_spi.c
+++ b/drivers/net/e1000_spi.c
@@ -1,5 +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>
@@ -315,8 +317,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 +386,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 +431,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 +466,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 +542,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/eepro100.c b/drivers/net/eepro100.c
index 2fe0ba6e20..e186ab4e5f 100644
--- a/drivers/net/eepro100.c
+++ b/drivers/net/eepro100.c
@@ -11,6 +11,7 @@
#include <asm/io.h>
#include <pci.h>
#include <miiphy.h>
+#include <linux/delay.h>
#undef DEBUG
@@ -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/ep93xx_eth.c b/drivers/net/ep93xx_eth.c
index ecb34b2450..894ffc9d2b 100644
--- a/drivers/net/ep93xx_eth.c
+++ b/drivers/net/ep93xx_eth.c
@@ -18,10 +18,13 @@
#include <command.h>
#include <common.h>
+#include <log.h>
+#include <net.h>
#include <asm/arch/ep93xx.h>
#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/ethoc.c b/drivers/net/ethoc.c
index be5d9add61..81d0f3d7f8 100644
--- a/drivers/net/ethoc.c
+++ b/drivers/net/ethoc.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <cpu_func.h>
#include <dm.h>
+#include <log.h>
#include <dm/platform_data/net_ethoc.h>
#include <linux/io.h>
#include <malloc.h>
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 910c961a60..9ae2db033e 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -11,11 +11,14 @@
#include <cpu_func.h>
#include <dm.h>
#include <env.h>
+#include <log.h>
#include <malloc.h>
#include <memalign.h>
#include <miiphy.h>
#include <net.h>
#include <netdev.h>
+#include <asm/cache.h>
+#include <linux/delay.h>
#include <power/regulator.h>
#include <asm/io.h>
diff --git a/drivers/net/fm/dtsec.c b/drivers/net/fm/dtsec.c
index 4c78a4d63f..c51a65cb94 100644
--- a/drivers/net/fm/dtsec.c
+++ b/drivers/net/fm/dtsec.c
@@ -9,6 +9,7 @@
#include <fsl_dtsec.h>
#include <fsl_mdio.h>
#include <phy.h>
+#include <linux/delay.h>
#include "fm.h"
diff --git a/drivers/net/fm/eth.c b/drivers/net/fm/eth.c
index 5f1a023352..81a4cf2129 100644
--- a/drivers/net/fm/eth.c
+++ b/drivers/net/fm/eth.c
@@ -5,6 +5,8 @@
* Dave Liu <daveliu@freescale.com>
*/
#include <common.h>
+#include <log.h>
+#include <part.h>
#include <asm/io.h>
#ifdef CONFIG_DM_ETH
#include <dm.h>
@@ -22,6 +24,7 @@
#include <fsl_dtsec.h>
#include <fsl_tgec.h>
#include <fsl_memac.h>
+#include <linux/delay.h>
#include "fm.h"
diff --git a/drivers/net/fm/fdt.c b/drivers/net/fm/fdt.c
index a6b0d87415..242d27a34e 100644
--- a/drivers/net/fm/fdt.c
+++ b/drivers/net/fm/fdt.c
@@ -4,6 +4,7 @@
*/
#include <asm/io.h>
#include <env.h>
+#include <fdt_support.h>
#include <fsl_qe.h> /* For struct qe_firmware */
#include <u-boot/crc.h>
diff --git a/drivers/net/fm/init.c b/drivers/net/fm/init.c
index 8669d21afb..2cc8bbfb10 100644
--- a/drivers/net/fm/init.c
+++ b/drivers/net/fm/init.c
@@ -4,11 +4,13 @@
*/
#include <errno.h>
#include <common.h>
+#include <net.h>
#include <asm/io.h>
#include <fdt_support.h>
#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/fm/memac.c b/drivers/net/fm/memac.c
index 77ea083782..0f0f7b0732 100644
--- a/drivers/net/fm/memac.c
+++ b/drivers/net/fm/memac.c
@@ -8,6 +8,7 @@
#define MAXFRM_MASK 0x0000ffff
#include <common.h>
+#include <log.h>
#include <phy.h>
#include <asm/types.h>
#include <asm/io.h>
diff --git a/drivers/net/fm/tgec.c b/drivers/net/fm/tgec.c
index 9f2f6f6d5b..9cc9f3fde3 100644
--- a/drivers/net/fm/tgec.c
+++ b/drivers/net/fm/tgec.c
@@ -12,6 +12,7 @@
#include <asm/types.h>
#include <asm/io.h>
#include <fsl_tgec.h>
+#include <linux/delay.h>
#include "fm.h"
diff --git a/drivers/net/fsl-mc/dpio/qbman_portal.c b/drivers/net/fsl-mc/dpio/qbman_portal.c
index e161b4e077..44ce00041e 100644
--- a/drivers/net/fsl-mc/dpio/qbman_portal.c
+++ b/drivers/net/fsl-mc/dpio/qbman_portal.c
@@ -3,8 +3,10 @@
* Copyright (C) 2014 Freescale Semiconductor
*/
+#include <log.h>
#include <malloc.h>
#include <asm/arch/clock.h>
+#include <linux/bug.h>
#include "qbman_portal.h"
/* QBMan portal management command codes */
diff --git a/drivers/net/fsl-mc/dpio/qbman_private.h b/drivers/net/fsl-mc/dpio/qbman_private.h
index ded11a643e..53f1300eaf 100644
--- a/drivers/net/fsl-mc/dpio/qbman_private.h
+++ b/drivers/net/fsl-mc/dpio/qbman_private.h
@@ -7,6 +7,7 @@
#include <common.h>
#include <errno.h>
#include <asm/io.h>
+#include <linux/bug.h>
#include <linux/types.h>
#include <asm/atomic.h>
#include <malloc.h>
diff --git a/drivers/net/fsl-mc/dpio/qbman_sys.h b/drivers/net/fsl-mc/dpio/qbman_sys.h
index cdced68110..8be38e11a8 100644
--- a/drivers/net/fsl-mc/dpio/qbman_sys.h
+++ b/drivers/net/fsl-mc/dpio/qbman_sys.h
@@ -20,6 +20,7 @@
/* Trace the 3 different classes of read/write access to QBMan. #undef as
* required. */
+#include <linux/bug.h>
#undef QBMAN_CCSR_TRACE
#undef QBMAN_CINH_TRACE
#undef QBMAN_CENA_TRACE
diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
index fee372968a..1c034273b7 100644
--- a/drivers/net/fsl-mc/mc.c
+++ b/drivers/net/fsl-mc/mc.c
@@ -8,9 +8,12 @@
#include <cpu_func.h>
#include <env.h>
#include <errno.h>
+#include <image.h>
+#include <log.h>
#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>
@@ -1744,7 +1747,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/fsl-mc/mc_sys.c b/drivers/net/fsl-mc/mc_sys.c
index fddf5cb023..b5ae2ea3eb 100644
--- a/drivers/net/fsl-mc/mc_sys.c
+++ b/drivers/net/fsl-mc/mc_sys.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <errno.h>
#include <asm/io.h>
+#include <linux/delay.h>
#define MC_CMD_HDR_READ_CMDID(_hdr) \
((uint16_t)mc_dec((_hdr), MC_CMD_HDR_CMDID_O, MC_CMD_HDR_CMDID_S))
diff --git a/drivers/net/fsl_enetc.c b/drivers/net/fsl_enetc.c
index bee73153d0..2929ae7209 100644
--- a/drivers/net/fsl_enetc.c
+++ b/drivers/net/fsl_enetc.c
@@ -7,11 +7,16 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <fdt_support.h>
#include <malloc.h>
#include <memalign.h>
+#include <net.h>
+#include <asm/cache.h>
#include <asm/io.h>
#include <pci.h>
#include <miiphy.h>
+#include <linux/bug.h>
+#include <linux/delay.h>
#include "fsl_enetc.h"
diff --git a/drivers/net/fsl_enetc.h b/drivers/net/fsl_enetc.h
index 48c3005cb3..37e7e85843 100644
--- a/drivers/net/fsl_enetc.h
+++ b/drivers/net/fsl_enetc.h
@@ -7,6 +7,7 @@
#ifndef _ENETC_H
#define _ENETC_H
+#include <linux/bitops.h>
#define enetc_dbg(dev, fmt, args...) debug("%s:" fmt, dev->name, ##args)
/* PCI function IDs */
diff --git a/drivers/net/fsl_mcdmafec.c b/drivers/net/fsl_mcdmafec.c
index 45954cecb6..73e92b7a0d 100644
--- a/drivers/net/fsl_mcdmafec.c
+++ b/drivers/net/fsl_mcdmafec.c
@@ -18,6 +18,7 @@
#include <config.h>
#include <net.h>
#include <miiphy.h>
+#include <linux/delay.h>
#include <linux/mii.h>
#include <asm/immap.h>
#include <asm/fsl_mcdmafec.h>
diff --git a/drivers/net/ftgmac100.c b/drivers/net/ftgmac100.c
index 40e6b3ba39..e4d08f2ba0 100644
--- a/drivers/net/ftgmac100.c
+++ b/drivers/net/ftgmac100.c
@@ -11,14 +11,18 @@
* 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>
#include <wait_bit.h>
+#include <asm/cache.h>
#include <dm/device_compat.h>
+#include <linux/bitops.h>
#include <linux/io.h>
#include <linux/iopoll.h>
diff --git a/drivers/net/ftgmac100.h b/drivers/net/ftgmac100.h
index 9a789e4d5b..f7874ae68b 100644
--- a/drivers/net/ftgmac100.h
+++ b/drivers/net/ftgmac100.h
@@ -13,6 +13,7 @@
#define __FTGMAC100_H
/* The registers offset table of ftgmac100 */
+#include <linux/bitops.h>
struct ftgmac100 {
unsigned int isr; /* 0x00 */
unsigned int ier; /* 0x04 */
diff --git a/drivers/net/ftmac100.c b/drivers/net/ftmac100.c
index 24bb45f351..4aae7c43fe 100644
--- a/drivers/net/ftmac100.c
+++ b/drivers/net/ftmac100.c
@@ -12,6 +12,7 @@
#include <env.h>
#include <malloc.h>
#include <net.h>
+#include <linux/delay.h>
#include <linux/io.h>
#include "ftmac100.h"
diff --git a/drivers/net/ftmac110.c b/drivers/net/ftmac110.c
index 84082407d2..835346cb07 100644
--- a/drivers/net/ftmac110.c
+++ b/drivers/net/ftmac110.c
@@ -8,8 +8,10 @@
#include <common.h>
#include <command.h>
+#include <log.h>
#include <malloc.h>
#include <net.h>
+#include <asm/cache.h>
#include <linux/errno.h>
#include <asm/io.h>
#include <linux/dma-mapping.h>
diff --git a/drivers/net/gmac_rockchip.c b/drivers/net/gmac_rockchip.c
index e152faf083..8d95ee15ff 100644
--- a/drivers/net/gmac_rockchip.c
+++ b/drivers/net/gmac_rockchip.c
@@ -8,6 +8,8 @@
#include <common.h>
#include <dm.h>
#include <clk.h>
+#include <log.h>
+#include <net.h>
#include <phy.h>
#include <syscon.h>
#include <asm/io.h>
@@ -24,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 0c1dd6834a..2aae7f4863 100644
--- a/drivers/net/higmacv300.c
+++ b/drivers/net/higmacv300.c
@@ -4,11 +4,15 @@
*/
#include <cpu_func.h>
+#include <log.h>
#include <malloc.h>
+#include <asm/cache.h>
#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>
#include <miiphy.h>
#include <net.h>
diff --git a/drivers/net/ks8851_mll.c b/drivers/net/ks8851_mll.c
index 718a7dd019..6643d1e9c1 100644
--- a/drivers/net/ks8851_mll.c
+++ b/drivers/net/ks8851_mll.c
@@ -4,12 +4,14 @@
* Copyright (c) 2011 Roberto Cerati <roberto.cerati@bticino.it>
*/
+#include <log.h>
#include <asm/io.h>
#include <common.h>
#include <command.h>
#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 c08bd21f95..13900f10b1 100644
--- a/drivers/net/lan91c96.c
+++ b/drivers/net/lan91c96.c
@@ -48,6 +48,7 @@
#include <command.h>
#include <env.h>
#include <malloc.h>
+#include <linux/delay.h>
#include "lan91c96.h"
#include <net.h>
#include <linux/compiler.h>
@@ -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 48343dce1c..116b307b67 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>
@@ -13,8 +14,10 @@
#include <hwconfig.h>
#include <phy.h>
#include <miiphy.h>
+#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 ec5184edf8..f68daaaff5 100644
--- a/drivers/net/lpc32xx_eth.c
+++ b/drivers/net/lpc32xx_eth.c
@@ -7,10 +7,12 @@
*/
#include <common.h>
+#include <log.h>
#include <net.h>
#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 bd588cab06..424ca59707 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -6,6 +6,8 @@
#include <clk.h>
#include <cpu_func.h>
#include <dm.h>
+#include <log.h>
+#include <linux/delay.h>
/*
* The u-boot networking stack is a little weird. It seems like the
diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c
index 8caf0ba6b1..697549301f 100644
--- a/drivers/net/mcffec.c
+++ b/drivers/net/mcffec.c
@@ -19,6 +19,7 @@
#include <miiphy.h>
#include <asm/fec.h>
#include <asm/immap.h>
+#include <linux/delay.h>
#include <linux/mii.h>
#undef ET_DEBUG
diff --git a/drivers/net/mcfmii.c b/drivers/net/mcfmii.c
index 3b8ee07c13..393605512d 100644
--- a/drivers/net/mcfmii.c
+++ b/drivers/net/mcfmii.c
@@ -8,6 +8,7 @@
#include <config.h>
#include <net.h>
#include <netdev.h>
+#include <linux/delay.h>
#ifdef CONFIG_MCF547x_8x
#include <asm/fsl_mcdmafec.h>
diff --git a/drivers/net/mdio_mux_i2creg.c b/drivers/net/mdio_mux_i2creg.c
index 3e82898f46..cc02b5ffd4 100644
--- a/drivers/net/mdio_mux_i2creg.c
+++ b/drivers/net/mdio_mux_i2creg.c
@@ -6,6 +6,7 @@
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <miiphy.h>
#include <i2c.h>
diff --git a/drivers/net/mpc8xx_fec.c b/drivers/net/mpc8xx_fec.c
index 69b2174ab3..f9f7dd7cb3 100644
--- a/drivers/net/mpc8xx_fec.c
+++ b/drivers/net/mpc8xx_fec.c
@@ -12,6 +12,7 @@
#include <netdev.h>
#include <asm/cpm_8xx.h>
#include <asm/io.h>
+#include <linux/delay.h>
#include <phy.h>
#include <linux/mii.h>
diff --git a/drivers/net/mscc_eswitch/jr2_switch.c b/drivers/net/mscc_eswitch/jr2_switch.c
index 33dd002146..1c9a401de8 100644
--- a/drivers/net/mscc_eswitch/jr2_switch.c
+++ b/drivers/net/mscc_eswitch/jr2_switch.c
@@ -10,6 +10,8 @@
#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>
#include <miiphy.h>
diff --git a/drivers/net/mscc_eswitch/luton_switch.c b/drivers/net/mscc_eswitch/luton_switch.c
index 9d24c005c1..1d46d0e5e1 100644
--- a/drivers/net/mscc_eswitch/luton_switch.c
+++ b/drivers/net/mscc_eswitch/luton_switch.c
@@ -10,6 +10,7 @@
#include <dm/of_access.h>
#include <dm/of_addr.h>
#include <fdt_support.h>
+#include <linux/bitops.h>
#include <linux/io.h>
#include <linux/ioport.h>
#include <miiphy.h>
diff --git a/drivers/net/mscc_eswitch/mscc_mac_table.c b/drivers/net/mscc_eswitch/mscc_mac_table.c
index 833e233aa5..25b9cad42c 100644
--- a/drivers/net/mscc_eswitch/mscc_mac_table.c
+++ b/drivers/net/mscc_eswitch/mscc_mac_table.c
@@ -3,6 +3,7 @@
* Copyright (c) 2018 Microsemi Corporation
*/
+#include <linux/bitops.h>
#include <linux/io.h>
#include "mscc_mac_table.h"
diff --git a/drivers/net/mscc_eswitch/mscc_miim.c b/drivers/net/mscc_eswitch/mscc_miim.c
index d8ee8df47b..6687787b1a 100644
--- a/drivers/net/mscc_eswitch/mscc_miim.c
+++ b/drivers/net/mscc_eswitch/mscc_miim.c
@@ -5,6 +5,7 @@
#include <miiphy.h>
#include <wait_bit.h>
+#include <linux/bitops.h>
#include "mscc_miim.h"
#define MIIM_STATUS 0x0
diff --git a/drivers/net/mscc_eswitch/mscc_xfer.c b/drivers/net/mscc_eswitch/mscc_xfer.c
index f412901f1d..6f74746457 100644
--- a/drivers/net/mscc_eswitch/mscc_xfer.c
+++ b/drivers/net/mscc_eswitch/mscc_xfer.c
@@ -3,6 +3,9 @@
* Copyright (c) 2018 Microsemi Corporation
*/
+#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 fe48f371c3..2a48dc6a19 100644
--- a/drivers/net/mscc_eswitch/ocelot_switch.c
+++ b/drivers/net/mscc_eswitch/ocelot_switch.c
@@ -6,10 +6,12 @@
#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>
#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 f05fa42ff3..d8ee1a7698 100644
--- a/drivers/net/mscc_eswitch/serval_switch.c
+++ b/drivers/net/mscc_eswitch/serval_switch.c
@@ -6,10 +6,12 @@
#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>
#include <fdt_support.h>
+#include <linux/bitops.h>
#include <linux/io.h>
#include <linux/ioport.h>
#include <miiphy.h>
diff --git a/drivers/net/mscc_eswitch/servalt_switch.c b/drivers/net/mscc_eswitch/servalt_switch.c
index bf95a38354..1cf2273142 100644
--- a/drivers/net/mscc_eswitch/servalt_switch.c
+++ b/drivers/net/mscc_eswitch/servalt_switch.c
@@ -10,6 +10,7 @@
#include <dm/of_access.h>
#include <dm/of_addr.h>
#include <fdt_support.h>
+#include <linux/bitops.h>
#include <linux/io.h>
#include <linux/ioport.h>
#include <miiphy.h>
diff --git a/drivers/net/mt7628-eth.c b/drivers/net/mt7628-eth.c
index 404a046422..64f1c8c828 100644
--- a/drivers/net/mt7628-eth.c
+++ b/drivers/net/mt7628-eth.c
@@ -16,13 +16,17 @@
#include <common.h>
#include <cpu_func.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <miiphy.h>
#include <net.h>
#include <reset.h>
#include <wait_bit.h>
+#include <asm/cache.h>
#include <asm/io.h>
#include <linux/bitfield.h>
+#include <linux/bitops.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 5ffcc5313d..86f1360ae3 100644
--- a/drivers/net/mtk_eth.c
+++ b/drivers/net/mtk_eth.c
@@ -9,15 +9,19 @@
#include <common.h>
#include <cpu_func.h>
#include <dm.h>
+#include <log.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>
+#include <linux/delay.h>
#include <linux/err.h>
#include <linux/ioport.h>
#include <linux/mdio.h>
diff --git a/drivers/net/mtk_eth.h b/drivers/net/mtk_eth.h
index f2940c9996..be74ac27ea 100644
--- a/drivers/net/mtk_eth.h
+++ b/drivers/net/mtk_eth.h
@@ -10,6 +10,7 @@
#define _MTK_ETH_H_
/* Frame Engine Register Bases */
+#include <linux/bitops.h>
#define PDMA_BASE 0x0800
#define GDMA1_BASE 0x0500
#define GDMA2_BASE 0x1500
diff --git a/drivers/net/mvgbe.c b/drivers/net/mvgbe.c
index 6d56360a20..7974dfc78d 100644
--- a/drivers/net/mvgbe.c
+++ b/drivers/net/mvgbe.c
@@ -13,11 +13,13 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <net.h>
#include <malloc.h>
#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/mvmdio.c b/drivers/net/mvmdio.c
index ec6805e536..a8e93e80fc 100644
--- a/drivers/net/mvmdio.c
+++ b/drivers/net/mvmdio.c
@@ -12,6 +12,7 @@
#include <phy.h>
#include <asm/io.h>
#include <wait_bit.h>
+#include <linux/bitops.h>
#define MVMDIO_SMI_DATA_SHIFT 0
#define MVMDIO_SMI_PHY_ADDR_SHIFT 16
diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c
index d737400a20..092f619bd5 100644
--- a/drivers/net/mvneta.c
+++ b/drivers/net/mvneta.c
@@ -15,13 +15,18 @@
#include <common.h>
#include <cpu_func.h>
#include <dm.h>
+#include <log.h>
#include <net.h>
#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>
+#include <linux/bitops.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 fcd24868af..19b9375ee2 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>
@@ -25,6 +26,9 @@
#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>
#include <linux/errno.h>
#include <phy.h>
@@ -33,6 +37,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/natsemi.c b/drivers/net/natsemi.c
index 86f689802e..bf6fa8f2ba 100644
--- a/drivers/net/natsemi.c
+++ b/drivers/net/natsemi.c
@@ -56,6 +56,7 @@
#include <netdev.h>
#include <asm/io.h>
#include <pci.h>
+#include <linux/delay.h>
/* defines */
#define EEPROM_SIZE 0xb /*12 16-bit chunks, or 24 bytes*/
diff --git a/drivers/net/ne2000.c b/drivers/net/ne2000.c
index e6cd3e9ba0..28a99bb8c4 100644
--- a/drivers/net/ne2000.c
+++ b/drivers/net/ne2000.c
@@ -74,6 +74,7 @@ Add SNMP
#include <common.h>
#include <command.h>
+#include <linux/delay.h>
/* NE2000 base header file */
#include "ne2000_base.h"
diff --git a/drivers/net/ne2000_base.c b/drivers/net/ne2000_base.c
index a240d06ad4..55145da2bb 100644
--- a/drivers/net/ne2000_base.c
+++ b/drivers/net/ne2000_base.c
@@ -75,6 +75,7 @@ Add SNMP
#include <common.h>
#include <command.h>
#include <env.h>
+#include <log.h>
#include <net.h>
#include <malloc.h>
#include <linux/compiler.h>
diff --git a/drivers/net/ne2000_base.h b/drivers/net/ne2000_base.h
index eee0956fdb..2493608a5a 100644
--- a/drivers/net/ne2000_base.h
+++ b/drivers/net/ne2000_base.h
@@ -106,6 +106,7 @@ are GPL, so this is, of course, GPL.
#endif
/* timeout for tx/rx in s */
+#include <linux/delay.h>
#define TOUT 5
/* Ether MAC address size */
#define ETHER_ADDR_LEN 6
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index 73005ff94d..f1d0630d02 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <command.h>
#include <env.h>
+#include <log.h>
#include <stdio_dev.h>
#include <net.h>
diff --git a/drivers/net/ns8382x.c b/drivers/net/ns8382x.c
index ea7ece54b6..c292abad07 100644
--- a/drivers/net/ns8382x.c
+++ b/drivers/net/ns8382x.c
@@ -51,11 +51,13 @@
/* Includes */
#include <common.h>
+#include <log.h>
#include <malloc.h>
#include <net.h>
#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 b2823701a4..1daafbe2b9 100644
--- a/drivers/net/pch_gbe.c
+++ b/drivers/net/pch_gbe.c
@@ -9,10 +9,12 @@
#include <cpu_func.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#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 f97e7f8c6a..260a5a38cf 100644
--- a/drivers/net/pcnet.c
+++ b/drivers/net/pcnet.c
@@ -8,11 +8,14 @@
#include <common.h>
#include <cpu_func.h>
+#include <log.h>
#include <malloc.h>
#include <net.h>
#include <netdev.h>
+#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 dd8c68d57d..1e69525cb7 100644
--- a/drivers/net/pfe_eth/pfe_cmd.c
+++ b/drivers/net/pfe_eth/pfe_cmd.c
@@ -9,6 +9,10 @@
* @brief PFE utility commands
*/
+#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)
@@ -16,7 +20,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 +275,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 +340,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 +374,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 +418,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 +466,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/pfe_eth/pfe_driver.c b/drivers/net/pfe_eth/pfe_driver.c
index f70a235217..6f443b4ea8 100644
--- a/drivers/net/pfe_eth/pfe_driver.c
+++ b/drivers/net/pfe_eth/pfe_driver.c
@@ -4,7 +4,9 @@
* Copyright 2017 NXP
*/
+#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 1b5d11ef32..718e24f14d 100644
--- a/drivers/net/pfe_eth/pfe_eth.c
+++ b/drivers/net/pfe_eth/pfe_eth.c
@@ -6,9 +6,11 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#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_firmware.c b/drivers/net/pfe_eth/pfe_firmware.c
index 13112d9c1a..0493cfe872 100644
--- a/drivers/net/pfe_eth/pfe_firmware.c
+++ b/drivers/net/pfe_eth/pfe_firmware.c
@@ -10,7 +10,10 @@
* files.
*/
+#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 7137ac154a..722f5c238f 100644
--- a/drivers/net/pfe_eth/pfe_hw.c
+++ b/drivers/net/pfe_eth/pfe_hw.c
@@ -3,6 +3,8 @@
* Copyright 2015-2016 Freescale Semiconductor, Inc.
* 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/pfe_eth/pfe_mdio.c b/drivers/net/pfe_eth/pfe_mdio.c
index b990e7fbe2..3228b8df49 100644
--- a/drivers/net/pfe_eth/pfe_mdio.c
+++ b/drivers/net/pfe_eth/pfe_mdio.c
@@ -5,9 +5,11 @@
*/
#include <common.h>
#include <dm.h>
+#include <log.h>
#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 8ece926dd3..68cd3d03fd 100644
--- a/drivers/net/phy/aquantia.c
+++ b/drivers/net/phy/aquantia.c
@@ -8,7 +8,11 @@
#include <config.h>
#include <common.h>
#include <dm.h>
+#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>
#include <asm/byteorder.h>
diff --git a/drivers/net/phy/atheros.c b/drivers/net/phy/atheros.c
index 47ff9f8d44..13f7275d17 100644
--- a/drivers/net/phy/atheros.c
+++ b/drivers/net/phy/atheros.c
@@ -10,6 +10,7 @@
#include <phy.h>
#include <dm/device_compat.h>
#include <linux/bitfield.h>
+#include <linux/bitops.h>
#include <dt-bindings/net/qca-ar803x.h>
#define AR803x_PHY_DEBUG_ADDR_REG 0x1d
diff --git a/drivers/net/phy/b53.c b/drivers/net/phy/b53.c
index 30c4812d82..21da53c7e5 100644
--- a/drivers/net/phy/b53.c
+++ b/drivers/net/phy/b53.c
@@ -23,6 +23,9 @@
*/
#include <common.h>
+#include <command.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <errno.h>
#include <malloc.h>
@@ -627,7 +630,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 +684,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 +730,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/broadcom.c b/drivers/net/phy/broadcom.c
index 3399fd2366..566fcb8de7 100644
--- a/drivers/net/phy/broadcom.c
+++ b/drivers/net/phy/broadcom.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
#include <phy.h>
+#include <linux/delay.h>
/* Broadcom BCM54xx -- taken from linux sungem_phy */
#define MIIM_BCM54xx_AUXCNTL 0x18
diff --git a/drivers/net/phy/cortina.c b/drivers/net/phy/cortina.c
index ec81dab3f6..dbc20b1405 100644
--- a/drivers/net/phy/cortina.c
+++ b/drivers/net/phy/cortina.c
@@ -9,8 +9,10 @@
#include <config.h>
#include <common.h>
+#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/dp83867.c b/drivers/net/phy/dp83867.c
index 50804c130e..d435cc1e6c 100644
--- a/drivers/net/phy/dp83867.c
+++ b/drivers/net/phy/dp83867.c
@@ -4,8 +4,10 @@
*
*/
#include <common.h>
+#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 93cf44ad4c..a62c695c5c 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -8,6 +8,8 @@
#include <common.h>
#include <errno.h>
#include <phy.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#define PHY_AUTONEGOTIATE_TIMEOUT 5000
diff --git a/drivers/net/phy/micrel_ksz8xxx.c b/drivers/net/phy/micrel_ksz8xxx.c
index e27fc45a28..98a0c83e68 100644
--- a/drivers/net/phy/micrel_ksz8xxx.c
+++ b/drivers/net/phy/micrel_ksz8xxx.c
@@ -12,6 +12,7 @@
#include <fdtdec.h>
#include <micrel.h>
#include <phy.h>
+#include <linux/bitops.h>
static struct phy_driver KSZ804_driver = {
.name = "Micrel KSZ804",
diff --git a/drivers/net/phy/mscc.c b/drivers/net/phy/mscc.c
index 72bbda5469..709979f48c 100644
--- a/drivers/net/phy/mscc.c
+++ b/drivers/net/phy/mscc.c
@@ -9,9 +9,11 @@
*
*/
+#include <log.h>
#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 5aff7ed397..7eff37b244 100644
--- a/drivers/net/phy/mv88e61xx.c
+++ b/drivers/net/phy/mv88e61xx.c
@@ -30,6 +30,9 @@
*/
#include <common.h>
+#include <log.h>
+#include <linux/bitops.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 6fe08b80c1..62a7f19214 100644
--- a/drivers/net/phy/mv88e6352.c
+++ b/drivers/net/phy/mv88e6352.c
@@ -5,7 +5,10 @@
*/
#include <common.h>
+#include <command.h>
+#include <log.h>
#include <miiphy.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <mv88e6352.h>
@@ -230,7 +233,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 +248,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 +264,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/phy/ncsi.c b/drivers/net/phy/ncsi.c
index adc3ac033e..bf1e832be9 100644
--- a/drivers/net/phy/ncsi.c
+++ b/drivers/net/phy/ncsi.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <log.h>
#include <malloc.h>
#include <phy.h>
#include <net/ncsi.h>
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 505d3ab659..cce09c47f9 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -10,12 +10,15 @@
#include <common.h>
#include <console.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <net.h>
#include <command.h>
#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/phy/realtek.c b/drivers/net/phy/realtek.c
index 8f0a897a46..b4612c1cfd 100644
--- a/drivers/net/phy/realtek.c
+++ b/drivers/net/phy/realtek.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <linux/bitops.h>
#include <phy.h>
+#include <linux/delay.h>
#define PHY_RTL8211x_FORCE_MASTER BIT(1)
#define PHY_RTL8211E_PINE64_GIGABIT_FIX BIT(2)
diff --git a/drivers/net/phy/teranetics.c b/drivers/net/phy/teranetics.c
index 49d6a1ad90..60049c2074 100644
--- a/drivers/net/phy/teranetics.c
+++ b/drivers/net/phy/teranetics.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
#include <phy.h>
+#include <linux/delay.h>
#ifndef CONFIG_PHYLIB_10G
#error The Teranetics PHY needs 10G support
diff --git a/drivers/net/phy/xilinx_gmii2rgmii.c b/drivers/net/phy/xilinx_gmii2rgmii.c
index 8c20da2682..e2feb17048 100644
--- a/drivers/net/phy/xilinx_gmii2rgmii.c
+++ b/drivers/net/phy/xilinx_gmii2rgmii.c
@@ -6,6 +6,7 @@
*/
#include <dm.h>
+#include <log.h>
#include <phy.h>
#include <config.h>
#include <common.h>
diff --git a/drivers/net/phy/xilinx_phy.c b/drivers/net/phy/xilinx_phy.c
index 3aa8891efe..39dbfdb7da 100644
--- a/drivers/net/phy/xilinx_phy.c
+++ b/drivers/net/phy/xilinx_phy.c
@@ -7,6 +7,7 @@
#include <config.h>
#include <common.h>
+#include <log.h>
#include <phy.h>
#include <dm.h>
diff --git a/drivers/net/pic32_eth.c b/drivers/net/pic32_eth.c
index e966be038a..6a2084947b 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>
@@ -14,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_eth.h b/drivers/net/pic32_eth.h
index 823c565a9b..7b873bc772 100644
--- a/drivers/net/pic32_eth.h
+++ b/drivers/net/pic32_eth.h
@@ -7,6 +7,7 @@
#ifndef __MICROCHIP_PIC32_ETH_H_
#define __MICROCHIP_PIC32_ETH_H_
+#include <linux/bitops.h>
#include <mach/pic32.h>
/* Ethernet */
diff --git a/drivers/net/pic32_mdio.c b/drivers/net/pic32_mdio.c
index 1aa5b1d8da..d4049cfea5 100644
--- a/drivers/net/pic32_mdio.c
+++ b/drivers/net/pic32_mdio.c
@@ -11,6 +11,7 @@
#include <errno.h>
#include <wait_bit.h>
#include <asm/io.h>
+#include <linux/delay.h>
#include "pic32_eth.h"
static int pic32_mdio_write(struct mii_dev *bus,
diff --git a/drivers/net/ravb.c b/drivers/net/ravb.c
index fb4a628d63..393ee9bb81 100644
--- a/drivers/net/ravb.c
+++ b/drivers/net/ravb.c
@@ -13,8 +13,12 @@
#include <cpu_func.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#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>
#include <asm/io.h>
diff --git a/drivers/net/rtl8139.c b/drivers/net/rtl8139.c
index 1f08397291..0daeefa489 100644
--- a/drivers/net/rtl8139.c
+++ b/drivers/net/rtl8139.c
@@ -70,12 +70,15 @@
#include <common.h>
#include <cpu_func.h>
-#include <linux/types.h>
+#include <log.h>
#include <malloc.h>
#include <net.h>
#include <netdev.h>
#include <asm/io.h>
#include <pci.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
+#include <linux/types.h>
#define RTL_TIMEOUT 100000
diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c
index 5ccdfdd683..75058fdadc 100644
--- a/drivers/net/rtl8169.c
+++ b/drivers/net/rtl8169.c
@@ -43,14 +43,17 @@
#include <cpu_func.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include <memalign.h>
#include <net.h>
#ifndef CONFIG_DM_ETH
#include <netdev.h>
#endif
+#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/sandbox-raw.c b/drivers/net/sandbox-raw.c
index 3707ee35eb..4bd94c3103 100644
--- a/drivers/net/sandbox-raw.c
+++ b/drivers/net/sandbox-raw.c
@@ -6,6 +6,7 @@
* Joe Hershberger <joe.hershberger@ni.com>
*/
+#include <log.h>
#include <asm/eth-raw-os.h>
#include <common.h>
#include <dm.h>
diff --git a/drivers/net/sandbox.c b/drivers/net/sandbox.c
index c136392350..4f7e3d4243 100644
--- a/drivers/net/sandbox.c
+++ b/drivers/net/sandbox.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <net.h>
#include <asm/eth.h>
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c
index f8e5d05722..b26fc7b8eb 100644
--- a/drivers/net/sh_eth.c
+++ b/drivers/net/sh_eth.c
@@ -12,10 +12,13 @@
#include <common.h>
#include <cpu_func.h>
#include <env.h>
+#include <log.h>
#include <malloc.h>
#include <net.h>
#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 5754c3106c..23265eff93 100644
--- a/drivers/net/smc91111.c
+++ b/drivers/net/smc91111.c
@@ -51,6 +51,7 @@
#include <command.h>
#include <config.h>
#include <malloc.h>
+#include <linux/delay.h>
#include "smc91111.h"
#include <net.h>
@@ -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/smc91111.h b/drivers/net/smc91111.h
index 013542770d..4c3acba35a 100644
--- a/drivers/net/smc91111.h
+++ b/drivers/net/smc91111.h
@@ -30,6 +30,7 @@
#include <asm/types.h>
#include <config.h>
+#include <net.h>
/*
* This function may be called by the board specific initialisation code
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index 45ecd6a263..9d2790e561 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -11,6 +11,7 @@
#include <net.h>
#include <miiphy.h>
#include <linux/io.h>
+#include <linux/delay.h>
#include <linux/types.h>
#include "smc911x.h"
diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h
index ce66900f4c..0a27f3c43e 100644
--- a/drivers/net/smc911x.h
+++ b/drivers/net/smc911x.h
@@ -8,6 +8,8 @@
#ifndef _SMC911X_H_
#define _SMC911X_H_
+#include <net.h>
+
/* Below are the register offsets and bit definitions
* of the Lan911x memory space
*/
diff --git a/drivers/net/sni_ave.c b/drivers/net/sni_ave.c
index 5d66a63a8b..0784635689 100644
--- a/drivers/net/sni_ave.c
+++ b/drivers/net/sni_ave.c
@@ -8,13 +8,17 @@
#include <cpu_func.h>
#include <dm.h>
#include <fdt_support.h>
+#include <log.h>
#include <malloc.h>
#include <miiphy.h>
#include <net.h>
#include <regmap.h>
#include <reset.h>
#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>
#include <linux/iopoll.h>
diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c
index 1ae776b446..99e24c6348 100644
--- a/drivers/net/sun8i_emac.c
+++ b/drivers/net/sun8i_emac.c
@@ -11,6 +11,8 @@
*/
#include <cpu_func.h>
+#include <log.h>
+#include <asm/cache.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
#include <asm/arch/gpio.h>
@@ -19,6 +21,8 @@
#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>
#include <miiphy.h>
diff --git a/drivers/net/sunxi_emac.c b/drivers/net/sunxi_emac.c
index a9874e4220..6364beb9f2 100644
--- a/drivers/net/sunxi_emac.c
+++ b/drivers/net/sunxi_emac.c
@@ -8,7 +8,9 @@
#include <common.h>
#include <clk.h>
#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/am65-cpsw-nuss.c b/drivers/net/ti/am65-cpsw-nuss.c
index 7531a07203..85f3e49c05 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>
@@ -20,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 04b01a8129..95761fffc0 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>
@@ -15,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 1fa520be0f..f4cb86d10a 100644
--- a/drivers/net/ti/cpsw_mdio.c
+++ b/drivers/net/ti/cpsw_mdio.c
@@ -6,10 +6,13 @@
*/
#include <common.h>
+#include <log.h>
#include <malloc.h>
#include <asm/io.h>
#include <miiphy.h>
#include <wait_bit.h>
+#include <linux/bitops.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 9c6bfca5a9..56ea1fec0a 100644
--- a/drivers/net/ti/davinci_emac.c
+++ b/drivers/net/ti/davinci_emac.c
@@ -24,12 +24,15 @@
#include <common.h>
#include <command.h>
#include <cpu_func.h>
+#include <log.h>
#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>
+#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 4baeeb83f1..e3ac40ca0d 100644
--- a/drivers/net/ti/keystone_net.c
+++ b/drivers/net/ti/keystone_net.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <command.h>
#include <console.h>
+#include <linux/delay.h>
#include <dm.h>
#include <dm/lists.h>
@@ -21,6 +22,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/net/tsec.c b/drivers/net/tsec.c
index f85cdcb97e..c2e755f2b1 100644
--- a/drivers/net/tsec.c
+++ b/drivers/net/tsec.c
@@ -15,6 +15,8 @@
#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>
#include <asm/io.h>
diff --git a/drivers/net/uli526x.c b/drivers/net/uli526x.c
index c56836641b..cfdd1137be 100644
--- a/drivers/net/uli526x.c
+++ b/drivers/net/uli526x.c
@@ -16,6 +16,7 @@
#include <asm/io.h>
#include <pci.h>
#include <miiphy.h>
+#include <linux/delay.h>
/* some kernel function compatible define */
diff --git a/drivers/net/vsc7385.c b/drivers/net/vsc7385.c
index 072421062b..af8d99cefb 100644
--- a/drivers/net/vsc7385.c
+++ b/drivers/net/vsc7385.c
@@ -15,7 +15,9 @@
#include <config.h>
#include <common.h>
#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 f17839c70f..c438dab561 100644
--- a/drivers/net/vsc9953.c
+++ b/drivers/net/vsc9953.c
@@ -5,6 +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>
@@ -14,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 b0450fff56..d0683db80d 100644
--- a/drivers/net/xilinx_axi_emac.c
+++ b/drivers/net/xilinx_axi_emac.c
@@ -9,12 +9,14 @@
#include <common.h>
#include <cpu_func.h>
#include <dm.h>
+#include <log.h>
#include <net.h>
#include <malloc.h>
#include <asm/io.h>
#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 4b49290f0e..9bdb6798b6 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>
@@ -16,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/net/zynq_gem.c b/drivers/net/zynq_gem.c
index a158824fc9..412daf7d58 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -12,11 +12,13 @@
#include <common.h>
#include <cpu_func.h>
#include <dm.h>
+#include <log.h>
#include <net.h>
#include <netdev.h>
#include <config.h>
#include <console.h>
#include <malloc.h>
+#include <asm/cache.h>
#include <asm/io.h>
#include <phy.h>
#include <miiphy.h>
@@ -26,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/nvme/nvme-uclass.c b/drivers/nvme/nvme-uclass.c
index 2d88efdb61..277e31e1f3 100644
--- a/drivers/nvme/nvme-uclass.c
+++ b/drivers/nvme/nvme-uclass.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <blk.h>
#include <errno.h>
#include <dm.h>
#include <dm/device.h>
diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c
index ef4382da1a..0357aba7f1 100644
--- a/drivers/nvme/nvme.c
+++ b/drivers/nvme/nvme.c
@@ -5,9 +5,11 @@
*/
#include <common.h>
+#include <blk.h>
#include <cpu_func.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include <memalign.h>
#include <pci.h>
diff --git a/drivers/pch/pch7.c b/drivers/pch/pch7.c
index 268edb3f8f..5fb35a19ef 100644
--- a/drivers/pch/pch7.c
+++ b/drivers/pch/pch7.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <pch.h>
#define GPIO_BASE 0x44
diff --git a/drivers/pch/pch9.c b/drivers/pch/pch9.c
index fd61f16328..3bd011518b 100644
--- a/drivers/pch/pch9.c
+++ b/drivers/pch/pch9.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <pch.h>
#define GPIO_BASE 0x48
diff --git a/drivers/pci/fsl_pci_init.c b/drivers/pci/fsl_pci_init.c
index ab5e49941f..1d09c5ac4f 100644
--- a/drivers/pci/fsl_pci_init.c
+++ b/drivers/pci/fsl_pci_init.c
@@ -5,8 +5,11 @@
#include <common.h>
#include <env.h>
+#include <init.h>
+#include <log.h>
#include <malloc.h>
#include <asm/fsl_serdes.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/pci/pci-aardvark.c b/drivers/pci/pci-aardvark.c
index d678e0b599..711b930d0f 100644
--- a/drivers/pci/pci-aardvark.c
+++ b/drivers/pci/pci-aardvark.c
@@ -30,6 +30,8 @@
#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>
/* PCIe core registers */
diff --git a/drivers/pci/pci-emul-uclass.c b/drivers/pci/pci-emul-uclass.c
index 9486e1cb96..a52064341e 100644
--- a/drivers/pci/pci-emul-uclass.c
+++ b/drivers/pci/pci-emul-uclass.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <fdtdec.h>
+#include <log.h>
#include <linux/libfdt.h>
#include <pci.h>
#include <dm/lists.h>
diff --git a/drivers/pci/pci-rcar-gen2.c b/drivers/pci/pci-rcar-gen2.c
index 014d870478..e76abc1f84 100644
--- a/drivers/pci/pci-rcar-gen2.c
+++ b/drivers/pci/pci-rcar-gen2.c
@@ -11,6 +11,7 @@
#include <dm.h>
#include <errno.h>
#include <pci.h>
+#include <linux/bitops.h>
/* AHB-PCI Bridge PCI communication registers */
#define RCAR_AHBPCI_PCICOM_OFFSET 0x800
diff --git a/drivers/pci/pci-rcar-gen3.c b/drivers/pci/pci-rcar-gen3.c
index 30eff67dca..df7b37a592 100644
--- a/drivers/pci/pci-rcar-gen3.c
+++ b/drivers/pci/pci-rcar-gen3.c
@@ -22,6 +22,7 @@
#include <errno.h>
#include <pci.h>
#include <wait_bit.h>
+#include <linux/bitops.h>
#define PCIECAR 0x000010
#define PCIECCTLR 0x000018
diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c
index 7f46e901fb..9ab3539a49 100644
--- a/drivers/pci/pci-uclass.c
+++ b/drivers/pci/pci-uclass.c
@@ -7,6 +7,8 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <init.h>
+#include <log.h>
#include <malloc.h>
#include <pci.h>
#include <asm/io.h>
@@ -15,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 e8285bf936..664e8379eb 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -16,6 +16,8 @@
#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_auto.c b/drivers/pci/pci_auto.c
index 28667bde8d..3f46b7697d 100644
--- a/drivers/pci/pci_auto.c
+++ b/drivers/pci/pci_auto.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <pci.h>
/* the user can define CONFIG_SYS_PCI_CACHE_LINE_SIZE to avoid problems */
diff --git a/drivers/pci/pci_auto_common.c b/drivers/pci/pci_auto_common.c
index 8690316610..c0a53dcc92 100644
--- a/drivers/pci/pci_auto_common.c
+++ b/drivers/pci/pci_auto_common.c
@@ -14,6 +14,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <pci.h>
void pciauto_region_init(struct pci_region *res)
diff --git a/drivers/pci/pci_auto_old.c b/drivers/pci/pci_auto_old.c
index b566705c9d..8b67cfa92b 100644
--- a/drivers/pci/pci_auto_old.c
+++ b/drivers/pci/pci_auto_old.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <errno.h>
+#include <log.h>
#include <pci.h>
/*
diff --git a/drivers/pci/pci_compat.c b/drivers/pci/pci_compat.c
index 6c15bdfc03..9dddca8efe 100644
--- a/drivers/pci/pci_compat.c
+++ b/drivers/pci/pci_compat.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include <pci.h>
#include <dm/device-internal.h>
diff --git a/drivers/pci/pci_ftpci100.c b/drivers/pci/pci_ftpci100.c
index 736befdc3b..32fac878a6 100644
--- a/drivers/pci/pci_ftpci100.c
+++ b/drivers/pci/pci_ftpci100.c
@@ -7,6 +7,8 @@
* Macpaul Lin, Andes Technology Corporation <macpaul@andestech.com>
*/
#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 55f4800781..80f11fedd1 100644
--- a/drivers/pci/pci_gt64120.c
+++ b/drivers/pci/pci_gt64120.c
@@ -10,6 +10,8 @@
#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_mpc85xx.c b/drivers/pci/pci_mpc85xx.c
index 8dff68dbd0..6576f53f52 100644
--- a/drivers/pci/pci_mpc85xx.c
+++ b/drivers/pci/pci_mpc85xx.c
@@ -5,6 +5,7 @@
*
*/
#include <common.h>
+#include <asm/bitops.h>
#include <asm/cpm_85xx.h>
#include <pci.h>
#include <dm.h>
diff --git a/drivers/pci/pci_msc01.c b/drivers/pci/pci_msc01.c
index 504eb65c27..04838200a8 100644
--- a/drivers/pci/pci_msc01.c
+++ b/drivers/pci/pci_msc01.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <init.h>
#include <msc01.h>
#include <pci.h>
#include <pci_msc01.h>
diff --git a/drivers/pci/pci_mvebu.c b/drivers/pci/pci_mvebu.c
index 483a87db7d..c9afe75150 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>
@@ -19,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_rom.c b/drivers/pci/pci_rom.c
index 6b17f18bc0..6a9bc49978 100644
--- a/drivers/pci/pci_rom.c
+++ b/drivers/pci/pci_rom.c
@@ -24,9 +24,11 @@
#include <common.h>
#include <bios_emul.h>
+#include <bootstage.h>
#include <dm.h>
#include <errno.h>
#include <init.h>
+#include <log.h>
#include <malloc.h>
#include <pci.h>
#include <pci_rom.h>
diff --git a/drivers/pci/pci_sandbox.c b/drivers/pci/pci_sandbox.c
index fa4c476597..8745f286bd 100644
--- a/drivers/pci/pci_sandbox.c
+++ b/drivers/pci/pci_sandbox.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <fdtdec.h>
+#include <log.h>
#include <pci.h>
#define FDT_DEV_INFO_CELLS 4
diff --git a/drivers/pci/pci_sh4.c b/drivers/pci/pci_sh4.c
index 4500e8bb29..aac9be055e 100644
--- a/drivers/pci/pci_sh4.c
+++ b/drivers/pci/pci_sh4.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <linux/delay.h>
#include <asm/processor.h>
#include <asm/io.h>
diff --git a/drivers/pci/pci_sh7751.c b/drivers/pci/pci_sh7751.c
index 2f48b96719..e110550c71 100644
--- a/drivers/pci/pci_sh7751.c
+++ b/drivers/pci/pci_sh7751.c
@@ -11,6 +11,8 @@
#include <asm/processor.h>
#include <asm/io.h>
#include <asm/pci.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
/* Register addresses and such */
#define SH7751_BCR1 (vu_long *)0xFF800000
diff --git a/drivers/pci/pci_sh7780.c b/drivers/pci/pci_sh7780.c
index 722b5e7cf2..06d711a6cb 100644
--- a/drivers/pci/pci_sh7780.c
+++ b/drivers/pci/pci_sh7780.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <linux/delay.h>
#include <pci.h>
#include <asm/processor.h>
diff --git a/drivers/pci/pci_tegra.c b/drivers/pci/pci_tegra.c
index 96d308f7bf..82f5c59d91 100644
--- a/drivers/pci/pci_tegra.c
+++ b/drivers/pci/pci_tegra.c
@@ -15,11 +15,13 @@
#include <clk.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include <pci.h>
#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 1f216e1c68..c773f8d28d 100644
--- a/drivers/pci/pcie_dw_mvebu.c
+++ b/drivers/pci/pcie_dw_mvebu.c
@@ -12,9 +12,11 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#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 f62264cbba..742dd93633 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>
@@ -13,6 +14,8 @@
#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>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/pci/pcie_fsl.c b/drivers/pci/pcie_fsl.c
index dc994b748a..ab33459e28 100644
--- a/drivers/pci/pcie_fsl.c
+++ b/drivers/pci/pcie_fsl.c
@@ -14,6 +14,7 @@
#include <asm/fsl_pci.h>
#include <asm/fsl_serdes.h>
#include <asm/io.h>
+#include <linux/delay.h>
#include "pcie_fsl.h"
#include <dm/device_compat.h>
diff --git a/drivers/pci/pcie_imx.c b/drivers/pci/pcie_imx.c
index f34a157902..cbf12371a0 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>
@@ -19,6 +20,7 @@
#include <asm/gpio.h>
#include <asm/io.h>
#include <dm.h>
+#include <linux/delay.h>
#include <linux/sizes.h>
#include <errno.h>
#include <asm/arch/sys_proto.h>
diff --git a/drivers/pci/pcie_intel_fpga.c b/drivers/pci/pcie_intel_fpga.c
index 6a9f29c5c8..aa1903e547 100644
--- a/drivers/pci/pcie_intel_fpga.c
+++ b/drivers/pci/pcie_intel_fpga.c
@@ -11,6 +11,8 @@
#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
#define RP_TX_CNTRL 0x2004
diff --git a/drivers/pci/pcie_layerscape.c b/drivers/pci/pcie_layerscape.c
index 8b313e9278..39b6d40802 100644
--- a/drivers/pci/pcie_layerscape.c
+++ b/drivers/pci/pcie_layerscape.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/arch/fsl_serdes.h>
#include <pci.h>
#include <asm/io.h>
diff --git a/drivers/pci/pcie_layerscape_fixup.c b/drivers/pci/pcie_layerscape_fixup.c
index ec6acbb138..25a3c3870c 100644
--- a/drivers/pci/pcie_layerscape_fixup.c
+++ b/drivers/pci/pcie_layerscape_fixup.c
@@ -6,6 +6,8 @@
*/
#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_fixup_common.c b/drivers/pci/pcie_layerscape_fixup_common.c
index b010a6300c..c11c691b86 100644
--- a/drivers/pci/pcie_layerscape_fixup_common.c
+++ b/drivers/pci/pcie_layerscape_fixup_common.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <init.h>
#include <asm/arch/clock.h>
#include <asm/arch/soc.h>
#include "pcie_layerscape_fixup_common.h"
diff --git a/drivers/pci/pcie_layerscape_gen4.c b/drivers/pci/pcie_layerscape_gen4.c
index cec61fa7d6..428bfcab09 100644
--- a/drivers/pci/pcie_layerscape_gen4.c
+++ b/drivers/pci/pcie_layerscape_gen4.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/arch/fsl_serdes.h>
#include <pci.h>
#include <asm/io.h>
diff --git a/drivers/pci/pcie_layerscape_gen4.h b/drivers/pci/pcie_layerscape_gen4.h
index 27c2d09332..d298a2b810 100644
--- a/drivers/pci/pcie_layerscape_gen4.h
+++ b/drivers/pci/pcie_layerscape_gen4.h
@@ -10,6 +10,7 @@
#define _PCIE_LAYERSCAPE_GEN4_H_
#include <pci.h>
#include <dm.h>
+#include <linux/bitops.h>
#ifndef CONFIG_SYS_PCI_MEMORY_SIZE
#define CONFIG_SYS_PCI_MEMORY_SIZE (4 * 1024 * 1024 * 1024ULL)
diff --git a/drivers/pci/pcie_layerscape_gen4_fixup.c b/drivers/pci/pcie_layerscape_gen4_fixup.c
index bfe197e7d8..1975004e59 100644
--- a/drivers/pci/pcie_layerscape_gen4_fixup.c
+++ b/drivers/pci/pcie_layerscape_gen4_fixup.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <log.h>
#include <pci.h>
#include <asm/arch/fsl_serdes.h>
#include <asm/io.h>
diff --git a/drivers/pci/pcie_mediatek.c b/drivers/pci/pcie_mediatek.c
index d8a32d53f6..6e6375cec0 100644
--- a/drivers/pci/pcie_mediatek.c
+++ b/drivers/pci/pcie_mediatek.c
@@ -11,11 +11,13 @@
#include <clk.h>
#include <dm.h>
#include <generic-phy.h>
+#include <log.h>
#include <malloc.h>
#include <pci.h>
#include <reset.h>
#include <asm/io.h>
#include <dm/devres.h>
+#include <linux/bitops.h>
#include <linux/iopoll.h>
#include <linux/list.h>
diff --git a/drivers/pci/pcie_xilinx.c b/drivers/pci/pcie_xilinx.c
index 05787ae144..713ad49d04 100644
--- a/drivers/pci/pcie_xilinx.c
+++ b/drivers/pci/pcie_xilinx.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
#include <pci.h>
+#include <linux/bitops.h>
#include <asm/io.h>
diff --git a/drivers/pci_endpoint/pcie-cadence.h b/drivers/pci_endpoint/pcie-cadence.h
index 91630d35c3..8a659c36aa 100644
--- a/drivers/pci_endpoint/pcie-cadence.h
+++ b/drivers/pci_endpoint/pcie-cadence.h
@@ -14,6 +14,7 @@
#include <common.h>
#include <pci_ep.h>
#include <asm/io.h>
+#include <linux/bitops.h>
/*
* Local Management Registers
diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c
index 612c428cf5..b4bae22c2c 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>
@@ -22,6 +23,8 @@
#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>
#define REG_ISCR 0x00
diff --git a/drivers/phy/bcm6318-usbh-phy.c b/drivers/phy/bcm6318-usbh-phy.c
index 2de343de29..d29344ddb4 100644
--- a/drivers/phy/bcm6318-usbh-phy.c
+++ b/drivers/phy/bcm6318-usbh-phy.c
@@ -11,11 +11,14 @@
#include <clk.h>
#include <dm.h>
#include <generic-phy.h>
+#include <log.h>
#include <malloc.h>
#include <power-domain.h>
#include <reset.h>
#include <asm/io.h>
#include <dm/device.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
/* USBH Setup register */
#define USBH_SETUP_REG 0x00
diff --git a/drivers/phy/bcm6348-usbh-phy.c b/drivers/phy/bcm6348-usbh-phy.c
index ed9f02b375..8d28292726 100644
--- a/drivers/phy/bcm6348-usbh-phy.c
+++ b/drivers/phy/bcm6348-usbh-phy.c
@@ -11,10 +11,12 @@
#include <clk.h>
#include <dm.h>
#include <generic-phy.h>
+#include <log.h>
#include <malloc.h>
#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 f0fda0290e..501b97f3e2 100644
--- a/drivers/phy/bcm6358-usbh-phy.c
+++ b/drivers/phy/bcm6358-usbh-phy.c
@@ -10,10 +10,12 @@
#include <common.h>
#include <dm.h>
#include <generic-phy.h>
+#include <log.h>
#include <malloc.h>
#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 53d1f45bb9..99fdd33499 100644
--- a/drivers/phy/bcm6368-usbh-phy.c
+++ b/drivers/phy/bcm6368-usbh-phy.c
@@ -11,11 +11,14 @@
#include <clk.h>
#include <dm.h>
#include <generic-phy.h>
+#include <log.h>
#include <malloc.h>
#include <power-domain.h>
#include <reset.h>
#include <asm/io.h>
#include <dm/device.h>
+#include <linux/bitops.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 14ac6bbbb2..9faf501003 100644
--- a/drivers/phy/keystone-usb-phy.c
+++ b/drivers/phy/keystone-usb-phy.c
@@ -6,10 +6,13 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <dm/device.h>
#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 */
#define USB_PHY_CTL_UTMI 0x0000
diff --git a/drivers/phy/marvell/comphy_a3700.c b/drivers/phy/marvell/comphy_a3700.c
index 3b2902f362..dc188c44e0 100644
--- a/drivers/phy/marvell/comphy_a3700.c
+++ b/drivers/phy/marvell/comphy_a3700.c
@@ -5,9 +5,11 @@
#include <common.h>
#include <fdtdec.h>
+#include <log.h>
#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_core.c b/drivers/phy/marvell/comphy_core.c
index 244beef18d..27bff27ff7 100644
--- a/drivers/phy/marvell/comphy_core.c
+++ b/drivers/phy/marvell/comphy_core.c
@@ -8,10 +8,11 @@
#include <common.h>
#include <dm.h>
#include <fdtdec.h>
+#include <asm/io.h>
#include <dm/device_compat.h>
#include <linux/err.h>
#include <linux/errno.h>
-#include <asm/io.h>
+#include <linux/libfdt.h>
#include "comphy_core.h"
diff --git a/drivers/phy/marvell/comphy_cp110.c b/drivers/phy/marvell/comphy_cp110.c
index 9998c07a47..15e80049de 100644
--- a/drivers/phy/marvell/comphy_cp110.c
+++ b/drivers/phy/marvell/comphy_cp110.c
@@ -5,9 +5,11 @@
#include <common.h>
#include <fdtdec.h>
+#include <log.h>
#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/marvell/comphy_mux.c b/drivers/phy/marvell/comphy_mux.c
index c67ba99762..98327557a8 100644
--- a/drivers/phy/marvell/comphy_mux.c
+++ b/drivers/phy/marvell/comphy_mux.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include "comphy_core.h"
diff --git a/drivers/phy/meson-g12a-usb2.c b/drivers/phy/meson-g12a-usb2.c
index c23bc87d0f..a1e6219758 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>
@@ -15,6 +16,7 @@
#include <errno.h>
#include <generic-phy.h>
#include <regmap.h>
+#include <linux/delay.h>
#include <power/regulator.h>
#include <reset.h>
#include <clk.h>
diff --git a/drivers/phy/meson-g12a-usb3-pcie.c b/drivers/phy/meson-g12a-usb3-pcie.c
index 82655f26dd..4e9696fd59 100644
--- a/drivers/phy/meson-g12a-usb3-pcie.c
+++ b/drivers/phy/meson-g12a-usb3-pcie.c
@@ -17,6 +17,7 @@
#include <reset.h>
#include <bitfield.h>
#include <generic-phy.h>
+#include <linux/delay.h>
#include <linux/bitops.h>
#include <linux/compat.h>
diff --git a/drivers/phy/meson-gxbb-usb2.c b/drivers/phy/meson-gxbb-usb2.c
index 88c2ec69b2..d1beebee43 100644
--- a/drivers/phy/meson-gxbb-usb2.c
+++ b/drivers/phy/meson-gxbb-usb2.c
@@ -15,6 +15,7 @@
#include <power/regulator.h>
#include <regmap.h>
#include <reset.h>
+#include <linux/bitops.h>
#define REG_CONFIG 0x00
#define REG_CONFIG_CLK_EN BIT(0)
diff --git a/drivers/phy/meson-gxl-usb2.c b/drivers/phy/meson-gxl-usb2.c
index b4f4c3c76b..2267bd08c2 100644
--- a/drivers/phy/meson-gxl-usb2.c
+++ b/drivers/phy/meson-gxl-usb2.c
@@ -15,6 +15,7 @@
#include <errno.h>
#include <generic-phy.h>
#include <regmap.h>
+#include <linux/delay.h>
#include <power/regulator.h>
#include <clk.h>
#include <linux/usb/otg.h>
diff --git a/drivers/phy/msm8916-usbh-phy.c b/drivers/phy/msm8916-usbh-phy.c
index 2c90738fca..4efaddd701 100644
--- a/drivers/phy/msm8916-usbh-phy.c
+++ b/drivers/phy/msm8916-usbh-phy.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <generic-phy.h>
+#include <linux/bitops.h>
#include <usb/ehci-ci.h>
#include <usb/ulpi.h>
#include <asm/io.h>
diff --git a/drivers/phy/mt76x8-usb-phy.c b/drivers/phy/mt76x8-usb-phy.c
index 1e7c5f334b..4c0818f6e8 100644
--- a/drivers/phy/mt76x8-usb-phy.c
+++ b/drivers/phy/mt76x8-usb-phy.c
@@ -10,9 +10,11 @@
#include <common.h>
#include <dm.h>
#include <generic-phy.h>
+#include <log.h>
#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/omap-usb2-phy.c b/drivers/phy/omap-usb2-phy.c
index 160a386801..0793b97dd5 100644
--- a/drivers/phy/omap-usb2-phy.c
+++ b/drivers/phy/omap-usb2-phy.c
@@ -13,6 +13,7 @@
#include <generic-phy.h>
#include <regmap.h>
#include <syscon.h>
+#include <linux/bitops.h>
#include <linux/err.h>
#define OMAP_USB2_CALIBRATE_FALSE_DISCONNECT BIT(0)
diff --git a/drivers/phy/phy-da8xx-usb.c b/drivers/phy/phy-da8xx-usb.c
index 034b47932d..d025188eae 100644
--- a/drivers/phy/phy-da8xx-usb.c
+++ b/drivers/phy/phy-da8xx-usb.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <dm/device-internal.h>
#include <dm/lists.h>
#include <asm/arch/hardware.h>
diff --git a/drivers/phy/phy-mtk-tphy.c b/drivers/phy/phy-mtk-tphy.c
index 81525a48b7..1e65c24356 100644
--- a/drivers/phy/phy-mtk-tphy.c
+++ b/drivers/phy/phy-mtk-tphy.c
@@ -14,6 +14,8 @@
#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-rcar-gen2.c b/drivers/phy/phy-rcar-gen2.c
index e93130aee6..18da86e4be 100644
--- a/drivers/phy/phy-rcar-gen2.c
+++ b/drivers/phy/phy-rcar-gen2.c
@@ -18,6 +18,7 @@
#include <asm/io.h>
#include <dm/device_compat.h>
#include <linux/bitops.h>
+#include <linux/delay.h>
#include <power/regulator.h>
#define USBHS_LPSTS 0x02
diff --git a/drivers/phy/phy-stm32-usbphyc.c b/drivers/phy/phy-stm32-usbphyc.c
index 6ba37213cb..464b0735e8 100644
--- a/drivers/phy/phy-stm32-usbphyc.c
+++ b/drivers/phy/phy-stm32-usbphyc.c
@@ -9,12 +9,14 @@
#include <dm.h>
#include <fdtdec.h>
#include <generic-phy.h>
+#include <log.h>
#include <reset.h>
#include <syscon.h>
#include <usb.h>
#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 0b2b2410b2..6907c1afb3 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>
@@ -19,6 +20,8 @@
#include <power-domain.h>
#include <regmap.h>
#include <syscon.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <linux/err.h>
#define CMU_R07C 0x7c
diff --git a/drivers/phy/phy-uclass.c b/drivers/phy/phy-uclass.c
index 1fded5ebf4..65b5316834 100644
--- a/drivers/phy/phy-uclass.c
+++ b/drivers/phy/phy-uclass.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <dm/devres.h>
#include <generic-phy.h>
+#include <log.h>
static inline struct phy_ops *phy_dev_ops(struct udevice *dev)
{
diff --git a/drivers/phy/sti_usb_phy.c b/drivers/phy/sti_usb_phy.c
index ec597da84e..2a20f7601c 100644
--- a/drivers/phy/sti_usb_phy.c
+++ b/drivers/phy/sti_usb_phy.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <bitfield.h>
#include <dm.h>
diff --git a/drivers/phy/ti-pipe3-phy.c b/drivers/phy/ti-pipe3-phy.c
index 7fc36319cb..3f49851bca 100644
--- a/drivers/phy/ti-pipe3-phy.c
+++ b/drivers/phy/ti-pipe3-phy.c
@@ -12,6 +12,8 @@
#include <asm/arch/sys_proto.h>
#include <syscon.h>
#include <regmap.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <linux/err.h>
/* PLLCTRL Registers */
diff --git a/drivers/pinctrl/aspeed/pinctrl_ast2500.c b/drivers/pinctrl/aspeed/pinctrl_ast2500.c
index a6e9c0d933..05ef24864f 100644
--- a/drivers/pinctrl/aspeed/pinctrl_ast2500.c
+++ b/drivers/pinctrl/aspeed/pinctrl_ast2500.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/arch/pinctrl.h>
#include <asm/arch/scu_ast2500.h>
diff --git a/drivers/pinctrl/ath79/pinctrl_ar933x.c b/drivers/pinctrl/ath79/pinctrl_ar933x.c
index 5e154a9f19..a0625d7c83 100644
--- a/drivers/pinctrl/ath79/pinctrl_ar933x.c
+++ b/drivers/pinctrl/ath79/pinctrl_ar933x.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <asm/io.h>
#include <dm/pinctrl.h>
#include <mach/ar71xx_regs.h>
diff --git a/drivers/pinctrl/ath79/pinctrl_qca953x.c b/drivers/pinctrl/ath79/pinctrl_qca953x.c
index 3166167d71..c9f9608c92 100644
--- a/drivers/pinctrl/ath79/pinctrl_qca953x.c
+++ b/drivers/pinctrl/ath79/pinctrl_qca953x.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <asm/io.h>
#include <dm/pinctrl.h>
#include <mach/ar71xx_regs.h>
diff --git a/drivers/pinctrl/broadcom/pinctrl-bcm283x.c b/drivers/pinctrl/broadcom/pinctrl-bcm283x.c
index eb720f09f8..f44af6cf9a 100644
--- a/drivers/pinctrl/broadcom/pinctrl-bcm283x.c
+++ b/drivers/pinctrl/broadcom/pinctrl-bcm283x.c
@@ -14,6 +14,7 @@
#include <config.h>
#include <errno.h>
#include <dm.h>
+#include <log.h>
#include <dm/pinctrl.h>
#include <dm/root.h>
#include <dm/device-internal.h>
diff --git a/drivers/pinctrl/intel/pinctrl.c b/drivers/pinctrl/intel/pinctrl.c
index e280054f94..ba8206350e 100644
--- a/drivers/pinctrl/intel/pinctrl.c
+++ b/drivers/pinctrl/intel/pinctrl.c
@@ -19,6 +19,7 @@
#include <common.h>
#include <dm.h>
#include <irq.h>
+#include <log.h>
#include <malloc.h>
#include <p2sb.h>
#include <spl.h>
diff --git a/drivers/pinctrl/intel/pinctrl_apl.c b/drivers/pinctrl/intel/pinctrl_apl.c
index bd80435ffa..c14176d4a7 100644
--- a/drivers/pinctrl/intel/pinctrl_apl.c
+++ b/drivers/pinctrl/intel/pinctrl_apl.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <dm.h>
#include <dt-structs.h>
+#include <log.h>
#include <p2sb.h>
#include <asm/intel_pinctrl.h>
#include <asm-generic/gpio.h>
diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
index c7351f32bb..5fdc150295 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
@@ -11,6 +11,7 @@
#include <dm/pinctrl.h>
#include <asm/io.h>
#include <asm-generic/gpio.h>
+#include <linux/bitops.h>
#include "pinctrl-mtk-common.h"
diff --git a/drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c b/drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c
index b5d74068c5..c6cb941d0a 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c
@@ -4,6 +4,7 @@
* Copyright (C) 2017 Xingyu Chen <xingyu.chen@amlogic.com>
*/
+#include <log.h>
#include <asm/gpio.h>
#include <common.h>
#include <dm.h>
diff --git a/drivers/pinctrl/meson/pinctrl-meson-gx-pmx.c b/drivers/pinctrl/meson/pinctrl-meson-gx-pmx.c
index b37b517fe5..159f3406a2 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-gx-pmx.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-gx-pmx.c
@@ -3,10 +3,12 @@
* (C) Copyright 2016 - Beniamino Galvani <b.galvani@gmail.com>
*/
+#include <log.h>
#include <asm/gpio.h>
#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 7fbe2810a2..d4539b02d8 100644
--- a/drivers/pinctrl/meson/pinctrl-meson.c
+++ b/drivers/pinctrl/meson/pinctrl-meson.c
@@ -5,14 +5,17 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <dm/device-internal.h>
#include <dm/device_compat.h>
#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>
#include <linux/sizes.h>
#include <asm/gpio.h>
diff --git a/drivers/pinctrl/mscc/mscc-common.c b/drivers/pinctrl/mscc/mscc-common.c
index 90c54b45c3..307ed1db87 100644
--- a/drivers/pinctrl/mscc/mscc-common.c
+++ b/drivers/pinctrl/mscc/mscc-common.c
@@ -21,6 +21,7 @@
#include <dm/root.h>
#include <errno.h>
#include <fdtdec.h>
+#include <linux/bitops.h>
#include <linux/io.h>
#include "mscc-common.h"
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
index 6e0bcae991..2dee79af17 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
@@ -32,6 +32,8 @@
#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 0b9c9e1d6a..2206e958ec 100644
--- a/drivers/pinctrl/mvebu/pinctrl-mvebu.c
+++ b/drivers/pinctrl/mvebu/pinctrl-mvebu.c
@@ -9,11 +9,13 @@
#include <fdtdec.h>
#include <errno.h>
#include <dm.h>
+#include <log.h>
#include <dm/pinctrl.h>
#include <dm/root.h>
#include <asm/system.h>
#include <asm/io.h>
#include <asm/arch-armada8k/soc-info.h>
+#include <linux/bitops.h>
#include "pinctrl-mvebu.h"
#define AP_EMMC_PHY_CTRL_REG 0x100
diff --git a/drivers/pinctrl/nxp/pinctrl-imx.c b/drivers/pinctrl/nxp/pinctrl-imx.c
index 474c38a049..48c7bde375 100644
--- a/drivers/pinctrl/nxp/pinctrl-imx.c
+++ b/drivers/pinctrl/nxp/pinctrl-imx.c
@@ -8,6 +8,7 @@
#include <mapmem.h>
#include <dm/device_compat.h>
#include <dm/devres.h>
+#include <linux/bitops.h>
#include <linux/io.h>
#include <linux/err.h>
#include <dm.h>
diff --git a/drivers/pinctrl/nxp/pinctrl-mxs.c b/drivers/pinctrl/nxp/pinctrl-mxs.c
index 8d61dfe863..a403114f21 100644
--- a/drivers/pinctrl/nxp/pinctrl-mxs.c
+++ b/drivers/pinctrl/nxp/pinctrl-mxs.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <log.h>
#include <dm/device_compat.h>
#include <dm/devres.h>
#include <linux/io.h>
diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c
index 0c43686e01..801d14253c 100644
--- a/drivers/pinctrl/pinctrl-at91-pio4.c
+++ b/drivers/pinctrl/pinctrl-at91-pio4.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <dm.h>
#include <dm/pinctrl.h>
+#include <linux/bitops.h>
#include <linux/io.h>
#include <linux/err.h>
#include <mach/atmel_pio4.h>
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
index 27f274ff02..b3fa124cfb 100644
--- a/drivers/pinctrl/pinctrl-at91.c
+++ b/drivers/pinctrl/pinctrl-at91.c
@@ -8,8 +8,10 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <dm/pinctrl.h>
#include <asm/hardware.h>
+#include <linux/bitops.h>
#include <linux/io.h>
#include <linux/err.h>
#include <mach/at91_pio.h>
diff --git a/drivers/pinctrl/pinctrl-sandbox.c b/drivers/pinctrl/pinctrl-sandbox.c
index 3ee75fbbee..ac0119d198 100644
--- a/drivers/pinctrl/pinctrl-sandbox.c
+++ b/drivers/pinctrl/pinctrl-sandbox.c
@@ -7,7 +7,9 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <dm/pinctrl.h>
+#include <linux/bitops.h>
static const char * const sandbox_pins[] = {
"SCL",
diff --git a/drivers/pinctrl/pinctrl-sti.c b/drivers/pinctrl/pinctrl-sti.c
index f0cd845fea..8e942a8280 100644
--- a/drivers/pinctrl/pinctrl-sti.c
+++ b/drivers/pinctrl/pinctrl-sti.c
@@ -14,6 +14,8 @@
#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/pinctrl-stmfx.c b/drivers/pinctrl/pinctrl-stmfx.c
index b0e43ae0a1..a3240ccd5a 100644
--- a/drivers/pinctrl/pinctrl-stmfx.c
+++ b/drivers/pinctrl/pinctrl-stmfx.c
@@ -15,6 +15,8 @@
#include <dm/lists.h>
#include <dm/pinctrl.h>
#include <linux/bitfield.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <power/regulator.h>
/* STMFX pins = GPIO[15:0] + aGPIO[7:0] */
diff --git a/drivers/pinctrl/pinctrl_pic32.c b/drivers/pinctrl/pinctrl_pic32.c
index 06f1518c78..911af1297b 100644
--- a/drivers/pinctrl/pinctrl_pic32.c
+++ b/drivers/pinctrl/pinctrl_pic32.c
@@ -7,8 +7,10 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#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 9926235b52..fc241fdcde 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>
@@ -8,7 +9,9 @@
#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>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/pinctrl/renesas/pfc-r7s72100.c b/drivers/pinctrl/renesas/pfc-r7s72100.c
index 7e4530d684..5055780bf7 100644
--- a/drivers/pinctrl/renesas/pfc-r7s72100.c
+++ b/drivers/pinctrl/renesas/pfc-r7s72100.c
@@ -9,6 +9,7 @@
#include <dm.h>
#include <dm/lists.h>
#include <dm/pinctrl.h>
+#include <linux/bitops.h>
#include <linux/io.h>
#include <linux/err.h>
diff --git a/drivers/pinctrl/renesas/pfc-r8a77990.c b/drivers/pinctrl/renesas/pfc-r8a77990.c
index 5313f2f509..de22e49ebe 100644
--- a/drivers/pinctrl/renesas/pfc-r8a77990.c
+++ b/drivers/pinctrl/renesas/pfc-r8a77990.c
@@ -15,6 +15,7 @@
#include <dm.h>
#include <errno.h>
#include <dm/pinctrl.h>
+#include <linux/bitops.h>
#include <linux/kernel.h>
#include "sh_pfc.h"
diff --git a/drivers/pinctrl/renesas/pfc.c b/drivers/pinctrl/renesas/pfc.c
index ab64f4f0c8..1179afd2e7 100644
--- a/drivers/pinctrl/renesas/pfc.c
+++ b/drivers/pinctrl/renesas/pfc.c
@@ -17,6 +17,8 @@
#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/renesas/sh_pfc.h b/drivers/pinctrl/renesas/sh_pfc.h
index 1cfb881e58..db3d513358 100644
--- a/drivers/pinctrl/renesas/sh_pfc.h
+++ b/drivers/pinctrl/renesas/sh_pfc.h
@@ -672,4 +672,5 @@ extern const struct sh_pfc_soc_info r8a77995_pinmux_info;
*/
#define RCAR_GP_PIN(bank, pin) (((bank) * 32) + (pin))
+#include <linux/bug.h>
#endif /* __SH_PFC_H */
diff --git a/drivers/pinctrl/rockchip/pinctrl-px30.c b/drivers/pinctrl/rockchip/pinctrl-px30.c
index bb56ae9fb3..617721a626 100644
--- a/drivers/pinctrl/rockchip/pinctrl-px30.c
+++ b/drivers/pinctrl/rockchip/pinctrl-px30.c
@@ -5,9 +5,11 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <dm/pinctrl.h>
#include <regmap.h>
#include <syscon.h>
+#include <linux/bitops.h>
#include "pinctrl-rockchip.h"
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3036.c b/drivers/pinctrl/rockchip/pinctrl-rk3036.c
index 28c905129b..d49e3007ce 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3036.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3036.c
@@ -8,6 +8,7 @@
#include <dm/pinctrl.h>
#include <regmap.h>
#include <syscon.h>
+#include <linux/bitops.h>
#include "pinctrl-rockchip.h"
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3128.c b/drivers/pinctrl/rockchip/pinctrl-rk3128.c
index 3eb4d952bb..a175d6c07f 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3128.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3128.c
@@ -8,6 +8,7 @@
#include <dm/pinctrl.h>
#include <regmap.h>
#include <syscon.h>
+#include <linux/bitops.h>
#include "pinctrl-rockchip.h"
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3188.c b/drivers/pinctrl/rockchip/pinctrl-rk3188.c
index 043764fc92..afde809854 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3188.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3188.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <dm/pinctrl.h>
#include <regmap.h>
#include <syscon.h>
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk322x.c b/drivers/pinctrl/rockchip/pinctrl-rk322x.c
index c5e4fe30a7..85bc0ef0f3 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk322x.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk322x.c
@@ -5,9 +5,11 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#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 7ae147f304..faaa2ce1f7 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3288.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3288.c
@@ -5,8 +5,10 @@
#include <common.h>
#include <dm.h>
+#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 abd57e54a5..db2b10a690 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3308.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3308.c
@@ -5,9 +5,11 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#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 8d37a6f945..f9160f26c7 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3328.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3328.c
@@ -5,9 +5,11 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#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-rk3368.c b/drivers/pinctrl/rockchip/pinctrl-rk3368.c
index 6cb7bb45d9..7a6059959e 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3368.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3368.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <dm/pinctrl.h>
#include <regmap.h>
#include <syscon.h>
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3399.c b/drivers/pinctrl/rockchip/pinctrl-rk3399.c
index 75634e9f4d..d04c1afb09 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3399.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3399.c
@@ -5,9 +5,11 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#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 0fd0416b18..ec1cb9b652 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
@@ -5,10 +5,13 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <dm/pinctrl.h>
#include <regmap.h>
#include <syscon.h>
#include <fdtdec.h>
+#include <linux/bitops.h>
+#include <linux/libfdt.h>
#include "pinctrl-rockchip.h"
diff --git a/drivers/pinctrl/rockchip/pinctrl-rockchip.h b/drivers/pinctrl/rockchip/pinctrl-rockchip.h
index 5edc7cbd74..d969c20082 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rockchip.h
+++ b/drivers/pinctrl/rockchip/pinctrl-rockchip.h
@@ -6,6 +6,7 @@
#ifndef __DRIVERS_PINCTRL_ROCKCHIP_H
#define __DRIVERS_PINCTRL_ROCKCHIP_H
+#include <linux/bitops.h>
#include <linux/types.h>
/**
diff --git a/drivers/pinctrl/rockchip/pinctrl-rv1108.c b/drivers/pinctrl/rockchip/pinctrl-rv1108.c
index 54610a3e90..22334329ed 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rv1108.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rv1108.c
@@ -5,9 +5,11 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#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 abeba965c4..8545b9d070 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
@@ -7,6 +7,8 @@
#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>
#include <linux/kernel.h>
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier.h b/drivers/pinctrl/uniphier/pinctrl-uniphier.h
index 8f83ecae7d..5951835d6e 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier.h
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier.h
@@ -8,6 +8,7 @@
#define __PINCTRL_UNIPHIER_H__
#include <linux/bitops.h>
+#include <linux/bug.h>
#include <linux/build_bug.h>
#include <linux/kernel.h>
#include <linux/types.h>
diff --git a/drivers/power/acpi_pmc/pmc_emul.c b/drivers/power/acpi_pmc/pmc_emul.c
index dfff335e54..5ed6fcca26 100644
--- a/drivers/power/acpi_pmc/pmc_emul.c
+++ b/drivers/power/acpi_pmc/pmc_emul.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <pci.h>
#include <asm/test.h>
#include <power/acpi_pmc.h>
diff --git a/drivers/power/acpi_pmc/sandbox.c b/drivers/power/acpi_pmc/sandbox.c
index 7fbbf97b45..48a6c663bd 100644
--- a/drivers/power/acpi_pmc/sandbox.c
+++ b/drivers/power/acpi_pmc/sandbox.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <asm/io.h>
#include <power/acpi_pmc.h>
diff --git a/drivers/power/axp152.c b/drivers/power/axp152.c
index 361be6c31c..d6e36125c1 100644
--- a/drivers/power/axp152.c
+++ b/drivers/power/axp152.c
@@ -79,7 +79,7 @@ int axp_init(void)
return 0;
}
-int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
pmic_bus_write(AXP152_SHUTDOWN, AXP152_POWEROFF);
diff --git a/drivers/power/axp209.c b/drivers/power/axp209.c
index 67b420910c..ade531940b 100644
--- a/drivers/power/axp209.c
+++ b/drivers/power/axp209.c
@@ -8,6 +8,7 @@
#include <command.h>
#include <asm/arch/pmic_bus.h>
#include <axp_pmic.h>
+#include <linux/delay.h>
#ifdef CONFIG_AXP_ALDO3_VOLT_SLOPE_08
# define AXP209_VRC_SLOPE AXP209_VRC_LDO3_800uV_uS
@@ -229,7 +230,7 @@ int axp_init(void)
return 0;
}
-int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
pmic_bus_write(AXP209_SHUTDOWN, AXP209_POWEROFF);
diff --git a/drivers/power/axp221.c b/drivers/power/axp221.c
index c440047d36..3446fe7365 100644
--- a/drivers/power/axp221.c
+++ b/drivers/power/axp221.c
@@ -264,7 +264,7 @@ int axp_get_sid(unsigned int *sid)
return 0;
}
-int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
pmic_bus_write(AXP221_SHUTDOWN, AXP221_SHUTDOWN_POWEROFF);
diff --git a/drivers/power/axp809.c b/drivers/power/axp809.c
index 7de92f4f61..6323492b66 100644
--- a/drivers/power/axp809.c
+++ b/drivers/power/axp809.c
@@ -11,6 +11,7 @@
*/
#include <common.h>
+#include <command.h>
#include <errno.h>
#include <asm/arch/gpio.h>
#include <asm/arch/pmic_bus.h>
@@ -219,7 +220,7 @@ int axp_init(void)
return pmic_bus_init();
}
-int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
pmic_bus_write(AXP809_SHUTDOWN, AXP809_SHUTDOWN_POWEROFF);
diff --git a/drivers/power/axp818.c b/drivers/power/axp818.c
index 834919ddd4..0531707c8a 100644
--- a/drivers/power/axp818.c
+++ b/drivers/power/axp818.c
@@ -11,6 +11,7 @@
*/
#include <common.h>
+#include <command.h>
#include <errno.h>
#include <asm/arch/gpio.h>
#include <asm/arch/pmic_bus.h>
@@ -255,7 +256,7 @@ int axp_init(void)
return 0;
}
-int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
pmic_bus_write(AXP818_SHUTDOWN, AXP818_SHUTDOWN_POWEROFF);
diff --git a/drivers/power/battery/bat_trats.c b/drivers/power/battery/bat_trats.c
index 450b1dfa28..54b2bf91e5 100644
--- a/drivers/power/battery/bat_trats.c
+++ b/drivers/power/battery/bat_trats.c
@@ -6,6 +6,8 @@
#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/battery/bat_trats2.c b/drivers/power/battery/bat_trats2.c
index bb21cd7ff8..1172970d1e 100644
--- a/drivers/power/battery/bat_trats2.c
+++ b/drivers/power/battery/bat_trats2.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <log.h>
#include <power/pmic.h>
#include <power/battery.h>
#include <power/max77693_pmic.h>
diff --git a/drivers/power/domain/bcm6328-power-domain.c b/drivers/power/domain/bcm6328-power-domain.c
index a6426bee27..a494bfa8c9 100644
--- a/drivers/power/domain/bcm6328-power-domain.c
+++ b/drivers/power/domain/bcm6328-power-domain.c
@@ -8,6 +8,7 @@
#include <malloc.h>
#include <power-domain-uclass.h>
#include <asm/io.h>
+#include <linux/bitops.h>
#define MAX_DOMAINS 32
diff --git a/drivers/power/domain/imx8-power-domain-legacy.c b/drivers/power/domain/imx8-power-domain-legacy.c
index 7ba4056e2d..889b65a47f 100644
--- a/drivers/power/domain/imx8-power-domain-legacy.c
+++ b/drivers/power/domain/imx8-power-domain-legacy.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <power-domain-uclass.h>
#include <asm/io.h>
diff --git a/drivers/power/domain/imx8-power-domain.c b/drivers/power/domain/imx8-power-domain.c
index 571146e19d..6461ab23d6 100644
--- a/drivers/power/domain/imx8-power-domain.c
+++ b/drivers/power/domain/imx8-power-domain.c
@@ -6,6 +6,7 @@
#define DEBUG
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <power-domain-uclass.h>
#include <asm/arch/power-domain.h>
diff --git a/drivers/power/domain/meson-ee-pwrc.c b/drivers/power/domain/meson-ee-pwrc.c
index 7082c80bfa..8349a9c158 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>
@@ -14,6 +15,8 @@
#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>
/* AO Offsets */
diff --git a/drivers/power/domain/meson-gx-pwrc-vpu.c b/drivers/power/domain/meson-gx-pwrc-vpu.c
index 12cdfcdd1f..a41b230448 100644
--- a/drivers/power/domain/meson-gx-pwrc-vpu.c
+++ b/drivers/power/domain/meson-gx-pwrc-vpu.c
@@ -8,12 +8,15 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <power-domain-uclass.h>
#include <regmap.h>
#include <syscon.h>
#include <reset.h>
#include <clk.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <linux/err.h>
enum {
diff --git a/drivers/power/domain/mtk-power-domain.c b/drivers/power/domain/mtk-power-domain.c
index 3ff7ca1bef..fae4749012 100644
--- a/drivers/power/domain/mtk-power-domain.c
+++ b/drivers/power/domain/mtk-power-domain.c
@@ -13,6 +13,7 @@
#include <syscon.h>
#include <asm/io.h>
#include <asm/processor.h>
+#include <linux/bitops.h>
#include <linux/err.h>
#include <linux/iopoll.h>
diff --git a/drivers/power/domain/power-domain-uclass.c b/drivers/power/domain/power-domain-uclass.c
index 2b7a1cb8fe..c2c7c3bd50 100644
--- a/drivers/power/domain/power-domain-uclass.c
+++ b/drivers/power/domain/power-domain-uclass.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <power-domain.h>
#include <power-domain-uclass.h>
diff --git a/drivers/power/domain/sandbox-power-domain.c b/drivers/power/domain/sandbox-power-domain.c
index 3a834a9f1e..4d9a2006e6 100644
--- a/drivers/power/domain/sandbox-power-domain.c
+++ b/drivers/power/domain/sandbox-power-domain.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <power-domain-uclass.h>
#include <asm/io.h>
diff --git a/drivers/power/domain/tegra186-power-domain.c b/drivers/power/domain/tegra186-power-domain.c
index e87244197f..707735cf85 100644
--- a/drivers/power/domain/tegra186-power-domain.c
+++ b/drivers/power/domain/tegra186-power-domain.c
@@ -5,10 +5,12 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#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/domain/ti-sci-power-domain.c b/drivers/power/domain/ti-sci-power-domain.c
index a5866703ae..7ee121dfb2 100644
--- a/drivers/power/domain/ti-sci-power-domain.c
+++ b/drivers/power/domain/ti-sci-power-domain.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include <power-domain-uclass.h>
#include <dm/device_compat.h>
diff --git a/drivers/power/exynos-tmu.c b/drivers/power/exynos-tmu.c
index 6a662677a7..4fba7b527c 100644
--- a/drivers/power/exynos-tmu.c
+++ b/drivers/power/exynos-tmu.c
@@ -20,6 +20,7 @@
#include <common.h>
#include <errno.h>
#include <fdtdec.h>
+#include <log.h>
#include <tmu.h>
#include <asm/arch/tmu.h>
#include <asm/arch/power.h>
diff --git a/drivers/power/fuel_gauge/fg_max17042.c b/drivers/power/fuel_gauge/fg_max17042.c
index 8cfdf654f7..a395d587a8 100644
--- a/drivers/power/fuel_gauge/fg_max17042.c
+++ b/drivers/power/fuel_gauge/fg_max17042.c
@@ -5,6 +5,8 @@
*/
#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/mfd/fg_max77693.c b/drivers/power/mfd/fg_max77693.c
index 0de9ee712d..983a6d4a2b 100644
--- a/drivers/power/mfd/fg_max77693.c
+++ b/drivers/power/mfd/fg_max77693.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <log.h>
#include <power/pmic.h>
#include <power/max77693_fg.h>
#include <i2c.h>
diff --git a/drivers/power/mfd/muic_max77693.c b/drivers/power/mfd/muic_max77693.c
index 0eb26d29d4..36ee44b9a2 100644
--- a/drivers/power/mfd/muic_max77693.c
+++ b/drivers/power/mfd/muic_max77693.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <log.h>
#include <power/pmic.h>
#include <power/power_chrg.h>
#include <power/max77693_muic.h>
diff --git a/drivers/power/mfd/pmic_max77693.c b/drivers/power/mfd/pmic_max77693.c
index c3bd6c4990..e32a9722a4 100644
--- a/drivers/power/mfd/pmic_max77693.c
+++ b/drivers/power/mfd/pmic_max77693.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <log.h>
#include <power/pmic.h>
#include <power/max77693_pmic.h>
#include <i2c.h>
diff --git a/drivers/power/mt6323.c b/drivers/power/mt6323.c
index 566be5f39e..354817a037 100644
--- a/drivers/power/mt6323.c
+++ b/drivers/power/mt6323.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <command.h>
#include <asm/io.h>
+#include <linux/delay.h>
#define PWRAP_BASE 0x1000d000
#define PWRAP_WACS2_CMD 0x9c
@@ -17,7 +18,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/pmic/act8846.c b/drivers/power/pmic/act8846.c
index 186fa907e1..8f0f5a6d96 100644
--- a/drivers/power/pmic/act8846.c
+++ b/drivers/power/pmic/act8846.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <errno.h>
#include <fdtdec.h>
+#include <log.h>
#include <linux/libfdt.h>
#include <power/act8846_pmic.h>
#include <power/pmic.h>
diff --git a/drivers/power/pmic/as3722.c b/drivers/power/pmic/as3722.c
index 54adcbf50f..3aa3cce945 100644
--- a/drivers/power/pmic/as3722.c
+++ b/drivers/power/pmic/as3722.c
@@ -10,6 +10,7 @@
#include <errno.h>
#include <fdtdec.h>
#include <i2c.h>
+#include <log.h>
#include <dm/lists.h>
#include <power/as3722.h>
#include <power/pmic.h>
diff --git a/drivers/power/pmic/bd71837.c b/drivers/power/pmic/bd71837.c
index 2e04298273..31c9139c64 100644
--- a/drivers/power/pmic/bd71837.c
+++ b/drivers/power/pmic/bd71837.c
@@ -7,6 +7,7 @@
#include <errno.h>
#include <dm.h>
#include <i2c.h>
+#include <log.h>
#include <power/pmic.h>
#include <power/regulator.h>
#include <power/bd71837.h>
diff --git a/drivers/power/pmic/da9063.c b/drivers/power/pmic/da9063.c
index abda7a5a40..25101d18f7 100644
--- a/drivers/power/pmic/da9063.c
+++ b/drivers/power/pmic/da9063.c
@@ -9,6 +9,7 @@
#include <errno.h>
#include <dm.h>
#include <i2c.h>
+#include <log.h>
#include <power/pmic.h>
#include <power/regulator.h>
#include <power/da9063_pmic.h>
diff --git a/drivers/power/pmic/fan53555.c b/drivers/power/pmic/fan53555.c
index a5f855ce2a..4d1e686d27 100644
--- a/drivers/power/pmic/fan53555.c
+++ b/drivers/power/pmic/fan53555.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <dm/device-internal.h>
#include <dm/device_compat.h>
#include <dm/lists.h>
diff --git a/drivers/power/pmic/i2c_pmic_emul.c b/drivers/power/pmic/i2c_pmic_emul.c
index 86d7b89b1f..404fe008fe 100644
--- a/drivers/power/pmic/i2c_pmic_emul.c
+++ b/drivers/power/pmic/i2c_pmic_emul.c
@@ -8,6 +8,7 @@
#include <errno.h>
#include <dm.h>
#include <i2c.h>
+#include <log.h>
#include <malloc.h>
#include <power/pmic.h>
#include <power/sandbox_pmic.h>
diff --git a/drivers/power/pmic/lp873x.c b/drivers/power/pmic/lp873x.c
index 4ae4043b94..2b1260ec6b 100644
--- a/drivers/power/pmic/lp873x.c
+++ b/drivers/power/pmic/lp873x.c
@@ -9,6 +9,7 @@
#include <errno.h>
#include <dm.h>
#include <i2c.h>
+#include <log.h>
#include <power/pmic.h>
#include <power/regulator.h>
#include <power/lp873x.h>
diff --git a/drivers/power/pmic/lp87565.c b/drivers/power/pmic/lp87565.c
index 3e5fc608d2..f4a4bd03d7 100644
--- a/drivers/power/pmic/lp87565.c
+++ b/drivers/power/pmic/lp87565.c
@@ -9,6 +9,7 @@
#include <errno.h>
#include <dm.h>
#include <i2c.h>
+#include <log.h>
#include <power/pmic.h>
#include <power/regulator.h>
#include <power/lp87565.h>
diff --git a/drivers/power/pmic/max77686.c b/drivers/power/pmic/max77686.c
index 8e3a8cf870..9f02c0b6f6 100644
--- a/drivers/power/pmic/max77686.c
+++ b/drivers/power/pmic/max77686.c
@@ -9,6 +9,7 @@
#include <errno.h>
#include <dm.h>
#include <i2c.h>
+#include <log.h>
#include <power/pmic.h>
#include <power/regulator.h>
#include <power/max77686_pmic.h>
diff --git a/drivers/power/pmic/muic_max8997.c b/drivers/power/pmic/muic_max8997.c
index 241ab35b63..969ce90239 100644
--- a/drivers/power/pmic/muic_max8997.c
+++ b/drivers/power/pmic/muic_max8997.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <log.h>
#include <power/pmic.h>
#include <power/power_chrg.h>
#include <power/max8997_muic.h>
diff --git a/drivers/power/pmic/palmas.c b/drivers/power/pmic/palmas.c
index 36be119b6c..6080cbff0b 100644
--- a/drivers/power/pmic/palmas.c
+++ b/drivers/power/pmic/palmas.c
@@ -9,6 +9,7 @@
#include <errno.h>
#include <dm.h>
#include <i2c.h>
+#include <log.h>
#include <power/pmic.h>
#include <power/regulator.h>
#include <power/palmas.h>
diff --git a/drivers/power/pmic/pca9450.c b/drivers/power/pmic/pca9450.c
index 77986c47d7..0c9d9a366e 100644
--- a/drivers/power/pmic/pca9450.c
+++ b/drivers/power/pmic/pca9450.c
@@ -8,6 +8,7 @@
#include <errno.h>
#include <dm.h>
#include <i2c.h>
+#include <log.h>
#include <power/pmic.h>
#include <power/regulator.h>
#include <power/pca9450.h>
diff --git a/drivers/power/pmic/pfuze100.c b/drivers/power/pmic/pfuze100.c
index db630f3ad0..65c4456977 100644
--- a/drivers/power/pmic/pfuze100.c
+++ b/drivers/power/pmic/pfuze100.c
@@ -9,6 +9,7 @@
#include <errno.h>
#include <dm.h>
#include <i2c.h>
+#include <log.h>
#include <power/pmic.h>
#include <power/regulator.h>
#include <power/pfuze100_pmic.h>
diff --git a/drivers/power/pmic/pmic-uclass.c b/drivers/power/pmic/pmic-uclass.c
index db68c766f5..7770171917 100644
--- a/drivers/power/pmic/pmic-uclass.c
+++ b/drivers/power/pmic/pmic-uclass.c
@@ -8,6 +8,7 @@
#include <fdtdec.h>
#include <errno.h>
#include <dm.h>
+#include <log.h>
#include <vsprintf.h>
#include <dm/lists.h>
#include <dm/device-internal.h>
diff --git a/drivers/power/pmic/pmic_hi6553.c b/drivers/power/pmic/pmic_hi6553.c
index 6443c9ffc9..80b9078cf8 100644
--- a/drivers/power/pmic/pmic_hi6553.c
+++ b/drivers/power/pmic/pmic_hi6553.c
@@ -5,6 +5,7 @@
*/
#include <asm/io.h>
#include <common.h>
+#include <linux/delay.h>
#include <power/pmic.h>
#include <power/max8997_muic.h>
#include <power/hi6553_pmic.h>
diff --git a/drivers/power/pmic/pmic_max8997.c b/drivers/power/pmic/pmic_max8997.c
index 87c438ea04..1d834ff713 100644
--- a/drivers/power/pmic/pmic_max8997.c
+++ b/drivers/power/pmic/pmic_max8997.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <log.h>
#include <power/pmic.h>
#include <power/max8997_pmic.h>
#include <i2c.h>
diff --git a/drivers/power/pmic/pmic_tps65910_dm.c b/drivers/power/pmic/pmic_tps65910_dm.c
index 489af59b41..e03ddc98d7 100644
--- a/drivers/power/pmic/pmic_tps65910_dm.c
+++ b/drivers/power/pmic/pmic_tps65910_dm.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <i2c.h>
+#include <log.h>
#include <power/pmic.h>
#include <power/regulator.h>
#include <power/tps65910_pmic.h>
diff --git a/drivers/power/pmic/rk8xx.c b/drivers/power/pmic/rk8xx.c
index 52e6d9d8c0..195884bde9 100644
--- a/drivers/power/pmic/rk8xx.c
+++ b/drivers/power/pmic/rk8xx.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <power/rk8xx_pmic.h>
#include <power/pmic.h>
diff --git a/drivers/power/pmic/rn5t567.c b/drivers/power/pmic/rn5t567.c
index f238396d36..d9a8298ebb 100644
--- a/drivers/power/pmic/rn5t567.c
+++ b/drivers/power/pmic/rn5t567.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <errno.h>
#include <fdtdec.h>
+#include <log.h>
#include <linux/libfdt.h>
#include <power/rn5t567_pmic.h>
#include <power/pmic.h>
diff --git a/drivers/power/pmic/s2mps11.c b/drivers/power/pmic/s2mps11.c
index f2aab6c457..1ba1640a8d 100644
--- a/drivers/power/pmic/s2mps11.c
+++ b/drivers/power/pmic/s2mps11.c
@@ -9,6 +9,7 @@
#include <errno.h>
#include <dm.h>
#include <i2c.h>
+#include <log.h>
#include <power/pmic.h>
#include <power/s2mps11.h>
diff --git a/drivers/power/pmic/s5m8767.c b/drivers/power/pmic/s5m8767.c
index b5ddd4930e..db6d0357ee 100644
--- a/drivers/power/pmic/s5m8767.c
+++ b/drivers/power/pmic/s5m8767.c
@@ -8,6 +8,7 @@
#include <errno.h>
#include <dm.h>
#include <i2c.h>
+#include <log.h>
#include <power/pmic.h>
#include <power/regulator.h>
#include <power/s5m8767.h>
diff --git a/drivers/power/pmic/tps65090.c b/drivers/power/pmic/tps65090.c
index 5b1d19f3e0..b81df0dff1 100644
--- a/drivers/power/pmic/tps65090.c
+++ b/drivers/power/pmic/tps65090.c
@@ -9,6 +9,7 @@
#include <errno.h>
#include <fdtdec.h>
#include <i2c.h>
+#include <log.h>
#include <power/pmic.h>
#include <power/tps65090.h>
diff --git a/drivers/power/pmic/tps65941.c b/drivers/power/pmic/tps65941.c
index 7b3416ae6e..3dfc1918d5 100644
--- a/drivers/power/pmic/tps65941.c
+++ b/drivers/power/pmic/tps65941.c
@@ -9,6 +9,7 @@
#include <errno.h>
#include <dm.h>
#include <i2c.h>
+#include <log.h>
#include <power/pmic.h>
#include <power/regulator.h>
#include <power/tps65941.h>
diff --git a/drivers/power/power_core.c b/drivers/power/power_core.c
index 095d8a51be..eeed8e24a9 100644
--- a/drivers/power/power_core.c
+++ b/drivers/power/power_core.c
@@ -10,6 +10,8 @@
*/
#include <common.h>
+#include <command.h>
+#include <log.h>
#include <malloc.h>
#include <linux/types.h>
#include <linux/list.h>
@@ -120,7 +122,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/power_dialog.c b/drivers/power/power_dialog.c
index 9ecd358100..e286dd108f 100644
--- a/drivers/power/power_dialog.c
+++ b/drivers/power/power_dialog.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <log.h>
#include <power/pmic.h>
#include <dialog_pmic.h>
#include <errno.h>
diff --git a/drivers/power/power_i2c.c b/drivers/power/power_i2c.c
index b30f223a5c..5a0455e119 100644
--- a/drivers/power/power_i2c.c
+++ b/drivers/power/power_i2c.c
@@ -11,6 +11,7 @@
*/
#include <common.h>
+#include <log.h>
#include <linux/types.h>
#include <power/pmic.h>
#include <i2c.h>
diff --git a/drivers/power/regulator/as3722_regulator.c b/drivers/power/regulator/as3722_regulator.c
index a0703c9e05..0fee9bf00b 100644
--- a/drivers/power/regulator/as3722_regulator.c
+++ b/drivers/power/regulator/as3722_regulator.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <power/as3722.h>
#include <power/pmic.h>
#include <power/regulator.h>
diff --git a/drivers/power/regulator/bd71837.c b/drivers/power/regulator/bd71837.c
index 575429aa2d..931d753e34 100644
--- a/drivers/power/regulator/bd71837.c
+++ b/drivers/power/regulator/bd71837.c
@@ -7,6 +7,8 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
+#include <linux/bitops.h>
#include <power/bd71837.h>
#include <power/pmic.h>
#include <power/regulator.h>
diff --git a/drivers/power/regulator/da9063.c b/drivers/power/regulator/da9063.c
index 8990be113e..5055e39cb7 100644
--- a/drivers/power/regulator/da9063.c
+++ b/drivers/power/regulator/da9063.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
+#include <linux/bitops.h>
#include <power/da9063_pmic.h>
#include <power/pmic.h>
#include <power/regulator.h>
diff --git a/drivers/power/regulator/fan53555.c b/drivers/power/regulator/fan53555.c
index 24a9b67586..b407f555fe 100644
--- a/drivers/power/regulator/fan53555.c
+++ b/drivers/power/regulator/fan53555.c
@@ -9,7 +9,9 @@
#include <dm.h>
#include <fdtdec.h>
#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/fixed.c b/drivers/power/regulator/fixed.c
index 763e671d54..f9f9659621 100644
--- a/drivers/power/regulator/fixed.c
+++ b/drivers/power/regulator/fixed.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <errno.h>
#include <dm.h>
+#include <log.h>
#include <power/pmic.h>
#include <power/regulator.h>
diff --git a/drivers/power/regulator/gpio-regulator.c b/drivers/power/regulator/gpio-regulator.c
index ec1dcb64b3..cf3fbae79d 100644
--- a/drivers/power/regulator/gpio-regulator.c
+++ b/drivers/power/regulator/gpio-regulator.c
@@ -10,6 +10,7 @@
#include <errno.h>
#include <dm.h>
#include <i2c.h>
+#include <log.h>
#include <asm/gpio.h>
#include <power/pmic.h>
#include <power/regulator.h>
diff --git a/drivers/power/regulator/lp87565_regulator.c b/drivers/power/regulator/lp87565_regulator.c
index f438dea8fc..4ea6c346d7 100644
--- a/drivers/power/regulator/lp87565_regulator.c
+++ b/drivers/power/regulator/lp87565_regulator.c
@@ -11,6 +11,7 @@
#include <errno.h>
#include <dm.h>
#include <i2c.h>
+#include <log.h>
#include <power/pmic.h>
#include <power/regulator.h>
#include <power/lp87565.h>
diff --git a/drivers/power/regulator/pbias_regulator.c b/drivers/power/regulator/pbias_regulator.c
index 60255eeab0..28a9a1470b 100644
--- a/drivers/power/regulator/pbias_regulator.c
+++ b/drivers/power/regulator/pbias_regulator.c
@@ -7,6 +7,8 @@
#include <common.h>
#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/pfuze100.c b/drivers/power/regulator/pfuze100.c
index d6d35f3a39..b56843046f 100644
--- a/drivers/power/regulator/pfuze100.c
+++ b/drivers/power/regulator/pfuze100.c
@@ -10,6 +10,7 @@
#include <errno.h>
#include <dm.h>
#include <i2c.h>
+#include <log.h>
#include <power/pmic.h>
#include <power/regulator.h>
#include <power/pfuze100_pmic.h>
diff --git a/drivers/power/regulator/pwm_regulator.c b/drivers/power/regulator/pwm_regulator.c
index 4030144dd3..f870622705 100644
--- a/drivers/power/regulator/pwm_regulator.c
+++ b/drivers/power/regulator/pwm_regulator.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <pwm.h>
#include <dm/device_compat.h>
#include <power/regulator.h>
diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/regulator/regulator-uclass.c
index c9d26344d7..7dcb317192 100644
--- a/drivers/power/regulator/regulator-uclass.c
+++ b/drivers/power/regulator/regulator-uclass.c
@@ -7,7 +7,9 @@
#include <common.h>
#include <errno.h>
#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 33b73b7c2f..16d9412cd5 100644
--- a/drivers/power/regulator/regulator_common.c
+++ b/drivers/power/regulator/regulator_common.c
@@ -6,6 +6,8 @@
#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/rk8xx.c b/drivers/power/regulator/rk8xx.c
index e99331f6c9..a08e2151f9 100644
--- a/drivers/power/regulator/rk8xx.c
+++ b/drivers/power/regulator/rk8xx.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <power/rk8xx_pmic.h>
#include <power/pmic.h>
#include <power/regulator.h>
diff --git a/drivers/power/regulator/s2mps11_regulator.c b/drivers/power/regulator/s2mps11_regulator.c
index 67d1f9689d..a6b4f158ef 100644
--- a/drivers/power/regulator/s2mps11_regulator.c
+++ b/drivers/power/regulator/s2mps11_regulator.c
@@ -9,6 +9,7 @@
#include <errno.h>
#include <dm.h>
#include <i2c.h>
+#include <linux/delay.h>
#include <power/pmic.h>
#include <power/regulator.h>
#include <power/s2mps11.h>
diff --git a/drivers/power/regulator/stm32-vrefbuf.c b/drivers/power/regulator/stm32-vrefbuf.c
index 08a10f05b4..250773514f 100644
--- a/drivers/power/regulator/stm32-vrefbuf.c
+++ b/drivers/power/regulator/stm32-vrefbuf.c
@@ -11,6 +11,7 @@
#include <dm.h>
#include <asm/io.h>
#include <dm/device_compat.h>
+#include <linux/bitops.h>
#include <linux/iopoll.h>
#include <linux/kernel.h>
#include <power/regulator.h>
diff --git a/drivers/power/regulator/stpmic1.c b/drivers/power/regulator/stpmic1.c
index 1e3f96f3a0..3e342f4808 100644
--- a/drivers/power/regulator/stpmic1.c
+++ b/drivers/power/regulator/stpmic1.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <linux/delay.h>
#include <power/pmic.h>
#include <power/regulator.h>
#include <power/stpmic1.h>
diff --git a/drivers/power/regulator/tps65090_regulator.c b/drivers/power/regulator/tps65090_regulator.c
index 0bcf1a61ea..9e45627a74 100644
--- a/drivers/power/regulator/tps65090_regulator.c
+++ b/drivers/power/regulator/tps65090_regulator.c
@@ -6,6 +6,8 @@
#include <common.h>
#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/tps65910_regulator.c b/drivers/power/regulator/tps65910_regulator.c
index 12e66ebd43..171afd34a5 100644
--- a/drivers/power/regulator/tps65910_regulator.c
+++ b/drivers/power/regulator/tps65910_regulator.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <power/pmic.h>
#include <power/regulator.h>
#include <power/tps65910_pmic.h>
diff --git a/drivers/power/regulator/tps65941_regulator.c b/drivers/power/regulator/tps65941_regulator.c
index a00ef58129..150c72d7ec 100644
--- a/drivers/power/regulator/tps65941_regulator.c
+++ b/drivers/power/regulator/tps65941_regulator.c
@@ -11,6 +11,8 @@
#include <errno.h>
#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 19680e2e76..49b28a5e6b 100644
--- a/drivers/power/tps6586x.c
+++ b/drivers/power/tps6586x.c
@@ -5,9 +5,11 @@
*/
#include <common.h>
+#include <log.h>
#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 42c9001518..b0d5cba2c4 100644
--- a/drivers/power/twl4030.c
+++ b/drivers/power/twl4030.c
@@ -22,7 +22,9 @@
* Syed Mohammed Khasim <khasim at ti.com>
*/
+#include <command.h>
#include <twl4030.h>
+#include <linux/delay.h>
/*
* Power Reset
@@ -172,7 +174,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/power/twl6030.c b/drivers/power/twl6030.c
index 103960d48d..60a5aaaf19 100644
--- a/drivers/power/twl6030.c
+++ b/drivers/power/twl6030.c
@@ -4,6 +4,7 @@
* Texas Instruments, <www.ti.com>
*/
#include <config.h>
+#include <linux/delay.h>
#include <twl6030.h>
diff --git a/drivers/pwm/exynos_pwm.c b/drivers/pwm/exynos_pwm.c
index 1c829d286b..fed1583796 100644
--- a/drivers/pwm/exynos_pwm.c
+++ b/drivers/pwm/exynos_pwm.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <pwm.h>
#include <asm/io.h>
#include <asm/arch/clk.h>
diff --git a/drivers/pwm/pwm-imx.c b/drivers/pwm/pwm-imx.c
index 8d8f3e6f9f..f5b9544cb8 100644
--- a/drivers/pwm/pwm-imx.c
+++ b/drivers/pwm/pwm-imx.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <div64.h>
#include <dm.h>
+#include <log.h>
#include <pwm.h>
#include <asm/arch/imx-regs.h>
#include <asm/io.h>
diff --git a/drivers/pwm/rk_pwm.c b/drivers/pwm/rk_pwm.c
index 46888e9077..911da1d426 100644
--- a/drivers/pwm/rk_pwm.c
+++ b/drivers/pwm/rk_pwm.c
@@ -8,11 +8,13 @@
#include <clk.h>
#include <div64.h>
#include <dm.h>
+#include <log.h>
#include <pwm.h>
#include <regmap.h>
#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/pwm/sunxi_pwm.c b/drivers/pwm/sunxi_pwm.c
index 8a55e4f461..56215dbf6c 100644
--- a/drivers/pwm/sunxi_pwm.c
+++ b/drivers/pwm/sunxi_pwm.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <div64.h>
#include <dm.h>
+#include <log.h>
#include <pwm.h>
#include <regmap.h>
#include <syscon.h>
diff --git a/drivers/pwm/tegra_pwm.c b/drivers/pwm/tegra_pwm.c
index 02c3650ec6..5e98d0fc2c 100644
--- a/drivers/pwm/tegra_pwm.c
+++ b/drivers/pwm/tegra_pwm.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <pwm.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
diff --git a/drivers/qe/qe.c b/drivers/qe/qe.c
index fbad124b51..61ca4760c8 100644
--- a/drivers/qe/qe.c
+++ b/drivers/qe/qe.c
@@ -781,7 +781,7 @@ struct qe_firmware_info *qe_get_firmware_info(void)
return qe_firmware_uploaded ? &qe_firmware_info : NULL;
}
-static int qe_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int qe_cmd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
ulong addr;
diff --git a/drivers/qe/uec.c b/drivers/qe/uec.c
index 69cdf9444a..849f191d6d 100644
--- a/drivers/qe/uec.c
+++ b/drivers/qe/uec.c
@@ -6,8 +6,10 @@
*/
#include <common.h>
+#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 9425379794..69c22dd5e2 100644
--- a/drivers/qe/uec_phy.c
+++ b/drivers/qe/uec_phy.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <net.h>
#include <malloc.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/immap_qe.h>
#include <asm/io.h>
@@ -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 ac15e94f00..765a2141d1 100644
--- a/drivers/ram/imxrt_sdram.c
+++ b/drivers/ram/imxrt_sdram.c
@@ -7,8 +7,12 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#include <init.h>
+#include <log.h>
#include <ram.h>
#include <asm/io.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <linux/err.h>
/* SDRAM Command Code */
diff --git a/drivers/ram/k3-am654-ddrss.c b/drivers/ram/k3-am654-ddrss.c
index 8cf74861a8..8bbd8cfa83 100644
--- a/drivers/ram/k3-am654-ddrss.c
+++ b/drivers/ram/k3-am654-ddrss.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#include <log.h>
#include <ram.h>
#include <asm/io.h>
#include <power-domain.h>
diff --git a/drivers/ram/k3-am654-ddrss.h b/drivers/ram/k3-am654-ddrss.h
index 94a7c91b2b..c87f186291 100644
--- a/drivers/ram/k3-am654-ddrss.h
+++ b/drivers/ram/k3-am654-ddrss.h
@@ -11,6 +11,7 @@
#define __K3_AM654_DDRSS_H
/* DDRSS subsystem wrapper logic registers */
+#include <linux/bitops.h>
#define DDRSS_SS_ID_REV_REG 0x00000000
#define DDRSS_SS_CTL_REG 0x00000004
#define DDRSS_V2H_CTL_REG 0x00000020
diff --git a/drivers/ram/k3-j721e/k3-j721e-ddrss.c b/drivers/ram/k3-j721e/k3-j721e-ddrss.c
index 352483c4d7..d647a8a209 100644
--- a/drivers/ram/k3-j721e/k3-j721e-ddrss.c
+++ b/drivers/ram/k3-j721e/k3-j721e-ddrss.c
@@ -9,6 +9,7 @@
#include <clk.h>
#include <dm.h>
#include <hang.h>
+#include <log.h>
#include <ram.h>
#include <asm/io.h>
#include <power-domain.h>
diff --git a/drivers/ram/mediatek/ddr3-mt7629.c b/drivers/ram/mediatek/ddr3-mt7629.c
index b413f499d0..b3a68cb078 100644
--- a/drivers/ram/mediatek/ddr3-mt7629.c
+++ b/drivers/ram/mediatek/ddr3-mt7629.c
@@ -12,6 +12,8 @@
#include <dm.h>
#include <ram.h>
#include <asm/io.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
/* EMI */
#define EMI_CONA 0x000
diff --git a/drivers/ram/mpc83xx_sdram.c b/drivers/ram/mpc83xx_sdram.c
index 46449d3d12..a226bac2cc 100644
--- a/drivers/ram/mpc83xx_sdram.c
+++ b/drivers/ram/mpc83xx_sdram.c
@@ -7,7 +7,9 @@
#include <common.h>
#include <dm.h>
#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 2d82a176db..92457a1fa4 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>
@@ -19,6 +20,8 @@
#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>
struct dram_info {
diff --git a/drivers/ram/rockchip/sdram_pctl_px30.c b/drivers/ram/rockchip/sdram_pctl_px30.c
index 1839cebb67..331d85fba2 100644
--- a/drivers/ram/rockchip/sdram_pctl_px30.c
+++ b/drivers/ram/rockchip/sdram_pctl_px30.c
@@ -8,6 +8,7 @@
#include <asm/io.h>
#include <asm/arch-rockchip/sdram.h>
#include <asm/arch-rockchip/sdram_pctl_px30.h>
+#include <linux/delay.h>
/*
* rank = 1: cs0
diff --git a/drivers/ram/rockchip/sdram_phy_px30.c b/drivers/ram/rockchip/sdram_phy_px30.c
index 5de73770a8..f7f6de1ba9 100644
--- a/drivers/ram/rockchip/sdram_phy_px30.c
+++ b/drivers/ram/rockchip/sdram_phy_px30.c
@@ -9,6 +9,7 @@
#include <asm/arch-rockchip/sdram.h>
#include <asm/arch-rockchip/sdram_common.h>
#include <asm/arch-rockchip/sdram_phy_px30.h>
+#include <linux/delay.h>
static void sdram_phy_dll_bypass_set(void __iomem *phy_base, u32 freq)
{
diff --git a/drivers/ram/rockchip/sdram_px30.c b/drivers/ram/rockchip/sdram_px30.c
index 729255493a..fd5763d0a0 100644
--- a/drivers/ram/rockchip/sdram_px30.c
+++ b/drivers/ram/rockchip/sdram_px30.c
@@ -6,6 +6,8 @@
#include <common.h>
#include <debug_uart.h>
#include <dm.h>
+#include <init.h>
+#include <log.h>
#include <ram.h>
#include <syscon.h>
#include <asm/io.h>
@@ -15,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_rk3128.c b/drivers/ram/rockchip/sdram_rk3128.c
index 8486653c6f..0162955aae 100644
--- a/drivers/ram/rockchip/sdram_rk3128.c
+++ b/drivers/ram/rockchip/sdram_rk3128.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <ram.h>
#include <syscon.h>
#include <asm/arch-rockchip/clock.h>
diff --git a/drivers/ram/rockchip/sdram_rk3188.c b/drivers/ram/rockchip/sdram_rk3188.c
index 9b5eb38ecc..7aedb4fbac 100644
--- a/drivers/ram/rockchip/sdram_rk3188.c
+++ b/drivers/ram/rockchip/sdram_rk3188.c
@@ -12,6 +12,8 @@
#include <dt-structs.h>
#include <errno.h>
#include <hang.h>
+#include <init.h>
+#include <log.h>
#include <ram.h>
#include <regmap.h>
#include <syscon.h>
@@ -23,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 223f048161..094693ce24 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>
@@ -19,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 9f6f555147..64d704ef26 100644
--- a/drivers/ram/rockchip/sdram_rk3288.c
+++ b/drivers/ram/rockchip/sdram_rk3288.c
@@ -12,6 +12,8 @@
#include <dt-structs.h>
#include <errno.h>
#include <hang.h>
+#include <init.h>
+#include <log.h>
#include <ram.h>
#include <regmap.h>
#include <syscon.h>
@@ -23,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 8329f4a352..3f3926f9e4 100644
--- a/drivers/ram/rockchip/sdram_rk3328.c
+++ b/drivers/ram/rockchip/sdram_rk3328.c
@@ -7,6 +7,8 @@
#include <debug_uart.h>
#include <dm.h>
#include <dt-structs.h>
+#include <init.h>
+#include <log.h>
#include <ram.h>
#include <regmap.h>
#include <syscon.h>
@@ -17,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 d69ef01d08..60a1ab8b51 100644
--- a/drivers/ram/rockchip/sdram_rk3399.c
+++ b/drivers/ram/rockchip/sdram_rk3399.c
@@ -9,6 +9,8 @@
#include <clk.h>
#include <dm.h>
#include <dt-structs.h>
+#include <init.h>
+#include <log.h>
#include <ram.h>
#include <regmap.h>
#include <syscon.h>
@@ -20,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 2d03333b1b..3fddf4df96 100644
--- a/drivers/ram/stm32_sdram.c
+++ b/drivers/ram/stm32_sdram.c
@@ -7,9 +7,13 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#include <init.h>
+#include <log.h>
#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)
#define SWP_FMC_OFFSET 10
diff --git a/drivers/ram/stm32mp1/stm32mp1_ddr.c b/drivers/ram/stm32mp1/stm32mp1_ddr.c
index 11b14ae652..bf3a4c97a4 100644
--- a/drivers/ram/stm32mp1/stm32mp1_ddr.c
+++ b/drivers/ram/stm32mp1/stm32mp1_ddr.c
@@ -5,11 +5,14 @@
#include <common.h>
#include <clk.h>
+#include <log.h>
#include <ram.h>
#include <reset.h>
#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"
#include "stm32mp1_ddr_regs.h"
diff --git a/drivers/ram/stm32mp1/stm32mp1_ddr_regs.h b/drivers/ram/stm32mp1/stm32mp1_ddr_regs.h
index afd93c518e..3c8885a965 100644
--- a/drivers/ram/stm32mp1/stm32mp1_ddr_regs.h
+++ b/drivers/ram/stm32mp1/stm32mp1_ddr_regs.h
@@ -7,6 +7,7 @@
#define _RAM_STM32MP1_DDR_REGS_H
/* DDR3/LPDDR2/LPDDR3 Controller (DDRCTRL) registers */
+#include <linux/bitops.h>
struct stm32mp1_ddrctl {
u32 mstr ; /* 0x0 Master*/
u32 stat; /* 0x4 Operating Mode Status*/
diff --git a/drivers/ram/stm32mp1/stm32mp1_interactive.c b/drivers/ram/stm32mp1/stm32mp1_interactive.c
index 805c9ddaad..38390c0d55 100644
--- a/drivers/ram/stm32mp1/stm32mp1_interactive.c
+++ b/drivers/ram/stm32mp1/stm32mp1_interactive.c
@@ -4,9 +4,11 @@
*/
#include <common.h>
+#include <command.h>
#include <console.h>
#include <cli.h>
#include <clk.h>
+#include <log.h>
#include <malloc.h>
#include <ram.h>
#include <reset.h>
@@ -150,7 +152,7 @@ static bool stm32mp1_check_step(enum stm32mp1_ddr_interact_step step,
static void stm32mp1_do_info(struct ddr_info *priv,
struct stm32mp1_ddr_config *config,
enum stm32mp1_ddr_interact_step step,
- int argc, char * const argv[])
+ int argc, char *const argv[])
{
unsigned long value;
static char *ddr_name;
@@ -223,7 +225,7 @@ static void stm32mp1_do_info(struct ddr_info *priv,
}
static bool stm32mp1_do_freq(struct ddr_info *priv,
- int argc, char * const argv[])
+ int argc, char *const argv[])
{
unsigned long ddrphy_clk;
@@ -246,7 +248,7 @@ static bool stm32mp1_do_freq(struct ddr_info *priv,
static void stm32mp1_do_param(enum stm32mp1_ddr_interact_step step,
const struct stm32mp1_ddr_config *config,
- int argc, char * const argv[])
+ int argc, char *const argv[])
{
switch (argc) {
case 1:
@@ -266,7 +268,7 @@ static void stm32mp1_do_param(enum stm32mp1_ddr_interact_step step,
}
static void stm32mp1_do_print(struct ddr_info *priv,
- int argc, char * const argv[])
+ int argc, char *const argv[])
{
switch (argc) {
case 1:
@@ -281,7 +283,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/ram/stm32mp1/stm32mp1_ram.c b/drivers/ram/stm32mp1/stm32mp1_ram.c
index 8bcd861261..9022679703 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 12298cf327..bacdd74705 100644
--- a/drivers/ram/stm32mp1/stm32mp1_tests.c
+++ b/drivers/ram/stm32mp1/stm32mp1_tests.c
@@ -5,6 +5,8 @@
#include <common.h>
#include <console.h>
#include <init.h>
+#include <log.h>
+#include <rand.h>
#include <watchdog.h>
#include <asm/io.h>
#include <linux/log2.h>
diff --git a/drivers/ram/stm32mp1/stm32mp1_tuning.c b/drivers/ram/stm32mp1/stm32mp1_tuning.c
index 3013b7b667..a8d6892bb0 100644
--- a/drivers/ram/stm32mp1/stm32mp1_tuning.c
+++ b/drivers/ram/stm32mp1/stm32mp1_tuning.c
@@ -5,10 +5,13 @@
#include <common.h>
#include <console.h>
#include <clk.h>
+#include <log.h>
#include <ram.h>
+#include <rand.h>
#include <reset.h>
#include <asm/io.h>
#include <linux/bitops.h>
+#include <linux/delay.h>
#include <linux/iopoll.h>
#include "stm32mp1_ddr_regs.h"
diff --git a/drivers/remoteproc/k3_system_controller.c b/drivers/remoteproc/k3_system_controller.c
index 88430299c9..54209fccb3 100644
--- a/drivers/remoteproc/k3_system_controller.c
+++ b/drivers/remoteproc/k3_system_controller.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <remoteproc.h>
#include <errno.h>
#include <mailbox.h>
diff --git a/drivers/remoteproc/rproc-elf-loader.c b/drivers/remoteproc/rproc-elf-loader.c
index f2e033aa74..c464ecebb7 100644
--- a/drivers/remoteproc/rproc-elf-loader.c
+++ b/drivers/remoteproc/rproc-elf-loader.c
@@ -6,7 +6,9 @@
#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>
#include <linux/compat.h>
diff --git a/drivers/remoteproc/rproc-uclass.c b/drivers/remoteproc/rproc-uclass.c
index c8a41a6332..9640a81e53 100644
--- a/drivers/remoteproc/rproc-uclass.c
+++ b/drivers/remoteproc/rproc-uclass.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <errno.h>
#include <fdtdec.h>
+#include <log.h>
#include <malloc.h>
#include <remoteproc.h>
#include <asm/io.h>
diff --git a/drivers/remoteproc/sandbox_testproc.c b/drivers/remoteproc/sandbox_testproc.c
index eeee49c4dd..2b58b27947 100644
--- a/drivers/remoteproc/sandbox_testproc.c
+++ b/drivers/remoteproc/sandbox_testproc.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <remoteproc.h>
#include <asm/io.h>
diff --git a/drivers/remoteproc/stm32_copro.c b/drivers/remoteproc/stm32_copro.c
index e9dce0d173..33b574b1bd 100644
--- a/drivers/remoteproc/stm32_copro.c
+++ b/drivers/remoteproc/stm32_copro.c
@@ -7,6 +7,7 @@
#include <dm.h>
#include <errno.h>
#include <fdtdec.h>
+#include <log.h>
#include <regmap.h>
#include <remoteproc.h>
#include <reset.h>
diff --git a/drivers/remoteproc/ti_k3_dsp_rproc.c b/drivers/remoteproc/ti_k3_dsp_rproc.c
index 1fc8193ad9..3361555c53 100644
--- a/drivers/remoteproc/ti_k3_dsp_rproc.c
+++ b/drivers/remoteproc/ti_k3_dsp_rproc.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <remoteproc.h>
#include <errno.h>
diff --git a/drivers/remoteproc/ti_k3_r5f_rproc.c b/drivers/remoteproc/ti_k3_r5f_rproc.c
index c01b29d90f..1a7f1f8a00 100644
--- a/drivers/remoteproc/ti_k3_r5f_rproc.c
+++ b/drivers/remoteproc/ti_k3_r5f_rproc.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <remoteproc.h>
#include <errno.h>
diff --git a/drivers/remoteproc/ti_power_proc.c b/drivers/remoteproc/ti_power_proc.c
index f9660d4511..350450d1fb 100644
--- a/drivers/remoteproc/ti_power_proc.c
+++ b/drivers/remoteproc/ti_power_proc.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <errno.h>
#include <fdtdec.h>
+#include <log.h>
#include <remoteproc.h>
#include <mach/psc_defs.h>
diff --git a/drivers/reset/ast2500-reset.c b/drivers/reset/ast2500-reset.c
index d1d44f3728..beb5cd8fa8 100644
--- a/drivers/reset/ast2500-reset.c
+++ b/drivers/reset/ast2500-reset.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <misc.h>
#include <reset.h>
#include <reset-uclass.h>
diff --git a/drivers/reset/reset-bcm6345.c b/drivers/reset/reset-bcm6345.c
index c1f1e7f70b..156703e084 100644
--- a/drivers/reset/reset-bcm6345.c
+++ b/drivers/reset/reset-bcm6345.c
@@ -9,9 +9,12 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#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 a678b8f745..139bc5d73e 100644
--- a/drivers/reset/reset-hisilicon.c
+++ b/drivers/reset/reset-hisilicon.c
@@ -3,12 +3,14 @@
* Copyright (c) 2019, Linaro Limited
*/
+#include <log.h>
#include <malloc.h>
#include <asm/io.h>
#include <common.h>
#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 f9a432a7a2..0c8f276293 100644
--- a/drivers/reset/reset-hsdk.c
+++ b/drivers/reset/reset-hsdk.c
@@ -6,9 +6,11 @@
* Author: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
*/
+#include <log.h>
#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 a61855e9ed..96916b644a 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>
@@ -10,6 +11,8 @@
#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 {
void __iomem *base;
diff --git a/drivers/reset/reset-mediatek.c b/drivers/reset/reset-mediatek.c
index 6d17f52ac7..97d3d57592 100644
--- a/drivers/reset/reset-mediatek.c
+++ b/drivers/reset/reset-mediatek.c
@@ -8,11 +8,13 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <dm/lists.h>
#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 70f96355b3..4e3327898e 100644
--- a/drivers/reset/reset-meson.c
+++ b/drivers/reset/reset-meson.c
@@ -8,9 +8,11 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#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 677de0a6f9..bc20e3335c 100644
--- a/drivers/reset/reset-mtmips.c
+++ b/drivers/reset/reset-mtmips.c
@@ -8,8 +8,10 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#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 100afc8103..8092555650 100644
--- a/drivers/reset/reset-rockchip.c
+++ b/drivers/reset/reset-rockchip.c
@@ -5,8 +5,10 @@
#include <common.h>
#include <dm.h>
+#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-socfpga.c b/drivers/reset/reset-socfpga.c
index c0930a624b..830eda9430 100644
--- a/drivers/reset/reset-socfpga.c
+++ b/drivers/reset/reset-socfpga.c
@@ -14,6 +14,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <dm/lists.h>
#include <dm/of_access.h>
diff --git a/drivers/reset/reset-sunxi.c b/drivers/reset/reset-sunxi.c
index f21bf3b1ae..05f7f599ce 100644
--- a/drivers/reset/reset-sunxi.c
+++ b/drivers/reset/reset-sunxi.c
@@ -7,10 +7,12 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#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/reset-ti-sci.c b/drivers/reset/reset-ti-sci.c
index f5d82b5681..95cd388587 100644
--- a/drivers/reset/reset-ti-sci.c
+++ b/drivers/reset/reset-ti-sci.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include <reset-uclass.h>
#include <dm/device_compat.h>
diff --git a/drivers/reset/reset-uclass.c b/drivers/reset/reset-uclass.c
index 8ec8e462e6..5e38ce5c06 100644
--- a/drivers/reset/reset-uclass.c
+++ b/drivers/reset/reset-uclass.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <fdtdec.h>
+#include <log.h>
#include <malloc.h>
#include <reset.h>
#include <reset-uclass.h>
diff --git a/drivers/reset/reset-uniphier.c b/drivers/reset/reset-uniphier.c
index 348f3886d1..06079d2a9c 100644
--- a/drivers/reset/reset-uniphier.c
+++ b/drivers/reset/reset-uniphier.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <reset-uclass.h>
#include <dm/device_compat.h>
diff --git a/drivers/reset/sandbox-reset-test.c b/drivers/reset/sandbox-reset-test.c
index ae79be0730..9bc4a7e0de 100644
--- a/drivers/reset/sandbox-reset-test.c
+++ b/drivers/reset/sandbox-reset-test.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <reset.h>
#include <asm/io.h>
diff --git a/drivers/reset/sandbox-reset.c b/drivers/reset/sandbox-reset.c
index bdf53a3de9..7a6f7f676c 100644
--- a/drivers/reset/sandbox-reset.c
+++ b/drivers/reset/sandbox-reset.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <reset-uclass.h>
#include <asm/io.h>
diff --git a/drivers/reset/sti-reset.c b/drivers/reset/sti-reset.c
index 31b3e48e0e..ac3a99f9bf 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>
@@ -13,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 5dda522a4e..64a11cfcfc 100644
--- a/drivers/reset/stm32-reset.c
+++ b/drivers/reset/stm32-reset.c
@@ -7,10 +7,12 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#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/reset/tegra-car-reset.c b/drivers/reset/tegra-car-reset.c
index 23c6facff2..a33d4533a8 100644
--- a/drivers/reset/tegra-car-reset.c
+++ b/drivers/reset/tegra-car-reset.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <reset-uclass.h>
#include <asm/arch/clock.h>
diff --git a/drivers/reset/tegra186-reset.c b/drivers/reset/tegra186-reset.c
index e85f42b3a3..c60a03f0bf 100644
--- a/drivers/reset/tegra186-reset.c
+++ b/drivers/reset/tegra186-reset.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <misc.h>
#include <reset-uclass.h>
diff --git a/drivers/rng/rockchip_rng.c b/drivers/rng/rockchip_rng.c
index 47fb140077..c6a834b67c 100644
--- a/drivers/rng/rockchip_rng.c
+++ b/drivers/rng/rockchip_rng.c
@@ -6,6 +6,7 @@
#include <asm/io.h>
#include <common.h>
#include <dm.h>
+#include <linux/bitops.h>
#include <linux/iopoll.h>
#include <linux/string.h>
#include <rng.h>
diff --git a/drivers/rng/sandbox_rng.c b/drivers/rng/sandbox_rng.c
index cd0b0ac77b..cc5e1f6e25 100644
--- a/drivers/rng/sandbox_rng.c
+++ b/drivers/rng/sandbox_rng.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <rand.h>
#include <rng.h>
#include <linux/string.h>
diff --git a/drivers/rng/stm32mp1_rng.c b/drivers/rng/stm32mp1_rng.c
index e0f0a66c6e..7ef7ff9756 100644
--- a/drivers/rng/stm32mp1_rng.c
+++ b/drivers/rng/stm32mp1_rng.c
@@ -6,8 +6,11 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#include <log.h>
#include <reset.h>
#include <rng.h>
+#include <linux/bitops.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 b6930bd839..c446e7a735 100644
--- a/drivers/rtc/davinci.c
+++ b/drivers/rtc/davinci.c
@@ -5,9 +5,11 @@
*/
#include <common.h>
#include <command.h>
+#include <log.h>
#include <rtc.h>
#include <asm/io.h>
#include <asm/davinci_rtc.h>
+#include <linux/delay.h>
int rtc_get(struct rtc_time *tmp)
{
diff --git a/drivers/rtc/ds1302.c b/drivers/rtc/ds1302.c
index b94163f748..189607c3e0 100644
--- a/drivers/rtc/ds1302.c
+++ b/drivers/rtc/ds1302.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <command.h>
#include <rtc.h>
+#include <linux/delay.h>
/* GPP Pins */
#define DATA 0x200
diff --git a/drivers/rtc/ds1306.c b/drivers/rtc/ds1306.c
index 02d617e09c..36d615812b 100644
--- a/drivers/rtc/ds1306.c
+++ b/drivers/rtc/ds1306.c
@@ -18,6 +18,7 @@
#include <command.h>
#include <rtc.h>
#include <spi.h>
+#include <linux/delay.h>
#define RTC_SECONDS 0x00
#define RTC_MINUTES 0x01
@@ -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/ds1307.c b/drivers/rtc/ds1307.c
index a33f47525f..17344d4d4f 100644
--- a/drivers/rtc/ds1307.c
+++ b/drivers/rtc/ds1307.c
@@ -16,6 +16,7 @@
#include <common.h>
#include <command.h>
#include <dm.h>
+#include <log.h>
#include <rtc.h>
#include <i2c.h>
diff --git a/drivers/rtc/ds1337.c b/drivers/rtc/ds1337.c
index af94bcfdf4..4986c96f86 100644
--- a/drivers/rtc/ds1337.c
+++ b/drivers/rtc/ds1337.c
@@ -14,6 +14,7 @@
#include <common.h>
#include <command.h>
#include <dm.h>
+#include <log.h>
#include <rtc.h>
#include <i2c.h>
diff --git a/drivers/rtc/ds3231.c b/drivers/rtc/ds3231.c
index eb5ce73a76..5b72e86768 100644
--- a/drivers/rtc/ds3231.c
+++ b/drivers/rtc/ds3231.c
@@ -17,6 +17,7 @@
#include <common.h>
#include <command.h>
#include <dm.h>
+#include <log.h>
#include <rtc.h>
#include <i2c.h>
diff --git a/drivers/rtc/ds3232.c b/drivers/rtc/ds3232.c
index e3b3579c4a..0a30e0eabb 100644
--- a/drivers/rtc/ds3232.c
+++ b/drivers/rtc/ds3232.c
@@ -9,6 +9,7 @@
#include <i2c.h>
#include <rtc.h>
#include <dm/device_compat.h>
+#include <linux/bitops.h>
/*
* RTC register addresses
diff --git a/drivers/rtc/ftrtc010.c b/drivers/rtc/ftrtc010.c
index b68ea223f7..67c2b6e320 100644
--- a/drivers/rtc/ftrtc010.c
+++ b/drivers/rtc/ftrtc010.c
@@ -8,6 +8,7 @@
#include <config.h>
#include <common.h>
+#include <log.h>
#include <rtc.h>
#include <asm/io.h>
diff --git a/drivers/rtc/i2c_rtc_emul.c b/drivers/rtc/i2c_rtc_emul.c
index d4b33e59d6..a010af411b 100644
--- a/drivers/rtc/i2c_rtc_emul.c
+++ b/drivers/rtc/i2c_rtc_emul.c
@@ -16,6 +16,7 @@
#include <common.h>
#include <dm.h>
#include <i2c.h>
+#include <log.h>
#include <os.h>
#include <rtc.h>
#include <asm/rtc.h>
diff --git a/drivers/rtc/imxdi.c b/drivers/rtc/imxdi.c
index 39920f1a7a..e3a1393266 100644
--- a/drivers/rtc/imxdi.c
+++ b/drivers/rtc/imxdi.c
@@ -16,6 +16,7 @@
#include <command.h>
#include <linux/compat.h>
#include <rtc.h>
+#include <linux/delay.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
diff --git a/drivers/rtc/m41t11.c b/drivers/rtc/m41t11.c
index 960348bb3e..706b7188cf 100644
--- a/drivers/rtc/m41t11.c
+++ b/drivers/rtc/m41t11.c
@@ -13,6 +13,7 @@
#include <common.h>
#include <command.h>
+#include <log.h>
#include <rtc.h>
#include <i2c.h>
@@ -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 532d2105e1..692042b935 100644
--- a/drivers/rtc/m41t60.c
+++ b/drivers/rtc/m41t60.c
@@ -18,6 +18,7 @@
#include <common.h>
#include <command.h>
#include <env.h>
+#include <log.h>
#include <rtc.h>
#include <i2c.h>
diff --git a/drivers/rtc/m41t62.c b/drivers/rtc/m41t62.c
index f52e1291a9..94a6b523aa 100644
--- a/drivers/rtc/m41t62.c
+++ b/drivers/rtc/m41t62.c
@@ -19,6 +19,7 @@
#include <common.h>
#include <command.h>
#include <dm.h>
+#include <log.h>
#include <rtc.h>
#include <i2c.h>
diff --git a/drivers/rtc/max6900.c b/drivers/rtc/max6900.c
index b35186579a..11928839dc 100644
--- a/drivers/rtc/max6900.c
+++ b/drivers/rtc/max6900.c
@@ -14,6 +14,7 @@
#include <command.h>
#include <rtc.h>
#include <i2c.h>
+#include <linux/delay.h>
#ifndef CONFIG_SYS_I2C_RTC_ADDR
#define CONFIG_SYS_I2C_RTC_ADDR 0x50
diff --git a/drivers/rtc/mvrtc.c b/drivers/rtc/mvrtc.c
index 94a065379c..6f49505d4e 100644
--- a/drivers/rtc/mvrtc.c
+++ b/drivers/rtc/mvrtc.c
@@ -13,6 +13,7 @@
#include <dm.h>
#include <rtc.h>
#include <asm/io.h>
+#include <linux/delay.h>
#include "mvrtc.h"
/* This RTC does not support century, so we assume 20 */
diff --git a/drivers/rtc/pcf2127.c b/drivers/rtc/pcf2127.c
index b34ed63bf0..c423960b34 100644
--- a/drivers/rtc/pcf2127.c
+++ b/drivers/rtc/pcf2127.c
@@ -9,6 +9,7 @@
#include <command.h>
#include <dm.h>
#include <i2c.h>
+#include <log.h>
#include <rtc.h>
#define PCF2127_REG_CTRL1 0x00
diff --git a/drivers/rtc/pcf8563.c b/drivers/rtc/pcf8563.c
index 84f2b231c2..19faefba7c 100644
--- a/drivers/rtc/pcf8563.c
+++ b/drivers/rtc/pcf8563.c
@@ -13,6 +13,7 @@
#include <common.h>
#include <command.h>
#include <dm.h>
+#include <log.h>
#include <rtc.h>
#include <i2c.h>
diff --git a/drivers/rtc/pl031.c b/drivers/rtc/pl031.c
index 8bf04f26a3..1b6717232c 100644
--- a/drivers/rtc/pl031.c
+++ b/drivers/rtc/pl031.c
@@ -10,6 +10,7 @@
#include <command.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <rtc.h>
#include <asm/io.h>
#include <asm/types.h>
diff --git a/drivers/rtc/pt7c4338.c b/drivers/rtc/pt7c4338.c
index 5211d07586..c987494b66 100644
--- a/drivers/rtc/pt7c4338.c
+++ b/drivers/rtc/pt7c4338.c
@@ -21,6 +21,7 @@
#include <common.h>
#include <command.h>
#include <dm.h>
+#include <log.h>
#include <rtc.h>
#include <i2c.h>
diff --git a/drivers/rtc/rtc-uclass.c b/drivers/rtc/rtc-uclass.c
index a0a238aedd..926cca234e 100644
--- a/drivers/rtc/rtc-uclass.c
+++ b/drivers/rtc/rtc-uclass.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <rtc.h>
int dm_rtc_get(struct udevice *dev, struct rtc_time *time)
diff --git a/drivers/rtc/rv3029.c b/drivers/rtc/rv3029.c
index 87c4320d5f..3afe5b2fdd 100644
--- a/drivers/rtc/rv3029.c
+++ b/drivers/rtc/rv3029.c
@@ -12,8 +12,11 @@
#include <dm.h>
#include <eeprom.h>
#include <i2c.h>
+#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 2ab40f0833..acd50c6564 100644
--- a/drivers/rtc/rv8803.c
+++ b/drivers/rtc/rv8803.c
@@ -13,8 +13,10 @@
#include <common.h>
#include <command.h>
#include <dm.h>
+#include <log.h>
#include <rtc.h>
#include <i2c.h>
+#include <linux/bitops.h>
/*
* RTC register addresses
diff --git a/drivers/rtc/rx8010sj.c b/drivers/rtc/rx8010sj.c
index 82c5185e2e..d513561b82 100644
--- a/drivers/rtc/rx8010sj.c
+++ b/drivers/rtc/rx8010sj.c
@@ -21,6 +21,7 @@
#include <dm.h>
#include <i2c.h>
#include <rtc.h>
+#include <linux/bitops.h>
/*---------------------------------------------------------------------*/
/* #undef DEBUG_RTC */
diff --git a/drivers/rtc/s35392a.c b/drivers/rtc/s35392a.c
index 3bfe481403..80f55c8623 100644
--- a/drivers/rtc/s35392a.c
+++ b/drivers/rtc/s35392a.c
@@ -23,6 +23,7 @@
#include <i2c.h>
#include <linux/bitrev.h>
#include <rtc.h>
+#include <linux/delay.h>
#define S35390A_CHIP_ADDR 0x30
diff --git a/drivers/rtc/stm32_rtc.c b/drivers/rtc/stm32_rtc.c
index 3e12f57ce0..f9db318af1 100644
--- a/drivers/rtc/stm32_rtc.c
+++ b/drivers/rtc/stm32_rtc.c
@@ -9,6 +9,7 @@
#include <rtc.h>
#include <asm/io.h>
#include <dm/device_compat.h>
+#include <linux/bitops.h>
#include <linux/iopoll.h>
#define STM32_RTC_TR 0x00
diff --git a/drivers/rtc/x1205.c b/drivers/rtc/x1205.c
index ed6aaa5237..ce23427b17 100644
--- a/drivers/rtc/x1205.c
+++ b/drivers/rtc/x1205.c
@@ -19,6 +19,7 @@
#include <common.h>
#include <command.h>
+#include <log.h>
#include <rtc.h>
#include <i2c.h>
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 69de6a53d5..0ab1d441f4 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -5,8 +5,12 @@
*/
#include <common.h>
+#include <blk.h>
+#include <bootstage.h>
#include <dm.h>
#include <env.h>
+#include <log.h>
+#include <part.h>
#include <pci.h>
#include <scsi.h>
#include <dm/device-internal.h>
diff --git a/drivers/serial/altera_jtag_uart.c b/drivers/serial/altera_jtag_uart.c
index 86c3de4e45..7a86161a0d 100644
--- a/drivers/serial/altera_jtag_uart.c
+++ b/drivers/serial/altera_jtag_uart.c
@@ -9,6 +9,7 @@
#include <errno.h>
#include <serial.h>
#include <asm/io.h>
+#include <linux/bitops.h>
/* data register */
#define ALTERA_JTAG_RVALID BIT(15) /* Read valid */
diff --git a/drivers/serial/altera_uart.c b/drivers/serial/altera_uart.c
index 436cf2331d..f88a293d56 100644
--- a/drivers/serial/altera_uart.c
+++ b/drivers/serial/altera_uart.c
@@ -9,6 +9,7 @@
#include <errno.h>
#include <serial.h>
#include <asm/io.h>
+#include <linux/bitops.h>
/* status register */
#define ALTERA_UART_TMT BIT(5) /* tx empty */
diff --git a/drivers/serial/atmel_usart.c b/drivers/serial/atmel_usart.c
index 98d209072d..71cb31ff75 100644
--- a/drivers/serial/atmel_usart.c
+++ b/drivers/serial/atmel_usart.c
@@ -14,6 +14,7 @@
#include <serial.h>
#include <debug_uart.h>
#include <linux/compiler.h>
+#include <linux/delay.h>
#include <asm/io.h>
#ifdef CONFIG_DM_SERIAL
diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index 6415d2e1e5..cca798d7e4 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -9,6 +9,7 @@
#include <clk.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <ns16550.h>
#include <reset.h>
#include <serial.h>
diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c
index 7703c67492..a0af0e6bfd 100644
--- a/drivers/serial/serial-uclass.c
+++ b/drivers/serial/serial-uclass.c
@@ -15,6 +15,7 @@
#include <dm/lists.h>
#include <dm/device-internal.h>
#include <dm/of_access.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index baeaeaac8e..da017dc5b3 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -12,6 +12,7 @@
#include <post.h>
#include <linux/compiler.h>
#include <errno.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/serial/serial_ar933x.c b/drivers/serial/serial_ar933x.c
index 897ea5d6dc..382c3b3d34 100644
--- a/drivers/serial/serial_ar933x.c
+++ b/drivers/serial/serial_ar933x.c
@@ -13,6 +13,7 @@
#include <asm/addrspace.h>
#include <asm/types.h>
#include <dm/pinctrl.h>
+#include <linux/bitops.h>
#include <mach/ar71xx_regs.h>
#define AR933X_UART_DATA_REG 0x00
diff --git a/drivers/serial/serial_bcm283x_mu.c b/drivers/serial/serial_bcm283x_mu.c
index febb5ceea2..0102b10ed2 100644
--- a/drivers/serial/serial_bcm283x_mu.c
+++ b/drivers/serial/serial_bcm283x_mu.c
@@ -23,6 +23,7 @@
#include <serial.h>
#include <dm/platform_data/serial_bcm283x_mu.h>
#include <dm/pinctrl.h>
+#include <linux/bitops.h>
#include <linux/compiler.h>
struct bcm283x_mu_regs {
diff --git a/drivers/serial/serial_cortina.c b/drivers/serial/serial_cortina.c
index 4f227bfe0a..cc20673efe 100644
--- a/drivers/serial/serial_cortina.c
+++ b/drivers/serial/serial_cortina.c
@@ -11,6 +11,7 @@
#include <watchdog.h>
#include <asm/io.h>
#include <serial.h>
+#include <linux/bitops.h>
#include <linux/compiler.h>
/* Register definitions */
diff --git a/drivers/serial/serial_efi.c b/drivers/serial/serial_efi.c
index dd3e511fc9..b152e10258 100644
--- a/drivers/serial/serial_efi.c
+++ b/drivers/serial/serial_efi.c
@@ -11,6 +11,7 @@
#include <efi_api.h>
#include <errno.h>
#include <fdtdec.h>
+#include <log.h>
#include <linux/compiler.h>
#include <asm/io.h>
#include <serial.h>
diff --git a/drivers/serial/serial_lpuart.c b/drivers/serial/serial_lpuart.c
index 3b53f5a97b..0c63c41270 100644
--- a/drivers/serial/serial_lpuart.c
+++ b/drivers/serial/serial_lpuart.c
@@ -8,10 +8,12 @@
#include <clk.h>
#include <dm.h>
#include <fsl_lpuart.h>
+#include <log.h>
#include <watchdog.h>
#include <asm/io.h>
#include <serial.h>
#include <dm/device_compat.h>
+#include <linux/bitops.h>
#include <linux/compiler.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/clock.h>
diff --git a/drivers/serial/serial_meson.c b/drivers/serial/serial_meson.c
index b3dad77aa2..439057b1b9 100644
--- a/drivers/serial/serial_meson.c
+++ b/drivers/serial/serial_meson.c
@@ -7,6 +7,7 @@
#include <dm.h>
#include <errno.h>
#include <fdtdec.h>
+#include <linux/bitops.h>
#include <linux/compiler.h>
#include <serial.h>
diff --git a/drivers/serial/serial_mtk.c b/drivers/serial/serial_mtk.c
index e63f2306f0..778a04d87e 100644
--- a/drivers/serial/serial_mtk.c
+++ b/drivers/serial/serial_mtk.c
@@ -11,6 +11,7 @@
#include <div64.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <serial.h>
#include <watchdog.h>
#include <asm/io.h>
diff --git a/drivers/serial/serial_omap.c b/drivers/serial/serial_omap.c
index 4d4d919358..f7997fc788 100644
--- a/drivers/serial/serial_omap.c
+++ b/drivers/serial/serial_omap.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <dm.h>
#include <dt-structs.h>
+#include <log.h>
#include <ns16550.h>
#include <serial.h>
#include <clk.h>
diff --git a/drivers/serial/serial_owl.c b/drivers/serial/serial_owl.c
index bb60ca2d9b..2651a45a7f 100644
--- a/drivers/serial/serial_owl.c
+++ b/drivers/serial/serial_owl.c
@@ -14,6 +14,7 @@
#include <serial.h>
#include <asm/io.h>
#include <asm/types.h>
+#include <linux/bitops.h>
/* UART Registers */
#define OWL_UART_CTL (0x0000)
diff --git a/drivers/serial/serial_pic32.c b/drivers/serial/serial_pic32.c
index bac506ed79..a492063e39 100644
--- a/drivers/serial/serial_pic32.c
+++ b/drivers/serial/serial_pic32.c
@@ -9,6 +9,7 @@
#include <malloc.h>
#include <serial.h>
#include <wait_bit.h>
+#include <linux/bitops.h>
#include <mach/pic32.h>
#include <dt-bindings/clock/microchip,clock.h>
diff --git a/drivers/serial/serial_sh.c b/drivers/serial/serial_sh.c
index acfcc2954a..5f45d58e58 100644
--- a/drivers/serial/serial_sh.c
+++ b/drivers/serial/serial_sh.c
@@ -15,6 +15,7 @@
#include <serial.h>
#include <linux/compiler.h>
#include <dm/platform_data/serial_sh.h>
+#include <linux/delay.h>
#include "serial_sh.h"
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/serial/serial_sifive.c b/drivers/serial/serial_sifive.c
index 5a02f0c8fe..fcc47fb348 100644
--- a/drivers/serial/serial_sifive.c
+++ b/drivers/serial/serial_sifive.c
@@ -9,6 +9,7 @@
#include <dm.h>
#include <errno.h>
#include <fdtdec.h>
+#include <log.h>
#include <watchdog.h>
#include <asm/io.h>
#include <linux/compiler.h>
diff --git a/drivers/serial/serial_sti_asc.c b/drivers/serial/serial_sti_asc.c
index c972f1e9af..5fbbfac820 100644
--- a/drivers/serial/serial_sti_asc.c
+++ b/drivers/serial/serial_sti_asc.c
@@ -8,8 +8,10 @@
#include <common.h>
#include <dm.h>
+#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 016082814f..e77b90670a 100644
--- a/drivers/serial/serial_stm32.c
+++ b/drivers/serial/serial_stm32.c
@@ -7,11 +7,14 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#include <log.h>
#include <reset.h>
#include <serial.h>
#include <watchdog.h>
#include <asm/io.h>
#include <asm/arch/stm32.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include "serial_stm32.h"
#include <dm/device_compat.h>
diff --git a/drivers/serial/serial_stm32.h b/drivers/serial/serial_stm32.h
index 7b0c53145e..5737651888 100644
--- a/drivers/serial/serial_stm32.h
+++ b/drivers/serial/serial_stm32.h
@@ -7,6 +7,7 @@
#ifndef _SERIAL_STM32_
#define _SERIAL_STM32_
+#include <linux/bitops.h>
#define CR1_OFFSET(x) (x ? 0x0c : 0x00)
#define CR3_OFFSET(x) (x ? 0x14 : 0x08)
#define BRR_OFFSET(x) (x ? 0x08 : 0x0c)
diff --git a/drivers/serial/serial_xuartlite.c b/drivers/serial/serial_xuartlite.c
index 1be777bd3b..f29a9a0b56 100644
--- a/drivers/serial/serial_xuartlite.c
+++ b/drivers/serial/serial_xuartlite.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <dm.h>
#include <asm/io.h>
+#include <linux/bitops.h>
#include <linux/compiler.h>
#include <serial.h>
diff --git a/drivers/serial/serial_zynq.c b/drivers/serial/serial_zynq.c
index 0dd6cec82a..0e71cada1b 100644
--- a/drivers/serial/serial_zynq.c
+++ b/drivers/serial/serial_zynq.c
@@ -10,9 +10,11 @@
#include <dm.h>
#include <errno.h>
#include <fdtdec.h>
+#include <log.h>
#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/smem/msm_smem.c b/drivers/smem/msm_smem.c
index 5557fd29ce..2557269bc5 100644
--- a/drivers/smem/msm_smem.c
+++ b/drivers/smem/msm_smem.c
@@ -13,6 +13,7 @@
#include <dm/of_access.h>
#include <dm/of_addr.h>
#include <asm/io.h>
+#include <linux/bug.h>
#include <linux/err.h>
#include <linux/ioport.h>
#include <linux/io.h>
diff --git a/drivers/soc/ti/k3-navss-ringacc.c b/drivers/soc/ti/k3-navss-ringacc.c
index c5661c52fa..ecc4b8b5a0 100644
--- a/drivers/soc/ti/k3-navss-ringacc.c
+++ b/drivers/soc/ti/k3-navss-ringacc.c
@@ -7,6 +7,8 @@
#include <common.h>
#include <cpu_func.h>
+#include <log.h>
+#include <asm/cache.h>
#include <asm/io.h>
#include <malloc.h>
#include <asm/bitops.h>
@@ -15,6 +17,7 @@
#include <dm/devres.h>
#include <dm/read.h>
#include <dm/uclass.h>
+#include <linux/bitops.h>
#include <linux/compat.h>
#include <linux/dma-mapping.h>
#include <linux/err.h>
diff --git a/drivers/soc/ti/keystone_serdes.c b/drivers/soc/ti/keystone_serdes.c
index 7907e6f977..2ece1a8f64 100644
--- a/drivers/soc/ti/keystone_serdes.c
+++ b/drivers/soc/ti/keystone_serdes.c
@@ -9,6 +9,7 @@
#include <errno.h>
#include <common.h>
#include <asm/ti-common/keystone_serdes.h>
+#include <linux/bitops.h>
#define SERDES_CMU_REGS(x) (0x0000 + (0x0c00 * (x)))
#define SERDES_LANE_REGS(x) (0x0200 + (0x200 * (x)))
diff --git a/drivers/sound/broadwell_i2s.c b/drivers/sound/broadwell_i2s.c
index 3d577401bd..adb0b2b104 100644
--- a/drivers/sound/broadwell_i2s.c
+++ b/drivers/sound/broadwell_i2s.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <dm.h>
#include <i2s.h>
+#include <log.h>
#include <time.h>
#include <asm/io.h>
#include "broadwell_i2s.h"
diff --git a/drivers/sound/hda_codec.c b/drivers/sound/hda_codec.c
index 572ef693cc..4154d29399 100644
--- a/drivers/sound/hda_codec.c
+++ b/drivers/sound/hda_codec.c
@@ -10,10 +10,13 @@
#include <common.h>
#include <dm.h>
#include <hda_codec.h>
+#include <log.h>
#include <pci.h>
#include <sound.h>
#include <asm/io.h>
#include <dt-bindings/sound/azalia.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
/**
* struct hda_regs - HDA registers
diff --git a/drivers/sound/ivybridge_sound.c b/drivers/sound/ivybridge_sound.c
index 101046f9c2..bc3c1e85f8 100644
--- a/drivers/sound/ivybridge_sound.c
+++ b/drivers/sound/ivybridge_sound.c
@@ -15,8 +15,10 @@
#include <common.h>
#include <dm.h>
#include <hda_codec.h>
+#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.c b/drivers/sound/max98088.c
index 332254d5aa..5b4c489f4b 100644
--- a/drivers/sound/max98088.c
+++ b/drivers/sound/max98088.c
@@ -14,6 +14,7 @@
#include <dm.h>
#include <i2c.h>
#include <i2s.h>
+#include <log.h>
#include <sound.h>
#include <asm/gpio.h>
#include "maxim_codec.h"
diff --git a/drivers/sound/max98088.h b/drivers/sound/max98088.h
index 127d2bda30..b1307a7362 100644
--- a/drivers/sound/max98088.h
+++ b/drivers/sound/max98088.h
@@ -9,6 +9,7 @@
#define _MAX98088_H
/* MAX98088 Registers Definition */
+#include <linux/bitops.h>
#define M98088_REG_IRQ_STATUS 0x00
#define M98088_REG_MIC_STATUS 0x01
#define M98088_REG_JACK_STAUS 0x02
diff --git a/drivers/sound/max98090.c b/drivers/sound/max98090.c
index 5505c35166..d23955d6e1 100644
--- a/drivers/sound/max98090.c
+++ b/drivers/sound/max98090.c
@@ -11,8 +11,10 @@
#include <dm.h>
#include <i2c.h>
#include <i2s.h>
+#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/max98095.c b/drivers/sound/max98095.c
index 9e08e96670..5037f9516f 100644
--- a/drivers/sound/max98095.c
+++ b/drivers/sound/max98095.c
@@ -13,6 +13,7 @@
#include <div64.h>
#include <fdtdec.h>
#include <i2c.h>
+#include <log.h>
#include <sound.h>
#include <asm/gpio.h>
#include "i2s.h"
diff --git a/drivers/sound/maxim_codec.c b/drivers/sound/maxim_codec.c
index 5480dce108..31e67ee672 100644
--- a/drivers/sound/maxim_codec.c
+++ b/drivers/sound/maxim_codec.c
@@ -9,6 +9,7 @@
#include <div64.h>
#include <i2c.h>
#include <i2s.h>
+#include <log.h>
#include <sound.h>
#include <asm/gpio.h>
#include <asm/io.h>
diff --git a/drivers/sound/rockchip_i2s.c b/drivers/sound/rockchip_i2s.c
index e5df8ca0d2..4e9e68aaac 100644
--- a/drivers/sound/rockchip_i2s.c
+++ b/drivers/sound/rockchip_i2s.c
@@ -10,8 +10,10 @@
#include <common.h>
#include <dm.h>
#include <i2s.h>
+#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/sound/rockchip_sound.c b/drivers/sound/rockchip_sound.c
index a092dbc445..94058e603d 100644
--- a/drivers/sound/rockchip_sound.c
+++ b/drivers/sound/rockchip_sound.c
@@ -11,6 +11,7 @@
#include <clk.h>
#include <dm.h>
#include <i2s.h>
+#include <log.h>
#include <misc.h>
#include <sound.h>
#include <asm/arch-rockchip/periph.h>
diff --git a/drivers/sound/rt5677.c b/drivers/sound/rt5677.c
index 64776055d9..16aa9dfc5b 100644
--- a/drivers/sound/rt5677.c
+++ b/drivers/sound/rt5677.c
@@ -10,6 +10,7 @@
#include <dm.h>
#include <i2c.h>
#include "rt5677.h"
+#include <log.h>
struct rt5677_priv {
struct udevice *dev;
diff --git a/drivers/sound/samsung-i2s.c b/drivers/sound/samsung-i2s.c
index 104584073a..aa1d6bb209 100644
--- a/drivers/sound/samsung-i2s.c
+++ b/drivers/sound/samsung-i2s.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <i2s.h>
+#include <log.h>
#include <sound.h>
#include <asm/arch/clk.h>
#include <asm/arch/pinmux.h>
diff --git a/drivers/sound/samsung_sound.c b/drivers/sound/samsung_sound.c
index b6952675bd..473cedf7e9 100644
--- a/drivers/sound/samsung_sound.c
+++ b/drivers/sound/samsung_sound.c
@@ -8,6 +8,7 @@
#include <audio_codec.h>
#include <dm.h>
#include <i2s.h>
+#include <log.h>
#include <sound.h>
#include <asm/gpio.h>
#include <asm/arch/power.h>
diff --git a/drivers/sound/sandbox.c b/drivers/sound/sandbox.c
index 9034a8385a..0686add3c8 100644
--- a/drivers/sound/sandbox.c
+++ b/drivers/sound/sandbox.c
@@ -9,6 +9,7 @@
#include <audio_codec.h>
#include <dm.h>
#include <i2s.h>
+#include <log.h>
#include <sound.h>
#include <asm/sdl.h>
diff --git a/drivers/sound/sound-uclass.c b/drivers/sound/sound-uclass.c
index d9b3a38f18..92f4b0b924 100644
--- a/drivers/sound/sound-uclass.c
+++ b/drivers/sound/sound-uclass.c
@@ -7,8 +7,10 @@
#include <common.h>
#include <dm.h>
#include <i2s.h>
+#include <log.h>
#include <malloc.h>
#include <sound.h>
+#include <linux/delay.h>
#define SOUND_BITS_IN_BYTE 8
diff --git a/drivers/sound/sound.c b/drivers/sound/sound.c
index dd3f9db4f7..b0eab23391 100644
--- a/drivers/sound/sound.c
+++ b/drivers/sound/sound.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <log.h>
#include <sound.h>
void sound_create_square_wave(uint sample_rate, unsigned short *data, int size,
diff --git a/drivers/sound/tegra_ahub.c b/drivers/sound/tegra_ahub.c
index c71fce9bb1..26d457255c 100644
--- a/drivers/sound/tegra_ahub.c
+++ b/drivers/sound/tegra_ahub.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <dm.h>
#include <i2s.h>
+#include <log.h>
#include <misc.h>
#include <asm/io.h>
#include <asm/arch-tegra/tegra_ahub.h>
diff --git a/drivers/sound/tegra_i2s.c b/drivers/sound/tegra_i2s.c
index 8022dbba64..5cf82250da 100644
--- a/drivers/sound/tegra_i2s.c
+++ b/drivers/sound/tegra_i2s.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <dm.h>
#include <i2s.h>
+#include <log.h>
#include <misc.h>
#include <sound.h>
#include <asm/io.h>
diff --git a/drivers/sound/tegra_sound.c b/drivers/sound/tegra_sound.c
index 7c2ed53f5a..aef6a2eb14 100644
--- a/drivers/sound/tegra_sound.c
+++ b/drivers/sound/tegra_sound.c
@@ -10,6 +10,7 @@
#include <audio_codec.h>
#include <dm.h>
#include <i2s.h>
+#include <log.h>
#include <misc.h>
#include <sound.h>
#include <asm/gpio.h>
diff --git a/drivers/sound/wm8994.c b/drivers/sound/wm8994.c
index b290c4e879..367e144541 100644
--- a/drivers/sound/wm8994.c
+++ b/drivers/sound/wm8994.c
@@ -10,6 +10,7 @@
#include <fdtdec.h>
#include <i2c.h>
#include <i2s.h>
+#include <log.h>
#include <sound.h>
#include <asm/gpio.h>
#include <asm/io.h>
diff --git a/drivers/spi/altera_spi.c b/drivers/spi/altera_spi.c
index e24deb4f71..3aa7a40b77 100644
--- a/drivers/spi/altera_spi.c
+++ b/drivers/spi/altera_spi.c
@@ -9,10 +9,12 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#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/atcspi200_spi.c b/drivers/spi/atcspi200_spi.c
index e0cc323444..328b16c277 100644
--- a/drivers/spi/atcspi200_spi.c
+++ b/drivers/spi/atcspi200_spi.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <clk.h>
+#include <log.h>
#include <malloc.h>
#include <spi.h>
#include <asm/io.h>
diff --git a/drivers/spi/atmel-quadspi.c b/drivers/spi/atmel-quadspi.c
index a6c3939db5..9320a8be68 100644
--- a/drivers/spi/atmel-quadspi.c
+++ b/drivers/spi/atmel-quadspi.c
@@ -17,6 +17,7 @@
#include <errno.h>
#include <fdtdec.h>
#include <dm/device_compat.h>
+#include <linux/bitops.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/iopoll.h>
diff --git a/drivers/spi/atmel_spi.h b/drivers/spi/atmel_spi.h
index 76b8556c98..6167bd164b 100644
--- a/drivers/spi/atmel_spi.h
+++ b/drivers/spi/atmel_spi.h
@@ -3,6 +3,7 @@
*/
/* Register offsets */
+#include <linux/bitops.h>
#define ATMEL_SPI_CR 0x0000
#define ATMEL_SPI_MR 0x0004
#define ATMEL_SPI_RDR 0x0008
diff --git a/drivers/spi/bcm63xx_hsspi.c b/drivers/spi/bcm63xx_hsspi.c
index f88702df4d..f30a8a42bd 100644
--- a/drivers/spi/bcm63xx_hsspi.c
+++ b/drivers/spi/bcm63xx_hsspi.c
@@ -10,11 +10,13 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <spi.h>
#include <reset.h>
#include <wait_bit.h>
#include <asm/io.h>
+#include <linux/bitops.h>
#define HSSPI_PP 0
diff --git a/drivers/spi/bcm63xx_spi.c b/drivers/spi/bcm63xx_spi.c
index 719f53d08e..acc1a493c4 100644
--- a/drivers/spi/bcm63xx_spi.c
+++ b/drivers/spi/bcm63xx_spi.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <spi.h>
#include <reset.h>
diff --git a/drivers/spi/cadence_qspi.c b/drivers/spi/cadence_qspi.c
index 994a5948f1..1e85749209 100644
--- a/drivers/spi/cadence_qspi.c
+++ b/drivers/spi/cadence_qspi.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <clk.h>
+#include <log.h>
#include <asm-generic/io.h>
#include <dm.h>
#include <fdtdec.h>
diff --git a/drivers/spi/cadence_qspi_apb.c b/drivers/spi/cadence_qspi_apb.c
index 0a5af05614..f9675f75a4 100644
--- a/drivers/spi/cadence_qspi_apb.c
+++ b/drivers/spi/cadence_qspi_apb.c
@@ -26,8 +26,11 @@
*/
#include <common.h>
+#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>
#include <spi.h>
diff --git a/drivers/spi/cf_spi.c b/drivers/spi/cf_spi.c
index 923ff6f311..dd9c77281f 100644
--- a/drivers/spi/cf_spi.c
+++ b/drivers/spi/cf_spi.c
@@ -15,6 +15,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <dm/platform_data/spi_coldfire.h>
#include <spi.h>
#include <malloc.h>
diff --git a/drivers/spi/davinci_spi.c b/drivers/spi/davinci_spi.c
index 4d2c106440..97ac97b1a5 100644
--- a/drivers/spi/davinci_spi.c
+++ b/drivers/spi/davinci_spi.c
@@ -9,12 +9,15 @@
*/
#include <common.h>
+#include <log.h>
#include <spi.h>
#include <malloc.h>
#include <asm/io.h>
#include <asm/arch/hardware.h>
#include <dm.h>
#include <dm/platform_data/spi_davinci.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
/* SPIGCR0 */
#define SPIGCR0_SPIENA_MASK 0x1
diff --git a/drivers/spi/designware_spi.c b/drivers/spi/designware_spi.c
index 2dc16736a3..c9b14f9029 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>
@@ -19,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/exynos_spi.c b/drivers/spi/exynos_spi.c
index d682a11013..746686a18a 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>
@@ -18,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 a68a51945e..1cdb233110 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>
@@ -21,6 +22,8 @@
#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 7444ae1a06..50d194f614 100644
--- a/drivers/spi/fsl_espi.c
+++ b/drivers/spi/fsl_espi.c
@@ -7,6 +7,9 @@
*/
#include <common.h>
+#include <log.h>
+#include <linux/bitops.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 ee2c8b67dc..e715f9838f 100644
--- a/drivers/spi/fsl_qspi.c
+++ b/drivers/spi/fsl_qspi.c
@@ -24,7 +24,13 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/io.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
+#include <linux/libfdt.h>
+#include <linux/sizes.h>
+#include <linux/iopoll.h>
#include <dm.h>
#include <linux/iopoll.h>
#include <linux/sizes.h>
diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c
index a9d7715a55..7405062846 100644
--- a/drivers/spi/ich.c
+++ b/drivers/spi/ich.c
@@ -8,10 +8,12 @@
#define LOG_CATEGORY UCLASS_SPI
#include <common.h>
+#include <bootstage.h>
#include <div64.h>
#include <dm.h>
#include <dt-structs.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include <pch.h>
#include <pci.h>
@@ -23,6 +25,8 @@
#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>
#include "ich.h"
diff --git a/drivers/spi/ich.h b/drivers/spi/ich.h
index d7f1ffdf37..23c7827740 100644
--- a/drivers/spi/ich.h
+++ b/drivers/spi/ich.h
@@ -8,6 +8,7 @@
#ifndef _ICH_H_
#define _ICH_H_
+#include <linux/bitops.h>
struct ich7_spi_regs {
uint16_t spis;
uint16_t spic;
diff --git a/drivers/spi/kirkwood_spi.c b/drivers/spi/kirkwood_spi.c
index 38fe4143f5..01fcf6bef5 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/meson_spifc.c b/drivers/spi/meson_spifc.c
index 3d551694cb..2cdc018682 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>
@@ -15,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/mpc8xx_spi.c b/drivers/spi/mpc8xx_spi.c
index b020ce2b9d..0026ad23e3 100644
--- a/drivers/spi/mpc8xx_spi.c
+++ b/drivers/spi/mpc8xx_spi.c
@@ -20,6 +20,7 @@
#include <dm.h>
#include <mpc8xx.h>
#include <spi.h>
+#include <linux/delay.h>
#include <asm/cpm_8xx.h>
#include <asm/io.h>
diff --git a/drivers/spi/mpc8xxx_spi.c b/drivers/spi/mpc8xxx_spi.c
index e48debb045..811b5d44fb 100644
--- a/drivers/spi/mpc8xxx_spi.c
+++ b/drivers/spi/mpc8xxx_spi.c
@@ -8,11 +8,14 @@
#include <clk.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include <spi.h>
#include <asm/mpc8xxx_spi.h>
#include <asm-generic/gpio.h>
#include <dm/device_compat.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
enum {
SPI_EV_NE = BIT(31 - 22), /* Receiver Not Empty */
diff --git a/drivers/spi/mscc_bb_spi.c b/drivers/spi/mscc_bb_spi.c
index c3c7b80426..0454410ee9 100644
--- a/drivers/spi/mscc_bb_spi.c
+++ b/drivers/spi/mscc_bb_spi.c
@@ -8,11 +8,13 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include <spi.h>
#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 90e85c6b44..3a0738eb2b 100644
--- a/drivers/spi/mt7621_spi.c
+++ b/drivers/spi/mt7621_spi.c
@@ -11,8 +11,10 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#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 1469771619..2302e62be4 100644
--- a/drivers/spi/mvebu_a3700_spi.c
+++ b/drivers/spi/mvebu_a3700_spi.c
@@ -7,12 +7,14 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <spi.h>
#include <clk.h>
#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 4d1317c364..f52ebf4d67 100644
--- a/drivers/spi/mxc_spi.c
+++ b/drivers/spi/mxc_spi.c
@@ -5,9 +5,12 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#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>
#include <asm/gpio.h>
diff --git a/drivers/spi/mxs_spi.c b/drivers/spi/mxs_spi.c
index 3ca30887fb..0da4a80d71 100644
--- a/drivers/spi/mxs_spi.c
+++ b/drivers/spi/mxs_spi.c
@@ -14,9 +14,12 @@
#include <common.h>
#include <cpu_func.h>
+#include <log.h>
#include <malloc.h>
#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 22a5c0e3c7..c507437f2e 100644
--- a/drivers/spi/nxp_fspi.c
+++ b/drivers/spi/nxp_fspi.c
@@ -40,6 +40,7 @@
#include <spi-mem.h>
#include <dm.h>
#include <clk.h>
+#include <linux/bitops.h>
#include <linux/kernel.h>
#include <linux/sizes.h>
#include <linux/iopoll.h>
diff --git a/drivers/spi/omap3_spi.c b/drivers/spi/omap3_spi.c
index ff4c700645..6a615d1498 100644
--- a/drivers/spi/omap3_spi.c
+++ b/drivers/spi/omap3_spi.c
@@ -21,6 +21,7 @@
#include <spi.h>
#include <malloc.h>
#include <asm/io.h>
+#include <linux/bitops.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/spi/pic32_spi.c b/drivers/spi/pic32_spi.c
index 4ec6683de1..52e9eff743 100644
--- a/drivers/spi/pic32_spi.c
+++ b/drivers/spi/pic32_spi.c
@@ -9,6 +9,8 @@
#include <common.h>
#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 bb2e7748fe..3ea59b8fb8 100644
--- a/drivers/spi/renesas_rpc_spi.c
+++ b/drivers/spi/renesas_rpc_spi.c
@@ -12,6 +12,8 @@
#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>
#include <wait_bit.h>
diff --git a/drivers/spi/rk_spi.c b/drivers/spi/rk_spi.c
index 95eeb8307a..833cb04922 100644
--- a/drivers/spi/rk_spi.c
+++ b/drivers/spi/rk_spi.c
@@ -15,8 +15,10 @@
#include <dm.h>
#include <dt-structs.h>
#include <errno.h>
+#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/sandbox_spi.c b/drivers/spi/sandbox_spi.c
index 6b610ff823..b0a46c8868 100644
--- a/drivers/spi/sandbox_spi.c
+++ b/drivers/spi/sandbox_spi.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <spi.h>
#include <spi_flash.h>
diff --git a/drivers/spi/sh_qspi.c b/drivers/spi/sh_qspi.c
index 5ae203d8d4..2839dd1ceb 100644
--- a/drivers/spi/sh_qspi.c
+++ b/drivers/spi/sh_qspi.c
@@ -13,6 +13,7 @@
#include <wait_bit.h>
#include <asm/arch/rmobile.h>
#include <asm/io.h>
+#include <linux/bitops.h>
/* SH QSPI register bit masks <REG>_<BIT> */
#define SPCR_MSTR 0x08
diff --git a/drivers/spi/sh_spi.c b/drivers/spi/sh_spi.c
index c58fd0ebc4..4ecfe60115 100644
--- a/drivers/spi/sh_spi.c
+++ b/drivers/spi/sh_spi.c
@@ -10,6 +10,7 @@
#include <malloc.h>
#include <spi.h>
#include <asm/io.h>
+#include <linux/delay.h>
#include "sh_spi.h"
static void sh_spi_write(unsigned long data, unsigned long *reg)
diff --git a/drivers/spi/soft_spi.c b/drivers/spi/soft_spi.c
index b80f810bd1..e8d7758da0 100644
--- a/drivers/spi/soft_spi.c
+++ b/drivers/spi/soft_spi.c
@@ -13,9 +13,12 @@
#include <dm.h>
#include <errno.h>
#include <fdtdec.h>
+#include <log.h>
#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-mem-nodm.c b/drivers/spi/spi-mem-nodm.c
index 83dde4806e..765f05fe54 100644
--- a/drivers/spi/spi-mem-nodm.c
+++ b/drivers/spi/spi-mem-nodm.c
@@ -3,6 +3,7 @@
* Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
*/
+#include <log.h>
#include <malloc.h>
#include <spi.h>
#include <spi-mem.h>
diff --git a/drivers/spi/spi-mem.c b/drivers/spi/spi-mem.c
index ffbe20c5b1..d344701aeb 100644
--- a/drivers/spi/spi-mem.c
+++ b/drivers/spi/spi-mem.c
@@ -7,6 +7,7 @@
*/
#ifndef __UBOOT__
+#include <log.h>
#include <dm/devres.h>
#include <linux/dmaengine.h>
#include <linux/pm_runtime.h>
diff --git a/drivers/spi/spi-sifive.c b/drivers/spi/spi-sifive.c
index 4cab0391f7..0e0ce25abb 100644
--- a/drivers/spi/spi-sifive.c
+++ b/drivers/spi/spi-sifive.c
@@ -13,6 +13,7 @@
#include <spi-mem.h>
#include <wait_bit.h>
#include <asm/io.h>
+#include <linux/bitops.h>
#include <linux/log2.h>
#include <clk.h>
diff --git a/drivers/spi/spi-sunxi.c b/drivers/spi/spi-sunxi.c
index c59fee10a8..d2dccd67e5 100644
--- a/drivers/spi/spi-sunxi.c
+++ b/drivers/spi/spi-sunxi.c
@@ -21,12 +21,14 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#include <log.h>
#include <spi.h>
#include <errno.h>
#include <fdt_support.h>
#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/spi-uclass.c b/drivers/spi/spi-uclass.c
index 4a02d95a34..cffd9cf0b0 100644
--- a/drivers/spi/spi-uclass.c
+++ b/drivers/spi/spi-uclass.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include <spi.h>
#include <dm/device-internal.h>
diff --git a/drivers/spi/stm32_qspi.c b/drivers/spi/stm32_qspi.c
index 6857a87dc5..001f0703e3 100644
--- a/drivers/spi/stm32_qspi.c
+++ b/drivers/spi/stm32_qspi.c
@@ -9,9 +9,12 @@
#include <common.h>
#include <clk.h>
+#include <log.h>
#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>
#include <linux/sizes.h>
diff --git a/drivers/spi/stm32_spi.c b/drivers/spi/stm32_spi.c
index ebf2b98fcd..4a0833b6fa 100644
--- a/drivers/spi/stm32_spi.c
+++ b/drivers/spi/stm32_spi.c
@@ -8,10 +8,13 @@
#include <clk.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include <reset.h>
#include <spi.h>
#include <dm/device_compat.h>
+#include <linux/bitops.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 bb34b20f54..0e8198c5a0 100644
--- a/drivers/spi/tegra114_spi.c
+++ b/drivers/spi/tegra114_spi.c
@@ -7,11 +7,14 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <time.h>
#include <asm/io.h>
#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"
/* COMMAND1 */
diff --git a/drivers/spi/tegra20_sflash.c b/drivers/spi/tegra20_sflash.c
index 0e68d33be6..22a0304bfc 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>
@@ -16,6 +17,8 @@
#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"
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/spi/tegra20_slink.c b/drivers/spi/tegra20_slink.c
index ae2fc3e76d..3679cf06a0 100644
--- a/drivers/spi/tegra20_slink.c
+++ b/drivers/spi/tegra20_slink.c
@@ -7,12 +7,15 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <time.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
#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"
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/spi/tegra210_qspi.c b/drivers/spi/tegra210_qspi.c
index 6e540e97df..ae16b45dcb 100644
--- a/drivers/spi/tegra210_qspi.c
+++ b/drivers/spi/tegra210_qspi.c
@@ -8,12 +8,15 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <time.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
#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"
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c
index e3750b0b17..0db0de8f1b 100644
--- a/drivers/spi/ti_qspi.c
+++ b/drivers/spi/ti_qspi.c
@@ -7,6 +7,8 @@
#include <common.h>
#include <cpu_func.h>
+#include <log.h>
+#include <asm/cache.h>
#include <asm/io.h>
#include <asm/arch/omap.h>
#include <malloc.h>
@@ -17,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 153fbb2889..114bd8abd7 100644
--- a/drivers/spi/uniphier_spi.c
+++ b/drivers/spi/uniphier_spi.c
@@ -7,9 +7,12 @@
#include <clk.h>
#include <common.h>
#include <dm.h>
+#include <log.h>
#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>
#include <wait_bit.h>
diff --git a/drivers/spi/xilinx_spi.c b/drivers/spi/xilinx_spi.c
index 2b5f2cf548..05768eef72 100644
--- a/drivers/spi/xilinx_spi.c
+++ b/drivers/spi/xilinx_spi.c
@@ -16,10 +16,12 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#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 9ad1927a5d..db473da6ea 100644
--- a/drivers/spi/zynq_qspi.c
+++ b/drivers/spi/zynq_qspi.c
@@ -8,9 +8,11 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#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 0b2b2f4810..3e66b34ebb 100644
--- a/drivers/spi/zynq_spi.c
+++ b/drivers/spi/zynq_spi.c
@@ -8,10 +8,13 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#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 02b78df843..c3a5b3e301 100644
--- a/drivers/spi/zynqmp_gqspi.c
+++ b/drivers/spi/zynqmp_gqspi.c
@@ -7,7 +7,9 @@
#include <common.h>
#include <cpu_func.h>
+#include <log.h>
#include <asm/arch/sys_proto.h>
+#include <asm/cache.h>
#include <asm/io.h>
#include <clk.h>
#include <dm.h>
@@ -17,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-ti-sci.c b/drivers/sysreset/sysreset-ti-sci.c
index e7fcfcd4d1..3877b9bc12 100644
--- a/drivers/sysreset/sysreset-ti-sci.c
+++ b/drivers/sysreset/sysreset-ti-sci.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <sysreset.h>
#include <dm/device_compat.h>
#include <linux/err.h>
diff --git a/drivers/sysreset/sysreset-uclass.c b/drivers/sysreset/sysreset-uclass.c
index 51fdb1055e..995240f0cb 100644
--- a/drivers/sysreset/sysreset-uclass.c
+++ b/drivers/sysreset/sysreset-uclass.c
@@ -7,8 +7,10 @@
#define LOG_CATEGORY UCLASS_SYSRESET
#include <common.h>
+#include <command.h>
#include <cpu_func.h>
#include <hang.h>
+#include <log.h>
#include <sysreset.h>
#include <dm.h>
#include <errno.h>
@@ -16,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)
@@ -111,7 +114,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 +124,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_ast.c b/drivers/sysreset/sysreset_ast.c
index d0336a1ce5..ee941c7770 100644
--- a/drivers/sysreset/sysreset_ast.c
+++ b/drivers/sysreset/sysreset_ast.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <sysreset.h>
#include <wdt.h>
#include <asm/io.h>
diff --git a/drivers/sysreset/sysreset_gpio.c b/drivers/sysreset/sysreset_gpio.c
index ed9a49ad08..d7280eeda8 100644
--- a/drivers/sysreset/sysreset_gpio.c
+++ b/drivers/sysreset/sysreset_gpio.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <sysreset.h>
#include <asm/gpio.h>
diff --git a/drivers/sysreset/sysreset_mpc83xx.c b/drivers/sysreset/sysreset_mpc83xx.c
index 9092764e0b..456f006bc1 100644
--- a/drivers/sysreset/sysreset_mpc83xx.c
+++ b/drivers/sysreset/sysreset_mpc83xx.c
@@ -5,9 +5,12 @@
*/
#include <common.h>
+#include <command.h>
#include <dm.h>
+#include <log.h>
#include <sysreset.h>
#include <wait_bit.h>
+#include <linux/delay.h>
#include "sysreset_mpc83xx.h"
diff --git a/drivers/sysreset/sysreset_socfpga.c b/drivers/sysreset/sysreset_socfpga.c
index 3390b7bdc2..178bcb227f 100644
--- a/drivers/sysreset/sysreset_socfpga.c
+++ b/drivers/sysreset/sysreset_socfpga.c
@@ -10,6 +10,7 @@
#include <sysreset.h>
#include <asm/io.h>
#include <asm/arch/reset_manager.h>
+#include <linux/bitops.h>
struct socfpga_sysreset_data {
void __iomem *rstmgr_base;
diff --git a/drivers/sysreset/sysreset_sti.c b/drivers/sysreset/sysreset_sti.c
index 9996716f13..3482d2a078 100644
--- a/drivers/sysreset/sysreset_sti.c
+++ b/drivers/sysreset/sysreset_sti.c
@@ -10,6 +10,7 @@
#include <syscon.h>
#include <sysreset.h>
#include <asm/io.h>
+#include <linux/bitops.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/tee/tee-uclass.c b/drivers/tee/tee-uclass.c
index 1fb3c16a14..112e216883 100644
--- a/drivers/tee/tee-uclass.c
+++ b/drivers/tee/tee-uclass.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <tee.h>
#include <dm/device-internal.h>
diff --git a/drivers/thermal/imx_scu_thermal.c b/drivers/thermal/imx_scu_thermal.c
index da13121a09..321f905e3a 100644
--- a/drivers/thermal/imx_scu_thermal.c
+++ b/drivers/thermal/imx_scu_thermal.c
@@ -7,10 +7,13 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <thermal.h>
#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 e50b85bd59..101bd5ef2d 100644
--- a/drivers/thermal/imx_thermal.c
+++ b/drivers/thermal/imx_thermal.c
@@ -9,12 +9,14 @@
#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>
#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/altera_timer.c b/drivers/timer/altera_timer.c
index 6f504f7cc4..6ca9501eb1 100644
--- a/drivers/timer/altera_timer.c
+++ b/drivers/timer/altera_timer.c
@@ -12,6 +12,7 @@
#include <errno.h>
#include <timer.h>
#include <asm/io.h>
+#include <linux/bitops.h>
/* control register */
#define ALTERA_TIMER_CONT BIT(1) /* Continuous mode */
diff --git a/drivers/timer/atmel_pit_timer.c b/drivers/timer/atmel_pit_timer.c
index 009af2f929..70511697fe 100644
--- a/drivers/timer/atmel_pit_timer.c
+++ b/drivers/timer/atmel_pit_timer.c
@@ -9,6 +9,7 @@
#include <dm.h>
#include <timer.h>
#include <asm/io.h>
+#include <linux/bitops.h>
#define AT91_PIT_VALUE 0xfffff
#define AT91_PIT_PITEN BIT(24) /* Timer Enabled */
diff --git a/drivers/timer/cadence-ttc.c b/drivers/timer/cadence-ttc.c
index ed48a145f2..e6b6dfe376 100644
--- a/drivers/timer/cadence-ttc.c
+++ b/drivers/timer/cadence-ttc.c
@@ -4,10 +4,13 @@
*/
#include <common.h>
+#include <bootstage.h>
#include <dm.h>
#include <errno.h>
+#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 72cb58b693..ad8bb28e8b 100644
--- a/drivers/timer/mpc83xx_timer.c
+++ b/drivers/timer/mpc83xx_timer.c
@@ -9,10 +9,13 @@
#include <clk.h>
#include <dm.h>
#include <irq_func.h>
+#include <log.h>
#include <status_led.h>
#include <time.h>
#include <timer.h>
#include <watchdog.h>
+#include <asm/ptrace.h>
+#include <linux/bitops.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/timer/mtk_timer.c b/drivers/timer/mtk_timer.c
index e99135e5be..69ed521811 100644
--- a/drivers/timer/mtk_timer.c
+++ b/drivers/timer/mtk_timer.c
@@ -11,6 +11,7 @@
#include <dm.h>
#include <timer.h>
#include <asm/io.h>
+#include <linux/bitops.h>
#define MTK_GPT4_CTRL 0x40
#define MTK_GPT4_CLK 0x44
diff --git a/drivers/timer/nomadik-mtu-timer.c b/drivers/timer/nomadik-mtu-timer.c
index 8648f1f1df..7ff921385a 100644
--- a/drivers/timer/nomadik-mtu-timer.c
+++ b/drivers/timer/nomadik-mtu-timer.c
@@ -16,6 +16,7 @@
#include <dm.h>
#include <timer.h>
#include <asm/io.h>
+#include <linux/bitops.h>
#define MTU_NUM_TIMERS 4
diff --git a/drivers/timer/omap-timer.c b/drivers/timer/omap-timer.c
index a13fb71165..700c349f37 100644
--- a/drivers/timer/omap-timer.c
+++ b/drivers/timer/omap-timer.c
@@ -11,6 +11,7 @@
#include <timer.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
+#include <linux/bitops.h>
/* Timer register bits */
#define TCLR_START BIT(0) /* Start=1 */
diff --git a/drivers/timer/ostm_timer.c b/drivers/timer/ostm_timer.c
index 48a5055b05..bea97159eb 100644
--- a/drivers/timer/ostm_timer.c
+++ b/drivers/timer/ostm_timer.c
@@ -11,6 +11,7 @@
#include <dm.h>
#include <clk.h>
#include <timer.h>
+#include <linux/bitops.h>
#define OSTM_CMP 0x00
#define OSTM_CNT 0x04
diff --git a/drivers/timer/rockchip_timer.c b/drivers/timer/rockchip_timer.c
index 54956e557a..7a5a484252 100644
--- a/drivers/timer/rockchip_timer.c
+++ b/drivers/timer/rockchip_timer.c
@@ -4,7 +4,10 @@
*/
#include <common.h>
+#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/stm32_timer.c b/drivers/timer/stm32_timer.c
index 76d99a2b86..c57fa3f557 100644
--- a/drivers/timer/stm32_timer.c
+++ b/drivers/timer/stm32_timer.c
@@ -10,6 +10,7 @@
#include <fdtdec.h>
#include <timer.h>
#include <dm/device_compat.h>
+#include <linux/bitops.h>
#include <asm/io.h>
diff --git a/drivers/timer/timer-uclass.c b/drivers/timer/timer-uclass.c
index b619200f00..14dde950a1 100644
--- a/drivers/timer/timer-uclass.c
+++ b/drivers/timer/timer-uclass.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <init.h>
#include <dm/lists.h>
#include <dm/device-internal.h>
#include <dm/root.h>
diff --git a/drivers/timer/tsc_timer.c b/drivers/timer/tsc_timer.c
index 43cb2d820e..93c959ff44 100644
--- a/drivers/timer/tsc_timer.c
+++ b/drivers/timer/tsc_timer.c
@@ -7,7 +7,9 @@
*/
#include <common.h>
+#include <bootstage.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <time.h>
#include <timer.h>
@@ -17,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 b67051af26..1942c07c60 100644
--- a/drivers/tpm/cr50_i2c.c
+++ b/drivers/tpm/cr50_i2c.c
@@ -11,12 +11,14 @@
#include <dm.h>
#include <i2c.h>
#include <irq.h>
+#include <log.h>
#include <spl.h>
#include <tpm-v2.h>
#include <asm/gpio.h>
#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 71d5807006..6ea795bc0c 100644
--- a/drivers/tpm/tpm-uclass.c
+++ b/drivers/tpm/tpm-uclass.c
@@ -6,6 +6,8 @@
#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_ftpm_tee.c b/drivers/tpm/tpm2_ftpm_tee.c
index 4b79d4ada0..3197e0ebcd 100644
--- a/drivers/tpm/tpm2_ftpm_tee.c
+++ b/drivers/tpm/tpm2_ftpm_tee.c
@@ -15,6 +15,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <tpm-v2.h>
#include <tee.h>
diff --git a/drivers/tpm/tpm2_tis_sandbox.c b/drivers/tpm/tpm2_tis_sandbox.c
index 522988795c..41a15bd49f 100644
--- a/drivers/tpm/tpm2_tis_sandbox.c
+++ b/drivers/tpm/tpm2_tis_sandbox.c
@@ -9,6 +9,7 @@
#include <tpm-v2.h>
#include <asm/state.h>
#include <asm/unaligned.h>
+#include <linux/bitops.h>
#include <u-boot/crc.h>
/* Hierarchies */
diff --git a/drivers/tpm/tpm2_tis_spi.c b/drivers/tpm/tpm2_tis_spi.c
index 713111f6c3..36016de4a6 100644
--- a/drivers/tpm/tpm2_tis_spi.c
+++ b/drivers/tpm/tpm2_tis_spi.c
@@ -19,6 +19,8 @@
#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>
#include <linux/types.h>
diff --git a/drivers/tpm/tpm_atmel_twi.c b/drivers/tpm/tpm_atmel_twi.c
index 2079ea913e..d9e4877c5c 100644
--- a/drivers/tpm/tpm_atmel_twi.c
+++ b/drivers/tpm/tpm_atmel_twi.c
@@ -10,6 +10,7 @@
#include <tpm-v1.h>
#include <i2c.h>
#include <asm/unaligned.h>
+#include <linux/delay.h>
#include "tpm_internal.h"
diff --git a/drivers/tpm/tpm_tis_infineon.c b/drivers/tpm/tpm_tis_infineon.c
index b5fe43ee50..f47813e76d 100644
--- a/drivers/tpm/tpm_tis_infineon.c
+++ b/drivers/tpm/tpm_tis_infineon.c
@@ -23,7 +23,9 @@
#include <dm.h>
#include <fdtdec.h>
#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 30194bce07..2dd374cf77 100644
--- a/drivers/tpm/tpm_tis_lpc.c
+++ b/drivers/tpm/tpm_tis_lpc.c
@@ -14,9 +14,11 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#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 0d380375eb..a253ee1502 100644
--- a/drivers/tpm/tpm_tis_st33zp24_i2c.c
+++ b/drivers/tpm/tpm_tis_st33zp24_i2c.c
@@ -16,8 +16,10 @@
#include <dm.h>
#include <fdtdec.h>
#include <i2c.h>
+#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 f6087e7633..ef54e3b7b2 100644
--- a/drivers/tpm/tpm_tis_st33zp24_spi.c
+++ b/drivers/tpm/tpm_tis_st33zp24_spi.c
@@ -15,9 +15,11 @@
#include <common.h>
#include <dm.h>
#include <fdtdec.h>
+#include <log.h>
#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/cdns-platform.c b/drivers/ufs/cdns-platform.c
index 41ee6a60c9..1a7bb7bed8 100644
--- a/drivers/ufs/cdns-platform.c
+++ b/drivers/ufs/cdns-platform.c
@@ -10,6 +10,7 @@
#include <dm.h>
#include <ufs.h>
#include <dm/device_compat.h>
+#include <linux/bitops.h>
#include <linux/err.h>
#include "ufs.h"
diff --git a/drivers/ufs/ti-j721e-ufs.c b/drivers/ufs/ti-j721e-ufs.c
index 4990fba6eb..d875269760 100644
--- a/drivers/ufs/ti-j721e-ufs.c
+++ b/drivers/ufs/ti-j721e-ufs.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
#include <dm/device_compat.h>
+#include <linux/bitops.h>
#include <linux/err.h>
#define UFS_SS_CTRL 0x4
diff --git a/drivers/ufs/ufs.c b/drivers/ufs/ufs.c
index 24e1bc2a19..87b4e5fc56 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>
@@ -18,6 +19,8 @@
#include <malloc.h>
#include <hexdump.h>
#include <scsi.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <linux/dma-mapping.h>
diff --git a/drivers/usb/cdns3/cdns3-ti.c b/drivers/usb/cdns3/cdns3-ti.c
index 652cd5cb17..cd7b2113ac 100644
--- a/drivers/usb/cdns3/cdns3-ti.c
+++ b/drivers/usb/cdns3/cdns3-ti.c
@@ -10,6 +10,7 @@
#include <clk.h>
#include <dm.h>
#include <dm/device_compat.h>
+#include <linux/bitops.h>
#include <linux/io.h>
#include <linux/usb/otg.h>
#include <malloc.h>
diff --git a/drivers/usb/cdns3/core.c b/drivers/usb/cdns3/core.c
index ce846488a8..ea86a25060 100644
--- a/drivers/usb/cdns3/core.c
+++ b/drivers/usb/cdns3/core.c
@@ -13,10 +13,12 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <dm/device-internal.h>
#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/cdns3/drd.h b/drivers/usb/cdns3/drd.h
index 815b93f2fb..fffda7b43a 100644
--- a/drivers/usb/cdns3/drd.h
+++ b/drivers/usb/cdns3/drd.h
@@ -9,6 +9,7 @@
#ifndef __LINUX_CDNS3_DRD
#define __LINUX_CDNS3_DRD
+#include <linux/bitops.h>
#include <linux/types.h>
#include <linux/usb/otg.h>
#include "core.h"
diff --git a/drivers/usb/cdns3/ep0.c b/drivers/usb/cdns3/ep0.c
index 1957a3b91d..a08c694559 100644
--- a/drivers/usb/cdns3/ep0.c
+++ b/drivers/usb/cdns3/ep0.c
@@ -11,7 +11,10 @@
*/
#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 caed27c32f..8f81d17ec8 100644
--- a/drivers/usb/cdns3/gadget.c
+++ b/drivers/usb/cdns3/gadget.c
@@ -59,6 +59,8 @@
#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>
#include <linux/compat.h>
diff --git a/drivers/usb/cdns3/gadget.h b/drivers/usb/cdns3/gadget.h
index 3d5242b331..8803fa48bd 100644
--- a/drivers/usb/cdns3/gadget.h
+++ b/drivers/usb/cdns3/gadget.h
@@ -11,6 +11,7 @@
*/
#ifndef __LINUX_CDNS3_GADGET
#define __LINUX_CDNS3_GADGET
+#include <linux/bitops.h>
#include <linux/usb/gadget.h>
/*
diff --git a/drivers/usb/common/fsl-dt-fixup.c b/drivers/usb/common/fsl-dt-fixup.c
index 6debfff513..0759ec774a 100644
--- a/drivers/usb/common/fsl-dt-fixup.c
+++ b/drivers/usb/common/fsl-dt-fixup.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <log.h>
#include <usb.h>
#include <asm/io.h>
#include <hwconfig.h>
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 0972e458eb..8d418c9412 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -19,6 +19,8 @@
#include <dwc3-uboot.h>
#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/core.h b/drivers/usb/dwc3/core.h
index 7f45a9c459..2b4c51a406 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 175866cf4d..484e7a7b8c 100644
--- a/drivers/usb/dwc3/dwc3-generic.c
+++ b/drivers/usb/dwc3/dwc3-generic.c
@@ -9,11 +9,13 @@
#include <common.h>
#include <cpu_func.h>
+#include <log.h>
#include <asm-generic/io.h>
#include <dm.h>
#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/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c
index de964d6c10..6567502cdd 100644
--- a/drivers/usb/dwc3/dwc3-meson-g12a.c
+++ b/drivers/usb/dwc3/dwc3-meson-g12a.c
@@ -7,12 +7,14 @@
*/
#include <common.h>
+#include <log.h>
#include <asm-generic/io.h>
#include <dm.h>
#include <dm/device-internal.h>
#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/ep0.c b/drivers/usb/dwc3/ep0.c
index 4af58941d8..385bed3e34 100644
--- a/drivers/usb/dwc3/ep0.c
+++ b/drivers/usb/dwc3/ep0.c
@@ -15,6 +15,7 @@
#include <common.h>
#include <cpu_func.h>
#include <dm/device_compat.h>
+#include <linux/bug.h>
#include <linux/kernel.h>
#include <linux/list.h>
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index e445c705f1..2aec874e1d 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -15,10 +15,12 @@
#include <common.h>
#include <cpu_func.h>
+#include <log.h>
#include <malloc.h>
#include <dm/device_compat.h>
#include <dm/devres.h>
#include <linux/bug.h>
+#include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <linux/list.h>
diff --git a/drivers/usb/dwc3/samsung_usb_phy.c b/drivers/usb/dwc3/samsung_usb_phy.c
index 677061458c..abbd413689 100644
--- a/drivers/usb/dwc3/samsung_usb_phy.c
+++ b/drivers/usb/dwc3/samsung_usb_phy.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <asm/arch/power.h>
#include <asm/arch/xhci-exynos.h>
+#include <linux/delay.h>
void exynos5_usb3_phy_init(struct exynos_usb3_phy *phy)
{
diff --git a/drivers/usb/dwc3/ti_usb_phy.c b/drivers/usb/dwc3/ti_usb_phy.c
index 6b0166a1e0..f8ab06482c 100644
--- a/drivers/usb/dwc3/ti_usb_phy.c
+++ b/drivers/usb/dwc3/ti_usb_phy.c
@@ -21,6 +21,8 @@
#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>
#include <asm/arch/sys_proto.h>
diff --git a/drivers/usb/emul/sandbox_flash.c b/drivers/usb/emul/sandbox_flash.c
index 399d1d3c17..9c305f46e9 100644
--- a/drivers/usb/emul/sandbox_flash.c
+++ b/drivers/usb/emul/sandbox_flash.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <os.h>
#include <scsi.h>
#include <usb.h>
diff --git a/drivers/usb/emul/sandbox_hub.c b/drivers/usb/emul/sandbox_hub.c
index 7f150340c2..21bf3bda48 100644
--- a/drivers/usb/emul/sandbox_hub.c
+++ b/drivers/usb/emul/sandbox_hub.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <usb.h>
#include <dm/device-internal.h>
diff --git a/drivers/usb/emul/sandbox_keyb.c b/drivers/usb/emul/sandbox_keyb.c
index 32bc9a1698..f562fb7eca 100644
--- a/drivers/usb/emul/sandbox_keyb.c
+++ b/drivers/usb/emul/sandbox_keyb.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <os.h>
#include <scsi.h>
#include <usb.h>
diff --git a/drivers/usb/emul/usb-emul-uclass.c b/drivers/usb/emul/usb-emul-uclass.c
index 50da6bda8e..e3419e2fd4 100644
--- a/drivers/usb/emul/usb-emul-uclass.c
+++ b/drivers/usb/emul/usb-emul-uclass.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <usb.h>
#include <dm/device-internal.h>
diff --git a/drivers/usb/eth/asix.c b/drivers/usb/eth/asix.c
index 3a8ec0bf2d..db75ae2498 100644
--- a/drivers/usb/eth/asix.c
+++ b/drivers/usb/eth/asix.c
@@ -7,9 +7,12 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
+#include <net.h>
#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 00706bea86..381bef2bed 100644
--- a/drivers/usb/eth/asix88179.c
+++ b/drivers/usb/eth/asix88179.c
@@ -7,8 +7,10 @@
#include <common.h>
#include <dm.h>
+#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/lan75xx.c b/drivers/usb/eth/lan75xx.c
index 418139d43a..46b92e8d68 100644
--- a/drivers/usb/eth/lan75xx.c
+++ b/drivers/usb/eth/lan75xx.c
@@ -4,7 +4,9 @@
*/
#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 e8ee6650bc..e34ad2603f 100644
--- a/drivers/usb/eth/lan78xx.c
+++ b/drivers/usb/eth/lan78xx.c
@@ -4,7 +4,10 @@
*/
#include <dm.h>
+#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.c b/drivers/usb/eth/lan7x.c
index 21786e1bdf..0a283619ae 100644
--- a/drivers/usb/eth/lan7x.c
+++ b/drivers/usb/eth/lan7x.c
@@ -4,9 +4,11 @@
*/
#include <dm.h>
+#include <log.h>
#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/lan7x.h b/drivers/usb/eth/lan7x.h
index 7af610be37..f71e8c7268 100644
--- a/drivers/usb/eth/lan7x.h
+++ b/drivers/usb/eth/lan7x.h
@@ -4,7 +4,11 @@
*/
#include <console.h>
+#include <time.h>
#include <watchdog.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
+#include <linux/errno.h>
/* USB Vendor Requests */
#define USB_VENDOR_REQUEST_WRITE_REGISTER 0xA0
@@ -122,6 +126,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/drivers/usb/eth/mcs7830.c b/drivers/usb/eth/mcs7830.c
index 75c45ee0ae..0cb7dbc8fb 100644
--- a/drivers/usb/eth/mcs7830.c
+++ b/drivers/usb/eth/mcs7830.c
@@ -12,6 +12,9 @@
#include <common.h>
#include <dm.h>
#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 e5f73e3d4c..61b8683230 100644
--- a/drivers/usb/eth/r8152.c
+++ b/drivers/usb/eth/r8152.c
@@ -7,9 +7,12 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#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.h b/drivers/usb/eth/r8152.h
index b6df535a83..09f1c6178b 100644
--- a/drivers/usb/eth/r8152.h
+++ b/drivers/usb/eth/r8152.h
@@ -7,6 +7,7 @@
#ifndef _RTL8152_ETH_H
#define _RTL8152_ETH_H
+#include <linux/bitops.h>
#define R8152_BASE_NAME "r8152"
#define PLA_IDR 0xc000
diff --git a/drivers/usb/eth/r8152_fw.c b/drivers/usb/eth/r8152_fw.c
index 4bf4066d7a..3ebbd533cc 100644
--- a/drivers/usb/eth/r8152_fw.c
+++ b/drivers/usb/eth/r8152_fw.c
@@ -6,6 +6,8 @@
#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/eth/smsc95xx.c b/drivers/usb/eth/smsc95xx.c
index 25f69a061b..d3532df141 100644
--- a/drivers/usb/eth/smsc95xx.c
+++ b/drivers/usb/eth/smsc95xx.c
@@ -9,10 +9,13 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include <memalign.h>
+#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/eth/usb_ether.c b/drivers/usb/eth/usb_ether.c
index 3aca9ac265..e368ecda0d 100644
--- a/drivers/usb/eth/usb_ether.c
+++ b/drivers/usb/eth/usb_ether.c
@@ -6,8 +6,11 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.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/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index 13dec517f6..1feed417d6 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -15,6 +15,7 @@
#include <common.h>
#include <dm/devres.h>
+#include <linux/bug.h>
#include <linux/err.h>
#include <linux/errno.h>
#include <asm/io.h>
diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c
index dffa5117f9..7d51821497 100644
--- a/drivers/usb/gadget/atmel_usba_udc.c
+++ b/drivers/usb/gadget/atmel_usba_udc.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <linux/bitops.h>
#include <linux/errno.h>
#include <asm/gpio.h>
#include <asm/hardware.h>
diff --git a/drivers/usb/gadget/bcm_udc_otg_phy.c b/drivers/usb/gadget/bcm_udc_otg_phy.c
index 3ecb669507..c89cd57c25 100644
--- a/drivers/usb/gadget/bcm_udc_otg_phy.c
+++ b/drivers/usb/gadget/bcm_udc_otg_phy.c
@@ -8,6 +8,7 @@
#include <asm/io.h>
#include <asm/arch/sysmap.h>
#include <asm/kona-common/clk.h>
+#include <linux/delay.h>
#include "dwc2_udc_otg_priv.h"
#include "bcm_udc_otg.h"
diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c
index d9cfff3a29..cdbdbcc5ca 100644
--- a/drivers/usb/gadget/ci_udc.c
+++ b/drivers/usb/gadget/ci_udc.c
@@ -14,6 +14,8 @@
#include <net.h>
#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/composite.c b/drivers/usb/gadget/composite.c
index b2b279358e..91ed7fcec5 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -7,8 +7,10 @@
*/
#undef DEBUG
+#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/core.c b/drivers/usb/gadget/core.c
index 7e1e51db96..3781d25fd6 100644
--- a/drivers/usb/gadget/core.c
+++ b/drivers/usb/gadget/core.c
@@ -15,6 +15,7 @@
* Bruce Balden <balden@lineo.com>
*/
+#include <log.h>
#include <malloc.h>
#include <serial.h>
#include <usbdevice.h>
diff --git a/drivers/usb/gadget/designware_udc.c b/drivers/usb/gadget/designware_udc.c
index 70c5c678c3..7fc5d27d43 100644
--- a/drivers/usb/gadget/designware_udc.c
+++ b/drivers/usb/gadget/designware_udc.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <serial.h>
#include <asm/io.h>
+#include <linux/delay.h>
#include <env.h>
#include <usbdevice.h>
diff --git a/drivers/usb/gadget/dwc2_udc_otg.c b/drivers/usb/gadget/dwc2_udc_otg.c
index 9f21af2923..eaa5dcb9b1 100644
--- a/drivers/usb/gadget/dwc2_udc_otg.c
+++ b/drivers/usb/gadget/dwc2_udc_otg.c
@@ -21,10 +21,13 @@
#include <clk.h>
#include <dm.h>
#include <generic-phy.h>
+#include <log.h>
#include <malloc.h>
#include <reset.h>
#include <dm/device_compat.h>
#include <dm/devres.h>
+#include <linux/bug.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/list.h>
diff --git a/drivers/usb/gadget/dwc2_udc_otg_phy.c b/drivers/usb/gadget/dwc2_udc_otg_phy.c
index c4338af0d7..7f8e9564b9 100644
--- a/drivers/usb/gadget/dwc2_udc_otg_phy.c
+++ b/drivers/usb/gadget/dwc2_udc_otg_phy.c
@@ -18,6 +18,7 @@
*/
#include <common.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/list.h>
#include <malloc.h>
diff --git a/drivers/usb/gadget/dwc2_udc_otg_regs.h b/drivers/usb/gadget/dwc2_udc_otg_regs.h
index 434db5ba39..2eda5c3720 100644
--- a/drivers/usb/gadget/dwc2_udc_otg_regs.h
+++ b/drivers/usb/gadget/dwc2_udc_otg_regs.h
@@ -11,6 +11,7 @@
#define __ASM_ARCH_REGS_USB_OTG_HS_H
/* USB2.0 OTG Controller register */
+#include <linux/bitops.h>
struct dwc2_usbotg_phy {
u32 phypwr;
u32 phyclk;
diff --git a/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c b/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c
index d4fbb75cc9..1c0505eb28 100644
--- a/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c
+++ b/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c
@@ -19,6 +19,8 @@
#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/ether.c b/drivers/usb/gadget/ether.c
index 8533abfd93..6f04523f15 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -10,6 +10,8 @@
#include <common.h>
#include <console.h>
#include <env.h>
+#include <log.h>
+#include <part.h>
#include <linux/errno.h>
#include <linux/netdevice.h>
#include <linux/usb/ch9.h>
diff --git a/drivers/usb/gadget/f_dfu.c b/drivers/usb/gadget/f_dfu.c
index a4a57ba5f5..4bedc7d3a1 100644
--- a/drivers/usb/gadget/f_dfu.c
+++ b/drivers/usb/gadget/f_dfu.c
@@ -17,6 +17,7 @@
#include <env.h>
#include <errno.h>
#include <common.h>
+#include <log.h>
#include <malloc.h>
#include <linux/usb/ch9.h>
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index fc27dbe8de..384c0f6f6e 100644
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -9,11 +9,13 @@
* Copyright 2014 Linaro, Ltd.
* Rob Herring <robh@kernel.org>
*/
+#include <command.h>
#include <config.h>
#include <common.h>
#include <env.h>
#include <errno.h>
#include <fastboot.h>
+#include <log.h>
#include <malloc.h>
#include <linux/usb/ch9.h>
#include <linux/usb/gadget.h>
diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c
index 5250fc8b26..439a31c255 100644
--- a/drivers/usb/gadget/f_mass_storage.c
+++ b/drivers/usb/gadget/f_mass_storage.c
@@ -241,11 +241,13 @@
#include <config.h>
#include <hexdump.h>
+#include <log.h>
#include <malloc.h>
#include <common.h>
#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/f_rockusb.c b/drivers/usb/gadget/f_rockusb.c
index 1cfeabcd31..9ae02ae78c 100644
--- a/drivers/usb/gadget/f_rockusb.c
+++ b/drivers/usb/gadget/f_rockusb.c
@@ -4,12 +4,15 @@
*
* Eddie Cai <eddie.cai.linux@gmail.com>
*/
+#include <command.h>
#include <config.h>
#include <common.h>
#include <env.h>
#include <errno.h>
+#include <log.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/usb/gadget/f_sdp.c b/drivers/usb/gadget/f_sdp.c
index 1732a3acf1..f2fe89d2a6 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 ee646fdd5c..88fc87f2e9 100644
--- a/drivers/usb/gadget/f_thor.c
+++ b/drivers/usb/gadget/f_thor.c
@@ -18,9 +18,12 @@
#include <errno.h>
#include <common.h>
#include <console.h>
+#include <init.h>
+#include <log.h>
#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 0866ef6531..af43433d88 100644
--- a/drivers/usb/gadget/fotg210.c
+++ b/drivers/usb/gadget/fotg210.c
@@ -10,9 +10,11 @@
#include <command.h>
#include <config.h>
#include <cpu_func.h>
+#include <log.h>
#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/g_dnl.c b/drivers/usb/gadget/g_dnl.c
index 7a51b53f24..86fdd16b01 100644
--- a/drivers/usb/gadget/g_dnl.c
+++ b/drivers/usb/gadget/g_dnl.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <log.h>
#include <malloc.h>
#include <mmc.h>
diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c
index 6e1e57f9fd..d19ac1d035 100644
--- a/drivers/usb/gadget/pxa25x_udc.c
+++ b/drivers/usb/gadget/pxa25x_udc.c
@@ -18,15 +18,18 @@
#include <common.h>
#include <errno.h>
+#include <log.h>
#include <asm/byteorder.h>
#include <asm/system.h>
#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>
#include <asm/arch/pxa.h>
+#include <linux/delay.h>
#include <linux/usb/ch9.h>
#include <linux/usb/gadget.h>
diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c
index 15c43782b8..ba362b8f25 100644
--- a/drivers/usb/gadget/pxa27x_udc.c
+++ b/drivers/usb/gadget/pxa27x_udc.c
@@ -13,6 +13,7 @@
#include <asm/byteorder.h>
#include <asm/io.h>
#include <usbdevice.h>
+#include <linux/delay.h>
#include <usb/pxa27x_udc.h>
#include <usb/udc.h>
diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c
index eec639f8c0..13c327ea38 100644
--- a/drivers/usb/gadget/rndis.c
+++ b/drivers/usb/gadget/rndis.c
@@ -19,6 +19,7 @@
*/
#include <common.h>
+#include <log.h>
#include <net.h>
#include <malloc.h>
#include <linux/types.h>
diff --git a/drivers/usb/gadget/storage_common.c b/drivers/usb/gadget/storage_common.c
index f40779b13a..5674e8fe49 100644
--- a/drivers/usb/gadget/storage_common.c
+++ b/drivers/usb/gadget/storage_common.c
@@ -268,6 +268,7 @@ struct interrupt_data {
struct device_attribute { int i; };
#define ETOOSMALL 525
+#include <log.h>
#include <usb_mass_storage.h>
#include <dm/device_compat.h>
diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c
index f25ed2dab0..cefe9d83b1 100644
--- a/drivers/usb/host/dwc2.c
+++ b/drivers/usb/host/dwc2.c
@@ -10,14 +10,17 @@
#include <dm.h>
#include <errno.h>
#include <generic-phy.h>
+#include <log.h>
#include <malloc.h>
#include <memalign.h>
#include <phys2bus.h>
#include <usb.h>
#include <usbroothubdes.h>
#include <wait_bit.h>
+#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/dwc3-sti-glue.c b/drivers/usb/host/dwc3-sti-glue.c
index 99d4e29414..a72ab20168 100644
--- a/drivers/usb/host/dwc3-sti-glue.c
+++ b/drivers/usb/host/dwc3-sti-glue.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <dm.h>
#include <errno.h>
diff --git a/drivers/usb/host/ehci-armada100.c b/drivers/usb/host/ehci-armada100.c
index 85a8adf806..2ce9f27b86 100644
--- a/drivers/usb/host/ehci-armada100.c
+++ b/drivers/usb/host/ehci-armada100.c
@@ -11,6 +11,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/io.h>
#include <usb.h>
#include "ehci.h"
diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c
index 67eec0e0bb..f9083d9a64 100644
--- a/drivers/usb/host/ehci-atmel.c
+++ b/drivers/usb/host/ehci-atmel.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <usb.h>
#include <asm/io.h>
diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c
index fabc662eb6..0b0b2137c7 100644
--- a/drivers/usb/host/ehci-exynos.c
+++ b/drivers/usb/host/ehci-exynos.c
@@ -9,6 +9,8 @@
#include <common.h>
#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 a01da4da76..b61b5382df 100644
--- a/drivers/usb/host/ehci-faraday.c
+++ b/drivers/usb/host/ehci-faraday.c
@@ -7,8 +7,10 @@
*/
#include <common.h>
+#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 ced295ef0f..ac6c5b5845 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -9,9 +9,11 @@
#include <common.h>
#include <env.h>
+#include <log.h>
#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-generic.c b/drivers/usb/host/ehci-generic.c
index 0643681846..304a3437d5 100644
--- a/drivers/usb/host/ehci-generic.c
+++ b/drivers/usb/host/ehci-generic.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <clk.h>
+#include <log.h>
#include <dm/device_compat.h>
#include <dm/devres.h>
#include <dm/ofnode.h>
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index a2a85db1e7..f79f06320b 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -10,7 +10,9 @@
#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>
#include <usb.h>
#include <asm/io.h>
@@ -19,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 5a9bd549e3..8fe685af26 100644
--- a/drivers/usb/host/ehci-marvell.c
+++ b/drivers/usb/host/ehci-marvell.c
@@ -6,8 +6,10 @@
*/
#include <common.h>
+#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 0b32728c57..212b362332 100644
--- a/drivers/usb/host/ehci-mx5.c
+++ b/drivers/usb/host/ehci-mx5.c
@@ -5,9 +5,11 @@
*/
#include <common.h>
+#include <log.h>
#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 04eb3c006d..24f8ad7af8 100644
--- a/drivers/usb/host/ehci-mx6.c
+++ b/drivers/usb/host/ehci-mx6.c
@@ -5,10 +5,12 @@
*/
#include <common.h>
+#include <log.h>
#include <usb.h>
#include <errno.h>
#include <wait_bit.h>
#include <linux/compiler.h>
+#include <linux/delay.h>
#include <usb/ehci-ci.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c
index 4941cb9457..d0b7ac512e 100644
--- a/drivers/usb/host/ehci-mxc.c
+++ b/drivers/usb/host/ehci-mxc.c
@@ -8,6 +8,7 @@
#include <usb.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
+#include <linux/delay.h>
#include <usb/ehci-ci.h>
#include <errno.h>
diff --git a/drivers/usb/host/ehci-mxs.c b/drivers/usb/host/ehci-mxs.c
index 8e8f6d4928..824c620e63 100644
--- a/drivers/usb/host/ehci-mxs.c
+++ b/drivers/usb/host/ehci-mxs.c
@@ -10,6 +10,7 @@
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
#include <errno.h>
+#include <linux/delay.h>
#include "ehci.h"
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index ab459c8cc9..5fee537140 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -11,7 +11,9 @@
*/
#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-pci.c b/drivers/usb/host/ehci-pci.c
index 04e7c5e37f..7dd5c33c13 100644
--- a/drivers/usb/host/ehci-pci.c
+++ b/drivers/usb/host/ehci-pci.c
@@ -7,6 +7,8 @@
#include <common.h>
#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-rmobile.c b/drivers/usb/host/ehci-rmobile.c
index 4868581066..130b73dfe4 100644
--- a/drivers/usb/host/ehci-rmobile.c
+++ b/drivers/usb/host/ehci-rmobile.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <asm/io.h>
#include <asm/arch/ehci-rmobile.h>
+#include <linux/delay.h>
#include "ehci.h"
#if defined(CONFIG_R8A7740)
diff --git a/drivers/usb/host/ehci-spear.c b/drivers/usb/host/ehci-spear.c
index f93ffa8d9f..3e87e0c7fd 100644
--- a/drivers/usb/host/ehci-spear.c
+++ b/drivers/usb/host/ehci-spear.c
@@ -9,8 +9,10 @@
*/
#include <common.h>
+#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 702f3b5670..d81f4a03f1 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -7,6 +7,8 @@
#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 a16cf135e3..562207d3d2 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>
@@ -18,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/ehci.h b/drivers/usb/host/ehci.h
index 66c1d61dbf..8e0755423a 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -298,4 +298,5 @@ extern struct dm_usb_ops ehci_usb_ops;
int ehci_setup_phy(struct udevice *dev, struct phy *phy, int index);
int ehci_shutdown_phy(struct udevice *dev, struct phy *phy);
+#include <linux/bitops.h>
#endif /* USB_EHCI_H */
diff --git a/drivers/usb/host/ohci-generic.c b/drivers/usb/host/ohci-generic.c
index 04d5fdb2a8..631711a9e8 100644
--- a/drivers/usb/host/ohci-generic.c
+++ b/drivers/usb/host/ohci-generic.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#include <log.h>
#include <dm/device_compat.h>
#include <dm/devres.h>
#include <dm/ofnode.h>
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index c94960f2cc..c62d8feecc 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -32,6 +32,8 @@
#include <asm/byteorder.h>
#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/ohci-lpc32xx.c b/drivers/usb/host/ohci-lpc32xx.c
index 34a4b00dda..afb9e29f78 100644
--- a/drivers/usb/host/ohci-lpc32xx.c
+++ b/drivers/usb/host/ohci-lpc32xx.c
@@ -10,6 +10,8 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <init.h>
+#include <log.h>
#include <wait_bit.h>
#include <asm/io.h>
#include <asm/arch/cpu.h>
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c
index 8fc9d211db..37aa2c55f2 100644
--- a/drivers/usb/host/r8a66597-hcd.c
+++ b/drivers/usb/host/r8a66597-hcd.c
@@ -8,9 +8,11 @@
#include <common.h>
#include <console.h>
#include <dm.h>
+#include <log.h>
#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/r8a66597.h b/drivers/usb/host/r8a66597.h
index b6110d6b3f..625d4938cc 100644
--- a/drivers/usb/host/r8a66597.h
+++ b/drivers/usb/host/r8a66597.h
@@ -8,6 +8,7 @@
#ifndef __R8A66597_H__
#define __R8A66597_H__
+#include <linux/bitops.h>
#define SYSCFG0 0x00
#define SYSCFG1 0x02
#define SYSSTS0 0x04
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c
index e08da6130b..7c823f241a 100644
--- a/drivers/usb/host/sl811-hcd.c
+++ b/drivers/usb/host/sl811-hcd.c
@@ -21,6 +21,7 @@
#include <common.h>
#include <mpc8xx.h>
#include <usb.h>
+#include <linux/delay.h>
#include "sl811.h"
#include "../../../board/kup/common/kup.h"
diff --git a/drivers/usb/host/usb-sandbox.c b/drivers/usb/host/usb-sandbox.c
index 28ee4b093b..beb62ebc0c 100644
--- a/drivers/usb/host/usb-sandbox.c
+++ b/drivers/usb/host/usb-sandbox.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <usb.h>
#include <dm/root.h>
diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c
index 5e423012df..cb79dfbbd5 100644
--- a/drivers/usb/host/usb-uclass.c
+++ b/drivers/usb/host/usb-uclass.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <memalign.h>
#include <usb.h>
#include <dm/device-internal.h>
diff --git a/drivers/usb/host/utmi-armada100.c b/drivers/usb/host/utmi-armada100.c
index 8a40f66447..5d66e5881f 100644
--- a/drivers/usb/host/utmi-armada100.c
+++ b/drivers/usb/host/utmi-armada100.c
@@ -14,6 +14,7 @@
#include <asm/arch/cpu.h>
#include <asm/arch/armada100.h>
#include <asm/arch/utmi-armada100.h>
+#include <linux/delay.h>
static int utmi_phy_init(void)
{
diff --git a/drivers/usb/host/xhci-dwc3.c b/drivers/usb/host/xhci-dwc3.c
index 563db1a426..cf72f0236d 100644
--- a/drivers/usb/host/xhci-dwc3.c
+++ b/drivers/usb/host/xhci-dwc3.c
@@ -10,8 +10,10 @@
#include <common.h>
#include <dm.h>
#include <generic-phy.h>
+#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 25c30c24f0..1705accbde 100644
--- a/drivers/usb/host/xhci-exynos5.c
+++ b/drivers/usb/host/xhci-exynos5.c
@@ -15,6 +15,8 @@
#include <common.h>
#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-fsl.c b/drivers/usb/host/xhci-fsl.c
index 9e0c1b76e4..d8fb2c5345 100644
--- a/drivers/usb/host/xhci-fsl.c
+++ b/drivers/usb/host/xhci-fsl.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <log.h>
#include <usb.h>
#include <linux/errno.h>
#include <linux/compat.h>
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index 93450ee3b7..2d968aafb0 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -16,10 +16,12 @@
#include <common.h>
#include <cpu_func.h>
#include <dm.h>
+#include <log.h>
#include <asm/byteorder.h>
#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-mvebu.c b/drivers/usb/host/xhci-mvebu.c
index 2b871046ae..5fb74848c2 100644
--- a/drivers/usb/host/xhci-mvebu.c
+++ b/drivers/usb/host/xhci-mvebu.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
#include <fdtdec.h>
+#include <log.h>
#include <usb.h>
#include <power/regulator.h>
#include <asm/gpio.h>
diff --git a/drivers/usb/host/xhci-omap.c b/drivers/usb/host/xhci-omap.c
index 25b195f7d1..501129d769 100644
--- a/drivers/usb/host/xhci-omap.c
+++ b/drivers/usb/host/xhci-omap.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <log.h>
#include <usb.h>
#include <linux/errno.h>
#include <asm/omap_common.h>
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index c1f60da541..9fb6d2f763 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -7,6 +7,8 @@
#include <common.h>
#include <dm.h>
+#include <init.h>
+#include <log.h>
#include <pci.h>
#include <usb.h>
#include <usb/xhci.h>
diff --git a/drivers/usb/host/xhci-rcar.c b/drivers/usb/host/xhci-rcar.c
index d86584b847..4964697f27 100644
--- a/drivers/usb/host/xhci-rcar.c
+++ b/drivers/usb/host/xhci-rcar.c
@@ -9,10 +9,12 @@
#include <clk.h>
#include <dm.h>
#include <fdtdec.h>
+#include <log.h>
#include <malloc.h>
#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-ring.c b/drivers/usb/host/xhci-ring.c
index 3cd6c8a0dc..86aeaab412 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -15,9 +15,11 @@
#include <common.h>
#include <cpu_func.h>
+#include <log.h>
#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-rockchip.c b/drivers/usb/host/xhci-rockchip.c
index b67722fe45..1c2bf04df3 100644
--- a/drivers/usb/host/xhci-rockchip.c
+++ b/drivers/usb/host/xhci-rockchip.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <usb.h>
#include <watchdog.h>
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index c370eb6394..ebd2954571 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -22,12 +22,16 @@
#include <common.h>
#include <cpu_func.h>
#include <dm.h>
+#include <log.h>
#include <asm/byteorder.h>
#include <usb.h>
#include <malloc.h>
#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>
#include <usb/xhci.h>
diff --git a/drivers/usb/musb-new/am35x.c b/drivers/usb/musb-new/am35x.c
index 6e5be90fe5..0a52e09e19 100644
--- a/drivers/usb/musb-new/am35x.c
+++ b/drivers/usb/musb-new/am35x.c
@@ -26,6 +26,8 @@
#else
#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 2ddcf33b5f..67488ddb50 100644
--- a/drivers/usb/musb-new/da8xx.c
+++ b/drivers/usb/musb-new/da8xx.c
@@ -15,11 +15,13 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <dm/device-internal.h>
#include <dm/device_compat.h>
#include <dm/lists.h>
#include <asm/arch/hardware.h>
#include <asm/arch/da8xx-usb.h>
+#include <linux/delay.h>
#include <linux/usb/otg.h>
#include <asm/omap_musb.h>
#include <generic-phy.h>
diff --git a/drivers/usb/musb-new/linux-compat.h b/drivers/usb/musb-new/linux-compat.h
index f366ae58e8..733b197f59 100644
--- a/drivers/usb/musb-new/linux-compat.h
+++ b/drivers/usb/musb-new/linux-compat.h
@@ -2,6 +2,7 @@
#define __LINUX_COMPAT_H__
#include <malloc.h>
+#include <linux/delay.h>
#include <linux/list.h>
#include <linux/compat.h>
diff --git a/drivers/usb/musb-new/mt85xx.c b/drivers/usb/musb-new/mt85xx.c
index 131fd7dd79..c281c38a28 100644
--- a/drivers/usb/musb-new/mt85xx.c
+++ b/drivers/usb/musb-new/mt85xx.c
@@ -14,6 +14,7 @@
#include <dm.h>
#include <dm/lists.h>
#include <dm/root.h>
+#include <linux/delay.h>
#include <linux/usb/musb.h>
#include <usb.h>
#include "linux-compat.h"
diff --git a/drivers/usb/musb-new/musb_core.c b/drivers/usb/musb-new/musb_core.c
index f678aa4826..961de99795 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>
@@ -80,6 +81,8 @@
#else
#include <common.h>
#include <usb.h>
+#include <linux/bitops.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 35d2123ddd..8ba98d8c0e 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>
@@ -22,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_gadget_ep0.c b/drivers/usb/musb-new/musb_gadget_ep0.c
index 79e8222e3b..93f43ba471 100644
--- a/drivers/usb/musb-new/musb_gadget_ep0.c
+++ b/drivers/usb/musb-new/musb_gadget_ep0.c
@@ -9,6 +9,7 @@
*/
#ifndef __UBOOT__
+#include <log.h>
#include <dm/device_compat.h>
#include <linux/kernel.h>
#include <linux/list.h>
diff --git a/drivers/usb/musb-new/musb_host.c b/drivers/usb/musb-new/musb_host.c
index b98f0ed40e..5fa013659c 100644
--- a/drivers/usb/musb-new/musb_host.c
+++ b/drivers/usb/musb-new/musb_host.c
@@ -23,6 +23,7 @@
#else
#include <common.h>
#include <usb.h>
+#include <linux/bug.h>
#include "linux-compat.h"
#include "usb-compat.h"
#endif
diff --git a/drivers/usb/musb-new/musb_uboot.c b/drivers/usb/musb-new/musb_uboot.c
index 72f14b9343..988071a61d 100644
--- a/drivers/usb/musb-new/musb_uboot.c
+++ b/drivers/usb/musb-new/musb_uboot.c
@@ -2,6 +2,7 @@
#include <console.h>
#include <malloc.h>
#include <watchdog.h>
+#include <linux/delay.h>
#include <linux/err.h>
#include <linux/errno.h>
#include <linux/usb/ch9.h>
diff --git a/drivers/usb/musb-new/omap2430.c b/drivers/usb/musb-new/omap2430.c
index 0d34dcfc5d..da63cc2c22 100644
--- a/drivers/usb/musb-new/omap2430.c
+++ b/drivers/usb/musb-new/omap2430.c
@@ -10,6 +10,7 @@
*/
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <serial.h>
#include <dm/device-internal.h>
#include <dm/device_compat.h>
diff --git a/drivers/usb/musb-new/pic32.c b/drivers/usb/musb-new/pic32.c
index c7867fef8a..74a841af46 100644
--- a/drivers/usb/musb-new/pic32.c
+++ b/drivers/usb/musb-new/pic32.c
@@ -11,6 +11,8 @@
#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"
#include "musb_core.h"
diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c
index 98bf736978..53c336fc3f 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>
@@ -29,6 +30,8 @@
#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"
#include "musb_core.h"
diff --git a/drivers/usb/musb-new/ti-musb.c b/drivers/usb/musb-new/ti-musb.c
index 608facefa3..f4f26d86b3 100644
--- a/drivers/usb/musb-new/ti-musb.c
+++ b/drivers/usb/musb-new/ti-musb.c
@@ -9,6 +9,7 @@
#include <command.h>
#include <console.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <linux/usb/otg.h>
#include <dm/device-internal.h>
diff --git a/drivers/usb/musb/am35x.c b/drivers/usb/musb/am35x.c
index 0617364f35..f945f1f5e2 100644
--- a/drivers/usb/musb/am35x.c
+++ b/drivers/usb/musb/am35x.c
@@ -10,6 +10,7 @@
*/
#include <common.h>
+#include <linux/delay.h>
#include "am35x.h"
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index c6d47bef56..147b2eb929 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <linux/bitops.h>
#include "musb_core.h"
struct musb_regs *musbr;
diff --git a/drivers/usb/musb/musb_hcd.c b/drivers/usb/musb/musb_hcd.c
index adcd319b6d..afbc648883 100644
--- a/drivers/usb/musb/musb_hcd.c
+++ b/drivers/usb/musb/musb_hcd.c
@@ -8,7 +8,9 @@
*/
#include <common.h>
+#include <log.h>
#include <usb.h>
+#include <linux/delay.h>
#include "musb_hcd.h"
/* MSC control transfers */
diff --git a/drivers/usb/musb/musb_udc.c b/drivers/usb/musb/musb_udc.c
index 4d7723621d..d901f8777c 100644
--- a/drivers/usb/musb/musb_udc.c
+++ b/drivers/usb/musb/musb_udc.c
@@ -41,6 +41,7 @@
#include <hang.h>
#include <serial.h>
#include <usbdevice.h>
+#include <linux/delay.h>
#include <usb/udc.h>
#include "../gadget/ep0.h"
#include "musb_core.h"
diff --git a/drivers/usb/phy/omap_usb_phy.c b/drivers/usb/phy/omap_usb_phy.c
index 9209942430..be733f39b2 100644
--- a/drivers/usb/phy/omap_usb_phy.c
+++ b/drivers/usb/phy/omap_usb_phy.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <usb.h>
#include <dm/device_compat.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <asm/omap_common.h>
#include <asm/arch/cpu.h>
diff --git a/drivers/usb/phy/rockchip_usb2_phy.c b/drivers/usb/phy/rockchip_usb2_phy.c
index ec998901ab..f1cf9160d5 100644
--- a/drivers/usb/phy/rockchip_usb2_phy.c
+++ b/drivers/usb/phy/rockchip_usb2_phy.c
@@ -5,7 +5,10 @@
#include <common.h>
#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/usb/phy/twl4030.c b/drivers/usb/phy/twl4030.c
index d2945d1417..676868bead 100644
--- a/drivers/usb/phy/twl4030.c
+++ b/drivers/usb/phy/twl4030.c
@@ -24,6 +24,7 @@
*/
#include <twl4030.h>
+#include <linux/delay.h>
/* Defines for bits in registers */
#define OPMODE_MASK (3 << 3)
diff --git a/drivers/usb/ulpi/omap-ulpi-viewport.c b/drivers/usb/ulpi/omap-ulpi-viewport.c
index 67cdebc0fc..8b930e3fa9 100644
--- a/drivers/usb/ulpi/omap-ulpi-viewport.c
+++ b/drivers/usb/ulpi/omap-ulpi-viewport.c
@@ -8,7 +8,9 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/io.h>
+#include <linux/delay.h>
#include <usb/ulpi.h>
#define OMAP_ULPI_WR_OPSEL (2 << 22)
diff --git a/drivers/usb/ulpi/ulpi-viewport.c b/drivers/usb/ulpi/ulpi-viewport.c
index a2158c9bb8..3bb152be89 100644
--- a/drivers/usb/ulpi/ulpi-viewport.c
+++ b/drivers/usb/ulpi/ulpi-viewport.c
@@ -15,6 +15,7 @@
#include <common.h>
#include <asm/io.h>
+#include <linux/delay.h>
#include <usb/ulpi.h>
/* ULPI viewport control bits */
diff --git a/drivers/usb/ulpi/ulpi.c b/drivers/usb/ulpi/ulpi.c
index e0fb43f89b..dd0da0e841 100644
--- a/drivers/usb/ulpi/ulpi.c
+++ b/drivers/usb/ulpi/ulpi.c
@@ -21,6 +21,8 @@
#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 0f066df451..2707ff59c7 100644
--- a/drivers/video/am335x-fb.c
+++ b/drivers/video/am335x-fb.c
@@ -14,6 +14,7 @@
#include <common.h>
#include <dm.h>
#include <lcd.h>
+#include <log.h>
#include <video.h>
#include <asm/arch/clock.h>
#include <asm/arch/hardware.h>
@@ -21,6 +22,7 @@
#include <asm/arch/sys_proto.h>
#include <asm/io.h>
#include <asm/utils.h>
+#include <linux/delay.h>
#include <linux/err.h>
#include "am335x-fb.h"
diff --git a/drivers/video/anx9804.c b/drivers/video/anx9804.c
index fc2f431b9c..b050c4292f 100644
--- a/drivers/video/anx9804.c
+++ b/drivers/video/anx9804.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <i2c.h>
+#include <linux/delay.h>
#include "anx98xx-edp.h"
#include "anx9804.h"
diff --git a/drivers/video/anx98xx-edp.h b/drivers/video/anx98xx-edp.h
index 64269c30bd..ece36d41ee 100644
--- a/drivers/video/anx98xx-edp.h
+++ b/drivers/video/anx98xx-edp.h
@@ -6,6 +6,7 @@
/* Registers at i2c address 0x38 */
+#include <linux/bitops.h>
#define ANX9804_HDCP_CONTROL_0_REG 0x01
#define ANX9804_SYS_CTRL1_REG 0x80
diff --git a/drivers/video/ati_radeon_fb.c b/drivers/video/ati_radeon_fb.c
index 6fce033636..c4da2e3ae7 100644
--- a/drivers/video/ati_radeon_fb.c
+++ b/drivers/video/ati_radeon_fb.c
@@ -16,6 +16,7 @@
*/
#include <common.h>
+#include <linux/delay.h>
#include <command.h>
#include <bios_emul.h>
diff --git a/drivers/video/atmel_hlcdfb.c b/drivers/video/atmel_hlcdfb.c
index 62acccedf3..35a56a8eab 100644
--- a/drivers/video/atmel_hlcdfb.c
+++ b/drivers/video/atmel_hlcdfb.c
@@ -7,7 +7,9 @@
#include <common.h>
#include <cpu_func.h>
+#include <log.h>
#include <malloc.h>
+#include <part.h>
#include <asm/io.h>
#include <asm/arch/gpio.h>
#include <asm/arch/clk.h>
@@ -18,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/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index bd2e9c0c9b..ae8ec26468 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -9,6 +9,8 @@
#include <atmel_lcd.h>
#include <dm.h>
#include <fdtdec.h>
+#include <log.h>
+#include <part.h>
#include <video.h>
#include <asm/io.h>
#include <asm/arch/gpio.h>
@@ -16,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/backlight_gpio.c b/drivers/video/backlight_gpio.c
index fb1525b478..67fed7f224 100644
--- a/drivers/video/backlight_gpio.c
+++ b/drivers/video/backlight_gpio.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <backlight.h>
+#include <log.h>
#include <asm/gpio.h>
struct gpio_backlight_priv {
diff --git a/drivers/video/bcm2835.c b/drivers/video/bcm2835.c
index 1d2eda084c..0888cb0019 100644
--- a/drivers/video/bcm2835.c
+++ b/drivers/video/bcm2835.c
@@ -5,9 +5,11 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#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/bridge/anx6345.c b/drivers/video/bridge/anx6345.c
index 3e3f0e2ce6..1c5270ff05 100644
--- a/drivers/video/bridge/anx6345.c
+++ b/drivers/video/bridge/anx6345.c
@@ -8,7 +8,9 @@
#include <errno.h>
#include <i2c.h>
#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 3c5bf7b659..8399c6f74c 100644
--- a/drivers/video/bridge/ps862x.c
+++ b/drivers/video/bridge/ps862x.c
@@ -8,7 +8,9 @@
#include <dm.h>
#include <errno.h>
#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/ptn3460.c b/drivers/video/bridge/ptn3460.c
index 59f0649646..4760f04108 100644
--- a/drivers/video/bridge/ptn3460.c
+++ b/drivers/video/bridge/ptn3460.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <video_bridge.h>
static int ptn3460_attach(struct udevice *dev)
diff --git a/drivers/video/bridge/video-bridge-uclass.c b/drivers/video/bridge/video-bridge-uclass.c
index 5fecb4cfd5..389b02cdcb 100644
--- a/drivers/video/bridge/video-bridge-uclass.c
+++ b/drivers/video/bridge/video-bridge-uclass.c
@@ -8,7 +8,9 @@
#include <dm.h>
#include <errno.h>
#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 c23421d25b..8e8fe9d9b3 100644
--- a/drivers/video/broadwell_igd.c
+++ b/drivers/video/broadwell_igd.c
@@ -7,8 +7,10 @@
#include <common.h>
#include <bios_emul.h>
+#include <bootstage.h>
#include <dm.h>
#include <init.h>
+#include <log.h>
#include <vbe.h>
#include <video.h>
#include <asm/cpu.h>
@@ -18,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/bus_vcxk.c b/drivers/video/bus_vcxk.c
index e87c66d515..2a72d23eb8 100644
--- a/drivers/video/bus_vcxk.c
+++ b/drivers/video/bus_vcxk.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <bmp_layout.h>
+#include <log.h>
#include <asm/io.h>
vu_char *vcxk_bws = ((vu_char *) (CONFIG_SYS_VCXK_BASE));
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 5442bac4c6..6495e22b1a 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -65,10 +65,12 @@
*/
#include <common.h>
+#include <command.h>
#include <cpu_func.h>
#include <env.h>
#include <fdtdec.h>
#include <gzip.h>
+#include <log.h>
#include <version.h>
#include <malloc.h>
#include <video.h>
@@ -1710,7 +1712,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/console_truetype.c b/drivers/video/console_truetype.c
index 6d7661db89..5f7f03904b 100644
--- a/drivers/video/console_truetype.c
+++ b/drivers/video/console_truetype.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <video.h>
#include <video_console.h>
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
index 5fb68865ef..4984dda847 100644
--- a/drivers/video/da8xx-fb.c
+++ b/drivers/video/da8xx-fb.c
@@ -13,9 +13,11 @@
*/
#include <common.h>
+#include <log.h>
#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 bf74d6adf2..c4fbb18294 100644
--- a/drivers/video/dw_hdmi.c
+++ b/drivers/video/dw_hdmi.c
@@ -7,9 +7,11 @@
#include <common.h>
#include <fdtdec.h>
+#include <log.h>
#include <asm/io.h>
#include <i2c.h>
#include <media_bus_format.h>
+#include <linux/delay.h>
#include "dw_hdmi.h"
struct tmds_n_cts {
diff --git a/drivers/video/dw_mipi_dsi.c b/drivers/video/dw_mipi_dsi.c
index 5dd75e7ec8..b7bfbb5e50 100644
--- a/drivers/video/dw_mipi_dsi.c
+++ b/drivers/video/dw_mipi_dsi.c
@@ -20,6 +20,8 @@
#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/efi.c b/drivers/video/efi.c
index 653cb47265..47441a35a6 100644
--- a/drivers/video/efi.c
+++ b/drivers/video/efi.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
#include <efi_api.h>
+#include <log.h>
#include <vbe.h>
#include <video.h>
diff --git a/drivers/video/exynos/exynos_dp.c b/drivers/video/exynos/exynos_dp.c
index 2781f6f55b..749bde862e 100644
--- a/drivers/video/exynos/exynos_dp.c
+++ b/drivers/video/exynos/exynos_dp.c
@@ -10,6 +10,8 @@
#include <common.h>
#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 802703750f..ae500a7028 100644
--- a/drivers/video/exynos/exynos_dp_lowlevel.c
+++ b/drivers/video/exynos/exynos_dp_lowlevel.c
@@ -7,6 +7,8 @@
#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_fb.c b/drivers/video/exynos/exynos_fb.c
index 8a8c846262..d5b13a6723 100644
--- a/drivers/video/exynos/exynos_fb.c
+++ b/drivers/video/exynos/exynos_fb.c
@@ -12,6 +12,7 @@
#include <div64.h>
#include <dm.h>
#include <fdtdec.h>
+#include <log.h>
#include <linux/libfdt.h>
#include <panel.h>
#include <video.h>
diff --git a/drivers/video/exynos/exynos_mipi_dsi.c b/drivers/video/exynos/exynos_mipi_dsi.c
index ad5ef93e01..042aa9a5b9 100644
--- a/drivers/video/exynos/exynos_mipi_dsi.c
+++ b/drivers/video/exynos/exynos_mipi_dsi.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <log.h>
#include <malloc.h>
#include <fdtdec.h>
#include <dm/devres.h>
diff --git a/drivers/video/exynos/exynos_mipi_dsi_common.c b/drivers/video/exynos/exynos_mipi_dsi_common.c
index adf3d968b6..ab7d61afc8 100644
--- a/drivers/video/exynos/exynos_mipi_dsi_common.c
+++ b/drivers/video/exynos/exynos_mipi_dsi_common.c
@@ -8,6 +8,8 @@
#include <common.h>
#include <lcd.h>
+#include <log.h>
+#include <linux/delay.h>
#include <linux/err.h>
#include <asm/arch/dsim.h>
#include <asm/arch/mipi_dsim.h>
diff --git a/drivers/video/exynos/exynos_mipi_dsi_lowlevel.c b/drivers/video/exynos/exynos_mipi_dsi_lowlevel.c
index 1b6e71dfaf..8111acd9a0 100644
--- a/drivers/video/exynos/exynos_mipi_dsi_lowlevel.c
+++ b/drivers/video/exynos/exynos_mipi_dsi_lowlevel.c
@@ -11,6 +11,7 @@
#include <asm/arch/mipi_dsim.h>
#include <asm/arch/power.h>
#include <asm/arch/cpu.h>
+#include <linux/delay.h>
#include "exynos_mipi_dsi_lowlevel.h"
#include "exynos_mipi_dsi_common.h"
diff --git a/drivers/video/formike.c b/drivers/video/formike.c
index 7bc4bc6041..5cbe50d4cb 100644
--- a/drivers/video/formike.c
+++ b/drivers/video/formike.c
@@ -7,7 +7,9 @@
*/
#include <common.h>
#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/fsl_dcu_fb.c b/drivers/video/fsl_dcu_fb.c
index 076e9ea019..e9d05c9394 100644
--- a/drivers/video/fsl_dcu_fb.c
+++ b/drivers/video/fsl_dcu_fb.c
@@ -7,6 +7,7 @@
*/
#include <init.h>
+#include <asm/cache.h>
#include <asm/io.h>
#include <common.h>
#include <dm.h>
diff --git a/drivers/video/hitachi_tx18d42vm_lcd.c b/drivers/video/hitachi_tx18d42vm_lcd.c
index a57abd23f7..c6c8df6a96 100644
--- a/drivers/video/hitachi_tx18d42vm_lcd.c
+++ b/drivers/video/hitachi_tx18d42vm_lcd.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <malloc.h>
+#include <linux/delay.h>
#include <asm/gpio.h>
#include <errno.h>
diff --git a/drivers/video/ihs_video_out.c b/drivers/video/ihs_video_out.c
index 0af7c2bf44..f02fd13d28 100644
--- a/drivers/video/ihs_video_out.c
+++ b/drivers/video/ihs_video_out.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <display.h>
#include <dm.h>
+#include <log.h>
#include <regmap.h>
#include <video_osd.h>
#include <asm/gpio.h>
diff --git a/drivers/video/imx/ipu_common.c b/drivers/video/imx/ipu_common.c
index cbe1984e4f..5908b23acc 100644
--- a/drivers/video/imx/ipu_common.c
+++ b/drivers/video/imx/ipu_common.c
@@ -12,6 +12,8 @@
/* #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 5c7722962d..c2f00bff18 100644
--- a/drivers/video/imx/ipu_disp.c
+++ b/drivers/video/imx/ipu_disp.c
@@ -13,6 +13,8 @@
/* #define DEBUG */
#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/imx/mxc_ipuv3_fb.c b/drivers/video/imx/mxc_ipuv3_fb.c
index c64be38e49..4044473f99 100644
--- a/drivers/video/imx/mxc_ipuv3_fb.c
+++ b/drivers/video/imx/mxc_ipuv3_fb.c
@@ -11,6 +11,9 @@
*/
#include <common.h>
+#include <log.h>
+#include <part.h>
+#include <asm/cache.h>
#include <linux/errno.h>
#include <asm/global_data.h>
#include <linux/string.h>
diff --git a/drivers/video/ivybridge_igd.c b/drivers/video/ivybridge_igd.c
index 6b986e9358..4c57e311d1 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>
@@ -16,6 +17,7 @@
#include <asm/pci.h>
#include <asm/arch/pch.h>
#include <asm/arch/sandybridge.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/video/ld9040.c b/drivers/video/ld9040.c
index 93aea05ff8..a36bc2f06c 100644
--- a/drivers/video/ld9040.c
+++ b/drivers/video/ld9040.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <spi.h>
+#include <linux/delay.h>
static const unsigned char SEQ_USER_SETTING[] = {
0xF0, 0x5A, 0x5A
diff --git a/drivers/video/lg4573.c b/drivers/video/lg4573.c
index 997e854ef8..45df9c1347 100644
--- a/drivers/video/lg4573.c
+++ b/drivers/video/lg4573.c
@@ -6,13 +6,16 @@
*/
#include <common.h>
#include <backlight.h>
+#include <command.h>
#include <display.h>
#include <dm.h>
+#include <log.h>
#include <dm/read.h>
#include <dm/uclass-internal.h>
#include <errno.h>
#include <spi.h>
#include <asm/gpio.h>
+#include <linux/delay.h>
#define PWR_ON_DELAY_MSECS 120
@@ -208,8 +211,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/logicore_dp_tx.c b/drivers/video/logicore_dp_tx.c
index 84fafe4341..9bc4bbb85d 100644
--- a/drivers/video/logicore_dp_tx.c
+++ b/drivers/video/logicore_dp_tx.c
@@ -14,6 +14,7 @@
#include <display.h>
#include <dm.h>
#include <errno.h>
+#include <linux/delay.h>
#include "axi.h"
#include "logicore_dp_dpcd.h"
diff --git a/drivers/video/mali_dp.c b/drivers/video/mali_dp.c
index 87a75a9ca2..1e6da0e1e2 100644
--- a/drivers/video/mali_dp.c
+++ b/drivers/video/mali_dp.c
@@ -18,6 +18,7 @@
#include <fdt_support.h>
#include <clk.h>
#include <dm/device_compat.h>
+#include <linux/delay.h>
#include <linux/sizes.h>
#define MALIDP_CORE_ID 0x0018
diff --git a/drivers/video/mb862xx.c b/drivers/video/mb862xx.c
index 301c1f0df1..04e435f913 100644
--- a/drivers/video/mb862xx.c
+++ b/drivers/video/mb862xx.c
@@ -10,6 +10,7 @@
*/
#include <common.h>
+#include <linux/delay.h>
#include <asm/io.h>
#include <env.h>
@@ -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/meson/meson_dw_hdmi.c b/drivers/video/meson/meson_dw_hdmi.c
index ae2e6288f3..7b2ff94eba 100644
--- a/drivers/video/meson/meson_dw_hdmi.c
+++ b/drivers/video/meson/meson_dw_hdmi.c
@@ -8,10 +8,12 @@
#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>
#include <dm/uclass-internal.h>
+#include <linux/bitops.h>
#include <power/regulator.h>
#include <clk.h>
#include <linux/delay.h>
diff --git a/drivers/video/meson/meson_dw_hdmi.h b/drivers/video/meson/meson_dw_hdmi.h
index b13beb1f75..d507e59c06 100644
--- a/drivers/video/meson/meson_dw_hdmi.h
+++ b/drivers/video/meson/meson_dw_hdmi.h
@@ -24,6 +24,7 @@
* Bit 0 RW sw_reset_core: connects to IP's ~irstz. 1=Apply reset;
* 0=Release from reset. Default 1.
*/
+#include <linux/bitops.h>
#define HDMITX_TOP_SW_RESET (0x000)
/*
diff --git a/drivers/video/meson/meson_plane.c b/drivers/video/meson/meson_plane.c
index 8edf451f13..b367276f23 100644
--- a/drivers/video/meson/meson_plane.c
+++ b/drivers/video/meson/meson_plane.c
@@ -10,6 +10,7 @@
#include <dm.h>
#include <asm/io.h>
#include <linux/bitfield.h>
+#include <linux/bitops.h>
#include "meson_vpu.h"
diff --git a/drivers/video/meson/meson_registers.h b/drivers/video/meson/meson_registers.h
index 39e8ec8639..f6a5d1ac8c 100644
--- a/drivers/video/meson/meson_registers.h
+++ b/drivers/video/meson/meson_registers.h
@@ -7,6 +7,7 @@
#define __MESON_REGISTERS_H
/* Shift all registers by 2 */
+#include <linux/bitops.h>
#define _REG(reg) ((reg) << 2)
#define writel_bits(mask, val, addr) \
diff --git a/drivers/video/meson/meson_vclk.c b/drivers/video/meson/meson_vclk.c
index 01bfa4bcb8..cd1e69040f 100644
--- a/drivers/video/meson/meson_vclk.c
+++ b/drivers/video/meson/meson_vclk.c
@@ -9,7 +9,9 @@
#include <common.h>
#include <dm.h>
#include <edid.h>
+#include <linux/bitops.h>
#include "meson_vpu.h"
+#include <log.h>
#include <linux/iopoll.h>
#include <linux/math64.h>
diff --git a/drivers/video/meson/meson_venc.c b/drivers/video/meson/meson_venc.c
index 89e859b02a..e7366dd2fd 100644
--- a/drivers/video/meson/meson_venc.c
+++ b/drivers/video/meson/meson_venc.c
@@ -10,6 +10,7 @@
#include <dm.h>
#include <edid.h>
#include <fdtdec.h>
+#include <log.h>
#include <asm/io.h>
#include "meson_vpu.h"
diff --git a/drivers/video/meson/meson_vpu.c b/drivers/video/meson/meson_vpu.c
index ed47192bf6..4868839ff7 100644
--- a/drivers/video/meson/meson_vpu.c
+++ b/drivers/video/meson/meson_vpu.c
@@ -11,6 +11,8 @@
#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>
#include <dm/device-internal.h>
diff --git a/drivers/video/meson/meson_vpu_init.c b/drivers/video/meson/meson_vpu_init.c
index 8408c59eaa..c9808e1c63 100644
--- a/drivers/video/meson/meson_vpu_init.c
+++ b/drivers/video/meson/meson_vpu_init.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <dm.h>
#include <asm/io.h>
+#include <linux/bitops.h>
#include "meson_vpu.h"
diff --git a/drivers/video/mvebu_lcd.c b/drivers/video/mvebu_lcd.c
index 3ff5b28ae2..f3cb2bfb48 100644
--- a/drivers/video/mvebu_lcd.c
+++ b/drivers/video/mvebu_lcd.c
@@ -7,8 +7,11 @@
#include <common.h>
#include <dm.h>
+#include <part.h>
#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 a984443ef9..9b42ca8d03 100644
--- a/drivers/video/mx3fb.c
+++ b/drivers/video/mx3fb.c
@@ -7,8 +7,10 @@
*/
#include <common.h>
#include <env.h>
+#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 12d00b4689..6589a2a09d 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -8,7 +8,10 @@
#include <clk.h>
#include <dm.h>
#include <env.h>
+#include <log.h>
+#include <asm/cache.h>
#include <dm/device_compat.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <malloc.h>
#include <video.h>
diff --git a/drivers/video/orisetech_otm8009a.c b/drivers/video/orisetech_otm8009a.c
index 650ed07239..b1f2dd403e 100644
--- a/drivers/video/orisetech_otm8009a.c
+++ b/drivers/video/orisetech_otm8009a.c
@@ -14,6 +14,7 @@
#include <panel.h>
#include <asm/gpio.h>
#include <dm/device_compat.h>
+#include <linux/delay.h>
#include <power/regulator.h>
#define OTM8009A_BACKLIGHT_DEFAULT 240
diff --git a/drivers/video/pwm_backlight.c b/drivers/video/pwm_backlight.c
index 742579aba7..468a5703bd 100644
--- a/drivers/video/pwm_backlight.c
+++ b/drivers/video/pwm_backlight.c
@@ -9,9 +9,11 @@
#include <common.h>
#include <dm.h>
#include <backlight.h>
+#include <log.h>
#include <malloc.h>
#include <pwm.h>
#include <asm/gpio.h>
+#include <linux/delay.h>
#include <power/regulator.h>
/**
diff --git a/drivers/video/pxa_lcd.c b/drivers/video/pxa_lcd.c
index 92d6e3d467..67f5266164 100644
--- a/drivers/video/pxa_lcd.c
+++ b/drivers/video/pxa_lcd.c
@@ -11,6 +11,7 @@
/************************************************************************/
#include <common.h>
+#include <log.h>
#include <asm/arch/pxa-regs.h>
#include <asm/io.h>
#include <lcd.h>
diff --git a/drivers/video/raydium-rm68200.c b/drivers/video/raydium-rm68200.c
index 853dbc52d6..9169280fb8 100644
--- a/drivers/video/raydium-rm68200.c
+++ b/drivers/video/raydium-rm68200.c
@@ -14,6 +14,7 @@
#include <panel.h>
#include <asm/gpio.h>
#include <dm/device_compat.h>
+#include <linux/delay.h>
#include <power/regulator.h>
/*** Manufacturer Command Set ***/
diff --git a/drivers/video/rockchip/rk3288_hdmi.c b/drivers/video/rockchip/rk3288_hdmi.c
index 51eb41540b..f835f4d517 100644
--- a/drivers/video/rockchip/rk3288_hdmi.c
+++ b/drivers/video/rockchip/rk3288_hdmi.c
@@ -9,6 +9,7 @@
#include <dm.h>
#include <dw_hdmi.h>
#include <edid.h>
+#include <log.h>
#include <malloc.h>
#include <regmap.h>
#include <syscon.h>
diff --git a/drivers/video/rockchip/rk3288_mipi.c b/drivers/video/rockchip/rk3288_mipi.c
index 71d3faf169..b232ff0b76 100644
--- a/drivers/video/rockchip/rk3288_mipi.c
+++ b/drivers/video/rockchip/rk3288_mipi.c
@@ -8,6 +8,7 @@
#include <clk.h>
#include <display.h>
#include <dm.h>
+#include <log.h>
#include <panel.h>
#include <regmap.h>
#include "rk_mipi.h"
diff --git a/drivers/video/rockchip/rk3288_vop.c b/drivers/video/rockchip/rk3288_vop.c
index 0f91dab1f2..25ef25b870 100644
--- a/drivers/video/rockchip/rk3288_vop.c
+++ b/drivers/video/rockchip/rk3288_vop.c
@@ -15,6 +15,7 @@
#include <asm/arch-rockchip/clock.h>
#include <asm/arch-rockchip/grf_rk3288.h>
#include <asm/arch-rockchip/hardware.h>
+#include <linux/delay.h>
#include "rk_vop.h"
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/video/rockchip/rk3399_mipi.c b/drivers/video/rockchip/rk3399_mipi.c
index cfaa37797e..113708d97e 100644
--- a/drivers/video/rockchip/rk3399_mipi.c
+++ b/drivers/video/rockchip/rk3399_mipi.c
@@ -8,6 +8,7 @@
#include <clk.h>
#include <display.h>
#include <dm.h>
+#include <log.h>
#include <panel.h>
#include <regmap.h>
#include "rk_mipi.h"
diff --git a/drivers/video/rockchip/rk3399_vop.c b/drivers/video/rockchip/rk3399_vop.c
index 1d5b3931a6..d5a7aa8ac1 100644
--- a/drivers/video/rockchip/rk3399_vop.c
+++ b/drivers/video/rockchip/rk3399_vop.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <display.h>
#include <dm.h>
+#include <log.h>
#include <regmap.h>
#include <video.h>
#include <asm/arch-rockchip/hardware.h>
diff --git a/drivers/video/rockchip/rk_edp.c b/drivers/video/rockchip/rk_edp.c
index 99b16cd95e..92188be927 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>
@@ -20,6 +21,7 @@
#include <asm/arch-rockchip/grf_rk3288.h>
#include <asm/arch-rockchip/hardware.h>
#include <dt-bindings/clock/rk3288-cru.h>
+#include <linux/delay.h>
#define MAX_CR_LOOP 5
#define MAX_EQ_LOOP 5
diff --git a/drivers/video/rockchip/rk_hdmi.c b/drivers/video/rockchip/rk_hdmi.c
index 5b44a7e8c9..f27cdf8ed4 100644
--- a/drivers/video/rockchip/rk_hdmi.c
+++ b/drivers/video/rockchip/rk_hdmi.c
@@ -11,6 +11,7 @@
#include <dm.h>
#include <dw_hdmi.h>
#include <edid.h>
+#include <log.h>
#include <regmap.h>
#include <syscon.h>
#include <asm/gpio.h>
diff --git a/drivers/video/rockchip/rk_lvds.c b/drivers/video/rockchip/rk_lvds.c
index c92c2e3c6c..04f795a213 100644
--- a/drivers/video/rockchip/rk_lvds.c
+++ b/drivers/video/rockchip/rk_lvds.c
@@ -7,6 +7,7 @@
#include <display.h>
#include <dm.h>
#include <edid.h>
+#include <log.h>
#include <panel.h>
#include <regmap.h>
#include <syscon.h>
diff --git a/drivers/video/rockchip/rk_mipi.c b/drivers/video/rockchip/rk_mipi.c
index f1c21bb8d7..f811913ce5 100644
--- a/drivers/video/rockchip/rk_mipi.c
+++ b/drivers/video/rockchip/rk_mipi.c
@@ -8,6 +8,7 @@
#include <clk.h>
#include <display.h>
#include <dm.h>
+#include <log.h>
#include <panel.h>
#include <regmap.h>
#include "rk_mipi.h"
diff --git a/drivers/video/rockchip/rk_vop.c b/drivers/video/rockchip/rk_vop.c
index e1bd656bee..9032eb430e 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>
@@ -19,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/s6e8ax0.c b/drivers/video/s6e8ax0.c
index 9c7b5f6ab3..497258f3de 100644
--- a/drivers/video/s6e8ax0.c
+++ b/drivers/video/s6e8ax0.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <asm/arch/mipi_dsim.h>
+#include <linux/delay.h>
#include "exynos/exynos_mipi_dsi_lowlevel.h"
#include "exynos/exynos_mipi_dsi_common.h"
diff --git a/drivers/video/sandbox_sdl.c b/drivers/video/sandbox_sdl.c
index 1196e6c671..20248e6607 100644
--- a/drivers/video/sandbox_sdl.c
+++ b/drivers/video/sandbox_sdl.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <fdtdec.h>
+#include <log.h>
#include <video.h>
#include <asm/sdl.h>
#include <asm/state.h>
diff --git a/drivers/video/scf0403_lcd.c b/drivers/video/scf0403_lcd.c
index 60075a6cf3..54f0f88b4c 100644
--- a/drivers/video/scf0403_lcd.c
+++ b/drivers/video/scf0403_lcd.c
@@ -17,6 +17,7 @@
#include <malloc.h>
#include <asm/gpio.h>
#include <spi.h>
+#include <linux/delay.h>
struct scf0403_cmd {
u16 cmd;
diff --git a/drivers/video/simple_panel.c b/drivers/video/simple_panel.c
index 5722811117..6c624c3769 100644
--- a/drivers/video/simple_panel.c
+++ b/drivers/video/simple_panel.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <backlight.h>
#include <dm.h>
+#include <log.h>
#include <panel.h>
#include <asm/gpio.h>
#include <power/regulator.h>
diff --git a/drivers/video/simplefb.c b/drivers/video/simplefb.c
index 1679d20002..0c5b40c30b 100644
--- a/drivers/video/simplefb.c
+++ b/drivers/video/simplefb.c
@@ -7,6 +7,7 @@
#include <dm.h>
#include <fdtdec.h>
#include <fdt_support.h>
+#include <log.h>
#include <video.h>
static int simple_video_probe(struct udevice *dev)
diff --git a/drivers/video/ssd2828.c b/drivers/video/ssd2828.c
index 83566bc6d6..4cdcbe7755 100644
--- a/drivers/video/ssd2828.c
+++ b/drivers/video/ssd2828.c
@@ -14,6 +14,7 @@
#include <mipi_display.h>
#include <asm/arch/gpio.h>
#include <asm/gpio.h>
+#include <linux/delay.h>
#include "videomodes.h"
#include "ssd2828.h"
diff --git a/drivers/video/stm32/stm32_dsi.c b/drivers/video/stm32/stm32_dsi.c
index ded03b109c..04796435f1 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>
@@ -22,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 be7e9bff01..2f3427a32e 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>
@@ -17,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/lcdc.c b/drivers/video/sunxi/lcdc.c
index 4cf3a0eb75..73033c3b85 100644
--- a/drivers/video/sunxi/lcdc.c
+++ b/drivers/video/sunxi/lcdc.c
@@ -8,6 +8,8 @@
*/
#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_de2.c b/drivers/video/sunxi/sunxi_de2.c
index c6e7a35338..b657e163f0 100644
--- a/drivers/video/sunxi/sunxi_de2.c
+++ b/drivers/video/sunxi/sunxi_de2.c
@@ -12,6 +12,8 @@
#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>
#include <asm/io.h>
@@ -19,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_display.c b/drivers/video/sunxi/sunxi_display.c
index c4c1d1b8d3..f52aba4d21 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 c87c919a52..01d4b7a11c 100644
--- a/drivers/video/sunxi/sunxi_dw_hdmi.c
+++ b/drivers/video/sunxi/sunxi_dw_hdmi.c
@@ -10,10 +10,13 @@
#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>
#include <asm/arch/lcdc.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
struct sunxi_dw_hdmi_priv {
struct dw_hdmi hdmi;
diff --git a/drivers/video/sunxi/sunxi_lcd.c b/drivers/video/sunxi/sunxi_lcd.c
index 619f5892f5..49bf083a8d 100644
--- a/drivers/video/sunxi/sunxi_lcd.c
+++ b/drivers/video/sunxi/sunxi_lcd.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <display.h>
+#include <log.h>
#include <video_bridge.h>
#include <backlight.h>
#include <dm.h>
diff --git a/drivers/video/tda19988.c b/drivers/video/tda19988.c
index 01ed6193ea..191cda3ce7 100644
--- a/drivers/video/tda19988.c
+++ b/drivers/video/tda19988.c
@@ -9,6 +9,8 @@
#include <dm.h>
#include <display.h>
#include <i2c.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
/*
* TDA19988 uses paged registers. We encode the page# in the upper
diff --git a/drivers/video/tegra.c b/drivers/video/tegra.c
index f4bae9fc36..1208d91286 100644
--- a/drivers/video/tegra.c
+++ b/drivers/video/tegra.c
@@ -6,9 +6,12 @@
#include <common.h>
#include <dm.h>
#include <fdtdec.h>
+#include <log.h>
#include <panel.h>
+#include <part.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/tegra124/display.c b/drivers/video/tegra124/display.c
index f08f117cf8..6c27932263 100644
--- a/drivers/video/tegra124/display.c
+++ b/drivers/video/tegra124/display.c
@@ -6,12 +6,15 @@
*/
#include <common.h>
+#include <bootstage.h>
#include <dm.h>
#include <edid.h>
#include <errno.h>
#include <display.h>
#include <edid.h>
#include <lcd.h>
+#include <log.h>
+#include <part.h>
#include <video.h>
#include <asm/gpio.h>
#include <asm/io.h>
@@ -19,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 73e0651fb9..59758eb936 100644
--- a/drivers/video/tegra124/dp.c
+++ b/drivers/video/tegra124/dp.c
@@ -9,9 +9,11 @@
#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>
+#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 8dc3df61aa..49f33c15b5 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>
@@ -13,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/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c
index 8e0fc7f3ec..d30e6db6f6 100644
--- a/drivers/video/vidconsole-uclass.c
+++ b/drivers/video/vidconsole-uclass.c
@@ -8,6 +8,8 @@
*/
#include <common.h>
+#include <command.h>
+#include <log.h>
#include <linux/ctype.h>
#include <dm.h>
#include <video.h>
@@ -623,7 +625,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 +643,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/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index 3d658e61d7..bf396d1091 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -6,11 +6,13 @@
#include <common.h>
#include <cpu_func.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <mapmem.h>
#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/drivers/video/video_bmp.c b/drivers/video/video_bmp.c
index 8768228029..eb9636541d 100644
--- a/drivers/video/video_bmp.c
+++ b/drivers/video/video_bmp.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <bmp_layout.h>
#include <dm.h>
+#include <log.h>
#include <mapmem.h>
#include <splash.h>
#include <video.h>
diff --git a/drivers/virtio/virtio-uclass.c b/drivers/virtio/virtio-uclass.c
index 23f281cd6e..2636cbedfe 100644
--- a/drivers/virtio/virtio-uclass.c
+++ b/drivers/virtio/virtio-uclass.c
@@ -17,10 +17,12 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#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_blk.c b/drivers/virtio/virtio_blk.c
index e793e34e83..992118c607 100644
--- a/drivers/virtio/virtio_blk.c
+++ b/drivers/virtio/virtio_blk.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <blk.h>
#include <dm.h>
+#include <part.h>
#include <virtio_types.h>
#include <virtio.h>
#include <virtio_ring.h>
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index 60ece133ab..b951ea3257 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -9,9 +9,11 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#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_mmio.h b/drivers/virtio/virtio_mmio.h
index b3408828a5..b446674ccc 100644
--- a/drivers/virtio/virtio_mmio.h
+++ b/drivers/virtio/virtio_mmio.h
@@ -12,6 +12,7 @@
/* Control registers */
/* Magic value ("virt" string) - Read Only */
+#include <linux/bitops.h>
#define VIRTIO_MMIO_MAGIC_VALUE 0x000
/* Virtio device version - Read Only */
diff --git a/drivers/virtio/virtio_pci_legacy.c b/drivers/virtio/virtio_pci_legacy.c
index d9be2601bb..fa7f2429f1 100644
--- a/drivers/virtio/virtio_pci_legacy.c
+++ b/drivers/virtio/virtio_pci_legacy.c
@@ -8,10 +8,12 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <virtio_types.h>
#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 4673f4ab55..2e5bbade00 100644
--- a/drivers/virtio/virtio_pci_modern.c
+++ b/drivers/virtio/virtio_pci_modern.c
@@ -8,11 +8,14 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <virtio_types.h>
#include <virtio.h>
#include <virtio_ring.h>
#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/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 45c48a927a..7f1cbc5932 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -8,10 +8,12 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#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_rng.c b/drivers/virtio/virtio_rng.c
index 4edffa6f31..fc3e19cfae 100644
--- a/drivers/virtio/virtio_rng.c
+++ b/drivers/virtio/virtio_rng.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <rng.h>
#include <virtio_types.h>
#include <virtio.h>
diff --git a/drivers/virtio/virtio_sandbox.c b/drivers/virtio/virtio_sandbox.c
index 61f6a96008..2a2abb9d49 100644
--- a/drivers/virtio/virtio_sandbox.c
+++ b/drivers/virtio/virtio_sandbox.c
@@ -10,6 +10,7 @@
#include <virtio_types.h>
#include <virtio.h>
#include <virtio_ring.h>
+#include <linux/bug.h>
#include <linux/compat.h>
#include <linux/err.h>
#include <linux/io.h>
diff --git a/drivers/w1-eeprom/w1-eeprom-uclass.c b/drivers/w1-eeprom/w1-eeprom-uclass.c
index 7b0579344c..d515b4c536 100644
--- a/drivers/w1-eeprom/w1-eeprom-uclass.c
+++ b/drivers/w1-eeprom/w1-eeprom-uclass.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <w1.h>
#include <w1-eeprom.h>
diff --git a/drivers/w1/mxc_w1.c b/drivers/w1/mxc_w1.c
index 08715c6a66..5bf08653a9 100644
--- a/drivers/w1/mxc_w1.c
+++ b/drivers/w1/mxc_w1.c
@@ -21,6 +21,8 @@
#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/w1/w1-gpio.c b/drivers/w1/w1-gpio.c
index 5e5d6b3f6c..45ad47a5d6 100644
--- a/drivers/w1/w1-gpio.c
+++ b/drivers/w1/w1-gpio.c
@@ -9,7 +9,9 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <w1.h>
+#include <linux/delay.h>
#include <asm/gpio.h>
diff --git a/drivers/w1/w1-uclass.c b/drivers/w1/w1-uclass.c
index 042b3b5ce0..9478c93e9b 100644
--- a/drivers/w1/w1-uclass.c
+++ b/drivers/w1/w1-uclass.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <w1.h>
#include <w1-eeprom.h>
diff --git a/drivers/watchdog/ast_wdt.c b/drivers/watchdog/ast_wdt.c
index fe2f6be5a7..7e11465a57 100644
--- a/drivers/watchdog/ast_wdt.c
+++ b/drivers/watchdog/ast_wdt.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <wdt.h>
#include <asm/io.h>
#include <asm/arch/wdt.h>
diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c
index 48433cc158..18756e34df 100644
--- a/drivers/watchdog/at91sam9_wdt.c
+++ b/drivers/watchdog/at91sam9_wdt.c
@@ -14,6 +14,7 @@
* write to this register. Inform Linux to it too
*/
+#include <log.h>
#include <asm/io.h>
#include <asm/arch/at91_wdt.h>
#include <common.h>
diff --git a/drivers/watchdog/bcm6345_wdt.c b/drivers/watchdog/bcm6345_wdt.c
index 9f14e7d777..ee77f49a94 100644
--- a/drivers/watchdog/bcm6345_wdt.c
+++ b/drivers/watchdog/bcm6345_wdt.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <wdt.h>
#include <clk.h>
#include <asm/io.h>
diff --git a/drivers/watchdog/cdns_wdt.c b/drivers/watchdog/cdns_wdt.c
index 5bf02605a8..2abd5524f6 100644
--- a/drivers/watchdog/cdns_wdt.c
+++ b/drivers/watchdog/cdns_wdt.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <wdt.h>
#include <clk.h>
#include <div64.h>
diff --git a/drivers/watchdog/designware_wdt.c b/drivers/watchdog/designware_wdt.c
index 1024a04596..12f09a7a39 100644
--- a/drivers/watchdog/designware_wdt.c
+++ b/drivers/watchdog/designware_wdt.c
@@ -10,6 +10,7 @@
#include <wdt.h>
#include <asm/io.h>
#include <asm/utils.h>
+#include <linux/bitops.h>
#define DW_WDT_CR 0x00
#define DW_WDT_TORR 0x04
diff --git a/drivers/watchdog/ftwdt010_wdt.c b/drivers/watchdog/ftwdt010_wdt.c
index 076d801f5d..6aed41642d 100644
--- a/drivers/watchdog/ftwdt010_wdt.c
+++ b/drivers/watchdog/ftwdt010_wdt.c
@@ -14,6 +14,7 @@
*/
#include <common.h>
+#include <log.h>
#include <watchdog.h>
#include <asm/io.h>
#include <faraday/ftwdt010_wdt.h>
diff --git a/drivers/watchdog/mt7621_wdt.c b/drivers/watchdog/mt7621_wdt.c
index 38866141e4..1cd8866ef8 100644
--- a/drivers/watchdog/mt7621_wdt.c
+++ b/drivers/watchdog/mt7621_wdt.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <dm.h>
#include <wdt.h>
+#include <linux/bitops.h>
#include <linux/io.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c
index b3c597e1d0..a636cff354 100644
--- a/drivers/watchdog/mtk_wdt.c
+++ b/drivers/watchdog/mtk_wdt.c
@@ -11,6 +11,7 @@
#include <hang.h>
#include <wdt.h>
#include <asm/io.h>
+#include <linux/bitops.h>
#define MTK_WDT_MODE 0x00
#define MTK_WDT_LENGTH 0x04
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
index 5199d914ed..ed8b2199c2 100644
--- a/drivers/watchdog/omap_wdt.c
+++ b/drivers/watchdog/omap_wdt.c
@@ -37,6 +37,7 @@
*/
#include <common.h>
+#include <log.h>
#include <watchdog.h>
#include <asm/arch/hardware.h>
#include <asm/io.h>
diff --git a/drivers/watchdog/orion_wdt.c b/drivers/watchdog/orion_wdt.c
index 885821d562..d33e2ac3dc 100644
--- a/drivers/watchdog/orion_wdt.c
+++ b/drivers/watchdog/orion_wdt.c
@@ -15,7 +15,9 @@
#include <common.h>
#include <dm.h>
#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/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c
index 65fd2384f1..23fef2147f 100644
--- a/drivers/watchdog/sp805_wdt.c
+++ b/drivers/watchdog/sp805_wdt.c
@@ -5,6 +5,7 @@
* Copyright 2019 NXP
*/
+#include <log.h>
#include <asm/io.h>
#include <common.h>
#include <clk.h>
diff --git a/drivers/watchdog/stm32mp_wdt.c b/drivers/watchdog/stm32mp_wdt.c
index 8093d0a9f4..2d8bfc09a0 100644
--- a/drivers/watchdog/stm32mp_wdt.c
+++ b/drivers/watchdog/stm32mp_wdt.c
@@ -6,9 +6,11 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#include <log.h>
#include <syscon.h>
#include <wdt.h>
#include <asm/io.h>
+#include <linux/bitops.h>
#include <linux/iopoll.h>
/* IWDG registers */
diff --git a/drivers/watchdog/tangier_wdt.c b/drivers/watchdog/tangier_wdt.c
index ba265cf223..358a9b90fd 100644
--- a/drivers/watchdog/tangier_wdt.c
+++ b/drivers/watchdog/tangier_wdt.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <wdt.h>
#include <div64.h>
#include <asm/scu.h>
diff --git a/drivers/watchdog/wdt-uclass.c b/drivers/watchdog/wdt-uclass.c
index 4cdb7bd64c..e632f077f3 100644
--- a/drivers/watchdog/wdt-uclass.c
+++ b/drivers/watchdog/wdt-uclass.c
@@ -7,6 +7,7 @@
#include <dm.h>
#include <errno.h>
#include <hang.h>
+#include <log.h>
#include <time.h>
#include <wdt.h>
#include <dm/device-internal.h>
diff --git a/drivers/watchdog/xilinx_tb_wdt.c b/drivers/watchdog/xilinx_tb_wdt.c
index 5580764da7..ea4311c8ce 100644
--- a/drivers/watchdog/xilinx_tb_wdt.c
+++ b/drivers/watchdog/xilinx_tb_wdt.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <wdt.h>
#include <linux/err.h>
#include <linux/io.h>
diff --git a/env/common.c b/env/common.c
index 1fd1bd01d3..088b2aebb4 100644
--- a/env/common.c
+++ b/env/common.c
@@ -8,9 +8,11 @@
*/
#include <common.h>
+#include <bootstage.h>
#include <command.h>
#include <env.h>
#include <env_internal.h>
+#include <log.h>
#include <sort.h>
#include <linux/stddef.h>
#include <search.h>
diff --git a/env/env.c b/env/env.c
index 9237bb9c74..dcc25c030b 100644
--- a/env/env.c
+++ b/env/env.c
@@ -7,6 +7,9 @@
#include <common.h>
#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/env/ext4.c b/env/ext4.c
index 911e19c6d3..8e90bb71b7 100644
--- a/env/ext4.c
+++ b/env/ext4.c
@@ -19,6 +19,7 @@
*/
#include <common.h>
+#include <part.h>
#include <command.h>
#include <env.h>
@@ -45,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();
@@ -87,7 +88,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 cf2e5e2b26..35a1955e63 100644
--- a/env/fat.c
+++ b/env/fat.c
@@ -7,17 +7,18 @@
*/
#include <common.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@chromium.org): Figure out why this is needed */
@@ -32,7 +33,7 @@ static int env_fat_save(void)
{
env_t __aligned(ARCH_DMA_MINALIGN) env_new;
struct blk_desc *dev_desc = NULL;
- disk_partition_t info;
+ struct disk_partition info;
int dev, part;
int err;
loff_t size;
@@ -78,7 +79,7 @@ static int env_fat_load(void)
{
ALLOC_CACHE_ALIGN_BUFFER(char, buf, CONFIG_ENV_SIZE);
struct blk_desc *dev_desc = NULL;
- disk_partition_t info;
+ struct disk_partition info;
int dev, part;
int err;
diff --git a/env/flash.c b/env/flash.c
index e05f7ef74b..3198147c38 100644
--- a/env/flash.c
+++ b/env/flash.c
@@ -14,6 +14,7 @@
#include <env.h>
#include <env_internal.h>
#include <flash.h>
+#include <log.h>
#include <linux/stddef.h>
#include <malloc.h>
#include <search.h>
diff --git a/env/mmc.c b/env/mmc.c
index 251ad07d7c..a8b661db80 100644
--- a/env/mmc.c
+++ b/env/mmc.c
@@ -27,7 +27,7 @@ DECLARE_GLOBAL_DATA_PTR;
#if CONFIG_IS_ENABLED(OF_CONTROL)
static inline int mmc_offset_try_partition(const char *str, s64 *val)
{
- disk_partition_t info;
+ struct disk_partition info;
struct blk_desc *desc;
int len, i, ret;
diff --git a/env/sf.c b/env/sf.c
index 64c57f2cdf..23de5a3495 100644
--- a/env/sf.c
+++ b/env/sf.c
@@ -12,11 +12,14 @@
#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 <asm/cache.h>
#include <dm/device-internal.h>
#include <u-boot/crc.h>
diff --git a/examples/api/demo.c b/examples/api/demo.c
index e7523786b4..d586174ce8 100644
--- a/examples/api/demo.c
+++ b/examples/api/demo.c
@@ -24,7 +24,7 @@ void test_dump_sig(struct api_signature *);
static char buf[BUF_SZ];
-int main(int argc, char * const argv[])
+int main(int argc, char *const argv[])
{
int rv = 0, h, i, j, devs_no;
struct api_signature *sig = NULL;
diff --git a/examples/api/libgenwrap.c b/examples/api/libgenwrap.c
index 769dcc7038..3aa222866f 100644
--- a/examples/api/libgenwrap.c
+++ b/examples/api/libgenwrap.c
@@ -10,7 +10,9 @@
*/
#include <common.h>
+#include <command.h>
#include <hang.h>
+#include <linux/delay.h>
#include <linux/types.h>
#include <api_public.h>
@@ -31,7 +33,7 @@ void __udelay(unsigned long usec)
ub_udelay(usec);
}
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
ub_reset();
return 0;
diff --git a/examples/standalone/atmel_df_pow2.c b/examples/standalone/atmel_df_pow2.c
index b7bd243730..9c74f4994b 100644
--- a/examples/standalone/atmel_df_pow2.c
+++ b/examples/standalone/atmel_df_pow2.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <exports.h>
#include <spi.h>
+#include <linux/delay.h>
#define CMD_ID 0x9f
#define CMD_STAT 0xd7
@@ -115,7 +116,7 @@ static char *getline(void)
}
}
-int atmel_df_pow2(int argc, char * const argv[])
+int atmel_df_pow2(int argc, char *const argv[])
{
/* Print the ABI version */
app_startup(argv);
diff --git a/examples/standalone/hello_world.c b/examples/standalone/hello_world.c
index 1f61bb4777..263cd9ca07 100644
--- a/examples/standalone/hello_world.c
+++ b/examples/standalone/hello_world.c
@@ -7,7 +7,7 @@
#include <common.h>
#include <exports.h>
-int hello_world (int argc, char * const argv[])
+int hello_world(int argc, char *const argv[])
{
int i;
diff --git a/examples/standalone/smc91111_eeprom.c b/examples/standalone/smc91111_eeprom.c
index 5ffefc8f36..bf7e930643 100644
--- a/examples/standalone/smc91111_eeprom.c
+++ b/examples/standalone/smc91111_eeprom.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <exports.h>
+#include <linux/delay.h>
#include "../drivers/net/smc91111.h"
#ifndef SMC91111_EEPROM_INIT
@@ -31,7 +32,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];
@@ -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/examples/standalone/smc911x_eeprom.c b/examples/standalone/smc911x_eeprom.c
index 270588bcf5..9bd9a6efa3 100644
--- a/examples/standalone/smc911x_eeprom.c
+++ b/examples/standalone/smc911x_eeprom.c
@@ -17,6 +17,7 @@
#include <common.h>
#include <console.h>
#include <exports.h>
+#include <net.h>
#include <linux/ctype.h>
#include <linux/types.h>
#include "../drivers/net/smc911x.h"
@@ -465,7 +466,7 @@ static char *getline(void)
/**
* smc911x_eeprom - our application's main() function
*/
-int smc911x_eeprom(int argc, char * const argv[])
+int smc911x_eeprom(int argc, char *const argv[])
{
/* Avoid initializing on stack as gcc likes to call memset() */
struct eth_device dev;
diff --git a/examples/standalone/stubs.c b/examples/standalone/stubs.c
index 0827bde35e..5fb460454f 100644
--- a/examples/standalone/stubs.c
+++ b/examples/standalone/stubs.c
@@ -2,6 +2,8 @@
#include <exports.h>
#include <linux/compiler.h>
+struct cmd_tbl;
+
#define FO(x) offsetof(struct jt_funcs, x)
#if defined(CONFIG_X86)
diff --git a/fs/btrfs/btrfs.c b/fs/btrfs/btrfs.c
index cb7e182742..de16217d0d 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;
@@ -74,7 +75,8 @@ static int readdir_callback(const struct btrfs_root *root,
return 0;
}
-int btrfs_probe(struct blk_desc *fs_dev_desc, disk_partition_t *fs_partition)
+int btrfs_probe(struct blk_desc *fs_dev_desc,
+ struct disk_partition *fs_partition)
{
btrfs_blk_desc = fs_dev_desc;
btrfs_part_info = fs_partition;
diff --git a/fs/btrfs/btrfs.h b/fs/btrfs/btrfs.h
index 986d078679..25a8cf6a87 100644
--- a/fs/btrfs/btrfs.h
+++ b/fs/btrfs/btrfs.h
@@ -36,7 +36,7 @@ static inline u64 btrfs_name_hash(const char *name, int len)
/* dev.c */
extern struct blk_desc *btrfs_blk_desc;
-extern disk_partition_t *btrfs_part_info;
+extern struct disk_partition *btrfs_part_info;
int btrfs_devread(u64, int, void *);
diff --git a/fs/btrfs/chunk-map.c b/fs/btrfs/chunk-map.c
index 0c9a659f8f..2e5be65067 100644
--- a/fs/btrfs/chunk-map.c
+++ b/fs/btrfs/chunk-map.c
@@ -6,6 +6,7 @@
*/
#include "btrfs.h"
+#include <log.h>
#include <malloc.h>
struct chunk_map_item {
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index b1884fc15e..59e4a94cb2 100644
--- a/fs/btrfs/compression.c
+++ b/fs/btrfs/compression.c
@@ -6,6 +6,7 @@
*/
#include "btrfs.h"
+#include <log.h>
#include <malloc.h>
#include <linux/lzo.h>
#include <linux/zstd.h>
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index 7fae383f15..28f98d43ad 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -6,6 +6,7 @@
*/
#include "btrfs.h"
+#include <log.h>
#include <malloc.h>
#include <memalign.h>
diff --git a/fs/btrfs/dev.c b/fs/btrfs/dev.c
index ada3800f1e..1e5b83235a 100644
--- a/fs/btrfs/dev.c
+++ b/fs/btrfs/dev.c
@@ -6,11 +6,12 @@
*/
#include <common.h>
+#include <blk.h>
#include <compiler.h>
#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/btrfs/super.c b/fs/btrfs/super.c
index b693a073fc..913a4d402e 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -5,9 +5,12 @@
* 2017 Marek Behun, CZ.NIC, marek.behun@nic.cz
*/
-#include "btrfs.h"
+#include <common.h>
+#include <log.h>
#include <memalign.h>
+#include <part.h>
#include <linux/compat.h>
+#include "btrfs.h"
#define BTRFS_SUPER_FLAG_SUPP (BTRFS_HEADER_FLAG_WRITTEN \
| BTRFS_HEADER_FLAG_RELOC \
diff --git a/fs/cramfs/cramfs.c b/fs/cramfs/cramfs.c
index 228f599d44..7ef48bbc06 100644
--- a/fs/cramfs/cramfs.c
+++ b/fs/cramfs/cramfs.c
@@ -25,6 +25,7 @@
*/
#include <common.h>
+#include <flash.h>
#include <malloc.h>
#include <asm/byteorder.h>
#include <linux/stat.h>
diff --git a/fs/ext4/dev.c b/fs/ext4/dev.c
index 29076880bc..168443de1f 100644
--- a/fs/ext4/dev.c
+++ b/fs/ext4/dev.c
@@ -29,13 +29,14 @@
#include <ext4fs.h>
#include <ext_common.h>
#include "ext4_common.h"
+#include <log.h>
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/ext4_common.c b/fs/ext4/ext4_common.c
index 5bf78b530a..c52cc400e1 100644
--- a/fs/ext4/ext4_common.c
+++ b/fs/ext4/ext4_common.c
@@ -19,10 +19,13 @@
*/
#include <common.h>
+#include <blk.h>
#include <ext_common.h>
#include <ext4fs.h>
+#include <log.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_common.h b/fs/ext4/ext4_common.h
index 4dff1914d9..beaee9c80b 100644
--- a/fs/ext4/ext4_common.h
+++ b/fs/ext4/ext4_common.h
@@ -23,6 +23,7 @@
#include <ext_common.h>
#include <ext4fs.h>
#include <malloc.h>
+#include <asm/cache.h>
#include <linux/errno.h>
#if defined(CONFIG_EXT4_WRITE)
#include "ext4_journal.h"
diff --git a/fs/ext4/ext4_journal.c b/fs/ext4/ext4_journal.c
index 0ceb73d9c9..1a340b4764 100644
--- a/fs/ext4/ext4_journal.c
+++ b/fs/ext4/ext4_journal.c
@@ -14,7 +14,9 @@
*/
#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 67aeba1339..f22af45d1b 100644
--- a/fs/ext4/ext4_write.c
+++ b/fs/ext4/ext4_write.c
@@ -22,8 +22,11 @@
#include <common.h>
+#include <blk.h>
+#include <log.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 966b427a97..4c89152ce4 100644
--- a/fs/ext4/ext4fs.c
+++ b/fs/ext4/ext4fs.c
@@ -21,11 +21,14 @@
*/
#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;
struct ext_filesystem ext_fs;
@@ -226,7 +229,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 68ce658386..7fd29470c1 100644
--- a/fs/fat/fat.c
+++ b/fs/fat/fat.c
@@ -14,10 +14,12 @@
#include <exports.h>
#include <fat.h>
#include <fs.h>
+#include <log.h>
#include <asm/byteorder.h>
#include <part.h>
#include <malloc.h>
#include <memalign.h>
+#include <asm/cache.h>
#include <linux/compiler.h>
#include <linux/ctype.h>
@@ -35,7 +37,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
@@ -56,7 +58,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);
@@ -87,7 +89,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/fat/fat_write.c b/fs/fat/fat_write.c
index 4f96699e36..59cc0bae94 100644
--- a/fs/fat/fat_write.c
+++ b/fs/fat/fat_write.c
@@ -9,9 +9,11 @@
#include <command.h>
#include <config.h>
#include <fat.h>
+#include <log.h>
#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/fs/fs.c b/fs/fs.c
index 0c66d60477..ad4caaeb1e 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -3,10 +3,13 @@
* Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
*/
+#include <command.h>
#include <config.h>
#include <errno.h>
#include <common.h>
#include <env.h>
+#include <lmb.h>
+#include <log.h>
#include <mapmem.h>
#include <part.h>
#include <ext4fs.h>
@@ -24,11 +27,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 +138,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);
@@ -643,8 +646,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;
@@ -662,8 +665,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;
@@ -736,8 +739,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;
@@ -762,8 +765,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;
@@ -804,8 +807,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];
@@ -829,7 +832,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;
@@ -851,7 +854,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)
@@ -866,7 +869,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;
@@ -886,7 +889,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/fs/fs_internal.c b/fs/fs_internal.c
index d369c43ca6..8b19811a63 100644
--- a/fs/fs_internal.c
+++ b/fs/fs_internal.c
@@ -6,11 +6,13 @@
*/
#include <common.h>
+#include <blk.h>
#include <compiler.h>
+#include <log.h>
#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/jffs2/jffs2_1pass.c b/fs/jffs2/jffs2_1pass.c
index 1115c8682e..a98745c50e 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/fs/reiserfs/dev.c b/fs/reiserfs/dev.c
index c6b67795df..5d9c26489a 100644
--- a/fs/reiserfs/dev.c
+++ b/fs/reiserfs/dev.c
@@ -12,10 +12,10 @@
#include "reiserfs_private.h"
static struct blk_desc *reiserfs_blk_desc;
-static disk_partition_t *part_info;
+static struct disk_partition *part_info;
-void reiserfs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info)
+void reiserfs_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info)
{
reiserfs_blk_desc = rbdd;
part_info = info;
diff --git a/fs/sandbox/sandboxfs.c b/fs/sandbox/sandboxfs.c
index af47224b6c..4ae41d5b4d 100644
--- a/fs/sandbox/sandboxfs.c
+++ b/fs/sandbox/sandboxfs.c
@@ -7,8 +7,9 @@
#include <fs.h>
#include <malloc.h>
#include <os.h>
+#include <sandboxfs.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/budget.c b/fs/ubifs/budget.c
index 9eb5d3fed1..514f15f58c 100644
--- a/fs/ubifs/budget.c
+++ b/fs/ubifs/budget.c
@@ -20,6 +20,7 @@
#include "ubifs.h"
#ifndef __UBOOT__
+#include <log.h>
#include <linux/writeback.h>
#else
#include <linux/err.h>
diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c
index 6835f86fec..2ff8f1a5f9 100644
--- a/fs/ubifs/debug.c
+++ b/fs/ubifs/debug.c
@@ -16,6 +16,7 @@
*/
#include <hexdump.h>
+#include <log.h>
#include <dm/devres.h>
#ifndef __UBOOT__
diff --git a/fs/ubifs/gc.c b/fs/ubifs/gc.c
index f923d07652..6a4ada62c8 100644
--- a/fs/ubifs/gc.c
+++ b/fs/ubifs/gc.c
@@ -41,6 +41,7 @@
* good, and GC takes extra care when moving them.
*/
#ifndef __UBOOT__
+#include <log.h>
#include <dm/devres.h>
#include <linux/slab.h>
#include <linux/pagemap.h>
diff --git a/fs/ubifs/io.c b/fs/ubifs/io.c
index 8148055f67..eb14b89544 100644
--- a/fs/ubifs/io.c
+++ b/fs/ubifs/io.c
@@ -59,6 +59,8 @@
*/
#ifndef __UBOOT__
+#include <init.h>
+#include <log.h>
#include <dm/devres.h>
#include <linux/crc32.h>
#include <linux/slab.h>
diff --git a/fs/ubifs/log.c b/fs/ubifs/log.c
index 5cbb8aa1b2..77ff52575e 100644
--- a/fs/ubifs/log.c
+++ b/fs/ubifs/log.c
@@ -16,6 +16,7 @@
*/
#ifdef __UBOOT__
+#include <log.h>
#include <dm/devres.h>
#include <linux/err.h>
#endif
diff --git a/fs/ubifs/lprops.c b/fs/ubifs/lprops.c
index a7c45dd5ec..a9e22abe6b 100644
--- a/fs/ubifs/lprops.c
+++ b/fs/ubifs/lprops.c
@@ -17,6 +17,7 @@
*/
#ifdef __UBOOT__
+#include <log.h>
#include <malloc.h>
#include <linux/err.h>
#endif
diff --git a/fs/ubifs/lpt.c b/fs/ubifs/lpt.c
index ebfb1d4dd7..62748b0210 100644
--- a/fs/ubifs/lpt.c
+++ b/fs/ubifs/lpt.c
@@ -33,6 +33,7 @@
#include "ubifs.h"
#ifndef __UBOOT__
+#include <log.h>
#include <dm/devres.h>
#include <linux/crc16.h>
#include <linux/math64.h>
diff --git a/fs/ubifs/lpt_commit.c b/fs/ubifs/lpt_commit.c
index aa5956c52e..897d001430 100644
--- a/fs/ubifs/lpt_commit.c
+++ b/fs/ubifs/lpt_commit.c
@@ -14,11 +14,13 @@
*/
#ifndef __UBOOT__
+#include <log.h>
#include <dm/devres.h>
#include <linux/crc16.h>
#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/master.c b/fs/ubifs/master.c
index 2740aaee8b..055c654ae8 100644
--- a/fs/ubifs/master.c
+++ b/fs/ubifs/master.c
@@ -12,6 +12,7 @@
#include "ubifs.h"
#ifdef __UBOOT__
+#include <log.h>
#include <dm/devres.h>
#include <linux/compat.h>
#include <linux/err.h>
diff --git a/fs/ubifs/orphan.c b/fs/ubifs/orphan.c
index a67b3eec93..6aa2890ff0 100644
--- a/fs/ubifs/orphan.c
+++ b/fs/ubifs/orphan.c
@@ -7,6 +7,7 @@
* Author: Adrian Hunter
*/
+#include <log.h>
#include <dm/devres.h>
#include <linux/err.h>
#include "ubifs.h"
diff --git a/fs/ubifs/recovery.c b/fs/ubifs/recovery.c
index 3388efe2b7..6b6884fb20 100644
--- a/fs/ubifs/recovery.c
+++ b/fs/ubifs/recovery.c
@@ -36,6 +36,7 @@
*/
#ifndef __UBOOT__
+#include <log.h>
#include <dm/devres.h>
#include <linux/crc32.h>
#include <linux/slab.h>
diff --git a/fs/ubifs/replay.c b/fs/ubifs/replay.c
index 3a9fa4130e..aa7f281ef6 100644
--- a/fs/ubifs/replay.c
+++ b/fs/ubifs/replay.c
@@ -21,6 +21,7 @@
*/
#ifdef __UBOOT__
+#include <log.h>
#include <dm/devres.h>
#include <linux/compat.h>
#include <linux/err.h>
diff --git a/fs/ubifs/sb.c b/fs/ubifs/sb.c
index 599e1a35fb..1d49285c7d 100644
--- a/fs/ubifs/sb.c
+++ b/fs/ubifs/sb.c
@@ -16,6 +16,7 @@
#include "ubifs.h"
#ifndef __UBOOT__
+#include <log.h>
#include <dm/devres.h>
#include <linux/slab.h>
#include <linux/random.h>
diff --git a/fs/ubifs/scan.c b/fs/ubifs/scan.c
index 876a6ee661..7a6e46df5d 100644
--- a/fs/ubifs/scan.c
+++ b/fs/ubifs/scan.c
@@ -17,6 +17,7 @@
#ifdef __UBOOT__
#include <hexdump.h>
+#include <log.h>
#include <dm/devres.h>
#include <linux/err.h>
#endif
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index b38513660b..e3a4c0bca2 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>
@@ -31,12 +32,14 @@
#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>
#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/fs/ubifs/tnc.c b/fs/ubifs/tnc.c
index fc6fdaff8d..e8b8f16838 100644
--- a/fs/ubifs/tnc.c
+++ b/fs/ubifs/tnc.c
@@ -19,11 +19,14 @@
*/
#ifndef __UBOOT__
+#include <log.h>
#include <dm/devres.h>
#include <linux/crc32.h>
#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>
#include <linux/stat.h>
diff --git a/fs/ubifs/tnc_misc.c b/fs/ubifs/tnc_misc.c
index dfa9e91903..e4cd785b9f 100644
--- a/fs/ubifs/tnc_misc.c
+++ b/fs/ubifs/tnc_misc.c
@@ -16,6 +16,7 @@
*/
#ifdef __UBOOT__
+#include <log.h>
#include <dm/devres.h>
#include <linux/err.h>
#endif
diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
index e097d28444..70beb848e1 100644
--- a/fs/ubifs/ubifs.c
+++ b/fs/ubifs/ubifs.c
@@ -14,9 +14,11 @@
#include <common.h>
#include <env.h>
#include <gzip.h>
+#include <log.h>
#include <malloc.h>
#include <memalign.h>
#include "ubifs.h"
+#include <part.h>
#include <dm/devres.h>
#include <u-boot/zlib.h>
@@ -549,7 +551,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/yaffs2/yaffs_mtdif2.c b/fs/yaffs2/yaffs_mtdif2.c
index 0d9d5cc4b1..81a4d964f3 100644
--- a/fs/yaffs2/yaffs_mtdif2.c
+++ b/fs/yaffs2/yaffs_mtdif2.c
@@ -15,6 +15,7 @@
/* XXX U-BOOT XXX */
#include <common.h>
+#include <linux/bug.h>
#include <linux/errno.h>
#include "yportenv.h"
diff --git a/fs/yaffs2/yportenv.h b/fs/yaffs2/yportenv.h
index 251eba0792..081391a1d0 100644
--- a/fs/yaffs2/yportenv.h
+++ b/fs/yaffs2/yportenv.h
@@ -17,6 +17,7 @@
#ifndef __YPORTENV_H__
#define __YPORTENV_H__
+#include <linux/bug.h>
#include <linux/types.h>
/* Definition of types */
diff --git a/fs/zfs/dev.c b/fs/zfs/dev.c
index 3cdb9e03ed..251e7d1f74 100644
--- a/fs/zfs/dev.c
+++ b/fs/zfs/dev.c
@@ -14,9 +14,9 @@
#include <zfs_common.h>
static struct blk_desc *zfs_blk_desc;
-static disk_partition_t *part_info;
+static struct disk_partition *part_info;
-void zfs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info)
+void zfs_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info)
{
zfs_blk_desc = rbdd;
part_info = info;
diff --git a/fs/zfs/zfs.c b/fs/zfs/zfs.c
index 4331c16064..1fec96cd5c 100644
--- a/fs/zfs/zfs.c
+++ b/fs/zfs/zfs.c
@@ -11,6 +11,7 @@
*/
#include <common.h>
+#include <log.h>
#include <malloc.h>
#include <linux/stat.h>
#include <linux/time.h>
diff --git a/include/_exports.h b/include/_exports.h
index 0dee05f077..1e9ba86108 100644
--- a/include/_exports.h
+++ b/include/_exports.h
@@ -29,7 +29,7 @@
EXPORT_FUNC(udelay, void, udelay, unsigned long)
EXPORT_FUNC(get_timer, unsigned long, get_timer, unsigned long)
EXPORT_FUNC(vprintf, int, vprintf, const char *, va_list)
- EXPORT_FUNC(do_reset, int, do_reset, cmd_tbl_t *,
+ EXPORT_FUNC(do_reset, int, do_reset, struct cmd_tbl *,
int , int , char * const [])
EXPORT_FUNC(env_get, char *, env_get, const char*)
EXPORT_FUNC(env_set, int, env_set, const char *, const char *)
diff --git a/include/acpi/acpi_table.h b/include/acpi/acpi_table.h
index 3681c5c8ed..fe9b29f3f8 100644
--- a/include/acpi/acpi_table.h
+++ b/include/acpi/acpi_table.h
@@ -13,6 +13,8 @@
#ifndef __ACPI_TABLE_H__
#define __ACPI_TABLE_H__
+#include <linux/bitops.h>
+
#define RSDP_SIG "RSD PTR " /* RSDP pointer signature */
#define OEM_ID "U-BOOT" /* U-Boot */
#define OEM_TABLE_ID "U-BOOTBL" /* U-Boot Table */
diff --git a/include/android_ab.h b/include/android_ab.h
index 810906d22b..0941eb6b9c 100644
--- a/include/android_ab.h
+++ b/include/android_ab.h
@@ -6,7 +6,8 @@
#ifndef __ANDROID_AB_H
#define __ANDROID_AB_H
-#include <common.h>
+struct blk_desc;
+struct disk_partition;
/* Android standard boot slot names are 'a', 'b', 'c', ... */
#define BOOT_SLOT_NAME(slot_num) ('a' + (slot_num))
@@ -29,6 +30,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/asm-generic/gpio.h b/include/asm-generic/gpio.h
index 859f41a0d4..e16c2f31d9 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -8,6 +8,7 @@
#define _ASM_GENERIC_GPIO_H_
#include <dm/ofnode.h>
+#include <linux/bitops.h>
struct ofnode_phandle_args;
diff --git a/include/asm-generic/u-boot.h b/include/asm-generic/u-boot.h
index cc94d39069..6f749736f1 100644
--- a/include/asm-generic/u-boot.h
+++ b/include/asm-generic/u-boot.h
@@ -23,6 +23,7 @@
#ifndef __ASSEMBLY__
+#include <asm/types.h>
#include <linux/types.h>
typedef struct bd_info {
diff --git a/include/atf_common.h b/include/atf_common.h
index 3a7d40e5f0..fd5454c55b 100644
--- a/include/atf_common.h
+++ b/include/atf_common.h
@@ -177,6 +177,6 @@ struct bl2_to_bl31_params_mem {
struct entry_point_info bl31_ep_info;
};
-#endif /*__ASSEMBLY__*/
+#endif /*__ASSEMBLY__ */
#endif /* __BL_COMMON_H__ */
diff --git a/include/avb_verify.h b/include/avb_verify.h
index 18278f829e..a8d7090f79 100644
--- a/include/avb_verify.h
+++ b/include/avb_verify.h
@@ -38,7 +38,7 @@ struct mmc_part {
int dev_num;
struct mmc *mmc;
struct blk_desc *mmc_blk;
- disk_partition_t info;
+ struct disk_partition info;
};
enum mmc_io_type {
diff --git a/include/bedbug/type.h b/include/bedbug/type.h
index 3754c7f2b2..f7a719caf0 100644
--- a/include/bedbug/type.h
+++ b/include/bedbug/type.h
@@ -1,6 +1,8 @@
#ifndef _TYPE_BEDBUG_H
#define _TYPE_BEDBUG_H
+struct cmd_tbl;
+
/* Supporting routines */
int bedbug_puts (const char *);
int bedbug_init(void);
@@ -15,7 +17,8 @@ typedef struct {
int current_bp;
struct pt_regs *regs;
- void (*do_break) (cmd_tbl_t *, int, int, char * const []);
+ void (*do_break)(struct cmd_tbl *cmd, int flags, int argc,
+ char *const argv[]);
void (*break_isr) (struct pt_regs *);
int (*find_empty) (void);
int (*set) (int, unsigned long);
diff --git a/include/bitfield.h b/include/bitfield.h
index 579a69c856..d3ceeedccd 100644
--- a/include/bitfield.h
+++ b/include/bitfield.h
@@ -36,6 +36,7 @@
* tables which describe all bitfields in all registers.
*/
+#include <linux/bitops.h>
#include <linux/types.h>
/* Produces a mask of set bits covering a range of a uint value */
diff --git a/include/blk.h b/include/blk.h
index 6f541bb2ba..abcd4bedbb 100644
--- a/include/blk.h
+++ b/include/blk.h
@@ -679,7 +679,7 @@ const char *blk_get_if_type_name(enum if_type if_type);
* @cur_devnump: Current device number for this interface type
* @return 0 if OK, CMD_RET_ERROR on error
*/
-int blk_common_cmd(int argc, char * const argv[], enum if_type if_type,
+int blk_common_cmd(int argc, char *const argv[], enum if_type if_type,
int *cur_devnump);
#endif
diff --git a/include/bootm.h b/include/bootm.h
index edeeacb0df..1e7f29e134 100644
--- a/include/bootm.h
+++ b/include/bootm.h
@@ -7,9 +7,10 @@
#ifndef _BOOTM_H
#define _BOOTM_H
-#include <command.h>
#include <image.h>
+struct cmd_tbl;
+
#define BOOTM_ERR_RESET (-1)
#define BOOTM_ERR_OVERLAP (-2)
#define BOOTM_ERR_UNIMPLEMENTED (-3)
@@ -31,13 +32,13 @@
* @return 1 on error. On success the OS boots so this function does
* not return.
*/
-typedef int boot_os_fn(int flag, int argc, char * const argv[],
+typedef int boot_os_fn(int flag, int argc, char *const argv[],
bootm_headers_t *images);
extern boot_os_fn do_bootm_linux;
extern boot_os_fn do_bootm_vxworks;
-int do_bootelf(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+int do_bootelf(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
void lynxkdi_boot(image_header_t *hdr);
boot_os_fn *bootm_os_get_boot_func(int os);
@@ -46,16 +47,17 @@ boot_os_fn *bootm_os_get_boot_func(int os);
int bootm_host_load_images(const void *fit, int cfg_noffset);
#endif
-int boot_selected_os(int argc, char * const argv[], int state,
+int boot_selected_os(int argc, char *const argv[], int state,
bootm_headers_t *images, boot_os_fn *boot_fn);
ulong bootm_disable_interrupts(void);
/* This is a special function used by booti/bootz */
-int bootm_find_images(int flag, int argc, char * const argv[]);
+int bootm_find_images(int flag, int argc, char *const argv[]);
-int do_bootm_states(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
- int states, bootm_headers_t *images, int boot_progress);
+int do_bootm_states(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[], int states, bootm_headers_t *images,
+ int boot_progress);
void arch_preboot_os(void);
diff --git a/include/bootstage.h b/include/bootstage.h
index 82f0307ef1..f507271375 100644
--- a/include/bootstage.h
+++ b/include/bootstage.h
@@ -199,11 +199,11 @@ enum bootstage_id {
BOOTSTAGE_ID_ACCUM_DECOMP,
BOOTSTAGE_ID_ACCUM_OF_LIVE,
BOOTSTAGE_ID_FPGA_INIT,
- BOOTSTATE_ID_ACCUM_DM_SPL,
- BOOTSTATE_ID_ACCUM_DM_F,
- BOOTSTATE_ID_ACCUM_DM_R,
- BOOTSTATE_ID_ACCUM_FSP_M,
- BOOTSTATE_ID_ACCUM_FSP_S,
+ BOOTSTAGE_ID_ACCUM_DM_SPL,
+ BOOTSTAGE_ID_ACCUM_DM_F,
+ BOOTSTAGE_ID_ACCUM_DM_R,
+ BOOTSTAGE_ID_ACCUM_FSP_M,
+ BOOTSTAGE_ID_ACCUM_FSP_S,
BOOTSTAGE_ID_ACCUM_MMAP_SPI,
/* a few spare for the user, from here */
diff --git a/include/btrfs.h b/include/btrfs.h
index 5be61e3264..a7605e1589 100644
--- a/include/btrfs.h
+++ b/include/btrfs.h
@@ -8,7 +8,11 @@
#ifndef __U_BOOT_BTRFS_H__
#define __U_BOOT_BTRFS_H__
-int btrfs_probe(struct blk_desc *, disk_partition_t *);
+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 *);
int btrfs_exists(const char *);
int btrfs_size(const char *, loff_t *);
diff --git a/include/command.h b/include/command.h
index d1063774ce..b9b5ec1afa 100644
--- a/include/command.h
+++ b/include/command.h
@@ -27,7 +27,7 @@
* Monitor Command Table
*/
-struct cmd_tbl_s {
+struct cmd_tbl {
char *name; /* Command Name */
int maxargs; /* maximum number of arguments */
/*
@@ -38,54 +38,57 @@ struct cmd_tbl_s {
* repeatable property different for
* the main command and sub-commands.
*/
- int (*cmd_rep)(struct cmd_tbl_s *cmd, int flags, int argc,
- char * const argv[], int *repeatable);
+ int (*cmd_rep)(struct cmd_tbl *cmd, int flags, int argc,
+ char *const argv[], int *repeatable);
/* Implementation function */
- int (*cmd)(struct cmd_tbl_s *, int, int, char * const []);
+ int (*cmd)(struct cmd_tbl *cmd, int flags, int argc,
+ char *const argv[]);
char *usage; /* Usage message (short) */
#ifdef CONFIG_SYS_LONGHELP
char *help; /* Help message (long) */
#endif
#ifdef CONFIG_AUTO_COMPLETE
/* do auto completion on the arguments */
- int (*complete)(int argc, char * const argv[], char last_char, int maxv, char *cmdv[]);
+ int (*complete)(int argc, char *const argv[],
+ char last_char, int maxv, char *cmdv[]);
#endif
};
-typedef struct cmd_tbl_s cmd_tbl_t;
-
-
#if defined(CONFIG_CMD_RUN)
-extern int do_run(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+extern int do_run(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[]);
#endif
/* common/command.c */
-int _do_help (cmd_tbl_t *cmd_start, int cmd_items, cmd_tbl_t * cmdtp, int
- flag, int argc, char * const argv[]);
-cmd_tbl_t *find_cmd(const char *cmd);
-cmd_tbl_t *find_cmd_tbl (const char *cmd, cmd_tbl_t *table, int table_len);
-int complete_subcmdv(cmd_tbl_t *cmdtp, int count, int argc,
- char * const argv[], char last_char, int maxv,
+int _do_help(struct cmd_tbl *cmd_start, int cmd_items, struct cmd_tbl *cmdtp,
+ int flag, int argc, char *const argv[]);
+struct cmd_tbl *find_cmd(const char *cmd);
+struct cmd_tbl *find_cmd_tbl(const char *cmd, struct cmd_tbl *table,
+ int table_len);
+int complete_subcmdv(struct cmd_tbl *cmdtp, int count, int argc,
+ char *const argv[], char last_char, int maxv,
char *cmdv[]);
-extern int cmd_usage(const cmd_tbl_t *cmdtp);
+extern int cmd_usage(const struct cmd_tbl *cmdtp);
/* Dummy ->cmd and ->cmd_rep wrappers. */
-int cmd_always_repeatable(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[], int *repeatable);
-int cmd_never_repeatable(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[], int *repeatable);
-int cmd_discard_repeatable(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[]);
-
-static inline bool cmd_is_repeatable(cmd_tbl_t *cmdtp)
+int cmd_always_repeatable(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[], int *repeatable);
+int cmd_never_repeatable(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[], int *repeatable);
+int cmd_discard_repeatable(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[]);
+
+static inline bool cmd_is_repeatable(struct cmd_tbl *cmdtp)
{
return cmdtp->cmd_rep == cmd_always_repeatable;
}
#ifdef CONFIG_AUTO_COMPLETE
-extern int var_complete(int argc, char * const argv[], char last_char, int maxv, char *cmdv[]);
-extern int cmd_auto_complete(const char *const prompt, char *buf, int *np, int *colp);
+extern int var_complete(int argc, char *const argv[], char last_char, int maxv,
+ char *cmdv[]);
+extern int cmd_auto_complete(const char *const prompt, char *buf, int *np,
+ int *colp);
#endif
/**
@@ -97,14 +100,15 @@ extern int cmd_auto_complete(const char *const prompt, char *buf, int *np, int *
* 1 (CMD_RET_FAILURE) if an error is found
* -1 (CMD_RET_USAGE) if 'usage' error is found
*/
-int cmd_process_error(cmd_tbl_t *cmdtp, int err);
+int cmd_process_error(struct cmd_tbl *cmdtp, int err);
/*
* Monitor Command
*
* All commands use a common argument format:
*
- * void function (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+ * void function(struct cmd_tbl *cmdtp, int flag, int argc,
+ * char *const argv[]);
*/
#if defined(CONFIG_CMD_MEMORY) || \
@@ -117,36 +121,42 @@ extern int cmd_get_data_size(char* arg, int default_size);
#endif
#ifdef CONFIG_CMD_BOOTD
-extern int do_bootd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+extern int do_bootd(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[]);
#endif
#ifdef CONFIG_CMD_BOOTM
-extern int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
-extern int bootm_maybe_autostart(cmd_tbl_t *cmdtp, const char *cmd);
+extern int do_bootm(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[]);
+extern int bootm_maybe_autostart(struct cmd_tbl *cmdtp, const char *cmd);
#else
-static inline int bootm_maybe_autostart(cmd_tbl_t *cmdtp, const char *cmd)
+static inline int bootm_maybe_autostart(struct cmd_tbl *cmdtp, const char *cmd)
{
return 0;
}
#endif
-extern int do_bootz(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+extern int do_bootz(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[]);
-extern int do_booti(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+extern int do_booti(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[]);
-extern int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc,
+extern int common_diskboot(struct cmd_tbl *cmdtp, const char *intf, int argc,
char *const argv[]);
-extern int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
-extern int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+extern int do_reset(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[]);
+extern int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[]);
extern unsigned long do_go_exec(ulong (*entry)(int, char * const []), int argc,
- char * const argv[]);
+ char *const argv[]);
#if defined(CONFIG_CMD_NVEDIT_EFI)
-extern int do_env_print_efi(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[]);
-extern int do_env_set_efi(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[]);
+extern int do_env_print_efi(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[]);
+extern int do_env_set_efi(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[]);
#endif
/*
@@ -177,10 +187,10 @@ enum command_ret_t {
* number of ticks the command took to complete.
* @return 0 if the command succeeded, 1 if it failed
*/
-int cmd_process(int flag, int argc, char * const argv[],
- int *repeatable, unsigned long *ticks);
+int cmd_process(int flag, int argc, char *const argv[], int *repeatable,
+ unsigned long *ticks);
-void fixup_cmdtable(cmd_tbl_t *cmdtp, int size);
+void fixup_cmdtable(struct cmd_tbl *cmdtp, int size);
/**
* board_run_command() - Fallback function to execute a command
@@ -254,10 +264,11 @@ int run_command_list(const char *cmd, int len, int flag);
#endif
#define U_BOOT_SUBCMDS_DO_CMD(_cmdname) \
- static int do_##_cmdname(cmd_tbl_t *cmdtp, int flag, int argc, \
- char * const argv[], int *repeatable) \
+ static int do_##_cmdname(struct cmd_tbl *cmdtp, int flag, \
+ int argc, char *const argv[], \
+ int *repeatable) \
{ \
- cmd_tbl_t *subcmd; \
+ struct cmd_tbl *subcmd; \
\
_cmdname##_subcmds_reloc(); \
\
@@ -280,7 +291,7 @@ int run_command_list(const char *cmd, int len, int flag);
#ifdef CONFIG_AUTO_COMPLETE
#define U_BOOT_SUBCMDS_COMPLETE(_cmdname) \
- static int complete_##_cmdname(int argc, char * const argv[], \
+ static int complete_##_cmdname(int argc, char *const argv[], \
char last_char, int maxv, \
char *cmdv[]) \
{ \
@@ -294,7 +305,7 @@ int run_command_list(const char *cmd, int len, int flag);
#endif
#define U_BOOT_SUBCMDS(_cmdname, ...) \
- static cmd_tbl_t _cmdname##_subcmds[] = { __VA_ARGS__ }; \
+ static struct cmd_tbl _cmdname##_subcmds[] = { __VA_ARGS__ }; \
U_BOOT_SUBCMDS_RELOC(_cmdname) \
U_BOOT_SUBCMDS_DO_CMD(_cmdname) \
U_BOOT_SUBCMDS_COMPLETE(_cmdname)
@@ -312,18 +323,18 @@ int run_command_list(const char *cmd, int len, int flag);
_cmd, _usage, _CMD_HELP(_help) _CMD_COMPLETE(_comp) }
#define U_BOOT_CMD_COMPLETE(_name, _maxargs, _rep, _cmd, _usage, _help, _comp) \
- ll_entry_declare(cmd_tbl_t, _name, cmd) = \
+ ll_entry_declare(struct cmd_tbl, _name, cmd) = \
U_BOOT_CMD_MKENT_COMPLETE(_name, _maxargs, _rep, _cmd, \
_usage, _help, _comp);
#define U_BOOT_CMDREP_COMPLETE(_name, _maxargs, _cmd_rep, _usage, \
_help, _comp) \
- ll_entry_declare(cmd_tbl_t, _name, cmd) = \
+ ll_entry_declare(struct cmd_tbl, _name, cmd) = \
U_BOOT_CMDREP_MKENT_COMPLETE(_name, _maxargs, _cmd_rep, \
_usage, _help, _comp)
#else
-#define U_BOOT_SUBCMD_START(name) static cmd_tbl_t name[] = {};
+#define U_BOOT_SUBCMD_START(name) static struct cmd_tbl name[] = {};
#define U_BOOT_SUBCMD_END
#define _CMD_REMOVE(_name, _cmd) \
diff --git a/include/common.h b/include/common.h
index 0ef8505fc7..f0679ac705 100644
--- a/include/common.h
+++ b/include/common.h
@@ -16,30 +16,16 @@
#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>
#include <linux/types.h>
#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>
-#include <part.h>
-#include <flash.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 */
-#include <init.h>
#include <display_options.h>
-#include <uuid.h>
#include <vsprintf.h>
-#include <net.h>
-#include <bootstage.h>
#endif /* __ASSEMBLY__ */
/* Pull in stuff for the build system */
diff --git a/include/config_fsl_chain_trust.h b/include/config_fsl_chain_trust.h
index 4f522dbecc..3922241be0 100644
--- a/include/config_fsl_chain_trust.h
+++ b/include/config_fsl_chain_trust.h
@@ -6,6 +6,8 @@
#ifndef __CONFIG_FSL_CHAIN_TRUST_H
#define __CONFIG_FSL_CHAIN_TRUST_H
+#include <linux/stringify.h>
+
#ifdef CONFIG_CHAIN_OF_TRUST
#ifndef CONFIG_EXTRA_ENV
diff --git a/include/configs/B4860QDS.h b/include/configs/B4860QDS.h
index 67639458b4..a515bf9530 100644
--- a/include/configs/B4860QDS.h
+++ b/include/configs/B4860QDS.h
@@ -6,6 +6,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/stringify.h>
+
/*
* B4860 QDS board configuration file
*/
diff --git a/include/configs/C29XPCIE.h b/include/configs/C29XPCIE.h
index 62ad50bad5..9a8cba6b7c 100644
--- a/include/configs/C29XPCIE.h
+++ b/include/configs/C29XPCIE.h
@@ -10,6 +10,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/stringify.h>
+
#ifdef CONFIG_SPIFLASH
#define CONFIG_RAMBOOT_SPIFLASH
#define CONFIG_RESET_VECTOR_ADDRESS 0x110bfffc
diff --git a/include/configs/M52277EVB.h b/include/configs/M52277EVB.h
index f110cac274..8261f4811c 100644
--- a/include/configs/M52277EVB.h
+++ b/include/configs/M52277EVB.h
@@ -13,6 +13,8 @@
#ifndef _M52277EVB_H
#define _M52277EVB_H
+#include <linux/stringify.h>
+
/*
* High Level Configuration Options
* (easy to change)
diff --git a/include/configs/M5253DEMO.h b/include/configs/M5253DEMO.h
index e79a7e98dc..69e3fbae78 100644
--- a/include/configs/M5253DEMO.h
+++ b/include/configs/M5253DEMO.h
@@ -6,6 +6,8 @@
#ifndef _M5253DEMO_H
#define _M5253DEMO_H
+#include <linux/stringify.h>
+
#define CONFIG_MCFTMR
#define CONFIG_MCFUART
diff --git a/include/configs/M5373EVB.h b/include/configs/M5373EVB.h
index 6297aea143..f94cc02905 100644
--- a/include/configs/M5373EVB.h
+++ b/include/configs/M5373EVB.h
@@ -13,6 +13,8 @@
#ifndef _M5373EVB_H
#define _M5373EVB_H
+#include <linux/stringify.h>
+
/*
* High Level Configuration Options
* (easy to change)
diff --git a/include/configs/M54418TWR.h b/include/configs/M54418TWR.h
index cdf169f6a7..2866bfd85f 100644
--- a/include/configs/M54418TWR.h
+++ b/include/configs/M54418TWR.h
@@ -13,6 +13,8 @@
#ifndef _M54418TWR_H
#define _M54418TWR_H
+#include <linux/stringify.h>
+
/*
* High Level Configuration Options
* (easy to change)
diff --git a/include/configs/M54451EVB.h b/include/configs/M54451EVB.h
index 8d0b1db73e..ec4284216f 100644
--- a/include/configs/M54451EVB.h
+++ b/include/configs/M54451EVB.h
@@ -13,6 +13,8 @@
#ifndef _M54451EVB_H
#define _M54451EVB_H
+#include <linux/stringify.h>
+
/*
* High Level Configuration Options
* (easy to change)
diff --git a/include/configs/M54455EVB.h b/include/configs/M54455EVB.h
index 6e43522fda..291adeaf0d 100644
--- a/include/configs/M54455EVB.h
+++ b/include/configs/M54455EVB.h
@@ -13,6 +13,8 @@
#ifndef _M54455EVB_H
#define _M54455EVB_H
+#include <linux/stringify.h>
+
/*
* High Level Configuration Options
* (easy to change)
diff --git a/include/configs/MPC8308RDB.h b/include/configs/MPC8308RDB.h
index f55e9a0995..788a325b64 100644
--- a/include/configs/MPC8308RDB.h
+++ b/include/configs/MPC8308RDB.h
@@ -8,6 +8,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/stringify.h>
+
/*
* High Level Configuration Options
*/
diff --git a/include/configs/MPC8313ERDB_NAND.h b/include/configs/MPC8313ERDB_NAND.h
index 6829853343..d8485f6fbd 100644
--- a/include/configs/MPC8313ERDB_NAND.h
+++ b/include/configs/MPC8313ERDB_NAND.h
@@ -9,6 +9,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/stringify.h>
+
/*
* High Level Configuration Options
*/
diff --git a/include/configs/MPC8313ERDB_NOR.h b/include/configs/MPC8313ERDB_NOR.h
index 382c39ccb4..029d2f1ec3 100644
--- a/include/configs/MPC8313ERDB_NOR.h
+++ b/include/configs/MPC8313ERDB_NOR.h
@@ -18,6 +18,7 @@
#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */
#endif
+#include <linux/stringify.h>
#define CONFIG_PCI_INDIRECT_BRIDGE
/*
diff --git a/include/configs/MPC8323ERDB.h b/include/configs/MPC8323ERDB.h
index 289cd9a860..ff18d10872 100644
--- a/include/configs/MPC8323ERDB.h
+++ b/include/configs/MPC8323ERDB.h
@@ -9,6 +9,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/stringify.h>
+
/*
* High Level Configuration Options
*/
diff --git a/include/configs/MPC8349ITX.h b/include/configs/MPC8349ITX.h
index 90046fd1ee..dd517639ea 100644
--- a/include/configs/MPC8349ITX.h
+++ b/include/configs/MPC8349ITX.h
@@ -52,6 +52,7 @@
#define CONFIG_SYS_USB_HOST /* use the EHCI USB controller */
#endif
+#include <linux/stringify.h>
#define CONFIG_RTC_DS1337
#define CONFIG_SYS_I2C
diff --git a/include/configs/MPC837XERDB.h b/include/configs/MPC837XERDB.h
index 21bd9f09c1..8c2297a910 100644
--- a/include/configs/MPC837XERDB.h
+++ b/include/configs/MPC837XERDB.h
@@ -8,6 +8,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/stringify.h>
+
/*
* High Level Configuration Options
*/
diff --git a/include/configs/MPC8536DS.h b/include/configs/MPC8536DS.h
index fb115e2345..340574a985 100644
--- a/include/configs/MPC8536DS.h
+++ b/include/configs/MPC8536DS.h
@@ -10,6 +10,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/stringify.h>
+
#include "../board/freescale/common/ics307_clk.h"
#ifdef CONFIG_SDCARD
diff --git a/include/configs/MPC8544DS.h b/include/configs/MPC8544DS.h
index 2092e3da15..c9f193fc46 100644
--- a/include/configs/MPC8544DS.h
+++ b/include/configs/MPC8544DS.h
@@ -22,6 +22,7 @@
#define CONFIG_INTERRUPTS /* enable pci, srio, ddr interrupts */
#ifndef __ASSEMBLY__
+#include <linux/stringify.h>
extern unsigned long get_board_sys_clk(unsigned long dummy);
#endif
#define CONFIG_SYS_CLK_FREQ get_board_sys_clk(0) /* sysclk for MPC85xx */
diff --git a/include/configs/MPC8548CDS.h b/include/configs/MPC8548CDS.h
index 6e44a072db..de2bfd8f2f 100644
--- a/include/configs/MPC8548CDS.h
+++ b/include/configs/MPC8548CDS.h
@@ -27,6 +27,7 @@
#define CONFIG_FSL_VIA
#ifndef __ASSEMBLY__
+#include <linux/stringify.h>
extern unsigned long get_clock_freq(void);
#endif
#define CONFIG_SYS_CLK_FREQ get_clock_freq() /* sysclk for MPC85xx */
diff --git a/include/configs/MPC8560ADS.h b/include/configs/MPC8560ADS.h
index 866049febf..97d8cc48ed 100644
--- a/include/configs/MPC8560ADS.h
+++ b/include/configs/MPC8560ADS.h
@@ -17,6 +17,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/delay.h>
+
/* High Level Configuration Options */
#define CONFIG_CPM2 1 /* has CPM2 */
diff --git a/include/configs/MPC8572DS.h b/include/configs/MPC8572DS.h
index 65da3d7009..3243f39df4 100644
--- a/include/configs/MPC8572DS.h
+++ b/include/configs/MPC8572DS.h
@@ -10,6 +10,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/stringify.h>
+
#include "../board/freescale/common/ics307_clk.h"
#ifndef CONFIG_RESET_VECTOR_ADDRESS
diff --git a/include/configs/MPC8610HPCD.h b/include/configs/MPC8610HPCD.h
index f3d603c634..eb85141702 100644
--- a/include/configs/MPC8610HPCD.h
+++ b/include/configs/MPC8610HPCD.h
@@ -10,6 +10,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/stringify.h>
+
/* High Level Configuration Options */
#define CONFIG_LINUX_RESET_VEC 0x100 /* Reset vector used by Linux */
diff --git a/include/configs/MPC8641HPCN.h b/include/configs/MPC8641HPCN.h
index e97d780cea..edbeeefdd4 100644
--- a/include/configs/MPC8641HPCN.h
+++ b/include/configs/MPC8641HPCN.h
@@ -15,6 +15,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/stringify.h>
+
/* High Level Configuration Options */
#define CONFIG_LINUX_RESET_VEC 0x100 /* Reset vector used by Linux */
#define CONFIG_ADDR_MAP 1 /* Use addr map */
diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h
index f578e0bd87..8f709a6cac 100644
--- a/include/configs/P1010RDB.h
+++ b/include/configs/P1010RDB.h
@@ -11,6 +11,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/stringify.h>
+
#include <asm/config_mpc85xx.h>
#define CONFIG_NAND_FSL_IFC
diff --git a/include/configs/P1022DS.h b/include/configs/P1022DS.h
index e99d509a36..2b761078bc 100644
--- a/include/configs/P1022DS.h
+++ b/include/configs/P1022DS.h
@@ -8,6 +8,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/stringify.h>
+
#include "../board/freescale/common/ics307_clk.h"
#ifdef CONFIG_SDCARD
diff --git a/include/configs/P1023RDB.h b/include/configs/P1023RDB.h
index 2f3831e259..6bf3cd5950 100644
--- a/include/configs/P1023RDB.h
+++ b/include/configs/P1023RDB.h
@@ -9,6 +9,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/stringify.h>
+
#ifndef CONFIG_SYS_MONITOR_BASE
#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */
#endif
diff --git a/include/configs/P2041RDB.h b/include/configs/P2041RDB.h
index 09427776e2..59404cbaf9 100644
--- a/include/configs/P2041RDB.h
+++ b/include/configs/P2041RDB.h
@@ -56,6 +56,7 @@
#ifndef __ASSEMBLY__
unsigned long get_board_sys_clk(unsigned long dummy);
+#include <linux/stringify.h>
#endif
#define CONFIG_SYS_CLK_FREQ get_board_sys_clk(0)
diff --git a/include/configs/T102xQDS.h b/include/configs/T102xQDS.h
index 5f358c13ea..53ae961837 100644
--- a/include/configs/T102xQDS.h
+++ b/include/configs/T102xQDS.h
@@ -11,6 +11,8 @@
#ifndef __T1024QDS_H
#define __T1024QDS_H
+#include <linux/stringify.h>
+
/* High Level Configuration Options */
#define CONFIG_SYS_BOOK3E_HV /* Category E.HV supported */
#define CONFIG_ENABLE_36BIT_PHYS
diff --git a/include/configs/T102xRDB.h b/include/configs/T102xRDB.h
index c96d6e5f35..f5d9657444 100644
--- a/include/configs/T102xRDB.h
+++ b/include/configs/T102xRDB.h
@@ -11,6 +11,8 @@
#ifndef __T1024RDB_H
#define __T1024RDB_H
+#include <linux/stringify.h>
+
/* High Level Configuration Options */
#define CONFIG_SYS_BOOK3E_HV /* Category E.HV supported */
#define CONFIG_ENABLE_36BIT_PHYS
diff --git a/include/configs/T1040QDS.h b/include/configs/T1040QDS.h
index ca6ae776fa..7ad018b6d7 100644
--- a/include/configs/T1040QDS.h
+++ b/include/configs/T1040QDS.h
@@ -24,6 +24,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/stringify.h>
+
/*
* T1040 QDS board configuration file
*/
diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h
index aa7bf7d119..4237dfcd6c 100644
--- a/include/configs/T104xRDB.h
+++ b/include/configs/T104xRDB.h
@@ -7,6 +7,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/stringify.h>
+
/*
* T104x RDB board configuration file
*/
diff --git a/include/configs/T208xQDS.h b/include/configs/T208xQDS.h
index aed2e87a1a..c54f7f53e5 100644
--- a/include/configs/T208xQDS.h
+++ b/include/configs/T208xQDS.h
@@ -11,6 +11,8 @@
#ifndef __T208xQDS_H
#define __T208xQDS_H
+#include <linux/stringify.h>
+
#define CONFIG_ICS307_REFCLK_HZ 25000000 /* ICS307 ref clk freq */
#if defined(CONFIG_ARCH_T2080)
#define CONFIG_FSL_SATA_V2
diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h
index 619b287258..70eafc3e28 100644
--- a/include/configs/T208xRDB.h
+++ b/include/configs/T208xRDB.h
@@ -11,6 +11,8 @@
#ifndef __T2080RDB_H
#define __T2080RDB_H
+#include <linux/stringify.h>
+
#define CONFIG_ICS307_REFCLK_HZ 25000000 /* ICS307 ref clk freq */
#define CONFIG_FSL_SATA_V2
diff --git a/include/configs/T4240QDS.h b/include/configs/T4240QDS.h
index 5f91a52bbe..d92af7202b 100644
--- a/include/configs/T4240QDS.h
+++ b/include/configs/T4240QDS.h
@@ -9,6 +9,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/stringify.h>
+
#define CONFIG_FSL_SATA_V2
#define CONFIG_PCIE4
diff --git a/include/configs/T4240RDB.h b/include/configs/T4240RDB.h
index f051998b0f..fcfd3b0b4b 100644
--- a/include/configs/T4240RDB.h
+++ b/include/configs/T4240RDB.h
@@ -10,6 +10,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/stringify.h>
+
#define CONFIG_FSL_SATA_V2
#define CONFIG_PCIE4
diff --git a/include/configs/UCP1020.h b/include/configs/UCP1020.h
index 5086077afb..cfc9567332 100644
--- a/include/configs/UCP1020.h
+++ b/include/configs/UCP1020.h
@@ -13,6 +13,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/stringify.h>
+
/*** Arcturus FirmWare Environment */
#define MAX_SERIAL_SIZE 15
diff --git a/include/configs/apalis_imx6.h b/include/configs/apalis_imx6.h
index 034eb07eaa..6f03058a78 100644
--- a/include/configs/apalis_imx6.h
+++ b/include/configs/apalis_imx6.h
@@ -8,6 +8,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/stringify.h>
+
#include "mx6_common.h"
#undef CONFIG_DISPLAY_BOARDINFO
diff --git a/include/configs/apf27.h b/include/configs/apf27.h
index c26cf89f5f..cecd485e20 100644
--- a/include/configs/apf27.h
+++ b/include/configs/apf27.h
@@ -9,6 +9,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/stringify.h>
+
#define CONFIG_ENV_VERSION 10
#define CONFIG_BOARD_NAME apf27
diff --git a/include/configs/at91sam9263ek.h b/include/configs/at91sam9263ek.h
index 85bfacb7ac..51ecf4173b 100644
--- a/include/configs/at91sam9263ek.h
+++ b/include/configs/at91sam9263ek.h
@@ -10,6 +10,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/stringify.h>
+
/*
* SoC must be defined first, before hardware.h is included.
* In this case SoC is defined in boards.cfg.
@@ -178,6 +180,7 @@
AT91_WDT_MR_WDD(0xfff))
#endif
+#include <linux/stringify.h>
#endif
/* NAND flash */
diff --git a/include/configs/bcmstb.h b/include/configs/bcmstb.h
index ba5eb7a4a8..e58a9510de 100644
--- a/include/configs/bcmstb.h
+++ b/include/configs/bcmstb.h
@@ -15,6 +15,7 @@
#ifndef __ASSEMBLY__
+#include <linux/stringify.h>
#include <linux/types.h>
struct bcmstb_boot_parameters {
diff --git a/include/configs/brppt1.h b/include/configs/brppt1.h
index 3019b97d92..68931c1358 100644
--- a/include/configs/brppt1.h
+++ b/include/configs/brppt1.h
@@ -13,6 +13,7 @@
#include <configs/bur_cfg_common.h>
#include <configs/bur_am335x_common.h>
+#include <linux/stringify.h>
/* ------------------------------------------------------------------------- */
/* memory */
#define CONFIG_SYS_MALLOC_LEN (5 * 1024 * 1024)
diff --git a/include/configs/brsmarc1.h b/include/configs/brsmarc1.h
index 4bff349a03..5aa68d1d46 100644
--- a/include/configs/brsmarc1.h
+++ b/include/configs/brsmarc1.h
@@ -14,6 +14,7 @@
#include <configs/bur_cfg_common.h>
#include <configs/bur_am335x_common.h>
+#include <linux/stringify.h>
/* ------------------------------------------------------------------------- */
#define CONFIG_BOARD_TYPES
diff --git a/include/configs/brxre1.h b/include/configs/brxre1.h
index 006663373b..9db011358e 100644
--- a/include/configs/brxre1.h
+++ b/include/configs/brxre1.h
@@ -13,6 +13,7 @@
#include <configs/bur_cfg_common.h>
#include <configs/bur_am335x_common.h>
+#include <linux/stringify.h>
/* ------------------------------------------------------------------------- */
#if !defined(CONFIG_AM335X_LCD)
#define CONFIG_AM335X_LCD
diff --git a/include/configs/cgtqmx6eval.h b/include/configs/cgtqmx6eval.h
index bd4456aa02..fccc9b18c0 100644
--- a/include/configs/cgtqmx6eval.h
+++ b/include/configs/cgtqmx6eval.h
@@ -12,6 +12,8 @@
#ifndef __CONFIG_CGTQMX6EVAL_H
#define __CONFIG_CGTQMX6EVAL_H
+#include <linux/stringify.h>
+
#include "mx6_common.h"
#define CONFIG_MACH_TYPE 4122
diff --git a/include/configs/clearfog.h b/include/configs/clearfog.h
index 53ff830e81..459e0d9d5e 100644
--- a/include/configs/clearfog.h
+++ b/include/configs/clearfog.h
@@ -6,6 +6,8 @@
#ifndef _CONFIG_CLEARFOG_H
#define _CONFIG_CLEARFOG_H
+#include <linux/stringify.h>
+
/*
* High Level Configuration Options (easy to change)
*/
diff --git a/include/configs/colibri-imx8x.h b/include/configs/colibri-imx8x.h
index 03bb1701f9..da9226e2fb 100644
--- a/include/configs/colibri-imx8x.h
+++ b/include/configs/colibri-imx8x.h
@@ -8,6 +8,7 @@
#include <asm/arch/imx-regs.h>
#include <linux/sizes.h>
+#include <linux/stringify.h>
#define CONFIG_REMAKE_ELF
diff --git a/include/configs/colibri_imx6.h b/include/configs/colibri_imx6.h
index 2d649e6e21..3d248ef4ef 100644
--- a/include/configs/colibri_imx6.h
+++ b/include/configs/colibri_imx6.h
@@ -8,6 +8,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/stringify.h>
+
#include "mx6_common.h"
#undef CONFIG_DISPLAY_BOARDINFO
diff --git a/include/configs/controlcenterd.h b/include/configs/controlcenterd.h
index 5fbe773201..34d268e061 100644
--- a/include/configs/controlcenterd.h
+++ b/include/configs/controlcenterd.h
@@ -26,6 +26,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/stringify.h>
+
#ifdef CONFIG_SDCARD
#define CONFIG_RAMBOOT_SDCARD
#endif
diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h
index 091f3c07d1..a49f9056c5 100644
--- a/include/configs/corenet_ds.h
+++ b/include/configs/corenet_ds.h
@@ -10,6 +10,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/stringify.h>
+
#include "../board/freescale/common/ics307_clk.h"
#ifdef CONFIG_RAMBOOT_PBL
diff --git a/include/configs/cyrus.h b/include/configs/cyrus.h
index 9ab92e699d..052e6018a3 100644
--- a/include/configs/cyrus.h
+++ b/include/configs/cyrus.h
@@ -6,6 +6,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/stringify.h>
+
#if !defined(CONFIG_ARCH_P5020) && !defined(CONFIG_ARCH_P5040)
#error Must call Cyrus CONFIG with a specific CPU enabled.
#endif
diff --git a/include/configs/dart_6ul.h b/include/configs/dart_6ul.h
index 15d6884ca5..d933f79e34 100644
--- a/include/configs/dart_6ul.h
+++ b/include/configs/dart_6ul.h
@@ -7,6 +7,7 @@
#define __DART_6UL_H
#include <linux/sizes.h>
+#include <linux/stringify.h>
#include "mx6_common.h"
/* SPL options */
diff --git a/include/configs/el6x_common.h b/include/configs/el6x_common.h
index fe63bcaaa6..f7b96e4825 100644
--- a/include/configs/el6x_common.h
+++ b/include/configs/el6x_common.h
@@ -8,6 +8,8 @@
#ifndef __EL6Q_COMMON_CONFIG_H
#define __EL6Q_COMMON_CONFIG_H
+#include <linux/stringify.h>
+
#define CONFIG_BOARD_NAME EL6Q
#include "mx6_common.h"
diff --git a/include/configs/exynos-common.h b/include/configs/exynos-common.h
index 5ae2b427ca..bb34a9e83b 100644
--- a/include/configs/exynos-common.h
+++ b/include/configs/exynos-common.h
@@ -14,6 +14,7 @@
#include <asm/arch/cpu.h> /* get chip and board defs */
#include <linux/sizes.h>
+#include <linux/stringify.h>
#define CONFIG_SKIP_LOWLEVEL_INIT
diff --git a/include/configs/gardena-smart-gateway-at91sam.h b/include/configs/gardena-smart-gateway-at91sam.h
index f5ee65cb8a..78d2136248 100644
--- a/include/configs/gardena-smart-gateway-at91sam.h
+++ b/include/configs/gardena-smart-gateway-at91sam.h
@@ -9,6 +9,10 @@
#ifndef __CONFIG_H__
#define __CONFIG_H__
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
/* ARM asynchronous clock */
#define CONFIG_SYS_AT91_SLOW_CLOCK 32768
#define CONFIG_SYS_AT91_MAIN_CLOCK 12000000 /* 12 MHz crystal */
diff --git a/include/configs/helios4.h b/include/configs/helios4.h
index f0ca8e2f16..671c3d291d 100644
--- a/include/configs/helios4.h
+++ b/include/configs/helios4.h
@@ -7,6 +7,7 @@
#define _CONFIG_HELIOS4_H
#include <linux/sizes.h>
+#include <linux/stringify.h>
/*
* High Level Configuration Options (easy to change)
diff --git a/include/configs/hrcon.h b/include/configs/hrcon.h
index bf1feb8708..76c4ee9777 100644
--- a/include/configs/hrcon.h
+++ b/include/configs/hrcon.h
@@ -8,6 +8,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/stringify.h>
+
/*
* High Level Configuration Options
*/
diff --git a/include/configs/ids8313.h b/include/configs/ids8313.h
index 3274ff6437..bcd8aee7c3 100644
--- a/include/configs/ids8313.h
+++ b/include/configs/ids8313.h
@@ -11,6 +11,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/stringify.h>
+
/*
* High Level Configuration Options
*/
diff --git a/include/configs/imx6-engicam.h b/include/configs/imx6-engicam.h
index 69b7f3378e..72ae89c5f6 100644
--- a/include/configs/imx6-engicam.h
+++ b/include/configs/imx6-engicam.h
@@ -10,6 +10,7 @@
#define __IMX6_ENGICAM_CONFIG_H
#include <linux/sizes.h>
+#include <linux/stringify.h>
#include "mx6_common.h"
/* Size of malloc() pool */
diff --git a/include/configs/imx8mm_evk.h b/include/configs/imx8mm_evk.h
index 5982522eca..901a1bed6d 100644
--- a/include/configs/imx8mm_evk.h
+++ b/include/configs/imx8mm_evk.h
@@ -7,6 +7,7 @@
#define __IMX8MM_EVK_H
#include <linux/sizes.h>
+#include <linux/stringify.h>
#include <asm/arch/imx-regs.h>
#ifdef CONFIG_SECURE_BOOT
diff --git a/include/configs/imx8mn_evk.h b/include/configs/imx8mn_evk.h
index 395ddf5816..a07440c73b 100644
--- a/include/configs/imx8mn_evk.h
+++ b/include/configs/imx8mn_evk.h
@@ -7,6 +7,7 @@
#define __IMX8MN_EVK_H
#include <linux/sizes.h>
+#include <linux/stringify.h>
#include <asm/arch/imx-regs.h>
#ifdef CONFIG_SECURE_BOOT
diff --git a/include/configs/imx8mp_evk.h b/include/configs/imx8mp_evk.h
index 80e5738961..b346154fb3 100644
--- a/include/configs/imx8mp_evk.h
+++ b/include/configs/imx8mp_evk.h
@@ -7,6 +7,7 @@
#define __IMX8MP_EVK_H
#include <linux/sizes.h>
+#include <linux/stringify.h>
#include <asm/arch/imx-regs.h>
#ifdef CONFIG_SECURE_BOOT
diff --git a/include/configs/imx8mq_evk.h b/include/configs/imx8mq_evk.h
index 724d572c22..632c4eaf77 100644
--- a/include/configs/imx8mq_evk.h
+++ b/include/configs/imx8mq_evk.h
@@ -7,6 +7,7 @@
#define __IMX8M_EVK_H
#include <linux/sizes.h>
+#include <linux/stringify.h>
#include <asm/arch/imx-regs.h>
#define CONFIG_SPL_MAX_SIZE (124 * 1024)
diff --git a/include/configs/imx8qm_mek.h b/include/configs/imx8qm_mek.h
index 22d80f1747..d7dd3e21a3 100644
--- a/include/configs/imx8qm_mek.h
+++ b/include/configs/imx8qm_mek.h
@@ -7,6 +7,7 @@
#define __IMX8QM_MEK_H
#include <linux/sizes.h>
+#include <linux/stringify.h>
#include <asm/arch/imx-regs.h>
#ifdef CONFIG_SPL_BUILD
diff --git a/include/configs/imx8qm_rom7720.h b/include/configs/imx8qm_rom7720.h
index b59641e37f..eebb8dc011 100644
--- a/include/configs/imx8qm_rom7720.h
+++ b/include/configs/imx8qm_rom7720.h
@@ -7,6 +7,7 @@
#define __IMX8QM_ROM7720_H
#include <linux/sizes.h>
+#include <linux/stringify.h>
#include <asm/arch/imx-regs.h>
#define CONFIG_REMAKE_ELF
@@ -173,4 +174,5 @@
#define CONFIG_FEC_XCV_TYPE RGMII
#define FEC_QUIRK_ENET_MAC
+#include <linux/stringify.h>
#endif /* __IMX8QM_ROM7720_H */
diff --git a/include/configs/imx8qxp_mek.h b/include/configs/imx8qxp_mek.h
index 341e93e61e..a2046e1beb 100644
--- a/include/configs/imx8qxp_mek.h
+++ b/include/configs/imx8qxp_mek.h
@@ -7,6 +7,7 @@
#define __IMX8QXP_MEK_H
#include <linux/sizes.h>
+#include <linux/stringify.h>
#include <asm/arch/imx-regs.h>
#ifdef CONFIG_SPL_BUILD
diff --git a/include/configs/km/keymile-common.h b/include/configs/km/keymile-common.h
index e690d8f39d..e9e3981060 100644
--- a/include/configs/km/keymile-common.h
+++ b/include/configs/km/keymile-common.h
@@ -7,6 +7,8 @@
#ifndef __CONFIG_KEYMILE_H
#define __CONFIG_KEYMILE_H
+#include <linux/stringify.h>
+
/*
* Miscellaneous configurable options
*/
diff --git a/include/configs/km/km-mpc83xx.h b/include/configs/km/km-mpc83xx.h
index dfb78c50f4..451baf8b80 100644
--- a/include/configs/km/km-mpc83xx.h
+++ b/include/configs/km/km-mpc83xx.h
@@ -1,6 +1,7 @@
/*
* Internal Definitions
*/
+#include <linux/stringify.h>
#define BOOTFLASH_START 0xF0000000
/*
diff --git a/include/configs/km/km_arm.h b/include/configs/km/km_arm.h
index fa9d7b5dfa..79edfa728a 100644
--- a/include/configs/km/km_arm.h
+++ b/include/configs/km/km_arm.h
@@ -104,6 +104,8 @@
#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);
void set_scl(int state);
diff --git a/include/configs/liteboard.h b/include/configs/liteboard.h
index fa7d5896f5..f9a125fcb0 100644
--- a/include/configs/liteboard.h
+++ b/include/configs/liteboard.h
@@ -10,6 +10,7 @@
#include <asm/arch/imx-regs.h>
#include <linux/sizes.h>
+#include <linux/stringify.h>
#include "mx6_common.h"
/* SPL options */
diff --git a/include/configs/mpc8308_p1m.h b/include/configs/mpc8308_p1m.h
index 97578cdb82..d6b21f11c3 100644
--- a/include/configs/mpc8308_p1m.h
+++ b/include/configs/mpc8308_p1m.h
@@ -8,6 +8,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/stringify.h>
+
/*
* High Level Configuration Options
*/
diff --git a/include/configs/mv-common.h b/include/configs/mv-common.h
index e3a00ed1cf..d61c90a431 100644
--- a/include/configs/mv-common.h
+++ b/include/configs/mv-common.h
@@ -16,6 +16,8 @@
#ifndef _MV_COMMON_H
#define _MV_COMMON_H
+#include <linux/stringify.h>
+
/*
* High Level Configuration Options (easy to change)
*/
diff --git a/include/configs/mx6_common.h b/include/configs/mx6_common.h
index 07b1e06f4f..0715509ec8 100644
--- a/include/configs/mx6_common.h
+++ b/include/configs/mx6_common.h
@@ -6,6 +6,8 @@
#ifndef __MX6_COMMON_H
#define __MX6_COMMON_H
+#include <linux/stringify.h>
+
#if (defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL))
#define CONFIG_SC_TIMER_CLK 8000000 /* 8Mhz */
#define COUNTER_FREQUENCY CONFIG_SC_TIMER_CLK
diff --git a/include/configs/mx6cuboxi.h b/include/configs/mx6cuboxi.h
index e10e7688e9..2ccf44e573 100644
--- a/include/configs/mx6cuboxi.h
+++ b/include/configs/mx6cuboxi.h
@@ -7,6 +7,8 @@
#ifndef __MX6CUBOXI_CONFIG_H
#define __MX6CUBOXI_CONFIG_H
+#include <linux/stringify.h>
+
#include "mx6_common.h"
#include "imx6_spl.h"
diff --git a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h
index cb0253c306..6cea26a58d 100644
--- a/include/configs/mx6sabre_common.h
+++ b/include/configs/mx6sabre_common.h
@@ -8,6 +8,8 @@
#ifndef __MX6QSABRE_COMMON_CONFIG_H
#define __MX6QSABRE_COMMON_CONFIG_H
+#include <linux/stringify.h>
+
#include "mx6_common.h"
#define CONFIG_IMX_THERMAL
diff --git a/include/configs/mx6sllevk.h b/include/configs/mx6sllevk.h
index 03c0c88e50..61c637d26c 100644
--- a/include/configs/mx6sllevk.h
+++ b/include/configs/mx6sllevk.h
@@ -135,4 +135,5 @@
#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
#endif
+#include <linux/stringify.h>
#endif /* __CONFIG_H */
diff --git a/include/configs/mx6sxsabresd.h b/include/configs/mx6sxsabresd.h
index 8633756dd0..3eea9de986 100644
--- a/include/configs/mx6sxsabresd.h
+++ b/include/configs/mx6sxsabresd.h
@@ -8,6 +8,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/stringify.h>
+
#include "mx6_common.h"
#ifdef CONFIG_SPL
diff --git a/include/configs/mx6ul_14x14_evk.h b/include/configs/mx6ul_14x14_evk.h
index 7927779cc8..8466abf3d5 100644
--- a/include/configs/mx6ul_14x14_evk.h
+++ b/include/configs/mx6ul_14x14_evk.h
@@ -9,6 +9,7 @@
#include <asm/arch/imx-regs.h>
#include <linux/sizes.h>
+#include <linux/stringify.h>
#include "mx6_common.h"
#include <asm/mach-imx/gpio.h>
diff --git a/include/configs/mx6ullevk.h b/include/configs/mx6ullevk.h
index 7e3a5c7cf3..9cedb96a6b 100644
--- a/include/configs/mx6ullevk.h
+++ b/include/configs/mx6ullevk.h
@@ -10,6 +10,7 @@
#include <asm/arch/imx-regs.h>
#include <linux/sizes.h>
+#include <linux/stringify.h>
#include "mx6_common.h"
#include <asm/mach-imx/gpio.h>
diff --git a/include/configs/mx7_common.h b/include/configs/mx7_common.h
index b6ded774cc..cc07e858d5 100644
--- a/include/configs/mx7_common.h
+++ b/include/configs/mx7_common.h
@@ -9,6 +9,7 @@
#define __MX7_COMMON_H
#include <linux/sizes.h>
+#include <linux/stringify.h>
#include <asm/arch/imx-regs.h>
#include <asm/mach-imx/gpio.h>
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h
index a5ca5f9c4b..f3081f4f33 100644
--- a/include/configs/nitrogen6x.h
+++ b/include/configs/nitrogen6x.h
@@ -113,6 +113,7 @@
DISTRO_BOOT_DEV_DHCP(func)
#include <config_distro_bootcmd.h>
+#include <linux/stringify.h>
#define CONFIG_EXTRA_ENV_SETTINGS \
"console=ttymxc1\0" \
diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h
index af278ded9a..219e5d216b 100644
--- a/include/configs/p1_p2_rdb_pc.h
+++ b/include/configs/p1_p2_rdb_pc.h
@@ -10,6 +10,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/stringify.h>
+
#if defined(CONFIG_TARGET_P1020MBG)
#define CONFIG_BOARDNAME "P1020MBG-PC"
#define CONFIG_VSC7385_ENET
diff --git a/include/configs/p1_twr.h b/include/configs/p1_twr.h
index e99b41cc88..d731f9c8fa 100644
--- a/include/configs/p1_twr.h
+++ b/include/configs/p1_twr.h
@@ -9,6 +9,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/stringify.h>
+
#if defined(CONFIG_TWR_P1025)
#define CONFIG_BOARDNAME "TWR-P1025"
#define CONFIG_SYS_LBC_LBCR 0x00080000 /* Conversion of LBC addr */
diff --git a/include/configs/pcl063_ull.h b/include/configs/pcl063_ull.h
index 6aa77f1f5e..4ae955d9ca 100644
--- a/include/configs/pcl063_ull.h
+++ b/include/configs/pcl063_ull.h
@@ -10,6 +10,7 @@
#define __PCL063_ULL_H
#include <linux/sizes.h>
+#include <linux/stringify.h>
#include "mx6_common.h"
/* SPL options */
diff --git a/include/configs/pcm052.h b/include/configs/pcm052.h
index 0bfaaf784a..ba7aad8b05 100644
--- a/include/configs/pcm052.h
+++ b/include/configs/pcm052.h
@@ -10,6 +10,7 @@
#include <asm/arch/imx-regs.h>
#include <linux/sizes.h>
+#include <linux/stringify.h>
#define CONFIG_SKIP_LOWLEVEL_INIT
diff --git a/include/configs/pico-imx6ul.h b/include/configs/pico-imx6ul.h
index b0e2f6ce33..8bfada75f7 100644
--- a/include/configs/pico-imx6ul.h
+++ b/include/configs/pico-imx6ul.h
@@ -111,6 +111,7 @@
func(DHCP, dhcp, na)
#include <config_distro_bootcmd.h>
+#include <linux/stringify.h>
#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
#define CONFIG_SYS_HZ 1000
diff --git a/include/configs/pico-imx7d.h b/include/configs/pico-imx7d.h
index 9a987f4150..3ca3ec6112 100644
--- a/include/configs/pico-imx7d.h
+++ b/include/configs/pico-imx7d.h
@@ -108,6 +108,7 @@
func(DHCP, dhcp, na)
#include <config_distro_bootcmd.h>
+#include <linux/stringify.h>
#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
#define CONFIG_SYS_HZ 1000
diff --git a/include/configs/s32v234evb.h b/include/configs/s32v234evb.h
index 5b1504d2df..ba0e506fa0 100644
--- a/include/configs/s32v234evb.h
+++ b/include/configs/s32v234evb.h
@@ -144,6 +144,7 @@
"run distro_bootcmd"
#include <config_distro_bootcmd.h>
+#include <linux/stringify.h>
/* Miscellaneous configurable options */
#define CONFIG_SYS_PROMPT "=> "
diff --git a/include/configs/sbc8548.h b/include/configs/sbc8548.h
index f5462549a5..55c4bff28a 100644
--- a/include/configs/sbc8548.h
+++ b/include/configs/sbc8548.h
@@ -12,6 +12,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/stringify.h>
+
/*
* Top level Makefile configuration choices
*/
diff --git a/include/configs/socfpga_arria5_secu1.h b/include/configs/socfpga_arria5_secu1.h
index b059100ccd..ad4c3c0786 100644
--- a/include/configs/socfpga_arria5_secu1.h
+++ b/include/configs/socfpga_arria5_secu1.h
@@ -7,6 +7,7 @@
#define __CONFIG_SOCFPGA_SECU1_H__
#include <asm/arch/base_addr_ac5.h>
+#include <linux/stringify.h>
/* Call misc_init_r */
#define CONFIG_MISC_INIT_R
diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
index 0579a00d40..07c9745eba 100644
--- a/include/configs/socfpga_common.h
+++ b/include/configs/socfpga_common.h
@@ -5,6 +5,8 @@
#ifndef __CONFIG_SOCFPGA_COMMON_H__
#define __CONFIG_SOCFPGA_COMMON_H__
+#include <linux/stringify.h>
+
/*
* High level configuration
*/
diff --git a/include/configs/socfpga_soc64_common.h b/include/configs/socfpga_soc64_common.h
index 61f7b254b5..7237ec95e3 100644
--- a/include/configs/socfpga_soc64_common.h
+++ b/include/configs/socfpga_soc64_common.h
@@ -9,6 +9,7 @@
#include <asm/arch/base_addr_s10.h>
#include <asm/arch/handoff_s10.h>
+#include <linux/stringify.h>
/*
* U-Boot general configurations
diff --git a/include/configs/strider.h b/include/configs/strider.h
index d5f710be59..4ad3401c04 100644
--- a/include/configs/strider.h
+++ b/include/configs/strider.h
@@ -8,6 +8,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/stringify.h>
+
/*
* High Level Configuration Options
*/
diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h
index 895cd0324e..13ab1cc4bf 100644
--- a/include/configs/tqma6.h
+++ b/include/configs/tqma6.h
@@ -9,6 +9,8 @@
#define __CONFIG_H
#include <linux/kconfig.h>
+#include <linux/stringify.h>
+
/* SPL */
/* #if defined(CONFIG_SPL_BUILD) */
/* common IMX6 SPL configuration */
diff --git a/include/configs/udoo.h b/include/configs/udoo.h
index 163cbbb54e..54f472d595 100644
--- a/include/configs/udoo.h
+++ b/include/configs/udoo.h
@@ -70,6 +70,7 @@
func(DHCP, dhcp, na)
#include <config_distro_bootcmd.h>
+#include <linux/stringify.h>
/* Physical Memory Map */
#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
diff --git a/include/configs/ve8313.h b/include/configs/ve8313.h
index bdacd81885..81b171ea16 100644
--- a/include/configs/ve8313.h
+++ b/include/configs/ve8313.h
@@ -12,6 +12,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/stringify.h>
+
/*
* High Level Configuration Options
*/
diff --git a/include/configs/vf610twr.h b/include/configs/vf610twr.h
index 739219e8f8..0ef2de33cc 100644
--- a/include/configs/vf610twr.h
+++ b/include/configs/vf610twr.h
@@ -9,6 +9,7 @@
#define __CONFIG_H
#include <asm/arch/imx-regs.h>
+#include <linux/stringify.h>
#define CONFIG_SYS_FSL_CLK
diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h
index 9d2bd7b278..2b0576e1e6 100644
--- a/include/configs/wandboard.h
+++ b/include/configs/wandboard.h
@@ -107,6 +107,7 @@
func(DHCP, dhcp, na)
#include <config_distro_bootcmd.h>
+#include <linux/stringify.h>
/* Physical Memory Map */
#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
diff --git a/include/configs/wb45n.h b/include/configs/wb45n.h
index fea07056b0..aecf2737f8 100644
--- a/include/configs/wb45n.h
+++ b/include/configs/wb45n.h
@@ -7,6 +7,7 @@
#define __CONFIG_H__
#include <asm/hardware.h>
+#include <linux/stringify.h>
/* ARM asynchronous clock */
#define CONFIG_SYS_AT91_SLOW_CLOCK 32768
diff --git a/include/configs/xpedite517x.h b/include/configs/xpedite517x.h
index 6c9991fa03..d3bb92964e 100644
--- a/include/configs/xpedite517x.h
+++ b/include/configs/xpedite517x.h
@@ -51,6 +51,7 @@
#define CONFIG_SYS_SCRATCH_VA 0xe0000000
#ifndef __ASSEMBLY__
+#include <linux/stringify.h>
extern unsigned long get_board_sys_clk(unsigned long dummy);
#endif
diff --git a/include/configs/xpedite537x.h b/include/configs/xpedite537x.h
index 6d847cb793..7262c86908 100644
--- a/include/configs/xpedite537x.h
+++ b/include/configs/xpedite537x.h
@@ -47,6 +47,7 @@
#define CONFIG_VERY_BIG_RAM
#ifndef __ASSEMBLY__
+#include <linux/stringify.h>
extern unsigned long get_board_sys_clk(unsigned long dummy);
extern unsigned long get_board_ddr_clk(unsigned long dummy);
#endif
diff --git a/include/configs/xpedite550x.h b/include/configs/xpedite550x.h
index 106269bae0..b9c9ac4ba8 100644
--- a/include/configs/xpedite550x.h
+++ b/include/configs/xpedite550x.h
@@ -46,6 +46,7 @@
#define CONFIG_VERY_BIG_RAM
#ifndef __ASSEMBLY__
+#include <linux/stringify.h>
extern unsigned long get_board_sys_clk(unsigned long dummy);
extern unsigned long get_board_ddr_clk(unsigned long dummy);
#endif
diff --git a/include/cpu_func.h b/include/cpu_func.h
index f701f02bfe..8aa825daa4 100644
--- a/include/cpu_func.h
+++ b/include/cpu_func.h
@@ -18,7 +18,7 @@
int cpu_status(u32 nr);
int cpu_reset(u32 nr);
int cpu_disable(u32 nr);
-int cpu_release(u32 nr, int argc, char * const argv[]);
+int cpu_release(u32 nr, int argc, char *const argv[]);
static inline int cpumask_next(int cpu, unsigned int mask)
{
diff --git a/include/dma.h b/include/dma.h
index 5b247b5b06..6ff591977b 100644
--- a/include/dma.h
+++ b/include/dma.h
@@ -9,6 +9,7 @@
#ifndef _DMA_H_
#define _DMA_H_
+#include <linux/bitops.h>
#include <linux/errno.h>
#include <linux/types.h>
diff --git a/include/dwc3-sti-glue.h b/include/dwc3-sti-glue.h
index e2856f1268..3989a9bb53 100644
--- a/include/dwc3-sti-glue.h
+++ b/include/dwc3-sti-glue.h
@@ -8,6 +8,7 @@
#define __DWC3_STI_UBOOT_H_
/* glue registers */
+#include <linux/bitops.h>
#define CLKRST_CTRL 0x00
#define AUX_CLK_EN BIT(0)
#define SW_PIPEW_RESET_N BIT(4)
diff --git a/include/dwmmc.h b/include/dwmmc.h
index f06720dc0d..d8a8355a0a 100644
--- a/include/dwmmc.h
+++ b/include/dwmmc.h
@@ -7,8 +7,10 @@
#ifndef __DWMMC_HW_H
#define __DWMMC_HW_H
+#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/efi_loader.h b/include/efi_loader.h
index 75c20e4679..4b48f99773 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -9,11 +9,15 @@
#define _EFI_LOADER_H 1
#include <common.h>
+#include <blk.h>
+#include <log.h>
#include <part_efi.h>
#include <efi_api.h>
#include <image.h>
#include <pe.h>
+struct blk_desc;
+
static inline int guidcmp(const void *g1, const void *g2)
{
return memcmp(g1, g2, sizeof(efi_guid_t));
diff --git a/include/elf.h b/include/elf.h
index e7c51986df..b04e746d61 100644
--- a/include/elf.h
+++ b/include/elf.h
@@ -9,7 +9,7 @@
#ifndef _ELF_H
#define _ELF_H
-#ifndef __ASSEMBLER__
+#ifndef __ASSEMBLY__
#include "compiler.h"
/* This version doesn't work for 64-bit ABIs - Erik */
@@ -690,7 +690,7 @@ unsigned long elf_hash(const unsigned char *name);
#define R_RISCV_64 2
#define R_RISCV_RELATIVE 3
-#ifndef __ASSEMBLER__
+#ifndef __ASSEMBLY__
int valid_elf_image(unsigned long addr);
unsigned long load_elf64_image_phdr(unsigned long addr);
unsigned long load_elf64_image_shdr(unsigned long addr);
diff --git a/include/env_default.h b/include/env_default.h
index 56a8bae39a..a657927e06 100644
--- a/include/env_default.h
+++ b/include/env_default.h
@@ -8,6 +8,7 @@
*/
#include <env_callback.h>
+#include <linux/stringify.h>
#ifdef DEFAULT_ENV_INSTANCE_EMBEDDED
env_t embedded_environment __UBOOT_ENV_SECTION__(environment) = {
diff --git a/include/environment/ti/boot.h b/include/environment/ti/boot.h
index 11a57af0a4..a9d8f28d46 100644
--- a/include/environment/ti/boot.h
+++ b/include/environment/ti/boot.h
@@ -9,6 +9,8 @@
#ifndef __TI_BOOT_H
#define __TI_BOOT_H
+#include <linux/stringify.h>
+
#ifndef CONSOLEDEV
#define CONSOLEDEV "ttyS2"
#endif
diff --git a/include/exception.h b/include/exception.h
index fc02490223..a7f21e73d7 100644
--- a/include/exception.h
+++ b/include/exception.h
@@ -5,10 +5,12 @@
* Copyright (c) 2018, Heinrich Schuchardt <xypron.glpk@gmx.de>
*/
-static int do_exception(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+#include <command.h>
+
+static int do_exception(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
- cmd_tbl_t *cp;
+ struct cmd_tbl *cp;
if (argc != 2)
return CMD_RET_USAGE;
@@ -25,12 +27,12 @@ static int do_exception(cmd_tbl_t *cmdtp, int flag, int argc,
return CMD_RET_USAGE;
}
-static int exception_complete(int argc, char * const argv[], char last_char,
+static int exception_complete(int argc, char *const argv[], char last_char,
int maxv, char *cmdv[])
{
int len = 0;
int i = 0;
- cmd_tbl_t *cmdtp;
+ struct cmd_tbl *cmdtp;
switch (argc) {
case 1:
diff --git a/include/exports.h b/include/exports.h
index cbd16fc518..b300554091 100644
--- a/include/exports.h
+++ b/include/exports.h
@@ -2,6 +2,7 @@
#define __EXPORTS_H__
#include <irq_func.h>
+#include <linux/delay.h>
#ifndef __ASSEMBLY__
#ifdef CONFIG_PHY_AQUANTIA
@@ -11,6 +12,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/ext4fs.h b/include/ext4fs.h
index 34585d407d..cb5d9cc0a5 100644
--- a/include/ext4fs.h
+++ b/include/ext4fs.h
@@ -28,6 +28,8 @@
#define __EXT4__
#include <ext_common.h>
+struct disk_partition;
+
#define EXT4_INDEX_FL 0x00001000 /* Inode uses hash tree index */
#define EXT4_EXTENTS_FL 0x00080000 /* Inode uses extents */
#define EXT4_EXT_MAGIC 0xf30a
@@ -152,11 +154,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/ext_common.h b/include/ext_common.h
index 1c10c50474..bc3324172a 100644
--- a/include/ext_common.h
+++ b/include/ext_common.h
@@ -19,7 +19,9 @@
#ifndef __EXT_COMMON__
#define __EXT_COMMON__
-#include <command.h>
+
+struct cmd_tbl;
+
#define SECTOR_SIZE 0x200
#define LOG2_SECTOR_SIZE 9
@@ -210,11 +212,11 @@ struct ext2_data {
extern lbaint_t part_offset;
-int do_ext2ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
-int do_ext2load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
-int do_ext4_load(cmd_tbl_t *cmdtp, int flag, int argc,
- char *const argv[]);
-int do_ext4_ls(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]);
-int do_ext4_write(cmd_tbl_t *cmdtp, int flag, int argc,
- char *const argv[]);
+int do_ext2ls(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
+int do_ext2load(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
+int do_ext4_load(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[]);
+int do_ext4_ls(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
+int do_ext4_write(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[]);
#endif
diff --git a/include/faraday/ftpci100.h b/include/faraday/ftpci100.h
index b4a43f82e5..8801bd1350 100644
--- a/include/faraday/ftpci100.h
+++ b/include/faraday/ftpci100.h
@@ -11,6 +11,7 @@
#define __FTPCI100_H
/* AHB Control Registers */
+#include <linux/bitops.h>
struct ftpci100_ahbc {
unsigned int iosize; /* 0x00 - I/O Space Size Signal */
unsigned int prot; /* 0x04 - AHB Protection */
diff --git a/include/faraday/ftsdc010.h b/include/faraday/ftsdc010.h
index d3a359ab75..30726dab85 100644
--- a/include/faraday/ftsdc010.h
+++ b/include/faraday/ftsdc010.h
@@ -12,6 +12,7 @@
#ifndef __ASSEMBLY__
/* sd controller register */
+#include <linux/bitops.h>
struct ftsdc010_mmc {
unsigned int cmd; /* 0x00 - command reg */
unsigned int argu; /* 0x04 - argument reg */
diff --git a/include/faraday/ftsdmc021.h b/include/faraday/ftsdmc021.h
index 3c979ced27..e0e5eb339e 100644
--- a/include/faraday/ftsdmc021.h
+++ b/include/faraday/ftsdmc021.h
@@ -14,6 +14,7 @@
#define __FTSDMC021_H
#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
struct ftsdmc021 {
unsigned int tp1; /* 0x00 - SDRAM Timing Parameter 1 */
unsigned int tp2; /* 0x04 - SDRAM Timing Parameter 2 */
diff --git a/include/fat.h b/include/fat.h
index bc139f8c88..02742f92a5 100644
--- a/include/fat.h
+++ b/include/fat.h
@@ -12,6 +12,8 @@
#include <asm/byteorder.h>
#include <fs.h>
+struct disk_partition;
+
/* Maximum Long File Name length supported here is 128 UTF-16 code units */
#define VFAT_MAXLEN_BYTES 256 /* Maximum LFN buffer in bytes */
#define VFAT_MAXSEQ 9 /* Up to 9 of 13 2-byte UTF-16 entries */
@@ -193,7 +195,7 @@ int fat_size(const char *filename, loff_t *size);
int file_fat_read_at(const char *filename, loff_t pos, void *buffer,
loff_t maxsize, loff_t *actread);
int file_fat_read(const char *filename, void *buffer, int maxsize);
-int fat_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info);
+int fat_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info);
int fat_register_device(struct blk_desc *dev_desc, int part_no);
int file_fat_write(const char *filename, void *buf, loff_t offset, loff_t len,
diff --git a/include/fb_mmc.h b/include/fb_mmc.h
index 95db001bee..76ed7cd6be 100644
--- a/include/fb_mmc.h
+++ b/include/fb_mmc.h
@@ -6,17 +6,21 @@
#ifndef _FB_MMC_H_
#define _FB_MMC_H_
+struct blk_desc;
+struct disk_partition;
+
/**
* fastboot_mmc_get_part_info() - Lookup eMMC partion by name
*
* @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/flash.h b/include/flash.h
index 2655c72087..3bf6b22399 100644
--- a/include/flash.h
+++ b/include/flash.h
@@ -84,20 +84,20 @@ typedef unsigned long flash_sect_t;
/* Prototypes */
-extern unsigned long flash_init (void);
-extern void flash_print_info (flash_info_t *);
-extern int flash_erase (flash_info_t *, int, int);
-extern int flash_sect_erase (ulong addr_first, ulong addr_last);
-extern int flash_sect_protect (int flag, ulong addr_first, ulong addr_last);
-extern int flash_sect_roundb (ulong *addr);
-extern unsigned long flash_sector_size(flash_info_t *info, flash_sect_t sect);
-extern void flash_set_verbose(uint);
+unsigned long flash_init(void);
+void flash_print_info(flash_info_t *info);
+int flash_erase(flash_info_t *info, int s_first, int s_last);
+int flash_sect_erase(ulong addr_first, ulong addr_last);
+int flash_sect_protect(int flag, ulong addr_first, ulong addr_last);
+int flash_sect_roundb(ulong *addr);
+unsigned long flash_sector_size(flash_info_t *info, flash_sect_t sect);
+void flash_set_verbose(uint v);
/* common/flash.c */
-extern void flash_protect (int flag, ulong from, ulong to, flash_info_t *info);
-extern int flash_write (char *, ulong, ulong);
-extern flash_info_t *addr2info (ulong);
-extern int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt);
+void flash_protect(int flag, ulong from, ulong to, flash_info_t *info);
+int flash_write(char *src, ulong addr, ulong cnt);
+flash_info_t *addr2info(ulong addr);
+int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt);
/* drivers/mtd/cfi_mtd.c */
#ifdef CONFIG_FLASH_CFI_MTD
diff --git a/include/fs.h b/include/fs.h
index 37e35c2120..29f737b8c2 100644
--- a/include/fs.h
+++ b/include/fs.h
@@ -7,6 +7,8 @@
#include <common.h>
+struct cmd_tbl;
+
#define FS_TYPE_ANY 0
#define FS_TYPE_FAT 1
#define FS_TYPE_EXT 2
@@ -14,6 +16,8 @@
#define FS_TYPE_UBIFS 4
#define FS_TYPE_BTRFS 5
+struct blk_desc;
+
/**
* do_fat_fsload - Run the fatload command
*
@@ -23,7 +27,8 @@
* @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
@@ -34,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
@@ -224,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/fs_internal.h b/include/fs_internal.h
index 96d26032ac..3d4d25da96 100644
--- a/include/fs_internal.h
+++ b/include/fs_internal.h
@@ -10,7 +10,7 @@
#include <part.h>
-int fs_devread(struct blk_desc *, disk_partition_t *, lbaint_t, int, int,
+int fs_devread(struct blk_desc *, struct disk_partition *, lbaint_t, int, int,
char *);
#endif /* __U_BOOT_FS_INTERNAL_H__ */
diff --git a/include/fsl-mc/fsl_mc.h b/include/fsl-mc/fsl_mc.h
index a4d7d85fce..6cbcd39f12 100644
--- a/include/fsl-mc/fsl_mc.h
+++ b/include/fsl-mc/fsl_mc.h
@@ -7,6 +7,7 @@
#define __FSL_MC_H__
#include <common.h>
+#include <linux/bitops.h>
#define MC_CCSR_BASE_ADDR \
((struct mc_ccsr_registers __iomem *)0x8340000)
diff --git a/include/fsl_ddr.h b/include/fsl_ddr.h
index 2476f40c56..025d7a1e74 100644
--- a/include/fsl_ddr.h
+++ b/include/fsl_ddr.h
@@ -12,6 +12,8 @@
#include <common_timing_params.h>
+struct cmd_tbl;
+
#ifndef CONFIG_SYS_FSL_DDR_MAIN_NUM_CTRLS
/* All controllers are for main memory */
#define CONFIG_SYS_FSL_DDR_MAIN_NUM_CTRLS CONFIG_SYS_NUM_DDR_CTLRS
@@ -120,7 +122,7 @@ unsigned long long fsl_ddr_interactive(fsl_ddr_info_t *pinfo, int var_is_set);
void fsl_ddr_get_spd(generic_spd_eeprom_t *ctrl_dimms_spd,
unsigned int ctrl_num, unsigned int dimm_slots_per_ctrl);
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
unsigned int check_fsl_memctl_config_regs(const fsl_ddr_cfg_regs_t *ddr);
void board_add_ram_info(int use_default);
diff --git a/include/fsl_ifc.h b/include/fsl_ifc.h
index 3edcc39f4e..fd915335b2 100644
--- a/include/fsl_ifc.h
+++ b/include/fsl_ifc.h
@@ -10,6 +10,7 @@
#ifdef CONFIG_FSL_IFC
#include <config.h>
#include <common.h>
+#include <part.h>
#ifdef CONFIG_ARM
#include <asm/arch/soc.h>
#endif
diff --git a/include/fsl_validate.h b/include/fsl_validate.h
index 06951fccf4..252d499e7b 100644
--- a/include/fsl_validate.h
+++ b/include/fsl_validate.h
@@ -8,9 +8,10 @@
#include <fsl_sec.h>
#include <fsl_sec_mon.h>
-#include <command.h>
#include <linux/types.h>
+struct cmd_tbl;
+
#define WORD_SIZE 4
/* Minimum and maximum size of RSA signature length in bits */
@@ -261,15 +262,14 @@ struct fsl_secboot_img_priv {
uint32_t img_size; /* ESBC Image Size */
};
-int do_esbc_halt(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[]);
+int do_esbc_halt(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
int fsl_secboot_validate(uintptr_t haddr, char *arg_hash_str,
uintptr_t *img_addr_ptr);
-int fsl_secboot_blob_encap(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[]);
-int fsl_secboot_blob_decap(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[]);
+int fsl_secboot_blob_encap(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[]);
+int fsl_secboot_blob_decap(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[]);
int fsl_check_boot_mode_secure(void);
int fsl_setenv_chain_of_trust(void);
diff --git a/include/gzip.h b/include/gzip.h
index 2e340673c3..783acbb60d 100644
--- a/include/gzip.h
+++ b/include/gzip.h
@@ -7,6 +7,8 @@
#ifndef __GZIP_H
#define __GZIP_H
+struct blk_desc;
+
/**
* gzip_parse_header() - Parse a header from a gzip file
*
diff --git a/include/hash.h b/include/hash.h
index f4019a9791..835962e7f6 100644
--- a/include/hash.h
+++ b/include/hash.h
@@ -6,6 +6,8 @@
#ifndef _HASH_H
#define _HASH_H
+struct cmd_tbl;
+
/*
* Maximum digest size for all algorithms we support. Having this value
* avoids a malloc() or C99 local declaration in common/cmd_hash.c.
@@ -85,8 +87,8 @@ struct hash_algo {
* @argc: Number of arguments (arg 0 must be the command text)
* @argv: Arguments
*/
-int hash_command(const char *algo_name, int flags, cmd_tbl_t *cmdtp, int flag,
- int argc, char * const argv[]);
+int hash_command(const char *algo_name, int flags, struct cmd_tbl *cmdtp,
+ int flag, int argc, char *const argv[]);
/**
* hash_block() - Hash a block according to the requested algorithm
diff --git a/include/i2c.h b/include/i2c.h
index 059200115a..1d792db454 100644
--- a/include/i2c.h
+++ b/include/i2c.h
@@ -16,6 +16,8 @@
#ifndef _I2C_H_
#define _I2C_H_
+#include <linker_lists.h>
+
/*
* For now there are essentially two parts to this file - driver model
* here at the top, and the older code below (with CONFIG_SYS_I2C being
diff --git a/include/image.h b/include/image.h
index de55b2fb57..ad81dad444 100644
--- a/include/image.h
+++ b/include/image.h
@@ -590,10 +590,10 @@ ulong genimg_get_kernel_addr(char * const img_addr);
int genimg_get_format(const void *img_addr);
int genimg_has_config(bootm_headers_t *images);
-int boot_get_fpga(int argc, char * const argv[], bootm_headers_t *images,
- uint8_t arch, const ulong *ld_start, ulong * const ld_len);
-int boot_get_ramdisk(int argc, char * const argv[], bootm_headers_t *images,
- uint8_t arch, ulong *rd_start, ulong *rd_end);
+int boot_get_fpga(int argc, char *const argv[], bootm_headers_t *images,
+ uint8_t arch, const ulong *ld_start, ulong * const ld_len);
+int boot_get_ramdisk(int argc, char *const argv[], bootm_headers_t *images,
+ uint8_t arch, ulong *rd_start, ulong *rd_end);
/**
* boot_get_loadable - routine to load a list of binaries to memory
@@ -616,8 +616,8 @@ int boot_get_ramdisk(int argc, char * const argv[], bootm_headers_t *images,
* 0, if only valid images or no images are found
* error code, if an error occurs during fit_image_load
*/
-int boot_get_loadable(int argc, char * const argv[], bootm_headers_t *images,
- uint8_t arch, const ulong *ld_start, ulong * const ld_len);
+int boot_get_loadable(int argc, char *const argv[], bootm_headers_t *images,
+ uint8_t arch, const ulong *ld_start, ulong *const ld_len);
#endif /* !USE_HOSTCC */
int boot_get_setup_fit(bootm_headers_t *images, uint8_t arch,
@@ -726,7 +726,7 @@ int image_source_script(ulong addr, const char *fit_uname);
int fit_get_node_from_config(bootm_headers_t *images, const char *prop_name,
ulong addr);
-int boot_get_fdt(int flag, int argc, char * const argv[], uint8_t arch,
+int boot_get_fdt(int flag, int argc, char *const argv[], uint8_t arch,
bootm_headers_t *images,
char **of_flat_tree, ulong *of_size);
void boot_fdt_add_mem_rsv_regions(struct lmb *lmb, void *fdt_blob);
diff --git a/include/initcall.h b/include/initcall.h
index b5acdd01bd..41b74dc52d 100644
--- a/include/initcall.h
+++ b/include/initcall.h
@@ -8,6 +8,11 @@
typedef int (*init_fnc_t)(void);
+#include <log.h>
+#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/kgdb.h b/include/kgdb.h
index b6ba742ad3..616ce4451f 100644
--- a/include/kgdb.h
+++ b/include/kgdb.h
@@ -55,7 +55,7 @@ extern int kgdb_getregs(struct pt_regs *, char *, int);
extern void kgdb_putreg(struct pt_regs *, int, char *, int);
extern void kgdb_putregs(struct pt_regs *, char *, int);
extern int kgdb_trap(struct pt_regs *);
-extern void kgdb_breakpoint(int argc, char * const argv[]);
+void kgdb_breakpoint(int argc, char *const argv[]);
/* these functions are provided by the platform serial driver */
extern void kgdb_serial_init(void);
diff --git a/include/linux/bitops.h b/include/linux/bitops.h
index a07c70fd48..6b509dce58 100644
--- a/include/linux/bitops.h
+++ b/include/linux/bitops.h
@@ -1,6 +1,8 @@
#ifndef _LINUX_BITOPS_H
#define _LINUX_BITOPS_H
+#ifndef USE_HOSTCC
+
#include <asm/types.h>
#include <asm-generic/bitsperlong.h>
#include <linux/compiler.h>
@@ -216,4 +218,6 @@ static inline void generic_clear_bit(int nr, volatile unsigned long *addr)
*p &= ~mask;
}
+#endif /* !USE_HOSTCC */
+
#endif
diff --git a/include/linux/compat.h b/include/linux/compat.h
index 171188a76f..712eeaef4e 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -1,6 +1,7 @@
#ifndef _LINUX_COMPAT_H_
#define _LINUX_COMPAT_H_
+#include <log.h>
#include <malloc.h>
#include <linux/types.h>
#include <linux/err.h>
diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h
index bd373b9617..66febc6b72 100644
--- a/include/linux/mtd/rawnand.h
+++ b/include/linux/mtd/rawnand.h
@@ -16,6 +16,7 @@
#include <config.h>
#include <dm/device.h>
+#include <linux/bitops.h>
#include <linux/compat.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/flashchip.h>
diff --git a/include/linux/soc/ti/cppi5.h b/include/linux/soc/ti/cppi5.h
index 34038b31f7..cfdf7ea29f 100644
--- a/include/linux/soc/ti/cppi5.h
+++ b/include/linux/soc/ti/cppi5.h
@@ -10,6 +10,7 @@
#include <hexdump.h>
#include <linux/bitops.h>
+#include <linux/bug.h>
/**
* Descriptor header, present in all types of descriptors
diff --git a/include/linux/soc/ti/k3-navss-ringacc.h b/include/linux/soc/ti/k3-navss-ringacc.h
index 487dfe9859..7b027f8bd4 100644
--- a/include/linux/soc/ti/k3-navss-ringacc.h
+++ b/include/linux/soc/ti/k3-navss-ringacc.h
@@ -9,6 +9,7 @@
#define __SOC_TI_K3_NAVSS_RINGACC_API_H_
#include <dm/ofnode.h>
+#include <linux/bitops.h>
/**
* enum k3_nav_ring_mode - &struct k3_nav_ring_cfg mode
diff --git a/include/linux/soc/ti/ti_sci_protocol.h b/include/linux/soc/ti/ti_sci_protocol.h
index 8c4863efe1..eb916ba101 100644
--- a/include/linux/soc/ti/ti_sci_protocol.h
+++ b/include/linux/soc/ti/ti_sci_protocol.h
@@ -20,6 +20,7 @@
* @firmware_revision: Firmware revision (not usually used).
* @firmware_description: Firmware description (not usually used).
*/
+#include <linux/bitops.h>
struct ti_sci_version_info {
u8 abi_major;
u8 abi_minor;
diff --git a/include/log.h b/include/log.h
index cf32351134..df65398c04 100644
--- a/include/log.h
+++ b/include/log.h
@@ -9,10 +9,13 @@
#ifndef __LOG_H
#define __LOG_H
-#include <command.h>
+#include <stdio.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 */
@@ -413,7 +416,7 @@ enum log_fmt {
};
/* Handle the 'log test' command */
-int do_log_test(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]);
+int do_log_test(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
/**
* log_add_filter() - Add a new filter to a log device
diff --git a/include/mipi_dsi.h b/include/mipi_dsi.h
index f4a63b47f3..83c5163cf8 100644
--- a/include/mipi_dsi.h
+++ b/include/mipi_dsi.h
@@ -16,6 +16,7 @@
#define MIPI_DSI_H
#include <mipi_display.h>
+#include <linux/bitops.h>
struct mipi_dsi_host;
struct mipi_dsi_device;
diff --git a/include/mmc.h b/include/mmc.h
index 6a2e9739e0..82562193cc 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -9,6 +9,7 @@
#ifndef _MMC_H_
#define _MMC_H_
+#include <linux/bitops.h>
#include <linux/list.h>
#include <linux/sizes.h>
#include <linux/compiler.h>
diff --git a/include/net.h b/include/net.h
index 82500eeb30..00a8ec0c78 100644
--- a/include/net.h
+++ b/include/net.h
@@ -12,12 +12,19 @@
#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>
+#include <log.h>
+#include <time.h>
#include <linux/if_ether.h>
#include <rand.h>
+struct bd_info;
+struct cmd_tbl;
+struct udevice;
+
#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 +66,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 *cmdtp, int flag, int argc, char *const argv[]);
/**
* An incoming packet handler.
@@ -184,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;
@@ -242,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/net/pfe_eth/pfe/cbus/class_csr.h b/include/net/pfe_eth/pfe/cbus/class_csr.h
index e2fece7aa1..80f1f96b44 100644
--- a/include/net/pfe_eth/pfe/cbus/class_csr.h
+++ b/include/net/pfe_eth/pfe/cbus/class_csr.h
@@ -12,6 +12,7 @@
* class_csr - block containing all the classifier control and status register.
* Mapped on CBUS and accessible from all PE's and ARM.
*/
+#include <linux/bitops.h>
#define CLASS_VERSION (CLASS_CSR_BASE_ADDR + 0x000)
#define CLASS_TX_CTRL (CLASS_CSR_BASE_ADDR + 0x004)
#define CLASS_INQ_PKTPTR (CLASS_CSR_BASE_ADDR + 0x010)
diff --git a/include/net/pfe_eth/pfe/cbus/emac.h b/include/net/pfe_eth/pfe/cbus/emac.h
index 53db8cc08f..5dc2113687 100644
--- a/include/net/pfe_eth/pfe/cbus/emac.h
+++ b/include/net/pfe_eth/pfe/cbus/emac.h
@@ -7,6 +7,7 @@
#ifndef _EMAC_H_
#define _EMAC_H_
+#include <linux/bitops.h>
#define EMAC_IEVENT_REG 0x004
#define EMAC_IMASK_REG 0x008
#define EMAC_R_DES_ACTIVE_REG 0x010
diff --git a/include/net/pfe_eth/pfe/cbus/hif.h b/include/net/pfe_eth/pfe/cbus/hif.h
index 36722c5e07..aa4951ec0e 100644
--- a/include/net/pfe_eth/pfe/cbus/hif.h
+++ b/include/net/pfe_eth/pfe/cbus/hif.h
@@ -12,6 +12,7 @@
* hif - PFE hif block control and status register.
* Mapped on CBUS and accessible from all PE's and ARM.
*/
+#include <linux/bitops.h>
#define HIF_VERSION (HIF_BASE_ADDR + 0x00)
#define HIF_TX_CTRL (HIF_BASE_ADDR + 0x04)
#define HIF_TX_CURR_BD_ADDR (HIF_BASE_ADDR + 0x08)
diff --git a/include/net/pfe_eth/pfe/cbus/tmu_csr.h b/include/net/pfe_eth/pfe/cbus/tmu_csr.h
index 1e1abe26ca..cfe8f8ce8f 100644
--- a/include/net/pfe_eth/pfe/cbus/tmu_csr.h
+++ b/include/net/pfe_eth/pfe/cbus/tmu_csr.h
@@ -7,6 +7,7 @@
#ifndef _TMU_CSR_H_
#define _TMU_CSR_H_
+#include <linux/bitops.h>
#define TMU_VERSION (TMU_CSR_BASE_ADDR + 0x000)
#define TMU_INQ_WATERMARK (TMU_CSR_BASE_ADDR + 0x004)
#define TMU_PHY_INQ_PKTPTR (TMU_CSR_BASE_ADDR + 0x008)
diff --git a/include/net/pfe_eth/pfe/pfe_hw.h b/include/net/pfe_eth/pfe/pfe_hw.h
index 5da676bf8b..c69fc69130 100644
--- a/include/net/pfe_eth/pfe/pfe_hw.h
+++ b/include/net/pfe_eth/pfe/pfe_hw.h
@@ -8,6 +8,7 @@
#define _PFE_H_
#include <elf.h>
+#include <linux/bitops.h>
#include "cbus.h"
#define PFE_RESET_WA
diff --git a/include/net/pfe_eth/pfe_eth.h b/include/net/pfe_eth/pfe_eth.h
index 68b2e381b9..116a2b2c1d 100644
--- a/include/net/pfe_eth/pfe_eth.h
+++ b/include/net/pfe_eth/pfe_eth.h
@@ -7,6 +7,7 @@
#ifndef __PFE_ETH_H__
#define __PFE_ETH_H__
+#include <linux/bitops.h>
#include <linux/sizes.h>
#include <asm/io.h>
#include <miiphy.h>
diff --git a/include/part.h b/include/part.h
index 3693527397..55be724d20 100644
--- a/include/part.h
+++ b/include/part.h
@@ -54,7 +54,7 @@ struct block_drvr {
#define PART_BOOTABLE ((int)BIT(0))
#define PART_EFI_SYSTEM_PARTITION ((int)BIT(1))
-typedef struct disk_partition {
+struct disk_partition {
lbaint_t start; /* # of first block in partition */
lbaint_t size; /* number of blocks in partition */
ulong blksz; /* block size in bytes */
@@ -76,11 +76,11 @@ typedef struct disk_partition {
#ifdef CONFIG_DOS_PARTITION
uchar sys_ind; /* partition type */
#endif
-} disk_partition_t;
+};
struct disk_part {
int partnum;
- disk_partition_t gpt_part_info;
+ struct disk_partition gpt_part_info;
struct list_head list;
};
@@ -105,12 +105,14 @@ struct blk_desc *mg_disk_get_dev(int dev);
int host_get_dev_err(int dev, struct blk_desc **blk_devp);
/* disk/part.c */
-int part_get_info(struct blk_desc *dev_desc, int part, disk_partition_t *info);
+int part_get_info(struct blk_desc *dev_desc, int part,
+ struct disk_partition *info);
/**
* part_get_info_whole_disk() - get partition info for the special case of
* a partition occupying the entire disk.
*/
-int part_get_info_whole_disk(struct blk_desc *dev_desc, disk_partition_t *info);
+int part_get_info_whole_disk(struct blk_desc *dev_desc,
+ struct disk_partition *info);
void part_print(struct blk_desc *dev_desc);
void part_init(struct blk_desc *dev_desc);
@@ -179,7 +181,7 @@ int blk_get_device_by_str(const char *ifname, const char *dev_str,
*/
int blk_get_device_part_str(const char *ifname, const char *dev_part_str,
struct blk_desc **dev_desc,
- disk_partition_t *info, int allow_whole_dev);
+ struct disk_partition *info, int allow_whole_dev);
/**
* part_get_info_by_name_type() - Search for a partition by name
@@ -194,7 +196,7 @@ int blk_get_device_part_str(const char *ifname, const char *dev_part_str,
* otherwise error
*/
int part_get_info_by_name_type(struct blk_desc *dev_desc, const char *name,
- disk_partition_t *info, int part_type);
+ struct disk_partition *info, int part_type);
/**
* part_get_info_by_name() - Search for a partition by name
@@ -208,7 +210,7 @@ int part_get_info_by_name_type(struct blk_desc *dev_desc, const char *name,
* otherwise error
*/
int part_get_info_by_name(struct blk_desc *dev_desc,
- const char *name, disk_partition_t *info);
+ const char *name, struct disk_partition *info);
/**
* Get partition info from dev number + part name, or dev number + part number.
@@ -229,7 +231,7 @@ int part_get_info_by_name(struct blk_desc *dev_desc,
int part_get_info_by_dev_and_name_or_num(const char *dev_iface,
const char *dev_part_str,
struct blk_desc **dev_desc,
- disk_partition_t *part_info);
+ struct disk_partition *part_info);
/**
* part_set_generic_name() - create generic partition like hda1 or sdb2
@@ -252,9 +254,9 @@ static inline struct blk_desc *blk_get_dev(const char *ifname, int dev)
static inline struct blk_desc *mg_disk_get_dev(int dev) { return NULL; }
static inline int part_get_info(struct blk_desc *dev_desc, int part,
- disk_partition_t *info) { return -1; }
+ struct disk_partition *info) { return -1; }
static inline int part_get_info_whole_disk(struct blk_desc *dev_desc,
- disk_partition_t *info)
+ struct disk_partition *info)
{ return -1; }
static inline void part_print(struct blk_desc *dev_desc) {}
static inline void part_init(struct blk_desc *dev_desc) {}
@@ -263,10 +265,10 @@ static inline int blk_get_device_by_str(const char *ifname, const char *dev_str,
struct blk_desc **dev_desc)
{ return -1; }
static inline int blk_get_device_part_str(const char *ifname,
- const char *dev_part_str,
- struct blk_desc **dev_desc,
- disk_partition_t *info,
- int allow_whole_dev)
+ const char *dev_part_str,
+ struct blk_desc **dev_desc,
+ struct disk_partition *info,
+ int allow_whole_dev)
{ *dev_desc = NULL; return -1; }
#endif
@@ -301,7 +303,7 @@ struct part_driver {
* @info: Returns partition information
*/
int (*get_info)(struct blk_desc *dev_desc, int part,
- disk_partition_t *info);
+ struct disk_partition *info);
/**
* print() - Print partition information
@@ -353,7 +355,7 @@ int write_gpt_table(struct blk_desc *dev_desc,
*/
int gpt_fill_pte(struct blk_desc *dev_desc,
gpt_header *gpt_h, gpt_entry *gpt_e,
- disk_partition_t *partitions, int parts);
+ struct disk_partition *partitions, int parts);
/**
* gpt_fill_header(): Fill the GPT header
@@ -379,7 +381,7 @@ int gpt_fill_header(struct blk_desc *dev_desc, gpt_header *gpt_h,
* @return zero on success
*/
int gpt_restore(struct blk_desc *dev_desc, char *str_disk_guid,
- disk_partition_t *partitions, const int parts_count);
+ struct disk_partition *partitions, const int parts_count);
/**
* is_valid_gpt_buf() - Ensure that the Primary GPT information is valid
@@ -433,7 +435,7 @@ int gpt_verify_headers(struct blk_desc *dev_desc, gpt_header *gpt_head,
* @return - '0' on success, otherwise error
*/
int gpt_verify_partitions(struct blk_desc *dev_desc,
- disk_partition_t *partitions, int parts,
+ struct disk_partition *partitions, int parts,
gpt_header *gpt_head, gpt_entry **gpt_pte);
diff --git a/include/pch.h b/include/pch.h
index 0b44b66df9..620566819c 100644
--- a/include/pch.h
+++ b/include/pch.h
@@ -7,6 +7,7 @@
#ifndef __pch_h
#define __pch_h
+#include <linux/bitops.h>
#define PCH_RCBA 0xf0
#define BIOS_CTRL_BIOSWE BIT(0)
diff --git a/include/power/stpmic1.h b/include/power/stpmic1.h
index 1493a677f0..d3567df326 100644
--- a/include/power/stpmic1.h
+++ b/include/power/stpmic1.h
@@ -6,6 +6,7 @@
#ifndef __PMIC_STPMIC1_H_
#define __PMIC_STPMIC1_H_
+#include <linux/bitops.h>
#define STPMIC1_MAIN_CR 0x10
#define STPMIC1_BUCKS_MRST_CR 0x18
#define STPMIC1_LDOS_MRST_CR 0x1a
diff --git a/include/regmap.h b/include/regmap.h
index 9ada1af5ef..30183c5e71 100644
--- a/include/regmap.h
+++ b/include/regmap.h
@@ -7,6 +7,8 @@
#ifndef __REGMAP_H
#define __REGMAP_H
+#include <linux/delay.h>
+
/**
* DOC: Overview
*
diff --git a/include/reiserfs.h b/include/reiserfs.h
index de4150024c..b61bb60067 100644
--- a/include/reiserfs.h
+++ b/include/reiserfs.h
@@ -18,6 +18,9 @@
#define SECTOR_SIZE 0x200
#define SECTOR_BITS 9
+struct blk_desc;
+struct disk_partition;
+
/* Error codes */
typedef enum
{
@@ -62,7 +65,7 @@ typedef enum
} reiserfs_error_t;
-void reiserfs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info);
+void reiserfs_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info);
extern int reiserfs_ls (char *dirname);
extern int reiserfs_open (char *filename);
extern int reiserfs_read (char *buf, unsigned len);
diff --git a/include/sandboxfs.h b/include/sandboxfs.h
index 6e6e3c62ff..783dd5c88a 100644
--- a/include/sandboxfs.h
+++ b/include/sandboxfs.h
@@ -18,7 +18,10 @@
#ifndef __SANDBOX_FS__
#define __SANDBOX_FS__
-int sandbox_fs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info);
+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,
loff_t maxsize, loff_t *actread);
diff --git a/include/scsi.h b/include/scsi.h
index 61da958bf6..96cb726676 100644
--- a/include/scsi.h
+++ b/include/scsi.h
@@ -6,6 +6,7 @@
#ifndef _SCSI_H
#define _SCSI_H
+#include <asm/cache.h>
#include <linux/dma-direction.h>
struct scsi_cmd {
diff --git a/include/sdhci.h b/include/sdhci.h
index 0ef8c2ed62..94fc3ed56a 100644
--- a/include/sdhci.h
+++ b/include/sdhci.h
@@ -9,6 +9,7 @@
#ifndef __SDHCI_HW_H
#define __SDHCI_HW_H
+#include <linux/bitops.h>
#include <linux/types.h>
#include <asm/io.h>
#include <mmc.h>
diff --git a/include/search.h b/include/search.h
index 8f87dc72ce..bca36d3abc 100644
--- a/include/search.h
+++ b/include/search.h
@@ -84,7 +84,7 @@ int hmatch_r(const char *match, int last_idx, struct env_entry **retval,
int hdelete_r(const char *key, struct hsearch_data *htab, int flag);
ssize_t hexport_r(struct hsearch_data *htab, const char sep, int flag,
- char **resp, size_t size, int argc, char * const argv[]);
+ char **resp, size_t size, int argc, char *const argv[]);
/*
* nvars: length of vars array
diff --git a/include/spi.h b/include/spi.h
index 2b4929fc79..5cc6d6e008 100644
--- a/include/spi.h
+++ b/include/spi.h
@@ -10,6 +10,7 @@
#define _SPI_H_
#include <common.h>
+#include <linux/bitops.h>
/* SPI mode flags */
#define SPI_CPHA BIT(0) /* clock phase */
diff --git a/include/spl.h b/include/spl.h
index 90395fedb0..b31c9bb4ab 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>
@@ -26,6 +27,9 @@ struct image_header;
#define MMCSD_MODE_FS 2
#define MMCSD_MODE_EMMCBOOT 3
+struct blk_desc;
+struct image_header;
+
/*
* u_boot_first_phase() - check if this is the first U-Boot phase
*
diff --git a/include/tee.h b/include/tee.h
index 02bcd9e703..8207d0c02a 100644
--- a/include/tee.h
+++ b/include/tee.h
@@ -6,6 +6,7 @@
#ifndef __TEE_H
#define __TEE_H
+#include <linux/bitops.h>
#define TEE_UUID_LEN 16
#define TEE_GEN_CAP_GP BIT(0) /* GlobalPlatform compliant TEE */
diff --git a/include/tee/optee.h b/include/tee/optee.h
index 121b30a303..affa937da0 100644
--- a/include/tee/optee.h
+++ b/include/tee/optee.h
@@ -10,6 +10,7 @@
#define _OPTEE_H
#include <linux/errno.h>
+#include <image.h>
#define OPTEE_MAGIC 0x4554504f
#define OPTEE_VERSION 1
@@ -28,14 +29,16 @@ struct optee_header {
uint32_t paged_size;
};
-static inline uint32_t optee_image_get_entry_point(const image_header_t *hdr)
+static inline uint32_t
+optee_image_get_entry_point(const struct image_header *hdr)
{
struct optee_header *optee_hdr = (struct optee_header *)(hdr + 1);
return optee_hdr->init_load_addr_lo;
}
-static inline uint32_t optee_image_get_load_addr(const image_header_t *hdr)
+static inline uint32_t
+optee_image_get_load_addr(const struct image_header *hdr)
{
return optee_image_get_entry_point(hdr) - sizeof(struct optee_header);
}
diff --git a/include/test/suites.h b/include/test/suites.h
index 213e3cee77..f120b3a82a 100644
--- a/include/test/suites.h
+++ b/include/test/suites.h
@@ -7,6 +7,7 @@
#ifndef __TEST_SUITES_H__
#define __TEST_SUITES_H__
+struct cmd_tbl;
struct unit_test;
/**
@@ -23,18 +24,22 @@ struct unit_test;
*/
int cmd_ut_category(const char *name, const char *prefix,
struct unit_test *tests, int n_ents,
- int argc, char * const argv[]);
+ int argc, char *const argv[]);
-int do_ut_bloblist(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]);
-int do_ut_compression(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]);
-int do_ut_dm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
-int do_ut_env(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
-int do_ut_lib(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
-int do_ut_log(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
-int do_ut_optee(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
-int do_ut_overlay(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
-int do_ut_str(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]);
-int do_ut_time(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
-int do_ut_unicode(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+int do_ut_bloblist(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[]);
+int do_ut_compression(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[]);
+int do_ut_dm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
+int do_ut_env(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
+int do_ut_lib(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
+int do_ut_log(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[]);
+int do_ut_optee(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
+int do_ut_overlay(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[]);
+int do_ut_str(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
+int do_ut_time(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
+int do_ut_unicode(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[]);
#endif /* __TEST_SUITES_H__ */
diff --git a/include/test/ut.h b/include/test/ut.h
index b05d719ed0..7ddd6e8872 100644
--- a/include/test/ut.h
+++ b/include/test/ut.h
@@ -8,6 +8,7 @@
#ifndef __TEST_UT_H
#define __TEST_UT_H
+#include <command.h>
#include <hexdump.h>
#include <linux/err.h>
diff --git a/include/tpm-common.h b/include/tpm-common.h
index 702cd6e93b..e29b10b176 100644
--- a/include/tpm-common.h
+++ b/include/tpm-common.h
@@ -7,6 +7,8 @@
#ifndef __TPM_COMMON_H
#define __TPM_COMMON_H
+#include <command.h>
+
enum tpm_duration {
TPM_SHORT = 0,
TPM_MEDIUM = 1,
@@ -173,8 +175,8 @@ struct tpm_ops {
U_BOOT_CMD_MKENT(cmd, 0, 1, do_tpm_ ## cmd, "", "")
#define TPM_COMMAND_NO_ARG(cmd) \
-int do_##cmd(cmd_tbl_t *cmdtp, int flag, \
- int argc, char * const argv[]) \
+int do_##cmd(struct cmd_tbl *cmdtp, int flag, \
+ int argc, char *const argv[]) \
{ \
struct udevice *dev; \
int rc; \
@@ -263,20 +265,20 @@ int tpm_init(struct udevice *dev);
/**
* Retrieve the array containing all the v1 (resp. v2) commands.
*
- * @return a cmd_tbl_t array.
+ * @return a struct cmd_tbl array.
*/
#if defined(CONFIG_TPM_V1)
-cmd_tbl_t *get_tpm1_commands(unsigned int *size);
+struct cmd_tbl *get_tpm1_commands(unsigned int *size);
#else
-static inline cmd_tbl_t *get_tpm1_commands(unsigned int *size)
+static inline struct cmd_tbl *get_tpm1_commands(unsigned int *size)
{
return NULL;
}
#endif
#if defined(CONFIG_TPM_V2)
-cmd_tbl_t *get_tpm2_commands(unsigned int *size);
+struct cmd_tbl *get_tpm2_commands(unsigned int *size);
#else
-static inline cmd_tbl_t *get_tpm2_commands(unsigned int *size)
+static inline struct cmd_tbl *get_tpm2_commands(unsigned int *size)
{
return NULL;
}
diff --git a/include/tpm-v1.h b/include/tpm-v1.h
index 45b7a4831d..59ad4aecf4 100644
--- a/include/tpm-v1.h
+++ b/include/tpm-v1.h
@@ -8,6 +8,7 @@
#define __TPM_V1_H
#include <tpm-common.h>
+#include <linux/bitops.h>
/* Useful constants */
enum {
diff --git a/include/ubifs_uboot.h b/include/ubifs_uboot.h
index 015ce12226..b025779d59 100644
--- a/include/ubifs_uboot.h
+++ b/include/ubifs_uboot.h
@@ -14,13 +14,16 @@
#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);
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/virtio.h b/include/virtio.h
index 561dcc34ba..10a9c073ba 100644
--- a/include/virtio.h
+++ b/include/virtio.h
@@ -20,6 +20,8 @@
#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 */
#define VIRTIO_ID_RNG 4 /* virtio rng */
diff --git a/include/vsc9953.h b/include/vsc9953.h
index fe072da516..5d6fc7716c 100644
--- a/include/vsc9953.h
+++ b/include/vsc9953.h
@@ -11,6 +11,7 @@
#include <config.h>
#include <miiphy.h>
#include <asm/types.h>
+#include <linux/bitops.h>
#define VSC9953_OFFSET (CONFIG_SYS_CCSRBAR_DEFAULT + 0x800000)
diff --git a/include/vxworks.h b/include/vxworks.h
index d90d862fb7..c2585e61ce 100644
--- a/include/vxworks.h
+++ b/include/vxworks.h
@@ -9,6 +9,9 @@
#include <efi_api.h>
+struct bootm_headers;
+struct cmd_tbl;
+
/* Use Linux compatible standard DTB */
#define VXWORKS_SYSFLG_STD_DTB 0x1
@@ -83,8 +86,8 @@ struct efi_gop_info {
u32 fb_size; /* framebuffer size */
};
-int do_bootvx(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
-void boot_prep_vxworks(bootm_headers_t *images);
-void boot_jump_vxworks(bootm_headers_t *images);
+int do_bootvx(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
+void boot_prep_vxworks(struct bootm_headers *images);
+void boot_jump_vxworks(struct bootm_headers *images);
#endif
diff --git a/include/wait_bit.h b/include/wait_bit.h
index 79da0811fe..dc2ffeb2c2 100644
--- a/include/wait_bit.h
+++ b/include/wait_bit.h
@@ -8,9 +8,11 @@
#ifndef __WAIT_BIT_H
#define __WAIT_BIT_H
-#include <common.h>
#include <console.h>
+#include <log.h>
+#include <time.h>
#include <watchdog.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <asm/io.h>
diff --git a/include/wdt.h b/include/wdt.h
index aea5abc768..d2ccfbc62e 100644
--- a/include/wdt.h
+++ b/include/wdt.h
@@ -7,6 +7,7 @@
#define _WDT_H_
#include <dm.h>
+#include <log.h>
#include <dm/read.h>
/*
diff --git a/include/xyzModem.h b/include/xyzModem.h
index 6fae634961..a8911b6bf5 100644
--- a/include/xyzModem.h
+++ b/include/xyzModem.h
@@ -25,6 +25,8 @@
#ifndef _XYZMODEM_H_
#define _XYZMODEM_H_
+#include <linux/delay.h>
+
#define xyzModem_xmodem 1
#define xyzModem_ymodem 2
/* Don't define this until the protocol support is in place */
diff --git a/include/zfs_common.h b/include/zfs_common.h
index bca3dff06e..027ba91b28 100644
--- a/include/zfs_common.h
+++ b/include/zfs_common.h
@@ -98,7 +98,7 @@ int zfs_close(zfs_file_t);
int zfs_ls(device_t dev, const char *path,
int (*hook) (const char *, const struct zfs_dirhook_info *));
int zfs_devread(int sector, int byte_offset, int byte_len, char *buf);
-void zfs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info);
+void zfs_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info);
void zfs_unmount(struct zfs_data *data);
int lzjb_decompress(void *, void *, uint32_t, uint32_t);
#endif
diff --git a/include/zynqmppl.h b/include/zynqmppl.h
index 5214db99fb..a0a52ec4c1 100644
--- a/include/zynqmppl.h
+++ b/include/zynqmppl.h
@@ -8,6 +8,7 @@
#define _ZYNQMPPL_H_
#include <xilinx.h>
+#include <linux/bitops.h>
#define ZYNQMP_SIP_SVC_CSU_DMA_CHIPID 0xC2000018
#define ZYNQMP_SIP_SVC_PM_FPGA_LOAD 0xC2000016
diff --git a/lib/acpi/acpi_table.c b/lib/acpi/acpi_table.c
index 1c253af3bf..431776666e 100644
--- a/lib/acpi/acpi_table.c
+++ b/lib/acpi/acpi_table.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
#include <cpu.h>
+#include <log.h>
#include <mapmem.h>
#include <tables_csum.h>
#include <version.h>
diff --git a/lib/aes.c b/lib/aes.c
index ce53c9f1f3..c998aecb3c 100644
--- a/lib/aes.c
+++ b/lib/aes.c
@@ -23,6 +23,7 @@
#ifndef USE_HOSTCC
#include <common.h>
+#include <log.h>
#else
#include <string.h>
#endif
diff --git a/lib/asm-offsets.c b/lib/asm-offsets.c
index 26175132f3..b17651ed63 100644
--- a/lib/asm-offsets.c
+++ b/lib/asm-offsets.c
@@ -12,6 +12,7 @@
*/
#include <common.h>
+#include <asm-offsets.h>
#include <linux/kbuild.h>
diff --git a/lib/asn1_decoder.c b/lib/asn1_decoder.c
index db222625dd..bcb0390eb4 100644
--- a/lib/asn1_decoder.c
+++ b/lib/asn1_decoder.c
@@ -6,6 +6,7 @@
*/
#ifdef __UBOOT__
+#include <log.h>
#include <linux/compat.h>
#else
#include <linux/export.h>
diff --git a/lib/bch.c b/lib/bch.c
index 8945d8d4cf..de66b1acba 100644
--- a/lib/bch.c
+++ b/lib/bch.c
@@ -55,6 +55,7 @@
#ifndef USE_HOSTCC
#include <common.h>
+#include <log.h>
#include <malloc.h>
#include <ubi_uboot.h>
#include <dm/devres.h>
diff --git a/lib/binman.c b/lib/binman.c
index 6cf6dcfdad..fd7de24bd2 100644
--- a/lib/binman.c
+++ b/lib/binman.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <binman.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
struct binman_info {
diff --git a/lib/bzip2/bzlib_blocksort.c b/lib/bzip2/bzlib_blocksort.c
index 2785521502..36cf843659 100644
--- a/lib/bzip2/bzlib_blocksort.c
+++ b/lib/bzip2/bzlib_blocksort.c
@@ -60,6 +60,7 @@
--*/
#include "bzlib_private.h"
+#include <log.h>
/*---------------------------------------------*/
/*--- Fallback O(N log(N)^2) sorting ---*/
diff --git a/lib/circbuf.c b/lib/circbuf.c
index 071e4fb8a6..fa79c148da 100644
--- a/lib/circbuf.c
+++ b/lib/circbuf.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <log.h>
#include <malloc.h>
#include <circbuf.h>
diff --git a/lib/crypto/asymmetric_type.c b/lib/crypto/asymmetric_type.c
index 7aa55092ac..1d0532d0f2 100644
--- a/lib/crypto/asymmetric_type.c
+++ b/lib/crypto/asymmetric_type.c
@@ -7,12 +7,14 @@
* Written by David Howells (dhowells@redhat.com)
*/
#ifndef __UBOOT__
+#include <log.h>
#include <dm/devres.h>
#include <keys/asymmetric-subtype.h>
#include <keys/asymmetric-parser.h>
#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/pkcs7_parser.c b/lib/crypto/pkcs7_parser.c
index 0ee207b6b1..0b85fe8286 100644
--- a/lib/crypto/pkcs7_parser.c
+++ b/lib/crypto/pkcs7_parser.c
@@ -7,6 +7,7 @@
#define pr_fmt(fmt) "PKCS7: "fmt
#ifdef __UBOOT__
+#include <log.h>
#include <dm/devres.h>
#include <linux/bitops.h>
#include <linux/compat.h>
diff --git a/lib/crypto/public_key.c b/lib/crypto/public_key.c
index 8b4821767a..e12ebbb3d0 100644
--- a/lib/crypto/public_key.c
+++ b/lib/crypto/public_key.c
@@ -10,6 +10,7 @@
#define pr_fmt(fmt) "PKEY: "fmt
#ifdef __UBOOT__
#include <dm/devres.h>
+#include <linux/bug.h>
#include <linux/compat.h>
#include <linux/err.h>
#else
diff --git a/lib/crypto/x509_cert_parser.c b/lib/crypto/x509_cert_parser.c
index 18f5407a07..5f984b9dfd 100644
--- a/lib/crypto/x509_cert_parser.c
+++ b/lib/crypto/x509_cert_parser.c
@@ -6,6 +6,7 @@
*/
#define pr_fmt(fmt) "X.509: "fmt
+#include <log.h>
#include <dm/devres.h>
#include <linux/kernel.h>
#ifndef __UBOOT__
diff --git a/lib/dhry/cmd_dhry.c b/lib/dhry/cmd_dhry.c
index 29504833ef..d55ab54df9 100644
--- a/lib/dhry/cmd_dhry.c
+++ b/lib/dhry/cmd_dhry.c
@@ -8,7 +8,8 @@
#include <div64.h>
#include "dhry.h"
-static int do_dhry(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_dhry(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
ulong start, duration, vax_mips;
u64 dhry_per_sec;
diff --git a/lib/div64.c b/lib/div64.c
index 62933c92c4..779d7521f6 100644
--- a/lib/div64.c
+++ b/lib/div64.c
@@ -17,6 +17,7 @@
* or by defining a preprocessor macro in arch/include/asm/div64.h.
*/
+#include <linux/bitops.h>
#include <linux/compat.h>
#include <linux/kernel.h>
#include <linux/math64.h>
diff --git a/lib/efi/efi_app.c b/lib/efi/efi_app.c
index 7c64077d42..b7e19c3475 100644
--- a/lib/efi/efi_app.c
+++ b/lib/efi/efi_app.c
@@ -13,6 +13,7 @@
#include <debug_uart.h>
#include <dm.h>
#include <errno.h>
+#include <init.h>
#include <malloc.h>
#include <linux/err.h>
#include <linux/types.h>
diff --git a/lib/efi_driver/efi_block_device.c b/lib/efi_driver/efi_block_device.c
index 33e66fcad2..e7d8745ad8 100644
--- a/lib/efi_driver/efi_block_device.c
+++ b/lib/efi_driver/efi_block_device.c
@@ -28,6 +28,8 @@
* iPXE uses the simple file protocol to load Grub or the Linux Kernel.
*/
+#include <common.h>
+#include <blk.h>
#include <efi_driver.h>
#include <malloc.h>
#include <dm/device-internal.h>
diff --git a/lib/efi_driver/efi_uclass.c b/lib/efi_driver/efi_uclass.c
index f8badadf66..04e4e45734 100644
--- a/lib/efi_driver/efi_uclass.c
+++ b/lib/efi_driver/efi_uclass.c
@@ -18,6 +18,7 @@
*/
#include <efi_driver.h>
+#include <log.h>
#include <malloc.h>
/**
diff --git a/lib/efi_loader/efi_acpi.c b/lib/efi_loader/efi_acpi.c
index 9ae9c25c51..585b2d2b63 100644
--- a/lib/efi_loader/efi_acpi.c
+++ b/lib/efi_loader/efi_acpi.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <efi_loader.h>
+#include <log.h>
#include <acpi/acpi_table.h>
static const efi_guid_t acpi_guid = EFI_ACPI_TABLE_GUID;
diff --git a/lib/efi_loader/efi_bootmgr.c b/lib/efi_loader/efi_bootmgr.c
index 2ea21448f0..b112f5d81e 100644
--- a/lib/efi_loader/efi_bootmgr.c
+++ b/lib/efi_loader/efi_bootmgr.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <charset.h>
+#include <log.h>
#include <malloc.h>
#include <efi_loader.h>
#include <asm/unaligned.h>
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index a3f11eaf62..db34938196 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -9,6 +9,7 @@
#include <div64.h>
#include <efi_loader.h>
#include <irq_func.h>
+#include <log.h>
#include <malloc.h>
#include <time.h>
#include <linux/libfdt_env.h>
diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c
index f9349484a6..2b537c1e2e 100644
--- a/lib/efi_loader/efi_device_path.c
+++ b/lib/efi_loader/efi_device_path.c
@@ -8,6 +8,8 @@
#include <common.h>
#include <blk.h>
#include <dm.h>
+#include <log.h>
+#include <net.h>
#include <usb.h>
#include <mmc.h>
#include <nvme.h>
@@ -693,7 +695,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);
@@ -1035,7 +1037,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_device_path_to_text.c b/lib/efi_loader/efi_device_path_to_text.c
index af1adbb71e..49bebb58cc 100644
--- a/lib/efi_loader/efi_device_path_to_text.c
+++ b/lib/efi_loader/efi_device_path_to_text.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <blk.h>
#include <efi_loader.h>
#define MAC_OUTPUT_LEN 22
diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c
index 0582e02158..9176008c0e 100644
--- a/lib/efi_loader/efi_disk.c
+++ b/lib/efi_loader/efi_disk.c
@@ -424,7 +424,7 @@ static efi_status_t efi_disk_add_dev(
/* Store first EFI system partition */
if (part && !efi_system_partition.if_type) {
int r;
- disk_partition_t info;
+ struct disk_partition info;
r = part_get_info(desc, part, &info);
if (r)
@@ -459,7 +459,7 @@ int efi_disk_create_partitions(efi_handle_t parent, struct blk_desc *desc,
{
int disks = 0;
char devname[32] = { 0 }; /* dp->str is u16[32] long */
- disk_partition_t info;
+ struct disk_partition info;
int part;
struct efi_device_path *dp = NULL;
efi_status_t ret;
@@ -600,7 +600,7 @@ bool efi_disk_is_system_part(efi_handle_t handle)
{
struct efi_handler *handler;
struct efi_disk_obj *diskobj;
- disk_partition_t info;
+ struct disk_partition info;
efi_status_t ret;
int r;
diff --git a/lib/efi_loader/efi_file.c b/lib/efi_loader/efi_file.c
index 140116ddc4..19afa69f53 100644
--- a/lib/efi_loader/efi_file.c
+++ b/lib/efi_loader/efi_file.c
@@ -8,9 +8,11 @@
#include <common.h>
#include <charset.h>
#include <efi_loader.h>
+#include <log.h>
#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;
@@ -634,7 +636,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;
diff --git a/lib/efi_loader/efi_gop.c b/lib/efi_loader/efi_gop.c
index 1511e3bdb4..53f6d970f7 100644
--- a/lib/efi_loader/efi_gop.c
+++ b/lib/efi_loader/efi_gop.c
@@ -9,6 +9,7 @@
#include <dm.h>
#include <efi_loader.h>
#include <lcd.h>
+#include <log.h>
#include <malloc.h>
#include <video.h>
diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c
index c0cf1d9126..44b8a2e09f 100644
--- a/lib/efi_loader/efi_memory.c
+++ b/lib/efi_loader/efi_memory.c
@@ -11,6 +11,7 @@
#include <malloc.h>
#include <mapmem.h>
#include <watchdog.h>
+#include <asm/cache.h>
#include <linux/list_sort.h>
#include <linux/sizes.h>
diff --git a/lib/efi_loader/efi_net.c b/lib/efi_loader/efi_net.c
index 82d2595847..22f0123eca 100644
--- a/lib/efi_loader/efi_net.c
+++ b/lib/efi_loader/efi_net.c
@@ -18,6 +18,7 @@
#include <common.h>
#include <efi_loader.h>
#include <malloc.h>
+#include <net.h>
static const efi_guid_t efi_net_guid = EFI_SIMPLE_NETWORK_PROTOCOL_GUID;
static const efi_guid_t efi_pxe_base_code_protocol_guid =
diff --git a/lib/efi_loader/efi_rng.c b/lib/efi_loader/efi_rng.c
index a1d0ec842c..caef4085b0 100644
--- a/lib/efi_loader/efi_rng.c
+++ b/lib/efi_loader/efi_rng.c
@@ -7,6 +7,7 @@
#include <dm.h>
#include <efi_loader.h>
#include <efi_rng.h>
+#include <log.h>
#include <rng.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c
index a28b291927..c0bd99b867 100644
--- a/lib/efi_loader/efi_runtime.c
+++ b/lib/efi_loader/efi_runtime.c
@@ -11,6 +11,7 @@
#include <dm.h>
#include <elf.h>
#include <efi_loader.h>
+#include <log.h>
#include <malloc.h>
#include <rtc.h>
#include <u-boot/crc.h>
diff --git a/lib/efi_loader/efi_smbios.c b/lib/efi_loader/efi_smbios.c
index a81488495e..719d3e8880 100644
--- a/lib/efi_loader/efi_smbios.c
+++ b/lib/efi_loader/efi_smbios.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <efi_loader.h>
+#include <log.h>
#include <mapmem.h>
#include <smbios.h>
diff --git a/lib/efi_loader/efi_variable.c b/lib/efi_loader/efi_variable.c
index 10892684d1..fc7ae73978 100644
--- a/lib/efi_loader/efi_variable.c
+++ b/lib/efi_loader/efi_variable.c
@@ -7,12 +7,15 @@
#include <common.h>
#include <efi_loader.h>
+#include <env.h>
#include <env_internal.h>
#include <hexdump.h>
#include <malloc.h>
#include <rtc.h>
#include <search.h>
+#include <uuid.h>
#include <crypto/pkcs7_parser.h>
+#include <linux/bitops.h>
#include <linux/compat.h>
#include <u-boot/crc.h>
diff --git a/lib/efi_selftest/efi_selftest_block_device.c b/lib/efi_selftest/efi_selftest_block_device.c
index d98a854e6d..5eb297d285 100644
--- a/lib/efi_selftest/efi_selftest_block_device.c
+++ b/lib/efi_selftest/efi_selftest_block_device.c
@@ -15,6 +15,7 @@
#include <efi_selftest.h>
#include "efi_selftest_disk_image.h"
+#include <asm/cache.h>
/* Block size of compressed disk image */
#define COMPRESSED_DISK_IMAGE_BLOCK_SIZE 8
diff --git a/lib/efi_selftest/efi_selftest_console.c b/lib/efi_selftest/efi_selftest_console.c
index 42f51b6520..13f3ee6bc1 100644
--- a/lib/efi_selftest/efi_selftest_console.c
+++ b/lib/efi_selftest/efi_selftest_console.c
@@ -6,6 +6,7 @@
*/
#include <efi_selftest.h>
+#include <net.h>
#include <vsprintf.h>
struct efi_simple_text_output_protocol *con_out;
diff --git a/lib/efi_selftest/efi_selftest_snp.c b/lib/efi_selftest/efi_selftest_snp.c
index 9797ecaf42..79f0467803 100644
--- a/lib/efi_selftest/efi_selftest_snp.c
+++ b/lib/efi_selftest/efi_selftest_snp.c
@@ -15,6 +15,7 @@
*/
#include <efi_selftest.h>
+#include <net.h>
/*
* MAC address for broadcasts
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 0a3b860782..9c4d5713e1 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -9,7 +9,9 @@
#include <dm.h>
#include <hang.h>
#include <init.h>
+#include <log.h>
#include <malloc.h>
+#include <net.h>
#include <dm/of_extra.h>
#include <env.h>
#include <errno.h>
diff --git a/lib/fdtdec_common.c b/lib/fdtdec_common.c
index 5775992ef3..ddaca0087e 100644
--- a/lib/fdtdec_common.c
+++ b/lib/fdtdec_common.c
@@ -9,6 +9,7 @@
#ifndef USE_HOSTCC
#include <common.h>
+#include <log.h>
#include <linux/libfdt.h>
#include <fdtdec.h>
#else
diff --git a/lib/fdtdec_test.c b/lib/fdtdec_test.c
index e8bfd1fb1e..e0c6e0971c 100644
--- a/lib/fdtdec_test.c
+++ b/lib/fdtdec_test.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <command.h>
#include <fdtdec.h>
#include <linux/libfdt.h>
#include <malloc.h>
@@ -297,8 +298,8 @@ static int check_carveout(void)
return 0;
}
-static int do_test_fdtdec(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_test_fdtdec(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
/* basic tests */
CHECKOK(run_test("", "", ""));
diff --git a/lib/gunzip.c b/lib/gunzip.c
index 9e6ccd692a..bee3b9261f 100644
--- a/lib/gunzip.c
+++ b/lib/gunzip.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <blk.h>
#include <command.h>
#include <console.h>
#include <div64.h>
diff --git a/lib/hashtable.c b/lib/hashtable.c
index f82f2463cf..b96dbe19be 100644
--- a/lib/hashtable.c
+++ b/lib/hashtable.c
@@ -13,6 +13,7 @@
*/
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include <sort.h>
@@ -605,7 +606,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/image-sparse.c b/lib/image-sparse.c
index 036062139b..187ac28cd3 100644
--- a/lib/image-sparse.c
+++ b/lib/image-sparse.c
@@ -36,11 +36,14 @@
#include <config.h>
#include <common.h>
+#include <blk.h>
#include <image-sparse.h>
#include <div64.h>
+#include <log.h>
#include <malloc.h>
#include <part.h>
#include <sparse_format.h>
+#include <asm/cache.h>
#include <linux/math64.h>
diff --git a/lib/libavb/avb_cmdline.c b/lib/libavb/avb_cmdline.c
index dd859d3467..cb54e658c4 100644
--- a/lib/libavb/avb_cmdline.c
+++ b/lib/libavb/avb_cmdline.c
@@ -7,6 +7,7 @@
#include "avb_sha.h"
#include "avb_util.h"
#include "avb_version.h"
+#include <log.h>
#include <malloc.h>
#define NUM_GUIDS 3
diff --git a/lib/libavb/avb_descriptor.c b/lib/libavb/avb_descriptor.c
index 86b8d1b994..56a3a91fc2 100644
--- a/lib/libavb/avb_descriptor.c
+++ b/lib/libavb/avb_descriptor.c
@@ -6,6 +6,7 @@
#include "avb_descriptor.h"
#include "avb_util.h"
#include "avb_vbmeta_image.h"
+#include <log.h>
#include <malloc.h>
bool avb_descriptor_validate_and_byteswap(const AvbDescriptor* src,
diff --git a/lib/libavb/avb_slot_verify.c b/lib/libavb/avb_slot_verify.c
index 58baf522fc..ae8e1dffa4 100644
--- a/lib/libavb/avb_slot_verify.c
+++ b/lib/libavb/avb_slot_verify.c
@@ -14,6 +14,7 @@
#include "avb_util.h"
#include "avb_vbmeta_image.h"
#include "avb_version.h"
+#include <log.h>
#include <malloc.h>
/* Maximum number of partitions that can be loaded with avb_slot_verify(). */
diff --git a/lib/libavb/avb_util.c b/lib/libavb/avb_util.c
index 94773b77e7..8719ede15a 100644
--- a/lib/libavb/avb_util.c
+++ b/lib/libavb/avb_util.c
@@ -4,6 +4,7 @@
*/
#include "avb_util.h"
+#include <log.h>
#include <malloc.h>
#include <stdarg.h>
diff --git a/lib/linux_compat.c b/lib/linux_compat.c
index 89a6fd6ec9..c83426f59d 100644
--- a/lib/linux_compat.c
+++ b/lib/linux_compat.c
@@ -2,6 +2,7 @@
#include <common.h>
#include <malloc.h>
#include <memalign.h>
+#include <asm/cache.h>
#include <linux/compat.h>
struct p_current cur = {
diff --git a/lib/list_sort.c b/lib/list_sort.c
index beb7273fd3..58e1e1614a 100644
--- a/lib/list_sort.c
+++ b/lib/list_sort.c
@@ -1,4 +1,5 @@
#ifndef __UBOOT__
+#include <log.h>
#include <dm/devres.h>
#include <linux/kernel.h>
#include <linux/module.h>
diff --git a/lib/lmb.c b/lib/lmb.c
index 07b9308adf..008bcc7930 100644
--- a/lib/lmb.c
+++ b/lib/lmb.c
@@ -7,7 +7,9 @@
*/
#include <common.h>
+#include <image.h>
#include <lmb.h>
+#include <log.h>
#include <malloc.h>
#define LMB_ALLOC_ANYWHERE 0
diff --git a/lib/lzma/LzmaTools.c b/lib/lzma/LzmaTools.c
index 2537cb8f8c..521258e623 100644
--- a/lib/lzma/LzmaTools.c
+++ b/lib/lzma/LzmaTools.c
@@ -19,6 +19,7 @@
#include <config.h>
#include <common.h>
+#include <log.h>
#include <watchdog.h>
#ifdef CONFIG_LZMA
diff --git a/lib/membuff.c b/lib/membuff.c
index 45dae2d576..36dc43a523 100644
--- a/lib/membuff.c
+++ b/lib/membuff.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include "membuff.h"
diff --git a/lib/net_utils.c b/lib/net_utils.c
index 8af7782970..0a8a557319 100644
--- a/lib/net_utils.c
+++ b/lib/net_utils.c
@@ -10,6 +10,7 @@
*/
#include <common.h>
+#include <net.h>
struct in_addr string_to_ip(const char *s)
{
diff --git a/lib/of_live.c b/lib/of_live.c
index c49e95e38c..05a45ed34a 100644
--- a/lib/of_live.c
+++ b/lib/of_live.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <log.h>
#include <linux/libfdt.h>
#include <of_live.h>
#include <malloc.h>
diff --git a/lib/optee/optee.c b/lib/optee/optee.c
index d4355c6d03..e59b5766e7 100644
--- a/lib/optee/optee.c
+++ b/lib/optee/optee.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <image.h>
+#include <log.h>
#include <malloc.h>
#include <linux/libfdt.h>
#include <tee/optee.h>
diff --git a/lib/panic.c b/lib/panic.c
index 8e72c265a6..58382ac4f4 100644
--- a/lib/panic.c
+++ b/lib/panic.c
@@ -14,6 +14,7 @@
#if !defined(CONFIG_PANIC_HANG)
#include <command.h>
#endif
+#include <linux/delay.h>
static void panic_finish(void) __attribute__ ((noreturn));
diff --git a/lib/physmem.c b/lib/physmem.c
index 84b191dae3..fc90ce4d7c 100644
--- a/lib/physmem.c
+++ b/lib/physmem.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <log.h>
#include <mapmem.h>
#include <physmem.h>
#include <linux/compiler.h>
diff --git a/lib/qsort.c b/lib/qsort.c
index f63d4ef726..2f18588dfc 100644
--- a/lib/qsort.c
+++ b/lib/qsort.c
@@ -15,6 +15,7 @@
* calculation, as well as to reduce the generated code size with
* bcc and gcc. */
+#include <log.h>
#include <linux/types.h>
#include <common.h>
#include <exports.h>
diff --git a/lib/rsa/rsa-mod-exp.c b/lib/rsa/rsa-mod-exp.c
index 62b2557cc2..a437cbe26f 100644
--- a/lib/rsa/rsa-mod-exp.c
+++ b/lib/rsa/rsa-mod-exp.c
@@ -6,6 +6,7 @@
#ifndef USE_HOSTCC
#include <common.h>
#include <fdtdec.h>
+#include <log.h>
#include <asm/types.h>
#include <asm/byteorder.h>
#include <linux/errno.h>
diff --git a/lib/rsa/rsa-verify.c b/lib/rsa/rsa-verify.c
index f7ae174cb0..1d55b997e3 100644
--- a/lib/rsa/rsa-verify.c
+++ b/lib/rsa/rsa-verify.c
@@ -6,6 +6,7 @@
#ifndef USE_HOSTCC
#include <common.h>
#include <fdtdec.h>
+#include <log.h>
#include <malloc.h>
#include <asm/types.h>
#include <asm/byteorder.h>
diff --git a/lib/slre.c b/lib/slre.c
index 969c46a859..e82a9e7635 100644
--- a/lib/slre.c
+++ b/lib/slre.c
@@ -20,6 +20,7 @@
#include <stdlib.h>
#include <string.h>
#else
+#include <log.h>
#include <common.h>
#include <linux/ctype.h>
#endif /* SLRE_TEST */
diff --git a/lib/time.c b/lib/time.c
index 75de48f900..65db0f6cda 100644
--- a/lib/time.c
+++ b/lib/time.c
@@ -5,13 +5,16 @@
*/
#include <common.h>
+#include <bootstage.h>
#include <dm.h>
#include <errno.h>
+#include <init.h>
#include <time.h>
#include <timer.h>
#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 */
@@ -181,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/lib/tpm-common.c b/lib/tpm-common.c
index 86b4f413c2..e4af87f76a 100644
--- a/lib/tpm-common.c
+++ b/lib/tpm-common.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <asm/unaligned.h>
#include <tpm-common.h>
#include "tpm-utils.h"
diff --git a/lib/tpm-v1.c b/lib/tpm-v1.c
index b4498e6afc..a846fe00dd 100644
--- a/lib/tpm-v1.c
+++ b/lib/tpm-v1.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <asm/unaligned.h>
#include <u-boot/sha1.h>
#include <tpm-common.h>
diff --git a/lib/tpm-v2.c b/lib/tpm-v2.c
index f89592d6e2..5a039f65d1 100644
--- a/lib/tpm-v2.c
+++ b/lib/tpm-v2.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <tpm-common.h>
#include <tpm-v2.h>
+#include <linux/bitops.h>
#include "tpm-utils.h"
u32 tpm2_startup(struct udevice *dev, enum tpm2_startup_types mode)
diff --git a/lib/uuid.c b/lib/uuid.c
index c1cb9df6aa..e62d5ca264 100644
--- a/lib/uuid.c
+++ b/lib/uuid.c
@@ -4,8 +4,11 @@
*/
#include <common.h>
+#include <command.h>
#include <env.h>
+#include <rand.h>
#include <time.h>
+#include <uuid.h>
#include <linux/ctype.h>
#include <errno.h>
#include <common.h>
@@ -284,7 +287,7 @@ void gen_rand_uuid_str(char *uuid_str, int str_format)
}
#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_CMD_UUID)
-int do_uuid(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_uuid(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
char uuid[UUID_STR_LEN + 1];
int str_format;
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index b4edee29b0..de9ef902b9 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -19,6 +19,7 @@
#include <div64.h>
#include <hexdump.h>
#include <stdarg.h>
+#include <uuid.h>
#include <vsprintf.h>
#include <linux/ctype.h>
#include <linux/err.h>
diff --git a/net/arp.c b/net/arp.c
index b49c3d3ced..1d06ed2572 100644
--- a/net/arp.c
+++ b/net/arp.c
@@ -10,6 +10,10 @@
*/
#include <common.h>
+#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 505489140e..de3dab4114 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -9,10 +9,15 @@
*/
#include <common.h>
+#include <bootstage.h>
#include <command.h>
#include <env.h>
#include <efi_loader.h>
+#include <log.h>
#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/net/dns.c b/net/dns.c
index 67d761d7c0..e35c4dca7c 100644
--- a/net/dns.c
+++ b/net/dns.c
@@ -25,6 +25,7 @@
#include <common.h>
#include <command.h>
#include <env.h>
+#include <log.h>
#include <net.h>
#include <asm/unaligned.h>
diff --git a/net/eth-uclass.c b/net/eth-uclass.c
index 48560d59f6..7f89f65c92 100644
--- a/net/eth-uclass.c
+++ b/net/eth-uclass.c
@@ -6,8 +6,10 @@
*/
#include <common.h>
+#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_common.c b/net/eth_common.c
index ed26b1b693..58f899a024 100644
--- a/net/eth_common.c
+++ b/net/eth_common.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <bootstage.h>
#include <dm.h>
#include <env.h>
#include <miiphy.h>
diff --git a/net/eth_legacy.c b/net/eth_legacy.c
index 5d6b0d7d7f..35f8d398a6 100644
--- a/net/eth_legacy.c
+++ b/net/eth_legacy.c
@@ -6,10 +6,13 @@
*/
#include <common.h>
+#include <bootstage.h>
#include <command.h>
#include <env.h>
+#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"
diff --git a/net/fastboot.c b/net/fastboot.c
index 8afc5529cd..0c57fb9947 100644
--- a/net/fastboot.c
+++ b/net/fastboot.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <command.h>
#include <fastboot.h>
#include <net.h>
#include <net/fastboot.h>
diff --git a/net/link_local.c b/net/link_local.c
index 1986b9b9d3..8aec3c7996 100644
--- a/net/link_local.c
+++ b/net/link_local.c
@@ -13,6 +13,7 @@
#include <common.h>
#include <env.h>
+#include <log.h>
#include <net.h>
#include <rand.h>
#include "arp.h"
diff --git a/net/mdio-mux-uclass.c b/net/mdio-mux-uclass.c
index e425207d6e..6674eb6bee 100644
--- a/net/mdio-mux-uclass.c
+++ b/net/mdio-mux-uclass.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <miiphy.h>
#include <dm/device-internal.h>
#include <dm/uclass-internal.h>
diff --git a/net/mdio-uclass.c b/net/mdio-uclass.c
index 8e7872155a..66ee2e1976 100644
--- a/net/mdio-uclass.c
+++ b/net/mdio-uclass.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <miiphy.h>
#include <dm/device-internal.h>
diff --git a/net/net.c b/net/net.c
index 087d399a24..37932919d0 100644
--- a/net/net.c
+++ b/net/net.c
@@ -88,12 +88,14 @@
#include <common.h>
+#include <bootstage.h>
#include <command.h>
#include <console.h>
#include <env.h>
#include <env_internal.h>
#include <errno.h>
#include <image.h>
+#include <log.h>
#include <net.h>
#include <net/fastboot.h>
#include <net/tftp.h>
diff --git a/net/nfs.c b/net/nfs.c
index 72e1018a3b..70d0e08bde 100644
--- a/net/nfs.c
+++ b/net/nfs.c
@@ -30,6 +30,7 @@
#include <command.h>
#include <flash.h>
#include <image.h>
+#include <log.h>
#include <net.h>
#include <malloc.h>
#include <mapmem.h>
diff --git a/net/ping.c b/net/ping.c
index 633c942e67..0e33660f6c 100644
--- a/net/ping.c
+++ b/net/ping.c
@@ -11,6 +11,8 @@
#include "ping.h"
#include "arp.h"
+#include <log.h>
+#include <net.h>
static ushort ping_seq_number;
diff --git a/net/rarp.c b/net/rarp.c
index c1d9fcaf25..a676a4253b 100644
--- a/net/rarp.c
+++ b/net/rarp.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <command.h>
+#include <log.h>
#include <net.h>
#include <net/tftp.h>
#include "nfs.h"
diff --git a/net/sntp.c b/net/sntp.c
index 9c8ee34a4e..39d7664a22 100644
--- a/net/sntp.c
+++ b/net/sntp.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <command.h>
#include <dm.h>
+#include <log.h>
#include <net.h>
#include <rtc.h>
diff --git a/net/tftp.c b/net/tftp.c
index be24e63075..180140e495 100644
--- a/net/tftp.c
+++ b/net/tftp.c
@@ -11,6 +11,8 @@
#include <efi_loader.h>
#include <env.h>
#include <image.h>
+#include <lmb.h>
+#include <log.h>
#include <mapmem.h>
#include <net.h>
#include <net/tftp.h>
diff --git a/post/cpu/mpc83xx/ecc.c b/post/cpu/mpc83xx/ecc.c
index 16210c65ab..cc971a8909 100644
--- a/post/cpu/mpc83xx/ecc.c
+++ b/post/cpu/mpc83xx/ecc.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <cpu_func.h>
#include <irq_func.h>
+#include <log.h>
#include <mpc83xx.h>
#include <watchdog.h>
#include <asm/io.h>
diff --git a/post/drivers/i2c.c b/post/drivers/i2c.c
index 8b7967cd9d..3b378921fa 100644
--- a/post/drivers/i2c.c
+++ b/post/drivers/i2c.c
@@ -22,6 +22,7 @@
*/
#include <common.h>
+#include <log.h>
#include <post.h>
#include <i2c.h>
diff --git a/post/drivers/memory.c b/post/drivers/memory.c
index 571394dc63..9cc48b1ccc 100644
--- a/post/drivers/memory.c
+++ b/post/drivers/memory.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <log.h>
/* Memory test
*
diff --git a/post/lib_powerpc/multi.c b/post/lib_powerpc/multi.c
index 7807eb17ac..f082e4c546 100644
--- a/post/lib_powerpc/multi.c
+++ b/post/lib_powerpc/multi.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <irq_func.h>
+#include <log.h>
/*
* CPU test
diff --git a/post/post.c b/post/post.c
index 696a60f70a..6687e0b75c 100644
--- a/post/post.c
+++ b/post/post.c
@@ -5,7 +5,9 @@
*/
#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/bloblist.c b/test/bloblist.c
index bdcca0291c..4e537ee1b9 100644
--- a/test/bloblist.c
+++ b/test/bloblist.c
@@ -234,7 +234,8 @@ static int bloblist_test_checksum(struct unit_test_state *uts)
BLOBLIST_TEST(bloblist_test_checksum, 0);
-int do_ut_bloblist(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_ut_bloblist(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
struct unit_test *tests = ll_entry_start(struct unit_test,
bloblist_test);
diff --git a/test/cmd_ut.c b/test/cmd_ut.c
index bd20a69c55..cc9543c315 100644
--- a/test/cmd_ut.c
+++ b/test/cmd_ut.c
@@ -9,11 +9,12 @@
#include <test/suites.h>
#include <test/test.h>
-static int do_ut_all(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+static int do_ut_all(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[]);
int cmd_ut_category(const char *name, const char *prefix,
struct unit_test *tests, int n_ents,
- int argc, char * const argv[])
+ int argc, char *const argv[])
{
struct unit_test_state uts = { .fail_count = 0 };
struct unit_test *test;
@@ -43,7 +44,7 @@ int cmd_ut_category(const char *name, const char *prefix,
return uts.fail_count ? CMD_RET_FAILURE : 0;
}
-static cmd_tbl_t cmd_ut_sub[] = {
+static struct cmd_tbl cmd_ut_sub[] = {
U_BOOT_CMD_MKENT(all, CONFIG_SYS_MAXARGS, 1, do_ut_all, "", ""),
#if defined(CONFIG_UT_DM)
U_BOOT_CMD_MKENT(dm, CONFIG_SYS_MAXARGS, 1, do_ut_dm, "", ""),
@@ -79,7 +80,8 @@ static cmd_tbl_t cmd_ut_sub[] = {
#endif
};
-static int do_ut_all(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_ut_all(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int i;
int retval;
@@ -95,9 +97,9 @@ static int do_ut_all(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return any_fail;
}
-static int do_ut(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_ut(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
- cmd_tbl_t *cp;
+ struct cmd_tbl *cp;
if (argc < 2)
return CMD_RET_USAGE;
diff --git a/test/command_ut.c b/test/command_ut.c
index 8e268e5ee5..9837d10eb5 100644
--- a/test/command_ut.c
+++ b/test/command_ut.c
@@ -7,12 +7,15 @@
#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"
"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 63f929fa4b..ad719ddb4d 100644
--- a/test/compression.c
+++ b/test/compression.c
@@ -7,6 +7,8 @@
#include <bootm.h>
#include <command.h>
#include <gzip.h>
+#include <image.h>
+#include <log.h>
#include <lz4.h>
#include <malloc.h>
#include <mapmem.h>
@@ -534,7 +536,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/axi.c b/test/dm/axi.c
index e234ab82e6..289f07a08a 100644
--- a/test/dm/axi.c
+++ b/test/dm/axi.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <axi.h>
#include <dm.h>
+#include <log.h>
#include <dm/test.h>
#include <test/ut.h>
#include <asm/axi.h>
diff --git a/test/dm/blk.c b/test/dm/blk.c
index 9c71adc69d..94b2855b8e 100644
--- a/test/dm/blk.c
+++ b/test/dm/blk.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <part.h>
#include <usb.h>
#include <asm/state.h>
#include <dm/test.h>
diff --git a/test/dm/board.c b/test/dm/board.c
index 0f267a1926..5472c65fad 100644
--- a/test/dm/board.c
+++ b/test/dm/board.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <dm/test.h>
#include <board.h>
#include <test/ut.h>
diff --git a/test/dm/bootcount.c b/test/dm/bootcount.c
index 0817b7d3ec..be0c278907 100644
--- a/test/dm/bootcount.c
+++ b/test/dm/bootcount.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <bootcount.h>
+#include <log.h>
#include <asm/test.h>
#include <dm/test.h>
#include <test/ut.h>
diff --git a/test/dm/bus.c b/test/dm/bus.c
index 1ad45adb60..73eb3aede3 100644
--- a/test/dm/bus.c
+++ b/test/dm/bus.c
@@ -5,6 +5,7 @@
#include <common.h>
#ifdef CONFIG_SANDBOX
+#include <log.h>
#include <os.h>
#endif
#include <dm.h>
diff --git a/test/dm/clk.c b/test/dm/clk.c
index 003b78934f..48fc3dd714 100644
--- a/test/dm/clk.c
+++ b/test/dm/clk.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <asm/clk.h>
#include <dm/test.h>
diff --git a/test/dm/core.c b/test/dm/core.c
index f74c430843..6a930ae31a 100644
--- a/test/dm/core.c
+++ b/test/dm/core.c
@@ -9,6 +9,7 @@
#include <errno.h>
#include <dm.h>
#include <fdtdec.h>
+#include <log.h>
#include <malloc.h>
#include <dm/device-internal.h>
#include <dm/root.h>
diff --git a/test/dm/cpu.c b/test/dm/cpu.c
index def9b64a28..46683d884a 100644
--- a/test/dm/cpu.c
+++ b/test/dm/cpu.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <dm/test.h>
#include <dm/uclass-internal.h>
#include <cpu.h>
diff --git a/test/dm/devres.c b/test/dm/devres.c
index cbd0972c9b..b5de0cb191 100644
--- a/test/dm/devres.c
+++ b/test/dm/devres.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <errno.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <dm/device-internal.h>
#include <dm/devres.h>
diff --git a/test/dm/eth.c b/test/dm/eth.c
index ad5354b4bf..99c1672b99 100644
--- a/test/dm/eth.c
+++ b/test/dm/eth.c
@@ -10,6 +10,7 @@
#include <dm.h>
#include <env.h>
#include <fdtdec.h>
+#include <log.h>
#include <malloc.h>
#include <net.h>
#include <dm/test.h>
diff --git a/test/dm/gpio.c b/test/dm/gpio.c
index 7c18e5c411..b5ee4e4f87 100644
--- a/test/dm/gpio.c
+++ b/test/dm/gpio.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <fdtdec.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <dm/root.h>
#include <dm/test.h>
diff --git a/test/dm/mdio.c b/test/dm/mdio.c
index dc229aed6d..ba1b54f27e 100644
--- a/test/dm/mdio.c
+++ b/test/dm/mdio.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <dm/test.h>
#include <misc.h>
#include <test/ut.h>
diff --git a/test/dm/mmc.c b/test/dm/mmc.c
index 9ab0db1b66..49402b9c90 100644
--- a/test/dm/mmc.c
+++ b/test/dm/mmc.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <mmc.h>
+#include <part.h>
#include <dm/test.h>
#include <test/ut.h>
diff --git a/test/dm/ofnode.c b/test/dm/ofnode.c
index 07d5c7d7a6..1114f34cbf 100644
--- a/test/dm/ofnode.c
+++ b/test/dm/ofnode.c
@@ -2,6 +2,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <dm/of_extra.h>
#include <dm/test.h>
#include <test/ut.h>
diff --git a/test/dm/phy.c b/test/dm/phy.c
index 92455d94af..99f0119557 100644
--- a/test/dm/phy.c
+++ b/test/dm/phy.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <generic-phy.h>
+#include <log.h>
#include <dm/test.h>
#include <test/ut.h>
diff --git a/test/dm/regmap.c b/test/dm/regmap.c
index b21f66732b..809494d585 100644
--- a/test/dm/regmap.c
+++ b/test/dm/regmap.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <mapmem.h>
#include <regmap.h>
#include <syscon.h>
diff --git a/test/dm/regulator.c b/test/dm/regulator.c
index b967902493..ca916eeebb 100644
--- a/test/dm/regulator.c
+++ b/test/dm/regulator.c
@@ -10,6 +10,7 @@
#include <errno.h>
#include <dm.h>
#include <fdtdec.h>
+#include <log.h>
#include <malloc.h>
#include <dm/device-internal.h>
#include <dm/root.h>
diff --git a/test/dm/reset.c b/test/dm/reset.c
index 8370820428..871d6400a0 100644
--- a/test/dm/reset.c
+++ b/test/dm/reset.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <reset.h>
#include <dm/test.h>
diff --git a/test/dm/rng.c b/test/dm/rng.c
index ce20e2d7c2..583ce9eddf 100644
--- a/test/dm/rng.c
+++ b/test/dm/rng.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <rng.h>
#include <dm/test.h>
#include <test/ut.h>
diff --git a/test/dm/rtc.c b/test/dm/rtc.c
index 7188742764..88f86581cc 100644
--- a/test/dm/rtc.c
+++ b/test/dm/rtc.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <i2c.h>
+#include <log.h>
#include <rtc.h>
#include <asm/io.h>
#include <asm/test.h>
diff --git a/test/dm/serial.c b/test/dm/serial.c
index c6be6ab7ab..6237693cb8 100644
--- a/test/dm/serial.c
+++ b/test/dm/serial.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <log.h>
#include <serial.h>
#include <dm.h>
#include <dm/test.h>
diff --git a/test/dm/syscon.c b/test/dm/syscon.c
index f1021f374b..06a1c69ac5 100644
--- a/test/dm/syscon.c
+++ b/test/dm/syscon.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <syscon.h>
#include <regmap.h>
#include <asm/test.h>
diff --git a/test/dm/tee.c b/test/dm/tee.c
index d40f13d291..632e9960b0 100644
--- a/test/dm/tee.c
+++ b/test/dm/tee.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <dm/test.h>
#include <sandboxtee.h>
diff --git a/test/dm/test-driver.c b/test/dm/test-driver.c
index abb5b7115a..ba85fa313e 100644
--- a/test/dm/test-driver.c
+++ b/test/dm/test-driver.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include <dm/test.h>
#include <test/ut.h>
diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c
index 1128c420a3..4fcae03dc5 100644
--- a/test/dm/test-fdt.c
+++ b/test/dm/test-fdt.c
@@ -7,6 +7,7 @@
#include <dm.h>
#include <errno.h>
#include <fdtdec.h>
+#include <log.h>
#include <malloc.h>
#include <asm/io.h>
#include <dm/test.h>
diff --git a/test/dm/test-main.c b/test/dm/test-main.c
index d7dc8d1f91..53e5ca321f 100644
--- a/test/dm/test-main.c
+++ b/test/dm/test-main.c
@@ -8,6 +8,7 @@
#include <console.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include <asm/state.h>
#include <dm/test.h>
@@ -200,7 +201,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/dm/test-uclass.c b/test/dm/test-uclass.c
index 25271c6ba0..b6d629a285 100644
--- a/test/dm/test-uclass.c
+++ b/test/dm/test-uclass.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <log.h>
#include <malloc.h>
#include <dm.h>
#include <errno.h>
diff --git a/test/dm/usb.c b/test/dm/usb.c
index e396c2a0ea..a25c2c1482 100644
--- a/test/dm/usb.c
+++ b/test/dm/usb.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <console.h>
#include <dm.h>
+#include <part.h>
#include <usb.h>
#include <asm/io.h>
#include <asm/state.h>
diff --git a/test/dm/video.c b/test/dm/video.c
index f72979fac4..0664e3f22b 100644
--- a/test/dm/video.c
+++ b/test/dm/video.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <bzlib.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <mapmem.h>
#include <os.h>
diff --git a/test/env/cmd_ut_env.c b/test/env/cmd_ut_env.c
index ad67dbe792..a440b1bfb0 100644
--- a/test/env/cmd_ut_env.c
+++ b/test/env/cmd_ut_env.c
@@ -10,7 +10,7 @@
#include <test/suites.h>
#include <test/ut.h>
-int do_ut_env(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_ut_env(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
struct unit_test *tests = ll_entry_start(struct unit_test, env_test);
const int n_ents = ll_entry_count(struct unit_test, env_test);
diff --git a/test/env/hashtable.c b/test/env/hashtable.c
index 5242c4cc3e..339cc19ba1 100644
--- a/test/env/hashtable.c
+++ b/test/env/hashtable.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <command.h>
+#include <log.h>
#include <search.h>
#include <stdio.h>
#include <test/env.h>
diff --git a/test/lib/cmd_ut_lib.c b/test/lib/cmd_ut_lib.c
index c73e8d7b05..f5c7bf3d3b 100644
--- a/test/lib/cmd_ut_lib.c
+++ b/test/lib/cmd_ut_lib.c
@@ -11,7 +11,7 @@
#include <test/suites.h>
#include <test/ut.h>
-int do_ut_lib(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_ut_lib(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
struct unit_test *tests = ll_entry_start(struct unit_test, lib_test);
const int n_ents = ll_entry_count(struct unit_test, lib_test);
diff --git a/test/lib/lmb.c b/test/lib/lmb.c
index 1336b54b11..a0fe0f6b33 100644
--- a/test/lib/lmb.c
+++ b/test/lib/lmb.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <lmb.h>
+#include <log.h>
#include <malloc.h>
#include <dm/test.h>
#include <test/ut.h>
diff --git a/test/lib/string.c b/test/lib/string.c
index 8e246ab4ed..64234bef36 100644
--- a/test/lib/string.c
+++ b/test/lib/string.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <command.h>
+#include <log.h>
#include <test/lib.h>
#include <test/test.h>
#include <test/ut.h>
diff --git a/test/lib/test_aes.c b/test/lib/test_aes.c
index fb8a0b17ba..cbc712f7ed 100644
--- a/test/lib/test_aes.c
+++ b/test/lib/test_aes.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <command.h>
#include <hexdump.h>
+#include <rand.h>
#include <uboot_aes.h>
#include <test/lib.h>
#include <test/test.h>
diff --git a/test/log/log_test.c b/test/log/log_test.c
index febc2c1252..4245372d65 100644
--- a/test/log/log_test.c
+++ b/test/log/log_test.c
@@ -7,6 +7,8 @@
*/
#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)
@@ -200,7 +202,7 @@ static int log_test(int testnum)
}
#ifdef CONFIG_LOG_TEST
-int do_log_test(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_log_test(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
int testnum = 0;
int ret;
diff --git a/test/log/test-main.c b/test/log/test-main.c
index 855de47f33..c534add493 100644
--- a/test/log/test-main.c
+++ b/test/log/test-main.c
@@ -7,10 +7,11 @@
#include <common.h>
#include <console.h>
+#include <log.h>
#include <test/log.h>
#include <test/suites.h>
-int do_ut_log(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_ut_log(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[])
{
struct unit_test *tests = ll_entry_start(struct unit_test, log_test);
const int n_ents = ll_entry_count(struct unit_test, log_test);
diff --git a/test/optee/cmd_ut_optee.c b/test/optee/cmd_ut_optee.c
index 092710326a..9fa4c91e0d 100644
--- a/test/optee/cmd_ut_optee.c
+++ b/test/optee/cmd_ut_optee.c
@@ -7,6 +7,7 @@
#include <command.h>
#include <errno.h>
#include <fdt_support.h>
+#include <log.h>
#include <malloc.h>
#include <tee/optee.h>
@@ -91,7 +92,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 d0083fd6be..c001fb183f 100644
--- a/test/overlay/cmd_ut_overlay.c
+++ b/test/overlay/cmd_ut_overlay.c
@@ -8,6 +8,8 @@
#include <command.h>
#include <errno.h>
#include <fdt_support.h>
+#include <image.h>
+#include <log.h>
#include <malloc.h>
#include <linux/sizes.h>
@@ -209,7 +211,7 @@ static int fdt_overlay_stacked(struct unit_test_state *uts)
}
OVERLAY_TEST(fdt_overlay_stacked, 0);
-int do_ut_overlay(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_ut_overlay(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
struct unit_test *tests = ll_entry_start(struct unit_test,
overlay_test);
diff --git a/test/print_ut.c b/test/print_ut.c
index a3b9974ad2..a456a449ef 100644
--- a/test/print_ut.c
+++ b/test/print_ut.c
@@ -7,9 +7,11 @@
#include <common.h>
#if CONFIG_IS_ENABLED(EFI_LOADER) && !defined(API_BUILD)
+#include <command.h>
#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" \
@@ -68,7 +70,7 @@ static void efi_ut_print(void)
#endif
}
-static int do_ut_print(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_ut_print(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
char big_str[400];
diff --git a/test/str_ut.c b/test/str_ut.c
index 7c8015050a..ef1205dbbd 100644
--- a/test/str_ut.c
+++ b/test/str_ut.c
@@ -105,7 +105,7 @@ static int str_simple_strtoul(struct unit_test_state *uts)
}
STR_TEST(str_simple_strtoul, 0);
-int do_ut_str(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+int do_ut_str(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
struct unit_test *tests = ll_entry_start(struct unit_test,
str_test);
diff --git a/test/time_ut.c b/test/time_ut.c
index 40a19a50d9..80b82dbfd8 100644
--- a/test/time_ut.c
+++ b/test/time_ut.c
@@ -8,6 +8,7 @@
#include <command.h>
#include <errno.h>
#include <time.h>
+#include <linux/delay.h>
static int test_get_timer(void)
{
@@ -117,7 +118,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 d8b4aa9b44..5f932bffd3 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>
@@ -591,7 +592,7 @@ static int unicode_test_u16_strsize(struct unit_test_state *uts)
}
UNICODE_TEST(unicode_test_u16_strsize);
-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/imx8image.c b/tools/imx8image.c
index 1b428c3b2f..133780f5ea 100644
--- a/tools/imx8image.c
+++ b/tools/imx8image.c
@@ -6,6 +6,7 @@
*/
#include "imx8image.h"
+#include <image.h>
static int p_idx;
static int sector_size;
diff --git a/tools/proftool.c b/tools/proftool.c
index fecb9d6e99..ea7d07a277 100644
--- a/tools/proftool.c
+++ b/tools/proftool.c
@@ -532,7 +532,7 @@ static int make_ftrace(void)
return 0;
}
-static int prof_tool(int argc, char * const argv[],
+static int prof_tool(int argc, char *const argv[],
const char *prof_fname, const char *map_fname,
const char *trace_config_fname)
{